neo.mjs 4.0.46 → 4.0.49
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/buildScripts/webpack/production/webpack.config.appworker.mjs +7 -3
- package/package.json +3 -3
- package/src/component/Base.mjs +1 -1
- package/src/component/DateSelector.mjs +3 -2
- package/src/component/mwc/TextField.mjs +2 -2
- package/src/draggable/DragZone.mjs +4 -4
- package/src/filter/BooleanContainer.mjs +2 -2
- package/src/filter/NumberContainer.mjs +4 -4
- package/src/filter/ToggleOperatorsButton.mjs +2 -2
- package/src/form/field/Base.mjs +2 -2
- package/src/main/addon/AmCharts.mjs +1 -1
- package/src/main/addon/WebComponent.mjs +57 -0
- package/src/main/mixin/TouchDomEvents.mjs +0 -1
- package/src/selection/GalleryModel.mjs +2 -2
- package/src/selection/HelixModel.mjs +3 -3
- package/src/table/View.mjs +1 -1
|
@@ -16,7 +16,8 @@ const cwd = process.cwd(),
|
|
|
16
16
|
regexTrimEnd = /\s+$/gm,
|
|
17
17
|
regexTrimStart = /^\s+/gm;
|
|
18
18
|
|
|
19
|
-
let
|
|
19
|
+
let contextAdjusted = false,
|
|
20
|
+
config, examplesPath;
|
|
20
21
|
|
|
21
22
|
if (fs.existsSync(configPath)) {
|
|
22
23
|
config = requireJson(configPath);
|
|
@@ -134,8 +135,11 @@ export default env => {
|
|
|
134
135
|
|
|
135
136
|
plugins: [
|
|
136
137
|
new webpack.ContextReplacementPlugin(/.*/, context => {
|
|
137
|
-
|
|
138
|
-
|
|
138
|
+
let con = context.context;
|
|
139
|
+
|
|
140
|
+
if (!insideNeo && !contextAdjusted && (con.includes('/src/worker') || con.includes('\\src\\worker'))) {
|
|
141
|
+
context.request = path.join('../../', context.request);
|
|
142
|
+
contextAdjusted = true;
|
|
139
143
|
}
|
|
140
144
|
}),
|
|
141
145
|
...plugins
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neo.mjs",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.49",
|
|
4
4
|
"description": "The webworkers driven UI framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
"chalk": "^5.0.1",
|
|
43
43
|
"clean-webpack-plugin": "^4.0.0",
|
|
44
44
|
"commander": "^9.3.0",
|
|
45
|
-
"cssnano": "^5.1.
|
|
45
|
+
"cssnano": "^5.1.12",
|
|
46
46
|
"envinfo": "^7.8.1",
|
|
47
47
|
"fs-extra": "^10.1.0",
|
|
48
48
|
"highlightjs-line-numbers.js": "^2.8.0",
|
|
49
|
-
"inquirer": "^
|
|
49
|
+
"inquirer": "^9.0.0",
|
|
50
50
|
"neo-jsdoc": "^1.0.1",
|
|
51
51
|
"neo-jsdoc-x": "^1.0.4",
|
|
52
52
|
"postcss": "^8.4.14",
|
package/src/component/Base.mjs
CHANGED
|
@@ -1007,7 +1007,7 @@ class Base extends CoreBase {
|
|
|
1007
1007
|
* @returns {Promise<*>}
|
|
1008
1008
|
*/
|
|
1009
1009
|
getDomRect(id=this.id, appName=this.appName) {
|
|
1010
|
-
return Neo.main.DomAccess.getBoundingClientRect({
|
|
1010
|
+
return Neo.main.DomAccess.getBoundingClientRect({appName, id});
|
|
1011
1011
|
}
|
|
1012
1012
|
|
|
1013
1013
|
/**
|
|
@@ -326,8 +326,9 @@ class DateSelector extends Component {
|
|
|
326
326
|
me.currentDate = new Date(`${value}T00:00:00`);
|
|
327
327
|
|
|
328
328
|
me.fire('change', {
|
|
329
|
-
|
|
330
|
-
|
|
329
|
+
component: me,
|
|
330
|
+
oldValue,
|
|
331
|
+
value
|
|
331
332
|
});
|
|
332
333
|
} else {
|
|
333
334
|
me.cacheUpdate();
|
|
@@ -325,8 +325,8 @@ class DragZone extends Base {
|
|
|
325
325
|
|
|
326
326
|
Object.assign(me, {
|
|
327
327
|
dragElementRect: rect,
|
|
328
|
-
offsetX
|
|
329
|
-
offsetY
|
|
328
|
+
offsetX,
|
|
329
|
+
offsetY
|
|
330
330
|
});
|
|
331
331
|
|
|
332
332
|
me.createDragProxy(rect);
|
|
@@ -337,8 +337,8 @@ class DragZone extends Base {
|
|
|
337
337
|
dragElementRect: rect,
|
|
338
338
|
eventData : data,
|
|
339
339
|
id : me.id,
|
|
340
|
-
offsetX
|
|
341
|
-
offsetY
|
|
340
|
+
offsetX,
|
|
341
|
+
offsetY
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
344
|
|
|
@@ -59,8 +59,8 @@ class NumberContainer extends Container {
|
|
|
59
59
|
if (oldValue !== undefined) {
|
|
60
60
|
this.fire('operatorChange', {
|
|
61
61
|
component: this,
|
|
62
|
-
oldValue
|
|
63
|
-
value
|
|
62
|
+
oldValue,
|
|
63
|
+
value
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -74,8 +74,8 @@ class NumberContainer extends Container {
|
|
|
74
74
|
if (oldValue !== undefined) {
|
|
75
75
|
this.fire('change', {
|
|
76
76
|
component: this,
|
|
77
|
-
oldValue
|
|
78
|
-
value
|
|
77
|
+
oldValue,
|
|
78
|
+
value
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
}
|
package/src/form/field/Base.mjs
CHANGED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import Base from '../../core/Base.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Addon to register WebComponents
|
|
5
|
+
* @class Neo.main.addon.WebComponent
|
|
6
|
+
* @extends Neo.core.Base
|
|
7
|
+
* @singleton
|
|
8
|
+
*/
|
|
9
|
+
class WebComponent extends Base {
|
|
10
|
+
static getConfig() {return {
|
|
11
|
+
/**
|
|
12
|
+
* @member {String} className='Neo.main.addon.WebComponent'
|
|
13
|
+
* @protected
|
|
14
|
+
*/
|
|
15
|
+
className: 'Neo.main.addon.WebComponent',
|
|
16
|
+
/**
|
|
17
|
+
* @member {Boolean} singleton=true
|
|
18
|
+
* @protected
|
|
19
|
+
*/
|
|
20
|
+
singleton: true
|
|
21
|
+
}}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @param {Object} config
|
|
25
|
+
*/
|
|
26
|
+
construct(config) {
|
|
27
|
+
super.construct(config);
|
|
28
|
+
|
|
29
|
+
this.registerElementLoader();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
registerElementLoader() {
|
|
36
|
+
customElements.define('element-loader', class extends HTMLElement {
|
|
37
|
+
async connectedCallback() {
|
|
38
|
+
let me = this,
|
|
39
|
+
content = await (await fetch(me.getAttribute('src'))).text(),
|
|
40
|
+
styles;
|
|
41
|
+
|
|
42
|
+
me.attachShadow({mode: 'open'}).innerHTML = content;
|
|
43
|
+
|
|
44
|
+
styles = me.querySelector('style');
|
|
45
|
+
styles && me.shadowRoot.append(styles);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
Neo.applyClassConfig(WebComponent);
|
|
52
|
+
|
|
53
|
+
let instance = Neo.create(WebComponent);
|
|
54
|
+
|
|
55
|
+
Neo.applyToGlobalNs(instance);
|
|
56
|
+
|
|
57
|
+
export default instance;
|
|
@@ -140,7 +140,7 @@ class GalleryModel extends Model {
|
|
|
140
140
|
me.select(record[store.keyProperty]);
|
|
141
141
|
|
|
142
142
|
view.fire('select', {
|
|
143
|
-
record
|
|
143
|
+
record
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
146
|
|
|
@@ -190,7 +190,7 @@ class GalleryModel extends Model {
|
|
|
190
190
|
me.select(record[store.keyProperty]);
|
|
191
191
|
|
|
192
192
|
view.fire('select', {
|
|
193
|
-
record
|
|
193
|
+
record
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
196
|
|
|
@@ -154,7 +154,7 @@ class HelixModel extends Model {
|
|
|
154
154
|
me.select(record[store.keyProperty]);
|
|
155
155
|
|
|
156
156
|
view.fire('select', {
|
|
157
|
-
record
|
|
157
|
+
record
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
160
|
|
|
@@ -186,7 +186,7 @@ class HelixModel extends Model {
|
|
|
186
186
|
me.select(record[store.keyProperty]);
|
|
187
187
|
|
|
188
188
|
view.fire('select', {
|
|
189
|
-
record
|
|
189
|
+
record
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
192
|
|
|
@@ -259,7 +259,7 @@ class HelixModel extends Model {
|
|
|
259
259
|
view.mounted && Neo.currentWorker.promiseMessage('main', {
|
|
260
260
|
action : 'updateDom',
|
|
261
261
|
appName: view.appName,
|
|
262
|
-
deltas
|
|
262
|
+
deltas
|
|
263
263
|
}).then(() => {
|
|
264
264
|
view.onSelect?.(items);
|
|
265
265
|
me.fire('selectionChange', items, oldItems);
|