neo.mjs 8.0.0-alpha.2 → 8.0.0-beta.2
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/.github/CODING_GUIDELINES.md +5 -5
- package/.github/CONCEPT.md +10 -10
- package/apps/ServiceWorker.mjs +2 -2
- package/apps/colors/view/Viewport.mjs +9 -9
- package/apps/colors/view/ViewportController.mjs +13 -13
- package/apps/colors/view/{ViewportModel.mjs → ViewportStateProvider.mjs} +8 -8
- package/apps/covid/view/MainContainer.mjs +22 -22
- package/apps/covid/view/MainContainerController.mjs +8 -10
- package/apps/covid/view/{MainContainerModel.mjs → MainContainerStateProvider.mjs} +7 -7
- package/apps/covid/view/TableContainer.mjs +2 -2
- package/apps/covid/view/TableContainerController.mjs +1 -1
- package/apps/form/view/FormContainerController.mjs +2 -2
- package/apps/form/view/SideNavList.mjs +3 -3
- package/apps/form/view/Viewport.mjs +7 -7
- package/apps/form/view/ViewportController.mjs +4 -4
- package/apps/form/view/{ViewportModel.mjs → ViewportStateProvider.mjs} +8 -8
- package/apps/portal/index.html +1 -1
- package/apps/portal/resources/data/examples_devmode.json +3 -3
- package/apps/portal/resources/data/examples_dist_dev.json +3 -3
- package/apps/portal/resources/data/examples_dist_prod.json +3 -3
- package/apps/portal/view/Viewport.mjs +12 -12
- package/apps/portal/view/ViewportController.mjs +2 -2
- package/apps/portal/view/ViewportStateProvider.mjs +27 -0
- package/apps/portal/view/examples/TabContainer.mjs +11 -11
- package/apps/portal/view/home/FooterContainer.mjs +1 -1
- package/apps/portal/view/home/parts/MainNeo.mjs +6 -2
- package/apps/portal/view/learn/ContentComponent.mjs +2 -2
- package/apps/portal/view/learn/ContentTreeList.mjs +1 -1
- package/apps/portal/view/learn/MainContainer.mjs +9 -9
- package/apps/portal/view/learn/MainContainerController.mjs +12 -12
- package/apps/portal/view/learn/{MainContainerModel.mjs → MainContainerStateProvider.mjs} +7 -7
- package/apps/portal/view/learn/PageSectionsList.mjs +1 -1
- package/apps/realworld/view/article/CreateComponent.mjs +1 -1
- package/apps/realworld2/view/HomeContainer.mjs +7 -7
- package/apps/sharedcovid/view/GalleryContainer.mjs +2 -2
- package/apps/sharedcovid/view/HelixContainer.mjs +2 -2
- package/apps/sharedcovid/view/MainContainer.mjs +25 -25
- package/apps/sharedcovid/view/MainContainerController.mjs +10 -11
- package/apps/sharedcovid/view/{MainContainerModel.mjs → MainContainerStateProvider.mjs} +8 -8
- package/apps/sharedcovid/view/TableContainer.mjs +2 -2
- package/apps/sharedcovid/view/TableContainerController.mjs +1 -1
- package/apps/sharedcovid/view/mapboxGl/Container.mjs +2 -2
- package/buildScripts/createApp.mjs +2 -2
- package/buildScripts/createClass.mjs +15 -17
- package/buildScripts/createComponent.mjs +4 -4
- package/docs/app/view/ContentTabContainer.mjs +1 -1
- package/docs/app/view/MainContainer.mjs +3 -3
- package/docs/app/view/MainContainerController.mjs +15 -15
- package/examples/ServiceWorker.mjs +2 -2
- package/examples/component/mwc/buttons/MainContainer.mjs +2 -2
- package/examples/component/mwc/textFields/MainContainer.mjs +2 -2
- package/examples/fields/MainContainer.mjs +197 -228
- package/examples/preloadingAssets/view/MainContainer.mjs +2 -2
- package/examples/{model → stateProvider}/advanced/MainContainer.mjs +12 -12
- package/examples/{model → stateProvider}/advanced/MainContainerController.mjs +10 -10
- package/examples/stateProvider/advanced/app.mjs +6 -0
- package/examples/{model/dialog → stateProvider/advanced}/index.html +1 -1
- package/examples/{model/inline → stateProvider/advanced}/neo-config.json +1 -1
- package/examples/{model → stateProvider}/dialog/EditUserDialog.mjs +3 -3
- package/examples/{model → stateProvider}/dialog/EditUserDialogController.mjs +5 -5
- package/examples/{model → stateProvider}/dialog/MainContainer.mjs +7 -7
- package/examples/{model → stateProvider}/dialog/MainContainerController.mjs +5 -5
- package/examples/{model → stateProvider}/dialog/app.mjs +1 -1
- package/examples/{model/multiWindow2 → stateProvider/dialog}/index.html +1 -1
- package/examples/{model → stateProvider}/dialog/neo-config.json +1 -1
- package/examples/{model → stateProvider}/extendedClass/MainContainer.mjs +13 -13
- package/examples/{model/inline → stateProvider/extendedClass}/MainContainerController.mjs +7 -7
- package/examples/stateProvider/extendedClass/MainContainerStateProvider.mjs +24 -0
- package/examples/stateProvider/extendedClass/app.mjs +6 -0
- package/examples/stateProvider/extendedClass/index.html +11 -0
- package/examples/stateProvider/extendedClass/neo-config.json +7 -0
- package/examples/{model → stateProvider}/inline/MainContainer.mjs +10 -10
- package/examples/{model/extendedClass → stateProvider/inline}/MainContainerController.mjs +7 -7
- package/examples/{model/extendedClass → stateProvider/inline}/app.mjs +1 -1
- package/examples/{model/extendedClass → stateProvider/inline}/index.html +1 -1
- package/examples/{model/extendedClass → stateProvider/inline}/neo-config.json +1 -1
- package/examples/{model/inlineNoModel → stateProvider/inlineNoStateProvider}/MainContainer.mjs +4 -4
- package/examples/{model/inlineNoModel → stateProvider/inlineNoStateProvider}/MainContainerController.mjs +3 -3
- package/examples/stateProvider/inlineNoStateProvider/README.md +8 -0
- package/examples/stateProvider/inlineNoStateProvider/app.mjs +6 -0
- package/examples/{model/inline → stateProvider/inlineNoStateProvider}/index.html +1 -1
- package/examples/stateProvider/inlineNoStateProvider/neo-config.json +7 -0
- package/examples/{model → stateProvider}/multiWindow/EditUserDialog.mjs +3 -3
- package/examples/{model → stateProvider}/multiWindow/EditUserDialogController.mjs +5 -5
- package/examples/{model → stateProvider}/multiWindow/MainContainer.mjs +3 -3
- package/examples/{model → stateProvider}/multiWindow/MainContainerController.mjs +6 -6
- package/examples/{model → stateProvider}/multiWindow/Viewport.mjs +3 -3
- package/examples/{model → stateProvider}/multiWindow/ViewportController.mjs +14 -14
- package/examples/{model/multiWindow2 → stateProvider/multiWindow}/app.mjs +1 -1
- package/examples/{model/advanced → stateProvider/multiWindow}/index.html +1 -1
- package/examples/{model → stateProvider}/multiWindow/neo-config.json +1 -1
- package/examples/{model → stateProvider}/multiWindow2/Viewport.mjs +3 -3
- package/examples/{model/multiWindow → stateProvider/multiWindow2}/app.mjs +1 -1
- package/examples/{model/multiWindow → stateProvider/multiWindow2}/index.html +1 -1
- package/examples/{model → stateProvider}/multiWindow2/neo-config.json +1 -1
- package/examples/{model → stateProvider}/nestedData/MainContainer.mjs +9 -9
- package/examples/{model → stateProvider}/nestedData/MainContainerController.mjs +7 -7
- package/examples/stateProvider/nestedData/app.mjs +6 -0
- package/examples/stateProvider/nestedData/index.html +11 -0
- package/examples/stateProvider/nestedData/neo-config.json +7 -0
- package/examples/{model → stateProvider}/table/MainContainer.mjs +8 -8
- package/examples/stateProvider/table/MainContainerStateProvider.mjs +24 -0
- package/examples/{model → stateProvider}/table/MainModel.mjs +2 -2
- package/examples/{model → stateProvider}/table/MainStore.mjs +2 -2
- package/examples/{model/advanced → stateProvider/table}/app.mjs +1 -1
- package/examples/{model/advanced → stateProvider/table}/neo-config.json +1 -1
- package/examples/{model → stateProvider}/twoWay/MainContainer.mjs +9 -9
- package/examples/{model/inline → stateProvider/twoWay}/app.mjs +1 -1
- package/examples/stateProvider/twoWay/index.html +11 -0
- package/examples/{model → stateProvider}/twoWay/neo-config.json +1 -1
- package/examples/tab/container/MainContainer.mjs +7 -9
- package/examples/table/nestedRecordFields/EditUserDialog.mjs +3 -3
- package/examples/table/nestedRecordFields/MainContainer.mjs +8 -8
- package/examples/table/nestedRecordFields/{MainContainerModel.mjs → MainContainerStateProvider.mjs} +10 -10
- package/examples/tabs/MainContainer.mjs +3 -3
- package/examples/tabs/MainContainer2.mjs +4 -4
- package/examples/toolbar/paging/view/MainContainer.mjs +7 -7
- package/examples/toolbar/paging/view/{MainContainerModel.mjs → MainContainerStateProvider.mjs} +8 -8
- package/examples/treeAccordion/MainContainer.mjs +2 -2
- package/examples/videoMove/MainContainer.mjs +14 -7
- package/examples/viewport/MainContainer.mjs +3 -3
- package/package.json +6 -6
- package/resources/data/deck/learnneo/pages/benefits/FormsEngine.md +13 -13
- package/resources/data/deck/learnneo/pages/guides/{ViewModels.md → StateProviders.md} +52 -58
- package/resources/data/deck/learnneo/tree.json +46 -46
- package/resources/data/deck/training/pages/2022-12-27T21-55-23-144Z.md +2 -2
- package/resources/data/deck/training/pages/2022-12-28T17-11-34-653Z.md +6 -6
- package/resources/data/deck/training/pages/2022-12-29T18-36-08-226Z.md +2 -2
- package/resources/data/deck/training/pages/2022-12-29T18-36-56-893Z.md +2 -2
- package/resources/data/deck/training/pages/2022-12-29T20-37-08-919Z.md +2 -2
- package/resources/data/deck/training/pages/2022-12-29T20-37-20-344Z.md +2 -2
- package/resources/data/deck/training/pages/2023-01-01T21-11-58-025Z.md +3 -3
- package/resources/data/deck/training/pages/2023-01-16T20-24-09-690Z.md +4 -4
- package/resources/data/deck/training/pages/2023-02-05T17-44-53-815Z.md +3 -3
- package/resources/data/deck/training/pages/2023-02-05T17-45-40-114Z.md +1 -1
- package/src/DefaultConfig.mjs +2 -2
- package/src/button/Base.mjs +7 -7
- package/src/calendar/view/EditEventContainer.mjs +3 -3
- package/src/calendar/view/MainContainer.mjs +27 -27
- package/src/calendar/view/{MainContainerModel.mjs → MainContainerStateProvider.mjs} +7 -7
- package/src/calendar/view/SettingsContainer.mjs +13 -28
- package/src/calendar/view/YearComponent.mjs +5 -5
- package/src/calendar/view/calendars/ColorsList.mjs +5 -0
- package/src/calendar/view/calendars/EditContainer.mjs +1 -1
- package/src/calendar/view/calendars/List.mjs +1 -1
- package/src/calendar/view/month/Component.mjs +6 -6
- package/src/calendar/view/settings/GeneralContainer.mjs +2 -2
- package/src/calendar/view/week/Component.mjs +10 -10
- package/src/calendar/view/week/EventDragZone.mjs +1 -1
- package/src/code/LivePreview.mjs +10 -10
- package/src/component/Base.mjs +123 -105
- package/src/container/Base.mjs +4 -4
- package/src/controller/Component.mjs +29 -12
- package/src/core/Base.mjs +0 -1
- package/src/core/Compare.mjs +128 -83
- package/src/date/SelectorContainer.mjs +12 -12
- package/src/date/{SelectorContainerModel.mjs → SelectorContainerStateProvider.mjs} +7 -7
- package/src/form/field/Text.mjs +1 -1
- package/src/form/field/Time.mjs +5 -3
- package/src/form/field/trigger/Time.mjs +2 -1
- package/src/layout/Base.mjs +6 -6
- package/src/list/Base.mjs +7 -1
- package/src/list/Color.mjs +3 -3
- package/src/main/DomEvents.mjs +1 -1
- package/src/main/DomUtils.mjs +39 -36
- package/src/{model/Component.mjs → state/Provider.mjs} +67 -69
- package/src/tab/Container.mjs +3 -5
- package/src/toolbar/Base.mjs +26 -8
- package/src/tree/Accordion.mjs +15 -13
- package/src/util/VNode.mjs +6 -8
- package/src/worker/App.mjs +2 -2
- package/apps/portal/view/ViewportModel.mjs +0 -27
- package/examples/model/extendedClass/MainContainerModel.mjs +0 -24
- package/examples/model/inlineNoModel/README.md +0 -8
- package/examples/model/inlineNoModel/app.mjs +0 -6
- package/examples/model/inlineNoModel/index.html +0 -11
- package/examples/model/inlineNoModel/neo-config.json +0 -7
- package/examples/model/nestedData/app.mjs +0 -6
- package/examples/model/nestedData/index.html +0 -11
- package/examples/model/nestedData/neo-config.json +0 -7
- package/examples/model/table/MainContainerModel.mjs +0 -24
- package/examples/model/table/app.mjs +0 -6
- package/examples/model/table/neo-config.json +0 -7
- package/examples/model/twoWay/app.mjs +0 -6
- package/examples/model/twoWay/index.html +0 -11
- /package/examples/{model → stateProvider}/table/index.html +0 -0
@@ -148,7 +148,7 @@ class List extends ComponentList {
|
|
148
148
|
* @param {String[]} items
|
149
149
|
*/
|
150
150
|
onSelect(items) {
|
151
|
-
this.
|
151
|
+
this.setState('activeCalendarId', this.getItemRecordId(items[0]))
|
152
152
|
}
|
153
153
|
|
154
154
|
/**
|
@@ -39,7 +39,7 @@ class Component extends BaseComponent {
|
|
39
39
|
weekStartDay : data => data.weekStartDay
|
40
40
|
},
|
41
41
|
/**
|
42
|
-
* Bound to the
|
42
|
+
* Bound to the state provider
|
43
43
|
* @member {Neo.calendar.store.Calendars|null} calendarStore_=null
|
44
44
|
*/
|
45
45
|
calendarStore_: null,
|
@@ -56,12 +56,12 @@ class Component extends BaseComponent {
|
|
56
56
|
*/
|
57
57
|
dayNameFormat_: 'short',
|
58
58
|
/**
|
59
|
-
* Bound to the
|
59
|
+
* Bound to the state provider
|
60
60
|
* @member {String|null} eventBorder_=null
|
61
61
|
*/
|
62
62
|
eventBorder_: null,
|
63
63
|
/**
|
64
|
-
* Bound to the
|
64
|
+
* Bound to the state provider.
|
65
65
|
* @member {Neo.calendar.store.Events|null} eventStore_=null
|
66
66
|
*/
|
67
67
|
eventStore_: null,
|
@@ -93,7 +93,7 @@ class Component extends BaseComponent {
|
|
93
93
|
*/
|
94
94
|
isScrolling: false,
|
95
95
|
/**
|
96
|
-
* Bound to the
|
96
|
+
* Bound to the state provider.
|
97
97
|
* @member {String} locale_=Neo.config.locale
|
98
98
|
*/
|
99
99
|
locale_: Neo.config.locale,
|
@@ -120,7 +120,7 @@ class Component extends BaseComponent {
|
|
120
120
|
*/
|
121
121
|
scrollTaskId: null,
|
122
122
|
/**
|
123
|
-
* Bound to the
|
123
|
+
* Bound to the state provider.
|
124
124
|
* @member {Boolean} showWeekends_=true
|
125
125
|
*/
|
126
126
|
showWeekends_: true,
|
@@ -148,7 +148,7 @@ class Component extends BaseComponent {
|
|
148
148
|
]},
|
149
149
|
/**
|
150
150
|
* 0-6 => Sun-Sat
|
151
|
-
* Bound to the
|
151
|
+
* Bound to the state provider.
|
152
152
|
* @member {Number} weekStartDay_=0
|
153
153
|
*/
|
154
154
|
weekStartDay_: 0
|
@@ -273,7 +273,7 @@ class GeneralContainer extends Container {
|
|
273
273
|
* @param {Object} data
|
274
274
|
*/
|
275
275
|
onDataChange(data) {
|
276
|
-
this.
|
276
|
+
this.setState(data.component.name, data.value)
|
277
277
|
}
|
278
278
|
|
279
279
|
/**
|
@@ -281,7 +281,7 @@ class GeneralContainer extends Container {
|
|
281
281
|
*/
|
282
282
|
onRadioDataChange(data) {
|
283
283
|
if (data.value) {
|
284
|
-
this.
|
284
|
+
this.setState(data.component.name, data.component.fieldValue)
|
285
285
|
}
|
286
286
|
}
|
287
287
|
}
|
@@ -53,7 +53,7 @@ class Component extends BaseComponent {
|
|
53
53
|
weekStartDay : data => data.weekStartDay
|
54
54
|
},
|
55
55
|
/**
|
56
|
-
* Bound to the
|
56
|
+
* Bound to the state provider
|
57
57
|
* @member {Neo.calendar.store.Calendars|null} calendarStore_=null
|
58
58
|
*/
|
59
59
|
calendarStore_: null,
|
@@ -68,7 +68,7 @@ class Component extends BaseComponent {
|
|
68
68
|
*/
|
69
69
|
columnsVisible_: 7,
|
70
70
|
/**
|
71
|
-
* Bound to the
|
71
|
+
* Bound to the state provider.
|
72
72
|
* @member {Date|null} currentDate_=null
|
73
73
|
* @protected
|
74
74
|
*/
|
@@ -80,13 +80,13 @@ class Component extends BaseComponent {
|
|
80
80
|
*/
|
81
81
|
dayNameFormat_: 'short',
|
82
82
|
/**
|
83
|
-
* Bound to the
|
83
|
+
* Bound to the state provider.
|
84
84
|
* @member {Boolean} enableDrag_=true
|
85
85
|
* @protected
|
86
86
|
*/
|
87
87
|
enableDrag_: true,
|
88
88
|
/**
|
89
|
-
* Bound to the
|
89
|
+
* Bound to the state provider
|
90
90
|
* @member {String|null} eventBorder_=null
|
91
91
|
*/
|
92
92
|
eventBorder_: null,
|
@@ -95,7 +95,7 @@ class Component extends BaseComponent {
|
|
95
95
|
*/
|
96
96
|
eventDragZone: null,
|
97
97
|
/**
|
98
|
-
* Bound to the
|
98
|
+
* Bound to the state provider
|
99
99
|
* @member {Neo.calendar.store.Events|null} eventStore_=null
|
100
100
|
*/
|
101
101
|
eventStore_: null,
|
@@ -117,7 +117,7 @@ class Component extends BaseComponent {
|
|
117
117
|
*/
|
118
118
|
intlFormat_day: null,
|
119
119
|
/**
|
120
|
-
* Bound to the
|
120
|
+
* Bound to the state provider.
|
121
121
|
* @member {Intl.DateTimeFormat|null} intlFormat_time_=null
|
122
122
|
* @protected
|
123
123
|
*/
|
@@ -128,12 +128,12 @@ class Component extends BaseComponent {
|
|
128
128
|
*/
|
129
129
|
isUpdating: false,
|
130
130
|
/**
|
131
|
-
* Bound to the
|
131
|
+
* Bound to the state provider.
|
132
132
|
* @member {String} locale_=Neo.config.locale
|
133
133
|
*/
|
134
134
|
locale_: Neo.config.locale,
|
135
135
|
/**
|
136
|
-
* Time in minutes. Bound to the
|
136
|
+
* Time in minutes. Bound to the state provider.
|
137
137
|
* @member {Number} minimumEventDuration=30
|
138
138
|
* @protected
|
139
139
|
*/
|
@@ -164,7 +164,7 @@ class Component extends BaseComponent {
|
|
164
164
|
*/
|
165
165
|
showEventEndTime_: false,
|
166
166
|
/**
|
167
|
-
* Bound to the
|
167
|
+
* Bound to the state provider.
|
168
168
|
* @member {Boolean} showWeekends_=true
|
169
169
|
*/
|
170
170
|
showWeekends_: true,
|
@@ -206,7 +206,7 @@ class Component extends BaseComponent {
|
|
206
206
|
]},
|
207
207
|
/**
|
208
208
|
* 0-6 => Sun-Sat
|
209
|
-
* Bound to the
|
209
|
+
* Bound to the state provider.
|
210
210
|
* @member {Number} weekStartDay_=0
|
211
211
|
*/
|
212
212
|
weekStartDay_: 0
|
@@ -252,7 +252,7 @@ class EventDragZone extends DragZone {
|
|
252
252
|
// todo: updating a record field which is included inside a sorter should trigger collection.doSort()
|
253
253
|
// see: https://github.com/neomjs/neo/issues/2392
|
254
254
|
|
255
|
-
owner.
|
255
|
+
owner.getStateProvider().getStore('events').doSort();
|
256
256
|
owner.updateEvents()
|
257
257
|
}
|
258
258
|
|
package/src/code/LivePreview.mjs
CHANGED
@@ -63,16 +63,16 @@ class LivePreview extends Container {
|
|
63
63
|
removeInactiveCards: false,
|
64
64
|
|
65
65
|
items: [{
|
66
|
-
module
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
66
|
+
module : MonacoEditor,
|
67
|
+
header : {text: 'Source'},
|
68
|
+
hideLabel: true,
|
69
|
+
listeners: {editorChange: 'up.onEditorChange'},
|
70
|
+
style : {height: '100%'},
|
71
|
+
reference: 'editor'
|
72
72
|
}, {
|
73
|
-
module
|
74
|
-
|
75
|
-
|
73
|
+
module : Container,
|
74
|
+
header : {text: 'Preview'},
|
75
|
+
reference: 'preview'
|
76
76
|
}]
|
77
77
|
}],
|
78
78
|
/**
|
@@ -410,7 +410,7 @@ class LivePreview extends Container {
|
|
410
410
|
ui : 'ghost'
|
411
411
|
});
|
412
412
|
|
413
|
-
items
|
413
|
+
items.unshift('->');
|
414
414
|
|
415
415
|
// we want to add a normal (non-header) button
|
416
416
|
tabContainer.getTabBar().add(items);
|