neo.mjs 6.46.0 → 6.48.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/apps/portal/view/about/MemberContainer.mjs +1 -1
- package/apps/portal/view/home/FooterContainer.mjs +1 -1
- package/apps/portal/view/home/parts/Colors.mjs +6 -2
- package/apps/portal/view/home/parts/Helix.mjs +1 -1
- 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/2023-10-31T13-59-37-550Z.md +2 -2
- package/resources/data/deck/learnneo/pages/ComponentModels.md +3 -3
- package/resources/data/deck/learnneo/pages/ComponentsAndContainers.md +7 -7
- package/resources/data/deck/learnneo/pages/Config.md +6 -9
- package/resources/data/deck/learnneo/pages/CustomComponents.md +1 -1
- package/resources/data/deck/learnneo/pages/DescribingTheUI.md +2 -2
- package/resources/data/deck/learnneo/pages/Events.md +5 -5
- package/resources/data/deck/learnneo/pages/Extending.md +5 -5
- package/resources/data/deck/learnneo/pages/GuideEvents.md +11 -11
- package/resources/data/deck/learnneo/pages/GuideViewModels.md +11 -10
- package/resources/data/deck/learnneo/pages/References.md +5 -5
- package/resources/data/deck/learnneo/pages/TestLivePreview.md +1 -1
- package/resources/data/deck/learnneo/pages/TodoList.md +4 -4
- package/resources/data/deck/learnneo/pages/Welcome.md +1 -1
- package/resources/data/deck/learnneo/pages/WhyNeo-Multi-Window.md +1 -1
- package/resources/data/deck/learnneo/pages/WhyNeo-Speed.md +1 -1
- package/resources/data/deck/learnneo/pages/benefits/FormsEngine.md +3 -3
- package/resources/data/deck/learnneo/pages/stylesheet.md +1 -1
- package/resources/scss/src/apps/portal/home/ContentBox.scss +26 -22
- package/resources/scss/src/apps/portal/home/FeatureSection.scss +16 -12
- package/src/DefaultConfig.mjs +2 -2
- package/src/worker/Manager.mjs +1 -1
- /package/{resources → apps/portal/resources}/images/team/Max.jpeg +0 -0
- /package/{resources → apps/portal/resources}/images/team/rwaters.png +0 -0
- /package/{resources → apps/portal/resources}/images/team/tobiu.png +0 -0
- /package/{resources → apps/portal/resources}/images/team/torsten.png +0 -0
package/apps/ServiceWorker.mjs
CHANGED
@@ -116,7 +116,7 @@ class MemberContainer extends Container {
|
|
116
116
|
if (value) {
|
117
117
|
let item = this.items[1];
|
118
118
|
|
119
|
-
item.vdom.cn[0].src = '
|
119
|
+
item.vdom.cn[0].src = './resources/images/team/' + value;
|
120
120
|
item.update?.()
|
121
121
|
}
|
122
122
|
}
|
@@ -36,7 +36,7 @@ class Colors extends FeatureSection {
|
|
36
36
|
" }",
|
37
37
|
"}",
|
38
38
|
"",
|
39
|
-
"Neo.setupClass(MainView);"
|
39
|
+
"MainView = Neo.setupClass(MainView);"
|
40
40
|
].join('\n'),
|
41
41
|
/**
|
42
42
|
* @member {String} paragraph
|
@@ -49,7 +49,11 @@ class Colors extends FeatureSection {
|
|
49
49
|
/**
|
50
50
|
* @member {String} subHeadline='Socket Data'
|
51
51
|
*/
|
52
|
-
subHeadline: 'Socket Data'
|
52
|
+
subHeadline: 'Shared Socket Data',
|
53
|
+
/**
|
54
|
+
* @member {String} textContainerPosition='end'
|
55
|
+
*/
|
56
|
+
textContainerPosition: 'end'
|
53
57
|
}
|
54
58
|
}
|
55
59
|
|
package/package.json
CHANGED
@@ -9,7 +9,7 @@ class Mammal extends Base {
|
|
9
9
|
|
10
10
|
const myMammal = Neo.create(Mammal);
|
11
11
|
|
12
|
-
Neo.setupClass(Mammal); // Where Neo.mjs initializes the class config.
|
12
|
+
Mammal = Neo.setupClass(Mammal); // Where Neo.mjs initializes the class config.
|
13
13
|
export default Mammal; // Makes the class available elsewhere.
|
14
14
|
</pre>
|
15
15
|
|
@@ -26,6 +26,6 @@ class Mammal extends Base {
|
|
26
26
|
|
27
27
|
const myMammal = Neo.create(Mammal);
|
28
28
|
|
29
|
-
Neo.setupClass(Mammal); // Where Neo.mjs initializes the class config.
|
29
|
+
Mammal = Neo.setupClass(Mammal); // Where Neo.mjs initializes the class config.
|
30
30
|
export default Mammal; // Makes the class available elsewhere.
|
31
31
|
</pre>
|
@@ -34,7 +34,7 @@ class MainView extends Container {
|
|
34
34
|
style: {padding: '1em'}
|
35
35
|
}
|
36
36
|
}
|
37
|
-
Neo.setupClass(MainView);
|
37
|
+
MainView = Neo.setupClass(MainView);
|
38
38
|
</pre>
|
39
39
|
|
40
40
|
View model properties are visible down the containment hierarchy:
|
@@ -77,7 +77,7 @@ class MyPanel extends Panel {
|
|
77
77
|
style: {margin: '1em'}
|
78
78
|
}
|
79
79
|
}
|
80
|
-
Neo.setupClass(MyPanel);
|
80
|
+
MyPanel = Neo.setupClass(MyPanel);
|
81
81
|
|
82
82
|
class MainView extends Container {
|
83
83
|
static config = {
|
@@ -105,7 +105,7 @@ class MainView extends Container {
|
|
105
105
|
style: {margin: '1em'}
|
106
106
|
}
|
107
107
|
}
|
108
|
-
Neo.setupClass(MainView);
|
108
|
+
MainView = Neo.setupClass(MainView);
|
109
109
|
</pre>
|
110
110
|
|
111
111
|
In this case, the main view has three child items of type `MyPanel`, each containing a label.
|
@@ -41,7 +41,7 @@ class MainView extends Container {
|
|
41
41
|
}
|
42
42
|
}
|
43
43
|
|
44
|
-
Neo.setupClass(MainView);
|
44
|
+
MainView = Neo.setupClass(MainView);
|
45
45
|
</pre>
|
46
46
|
|
47
47
|
Components also have an `html`. The `html` property is rarely used, and goes against the abstract philosophy of Neo.mjs, but
|
@@ -64,7 +64,7 @@ class MainView extends Container {
|
|
64
64
|
}
|
65
65
|
}
|
66
66
|
|
67
|
-
Neo.setupClass(MainView);
|
67
|
+
MainView = Neo.setupClass(MainView);
|
68
68
|
</pre>
|
69
69
|
|
70
70
|
|
@@ -91,7 +91,7 @@ class MainView extends Container {
|
|
91
91
|
}
|
92
92
|
}
|
93
93
|
|
94
|
-
Neo.setupClass(MainView);
|
94
|
+
MainView = Neo.setupClass(MainView);
|
95
95
|
</pre>
|
96
96
|
|
97
97
|
### Vbox and hbox
|
@@ -118,7 +118,7 @@ class MainView extends Container {
|
|
118
118
|
}
|
119
119
|
}
|
120
120
|
|
121
|
-
Neo.setupClass(MainView);
|
121
|
+
MainView = Neo.setupClass(MainView);
|
122
122
|
</pre>
|
123
123
|
|
124
124
|
### Card
|
@@ -166,7 +166,7 @@ class MainView extends Container {
|
|
166
166
|
}
|
167
167
|
}
|
168
168
|
|
169
|
-
Neo.setupClass(MainView);
|
169
|
+
MainView = Neo.setupClass(MainView);
|
170
170
|
</pre>
|
171
171
|
|
172
172
|
|
@@ -188,7 +188,7 @@ class MySpecialButton extends Button {
|
|
188
188
|
}
|
189
189
|
}
|
190
190
|
|
191
|
-
Neo.setupClass(MySpecialButton);
|
191
|
+
MySpecialButton = Neo.setupClass(MySpecialButton);
|
192
192
|
|
193
193
|
|
194
194
|
import Container from '../container/Base.mjs';
|
@@ -208,6 +208,6 @@ class MainView extends Container {
|
|
208
208
|
}
|
209
209
|
}
|
210
210
|
|
211
|
-
Neo.setupClass(MainView);
|
211
|
+
MainView = Neo.setupClass(MainView);
|
212
212
|
</pre>
|
213
213
|
|
@@ -29,9 +29,8 @@ class Simple extends Component {
|
|
29
29
|
bar_: '' // Another instance field -- note the underscore at the end
|
30
30
|
|
31
31
|
}
|
32
|
-
|
33
32
|
}
|
34
|
-
Neo.setupClass(Simple);
|
33
|
+
Simple = Neo.setupClass(Simple);
|
35
34
|
|
36
35
|
|
37
36
|
class MainView extends Container {
|
@@ -48,7 +47,7 @@ class MainView extends Container {
|
|
48
47
|
|
49
48
|
}
|
50
49
|
}
|
51
|
-
Neo.setupClass(MainView);
|
50
|
+
MainView = Neo.setupClass(MainView);
|
52
51
|
</pre>
|
53
52
|
|
54
53
|
## Detecting when a value changes
|
@@ -80,9 +79,8 @@ class Simple extends Component {
|
|
80
79
|
afterSetBar(value, oldValue){
|
81
80
|
this.html = value;
|
82
81
|
}
|
83
|
-
|
84
82
|
}
|
85
|
-
Neo.setupClass(Simple);
|
83
|
+
Simple = Neo.setupClass(Simple);
|
86
84
|
|
87
85
|
|
88
86
|
class MainView extends Container {
|
@@ -99,7 +97,7 @@ class MainView extends Container {
|
|
99
97
|
|
100
98
|
}
|
101
99
|
}
|
102
|
-
Neo.setupClass(MainView);
|
100
|
+
MainView = Neo.setupClass(MainView);
|
103
101
|
</pre>
|
104
102
|
|
105
103
|
This time if you run the code you'll see "hi there" in the view. That's because the Simple instance is
|
@@ -128,9 +126,8 @@ class Simple extends Component {
|
|
128
126
|
this.html = value;
|
129
127
|
this.fire('barChange', {component: this, value, oldValue});
|
130
128
|
}
|
131
|
-
|
132
129
|
}
|
133
|
-
Neo.setupClass(Simple);
|
130
|
+
Simple = Neo.setupClass(Simple);
|
134
131
|
|
135
132
|
|
136
133
|
class MainView extends Container {
|
@@ -151,6 +148,6 @@ class MainView extends Container {
|
|
151
148
|
|
152
149
|
}
|
153
150
|
}
|
154
|
-
Neo.setupClass(MainView);
|
151
|
+
MainView = Neo.setupClass(MainView);
|
155
152
|
</pre>
|
156
153
|
|
@@ -26,7 +26,7 @@ class MainView extends Container {
|
|
26
26
|
}
|
27
27
|
}
|
28
28
|
|
29
|
-
Neo.setupClass(MainView);
|
29
|
+
MainView = Neo.setupClass(MainView);
|
30
30
|
</pre>
|
31
31
|
|
32
32
|
|
@@ -66,7 +66,7 @@ class MainView extends Container {
|
|
66
66
|
}
|
67
67
|
}
|
68
68
|
|
69
|
-
Neo.setupClass(MainView);
|
69
|
+
MainView = Neo.setupClass(MainView);
|
70
70
|
</pre>
|
71
71
|
|
72
72
|
If you run the example you'll see two buttons, arranged according to the `layout`. If you'd like,
|
@@ -37,7 +37,7 @@ class MainView extends Container {
|
|
37
37
|
}]
|
38
38
|
}
|
39
39
|
}
|
40
|
-
Neo.setupClass(MainView);
|
40
|
+
MainView = Neo.setupClass(MainView);
|
41
41
|
</pre>
|
42
42
|
|
43
43
|
If you run the example, and open the browser's debugger, you'll see the console being logged as you type or give
|
@@ -64,7 +64,7 @@ class MainViewController extends Base {
|
|
64
64
|
}
|
65
65
|
|
66
66
|
}
|
67
|
-
Neo.setupClass(MainViewController);
|
67
|
+
MainViewController = Neo.setupClass(MainViewController);
|
68
68
|
|
69
69
|
|
70
70
|
import Container from '../container/Base.mjs';
|
@@ -85,7 +85,7 @@ class MainView extends Container {
|
|
85
85
|
}]
|
86
86
|
}
|
87
87
|
}
|
88
|
-
Neo.setupClass(MainView);
|
88
|
+
MainView = Neo.setupClass(MainView);
|
89
89
|
</pre>
|
90
90
|
|
91
91
|
|
@@ -136,7 +136,7 @@ class ToggleButton extends Button {
|
|
136
136
|
this.checked = !this.checked
|
137
137
|
}
|
138
138
|
}
|
139
|
-
Neo.setupClass(ToggleButton);
|
139
|
+
ToggleButton = Neo.setupClass(ToggleButton);
|
140
140
|
|
141
141
|
|
142
142
|
class MainView extends Container {
|
@@ -153,5 +153,5 @@ class MainView extends Container {
|
|
153
153
|
}]
|
154
154
|
}
|
155
155
|
}
|
156
|
-
Neo.setupClass(MainView);
|
156
|
+
MainView = Neo.setupClass(MainView);
|
157
157
|
</pre>
|
@@ -41,7 +41,7 @@ class MainView extends Panel {
|
|
41
41
|
}
|
42
42
|
}
|
43
43
|
|
44
|
-
Neo.setupClass(MainView);
|
44
|
+
MainView = Neo.setupClass(MainView);
|
45
45
|
</pre>
|
46
46
|
|
47
47
|
If you wanted, any of the configs can be refactored into their own class. Here, the button, store, and table
|
@@ -61,7 +61,7 @@ class BeatlesButton extends Button {
|
|
61
61
|
handler : () => Neo.Main.alert({message: 'Yeah, yeah yeah!'})
|
62
62
|
}
|
63
63
|
}
|
64
|
-
Neo.setupClass(BeatlesButton);
|
64
|
+
BeatlesButton = Neo.setupClass(BeatlesButton);
|
65
65
|
|
66
66
|
class BeatlesStore extends Store {
|
67
67
|
static config = {
|
@@ -73,7 +73,7 @@ class BeatlesStore extends Store {
|
|
73
73
|
}
|
74
74
|
}
|
75
75
|
}
|
76
|
-
Neo.setupClass(BeatlesStore);
|
76
|
+
BeatlesStore = Neo.setupClass(BeatlesStore);
|
77
77
|
|
78
78
|
class BeatlesTable extends Table {
|
79
79
|
static config = {
|
@@ -87,7 +87,7 @@ class BeatlesTable extends Table {
|
|
87
87
|
}]
|
88
88
|
}
|
89
89
|
}
|
90
|
-
Neo.setupClass(BeatlesTable);
|
90
|
+
BeatlesTable = Neo.setupClass(BeatlesTable);
|
91
91
|
|
92
92
|
class MainView extends Panel {
|
93
93
|
static config = {
|
@@ -102,7 +102,7 @@ class MainView extends Panel {
|
|
102
102
|
}]
|
103
103
|
}
|
104
104
|
}
|
105
|
-
Neo.setupClass(MainView);
|
105
|
+
MainView = Neo.setupClass(MainView);
|
106
106
|
</pre>
|
107
107
|
|
108
108
|
There are several use-cases for creating your own classes:
|
@@ -25,7 +25,7 @@ class MainView extends Container {
|
|
25
25
|
}]
|
26
26
|
}
|
27
27
|
}
|
28
|
-
Neo.setupClass(MainView);
|
28
|
+
MainView = Neo.setupClass(MainView);
|
29
29
|
</pre>
|
30
30
|
|
31
31
|
## Event listeners
|
@@ -53,7 +53,7 @@ class MainView extends Container {
|
|
53
53
|
}]
|
54
54
|
}
|
55
55
|
}
|
56
|
-
Neo.setupClass(MainView);
|
56
|
+
MainView = Neo.setupClass(MainView);
|
57
57
|
</pre>
|
58
58
|
|
59
59
|
### As a view method
|
@@ -83,7 +83,7 @@ class MainView extends Container {
|
|
83
83
|
Neo.Main.log({value:data.value})
|
84
84
|
}
|
85
85
|
}
|
86
|
-
Neo.setupClass(MainView);
|
86
|
+
MainView = Neo.setupClass(MainView);
|
87
87
|
</pre>
|
88
88
|
|
89
89
|
### As a controller method
|
@@ -103,7 +103,7 @@ class MainViewController extends Controller {
|
|
103
103
|
Neo.Main.log({value:data.value})
|
104
104
|
}
|
105
105
|
}
|
106
|
-
Neo.setupClass(MainViewController);
|
106
|
+
MainViewController = Neo.setupClass(MainViewController);
|
107
107
|
|
108
108
|
|
109
109
|
import Container from '../container/Base.mjs';
|
@@ -124,7 +124,7 @@ class MainView extends Container {
|
|
124
124
|
}]
|
125
125
|
}
|
126
126
|
}
|
127
|
-
Neo.setupClass(MainView);
|
127
|
+
MainView = Neo.setupClass(MainView);
|
128
128
|
</pre>
|
129
129
|
|
130
130
|
## Adding listeners procedurally
|
@@ -145,7 +145,7 @@ class MainViewController extends Controller {
|
|
145
145
|
Neo.Main.log({value:data.value})
|
146
146
|
}
|
147
147
|
}
|
148
|
-
Neo.setupClass(MainViewController);
|
148
|
+
MainViewController = Neo.setupClass(MainViewController);
|
149
149
|
|
150
150
|
|
151
151
|
import Container from '../container/Base.mjs';
|
@@ -166,7 +166,7 @@ class MainView extends Container {
|
|
166
166
|
}]
|
167
167
|
}
|
168
168
|
}
|
169
|
-
Neo.setupClass(MainView);
|
169
|
+
MainView = Neo.setupClass(MainView);
|
170
170
|
</pre>
|
171
171
|
|
172
172
|
The method specified in `on()` doesn't have to be an arrow function; you can use a controller function.
|
@@ -188,7 +188,7 @@ class MainViewController extends Controller {
|
|
188
188
|
this.getReference('nameTextfield').on('change', this.foo, this)
|
189
189
|
}
|
190
190
|
}
|
191
|
-
Neo.setupClass(MainViewController);
|
191
|
+
MainViewController = Neo.setupClass(MainViewController);
|
192
192
|
|
193
193
|
|
194
194
|
import Container from '../container/Base.mjs';
|
@@ -207,7 +207,7 @@ class MainView extends Container {
|
|
207
207
|
}]
|
208
208
|
}
|
209
209
|
}
|
210
|
-
Neo.setupClass(MainView);
|
210
|
+
MainView = Neo.setupClass(MainView);
|
211
211
|
</pre>
|
212
212
|
|
213
213
|
## Events versus binding
|
@@ -276,7 +276,7 @@ class MainView extends Container {
|
|
276
276
|
this.getReference('foo').html = `${this.getReference('textFieldOne').value} ${this.getReference('textFieldTwo').value}`
|
277
277
|
}
|
278
278
|
}
|
279
|
-
Neo.setupClass(MainView);
|
279
|
+
MainView = Neo.setupClass(MainView);
|
280
280
|
</pre>
|
281
281
|
|
282
282
|
<pre data-neo>
|
@@ -312,7 +312,7 @@ class MainView extends Container {
|
|
312
312
|
this.getReference('foo').html = data.value;
|
313
313
|
}
|
314
314
|
}
|
315
|
-
Neo.setupClass(MainView);
|
315
|
+
MainView = Neo.setupClass(MainView);
|
316
316
|
</pre>
|
317
317
|
|
318
318
|
##How are events set up?
|
@@ -53,7 +53,7 @@ class MainView extends Container {
|
|
53
53
|
layout: {ntype: 'vbox', align: 'start'}
|
54
54
|
}
|
55
55
|
}
|
56
|
-
Neo.setupClass(MainView);
|
56
|
+
MainView = Neo.setupClass(MainView);
|
57
57
|
</pre>
|
58
58
|
|
59
59
|
We use a Container with a VM containing the data props `hello` and `world`.
|
@@ -108,7 +108,7 @@ class MainView extends Container {
|
|
108
108
|
layout: {ntype: 'vbox', align: 'start'}
|
109
109
|
}
|
110
110
|
}
|
111
|
-
Neo.setupClass(MainView);
|
111
|
+
MainView = Neo.setupClass(MainView);
|
112
112
|
</pre>
|
113
113
|
|
114
114
|
We use a Container with a VM containing the data props `hello` and `world`.
|
@@ -183,7 +183,7 @@ class MainView extends Container {
|
|
183
183
|
}]
|
184
184
|
}
|
185
185
|
}
|
186
|
-
Neo.setupClass(MainView);
|
186
|
+
MainView = Neo.setupClass(MainView);
|
187
187
|
</pre>
|
188
188
|
|
189
189
|
The output of this demo is supposed to exactly look the same like the previous demo.
|
@@ -245,7 +245,7 @@ class MainView extends Container {
|
|
245
245
|
layout: {ntype: 'vbox', align: 'start'}
|
246
246
|
}
|
247
247
|
}
|
248
|
-
Neo.setupClass(MainView);
|
248
|
+
MainView = Neo.setupClass(MainView);
|
249
249
|
</pre>
|
250
250
|
Data props inside VMs can be nested. Our VM contains a `user` data prop as an object,
|
251
251
|
which contains the nested props `firstname` and `lastname`.
|
@@ -288,7 +288,7 @@ class EditUserDialogController extends Controller {
|
|
288
288
|
})
|
289
289
|
}
|
290
290
|
}
|
291
|
-
Neo.setupClass(EditUserDialogController);
|
291
|
+
EditUserDialogController = Neo.setupClass(EditUserDialogController);
|
292
292
|
|
293
293
|
class EditUserDialog extends Dialog {
|
294
294
|
static config = {
|
@@ -309,7 +309,7 @@ class EditUserDialog extends Dialog {
|
|
309
309
|
wrapperStyle: {height: '300px', width : '400px'}
|
310
310
|
}
|
311
311
|
}
|
312
|
-
Neo.setupClass(EditUserDialog);
|
312
|
+
EditUserDialog = Neo.setupClass(EditUserDialog);
|
313
313
|
|
314
314
|
class MainContainerController extends Controller {
|
315
315
|
static config = {
|
@@ -336,7 +336,7 @@ class MainContainerController extends Controller {
|
|
336
336
|
}
|
337
337
|
}
|
338
338
|
}
|
339
|
-
Neo.setupClass(MainContainerController);
|
339
|
+
MainContainerController = Neo.setupClass(MainContainerController);
|
340
340
|
|
341
341
|
class MainView extends Viewport {
|
342
342
|
static config = {
|
@@ -383,7 +383,7 @@ class MainView extends Viewport {
|
|
383
383
|
}
|
384
384
|
}
|
385
385
|
|
386
|
-
Neo.setupClass(MainView);
|
386
|
+
MainView = Neo.setupClass(MainView);
|
387
387
|
</pre>
|
388
388
|
|
389
389
|
## Class based Models
|
@@ -398,7 +398,7 @@ import ViewModel from '../model/Component.mjs';
|
|
398
398
|
|
399
399
|
class MainViewModel extends ViewModel {
|
400
400
|
static config = {
|
401
|
-
className: '
|
401
|
+
className: 'Guides.vm6.MainViewModel',
|
402
402
|
data: {
|
403
403
|
hello: 'Hello',
|
404
404
|
world: 'world!'
|
@@ -410,6 +410,7 @@ class MainViewModel extends ViewModel {
|
|
410
410
|
Neo.Main.log({value: `onDataPropertyChange: key: ${key}, value: ${value}, oldValue: ${oldValue}`})
|
411
411
|
}
|
412
412
|
}
|
413
|
+
MainViewModel = Neo.setupClass(MainViewModel);
|
413
414
|
|
414
415
|
class MainView extends Container {
|
415
416
|
static config = {
|
@@ -440,5 +441,5 @@ class MainView extends Container {
|
|
440
441
|
layout: {ntype: 'vbox', align: 'start'}
|
441
442
|
}
|
442
443
|
}
|
443
|
-
Neo.setupClass(MainView);
|
444
|
+
MainView = Neo.setupClass(MainView);
|
444
445
|
</pre>
|
@@ -23,7 +23,7 @@ class MainViewController extends Controller {
|
|
23
23
|
data.component.disabled = true;
|
24
24
|
}
|
25
25
|
}
|
26
|
-
Neo.setupClass(MainViewController);
|
26
|
+
MainViewController = Neo.setupClass(MainViewController);
|
27
27
|
|
28
28
|
|
29
29
|
class MainView extends Container {
|
@@ -38,7 +38,7 @@ class MainView extends Container {
|
|
38
38
|
}]
|
39
39
|
}
|
40
40
|
}
|
41
|
-
Neo.setupClass(MainView);
|
41
|
+
MainView = Neo.setupClass(MainView);
|
42
42
|
</pre>
|
43
43
|
|
44
44
|
## Using getReference()
|
@@ -63,7 +63,7 @@ class MainViewController extends Controller {
|
|
63
63
|
this.getReference('myButton').disabled = false
|
64
64
|
}
|
65
65
|
}
|
66
|
-
Neo.setupClass(MainViewController);
|
66
|
+
MainViewController = Neo.setupClass(MainViewController);
|
67
67
|
|
68
68
|
|
69
69
|
class MainView extends Container {
|
@@ -83,7 +83,7 @@ class MainView extends Container {
|
|
83
83
|
}]
|
84
84
|
}
|
85
85
|
}
|
86
|
-
Neo.setupClass(MainView);
|
86
|
+
MainView = Neo.setupClass(MainView);
|
87
87
|
</pre>
|
88
88
|
|
89
89
|
## Getting a reference when debugging
|
@@ -127,5 +127,5 @@ class MainView extends Container {
|
|
127
127
|
}]
|
128
128
|
}
|
129
129
|
}
|
130
|
-
Neo.setupClass(MainView);
|
130
|
+
MainView = Neo.setupClass(MainView);
|
131
131
|
</pre>
|
@@ -109,7 +109,7 @@ class MainComponent extends Component {
|
|
109
109
|
}
|
110
110
|
}
|
111
111
|
|
112
|
-
Neo.setupClass(MainComponent);
|
112
|
+
MainComponent = Neo.setupClass(MainComponent);
|
113
113
|
</pre>
|
114
114
|
|
115
115
|
## Neo Style
|
@@ -142,7 +142,7 @@ class TodoListModel extends Model {
|
|
142
142
|
}
|
143
143
|
}
|
144
144
|
|
145
|
-
Neo.setupClass(TodoListModel);
|
145
|
+
TodoListModel = Neo.setupClass(TodoListModel);
|
146
146
|
|
147
147
|
|
148
148
|
class TodoListStore extends Store {
|
@@ -167,7 +167,7 @@ class TodoListStore extends Store {
|
|
167
167
|
}
|
168
168
|
}
|
169
169
|
|
170
|
-
Neo.setupClass(TodoListStore);
|
170
|
+
TodoListStore = Neo.setupClass(TodoListStore);
|
171
171
|
|
172
172
|
|
173
173
|
class MainContainer extends Container {
|
@@ -237,5 +237,5 @@ class MainContainer extends Container {
|
|
237
237
|
}
|
238
238
|
}
|
239
239
|
|
240
|
-
Neo.setupClass(MainContainer);
|
240
|
+
MainContainer = Neo.setupClass(MainContainer);
|
241
241
|
</pre>
|
@@ -37,7 +37,7 @@ class MainView extends FormContainer {
|
|
37
37
|
Neo.Main.log({value: formValues})
|
38
38
|
}
|
39
39
|
}
|
40
|
-
Neo.setupClass(MainView);
|
40
|
+
MainView = Neo.setupClass(MainView);
|
41
41
|
</pre>
|
42
42
|
|
43
43
|
## Forms can get validated without being mounted
|
@@ -88,7 +88,7 @@ class MainView extends Container {
|
|
88
88
|
Neo.Main.log({value: formValues})
|
89
89
|
}
|
90
90
|
}
|
91
|
-
Neo.setupClass(MainView);
|
91
|
+
MainView = Neo.setupClass(MainView);
|
92
92
|
</pre>
|
93
93
|
|
94
94
|
## Nested Forms
|
@@ -222,7 +222,7 @@ class MainView extends FormContainer {
|
|
222
222
|
await this.getFormValues(this.getReference('user-form'))
|
223
223
|
}
|
224
224
|
}
|
225
|
-
Neo.setupClass(MainView);
|
225
|
+
MainView = Neo.setupClass(MainView);
|
226
226
|
</pre>
|
227
227
|
|
228
228
|
Bonus: Inspect the DOM Inside the `TabContainer`.
|
@@ -34,7 +34,7 @@ class Mammal extends Base {
|
|
34
34
|
|
35
35
|
For short in-line statements of code use <code> or backticks.
|
36
36
|
|
37
|
-
When
|
37
|
+
When defining variables avoid `var` — use `let` or `const` instead.
|
38
38
|
|
39
39
|
<br>
|
40
40
|
|
@@ -8,28 +8,6 @@
|
|
8
8
|
position : relative;
|
9
9
|
text-decoration: none;
|
10
10
|
|
11
|
-
&:hover {
|
12
|
-
background-color: var(--sem-color-surface-primary-background);
|
13
|
-
|
14
|
-
&:after {
|
15
|
-
background-color: var(--purple-200);
|
16
|
-
border-radius : 2px;
|
17
|
-
bottom : 10px;
|
18
|
-
content : attr(href) ' \2192';
|
19
|
-
font-size : 0.7em;
|
20
|
-
left : -1px;
|
21
|
-
opacity : 0.7;
|
22
|
-
padding : 3px 20px;
|
23
|
-
position : absolute;
|
24
|
-
right : -1px;
|
25
|
-
text-align : center;
|
26
|
-
}
|
27
|
-
|
28
|
-
.portal-content-box-headline {
|
29
|
-
border-bottom-color: #b7c0da;
|
30
|
-
}
|
31
|
-
}
|
32
|
-
|
33
11
|
.portal-content-box-content {
|
34
12
|
margin-top : 0.75em;
|
35
13
|
padding-left: 1.3em;
|
@@ -46,6 +24,32 @@
|
|
46
24
|
}
|
47
25
|
}
|
48
26
|
|
27
|
+
.neo-mouse {
|
28
|
+
.portal-content-box {
|
29
|
+
&:hover {
|
30
|
+
background-color: var(--sem-color-surface-primary-background);
|
31
|
+
|
32
|
+
&:after {
|
33
|
+
background-color: var(--purple-200);
|
34
|
+
border-radius : 2px;
|
35
|
+
bottom : 10px;
|
36
|
+
content : attr(href) ' \2192';
|
37
|
+
font-size : 0.7em;
|
38
|
+
left : -1px;
|
39
|
+
opacity : 0.7;
|
40
|
+
padding : 3px 20px;
|
41
|
+
position : absolute;
|
42
|
+
right : -1px;
|
43
|
+
text-align : center;
|
44
|
+
}
|
45
|
+
|
46
|
+
.portal-content-box-headline {
|
47
|
+
border-bottom-color: #b7c0da;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
49
53
|
.neo-no-mouse {
|
50
54
|
.portal-content-box {
|
51
55
|
&:after {
|
@@ -10,27 +10,28 @@
|
|
10
10
|
flex-direction: column;
|
11
11
|
}
|
12
12
|
|
13
|
-
|
14
|
-
|
13
|
+
@media (min-width: 841px) {
|
14
|
+
&.portal-position-end {
|
15
|
+
flex-direction: row-reverse;
|
16
|
+
}
|
15
17
|
}
|
16
18
|
|
17
19
|
.neo-content {
|
18
20
|
font-size: min(max(2.3vw, 16px), 30px);
|
19
21
|
}
|
20
22
|
|
21
|
-
.neo-h1 {
|
22
|
-
|
23
|
+
h1.neo-h1 {
|
24
|
+
color : var(--purple-400);
|
25
|
+
font-size : min(max(4.5vw, 30px), 44px);
|
23
26
|
line-height: 1em;
|
24
27
|
margin : 0;
|
25
|
-
text-align : center;
|
26
28
|
}
|
27
29
|
|
28
|
-
.neo-h2 {
|
29
|
-
font-size : min(max(3.5vw, 24px),
|
30
|
+
h2.neo-h2 {
|
31
|
+
font-size : min(max(3.5vw, 24px), 35px);
|
30
32
|
font-weight: 600;
|
31
33
|
line-height: 1em;
|
32
34
|
margin : 0;
|
33
|
-
text-align : center;
|
34
35
|
}
|
35
36
|
|
36
37
|
.page-live-preview {
|
@@ -39,7 +40,7 @@
|
|
39
40
|
}
|
40
41
|
|
41
42
|
.portal-content-text {
|
42
|
-
align-items :
|
43
|
+
align-items : start;
|
43
44
|
display : flex;
|
44
45
|
flex : 1;
|
45
46
|
flex-direction : column;
|
@@ -52,12 +53,15 @@
|
|
52
53
|
justify-content: start;
|
53
54
|
padding : 1rem;
|
54
55
|
}
|
56
|
+
|
57
|
+
.neo-button {
|
58
|
+
margin-left: 0;
|
59
|
+
}
|
55
60
|
}
|
56
61
|
|
57
62
|
.portal-content-wrapper {
|
58
|
-
|
59
|
-
|
60
|
-
padding : 20px;
|
63
|
+
flex : 2;
|
64
|
+
padding: 20px;
|
61
65
|
|
62
66
|
@media (max-width: 600px) {
|
63
67
|
max-height: 35em;
|
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.48.0'
|
266
266
|
* @memberOf! module:Neo
|
267
267
|
* @name config.version
|
268
268
|
* @type String
|
269
269
|
*/
|
270
|
-
version: '6.
|
270
|
+
version: '6.48.0'
|
271
271
|
};
|
272
272
|
|
273
273
|
Object.assign(DefaultConfig, {
|
package/src/worker/Manager.mjs
CHANGED
@@ -232,7 +232,7 @@ class Manager extends Base {
|
|
232
232
|
NeoConfig.hasTouchEvents = ('ontouchstart' in window) || (navigator.maxTouchPoints > 0);
|
233
233
|
|
234
234
|
// Useful for styling
|
235
|
-
|
235
|
+
document.body.classList.add(NeoConfig.hasMouseEvents ? 'neo-mouse' : 'neo-no-mouse');
|
236
236
|
|
237
237
|
if (window.Worker) {
|
238
238
|
me.webWorkersEnabled = true
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|