reneco-hierarchized-picker 0.3.2-beta.8 → 0.3.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/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/reneco-hierarchized-picker.cjs.entry.js +16 -10
- package/dist/cjs/reneco-hierarchized-picker.cjs.js +1 -1
- package/dist/collection/components/hierarchized-picker/hierarchized-picker.js +34 -9
- package/dist/collection/components/hierarchized-picker/treejs/index.js +1 -1
- package/dist/custom-elements/index.js +16 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/reneco-hierarchized-picker.entry.js +16 -10
- package/dist/esm/reneco-hierarchized-picker.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/reneco-hierarchized-picker.entry.js +1 -1
- package/dist/esm-es5/reneco-hierarchized-picker.js +1 -1
- package/dist/reneco-hierarchized-picker/p-1b74f81f.entry.js +1 -0
- package/dist/reneco-hierarchized-picker/p-73168a50.system.js +1 -1
- package/dist/reneco-hierarchized-picker/p-d9d3f1e0.system.entry.js +3 -0
- package/dist/reneco-hierarchized-picker/reneco-hierarchized-picker.esm.js +1 -1
- package/dist/types/components/hierarchized-picker/hierarchized-picker.d.ts +1 -0
- package/dist/types/components.d.ts +1 -0
- package/package.json +1 -1
- package/dist/reneco-hierarchized-picker/p-2e4da890.entry.js +0 -1
- package/dist/reneco-hierarchized-picker/p-b7d88949.system.entry.js +0 -3
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["reneco-hierarchized-picker.cjs",[[0,"reneco-hierarchized-picker",{"options":[16],"valueChangeCallback":[16],"disabled":[4],"newoptions":[1],"newfilter":[1],"isDisabled":[32],"theOptions":[32],"componentID":[32],"rawData":[32],"pickerClass":[32],"displayedValue":[32],"value":[32],"shownTree":[32],"hasFocus":[32],"errorToLog":[32],"getValue":[64],"setOptions":[64],"filterTree":[64],"showSelectedNodes":[64],"clearPicker":[64]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["reneco-hierarchized-picker.cjs",[[0,"reneco-hierarchized-picker",{"options":[16],"valueChangeCallback":[16],"disabled":[4],"newoptions":[1],"newfilter":[1],"isDisabled":[32],"theOptions":[32],"componentID":[32],"rawData":[32],"pickerClass":[32],"displayedValue":[32],"value":[32],"shownTree":[32],"hasFocus":[32],"errorToLog":[32],"getValue":[64],"refreshPicker":[64],"setOptions":[64],"filterTree":[64],"showSelectedNodes":[64],"clearPicker":[64]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -231,7 +231,7 @@ Tree.prototype.bindEvent = function (ele) {
|
|
|
231
231
|
if (this.options.parentApi.theOptions.origin == 'classification') {
|
|
232
232
|
// WS Call
|
|
233
233
|
this.options.parentApi
|
|
234
|
-
.getDataFromSourceClassification(this.options.parentApi.theOptions.url, Object.assign({ startNode: target.parentNode.nodeId }
|
|
234
|
+
.getDataFromSourceClassification(this.options.parentApi.theOptions.url, Object.assign(Object.assign({}, this.options.parentApi.theOptions.options), { startNode: target.parentNode.nodeId }))
|
|
235
235
|
.then(data => {
|
|
236
236
|
this.options.parentApi.completeCurrentTreeWithTree(data);
|
|
237
237
|
});
|
|
@@ -17863,6 +17863,12 @@ const HierarchizedPickerComponent = class {
|
|
|
17863
17863
|
}
|
|
17864
17864
|
}
|
|
17865
17865
|
}
|
|
17866
|
+
async refreshPicker(resetDefaultValue = false) {
|
|
17867
|
+
if (resetDefaultValue) {
|
|
17868
|
+
this.theOptions.defaultValue = [];
|
|
17869
|
+
}
|
|
17870
|
+
this.setNewOption(this.theOptions);
|
|
17871
|
+
}
|
|
17866
17872
|
logError(messageToLog) {
|
|
17867
17873
|
try {
|
|
17868
17874
|
console.error('--- Hierarchized picker ' + this.componentID + ' ERROR ---', messageToLog);
|
|
@@ -18419,9 +18425,8 @@ const HierarchizedPickerComponent = class {
|
|
|
18419
18425
|
}
|
|
18420
18426
|
else {
|
|
18421
18427
|
let urloptions = '';
|
|
18422
|
-
if (options.Reach) {
|
|
18428
|
+
if (options.Reach && init) {
|
|
18423
18429
|
urloptions += (urloptions.length == 0 ? '/?' : '&') + 'reach=' + options.Reach;
|
|
18424
|
-
init = true;
|
|
18425
18430
|
}
|
|
18426
18431
|
if (options.IsDeprecated) {
|
|
18427
18432
|
urloptions += (urloptions.length == 0 ? '/?' : '&') + 'isDeprecated=' + options.IsDeprecated;
|
|
@@ -18870,7 +18875,7 @@ const HierarchizedPickerComponent = class {
|
|
|
18870
18875
|
fullpathTranslated: that.getPropertyFromNode(value, 'Properties').FullPath,
|
|
18871
18876
|
children: (that.getPropertyFromNode(value, "hasChildren", false) &&
|
|
18872
18877
|
that.getPropertyFromNode(value, "children").length == 0 ? [{}] : []),
|
|
18873
|
-
deprecated: that.getPropertyFromNode(value, '
|
|
18878
|
+
deprecated: that.getPropertyFromNode(value, 'Properties').Is_Deprecated,
|
|
18874
18879
|
isDesaturated: false,
|
|
18875
18880
|
searchMatch: false
|
|
18876
18881
|
};
|
|
@@ -18933,7 +18938,7 @@ const HierarchizedPickerComponent = class {
|
|
|
18933
18938
|
fullpath: that.getPropertyFromNode(value.Properties, 'Fullpath'),
|
|
18934
18939
|
fullpathTranslated: that.getPropertyFromNode(value.Properties, 'Fullpath'),
|
|
18935
18940
|
children: that.getPropertyFromNode(value, 'hasChildren', false) && that.getPropertyFromNode(value, 'children').length == 0 ? [{}] : [],
|
|
18936
|
-
deprecated: that.getPropertyFromNode(value.Properties, '
|
|
18941
|
+
deprecated: that.getPropertyFromNode(value.Properties, 'Is_Deprecated', false),
|
|
18937
18942
|
};
|
|
18938
18943
|
}
|
|
18939
18944
|
}
|
|
@@ -19226,6 +19231,7 @@ const HierarchizedPickerComponent = class {
|
|
|
19226
19231
|
checkeds.forEach((item) => removeClosedAndLookUp(item));
|
|
19227
19232
|
}
|
|
19228
19233
|
catch (err) {
|
|
19234
|
+
// console.error("Error in showSelectedNodes", err);
|
|
19229
19235
|
}
|
|
19230
19236
|
if (scrollToValue && this.scrollable) {
|
|
19231
19237
|
this.scrollable.scrollTop = scrollToValue;
|
|
@@ -19476,14 +19482,14 @@ const HierarchizedPickerComponent = class {
|
|
|
19476
19482
|
this.setValueOnClick = allowSetValueOnClick;
|
|
19477
19483
|
if (values) {
|
|
19478
19484
|
values.forEach((element) => {
|
|
19479
|
-
let intNodeid = element.nodeid;
|
|
19485
|
+
let intNodeid = element.nodeid || element.ID || element.key || undefined;
|
|
19480
19486
|
if (typeof intNodeid == "string" && isNumeric(intNodeid)) {
|
|
19481
19487
|
intNodeid = parseInt(intNodeid);
|
|
19482
19488
|
}
|
|
19483
|
-
if (Object.keys(this.loadedTreeJs.liElementsById).indexOf(
|
|
19484
|
-
if ((this.loadedTreeJs.liElementsById[
|
|
19489
|
+
if (Object.keys(this.loadedTreeJs.liElementsById).map(Number).indexOf(intNodeid) > -1) {
|
|
19490
|
+
if ((this.loadedTreeJs.liElementsById[intNodeid].classList.value && this.loadedTreeJs.liElementsById[intNodeid].classList.value.indexOf("treejs-node__checked") == -1) ||
|
|
19485
19491
|
this.theOptions.defaultValue.indexOf(intNodeid) != -1) {
|
|
19486
|
-
this.setNodeAsSelected(
|
|
19492
|
+
this.setNodeAsSelected(intNodeid, this.loadedTreeJs, false);
|
|
19487
19493
|
}
|
|
19488
19494
|
}
|
|
19489
19495
|
});
|
|
@@ -19500,7 +19506,7 @@ const HierarchizedPickerComponent = class {
|
|
|
19500
19506
|
dfValue = parseInt(dfValue);
|
|
19501
19507
|
}
|
|
19502
19508
|
if (that.theOptions.origin == 'classification') {
|
|
19503
|
-
if ((typeof dfValue == 'string' && that.getPropertyFromNode(element, 'Properties.FullPath
|
|
19509
|
+
if ((typeof dfValue == 'string' && that.getPropertyFromNode(element, 'Properties').FullPath == dfValue) ||
|
|
19504
19510
|
(typeof dfValue == 'number' && that.getPropertyFromNode(element, 'ID') == dfValue)) {
|
|
19505
19511
|
element.nodeid = element.id;
|
|
19506
19512
|
that.checkFields([element]);
|
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(options => {
|
|
20
|
-
return index.bootstrapLazy([["reneco-hierarchized-picker.cjs",[[0,"reneco-hierarchized-picker",{"options":[16],"valueChangeCallback":[16],"disabled":[4],"newoptions":[1],"newfilter":[1],"isDisabled":[32],"theOptions":[32],"componentID":[32],"rawData":[32],"pickerClass":[32],"displayedValue":[32],"value":[32],"shownTree":[32],"hasFocus":[32],"errorToLog":[32],"getValue":[64],"setOptions":[64],"filterTree":[64],"showSelectedNodes":[64],"clearPicker":[64]}]]]], options);
|
|
20
|
+
return index.bootstrapLazy([["reneco-hierarchized-picker.cjs",[[0,"reneco-hierarchized-picker",{"options":[16],"valueChangeCallback":[16],"disabled":[4],"newoptions":[1],"newfilter":[1],"isDisabled":[32],"theOptions":[32],"componentID":[32],"rawData":[32],"pickerClass":[32],"displayedValue":[32],"value":[32],"shownTree":[32],"hasFocus":[32],"errorToLog":[32],"getValue":[64],"refreshPicker":[64],"setOptions":[64],"filterTree":[64],"showSelectedNodes":[64],"clearPicker":[64]}]]]], options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
|
@@ -85,6 +85,12 @@ export class HierarchizedPickerComponent {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
+
async refreshPicker(resetDefaultValue = false) {
|
|
89
|
+
if (resetDefaultValue) {
|
|
90
|
+
this.theOptions.defaultValue = [];
|
|
91
|
+
}
|
|
92
|
+
this.setNewOption(this.theOptions);
|
|
93
|
+
}
|
|
88
94
|
logError(messageToLog) {
|
|
89
95
|
try {
|
|
90
96
|
console.error('--- Hierarchized picker ' + this.componentID + ' ERROR ---', messageToLog);
|
|
@@ -644,9 +650,8 @@ export class HierarchizedPickerComponent {
|
|
|
644
650
|
}
|
|
645
651
|
else {
|
|
646
652
|
let urloptions = '';
|
|
647
|
-
if (options.Reach) {
|
|
653
|
+
if (options.Reach && init) {
|
|
648
654
|
urloptions += (urloptions.length == 0 ? '/?' : '&') + 'reach=' + options.Reach;
|
|
649
|
-
init = true;
|
|
650
655
|
}
|
|
651
656
|
if (options.IsDeprecated) {
|
|
652
657
|
urloptions += (urloptions.length == 0 ? '/?' : '&') + 'isDeprecated=' + options.IsDeprecated;
|
|
@@ -1095,7 +1100,7 @@ export class HierarchizedPickerComponent {
|
|
|
1095
1100
|
fullpathTranslated: that.getPropertyFromNode(value, 'Properties').FullPath,
|
|
1096
1101
|
children: (that.getPropertyFromNode(value, "hasChildren", false) &&
|
|
1097
1102
|
that.getPropertyFromNode(value, "children").length == 0 ? [{}] : []),
|
|
1098
|
-
deprecated: that.getPropertyFromNode(value, '
|
|
1103
|
+
deprecated: that.getPropertyFromNode(value, 'Properties').Is_Deprecated,
|
|
1099
1104
|
isDesaturated: false,
|
|
1100
1105
|
searchMatch: false
|
|
1101
1106
|
};
|
|
@@ -1158,7 +1163,7 @@ export class HierarchizedPickerComponent {
|
|
|
1158
1163
|
fullpath: that.getPropertyFromNode(value.Properties, 'Fullpath'),
|
|
1159
1164
|
fullpathTranslated: that.getPropertyFromNode(value.Properties, 'Fullpath'),
|
|
1160
1165
|
children: that.getPropertyFromNode(value, 'hasChildren', false) && that.getPropertyFromNode(value, 'children').length == 0 ? [{}] : [],
|
|
1161
|
-
deprecated: that.getPropertyFromNode(value.Properties, '
|
|
1166
|
+
deprecated: that.getPropertyFromNode(value.Properties, 'Is_Deprecated', false),
|
|
1162
1167
|
};
|
|
1163
1168
|
}
|
|
1164
1169
|
}
|
|
@@ -1451,6 +1456,7 @@ export class HierarchizedPickerComponent {
|
|
|
1451
1456
|
checkeds.forEach((item) => removeClosedAndLookUp(item));
|
|
1452
1457
|
}
|
|
1453
1458
|
catch (err) {
|
|
1459
|
+
// console.error("Error in showSelectedNodes", err);
|
|
1454
1460
|
}
|
|
1455
1461
|
if (scrollToValue && this.scrollable) {
|
|
1456
1462
|
this.scrollable.scrollTop = scrollToValue;
|
|
@@ -1701,14 +1707,14 @@ export class HierarchizedPickerComponent {
|
|
|
1701
1707
|
this.setValueOnClick = allowSetValueOnClick;
|
|
1702
1708
|
if (values) {
|
|
1703
1709
|
values.forEach((element) => {
|
|
1704
|
-
let intNodeid = element.nodeid;
|
|
1710
|
+
let intNodeid = element.nodeid || element.ID || element.key || undefined;
|
|
1705
1711
|
if (typeof intNodeid == "string" && isNumeric(intNodeid)) {
|
|
1706
1712
|
intNodeid = parseInt(intNodeid);
|
|
1707
1713
|
}
|
|
1708
|
-
if (Object.keys(this.loadedTreeJs.liElementsById).indexOf(
|
|
1709
|
-
if ((this.loadedTreeJs.liElementsById[
|
|
1714
|
+
if (Object.keys(this.loadedTreeJs.liElementsById).map(Number).indexOf(intNodeid) > -1) {
|
|
1715
|
+
if ((this.loadedTreeJs.liElementsById[intNodeid].classList.value && this.loadedTreeJs.liElementsById[intNodeid].classList.value.indexOf("treejs-node__checked") == -1) ||
|
|
1710
1716
|
this.theOptions.defaultValue.indexOf(intNodeid) != -1) {
|
|
1711
|
-
this.setNodeAsSelected(
|
|
1717
|
+
this.setNodeAsSelected(intNodeid, this.loadedTreeJs, false);
|
|
1712
1718
|
}
|
|
1713
1719
|
}
|
|
1714
1720
|
});
|
|
@@ -1725,7 +1731,7 @@ export class HierarchizedPickerComponent {
|
|
|
1725
1731
|
dfValue = parseInt(dfValue);
|
|
1726
1732
|
}
|
|
1727
1733
|
if (that.theOptions.origin == 'classification') {
|
|
1728
|
-
if ((typeof dfValue == 'string' && that.getPropertyFromNode(element, 'Properties.FullPath
|
|
1734
|
+
if ((typeof dfValue == 'string' && that.getPropertyFromNode(element, 'Properties').FullPath == dfValue) ||
|
|
1729
1735
|
(typeof dfValue == 'number' && that.getPropertyFromNode(element, 'ID') == dfValue)) {
|
|
1730
1736
|
element.nodeid = element.id;
|
|
1731
1737
|
that.checkFields([element]);
|
|
@@ -2036,6 +2042,25 @@ export class HierarchizedPickerComponent {
|
|
|
2036
2042
|
"tags": []
|
|
2037
2043
|
}
|
|
2038
2044
|
},
|
|
2045
|
+
"refreshPicker": {
|
|
2046
|
+
"complexType": {
|
|
2047
|
+
"signature": "(resetDefaultValue?: boolean) => Promise<void>",
|
|
2048
|
+
"parameters": [{
|
|
2049
|
+
"tags": [],
|
|
2050
|
+
"text": ""
|
|
2051
|
+
}],
|
|
2052
|
+
"references": {
|
|
2053
|
+
"Promise": {
|
|
2054
|
+
"location": "global"
|
|
2055
|
+
}
|
|
2056
|
+
},
|
|
2057
|
+
"return": "Promise<void>"
|
|
2058
|
+
},
|
|
2059
|
+
"docs": {
|
|
2060
|
+
"text": "",
|
|
2061
|
+
"tags": []
|
|
2062
|
+
}
|
|
2063
|
+
},
|
|
2039
2064
|
"setOptions": {
|
|
2040
2065
|
"complexType": {
|
|
2041
2066
|
"signature": "(newOptions: IConf) => Promise<void>",
|
|
@@ -199,7 +199,7 @@ Tree.prototype.bindEvent = function (ele) {
|
|
|
199
199
|
if (this.options.parentApi.theOptions.origin == 'classification') {
|
|
200
200
|
// WS Call
|
|
201
201
|
this.options.parentApi
|
|
202
|
-
.getDataFromSourceClassification(this.options.parentApi.theOptions.url, Object.assign({ startNode: target.parentNode.nodeId }
|
|
202
|
+
.getDataFromSourceClassification(this.options.parentApi.theOptions.url, Object.assign(Object.assign({}, this.options.parentApi.theOptions.options), { startNode: target.parentNode.nodeId }))
|
|
203
203
|
.then(data => {
|
|
204
204
|
this.options.parentApi.completeCurrentTreeWithTree(data);
|
|
205
205
|
});
|
|
@@ -228,7 +228,7 @@ Tree.prototype.bindEvent = function (ele) {
|
|
|
228
228
|
if (this.options.parentApi.theOptions.origin == 'classification') {
|
|
229
229
|
// WS Call
|
|
230
230
|
this.options.parentApi
|
|
231
|
-
.getDataFromSourceClassification(this.options.parentApi.theOptions.url, Object.assign({ startNode: target.parentNode.nodeId }
|
|
231
|
+
.getDataFromSourceClassification(this.options.parentApi.theOptions.url, Object.assign(Object.assign({}, this.options.parentApi.theOptions.options), { startNode: target.parentNode.nodeId }))
|
|
232
232
|
.then(data => {
|
|
233
233
|
this.options.parentApi.completeCurrentTreeWithTree(data);
|
|
234
234
|
});
|
|
@@ -17861,6 +17861,12 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
17861
17861
|
}
|
|
17862
17862
|
}
|
|
17863
17863
|
}
|
|
17864
|
+
async refreshPicker(resetDefaultValue = false) {
|
|
17865
|
+
if (resetDefaultValue) {
|
|
17866
|
+
this.theOptions.defaultValue = [];
|
|
17867
|
+
}
|
|
17868
|
+
this.setNewOption(this.theOptions);
|
|
17869
|
+
}
|
|
17864
17870
|
logError(messageToLog) {
|
|
17865
17871
|
try {
|
|
17866
17872
|
console.error('--- Hierarchized picker ' + this.componentID + ' ERROR ---', messageToLog);
|
|
@@ -18417,9 +18423,8 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
18417
18423
|
}
|
|
18418
18424
|
else {
|
|
18419
18425
|
let urloptions = '';
|
|
18420
|
-
if (options.Reach) {
|
|
18426
|
+
if (options.Reach && init) {
|
|
18421
18427
|
urloptions += (urloptions.length == 0 ? '/?' : '&') + 'reach=' + options.Reach;
|
|
18422
|
-
init = true;
|
|
18423
18428
|
}
|
|
18424
18429
|
if (options.IsDeprecated) {
|
|
18425
18430
|
urloptions += (urloptions.length == 0 ? '/?' : '&') + 'isDeprecated=' + options.IsDeprecated;
|
|
@@ -18868,7 +18873,7 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
18868
18873
|
fullpathTranslated: that.getPropertyFromNode(value, 'Properties').FullPath,
|
|
18869
18874
|
children: (that.getPropertyFromNode(value, "hasChildren", false) &&
|
|
18870
18875
|
that.getPropertyFromNode(value, "children").length == 0 ? [{}] : []),
|
|
18871
|
-
deprecated: that.getPropertyFromNode(value, '
|
|
18876
|
+
deprecated: that.getPropertyFromNode(value, 'Properties').Is_Deprecated,
|
|
18872
18877
|
isDesaturated: false,
|
|
18873
18878
|
searchMatch: false
|
|
18874
18879
|
};
|
|
@@ -18931,7 +18936,7 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
18931
18936
|
fullpath: that.getPropertyFromNode(value.Properties, 'Fullpath'),
|
|
18932
18937
|
fullpathTranslated: that.getPropertyFromNode(value.Properties, 'Fullpath'),
|
|
18933
18938
|
children: that.getPropertyFromNode(value, 'hasChildren', false) && that.getPropertyFromNode(value, 'children').length == 0 ? [{}] : [],
|
|
18934
|
-
deprecated: that.getPropertyFromNode(value.Properties, '
|
|
18939
|
+
deprecated: that.getPropertyFromNode(value.Properties, 'Is_Deprecated', false),
|
|
18935
18940
|
};
|
|
18936
18941
|
}
|
|
18937
18942
|
}
|
|
@@ -19224,6 +19229,7 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
19224
19229
|
checkeds.forEach((item) => removeClosedAndLookUp(item));
|
|
19225
19230
|
}
|
|
19226
19231
|
catch (err) {
|
|
19232
|
+
// console.error("Error in showSelectedNodes", err);
|
|
19227
19233
|
}
|
|
19228
19234
|
if (scrollToValue && this.scrollable) {
|
|
19229
19235
|
this.scrollable.scrollTop = scrollToValue;
|
|
@@ -19474,14 +19480,14 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
19474
19480
|
this.setValueOnClick = allowSetValueOnClick;
|
|
19475
19481
|
if (values) {
|
|
19476
19482
|
values.forEach((element) => {
|
|
19477
|
-
let intNodeid = element.nodeid;
|
|
19483
|
+
let intNodeid = element.nodeid || element.ID || element.key || undefined;
|
|
19478
19484
|
if (typeof intNodeid == "string" && isNumeric(intNodeid)) {
|
|
19479
19485
|
intNodeid = parseInt(intNodeid);
|
|
19480
19486
|
}
|
|
19481
|
-
if (Object.keys(this.loadedTreeJs.liElementsById).indexOf(
|
|
19482
|
-
if ((this.loadedTreeJs.liElementsById[
|
|
19487
|
+
if (Object.keys(this.loadedTreeJs.liElementsById).map(Number).indexOf(intNodeid) > -1) {
|
|
19488
|
+
if ((this.loadedTreeJs.liElementsById[intNodeid].classList.value && this.loadedTreeJs.liElementsById[intNodeid].classList.value.indexOf("treejs-node__checked") == -1) ||
|
|
19483
19489
|
this.theOptions.defaultValue.indexOf(intNodeid) != -1) {
|
|
19484
|
-
this.setNodeAsSelected(
|
|
19490
|
+
this.setNodeAsSelected(intNodeid, this.loadedTreeJs, false);
|
|
19485
19491
|
}
|
|
19486
19492
|
}
|
|
19487
19493
|
});
|
|
@@ -19498,7 +19504,7 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
19498
19504
|
dfValue = parseInt(dfValue);
|
|
19499
19505
|
}
|
|
19500
19506
|
if (that.theOptions.origin == 'classification') {
|
|
19501
|
-
if ((typeof dfValue == 'string' && that.getPropertyFromNode(element, 'Properties.FullPath
|
|
19507
|
+
if ((typeof dfValue == 'string' && that.getPropertyFromNode(element, 'Properties').FullPath == dfValue) ||
|
|
19502
19508
|
(typeof dfValue == 'number' && that.getPropertyFromNode(element, 'ID') == dfValue)) {
|
|
19503
19509
|
element.nodeid = element.id;
|
|
19504
19510
|
that.checkFields([element]);
|
package/dist/esm/loader.js
CHANGED
|
@@ -11,7 +11,7 @@ const patchEsm = () => {
|
|
|
11
11
|
const defineCustomElements = (win, options) => {
|
|
12
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
13
13
|
return patchEsm().then(() => {
|
|
14
|
-
return bootstrapLazy([["reneco-hierarchized-picker",[[0,"reneco-hierarchized-picker",{"options":[16],"valueChangeCallback":[16],"disabled":[4],"newoptions":[1],"newfilter":[1],"isDisabled":[32],"theOptions":[32],"componentID":[32],"rawData":[32],"pickerClass":[32],"displayedValue":[32],"value":[32],"shownTree":[32],"hasFocus":[32],"errorToLog":[32],"getValue":[64],"setOptions":[64],"filterTree":[64],"showSelectedNodes":[64],"clearPicker":[64]}]]]], options);
|
|
14
|
+
return bootstrapLazy([["reneco-hierarchized-picker",[[0,"reneco-hierarchized-picker",{"options":[16],"valueChangeCallback":[16],"disabled":[4],"newoptions":[1],"newfilter":[1],"isDisabled":[32],"theOptions":[32],"componentID":[32],"rawData":[32],"pickerClass":[32],"displayedValue":[32],"value":[32],"shownTree":[32],"hasFocus":[32],"errorToLog":[32],"getValue":[64],"refreshPicker":[64],"setOptions":[64],"filterTree":[64],"showSelectedNodes":[64],"clearPicker":[64]}]]]], options);
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -227,7 +227,7 @@ Tree.prototype.bindEvent = function (ele) {
|
|
|
227
227
|
if (this.options.parentApi.theOptions.origin == 'classification') {
|
|
228
228
|
// WS Call
|
|
229
229
|
this.options.parentApi
|
|
230
|
-
.getDataFromSourceClassification(this.options.parentApi.theOptions.url, Object.assign({ startNode: target.parentNode.nodeId }
|
|
230
|
+
.getDataFromSourceClassification(this.options.parentApi.theOptions.url, Object.assign(Object.assign({}, this.options.parentApi.theOptions.options), { startNode: target.parentNode.nodeId }))
|
|
231
231
|
.then(data => {
|
|
232
232
|
this.options.parentApi.completeCurrentTreeWithTree(data);
|
|
233
233
|
});
|
|
@@ -17859,6 +17859,12 @@ const HierarchizedPickerComponent = class {
|
|
|
17859
17859
|
}
|
|
17860
17860
|
}
|
|
17861
17861
|
}
|
|
17862
|
+
async refreshPicker(resetDefaultValue = false) {
|
|
17863
|
+
if (resetDefaultValue) {
|
|
17864
|
+
this.theOptions.defaultValue = [];
|
|
17865
|
+
}
|
|
17866
|
+
this.setNewOption(this.theOptions);
|
|
17867
|
+
}
|
|
17862
17868
|
logError(messageToLog) {
|
|
17863
17869
|
try {
|
|
17864
17870
|
console.error('--- Hierarchized picker ' + this.componentID + ' ERROR ---', messageToLog);
|
|
@@ -18415,9 +18421,8 @@ const HierarchizedPickerComponent = class {
|
|
|
18415
18421
|
}
|
|
18416
18422
|
else {
|
|
18417
18423
|
let urloptions = '';
|
|
18418
|
-
if (options.Reach) {
|
|
18424
|
+
if (options.Reach && init) {
|
|
18419
18425
|
urloptions += (urloptions.length == 0 ? '/?' : '&') + 'reach=' + options.Reach;
|
|
18420
|
-
init = true;
|
|
18421
18426
|
}
|
|
18422
18427
|
if (options.IsDeprecated) {
|
|
18423
18428
|
urloptions += (urloptions.length == 0 ? '/?' : '&') + 'isDeprecated=' + options.IsDeprecated;
|
|
@@ -18866,7 +18871,7 @@ const HierarchizedPickerComponent = class {
|
|
|
18866
18871
|
fullpathTranslated: that.getPropertyFromNode(value, 'Properties').FullPath,
|
|
18867
18872
|
children: (that.getPropertyFromNode(value, "hasChildren", false) &&
|
|
18868
18873
|
that.getPropertyFromNode(value, "children").length == 0 ? [{}] : []),
|
|
18869
|
-
deprecated: that.getPropertyFromNode(value, '
|
|
18874
|
+
deprecated: that.getPropertyFromNode(value, 'Properties').Is_Deprecated,
|
|
18870
18875
|
isDesaturated: false,
|
|
18871
18876
|
searchMatch: false
|
|
18872
18877
|
};
|
|
@@ -18929,7 +18934,7 @@ const HierarchizedPickerComponent = class {
|
|
|
18929
18934
|
fullpath: that.getPropertyFromNode(value.Properties, 'Fullpath'),
|
|
18930
18935
|
fullpathTranslated: that.getPropertyFromNode(value.Properties, 'Fullpath'),
|
|
18931
18936
|
children: that.getPropertyFromNode(value, 'hasChildren', false) && that.getPropertyFromNode(value, 'children').length == 0 ? [{}] : [],
|
|
18932
|
-
deprecated: that.getPropertyFromNode(value.Properties, '
|
|
18937
|
+
deprecated: that.getPropertyFromNode(value.Properties, 'Is_Deprecated', false),
|
|
18933
18938
|
};
|
|
18934
18939
|
}
|
|
18935
18940
|
}
|
|
@@ -19222,6 +19227,7 @@ const HierarchizedPickerComponent = class {
|
|
|
19222
19227
|
checkeds.forEach((item) => removeClosedAndLookUp(item));
|
|
19223
19228
|
}
|
|
19224
19229
|
catch (err) {
|
|
19230
|
+
// console.error("Error in showSelectedNodes", err);
|
|
19225
19231
|
}
|
|
19226
19232
|
if (scrollToValue && this.scrollable) {
|
|
19227
19233
|
this.scrollable.scrollTop = scrollToValue;
|
|
@@ -19472,14 +19478,14 @@ const HierarchizedPickerComponent = class {
|
|
|
19472
19478
|
this.setValueOnClick = allowSetValueOnClick;
|
|
19473
19479
|
if (values) {
|
|
19474
19480
|
values.forEach((element) => {
|
|
19475
|
-
let intNodeid = element.nodeid;
|
|
19481
|
+
let intNodeid = element.nodeid || element.ID || element.key || undefined;
|
|
19476
19482
|
if (typeof intNodeid == "string" && isNumeric(intNodeid)) {
|
|
19477
19483
|
intNodeid = parseInt(intNodeid);
|
|
19478
19484
|
}
|
|
19479
|
-
if (Object.keys(this.loadedTreeJs.liElementsById).indexOf(
|
|
19480
|
-
if ((this.loadedTreeJs.liElementsById[
|
|
19485
|
+
if (Object.keys(this.loadedTreeJs.liElementsById).map(Number).indexOf(intNodeid) > -1) {
|
|
19486
|
+
if ((this.loadedTreeJs.liElementsById[intNodeid].classList.value && this.loadedTreeJs.liElementsById[intNodeid].classList.value.indexOf("treejs-node__checked") == -1) ||
|
|
19481
19487
|
this.theOptions.defaultValue.indexOf(intNodeid) != -1) {
|
|
19482
|
-
this.setNodeAsSelected(
|
|
19488
|
+
this.setNodeAsSelected(intNodeid, this.loadedTreeJs, false);
|
|
19483
19489
|
}
|
|
19484
19490
|
}
|
|
19485
19491
|
});
|
|
@@ -19496,7 +19502,7 @@ const HierarchizedPickerComponent = class {
|
|
|
19496
19502
|
dfValue = parseInt(dfValue);
|
|
19497
19503
|
}
|
|
19498
19504
|
if (that.theOptions.origin == 'classification') {
|
|
19499
|
-
if ((typeof dfValue == 'string' && that.getPropertyFromNode(element, 'Properties.FullPath
|
|
19505
|
+
if ((typeof dfValue == 'string' && that.getPropertyFromNode(element, 'Properties').FullPath == dfValue) ||
|
|
19500
19506
|
(typeof dfValue == 'number' && that.getPropertyFromNode(element, 'ID') == dfValue)) {
|
|
19501
19507
|
element.nodeid = element.id;
|
|
19502
19508
|
that.checkFields([element]);
|
|
@@ -14,5 +14,5 @@ const patchBrowser = () => {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
patchBrowser().then(options => {
|
|
17
|
-
return bootstrapLazy([["reneco-hierarchized-picker",[[0,"reneco-hierarchized-picker",{"options":[16],"valueChangeCallback":[16],"disabled":[4],"newoptions":[1],"newfilter":[1],"isDisabled":[32],"theOptions":[32],"componentID":[32],"rawData":[32],"pickerClass":[32],"displayedValue":[32],"value":[32],"shownTree":[32],"hasFocus":[32],"errorToLog":[32],"getValue":[64],"setOptions":[64],"filterTree":[64],"showSelectedNodes":[64],"clearPicker":[64]}]]]], options);
|
|
17
|
+
return bootstrapLazy([["reneco-hierarchized-picker",[[0,"reneco-hierarchized-picker",{"options":[16],"valueChangeCallback":[16],"disabled":[4],"newoptions":[1],"newfilter":[1],"isDisabled":[32],"theOptions":[32],"componentID":[32],"rawData":[32],"pickerClass":[32],"displayedValue":[32],"value":[32],"shownTree":[32],"hasFocus":[32],"errorToLog":[32],"getValue":[64],"refreshPicker":[64],"setOptions":[64],"filterTree":[64],"showSelectedNodes":[64],"clearPicker":[64]}]]]], options);
|
|
18
18
|
});
|
package/dist/esm-es5/loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as promiseResolve,b as bootstrapLazy}from"./index-ef964604.js";export{s as setNonce}from"./index-ef964604.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(e,
|
|
1
|
+
import{p as promiseResolve,b as bootstrapLazy}from"./index-ef964604.js";export{s as setNonce}from"./index-ef964604.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(e,r){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){return bootstrapLazy([["reneco-hierarchized-picker",[[0,"reneco-hierarchized-picker",{options:[16],valueChangeCallback:[16],disabled:[4],newoptions:[1],newfilter:[1],isDisabled:[32],theOptions:[32],componentID:[32],rawData:[32],pickerClass:[32],displayedValue:[32],value:[32],shownTree:[32],hasFocus:[32],errorToLog:[32],getValue:[64],refreshPicker:[64],setOptions:[64],filterTree:[64],showSelectedNodes:[64],clearPicker:[64]}]]]],r)}))};export{defineCustomElements};
|