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
@@ -71,7 +71,7 @@ class AmCharts extends Base {
|
|
71
71
|
construct(config) {
|
72
72
|
super.construct(config);
|
73
73
|
|
74
|
-
this.insertAmChartsScripts()
|
74
|
+
this.insertAmChartsScripts()
|
75
75
|
}
|
76
76
|
|
77
77
|
/**
|
@@ -82,21 +82,21 @@ class AmCharts extends Base {
|
|
82
82
|
*/
|
83
83
|
afterSetScriptsLoaded(value, oldValue) {
|
84
84
|
if (value) {
|
85
|
-
|
85
|
+
let me = this;
|
86
86
|
|
87
87
|
me.chartsToCreate.forEach(config => {
|
88
|
-
me.create(config)
|
88
|
+
me.create(config)
|
89
89
|
});
|
90
90
|
|
91
91
|
me.chartsToCreate = [];
|
92
92
|
|
93
93
|
setTimeout(() => {
|
94
94
|
Object.entries(me.dataMap).forEach(([key, dataValue]) => {
|
95
|
-
me.updateData(dataValue)
|
95
|
+
me.updateData(dataValue)
|
96
96
|
});
|
97
97
|
|
98
|
-
me.dataMap = {}
|
99
|
-
}, 1000)
|
98
|
+
me.dataMap = {}
|
99
|
+
}, 1000)
|
100
100
|
}
|
101
101
|
}
|
102
102
|
|
@@ -108,12 +108,12 @@ class AmCharts extends Base {
|
|
108
108
|
*/
|
109
109
|
callMethod(data) {
|
110
110
|
if (this.hasChart(data.id)) {
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
111
|
+
let chart = this.charts[data.id],
|
112
|
+
pathArray = data.path.split('.'),
|
113
|
+
methodName = pathArray.pop(),
|
114
|
+
scope = pathArray.length < 1 ? chart: Neo.ns(pathArray.join('.'), false, chart);
|
115
115
|
|
116
|
-
scope[methodName].call(scope, ...data.params || [])
|
116
|
+
scope[methodName].call(scope, ...data.params || [])
|
117
117
|
} else {
|
118
118
|
// todo
|
119
119
|
}
|
@@ -128,12 +128,12 @@ class AmCharts extends Base {
|
|
128
128
|
let text = "[bold]{dateX}[/]\n";
|
129
129
|
|
130
130
|
chart.series.each(item => {
|
131
|
-
text += "[" + item.stroke + "]●[/] " + item.name + ": {" + item.dataFields.valueY + "}\n"
|
131
|
+
text += "[" + item.stroke + "]●[/] " + item.name + ": {" + item.dataFields.valueY + "}\n"
|
132
132
|
});
|
133
133
|
|
134
|
-
return text
|
135
|
-
})
|
136
|
-
})
|
134
|
+
return text
|
135
|
+
})
|
136
|
+
})
|
137
137
|
}
|
138
138
|
|
139
139
|
/**
|
@@ -147,10 +147,10 @@ class AmCharts extends Base {
|
|
147
147
|
* @param {String} data.type='XYChart'
|
148
148
|
*/
|
149
149
|
create(data) {
|
150
|
-
|
150
|
+
let me = this;
|
151
151
|
|
152
152
|
if (!me.scriptsLoaded) {
|
153
|
-
me.chartsToCreate.push(data)
|
153
|
+
me.chartsToCreate.push(data)
|
154
154
|
} else {
|
155
155
|
// todo: check if globalThis[data.package] exists, if not load it and call create afterwards
|
156
156
|
|
@@ -159,7 +159,7 @@ class AmCharts extends Base {
|
|
159
159
|
me.charts[data.id] = am4core.createFromConfig(data.config, data.id, globalThis[data.package][data.type || 'XYChart']);
|
160
160
|
|
161
161
|
if (data.combineSeriesTooltip) {
|
162
|
-
me.combineSeriesTooltip(me.charts[data.id])
|
162
|
+
me.combineSeriesTooltip(me.charts[data.id])
|
163
163
|
}
|
164
164
|
|
165
165
|
// in case data has arrived before the chart got created, apply it now
|
@@ -168,10 +168,10 @@ class AmCharts extends Base {
|
|
168
168
|
data : data.data,
|
169
169
|
dataPath: data.dataPath,
|
170
170
|
id : data.id
|
171
|
-
})
|
171
|
+
})
|
172
172
|
} else if (me.dataMap[data.id]) {
|
173
173
|
me.updateData(me.dataMap[data.id]);
|
174
|
-
delete me.dataMap[data.id]
|
174
|
+
delete me.dataMap[data.id]
|
175
175
|
}
|
176
176
|
}
|
177
177
|
}
|
@@ -182,7 +182,7 @@ class AmCharts extends Base {
|
|
182
182
|
*/
|
183
183
|
destroy(data) {
|
184
184
|
this.charts[data.id].dispose();
|
185
|
-
delete this.charts[data.id]
|
185
|
+
delete this.charts[data.id]
|
186
186
|
}
|
187
187
|
|
188
188
|
/**
|
@@ -190,7 +190,7 @@ class AmCharts extends Base {
|
|
190
190
|
* @returns {Boolean}
|
191
191
|
*/
|
192
192
|
hasChart(id) {
|
193
|
-
return !!this.charts[id]
|
193
|
+
return !!this.charts[id]
|
194
194
|
}
|
195
195
|
|
196
196
|
/**
|
@@ -199,8 +199,8 @@ class AmCharts extends Base {
|
|
199
199
|
* => fetching the other files after core.js is loaded
|
200
200
|
*/
|
201
201
|
insertAmChartsScripts(useFallback=false) {
|
202
|
-
|
203
|
-
|
202
|
+
let me = this,
|
203
|
+
basePath = useFallback ? me.fallbackPath : me.downloadPath;
|
204
204
|
|
205
205
|
DomAccess.loadScript(basePath + 'core.js').then(() => {
|
206
206
|
Promise.all([
|
@@ -209,12 +209,12 @@ class AmCharts extends Base {
|
|
209
209
|
DomAccess.loadScript(basePath + 'themes/dark.js'),
|
210
210
|
DomAccess.loadScript(basePath + 'geodata/worldLow.js')
|
211
211
|
]).then(() => {
|
212
|
-
me.scriptsLoaded = true
|
212
|
+
me.scriptsLoaded = true
|
213
213
|
});
|
214
214
|
}).catch(e => {
|
215
215
|
console.log('Download from amcharts.com failed, switching to fallback', e);
|
216
|
-
me.insertAmChartsScripts(true)
|
217
|
-
})
|
216
|
+
me.insertAmChartsScripts(true)
|
217
|
+
})
|
218
218
|
}
|
219
219
|
|
220
220
|
/**
|
@@ -229,7 +229,7 @@ class AmCharts extends Base {
|
|
229
229
|
path : key,
|
230
230
|
value
|
231
231
|
})
|
232
|
-
})
|
232
|
+
})
|
233
233
|
}
|
234
234
|
|
235
235
|
/**
|
@@ -241,12 +241,12 @@ class AmCharts extends Base {
|
|
241
241
|
*/
|
242
242
|
setProperty(data) {
|
243
243
|
if (this.hasChart(data.id)) {
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
244
|
+
let chart = this.charts[data.id],
|
245
|
+
pathArray = data.path.split('.'),
|
246
|
+
propertyName = pathArray.pop(),
|
247
|
+
scope = Neo.ns(pathArray.join('.'), false, chart);
|
248
248
|
|
249
|
-
scope[propertyName] = data.isColor ? am4core.color(data.value) : data.value
|
249
|
+
scope[propertyName] = data.isColor ? am4core.color(data.value) : data.value
|
250
250
|
} else {
|
251
251
|
// todo
|
252
252
|
}
|
@@ -259,17 +259,17 @@ class AmCharts extends Base {
|
|
259
259
|
* @param {String} data.id
|
260
260
|
*/
|
261
261
|
updateData(data) {
|
262
|
-
|
262
|
+
let me = this;
|
263
263
|
|
264
264
|
if (!me.scriptsLoaded || !me.hasChart(data.id)) {
|
265
|
-
me.dataMap[data.id] = data
|
265
|
+
me.dataMap[data.id] = data
|
266
266
|
} else {
|
267
267
|
const chart = me.charts[data.id];
|
268
268
|
|
269
269
|
if (data.dataPath === '') {
|
270
|
-
chart.data = data.data
|
270
|
+
chart.data = data.data
|
271
271
|
} else {
|
272
|
-
Neo.ns(data.dataPath, false, chart).data = data.data
|
272
|
+
Neo.ns(data.dataPath, false, chart).data = data.data
|
273
273
|
}
|
274
274
|
}
|
275
275
|
}
|
@@ -21,7 +21,7 @@ class AnalyticsByGoogle extends Base {
|
|
21
21
|
*/
|
22
22
|
construct(config) {
|
23
23
|
super.construct(config);
|
24
|
-
this.insertGoogleAnalyticsScript()
|
24
|
+
this.insertGoogleAnalyticsScript()
|
25
25
|
}
|
26
26
|
|
27
27
|
/**
|
@@ -31,20 +31,20 @@ class AnalyticsByGoogle extends Base {
|
|
31
31
|
window.dataLayer = window.dataLayer || [];
|
32
32
|
|
33
33
|
function gtag() {
|
34
|
-
dataLayer.push(arguments)
|
34
|
+
dataLayer.push(arguments)
|
35
35
|
}
|
36
36
|
|
37
37
|
gtag('js', new Date());
|
38
38
|
gtag('config', Neo.config.gtagId);
|
39
39
|
|
40
|
-
|
40
|
+
let script = document.createElement('script');
|
41
41
|
|
42
42
|
Object.assign(script, {
|
43
43
|
async: true,
|
44
44
|
src : `https://www.googletagmanager.com/gtag/js?id=${Neo.config.gtagId}`
|
45
45
|
});
|
46
46
|
|
47
|
-
document.head.appendChild(script)
|
47
|
+
document.head.appendChild(script)
|
48
48
|
}
|
49
49
|
}
|
50
50
|
|
@@ -39,7 +39,7 @@ class CesiumJS extends Base {
|
|
39
39
|
*/
|
40
40
|
construct(config) {
|
41
41
|
super.construct(config);
|
42
|
-
this.loadFiles()
|
42
|
+
this.loadFiles()
|
43
43
|
}
|
44
44
|
|
45
45
|
/**
|
@@ -54,7 +54,7 @@ class CesiumJS extends Base {
|
|
54
54
|
|
55
55
|
data.createOsmBuildings && this.createOsmBuildings({
|
56
56
|
id: data.id
|
57
|
-
})
|
57
|
+
})
|
58
58
|
}
|
59
59
|
|
60
60
|
/**
|
@@ -62,7 +62,7 @@ class CesiumJS extends Base {
|
|
62
62
|
* @param {String} data.id
|
63
63
|
*/
|
64
64
|
createOsmBuildings(data) {
|
65
|
-
this.viewers[data.id].scene.primitives.add(Cesium.createOsmBuildings())
|
65
|
+
this.viewers[data.id].scene.primitives.add(Cesium.createOsmBuildings())
|
66
66
|
}
|
67
67
|
|
68
68
|
/**
|
@@ -71,7 +71,7 @@ class CesiumJS extends Base {
|
|
71
71
|
*/
|
72
72
|
destroy(data) {
|
73
73
|
// todo
|
74
|
-
console.log('main.addon.CesiumJS: destroy()', data)
|
74
|
+
console.log('main.addon.CesiumJS: destroy()', data)
|
75
75
|
}
|
76
76
|
|
77
77
|
/**
|
@@ -88,7 +88,7 @@ class CesiumJS extends Base {
|
|
88
88
|
heading: Cesium.Math.toRadians(data.heading),
|
89
89
|
pitch : Cesium.Math.toRadians(data.pitch),
|
90
90
|
}
|
91
|
-
})
|
91
|
+
})
|
92
92
|
}
|
93
93
|
|
94
94
|
/**
|
@@ -99,15 +99,15 @@ class CesiumJS extends Base {
|
|
99
99
|
DomAccess.loadScript( 'https://cesium.com/downloads/cesiumjs/releases/1.92/Build/Cesium/Cesium.js'),
|
100
100
|
DomAccess.loadStylesheet('https://cesium.com/downloads/cesiumjs/releases/1.92/Build/Cesium/Widgets/widgets.css')
|
101
101
|
]).then(() => {
|
102
|
-
this.onFilesLoaded()
|
103
|
-
})
|
102
|
+
this.onFilesLoaded()
|
103
|
+
})
|
104
104
|
}
|
105
105
|
|
106
106
|
/**
|
107
107
|
*
|
108
108
|
*/
|
109
109
|
onFilesLoaded() {
|
110
|
-
Cesium.Ion.defaultAccessToken = Neo.config.cesiumJsToken
|
110
|
+
Cesium.Ion.defaultAccessToken = Neo.config.cesiumJsToken
|
111
111
|
}
|
112
112
|
}
|
113
113
|
|
@@ -62,10 +62,10 @@ class CloneNode extends Base {
|
|
62
62
|
targetNode = clone;
|
63
63
|
|
64
64
|
for (; j < pathLen; j++) {
|
65
|
-
targetNode = targetNode.childNodes[path[j]]
|
65
|
+
targetNode = targetNode.childNodes[path[j]]
|
66
66
|
}
|
67
67
|
|
68
|
-
targetNode.textContent = value
|
68
|
+
targetNode.textContent = value
|
69
69
|
}
|
70
70
|
});
|
71
71
|
|
@@ -74,8 +74,8 @@ class CloneNode extends Base {
|
|
74
74
|
|
75
75
|
let end = performance.now();
|
76
76
|
|
77
|
-
console.log('time', end - start)
|
78
|
-
})
|
77
|
+
console.log('time', end - start)
|
78
|
+
})
|
79
79
|
}
|
80
80
|
|
81
81
|
/**
|
@@ -93,7 +93,7 @@ class CloneNode extends Base {
|
|
93
93
|
this.map[data.id] = {
|
94
94
|
paths: data.paths,
|
95
95
|
template
|
96
|
-
}
|
96
|
+
}
|
97
97
|
}
|
98
98
|
}
|
99
99
|
|
@@ -31,25 +31,25 @@ class Cookie extends Base {
|
|
31
31
|
* @returns {String}
|
32
32
|
*/
|
33
33
|
getCookie(name) {
|
34
|
-
let cookie = document
|
34
|
+
let {cookie} = document
|
35
35
|
.split('; ')
|
36
36
|
.find(row => row.startsWith(name));
|
37
37
|
|
38
|
-
return cookie ? cookie.split('=')[1] : null
|
38
|
+
return cookie ? cookie.split('=')[1] : null
|
39
39
|
}
|
40
40
|
|
41
41
|
/**
|
42
42
|
* @returns {String}
|
43
43
|
*/
|
44
44
|
getCookies() {
|
45
|
-
return document.cookie
|
45
|
+
return document.cookie
|
46
46
|
}
|
47
47
|
|
48
48
|
/**
|
49
49
|
* @param {String} value
|
50
50
|
*/
|
51
51
|
setCookie(value) {
|
52
|
-
document.cookie = value
|
52
|
+
document.cookie = value
|
53
53
|
}
|
54
54
|
}
|
55
55
|
|
@@ -144,19 +144,19 @@ class DragDrop extends Base {
|
|
144
144
|
me.addGlobalEventListeners();
|
145
145
|
|
146
146
|
if (Neo.config.hasMouseEvents) {
|
147
|
-
imports.push(import('../draggable/sensor/Mouse.mjs'))
|
147
|
+
imports.push(import('../draggable/sensor/Mouse.mjs'))
|
148
148
|
}
|
149
149
|
|
150
150
|
if (Neo.config.hasTouchEvents) {
|
151
|
-
imports.push(import('../draggable/sensor/Touch.mjs'))
|
151
|
+
imports.push(import('../draggable/sensor/Touch.mjs'))
|
152
152
|
}
|
153
153
|
|
154
154
|
Promise.all(imports).then(modules => {
|
155
155
|
// create the Mouse- and / or TouchSensor
|
156
156
|
Neo.create({
|
157
157
|
module: modules[0].default
|
158
|
-
})
|
159
|
-
})
|
158
|
+
})
|
159
|
+
})
|
160
160
|
}
|
161
161
|
|
162
162
|
/**
|
@@ -167,7 +167,7 @@ class DragDrop extends Base {
|
|
167
167
|
|
168
168
|
document.addEventListener('drag:end', me.onDragEnd .bind(me), true);
|
169
169
|
document.addEventListener('drag:move', me.onDragMove .bind(me), true);
|
170
|
-
document.addEventListener('drag:start', me.onDragStart.bind(me), true)
|
170
|
+
document.addEventListener('drag:start', me.onDragStart.bind(me), true)
|
171
171
|
}
|
172
172
|
|
173
173
|
/**
|
@@ -185,14 +185,14 @@ class DragDrop extends Base {
|
|
185
185
|
};
|
186
186
|
|
187
187
|
if (detail.eventPath) {
|
188
|
-
e.targetPath = detail.eventPath.map(e => DomEvents.getTargetData(e))
|
188
|
+
e.targetPath = detail.eventPath.map(e => DomEvents.getTargetData(e))
|
189
189
|
} else {
|
190
|
-
e.targetPath = e.path
|
190
|
+
e.targetPath = e.path
|
191
191
|
}
|
192
192
|
|
193
193
|
e.path = path.map(e => DomEvents.getTargetData(e));
|
194
194
|
|
195
|
-
return e
|
195
|
+
return e
|
196
196
|
}
|
197
197
|
|
198
198
|
/**
|
@@ -229,7 +229,7 @@ class DragDrop extends Base {
|
|
229
229
|
...DomEvents.getMouseEventData(event.detail.originalEvent),
|
230
230
|
dragZoneId: me.dragZoneId,
|
231
231
|
type : 'drop'
|
232
|
-
})
|
232
|
+
})
|
233
233
|
}
|
234
234
|
|
235
235
|
Object.assign(me, {
|
@@ -250,7 +250,7 @@ class DragDrop extends Base {
|
|
250
250
|
scrollContainerRect : null,
|
251
251
|
setScrollFactorLeft : 1,
|
252
252
|
scrollFactorTop : 1
|
253
|
-
})
|
253
|
+
})
|
254
254
|
}
|
255
255
|
|
256
256
|
/**
|
@@ -278,33 +278,34 @@ class DragDrop extends Base {
|
|
278
278
|
|
279
279
|
if (rect) {
|
280
280
|
if (left < rect.left) {
|
281
|
-
left = rect.left
|
281
|
+
left = rect.left
|
282
282
|
} else if (left > rect.right - proxyRect.width) {
|
283
|
-
left = rect.right - proxyRect.width
|
283
|
+
left = rect.right - proxyRect.width
|
284
284
|
}
|
285
285
|
|
286
286
|
if (top < rect.top) {
|
287
|
-
top = rect.top
|
287
|
+
top = rect.top
|
288
288
|
} else if (top > rect.bottom - proxyRect.height) {
|
289
289
|
top = rect.bottom - proxyRect.height
|
290
290
|
}
|
291
291
|
}
|
292
292
|
|
293
293
|
if (!me.moveHorizontal) {
|
294
|
-
left = me.dragProxyRect.x
|
294
|
+
left = me.dragProxyRect.x
|
295
295
|
}
|
296
296
|
|
297
297
|
me.dragProxyElement.style.left = `${left}px`;
|
298
298
|
|
299
299
|
if (!me.moveVertical) {
|
300
|
-
top = me.dragProxyRect.y
|
300
|
+
top = me.dragProxyRect.y
|
301
301
|
}
|
302
302
|
|
303
|
-
me.dragProxyElement.style.top = `${top}px
|
303
|
+
me.dragProxyElement.style.top = `${top}px`
|
304
304
|
}
|
305
305
|
|
306
306
|
if (!me.dragProxyElement || me.alwaysFireDragMove) {
|
307
|
-
|
307
|
+
let originalEvent = event.detail.originalEvent;
|
308
|
+
|
308
309
|
DomEvents.sendMessageToApp({
|
309
310
|
...me.getEventData(event),
|
310
311
|
offsetX: me.offsetX,
|
@@ -312,7 +313,7 @@ class DragDrop extends Base {
|
|
312
313
|
screenX: originalEvent.screenX,
|
313
314
|
screenY: originalEvent.screenY,
|
314
315
|
type : 'drag:move'
|
315
|
-
})
|
316
|
+
})
|
316
317
|
}
|
317
318
|
}
|
318
319
|
|
@@ -336,7 +337,7 @@ class DragDrop extends Base {
|
|
336
337
|
DomEvents.sendMessageToApp({
|
337
338
|
...this.getEventData(event),
|
338
339
|
type: 'drag:start'
|
339
|
-
})
|
340
|
+
})
|
340
341
|
}
|
341
342
|
|
342
343
|
/**
|
@@ -350,7 +351,7 @@ class DragDrop extends Base {
|
|
350
351
|
...event,
|
351
352
|
dragZoneId: me.dragZoneId,
|
352
353
|
type : 'drop:enter'
|
353
|
-
})
|
354
|
+
})
|
354
355
|
}
|
355
356
|
}
|
356
357
|
|
@@ -365,7 +366,7 @@ class DragDrop extends Base {
|
|
365
366
|
...event,
|
366
367
|
dragZoneId: me.dragZoneId,
|
367
368
|
type : 'drop:leave'
|
368
|
-
})
|
369
|
+
})
|
369
370
|
}
|
370
371
|
}
|
371
372
|
|
@@ -390,22 +391,22 @@ class DragDrop extends Base {
|
|
390
391
|
for (const targetCls of item.cls) {
|
391
392
|
if (cls.includes(targetCls)) {
|
392
393
|
hasMatch = true;
|
393
|
-
break
|
394
|
+
break
|
394
395
|
}
|
395
396
|
}
|
396
397
|
}
|
397
398
|
|
398
399
|
if (hasMatch && ids && !ids.includes(item.id)) {
|
399
|
-
hasMatch = false
|
400
|
+
hasMatch = false
|
400
401
|
}
|
401
402
|
|
402
403
|
if (hasMatch) {
|
403
|
-
return true
|
404
|
+
return true
|
404
405
|
}
|
405
406
|
}
|
406
407
|
}
|
407
408
|
|
408
|
-
return false
|
409
|
+
return false
|
409
410
|
}
|
410
411
|
|
411
412
|
/**
|
@@ -429,20 +430,20 @@ class DragDrop extends Base {
|
|
429
430
|
(deltaX < 0 && data.clientX < rect.left + gap) ||
|
430
431
|
(deltaX > 0 && data.clientX > rect.right - gap)
|
431
432
|
) {
|
432
|
-
el.scrollLeft += (deltaX * me.scrollFactorLeft)
|
433
|
+
el.scrollLeft += (deltaX * me.scrollFactorLeft)
|
433
434
|
}
|
434
435
|
|
435
436
|
if (
|
436
437
|
(deltaY < 0 && data.clientY < rect.top + gap) ||
|
437
438
|
(deltaY > 0 && data.clientY > rect.bottom - gap)
|
438
439
|
) {
|
439
|
-
el.scrollTop += (deltaY * me.scrollFactorTop)
|
440
|
+
el.scrollTop += (deltaY * me.scrollFactorTop)
|
440
441
|
}
|
441
442
|
|
442
443
|
return {
|
443
444
|
clientX: me.clientX + el.scrollLeft - me.initialScrollLeft,
|
444
445
|
clientY: me.clientY + el.scrollTop - me.initialScrollTop
|
445
|
-
}
|
446
|
+
}
|
446
447
|
}
|
447
448
|
|
448
449
|
/**
|
@@ -463,7 +464,7 @@ class DragDrop extends Base {
|
|
463
464
|
|
464
465
|
if (data.boundaryContainerId) {
|
465
466
|
node = DomAccess.getElementOrBody(data.boundaryContainerId);
|
466
|
-
me.boundaryContainerRect = node.getBoundingClientRect()
|
467
|
+
me.boundaryContainerRect = node.getBoundingClientRect()
|
467
468
|
}
|
468
469
|
|
469
470
|
delete data.boundaryContainerId;
|
@@ -476,16 +477,16 @@ class DragDrop extends Base {
|
|
476
477
|
scrollContainerRect : node.getBoundingClientRect(),
|
477
478
|
initialScrollLeft : node.scrollLeft,
|
478
479
|
initialScrollTop : node.scrollTop
|
479
|
-
})
|
480
|
+
})
|
480
481
|
}
|
481
482
|
|
482
483
|
delete data.scrollContainerId;
|
483
484
|
|
484
485
|
Object.entries(data).forEach(([key, value]) => {
|
485
486
|
if (me.hasOwnProperty(key)) {
|
486
|
-
me[key] = value
|
487
|
+
me[key] = value
|
487
488
|
} else {
|
488
|
-
console.error('unknown key passed inside setConfigs()', key)
|
489
|
+
console.error('unknown key passed inside setConfigs()', key)
|
489
490
|
}
|
490
491
|
});
|
491
492
|
|
@@ -496,7 +497,7 @@ class DragDrop extends Base {
|
|
496
497
|
style: {
|
497
498
|
cursor: me.bodyCursorStyle
|
498
499
|
}
|
499
|
-
})
|
500
|
+
})
|
500
501
|
}
|
501
502
|
}
|
502
503
|
|
@@ -505,7 +506,7 @@ class DragDrop extends Base {
|
|
505
506
|
* @param {String} data.id
|
506
507
|
*/
|
507
508
|
setDragProxyElement(data) {
|
508
|
-
this.dragProxyElement = document.getElementById(data.id)
|
509
|
+
this.dragProxyElement = document.getElementById(data.id)
|
509
510
|
}
|
510
511
|
}
|
511
512
|
|