lexgui 8.2.4 → 8.2.5
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/build/components/NodeTree.d.ts +51 -51
- package/build/core/Namespace.js +1 -1
- package/build/core/Namespace.js.map +1 -1
- package/build/extensions/AssetView.d.ts +138 -137
- package/build/extensions/AssetView.js +58 -29
- package/build/extensions/AssetView.js.map +1 -1
- package/build/extensions/CodeEditor.d.ts +363 -363
- package/build/extensions/CodeEditor.js +24 -23
- package/build/extensions/CodeEditor.js.map +1 -1
- package/build/extensions/DocMaker.d.ts +28 -28
- package/build/extensions/DocMaker.js +13 -4
- package/build/extensions/DocMaker.js.map +1 -1
- package/build/lexgui.all.js +129 -65
- package/build/lexgui.all.js.map +1 -1
- package/build/lexgui.all.min.js +1 -1
- package/build/lexgui.all.module.js +129 -65
- package/build/lexgui.all.module.js.map +1 -1
- package/build/lexgui.all.module.min.js +1 -1
- package/build/lexgui.css +7466 -7466
- package/build/lexgui.js +34 -9
- package/build/lexgui.js.map +1 -1
- package/build/lexgui.min.css +1 -1
- package/build/lexgui.min.js +1 -1
- package/build/lexgui.module.js +34 -9
- package/build/lexgui.module.js.map +1 -1
- package/build/lexgui.module.min.js +1 -1
- package/changelog.md +14 -1
- package/examples/asset-view.html +29 -2
- package/package.json +2 -1
package/build/lexgui.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
exports.LX = g.LX;
|
|
17
17
|
if (!exports.LX) {
|
|
18
18
|
exports.LX = {
|
|
19
|
-
version: '8.2.
|
|
19
|
+
version: '8.2.5',
|
|
20
20
|
ready: false,
|
|
21
21
|
extensions: [], // Store extensions used
|
|
22
22
|
extraCommandbarEntries: [], // User specific entries for command bar
|
|
@@ -4986,6 +4986,7 @@
|
|
|
4986
4986
|
item.id = exports.LX.getSupportedDOMName(node.id);
|
|
4987
4987
|
item.tabIndex = '0';
|
|
4988
4988
|
item.treeData = node;
|
|
4989
|
+
node.treeEl = item;
|
|
4989
4990
|
// Select hierarchy icon
|
|
4990
4991
|
let icon = (this.options.skipDefaultIcon ?? true) ? null : 'Dot'; // Default: no childs
|
|
4991
4992
|
if (isParent) {
|
|
@@ -5468,21 +5469,45 @@
|
|
|
5468
5469
|
el.focus();
|
|
5469
5470
|
}
|
|
5470
5471
|
}
|
|
5471
|
-
|
|
5472
|
+
/* 'path' here helps to identity the correct item based on its parent path, for same 'id' issues */
|
|
5473
|
+
select(id, path) {
|
|
5472
5474
|
const nodeFilter = this.domEl.querySelector('.lexnodetreefilter');
|
|
5473
5475
|
if (nodeFilter) {
|
|
5474
5476
|
nodeFilter.value = '';
|
|
5475
5477
|
}
|
|
5476
5478
|
this.refresh(null, id);
|
|
5477
5479
|
this.domEl.querySelectorAll('.selected').forEach((i) => i.classList.remove('selected'));
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5480
|
+
if (id === undefined) {
|
|
5481
|
+
// if no id, try with the path
|
|
5482
|
+
if (path !== undefined) {
|
|
5483
|
+
id = path.at(-1);
|
|
5484
|
+
}
|
|
5485
|
+
else {
|
|
5486
|
+
// Unselect
|
|
5487
|
+
this.selected.length = 0;
|
|
5488
|
+
return;
|
|
5489
|
+
}
|
|
5490
|
+
}
|
|
5491
|
+
let el = null;
|
|
5492
|
+
if (path !== undefined) {
|
|
5493
|
+
let sourceData = this.data;
|
|
5494
|
+
for (const p of path) {
|
|
5495
|
+
const pItem = sourceData.children.find((item) => item.id === p);
|
|
5496
|
+
if (!pItem)
|
|
5497
|
+
break;
|
|
5498
|
+
sourceData = pItem;
|
|
5499
|
+
}
|
|
5500
|
+
el = sourceData.treeEl;
|
|
5501
|
+
console.assert(el, 'NodeTree: No domEl in item ' + id);
|
|
5502
|
+
}
|
|
5503
|
+
else if (id !== undefined) {
|
|
5504
|
+
// Element should exist, since tree was refreshed to show it
|
|
5505
|
+
el = this.domEl.querySelector('#' + exports.LX.getSupportedDOMName(id));
|
|
5506
|
+
console.assert(el, "NodeTree: Can't select node " + id);
|
|
5507
|
+
}
|
|
5508
|
+
if (!el) {
|
|
5509
|
+
console.assert(el, "NodeTree: Can't select node " + id);
|
|
5482
5510
|
}
|
|
5483
|
-
// Element should exist, since tree was refreshed to show it
|
|
5484
|
-
const el = this.domEl.querySelector('#' + exports.LX.getSupportedDOMName(id));
|
|
5485
|
-
console.assert(el, "NodeTree: Can't select node " + id);
|
|
5486
5511
|
el.classList.add('selected');
|
|
5487
5512
|
this.selected = [el.treeData];
|
|
5488
5513
|
el.focus();
|