neo.mjs 5.3.6 → 5.3.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
CHANGED
package/package.json
CHANGED
package/src/DefaultConfig.mjs
CHANGED
@@ -237,12 +237,12 @@ const DefaultConfig = {
|
|
237
237
|
useVdomWorker: true,
|
238
238
|
/**
|
239
239
|
* buildScripts/injectPackageVersion.mjs will update this value
|
240
|
-
* @default '5.3.
|
240
|
+
* @default '5.3.8'
|
241
241
|
* @memberOf! module:Neo
|
242
242
|
* @name config.version
|
243
243
|
* @type String
|
244
244
|
*/
|
245
|
-
version: '5.3.
|
245
|
+
version: '5.3.8'
|
246
246
|
};
|
247
247
|
|
248
248
|
Object.assign(DefaultConfig, {
|
package/src/layout/Flexbox.mjs
CHANGED
@@ -118,9 +118,14 @@ class Flexbox extends Base {
|
|
118
118
|
* @param {Neo.component.Base} item
|
119
119
|
*/
|
120
120
|
applyChildAttributes(item) {
|
121
|
-
let style = item.wrapperStyle
|
121
|
+
let style = item.wrapperStyle,
|
122
|
+
flex = style.flex || item.flex || (this.align === 'stretch' ? 1 : '0 1 auto');
|
122
123
|
|
123
|
-
|
124
|
+
if (flex === 1) {
|
125
|
+
flex = '1 1 auto';
|
126
|
+
}
|
127
|
+
|
128
|
+
style.flex = flex;
|
124
129
|
item.wrapperStyle = style;
|
125
130
|
}
|
126
131
|
|
@@ -40,48 +40,52 @@ class DeltaUpdates extends Base {
|
|
40
40
|
du_insertNode(delta) {
|
41
41
|
let index = delta.index,
|
42
42
|
parentNode = this.getElementOrBody(delta.parentId),
|
43
|
-
countChildren = parentNode
|
43
|
+
countChildren = parentNode?.childNodes.length,
|
44
44
|
i = 0,
|
45
45
|
realIndex = index,
|
46
46
|
hasComments = false,
|
47
47
|
node;
|
48
48
|
|
49
|
-
|
49
|
+
if (!parentNode) {
|
50
|
+
// console.log('parentNode not found', delta.parentId);
|
51
|
+
} else {
|
52
|
+
// console.log('insertNode', index, countChildren, delta.parentId);
|
50
53
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
54
|
+
if (countChildren <= 20 && parentNode.nodeName !== 'TBODY') {
|
55
|
+
for (; i < countChildren; i++) {
|
56
|
+
if (parentNode.childNodes[i].nodeType === 8) { // ignore comments
|
57
|
+
if (i < realIndex) {
|
58
|
+
realIndex++;
|
59
|
+
}
|
57
60
|
|
58
|
-
|
61
|
+
hasComments = true;
|
62
|
+
}
|
59
63
|
}
|
60
64
|
}
|
61
|
-
}
|
62
65
|
|
63
|
-
|
64
|
-
|
66
|
+
if (!hasComments) {
|
67
|
+
countChildren = parentNode.children.length;
|
65
68
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
69
|
+
if (index > 0 && index >= countChildren) {
|
70
|
+
parentNode.insertAdjacentHTML('beforeend', delta.outerHTML);
|
71
|
+
return;
|
72
|
+
}
|
70
73
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
74
|
+
if (countChildren > 0 && countChildren > index) {
|
75
|
+
parentNode.children[index].insertAdjacentHTML('beforebegin', delta.outerHTML);
|
76
|
+
} else if (countChildren > 0) {
|
77
|
+
parentNode.children[countChildren - 1].insertAdjacentHTML('afterend', delta.outerHTML);
|
78
|
+
} else {
|
79
|
+
parentNode.insertAdjacentHTML('beforeend', delta.outerHTML);
|
80
|
+
}
|
75
81
|
} else {
|
76
|
-
|
77
|
-
}
|
78
|
-
} else {
|
79
|
-
node = this.htmlStringToElement(delta.outerHTML);
|
82
|
+
node = this.htmlStringToElement(delta.outerHTML);
|
80
83
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
84
|
+
if (countChildren > 0 && countChildren > realIndex) {
|
85
|
+
parentNode.insertBefore(node, parentNode.childNodes[realIndex]);
|
86
|
+
} else {
|
87
|
+
parentNode.appendChild(node);
|
88
|
+
}
|
85
89
|
}
|
86
90
|
}
|
87
91
|
}
|