neo.mjs 6.7.6 → 6.7.8
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/covid/neo-config.json +1 -1
- package/apps/form/neo-config.json +1 -1
- package/apps/{sharedcovidchart → sharedcovid/childapps/sharedcovidchart}/MainContainer.mjs +1 -1
- package/apps/{sharedcovidchart → sharedcovid/childapps/sharedcovidchart}/index.html +1 -1
- package/apps/{sharedcovidchart → sharedcovid/childapps/sharedcovidchart}/neo-config.json +2 -2
- package/apps/{sharedcovidgallery → sharedcovid/childapps/sharedcovidgallery}/MainContainer.mjs +1 -1
- package/apps/{sharedcovidgallery → sharedcovid/childapps/sharedcovidgallery}/index.html +1 -1
- package/apps/{sharedcovidgallery → sharedcovid/childapps/sharedcovidgallery}/neo-config.json +2 -2
- package/apps/{sharedcovidhelix → sharedcovid/childapps/sharedcovidhelix}/MainContainer.mjs +1 -1
- package/apps/{sharedcovidhelix → sharedcovid/childapps/sharedcovidhelix}/index.html +1 -1
- package/apps/{sharedcovidhelix → sharedcovid/childapps/sharedcovidhelix}/neo-config.json +2 -2
- package/apps/{sharedcovidmap → sharedcovid/childapps/sharedcovidmap}/MainContainer.mjs +1 -1
- package/apps/{sharedcovidmap → sharedcovid/childapps/sharedcovidmap}/index.html +1 -1
- package/apps/{sharedcovidmap → sharedcovid/childapps/sharedcovidmap}/neo-config.json +2 -2
- package/apps/sharedcovid/view/MainContainerController.mjs +1 -1
- package/apps/{shareddialog2 → shareddialog/childapps/shareddialog2}/index.html +1 -1
- package/apps/{shareddialog2 → shareddialog/childapps/shareddialog2}/neo-config.json +2 -2
- package/apps/{shareddialog2 → shareddialog/childapps/shareddialog2}/view/MainContainer.mjs +3 -3
- package/apps/{shareddialog2 → shareddialog/childapps/shareddialog2}/view/MainContainerController.mjs +2 -6
- package/apps/shareddialog/view/MainContainerController.mjs +2 -2
- package/examples/ServiceWorker.mjs +2 -2
- package/examples/component/timer/neo-config.json +1 -1
- package/examples/component/toast/neo-config.json +1 -1
- package/examples/component/video/neo-config.json +1 -1
- package/examples/container/dialog/neo-config.json +1 -1
- package/examples/popover/neo-config.json +0 -1
- package/package.json +1 -1
- package/src/DefaultConfig.mjs +4 -4
- package/src/form/field/Date.mjs +2 -0
- package/src/form/field/FileUpload.mjs +8 -7
- package/src/form/field/Picker.mjs +0 -12
- package/src/form/field/Text.mjs +1 -0
- package/src/main/addon/ScrollSync.mjs +0 -146
- /package/apps/{sharedcovidchart → sharedcovid/childapps/sharedcovidchart}/app.mjs +0 -0
- /package/apps/{sharedcovidgallery → sharedcovid/childapps/sharedcovidgallery}/app.mjs +0 -0
- /package/apps/{sharedcovidhelix → sharedcovid/childapps/sharedcovidhelix}/app.mjs +0 -0
- /package/apps/{sharedcovidmap → sharedcovid/childapps/sharedcovidmap}/app.mjs +0 -0
- /package/apps/{shareddialog2 → shareddialog/childapps/shareddialog2}/app.mjs +0 -0
package/apps/ServiceWorker.mjs
CHANGED
@@ -3,6 +3,6 @@
|
|
3
3
|
"basePath" : "../../",
|
4
4
|
"environment" : "development",
|
5
5
|
"mainPath" : "./Main.mjs",
|
6
|
-
"mainThreadAddons": ["AmCharts", "DragDrop", "MapboxGL", "
|
6
|
+
"mainThreadAddons": ["AmCharts", "DragDrop", "MapboxGL", "Stylesheet"],
|
7
7
|
"themes" : ["neo-theme-dark", "neo-theme-light"]
|
8
8
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"appPath" : "apps/sharedcovidchart/app.mjs",
|
3
|
-
"basePath" : "
|
2
|
+
"appPath" : "apps/sharedcovid/childapps/sharedcovidchart/app.mjs",
|
3
|
+
"basePath" : "../../../../",
|
4
4
|
"environment" : "development",
|
5
5
|
"mainPath" : "./Main.mjs",
|
6
6
|
"mainThreadAddons": ["AmCharts", "Stylesheet"],
|
package/apps/{sharedcovidgallery → sharedcovid/childapps/sharedcovidgallery}/neo-config.json
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"appPath" : "apps/sharedcovidgallery/app.mjs",
|
3
|
-
"basePath" : "
|
2
|
+
"appPath" : "apps/sharedcovid/childapps/sharedcovidgallery/app.mjs",
|
3
|
+
"basePath" : "../../../../",
|
4
4
|
"environment" : "development",
|
5
5
|
"mainPath" : "./Main.mjs",
|
6
6
|
"mainThreadAddons": ["Stylesheet"],
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"appPath" : "apps/sharedcovidhelix/app.mjs",
|
3
|
-
"basePath" : "
|
2
|
+
"appPath" : "apps/sharedcovid/childapps/sharedcovidhelix/app.mjs",
|
3
|
+
"basePath" : "../../../../",
|
4
4
|
"environment" : "development",
|
5
5
|
"mainPath" : "./Main.mjs",
|
6
6
|
"mainThreadAddons": ["Stylesheet"],
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"appPath" : "apps/sharedcovidmap/app.mjs",
|
3
|
-
"basePath" : "
|
2
|
+
"appPath" : "apps/sharedcovid/childapps/sharedcovidmap/app.mjs",
|
3
|
+
"basePath" : "../../../../",
|
4
4
|
"environment" : "development",
|
5
5
|
"mainPath" : "./Main.mjs",
|
6
6
|
"mainThreadAddons": ["MapboxGL", "Stylesheet"],
|
@@ -173,7 +173,7 @@ class MainContainerController extends ComponentController {
|
|
173
173
|
top += (winData.outerHeight - winData.innerHeight + winData.screenTop);
|
174
174
|
|
175
175
|
Neo.Main.windowOpen({
|
176
|
-
url :
|
176
|
+
url : `../sharedcovid/childapps/${url}/index.html`,
|
177
177
|
windowFeatures: `height=${height},left=${left},top=${top},width=${width}`,
|
178
178
|
windowName
|
179
179
|
});
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"appPath" : "apps/shareddialog2/app.mjs",
|
3
|
-
"basePath" : "
|
2
|
+
"appPath" : "apps/shareddialog/childapps/shareddialog2/app.mjs",
|
3
|
+
"basePath" : "../../../../",
|
4
4
|
"environment" : "development",
|
5
5
|
"mainPath" : "./Main.mjs",
|
6
6
|
"mainThreadAddons": ["DragDrop", "Stylesheet"],
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import Button from '
|
1
|
+
import Button from '../../../../../src/button/Base.mjs';
|
2
2
|
import MainContainerController from './MainContainerController.mjs';
|
3
|
-
import Toolbar from '
|
4
|
-
import Viewport from '
|
3
|
+
import Toolbar from '../../../../../src/toolbar/Base.mjs';
|
4
|
+
import Viewport from '../../../../../src/container/Viewport.mjs';
|
5
5
|
|
6
6
|
/**
|
7
7
|
* @class SharedDialog2.view.MainContainer
|
package/apps/{shareddialog2 → shareddialog/childapps/shareddialog2}/view/MainContainerController.mjs
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
import ComponentController from '
|
1
|
+
import ComponentController from '../../../../../src/controller/Component.mjs';
|
2
2
|
|
3
3
|
/**
|
4
4
|
* @class SharedDialog2.view.MainContainerController
|
@@ -17,11 +17,7 @@ class MainContainerController extends ComponentController {
|
|
17
17
|
* @param {Object} data
|
18
18
|
*/
|
19
19
|
onCreateDialogButtonClick(data) {
|
20
|
-
|
21
|
-
|
22
|
-
if (app) {
|
23
|
-
app.mainView.controller.createDialog(data, this.component.appName);
|
24
|
-
}
|
20
|
+
Neo.apps['SharedDialog']?.mainView.controller.createDialog(data, this.component.appName);
|
25
21
|
}
|
26
22
|
}
|
27
23
|
|
@@ -493,7 +493,7 @@ class MainContainerController extends ComponentController {
|
|
493
493
|
dragMove : me.onDragMove,
|
494
494
|
dragStart: me.onDragStart,
|
495
495
|
scope : me
|
496
|
-
})
|
496
|
+
})
|
497
497
|
}
|
498
498
|
|
499
499
|
/**
|
@@ -535,7 +535,7 @@ class MainContainerController extends ComponentController {
|
|
535
535
|
}
|
536
536
|
|
537
537
|
Neo.Main.windowOpen({
|
538
|
-
url : '
|
538
|
+
url : 'childapps/shareddialog2/index.html',
|
539
539
|
windowFeatures: `height=${height},left=${left},top=${top},width=${width}`,
|
540
540
|
windowName : me.dockedWindowAppName
|
541
541
|
});
|
package/package.json
CHANGED
package/src/DefaultConfig.mjs
CHANGED
@@ -126,12 +126,12 @@ const DefaultConfig = {
|
|
126
126
|
* You can also create your own addons within your workspace scope. Make sure to put them inside 'src/main/addon/'
|
127
127
|
* and prefix them with 'WS/' inside your neo-config.json file.
|
128
128
|
* Example: ['DragDrop', 'Stylesheet', 'WS/MyAddon']
|
129
|
-
* @default ['DragDrop','
|
129
|
+
* @default ['DragDrop', 'Stylesheet']
|
130
130
|
* @memberOf! module:Neo
|
131
131
|
* @name config.mainThreadAddons
|
132
132
|
* @type String[]
|
133
133
|
*/
|
134
|
-
mainThreadAddons: ['DragDrop', '
|
134
|
+
mainThreadAddons: ['DragDrop', 'Stylesheet'],
|
135
135
|
/**
|
136
136
|
* Pass the URL of a JSON-file, which contains the services and methods from your backend,
|
137
137
|
* which you want to expose to the client.
|
@@ -236,12 +236,12 @@ const DefaultConfig = {
|
|
236
236
|
useVdomWorker: true,
|
237
237
|
/**
|
238
238
|
* buildScripts/injectPackageVersion.mjs will update this value
|
239
|
-
* @default '6.7.
|
239
|
+
* @default '6.7.8'
|
240
240
|
* @memberOf! module:Neo
|
241
241
|
* @name config.version
|
242
242
|
* @type String
|
243
243
|
*/
|
244
|
-
version: '6.7.
|
244
|
+
version: '6.7.8'
|
245
245
|
};
|
246
246
|
|
247
247
|
Object.assign(DefaultConfig, {
|
package/src/form/field/Date.mjs
CHANGED
@@ -138,7 +138,8 @@ class FileUpload extends Base {
|
|
138
138
|
UN_DOWNLOADABLE : 'not-downloadable',
|
139
139
|
AVAILABLE : 'not-downloadable',
|
140
140
|
DOWNLOADABLE : 'downloadable',
|
141
|
-
DELETED : 'deleted'
|
141
|
+
DELETED : 'deleted',
|
142
|
+
ERROR : 'error'
|
142
143
|
},
|
143
144
|
|
144
145
|
/**
|
@@ -533,12 +534,8 @@ class FileUpload extends Base {
|
|
533
534
|
}
|
534
535
|
}
|
535
536
|
}
|
536
|
-
// Failed network
|
537
|
-
else
|
538
|
-
me.error = xhr.response ? JSON.parse(xhr.response).message : `HTTP status : ${xhr.statusText}`;
|
539
|
-
me.progress = NaN;
|
540
|
-
me.state = 'upload-failed';
|
541
|
-
}
|
537
|
+
// Failed network requests are handled in onUploadError
|
538
|
+
// so no else condition necessary here
|
542
539
|
}
|
543
540
|
|
544
541
|
onActionButtonClick() {
|
@@ -642,6 +639,10 @@ class FileUpload extends Base {
|
|
642
639
|
me.error = `${me.documentText} ${me.documentId} ${isNoLongerAvailable}`;
|
643
640
|
me.state = 'ready';
|
644
641
|
break;
|
642
|
+
case 'error':
|
643
|
+
me.error = `${me.documentStatusError}: ${statusResponse.statusText || `Server error ${statusResponse.status}`}`;
|
644
|
+
me.state = 'deleted';
|
645
|
+
break;
|
645
646
|
default:
|
646
647
|
me.state = status;
|
647
648
|
}
|
@@ -257,12 +257,6 @@ class Picker extends Text {
|
|
257
257
|
picker.unmount();
|
258
258
|
|
259
259
|
me.pickerIsMounted = false;
|
260
|
-
|
261
|
-
Neo.main.addon.ScrollSync.unregister({
|
262
|
-
appName : me.appName,
|
263
|
-
sourceId: me.id,
|
264
|
-
targetId: picker.id
|
265
|
-
})
|
266
260
|
}
|
267
261
|
}
|
268
262
|
|
@@ -354,12 +348,6 @@ class Picker extends Text {
|
|
354
348
|
});
|
355
349
|
|
356
350
|
picker.render(true);
|
357
|
-
|
358
|
-
Neo.main.addon.ScrollSync.register({
|
359
|
-
appName : me.appName,
|
360
|
-
sourceId: me.id,
|
361
|
-
targetId: picker.id
|
362
|
-
})
|
363
351
|
}
|
364
352
|
}
|
365
353
|
|
package/src/form/field/Text.mjs
CHANGED
@@ -1,146 +0,0 @@
|
|
1
|
-
import Base from '../../core/Base.mjs';
|
2
|
-
import DomEvents from '../DomEvents.mjs'
|
3
|
-
|
4
|
-
/**
|
5
|
-
* This addon keeps the position of overlays in sync with an anchor element,
|
6
|
-
* when scrolling inside any parent node.
|
7
|
-
* A prominent use case is Neo.form.field.Picker.
|
8
|
-
* @class Neo.main.addon.ScrollSync
|
9
|
-
* @extends Neo.core.Base
|
10
|
-
* @singleton
|
11
|
-
*/
|
12
|
-
class ScrollSync extends Base {
|
13
|
-
static config = {
|
14
|
-
/**
|
15
|
-
* @member {String} className='Neo.main.addon.ScrollSync'
|
16
|
-
* @protected
|
17
|
-
*/
|
18
|
-
className: 'Neo.main.addon.ScrollSync',
|
19
|
-
/**
|
20
|
-
* Remote method access for other workers
|
21
|
-
* @member {Object} remote={app: [//...]}
|
22
|
-
* @protected
|
23
|
-
*/
|
24
|
-
remote: {
|
25
|
-
app: [
|
26
|
-
'register',
|
27
|
-
'unregister'
|
28
|
-
]
|
29
|
-
},
|
30
|
-
/**
|
31
|
-
* @member {Boolean} singleton=true
|
32
|
-
* @protected
|
33
|
-
*/
|
34
|
-
singleton: true
|
35
|
-
}
|
36
|
-
|
37
|
-
/**
|
38
|
-
* @member {Object} sourceMap={}
|
39
|
-
* @protected
|
40
|
-
*/
|
41
|
-
sourceMap = {}
|
42
|
-
|
43
|
-
/**
|
44
|
-
* @param {Object} config
|
45
|
-
*/
|
46
|
-
construct(config) {
|
47
|
-
super.construct(config);
|
48
|
-
|
49
|
-
document.addEventListener('scroll', this.onDocumentScroll.bind(this), true)
|
50
|
-
}
|
51
|
-
|
52
|
-
/**
|
53
|
-
* @param {Event} event
|
54
|
-
*/
|
55
|
-
onDocumentScroll(event) {
|
56
|
-
let me = this,
|
57
|
-
scrollNode = event.target,
|
58
|
-
sourceRect, targetNode;
|
59
|
-
|
60
|
-
me.sourceMap[scrollNode.id]?.forEach(item => {
|
61
|
-
sourceRect = document.getElementById(item.sourceId).getBoundingClientRect();
|
62
|
-
targetNode = document.getElementById(item.targetId)
|
63
|
-
|
64
|
-
targetNode.style.left = `${sourceRect.x + item.deltaX}px`;
|
65
|
-
targetNode.style.top = `${sourceRect.y + item.deltaY}px`
|
66
|
-
})
|
67
|
-
}
|
68
|
-
|
69
|
-
/**
|
70
|
-
* @param {Object} data
|
71
|
-
* @param {String} data.sourceId
|
72
|
-
* @param {String} data.targetId
|
73
|
-
* @returns Promise<Boolean>
|
74
|
-
*/
|
75
|
-
async register(data) {
|
76
|
-
// short delay to ensure the target node got mounted
|
77
|
-
await this.timeout(50)
|
78
|
-
|
79
|
-
let sourceId = data.sourceId,
|
80
|
-
sourceMap = this.sourceMap,
|
81
|
-
sourceNode = document.getElementById(sourceId),
|
82
|
-
sourceRect = sourceNode.getBoundingClientRect(),
|
83
|
-
parentNode = sourceNode.parentNode,
|
84
|
-
targetId = data.targetId,
|
85
|
-
targetRect = document.getElementById(targetId).getBoundingClientRect(),
|
86
|
-
deltaX = targetRect.x - sourceRect.x,
|
87
|
-
deltaY = targetRect.y - sourceRect.y,
|
88
|
-
overflowX, overflowY, parentId;
|
89
|
-
|
90
|
-
while (parentNode && parentNode.id) {
|
91
|
-
parentId = parentNode.id;
|
92
|
-
|
93
|
-
({overflowX, overflowY} = getComputedStyle(parentNode))
|
94
|
-
|
95
|
-
if (overflowX === 'auto' || overflowX === 'scroll' || overflowY === 'auto' || overflowY === 'scroll') {
|
96
|
-
if (!sourceMap[parentId]) {
|
97
|
-
sourceMap[parentId] = []
|
98
|
-
}
|
99
|
-
|
100
|
-
sourceMap[parentId].push({deltaX, deltaY, sourceId, targetId})
|
101
|
-
}
|
102
|
-
|
103
|
-
parentNode = parentNode.parentNode
|
104
|
-
}
|
105
|
-
|
106
|
-
return true
|
107
|
-
}
|
108
|
-
|
109
|
-
/**
|
110
|
-
* @param {Object} data
|
111
|
-
* @param {String} data.sourceId
|
112
|
-
* @param {String} data.targetId
|
113
|
-
* @returns {Boolean}
|
114
|
-
*/
|
115
|
-
unregister(data) {
|
116
|
-
let sourceId = data.sourceId,
|
117
|
-
sourceMap = this.sourceMap,
|
118
|
-
sourceNode = document.getElementById(sourceId),
|
119
|
-
parentNode = sourceNode.parentNode,
|
120
|
-
parentId;
|
121
|
-
|
122
|
-
while (parentNode && parentNode.id) {
|
123
|
-
parentId = parentNode.id;
|
124
|
-
|
125
|
-
if (sourceMap[parentId]) {
|
126
|
-
[...sourceMap[parentId]].forEach((item, index) => {
|
127
|
-
if (item.sourceId === sourceId && item.targetId === data.targetId) {
|
128
|
-
sourceMap[parentId].splice(index, 1)
|
129
|
-
}
|
130
|
-
})
|
131
|
-
|
132
|
-
if (sourceMap[parentId].length < 1) {
|
133
|
-
delete sourceMap[parentId]
|
134
|
-
}
|
135
|
-
}
|
136
|
-
|
137
|
-
parentNode = parentNode.parentNode
|
138
|
-
}
|
139
|
-
|
140
|
-
return true
|
141
|
-
}
|
142
|
-
}
|
143
|
-
|
144
|
-
let instance = Neo.applyClassConfig(ScrollSync);
|
145
|
-
|
146
|
-
export default instance;
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|