neo.mjs 2.3.19 → 3.0.3
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/covid/view/GalleryContainer.mjs +2 -2
- package/apps/covid/view/HelixContainer.mjs +2 -2
- package/apps/covid/view/TableContainer.mjs +2 -2
- package/apps/krausest/view/MainComponent.mjs +2 -2
- package/apps/krausest/view/TableComponent.mjs +2 -2
- package/apps/realworld/view/HomeComponent.mjs +2 -2
- package/apps/realworld/view/article/CommentComponent.mjs +2 -2
- package/apps/realworld/view/article/Component.mjs +2 -2
- package/apps/realworld/view/article/CreateCommentComponent.mjs +2 -2
- package/apps/realworld/view/article/CreateComponent.mjs +3 -3
- package/apps/realworld/view/article/PreviewComponent.mjs +2 -2
- package/apps/realworld/view/article/TagListComponent.mjs +2 -2
- package/apps/realworld/view/user/ProfileComponent.mjs +2 -2
- package/apps/realworld/view/user/SettingsComponent.mjs +2 -2
- package/apps/realworld/view/user/SignUpComponent.mjs +2 -2
- package/apps/realworld2/view/article/HelixContainer.mjs +2 -2
- package/apps/realworld2/view/article/PreviewComponent.mjs +2 -2
- package/apps/realworld2/view/article/TagListComponent.mjs +2 -2
- package/apps/realworld2/view/user/LoginFormContainer.mjs +2 -2
- package/apps/sharedcovid/view/GalleryContainer.mjs +2 -2
- package/apps/sharedcovid/view/HelixContainer.mjs +2 -2
- package/apps/sharedcovid/view/MainContainerController.mjs +12 -16
- package/apps/sharedcovid/view/TableContainer.mjs +2 -2
- package/apps/sharedcovid/view/mapboxGl/Container.mjs +2 -2
- package/apps/website/data/blog.json +13 -0
- 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/calendar/weekview/MainContainer.mjs +2 -2
- package/examples/component/coronaGallery/MainContainer.mjs +2 -2
- package/examples/component/coronaHelix/MainContainer.mjs +2 -2
- package/examples/component/gallery/MainContainer.mjs +2 -2
- package/examples/component/helix/MainContainer.mjs +2 -2
- package/examples/core/config/MainContainer.mjs +2 -2
- package/examples/dialog/MainContainer.mjs +2 -2
- package/examples/list/animate/List.mjs +8 -6
- package/examples/list/animate/MainContainer.mjs +36 -11
- package/examples/model/multiWindow/ViewportController.mjs +2 -2
- package/examples/todoList/version1/MainComponent.mjs +3 -3
- package/examples/todoList/version2/MainContainer.mjs +3 -3
- package/package.json +6 -6
- package/resources/scss/src/examples/list/animate/List.scss +1 -1
- package/src/Main.mjs +2 -2
- package/src/Neo.mjs +26 -25
- package/src/button/Split.mjs +2 -2
- package/src/calendar/view/EditEventContainer.mjs +2 -2
- package/src/calendar/view/MainContainer.mjs +2 -2
- package/src/calendar/view/MainContainerModel.mjs +2 -2
- package/src/calendar/view/SettingsContainer.mjs +2 -2
- package/src/calendar/view/YearComponent.mjs +3 -5
- package/src/calendar/view/calendars/EditContainer.mjs +2 -2
- package/src/calendar/view/month/Component.mjs +3 -5
- package/src/calendar/view/week/Component.mjs +3 -6
- package/src/calendar/view/week/EventDragZone.mjs +1 -3
- package/src/calendar/view/week/TimeAxisComponent.mjs +2 -2
- package/src/calendar/view/week/plugin/DragDrop.mjs +2 -2
- package/src/collection/Base.mjs +23 -6
- package/src/component/Base.mjs +13 -0
- package/src/component/Chip.mjs +2 -2
- package/src/component/Circle.mjs +2 -2
- package/src/component/DateSelector.mjs +4 -8
- package/src/component/Gallery.mjs +2 -2
- package/src/component/Helix.mjs +2 -2
- package/src/component/Splitter.mjs +3 -5
- package/src/component/mwc/Button.mjs +2 -2
- package/src/component/mwc/TextField.mjs +2 -2
- package/src/container/Panel.mjs +2 -2
- package/src/controller/Application.mjs +2 -2
- package/src/controller/Base.mjs +2 -2
- package/src/controller/Component.mjs +2 -2
- package/src/core/Base.mjs +25 -1
- package/src/core/IdGenerator.mjs +1 -1
- package/src/core/Observable.mjs +4 -0
- package/src/data/Store.mjs +2 -2
- package/src/dialog/Base.mjs +5 -14
- package/src/draggable/DragProxyComponent.mjs +2 -2
- package/src/draggable/DragZone.mjs +2 -2
- package/src/draggable/DropZone.mjs +2 -2
- package/src/draggable/list/DragZone.mjs +2 -2
- package/src/draggable/toolbar/DragZone.mjs +2 -2
- package/src/draggable/toolbar/SortZone.mjs +1 -3
- package/src/filter/ToggleOperatorsButton.mjs +2 -2
- package/src/form/field/CheckBox.mjs +2 -2
- package/src/form/field/Color.mjs +2 -2
- package/src/form/field/Date.mjs +2 -2
- package/src/form/field/Display.mjs +2 -2
- package/src/form/field/Picker.mjs +1 -3
- package/src/form/field/Range.mjs +2 -2
- package/src/form/field/Select.mjs +2 -2
- package/src/form/field/Text.mjs +3 -5
- package/src/form/field/Time.mjs +2 -2
- package/src/form/field/trigger/Base.mjs +2 -2
- package/src/form/field/trigger/Time.mjs +2 -2
- package/src/grid/Container.mjs +2 -2
- package/src/list/Base.mjs +5 -5
- package/src/list/plugin/Animate.mjs +105 -28
- package/src/main/DomAccess.mjs +2 -2
- package/src/main/DomEvents.mjs +2 -2
- package/src/main/addon/AmCharts.mjs +2 -2
- package/src/main/addon/AnalyticsByGoogle.mjs +2 -2
- package/src/main/addon/DragDrop.mjs +2 -2
- package/src/main/addon/HighlightJS.mjs +2 -2
- package/src/main/addon/MapboxGL.mjs +3 -2
- package/src/main/addon/Markdown.mjs +3 -3
- package/src/main/addon/Siesta.mjs +2 -2
- package/src/main/addon/Stylesheet.mjs +2 -2
- package/src/main/addon/WindowPosition.mjs +2 -2
- package/src/main/draggable/sensor/Mouse.mjs +2 -2
- package/src/main/draggable/sensor/Touch.mjs +2 -2
- package/src/manager/Component.mjs +2 -2
- package/src/manager/Instance.mjs +2 -2
- package/src/menu/List.mjs +4 -12
- package/src/model/Component.mjs +2 -2
- package/src/plugin/Base.mjs +2 -2
- package/src/plugin/Resizable.mjs +4 -7
- package/src/selection/table/CellColumnModel.mjs +2 -2
- package/src/selection/table/CellColumnRowModel.mjs +2 -2
- package/src/selection/table/CellRowModel.mjs +2 -2
- package/src/tab/Strip.mjs +1 -3
- package/src/table/Container.mjs +2 -2
- package/src/table/header/Button.mjs +2 -2
- package/src/util/Logger.mjs +2 -2
- package/src/worker/App.mjs +2 -2
- package/src/worker/Base.mjs +2 -2
- package/src/worker/Manager.mjs +2 -2
- package/test/siesta/tests/ClassConfigsAndFields.mjs +257 -19
|
@@ -79,8 +79,8 @@ class CreateComponent extends Component {
|
|
|
79
79
|
* constructor
|
|
80
80
|
* @param {Object} config
|
|
81
81
|
*/
|
|
82
|
-
|
|
83
|
-
super(config);
|
|
82
|
+
construct(config) {
|
|
83
|
+
super.construct(config);
|
|
84
84
|
|
|
85
85
|
let me = this,
|
|
86
86
|
domListeners = me.domListeners;
|
|
@@ -274,4 +274,4 @@ class CreateComponent extends Component {
|
|
|
274
274
|
|
|
275
275
|
Neo.applyClassConfig(CreateComponent);
|
|
276
276
|
|
|
277
|
-
export {CreateComponent as default};
|
|
277
|
+
export {CreateComponent as default};
|
|
@@ -97,8 +97,8 @@ class ProfileComponent extends Component {
|
|
|
97
97
|
/**
|
|
98
98
|
* @param {Object} config
|
|
99
99
|
*/
|
|
100
|
-
|
|
101
|
-
super(config);
|
|
100
|
+
construct(config) {
|
|
101
|
+
super.construct(config);
|
|
102
102
|
|
|
103
103
|
Neo.main.DomEvents.registerPreventDefaultTargets({
|
|
104
104
|
name: 'click',
|
|
@@ -166,9 +166,7 @@ class MainContainerController extends ComponentController {
|
|
|
166
166
|
let me = this;
|
|
167
167
|
|
|
168
168
|
Neo.Main.getWindowData().then(winData => {
|
|
169
|
-
|
|
170
|
-
id: [me.getReference(containerReference).id]
|
|
171
|
-
}).then(data => {
|
|
169
|
+
me.component.getDomRect(me.getReference(containerReference).id).then(data => {
|
|
172
170
|
let {height, left, top, width} = data[0];
|
|
173
171
|
|
|
174
172
|
height -= 50; // popup header in Chrome
|
|
@@ -178,7 +176,7 @@ class MainContainerController extends ComponentController {
|
|
|
178
176
|
Neo.Main.windowOpen({
|
|
179
177
|
url : `../${url}/index.html`,
|
|
180
178
|
windowFeatures: `height=${height},left=${left},top=${top},width=${width}`,
|
|
181
|
-
windowName
|
|
179
|
+
windowName
|
|
182
180
|
});
|
|
183
181
|
});
|
|
184
182
|
});
|
|
@@ -371,13 +369,11 @@ class MainContainerController extends ComponentController {
|
|
|
371
369
|
onComponentConstructed() {
|
|
372
370
|
super.onComponentConstructed();
|
|
373
371
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
}, null);
|
|
380
|
-
}
|
|
372
|
+
!Neo.config.hash && this.onHashChange({
|
|
373
|
+
country : 'all',
|
|
374
|
+
hash : {mainview: 'table'},
|
|
375
|
+
hashString: 'mainview=table'
|
|
376
|
+
}, null);
|
|
381
377
|
}
|
|
382
378
|
|
|
383
379
|
/**
|
|
@@ -611,16 +607,16 @@ class MainContainerController extends ComponentController {
|
|
|
611
607
|
} else {
|
|
612
608
|
[component.appName, ...me.connectedApps].forEach(appName => {
|
|
613
609
|
Neo.main.addon.Stylesheet.swapStyleSheet({
|
|
614
|
-
appName
|
|
615
|
-
href
|
|
616
|
-
id
|
|
610
|
+
appName,
|
|
611
|
+
href,
|
|
612
|
+
id: 'neo-theme'
|
|
617
613
|
});
|
|
618
614
|
});
|
|
619
615
|
}
|
|
620
616
|
|
|
621
617
|
button.set({
|
|
622
|
-
iconCls
|
|
623
|
-
text
|
|
618
|
+
iconCls,
|
|
619
|
+
text: buttonText
|
|
624
620
|
});
|
|
625
621
|
|
|
626
622
|
if (mapView) {
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"author" : "Tobias Uhlig",
|
|
4
|
+
"authorImage" : "author_TobiasUhlig.jpeg",
|
|
5
|
+
"date" : "Dec 15, 2021",
|
|
6
|
+
"id" : 47,
|
|
7
|
+
"image" : "resolving-pitfalls-of-the-ecmascript-class-system.png",
|
|
8
|
+
"name" : "Resolving pitfalls of the ECMAScript class system",
|
|
9
|
+
"provider" : "Medium",
|
|
10
|
+
"publisher" : "ITNEXT",
|
|
11
|
+
"selectedInto": [],
|
|
12
|
+
"type" : "Blog Post",
|
|
13
|
+
"url" : "https://itnext.io/resolving-pitfalls-of-the-ecmascript-class-system-856024218399?source=friends_link&sk=9733342654c50d8d618671b754089e1d"
|
|
14
|
+
},
|
|
2
15
|
{
|
|
3
16
|
"author" : "Tobias Uhlig",
|
|
4
17
|
"authorImage" : "author_TobiasUhlig.jpeg",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
<p>(1.1.) This might not sound like a big deal at first, but it does prevent any pre-processing inside the
|
|
31
31
|
constructor chain.</p>
|
|
32
32
|
<pre><code>class TabContainer extends Container {
|
|
33
|
-
|
|
33
|
+
construct(config) {
|
|
34
34
|
//let me = this; // breaks!
|
|
35
|
-
super(config);
|
|
35
|
+
super.construct(config);
|
|
36
36
|
let me = this; //ok
|
|
37
37
|
}
|
|
38
38
|
}</code></pre>
|
|
@@ -168,4 +168,4 @@
|
|
|
168
168
|
}
|
|
169
169
|
}</code></pre>
|
|
170
170
|
<p><a href="module-Neo.html#~autoGenerateGetSet">Details here</a></p>
|
|
171
|
-
</article>
|
|
171
|
+
</article>
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
(1.1.) This might not sound like a big deal at first, but it does prevent any pre-processing inside the constructor chain.
|
|
18
18
|
```
|
|
19
19
|
class TabContainer extends Container {
|
|
20
|
-
|
|
20
|
+
construct(config) {
|
|
21
21
|
//let me = this; // breaks!
|
|
22
|
-
super(config);
|
|
22
|
+
super.construct(config);
|
|
23
23
|
let me = this; //ok
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -149,8 +149,8 @@ class MainComponent extends Component {
|
|
|
149
149
|
}
|
|
150
150
|
}}
|
|
151
151
|
|
|
152
|
-
|
|
153
|
-
super(config);
|
|
152
|
+
construct(config) {
|
|
153
|
+
super.construct(config);
|
|
154
154
|
this.createItems(this.data || []);
|
|
155
155
|
}
|
|
156
156
|
|
|
@@ -226,7 +226,7 @@ export {MainComponent as default};</code></pre>
|
|
|
226
226
|
<button style="margin-left:10px;" class="todo-add-button" id="neo-vnode-9">Add Item</button>
|
|
227
227
|
</div>
|
|
228
228
|
</div>
|
|
229
|
-
|
|
229
|
+
|
|
230
230
|
<p>The generated DOM will be:</p>
|
|
231
231
|
<pre><code><div style="border:1px solid #000;margin:20px;overflow:scroll;height:200px;width:300px;max-width:300px;" id="neo-todolistapp1-maincomponent-1">
|
|
232
232
|
<ol id="neo-vnode-7">
|
|
@@ -244,8 +244,8 @@ export {MainComponent as default};</code></pre>
|
|
|
244
244
|
Engine to detect moved nodes.</br>
|
|
245
245
|
Since a todoList without any logic is no fun, let's change this!
|
|
246
246
|
</p>
|
|
247
|
-
<pre><code>
|
|
248
|
-
super(config);
|
|
247
|
+
<pre><code>construct(config) {
|
|
248
|
+
super.construct(config);
|
|
249
249
|
|
|
250
250
|
let me = this,
|
|
251
251
|
domListeners = me.domListeners || [];
|
|
@@ -409,8 +409,8 @@ class MainComponent extends Component {
|
|
|
409
409
|
}
|
|
410
410
|
}}
|
|
411
411
|
|
|
412
|
-
|
|
413
|
-
super(config);
|
|
412
|
+
construct(config) {
|
|
413
|
+
super.construct(config);
|
|
414
414
|
|
|
415
415
|
let me = this,
|
|
416
416
|
domListeners = me.domListeners || [];
|
|
@@ -500,4 +500,4 @@ export {MainComponent as default};</code></pre>
|
|
|
500
500
|
<p>
|
|
501
501
|
We hope this tutorial helped you to get a basic understanding on how to create a first custom component and on how to work with dom listeners!
|
|
502
502
|
</p>
|
|
503
|
-
</article>
|
|
503
|
+
</article>
|
|
@@ -69,8 +69,8 @@ class MainContainer extends Viewport {
|
|
|
69
69
|
* We want to fetch the CSS without requiring to load the related JS module.
|
|
70
70
|
* @param {Object} config
|
|
71
71
|
*/
|
|
72
|
-
|
|
73
|
-
super(config);
|
|
72
|
+
construct(config) {
|
|
73
|
+
super.construct(config);
|
|
74
74
|
Neo.worker.App.insertThemeFiles(this.appName, null, 'Neo.calendar.view.MainContainer');
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -333,8 +333,8 @@ class MainContainer extends Viewport {
|
|
|
333
333
|
/**
|
|
334
334
|
* @param {Object} config
|
|
335
335
|
*/
|
|
336
|
-
|
|
337
|
-
super(config);
|
|
336
|
+
construct(config) {
|
|
337
|
+
super.construct(config);
|
|
338
338
|
|
|
339
339
|
const me = this,
|
|
340
340
|
url = 'https://corona.lmao.ninja/v3/covid-19/countries';
|
|
@@ -408,8 +408,8 @@ class MainContainer extends Viewport {
|
|
|
408
408
|
/**
|
|
409
409
|
* @param {Object} config
|
|
410
410
|
*/
|
|
411
|
-
|
|
412
|
-
super(config);
|
|
411
|
+
construct(config) {
|
|
412
|
+
super.construct(config);
|
|
413
413
|
|
|
414
414
|
const me = this,
|
|
415
415
|
url = 'https://corona.lmao.ninja/v3/covid-19/countries';
|
|
@@ -32,13 +32,15 @@ class List extends BaseList {
|
|
|
32
32
|
* @returns {Object|Object[]|String} Either a config object to assign to the item, a vdom cn array or a html string
|
|
33
33
|
*/
|
|
34
34
|
createItemContent(record, index) {
|
|
35
|
+
let id = this.getItemId(record.id);
|
|
36
|
+
|
|
35
37
|
return [
|
|
36
|
-
{cls: ['neo-list-item-content'], cn: [
|
|
37
|
-
{tag: 'img', src: `../../../resources/examples/${record.image}`},
|
|
38
|
-
{cls: ['neo-list-item-text'], cn: [
|
|
39
|
-
{html: record.firstname},
|
|
40
|
-
{cls: ['neo-lastname'], html: record.lastname},
|
|
41
|
-
{cls: ['neo-is-online'], removeDom: !record.isOnline}
|
|
38
|
+
{cls: ['neo-list-item-content'], id: `${id}__content`, cn: [
|
|
39
|
+
{tag: 'img', id: `${id}__image`, src: `../../../resources/examples/${record.image}`},
|
|
40
|
+
{cls: ['neo-list-item-text'], id: `${id}__content_wrapper`, cn: [
|
|
41
|
+
{html: record.firstname, id: `${id}__firstname`},
|
|
42
|
+
{cls: ['neo-lastname'], id: `${id}__lastname`, html: record.lastname},
|
|
43
|
+
{cls: ['neo-is-online'], id: `${id}__isonline`, removeDom: !record.isOnline}
|
|
42
44
|
]}
|
|
43
45
|
]}
|
|
44
46
|
];
|