Compare commits

...

2 Commits

Author SHA1 Message Date
e9358c0552 Merge branch 'master' into vue-3 2022-11-03 12:15:10 -07:00
6414a6f556 WIP 2022-11-03 12:09:43 -07:00
16 changed files with 52 additions and 40 deletions

View File

@ -59,10 +59,11 @@
"style-loader": "^3.3.1", "style-loader": "^3.3.1",
"typescript": "4.8.4", "typescript": "4.8.4",
"uuid": "9.0.0", "uuid": "9.0.0",
"vue": "2.6.14", "vue": "^3.1.0",
"@vue/compat": "^3.1.0",
"vue-eslint-parser": "9.1.0", "vue-eslint-parser": "9.1.0",
"vue-loader": "15.9.8", "vue-loader": "^16.0.0",
"vue-template-compiler": "2.6.14", "@vue/compiler-sfc": "^3.1.0",
"webpack": "5.74.0", "webpack": "5.74.0",
"webpack-cli": "4.10.0", "webpack-cli": "4.10.0",
"webpack-dev-server": "4.11.1", "webpack-dev-server": "4.11.1",

View File

@ -33,9 +33,9 @@
<tbody> <tbody>
<template <template
v-for="ladTable in ladTableObjects" v-for="ladTable in ladTableObjects"
:key="ladTable.key"
> >
<tr <tr
:key="ladTable.key"
class="c-table__group-header js-lad-table-set__table-headers" class="c-table__group-header js-lad-table-set__table-headers"
> >
<td colspan="10"> <td colspan="10">

View File

@ -45,9 +45,9 @@
<div class="c-fl-container__frames-holder"> <div class="c-fl-container__frames-holder">
<template <template
v-for="(frame, i) in frames" v-for="(frame, i) in frames"
:key="frame.id"
> >
<frame-component <frame-component
:key="frame.id"
class="c-fl-container__frame" class="c-fl-container__frame"
:frame="frame" :frame="frame"
:index="i" :index="i"
@ -57,7 +57,6 @@
/> />
<drop-hint <drop-hint
:key="'hint-' + i"
class="c-fl-frame__drop-hint" class="c-fl-frame__drop-hint"
:index="i" :index="i"
:allow-drop="allowDrop" :allow-drop="allowDrop"
@ -66,7 +65,6 @@
<resize-handle <resize-handle
v-if="(i !== frames.length - 1)" v-if="(i !== frames.length - 1)"
:key="'handle-' + i"
:index="i" :index="i"
:orientation="rowsLayout ? 'horizontal' : 'vertical'" :orientation="rowsLayout ? 'horizontal' : 'vertical'"
:is-editing="isEditing" :is-editing="isEditing"

View File

@ -40,10 +40,12 @@
'c-fl--rows': rowsLayout === true 'c-fl--rows': rowsLayout === true
}" }"
> >
<template v-for="(container, index) in containers"> <template
v-for="(container, index) in containers"
:key="`component-${container.id}`"
>
<drop-hint <drop-hint
v-if="index === 0 && containers.length > 1" v-if="index === 0 && containers.length > 1"
:key="`hint-top-${container.id}`"
class="c-fl-frame__drop-hint" class="c-fl-frame__drop-hint"
:index="-1" :index="-1"
:allow-drop="allowContainerDrop" :allow-drop="allowContainerDrop"
@ -51,7 +53,6 @@
/> />
<container-component <container-component
:key="`component-${container.id}`"
class="c-fl__container" class="c-fl__container"
:index="index" :index="index"
:container="container" :container="container"
@ -77,7 +78,6 @@
<drop-hint <drop-hint
v-if="containers.length > 1" v-if="containers.length > 1"
:key="`hint-bottom-${container.id}`"
class="c-fl-frame__drop-hint" class="c-fl-frame__drop-hint"
:index="index" :index="index"
:allow-drop="allowContainerDrop" :allow-drop="allowContainerDrop"

View File

@ -256,7 +256,7 @@ export default {
isNested: true isNested: true
}; };
}, },
template: `<swim-lane :is-nested="isNested" :hide-label="true"><template slot="object"><div class="c-imagery-tsv-container"></div></template></swim-lane>` template: `<swim-lane :is-nested="isNested" :hide-label="true"><slot name="object"><div class="c-imagery-tsv-container"></div></slot></swim-lane>`
}); });
this.$refs.imageryHolder.appendChild(component.$mount().$el); this.$refs.imageryHolder.appendChild(component.$mount().$el);

