neo.mjs 6.44.0 → 6.45.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 +2 -2
- package/examples/ServiceWorker.mjs +2 -2
- package/package.json +1 -1
- package/resources/data/deck/learnneo/pages/2023-10-14T19-25-08-153Z.md +1 -1
- package/resources/data/deck/learnneo/pages/ComponentModels.md +2 -2
- package/resources/data/deck/learnneo/pages/ComponentsAndContainers.md +6 -6
- package/resources/data/deck/learnneo/pages/Config.md +6 -6
- package/resources/data/deck/learnneo/pages/DescribingTheUI.md +2 -2
- package/resources/data/deck/learnneo/pages/Earthquakes.md +0 -1
- package/resources/data/deck/learnneo/pages/Events.md +3 -4
- package/resources/data/deck/learnneo/pages/Extending.md +2 -2
- package/resources/data/deck/learnneo/pages/GuideEvents.md +12 -15
- package/resources/data/deck/learnneo/pages/GuideViewModels.md +6 -6
- package/resources/data/deck/learnneo/pages/References.md +5 -5
- package/resources/data/deck/learnneo/pages/Setup.md +0 -2
- package/resources/data/deck/learnneo/pages/WhyNeo-Multi-Window.md +1 -1
- package/resources/data/deck/learnneo/pages/WhyNeo-Speed.md +4 -4
- package/resources/data/deck/learnneo/pages/benefits/FormsEngine.md +3 -3
- package/src/DefaultConfig.mjs +2 -2
package/apps/ServiceWorker.mjs
CHANGED
package/package.json
CHANGED
@@ -126,7 +126,7 @@ import Container from '../container/Base.mjs';
|
|
126
126
|
|
127
127
|
class MainView extends Container {
|
128
128
|
static config = {
|
129
|
-
className: '
|
129
|
+
className: 'GS.workspaces.MainView',
|
130
130
|
layout : {ntype:'vbox', align:'start'},
|
131
131
|
items : [{
|
132
132
|
module: Button,
|
@@ -10,7 +10,7 @@ import TextField from '../form/field/Text.mjs';
|
|
10
10
|
|
11
11
|
class MainView extends Container {
|
12
12
|
static config = {
|
13
|
-
className: '
|
13
|
+
className: 'GS.data1.MainView',
|
14
14
|
|
15
15
|
model: {
|
16
16
|
data: {
|
@@ -81,7 +81,7 @@ Neo.setupClass(MyPanel);
|
|
81
81
|
|
82
82
|
class MainView extends Container {
|
83
83
|
static config = {
|
84
|
-
className: '
|
84
|
+
className: 'GS.data2.MainView',
|
85
85
|
|
86
86
|
model: {
|
87
87
|
data: {
|
@@ -30,7 +30,7 @@ import Container from '../container/Base.mjs';
|
|
30
30
|
|
31
31
|
class MainView extends Container {
|
32
32
|
static config = {
|
33
|
-
className: '
|
33
|
+
className: 'Guides.components1.MainView',
|
34
34
|
layout : {ntype:'vbox', align:'start'},
|
35
35
|
items : [{
|
36
36
|
ntype : 'component', // Or module:Component
|
@@ -52,7 +52,7 @@ import Container from '../container/Base.mjs';
|
|
52
52
|
|
53
53
|
class MainView extends Container {
|
54
54
|
static config = {
|
55
|
-
className: '
|
55
|
+
className: 'Guides.components2.MainView',
|
56
56
|
layout : {ntype:'vbox', align:'start'},
|
57
57
|
items : [{
|
58
58
|
ntype : 'component', // Or module:Component
|
@@ -82,7 +82,7 @@ import Container from '../container/Base.mjs';
|
|
82
82
|
|
83
83
|
class MainView extends Container {
|
84
84
|
static config = {
|
85
|
-
className: '
|
85
|
+
className: 'Guides.components3.MainView',
|
86
86
|
layout : 'fit', // If no configs are needed, simply use the ntype of the layout
|
87
87
|
items : [{
|
88
88
|
ntype: 'component',
|
@@ -104,7 +104,7 @@ import Container from '../container/Base.mjs';
|
|
104
104
|
|
105
105
|
class MainView extends Container {
|
106
106
|
static config = {
|
107
|
-
className: '
|
107
|
+
className: 'Guides.components4.MainView',
|
108
108
|
layout : {ntype:'vbox', align:'start'}, // Change the ntype to 'hbox'
|
109
109
|
items : [{
|
110
110
|
module : Button,
|
@@ -131,7 +131,7 @@ import Container from '../container/Base.mjs';
|
|
131
131
|
|
132
132
|
class MainView extends Container {
|
133
133
|
static config = {
|
134
|
-
className: '
|
134
|
+
className: 'Guides.components5.MainView',
|
135
135
|
layout : 'vbox',
|
136
136
|
items : [{
|
137
137
|
ntype: 'toolbar',
|
@@ -195,7 +195,7 @@ import Container from '../container/Base.mjs';
|
|
195
195
|
|
196
196
|
class MainView extends Container {
|
197
197
|
static config = {
|
198
|
-
className: '
|
198
|
+
className: 'Guides.components6.MainView',
|
199
199
|
layout : {ntype:'vbox', align:'start'},
|
200
200
|
items : [{
|
201
201
|
module : Button,
|
@@ -23,7 +23,7 @@ import Container from '../container/Base.mjs';
|
|
23
23
|
|
24
24
|
class Simple extends Component {
|
25
25
|
static config = {
|
26
|
-
className: '
|
26
|
+
className: 'GS.config1.Simple',
|
27
27
|
|
28
28
|
foo: 1, // An instance field and its initial (default) value
|
29
29
|
bar_: '' // Another instance field -- note the underscore at the end
|
@@ -36,7 +36,7 @@ Neo.setupClass(Simple);
|
|
36
36
|
|
37
37
|
class MainView extends Container {
|
38
38
|
static config = {
|
39
|
-
className: '
|
39
|
+
className: 'GS.config1.MainView',
|
40
40
|
|
41
41
|
items: [{
|
42
42
|
module: Simple,
|
@@ -64,7 +64,7 @@ import Container from '../container/Base.mjs';
|
|
64
64
|
|
65
65
|
class Simple extends Component {
|
66
66
|
static config = {
|
67
|
-
className: '
|
67
|
+
className: 'GS.config2.Simple',
|
68
68
|
|
69
69
|
foo: 1, // An instance field and its initial (default) value
|
70
70
|
bar_: null // Another instance field -- note the underscore at the end
|
@@ -87,7 +87,7 @@ Neo.setupClass(Simple);
|
|
87
87
|
|
88
88
|
class MainView extends Container {
|
89
89
|
static config = {
|
90
|
-
className: '
|
90
|
+
className: 'GS.config2.MainView',
|
91
91
|
|
92
92
|
items: [{
|
93
93
|
module: Simple,
|
@@ -118,7 +118,7 @@ import Container from '../container/Base.mjs';
|
|
118
118
|
|
119
119
|
class Simple extends Component {
|
120
120
|
static config = {
|
121
|
-
className: '
|
121
|
+
className: 'GS.config3.Simple',
|
122
122
|
|
123
123
|
foo: 1, // An instance field and its initial (default) value
|
124
124
|
bar_: null // Another instance field -- note the underscore at the end
|
@@ -135,7 +135,7 @@ Neo.setupClass(Simple);
|
|
135
135
|
|
136
136
|
class MainView extends Container {
|
137
137
|
static config = {
|
138
|
-
className: '
|
138
|
+
className: 'GS.config3.MainView',
|
139
139
|
|
140
140
|
items: [{
|
141
141
|
module: Simple,
|
@@ -16,7 +16,7 @@ import Container from '../container/Base.mjs';
|
|
16
16
|
|
17
17
|
class MainView extends Container {
|
18
18
|
static config = {
|
19
|
-
className: '
|
19
|
+
className: 'GS.describing1.MainView',
|
20
20
|
layout : {ntype:'vbox', align:'start'},
|
21
21
|
items : [{
|
22
22
|
module : Button,
|
@@ -52,7 +52,7 @@ import Container from '../container/Base.mjs';
|
|
52
52
|
|
53
53
|
class MainView extends Container {
|
54
54
|
static config = {
|
55
|
-
className: '
|
55
|
+
className: 'GS.describing2.MainView',
|
56
56
|
layout : {ntype:'vbox', align:'start'}, // Change the ntype to 'hbox'
|
57
57
|
items : [{
|
58
58
|
module : Button,
|
@@ -188,7 +188,6 @@ Use a code editor and look at `workspace/apps/earthquakes/src/view/MainView.mjs`
|
|
188
188
|
following class definition:
|
189
189
|
|
190
190
|
<pre data-javascript>
|
191
|
-
|
192
191
|
import Base from '../../../node_modules/neo.mjs/src/container/Base.mjs';
|
193
192
|
import Controller from './MainViewController.mjs';
|
194
193
|
import ViewModel from './MainViewModel.mjs';
|
@@ -19,7 +19,7 @@ import TextField from '../form/field/Text.mjs';
|
|
19
19
|
|
20
20
|
class MainView extends Container {
|
21
21
|
static config = {
|
22
|
-
className: '
|
22
|
+
className: 'GS.events1.MainView',
|
23
23
|
layout : {ntype:'vbox', align:'start'},
|
24
24
|
|
25
25
|
itemDefaults: {
|
@@ -72,9 +72,8 @@ import TextField from '../form/field/Text.mjs';
|
|
72
72
|
|
73
73
|
class MainView extends Container {
|
74
74
|
static config = {
|
75
|
-
|
75
|
+
className : 'GS.events2.MainView',
|
76
76
|
controller: MainViewController,
|
77
|
-
className: 'Example.view.MainView',
|
78
77
|
|
79
78
|
layout : {ntype:'vbox', align:'start'},
|
80
79
|
items: [{
|
@@ -142,7 +141,7 @@ Neo.setupClass(ToggleButton);
|
|
142
141
|
|
143
142
|
class MainView extends Container {
|
144
143
|
static config = {
|
145
|
-
className: '
|
144
|
+
className: 'GS.events3.MainView',
|
146
145
|
layout : {ntype:'vbox', align:'start'},
|
147
146
|
items : [{
|
148
147
|
module : ToggleButton,
|
@@ -12,7 +12,7 @@ import Table from '../table/Container.mjs';
|
|
12
12
|
|
13
13
|
class MainView extends Panel {
|
14
14
|
static config = {
|
15
|
-
className: '
|
15
|
+
className: 'GS.extending1.MainView',
|
16
16
|
headers : [{
|
17
17
|
dock : 'top',
|
18
18
|
items: [{
|
@@ -91,7 +91,7 @@ Neo.setupClass(BeatlesTable);
|
|
91
91
|
|
92
92
|
class MainView extends Panel {
|
93
93
|
static config = {
|
94
|
-
className: '
|
94
|
+
className: 'GS.extending2.MainView',
|
95
95
|
headers : [{
|
96
96
|
dock : 'top',
|
97
97
|
items: [BeatlesButton]
|
@@ -7,7 +7,7 @@ import TextField from '../form/field/Text.mjs';
|
|
7
7
|
|
8
8
|
class MainView extends Container {
|
9
9
|
static config = {
|
10
|
-
className: '
|
10
|
+
className: 'Guides.events1.MainView',
|
11
11
|
layout : {ntype:'vbox', align:'start'},
|
12
12
|
|
13
13
|
itemDefaults: {
|
@@ -41,7 +41,7 @@ import TextField from '../form/field/Text.mjs';
|
|
41
41
|
|
42
42
|
class MainView extends Container {
|
43
43
|
static config = {
|
44
|
-
className: '
|
44
|
+
className: 'Guides.events2.MainView',
|
45
45
|
layout : {ntype:'vbox', align:'start'},
|
46
46
|
|
47
47
|
items: [{
|
@@ -68,7 +68,7 @@ import TextField from '../form/field/Text.mjs';
|
|
68
68
|
|
69
69
|
class MainView extends Container {
|
70
70
|
static config = {
|
71
|
-
className: '
|
71
|
+
className: 'Guides.events3.MainView',
|
72
72
|
layout : {ntype:'vbox', align:'start'},
|
73
73
|
|
74
74
|
items: [{
|
@@ -97,7 +97,7 @@ import Controller from '../controller/Component.mjs';
|
|
97
97
|
|
98
98
|
class MainViewController extends Controller {
|
99
99
|
static config = {
|
100
|
-
className: '
|
100
|
+
className: 'Guides.events4.MainViewController'
|
101
101
|
}
|
102
102
|
foo(data) {
|
103
103
|
Neo.Main.log({value:data.value})
|
@@ -111,7 +111,7 @@ import TextField from '../form/field/Text.mjs';
|
|
111
111
|
|
112
112
|
class MainView extends Container {
|
113
113
|
static config = {
|
114
|
-
className : '
|
114
|
+
className : 'Guides.events4.MainView',
|
115
115
|
controller: MainViewController,
|
116
116
|
layout : {ntype:'vbox', align:'start'},
|
117
117
|
|
@@ -129,7 +129,7 @@ Neo.setupClass(MainView);
|
|
129
129
|
|
130
130
|
## Adding listeners procedurally
|
131
131
|
|
132
|
-
Event listeners are normally specified
|
132
|
+
Event listeners are normally specified declarative, via the `listeners: {}` config. But occasionally you need to add
|
133
133
|
a listener procedurally.
|
134
134
|
|
135
135
|
Any observable class has an `addListener` method, along with an easier-to-type version called `on`.
|
@@ -139,14 +139,11 @@ import Controller from '../controller/Component.mjs';
|
|
139
139
|
|
140
140
|
class MainViewController extends Controller {
|
141
141
|
static config = {
|
142
|
-
className: '
|
142
|
+
className: 'Guides.events5.MainViewController'
|
143
143
|
}
|
144
144
|
foo(data) {
|
145
145
|
Neo.Main.log({value:data.value})
|
146
146
|
}
|
147
|
-
onComponentConstructed() {
|
148
|
-
debugger
|
149
|
-
}
|
150
147
|
}
|
151
148
|
Neo.setupClass(MainViewController);
|
152
149
|
|
@@ -156,7 +153,7 @@ import TextField from '../form/field/Text.mjs';
|
|
156
153
|
|
157
154
|
class MainView extends Container {
|
158
155
|
static config = {
|
159
|
-
className: '
|
156
|
+
className: 'Guides.events5.MainView',
|
160
157
|
controller: MainViewController,
|
161
158
|
layout : {ntype:'vbox', align:'start'},
|
162
159
|
|
@@ -179,7 +176,7 @@ import Controller from '../controller/Component.mjs';
|
|
179
176
|
|
180
177
|
class MainViewController extends Controller {
|
181
178
|
static config = {
|
182
|
-
className: '
|
179
|
+
className: 'Guides.events6.MainViewController'
|
183
180
|
}
|
184
181
|
foo(data) {
|
185
182
|
Neo.Main.log('foo' + {value:data.value})
|
@@ -199,7 +196,7 @@ import TextField from '../form/field/Text.mjs';
|
|
199
196
|
|
200
197
|
class MainView extends Container {
|
201
198
|
static config = {
|
202
|
-
className: '
|
199
|
+
className: 'Guides.events6.MainView',
|
203
200
|
controller: MainViewController,
|
204
201
|
layout : {ntype:'vbox', align:'start'},
|
205
202
|
|
@@ -251,7 +248,7 @@ import TextField from '../form/field/Text.mjs';
|
|
251
248
|
|
252
249
|
class MainView extends Container {
|
253
250
|
static config = {
|
254
|
-
className: '
|
251
|
+
className: 'Guides.events7.MainView',
|
255
252
|
layout : {ntype:'vbox', align:'start'},
|
256
253
|
|
257
254
|
items: [{
|
@@ -289,7 +286,7 @@ import TextField from '../form/field/Text.mjs';
|
|
289
286
|
|
290
287
|
class MainView extends Container {
|
291
288
|
static config = {
|
292
|
-
className: '
|
289
|
+
className: 'Guides.events8.MainView',
|
293
290
|
model: {
|
294
291
|
data: {
|
295
292
|
foo: 'Hello',
|
@@ -22,7 +22,7 @@ import Label from '../component/Label.mjs';
|
|
22
22
|
|
23
23
|
class MainView extends Container {
|
24
24
|
static config = {
|
25
|
-
className: '
|
25
|
+
className: 'Guides.vm1.MainView',
|
26
26
|
model: {
|
27
27
|
data: {
|
28
28
|
hello: 'Hello',
|
@@ -70,7 +70,7 @@ import Label from '../component/Label.mjs';
|
|
70
70
|
|
71
71
|
class MainView extends Container {
|
72
72
|
static config = {
|
73
|
-
className: '
|
73
|
+
className: 'Guides.vm2.MainView',
|
74
74
|
model: {
|
75
75
|
data: {
|
76
76
|
hello: 'Hello',
|
@@ -137,7 +137,7 @@ import Label from '../component/Label.mjs';
|
|
137
137
|
|
138
138
|
class MainView extends Container {
|
139
139
|
static config = {
|
140
|
-
className: '
|
140
|
+
className: 'Guides.vm3.MainView',
|
141
141
|
model: {
|
142
142
|
data: {
|
143
143
|
hello: 'Hello'
|
@@ -212,7 +212,7 @@ import Label from '../component/Label.mjs';
|
|
212
212
|
|
213
213
|
class MainView extends Container {
|
214
214
|
static config = {
|
215
|
-
className: '
|
215
|
+
className: 'Guides.vm4.MainView',
|
216
216
|
model: {
|
217
217
|
data: {
|
218
218
|
user: {
|
@@ -340,7 +340,7 @@ Neo.setupClass(MainContainerController);
|
|
340
340
|
|
341
341
|
class MainView extends Viewport {
|
342
342
|
static config = {
|
343
|
-
className : '
|
343
|
+
className : 'Guides.vm5.MainView',
|
344
344
|
controller: MainContainerController,
|
345
345
|
model: {
|
346
346
|
data: {
|
@@ -413,7 +413,7 @@ class MainViewModel extends ViewModel {
|
|
413
413
|
|
414
414
|
class MainView extends Container {
|
415
415
|
static config = {
|
416
|
-
className: '
|
416
|
+
className: 'Guides.vm6.MainView',
|
417
417
|
model : MainViewModel, // directly assign the imported module
|
418
418
|
|
419
419
|
itemDefaults: {
|
@@ -17,7 +17,7 @@ import Controller from '../controller/Component.mjs';
|
|
17
17
|
|
18
18
|
class MainViewController extends Controller {
|
19
19
|
static config = {
|
20
|
-
className: '
|
20
|
+
className: 'GS.references1.MainViewController'
|
21
21
|
}
|
22
22
|
onDisableButtonClick(data) {
|
23
23
|
data.component.disabled = true;
|
@@ -28,7 +28,7 @@ Neo.setupClass(MainViewController);
|
|
28
28
|
|
29
29
|
class MainView extends Container {
|
30
30
|
static config = {
|
31
|
-
className : '
|
31
|
+
className : 'GS.references1.MainView',
|
32
32
|
controller: MainViewController,
|
33
33
|
layout : {ntype:'vbox', align:'start'},
|
34
34
|
items : [{
|
@@ -54,7 +54,7 @@ import Controller from '../controller/Component.mjs';
|
|
54
54
|
|
55
55
|
class MainViewController extends Controller {
|
56
56
|
static config = {
|
57
|
-
className: '
|
57
|
+
className: 'GS.references2.MainViewController'
|
58
58
|
}
|
59
59
|
onDisableButtonClick(data){
|
60
60
|
data.component.disabled = true
|
@@ -68,7 +68,7 @@ Neo.setupClass(MainViewController);
|
|
68
68
|
|
69
69
|
class MainView extends Container {
|
70
70
|
static config = {
|
71
|
-
className : '
|
71
|
+
className : 'GS.references2.MainView',
|
72
72
|
controller: MainViewController,
|
73
73
|
layout : {ntype:'vbox', align:'start'},
|
74
74
|
items : [{
|
@@ -108,7 +108,7 @@ import Container from '../container/Base.mjs';
|
|
108
108
|
|
109
109
|
class MainView extends Container {
|
110
110
|
static config = {
|
111
|
-
className: '
|
111
|
+
className: 'GS.references3.MainView',
|
112
112
|
layout : {ntype:'vbox', align:'start'},
|
113
113
|
items : [{
|
114
114
|
module : Button,
|
@@ -21,5 +21,3 @@ Then run the following command, choosing the defaults for each prompt.
|
|
21
21
|
`npx neo-app@latest`
|
22
22
|
|
23
23
|
When you're finished you should have a Neo.mjs workspace, as described in the _Workspaces and Applications_ topic, which follows.
|
24
|
-
|
25
|
-
It's probably a good idea to do an `npm install` in the workspace as soon as you've created it.
|
@@ -20,7 +20,7 @@ import Container from '../container/Base.mjs';
|
|
20
20
|
|
21
21
|
class MainView extends Container {
|
22
22
|
static config = {
|
23
|
-
className: '
|
23
|
+
className: 'Benefits.multiwindow.MainView',
|
24
24
|
layout : {ntype:'vbox', align:'start'},
|
25
25
|
items : [{
|
26
26
|
module : Button,
|
@@ -25,10 +25,10 @@ import Base from '../container/Base.mjs';
|
|
25
25
|
import Helix from '../component/Helix.mjs';
|
26
26
|
class Foo extends Base {
|
27
27
|
static config = {
|
28
|
-
className: '
|
29
|
-
layout: 'fit',
|
30
|
-
items: [{
|
31
|
-
module: Helix,
|
28
|
+
className: 'Benefits.speed.MainView',
|
29
|
+
layout : 'fit',
|
30
|
+
items : [{
|
31
|
+
module : Helix,
|
32
32
|
imageField : 'image',
|
33
33
|
imageSource: '../../../../resources/examples/',
|
34
34
|
store: {
|
@@ -10,7 +10,7 @@ import TextField from '../form/field/Text.mjs';
|
|
10
10
|
|
11
11
|
class MainView extends FormContainer {
|
12
12
|
static config = {
|
13
|
-
className: '
|
13
|
+
className: 'Benefits.forms1.MainView',
|
14
14
|
layout : {ntype:'vbox', align:'start'},
|
15
15
|
|
16
16
|
items: [{
|
@@ -72,7 +72,7 @@ const myForm = Neo.create({
|
|
72
72
|
|
73
73
|
class MainView extends Container {
|
74
74
|
static config = {
|
75
|
-
className: '
|
75
|
+
className: 'Benefits.forms2.MainView',
|
76
76
|
layout : {ntype:'vbox', align:'start'},
|
77
77
|
|
78
78
|
items: [{
|
@@ -134,7 +134,7 @@ import TextField from '../form/field/Text.mjs';
|
|
134
134
|
|
135
135
|
class MainView extends FormContainer {
|
136
136
|
static config = {
|
137
|
-
className: '
|
137
|
+
className: 'Benefits.forms3.MainView',
|
138
138
|
layout : {ntype:'vbox', align:'stretch'},
|
139
139
|
|
140
140
|
items: [{
|
package/src/DefaultConfig.mjs
CHANGED
@@ -262,12 +262,12 @@ const DefaultConfig = {
|
|
262
262
|
useVdomWorker: true,
|
263
263
|
/**
|
264
264
|
* buildScripts/injectPackageVersion.mjs will update this value
|
265
|
-
* @default '6.
|
265
|
+
* @default '6.45.0'
|
266
266
|
* @memberOf! module:Neo
|
267
267
|
* @name config.version
|
268
268
|
* @type String
|
269
269
|
*/
|
270
|
-
version: '6.
|
270
|
+
version: '6.45.0'
|
271
271
|
};
|
272
272
|
|
273
273
|
Object.assign(DefaultConfig, {
|