reneco-hierarchized-picker 0.4.2-beta.6 → 0.4.2-beta.7
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/dist/cjs/reneco-hierarchized-picker_2.cjs.entry.js +4 -2
- package/dist/collection/components/hierarchized-picker/hierarchized-picker.js +2 -1
- package/dist/collection/components/treejs/index.js +2 -1
- package/dist/custom-elements/index.js +4 -2
- package/dist/esm/reneco-hierarchized-picker_2.entry.js +4 -2
- package/dist/esm-es5/reneco-hierarchized-picker_2.entry.js +1 -1
- package/dist/reneco-hierarchized-picker/p-0e6a220c.entry.js +1 -0
- package/dist/reneco-hierarchized-picker/p-73168a50.system.js +1 -1
- package/dist/reneco-hierarchized-picker/p-83e6a880.system.entry.js +3 -0
- package/dist/reneco-hierarchized-picker/reneco-hierarchized-picker.esm.js +1 -1
- package/package.json +1 -1
- package/dist/reneco-hierarchized-picker/p-081c41d9.system.entry.js +0 -3
- package/dist/reneco-hierarchized-picker/p-af4b2f5b.entry.js +0 -1
|
@@ -289,7 +289,8 @@ Tree.prototype.bindEvent = function (ele) {
|
|
|
289
289
|
return typeof item === 'string'
|
|
290
290
|
? item
|
|
291
291
|
: Object.assign(Object.assign({}, item), { callback: e => {
|
|
292
|
-
let targetOutput = Object.assign(Object.assign({}, that.nodesById[e.target.nodeId]), { hasChildren: that.nodesById[e.target.nodeId]
|
|
292
|
+
let targetOutput = Object.assign(Object.assign({}, that.nodesById[e.target.nodeId]), { hasChildren: that.nodesById[e.target.nodeId] && that.nodesById[e.target.nodeId].children &&
|
|
293
|
+
that.nodesById[e.target.nodeId].children.length && that.nodesById[e.target.nodeId].children.length > 0 });
|
|
293
294
|
delete targetOutput.children;
|
|
294
295
|
this.options.parentApi.onItemContextMenuItemClick(Object.assign(Object.assign({}, e), { target: targetOutput, contextMenuItem: item }));
|
|
295
296
|
} });
|
|
@@ -19276,8 +19277,9 @@ const HierarchizedPickerComponent = class {
|
|
|
19276
19277
|
async setNodeAsSelected(id, treeToUpdate, userClick) {
|
|
19277
19278
|
// TODO Temporarily ignores disabled mode for selecting nodes if mode is tree
|
|
19278
19279
|
if (((this.isDisabled && this.optionsManager.getOptions().mode != "tree") && this.shownTree && this.setValueOnClick) ||
|
|
19279
|
-
(this.loadedTreeJs.liElementsById[id].classList.value && this.loadedTreeJs.liElementsById[id].classList.value.indexOf('readonly_node') != -1))
|
|
19280
|
+
(this.loadedTreeJs.liElementsById[id] && this.loadedTreeJs.liElementsById[id].classList.value && this.loadedTreeJs.liElementsById[id].classList.value.indexOf('readonly_node') != -1)) {
|
|
19280
19281
|
return;
|
|
19282
|
+
}
|
|
19281
19283
|
if (treeToUpdate.getValues().indexOf(id.toString()) != -1)
|
|
19282
19284
|
return;
|
|
19283
19285
|
this.ignoreOptionsChanges = true;
|
|
@@ -619,8 +619,9 @@ export class HierarchizedPickerComponent {
|
|
|
619
619
|
async setNodeAsSelected(id, treeToUpdate, userClick) {
|
|
620
620
|
// TODO Temporarily ignores disabled mode for selecting nodes if mode is tree
|
|
621
621
|
if (((this.isDisabled && this.optionsManager.getOptions().mode != "tree") && this.shownTree && this.setValueOnClick) ||
|
|
622
|
-
(this.loadedTreeJs.liElementsById[id].classList.value && this.loadedTreeJs.liElementsById[id].classList.value.indexOf('readonly_node') != -1))
|
|
622
|
+
(this.loadedTreeJs.liElementsById[id] && this.loadedTreeJs.liElementsById[id].classList.value && this.loadedTreeJs.liElementsById[id].classList.value.indexOf('readonly_node') != -1)) {
|
|
623
623
|
return;
|
|
624
|
+
}
|
|
624
625
|
if (treeToUpdate.getValues().indexOf(id.toString()) != -1)
|
|
625
626
|
return;
|
|
626
627
|
this.ignoreOptionsChanges = true;
|
|
@@ -166,7 +166,8 @@ Tree.prototype.bindEvent = function (ele) {
|
|
|
166
166
|
return typeof item === 'string'
|
|
167
167
|
? item
|
|
168
168
|
: Object.assign(Object.assign({}, item), { callback: e => {
|
|
169
|
-
let targetOutput = Object.assign(Object.assign({}, that.nodesById[e.target.nodeId]), { hasChildren: that.nodesById[e.target.nodeId]
|
|
169
|
+
let targetOutput = Object.assign(Object.assign({}, that.nodesById[e.target.nodeId]), { hasChildren: that.nodesById[e.target.nodeId] && that.nodesById[e.target.nodeId].children &&
|
|
170
|
+
that.nodesById[e.target.nodeId].children.length && that.nodesById[e.target.nodeId].children.length > 0 });
|
|
170
171
|
delete targetOutput.children;
|
|
171
172
|
this.options.parentApi.onItemContextMenuItemClick(Object.assign(Object.assign({}, e), { target: targetOutput, contextMenuItem: item }));
|
|
172
173
|
} });
|
|
@@ -286,7 +286,8 @@ Tree.prototype.bindEvent = function (ele) {
|
|
|
286
286
|
return typeof item === 'string'
|
|
287
287
|
? item
|
|
288
288
|
: Object.assign(Object.assign({}, item), { callback: e => {
|
|
289
|
-
let targetOutput = Object.assign(Object.assign({}, that.nodesById[e.target.nodeId]), { hasChildren: that.nodesById[e.target.nodeId]
|
|
289
|
+
let targetOutput = Object.assign(Object.assign({}, that.nodesById[e.target.nodeId]), { hasChildren: that.nodesById[e.target.nodeId] && that.nodesById[e.target.nodeId].children &&
|
|
290
|
+
that.nodesById[e.target.nodeId].children.length && that.nodesById[e.target.nodeId].children.length > 0 });
|
|
290
291
|
delete targetOutput.children;
|
|
291
292
|
this.options.parentApi.onItemContextMenuItemClick(Object.assign(Object.assign({}, e), { target: targetOutput, contextMenuItem: item }));
|
|
292
293
|
} });
|
|
@@ -19274,8 +19275,9 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
19274
19275
|
async setNodeAsSelected(id, treeToUpdate, userClick) {
|
|
19275
19276
|
// TODO Temporarily ignores disabled mode for selecting nodes if mode is tree
|
|
19276
19277
|
if (((this.isDisabled && this.optionsManager.getOptions().mode != "tree") && this.shownTree && this.setValueOnClick) ||
|
|
19277
|
-
(this.loadedTreeJs.liElementsById[id].classList.value && this.loadedTreeJs.liElementsById[id].classList.value.indexOf('readonly_node') != -1))
|
|
19278
|
+
(this.loadedTreeJs.liElementsById[id] && this.loadedTreeJs.liElementsById[id].classList.value && this.loadedTreeJs.liElementsById[id].classList.value.indexOf('readonly_node') != -1)) {
|
|
19278
19279
|
return;
|
|
19280
|
+
}
|
|
19279
19281
|
if (treeToUpdate.getValues().indexOf(id.toString()) != -1)
|
|
19280
19282
|
return;
|
|
19281
19283
|
this.ignoreOptionsChanges = true;
|
|
@@ -285,7 +285,8 @@ Tree.prototype.bindEvent = function (ele) {
|
|
|
285
285
|
return typeof item === 'string'
|
|
286
286
|
? item
|
|
287
287
|
: Object.assign(Object.assign({}, item), { callback: e => {
|
|
288
|
-
let targetOutput = Object.assign(Object.assign({}, that.nodesById[e.target.nodeId]), { hasChildren: that.nodesById[e.target.nodeId]
|
|
288
|
+
let targetOutput = Object.assign(Object.assign({}, that.nodesById[e.target.nodeId]), { hasChildren: that.nodesById[e.target.nodeId] && that.nodesById[e.target.nodeId].children &&
|
|
289
|
+
that.nodesById[e.target.nodeId].children.length && that.nodesById[e.target.nodeId].children.length > 0 });
|
|
289
290
|
delete targetOutput.children;
|
|
290
291
|
this.options.parentApi.onItemContextMenuItemClick(Object.assign(Object.assign({}, e), { target: targetOutput, contextMenuItem: item }));
|
|
291
292
|
} });
|
|
@@ -19272,8 +19273,9 @@ const HierarchizedPickerComponent = class {
|
|
|
19272
19273
|
async setNodeAsSelected(id, treeToUpdate, userClick) {
|
|
19273
19274
|
// TODO Temporarily ignores disabled mode for selecting nodes if mode is tree
|
|
19274
19275
|
if (((this.isDisabled && this.optionsManager.getOptions().mode != "tree") && this.shownTree && this.setValueOnClick) ||
|
|
19275
|
-
(this.loadedTreeJs.liElementsById[id].classList.value && this.loadedTreeJs.liElementsById[id].classList.value.indexOf('readonly_node') != -1))
|
|
19276
|
+
(this.loadedTreeJs.liElementsById[id] && this.loadedTreeJs.liElementsById[id].classList.value && this.loadedTreeJs.liElementsById[id].classList.value.indexOf('readonly_node') != -1)) {
|
|
19276
19277
|
return;
|
|
19278
|
+
}
|
|
19277
19279
|
if (treeToUpdate.getValues().indexOf(id.toString()) != -1)
|
|
19278
19280
|
return;
|
|
19279
19281
|
this.ignoreOptionsChanges = true;
|