View File

@ -174,7 +174,7 @@
:active="focusedImageIndex === index" :active="focusedImageIndex === index"
:selected="focusedImageIndex === index && isPaused" :selected="focusedImageIndex === index && isPaused"
:real-time="!isFixed" :real-time="!isFixed"
@click.native="thumbnailClicked(index)" @click="thumbnailClicked(index)"
/> />
</div> </div>

View File

@ -27,7 +27,7 @@
> >
<template v-if="viewBounds && !options.compact"> <template v-if="viewBounds && !options.compact">
<swim-lane> <swim-lane>
<template slot="label">{{ timeSystem.name }}</template> <slot name="label">{{ timeSystem.name }}</slot>
<timeline-axis <timeline-axis
slot="object" slot="object"
:bounds="viewBounds" :bounds="viewBounds"
@ -418,7 +418,7 @@ export default {
width: svgWidth width: svgWidth
}; };
}, },
template: `<swim-lane :is-nested="isNested" :status="status"><template slot="label">{{heading}}</template><template slot="object"><svg :height="height" :width="width"></svg></template></swim-lane>` template: `<swim-lane :is-nested="isNested" :status="status"><slot name="label">{{heading}}</template><template slot="object"><svg :height="height" :width="width"></svg></slot></swim-lane>`
}); });
this.$refs.planHolder.appendChild(component.$mount().$el); this.$refs.planHolder.appendChild(component.$mount().$el);

View File

@ -257,11 +257,11 @@
@change-height="setRowHeight" @change-height="setRowHeight"
/> />
<tr> <tr>
<template v-for="(title, key) in headers"> <template
<th v-for="(title, key) in headers"
:key="key" :key="key"
:style="{ width: configuredColumnWidths[key] + 'px', 'max-width': configuredColumnWidths[key] + 'px'}" >
> <th :style="{ width: configuredColumnWidths[key] + 'px', 'max-width': configuredColumnWidths[key] + 'px'}">
{{ title }} {{ title }}
</th> </th>
</template> </template>

View File

@ -14,7 +14,7 @@
:bottom="keyString !== undefined" :bottom="keyString !== undefined"
:type="'start'" :type="'start'"
:offset="offsets.start" :offset="offsets.start"
@focus.native="$event.target.select()" @focus="$event.target.select()"
@hide="hideAllTimePopups" @hide="hideAllTimePopups"
@update="timePopUpdate" @update="timePopUpdate"
/> />
@ -54,7 +54,7 @@
:bottom="keyString !== undefined" :bottom="keyString !== undefined"
:type="'end'" :type="'end'"
:offset="offsets.end" :offset="offsets.end"
@focus.native="$event.target.select()" @focus="$event.target.select()"
@hide="hideAllTimePopups" @hide="hideAllTimePopups"
@update="timePopUpdate" @update="timePopUpdate"
/> />

View File

@ -5,10 +5,10 @@
> >
<input <input
class="c-search__input" class="c-search__input"
v-bind="$attrs"
aria-label="Search Input" aria-label="Search Input"
tabindex="10000" tabindex="10000"
type="search" type="search"
v-bind="$attrs"
:value="value" :value="value"
v-on="inputListeners" v-on="inputListeners"
> >

View File

@ -41,7 +41,7 @@
:key="openmct.objects.makeKeyString(objectResult.identifier)" :key="openmct.objects.makeKeyString(objectResult.identifier)"
:result="objectResult" :result="objectResult"
@preview-changed="previewChanged" @preview-changed="previewChanged"
@click.native="selectedResult" @click="selectedResult"
/> />
</div> </div>
<div <div
@ -53,7 +53,7 @@
v-for="(annotationResult) in annotationResults" v-for="(annotationResult) in annotationResults"
:key="openmct.objects.makeKeyString(annotationResult.identifier)" :key="openmct.objects.makeKeyString(annotationResult.identifier)"
:result="annotationResult" :result="annotationResult"
@click.native="selectedResult" @click="selectedResult"
/> />
</div> </div>
<div <div

View File

