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.
@@ -20,9 +20,9 @@ class ServiceWorker extends ServiceBase {
20
20
  */
21
21
  singleton: true,
22
22
  /**
23
- * @member {String} version='6.1.2'
23
+ * @member {String} version='6.1.3'
24
24
  */
25
- version: '6.1.2'
25
+ version: '6.1.3'
26
26
  }
27
27
 
28
28
  /**
@@ -20,9 +20,9 @@ class ServiceWorker extends ServiceBase {
20
20
  */
21
21
  singleton: true,
22
22
  /**
23
- * @member {String} version='6.1.2'
23
+ * @member {String} version='6.1.3'
24
24
  */
25
- version: '6.1.2'
25
+ version: '6.1.3'
26
26
  }
27
27
 
28
28
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo.mjs",
3
- "version": "6.1.2",
3
+ "version": "6.1.3",
4
4
  "description": "The webworkers driven UI framework",
5
5
  "type": "module",
6
6
  "repository": {
@@ -11,7 +11,7 @@
11
11
  .neo-tab-button-indicator {
12
12
  bottom: unset;
13
13
  height: var(--tab-strip-height);
14
- top : calcVar(tab-strip-height, '*', -1);
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 : calcVar(tab-strip-height, '*', -1);
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 : calcVar(tab-strip-height, '*', -1);
65
+ left : calc(var(--tab-strip-height) * -1);
66
66
  width : var(--tab-strip-height);
67
67
  }
68
68
 
@@ -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.2'
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.2'
244
+ version: '6.1.3'
245
245
  };
246
246
 
247
247
  Object.assign(DefaultConfig, {
@@ -669,16 +669,9 @@ class DomEvents extends Base {
669
669
  * @returns {Object}
670
670
  */
671
671
  parseDomRect(rect) {
672
- return {
673
- bottom: rect.bottom,
674
- height: rect.height,
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 (index >= parentNode.children.length) {
126
- parentNode.appendChild(node)
127
- } else {
128
- //index++; // todo?: increase the index in case same parent, oldIndex < newIndex, direct swap
129
- if (node && parentNode.children[index].id !== delta.id) {
130
- parentNode.insertBefore(node, parentNode.children[index])
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
  }
@@ -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 : 'li',
203
+ tag: 'li',
201
204
  cls,
202
- id : me.getItemId(item.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
  }],