openmct/platform/commonUI/general/bundle.js

530 lines
19 KiB
JavaScript
Raw Normal View History

2016-01-15 01:08:19 +00:00
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government
2016-01-15 01:08:19 +00:00
* 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
2016-01-15 01:08:19 +00:00
* "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
2016-01-15 01:08:19 +00:00
* 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([
"./src/services/UrlService",
"./src/services/PopupService",
"./src/SplashScreenManager",
2016-01-15 01:08:19 +00:00
"./src/StyleSheetLoader",
"./src/controllers/TimeRangeController",
"./src/controllers/DateTimePickerController",
"./src/controllers/DateTimeFieldController",
"./src/controllers/TreeNodeController",
"./src/controllers/ActionGroupController",
"./src/controllers/ToggleController",
"./src/controllers/ClickAwayController",
"./src/controllers/ViewSwitcherController",
"./src/controllers/GetterSetterController",
"./src/controllers/SelectorController",
"./src/controllers/ObjectInspectorController",
"./src/controllers/BannerController",
"./src/directives/MCTContainer",
"./src/directives/MCTDrag",
[Layout] Support sub-object selection in layout (#1811) Updates to sub object selection, first cut of selection APIs. * [API] Add inspector view registry to register inspector view providers and show a view in the inspector. [API] Modify the selection API to register the click event and handle the event. The API will add a class to the selected object and the immediate parent of the selected object. [Directive] Implemenet mct-selectable directive for making an element selectable. [Layout] Update the layout controller to use the Selection API. Also, add double click gesture to allow drilling into a selected object. Populate the Elements pool with contained elements of the selected object. Update toolbar and inspector to listen for the changes in selection. * [Frontend] Mods to markup and CSS for sub-object selection * MCTSelectable allows selection in initialization, use to select on navigation [Frontend] Show grid in first nested layout, hide from deeper nesting. Only show grids when applicable to relative selection. * Fix checkstyle and lint errors * Bring back the change that made mct-init-select work * [Inspector] Make sure the right content is displayed based on whether a view provider exists or not. * Only show table options when editing * Make reviewers' requested changes * Fix broken tests * [Frontend] Cleanups and tweaks Fixes #1811 - Cleanups between frame, editor and selecting.scss; - Hover and selected borders visually pumped up a bit; - Solid borders on hover and selecting when browsing; - Dashed borders for layouts when editing; - Fixed cursor to only show move capability when element is selected; * [Frontend] Tweaks to frame.no-frame layout Fixes #1811 - Margin set to 0; - Overflow set to hidden; * [Frontend] Fixed position items border width fixed Fixes #1811 - Set to 1px; * Add tests for inspector controller and fix broken tests. Clean up code. * [Fixed Position] Stop event propagation on click handlers in fixed position to avoid the event reaching the selection click handlers which caused issues with toolbar and selection." * Fix tests * Add tests * Add test * Remove element from document
2017-12-07 21:04:46 +00:00
"./src/directives/MCTSelectable",
2016-01-15 01:08:19 +00:00
"./src/directives/MCTClickElsewhere",
"./src/directives/MCTResize",
"./src/directives/MCTPopup",
"./src/directives/MCTScroll",
"./src/directives/MCTSplitPane",
"./src/directives/MCTSplitter",
"./src/directives/MCTTree",
Indicators api (#1837) * [API] Added Indicators API * [Indicators] Converted Follow Indicator to new Indicators API * [Indicators] Converted URL Indicator to new Indicators API * [Indicators] Changes to some legacy indicators for compatibility with new Indicators API * [Indicators] Addressed code review items from https://github.com/nasa/openmct/pull/1837 * Updated tests for URL Indicator * Adding Indicator API spec * Address linting issues * Switched to direct DOM manipulation rather than template compilation to avoid an unnecessary extra holder element * Updated documentation to reflect changes to API * Indicators api styling (#2076) Updated styling for Indicators * Update API TOC * Fix color of items w-mct-example areas of Style Guide Fixes #1837 * Status class refactoring and cleanups Fixes #1837 - Significant cleanups and name refactoring to allow more concise selector definitions, with changes in js, html and scss files; - Updates in Style Guide > Status page, with some content reorganization and clarification; * Corrected out of date API * de-zeptoed Indicator API test spec * Remove promise from URLIndicator * Separated legacy indicators support * Updated Indicator specs to Jasmine 3 * Fixed checkstyle and lint issues * Moved legacy indicators support to adapter folder * Various fixes for Indicators Fixes #1837 - Added SASS constants for Indicator colors; - Removed commented code; - Removed unused indicator classes from _messages.scss - Fixed missing s-status-on class; * Significant revisions to Style Guide Indicators content Fixes #1837 - Better documentation including recommendations; - Better and more concrete examples; * Style Guide example tweaks Fixes #1837 * Refinement to Style Guide Status and Limits content Fixes #1837 - More detail and clarification on Status and Limits; * Cleanup code Fixes #1837 - Remove commented styles; - Line return refinements;
2018-07-16 22:21:38 +00:00
"./src/directives/MCTIndicators",
"./src/filters/ReverseFilter",
"./res/templates/bottombar.html",
"./res/templates/controls/action-button.html",
"./res/templates/controls/input-filter.html",
"./res/templates/angular-indicator.html",
"./res/templates/message-banner.html",
"./res/templates/progress-bar.html",
"./res/templates/controls/time-controller.html",
"./res/templates/containers/accordion.html",
"./res/templates/subtree.html",
"./res/templates/tree.html",
"./res/templates/tree-node.html",
"./res/templates/label.html",
"./res/templates/controls/action-group.html",
"./res/templates/controls/switcher.html",
"./res/templates/object-inspector.html",
"./res/templates/controls/selector.html",
"./res/templates/controls/datetime-picker.html",
"./res/templates/controls/datetime-field.html"
2016-01-15 01:08:19 +00:00
], function (
UrlService,
PopupService,
SplashScreenManager,
2016-01-15 01:08:19 +00:00
StyleSheetLoader,
TimeRangeController,
DateTimePickerController,
DateTimeFieldController,
TreeNodeController,
ActionGroupController,
ToggleController,
ClickAwayController,
ViewSwitcherController,
GetterSetterController,
SelectorController,
ObjectInspectorController,
BannerController,
MCTContainer,
MCTDrag,
[Layout] Support sub-object selection in layout (#1811) Updates to sub object selection, first cut of selection APIs. * [API] Add inspector view registry to register inspector view providers and show a view in the inspector. [API] Modify the selection API to register the click event and handle the event. The API will add a class to the selected object and the immediate parent of the selected object. [Directive] Implemenet mct-selectable directive for making an element selectable. [Layout] Update the layout controller to use the Selection API. Also, add double click gesture to allow drilling into a selected object. Populate the Elements pool with contained elements of the selected object. Update toolbar and inspector to listen for the changes in selection. * [Frontend] Mods to markup and CSS for sub-object selection * MCTSelectable allows selection in initialization, use to select on navigation [Frontend] Show grid in first nested layout, hide from deeper nesting. Only show grids when applicable to relative selection. * Fix checkstyle and lint errors * Bring back the change that made mct-init-select work * [Inspector] Make sure the right content is displayed based on whether a view provider exists or not. * Only show table options when editing * Make reviewers' requested changes * Fix broken tests * [Frontend] Cleanups and tweaks Fixes #1811 - Cleanups between frame, editor and selecting.scss; - Hover and selected borders visually pumped up a bit; - Solid borders on hover and selecting when browsing; - Dashed borders for layouts when editing; - Fixed cursor to only show move capability when element is selected; * [Frontend] Tweaks to frame.no-frame layout Fixes #1811 - Margin set to 0; - Overflow set to hidden; * [Frontend] Fixed position items border width fixed Fixes #1811 - Set to 1px; * Add tests for inspector controller and fix broken tests. Clean up code. * [Fixed Position] Stop event propagation on click handlers in fixed position to avoid the event reaching the selection click handlers which caused issues with toolbar and selection." * Fix tests * Add tests * Add test * Remove element from document
2017-12-07 21:04:46 +00:00
MCTSelectable,
2016-01-15 01:08:19 +00:00
MCTClickElsewhere,
MCTResize,
MCTPopup,
MCTScroll,
MCTSplitPane,
MCTSplitter,
MCTTree,
Indicators api (#1837) * [API] Added Indicators API * [Indicators] Converted Follow Indicator to new Indicators API * [Indicators] Converted URL Indicator to new Indicators API * [Indicators] Changes to some legacy indicators for compatibility with new Indicators API * [Indicators] Addressed code review items from https://github.com/nasa/openmct/pull/1837 * Updated tests for URL Indicator * Adding Indicator API spec * Address linting issues * Switched to direct DOM manipulation rather than template compilation to avoid an unnecessary extra holder element * Updated documentation to reflect changes to API * Indicators api styling (#2076) Updated styling for Indicators * Update API TOC * Fix color of items w-mct-example areas of Style Guide Fixes #1837 * Status class refactoring and cleanups Fixes #1837 - Significant cleanups and name refactoring to allow more concise selector definitions, with changes in js, html and scss files; - Updates in Style Guide > Status page, with some content reorganization and clarification; * Corrected out of date API * de-zeptoed Indicator API test spec * Remove promise from URLIndicator * Separated legacy indicators support * Updated Indicator specs to Jasmine 3 * Fixed checkstyle and lint issues * Moved legacy indicators support to adapter folder * Various fixes for Indicators Fixes #1837 - Added SASS constants for Indicator colors; - Removed commented code; - Removed unused indicator classes from _messages.scss - Fixed missing s-status-on class; * Significant revisions to Style Guide Indicators content Fixes #1837 - Better documentation including recommendations; - Better and more concrete examples; * Style Guide example tweaks Fixes #1837 * Refinement to Style Guide Status and Limits content Fixes #1837 - More detail and clarification on Status and Limits; * Cleanup code Fixes #1837 - Remove commented styles; - Line return refinements;
2018-07-16 22:21:38 +00:00
MCTIndicators,
ReverseFilter,
bottombarTemplate,
actionButtonTemplate,
inputFilterTemplate,
indicatorTemplate,
messageBannerTemplate,
progressBarTemplate,
timeControllerTemplate,
accordionTemplate,
subtreeTemplate,
treeTemplate,
treeNodeTemplate,
labelTemplate,
actionGroupTemplate,
switcherTemplate,
objectInspectorTemplate,
selectorTemplate,
datetimePickerTemplate,
datetimeFieldTemplate
2016-01-15 01:08:19 +00:00
) {
return {
name:"platform/commonUI/general",
definition: {
"name": "General UI elements",
"description": "General UI elements, meant to be reused across modes",
"resources": "res",
"extensions": {
"services": [
{
"key": "urlService",
"implementation": UrlService,
"depends": [
"$location"
]
},
{
"key": "popupService",
"implementation": PopupService,
"depends": [
"$document",
"$window"
]
}
],
"runs": [
{
"implementation": StyleSheetLoader,
"depends": [
"stylesheets[]",
"$document",
"THEME",
"ASSETS_PATH"
]
},
{
"implementation": SplashScreenManager,
"depends": [
"$document"
]
}
],
"filters": [
{
"implementation": ReverseFilter,
"key": "reverse"
}
],
"templates": [
{
"key": "bottombar",
"template": bottombarTemplate
},
{
"key": "action-button",
"template": actionButtonTemplate
},
{
"key": "input-filter",
"template": inputFilterTemplate
},
{
"key": "indicator",
"template": indicatorTemplate
},
{
"key": "message-banner",
"template": messageBannerTemplate
},
{
"key": "progress-bar",
"template": progressBarTemplate
},
{
"key": "time-controller",
"template": timeControllerTemplate
}
],
"controllers": [
{
"key": "TimeRangeController",
"implementation": TimeRangeController,
"depends": [
"$scope",
"$timeout",
"formatService",
"DEFAULT_TIME_FORMAT",
"now"
]
},
{
"key": "DateTimePickerController",
"implementation": DateTimePickerController,
"depends": [
"$scope",
"now"
]
},
{
"key": "DateTimeFieldController",
"implementation": DateTimeFieldController,
"depends": [
"$scope",
"formatService",
"DEFAULT_TIME_FORMAT"
]
},
{
"key": "TreeNodeController",
"implementation": TreeNodeController,
"depends": [
"$scope",
"$timeout",
"navigationService"
]
},
{
"key": "ActionGroupController",
"implementation": ActionGroupController,
"depends": [
"$scope"
]
},
{
"key": "ToggleController",
"implementation": ToggleController
},
{
"key": "ClickAwayController",
"implementation": ClickAwayController,
"depends": [
"$document",
"$timeout"
]
},
{
"key": "ViewSwitcherController",
"implementation": ViewSwitcherController,
"depends": [
"$scope",
"$timeout"
]
},
{
"key": "GetterSetterController",
"implementation": GetterSetterController,
"depends": [
"$scope"
]
},
{
"key": "SelectorController",
"implementation": SelectorController,
"depends": [
"objectService",
"$scope"
]
},
{
"key": "ObjectInspectorController",
"implementation": ObjectInspectorController,
"depends": [
"$scope",
"objectService"
]
},
{
"key": "BannerController",
"implementation": BannerController,
"depends": [
"$scope",
"notificationService",
"dialogService"
]
}
],
"directives": [
{
"key": "mctContainer",
"implementation": MCTContainer,
"depends": [
"containers[]"
]
},
{
"key": "mctDrag",
"implementation": MCTDrag,
"depends": [
"$document",
"agentService"
]
},
{
"key": "mctSelectable",
"implementation": MCTSelectable,
"depends": [
"openmct"
]
},
{
"key": "mctClickElsewhere",
"implementation": MCTClickElsewhere,
"depends": [
"$document"
]
},
{
"key": "mctResize",
"implementation": MCTResize,
"depends": [
"$timeout"
]
},
{
"key": "mctPopup",
"implementation": MCTPopup,
"depends": [
"$compile",
"popupService"
]
},
{
"key": "mctScrollX",
"implementation": MCTScroll,
"depends": [
"$parse",
"MCT_SCROLL_X_PROPERTY",
"MCT_SCROLL_X_ATTRIBUTE"
]
},
{
"key": "mctScrollY",
"implementation": MCTScroll,
"depends": [
"$parse",
"MCT_SCROLL_Y_PROPERTY",
"MCT_SCROLL_Y_ATTRIBUTE"
]
},
{
"key": "mctSplitPane",
"implementation": MCTSplitPane,
"depends": [
"$parse",
"$log",
"$interval",
"$window"
]
},
{
"key": "mctSplitter",
"implementation": MCTSplitter
},
{
"key": "mctTree",
"implementation": MCTTree,
"depends": ['gestureService', 'openmct']
},
{
"key": "mctIndicators",
"implementation": MCTIndicators,
"depends": ['openmct']
}
],
"constants": [
{
"key": "MCT_SCROLL_X_PROPERTY",
"value": "scrollLeft"
},
{
"key": "MCT_SCROLL_X_ATTRIBUTE",
"value": "mctScrollX"
},
{
"key": "MCT_SCROLL_Y_PROPERTY",
"value": "scrollTop"
},
{
"key": "MCT_SCROLL_Y_ATTRIBUTE",
"value": "mctScrollY"
},
{
"key": "THEME",
"value": "unspecified",
"priority": "fallback"
},
{
"key": "ASSETS_PATH",
"value": ".",
"priority": "fallback"
}
],
"containers": [
{
"key": "accordion",
"template": accordionTemplate,
"attributes": [
"label"
]
}
],
"representations": [
{
"key": "tree",
"template": subtreeTemplate,
"uses": [
"composition"
],
"type": "root",
"priority": "preferred"
},
{
"key": "tree",
"template": treeTemplate
},
{
"key": "subtree",
"template": subtreeTemplate,
"uses": [
"composition"
]
},
{
"key": "tree-node",
"template": treeNodeTemplate,
"uses": [
"action"
]
},
{
"key": "label",
"template": labelTemplate,
"uses": [
"type",
"location"
],
"gestures": [
"drag",
"menu",
"info"
]
},
{
"key": "node",
"template": labelTemplate,
"uses": [
"type"
],
"gestures": [
"drag",
"menu"
]
},
{
"key": "action-group",
"template": actionGroupTemplate,
"uses": [
"action"
]
},
{
"key": "switcher",
"template": switcherTemplate,
"uses": [
"view"
]
},
{
"key": "object-inspector",
"template": objectInspectorTemplate
}
],
"controls": [
{
"key": "selector",
"template": selectorTemplate
},
{
"key": "datetime-picker",
"template": datetimePickerTemplate
},
{
"key": "datetime-field",
"template": datetimeFieldTemplate
}
],
"licenses": [
{
"name": "Normalize.css",
"version": "1.1.2",
"description": "Browser style normalization",
"author": "Nicolas Gallagher, Jonathan Neal",
"website": "http://necolas.github.io/normalize.css/",
"copyright": "Copyright (c) Nicolas Gallagher and Jonathan Neal",
"license": "license-mit",
"link": "https://github.com/necolas/normalize.css/blob/v1.1.2/LICENSE.md"
},
{
"name": "Zepto",
"version": "1.1.6",
"description": "DOM manipulation",
"author": "Thomas Fuchs",
"website": "http://zeptojs.com/",
"copyright": "Copyright (c) 2010-2016 Thomas Fuchs",
"license": "license-mit",
"link": "https://github.com/madrobby/zepto/blob/master/MIT-LICENSE"
}
]
}
2016-01-15 01:08:19 +00:00
}
};
2016-01-15 01:08:19 +00:00
});