@ -7,10 +7,10 @@
<div class="c-labeled-input__label">{{ options.label }}</div> <div class="c-labeled-input__label">{{ options.label }}</div>
</label> </label>
<input <input
v-bind="options.attrs"
:id="uid" :id="uid"
:type="options.type" :type="options.type"
:value="options.value" :value="options.value"
v-bind="options.attrs"
> >
</div> </div>
</template> </template>

View File

@ -128,7 +128,7 @@ export function simulateKeyEvent(opts) {
} }
function clearBuiltinSpy(funcDefinition) { function clearBuiltinSpy(funcDefinition) {
funcDefinition.object[funcDefinition.functionName] = funcDefinition.nativeFunction; funcDefinition.object[funcDefinition.functionName] = funcDefinitionFunction;
} }
export function getLatestTelemetry(telemetry = [], opts = {}) { export function getLatestTelemetry(telemetry = [], opts = {}) {

View File

@ -37,7 +37,7 @@ const config = {
couchDBChangesFeed: './src/plugins/persistence/couch/CouchChangesFeed.js', couchDBChangesFeed: './src/plugins/persistence/couch/CouchChangesFeed.js',
inMemorySearchWorker: './src/api/objects/InMemorySearchWorker.js', inMemorySearchWorker: './src/api/objects/InMemorySearchWorker.js',
espressoTheme: './src/plugins/themes/espresso-theme.scss', espressoTheme: './src/plugins/themes/espresso-theme.scss',
snowTheme: './src/plugins/themes/snow-theme.scss', snowTheme: './src/plugins/themes/snow-theme.scss'
}, },
output: { output: {
globalObject: 'this', globalObject: 'this',
@ -65,7 +65,8 @@ const config = {
"MCT": path.join(__dirname, "src/MCT"), "MCT": path.join(__dirname, "src/MCT"),
"testUtils": path.join(__dirname, "src/utils/testUtils.js"), "testUtils": path.join(__dirname, "src/utils/testUtils.js"),
"objectUtils": path.join(__dirname, "src/api/objects/object-utils.js"), "objectUtils": path.join(__dirname, "src/api/objects/object-utils.js"),
"utils": path.join(__dirname, "src/utils") "utils": path.join(__dirname, "src/utils"),
"vue": "@vue/compat"
} }
}, },
plugins: [ plugins: [
@ -119,7 +120,15 @@ const config = {
}, },
{ {
test: /\.vue$/, test: /\.vue$/,
use: 'vue-loader' loader: 'vue-loader',
options: {
hotReload: false,
compilerOptions: {
compatConfig: {
MODE: 3
}
}
}
}, },
{ {
test: /\.html$/, test: /\.html$/,
@ -148,6 +157,9 @@ const config = {
} }
] ]
}, },
externals: {
"vue": "Vue"
},
stats: 'errors-warnings', stats: 'errors-warnings',
performance: { performance: {
// We should eventually consider chunking to decrease // We should eventually consider chunking to decrease

View File

@ -24,11 +24,12 @@ module.exports = merge(common, {
'**/.*' // dotfiles and dotfolders '**/.*' // dotfiles and dotfolders
] ]
}, },
resolve: { // resolve: {
alias: { // alias: {
"vue": path.join(__dirname, "node_modules/vue/dist/vue.js") // // "vue": path.join(__dirname, "node_modules/vue/dist/vue.js")
} // "vue": "@vue/compat"
}, // }
// },
plugins: [ plugins: [
new webpack.DefinePlugin({ new webpack.DefinePlugin({
__OPENMCT_ROOT_RELATIVE__: '"dist/"' __OPENMCT_ROOT_RELATIVE__: '"dist/"'

View File

@ -12,11 +12,11 @@ const webpack = require('webpack');
module.exports = merge(common, { module.exports = merge(common, {
mode: 'production', mode: 'production',
resolve: { // resolve: {
alias: { // alias: {
"vue": path.join(__dirname, "node_modules/vue/dist/vue.min.js") // "vue": path.join(__dirname, "node_modules/vue/dist/vue.min.js")
} // }
}, // },
plugins: [ plugins: [
new webpack.DefinePlugin({ new webpack.DefinePlugin({
__OPENMCT_ROOT_RELATIVE__: '""' __OPENMCT_ROOT_RELATIVE__: '""'