neo.mjs 6.17.2 → 6.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/ServiceWorker.mjs +3 -5
- package/apps/colors/README.md +8 -0
- package/apps/colors/app.mjs +6 -0
- package/apps/colors/childapps/widget/app.mjs +7 -0
- package/apps/colors/childapps/widget/index.html +11 -0
- package/apps/colors/childapps/widget/neo-config.json +10 -0
- package/apps/colors/childapps/widget/view/Viewport.mjs +19 -0
- package/apps/colors/index.html +11 -0
- package/apps/colors/model/Color.mjs +43 -0
- package/apps/colors/neo-config.json +10 -0
- package/apps/colors/remotes-api.json +13 -0
- package/apps/colors/store/Colors.mjs +24 -0
- package/apps/colors/view/BarChartComponent.mjs +64 -0
- package/apps/colors/view/HeaderToolbar.mjs +95 -0
- package/apps/colors/view/PieChartComponent.mjs +58 -0
- package/apps/colors/view/TableContainer.mjs +91 -0
- package/apps/colors/view/Viewport.mjs +57 -0
- package/apps/colors/view/ViewportController.mjs +277 -0
- package/apps/colors/view/ViewportModel.mjs +53 -0
- package/apps/portal/Util.mjs +11 -0
- package/apps/portal/childapps/preview/neo-config.json +2 -2
- package/apps/portal/neo-config.json +2 -1
- package/apps/portal/remotes-api.json +13 -0
- package/apps/portal/view/HeaderToolbar.mjs +1 -1
- package/apps/portal/view/ViewportController.mjs +89 -1
- package/apps/portal/view/home/MainContainer.mjs +5 -6
- package/apps/portal/view/home/parts/AfterMath.mjs +1 -1
- package/apps/portal/view/home/parts/{CoolStuff.mjs → Colors.mjs} +20 -28
- package/apps/portal/view/home/parts/Helix.mjs +75 -0
- package/apps/portal/view/learn/LivePreview.mjs +56 -15
- package/apps/portal/view/learn/MainContainerController.mjs +10 -90
- package/apps/realworld/api/Article.mjs +1 -3
- package/apps/realworld/api/Favorite.mjs +1 -3
- package/apps/realworld/api/Profile.mjs +1 -3
- package/apps/realworld/api/Tag.mjs +1 -3
- package/apps/realworld/api/User.mjs +1 -3
- package/apps/realworld2/api/Article.mjs +1 -3
- package/apps/realworld2/api/Favorite.mjs +1 -3
- package/apps/realworld2/api/Profile.mjs +1 -3
- package/apps/realworld2/api/Tag.mjs +1 -3
- package/apps/realworld2/api/User.mjs +1 -3
- package/apps/realworld2/view/article/HelixContainer.mjs +5 -5
- package/buildScripts/webpack/json/myApps.template.json +1 -0
- package/docs/app/view/MainContainer.mjs +5 -0
- package/docs/app/view/classdetails/MembersList.mjs +1 -1
- package/examples/ServiceWorker.mjs +3 -5
- package/examples/component/helix/Viewport.mjs +309 -0
- package/examples/component/helix/ViewportController.mjs +122 -0
- package/examples/component/helix/app.mjs +2 -2
- package/examples/component/helix/neo-config.json +0 -1
- package/examples/component/multiWindowHelix/Viewport.mjs +11 -3
- package/examples/component/multiWindowHelix/ViewportController.mjs +21 -9
- package/examples/component/multiWindowHelix/neo-config.json +0 -1
- package/examples/fieldWithPrefix/MainContainer.mjs +1 -6
- package/examples/list/animate/MainContainerController.mjs +1 -1
- package/examples/worker/task/MyTasks.mjs +1 -3
- package/package.json +2 -2
- package/resources/data/deck/learnneo/pages/GuideEvents.md +131 -0
- package/resources/data/deck/learnneo/pages/WhyNeo-Speed.md +1 -1
- package/resources/images/logo/neo_logo_primary.svg +6 -0
- package/resources/images/logo/neo_logo_text_primary.svg +5 -0
- package/resources/scss/src/apps/colors/BarChartComponent.scss +3 -0
- package/resources/scss/src/apps/colors/HeaderToolbar.scss +11 -0
- package/resources/scss/src/apps/colors/PieChartComponent.scss +3 -0
- package/resources/scss/src/apps/colors/TableContainer.scss +64 -0
- package/resources/scss/src/apps/colors/Viewport.scss +9 -0
- package/resources/scss/src/apps/portal/HeaderToolbar.scss +1 -1
- package/resources/scss/src/apps/portal/home/MainContainer.scss +1 -1
- package/resources/scss/src/apps/portal/home/preview/PageCodeContainer.scss +1 -1
- package/resources/scss/src/examples/component/multiWindowHelix/Viewport.scss +3 -0
- package/resources/scss/src/form/field/CheckBox.scss +1 -0
- package/resources/scss/src/tab/header/Button.scss +2 -1
- package/resources/scss/theme-dark/Global.scss +8 -0
- package/resources/scss/theme-dark/button/Base.scss +1 -1
- package/resources/scss/theme-dark/tab/header/Button.scss +1 -0
- package/resources/scss/theme-light/Global.scss +8 -0
- package/resources/scss/theme-light/button/Base.scss +1 -1
- package/resources/scss/theme-light/tab/header/Button.scss +1 -0
- package/resources/scss/theme-neo-light/Global.scss +53 -53
- package/resources/scss/theme-neo-light/button/Base.scss +3 -4
- package/resources/scss/theme-neo-light/tab/header/Button.scss +6 -8
- package/src/DefaultConfig.mjs +2 -2
- package/src/Fetch.mjs +1 -3
- package/src/Main.mjs +13 -11
- package/src/MicroLoader.mjs +2 -2
- package/src/Neo.mjs +27 -26
- package/src/Xhr.mjs +1 -3
- package/src/button/Base.mjs +6 -4
- package/src/button/Split.mjs +10 -9
- package/src/calendar/view/EditEventContainer.mjs +13 -12
- package/src/calendar/view/MainContainer.mjs +40 -40
- package/src/calendar/view/MainContainerModel.mjs +5 -5
- package/src/calendar/view/SettingsContainer.mjs +11 -11
- package/src/calendar/view/YearComponent.mjs +73 -75
- package/src/calendar/view/calendars/ColorsList.mjs +2 -2
- package/src/calendar/view/calendars/EditContainer.mjs +2 -2
- package/src/calendar/view/calendars/List.mjs +12 -13
- package/src/calendar/view/month/Component.mjs +72 -73
- package/src/calendar/view/settings/GeneralContainer.mjs +5 -5
- package/src/calendar/view/settings/MonthContainer.mjs +5 -5
- package/src/calendar/view/settings/WeekContainer.mjs +6 -6
- package/src/calendar/view/settings/YearContainer.mjs +4 -4
- package/src/calendar/view/week/Component.mjs +47 -57
- package/src/calendar/view/week/EventDragZone.mjs +43 -50
- package/src/calendar/view/week/TimeAxisComponent.mjs +21 -21
- package/src/calendar/view/week/plugin/DragDrop.mjs +53 -45
- package/src/calendar/view/week/plugin/EventResizable.mjs +8 -3
- package/src/collection/Base.mjs +15 -22
- package/src/collection/Filter.mjs +4 -9
- package/src/collection/Sorter.mjs +6 -7
- package/src/component/Base.mjs +25 -31
- package/src/component/Canvas.mjs +9 -9
- package/src/component/Carousel.mjs +31 -33
- package/src/component/Chip.mjs +9 -9
- package/src/component/Circle.mjs +84 -91
- package/src/component/Clock.mjs +8 -8
- package/src/component/DateSelector.mjs +14 -15
- package/src/component/Gallery.mjs +82 -80
- package/src/component/Helix.mjs +131 -126
- package/src/component/Iframe.mjs +1 -1
- package/src/component/Label.mjs +1 -1
- package/src/component/Legend.mjs +3 -3
- package/src/component/Process.mjs +39 -37
- package/src/component/Splitter.mjs +9 -11
- package/src/component/StatusBadge.mjs +2 -3
- package/src/component/Timer.mjs +62 -68
- package/src/component/Toast.mjs +11 -11
- package/src/component/Video.mjs +7 -8
- package/src/component/mwc/Button.mjs +10 -10
- package/src/component/mwc/TextField.mjs +17 -17
- package/src/component/wrapper/AmChart.mjs +5 -5
- package/src/component/wrapper/CesiumJS.mjs +11 -17
- package/src/component/wrapper/GoogleMaps.mjs +58 -35
- package/src/component/wrapper/MapboxGL.mjs +112 -79
- package/src/container/Accordion.mjs +18 -20
- package/src/container/AccordionItem.mjs +12 -11
- package/src/container/Base.mjs +24 -23
- package/src/container/Panel.mjs +9 -9
- package/src/controller/Base.mjs +12 -14
- package/src/controller/Component.mjs +60 -66
- package/src/core/Base.mjs +5 -8
- package/src/core/IdGenerator.mjs +1 -3
- package/src/core/Observable.mjs +17 -17
- package/src/core/Util.mjs +5 -5
- package/src/data/Model.mjs +3 -3
- package/src/data/RecordFactory.mjs +3 -6
- package/src/data/Store.mjs +34 -34
- package/src/data/connection/Fetch.mjs +3 -3
- package/src/data/connection/WebSocket.mjs +21 -25
- package/src/data/connection/Xhr.mjs +31 -28
- package/src/date/DayViewComponent.mjs +1 -1
- package/src/date/SelectorContainer.mjs +2 -2
- package/src/dialog/Base.mjs +27 -25
- package/src/dialog/header/Toolbar.mjs +5 -4
- package/src/draggable/DragProxyComponent.mjs +7 -4
- package/src/draggable/DragZone.mjs +30 -30
- package/src/draggable/DropZone.mjs +7 -7
- package/src/draggable/list/DragZone.mjs +18 -18
- package/src/draggable/tab/header/toolbar/SortZone.mjs +7 -7
- package/src/draggable/toolbar/DragZone.mjs +15 -15
- package/src/draggable/toolbar/SortZone.mjs +30 -31
- package/src/draggable/tree/DragZone.mjs +9 -9
- package/src/filter/BooleanContainer.mjs +3 -3
- package/src/filter/NumberContainer.mjs +5 -5
- package/src/filter/ToggleOperatorsButton.mjs +5 -5
- package/src/form/Fieldset.mjs +26 -26
- package/src/form/field/Base.mjs +1 -1
- package/src/form/field/CheckBox.mjs +15 -16
- package/src/form/field/Color.mjs +13 -15
- package/src/form/field/ComboBox.mjs +16 -24
- package/src/form/field/Country.mjs +1 -1
- package/src/form/field/Date.mjs +3 -4
- package/src/form/field/Display.mjs +1 -1
- package/src/form/field/Email.mjs +2 -2
- package/src/form/field/Number.mjs +51 -56
- package/src/form/field/Picker.mjs +2 -2
- package/src/form/field/Radio.mjs +1 -1
- package/src/form/field/Range.mjs +7 -6
- package/src/form/field/Text.mjs +29 -36
- package/src/form/field/TextArea.mjs +9 -9
- package/src/form/field/Time.mjs +30 -30
- package/src/form/field/trigger/Base.mjs +19 -13
- package/src/form/field/trigger/Clear.mjs +13 -13
- package/src/form/field/trigger/CopyToClipboard.mjs +7 -7
- package/src/form/field/trigger/Picker.mjs +2 -2
- package/src/form/field/trigger/SpinDown.mjs +1 -1
- package/src/form/field/trigger/SpinUp.mjs +1 -1
- package/src/form/field/trigger/SpinUpDown.mjs +3 -3
- package/src/form/field/trigger/Time.mjs +3 -3
- package/src/grid/Container.mjs +33 -33
- package/src/grid/View.mjs +20 -22
- package/src/grid/header/Button.mjs +12 -12
- package/src/grid/header/Toolbar.mjs +4 -4
- package/src/layout/Base.mjs +5 -4
- package/src/layout/Card.mjs +15 -16
- package/src/layout/Fit.mjs +22 -8
- package/src/layout/Flexbox.mjs +30 -29
- package/src/layout/Form.mjs +15 -15
- package/src/layout/Grid.mjs +2 -2
- package/src/layout/HBox.mjs +3 -2
- package/src/layout/VBox.mjs +3 -2
- package/src/list/Base.mjs +45 -47
- package/src/list/Chip.mjs +4 -4
- package/src/list/Circle.mjs +3 -3
- package/src/list/Color.mjs +4 -4
- package/src/list/Component.mjs +10 -10
- package/src/list/plugin/Animate.mjs +18 -13
- package/src/main/DomAccess.mjs +92 -56
- package/src/main/DomEvents.mjs +38 -39
- package/src/main/addon/AmCharts.mjs +37 -37
- package/src/main/addon/AnalyticsByGoogle.mjs +4 -4
- package/src/main/addon/CesiumJS.mjs +8 -8
- package/src/main/addon/CloneNode.mjs +5 -5
- package/src/main/addon/Cookie.mjs +4 -4
- package/src/main/addon/DragDrop.mjs +35 -34
- package/src/main/addon/GoogleMaps.mjs +19 -19
- package/src/main/addon/LocalStorage.mjs +3 -3
- package/src/main/addon/MapboxGL.mjs +40 -41
- package/src/main/addon/MonacoEditor.mjs +5 -5
- package/src/main/addon/Mwc.mjs +6 -6
- package/src/main/addon/Navigator.mjs +35 -39
- package/src/main/addon/Popover.mjs +5 -6
- package/src/main/addon/PrefixField.mjs +1 -2
- package/src/main/addon/ServiceWorker.mjs +9 -9
- package/src/main/addon/Siesta.mjs +3 -2
- package/src/main/addon/Stylesheet.mjs +37 -37
- package/src/main/addon/WebComponent.mjs +2 -3
- package/src/main/addon/WindowPosition.mjs +18 -18
- package/src/main/draggable/sensor/Base.mjs +2 -2
- package/src/main/draggable/sensor/Mouse.mjs +15 -15
- package/src/main/draggable/sensor/Touch.mjs +24 -23
- package/src/main/mixin/DeltaUpdates.mjs +10 -12
- package/src/main/mixin/TouchDomEvents.mjs +6 -6
- package/src/manager/Base.mjs +4 -4
- package/src/manager/Component.mjs +41 -41
- package/src/manager/DomEvent.mjs +41 -44
- package/src/manager/Focus.mjs +14 -16
- package/src/manager/Instance.mjs +2 -4
- package/src/manager/Store.mjs +4 -8
- package/src/manager/Task.mjs +20 -22
- package/src/manager/Toast.mjs +14 -16
- package/src/manager/rpc/Api.mjs +1 -3
- package/src/manager/rpc/Message.mjs +16 -18
- package/src/menu/List.mjs +16 -16
- package/src/menu/Panel.mjs +4 -4
- package/src/model/Component.mjs +5 -5
- package/src/plugin/Base.mjs +2 -0
- package/src/plugin/Popover.mjs +1 -1
- package/src/plugin/PrefixField.mjs +35 -45
- package/src/plugin/Resizable.mjs +86 -101
- package/src/plugin/Responsive.mjs +1 -1
- package/src/remotes/Api.mjs +4 -6
- package/src/selection/CircleModel.mjs +12 -16
- package/src/selection/DateSelectorModel.mjs +21 -23
- package/src/selection/GalleryModel.mjs +49 -63
- package/src/selection/HelixModel.mjs +35 -41
- package/src/selection/ListModel.mjs +9 -14
- package/src/selection/Model.mjs +31 -31
- package/src/selection/TreeAccordionModel.mjs +74 -80
- package/src/selection/grid/CellColumnModel.mjs +10 -10
- package/src/selection/grid/CellColumnRowModel.mjs +10 -10
- package/src/selection/grid/CellModel.mjs +26 -28
- package/src/selection/grid/CellRowModel.mjs +24 -24
- package/src/selection/grid/ColumnModel.mjs +16 -20
- package/src/selection/grid/RowModel.mjs +27 -29
- package/src/selection/menu/ListModel.mjs +2 -2
- package/src/selection/table/CellColumnModel.mjs +12 -12
- package/src/selection/table/CellColumnRowModel.mjs +12 -12
- package/src/selection/table/CellModel.mjs +26 -29
- package/src/selection/table/CellRowModel.mjs +19 -19
- package/src/selection/table/ColumnModel.mjs +18 -22
- package/src/selection/table/RowModel.mjs +27 -29
- package/src/sitemap/Component.mjs +20 -20
- package/src/sitemap/Store.mjs +1 -1
- package/src/tab/Container.mjs +15 -15
- package/src/tab/Strip.mjs +1 -1
- package/src/tab/header/Toolbar.mjs +4 -4
- package/src/table/Container.mjs +8 -10
- package/src/table/View.mjs +29 -34
- package/src/table/header/Button.mjs +18 -18
- package/src/table/header/Toolbar.mjs +2 -2
- package/src/toolbar/Base.mjs +14 -14
- package/src/toolbar/Breadcrumb.mjs +11 -11
- package/src/toolbar/Paging.mjs +18 -18
- package/src/tooltip/Base.mjs +20 -22
- package/src/tree/Accordion.mjs +69 -75
- package/src/tree/List.mjs +22 -25
- package/src/util/Array.mjs +19 -18
- package/src/util/ClassSystem.mjs +9 -9
- package/src/util/Css.mjs +2 -2
- package/src/util/Date.mjs +9 -9
- package/src/util/Function.mjs +2 -2
- package/src/util/HashHistory.mjs +3 -5
- package/src/util/KeyNavigation.mjs +17 -17
- package/src/util/Logger.mjs +9 -9
- package/src/util/Matrix.mjs +19 -19
- package/src/util/String.mjs +9 -9
- package/src/util/Style.mjs +11 -11
- package/src/util/VDom.mjs +12 -14
- package/src/util/VNode.mjs +29 -29
- package/src/vdom/Helper.mjs +84 -93
- package/src/vdom/VNode.mjs +1 -1
- package/src/worker/App.mjs +19 -16
- package/src/worker/Base.mjs +14 -15
- package/src/worker/Canvas.mjs +1 -3
- package/src/worker/Data.mjs +4 -8
- package/src/worker/Manager.mjs +27 -32
- package/src/worker/Message.mjs +1 -1
- package/src/worker/ServiceBase.mjs +38 -42
- package/src/worker/Task.mjs +1 -3
- package/src/worker/VDom.mjs +2 -4
- package/src/worker/mixin/RemoteMethodAccess.mjs +5 -6
- package/examples/component/helix/MainContainer.mjs +0 -340
- /package/resources/images/{Neo_Logo_Blue.svg → logo/neo_logo_secondary.svg} +0 -0
- /package/resources/images/{Neo_Logo_Text.svg → logo/neo_logo_text_secondary.svg} +0 -0
- /package/resources/images/{Neo_Logo_White.svg → logo/neo_logo_white.svg} +0 -0
@@ -0,0 +1,309 @@
|
|
1
|
+
import BaseViewport from '../../../src/container/Viewport.mjs';
|
2
|
+
import CheckBox from '../../../src/form/field/CheckBox.mjs';
|
3
|
+
import Helix from '../../../src/component/Helix.mjs';
|
4
|
+
import ImageStore from './ImageStore.mjs';
|
5
|
+
import NumberField from '../../../src/form/field/Number.mjs';
|
6
|
+
import Panel from '../../../src/container/Panel.mjs';
|
7
|
+
import RangeField from '../../../src/form/field/Range.mjs';
|
8
|
+
import ViewportController from './ViewportController.mjs';
|
9
|
+
|
10
|
+
/**
|
11
|
+
* @class Neo.examples.component.helix.Viewport
|
12
|
+
* @extends Neo.container.Viewport
|
13
|
+
*/
|
14
|
+
class Viewport extends BaseViewport {
|
15
|
+
/**
|
16
|
+
* Internally storing the windowIds, into which this container got mounted
|
17
|
+
* @member {Number[]} windowIds=[]
|
18
|
+
* @protected
|
19
|
+
* @static
|
20
|
+
*/
|
21
|
+
static windowIds = []
|
22
|
+
|
23
|
+
static config = {
|
24
|
+
/**
|
25
|
+
* @member {String} className='Neo.examples.component.helix.ViewportController'
|
26
|
+
* @protected
|
27
|
+
*/
|
28
|
+
className: 'Neo.examples.component.helix.Viewport',
|
29
|
+
/**
|
30
|
+
* @member {Neo.controller.Component} controller=ViewportController
|
31
|
+
*/
|
32
|
+
controller: ViewportController,
|
33
|
+
/**
|
34
|
+
* @member {Neo.component.Helix|null} helix=null
|
35
|
+
*/
|
36
|
+
helix: null,
|
37
|
+
/**
|
38
|
+
* @member {Object|null} helixConfig=null
|
39
|
+
*/
|
40
|
+
helixConfig: null,
|
41
|
+
/**
|
42
|
+
* @member {Object|null} layout={ntype: 'hbox',align:'stretch'}
|
43
|
+
*/
|
44
|
+
layout: {ntype: 'hbox', align: 'stretch'},
|
45
|
+
/**
|
46
|
+
* @member {Boolean} showGitHubStarButton_=true
|
47
|
+
*/
|
48
|
+
showGitHubStarButton_: true,
|
49
|
+
/**
|
50
|
+
* @member {Object[]} items
|
51
|
+
*/
|
52
|
+
items: [{
|
53
|
+
ntype : 'container',
|
54
|
+
flex : 1,
|
55
|
+
layout: 'fit',
|
56
|
+
style : {position: 'relative'},
|
57
|
+
|
58
|
+
items: [{
|
59
|
+
ntype: 'component',
|
60
|
+
html : 'DeltaUpdates / s: <span id="neo-delta-updates"></span>',
|
61
|
+
style: {
|
62
|
+
position: 'absolute',
|
63
|
+
right : '150px',
|
64
|
+
top : '25px',
|
65
|
+
width : '200px',
|
66
|
+
zIndex : 1
|
67
|
+
}
|
68
|
+
}, {
|
69
|
+
ntype : 'component',
|
70
|
+
html : '<a class="github-button" href="https://github.com/neomjs/neo" data-size="large" data-show-count="true" aria-label="Star neomjs/neo on GitHub">Star</a>',
|
71
|
+
reference: 'github-button',
|
72
|
+
|
73
|
+
style: {
|
74
|
+
position: 'absolute',
|
75
|
+
right : '20px',
|
76
|
+
top : '20px',
|
77
|
+
zIndex : 1
|
78
|
+
}
|
79
|
+
}]
|
80
|
+
}, {
|
81
|
+
module : Panel,
|
82
|
+
layout : {ntype: 'vbox', align: 'stretch'},
|
83
|
+
reference: 'controls-panel',
|
84
|
+
style : {backgroundColor: '#2b2b2b'},
|
85
|
+
width : 250,
|
86
|
+
|
87
|
+
containerConfig: {
|
88
|
+
flex : null,
|
89
|
+
style: {overflowY: 'scroll'}
|
90
|
+
},
|
91
|
+
|
92
|
+
headers: [{
|
93
|
+
dock: 'top',
|
94
|
+
text: 'Helix Controls'
|
95
|
+
}],
|
96
|
+
|
97
|
+
itemDefaults: {
|
98
|
+
ntype : 'rangefield',
|
99
|
+
flex : '0 1 auto',
|
100
|
+
labelWidth : '100px',
|
101
|
+
listeners : {change: 'onRangefieldChange'},
|
102
|
+
style : {padding: '10px'},
|
103
|
+
useInputEvent: true
|
104
|
+
},
|
105
|
+
|
106
|
+
items: [{
|
107
|
+
labelText: 'Translate X',
|
108
|
+
maxValue : 2000,
|
109
|
+
minValue : -2000,
|
110
|
+
name : 'translateX',
|
111
|
+
value : 400
|
112
|
+
}, {
|
113
|
+
labelText: 'Translate Y',
|
114
|
+
maxValue : 2500,
|
115
|
+
minValue : -2500,
|
116
|
+
name : 'translateY',
|
117
|
+
value : -350
|
118
|
+
}, {
|
119
|
+
eventName: 'changeTranslateZ',
|
120
|
+
labelText: 'Translate Z',
|
121
|
+
listeners: {change: 'onRangefieldChange', mounted: 'onRangefieldMounted'},
|
122
|
+
maxValue : 4500,
|
123
|
+
minValue : -4500,
|
124
|
+
name : 'translateZ',
|
125
|
+
value : -1500
|
126
|
+
}, {
|
127
|
+
labelText : 'Delta Y',
|
128
|
+
labelAlign: 'top',
|
129
|
+
maxValue : 600,
|
130
|
+
minValue : -600,
|
131
|
+
name : 'deltaY',
|
132
|
+
value : 70
|
133
|
+
}, {
|
134
|
+
eventName: 'changeRotation',
|
135
|
+
labelText: 'Rotate',
|
136
|
+
listeners: {change: 'onRangefieldChange', mounted: 'onRangefieldMounted'},
|
137
|
+
minValue : -720,
|
138
|
+
maxValue : 720,
|
139
|
+
name : 'rotationAngle',
|
140
|
+
value : 0
|
141
|
+
}, {
|
142
|
+
labelText: 'Radius',
|
143
|
+
maxValue : 3500,
|
144
|
+
minValue : 900,
|
145
|
+
name : 'radius',
|
146
|
+
value : 1500
|
147
|
+
}, {
|
148
|
+
labelText: 'Perspective',
|
149
|
+
minValue : 50,
|
150
|
+
maxValue : 3000,
|
151
|
+
name : 'perspective',
|
152
|
+
value : 800
|
153
|
+
}, {
|
154
|
+
labelText: 'Item Angle',
|
155
|
+
minValue : 1,
|
156
|
+
maxValue : 36,
|
157
|
+
name : 'itemAngle',
|
158
|
+
value : 8
|
159
|
+
}, {
|
160
|
+
labelText: 'Max Opacity',
|
161
|
+
name : 'maxOpacity',
|
162
|
+
minValue : 0,
|
163
|
+
maxValue : 100,
|
164
|
+
value : 80 // todo [30, 80]
|
165
|
+
}, {
|
166
|
+
labelText: 'Min Opacity',
|
167
|
+
name : 'minOpacity',
|
168
|
+
minValue : 0,
|
169
|
+
maxValue : 100,
|
170
|
+
value : 30
|
171
|
+
}, {
|
172
|
+
module : NumberField,
|
173
|
+
clearable: false,
|
174
|
+
labelText: 'Max Items',
|
175
|
+
maxValue : 600,
|
176
|
+
minValue : 100,
|
177
|
+
name : 'maxItems',
|
178
|
+
stepSize : 100,
|
179
|
+
value : 300
|
180
|
+
}, {
|
181
|
+
ntype : 'button',
|
182
|
+
handler : 'onFlipItemsButtonClick',
|
183
|
+
listeners: {},
|
184
|
+
style : {margin: '20px'},
|
185
|
+
text : 'Flip Items'
|
186
|
+
}, {
|
187
|
+
ntype : 'button',
|
188
|
+
disabled : true,
|
189
|
+
handler : 'onSortLastnameButtonClick',
|
190
|
+
listeners: {},
|
191
|
+
reference: 'sort-lastname-button',
|
192
|
+
style : {margin: '20px', marginBottom: '10px'},
|
193
|
+
text : 'Sort by Lastname'
|
194
|
+
}, {
|
195
|
+
ntype : 'button',
|
196
|
+
disabled : true,
|
197
|
+
handler : 'onSortFirstnameButtonClick',
|
198
|
+
listeners: {},
|
199
|
+
reference: 'sort-firstname-button',
|
200
|
+
style : {margin: '20px', marginTop: 0},
|
201
|
+
text : 'Sort by Firstname'
|
202
|
+
}, {
|
203
|
+
ntype : 'button',
|
204
|
+
handler : 'onFollowSelectionButtonClick',
|
205
|
+
iconCls : 'fa fa-square',
|
206
|
+
listeners: {},
|
207
|
+
style : {margin: '20px', marginBottom: '10px'},
|
208
|
+
text : 'Follow Selection'
|
209
|
+
}, {
|
210
|
+
module : CheckBox,
|
211
|
+
checked : Neo.config.logDeltaUpdates,
|
212
|
+
hideLabel : true,
|
213
|
+
hideValueLabel: false,
|
214
|
+
listeners : {change: 'onLogDeltasCheckboxChange'},
|
215
|
+
style : {marginLeft: '10px', marginTop: '10px'},
|
216
|
+
valueLabelText: 'logDeltaUpdates'
|
217
|
+
}, {
|
218
|
+
ntype: 'label',
|
219
|
+
text : [
|
220
|
+
'<b>Navigation Concept</b>',
|
221
|
+
'<p>Click on an item to select it. Afterwards you can use the Arrow Keys to walk through the items.</p>',
|
222
|
+
'<p>Hit the Space Key to rotate the currently selected item to the front.</p>',
|
223
|
+
'<p>Hit the Enter Key to expand the currently selected item.</p>'
|
224
|
+
].join(''),
|
225
|
+
|
226
|
+
style: {
|
227
|
+
backgroundColor: '#323232',
|
228
|
+
color : '#ddd',
|
229
|
+
fontSize : '13px',
|
230
|
+
margin : '10px',
|
231
|
+
padding : '10px',
|
232
|
+
whiteSpace : 'normal'
|
233
|
+
}
|
234
|
+
}]
|
235
|
+
}]
|
236
|
+
}
|
237
|
+
|
238
|
+
/**
|
239
|
+
* @param {Object} config
|
240
|
+
*/
|
241
|
+
construct(config) {
|
242
|
+
super.construct(config);
|
243
|
+
|
244
|
+
let me = this;
|
245
|
+
|
246
|
+
me.helix = Neo.create({
|
247
|
+
module : Helix,
|
248
|
+
appName : me.appName,
|
249
|
+
reference: 'helix',
|
250
|
+
store : ImageStore,
|
251
|
+
windowId : me.windowId,
|
252
|
+
...me.helixConfig
|
253
|
+
});
|
254
|
+
|
255
|
+
me.items[0].items.unshift(me.helix)
|
256
|
+
}
|
257
|
+
|
258
|
+
/**
|
259
|
+
* Triggered after the mounted config got changed
|
260
|
+
* @param {Boolean} value
|
261
|
+
* @param {Boolean} oldValue
|
262
|
+
* @protected
|
263
|
+
*/
|
264
|
+
afterSetMounted(value, oldValue) {
|
265
|
+
super.afterSetMounted(value, oldValue);
|
266
|
+
|
267
|
+
if (value) {
|
268
|
+
let me = this;
|
269
|
+
|
270
|
+
Neo.Main.setNeoConfig({
|
271
|
+
key : 'renderCountDeltas',
|
272
|
+
value : true,
|
273
|
+
windowId: me.windowId
|
274
|
+
});
|
275
|
+
|
276
|
+
if (me.showGitHubStarButton) {
|
277
|
+
setTimeout(() => {
|
278
|
+
let {windowId} = me,
|
279
|
+
{windowIds} = Viewport;
|
280
|
+
|
281
|
+
if (!windowIds.includes(windowId)) {
|
282
|
+
windowIds.push(windowId);
|
283
|
+
|
284
|
+
Neo.main.DomAccess.addScript({
|
285
|
+
async: true,
|
286
|
+
defer: true,
|
287
|
+
src : 'https://buttons.github.io/buttons.js',
|
288
|
+
windowId
|
289
|
+
})
|
290
|
+
}
|
291
|
+
}, 200)
|
292
|
+
}
|
293
|
+
}
|
294
|
+
}
|
295
|
+
|
296
|
+
/**
|
297
|
+
* Triggered after the showGitHubStarButton config got changed
|
298
|
+
* @param {Boolean} value
|
299
|
+
* @param {Boolean} oldValue
|
300
|
+
* @protected
|
301
|
+
*/
|
302
|
+
afterSetShowGitHubStarButton(value, oldValue) {
|
303
|
+
this.getItem('github-button').hidden = !value;
|
304
|
+
}
|
305
|
+
}
|
306
|
+
|
307
|
+
Neo.setupClass(Viewport);
|
308
|
+
|
309
|
+
export default Viewport;
|
@@ -0,0 +1,122 @@
|
|
1
|
+
import Controller from '../../../src/controller/Component.mjs';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @class Neo.examples.component.helix.ViewportController
|
5
|
+
* @extends Neo.controller.Component
|
6
|
+
*/
|
7
|
+
class ViewportController extends Controller {
|
8
|
+
static config = {
|
9
|
+
/**
|
10
|
+
* @member {String} className='Neo.examples.component.helix.ViewportController'
|
11
|
+
* @protected
|
12
|
+
*/
|
13
|
+
className: 'Neo.examples.component.helix.ViewportController',
|
14
|
+
/**
|
15
|
+
* @member {Neo.component.Helix|null} helix_=null
|
16
|
+
* @protected
|
17
|
+
*/
|
18
|
+
helix_: null
|
19
|
+
}
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Triggered when accessing the helix config
|
23
|
+
* @param {Neo.component.Helix|null} value
|
24
|
+
* @protected
|
25
|
+
*/
|
26
|
+
beforeGetHelix(value) {
|
27
|
+
if (!value) {
|
28
|
+
this._helix = value = this.getReference('helix')
|
29
|
+
}
|
30
|
+
|
31
|
+
return value
|
32
|
+
}
|
33
|
+
|
34
|
+
/**
|
35
|
+
* {Object} data
|
36
|
+
*/
|
37
|
+
onFlipItemsButtonClick(data) {
|
38
|
+
this.helix.flipped = !this.helix.flipped
|
39
|
+
}
|
40
|
+
|
41
|
+
/**
|
42
|
+
* {Object} data
|
43
|
+
*/
|
44
|
+
onFollowSelectionButtonClick(data) {
|
45
|
+
const button = data.component;
|
46
|
+
|
47
|
+
if (button.iconCls === 'fa fa-square') {
|
48
|
+
this.helix.followSelection = true;
|
49
|
+
button.iconCls = 'fa fa-check-square'
|
50
|
+
} else {
|
51
|
+
this.helix.followSelection = false;
|
52
|
+
button.iconCls = 'fa fa-square'
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
/**
|
57
|
+
* @param {Object} data
|
58
|
+
*/
|
59
|
+
onLogDeltasCheckboxChange(data) {
|
60
|
+
Neo.Main.setNeoConfig({
|
61
|
+
key : 'logDeltaUpdates',
|
62
|
+
value : data.value,
|
63
|
+
windowId: data.component.windowId
|
64
|
+
})
|
65
|
+
}
|
66
|
+
|
67
|
+
/**
|
68
|
+
* @param {Object} data
|
69
|
+
*/
|
70
|
+
onRangefieldChange(data) {
|
71
|
+
let me = this,
|
72
|
+
{name} = data.component,
|
73
|
+
{value} = data;
|
74
|
+
|
75
|
+
if (['deltaY', 'maxOpacity', 'minOpacity'].includes(name)) {
|
76
|
+
value /= 100
|
77
|
+
}
|
78
|
+
|
79
|
+
if (name === 'maxItems') {
|
80
|
+
me.getReference('sort-firstname-button').disabled = value !== 600;
|
81
|
+
me.getReference('sort-lastname-button') .disabled = value !== 600
|
82
|
+
}
|
83
|
+
|
84
|
+
me.helix[name] = value
|
85
|
+
}
|
86
|
+
|
87
|
+
/**
|
88
|
+
* @param {String} id
|
89
|
+
*/
|
90
|
+
onRangefieldMounted(id) {
|
91
|
+
let field = Neo.getComponent(id);
|
92
|
+
|
93
|
+
this.helix.on(field.eventName, function(value) {
|
94
|
+
value = Math.min(Math.max(value, field.minValue), field.maxValue);
|
95
|
+
field.value = value
|
96
|
+
})
|
97
|
+
}
|
98
|
+
|
99
|
+
/**
|
100
|
+
* @param {Object} data
|
101
|
+
*/
|
102
|
+
onSortFirstnameButtonClick(data) {
|
103
|
+
this.helix.store.sorters = [
|
104
|
+
{property : 'lastname', direction: 'ASC'},
|
105
|
+
{property : 'firstname', direction: 'ASC'}
|
106
|
+
]
|
107
|
+
}
|
108
|
+
|
109
|
+
/**
|
110
|
+
* @param {Object} data
|
111
|
+
*/
|
112
|
+
onSortLastnameButtonClick(data) {
|
113
|
+
this.helix.store.sorters = [
|
114
|
+
{property : 'firstname', direction: 'ASC'},
|
115
|
+
{property : 'lastname', direction: 'ASC'}
|
116
|
+
]
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
Neo.setupClass(ViewportController);
|
121
|
+
|
122
|
+
export default ViewportController;
|
@@ -1,13 +1,21 @@
|
|
1
|
-
import
|
1
|
+
import BaseViewport from '../helix/Viewport.mjs';
|
2
2
|
import ViewportController from './ViewportController.mjs';
|
3
3
|
|
4
4
|
/**
|
5
5
|
* @class Neo.examples.component.multiWindowHelix.Viewport
|
6
|
-
* @extends Neo.examples.component.helix.
|
6
|
+
* @extends Neo.examples.component.helix.Viewport
|
7
7
|
*/
|
8
|
-
class Viewport extends
|
8
|
+
class Viewport extends BaseViewport {
|
9
9
|
static config = {
|
10
|
+
/**
|
11
|
+
* @member {String} className='Neo.examples.component.multiWindowHelix.Viewport'
|
12
|
+
* @protected
|
13
|
+
*/
|
10
14
|
className: 'Neo.examples.component.multiWindowHelix.Viewport',
|
15
|
+
/**
|
16
|
+
* @member {String[]} cls=['multi-window-helix-viewport']
|
17
|
+
*/
|
18
|
+
cls: ['multi-window-helix-viewport'],
|
11
19
|
/**
|
12
20
|
* @member {Neo.controller.Component} controller=ViewportController
|
13
21
|
*/
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import
|
1
|
+
import Controller from '../helix/ViewportController.mjs';
|
2
2
|
|
3
3
|
/**
|
4
4
|
* @class Neo.examples.component.multiWindowHelix.ViewportController
|
5
|
-
* @extends Neo.
|
5
|
+
* @extends Neo.examples.component.helix.ViewportController
|
6
6
|
*/
|
7
|
-
class ViewportController extends
|
7
|
+
class ViewportController extends Controller {
|
8
8
|
static config = {
|
9
9
|
/**
|
10
10
|
* @member {String} className='Neo.examples.component.multiWindowHelix.ViewportController'
|
@@ -22,19 +22,31 @@ class ViewportController extends Component {
|
|
22
22
|
*
|
23
23
|
*/
|
24
24
|
async createPopupWindow() {
|
25
|
-
let me
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
let me = this,
|
26
|
+
{windowId} = me,
|
27
|
+
{windowConfigs} = Neo,
|
28
|
+
firstWindowId = parseInt(Object.keys(windowConfigs)[0]),
|
29
|
+
{basePath} = windowConfigs[firstWindowId],
|
30
|
+
widget = me.getReference('controls-panel'),
|
31
|
+
winData = await Neo.Main.getWindowData({windowId}),
|
32
|
+
rect = await me.component.getDomRect(widget.id),
|
29
33
|
{height, left, top, width} = rect;
|
30
34
|
|
31
35
|
height -= 62; // popup header in Chrome
|
32
36
|
left += (width + winData.screenLeft);
|
33
37
|
top += (winData.outerHeight - winData.innerHeight + winData.screenTop);
|
34
38
|
|
39
|
+
/*
|
40
|
+
* For this demo, the url './childapp/' would be sufficient.
|
41
|
+
* However, we also want to open it from within apps/portal.
|
42
|
+
*
|
43
|
+
* We match the basePath to the firstWindowId,
|
44
|
+
* assuming the first connected window is the (main) one which we want to be in charge.
|
45
|
+
*/
|
35
46
|
await Neo.Main.windowOpen({
|
36
|
-
url : '
|
47
|
+
url : basePath + 'examples/component/multiWindowHelix/childapp/',
|
37
48
|
windowFeatures: `height=${height},left=${left},top=${top},width=${width}`,
|
49
|
+
windowId : firstWindowId,
|
38
50
|
windowName : 'HelixControls'
|
39
51
|
})
|
40
52
|
}
|
@@ -81,7 +93,7 @@ class ViewportController extends Component {
|
|
81
93
|
me.component.add(controlsPanel)
|
82
94
|
}
|
83
95
|
// Close popup windows when closing or reloading the main window
|
84
|
-
else {
|
96
|
+
else if (appName === 'Neo.examples.component.multiWindowHelix') {
|
85
97
|
Neo.Main.windowClose({names: me.connectedApps, windowId})
|
86
98
|
}
|
87
99
|
}
|
@@ -19,7 +19,7 @@ class MainContainer extends ConfigurationViewport {
|
|
19
19
|
|
20
20
|
onPluginConfigChange(config, opts) {
|
21
21
|
const textfield = this.exampleComponent.items[0],
|
22
|
-
plugin = textfield.getPlugin(
|
22
|
+
plugin = textfield.getPlugin('prefixfield');
|
23
23
|
|
24
24
|
if (config === 'accept') {
|
25
25
|
plugin.accept = opts.record.value;
|
@@ -88,7 +88,6 @@ class MainContainer extends ConfigurationViewport {
|
|
88
88
|
plugins : [
|
89
89
|
{
|
90
90
|
module : PrefixPlugin,
|
91
|
-
flag : 'prefix',
|
92
91
|
pattern: '+1 (___) ___-___-____',
|
93
92
|
slots : '_'
|
94
93
|
}
|
@@ -99,7 +98,6 @@ class MainContainer extends ConfigurationViewport {
|
|
99
98
|
plugins : [
|
100
99
|
{
|
101
100
|
module : PrefixPlugin,
|
102
|
-
flag : 'prefix',
|
103
101
|
pattern: 'dd/mm/yyyy hh:mm',
|
104
102
|
slots : 'dmyh'
|
105
103
|
}
|
@@ -110,7 +108,6 @@ class MainContainer extends ConfigurationViewport {
|
|
110
108
|
plugins : [
|
111
109
|
{
|
112
110
|
module : PrefixPlugin,
|
113
|
-
flag : 'prefix',
|
114
111
|
pattern: 'XX:XX:XX:XX:XX:XX',
|
115
112
|
slots : 'X',
|
116
113
|
accept : '[A-H]'
|
@@ -122,7 +119,6 @@ class MainContainer extends ConfigurationViewport {
|
|
122
119
|
plugins : [
|
123
120
|
{
|
124
121
|
module : PrefixPlugin,
|
125
|
-
flag : 'prefix',
|
126
122
|
pattern: '__-__-__-____',
|
127
123
|
slots : '_',
|
128
124
|
accept : /\w/
|
@@ -134,7 +130,6 @@ class MainContainer extends ConfigurationViewport {
|
|
134
130
|
plugins : [
|
135
131
|
{
|
136
132
|
module : PrefixPlugin,
|
137
|
-
flag : 'prefix',
|
138
133
|
pattern: '.... .... .... ....',
|
139
134
|
slots : '.',
|
140
135
|
accept : /\d/
|
@@ -65,7 +65,7 @@ class MainContainerController extends Component {
|
|
65
65
|
* @param {Object} data
|
66
66
|
*/
|
67
67
|
changeTransitionDuration(data) {
|
68
|
-
this.getReference('list').getPlugin('animate').transitionDuration = data.value;
|
68
|
+
this.getReference('list').getPlugin('list-animate').transitionDuration = data.value;
|
69
69
|
}
|
70
70
|
}
|
71
71
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "neo.mjs",
|
3
|
-
"version": "6.
|
3
|
+
"version": "6.18.0",
|
4
4
|
"description": "The webworkers driven UI framework",
|
5
5
|
"type": "module",
|
6
6
|
"repository": {
|
@@ -54,7 +54,7 @@
|
|
54
54
|
"highlightjs-line-numbers.js": "^2.8.0",
|
55
55
|
"inquirer": "^9.2.23",
|
56
56
|
"marked": "^13.0.0",
|
57
|
-
"monaco-editor": "^0.
|
57
|
+
"monaco-editor": "^0.50.0",
|
58
58
|
"neo-jsdoc": "1.0.1",
|
59
59
|
"neo-jsdoc-x": "1.0.5",
|
60
60
|
"postcss": "^8.4.38",
|