diff --git a/example/simpleVuePlugin/plugin.js b/example/simpleVuePlugin/plugin.js index 98dc4660af..a1f29288da 100644 --- a/example/simpleVuePlugin/plugin.js +++ b/example/simpleVuePlugin/plugin.js @@ -1,4 +1,4 @@ -import Vue from 'Vue'; +import Vue from 'vue'; import HelloWorld from './HelloWorld.vue'; function SimpleVuePlugin() { diff --git a/src/MCT.js b/src/MCT.js index 1890b29768..cea589f796 100644 --- a/src/MCT.js +++ b/src/MCT.js @@ -262,7 +262,7 @@ define([ // Plugins that are installed by default this.install(this.plugins.Plot()); - this.install(this.plugins.TelemetryTable()); + this.install(this.plugins.TelemetryTable.default()); this.install(PreviewPlugin.default()); this.install(LegacyIndicatorsPlugin()); this.install(LicensesPlugin.default()); @@ -283,6 +283,7 @@ define([ this.install(this.plugins.NotificationIndicator()); this.install(this.plugins.NewFolderAction()); this.install(this.plugins.ViewDatumAction()); + this.install(this.plugins.ViewLargeAction()); this.install(this.plugins.ObjectInterceptors()); this.install(this.plugins.NonEditableFolder()); } diff --git a/src/api/actions/ActionCollection.js b/src/api/actions/ActionCollection.js index 4c3074bfa5..6545dd4a05 100644 --- a/src/api/actions/ActionCollection.js +++ b/src/api/actions/ActionCollection.js @@ -46,8 +46,6 @@ class ActionCollection extends EventEmitter { this._observeObjectPath(); this.openmct.editor.on('isEditing', this._updateActions); } - - this._initializeActions(); } disable(actionKeys) { @@ -156,19 +154,10 @@ class ActionCollection extends EventEmitter { }); } - _initializeActions() { - Object.keys(this.applicableActions).forEach(key => { - this.applicableActions[key].callBack = () => { - return this.applicableActions[key].invoke(this.objectPath, this.view); - }; - }); - } - _updateActions() { let newApplicableActions = this.openmct.actions._applicableActions(this.objectPath, this.view); this.applicableActions = this._mergeOldAndNewActions(this.applicableActions, newApplicableActions); - this._initializeActions(); this._update(); } diff --git a/src/api/actions/ActionsAPI.js b/src/api/actions/ActionsAPI.js index 442f809e94..d8383522a5 100644 --- a/src/api/actions/ActionsAPI.js +++ b/src/api/actions/ActionsAPI.js @@ -34,7 +34,7 @@ class ActionsAPI extends EventEmitter { this._groupOrder = ['windowing', 'undefined', 'view', 'action', 'json']; this.register = this.register.bind(this); - this.get = this.get.bind(this); + this.getActionsCollection = this.getActionsCollection.bind(this); this._applicableActions = this._applicableActions.bind(this); this._updateCachedActionCollections = this._updateCachedActionCollections.bind(this); } @@ -43,12 +43,14 @@ class ActionsAPI extends EventEmitter { this._allActions[actionDefinition.key] = actionDefinition; } - get(objectPath, view) { - if (view) { + getAction(key) { + return this._allActions[key]; + } + getActionsCollection(objectPath, view) { + if (view) { return this._getCachedActionCollection(objectPath, view) || this._newActionCollection(objectPath, view, true); } else { - return this._newActionCollection(objectPath, view, true); } } @@ -57,15 +59,6 @@ class ActionsAPI extends EventEmitter { this._groupOrder = groupArray; } - _get(objectPath, view) { - let actionCollection = this._newActionCollection(objectPath, view); - - this._actionCollections.set(view, actionCollection); - actionCollection.on('destroy', this._updateCachedActionCollections); - - return actionCollection; - } - _getCachedActionCollection(objectPath, view) { let cachedActionCollection = this._actionCollections.get(view); @@ -75,7 +68,17 @@ class ActionsAPI extends EventEmitter { _newActionCollection(objectPath, view, skipEnvironmentObservers) { let applicableActions = this._applicableActions(objectPath, view); - return new ActionCollection(applicableActions, objectPath, view, this._openmct, skipEnvironmentObservers); + const actionCollection = new ActionCollection(applicableActions, objectPath, view, this._openmct, skipEnvironmentObservers); + if (view) { + this._cacheActionCollection(view, actionCollection); + } + + return actionCollection; + } + + _cacheActionCollection(view, actionCollection) { + this._actionCollections.set(view, actionCollection); + actionCollection.on('destroy', this._updateCachedActionCollections); } _updateCachedActionCollections(key) { diff --git a/src/api/actions/ActionsAPISpec.js b/src/api/actions/ActionsAPISpec.js index 139264f83e..e293d6ba85 100644 --- a/src/api/actions/ActionsAPISpec.js +++ b/src/api/actions/ActionsAPISpec.js @@ -106,7 +106,7 @@ describe('The Actions API', () => { it("adds action to ActionsAPI", () => { actionsAPI.register(mockAction); - let actionCollection = actionsAPI.get(mockObjectPath, mockViewContext1); + let actionCollection = actionsAPI.getActionsCollection(mockObjectPath, mockViewContext1); let action = actionCollection.getActionsObject()[mockAction.key]; expect(action.key).toEqual(mockAction.key); @@ -121,21 +121,21 @@ describe('The Actions API', () => { }); it("returns an ActionCollection when invoked with an objectPath only", () => { - let actionCollection = actionsAPI.get(mockObjectPath); + let actionCollection = actionsAPI.getActionsCollection(mockObjectPath); let instanceOfActionCollection = actionCollection instanceof ActionCollection; expect(instanceOfActionCollection).toBeTrue(); }); it("returns an ActionCollection when invoked with an objectPath and view", () => { - let actionCollection = actionsAPI.get(mockObjectPath, mockViewContext1); + let actionCollection = actionsAPI.getActionsCollection(mockObjectPath, mockViewContext1); let instanceOfActionCollection = actionCollection instanceof ActionCollection; expect(instanceOfActionCollection).toBeTrue(); }); it("returns relevant actions when invoked with objectPath only", () => { - let actionCollection = actionsAPI.get(mockObjectPath); + let actionCollection = actionsAPI.getActionsCollection(mockObjectPath); let action = actionCollection.getActionsObject()[mockObjectPathAction.key]; expect(action.key).toEqual(mockObjectPathAction.key); @@ -143,7 +143,7 @@ describe('The Actions API', () => { }); it("returns relevant actions when invoked with objectPath and view", () => { - let actionCollection = actionsAPI.get(mockObjectPath, mockViewContext1); + let actionCollection = actionsAPI.getActionsCollection(mockObjectPath, mockViewContext1); let action = actionCollection.getActionsObject()[mockAction.key]; expect(action.key).toEqual(mockAction.key); diff --git a/src/api/menu/MenuAPI.js b/src/api/menu/MenuAPI.js index bf20c8a4fd..8a53c39d82 100644 --- a/src/api/menu/MenuAPI.js +++ b/src/api/menu/MenuAPI.js @@ -37,7 +37,7 @@ import Menu, { MENU_PLACEMENT } from './menu.js'; * @property {Boolean} isDisabled adds disable class if true * @property {String} name Menu item text * @property {String} description Menu item description - * @property {Function} callBack callback function: invoked when item is clicked + * @property {Function} onItemClicked callback function: invoked when item is clicked */ /** @@ -66,12 +66,27 @@ class MenuAPI { * @param {Array.|Array.>} actions collection of actions{@link Action} or collection of groups of actions {@link Action} * @param {MenuOptions} [menuOptions] [Optional] The {@link MenuOptions} options for Menu */ - showMenu(x, y, actions, menuOptions) { - this._createMenuComponent(x, y, actions, menuOptions); + showMenu(x, y, items, menuOptions) { + this._createMenuComponent(x, y, items, menuOptions); this.menuComponent.showMenu(); } + actionsToMenuItems(actions, objectPath, view) { + return actions.map(action => { + const isActionGroup = Array.isArray(action); + if (isActionGroup) { + action = this.actionsToMenuItems(action, objectPath, view); + } else { + action.onItemClicked = () => { + action.invoke(objectPath, view); + }; + } + + return action; + }); + } + /** * Show popup menu with description of item on hover * @param {number} x x-coordinates for popup diff --git a/src/api/menu/MenuAPISpec.js b/src/api/menu/MenuAPISpec.js index 1a114b17c5..354254b8b3 100644 --- a/src/api/menu/MenuAPISpec.js +++ b/src/api/menu/MenuAPISpec.js @@ -57,7 +57,7 @@ describe ('The Menu API', () => { name: 'Test Action 1', cssClass: 'icon-clock', description: 'This is a test action', - callBack: () => { + onItemClicked: () => { result = 'Test Action 1 Invoked'; } }, @@ -66,7 +66,7 @@ describe ('The Menu API', () => { name: 'Test Action 2', cssClass: 'icon-clock', description: 'This is a test action', - callBack: () => { + onItemClicked: () => { result = 'Test Action 2 Invoked'; } } diff --git a/src/api/menu/components/Menu.vue b/src/api/menu/components/Menu.vue index a9d22cff0a..50021641d2 100644 --- a/src/api/menu/components/Menu.vue +++ b/src/api/menu/components/Menu.vue @@ -11,7 +11,7 @@ :key="action.name" :class="[action.cssClass, action.isDisabled ? 'disabled' : '']" :title="action.description" - @click="action.callBack" + @click="action.onItemClicked" > {{ action.name }} @@ -36,7 +36,7 @@ :key="action.name" :class="action.cssClass" :title="action.description" - @click="action.callBack" + @click="action.onItemClicked" > {{ action.name }} diff --git a/src/api/menu/components/SuperMenu.vue b/src/api/menu/components/SuperMenu.vue index 2b3a63ea42..25f9b51f2d 100644 --- a/src/api/menu/components/SuperMenu.vue +++ b/src/api/menu/components/SuperMenu.vue @@ -13,7 +13,7 @@ :key="action.name" :class="[action.cssClass, action.isDisabled ? 'disabled' : '']" :title="action.description" - @click="action.callBack" + @click="action.onItemClicked" @mouseover="toggleItemDescription(action)" @mouseleave="toggleItemDescription()" > @@ -42,7 +42,7 @@ :key="action.name" :class="action.cssClass" :title="action.description" - @click="action.callBack" + @click="action.onItemClicked" @mouseover="toggleItemDescription(action)" @mouseleave="toggleItemDescription()" > diff --git a/src/api/menu/menu.js b/src/api/menu/menu.js index 58e2037dab..44c6fe6db3 100644 --- a/src/api/menu/menu.js +++ b/src/api/menu/menu.js @@ -71,12 +71,12 @@ class Menu extends EventEmitter { showMenu() { this.component = new Vue({ - provide: { - options: this.options - }, components: { MenuComponent }, + provide: { + options: this.options + }, template: '' }); @@ -85,12 +85,12 @@ class Menu extends EventEmitter { showSuperMenu() { this.component = new Vue({ - provide: { - options: this.options - }, components: { SuperMenuComponent }, + provide: { + options: this.options + }, template: '' }); diff --git a/src/plugins/LADTable/LADTableSetViewProvider.js b/src/plugins/LADTable/LADTableSetViewProvider.js index 2a47e4f4c6..2fec17fd73 100644 --- a/src/plugins/LADTable/LADTableSetViewProvider.js +++ b/src/plugins/LADTable/LADTableSetViewProvider.js @@ -19,8 +19,8 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -import LadTableSet from './components/LadTableSet.vue'; -import Vue from 'vue'; + +import LadTableSetView from './LadTableSetView'; export default function LADTableSetViewProvider(openmct) { return { @@ -34,32 +34,7 @@ export default function LADTableSetViewProvider(openmct) { return domainObject.type === 'LadTableSet'; }, view: function (domainObject, objectPath) { - let component; - - return { - show: function (element) { - component = new Vue({ - el: element, - components: { - LadTableSet: LadTableSet - }, - provide: { - openmct, - objectPath - }, - data() { - return { - domainObject - }; - }, - template: '' - }); - }, - destroy: function (element) { - component.$destroy(); - component = undefined; - } - }; + return new LadTableSetView(openmct, domainObject, objectPath); }, priority: function () { return 1; diff --git a/src/plugins/LADTable/LADTableView.js b/src/plugins/LADTable/LADTableView.js new file mode 100644 index 0000000000..e7dd15b209 --- /dev/null +++ b/src/plugins/LADTable/LADTableView.js @@ -0,0 +1,45 @@ +import LadTable from './components/LADTable.vue'; + +import Vue from 'vue'; + +export default class LADTableView { + constructor(openmct, domainObject, objectPath) { + this.openmct = openmct; + this.domainObject = domainObject; + this.objectPath = objectPath; + this.component = undefined; + } + + show(element) { + this.component = new Vue({ + el: element, + components: { + LadTable + }, + provide: { + openmct: this.openmct, + currentView: this + }, + data: () => { + return { + domainObject: this.domainObject, + objectPath: this.objectPath + }; + }, + template: '' + }); + } + + getViewContext() { + if (!this.component) { + return {}; + } + + return this.component.$refs.ladTable.getViewContext(); + } + + destroy(element) { + this.component.$destroy(); + this.component = undefined; + } +} diff --git a/src/plugins/LADTable/LADTableViewProvider.js b/src/plugins/LADTable/LADTableViewProvider.js index 5204eb86bc..dfccce7e76 100644 --- a/src/plugins/LADTable/LADTableViewProvider.js +++ b/src/plugins/LADTable/LADTableViewProvider.js @@ -19,50 +19,30 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -import LadTable from './components/LADTable.vue'; -import Vue from 'vue'; -export default function LADTableViewProvider(openmct) { - return { - key: 'LadTable', - name: 'LAD Table', - cssClass: 'icon-tabular-lad', - canView: function (domainObject) { - return domainObject.type === 'LadTable'; - }, - canEdit: function (domainObject) { - return domainObject.type === 'LadTable'; - }, - view: function (domainObject, objectPath) { - let component; +import LADTableView from './LADTableView'; - return { - show: function (element) { - component = new Vue({ - el: element, - components: { - LadTableComponent: LadTable - }, - provide: { - openmct - }, - data: () => { - return { - domainObject, - objectPath - }; - }, - template: '' - }); - }, - destroy: function (element) { - component.$destroy(); - component = undefined; - } - }; - }, - priority: function () { - return 1; - } - }; +export default class LADTableViewProvider { + constructor(openmct) { + this.openmct = openmct; + this.name = 'LAD Table'; + this.key = 'LadTable'; + this.cssClass = 'icon-tabular-lad'; + } + + canView(domainObject) { + return domainObject.type === 'LadTable'; + } + + canEdit(domainObject) { + return domainObject.type === 'LadTable'; + } + + view(domainObject, objectPath) { + return new LADTableView(this.openmct, domainObject, objectPath); + } + + priority(domainObject) { + return 1; + } } diff --git a/src/plugins/LADTable/LadTableSetView.js b/src/plugins/LADTable/LadTableSetView.js new file mode 100644 index 0000000000..7a8d13a5f6 --- /dev/null +++ b/src/plugins/LADTable/LadTableSetView.js @@ -0,0 +1,45 @@ +import LadTableSet from './components/LadTableSet.vue'; + +import Vue from 'vue'; + +export default class LadTableSetView { + constructor(openmct, domainObject, objectPath) { + this.openmct = openmct; + this.domainObject = domainObject; + this.objectPath = objectPath; + this.component = undefined; + } + + show(element) { + this.component = new Vue({ + el: element, + components: { + LadTableSet + }, + provide: { + openmct: this.openmct, + objectPath: this.objectPath, + currentView: this + }, + data: () => { + return { + domainObject: this.domainObject + }; + }, + template: '' + }); + } + + getViewContext() { + if (!this.component) { + return {}; + } + + return this.component.$refs.ladTableSet.getViewContext(); + } + + destroy(element) { + this.component.$destroy(); + this.component = undefined; + } +} diff --git a/src/plugins/LADTable/components/LADRow.vue b/src/plugins/LADTable/components/LADRow.vue index 26c85a94e5..6778a3c6da 100644 --- a/src/plugins/LADTable/components/LADRow.vue +++ b/src/plugins/LADTable/components/LADRow.vue @@ -50,7 +50,7 @@ const CONTEXT_MENU_ACTIONS = [ ]; export default { - inject: ['openmct'], + inject: ['openmct', 'currentView'], props: { domainObject: { type: Object, @@ -167,25 +167,23 @@ export default { this.resetValues(); this.timestampKey = timeSystem.key; }, - getView() { - return { - getViewContext: () => { - return { - viewHistoricalData: true, - viewDatumAction: true, - getDatum: () => { - return this.datum; - } - }; + updateViewContext() { + this.$emit('rowContextClick', { + viewHistoricalData: true, + viewDatumAction: true, + getDatum: () => { + return this.datum; } - }; + }); }, showContextMenu(event) { - let actionCollection = this.openmct.actions.get(this.objectPath, this.getView()); - let allActions = actionCollection.getActionsObject(); - let applicableActions = CONTEXT_MENU_ACTIONS.map(key => allActions[key]); + this.updateViewContext(); - this.openmct.menus.showMenu(event.x, event.y, applicableActions); + const actions = CONTEXT_MENU_ACTIONS.map(key => this.openmct.actions.getAction(key)); + const menuItems = this.openmct.menus.actionsToMenuItems(actions, this.objectPath, this.currentView); + if (menuItems.length) { + this.openmct.menus.showMenu(event.x, event.y, menuItems); + } }, resetValues() { this.value = '---'; diff --git a/src/plugins/LADTable/components/LADTable.vue b/src/plugins/LADTable/components/LADTable.vue index ca967d37cd..764d2b50a2 100644 --- a/src/plugins/LADTable/components/LADTable.vue +++ b/src/plugins/LADTable/components/LADTable.vue @@ -38,6 +38,7 @@ :domain-object="ladRow.domainObject" :path-to-table="objectPath" :has-units="hasUnits" + @rowContextClick="updateViewContext" /> @@ -51,7 +52,7 @@ export default { components: { LadRow }, - inject: ['openmct'], + inject: ['openmct', 'currentView'], props: { domainObject: { type: Object, @@ -64,7 +65,8 @@ export default { }, data() { return { - items: [] + items: [], + viewContext: {} }; }, computed: { @@ -114,6 +116,12 @@ export default { let metadataWithUnits = valueMetadatas.filter(metadatum => metadatum.unit); return metadataWithUnits.length > 0; + }, + updateViewContext(rowContext) { + this.viewContext.row = rowContext; + }, + getViewContext() { + return this.viewContext; } } }; diff --git a/src/plugins/LADTable/components/LadTableSet.vue b/src/plugins/LADTable/components/LadTableSet.vue index 129a9c3d07..8d208cdc0a 100644 --- a/src/plugins/LADTable/components/LadTableSet.vue +++ b/src/plugins/LADTable/components/LadTableSet.vue @@ -48,6 +48,7 @@ :domain-object="ladRow.domainObject" :path-to-table="ladTable.objectPath" :has-units="hasUnits" + @rowContextClick="updateViewContext" /> @@ -61,7 +62,7 @@ export default { components: { LadRow }, - inject: ['openmct', 'objectPath'], + inject: ['openmct', 'objectPath', 'currentView'], props: { domainObject: { type: Object, @@ -72,7 +73,8 @@ export default { return { ladTableObjects: [], ladTelemetryObjects: {}, - compositions: [] + compositions: [], + viewContext: {} }; }, computed: { @@ -166,6 +168,12 @@ export default { this.$set(this.ladTelemetryObjects, ladTable.key, telemetryObjects); }; + }, + updateViewContext(rowContext) { + this.viewContext.row = rowContext; + }, + getViewContext() { + return this.viewContext; } } }; diff --git a/src/plugins/condition/components/Condition.vue b/src/plugins/condition/components/Condition.vue index 092d6093d3..2d2dda3d19 100644 --- a/src/plugins/condition/components/Condition.vue +++ b/src/plugins/condition/components/Condition.vue @@ -215,7 +215,8 @@ export default { }, isEditing: { type: Boolean, - required: true + required: true, + default: false }, telemetry: { type: Array, diff --git a/src/plugins/displayLayout/AlphanumericFormatViewProvider.js b/src/plugins/displayLayout/AlphanumericFormatViewProvider.js index 7e8e6dbf1e..b96f272c3c 100644 --- a/src/plugins/displayLayout/AlphanumericFormatViewProvider.js +++ b/src/plugins/displayLayout/AlphanumericFormatViewProvider.js @@ -20,71 +20,78 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ -define([ - './components/AlphanumericFormatView.vue', - 'vue' -], function (AlphanumericFormatView, Vue) { +import AlphanumericFormat from './components/AlphanumericFormat.vue'; - function AlphanumericFormatViewProvider(openmct, options) { - function isTelemetryObject(selectionPath) { - let selectedObject = selectionPath[0].context.item; - let parentObject = selectionPath[1].context.item; - let selectedLayoutItem = selectionPath[0].context.layoutItem; +import Vue from 'vue'; - return parentObject - && parentObject.type === 'layout' - && selectedObject - && selectedLayoutItem - && selectedLayoutItem.type === 'telemetry-view' - && openmct.telemetry.isTelemetryObject(selectedObject) - && !options.showAsView.includes(selectedObject.type); - } - - return { - key: 'alphanumeric-format', - name: 'Alphanumeric Format', - canView: function (selection) { - if (selection.length === 0 || selection[0].length === 1) { - return false; - } - - return selection.every(isTelemetryObject); - }, - view: function (domainObject, objectPath) { - let component; - - return { - show: function (element) { - component = new Vue({ - el: element, - components: { - AlphanumericFormatView: AlphanumericFormatView.default - }, - provide: { - openmct, - objectPath - }, - template: '' - }); - }, - getViewContext() { - if (component) { - return component.$refs.alphanumericFormatView.getViewContext(); - } else { - return {}; - } - }, - destroy: function () { - component.$destroy(); - component = undefined; - } - }; - }, - priority: function () { - return 1; - } - }; +class AlphanumericFormatView { + constructor(openmct, domainObject, objectPath) { + this.openmct = openmct; + this.domainObject = domainObject; + this.objectPath = objectPath; + this.component = undefined; } - return AlphanumericFormatViewProvider; -}); + show(element) { + this.component = new Vue({ + el: element, + name: 'AlphanumericFormat', + components: { + AlphanumericFormat + }, + provide: { + openmct: this.openmct, + objectPath: this.objectPath, + currentView: this + }, + template: '' + }); + } + + getViewContext() { + if (this.component) { + return {}; + } + + return this.component.$refs.alphanumericFormat.getViewContext(); + } + + destroy() { + this.component.$destroy(); + this.component = undefined; + } +} + +export default function AlphanumericFormatViewProvider(openmct, options) { + function isTelemetryObject(selectionPath) { + let selectedObject = selectionPath[0].context.item; + let parentObject = selectionPath[1].context.item; + let selectedLayoutItem = selectionPath[0].context.layoutItem; + + return parentObject + && parentObject.type === 'layout' + && selectedObject + && selectedLayoutItem + && selectedLayoutItem.type === 'telemetry-view' + && openmct.telemetry.isTelemetryObject(selectedObject) + && !options.showAsView.includes(selectedObject.type); + } + + return { + key: 'alphanumeric-format', + name: 'Alphanumeric Format', + canView: function (selection) { + if (selection.length === 0 || selection[0].length === 1) { + return false; + } + + return selection.every(isTelemetryObject); + }, + view: function (domainObject, objectPath) { + return new AlphanumericFormatView(openmct, domainObject, objectPath); + }, + priority: function () { + return 1; + } + }; +} diff --git a/src/plugins/displayLayout/actions/CopyToClipboardAction.js b/src/plugins/displayLayout/actions/CopyToClipboardAction.js index 3739279fa1..5fdaf81037 100644 --- a/src/plugins/displayLayout/actions/CopyToClipboardAction.js +++ b/src/plugins/displayLayout/actions/CopyToClipboardAction.js @@ -14,7 +14,7 @@ export default class CopyToClipboardAction { invoke(objectPath, view = {}) { const viewContext = view.getViewContext && view.getViewContext(); - const formattedValue = viewContext.formattedValueForCopy(); + const formattedValue = viewContext.row.formattedValueForCopy(); clipboard.updateClipboard(formattedValue) .then(() => { @@ -26,9 +26,13 @@ export default class CopyToClipboardAction { } appliesTo(objectPath, view = {}) { - let viewContext = view.getViewContext && view.getViewContext(); + const viewContext = view.getViewContext && view.getViewContext(); + const row = viewContext && viewContext.row; + if (!row) { + return false; + } - return viewContext && viewContext.formattedValueForCopy - && typeof viewContext.formattedValueForCopy === 'function'; + return row.formattedValueForCopy + && typeof row.formattedValueForCopy === 'function'; } } diff --git a/src/plugins/displayLayout/components/AlphanumericFormatView.vue b/src/plugins/displayLayout/components/AlphanumericFormat.vue similarity index 98% rename from src/plugins/displayLayout/components/AlphanumericFormatView.vue rename to src/plugins/displayLayout/components/AlphanumericFormat.vue index 0cb63f94fe..f6b592ce90 100644 --- a/src/plugins/displayLayout/components/AlphanumericFormatView.vue +++ b/src/plugins/displayLayout/components/AlphanumericFormat.vue @@ -52,7 +52,8 @@