neo.mjs 6.21.0 → 6.22.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/colors/view/HeaderToolbar.mjs +7 -3
- package/apps/covid/view/MainContainerController.mjs +6 -6
- package/apps/covid/view/TableContainer.mjs +5 -3
- package/apps/covid/view/country/Gallery.mjs +6 -4
- package/apps/form/view/ViewportModel.mjs +2 -2
- package/apps/portal/index.html +23 -1
- package/apps/portal/view/HeaderToolbar.mjs +2 -2
- package/apps/portal/view/Viewport.mjs +3 -1
- package/apps/portal/view/ViewportController.mjs +10 -0
- package/apps/portal/view/about/Container.mjs +44 -0
- package/apps/portal/view/about/MemberContainer.mjs +191 -0
- package/apps/portal/view/home/MainContainer.mjs +9 -2
- package/apps/portal/view/home/parts/AfterMath.mjs +12 -8
- package/apps/portal/view/home/parts/Colors.mjs +8 -2
- package/apps/portal/view/home/parts/Features.mjs +50 -83
- package/apps/portal/view/home/parts/Helix.mjs +8 -2
- package/apps/portal/view/home/parts/MainNeo.mjs +17 -5
- package/apps/portal/view/learn/ContentView.mjs +18 -4
- package/apps/realworld/api/Base.mjs +5 -5
- package/apps/realworld/view/MainContainerController.mjs +19 -17
- package/apps/realworld2/api/Base.mjs +5 -5
- package/apps/realworld2/view/MainContainerController.mjs +11 -11
- package/apps/realworld2/view/article/Gallery.mjs +6 -4
- package/apps/sharedcovid/view/MainContainerController.mjs +11 -12
- package/apps/sharedcovid/view/TableContainer.mjs +7 -5
- package/apps/sharedcovid/view/country/Gallery.mjs +6 -4
- package/apps/shareddialog/view/MainContainerController.mjs +5 -5
- package/buildScripts/webpack/json/myApps.template.json +1 -2
- package/docs/app/view/classdetails/MembersList.mjs +8 -8
- package/docs/app/view/classdetails/SourceViewComponent.mjs +6 -6
- package/docs/app/view/classdetails/TutorialComponent.mjs +9 -9
- package/examples/ServiceWorker.mjs +2 -2
- package/examples/component/coronaGallery/CountryGallery.mjs +6 -4
- package/examples/component/helix/Viewport.mjs +2 -2
- package/examples/list/circle/MainContainer.mjs +7 -7
- package/examples/preloadingAssets/view/MainContainerController.mjs +5 -5
- package/package.json +5 -5
- package/resources/data/deck/learnneo/pages/GuideEvents.md +2 -4
- package/resources/data/deck/learnneo/pages/WhyNeo-Features.md +46 -0
- package/resources/data/deck/learnneo/pages/WhyNeo-Intro.md +5 -6
- package/resources/data/deck/learnneo/pages/WhyNeo-Multi-Window.md +1 -1
- package/resources/data/deck/learnneo/tree.json +3 -2
- package/resources/fonts/GT-Planar-Regular.otf +0 -0
- package/resources/images/logo/neo_logo_favicon.svg +16 -0
- package/resources/images/team/tobiu.png +0 -0
- package/resources/scss/src/apps/colors/HeaderToolbar.scss +23 -1
- package/resources/scss/src/apps/colors/Viewport.scss +10 -0
- package/resources/scss/src/apps/portal/HeaderToolbar.scss +7 -7
- package/resources/scss/src/apps/portal/Viewport.scss +10 -0
- package/resources/scss/src/apps/portal/about/Container.scss +4 -0
- package/resources/scss/src/apps/portal/about/MemberContainer.scss +70 -0
- package/resources/scss/src/apps/portal/home/FooterContainer.scss +12 -0
- package/resources/scss/src/apps/portal/home/parts/BaseContainer.scss +16 -16
- package/resources/scss/src/apps/portal/home/parts/MainNeo.scss +62 -7
- package/resources/scss/src/apps/portal/learn/ContentView.scss +1 -0
- package/resources/scss/src/apps/portal/learn/PageContainer.scss +6 -0
- package/resources/scss/src/layout/Cube.scss +3 -3
- package/resources/scss/src/plugin/Resizable.scss +12 -19
- package/resources/scss/theme-neo-light/dialog/Base.scss +12 -2
- package/src/DefaultConfig.mjs +2 -2
- package/src/calendar/view/MainContainer.mjs +10 -10
- package/src/calendar/view/SettingsContainer.mjs +10 -10
- package/src/calendar/view/YearComponent.mjs +2 -2
- package/src/calendar/view/calendars/List.mjs +2 -2
- package/src/calendar/view/month/Component.mjs +4 -4
- package/src/calendar/view/week/Component.mjs +2 -2
- package/src/calendar/view/week/plugin/DragDrop.mjs +4 -4
- package/src/code/LivePreview.mjs +6 -15
- package/src/component/Base.mjs +3 -3
- package/src/component/Circle.mjs +5 -5
- package/src/component/DateSelector.mjs +4 -4
- package/src/component/Gallery.mjs +8 -8
- package/src/component/Helix.mjs +12 -12
- package/src/component/Toast.mjs +1 -1
- package/src/component/wrapper/AmChart.mjs +2 -2
- package/src/component/wrapper/CesiumJS.mjs +2 -2
- package/src/component/wrapper/GoogleMaps.mjs +2 -2
- package/src/component/wrapper/MonacoEditor.mjs +3 -3
- package/src/core/Observable.mjs +2 -2
- package/src/data/Store.mjs +2 -2
- package/src/dialog/Base.mjs +44 -14
- package/src/draggable/DragZone.mjs +4 -4
- package/src/draggable/list/DragZone.mjs +4 -4
- package/src/draggable/tab/header/toolbar/SortZone.mjs +2 -2
- package/src/draggable/toolbar/DragZone.mjs +4 -4
- package/src/draggable/toolbar/SortZone.mjs +3 -3
- package/src/form/field/ComboBox.mjs +3 -2
- package/src/form/field/FileUpload.mjs +3 -3
- package/src/form/field/Text.mjs +2 -2
- package/src/form/field/TextArea.mjs +2 -2
- package/src/grid/Container.mjs +2 -2
- package/src/layout/Cube.mjs +1 -3
- package/src/list/plugin/Animate.mjs +23 -23
- package/src/main/DomAccess.mjs +1 -1
- package/src/main/DomEvents.mjs +14 -5
- package/src/main/addon/AmCharts.mjs +2 -2
- package/src/main/addon/MapboxGL.mjs +4 -4
- package/src/manager/DomEvent.mjs +2 -2
- package/src/manager/Focus.mjs +2 -2
- package/src/manager/Toast.mjs +6 -4
- package/src/manager/rpc/Message.mjs +2 -2
- package/src/plugin/Resizable.mjs +11 -3
- package/src/selection/HelixModel.mjs +3 -3
- package/src/tab/Strip.mjs +4 -4
- package/src/table/Container.mjs +4 -4
- package/src/util/Logger.mjs +6 -4
- package/src/worker/App.mjs +2 -2
- package/src/worker/Manager.mjs +3 -2
- package/apps/website/Overwrites.mjs +0 -16
- package/apps/website/app.mjs +0 -7
- package/apps/website/data/blog.json +0 -769
- package/apps/website/data/docs.json +0 -29
- package/apps/website/data/examples_devmode.json +0 -173
- package/apps/website/data/examples_dist_dev.json +0 -164
- package/apps/website/data/examples_dist_prod.json +0 -164
- package/apps/website/index.html +0 -11
- package/apps/website/model/BlogPost.mjs +0 -60
- package/apps/website/model/Example.mjs +0 -48
- package/apps/website/neo-config.json +0 -7
- package/apps/website/store/BlogPosts.mjs +0 -39
- package/apps/website/store/Examples.mjs +0 -35
- package/apps/website/view/HeaderContainer.mjs +0 -72
- package/apps/website/view/MainContainer.mjs +0 -95
- package/apps/website/view/MainContainerController.mjs +0 -230
- package/apps/website/view/blog/Container.mjs +0 -50
- package/apps/website/view/blog/List.mjs +0 -171
- package/apps/website/view/examples/List.mjs +0 -124
- package/apps/website/view/examples/TabContainer.mjs +0 -66
- package/apps/website/view/home/DeveloperIntroComponent.mjs +0 -266
- package/apps/website/view/home/ExecutiveIntroComponent.mjs +0 -291
- package/apps/website/view/home/TabContainer.mjs +0 -56
- package/resources/scss/src/apps/website/HeaderContainer.scss +0 -136
- package/resources/scss/src/apps/website/MainContainer.scss +0 -25
- package/resources/scss/src/apps/website/blog/Container.scss +0 -18
- package/resources/scss/src/apps/website/blog/List.scss +0 -183
- package/resources/scss/src/apps/website/examples/List.scss +0 -157
- package/resources/scss/src/apps/website/home/TabContainer.scss +0 -117
- package/resources/scss/theme-dark/apps/website/HeaderContainer.scss +0 -5
- package/resources/scss/theme-dark/apps/website/MainContainer.scss +0 -4
- package/resources/scss/theme-dark/apps/website/blog/Container.scss +0 -3
- package/resources/scss/theme-dark/apps/website/home/TabContainer.scss +0 -4
- package/resources/scss/theme-light/apps/website/HeaderContainer.scss +0 -5
- package/resources/scss/theme-light/apps/website/MainContainer.scss +0 -4
- package/resources/scss/theme-light/apps/website/blog/Container.scss +0 -3
- package/resources/scss/theme-light/apps/website/home/TabContainer.scss +0 -4
- package/resources/scss/theme-neo-light/apps/website/HeaderContainer.scss +0 -5
- package/resources/scss/theme-neo-light/apps/website/MainContainer.scss +0 -4
- package/resources/scss/theme-neo-light/apps/website/blog/Container.scss +0 -3
- package/resources/scss/theme-neo-light/apps/website/home/TabContainer.scss +0 -4
@@ -159,14 +159,14 @@ class MonacoEditor extends Base {
|
|
159
159
|
afterSetMounted(value, oldValue) {
|
160
160
|
super.afterSetMounted(value, oldValue);
|
161
161
|
|
162
|
-
|
163
|
-
let me = this;
|
162
|
+
let me = this;
|
164
163
|
|
164
|
+
value && me.timeout(150).then(() => {
|
165
165
|
Neo.main.addon.MonacoEditor.createInstance(me.getInitialOptions()).then(() => {
|
166
166
|
// use this custom method as needed inside your class extensions
|
167
167
|
me.onEditorMounted?.()
|
168
168
|
})
|
169
|
-
}
|
169
|
+
})
|
170
170
|
}
|
171
171
|
|
172
172
|
/**
|
package/src/core/Observable.mjs
CHANGED
package/src/data/Store.mjs
CHANGED
package/src/dialog/Base.mjs
CHANGED
@@ -142,6 +142,13 @@ class Base extends Panel {
|
|
142
142
|
trapFocus_: false
|
143
143
|
}
|
144
144
|
|
145
|
+
/**
|
146
|
+
* @member {Neo.component.Base|null} animateTarget=null
|
147
|
+
*/
|
148
|
+
get animateTarget() {
|
149
|
+
return Neo.getComponent(this.animateTargetId)
|
150
|
+
}
|
151
|
+
|
145
152
|
/**
|
146
153
|
* @param {Object} config
|
147
154
|
*/
|
@@ -225,12 +232,21 @@ class Base extends Panel {
|
|
225
232
|
* @param {Boolean} oldValue
|
226
233
|
* @protected
|
227
234
|
*/
|
228
|
-
afterSetMaximized(value, oldValue) {
|
229
|
-
let me
|
230
|
-
|
235
|
+
async afterSetMaximized(value, oldValue) {
|
236
|
+
let me = this,
|
237
|
+
firstCall = oldValue === undefined,
|
238
|
+
{cls} = me.vdom;
|
231
239
|
|
240
|
+
!firstCall && NeoArray.add(cls, 'animated-hiding-showing');
|
232
241
|
NeoArray.toggle(cls, 'neo-maximized', value);
|
233
|
-
me.update()
|
242
|
+
me.update();
|
243
|
+
|
244
|
+
if (!firstCall) {
|
245
|
+
await(me.timeout(250));
|
246
|
+
|
247
|
+
NeoArray.remove(cls, 'animated-hiding-showing');
|
248
|
+
me.update()
|
249
|
+
}
|
234
250
|
}
|
235
251
|
|
236
252
|
/**
|
@@ -293,8 +309,10 @@ class Base extends Panel {
|
|
293
309
|
* @protected
|
294
310
|
*/
|
295
311
|
afterSetTitle(value, oldValue) {
|
296
|
-
|
297
|
-
|
312
|
+
let {headerToolbar} = this;
|
313
|
+
|
314
|
+
if (headerToolbar) {
|
315
|
+
headerToolbar.title = value
|
298
316
|
}
|
299
317
|
}
|
300
318
|
|
@@ -312,9 +330,15 @@ class Base extends Panel {
|
|
312
330
|
*
|
313
331
|
*/
|
314
332
|
async animateHide() {
|
315
|
-
let me
|
316
|
-
{
|
317
|
-
|
333
|
+
let me = this,
|
334
|
+
{animateTarget, id} = me,
|
335
|
+
appName, rects;
|
336
|
+
|
337
|
+
// Assuming that we want to show the dialog inside the same browser window as the animation target
|
338
|
+
me.windowId = animateTarget.windowId;
|
339
|
+
me.appName = appName = animateTarget.appName;
|
340
|
+
|
341
|
+
rects = await me.getDomRect([id, me.animateTargetId])
|
318
342
|
|
319
343
|
await Neo.applyDeltas(appName, {
|
320
344
|
id,
|
@@ -355,9 +379,15 @@ class Base extends Panel {
|
|
355
379
|
*
|
356
380
|
*/
|
357
381
|
async animateShow() {
|
358
|
-
let me
|
359
|
-
{
|
360
|
-
rect
|
382
|
+
let me = this,
|
383
|
+
{animateTarget, id, style} = me,
|
384
|
+
appName, rect;
|
385
|
+
|
386
|
+
// Assuming that we want to show the dialog inside the same browser window as the animation target
|
387
|
+
me.windowId = animateTarget.windowId;
|
388
|
+
me.appName = appName = animateTarget.appName;
|
389
|
+
|
390
|
+
rect = await me.getDomRect(me.animateTargetId);
|
361
391
|
|
362
392
|
// rendered outside the visible area
|
363
393
|
await me.render(true);
|
@@ -599,13 +629,13 @@ class Base extends Panel {
|
|
599
629
|
|
600
630
|
style.transitionProperty = 'none';
|
601
631
|
|
602
|
-
|
632
|
+
me.timeout(50).then(() => {
|
603
633
|
style = me.style;
|
604
634
|
|
605
635
|
style.transitionProperty = initialTransitionProperty;
|
606
636
|
|
607
637
|
me.style = style
|
608
|
-
}
|
638
|
+
})
|
609
639
|
}
|
610
640
|
|
611
641
|
me.style = style;
|
@@ -235,13 +235,13 @@ class DragZone extends Base {
|
|
235
235
|
let me = this,
|
236
236
|
id = me.dragProxy.id;
|
237
237
|
|
238
|
-
|
238
|
+
me.timeout(me.moveInMainThread ? 0 : 30).then(() => {
|
239
239
|
Neo.currentWorker.promiseMessage('main', {
|
240
240
|
action : 'updateDom',
|
241
241
|
appName: me.appName,
|
242
242
|
deltas : [{action: 'removeNode', id: id}]
|
243
243
|
});
|
244
|
-
}
|
244
|
+
});
|
245
245
|
|
246
246
|
me.dragProxy.destroy()
|
247
247
|
}
|
@@ -425,9 +425,9 @@ class DragZone extends Base {
|
|
425
425
|
*
|
426
426
|
*/
|
427
427
|
resetData() {
|
428
|
-
|
428
|
+
this.timeout(50).then(() => {
|
429
429
|
this.data = null
|
430
|
-
}
|
430
|
+
})
|
431
431
|
}
|
432
432
|
|
433
433
|
/**
|
@@ -98,16 +98,16 @@ class DragZone extends BaseDragZone {
|
|
98
98
|
proxy.cls = cls;
|
99
99
|
|
100
100
|
// ensure to get into the next animation frame
|
101
|
-
|
101
|
+
me.timeout(30).then(() => {
|
102
102
|
wrapperStyle.left = `${rect.left}px`;
|
103
103
|
wrapperStyle.top = `${rect.top}px`;
|
104
104
|
|
105
105
|
proxy.wrapperStyle = wrapperStyle;
|
106
106
|
|
107
|
-
|
107
|
+
me.timeout(300).then(() => {
|
108
108
|
me.dragEnd()
|
109
|
-
}
|
110
|
-
}
|
109
|
+
})
|
110
|
+
})
|
111
111
|
}
|
112
112
|
}
|
113
113
|
|
@@ -40,14 +40,14 @@ class SortZone extends BaseSortZone {
|
|
40
40
|
onDragEnd(data) {
|
41
41
|
super.onDragEnd(data);
|
42
42
|
|
43
|
-
|
43
|
+
this.timeout(300).then(() => {
|
44
44
|
let me = this,
|
45
45
|
{owner} = me,
|
46
46
|
cls = owner.cls || [];
|
47
47
|
|
48
48
|
NeoArray.remove(cls, 'neo-no-animation');
|
49
49
|
owner.cls = cls
|
50
|
-
}
|
50
|
+
})
|
51
51
|
}
|
52
52
|
|
53
53
|
/**
|
@@ -72,16 +72,16 @@ class DragZone extends BaseDragZone {
|
|
72
72
|
proxy.cls = cls;
|
73
73
|
|
74
74
|
// ensure to get into the next animation frame
|
75
|
-
|
75
|
+
me.timeout(30).then(() => {
|
76
76
|
wrapperStyle.left = `${rect.left}px`;
|
77
77
|
wrapperStyle.top = `${rect.top}px`;
|
78
78
|
|
79
79
|
proxy.wrapperStyle = wrapperStyle;
|
80
80
|
|
81
|
-
|
81
|
+
me.timeout(100).then(() => {
|
82
82
|
me.dragEnd()
|
83
|
-
}
|
84
|
-
}
|
83
|
+
})
|
84
|
+
})
|
85
85
|
}
|
86
86
|
}
|
87
87
|
|
@@ -234,11 +234,11 @@ class SortZone extends DragZone {
|
|
234
234
|
});
|
235
235
|
|
236
236
|
// we need to add a short (1 frame) delay to ensure the item has switched to an absolute position
|
237
|
-
|
237
|
+
me.timeout(5).then(() => {
|
238
238
|
itemStyle = button.style || {};
|
239
239
|
itemStyle.visibility = 'hidden';
|
240
|
-
button.style = itemStyle
|
241
|
-
}
|
240
|
+
button.style = itemStyle
|
241
|
+
})
|
242
242
|
})
|
243
243
|
}
|
244
244
|
}
|
@@ -401,11 +401,12 @@ class ComboBox extends Picker {
|
|
401
401
|
selectionModel.select(record);
|
402
402
|
selectionModel.suspendEvents = false
|
403
403
|
}
|
404
|
-
|
404
|
+
|
405
|
+
me.timeout(100).then(() => {
|
405
406
|
const index = store.indexOf(record);
|
406
407
|
list._focusIndex = -1; // silent update to ensure afterSetFocusIndex() always gets called
|
407
408
|
list.focusIndex = index > -1 ? index : 0
|
408
|
-
}
|
409
|
+
})
|
409
410
|
}
|
410
411
|
// Filtered down to nothing - hide picker if it has been created.
|
411
412
|
else {
|
@@ -382,7 +382,7 @@ class FileUpload extends Base {
|
|
382
382
|
me.file = me.document = null;
|
383
383
|
|
384
384
|
// We have to wait for the DOM to have changed, and the input field to be visible
|
385
|
-
await
|
385
|
+
await me.timeout(100);
|
386
386
|
me.focus(me.getInputEl().id);
|
387
387
|
}
|
388
388
|
|
@@ -445,7 +445,7 @@ class FileUpload extends Base {
|
|
445
445
|
me.state = 'starting';
|
446
446
|
|
447
447
|
// We have to wait for the DOM to have changed, and the action button to be visible
|
448
|
-
await
|
448
|
+
await me.timeout(100);
|
449
449
|
me.focus(me.vdom.cn[2].id);
|
450
450
|
|
451
451
|
me.vdom.cn[1].cn[0].innerHTML = StringUtil.escapeHtml(file.name);
|
@@ -641,7 +641,7 @@ class FileUpload extends Base {
|
|
641
641
|
|
642
642
|
switch (status) {
|
643
643
|
case 'scanning':
|
644
|
-
|
644
|
+
me.timeout(me.statusScanInterval).then(() => {me.checkDocumentStatus()});
|
645
645
|
break;
|
646
646
|
case 'deleted':
|
647
647
|
me.error = `${me.documentText} ${me.documentId} ${isNoLongerAvailable}`;
|
package/src/form/field/Text.mjs
CHANGED
@@ -571,9 +571,9 @@ class Text extends Base {
|
|
571
571
|
|
572
572
|
me.updateInputWidth();
|
573
573
|
|
574
|
-
!isEmpty &&
|
574
|
+
!isEmpty && me.timeout(20).then(() => {
|
575
575
|
me.updateCenterBorderElWidth(false)
|
576
|
-
}
|
576
|
+
})
|
577
577
|
} else {
|
578
578
|
// changes from e.g. left to top
|
579
579
|
me.updateInputWidth()
|
@@ -168,13 +168,13 @@ class TextArea extends Text {
|
|
168
168
|
super.afterSetValue(value, oldValue);
|
169
169
|
|
170
170
|
if (me.autoGrow && me.mounted && me.readOnly) {
|
171
|
-
|
171
|
+
me.timeout(50).then(() => {
|
172
172
|
Neo.main.DomAccess.monitorAutoGrowHandler({
|
173
173
|
appName : me.appName,
|
174
174
|
id : inputEl.id,
|
175
175
|
windowId: me.windowId
|
176
176
|
})
|
177
|
-
}
|
177
|
+
})
|
178
178
|
}
|
179
179
|
}
|
180
180
|
|
package/src/grid/Container.mjs
CHANGED
@@ -304,9 +304,9 @@ class Container extends BaseContainer {
|
|
304
304
|
} else {
|
305
305
|
listenerId = me.on('rendered', () => {
|
306
306
|
me.un('rendered', listenerId);
|
307
|
-
|
307
|
+
me.timeout(50).then(() => {
|
308
308
|
me.createViewData(data)
|
309
|
-
}
|
309
|
+
})
|
310
310
|
})
|
311
311
|
}
|
312
312
|
}
|
package/src/layout/Cube.mjs
CHANGED
@@ -417,12 +417,10 @@ class Cube extends Card {
|
|
417
417
|
let {container} = this,
|
418
418
|
{height, width} = await container.getDomRect(container.id);
|
419
419
|
|
420
|
-
console.log({height, width});
|
421
|
-
|
422
420
|
this.set({
|
423
421
|
sideX: width,
|
424
422
|
sideY: height,
|
425
|
-
sideZ:
|
423
|
+
sideZ: width
|
426
424
|
})
|
427
425
|
}
|
428
426
|
}
|
@@ -166,7 +166,7 @@ class Animate extends Base {
|
|
166
166
|
x = column * (margin + owner.itemWidth) + margin,
|
167
167
|
y = row * (margin + owner.itemHeight) + margin;
|
168
168
|
|
169
|
-
return {x, y}
|
169
|
+
return {x, y}
|
170
170
|
}
|
171
171
|
|
172
172
|
/**
|
@@ -177,13 +177,13 @@ class Animate extends Base {
|
|
177
177
|
*/
|
178
178
|
getItemIndex(obj, map, intercept) {
|
179
179
|
if (!intercept) {
|
180
|
-
return obj.index
|
180
|
+
return obj.index
|
181
181
|
}
|
182
182
|
|
183
183
|
let owner = this.owner,
|
184
184
|
key = owner.getKeyProperty();
|
185
185
|
|
186
|
-
return map.indexOf(owner.getItemId(obj.record[key]))
|
186
|
+
return map.indexOf(owner.getItemId(obj.record[key]))
|
187
187
|
}
|
188
188
|
|
189
189
|
/**
|
@@ -201,8 +201,8 @@ class Animate extends Base {
|
|
201
201
|
});
|
202
202
|
|
203
203
|
// if the store got loaded before this plugin is ready, create the items now
|
204
|
-
owner.store.getCount() > 0 && owner.createItems()
|
205
|
-
})
|
204
|
+
owner.store.getCount() > 0 && owner.createItems()
|
205
|
+
})
|
206
206
|
}
|
207
207
|
|
208
208
|
/**
|
@@ -241,15 +241,15 @@ class Animate extends Base {
|
|
241
241
|
item.reAdded = true;
|
242
242
|
}
|
243
243
|
|
244
|
-
addedItems.push(item)
|
244
|
+
addedItems.push(item)
|
245
245
|
} else {
|
246
|
-
movedItems.push(item)
|
246
|
+
movedItems.push(item)
|
247
247
|
}
|
248
248
|
});
|
249
249
|
|
250
250
|
data.oldItems.forEach((record, index) => {
|
251
251
|
if (!data.items.includes(record)) {
|
252
|
-
removedItems.push({index, record})
|
252
|
+
removedItems.push({index, record})
|
253
253
|
}
|
254
254
|
});
|
255
255
|
|
@@ -263,7 +263,7 @@ class Animate extends Base {
|
|
263
263
|
vdom.cn.splice(index, 0, me.createItem(me, obj.record, obj.index));
|
264
264
|
|
265
265
|
obj.item = vdom.cn[index];
|
266
|
-
obj.item.style.opacity = 0
|
266
|
+
obj.item.style.opacity = 0
|
267
267
|
}
|
268
268
|
}
|
269
269
|
});
|
@@ -271,7 +271,7 @@ class Animate extends Base {
|
|
271
271
|
hasAddedItems && owner.update();
|
272
272
|
|
273
273
|
// ensure to get into the next animation frame
|
274
|
-
|
274
|
+
me.timeout(50).then(() => {
|
275
275
|
// new items are already added into the vdom, while old items are not yet removed
|
276
276
|
// => we need a map to ensure getting the correct index
|
277
277
|
map = vdom.cn.map(e => e.id);
|
@@ -281,7 +281,7 @@ class Animate extends Base {
|
|
281
281
|
|
282
282
|
if (index > -1) {
|
283
283
|
// we can change the opacity for re-added items too => the vdom engine will ignore this
|
284
|
-
vdom.cn[index].style.opacity = 1
|
284
|
+
vdom.cn[index].style.opacity = 1
|
285
285
|
}
|
286
286
|
});
|
287
287
|
|
@@ -294,7 +294,7 @@ class Animate extends Base {
|
|
294
294
|
Object.assign(vdom.cn[index].style, {
|
295
295
|
opacity : 1,
|
296
296
|
transform: `translate(${position.x}px, ${position.y}px)`
|
297
|
-
})
|
297
|
+
})
|
298
298
|
}
|
299
299
|
});
|
300
300
|
|
@@ -303,13 +303,13 @@ class Animate extends Base {
|
|
303
303
|
|
304
304
|
if (index > -1) {
|
305
305
|
obj.item = vdom.cn[index];
|
306
|
-
obj.item.style.opacity = 0
|
306
|
+
obj.item.style.opacity = 0
|
307
307
|
}
|
308
308
|
});
|
309
309
|
|
310
310
|
owner.update();
|
311
|
-
me.triggerTransitionCallback()
|
312
|
-
}
|
311
|
+
me.triggerTransitionCallback()
|
312
|
+
})
|
313
313
|
}
|
314
314
|
|
315
315
|
/**
|
@@ -351,7 +351,7 @@ class Animate extends Base {
|
|
351
351
|
newVdomCn.push(vdom.cn[fromIndex]);
|
352
352
|
|
353
353
|
if (fromIndex !== index) {
|
354
|
-
hasChange = true
|
354
|
+
hasChange = true
|
355
355
|
}
|
356
356
|
});
|
357
357
|
|
@@ -360,9 +360,9 @@ class Animate extends Base {
|
|
360
360
|
owner.update();
|
361
361
|
|
362
362
|
// we need to ensure to get this call into the next animation frame
|
363
|
-
|
364
|
-
owner.createItems()
|
365
|
-
}
|
363
|
+
me.timeout(50).then(() => {
|
364
|
+
owner.createItems()
|
365
|
+
})
|
366
366
|
}
|
367
367
|
}
|
368
368
|
}
|
@@ -391,10 +391,10 @@ class Animate extends Base {
|
|
391
391
|
item = vdom.cn[fromIndex];
|
392
392
|
position = me.getItemPosition(record, index);
|
393
393
|
|
394
|
-
item.style.transform = `translate(${position.x}px, ${position.y}px)
|
394
|
+
item.style.transform = `translate(${position.x}px, ${position.y}px)`
|
395
395
|
});
|
396
396
|
|
397
|
-
owner.update()
|
397
|
+
owner.update()
|
398
398
|
}
|
399
399
|
}
|
400
400
|
|
@@ -407,8 +407,8 @@ class Animate extends Base {
|
|
407
407
|
me.transitionTimeoutId = setTimeout(() => {
|
408
408
|
me.transitionTimeoutId = null;
|
409
409
|
|
410
|
-
me.owner.createItems()
|
411
|
-
}, me.transitionDuration)
|
410
|
+
me.owner.createItems()
|
411
|
+
}, me.transitionDuration)
|
412
412
|
}
|
413
413
|
|
414
414
|
/**
|
package/src/main/DomAccess.mjs
CHANGED
package/src/main/DomEvents.mjs
CHANGED
@@ -139,9 +139,10 @@ class DomEvents extends Base {
|
|
139
139
|
* @param {Object} data
|
140
140
|
*/
|
141
141
|
addDomListener(data) {
|
142
|
-
let me
|
143
|
-
i
|
144
|
-
len
|
142
|
+
let me = this,
|
143
|
+
i = 0,
|
144
|
+
len = data.events.length,
|
145
|
+
failedId = null,
|
145
146
|
event, id, targetNode;
|
146
147
|
|
147
148
|
for (; i < len; i++) {
|
@@ -161,14 +162,22 @@ class DomEvents extends Base {
|
|
161
162
|
targetNode = document.querySelector(`[data-neo-id='${id}']`)
|
162
163
|
}
|
163
164
|
|
164
|
-
|
165
|
+
if (targetNode) {
|
166
|
+
targetNode.addEventListener(event.name, me[event.handler].bind(me))
|
167
|
+
} else {
|
168
|
+
failedId = id
|
169
|
+
}
|
170
|
+
}
|
171
|
+
|
172
|
+
if (failedId && Neo.config.environment === 'development') {
|
173
|
+
console.warn('DomEvents:addDomListener() => target node not found:', failedId)
|
165
174
|
}
|
166
175
|
|
167
176
|
Neo.worker.Manager.sendMessage(data.origin, {
|
168
177
|
action : 'reply',
|
169
178
|
data,
|
170
179
|
replyId: data.id,
|
171
|
-
success:
|
180
|
+
success: !failedId
|
172
181
|
})
|
173
182
|
}
|
174
183
|
|
@@ -90,13 +90,13 @@ class AmCharts extends Base {
|
|
90
90
|
|
91
91
|
me.chartsToCreate = [];
|
92
92
|
|
93
|
-
|
93
|
+
me.timeout(1000).then(() => {
|
94
94
|
Object.entries(me.dataMap).forEach(([key, dataValue]) => {
|
95
95
|
me.updateData(dataValue)
|
96
96
|
});
|
97
97
|
|
98
98
|
me.dataMap = {}
|
99
|
-
}
|
99
|
+
})
|
100
100
|
}
|
101
101
|
}
|
102
102
|
|
@@ -196,9 +196,9 @@ class MapboxGL extends Base {
|
|
196
196
|
autoResize(data) {
|
197
197
|
let map = this.maps[data.id];
|
198
198
|
|
199
|
-
map &&
|
199
|
+
map && this.timeout(100).then(() => {
|
200
200
|
map.resize()
|
201
|
-
}
|
201
|
+
})
|
202
202
|
}
|
203
203
|
|
204
204
|
/**
|
@@ -337,7 +337,7 @@ class MapboxGL extends Base {
|
|
337
337
|
onMapReallyLoaded(data, event) {
|
338
338
|
let me = this;
|
339
339
|
|
340
|
-
|
340
|
+
me.timeout(100).then(() => {
|
341
341
|
if (data.data) {
|
342
342
|
me.updateData({
|
343
343
|
data : data.data,
|
@@ -347,7 +347,7 @@ class MapboxGL extends Base {
|
|
347
347
|
} else if (me.dataMap[data.id]) {
|
348
348
|
me.updateData(me.dataMap[data.id])
|
349
349
|
}
|
350
|
-
}
|
350
|
+
})
|
351
351
|
}
|
352
352
|
|
353
353
|
/**
|
package/src/manager/DomEvent.mjs
CHANGED
@@ -428,9 +428,9 @@ class DomEvent extends Base {
|
|
428
428
|
});
|
429
429
|
|
430
430
|
if (component.mounted) {
|
431
|
-
|
431
|
+
me.timeout(100).then(() => {
|
432
432
|
me.mountDomListeners(component)
|
433
|
-
}
|
433
|
+
})
|
434
434
|
}
|
435
435
|
} else {
|
436
436
|
Logger.logError('Component.domListeners have to be an array', component)
|
package/src/manager/Focus.mjs
CHANGED
@@ -153,11 +153,11 @@ class Focus extends CoreBase {
|
|
153
153
|
|
154
154
|
me.lastFocusOutDate = new Date();
|
155
155
|
|
156
|
-
|
156
|
+
me.timeout(me.maxFocusInOutGap).then(() => {
|
157
157
|
if (me.lastFocusOutDate > me.lastFocusInDate) {
|
158
158
|
me.focusLeave(opts)
|
159
159
|
}
|
160
|
-
}
|
160
|
+
})
|
161
161
|
}
|
162
162
|
|
163
163
|
/**
|
package/src/manager/Toast.mjs
CHANGED
@@ -159,13 +159,15 @@ class Toast extends Base {
|
|
159
159
|
showToast(toast) {
|
160
160
|
toast.render(true);
|
161
161
|
|
162
|
+
let me = this;
|
163
|
+
|
162
164
|
// increase total of displayed toasts for a position
|
163
|
-
|
165
|
+
me.running[toast.position].unshift(toast.id);
|
164
166
|
|
165
167
|
// todo: we could use a mounted listener
|
166
|
-
|
167
|
-
|
168
|
-
}
|
168
|
+
me.timeout(50).then(() => {
|
169
|
+
me.updateItemsInPosition(toast.id)
|
170
|
+
})
|
169
171
|
}
|
170
172
|
|
171
173
|
/**
|
@@ -93,9 +93,9 @@ class Message extends Base {
|
|
93
93
|
if (!me.endPointTimeouts.includes(url)) {
|
94
94
|
me.endPointTimeouts.push(url);
|
95
95
|
|
96
|
-
|
96
|
+
me.timeout(me.requestBuffer).then(() => {
|
97
97
|
me.resolveBufferTimeout(url)
|
98
|
-
}
|
98
|
+
})
|
99
99
|
}
|
100
100
|
})
|
101
101
|
}
|