Upgrades to eslint-plugin-vue 7.5.0 (#3685)

This commit is contained in:
Shefali Joshi 2021-02-12 13:46:53 -08:00 committed by GitHub
parent abb1a5c75b
commit a9be9f1827
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
69 changed files with 126 additions and 116 deletions

View File

@ -54,7 +54,7 @@ module.exports = {
{ {
"anonymous": "always", "anonymous": "always",
"asyncArrow": "always", "asyncArrow": "always",
"named": "never", "named": "never"
} }
], ],
"array-bracket-spacing": "error", "array-bracket-spacing": "error",
@ -178,7 +178,10 @@ module.exports = {
//https://eslint.org/docs/rules/no-whitespace-before-property //https://eslint.org/docs/rules/no-whitespace-before-property
"no-whitespace-before-property": "error", "no-whitespace-before-property": "error",
// https://eslint.org/docs/rules/object-curly-newline // https://eslint.org/docs/rules/object-curly-newline
"object-curly-newline": ["error", {"consistent": true, "multiline": true}], "object-curly-newline": ["error", {
"consistent": true,
"multiline": true
}],
// https://eslint.org/docs/rules/object-property-newline // https://eslint.org/docs/rules/object-property-newline
"object-property-newline": "error", "object-property-newline": "error",
// https://eslint.org/docs/rules/brace-style // https://eslint.org/docs/rules/brace-style
@ -200,11 +203,17 @@ module.exports = {
// https://eslint.org/docs/rules/space-infix-ops // https://eslint.org/docs/rules/space-infix-ops
"space-infix-ops": "error", "space-infix-ops": "error",
// https://eslint.org/docs/rules/space-unary-ops // https://eslint.org/docs/rules/space-unary-ops
"space-unary-ops": ["error", {"words": true, "nonwords": false}], "space-unary-ops": ["error", {
"words": true,
"nonwords": false
}],
// https://eslint.org/docs/rules/arrow-spacing // https://eslint.org/docs/rules/arrow-spacing
"arrow-spacing": "error", "arrow-spacing": "error",
// https://eslint.org/docs/rules/semi-spacing // https://eslint.org/docs/rules/semi-spacing
"semi-spacing": ["error", {"before": false, "after": true}], "semi-spacing": ["error", {
"before": false,
"after": true
}],
"vue/html-indent": [ "vue/html-indent": [
"error", "error",
@ -237,6 +246,7 @@ module.exports = {
}], }],
"vue/multiline-html-element-content-newline": "off", "vue/multiline-html-element-content-newline": "off",
"vue/singleline-html-element-content-newline": "off", "vue/singleline-html-element-content-newline": "off",
"vue/no-mutating-props": "off"
}, },
"overrides": [ "overrides": [

View File

@ -23,7 +23,7 @@
"d3-time": "1.0.x", "d3-time": "1.0.x",
"d3-time-format": "2.1.x", "d3-time-format": "2.1.x",
"eslint": "7.0.0", "eslint": "7.0.0",
"eslint-plugin-vue": "^6.0.0", "eslint-plugin-vue": "^7.5.0",
"eslint-plugin-you-dont-need-lodash-underscore": "^6.10.0", "eslint-plugin-you-dont-need-lodash-underscore": "^6.10.0",
"eventemitter3": "^1.2.0", "eventemitter3": "^1.2.0",
"exports-loader": "^0.7.0", "exports-loader": "^0.7.0",

View File

@ -30,12 +30,12 @@ class Menu extends EventEmitter {
this.options = options; this.options = options;
this.component = new Vue({ this.component = new Vue({
provide: {
actions: options.actions
},
components: { components: {
MenuComponent MenuComponent
}, },
provide: {
actions: options.actions
},
template: '<menu-component />' template: '<menu-component />'
}); });

View File

@ -48,7 +48,7 @@ define([
this.providers.push(function () { this.providers.push(function () {
return key; return key;
}); });
} else if (_.isFunction(key)) { } else if (typeof key === "function") {
this.providers.push(key); this.providers.push(key);
} }
}; };

View File

@ -6,6 +6,9 @@ class Dialog extends Overlay {
constructor({iconClass, message, title, hint, timestamp, ...options}) { constructor({iconClass, message, title, hint, timestamp, ...options}) {
let component = new Vue({ let component = new Vue({
components: {
DialogComponent: DialogComponent
},
provide: { provide: {
iconClass, iconClass,
message, message,
@ -13,9 +16,6 @@ class Dialog extends Overlay {
hint, hint,
timestamp timestamp
}, },
components: {
DialogComponent: DialogComponent
},
template: '<dialog-component></dialog-component>' template: '<dialog-component></dialog-component>'
}).$mount(); }).$mount();

View File

@ -7,6 +7,9 @@ let component;
class ProgressDialog extends Overlay { class ProgressDialog extends Overlay {
constructor({progressPerc, progressText, iconClass, message, title, hint, timestamp, ...options}) { constructor({progressPerc, progressText, iconClass, message, title, hint, timestamp, ...options}) {
component = new Vue({ component = new Vue({
components: {
ProgressDialogComponent: ProgressDialogComponent
},
provide: { provide: {
iconClass, iconClass,
message, message,
@ -14,9 +17,6 @@ class ProgressDialog extends Overlay {
hint, hint,
timestamp timestamp
}, },
components: {
ProgressDialogComponent: ProgressDialogComponent
},
data() { data() {
return { return {
model: { model: {

View File

@ -38,12 +38,12 @@
<script> <script>
export default { export default {
inject: ['dismiss', 'element', 'buttons', 'dismissable'],
data: function () { data: function () {
return { return {
focusIndex: -1 focusIndex: -1
}; };
}, },
inject: ['dismiss', 'element', 'buttons', 'dismissable'],
mounted() { mounted() {
const element = this.$refs.element; const element = this.$refs.element;
element.appendChild(this.element); element.appendChild(this.element);

View File

@ -43,15 +43,15 @@ export default function LADTableViewProvider(openmct) {
components: { components: {
LadTableComponent: LadTable LadTableComponent: LadTable
}, },
provide: {
openmct
},
data: () => { data: () => {
return { return {
domainObject, domainObject,
objectPath objectPath
}; };
}, },
provide: {
openmct
},
template: '<lad-table-component :domain-object="domainObject" :object-path="objectPath"></lad-table-component>' template: '<lad-table-component :domain-object="domainObject" :object-path="objectPath"></lad-table-component>'
}); });
}, },

View File

@ -48,10 +48,10 @@
import LadRow from './LADRow.vue'; import LadRow from './LADRow.vue';
export default { export default {
inject: ['openmct'],
components: { components: {
LadRow LadRow
}, },
inject: ['openmct'],
props: { props: {
domainObject: { domainObject: {
type: Object, type: Object,

View File

@ -57,10 +57,10 @@
import LadRow from './LADRow.vue'; import LadRow from './LADRow.vue';
export default { export default {
inject: ['openmct', 'domainObject'],
components: { components: {
LadRow LadRow
}, },
inject: ['openmct', 'domainObject'],
data() { data() {
return { return {
ladTableObjects: [], ladTableObjects: [],

View File

@ -37,12 +37,12 @@ define([
return function install(openmct) { return function install(openmct) {
if (installIndicator) { if (installIndicator) {
let component = new Vue ({ let component = new Vue ({
provide: {
openmct
},
components: { components: {
GlobalClearIndicator: GlobaClearIndicator.default GlobalClearIndicator: GlobaClearIndicator.default
}, },
provide: {
openmct
},
template: '<GlobalClearIndicator></GlobalClearIndicator>' template: '<GlobalClearIndicator></GlobalClearIndicator>'
}); });

View File

@ -195,11 +195,11 @@ import { TRIGGER, TRIGGER_LABEL } from "@/plugins/condition/utils/constants";
import uuid from 'uuid'; import uuid from 'uuid';
export default { export default {
inject: ['openmct'],
components: { components: {
Criterion, Criterion,
ConditionDescription ConditionDescription
}, },
inject: ['openmct'],
props: { props: {
currentConditionId: { currentConditionId: {
type: String, type: String,

View File

@ -81,10 +81,10 @@ import Condition from './Condition.vue';
import ConditionManager from '../ConditionManager'; import ConditionManager from '../ConditionManager';
export default { export default {
inject: ['openmct', 'domainObject'],
components: { components: {
Condition Condition
}, },
inject: ['openmct', 'domainObject'],
props: { props: {
isEditing: Boolean, isEditing: Boolean,
testData: { testData: {

View File

@ -58,11 +58,11 @@ import TestData from './TestData.vue';
import ConditionCollection from './ConditionCollection.vue'; import ConditionCollection from './ConditionCollection.vue';
export default { export default {
inject: ["openmct", "domainObject"],
components: { components: {
TestData, TestData,
ConditionCollection ConditionCollection
}, },
inject: ["openmct", "domainObject"],
props: { props: {
isEditing: Boolean isEditing: Boolean
}, },

View File

@ -68,10 +68,10 @@ import viewControl from '@/ui/components/viewControl.vue';
export default { export default {
name: 'ConditionSetDialogTreeItem', name: 'ConditionSetDialogTreeItem',
inject: ['openmct'],
components: { components: {
viewControl viewControl
}, },
inject: ['openmct'],
props: { props: {
node: { node: {
type: Object, type: Object,

View File

@ -85,12 +85,12 @@ import search from '@/ui/components/search.vue';
import ConditionSetDialogTreeItem from './ConditionSetDialogTreeItem.vue'; import ConditionSetDialogTreeItem from './ConditionSetDialogTreeItem.vue';
export default { export default {
inject: ['openmct'],
name: 'ConditionSetSelectorDialog', name: 'ConditionSetSelectorDialog',
components: { components: {
search, search,
ConditionSetDialogTreeItem ConditionSetDialogTreeItem
}, },
inject: ['openmct'],
data() { data() {
return { return {
expanded: false, expanded: false,

View File

@ -401,15 +401,15 @@ describe('the plugin', function () {
let viewContainer = document.createElement('div'); let viewContainer = document.createElement('div');
child.append(viewContainer); child.append(viewContainer);
component = new Vue({ component = new Vue({
el: viewContainer,
components: {
StylesView
},
provide: { provide: {
openmct: openmct, openmct: openmct,
selection: selection, selection: selection,
stylesManager stylesManager
}, },
el: viewContainer,
components: {
StylesView
},
template: '<styles-view/>' template: '<styles-view/>'
}); });

View File

@ -56,14 +56,14 @@ define([
return { return {
show: function (element) { show: function (element) {
component = new Vue({ component = new Vue({
provide: {
openmct,
objectPath
},
el: element, el: element,
components: { components: {
AlphanumericFormatView: AlphanumericFormatView.default AlphanumericFormatView: AlphanumericFormatView.default
}, },
provide: {
openmct,
objectPath
},
template: '<alphanumeric-format-view ref="alphanumericFormatView"></alphanumeric-format-view>' template: '<alphanumeric-format-view ref="alphanumericFormatView"></alphanumeric-format-view>'
}); });
}, },

View File

@ -51,11 +51,11 @@ export default {
height: 5 height: 5
}; };
}, },
inject: ['openmct'],
components: { components: {
LayoutFrame LayoutFrame
}, },
mixins: [conditionalStylesMixin], mixins: [conditionalStylesMixin],
inject: ['openmct'],
props: { props: {
item: { item: {
type: Object, type: Object,

View File

@ -51,11 +51,11 @@ export default {
url: element.url url: element.url
}; };
}, },
inject: ['openmct'],
components: { components: {
LayoutFrame LayoutFrame
}, },
mixins: [conditionalStylesMixin], mixins: [conditionalStylesMixin],
inject: ['openmct'],
props: { props: {
item: { item: {
type: Object, type: Object,

View File

@ -99,8 +99,8 @@ export default {
stroke: '#717171' stroke: '#717171'
}; };
}, },
inject: ['openmct'],
mixins: [conditionalStylesMixin], mixins: [conditionalStylesMixin],
inject: ['openmct'],
props: { props: {
item: { item: {
type: Object, type: Object,

View File

@ -80,11 +80,11 @@ export default {
viewKey viewKey
}; };
}, },
inject: ['openmct', 'objectPath'],
components: { components: {
ObjectFrame, ObjectFrame,
LayoutFrame LayoutFrame
}, },
inject: ['openmct', 'objectPath'],
props: { props: {
item: { item: {
type: Object, type: Object,

View File

@ -98,11 +98,11 @@ export default {
font: 'default' font: 'default'
}; };
}, },
inject: ['openmct', 'objectPath'],
components: { components: {
LayoutFrame LayoutFrame
}, },
mixins: [conditionalStylesMixin], mixins: [conditionalStylesMixin],
inject: ['openmct', 'objectPath'],
props: { props: {
item: { item: {
type: Object, type: Object,

View File

@ -59,11 +59,11 @@ export default {
font: 'default' font: 'default'
}; };
}, },
inject: ['openmct'],
components: { components: {
LayoutFrame LayoutFrame
}, },
mixins: [conditionalStylesMixin], mixins: [conditionalStylesMixin],
inject: ['openmct'],
props: { props: {
item: { item: {
type: Object, type: Object,

View File

@ -47,13 +47,13 @@ define([
return { return {
show: function (element) { show: function (element) {
component = new Vue({ component = new Vue({
provide: {
openmct
},
el: element, el: element,
components: { components: {
FiltersView: FiltersView.default FiltersView: FiltersView.default
}, },
provide: {
openmct
},
template: '<filters-view></filters-view>' template: '<filters-view></filters-view>'
}); });
}, },

View File

@ -65,11 +65,11 @@ import ToggleSwitch from '../../../ui/components/ToggleSwitch.vue';
import isEmpty from 'lodash/isEmpty'; import isEmpty from 'lodash/isEmpty';
export default { export default {
inject: ['openmct'],
components: { components: {
FilterField, FilterField,
ToggleSwitch ToggleSwitch
}, },
inject: ['openmct'],
props: { props: {
filterObject: { filterObject: {
type: Object, type: Object,

View File

@ -41,10 +41,10 @@
import FilterField from './FilterField.vue'; import FilterField from './FilterField.vue';
export default { export default {
inject: ['openmct'],
components: { components: {
FilterField FilterField
}, },
inject: ['openmct'],
props: { props: {
globalMetadata: { globalMetadata: {
type: Object, type: Object,

View File

@ -87,12 +87,12 @@ import DropHint from './dropHint.vue';
const MIN_FRAME_SIZE = 5; const MIN_FRAME_SIZE = 5;
export default { export default {
inject: ['openmct'],
components: { components: {
FrameComponent, FrameComponent,
ResizeHandle, ResizeHandle,
DropHint DropHint
}, },
inject: ['openmct'],
props: { props: {
container: { container: {
type: Object, type: Object,

View File

@ -140,12 +140,12 @@ function sizeToFill(items) {
} }
export default { export default {
inject: ['openmct', 'objectPath', 'layoutObject'],
components: { components: {
ContainerComponent, ContainerComponent,
ResizeHandle, ResizeHandle,
DropHint DropHint
}, },
inject: ['openmct', 'objectPath', 'layoutObject'],
props: { props: {
isEditing: Boolean isEditing: Boolean
}, },

View File

@ -58,10 +58,10 @@
import ObjectFrame from '../../../ui/components/ObjectFrame.vue'; import ObjectFrame from '../../../ui/components/ObjectFrame.vue';
export default { export default {
inject: ['openmct'],
components: { components: {
ObjectFrame ObjectFrame
}, },
inject: ['openmct'],
props: { props: {
frame: { frame: {
type: Object, type: Object,

View File

@ -44,15 +44,15 @@ define([
return { return {
show: function (element, isEditing) { show: function (element, isEditing) {
component = new Vue({ component = new Vue({
el: element,
components: {
FlexibleLayoutComponent: FlexibleLayoutComponent.default
},
provide: { provide: {
openmct, openmct,
objectPath, objectPath,
layoutObject: domainObject layoutObject: domainObject
}, },
el: element,
components: {
FlexibleLayoutComponent: FlexibleLayoutComponent.default
},
data() { data() {
return { return {
isEditing: isEditing isEditing: isEditing

View File

@ -117,13 +117,13 @@ import objectUtils from 'objectUtils';
import { throttle } from 'lodash'; import { throttle } from 'lodash';
export default { export default {
inject: ['openmct', 'domainObject', 'snapshotContainer'],
components: { components: {
NotebookEntry, NotebookEntry,
Search, Search,
SearchResults, SearchResults,
Sidebar Sidebar
}, },
inject: ['openmct', 'domainObject', 'snapshotContainer'],
data() { data() {
return { return {
defaultPageId: getDefaultNotebook() ? getDefaultNotebook().page.id : '', defaultPageId: getDefaultNotebook() ? getDefaultNotebook().page.id : '',

View File

@ -33,10 +33,10 @@ import SnapshotTemplate from './snapshot-template.html';
import Vue from 'vue'; import Vue from 'vue';
export default { export default {
inject: ['openmct'],
components: { components: {
PopupMenu PopupMenu
}, },
inject: ['openmct'],
props: { props: {
embed: { embed: {
type: Object, type: Object,

View File

@ -61,10 +61,10 @@ import { createNewEmbed, getEntryPosById, getNotebookEntries } from '../utils/no
import Moment from 'moment'; import Moment from 'moment';
export default { export default {
inject: ['openmct', 'snapshotContainer'],
components: { components: {
NotebookEmbed NotebookEmbed
}, },
inject: ['openmct', 'snapshotContainer'],
props: { props: {
domainObject: { domainObject: {
type: Object, type: Object,

View File

@ -56,11 +56,11 @@ import { NOTEBOOK_SNAPSHOT_MAX_COUNT } from '../snapshot-container';
import { EVENT_SNAPSHOTS_UPDATED } from '../notebook-constants'; import { EVENT_SNAPSHOTS_UPDATED } from '../notebook-constants';
export default { export default {
inject: ['openmct', 'snapshotContainer'],
components: { components: {
NotebookEmbed, NotebookEmbed,
PopupMenu PopupMenu
}, },
inject: ['openmct', 'snapshotContainer'],
props: { props: {
toggleSnapshot: { toggleSnapshot: {
type: Function, type: Function,

View File

@ -69,14 +69,14 @@ export default {
const divElement = document.querySelector('.l-shell__drawer div'); const divElement = document.querySelector('.l-shell__drawer div');
this.component = new Vue({ this.component = new Vue({
provide: {
openmct,
snapshotContainer
},
el: divElement, el: divElement,
components: { components: {
SnapshotContainerComponent SnapshotContainerComponent
}, },
provide: {
openmct,
snapshotContainer
},
data() { data() {
return { return {
toggleSnapshot toggleSnapshot

View File

@ -22,10 +22,10 @@ import { getDefaultNotebook } from '../utils/notebook-storage';
import Page from './PageComponent.vue'; import Page from './PageComponent.vue';
export default { export default {
inject: ['openmct'],
components: { components: {
Page Page
}, },
inject: ['openmct'],
props: { props: {
defaultPageId: { defaultPageId: {
type: String, type: String,

View File

@ -18,10 +18,10 @@ import PopupMenu from './PopupMenu.vue';
import RemoveDialog from '../utils/removeDialog'; import RemoveDialog from '../utils/removeDialog';
export default { export default {
inject: ['openmct'],
components: { components: {
PopupMenu PopupMenu
}, },
inject: ['openmct'],
props: { props: {
defaultPageId: { defaultPageId: {
type: String, type: String,

View File

@ -21,10 +21,10 @@
import NotebookEntry from './NotebookEntry.vue'; import NotebookEntry from './NotebookEntry.vue';
export default { export default {
inject: ['openmct', 'snapshotContainer'],
components: { components: {
NotebookEntry NotebookEntry
}, },
inject: ['openmct', 'snapshotContainer'],
props: { props: {
domainObject: { domainObject: {
type: Object, type: Object,

View File

@ -22,10 +22,10 @@ import { getDefaultNotebook } from '../utils/notebook-storage';
import sectionComponent from './SectionComponent.vue'; import sectionComponent from './SectionComponent.vue';
export default { export default {
inject: ['openmct'],
components: { components: {
sectionComponent sectionComponent
}, },
inject: ['openmct'],
props: { props: {
defaultSectionId: { defaultSectionId: {
type: String, type: String,

View File

@ -21,10 +21,10 @@ import PopupMenu from './PopupMenu.vue';
import RemoveDialog from '../utils/removeDialog'; import RemoveDialog from '../utils/removeDialog';
export default { export default {
inject: ['openmct'],
components: { components: {
PopupMenu PopupMenu
}, },
inject: ['openmct'],
props: { props: {
defaultSectionId: { defaultSectionId: {
type: String, type: String,

View File

@ -61,11 +61,11 @@ import PageCollection from './PageCollection.vue';
import uuid from 'uuid'; import uuid from 'uuid';
export default { export default {
inject: ['openmct'],
components: { components: {
SectionCollection, SectionCollection,
PageCollection PageCollection
}, },
inject: ['openmct'],
props: { props: {
defaultPageId: { defaultPageId: {
type: String, type: String,

View File

@ -88,13 +88,13 @@ export default function NotebookPlugin() {
const snapshotContainer = new SnapshotContainer(openmct); const snapshotContainer = new SnapshotContainer(openmct);
const notebookSnapshotIndicator = new Vue ({ const notebookSnapshotIndicator = new Vue ({
components: {
NotebookSnapshotIndicator
},
provide: { provide: {
openmct, openmct,
snapshotContainer snapshotContainer
}, },
components: {
NotebookSnapshotIndicator
},
template: '<NotebookSnapshotIndicator></NotebookSnapshotIndicator>' template: '<NotebookSnapshotIndicator></NotebookSnapshotIndicator>'
}); });
const indicator = { const indicator = {

View File

@ -27,10 +27,10 @@
import NotificationsList from './NotificationsList.vue'; import NotificationsList from './NotificationsList.vue';
export default { export default {
inject: ['openmct'],
components: { components: {
NotificationsList NotificationsList
}, },
inject: ['openmct'],
data() { data() {
return { return {
notifications: this.openmct.notifications.notifications, notifications: this.openmct.notifications.notifications,

View File

@ -25,12 +25,12 @@ import NotificationIndicator from './components/NotificationIndicator.vue';
export default function plugin() { export default function plugin() {
return function install(openmct) { return function install(openmct) {
let component = new Vue ({ let component = new Vue ({
provide: {
openmct
},
components: { components: {
NotificationIndicator: NotificationIndicator NotificationIndicator: NotificationIndicator
}, },
provide: {
openmct
},
template: '<NotificationIndicator></NotificationIndicator>' template: '<NotificationIndicator></NotificationIndicator>'
}); });

View File

@ -136,7 +136,7 @@ define([
}; };
} }
if (objectPath && !_.isFunction(objectPath)) { if (objectPath && (typeof objectPath !== "function")) {
const staticObjectPath = objectPath; const staticObjectPath = objectPath;
objectPath = function () { objectPath = function () {
return staticObjectPath; return staticObjectPath;

View File

@ -79,10 +79,10 @@ const unknownObjectType = {
}; };
export default { export default {
inject: ['openmct', 'domainObject', 'composition', 'objectPath'],
components: { components: {
ObjectView ObjectView
}, },
inject: ['openmct', 'domainObject', 'composition', 'objectPath'],
props: { props: {
isEditing: { isEditing: {
type: Boolean, type: Boolean,

View File

@ -53,14 +53,14 @@ define([
return { return {
show: function (element) { show: function (element) {
component = new Vue({ component = new Vue({
provide: {
openmct,
tableConfiguration
},
el: element, el: element,
components: { components: {
TableConfiguration: TableConfigurationComponent.default TableConfiguration: TableConfigurationComponent.default
}, },
provide: {
openmct,
tableConfiguration
},
template: '<table-configuration></table-configuration>' template: '<table-configuration></table-configuration>'
}); });
}, },

View File

@ -67,6 +67,11 @@ define([
components: { components: {
TableComponent: TableComponent.default TableComponent: TableComponent.default
}, },
provide: {
openmct,
table,
objectPath
},
data() { data() {
return { return {
isEditing: editMode, isEditing: editMode,
@ -74,11 +79,6 @@ define([
view view
}; };
}, },
provide: {
openmct,
table,
objectPath
},
template: '<table-component ref="tableComponent" :isEditing="isEditing" :marking="markingProp" :view="view"/>' template: '<table-component ref="tableComponent" :isEditing="isEditing" :marking="markingProp" :view="view"/>'
}); });
}, },

View File

@ -46,10 +46,10 @@
import TableCell from './table-cell.vue'; import TableCell from './table-cell.vue';
export default { export default {
inject: ['openmct'],
components: { components: {
TableCell TableCell
}, },
inject: ['openmct'],
props: { props: {
headers: { headers: {
type: Object, type: Object,

View File

@ -168,7 +168,6 @@ import ConductorHistory from './ConductorHistory.vue';
const DEFAULT_DURATION_FORMATTER = 'duration'; const DEFAULT_DURATION_FORMATTER = 'duration';
export default { export default {
inject: ['openmct', 'configuration'],
components: { components: {
ConductorMode, ConductorMode,
ConductorTimeSystem, ConductorTimeSystem,
@ -177,6 +176,7 @@ export default {
ConductorModeIcon, ConductorModeIcon,
ConductorHistory ConductorHistory
}, },
inject: ['openmct', 'configuration'],
data() { data() {
let bounds = this.openmct.time.bounds(); let bounds = this.openmct.time.bounds();
let offsets = this.openmct.time.clockOffsets(); let offsets = this.openmct.time.clockOffsets();

View File

@ -72,8 +72,8 @@ const LOCAL_STORAGE_HISTORY_KEY_REALTIME = 'tcHistoryRealtime';
const DEFAULT_RECORDS = 10; const DEFAULT_RECORDS = 10;
export default { export default {
inject: ['openmct', 'configuration'],
mixins: [toggleMixin], mixins: [toggleMixin],
inject: ['openmct', 'configuration'],
props: { props: {
bounds: { bounds: {
type: Object, type: Object,

View File

@ -63,8 +63,8 @@
import toggleMixin from '../../ui/mixins/toggle-mixin'; import toggleMixin from '../../ui/mixins/toggle-mixin';
export default { export default {
inject: ['openmct', 'configuration'],
mixins: [toggleMixin], mixins: [toggleMixin],
inject: ['openmct', 'configuration'],
data: function () { data: function () {
let activeClock = this.openmct.time.clock(); let activeClock = this.openmct.time.clock();
if (activeClock !== undefined) { if (activeClock !== undefined) {

View File

@ -53,8 +53,8 @@
import toggleMixin from '../../ui/mixins/toggle-mixin'; import toggleMixin from '../../ui/mixins/toggle-mixin';
export default { export default {
inject: ['openmct', 'configuration'],
mixins: [toggleMixin], mixins: [toggleMixin],
inject: ['openmct', 'configuration'],
data: function () { data: function () {
let activeClock = this.openmct.time.clock(); let activeClock = this.openmct.time.clock();

View File

@ -108,8 +108,8 @@ const TIME_OPTIONS = (function makeRanges() {
}()); }());
export default { export default {
inject: ['openmct'],
mixins: [toggleMixin], mixins: [toggleMixin],
inject: ['openmct'],
props: { props: {
defaultDateTime: { defaultDateTime: {
type: String, type: String,

View File

@ -32,10 +32,10 @@
import Plan from './Plan.vue'; import Plan from './Plan.vue';
export default { export default {
inject: ['openmct', 'domainObject'],
components: { components: {
Plan Plan
}, },
inject: ['openmct', 'domainObject'],
data() { data() {
return { return {
plans: [] plans: []

View File

@ -131,14 +131,14 @@ describe('the plugin', function () {
let viewContainer = document.createElement('div'); let viewContainer = document.createElement('div');
child.append(viewContainer); child.append(viewContainer);
component = new Vue({ component = new Vue({
provide: {
openmct: openmct,
domainObject: planDomainObject
},
el: viewContainer, el: viewContainer,
components: { components: {
TimelineViewLayout TimelineViewLayout
}, },
provide: {
openmct: openmct,
domainObject: planDomainObject
},
template: '<timeline-view-layout/>' template: '<timeline-view-layout/>'
}); });

View File

@ -111,10 +111,10 @@ const SIMPLE_CONTENT_TYPES = [
]; ];
export default { export default {
inject: ['openmct'],
components: { components: {
ObjectView ObjectView
}, },
inject: ['openmct'],
props: { props: {
domainObject: { domainObject: {
type: Object, type: Object,

View File

@ -54,11 +54,11 @@ import Search from '../components/search.vue';
import ObjectLabel from '../components/ObjectLabel.vue'; import ObjectLabel from '../components/ObjectLabel.vue';
export default { export default {
inject: ['openmct'],
components: { components: {
'Search': Search, 'Search': Search,
'ObjectLabel': ObjectLabel 'ObjectLabel': ObjectLabel
}, },
inject: ['openmct'],
data() { data() {
return { return {
elements: [], elements: [],

View File

@ -66,10 +66,6 @@ import StylesInspectorView from '@/ui/inspector/styles/StylesInspectorView.vue';
import SavedStylesInspectorView from '@/ui/inspector/styles/SavedStylesInspectorView.vue'; import SavedStylesInspectorView from '@/ui/inspector/styles/SavedStylesInspectorView.vue';
export default { export default {
provide: {
stylesManager: stylesManager
},
inject: ['openmct'],
components: { components: {
StylesInspectorView, StylesInspectorView,
SavedStylesInspectorView, SavedStylesInspectorView,
@ -81,6 +77,10 @@ export default {
Location, Location,
InspectorViews InspectorViews
}, },
provide: {
stylesManager: stylesManager
},
inject: ['openmct'],
props: { props: {
isEditing: { isEditing: {
type: Boolean, type: Boolean,

View File

@ -41,10 +41,10 @@
import ObjectLabel from '../components/ObjectLabel.vue'; import ObjectLabel from '../components/ObjectLabel.vue';
export default { export default {
inject: ['openmct'],
components: { components: {
ObjectLabel ObjectLabel
}, },
inject: ['openmct'],
data() { data() {
return { return {
domainObject: {}, domainObject: {},

View File

@ -23,10 +23,10 @@ import {
} from '@/ui/inspector/styles/constants'; } from '@/ui/inspector/styles/constants';
export default { export default {
inject: ['openmct'],
components: { components: {
ToolbarSelectMenu ToolbarSelectMenu
}, },
inject: ['openmct'],
props: { props: {
fontStyle: { fontStyle: {
type: Object, type: Object,

View File

@ -124,11 +124,11 @@ import NotebookMenuSwitcher from '@/plugins/notebook/components/NotebookMenuSwit
const PLACEHOLDER_OBJECT = {}; const PLACEHOLDER_OBJECT = {};
export default { export default {
inject: ['openmct'],
components: { components: {
NotebookMenuSwitcher, NotebookMenuSwitcher,
ViewSwitcher ViewSwitcher
}, },
inject: ['openmct'],
props: { props: {
actionCollection: { actionCollection: {
type: Object, type: Object,

View File

@ -119,7 +119,6 @@ import Indicators from './status-bar/Indicators.vue';
import NotificationBanner from './status-bar/NotificationBanner.vue'; import NotificationBanner from './status-bar/NotificationBanner.vue';
export default { export default {
inject: ['openmct'],
components: { components: {
Inspector, Inspector,
MctTree, MctTree,
@ -134,6 +133,7 @@ export default {
Indicators, Indicators,
NotificationBanner NotificationBanner
}, },
inject: ['openmct'],
data: function () { data: function () {
let storedHeadProps = window.localStorage.getItem('openmct-shell-head'); let storedHeadProps = window.localStorage.getItem('openmct-shell-head');
let headExpanded = true; let headExpanded = true;

View File

@ -140,12 +140,12 @@ const ROOT_PATH = 'browse';
const ITEM_BUFFER = 5; const ITEM_BUFFER = 5;
export default { export default {
inject: ['openmct'],
name: 'MctTree', name: 'MctTree',
components: { components: {
search, search,
treeItem treeItem
}, },
inject: ['openmct'],
props: { props: {
syncTreeNavigation: { syncTreeNavigation: {
type: Boolean, type: Boolean,

View File

@ -68,10 +68,10 @@ function updateMaxProgressBar(progressPerc, progressText) {
} }
export default { export default {
inject: ['openmct'],
components: { components: {
ProgressBar: ProgressBar ProgressBar: ProgressBar
}, },
inject: ['openmct'],
data() { data() {
return { return {
activeModel: { activeModel: {

View File

@ -49,11 +49,11 @@ import ObjectLabel from '../components/ObjectLabel.vue';
export default { export default {
name: 'TreeItem', name: 'TreeItem',
inject: ['openmct'],
components: { components: {
viewControl, viewControl,
ObjectLabel ObjectLabel
}, },
inject: ['openmct'],
props: { props: {
node: { node: {
type: Object, type: Object,

View File

@ -46,12 +46,12 @@ const HIDDEN_ACTIONS = [
]; ];
export default { export default {
inject: [
'openmct'
],
components: { components: {
ViewSwitcher ViewSwitcher
}, },
inject: [
'openmct'
],
props: { props: {
currentView: { currentView: {
type: Object, type: Object,

View File

@ -36,7 +36,6 @@ import toolbarToggleButton from './components/toolbar-toggle-button.vue';
import _ from 'lodash'; import _ from 'lodash';
export default { export default {
inject: ['openmct'],
components: { components: {
toolbarButton, toolbarButton,
toolbarColorPicker, toolbarColorPicker,
@ -47,6 +46,7 @@ export default {
toolbarSeparator, toolbarSeparator,
toolbarToggleButton toolbarToggleButton
}, },
inject: ['openmct'],
data: function () { data: function () {
return { return {
structure: [] structure: []