neo.mjs 2.3.16 → 3.0.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/README.md +9 -0
- package/apps/covid/Util.mjs +1 -3
- package/apps/covid/view/GalleryContainer.mjs +2 -3
- package/apps/covid/view/GalleryContainerController.mjs +1 -5
- package/apps/covid/view/HelixContainer.mjs +2 -3
- package/apps/covid/view/HelixContainerController.mjs +1 -4
- package/apps/covid/view/MainContainerController.mjs +0 -7
- package/apps/covid/view/MainContainerModel.mjs +0 -1
- package/apps/covid/view/TableContainer.mjs +2 -3
- package/apps/covid/view/TableContainerController.mjs +0 -3
- package/apps/covid/view/WorldMapComponent.mjs +1 -2
- package/apps/covid/view/WorldMapContainerController.mjs +0 -2
- package/apps/covid/view/country/Gallery.mjs +0 -2
- package/apps/covid/view/country/Helix.mjs +0 -3
- package/apps/covid/view/mapboxGl/Container.mjs +1 -1
- package/apps/covid/view/mapboxGl/ContainerController.mjs +1 -6
- package/apps/krausest/TableCollection.mjs +0 -1
- package/apps/krausest/view/MainComponent.mjs +2 -3
- package/apps/krausest/view/MainComponentController.mjs +0 -1
- package/apps/krausest/view/TableComponent.mjs +2 -4
- package/apps/realworld/api/Article.mjs +1 -4
- package/apps/realworld/api/Base.mjs +0 -5
- package/apps/realworld/api/Favorite.mjs +1 -3
- package/apps/realworld/api/Profile.mjs +1 -3
- package/apps/realworld/api/config.mjs +2 -2
- package/apps/realworld/view/HeaderComponent.mjs +1 -2
- package/apps/realworld/view/HomeComponent.mjs +2 -11
- package/apps/realworld/view/MainContainerController.mjs +0 -13
- package/apps/realworld/view/article/CommentComponent.mjs +3 -5
- package/apps/realworld/view/article/Component.mjs +2 -7
- package/apps/realworld/view/article/CreateCommentComponent.mjs +3 -7
- package/apps/realworld/view/article/CreateComponent.mjs +3 -3
- package/apps/realworld/view/article/PreviewComponent.mjs +3 -5
- package/apps/realworld/view/article/TagListComponent.mjs +3 -7
- package/apps/realworld/view/user/ProfileComponent.mjs +2 -8
- package/apps/realworld/view/user/SettingsComponent.mjs +3 -7
- package/apps/realworld/view/user/SignUpComponent.mjs +2 -3
- package/apps/realworld2/api/Article.mjs +1 -4
- package/apps/realworld2/api/Base.mjs +0 -5
- package/apps/realworld2/api/Favorite.mjs +1 -3
- package/apps/realworld2/api/Profile.mjs +1 -3
- package/apps/realworld2/view/HeaderToolbarController.mjs +1 -2
- package/apps/realworld2/view/HomeContainer.mjs +1 -2
- package/apps/realworld2/view/MainContainerController.mjs +1 -14
- package/apps/realworld2/view/article/Gallery.mjs +1 -3
- package/apps/realworld2/view/article/GalleryContainer.mjs +1 -2
- package/apps/realworld2/view/article/Helix.mjs +1 -3
- package/apps/realworld2/view/article/HelixContainer.mjs +3 -5
- package/apps/realworld2/view/article/PreviewComponent.mjs +3 -5
- package/apps/realworld2/view/article/TagListComponent.mjs +3 -7
- package/apps/realworld2/view/user/LoginFormContainer.mjs +3 -4
- package/apps/sharedcovid/Util.mjs +1 -3
- package/apps/sharedcovid/view/GalleryContainer.mjs +2 -3
- package/apps/sharedcovid/view/GalleryContainerController.mjs +1 -5
- package/apps/sharedcovid/view/HelixContainer.mjs +2 -3
- package/apps/sharedcovid/view/HelixContainerController.mjs +1 -4
- package/apps/sharedcovid/view/MainContainerModel.mjs +0 -1
- package/apps/sharedcovid/view/TableContainer.mjs +2 -3
- package/apps/sharedcovid/view/TableContainerController.mjs +0 -3
- package/apps/sharedcovid/view/WorldMapComponent.mjs +1 -2
- package/apps/sharedcovid/view/WorldMapContainerController.mjs +0 -2
- package/apps/sharedcovid/view/country/Gallery.mjs +0 -2
- package/apps/sharedcovid/view/country/Helix.mjs +0 -3
- package/apps/sharedcovid/view/mapboxGl/Container.mjs +2 -3
- package/apps/sharedcovid/view/mapboxGl/ContainerController.mjs +1 -5
- package/apps/shareddialog/view/MainContainerController.mjs +0 -18
- package/apps/shareddialog2/view/MainContainerController.mjs +1 -2
- package/apps/website/view/MainContainerController.mjs +0 -4
- package/buildScripts/webpack/development/webpack.config.main.js +2 -1
- package/buildScripts/webpack/production/webpack.config.main.js +2 -1
- package/docs/app/view/ContentTabContainer.mjs +2 -2
- package/docs/app/view/MainContainer.mjs +2 -2
- package/docs/app/view/classdetails/SourceViewComponent.mjs +2 -2
- package/docs/app/view/classdetails/TutorialComponent.mjs +2 -2
- package/docs/tutorials/02_ClassSystem.html +3 -3
- package/docs/tutorials/02_ClassSystem.md +2 -2
- package/docs/tutorials/09_TodoList_version1.html +8 -8
- package/examples/ConfigurationViewport.mjs +0 -4
- package/examples/calendar/basic/MainContainerController.mjs +0 -1
- package/examples/calendar/weekview/MainContainer.mjs +2 -2
- package/examples/component/coronaGallery/CountryGallery.mjs +1 -4
- package/examples/component/coronaGallery/MainContainer.mjs +2 -4
- package/examples/component/coronaHelix/CountryHelix.mjs +0 -4
- package/examples/component/coronaHelix/MainContainer.mjs +2 -4
- package/examples/component/gallery/MainContainer.mjs +2 -4
- package/examples/component/helix/MainContainer.mjs +2 -4
- package/examples/component/splitter/MainContainer.mjs +0 -2
- package/examples/core/config/MainContainer.mjs +3 -5
- package/examples/dialog/MainContainer.mjs +3 -7
- package/examples/list/animate/MainContainer.mjs +2 -2
- package/examples/model/advanced/MainContainerController.mjs +0 -12
- package/examples/model/dialog/EditUserDialogController.mjs +1 -3
- package/examples/model/dialog/MainContainerController.mjs +1 -2
- package/examples/model/extendedClass/MainContainerController.mjs +0 -7
- package/examples/model/inline/MainContainerController.mjs +0 -7
- package/examples/model/inlineNoModel/MainContainerController.mjs +1 -6
- package/examples/model/multiWindow/EditUserDialogController.mjs +1 -3
- package/examples/model/multiWindow/MainContainerController.mjs +1 -3
- package/examples/model/multiWindow/ViewportController.mjs +3 -5
- package/examples/model/nestedData/MainContainerController.mjs +1 -8
- package/examples/tab/container/MainContainer.mjs +1 -6
- package/examples/todoList/version1/MainComponent.mjs +3 -3
- package/examples/todoList/version2/MainContainer.mjs +3 -3
- package/examples/todoList/version2/TodoList.mjs +1 -1
- package/examples/tree/MainContainer.mjs +0 -2
- package/package.json +7 -7
- package/src/Main.mjs +9 -18
- package/src/Neo.mjs +26 -26
- package/src/button/Menu.mjs +0 -1
- package/src/button/Split.mjs +2 -6
- package/src/calendar/store/Events.mjs +0 -1
- package/src/calendar/view/DayComponent.mjs +0 -1
- package/src/calendar/view/EditEventContainer.mjs +2 -9
- package/src/calendar/view/MainContainer.mjs +2 -17
- package/src/calendar/view/MainContainerModel.mjs +2 -4
- package/src/calendar/view/SettingsContainer.mjs +2 -6
- package/src/calendar/view/YearComponent.mjs +2 -11
- package/src/calendar/view/calendars/Container.mjs +0 -1
- package/src/calendar/view/calendars/EditContainer.mjs +2 -7
- package/src/calendar/view/calendars/List.mjs +0 -5
- package/src/calendar/view/month/Component.mjs +2 -14
- package/src/calendar/view/settings/GeneralContainer.mjs +0 -3
- package/src/calendar/view/settings/MonthContainer.mjs +0 -3
- package/src/calendar/view/settings/WeekContainer.mjs +0 -5
- package/src/calendar/view/settings/YearContainer.mjs +0 -3
- package/src/calendar/view/week/Component.mjs +2 -18
- package/src/calendar/view/week/EventDragZone.mjs +0 -3
- package/src/calendar/view/week/TimeAxisComponent.mjs +2 -3
- package/src/calendar/view/week/plugin/DragDrop.mjs +2 -12
- package/src/calendar/view/week/plugin/EventResizable.mjs +0 -3
- package/src/collection/Base.mjs +3 -22
- package/src/collection/Filter.mjs +0 -1
- package/src/collection/Sorter.mjs +0 -3
- package/src/component/Base.mjs +1 -3
- package/src/component/Chip.mjs +2 -4
- package/src/component/Circle.mjs +2 -20
- package/src/component/DateSelector.mjs +2 -15
- package/src/component/Gallery.mjs +2 -14
- package/src/component/Helix.mjs +2 -16
- package/src/component/Splitter.mjs +2 -5
- package/src/component/mwc/Button.mjs +2 -2
- package/src/component/mwc/TextField.mjs +2 -3
- package/src/component/wrapper/AmChart.mjs +1 -1
- package/src/component/wrapper/MapboxGL.mjs +0 -5
- package/src/container/Base.mjs +1 -7
- package/src/container/Panel.mjs +2 -5
- package/src/controller/Application.mjs +2 -3
- package/src/controller/Base.mjs +2 -3
- package/src/controller/Component.mjs +3 -6
- package/src/core/Base.mjs +26 -3
- package/src/core/Compare.mjs +0 -1
- package/src/core/IdGenerator.mjs +2 -4
- package/src/core/Observable.mjs +0 -3
- package/src/core/Util.mjs +0 -1
- package/src/core/_export.mjs +1 -2
- package/src/data/RecordFactory.mjs +1 -6
- package/src/data/Store.mjs +2 -12
- package/src/data/connection/Xhr.mjs +0 -6
- package/src/dialog/Base.mjs +2 -12
- package/src/draggable/DragProxyComponent.mjs +3 -5
- package/src/draggable/DragZone.mjs +2 -8
- package/src/draggable/DropZone.mjs +3 -9
- package/src/draggable/list/DragZone.mjs +3 -9
- package/src/draggable/tab/header/toolbar/SortZone.mjs +1 -3
- package/src/draggable/toolbar/DragZone.mjs +3 -7
- package/src/draggable/toolbar/SortZone.mjs +0 -5
- package/src/draggable/tree/DragZone.mjs +1 -4
- package/src/filter/BooleanContainer.mjs +0 -1
- package/src/filter/NumberContainer.mjs +0 -2
- package/src/filter/ToggleOperatorsButton.mjs +3 -5
- package/src/form/Container.mjs +0 -2
- package/src/form/Fieldset.mjs +0 -1
- package/src/form/field/Base.mjs +0 -2
- package/src/form/field/CheckBox.mjs +2 -7
- package/src/form/field/Color.mjs +2 -5
- package/src/form/field/Date.mjs +2 -6
- package/src/form/field/Display.mjs +2 -3
- package/src/form/field/Picker.mjs +0 -9
- package/src/form/field/Range.mjs +2 -3
- package/src/form/field/Select.mjs +24 -22
- package/src/form/field/Text.mjs +2 -17
- package/src/form/field/Time.mjs +2 -9
- package/src/form/field/trigger/Base.mjs +2 -4
- package/src/form/field/trigger/Clear.mjs +0 -3
- package/src/form/field/trigger/CopyToClipboard.mjs +0 -3
- package/src/form/field/trigger/Picker.mjs +0 -1
- package/src/form/field/trigger/SpinDown.mjs +0 -1
- package/src/form/field/trigger/SpinUp.mjs +0 -1
- package/src/form/field/trigger/SpinUpDown.mjs +0 -1
- package/src/form/field/trigger/Time.mjs +2 -3
- package/src/grid/Container.mjs +3 -6
- package/src/grid/header/Toolbar.mjs +1 -5
- package/src/list/Base.mjs +2 -2
- package/src/list/Color.mjs +0 -3
- package/src/list/Component.mjs +0 -3
- package/src/list/plugin/Animate.mjs +2 -3
- package/src/main/DomAccess.mjs +9 -24
- package/src/main/DomEvents.mjs +44 -77
- package/src/main/addon/AmCharts.mjs +3 -12
- package/src/main/addon/AnalyticsByGoogle.mjs +3 -4
- package/src/main/addon/CloneNode.mjs +0 -2
- package/src/main/addon/Cookie.mjs +0 -3
- package/src/main/addon/DragDrop.mjs +2 -11
- package/src/main/addon/HighlightJS.mjs +3 -7
- package/src/main/addon/MapboxGL.mjs +4 -16
- package/src/main/addon/Markdown.mjs +3 -3
- package/src/main/addon/Mwc.mjs +0 -2
- package/src/main/addon/Siesta.mjs +2 -3
- package/src/main/addon/Stylesheet.mjs +2 -6
- package/src/main/addon/WindowPosition.mjs +3 -8
- package/src/main/draggable/sensor/Mouse.mjs +2 -6
- package/src/main/draggable/sensor/Touch.mjs +2 -6
- package/src/main/mixin/DeltaUpdates.mjs +0 -8
- package/src/main/mixin/TouchDomEvents.mjs +1 -7
- package/src/manager/Base.mjs +0 -2
- package/src/manager/Component.mjs +2 -5
- package/src/manager/DomEvent.mjs +1 -6
- package/src/manager/Focus.mjs +0 -7
- package/src/manager/Instance.mjs +2 -3
- package/src/manager/Store.mjs +0 -4
- package/src/menu/List.mjs +0 -6
- package/src/model/Component.mjs +2 -3
- package/src/plugin/Base.mjs +2 -3
- package/src/plugin/Resizable.mjs +2 -10
- package/src/selection/CircleModel.mjs +1 -5
- package/src/selection/DateSelectorModel.mjs +1 -9
- package/src/selection/GalleryModel.mjs +0 -9
- package/src/selection/HelixModel.mjs +0 -9
- package/src/selection/ListModel.mjs +0 -8
- package/src/selection/Model.mjs +0 -8
- package/src/selection/menu/ListModel.mjs +0 -2
- package/src/selection/table/CellColumnModel.mjs +2 -6
- package/src/selection/table/CellColumnRowModel.mjs +2 -6
- package/src/selection/table/CellModel.mjs +0 -8
- package/src/selection/table/CellRowModel.mjs +2 -8
- package/src/selection/table/ColumnModel.mjs +0 -6
- package/src/selection/table/RowModel.mjs +0 -5
- package/src/tab/Container.mjs +0 -6
- package/src/tab/header/Button.mjs +1 -2
- package/src/tab/header/Toolbar.mjs +0 -1
- package/src/table/Container.mjs +2 -10
- package/src/table/View.mjs +0 -4
- package/src/table/header/Button.mjs +2 -8
- package/src/table/header/Toolbar.mjs +1 -2
- package/src/tree/List.mjs +0 -4
- package/src/util/Css.mjs +0 -1
- package/src/util/Date.mjs +0 -2
- package/src/util/Function.mjs +0 -2
- package/src/util/HashHistory.mjs +0 -3
- package/src/util/KeyNavigation.mjs +0 -5
- package/src/{core → util}/Logger.mjs +7 -19
- package/src/util/Matrix.mjs +0 -3
- package/src/util/VDom.mjs +0 -5
- package/src/util/_export.mjs +2 -1
- package/src/vdom/Helper.mjs +0 -3
- package/src/vdom/VNode.mjs +0 -1
- package/src/worker/App.mjs +2 -9
- package/src/worker/Base.mjs +2 -8
- package/src/worker/Canvas.mjs +0 -2
- package/src/worker/Manager.mjs +3 -5
- package/src/worker/Message.mjs +0 -1
- package/src/worker/mixin/RemoteMethodAccess.mjs +0 -3
- package/test/siesta/siesta.js +2 -1
- package/test/siesta/tests/ClassConfigsAndFields.mjs +307 -0
- package/test/siesta/tests/ClassSystem.mjs +1 -1
|
@@ -69,11 +69,10 @@ class Splitter extends Component {
|
|
|
69
69
|
}}
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
73
72
|
* @param {Object} config
|
|
74
73
|
*/
|
|
75
|
-
|
|
76
|
-
super(config);
|
|
74
|
+
construct(config) {
|
|
75
|
+
super.construct(config);
|
|
77
76
|
|
|
78
77
|
let me = this,
|
|
79
78
|
domListeners = me.domListeners;
|
|
@@ -142,7 +141,6 @@ class Splitter extends Component {
|
|
|
142
141
|
}
|
|
143
142
|
|
|
144
143
|
/**
|
|
145
|
-
*
|
|
146
144
|
* @param data
|
|
147
145
|
*/
|
|
148
146
|
onDragEnd(data) {
|
|
@@ -201,7 +199,6 @@ class Splitter extends Component {
|
|
|
201
199
|
}
|
|
202
200
|
|
|
203
201
|
/**
|
|
204
|
-
*
|
|
205
202
|
* @param data
|
|
206
203
|
*/
|
|
207
204
|
onDragStart(data) {
|
|
@@ -58,8 +58,8 @@ class Button extends Component {
|
|
|
58
58
|
/**
|
|
59
59
|
* @param {Object} config
|
|
60
60
|
*/
|
|
61
|
-
|
|
62
|
-
super(config);
|
|
61
|
+
construct(config) {
|
|
62
|
+
super.construct(config);
|
|
63
63
|
|
|
64
64
|
if (!Neo.config.mainThreadAddons.includes('Mwc')) {
|
|
65
65
|
console.error('Please include "Mwc" into the mainThreadAddons of your neo-config.json file.');
|
|
@@ -65,8 +65,8 @@ class TextField extends Component {
|
|
|
65
65
|
/**
|
|
66
66
|
* @param {Object} config
|
|
67
67
|
*/
|
|
68
|
-
|
|
69
|
-
super(config);
|
|
68
|
+
construct(config) {
|
|
69
|
+
super.construct(config);
|
|
70
70
|
|
|
71
71
|
if (!Neo.config.mainThreadAddons.includes('Mwc')) {
|
|
72
72
|
console.error('Please include "Mwc" into the mainThreadAddons of your neo-config.json file.');
|
|
@@ -206,7 +206,6 @@ class TextField extends Component {
|
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
/**
|
|
209
|
-
*
|
|
210
209
|
* @param {Object} data
|
|
211
210
|
* @param {Neo.component.mwc.TextField} data.component
|
|
212
211
|
* @param {Object[]} data.path
|
|
@@ -278,7 +278,6 @@ class MapboxGL extends Component {
|
|
|
278
278
|
}
|
|
279
279
|
|
|
280
280
|
/**
|
|
281
|
-
*
|
|
282
281
|
* @param {Object[]} data
|
|
283
282
|
* @returns {Object} Object matching the geojson format
|
|
284
283
|
*/
|
|
@@ -313,7 +312,6 @@ class MapboxGL extends Component {
|
|
|
313
312
|
}
|
|
314
313
|
|
|
315
314
|
/**
|
|
316
|
-
*
|
|
317
315
|
* @param {Object} value
|
|
318
316
|
* @param {Number} value.lat
|
|
319
317
|
* @param {Number} value.lng
|
|
@@ -350,7 +348,6 @@ class MapboxGL extends Component {
|
|
|
350
348
|
}
|
|
351
349
|
|
|
352
350
|
/**
|
|
353
|
-
*
|
|
354
351
|
* @param {Object} data
|
|
355
352
|
* @param {String} data.layerId
|
|
356
353
|
* @param {Object} data.options
|
|
@@ -368,7 +365,6 @@ class MapboxGL extends Component {
|
|
|
368
365
|
}
|
|
369
366
|
|
|
370
367
|
/**
|
|
371
|
-
*
|
|
372
368
|
* @param {Object} data
|
|
373
369
|
* @param {String} data.layerId
|
|
374
370
|
* @param {String} data.key
|
|
@@ -388,7 +384,6 @@ class MapboxGL extends Component {
|
|
|
388
384
|
}
|
|
389
385
|
|
|
390
386
|
/**
|
|
391
|
-
*
|
|
392
387
|
* @param {Object} data
|
|
393
388
|
* @param {String} data.layerId
|
|
394
389
|
* @param {String} data.key
|
package/src/container/Base.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import LayoutCard from '../layout/Card.mjs';
|
|
|
4
4
|
import LayoutFit from '../layout/Fit.mjs';
|
|
5
5
|
import LayoutHbox from '../layout/HBox.mjs';
|
|
6
6
|
import LayoutVBox from '../layout/VBox.mjs';
|
|
7
|
-
import Logger from '../
|
|
7
|
+
import Logger from '../util/Logger.mjs';
|
|
8
8
|
import NeoArray from '../util/Array.mjs';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -109,7 +109,6 @@ class Base extends Component {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
/**
|
|
112
|
-
*
|
|
113
112
|
* @param {Neo.layout.Base} value
|
|
114
113
|
* @param {Neo.layout.Base} oldValue
|
|
115
114
|
* @protected
|
|
@@ -171,7 +170,6 @@ class Base extends Component {
|
|
|
171
170
|
}
|
|
172
171
|
|
|
173
172
|
/**
|
|
174
|
-
*
|
|
175
173
|
* @param {Object|String} value
|
|
176
174
|
* @returns {Neo.layout.Base}
|
|
177
175
|
* @protected
|
|
@@ -181,7 +179,6 @@ class Base extends Component {
|
|
|
181
179
|
}
|
|
182
180
|
|
|
183
181
|
/**
|
|
184
|
-
*
|
|
185
182
|
* @param {*} item
|
|
186
183
|
* @param {Number} index
|
|
187
184
|
* @returns {Neo.component.Base|Object} Object for lazy loaded items
|
|
@@ -254,7 +251,6 @@ class Base extends Component {
|
|
|
254
251
|
}
|
|
255
252
|
|
|
256
253
|
/**
|
|
257
|
-
*
|
|
258
254
|
* @protected
|
|
259
255
|
*/
|
|
260
256
|
createItems() {
|
|
@@ -280,7 +276,6 @@ class Base extends Component {
|
|
|
280
276
|
}
|
|
281
277
|
|
|
282
278
|
/**
|
|
283
|
-
*
|
|
284
279
|
* @param {Object|String|Neo.layout.Base} value
|
|
285
280
|
* @protected
|
|
286
281
|
* @returns {Neo.layout.Base}
|
|
@@ -456,7 +451,6 @@ class Base extends Component {
|
|
|
456
451
|
}
|
|
457
452
|
|
|
458
453
|
/**
|
|
459
|
-
*
|
|
460
454
|
* @param {Object|String} config
|
|
461
455
|
* @protected
|
|
462
456
|
* @returns {Object} layoutConfig
|
package/src/container/Panel.mjs
CHANGED
|
@@ -48,11 +48,10 @@ class Panel extends Container {
|
|
|
48
48
|
}}
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
52
51
|
* @param {Object} config
|
|
53
52
|
*/
|
|
54
|
-
|
|
55
|
-
super(config);
|
|
53
|
+
construct(config) {
|
|
54
|
+
super.construct(config);
|
|
56
55
|
|
|
57
56
|
let me = this;
|
|
58
57
|
|
|
@@ -65,7 +64,6 @@ class Panel extends Container {
|
|
|
65
64
|
}
|
|
66
65
|
|
|
67
66
|
/**
|
|
68
|
-
*
|
|
69
67
|
* @param {Object} header the header config
|
|
70
68
|
* @returns {Object}
|
|
71
69
|
*/
|
|
@@ -178,7 +176,6 @@ class Panel extends Container {
|
|
|
178
176
|
}
|
|
179
177
|
|
|
180
178
|
/**
|
|
181
|
-
*
|
|
182
179
|
* @returns {Boolean}
|
|
183
180
|
*/
|
|
184
181
|
hasHeaders() {
|
|
@@ -46,16 +46,15 @@ class Application extends Base {
|
|
|
46
46
|
}}
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
50
49
|
* @param {Object} config
|
|
51
50
|
*/
|
|
52
|
-
|
|
51
|
+
construct(config) {
|
|
53
52
|
// to guarantee that the main view can access Neo.apps at any point,
|
|
54
53
|
// we need to trigger its assignment at the end of the ctor.
|
|
55
54
|
let mainView = config.mainView;
|
|
56
55
|
delete config.mainView;
|
|
57
56
|
|
|
58
|
-
super(config);
|
|
57
|
+
super.construct(config);
|
|
59
58
|
|
|
60
59
|
let me = this;
|
|
61
60
|
|
package/src/controller/Base.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Base from './Base.mjs';
|
|
2
2
|
import ComponentManager from '../manager/Component.mjs';
|
|
3
3
|
import DomEventManager from '../manager/DomEvent.mjs';
|
|
4
|
-
import Logger from '../
|
|
4
|
+
import Logger from '../util/Logger.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @class Neo.controller.Component
|
|
@@ -36,11 +36,10 @@ class Component extends Base {
|
|
|
36
36
|
}}
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
40
39
|
* @param {Object} config
|
|
41
40
|
*/
|
|
42
|
-
|
|
43
|
-
super(config);
|
|
41
|
+
construct(config) {
|
|
42
|
+
super.construct(config);
|
|
44
43
|
|
|
45
44
|
let me = this,
|
|
46
45
|
component = me.component,
|
|
@@ -69,7 +68,6 @@ class Component extends Base {
|
|
|
69
68
|
}
|
|
70
69
|
|
|
71
70
|
/**
|
|
72
|
-
*
|
|
73
71
|
* @param {String} handlerName
|
|
74
72
|
* @returns {Neo.controller.Component|null}
|
|
75
73
|
*/
|
|
@@ -137,7 +135,6 @@ class Component extends Base {
|
|
|
137
135
|
onComponentConstructed() {}
|
|
138
136
|
|
|
139
137
|
/**
|
|
140
|
-
*
|
|
141
138
|
* @param {Neo.component.Base} [component=this.component]
|
|
142
139
|
*/
|
|
143
140
|
parseConfig(component=this.component) {
|
package/src/core/Base.mjs
CHANGED
|
@@ -74,7 +74,7 @@ class Base {
|
|
|
74
74
|
* Applies the observable mixin if needed, grants remote access if needed.
|
|
75
75
|
* @param {Object} config={}
|
|
76
76
|
*/
|
|
77
|
-
|
|
77
|
+
construct(config={}) {
|
|
78
78
|
let me = this;
|
|
79
79
|
|
|
80
80
|
Object.defineProperties(me, {
|
|
@@ -99,6 +99,9 @@ class Base {
|
|
|
99
99
|
|
|
100
100
|
me.getStaticConfig('observable') && me.initObservable(config);
|
|
101
101
|
|
|
102
|
+
// assign class field values prior to configs
|
|
103
|
+
config = me.setFields(config);
|
|
104
|
+
|
|
102
105
|
me.initConfig(config);
|
|
103
106
|
|
|
104
107
|
Object.defineProperty(me, 'configsApplied', {
|
|
@@ -148,7 +151,7 @@ class Base {
|
|
|
148
151
|
let values = Array.isArray(staticName) ? staticName : this.getStaticConfig(staticName);
|
|
149
152
|
|
|
150
153
|
if (!values.includes(value)) {
|
|
151
|
-
|
|
154
|
+
console.error(`Supported values for ${name} are: ${values.join(', ')}`, this);
|
|
152
155
|
return oldValue;
|
|
153
156
|
}
|
|
154
157
|
|
|
@@ -350,7 +353,6 @@ class Base {
|
|
|
350
353
|
}
|
|
351
354
|
|
|
352
355
|
/**
|
|
353
|
-
*
|
|
354
356
|
* @param {String} className
|
|
355
357
|
* @param {Object} remote
|
|
356
358
|
*/
|
|
@@ -377,6 +379,8 @@ class Base {
|
|
|
377
379
|
set(values={}) {
|
|
378
380
|
let me = this;
|
|
379
381
|
|
|
382
|
+
values = me.setFields(values);
|
|
383
|
+
|
|
380
384
|
// If the initial config processing is still running,
|
|
381
385
|
// finish this one first before dropping new values into the configSymbol.
|
|
382
386
|
// see: https://github.com/neomjs/neo/issues/2201
|
|
@@ -389,6 +393,25 @@ class Base {
|
|
|
389
393
|
me.processConfigs(true);
|
|
390
394
|
}
|
|
391
395
|
|
|
396
|
+
/**
|
|
397
|
+
* We want to assign class fields first and remove them from the config object,
|
|
398
|
+
* so that afterSet(), beforeGet() and beforeSet() methods can get the new values right away
|
|
399
|
+
* @param {Object} config
|
|
400
|
+
* @returns {Object}
|
|
401
|
+
*/
|
|
402
|
+
setFields(config) {
|
|
403
|
+
let configNames = this.constructor.config;
|
|
404
|
+
|
|
405
|
+
Object.entries(config).forEach(([key, value]) => {
|
|
406
|
+
if (!configNames.hasOwnProperty(key) && !Neo.hasPropertySetter(this, key)) {
|
|
407
|
+
this[key] = value;
|
|
408
|
+
delete config[key];
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
|
|
412
|
+
return config;
|
|
413
|
+
}
|
|
414
|
+
|
|
392
415
|
/**
|
|
393
416
|
* Sets the value of a static config by a given key
|
|
394
417
|
* @param {String} key The key of a staticConfig defined inside static getStaticConfig
|
package/src/core/Compare.mjs
CHANGED
package/src/core/IdGenerator.mjs
CHANGED
|
@@ -40,10 +40,9 @@ class IdGenerator {
|
|
|
40
40
|
}}
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
44
43
|
* @param config
|
|
45
44
|
*/
|
|
46
|
-
|
|
45
|
+
construct(config) {
|
|
47
46
|
let me = this;
|
|
48
47
|
|
|
49
48
|
me.idCounter = {};
|
|
@@ -53,7 +52,6 @@ class IdGenerator {
|
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
/**
|
|
56
|
-
*
|
|
57
55
|
* @param name
|
|
58
56
|
* @returns {string}
|
|
59
57
|
*/
|
|
@@ -82,4 +80,4 @@ let instance = Neo.create(IdGenerator);
|
|
|
82
80
|
|
|
83
81
|
Neo.applyToGlobalNs(instance);
|
|
84
82
|
|
|
85
|
-
export default instance;
|
|
83
|
+
export default instance;
|
package/src/core/Observable.mjs
CHANGED
|
@@ -24,7 +24,6 @@ class Observable extends Base {
|
|
|
24
24
|
}}
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
27
|
* @param {Object|String} name
|
|
29
28
|
* @param {Object} [opts]
|
|
30
29
|
* @param {Object} [scope]
|
|
@@ -93,7 +92,6 @@ class Observable extends Base {
|
|
|
93
92
|
}
|
|
94
93
|
|
|
95
94
|
/**
|
|
96
|
-
*
|
|
97
95
|
* @param name
|
|
98
96
|
*/
|
|
99
97
|
fire(name) {
|
|
@@ -166,7 +164,6 @@ class Observable extends Base {
|
|
|
166
164
|
}
|
|
167
165
|
|
|
168
166
|
/**
|
|
169
|
-
*
|
|
170
167
|
* @param {Object|String} name
|
|
171
168
|
* @param {String} [eventId]
|
|
172
169
|
*/
|
package/src/core/Util.mjs
CHANGED
package/src/core/_export.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import Base from './Base.mjs';
|
|
2
2
|
import Compare from './Compare.mjs';
|
|
3
3
|
import IdGenerator from './IdGenerator.mjs';
|
|
4
|
-
import Logger from './Logger.mjs';
|
|
5
4
|
import Observable from './Observable.mjs';
|
|
6
5
|
import Util from './Util.mjs';
|
|
7
6
|
|
|
8
|
-
export {Base, Compare, IdGenerator,
|
|
7
|
+
export {Base, Compare, IdGenerator, Observable, Util};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Base from '../core/Base.mjs';
|
|
2
|
-
import Logger from '../
|
|
2
|
+
import Logger from '../util/Logger.mjs';
|
|
3
3
|
import Model from './Model.mjs';
|
|
4
4
|
|
|
5
5
|
let instance;
|
|
@@ -34,7 +34,6 @@ class RecordFactory extends Base {
|
|
|
34
34
|
}}
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
38
37
|
* @param {Neo.data.Model} model
|
|
39
38
|
* @param {Object} config
|
|
40
39
|
* @returns {Object}
|
|
@@ -50,7 +49,6 @@ class RecordFactory extends Base {
|
|
|
50
49
|
}
|
|
51
50
|
|
|
52
51
|
/**
|
|
53
|
-
*
|
|
54
52
|
* @param {Neo.data.Model} model
|
|
55
53
|
* @returns {Object}
|
|
56
54
|
*/
|
|
@@ -156,7 +154,6 @@ class RecordFactory extends Base {
|
|
|
156
154
|
}
|
|
157
155
|
|
|
158
156
|
/**
|
|
159
|
-
*
|
|
160
157
|
* @param {Object} record
|
|
161
158
|
* @param {Boolean} trackModifiedFields
|
|
162
159
|
* @returns {Boolean} true in case a change was found
|
|
@@ -183,7 +180,6 @@ class RecordFactory extends Base {
|
|
|
183
180
|
}
|
|
184
181
|
|
|
185
182
|
/**
|
|
186
|
-
*
|
|
187
183
|
* @param {Object} record
|
|
188
184
|
* @param {String} fieldName
|
|
189
185
|
* @returns {Boolean|null} null in case the model does not use trackModifiedFields, true in case a change was found
|
|
@@ -240,7 +236,6 @@ class RecordFactory extends Base {
|
|
|
240
236
|
}
|
|
241
237
|
|
|
242
238
|
/**
|
|
243
|
-
*
|
|
244
239
|
* @param {Neo.data.Model} model
|
|
245
240
|
* @param {Object} record
|
|
246
241
|
* @param {Object} fields
|
package/src/data/Store.mjs
CHANGED
|
@@ -77,11 +77,10 @@ class Store extends Base {
|
|
|
77
77
|
}}
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
81
80
|
* @param {Object} config
|
|
82
81
|
*/
|
|
83
|
-
|
|
84
|
-
super(config);
|
|
82
|
+
construct(config) {
|
|
83
|
+
super.construct(config);
|
|
85
84
|
|
|
86
85
|
let me = this;
|
|
87
86
|
|
|
@@ -103,7 +102,6 @@ class Store extends Base {
|
|
|
103
102
|
}
|
|
104
103
|
|
|
105
104
|
/**
|
|
106
|
-
*
|
|
107
105
|
* @param value
|
|
108
106
|
* @param oldValue
|
|
109
107
|
* @protected
|
|
@@ -125,7 +123,6 @@ class Store extends Base {
|
|
|
125
123
|
}
|
|
126
124
|
|
|
127
125
|
/**
|
|
128
|
-
*
|
|
129
126
|
* @param value
|
|
130
127
|
* @param oldValue
|
|
131
128
|
* @protected
|
|
@@ -135,7 +132,6 @@ class Store extends Base {
|
|
|
135
132
|
}
|
|
136
133
|
|
|
137
134
|
/**
|
|
138
|
-
*
|
|
139
135
|
* @param value
|
|
140
136
|
* @param oldValue
|
|
141
137
|
* @protected
|
|
@@ -148,7 +144,6 @@ class Store extends Base {
|
|
|
148
144
|
}
|
|
149
145
|
|
|
150
146
|
/**
|
|
151
|
-
*
|
|
152
147
|
* @param value
|
|
153
148
|
* @param oldValue
|
|
154
149
|
* @protected
|
|
@@ -178,7 +173,6 @@ class Store extends Base {
|
|
|
178
173
|
}
|
|
179
174
|
|
|
180
175
|
/**
|
|
181
|
-
*
|
|
182
176
|
* @param value
|
|
183
177
|
* @param oldValue
|
|
184
178
|
* @protected
|
|
@@ -193,7 +187,6 @@ class Store extends Base {
|
|
|
193
187
|
}
|
|
194
188
|
|
|
195
189
|
/**
|
|
196
|
-
*
|
|
197
190
|
* @param {Neo.data.Model} value
|
|
198
191
|
* @param {Neo.data.Model} oldValue
|
|
199
192
|
* @protected
|
|
@@ -208,7 +201,6 @@ class Store extends Base {
|
|
|
208
201
|
}
|
|
209
202
|
|
|
210
203
|
/**
|
|
211
|
-
*
|
|
212
204
|
* @param {Object} config
|
|
213
205
|
*/
|
|
214
206
|
createRecord(config) {
|
|
@@ -229,7 +221,6 @@ class Store extends Base {
|
|
|
229
221
|
}
|
|
230
222
|
|
|
231
223
|
/**
|
|
232
|
-
*
|
|
233
224
|
* @param {Object} opts
|
|
234
225
|
*/
|
|
235
226
|
onCollectionMutate(opts) {
|
|
@@ -288,7 +279,6 @@ class Store extends Base {
|
|
|
288
279
|
}
|
|
289
280
|
|
|
290
281
|
/**
|
|
291
|
-
*
|
|
292
282
|
* @param {Object} opts
|
|
293
283
|
* @param {String} opts.direction
|
|
294
284
|
* @param {String} opts.property
|
|
@@ -55,7 +55,6 @@ class Xhr extends Base {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
|
-
*
|
|
59
58
|
* @param {Object} e
|
|
60
59
|
*/
|
|
61
60
|
onError(e) {
|
|
@@ -74,7 +73,6 @@ class Xhr extends Base {
|
|
|
74
73
|
}
|
|
75
74
|
|
|
76
75
|
/**
|
|
77
|
-
*
|
|
78
76
|
* @param {Object} e
|
|
79
77
|
*/
|
|
80
78
|
onLoad(e) {
|
|
@@ -100,7 +98,6 @@ class Xhr extends Base {
|
|
|
100
98
|
}
|
|
101
99
|
|
|
102
100
|
/**
|
|
103
|
-
*
|
|
104
101
|
* @param {Object} opts
|
|
105
102
|
* @returns {Promise<any>}
|
|
106
103
|
*/
|
|
@@ -130,7 +127,6 @@ class Xhr extends Base {
|
|
|
130
127
|
}
|
|
131
128
|
|
|
132
129
|
/**
|
|
133
|
-
*
|
|
134
130
|
* @param {Object} opts
|
|
135
131
|
* @returns {Promise<any>}
|
|
136
132
|
*/
|
|
@@ -150,7 +146,6 @@ class Xhr extends Base {
|
|
|
150
146
|
}
|
|
151
147
|
|
|
152
148
|
/**
|
|
153
|
-
*
|
|
154
149
|
* @param {Object} opts
|
|
155
150
|
* @param {Function} opts.callback
|
|
156
151
|
* @param {Object} opts.data
|
|
@@ -213,7 +208,6 @@ class Xhr extends Base {
|
|
|
213
208
|
}
|
|
214
209
|
|
|
215
210
|
/**
|
|
216
|
-
*
|
|
217
211
|
* @param form
|
|
218
212
|
* @param {Object} opts
|
|
219
213
|
* @returns {XMLHttpRequest}
|
package/src/dialog/Base.mjs
CHANGED
|
@@ -123,11 +123,10 @@ class Base extends Panel {
|
|
|
123
123
|
}}
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
|
-
*
|
|
127
126
|
* @param {Object} config
|
|
128
127
|
*/
|
|
129
|
-
|
|
130
|
-
super(config);
|
|
128
|
+
construct(config) {
|
|
129
|
+
super.construct(config);
|
|
131
130
|
|
|
132
131
|
let me = this;
|
|
133
132
|
|
|
@@ -383,7 +382,6 @@ class Base extends Panel {
|
|
|
383
382
|
}
|
|
384
383
|
|
|
385
384
|
/**
|
|
386
|
-
*
|
|
387
385
|
* @param {Boolean} [animate=!!this.animateTargetId]
|
|
388
386
|
*/
|
|
389
387
|
close(animate=!!this.animateTargetId) {
|
|
@@ -398,7 +396,6 @@ class Base extends Panel {
|
|
|
398
396
|
}
|
|
399
397
|
|
|
400
398
|
/**
|
|
401
|
-
*
|
|
402
399
|
* @param {Boolean} [animate=!!this.animateTargetId]
|
|
403
400
|
*/
|
|
404
401
|
closeOrHide(animate=!!this.animateTargetId) {
|
|
@@ -453,7 +450,6 @@ class Base extends Panel {
|
|
|
453
450
|
}
|
|
454
451
|
|
|
455
452
|
/**
|
|
456
|
-
*
|
|
457
453
|
* @returns {Object} vdom
|
|
458
454
|
*/
|
|
459
455
|
getProxyVdom() {
|
|
@@ -467,7 +463,6 @@ class Base extends Panel {
|
|
|
467
463
|
}
|
|
468
464
|
|
|
469
465
|
/**
|
|
470
|
-
*
|
|
471
466
|
* @returns {Object} The new vdom root
|
|
472
467
|
*/
|
|
473
468
|
getVdomRoot() {
|
|
@@ -475,7 +470,6 @@ class Base extends Panel {
|
|
|
475
470
|
}
|
|
476
471
|
|
|
477
472
|
/**
|
|
478
|
-
*
|
|
479
473
|
* @returns {Object} The new vnode root
|
|
480
474
|
*/
|
|
481
475
|
getVnodeRoot() {
|
|
@@ -491,7 +485,6 @@ class Base extends Panel {
|
|
|
491
485
|
}
|
|
492
486
|
|
|
493
487
|
/**
|
|
494
|
-
*
|
|
495
488
|
* @param {Boolean} [animate=!!this.animateTargetId]
|
|
496
489
|
*/
|
|
497
490
|
hide(animate=!!this.animateTargetId) {
|
|
@@ -530,7 +523,6 @@ class Base extends Panel {
|
|
|
530
523
|
}
|
|
531
524
|
|
|
532
525
|
/**
|
|
533
|
-
*
|
|
534
526
|
* @param data
|
|
535
527
|
*/
|
|
536
528
|
onDragEnd(data) {
|
|
@@ -587,7 +579,6 @@ class Base extends Panel {
|
|
|
587
579
|
}
|
|
588
580
|
|
|
589
581
|
/**
|
|
590
|
-
*
|
|
591
582
|
* @param data
|
|
592
583
|
*/
|
|
593
584
|
onDragStart(data) {
|
|
@@ -634,7 +625,6 @@ class Base extends Panel {
|
|
|
634
625
|
}
|
|
635
626
|
|
|
636
627
|
/**
|
|
637
|
-
*
|
|
638
628
|
* @param {Boolean} [animate=!!this.animateTargetId]
|
|
639
629
|
*/
|
|
640
630
|
show(animate=!!this.animateTargetId) {
|
|
@@ -35,11 +35,10 @@ class DragProxyComponent extends Base {
|
|
|
35
35
|
}}
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
39
38
|
* @param {Object} config
|
|
40
39
|
*/
|
|
41
|
-
|
|
42
|
-
super(config);
|
|
40
|
+
construct(config) {
|
|
41
|
+
super.construct(config);
|
|
43
42
|
|
|
44
43
|
let me = this;
|
|
45
44
|
|
|
@@ -47,7 +46,6 @@ class DragProxyComponent extends Base {
|
|
|
47
46
|
}
|
|
48
47
|
|
|
49
48
|
/**
|
|
50
|
-
*
|
|
51
49
|
* @param {String} id
|
|
52
50
|
*/
|
|
53
51
|
onMounted(id) {
|
|
@@ -62,4 +60,4 @@ class DragProxyComponent extends Base {
|
|
|
62
60
|
|
|
63
61
|
Neo.applyClassConfig(DragProxyComponent);
|
|
64
62
|
|
|
65
|
-
export {DragProxyComponent as default};
|
|
63
|
+
export {DragProxyComponent as default};
|