neo.mjs 6.1.2 → 6.1.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/ServiceWorker.mjs +2 -2
- package/examples/ServiceWorker.mjs +2 -2
- package/package.json +1 -1
- package/resources/scss/src/tab/header/Toolbar.scss +3 -3
- package/src/DefaultConfig.mjs +2 -2
- package/src/main/DomEvents.mjs +3 -10
- package/src/main/mixin/DeltaUpdates.mjs +8 -6
- package/src/tree/Accordion.mjs +12 -5
package/apps/ServiceWorker.mjs
CHANGED
package/package.json
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
.neo-tab-button-indicator {
|
12
12
|
bottom: unset;
|
13
13
|
height: var(--tab-strip-height);
|
14
|
-
top :
|
14
|
+
top : calc(var(--tab-strip-height) * -1);
|
15
15
|
width : 100%;
|
16
16
|
}
|
17
17
|
|
@@ -33,7 +33,7 @@
|
|
33
33
|
.neo-tab-button-indicator {
|
34
34
|
bottom: unset;
|
35
35
|
height: 100%;
|
36
|
-
right :
|
36
|
+
right : calc(var(--tab-strip-height) * -1);
|
37
37
|
width : var(--tab-strip-height);
|
38
38
|
}
|
39
39
|
|
@@ -62,7 +62,7 @@
|
|
62
62
|
.neo-tab-button-indicator {
|
63
63
|
bottom: unset;
|
64
64
|
height: 100%;
|
65
|
-
left :
|
65
|
+
left : calc(var(--tab-strip-height) * -1);
|
66
66
|
width : var(--tab-strip-height);
|
67
67
|
}
|
68
68
|
|
package/src/DefaultConfig.mjs
CHANGED
@@ -236,12 +236,12 @@ const DefaultConfig = {
|
|
236
236
|
useVdomWorker: true,
|
237
237
|
/**
|
238
238
|
* buildScripts/injectPackageVersion.mjs will update this value
|
239
|
-
* @default '6.1.
|
239
|
+
* @default '6.1.3'
|
240
240
|
* @memberOf! module:Neo
|
241
241
|
* @name config.version
|
242
242
|
* @type String
|
243
243
|
*/
|
244
|
-
version: '6.1.
|
244
|
+
version: '6.1.3'
|
245
245
|
};
|
246
246
|
|
247
247
|
Object.assign(DefaultConfig, {
|
package/src/main/DomEvents.mjs
CHANGED
@@ -669,16 +669,9 @@ class DomEvents extends Base {
|
|
669
669
|
* @returns {Object}
|
670
670
|
*/
|
671
671
|
parseDomRect(rect) {
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
left : rect.left,
|
676
|
-
right : rect.right,
|
677
|
-
top : rect.top,
|
678
|
-
width : rect.width,
|
679
|
-
x : rect.x,
|
680
|
-
y : rect.y
|
681
|
-
}
|
672
|
+
let {bottom, height, left, right, top, width, x, y} = rect;
|
673
|
+
|
674
|
+
return {bottom, height, left, right, top, width, x, y}
|
682
675
|
}
|
683
676
|
|
684
677
|
/**
|
@@ -122,12 +122,14 @@ class DeltaUpdates extends Base {
|
|
122
122
|
node = this.getElement(delta.id),
|
123
123
|
parentNode = this.getElement(delta.parentId);
|
124
124
|
|
125
|
-
if (
|
126
|
-
parentNode.
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
125
|
+
if (parentNode) {
|
126
|
+
if (index >= parentNode.children.length) {
|
127
|
+
parentNode.appendChild(node)
|
128
|
+
} else {
|
129
|
+
//index++; // todo?: increase the index in case same parent, oldIndex < newIndex, direct swap
|
130
|
+
if (node && parentNode.children[index].id !== delta.id) {
|
131
|
+
parentNode.insertBefore(node, parentNode.children[index])
|
132
|
+
}
|
131
133
|
}
|
132
134
|
}
|
133
135
|
}
|
package/src/tree/Accordion.mjs
CHANGED
@@ -157,7 +157,7 @@ class AccordionTree extends TreeList {
|
|
157
157
|
items = me.store.find('parentId', parentId),
|
158
158
|
itemCls = me.itemCls,
|
159
159
|
folderCls = me.folderCls,
|
160
|
-
cls, tmpRoot;
|
160
|
+
cls, id, tmpRoot;
|
161
161
|
|
162
162
|
if (items.length > 0) {
|
163
163
|
if (!vdomRoot.cn) {
|
@@ -168,7 +168,8 @@ class AccordionTree extends TreeList {
|
|
168
168
|
vdomRoot.cn.push({
|
169
169
|
tag: 'ul',
|
170
170
|
cls: ['neo-list'],
|
171
|
-
cn : []
|
171
|
+
cn : [],
|
172
|
+
id : `${me.id}__${parentId}__ul`
|
172
173
|
});
|
173
174
|
|
174
175
|
tmpRoot = vdomRoot.cn[vdomRoot.cn.length - 1];
|
@@ -196,24 +197,30 @@ class AccordionTree extends TreeList {
|
|
196
197
|
}
|
197
198
|
}
|
198
199
|
|
200
|
+
id = me.getItemId(item.id);
|
201
|
+
|
199
202
|
tmpRoot.cn.push({
|
200
|
-
tag
|
203
|
+
tag: 'li',
|
201
204
|
cls,
|
202
|
-
id
|
203
|
-
cn
|
205
|
+
id,
|
206
|
+
cn : [{
|
204
207
|
tag : 'span',
|
205
208
|
cls : ['neo-accordion-item-icon', item.iconCls],
|
209
|
+
id : id + '__item',
|
206
210
|
removeDom: !item.isLeaf
|
207
211
|
}, {
|
208
212
|
cls : [itemCls + '-content'],
|
213
|
+
id : id + '__item-content',
|
209
214
|
style: {pointerEvents: 'none'},
|
210
215
|
cn : [{
|
211
216
|
tag : 'span',
|
212
217
|
cls : [itemCls + '-content-header'],
|
218
|
+
id : id + '__item-content-header',
|
213
219
|
innerHTML: item.name
|
214
220
|
}, {
|
215
221
|
tag : 'span',
|
216
222
|
cls : [itemCls + '-content-text'],
|
223
|
+
id : id + '__item-content-text',
|
217
224
|
innerHTML: item.content
|
218
225
|
}]
|
219
226
|
}],
|