From 87d838c69094d818e1807404b72f8238de86c691 Mon Sep 17 00:00:00 2001 From: Deep Tailor Date: Mon, 30 Mar 2020 16:57:20 -0700 Subject: [PATCH 1/8] [Tables] Use parsed data to sort (#2785) * Use parsed values when sorting --- src/plugins/telemetryTable/TelemetryTableColumn.js | 4 ++++ src/plugins/telemetryTable/TelemetryTableRow.js | 5 +++++ .../telemetryTable/collections/SortedTableRowCollection.js | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/plugins/telemetryTable/TelemetryTableColumn.js b/src/plugins/telemetryTable/TelemetryTableColumn.js index c517bb1336..4870f71ab5 100644 --- a/src/plugins/telemetryTable/TelemetryTableColumn.js +++ b/src/plugins/telemetryTable/TelemetryTableColumn.js @@ -56,6 +56,10 @@ define(function () { return formattedValue; } } + + getParsedValue(telemetryDatum) { + return this.formatter.parse(telemetryDatum); + } } return TelemetryTableColumn; diff --git a/src/plugins/telemetryTable/TelemetryTableRow.js b/src/plugins/telemetryTable/TelemetryTableRow.js index 33f2195e8d..56d23a9486 100644 --- a/src/plugins/telemetryTable/TelemetryTableRow.js +++ b/src/plugins/telemetryTable/TelemetryTableRow.js @@ -42,6 +42,11 @@ define([], function () { return column && column.getFormattedValue(this.datum[key]); } + getParsedValue(key) { + let column = this.columns[key]; + return column && column.getParsedValue(this.datum[key]); + } + getCellComponentName(key) { let column = this.columns[key]; return column && diff --git a/src/plugins/telemetryTable/collections/SortedTableRowCollection.js b/src/plugins/telemetryTable/collections/SortedTableRowCollection.js index cded96cf09..043ac29032 100644 --- a/src/plugins/telemetryTable/collections/SortedTableRowCollection.js +++ b/src/plugins/telemetryTable/collections/SortedTableRowCollection.js @@ -201,7 +201,7 @@ define( sortBy(sortOptions) { if (arguments.length > 0) { this.sortOptions = sortOptions; - this.rows = _.sortByOrder(this.rows, 'datum.' + sortOptions.key, sortOptions.direction); + this.rows = _.sortByOrder(this.rows, (row) => row.getParsedValue(sortOptions.key) , sortOptions.direction); this.emit('sort'); } // Return duplicate to avoid direct modification of underlying object @@ -222,7 +222,7 @@ define( } getValueForSortColumn(row) { - return row.datum[this.sortOptions.key]; + return row.getParsedValue(this.sortOptions.key); } remove(removedRows) { From 3ca9e9ae568f5d74d9c0e1ac8f451dafdce45487 Mon Sep 17 00:00:00 2001 From: Deep Tailor Date: Mon, 30 Mar 2020 17:27:10 -0700 Subject: [PATCH 2/8] When view params change, get a new copy of the domainObject (#2813) Update browseObject on object change --- src/ui/router/Browse.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ui/router/Browse.js b/src/ui/router/Browse.js index 04dc1fad9b..c03b44d390 100644 --- a/src/ui/router/Browse.js +++ b/src/ui/router/Browse.js @@ -63,6 +63,7 @@ define([ unobserve = this.openmct.objects.observe(openmct.router.path[0], '*', (newObject) => { openmct.router.path[0] = newObject; + browseObject = newObject; }); openmct.layout.$refs.browseBar.domainObject = navigatedObject; From 7b060509f535de49389ef16e41062f690e019bc4 Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Mon, 30 Mar 2020 17:30:53 -0700 Subject: [PATCH 3/8] c-object-label changes brought over from `topic-conditionals` (#2823) - SCSS mods; - Markup in select objects --- src/plugins/tabs/components/tabs.vue | 4 ++-- src/ui/components/ObjectFrame.vue | 12 +++++------ src/ui/components/object-label.scss | 32 ++++++++++++++++++++-------- src/ui/layout/BrowseBar.vue | 4 ++-- 4 files changed, 33 insertions(+), 19 deletions(-) diff --git a/src/plugins/tabs/components/tabs.vue b/src/plugins/tabs/components/tabs.vue index 262f1bb217..5b109a4b56 100644 --- a/src/plugins/tabs/components/tabs.vue +++ b/src/plugins/tabs/components/tabs.vue @@ -40,10 +40,10 @@ >
-
+
{{ currentTab.domainObject.name }}
diff --git a/src/ui/components/ObjectFrame.vue b/src/ui/components/ObjectFrame.vue index 411567a578..7c4754ffdc 100644 --- a/src/ui/components/ObjectFrame.vue +++ b/src/ui/components/ObjectFrame.vue @@ -28,12 +28,12 @@ }" >
-
-
- {{ domainObject && domainObject.name }} +
+
+ {{ domainObject && domainObject.name }} +
tag and draggable element that holds type icon and name. // Used mostly in trees and lists - border-radius: $controlCr; display: flex; align-items: center; - flex: 1 1 auto; + flex: 0 1 auto; overflow: hidden; - padding: $interiorMarginSm 1px; white-space: nowrap; &__name { @include ellipsize(); display: inline; - color: $colorItemTreeFg; + } + + &__type-icon, + &:before { + // Type icon. Must be an HTML entity to allow inclusion of alias indicator. + display: block; + flex: 0 0 auto; + font-size: 1.1em; + opacity: 0.6; + margin-right: $interiorMargin; + } +} + +.c-tree .c-object-label { + border-radius: $controlCr; + padding: $interiorMarginSm 1px; + + &__name { + display: inline; width: 100%; } &__type-icon { - // Type icon. Must be an HTML entity to allow inclusion of alias indicator. - display: block; - flex: 0 0 auto; - font-size: 1.3em; - margin-right: $interiorMarginSm; color: $colorItemTreeIcon; + font-size: 1.25em; + margin-right: $interiorMarginSm; + opacity: 1; width: $treeTypeIconW; } } diff --git a/src/ui/layout/BrowseBar.vue b/src/ui/layout/BrowseBar.vue index a473b21bb8..84932fc694 100644 --- a/src/ui/layout/BrowseBar.vue +++ b/src/ui/layout/BrowseBar.vue @@ -7,11 +7,11 @@ @click="goToParent" >
Date: Tue, 31 Mar 2020 12:11:11 -0700 Subject: [PATCH 4/8] [Notebook] V2.0 development #2666 (#2755) * Notebook v2.0 Co-authored-by: charlesh88 --- .../notebook/components/notebook-embed.vue | 272 +++++++ .../notebook/components/notebook-entry.vue | 316 ++++++++ .../components/notebook-menu-switcher.vue | 114 +++ .../notebook-snapshot-container.vue | 152 ++++ .../notebook-snapshot-indicator.vue | 97 +++ src/plugins/notebook/components/notebook.vue | 528 ++++++++++++++ .../notebook/components/page-collection.vue | 132 ++++ .../notebook/components/page-component.vue | 146 ++++ .../notebook/components/search-results.vue | 50 ++ .../components/section-collection.vue | 113 +++ .../notebook/components/section-component.vue | 149 ++++ src/plugins/notebook/components/sidebar.scss | 119 +++ src/plugins/notebook/components/sidebar.vue | 189 +++++ .../snapshot-template.html} | 11 +- src/plugins/notebook/notebook-constants.js | 3 + src/plugins/notebook/plugin.js | 209 +++--- src/plugins/notebook/res/templates/embed.html | 33 - src/plugins/notebook/res/templates/entry.html | 34 - .../notebook/res/templates/notebook.html | 35 - .../notebook/res/templates/viewSnapshot.html | 50 -- src/plugins/notebook/snapshot-container.js | 82 +++ src/plugins/notebook/snapshot.js | 74 ++ .../src/controllers/EmbedController.js | 302 -------- .../src/controllers/EntryController.js | 151 ---- .../src/controllers/NotebookController.js | 237 ------ .../notebook/utils/notebook-entries.js | 194 +++++ .../notebook/utils/notebook-storage.js | 40 + src/plugins/notebook/utils/popup-menu.js | 45 ++ src/plugins/plugins.js | 2 +- src/plugins/remove/RemoveAction.js | 8 +- src/styles/_constants-espresso.scss | 7 +- src/styles/_constants-maelstrom.scss | 5 + src/styles/_constants-mobile.scss | 2 +- src/styles/_constants-snow.scss | 5 + src/styles/_constants.scss | 2 + src/styles/_controls.scss | 29 +- src/styles/_glyphs.scss | 2 + src/styles/_layout.scss | 4 + src/styles/_mixins.scss | 21 +- src/styles/fonts/Open MCT Symbols 16px.json | 686 ++++++++++++++---- src/styles/fonts/Open-MCT-Symbols-16px.svg | 2 + src/styles/fonts/Open-MCT-Symbols-16px.ttf | Bin 20376 -> 20740 bytes src/styles/fonts/Open-MCT-Symbols-16px.woff | Bin 20452 -> 20816 bytes src/styles/notebook.scss | 236 +++++- src/styles/vue-styles.scss | 1 + src/ui/components/ObjectFrame.vue | 12 +- src/ui/components/ObjectLabel.vue | 9 + src/ui/components/search.vue | 7 + src/ui/inspector/location.scss | 19 +- src/ui/layout/BrowseBar.vue | 37 +- src/ui/layout/Layout.vue | 3 + src/ui/layout/layout.scss | 101 ++- src/ui/layout/mct-tree.scss | 65 +- src/ui/layout/pane.scss | 13 +- src/ui/layout/pane.vue | 9 +- src/ui/layout/status-bar/indicators.scss | 6 +- src/ui/preview/Preview.vue | 4 +- src/ui/router/Browse.js | 15 +- src/ui/utils/notebook-snapshot.js | 135 ---- 59 files changed, 4022 insertions(+), 1302 deletions(-) create mode 100644 src/plugins/notebook/components/notebook-embed.vue create mode 100644 src/plugins/notebook/components/notebook-entry.vue create mode 100644 src/plugins/notebook/components/notebook-menu-switcher.vue create mode 100644 src/plugins/notebook/components/notebook-snapshot-container.vue create mode 100644 src/plugins/notebook/components/notebook-snapshot-indicator.vue create mode 100644 src/plugins/notebook/components/notebook.vue create mode 100644 src/plugins/notebook/components/page-collection.vue create mode 100644 src/plugins/notebook/components/page-component.vue create mode 100644 src/plugins/notebook/components/search-results.vue create mode 100644 src/plugins/notebook/components/section-collection.vue create mode 100644 src/plugins/notebook/components/section-component.vue create mode 100644 src/plugins/notebook/components/sidebar.scss create mode 100644 src/plugins/notebook/components/sidebar.vue rename src/plugins/notebook/{res/templates/snapshotTemplate.html => components/snapshot-template.html} (74%) create mode 100644 src/plugins/notebook/notebook-constants.js delete mode 100644 src/plugins/notebook/res/templates/embed.html delete mode 100644 src/plugins/notebook/res/templates/entry.html delete mode 100644 src/plugins/notebook/res/templates/notebook.html delete mode 100644 src/plugins/notebook/res/templates/viewSnapshot.html create mode 100644 src/plugins/notebook/snapshot-container.js create mode 100644 src/plugins/notebook/snapshot.js delete mode 100644 src/plugins/notebook/src/controllers/EmbedController.js delete mode 100644 src/plugins/notebook/src/controllers/EntryController.js delete mode 100644 src/plugins/notebook/src/controllers/NotebookController.js create mode 100644 src/plugins/notebook/utils/notebook-entries.js create mode 100644 src/plugins/notebook/utils/notebook-storage.js create mode 100644 src/plugins/notebook/utils/popup-menu.js mode change 100755 => 100644 src/styles/fonts/Open-MCT-Symbols-16px.svg mode change 100755 => 100644 src/styles/fonts/Open-MCT-Symbols-16px.ttf mode change 100755 => 100644 src/styles/fonts/Open-MCT-Symbols-16px.woff delete mode 100644 src/ui/utils/notebook-snapshot.js diff --git a/src/plugins/notebook/components/notebook-embed.vue b/src/plugins/notebook/components/notebook-embed.vue new file mode 100644 index 0000000000..4c02ca9fc3 --- /dev/null +++ b/src/plugins/notebook/components/notebook-embed.vue @@ -0,0 +1,272 @@ + + + diff --git a/src/plugins/notebook/components/notebook-entry.vue b/src/plugins/notebook/components/notebook-entry.vue new file mode 100644 index 0000000000..d2d256955a --- /dev/null +++ b/src/plugins/notebook/components/notebook-entry.vue @@ -0,0 +1,316 @@ + + + diff --git a/src/plugins/notebook/components/notebook-menu-switcher.vue b/src/plugins/notebook/components/notebook-menu-switcher.vue new file mode 100644 index 0000000000..069df76358 --- /dev/null +++ b/src/plugins/notebook/components/notebook-menu-switcher.vue @@ -0,0 +1,114 @@ + + + diff --git a/src/plugins/notebook/components/notebook-snapshot-container.vue b/src/plugins/notebook/components/notebook-snapshot-container.vue new file mode 100644 index 0000000000..2f5ace4d85 --- /dev/null +++ b/src/plugins/notebook/components/notebook-snapshot-container.vue @@ -0,0 +1,152 @@ + + + diff --git a/src/plugins/notebook/components/notebook-snapshot-indicator.vue b/src/plugins/notebook/components/notebook-snapshot-indicator.vue new file mode 100644 index 0000000000..f9f6006339 --- /dev/null +++ b/src/plugins/notebook/components/notebook-snapshot-indicator.vue @@ -0,0 +1,97 @@ + + + diff --git a/src/plugins/notebook/components/notebook.vue b/src/plugins/notebook/components/notebook.vue new file mode 100644 index 0000000000..7122854e00 --- /dev/null +++ b/src/plugins/notebook/components/notebook.vue @@ -0,0 +1,528 @@ + + + diff --git a/src/plugins/notebook/components/page-collection.vue b/src/plugins/notebook/components/page-collection.vue new file mode 100644 index 0000000000..0161f8335f --- /dev/null +++ b/src/plugins/notebook/components/page-collection.vue @@ -0,0 +1,132 @@ + + + diff --git a/src/plugins/notebook/components/page-component.vue b/src/plugins/notebook/components/page-component.vue new file mode 100644 index 0000000000..8a93914d36 --- /dev/null +++ b/src/plugins/notebook/components/page-component.vue @@ -0,0 +1,146 @@ + + + diff --git a/src/plugins/notebook/components/search-results.vue b/src/plugins/notebook/components/search-results.vue new file mode 100644 index 0000000000..d0ad922a31 --- /dev/null +++ b/src/plugins/notebook/components/search-results.vue @@ -0,0 +1,50 @@ + + + diff --git a/src/plugins/notebook/components/section-collection.vue b/src/plugins/notebook/components/section-collection.vue new file mode 100644 index 0000000000..f1ef68b7cf --- /dev/null +++ b/src/plugins/notebook/components/section-collection.vue @@ -0,0 +1,113 @@ + + + diff --git a/src/plugins/notebook/components/section-component.vue b/src/plugins/notebook/components/section-component.vue new file mode 100644 index 0000000000..3b139c45be --- /dev/null +++ b/src/plugins/notebook/components/section-component.vue @@ -0,0 +1,149 @@ + + + + + diff --git a/src/plugins/notebook/components/sidebar.scss b/src/plugins/notebook/components/sidebar.scss new file mode 100644 index 0000000000..e5c8a8cd00 --- /dev/null +++ b/src/plugins/notebook/components/sidebar.scss @@ -0,0 +1,119 @@ +.c-sidebar { + @include userSelectNone(); + background: $sideBarBg; + display: flex; + justify-content: stretch; + max-width: 300px; + + &.c-drawer--push.is-expanded { + margin-right: $interiorMargin; + width: 50%; + } + + &.c-drawer--overlays.is-expanded { + width: 95%; + } + + > * { + // Hardcoded for two columns + background: $sideBarBg; + display: flex; + flex: 1 1 50%; + flex-direction: column; + + + * { + margin-left: $interiorMarginSm; + } + + > * + * { + // Add margin-top to first and second level children + margin-top: $interiorMargin; + } + } + + &__pane { + > * + * { margin-top: $interiorMargin; } + } + + &__header-w { + // Wraps header, used for page pane with collapse button + display: flex; + flex: 0 0 auto; + background: $sideBarHeaderBg; + align-items: center; + + .c-icon-button { + font-size: 0.8em; + color: $colorBodyFg; + } + } + + &__header { + color: $sideBarHeaderFg; + display: flex; + flex: 1 1 auto; + padding: $interiorMargin; + text-transform: uppercase; + + > * { + @include ellipsize(); + } + } + + &__contents-and-controls { + // Encloses pane buttons and contents elements + display: flex; + flex-direction: column; + flex: 1 1 auto; + + > * { + margin: auto $interiorMargin $interiorMargin $interiorMargin; + + &:first-child { + border-bottom: 1px solid $colorInteriorBorder; + flex: 0 0 auto; + } + + + * { + margin-top: $interiorMargin; + } + } + } + + &__contents { + flex: 1 1 auto; + overflow-x: hidden; + overflow-y: auto; + padding: auto $interiorMargin; + } + + .c-list-button { + .c-button { + font-size: 0.8em; + } + } + + .c-list__item { + @include hover() { + [class*="__menu-indicator"] { + opacity: 0.7; + transition: $transIn; + } + } + + > * + * { + margin-left: $interiorMargin; + } + + &__name { + flex: 0 1 auto; + } + + &__menu-indicator { + flex: 0 0 auto; + font-size: 0.8em; + opacity: 0; + transition: $transOut; + } + } +} diff --git a/src/plugins/notebook/components/sidebar.vue b/src/plugins/notebook/components/sidebar.vue new file mode 100644 index 0000000000..81f69ce118 --- /dev/null +++ b/src/plugins/notebook/components/sidebar.vue @@ -0,0 +1,189 @@ + + + diff --git a/src/plugins/notebook/res/templates/snapshotTemplate.html b/src/plugins/notebook/components/snapshot-template.html similarity index 74% rename from src/plugins/notebook/res/templates/snapshotTemplate.html rename to src/plugins/notebook/components/snapshot-template.html index 5bd3220409..5fdf3f09fc 100644 --- a/src/plugins/notebook/res/templates/snapshotTemplate.html +++ b/src/plugins/notebook/components/snapshot-template.html @@ -3,10 +3,10 @@
- - {{embed.name}} + {{ embed.name }}
@@ -21,9 +21,8 @@
-
-
+
diff --git a/src/plugins/notebook/notebook-constants.js b/src/plugins/notebook/notebook-constants.js new file mode 100644 index 0000000000..6253000460 --- /dev/null +++ b/src/plugins/notebook/notebook-constants.js @@ -0,0 +1,3 @@ +export const EVENT_SNAPSHOTS_UPDATED = 'SNAPSHOTS_UPDATED'; +export const NOTEBOOK_DEFAULT = 'DEFAULT'; +export const NOTEBOOK_SNAPSHOT = 'SNAPSHOT'; diff --git a/src/plugins/notebook/plugin.js b/src/plugins/notebook/plugin.js index 0715e31b3d..46810d286d 100644 --- a/src/plugins/notebook/plugin.js +++ b/src/plugins/notebook/plugin.js @@ -1,99 +1,134 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2018, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ +import Notebook from './components/notebook.vue'; +import NotebookSnapshotIndicator from './components/notebook-snapshot-indicator.vue'; +import SnapshotContainer from './snapshot-container'; +import Vue from 'vue'; -define([ - "./src/controllers/NotebookController" -], function ( - NotebookController -) { - var installed = false; +let installed = false; - function NotebookPlugin() { - return function install(openmct) { - if (installed) { - return; - } +export default function NotebookPlugin() { + return function install(openmct) { + if (installed) { + return; + } - installed = true; + installed = true; - openmct.legacyRegistry.register('notebook', { - name: 'Notebook Plugin', - extensions: { - types: [ + const notebookType = { + name: 'Notebook', + description: 'Create and save timestamped notes with embedded object snapshots.', + creatable: true, + cssClass: 'icon-notebook', + initialize: domainObject => { + domainObject.configuration = { + defaultSort: 'oldest', + entries: {}, + pageTitle: 'Page', + sections: [], + sectionTitle: 'Section', + type: 'General' + }; + }, + form: [ + { + key: 'defaultSort', + name: 'Entry Sorting', + control: 'select', + options: [ { - key: 'notebook', - name: 'Notebook', - cssClass: 'icon-notebook', - description: 'Create and save timestamped notes with embedded object snapshots.', - features: 'creation', - model: { - entries: [], - entryTypes: [], - defaultSort: 'oldest' - }, - properties: [ - { - key: 'defaultSort', - name: 'Default Sort', - control: 'select', - options: [ - { - name: 'Newest First', - value: "newest" - }, - { - name: 'Oldest First', - value: "oldest" - } - ], - cssClass: 'l-inline' - } - ] + name: 'Newest First', + value: "newest" + }, + { + name: 'Oldest First', + value: "oldest" } + ], + cssClass: 'l-inline', + property: [ + "configuration", + "defaultSort" + ] + }, + { + key: 'type', + name: 'Note book Type', + control: 'textfield', + cssClass: 'l-inline', + property: [ + "configuration", + "type" + ] + }, + { + key: 'sectionTitle', + name: 'Section Title', + control: 'textfield', + cssClass: 'l-inline', + property: [ + "configuration", + "sectionTitle" + ] + }, + { + key: 'pageTitle', + name: 'Page Title', + control: 'textfield', + cssClass: 'l-inline', + property: [ + "configuration", + "pageTitle" ] } - }); + ] + }; + openmct.types.addType('notebook', notebookType); - openmct.legacyRegistry.enable('notebook'); - - openmct.objectViews.addProvider({ - key: 'notebook-vue', - name: 'Notebook View', - cssClass: 'icon-notebook', - canView: function (domainObject) { - return domainObject.type === 'notebook'; - }, - view: function (domainObject) { - var controller = new NotebookController (openmct, domainObject); - - return { - show: controller.show, - destroy: controller.destroy - }; - } - }); + const snapshotContainer = new SnapshotContainer(openmct); + const notebookSnapshotIndicator = new Vue ({ + provide: { + openmct, + snapshotContainer + }, + components: { + NotebookSnapshotIndicator + }, + template: '' + }); + const indicator = { + element: notebookSnapshotIndicator.$mount().$el }; - } + openmct.indicators.add(indicator); - return NotebookPlugin; -}); + openmct.objectViews.addProvider({ + key: 'notebook-vue', + name: 'Notebook View', + cssClass: 'icon-notebook', + canView: function (domainObject) { + return domainObject.type === 'notebook'; + }, + view: function (domainObject) { + let component; + return { + show(container) { + component = new Vue({ + el: container, + components: { + Notebook + }, + provide: { + openmct, + domainObject, + snapshotContainer + }, + template: '' + }); + }, + destroy() { + component.$destroy(); + } + }; + } + }); + }; +} diff --git a/src/plugins/notebook/res/templates/embed.html b/src/plugins/notebook/res/templates/embed.html deleted file mode 100644 index 5890c3f91d..0000000000 --- a/src/plugins/notebook/res/templates/embed.html +++ /dev/null @@ -1,33 +0,0 @@ -
-
- -
-
- - -
- {{formatTime(embed.createdOn, 'YYYY-MM-DD HH:mm:ss')}} -
-
-
\ No newline at end of file diff --git a/src/plugins/notebook/res/templates/entry.html b/src/plugins/notebook/res/templates/entry.html deleted file mode 100644 index 349cb3cd7a..0000000000 --- a/src/plugins/notebook/res/templates/entry.html +++ /dev/null @@ -1,34 +0,0 @@ -
  • -
    -
    - {{formatTime(entry.createdOn, 'YYYY-MM-DD')}} - {{formatTime(entry.createdOn, 'HH:mm:ss')}} -
    -
    -
    -
    -
    - - -
    -
    -
    - -
    - -
    -
  • \ No newline at end of file diff --git a/src/plugins/notebook/res/templates/notebook.html b/src/plugins/notebook/res/templates/notebook.html deleted file mode 100644 index cbc14af170..0000000000 --- a/src/plugins/notebook/res/templates/notebook.html +++ /dev/null @@ -1,35 +0,0 @@ -
    -
    - - -
    - - -
    -
    -
    - To start a new entry, click here or drag and drop any object -
    -
    -
      - - -
    -
    -
    \ No newline at end of file diff --git a/src/plugins/notebook/res/templates/viewSnapshot.html b/src/plugins/notebook/res/templates/viewSnapshot.html deleted file mode 100644 index 77b23f11b5..0000000000 --- a/src/plugins/notebook/res/templates/viewSnapshot.html +++ /dev/null @@ -1,50 +0,0 @@ -
    -
    - -
    - - - - -
    -
    - -
    -
    -
    -
    -
    -
    {{embed.name}}
    -
    -
    -
    -
    - -
    -
    - SNAPSHOT {{formatTime(embed.createdOn, 'YYYY-MM-DD HH:mm:ss')}} -
    - - Annotate - -
    - -
    -
    -
    -
    -
    - -
    - - Done -
    -
    -
    -
    \ No newline at end of file diff --git a/src/plugins/notebook/snapshot-container.js b/src/plugins/notebook/snapshot-container.js new file mode 100644 index 0000000000..960b4ebde0 --- /dev/null +++ b/src/plugins/notebook/snapshot-container.js @@ -0,0 +1,82 @@ +import EventEmitter from 'EventEmitter'; +import { EVENT_SNAPSHOTS_UPDATED } from './notebook-constants'; +const NOTEBOOK_SNAPSHOT_STORAGE = 'notebook-snapshot-storage'; + +export const NOTEBOOK_SNAPSHOT_MAX_COUNT = 5; + +export default class SnapshotContainer extends EventEmitter { + constructor(openmct) { + super(); + + if (!SnapshotContainer.instance) { + SnapshotContainer.instance = this; + } + + this.openmct = openmct; + + return SnapshotContainer.instance; + } + + addSnapshot(embedObject) { + const snapshots = this.getSnapshots(); + if (snapshots.length >= NOTEBOOK_SNAPSHOT_MAX_COUNT) { + snapshots.pop(); + } + + snapshots.unshift(embedObject); + + return this.saveSnapshots(snapshots); + } + + getSnapshot(id) { + const snapshots = this.getSnapshots(); + + return snapshots.find(s => s.id === id); + } + + getSnapshots() { + const snapshots = window.localStorage.getItem(NOTEBOOK_SNAPSHOT_STORAGE) || '[]'; + + return JSON.parse(snapshots); + } + + removeSnapshot(id) { + if (!id) { + return; + } + + const snapshots = this.getSnapshots(); + const filteredsnapshots = snapshots.filter(snapshot => snapshot.id !== id); + + return this.saveSnapshots(filteredsnapshots); + } + + removeAllSnapshots() { + return this.saveSnapshots([]); + } + + saveSnapshots(snapshots) { + try { + window.localStorage.setItem(NOTEBOOK_SNAPSHOT_STORAGE, JSON.stringify(snapshots)); + this.emit(EVENT_SNAPSHOTS_UPDATED, true); + + return true; + } catch (e) { + const message = 'Insufficient memory in localstorage to store snapshot, please delete some snapshots and try again!'; + this.openmct.notifications.error(message); + + return false; + } + } + + updateSnapshot(snapshot) { + const snapshots = this.getSnapshots(); + const updatedSnapshots = snapshots.map(s => { + return s.id === snapshot.id + ? snapshot + : s; + }); + + return this.saveSnapshots(updatedSnapshots); + } +} diff --git a/src/plugins/notebook/snapshot.js b/src/plugins/notebook/snapshot.js new file mode 100644 index 0000000000..44bddccc91 --- /dev/null +++ b/src/plugins/notebook/snapshot.js @@ -0,0 +1,74 @@ +import { addNotebookEntry, createNewEmbed } from './utils/notebook-entries'; +import { getDefaultNotebook } from './utils/notebook-storage'; +import { NOTEBOOK_DEFAULT } from '@/plugins/notebook/notebook-constants'; +import SnapshotContainer from './snapshot-container'; + +export default class Snapshot { + constructor(openmct) { + this.openmct = openmct; + this.snapshotContainer = new SnapshotContainer(openmct); + this.exportImageService = openmct.$injector.get('exportImageService'); + this.dialogService = openmct.$injector.get('dialogService'); + + this.capture = this.capture.bind(this); + this._saveSnapShot = this._saveSnapShot.bind(this); + } + + capture(snapshotMeta, notebookType, domElement) { + this.exportImageService.exportPNGtoSRC(domElement, 's-status-taking-snapshot') + .then(function (blob) { + const reader = new window.FileReader(); + reader.readAsDataURL(blob); + reader.onloadend = function () { + this._saveSnapShot(notebookType, reader.result, snapshotMeta); + }.bind(this); + }.bind(this)); + } + + /** + * @private + */ + _saveSnapShot(notebookType, imageUrl, snapshotMeta) { + const snapshot = imageUrl ? { src: imageUrl } : ''; + const embed = createNewEmbed(snapshotMeta, snapshot); + if (notebookType === NOTEBOOK_DEFAULT) { + this._saveToDefaultNoteBook(embed); + + return; + } + + this._saveToNotebookSnapshots(embed); + } + + /** + * @private + */ + _saveToDefaultNoteBook(embed) { + const notebookStorage = getDefaultNotebook(); + this.openmct.objects.get(notebookStorage.notebookMeta.identifier) + .then(domainObject => { + addNotebookEntry(this.openmct, domainObject, notebookStorage, embed); + + const defaultPath = `${domainObject.name} > ${notebookStorage.section.name} > ${notebookStorage.page.name}`; + const msg = `Saved to Notebook ${defaultPath}`; + this._showNotification(msg); + }); + } + + /** + * @private + */ + _saveToNotebookSnapshots(embed) { + const saved = this.snapshotContainer.addSnapshot(embed); + if (!saved) { + return; + } + + const msg = 'Saved to Notebook Snapshots - click to view.'; + this._showNotification(msg); + } + + _showNotification(msg) { + this.openmct.notifications.info(msg); + } +} diff --git a/src/plugins/notebook/src/controllers/EmbedController.js b/src/plugins/notebook/src/controllers/EmbedController.js deleted file mode 100644 index 63ac92673a..0000000000 --- a/src/plugins/notebook/src/controllers/EmbedController.js +++ /dev/null @@ -1,302 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2018, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ - -define([ - 'moment', - 'zepto', - '../../res/templates/snapshotTemplate.html', - 'vue', - 'painterro' -], -function ( - Moment, - $, - SnapshotTemplate, - Vue, - Painterro -) { - function EmbedController(openmct, domainObject) { - this.openmct = openmct; - this.domainObject = domainObject; - this.popupService = openmct.$injector.get('popupService'); - this.agentService = openmct.$injector.get('agentService'); - - this.exposedData = this.exposedData.bind(this); - this.exposedMethods = this.exposedMethods.bind(this); - this.toggleActionMenu = this.toggleActionMenu.bind(this); - } - - EmbedController.prototype.openSnapshot = function (domainObject, entry, embed) { - - function annotateSnapshot(openmct) { - return function () { - - var save = false, - painterroInstance = {}, - annotateVue = new Vue({ - template: '
    ' - }), - self = this; - - let annotateOverlay = openmct.overlays.overlay({ - element: annotateVue.$mount().$el, - size: 'large', - dismissable: false, - buttons: [ - { - label: 'Cancel', - callback: function () { - save = false; - painterroInstance.save(); - annotateOverlay.dismiss(); - } - }, - { - label: 'Save', - callback: function () { - save = true; - painterroInstance.save(); - annotateOverlay.dismiss(); - } - } - ], - onDestroy: function () { - annotateVue.$destroy(true); - } - }); - - painterroInstance = Painterro({ - id: 'snap-annotation', - activeColor: '#ff0000', - activeColorAlpha: 1.0, - activeFillColor: '#fff', - activeFillColorAlpha: 0.0, - backgroundFillColor: '#000', - backgroundFillColorAlpha: 0.0, - defaultFontSize: 16, - defaultLineWidth: 2, - defaultTool: 'ellipse', - hiddenTools: ['save', 'open', 'close', 'eraser', 'pixelize', 'rotate', 'settings', 'resize'], - translation: { - name: 'en', - strings: { - lineColor: 'Line', - fillColor: 'Fill', - lineWidth: 'Size', - textColor: 'Color', - fontSize: 'Size', - fontStyle: 'Style' - } - }, - saveHandler: function (image, done) { - if (save) { - var entryPos = self.findInArray(domainObject.entries, entry.id), - embedPos = self.findInArray(entry.embeds, embed.id); - - if (entryPos !== -1 && embedPos !== -1) { - var url = image.asBlob(), - reader = new window.FileReader(); - - reader.readAsDataURL(url); - reader.onloadend = function () { - var snapshot = reader.result, - snapshotObject = { - src: snapshot, - type: url.type, - size: url.size, - modified: Date.now() - }, - dirString = 'entries[' + entryPos + '].embeds[' + embedPos + '].snapshot'; - - openmct.objects.mutate(domainObject, dirString, snapshotObject); - }; - } - } else { - console.log('You cancelled the annotation!!!'); - } - done(true); - } - }).show(embed.snapshot.src); - }; - } - - var self = this, - snapshot = new Vue({ - data: function () { - return { - embed: self.embed - }; - }, - methods: { - formatTime: self.formatTime, - annotateSnapshot: annotateSnapshot(self.openmct), - findInArray: self.findInArray - }, - template: SnapshotTemplate - }); - - var snapshotOverlay = this.openmct.overlays.overlay({ - element: snapshot.$mount().$el, - onDestroy: () => {snapshot.$destroy(true)}, - size: 'large', - dismissable: true, - buttons: [ - { - label: 'Done', - emphasis: true, - callback: function () { - snapshotOverlay.dismiss(); - } - } - ] - }); - }; - - EmbedController.prototype.formatTime = function (unixTime, timeFormat) { - return Moment(unixTime).format(timeFormat); - }; - - EmbedController.prototype.findInArray = function (array, id) { - var foundId = -1; - - array.forEach(function (element, index) { - if (element.id === id) { - foundId = index; - return; - } - }); - - return foundId; - }; - - EmbedController.prototype.populateActionMenu = function (openmct, actions) { - return function () { - var self = this; - - openmct.objects.get(self.embed.type).then(function (domainObject) { - actions.forEach((action) => { - self.actions.push({ - cssClass: action.cssClass, - name: action.name, - perform: () => { - action.invoke([domainObject].concat(openmct.router.path)); - } - }); - }); - }); - }; - }; - - EmbedController.prototype.removeEmbedAction = function () { - var self = this; - - return { - name: 'Remove Embed', - cssClass: 'icon-trash', - perform: function (embed, entry) { - var entryPosition = self.findInArray(self.domainObject.entries, entry.id), - embedPosition = self.findInArray(entry.embeds, embed.id); - - var dialog = self.openmct.overlays.dialog({ - iconClass: "alert", - message: 'This Action will permanently delete this embed. Do you wish to continue?', - buttons: [{ - label: "No", - callback: function () { - dialog.dismiss(); - } - }, - { - label: "Yes", - emphasis: true, - callback: function () { - entry.embeds.splice(embedPosition, 1); - var dirString = 'entries[' + entryPosition + '].embeds'; - - self.openmct.objects.mutate(self.domainObject, dirString, entry.embeds); - dialog.dismiss(); - } - }] - }); - } - }; - }; - - EmbedController.prototype.toggleActionMenu = function (event) { - event.preventDefault(); - - var body = $(document.body), - container = $(event.target.parentElement.parentElement), - initiatingEvent = this.agentService.isMobile() ? - 'touchstart' : 'mousedown', - menu = container.find('.menu-element'), - dismissExistingMenu; - - // Remove the context menu - function dismiss() { - container.find('.hide-menu').append(menu); - body.off(initiatingEvent, menuClickHandler); - dismissExistingMenu = undefined; - } - - function menuClickHandler(e) { - window.setTimeout(() => { - dismiss(); - }, 100); - } - - // Dismiss any menu which was already showing - if (dismissExistingMenu) { - dismissExistingMenu(); - } - - // ...and record the presence of this menu. - dismissExistingMenu = dismiss; - - this.popupService.display(menu, [event.pageX,event.pageY], { - marginX: 0, - marginY: -50 - }); - - body.on(initiatingEvent, menuClickHandler); - }; - - EmbedController.prototype.exposedData = function () { - return { - actions: [this.removeEmbedAction()], - showActionMenu: false - }; - }; - - EmbedController.prototype.exposedMethods = function () { - var self = this; - - return { - openSnapshot: self.openSnapshot, - formatTime: self.formatTime, - toggleActionMenu: self.toggleActionMenu, - findInArray: self.findInArray - }; - }; - - return EmbedController; -}); diff --git a/src/plugins/notebook/src/controllers/EntryController.js b/src/plugins/notebook/src/controllers/EntryController.js deleted file mode 100644 index a64253c9f8..0000000000 --- a/src/plugins/notebook/src/controllers/EntryController.js +++ /dev/null @@ -1,151 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2018, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ - -define([ - 'moment' -], -function ( - Moment -) { - - function EntryController(openmct, domainObject) { - this.openmct = openmct; - this.domainObject = domainObject; - - this.currentEntryValue = ''; - - this.exposedMethods = this.exposedMethods.bind(this); - this.exposedData = this.exposedData.bind(this); - } - - EntryController.prototype.entryPosById = function (entryId) { - var foundId = -1; - - this.domainObject.entries.forEach(function (element, index) { - if (element.id === entryId) { - foundId = index; - return; - } - }); - - return foundId; - }; - - EntryController.prototype.textFocus = function ($event) { - if ($event.target) { - this.currentEntryValue = $event.target.innerText; - } else { - $event.target.innerText = ''; - } - }; - - EntryController.prototype.textBlur = function ($event, entryId) { - if ($event.target) { - var entryPos = this.entryPosById(entryId); - - if (this.currentEntryValue !== $event.target.innerText) { - this.openmct.objects.mutate(this.domainObject, 'entries[' + entryPos + '].text', $event.target.innerText); - } - } - }; - - EntryController.prototype.formatTime = function (unixTime, timeFormat) { - return Moment(unixTime).format(timeFormat); - }; - - EntryController.prototype.deleteEntry = function () { - var entryPos = this.entryPosById(this.entry.id), - domainObject = this.domainObject, - openmct = this.openmct; - - if (entryPos !== -1) { - - var dialog = this.openmct.overlays.dialog({ - iconClass: 'alert', - message: 'This action will permanently delete this entry. Do you wish to continue?', - buttons: [ - { - label: "Ok", - emphasis: true, - callback: function () { - domainObject.entries.splice(entryPos, 1); - openmct.objects.mutate(domainObject, 'entries', domainObject.entries); - dialog.dismiss(); - } - }, - { - label: "Cancel", - callback: function () { - dialog.dismiss(); - } - } - ] - }); - } - }; - - EntryController.prototype.dropOnEntry = function (entryid, event) { - var data = event.dataTransfer.getData('openmct/domain-object-path'); - - if (data) { - var objectPath = JSON.parse(data), - domainObject = objectPath[0], - domainObjectKey = domainObject.identifier.key, - domainObjectType = this.openmct.types.get(domainObject.type), - cssClass = domainObjectType && domainObjectType.definition ? - domainObjectType.definition.cssClass : 'icon-object-unknown', - entryPos = this.entryPosById(entryid), - currentEntryEmbeds = this.domainObject.entries[entryPos].embeds, - newEmbed = { - id: '' + Date.now(), - domainObject: domainObject, - objectPath: objectPath, - type: domainObjectKey, - cssClass: cssClass, - name: domainObject.name, - snapshot: '' - }; - currentEntryEmbeds.push(newEmbed); - this.openmct.objects.mutate(this.domainObject, 'entries[' + entryPos + '].embeds', currentEntryEmbeds); - } - }; - - EntryController.prototype.exposedData = function () { - return { - openmct: this.openmct, - domainObject: this.domainObject, - currentEntryValue: this.currentEntryValue - }; - }; - - EntryController.prototype.exposedMethods = function () { - return { - entryPosById: this.entryPosById, - textFocus: this.textFocus, - textBlur: this.textBlur, - formatTime: this.formatTime, - deleteEntry: this.deleteEntry, - dropOnEntry: this.dropOnEntry - }; - }; - return EntryController; -}); diff --git a/src/plugins/notebook/src/controllers/NotebookController.js b/src/plugins/notebook/src/controllers/NotebookController.js deleted file mode 100644 index b63dfae6a2..0000000000 --- a/src/plugins/notebook/src/controllers/NotebookController.js +++ /dev/null @@ -1,237 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2018, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ - -define([ - 'vue', - './EntryController', - './EmbedController', - '../../res/templates/notebook.html', - '../../res/templates/entry.html', - '../../res/templates/embed.html', - '../../../../ui/components/search.vue', - '../../../../ui/preview/PreviewAction', - '../../../../ui/mixins/object-link' -], -function ( - Vue, - EntryController, - EmbedController, - NotebookTemplate, - EntryTemplate, - EmbedTemplate, - search, - PreviewAction, - objectLinkMixin -) { - - function NotebookController(openmct, domainObject) { - this.openmct = openmct; - this.domainObject = domainObject; - this.entrySearch = ''; - this.previewAction = new PreviewAction.default(openmct); - - this.show = this.show.bind(this); - this.destroy = this.destroy.bind(this); - this.newEntry = this.newEntry.bind(this); - this.entryPosById = this.entryPosById.bind(this); - } - - NotebookController.prototype.initializeVue = function (container) { - var self = this, - entryController = new EntryController(this.openmct, this.domainObject), - embedController = new EmbedController(this.openmct, this.domainObject); - - this.container = container; - - var notebookEmbed = { - inject:['openmct', 'domainObject'], - mixins:[objectLinkMixin.default], - props:['embed', 'entry'], - template: EmbedTemplate, - data: embedController.exposedData, - methods: embedController.exposedMethods(), - beforeMount: embedController.populateActionMenu(self.openmct, [self.previewAction]) - }; - - var entryComponent = { - props:['entry'], - template: EntryTemplate, - components: { - 'notebook-embed': notebookEmbed - }, - data: entryController.exposedData, - methods: entryController.exposedMethods(), - mounted: self.focusOnEntry - }; - - var NotebookVue = Vue.extend({ - provide: {openmct: self.openmct, domainObject: self.domainObject}, - components: { - 'notebook-entry': entryComponent, - 'search': search.default - }, - data: function () { - return { - entrySearch: self.entrySearch, - showTime: '0', - sortEntries: self.domainObject.defaultSort, - entries: self.domainObject.entries, - currentEntryValue: '' - }; - }, - computed: { - filteredAndSortedEntries() { - return this.sort(this.filterBySearch(this.entries, this.entrySearch), this.sortEntries); - } - }, - methods: { - search(value) { - this.entrySearch = value; - }, - newEntry: self.newEntry, - filterBySearch: self.filterBySearch, - sort: self.sort - }, - template: NotebookTemplate - }); - - this.NotebookVue = new NotebookVue(); - container.appendChild(this.NotebookVue.$mount().$el); - }; - - NotebookController.prototype.newEntry = function (event) { - this.NotebookVue.search(''); - - var date = Date.now(), - embed; - - if (event.dataTransfer && event.dataTransfer.getData('openmct/domain-object-path')) { - var selectedObject = JSON.parse(event.dataTransfer.getData('openmct/domain-object-path'))[0], - selectedObjectId = selectedObject.identifier.key, - cssClass = this.openmct.types.get(selectedObject.type); - - embed = { - type: selectedObjectId, - id: '' + date, - cssClass: cssClass, - name: selectedObject.name, - snapshot: '' - }; - } - - var entries = this.domainObject.entries, - lastEntryIndex = this.NotebookVue.sortEntries === 'newest' ? 0 : entries.length - 1, - lastEntry = entries[lastEntryIndex]; - - if (lastEntry === undefined || lastEntry.text || lastEntry.embeds.length) { - var createdEntry = {'id': 'entry-' + date, 'createdOn': date, 'embeds':[]}; - - if (embed) { - createdEntry.embeds.push(embed); - } - - entries.push(createdEntry); - this.openmct.objects.mutate(this.domainObject, 'entries', entries); - } else { - lastEntry.createdOn = date; - - if(embed) { - lastEntry.embeds.push(embed); - } - - this.openmct.objects.mutate(this.domainObject, 'entries[entries.length-1]', lastEntry); - this.focusOnEntry.bind(this.NotebookVue.$children[lastEntryIndex+1])(); - } - }; - - NotebookController.prototype.entryPosById = function (entryId) { - var foundId = -1; - - this.domainObject.entries.forEach(function (element, index) { - if (element.id === entryId) { - foundId = index; - return; - } - }); - - return foundId; - }; - - NotebookController.prototype.focusOnEntry = function () { - if (!this.entry.text) { - this.$refs.contenteditable.focus(); - } - }; - - NotebookController.prototype.filterBySearch = function (entryArray, filterString) { - if (filterString) { - var lowerCaseFilterString = filterString.toLowerCase(); - - return entryArray.filter(function (entry) { - if (entry.text) { - return entry.text.toLowerCase().includes(lowerCaseFilterString); - } else { - return false; - } - }); - } else { - return entryArray; - } - }; - - NotebookController.prototype.sort = function (array, sortDirection) { - let oldest = (a,b) => { - if (a.createdOn < b.createdOn) { - return -1; - } else if (a.createdOn > b.createdOn) { - return 1; - } else { - return 0; - } - }, - newest = (a,b) => { - if (a.createdOn < b.createdOn) { - return 1; - } else if (a.createdOn > b.createdOn) { - return -1; - } else { - return 0; - } - }; - - if (sortDirection === 'newest') { - return array.sort(newest); - } else { - return array.sort(oldest); - } - }; - - NotebookController.prototype.show = function (container) { - this.initializeVue(container); - }; - - NotebookController.prototype.destroy = function (container) { - this.NotebookVue.$destroy(true); - }; - - return NotebookController; -}); diff --git a/src/plugins/notebook/utils/notebook-entries.js b/src/plugins/notebook/utils/notebook-entries.js new file mode 100644 index 0000000000..ed8ca7f906 --- /dev/null +++ b/src/plugins/notebook/utils/notebook-entries.js @@ -0,0 +1,194 @@ +import objectLink from '../../../ui/mixins/object-link'; + +const TIME_BOUNDS = { + START_BOUND: 'tc.startBound', + END_BOUND: 'tc.endBound', + START_DELTA: 'tc.startDelta', + END_DELTA: 'tc.endDelta' +} + +export const getHistoricLinkInFixedMode = (openmct, bounds, historicLink) => { + if (historicLink.includes('tc.mode=fixed')) { + return historicLink; + } + + openmct.time.getAllClocks().forEach(clock => { + if (historicLink.includes(`tc.mode=${clock.key}`)) { + historicLink.replace(`tc.mode=${clock.key}`, 'tc.mode=fixed'); + + return; + } + }); + + const params = historicLink.split('&').map(param => { + if (param.includes(TIME_BOUNDS.START_BOUND) + || param.includes(TIME_BOUNDS.START_DELTA)) { + param = `${TIME_BOUNDS.START_BOUND}=${bounds.start}`; + } + + if (param.includes(TIME_BOUNDS.END_BOUND) + || param.includes(TIME_BOUNDS.END_DELTA)) { + param = `${TIME_BOUNDS.END_BOUND}=${bounds.end}`; + } + + return param; + }); + + return params.join('&'); +} + +export const getNotebookDefaultEntries = (notebookStorage, domainObject) => { + if (!notebookStorage || !domainObject) { + return null; + } + + const defaultSection = notebookStorage.section; + const defaultPage = notebookStorage.page; + if (!defaultSection || !defaultPage) { + return null; + } + + const configuration = domainObject.configuration; + const entries = configuration.entries || {}; + + let section = entries[defaultSection.id]; + if (!section) { + section = {}; + entries[defaultSection.id] = section; + } + + let page = entries[defaultSection.id][defaultPage.id]; + if (!page) { + page = []; + entries[defaultSection.id][defaultPage.id] = []; + } + + return entries[defaultSection.id][defaultPage.id]; +} + +export const createNewEmbed = (snapshotMeta, snapshot = '') => { + const { + bounds, + link, + objectPath, + openmct + } = snapshotMeta; + const domainObject = objectPath[0]; + const domainObjectType = openmct.types.get(domainObject.type); + + const cssClass = domainObjectType && domainObjectType.definition + ? domainObjectType.definition.cssClass + : 'icon-object-unknown'; + const date = Date.now(); + const historicLink = link + ? getHistoricLinkInFixedMode(openmct, bounds, link) + : objectLink.computed.objectLink.call({ objectPath, openmct }); + const name = domainObject.name; + const type = domainObject.identifier.key; + + return { + bounds, + createdOn: date, + cssClass, + domainObject, + historicLink, + id: 'embed-' + date, + name, + snapshot, + type + }; +} + +export const addNotebookEntry = (openmct, domainObject, notebookStorage, embed = null) => { + if (!openmct || !domainObject || !notebookStorage) { + return; + } + + const date = Date.now(); + const configuration = domainObject.configuration; + const entries = configuration.entries || {}; + + if (!entries) { + return; + } + + const embeds = embed + ? [embed] + : []; + + const defaultEntries = getNotebookDefaultEntries(notebookStorage, domainObject); + const id = `entry-${date}`; + defaultEntries.push({ + id, + createdOn: date, + text: '', + embeds + }); + + openmct.objects.mutate(domainObject, 'configuration.entries', entries); + + return id; +} + +export const getNotebookEntries = (domainObject, selectedSection, selectedPage) => { + if (!domainObject || !selectedSection || !selectedPage) { + return null; + } + + const configuration = domainObject.configuration; + const entries = configuration.entries || {}; + + let section = entries[selectedSection.id]; + if (!section) { + return null; + } + + let page = entries[selectedSection.id][selectedPage.id]; + if (!page) { + return null; + } + + return entries[selectedSection.id][selectedPage.id]; +} + +export const getEntryPosById = (entryId, domainObject, selectedSection, selectedPage) => { + if (!domainObject || !selectedSection || !selectedPage) { + return; + } + + const entries = getNotebookEntries(domainObject, selectedSection, selectedPage); + let foundId = -1; + entries.forEach((element, index) => { + if (element.id === entryId) { + foundId = index; + + return; + } + }); + + return foundId; +} + +export const deleteNotebookEntries = (openmct, domainObject, selectedSection, selectedPage) => { + if (!domainObject || !selectedSection) { + return; + } + + const configuration = domainObject.configuration; + const entries = configuration.entries || {}; + + // Delete entire section + if (!selectedPage) { + delete entries[selectedSection.id]; + + return; + } + + let section = entries[selectedSection.id]; + if (!section) { + return; + } + + delete entries[selectedSection.id][selectedPage.id]; + openmct.objects.mutate(domainObject, 'configuration.entries', entries); +} diff --git a/src/plugins/notebook/utils/notebook-storage.js b/src/plugins/notebook/utils/notebook-storage.js new file mode 100644 index 0000000000..37a71317ad --- /dev/null +++ b/src/plugins/notebook/utils/notebook-storage.js @@ -0,0 +1,40 @@ +const NOTEBOOK_LOCAL_STORAGE = 'notebook-storage'; + +export function clearDefaultNotebook() { + window.localStorage.setItem(NOTEBOOK_LOCAL_STORAGE, null); +} + +export function getDefaultNotebook() { + const notebookStorage = window.localStorage.getItem(NOTEBOOK_LOCAL_STORAGE); + + return JSON.parse(notebookStorage); +} + +export function setDefaultNotebook(domainObject, section, page) { + const notebookMeta = { + name: domainObject.name, + identifier: domainObject.identifier + }; + + const notebookStorage = { + notebookMeta, + section, + page + } + + window.localStorage.setItem(NOTEBOOK_LOCAL_STORAGE, JSON.stringify(notebookStorage)); +} + +export function setDefaultNotebookSection(section) { + const notebookStorage = getDefaultNotebook(); + + notebookStorage.section = section; + window.localStorage.setItem(NOTEBOOK_LOCAL_STORAGE, JSON.stringify(notebookStorage)); + +} + +export function setDefaultNotebookPage(page) { + const notebookStorage = getDefaultNotebook(); + notebookStorage.page = page; + window.localStorage.setItem(NOTEBOOK_LOCAL_STORAGE, JSON.stringify(notebookStorage)); +} diff --git a/src/plugins/notebook/utils/popup-menu.js b/src/plugins/notebook/utils/popup-menu.js new file mode 100644 index 0000000000..3830513936 --- /dev/null +++ b/src/plugins/notebook/utils/popup-menu.js @@ -0,0 +1,45 @@ +import $ from 'zepto'; + +export const togglePopupMenu = (event, openmct) => { + event.preventDefault(); + + const body = $(document.body); + const container = $(event.target.parentElement.parentElement); + const classList = document.querySelector('body').classList; + const isPhone = Array.from(classList).includes('phone'); + const isTablet = Array.from(classList).includes('tablet'); + + const initiatingEvent = isPhone || isTablet + ? 'touchstart' + : 'mousedown'; + const menu = container.find('.menu-element'); + let dismissExistingMenu; + + function dismiss() { + container.find('.hide-menu').append(menu); + body.off(initiatingEvent, menuClickHandler); + dismissExistingMenu = undefined; + } + + function menuClickHandler(e) { + window.setTimeout(() => { + dismiss(); + }, 100); + } + + // Dismiss any menu which was already showing + if (dismissExistingMenu) { + dismissExistingMenu(); + } + + // ...and record the presence of this menu. + dismissExistingMenu = dismiss; + + const popupService = openmct.$injector.get('popupService'); + popupService.display(menu, [event.pageX,event.pageY], { + marginX: 0, + marginY: -50 + }); + + body.on(initiatingEvent, menuClickHandler); +} diff --git a/src/plugins/plugins.js b/src/plugins/plugins.js index 26a0b7a34c..61ec38bb9f 100644 --- a/src/plugins/plugins.js +++ b/src/plugins/plugins.js @@ -171,7 +171,7 @@ define([ plugins.SummaryWidget = SummaryWidget; plugins.TelemetryMean = TelemetryMean; plugins.URLIndicator = URLIndicatorPlugin; - plugins.Notebook = Notebook; + plugins.Notebook = Notebook.default; plugins.DisplayLayout = DisplayLayoutPlugin.default; plugins.FolderView = FolderView; plugins.Tabs = Tabs; diff --git a/src/plugins/remove/RemoveAction.js b/src/plugins/remove/RemoveAction.js index 9db2ff4c3f..57f265d486 100644 --- a/src/plugins/remove/RemoveAction.js +++ b/src/plugins/remove/RemoveAction.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ - export default class RemoveAction { constructor(openmct) { this.name = 'Remove'; @@ -90,6 +89,13 @@ export default class RemoveAction { if (this.inNavigationPath(child) && this.openmct.editor.isEditing()) { this.openmct.editor.save(); } + + const parentKeyString = this.openmct.objects.makeKeyString(parent.identifier); + const isAlias = parentKeyString !== child.location; + + if (!isAlias) { + this.openmct.objects.mutate(child, 'location', null); + } } appliesTo(objectPath) { diff --git a/src/styles/_constants-espresso.scss b/src/styles/_constants-espresso.scss index 7dd68205b2..351a38ff28 100644 --- a/src/styles/_constants-espresso.scss +++ b/src/styles/_constants-espresso.scss @@ -87,6 +87,11 @@ $colorSelectedFg: pullForward($colorBodyFg, 20%); // Layout $shellMainPad: 4px 0; $shellPanePad: $interiorMargin, 7px; +$drawerBg: lighten($colorBodyBg, 5%); +$drawerFg: lighten($colorBodyFg, 5%); +$sideBarBg: $drawerBg; +$sideBarHeaderBg: rgba($colorBodyFg, 0.2); +$sideBarHeaderFg: rgba($colorBodyFg, 0.7); // Status colors, mainly used for messaging and item ancillary symbols $colorStatusFg: #999; @@ -331,7 +336,7 @@ $colorSummaryFg: rgba($colorBodyFg, 0.7); $colorSummaryFgEm: $colorBodyFg; // Plot -$colorPlotBg: rgba(black, 0.05); +$colorPlotBg: rgba(black, 0.1); $colorPlotFg: $colorBodyFg; $colorPlotHash: black; $opacityPlotHash: 0.2; diff --git a/src/styles/_constants-maelstrom.scss b/src/styles/_constants-maelstrom.scss index ba867f0258..e77ff19a4e 100644 --- a/src/styles/_constants-maelstrom.scss +++ b/src/styles/_constants-maelstrom.scss @@ -91,6 +91,11 @@ $colorSelectedFg: pullForward($colorBodyFg, 20%); // Layout $shellMainPad: 4px 0; $shellPanePad: $interiorMargin, 7px; +$drawerBg: lighten($colorBodyBg, 5%); +$drawerFg: lighten($colorBodyFg, 5%); +$sideBarBg: $drawerBg; +$sideBarHeaderBg: rgba($colorBodyFg, 0.2); +$sideBarHeaderFg: rgba($colorBodyFg, 0.7); // Status colors, mainly used for messaging and item ancillary symbols $colorStatusFg: #999; diff --git a/src/styles/_constants-mobile.scss b/src/styles/_constants-mobile.scss index 8016fa1d63..c58d37a5c4 100644 --- a/src/styles/_constants-mobile.scss +++ b/src/styles/_constants-mobile.scss @@ -26,7 +26,7 @@ $mobileListIconSize: 30px; $mobileTitleDescH: 35px; $mobileOverlayMargin: 20px; -$mobileMenuIconD: 34px; +$mobileMenuIconD: 25px; $phoneItemH: floor($gridItemMobile / 4); $tabletItemH: floor($gridItemMobile / 3); diff --git a/src/styles/_constants-snow.scss b/src/styles/_constants-snow.scss index 8544c14b83..e723e4b227 100644 --- a/src/styles/_constants-snow.scss +++ b/src/styles/_constants-snow.scss @@ -87,6 +87,11 @@ $colorSelectedFg: pullForward($colorBodyFg, 10%); // Layout $shellMainPad: 4px 0; $shellPanePad: $interiorMargin, 7px; +$drawerBg: darken($colorBodyBg, 5%); +$drawerFg: darken($colorBodyFg, 5%); +$sideBarBg: $drawerBg; +$sideBarHeaderBg: rgba(black, 0.25); +$sideBarHeaderFg: rgba($colorBodyFg, 0.7); // Status colors, mainly used for messaging and item ancillary symbols $colorStatusFg: #999; diff --git a/src/styles/_constants.scss b/src/styles/_constants.scss index 50e7ddb566..95ce70d9e7 100644 --- a/src/styles/_constants.scss +++ b/src/styles/_constants.scss @@ -148,6 +148,8 @@ $glyph-icon-filter-outline: '\e927'; $glyph-icon-suitcase: '\e928'; $glyph-icon-cursor-lock: '\e929'; $glyph-icon-flag: '\e92a'; +$glyph-icon-eye-disabled: '\e92b'; +$glyph-icon-notebook-page: '\e92c'; $glyph-icon-arrows-right-left: '\ea00'; $glyph-icon-arrows-up-down: '\ea01'; $glyph-icon-bullet: '\ea02'; diff --git a/src/styles/_controls.scss b/src/styles/_controls.scss index ec00a3e3ab..1aa917d2de 100644 --- a/src/styles/_controls.scss +++ b/src/styles/_controls.scss @@ -54,7 +54,6 @@ button { background: $splitterBtnColorBg; color: $splitterBtnColorFg; border-radius: $smallCr; - font-size: 6px; line-height: 90%; padding: 3px 10px; @@ -62,6 +61,10 @@ button { background: $colorBtnBgHov; color: $colorBtnFgHov; } + + @include desktop() { + font-size: 6px; + } } &.is-active { @@ -139,6 +142,26 @@ button { } } +.c-list-button { + @include cControl(); + color: $colorBodyFg; + cursor: pointer; + justify-content: start; + padding: $interiorMargin; + + > * + * { + margin-left: $interiorMargin; + } + + @include hover() { + background: $colorItemTreeHoverBg; + } + + .c-button { + flex: 0 0 auto; + } +} + /******************************************************** DISCLOSURE CONTROLS */ /********* Disclosure Button */ // Provides a downward arrow icon that when clicked displays additional options and/or info. @@ -642,7 +665,7 @@ select { $pTB: 2px; padding: $pTB $pLR; - &:hover { + @include hover() { background: $editUIBaseColorHov !important; color: $editUIBaseColorFg !important; } @@ -657,7 +680,7 @@ select { color: $colorBtnCautionBg; } - &:hover { + @include hover() { background: rgba($colorBtnCautionBgHov, 0.2); :before { color: $colorBtnCautionBgHov; diff --git a/src/styles/_glyphs.scss b/src/styles/_glyphs.scss index ec4782605e..9722753cec 100644 --- a/src/styles/_glyphs.scss +++ b/src/styles/_glyphs.scss @@ -82,6 +82,8 @@ .icon-suitcase { @include glyphBefore($glyph-icon-suitcase); } .icon-cursor-lock { @include glyphBefore($glyph-icon-cursor-lock); } .icon-flag { @include glyphBefore($glyph-icon-flag); } +.icon-eye-disabled { @include glyphBefore($glyph-icon-eye-disabled); } +.icon-notebook-page { @include glyphBefore($glyph-icon-notebook-page); } .icon-arrows-right-left { @include glyphBefore($glyph-icon-arrows-right-left); } .icon-arrows-up-down { @include glyphBefore($glyph-icon-arrows-up-down); } .icon-bullet { @include glyphBefore($glyph-icon-bullet); } diff --git a/src/styles/_layout.scss b/src/styles/_layout.scss index 2bc17c1dfb..fc8daf5af6 100644 --- a/src/styles/_layout.scss +++ b/src/styles/_layout.scss @@ -83,4 +83,8 @@ &__object-name { flex: 0 1 auto; } + + &__object-details { + opacity: 0.5; + } } diff --git a/src/styles/_mixins.scss b/src/styles/_mixins.scss index a53a3146d9..10030e2320 100644 --- a/src/styles/_mixins.scss +++ b/src/styles/_mixins.scss @@ -51,7 +51,7 @@ /************************** EFFECTS */ @mixin pulse($animName: pulse, $dur: 500ms, $iteration: infinite, $opacity0: 0.5, $opacity100: 1) { - @keyframes pulse { + @keyframes #{$animName} { 0% { opacity: $opacity0; } 100% { opacity: $opacity100; } } @@ -62,6 +62,18 @@ animation-timing-function: ease-in-out; } +@mixin pulseProp($animName: pulseProp, $dur: 500ms, $iter: 5, $prop: opacity, $valStart: 0, $valEnd: 1) { + @keyframes #{$animName} { + 0% { #{$prop}: $valStart; } + 100% { #{$prop}: $valEnd; } + } + animation-name: $animName; + animation-duration: $dur; + animation-direction: alternate; + animation-iteration-count: $iter; + animation-timing-function: ease-in-out; +} + /************************** VISUALS */ @mixin ancillaryIcon($d, $c) { // Used for small icons used in combination with larger icons, @@ -408,10 +420,15 @@ @include cControl(); cursor: pointer; padding: 4px; // Bigger hit area - opacity: 0.6; + opacity: 0.7; transition: $transOut; transform-origin: center; + &[class*="--major"] { + color: $colorBtnMajorBg !important; + opacity: 0.8; + } + @include hover() { transform: scale(1.1); transition: $transIn; diff --git a/src/styles/fonts/Open MCT Symbols 16px.json b/src/styles/fonts/Open MCT Symbols 16px.json index 99bfe9278c..23ca1a6fad 100644 --- a/src/styles/fonts/Open MCT Symbols 16px.json +++ b/src/styles/fonts/Open MCT Symbols 16px.json @@ -2,7 +2,11 @@ "metadata": { "name": "Open MCT Symbols 16px", "lastOpened": 0, +<<<<<<< Updated upstream "created": 1581619121103 +======= + "created": 1585071193084 +>>>>>>> Stashed changes }, "iconSets": [ { @@ -11,7 +15,7 @@ "order": 77, "id": 47, "name": "icon-alert-rect-v2", - "prevSize": 24, + "prevSize": 16, "code": 59648, "tempChar": "" }, @@ -19,7 +23,7 @@ "order": 76, "id": 48, "name": "icon-alert-triangle-v2", - "prevSize": 24, + "prevSize": 16, "code": 59649, "tempChar": "" }, @@ -27,7 +31,7 @@ "order": 20, "id": 112, "name": "icon-arrow-up", - "prevSize": 24, + "prevSize": 16, "code": 59650, "tempChar": "" }, @@ -35,7 +39,7 @@ "order": 36, "id": 94, "name": "icon-arrow-double-up", - "prevSize": 24, + "prevSize": 16, "code": 59651, "tempChar": "" }, @@ -43,7 +47,7 @@ "order": 143, "id": 96, "name": "icon-arrow-tall-up", - "prevSize": 24, + "prevSize": 16, "code": 59652, "tempChar": "" }, @@ -51,7 +55,7 @@ "order": 21, "id": 111, "name": "icon-arrow-right", - "prevSize": 24, + "prevSize": 16, "code": 59653, "tempChar": "" }, @@ -59,7 +63,7 @@ "order": 102, "id": 18, "name": "icon-arrow-right-equilateral", - "prevSize": 24, + "prevSize": 16, "code": 59654, "tempChar": "" }, @@ -67,7 +71,7 @@ "order": 19, "id": 113, "name": "icon-arrow-down", - "prevSize": 24, + "prevSize": 16, "code": 59655, "tempChar": "" }, @@ -75,7 +79,7 @@ "order": 37, "id": 93, "name": "icon-arrow-double-down", - "prevSize": 24, + "prevSize": 16, "code": 59656, "tempChar": "" }, @@ -83,7 +87,7 @@ "order": 35, "id": 95, "name": "icon-arrow-tall-down", - "prevSize": 24, + "prevSize": 16, "code": 59657, "tempChar": "" }, @@ -91,7 +95,7 @@ "order": 18, "id": 114, "name": "icon-arrow-left", - "prevSize": 24, + "prevSize": 16, "code": 59658, "tempChar": "" }, @@ -99,7 +103,7 @@ "order": 17, "id": 115, "name": "icon-asterisk", - "prevSize": 24, + "prevSize": 16, "code": 59659, "tempChar": "" }, @@ -107,7 +111,7 @@ "order": 128, "id": 59, "name": "icon-bell", - "prevSize": 24, + "prevSize": 16, "code": 59660, "tempChar": "" }, @@ -115,7 +119,7 @@ "order": 123, "id": 103, "name": "icon-box-round-corners", - "prevSize": 24, + "prevSize": 16, "code": 59661, "tempChar": "" }, @@ -123,7 +127,7 @@ "order": 129, "id": 58, "name": "icon-box-with-arrow-cursor", - "prevSize": 24, + "prevSize": 16, "code": 59662, "tempChar": "" }, @@ -131,7 +135,7 @@ "order": 142, "id": 120, "name": "icon-check", - "prevSize": 24, + "prevSize": 16, "code": 59663, "tempChar": "" }, @@ -139,7 +143,7 @@ "order": 25, "id": 107, "name": "icon-connectivity", - "prevSize": 24, + "prevSize": 16, "code": 59664, "tempChar": "" }, @@ -147,7 +151,7 @@ "order": 44, "id": 84, "name": "icon-database-in-brackets", - "prevSize": 24, + "prevSize": 16, "code": 59665, "tempChar": "" }, @@ -155,7 +159,7 @@ "order": 75, "id": 49, "name": "icon-eye-open", - "prevSize": 24, + "prevSize": 16, "code": 59666, "tempChar": "" }, @@ -163,7 +167,7 @@ "order": 5, "id": 129, "name": "icon-gear", - "prevSize": 24, + "prevSize": 16, "code": 59667, "tempChar": "" }, @@ -171,7 +175,7 @@ "order": 66, "id": 60, "name": "icon-hourglass", - "prevSize": 24, + "prevSize": 16, "code": 59668, "tempChar": "" }, @@ -179,7 +183,7 @@ "order": 65, "id": 61, "name": "icon-info", - "prevSize": 24, + "prevSize": 16, "code": 59669, "tempChar": "" }, @@ -187,7 +191,7 @@ "order": 53, "id": 75, "name": "icon-link", - "prevSize": 24, + "prevSize": 16, "code": 59670, "tempChar": "" }, @@ -195,7 +199,7 @@ "order": 42, "id": 86, "name": "icon-lock", - "prevSize": 24, + "prevSize": 16, "code": 59671, "tempChar": "" }, @@ -203,7 +207,7 @@ "order": 49, "id": 79, "name": "icon-minus", - "prevSize": 24, + "prevSize": 16, "code": 59672, "tempChar": "" }, @@ -211,7 +215,7 @@ "order": 22, "id": 110, "name": "icon-people", - "prevSize": 24, + "prevSize": 16, "code": 59673, "tempChar": "" }, @@ -219,7 +223,7 @@ "order": 46, "id": 82, "name": "icon-person", - "prevSize": 24, + "prevSize": 16, "code": 59674, "tempChar": "" }, @@ -227,7 +231,7 @@ "order": 38, "id": 92, "name": "icon-plus", - "prevSize": 24, + "prevSize": 16, "code": 59675, "tempChar": "" }, @@ -235,7 +239,7 @@ "order": 164, "id": 137, "name": "icon-plus-in-rect", - "prevSize": 24, + "prevSize": 16, "code": 59676, "tempChar": "" }, @@ -243,7 +247,7 @@ "order": 6, "id": 128, "name": "icon-trash", - "prevSize": 24, + "prevSize": 16, "code": 59677, "tempChar": "" }, @@ -251,7 +255,7 @@ "order": 140, "id": 122, "name": "icon-x-heavy", - "prevSize": 24, + "prevSize": 16, "code": 59678, "tempChar": "" }, @@ -259,7 +263,7 @@ "order": 78, "id": 46, "name": "icon-brackets", - "prevSize": 24, + "prevSize": 16, "code": 59679, "tempChar": "" }, @@ -267,7 +271,7 @@ "order": 93, "id": 27, "name": "icon-crosshair", - "prevSize": 24, + "prevSize": 16, "code": 59680, "tempChar": "" }, @@ -275,7 +279,7 @@ "order": 91, "id": 31, "name": "icon-grippy", - "prevSize": 24, + "prevSize": 16, "code": 59681, "tempChar": "" }, @@ -283,7 +287,7 @@ "order": 121, "id": 118, "name": "icon-grid", - "prevSize": 24, + "prevSize": 16, "code": 59682, "tempChar": "" }, @@ -291,7 +295,7 @@ "order": 154, "id": 136, "name": "icon-grippy-ew", - "prevSize": 24, + "prevSize": 16, "code": 59683, "tempChar": "" }, @@ -299,7 +303,7 @@ "order": 152, "id": 135, "name": "icon-columns", - "prevSize": 24, + "prevSize": 16, "code": 59684, "tempChar": "" }, @@ -307,7 +311,7 @@ "order": 153, "id": 134, "name": "icon-rows", - "prevSize": 24, + "prevSize": 16, "code": 59685, "tempChar": "" }, @@ -315,7 +319,7 @@ "order": 162, "id": 140, "name": "icon-filter", - "prevSize": 24, + "prevSize": 16, "code": 59686, "tempChar": "" }, @@ -323,7 +327,7 @@ "order": 161, "id": 139, "name": "icon-filter-outline", - "prevSize": 24, + "prevSize": 16, "code": 59687, "tempChar": "" }, @@ -331,7 +335,7 @@ "order": 155, "id": 142, "name": "icon-suitcase", - "prevSize": 24, + "prevSize": 16, "code": 59688, "tempChar": "" }, @@ -339,7 +343,7 @@ "order": 169, "id": 145, "name": "icon-cursor-locked", - "prevSize": 24, + "prevSize": 16, "code": 59689, "tempChar": "" }, @@ -347,729 +351,1108 @@ "order": 176, "id": 150, "name": "icon-flag", - "prevSize": 24, + "prevSize": 16, "code": 59690, "tempChar": "" }, { +<<<<<<< Updated upstream +======= + "order": 177, + "id": 152, + "name": "icon-eye-disabled", + "prevSize": 16, + "code": 59691, + "tempChar": "" + }, + { + "order": 179, + "id": 153, + "name": "icon-notebook-page", + "prevSize": 16, + "code": 59692, + "tempChar": "" + }, + { +>>>>>>> Stashed changes "order": 27, "id": 105, "name": "icon-arrows-right-left", - "prevSize": 24, + "prevSize": 16, "code": 59904, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 26, "id": 106, "name": "icon-arrows-up-down", - "prevSize": 24, + "prevSize": 16, "code": 59905, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 68, "id": 56, "name": "icon-bullet", - "prevSize": 24, + "prevSize": 16, "code": 59906, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 150, "id": 133, - "prevSize": 24, + "prevSize": 16, "code": 59907, "name": "icon-calendar", +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 45, "id": 83, "name": "icon-chain-links", - "prevSize": 24, + "prevSize": 16, "code": 59908, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 73, "id": 51, "name": "icon-download", - "prevSize": 24, + "prevSize": 16, "code": 59909, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 39, "id": 91, "name": "icon-duplicate", - "prevSize": 24, + "prevSize": 16, "code": 59910, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 50, "id": 78, "name": "icon-folder-new", - "prevSize": 24, + "prevSize": 16, "code": 59911, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 138, "id": 124, "name": "icon-fullscreen-collapse", - "prevSize": 24, + "prevSize": 16, "code": 59912, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 139, "id": 123, "name": "icon-fullscreen-expand", - "prevSize": 24, + "prevSize": 16, "code": 59913, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 122, "id": 104, "name": "icon-layers", - "prevSize": 24, + "prevSize": 16, "code": 59914, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 151, "id": 102, "name": "icon-line-horz", - "prevSize": 24, + "prevSize": 16, "code": 59915, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 100, "id": 20, "name": "icon-magnify", - "prevSize": 24, + "prevSize": 16, "code": 59916, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 99, "id": 21, "name": "icon-magnify-in", - "prevSize": 24, + "prevSize": 16, "code": 59917, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 101, "id": 19, "name": "icon-magnify-out-v2", - "prevSize": 24, + "prevSize": 16, "code": 59918, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 103, "id": 17, "name": "icon-menu", - "prevSize": 24, + "prevSize": 16, "code": 59919, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 124, "id": 89, "name": "icon-move", - "prevSize": 24, + "prevSize": 16, "code": 59920, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 7, "id": 127, "name": "icon-new-window", - "prevSize": 24, + "prevSize": 16, "code": 59921, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 63, "id": 63, "name": "icon-paint-bucket-v2", - "prevSize": 24, + "prevSize": 16, "code": 59922, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 15, "id": 117, "name": "icon-pencil", - "prevSize": 24, + "prevSize": 16, "code": 59923, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 54, "id": 72, "name": "icon-pencil-edit-in-place", - "prevSize": 24, + "prevSize": 16, "code": 59924, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 40, "id": 90, "name": "icon-play", - "prevSize": 24, + "prevSize": 16, "code": 59925, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 125, "id": 88, "name": "icon-pause", - "prevSize": 24, + "prevSize": 16, "code": 59926, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 119, "id": 13, "name": "icon-plot-resource", - "prevSize": 24, + "prevSize": 16, "code": 59927, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 48, "id": 80, "name": "icon-pointer-left", - "prevSize": 24, + "prevSize": 16, "code": 59928, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 47, "id": 81, "name": "icon-pointer-right", - "prevSize": 24, + "prevSize": 16, "code": 59929, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 85, "id": 37, "name": "icon-refresh", - "prevSize": 24, + "prevSize": 16, "code": 59930, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 55, "id": 71, "name": "icon-save", - "prevSize": 24, + "prevSize": 16, "code": 59931, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 56, "id": 70, "name": "icon-save-as", - "prevSize": 24, + "prevSize": 16, "code": 59932, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 58, "id": 68, "name": "icon-sine", - "prevSize": 24, + "prevSize": 16, "code": 59933, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 113, "id": 5, "name": "icon-font", - "prevSize": 24, + "prevSize": 16, "code": 59934, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 41, "id": 87, "name": "icon-thumbs-strip", - "prevSize": 24, + "prevSize": 16, "code": 59935, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 146, "id": 99, "name": "icon-two-parts-both", - "prevSize": 24, + "prevSize": 16, "code": 59936, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 145, "id": 98, "name": "icon-two-parts-one-only", - "prevSize": 24, + "prevSize": 16, "code": 59937, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 82, "id": 40, "name": "icon-resync", - "prevSize": 24, + "prevSize": 16, "code": 59938, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 86, "id": 36, "name": "icon-reset", - "prevSize": 24, + "prevSize": 16, "code": 59939, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 61, "id": 65, "name": "icon-x-in-circle", - "prevSize": 24, + "prevSize": 16, "code": 59940, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 84, "id": 38, "name": "icon-brightness", - "prevSize": 24, + "prevSize": 16, "code": 59941, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 83, "id": 39, "name": "icon-contrast", - "prevSize": 24, + "prevSize": 16, "code": 59942, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 87, "id": 35, "name": "icon-expand", - "prevSize": 24, + "prevSize": 16, "code": 59943, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 89, "id": 33, "name": "icon-list-view", - "prevSize": 24, + "prevSize": 16, "code": 59944, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 133, "id": 28, "name": "icon-grid-snap-to", - "prevSize": 24, + "prevSize": 16, "code": 59945, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 132, "id": 29, "name": "icon-grid-snap-no", - "prevSize": 24, + "prevSize": 16, "code": 59946, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 94, "id": 26, "name": "icon-frame-show", - "prevSize": 24, + "prevSize": 16, "code": 59947, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 95, "id": 25, "name": "icon-frame-hide", - "prevSize": 24, + "prevSize": 16, "code": 59948, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 97, "id": 23, "name": "icon-import", - "prevSize": 24, + "prevSize": 16, "code": 59949, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 96, "id": 24, "name": "icon-export", - "prevSize": 24, + "prevSize": 16, "code": 59950, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 114, "id": 4, "name": "icon-font-size", - "prevSize": 24, + "prevSize": 16, "code": 59951, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 163, "id": 141, "name": "icon-clear-data", - "prevSize": 24, + "prevSize": 16, "code": 59952, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 173, "id": 149, "name": "icon-history", - "prevSize": 24, + "prevSize": 16, "code": 59953, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 144, "id": 97, "name": "icon-activity", - "prevSize": 24, + "prevSize": 16, "code": 60160, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 104, "id": 16, "name": "icon-activity-mode", - "prevSize": 24, + "prevSize": 16, "code": 60161, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 137, "id": 125, "name": "icon-autoflow-tabular", - "prevSize": 24, + "prevSize": 16, "code": 60162, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 115, "id": 3, "name": "icon-clock", - "prevSize": 24, + "prevSize": 16, "code": 60163, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 2, "id": 132, "name": "icon-database", - "prevSize": 24, + "prevSize": 16, "code": 60164, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 3, "id": 131, "name": "icon-database-query", - "prevSize": 24, + "prevSize": 16, "code": 60165, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 67, "id": 57, "name": "icon-dataset", - "prevSize": 24, + "prevSize": 16, "code": 60166, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 59, "id": 67, "name": "icon-datatable", - "prevSize": 24, + "prevSize": 16, "code": 60167, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 136, "id": 126, "name": "icon-dictionary", - "prevSize": 24, + "prevSize": 16, "code": 60168, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 51, "id": 77, "name": "icon-folder", - "prevSize": 24, + "prevSize": 16, "code": 60169, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 147, "id": 100, "name": "icon-image", - "prevSize": 24, + "prevSize": 16, "code": 60170, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 4, "id": 130, "name": "icon-layout", - "prevSize": 24, + "prevSize": 16, "code": 60171, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 24, "id": 108, "name": "icon-object", - "prevSize": 24, + "prevSize": 16, "code": 60172, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 52, "id": 76, "name": "icon-object-unknown", - "prevSize": 24, + "prevSize": 16, "code": 60173, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 105, "id": 15, "name": "icon-packet", - "prevSize": 24, + "prevSize": 16, "code": 60174, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 126, "id": 74, "name": "icon-page", - "prevSize": 24, + "prevSize": 16, "code": 60175, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 130, "id": 44, "name": "icon-plot-overlay", - "prevSize": 24, + "prevSize": 16, "code": 60176, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 80, "id": 42, "name": "icon-plot-stacked", - "prevSize": 24, + "prevSize": 16, "code": 60177, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 134, "id": 14, "name": "icon-session", - "prevSize": 24, + "prevSize": 16, "code": 60178, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 109, "id": 9, "name": "icon-tabular", - "prevSize": 24, + "prevSize": 16, "code": 60179, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 107, "id": 11, "name": "icon-tabular-lad", - "prevSize": 24, + "prevSize": 16, "code": 60180, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 106, "id": 12, "name": "icon-tabular-lad-set", - "prevSize": 24, + "prevSize": 16, "code": 60181, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 70, "id": 54, "name": "icon-tabular-realtime", - "prevSize": 24, + "prevSize": 16, "code": 60182, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 60, "id": 66, "name": "icon-tabular-scrolling", - "prevSize": 24, + "prevSize": 16, "code": 60183, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 131, "id": 43, "name": "icon-telemetry", - "prevSize": 24, + "prevSize": 16, "code": 60184, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 108, "id": 10, "name": "icon-timeline", - "prevSize": 24, + "prevSize": 16, "code": 60185, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 81, "id": 41, "name": "icon-timer", - "prevSize": 24, + "prevSize": 16, "code": 60186, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 69, "id": 55, "name": "icon-topic", - "prevSize": 24, + "prevSize": 16, "code": 60187, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 79, "id": 45, "name": "icon-box-with-dashed-lines-v2", - "prevSize": 24, + "prevSize": 16, "code": 60188, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 90, "id": 32, "name": "icon-summary-widget", - "prevSize": 24, + "prevSize": 16, "code": 60189, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 92, "id": 30, "name": "icon-notebook", - "prevSize": 24, + "prevSize": 16, "code": 60190, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 168, "id": 0, "name": "icon-tabs-view", - "prevSize": 24, + "prevSize": 16, "code": 60191, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 117, "id": 1, "name": "icon-flexible-layout", - "prevSize": 24, + "prevSize": 16, "code": 60192, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 166, "id": 144, "name": "icon-generator-sine", - "prevSize": 24, + "prevSize": 16, "code": 60193, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 167, "id": 143, "name": "icon-generator-event", - "prevSize": 24, + "prevSize": 16, "code": 60194, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 165, "id": 138, "name": "icon-gauge-v2", - "prevSize": 24, + "prevSize": 16, "code": 60195, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 170, "id": 148, "name": "icon-spectra", - "prevSize": 24, + "prevSize": 16, "code": 60196, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 171, "id": 147, "name": "icon-telemetry-spectra", - "prevSize": 24, + "prevSize": 16, "code": 60197, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 172, "id": 146, "name": "icon-pushbutton", - "prevSize": 24, + "prevSize": 16, "code": 60198, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes }, { "order": 174, "id": 151, "name": "icon-conditional", - "prevSize": 24, + "prevSize": 16, "code": 60199, +<<<<<<< Updated upstream "tempChar": "" +======= + "tempChar": "" +>>>>>>> Stashed changes } ], "id": 0, @@ -1645,6 +2028,43 @@ "isMulticolor2": false }, { +<<<<<<< Updated upstream +======= + "id": 152, + "paths": [ + "M209.46 608.68q-7.46-9.86-14.26-20.28c-14.737-21.984-27.741-47.184-37.759-73.847l-0.841-2.553c11.078-29.259 24.068-54.443 39.51-77.869l-0.91 1.469c23.221-34.963 50.705-64.8 82.207-89.793l0.793-0.607c57.663-45.719 130.179-75.053 209.311-79.947l1.069-0.053 114.48-140.88c-27.366-5.017-58.869-7.898-91.041-7.92l-0.019-0c-245.8 0-452.2 168-510.8 395.6 21.856 82.93 60.906 154.847 113.325 214.773l-0.525-0.613z", + "M814.76 415.080q7.52 10 14.44 20.52c14.737 21.984 27.741 47.184 37.759 73.847l0.841 2.553c-10.859 29.216-23.863 54.416-39.447 77.748l0.847-1.348c-23.221 34.963-50.705 64.8-82.207 89.793l-0.793 0.607c-57.762 45.834-130.437 75.216-209.743 80.049l-1.057 0.051-114.46 140.86c27.346 4.988 58.817 7.84 90.955 7.84 0.037 0 0.074-0 0.111-0l-0.005 0c245.8 0 452.2-168 510.8-395.6-21.856-82.93-60.906-154.847-113.325-214.773l0.525 0.613z", + "M832 0l-832 1024h192l832-1024h-192z" + ], + "attrs": [ + {}, + {}, + {} + ], + "isMulticolor": false, + "isMulticolor2": false, + "grid": 16, + "tags": [ + "icon-eye-disabled" + ] + }, + { + "id": 153, + "paths": [ + "M830 62h-830l-4 702c0 106.6 87.4 194 194 194h640c106.6 0 194-87.4 194-194v-508c0-106.8-87.4-194-194-194zM832 446l-384 384-192-192v-256l192 192 384-384v256z" + ], + "attrs": [ + {} + ], + "grid": 16, + "tags": [ + "icon-notebook-page" + ], + "isMulticolor": false, + "isMulticolor2": false + }, + { +>>>>>>> Stashed changes "id": 105, "paths": [ "M1024 512l-448 512v-1024z", diff --git a/src/styles/fonts/Open-MCT-Symbols-16px.svg b/src/styles/fonts/Open-MCT-Symbols-16px.svg old mode 100755 new mode 100644 index a7376766a3..7a4dd0a852 --- a/src/styles/fonts/Open-MCT-Symbols-16px.svg +++ b/src/styles/fonts/Open-MCT-Symbols-16px.svg @@ -50,6 +50,8 @@ + + diff --git a/src/styles/fonts/Open-MCT-Symbols-16px.ttf b/src/styles/fonts/Open-MCT-Symbols-16px.ttf old mode 100755 new mode 100644 index cd0ed6df5493639b8d1cf3474b1253254509fbb3..7b3ff173446b1523aec0113ebcef6a8b5c646ba9 GIT binary patch delta 806 zcmZuuUr1A76hCKowaxv#+uiOq=bd+3+qAjVsZ)?SqQaSqAVGwXOHHvkhwj0`+6pOA z0&5{gVi7$KA6keQ;n;&oM9@nQ5!A!57avAgkSy1?`6AT!^5ggC9L_o4(o>vyjthJ& zw`m4I695bj2PY#0RfNY0iibnjuZnKg^bC)Q85z=5`u}CR^XW9@|5_$honR=PT`eegY0y$F zyiXnDxY72&1z)HJ(fhA26dv)b^B^opt87UwlZWNA@^yJm(V@7d*j9W}>?+SG`;-&Ptjeugq)l`) zy+~*19kpNmQoW~1YWA2*%nc^VWVN7mX)kKy+EpE=o71i8ez7KYiT$C!qF*!k4Pisl z@Wt3BHrkCZj9bQB`9o8+>3v0g#WJVnGTgp-#k^D5T={`_^8NfApW*i{cP(31yESUv Quua?6N_)+x++CxBzp0tOi2wiq delta 445 zcmZo!#5iL<;{?U}cl)Io7#L+37#LF06N?Lgv;dIb0Hit6b1KuAlb)sn`5g=l9y}ST zi7DbgnT#12Jf{HV%`$)j?550nf&4Q-zDh=JNrgB&$7vw{0|Nt-N=|-qBDaOC4g-Ua z2+$0X+{B6khUpCR7#Mstfa(?U5_3}}6raz20~GK8YS1glFD_wV21+sbS4`Y7nNe%9 z52HM@zG&j+JjUIEn>$5{&E)(lUYW-8+k9ovwJ;Z?$?g#U<` zhy;k#h^!E~Ao5Q%PxO}PKQTA49I+STPU4#+*d!)M?34H-sUsO7Ste=yMM_M{LF$oo zm5hu`lgu00Bsn2DFS&Q}X7U{hataj+8x(FS3MqOiUQ-fNDpNY5%%yxrg$?YX&dsy@ GvX}r6(05({ diff --git a/src/styles/fonts/Open-MCT-Symbols-16px.woff b/src/styles/fonts/Open-MCT-Symbols-16px.woff old mode 100755 new mode 100644 index f098f9a88686704f3c688a5500d7eebf213c84ad..4353acd6fe900fa67daa86abdb4c55daf3027b53 GIT binary patch delta 856 zcmZutT}V@57=GV#j&Aep?`&r~bLyGO2KJUl#ew&Z+{Zlku zX|1aR1X8C@0h{U!qybK@x9TSfoTEF-mhQk%2msf}Q2rO%?%>r+MEd~H5R@RhUewXk z6}Sk{5@cR_xu-8oc+)HZRVcwCm%j-PbP`{4oV;n0;0>La z?F$Tth@oYJEas;02$9x4<`Y9PL~H=?)7=lUSgA}QI;+fQE;JA5Yd8!`_!nBx}E6W zO02?CA6cj%3oe01FRsgEtX?kXS=8kTSa7)-2l=C>_O`aW#l=Rh%8jGc>y!oMyb`%Q z)BijziIo-F|0RRf9^q-DQ%7YL>d}_Z+^5q-vA4eAOii!|(f9A1VGhmn6Tpy90V{lSUUOAYGG)F&b@|!|tXcZo8vQt4T5Eeq?0@ zBQ*8<*df)8i37GDA#()cSP1LG72@XpukrJm>hHj&Lcpgd`WI3fsV5VY>5Ud4kxViO zD5-~Pe6qSRMlvt_Y>eZmqFxbEOevy@c!noqgO#(#*$3=fC8M+{tCiC#rK(?bPxVr@ zqi$5+P{-9D)!UjnO}l1Lv#IrHr?_mclAGdU+?LL-d#>BnNAIevtX@|y-Q6dKMN zB8GXRXdE-n8-EDd!nE+sbiuTk>Cf!XjAni|*UHUK^E30Rc_-^(c7FC+PHE1ps1sx2 ro@LImm0Own&g!;ySjVg}>z?h7ZPo6yhwV#_YmUX#UE>QQ&ArqgYm>#< delta 487 zcmcbxi1EpMMv-!VH#Y`G1|aZ%!oUrtXG|2at$(*)Iz6$tfPsPW3{a2*iUrbhD${^s zR~Q&PctDsr>1ldKYGMilgXaUF8Z!_U|H)*W0Tg6l@R9)XRX~{ClzDGPZb=1D%!Yx1 z2`I*-BF@fnIwwCFsLm$=Xr>4Vb6d#jfbn#Od3lMssX(zQK#h7J ztoVHPn}Ymepc?-p6aUO+)S5hlQJz^}G;#AT#@&LOuZk3#$@x{hGL7fA`O3h}0yKt! z;Z}A~FO2^GZ*rQqy!gNW|5+Fz{s$|85S^3fcpuuF=5vU#p5qzEA5IC*IxYjQ2(Bqy z54fecL%55$d$?cl#PICnxxvf9>%cpU_Z*)DpBkSH-!#58e24f=`0Mze3FHWL2s{%M z5;PN>AjBl(BJ@YtMR=9)Dd9gNCL#eMH6klSE{OaS%@e&P`cKSFEJy5xxRdxM2{wrd z68j|nNa{#NNR~-je~}WCa*%o?T_qzU( * + * { - margin-top: $interiorMargin; - } - - &__header { - flex: 0 0 auto; - } - - &__image { - flex: 1 1 auto; + &__nav { + flex: 0 0 auto; + * { + overflow: hidden; } } - > [class*="__"] + [class*="__"] { + .c-sidebar { + background: $sideBarBg; + .c-sidebar__pane { + flex-basis: 50%; + } + } + + body.mobile & { + .c-list-button, + &-snapshot-menubutton { + display: none; + } + } + + /****************************** CONTENT */ + &__contents { + width: 70%; + } + + &__page-view { + // Holds __header, __drag-area and __entries + display: flex; + flex: 1 1 auto; + flex-direction: column; + width: 100%; + > * { + flex: 0 0 auto; + + * { + margin-top: $interiorMargin; + } + } + } + + > * + * { margin-top: $interiorMargin; } @@ -111,17 +138,93 @@ } } + /***** PAGE VIEW */ + &__page-view { + &__header { + display: flex; + flex-wrap: wrap; // Allows wrapping in mobile portrait and narrow placements + line-height: 220%; + > * { + flex: 0 0 auto; + } + } + + &__path { + flex: 1 1 auto; + margin: 0 $interiorMargin; + overflow: hidden; + white-space: nowrap; + font-size: $headerFontSize; + > * { + // Section + flex: 0 0 auto; + + * { + // Page + display: inline; + flex: 1 1 auto; + @include ellipsize(); + } + } + } + } + &__entries { flex-direction: column; flex: 1 1 auto; - padding-right: $interiorMarginSm; overflow-x: hidden; overflow-y: scroll; + @include desktop() { + padding-right: $interiorMarginSm; // Scrollbar kickoff + } + [class*="__entry"] + [class*="__entry"] { margin-top: $interiorMarginSm; } + } + /***** SEARCH RESULTS */ + &__search-results { + display: flex; + flex: 1 1 auto; + flex-direction: column; + + > * + * { + margin-top: 5px; + } + + &__header { + font-size: $headerFontSize; + flex: 0 0 auto; + } + + .c-notebook__entries { + flex: 1 1 auto; + } + + .c-ne { + flex-direction: column; + + > * + * { + margin-top: $interiorMargin; + } + } + } +} + +.is-notebook-default { + &:after { + color: $colorFilter; + content: $glyph-icon-notebook-page; + display: block; + font-family: symbolsfont; + font-size: 0.9em; + margin-left: $interiorMargin; + } + + &.c-list__item:after { + flex: 1 0 auto; + text-align: right; } } @@ -183,10 +286,29 @@ } &__embeds { - flex-wrap: wrap; + //flex-wrap: wrap; > [class*="__embed"] { - margin: 0 $interiorMarginSm $interiorMarginSm 0; + //margin: 0 $interiorMarginSm $interiorMarginSm 0; + } + } + + &__section-and-page { + // Shown when c-ne within search results + background: rgba($colorBodyFg, 0.1); //$colorInteriorBorder; + border-radius: $controlCr; + display: inline-flex; + align-items: center; + align-self: flex-start; + padding: $interiorMargin; + + > * + * { + margin-left: $interiorMargin; + } + + [class*='icon'] { + font-size: 0.8em; + opacity: 0.7; } } } @@ -194,7 +316,7 @@ /****************************** EMBEDS */ @mixin snapThumb() { // LEGACY: TODO: refactor when .snap-thumb in New Entry dialog is refactored - $d: 50px; + $d: 30px; border: 1px solid $colorInteriorBorder; cursor: pointer; width: $d; @@ -269,6 +391,64 @@ .l-sticky-headers .l-tabular-body { overflow: auto; } } +.c-notebook-snapshot { + flex: 1 1 auto; + display: flex; + flex-direction: column; + + > * + * { + margin-top: $interiorMargin; + } + + &__header { + flex: 0 0 auto; + } + + &__image { + background-size: contain; + background-repeat: no-repeat; + background-position: center center; + flex: 1 1 auto; + } +} + +/****************************** SNAPSHOT CONTAINER */ +.c-snapshots-h { + // Is hidden when the parent div l-shell__drawer is collapsed, so no worries about padding, etc. + display: flex; + flex-direction: column; + overflow: hidden; + padding: $interiorMarginLg; + + > * { + flex: 1 1 auto; + &:first-child { + flex: 0 0 auto; + } + } + + > * + * { + margin-top: $interiorMargin; + } +} + +.c-snapshots { + flex-wrap: wrap; + overflow: auto; + + .c-snapshot { + margin: 0 $interiorMarginSm $interiorMarginSm 0; + } + + .hint { + font-size: 1.25em; + font-style: italic; + opacity: 0.7; + padding: $interiorMarginLg; + text-align: center; + } +} + /****************************** PAINTERRO OVERRIDES */ .annotation-dialog .abs.editor { border-radius: 0; @@ -401,7 +581,8 @@ body.mobile { &.phone.portrait { .c-notebook__head, - .c-notebook__entry { + .c-notebook__entry, + .c-ne__time-and-content { flex-direction: column; > [class*="__"] + [class*="__"] { @@ -413,9 +594,14 @@ body.mobile { .c-notebook__entry { [class*="text"] { min-height: 0; - padding: 0; pointer-events: none; } } } } + +/****************************** INDICATOR */ +.c-indicator.has-new-snapshot { + $c: $colorOk; + @include pulseProp($animName: flashSnapshot, $dur: 500ms, $iter: infinite, $prop: background, $valStart: rgba($c, 0.4), $valEnd: rgba($c, 0)); +} diff --git a/src/styles/vue-styles.scss b/src/styles/vue-styles.scss index 4a9611bd32..935bb212ad 100644 --- a/src/styles/vue-styles.scss +++ b/src/styles/vue-styles.scss @@ -43,3 +43,4 @@ @import "../ui/preview/preview.scss"; @import "../ui/toolbar/components/toolbar-checkbox.scss"; @import "./notebook.scss"; +@import "../plugins/notebook/components/sidebar.scss"; diff --git a/src/ui/components/ObjectFrame.vue b/src/ui/components/ObjectFrame.vue index 7c4754ffdc..3dcde35fa5 100644 --- a/src/ui/components/ObjectFrame.vue +++ b/src/ui/components/ObjectFrame.vue @@ -29,7 +29,7 @@ >
    {{ domainObject && domainObject.name }} @@ -98,6 +98,16 @@ export default { complexContent } }, + computed: { + classList() { + const classList = this.domainObject.classList; + if (!classList || !classList.length) { + return ''; + } + + return classList.join(' '); + } + }, methods: { expand() { let objectView = this.$refs.objectView, diff --git a/src/ui/components/ObjectLabel.vue b/src/ui/components/ObjectLabel.vue index 5ed603facc..0c167a7d8c 100644 --- a/src/ui/components/ObjectLabel.vue +++ b/src/ui/components/ObjectLabel.vue @@ -1,6 +1,7 @@