reneco-hierarchized-picker 0.5.4-beta.1 → 0.5.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/dist/cjs/reneco-hierarchized-picker_2.cjs.entry.js +40 -29
- package/dist/collection/core/raw-data-manager.js +40 -29
- package/dist/custom-elements/index.js +40 -29
- package/dist/esm/reneco-hierarchized-picker_2.entry.js +40 -29
- package/dist/esm-es5/reneco-hierarchized-picker_2.entry.js +1 -1
- package/dist/reneco-hierarchized-picker/{p-fef410d6.system.entry.js → p-23cd44fc.system.entry.js} +1 -1
- package/dist/reneco-hierarchized-picker/p-73168a50.system.js +1 -1
- package/dist/reneco-hierarchized-picker/{p-3351cf8c.entry.js → p-fdebce31.entry.js} +1 -1
- package/dist/reneco-hierarchized-picker/reneco-hierarchized-picker.esm.js +1 -1
- package/package.json +1 -1
|
@@ -18247,37 +18247,45 @@ class RawDataManager {
|
|
|
18247
18247
|
}
|
|
18248
18248
|
// Fetch node ID from fullpath
|
|
18249
18249
|
async fetchNodeIdFromFullpath(fullpath, options) {
|
|
18250
|
-
// const payload = {...this.optionsManager.getOptions().options, fullpath};
|
|
18251
|
-
let payload;
|
|
18252
|
-
switch (options.origin) {
|
|
18253
|
-
case "thesaurus":
|
|
18254
|
-
payload = {
|
|
18255
|
-
"iStartNode": this.optionsManager.getOptions().options.StartNodeID,
|
|
18256
|
-
"sValue": fullpath,
|
|
18257
|
-
"sTypeField": "fullpath"
|
|
18258
|
-
};
|
|
18259
|
-
break;
|
|
18260
|
-
case "position":
|
|
18261
|
-
payload = {
|
|
18262
|
-
"value": fullpath,
|
|
18263
|
-
"startNodeId": this.optionsManager.getOptions().options.StartNodeID,
|
|
18264
|
-
};
|
|
18265
|
-
break;
|
|
18266
|
-
default:
|
|
18267
|
-
throw new Error(`Invalid origin: ${options.origin}, only 'thesaurus' and 'position' implemented for now...`);
|
|
18268
|
-
}
|
|
18269
|
-
const endpoint = this.getApiNodeFromFullpathURL(options);
|
|
18270
18250
|
let fullpathid = 0;
|
|
18271
|
-
|
|
18272
|
-
|
|
18273
|
-
|
|
18251
|
+
if (options.origin === 'classification') {
|
|
18252
|
+
const endpoint = this.getApiNodeFromFullpathURL(options);
|
|
18253
|
+
const encodedFullpath = encodeURIComponent(fullpath);
|
|
18254
|
+
await this.makeRequest('GET', `${endpoint}?fullpath=${encodedFullpath}`).then((result) => {
|
|
18255
|
+
if (result.ID) {
|
|
18256
|
+
fullpathid = result.ID;
|
|
18257
|
+
}
|
|
18258
|
+
});
|
|
18259
|
+
}
|
|
18260
|
+
else {
|
|
18261
|
+
let payload;
|
|
18262
|
+
switch (options.origin) {
|
|
18263
|
+
case "thesaurus":
|
|
18264
|
+
payload = {
|
|
18265
|
+
"iStartNode": this.optionsManager.getOptions().options.StartNodeID,
|
|
18266
|
+
"sValue": fullpath,
|
|
18267
|
+
"sTypeField": "fullpath"
|
|
18268
|
+
};
|
|
18269
|
+
break;
|
|
18270
|
+
case "position":
|
|
18271
|
+
payload = {
|
|
18272
|
+
"value": fullpath,
|
|
18273
|
+
"startNodeId": this.optionsManager.getOptions().options.StartNodeID,
|
|
18274
|
+
};
|
|
18275
|
+
break;
|
|
18276
|
+
default:
|
|
18277
|
+
throw new Error(`Invalid origin: ${options.origin}, only 'thesaurus', 'position' and 'classification' implemented...`);
|
|
18278
|
+
}
|
|
18279
|
+
const endpoint = this.getApiNodeFromFullpathURL(options);
|
|
18280
|
+
await this.makeRequest('POST', endpoint, payload).then((result) => {
|
|
18281
|
+
if (options.origin === 'thesaurus' && result.exist) {
|
|
18274
18282
|
fullpathid = result.topic.TTop_PK_ID;
|
|
18275
|
-
|
|
18283
|
+
}
|
|
18284
|
+
else if (options.origin === 'position' && result.exist) {
|
|
18276
18285
|
fullpathid = result.position.ID;
|
|
18277
|
-
|
|
18278
|
-
|
|
18279
|
-
|
|
18280
|
-
});
|
|
18286
|
+
}
|
|
18287
|
+
});
|
|
18288
|
+
}
|
|
18281
18289
|
return fullpathid;
|
|
18282
18290
|
}
|
|
18283
18291
|
// Get API URL for node existence check
|
|
@@ -18289,7 +18297,10 @@ class RawDataManager {
|
|
|
18289
18297
|
case 'position':
|
|
18290
18298
|
return `${trimmedBaseUrl}/PositionExistByFp`;
|
|
18291
18299
|
case 'classification':
|
|
18292
|
-
|
|
18300
|
+
const baseUrl = this.baseUrl.substring(0, this.baseUrl.indexOf('/classification/') + '/classification/'.length);
|
|
18301
|
+
const urlParts = this.baseUrl.split('/');
|
|
18302
|
+
const context = urlParts[urlParts.length - 1] || 'Thesaurus';
|
|
18303
|
+
return `${baseUrl}fullpath/${context}/`;
|
|
18293
18304
|
default:
|
|
18294
18305
|
throw new Error(`Invalid origin: ${options.origin}`);
|
|
18295
18306
|
}
|
|
@@ -88,37 +88,45 @@ export class RawDataManager {
|
|
|
88
88
|
}
|
|
89
89
|
// Fetch node ID from fullpath
|
|
90
90
|
async fetchNodeIdFromFullpath(fullpath, options) {
|
|
91
|
-
// const payload = {...this.optionsManager.getOptions().options, fullpath};
|
|
92
|
-
let payload;
|
|
93
|
-
switch (options.origin) {
|
|
94
|
-
case "thesaurus":
|
|
95
|
-
payload = {
|
|
96
|
-
"iStartNode": this.optionsManager.getOptions().options.StartNodeID,
|
|
97
|
-
"sValue": fullpath,
|
|
98
|
-
"sTypeField": "fullpath"
|
|
99
|
-
};
|
|
100
|
-
break;
|
|
101
|
-
case "position":
|
|
102
|
-
payload = {
|
|
103
|
-
"value": fullpath,
|
|
104
|
-
"startNodeId": this.optionsManager.getOptions().options.StartNodeID,
|
|
105
|
-
};
|
|
106
|
-
break;
|
|
107
|
-
default:
|
|
108
|
-
throw new Error(`Invalid origin: ${options.origin}, only 'thesaurus' and 'position' implemented for now...`);
|
|
109
|
-
}
|
|
110
|
-
const endpoint = this.getApiNodeFromFullpathURL(options);
|
|
111
91
|
let fullpathid = 0;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
92
|
+
if (options.origin === 'classification') {
|
|
93
|
+
const endpoint = this.getApiNodeFromFullpathURL(options);
|
|
94
|
+
const encodedFullpath = encodeURIComponent(fullpath);
|
|
95
|
+
await this.makeRequest('GET', `${endpoint}?fullpath=${encodedFullpath}`).then((result) => {
|
|
96
|
+
if (result.ID) {
|
|
97
|
+
fullpathid = result.ID;
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
let payload;
|
|
103
|
+
switch (options.origin) {
|
|
104
|
+
case "thesaurus":
|
|
105
|
+
payload = {
|
|
106
|
+
"iStartNode": this.optionsManager.getOptions().options.StartNodeID,
|
|
107
|
+
"sValue": fullpath,
|
|
108
|
+
"sTypeField": "fullpath"
|
|
109
|
+
};
|
|
110
|
+
break;
|
|
111
|
+
case "position":
|
|
112
|
+
payload = {
|
|
113
|
+
"value": fullpath,
|
|
114
|
+
"startNodeId": this.optionsManager.getOptions().options.StartNodeID,
|
|
115
|
+
};
|
|
116
|
+
break;
|
|
117
|
+
default:
|
|
118
|
+
throw new Error(`Invalid origin: ${options.origin}, only 'thesaurus', 'position' and 'classification' implemented...`);
|
|
119
|
+
}
|
|
120
|
+
const endpoint = this.getApiNodeFromFullpathURL(options);
|
|
121
|
+
await this.makeRequest('POST', endpoint, payload).then((result) => {
|
|
122
|
+
if (options.origin === 'thesaurus' && result.exist) {
|
|
115
123
|
fullpathid = result.topic.TTop_PK_ID;
|
|
116
|
-
|
|
124
|
+
}
|
|
125
|
+
else if (options.origin === 'position' && result.exist) {
|
|
117
126
|
fullpathid = result.position.ID;
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
});
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
}
|
|
122
130
|
return fullpathid;
|
|
123
131
|
}
|
|
124
132
|
// Get API URL for node existence check
|
|
@@ -130,7 +138,10 @@ export class RawDataManager {
|
|
|
130
138
|
case 'position':
|
|
131
139
|
return `${trimmedBaseUrl}/PositionExistByFp`;
|
|
132
140
|
case 'classification':
|
|
133
|
-
|
|
141
|
+
const baseUrl = this.baseUrl.substring(0, this.baseUrl.indexOf('/classification/') + '/classification/'.length);
|
|
142
|
+
const urlParts = this.baseUrl.split('/');
|
|
143
|
+
const context = urlParts[urlParts.length - 1] || 'Thesaurus';
|
|
144
|
+
return `${baseUrl}fullpath/${context}/`;
|
|
134
145
|
default:
|
|
135
146
|
throw new Error(`Invalid origin: ${options.origin}`);
|
|
136
147
|
}
|
|
@@ -18244,37 +18244,45 @@ class RawDataManager {
|
|
|
18244
18244
|
}
|
|
18245
18245
|
// Fetch node ID from fullpath
|
|
18246
18246
|
async fetchNodeIdFromFullpath(fullpath, options) {
|
|
18247
|
-
// const payload = {...this.optionsManager.getOptions().options, fullpath};
|
|
18248
|
-
let payload;
|
|
18249
|
-
switch (options.origin) {
|
|
18250
|
-
case "thesaurus":
|
|
18251
|
-
payload = {
|
|
18252
|
-
"iStartNode": this.optionsManager.getOptions().options.StartNodeID,
|
|
18253
|
-
"sValue": fullpath,
|
|
18254
|
-
"sTypeField": "fullpath"
|
|
18255
|
-
};
|
|
18256
|
-
break;
|
|
18257
|
-
case "position":
|
|
18258
|
-
payload = {
|
|
18259
|
-
"value": fullpath,
|
|
18260
|
-
"startNodeId": this.optionsManager.getOptions().options.StartNodeID,
|
|
18261
|
-
};
|
|
18262
|
-
break;
|
|
18263
|
-
default:
|
|
18264
|
-
throw new Error(`Invalid origin: ${options.origin}, only 'thesaurus' and 'position' implemented for now...`);
|
|
18265
|
-
}
|
|
18266
|
-
const endpoint = this.getApiNodeFromFullpathURL(options);
|
|
18267
18247
|
let fullpathid = 0;
|
|
18268
|
-
|
|
18269
|
-
|
|
18270
|
-
|
|
18248
|
+
if (options.origin === 'classification') {
|
|
18249
|
+
const endpoint = this.getApiNodeFromFullpathURL(options);
|
|
18250
|
+
const encodedFullpath = encodeURIComponent(fullpath);
|
|
18251
|
+
await this.makeRequest('GET', `${endpoint}?fullpath=${encodedFullpath}`).then((result) => {
|
|
18252
|
+
if (result.ID) {
|
|
18253
|
+
fullpathid = result.ID;
|
|
18254
|
+
}
|
|
18255
|
+
});
|
|
18256
|
+
}
|
|
18257
|
+
else {
|
|
18258
|
+
let payload;
|
|
18259
|
+
switch (options.origin) {
|
|
18260
|
+
case "thesaurus":
|
|
18261
|
+
payload = {
|
|
18262
|
+
"iStartNode": this.optionsManager.getOptions().options.StartNodeID,
|
|
18263
|
+
"sValue": fullpath,
|
|
18264
|
+
"sTypeField": "fullpath"
|
|
18265
|
+
};
|
|
18266
|
+
break;
|
|
18267
|
+
case "position":
|
|
18268
|
+
payload = {
|
|
18269
|
+
"value": fullpath,
|
|
18270
|
+
"startNodeId": this.optionsManager.getOptions().options.StartNodeID,
|
|
18271
|
+
};
|
|
18272
|
+
break;
|
|
18273
|
+
default:
|
|
18274
|
+
throw new Error(`Invalid origin: ${options.origin}, only 'thesaurus', 'position' and 'classification' implemented...`);
|
|
18275
|
+
}
|
|
18276
|
+
const endpoint = this.getApiNodeFromFullpathURL(options);
|
|
18277
|
+
await this.makeRequest('POST', endpoint, payload).then((result) => {
|
|
18278
|
+
if (options.origin === 'thesaurus' && result.exist) {
|
|
18271
18279
|
fullpathid = result.topic.TTop_PK_ID;
|
|
18272
|
-
|
|
18280
|
+
}
|
|
18281
|
+
else if (options.origin === 'position' && result.exist) {
|
|
18273
18282
|
fullpathid = result.position.ID;
|
|
18274
|
-
|
|
18275
|
-
|
|
18276
|
-
|
|
18277
|
-
});
|
|
18283
|
+
}
|
|
18284
|
+
});
|
|
18285
|
+
}
|
|
18278
18286
|
return fullpathid;
|
|
18279
18287
|
}
|
|
18280
18288
|
// Get API URL for node existence check
|
|
@@ -18286,7 +18294,10 @@ class RawDataManager {
|
|
|
18286
18294
|
case 'position':
|
|
18287
18295
|
return `${trimmedBaseUrl}/PositionExistByFp`;
|
|
18288
18296
|
case 'classification':
|
|
18289
|
-
|
|
18297
|
+
const baseUrl = this.baseUrl.substring(0, this.baseUrl.indexOf('/classification/') + '/classification/'.length);
|
|
18298
|
+
const urlParts = this.baseUrl.split('/');
|
|
18299
|
+
const context = urlParts[urlParts.length - 1] || 'Thesaurus';
|
|
18300
|
+
return `${baseUrl}fullpath/${context}/`;
|
|
18290
18301
|
default:
|
|
18291
18302
|
throw new Error(`Invalid origin: ${options.origin}`);
|
|
18292
18303
|
}
|
|
@@ -18243,37 +18243,45 @@ class RawDataManager {
|
|
|
18243
18243
|
}
|
|
18244
18244
|
// Fetch node ID from fullpath
|
|
18245
18245
|
async fetchNodeIdFromFullpath(fullpath, options) {
|
|
18246
|
-
// const payload = {...this.optionsManager.getOptions().options, fullpath};
|
|
18247
|
-
let payload;
|
|
18248
|
-
switch (options.origin) {
|
|
18249
|
-
case "thesaurus":
|
|
18250
|
-
payload = {
|
|
18251
|
-
"iStartNode": this.optionsManager.getOptions().options.StartNodeID,
|
|
18252
|
-
"sValue": fullpath,
|
|
18253
|
-
"sTypeField": "fullpath"
|
|
18254
|
-
};
|
|
18255
|
-
break;
|
|
18256
|
-
case "position":
|
|
18257
|
-
payload = {
|
|
18258
|
-
"value": fullpath,
|
|
18259
|
-
"startNodeId": this.optionsManager.getOptions().options.StartNodeID,
|
|
18260
|
-
};
|
|
18261
|
-
break;
|
|
18262
|
-
default:
|
|
18263
|
-
throw new Error(`Invalid origin: ${options.origin}, only 'thesaurus' and 'position' implemented for now...`);
|
|
18264
|
-
}
|
|
18265
|
-
const endpoint = this.getApiNodeFromFullpathURL(options);
|
|
18266
18246
|
let fullpathid = 0;
|
|
18267
|
-
|
|
18268
|
-
|
|
18269
|
-
|
|
18247
|
+
if (options.origin === 'classification') {
|
|
18248
|
+
const endpoint = this.getApiNodeFromFullpathURL(options);
|
|
18249
|
+
const encodedFullpath = encodeURIComponent(fullpath);
|
|
18250
|
+
await this.makeRequest('GET', `${endpoint}?fullpath=${encodedFullpath}`).then((result) => {
|
|
18251
|
+
if (result.ID) {
|
|
18252
|
+
fullpathid = result.ID;
|
|
18253
|
+
}
|
|
18254
|
+
});
|
|
18255
|
+
}
|
|
18256
|
+
else {
|
|
18257
|
+
let payload;
|
|
18258
|
+
switch (options.origin) {
|
|
18259
|
+
case "thesaurus":
|
|
18260
|
+
payload = {
|
|
18261
|
+
"iStartNode": this.optionsManager.getOptions().options.StartNodeID,
|
|
18262
|
+
"sValue": fullpath,
|
|
18263
|
+
"sTypeField": "fullpath"
|
|
18264
|
+
};
|
|
18265
|
+
break;
|
|
18266
|
+
case "position":
|
|
18267
|
+
payload = {
|
|
18268
|
+
"value": fullpath,
|
|
18269
|
+
"startNodeId": this.optionsManager.getOptions().options.StartNodeID,
|
|
18270
|
+
};
|
|
18271
|
+
break;
|
|
18272
|
+
default:
|
|
18273
|
+
throw new Error(`Invalid origin: ${options.origin}, only 'thesaurus', 'position' and 'classification' implemented...`);
|
|
18274
|
+
}
|
|
18275
|
+
const endpoint = this.getApiNodeFromFullpathURL(options);
|
|
18276
|
+
await this.makeRequest('POST', endpoint, payload).then((result) => {
|
|
18277
|
+
if (options.origin === 'thesaurus' && result.exist) {
|
|
18270
18278
|
fullpathid = result.topic.TTop_PK_ID;
|
|
18271
|
-
|
|
18279
|
+
}
|
|
18280
|
+
else if (options.origin === 'position' && result.exist) {
|
|
18272
18281
|
fullpathid = result.position.ID;
|
|
18273
|
-
|
|
18274
|
-
|
|
18275
|
-
|
|
18276
|
-
});
|
|
18282
|
+
}
|
|
18283
|
+
});
|
|
18284
|
+
}
|
|
18277
18285
|
return fullpathid;
|
|
18278
18286
|
}
|
|
18279
18287
|
// Get API URL for node existence check
|
|
@@ -18285,7 +18293,10 @@ class RawDataManager {
|
|
|
18285
18293
|
case 'position':
|
|
18286
18294
|
return `${trimmedBaseUrl}/PositionExistByFp`;
|
|
18287
18295
|
case 'classification':
|
|
18288
|
-
|
|
18296
|
+
const baseUrl = this.baseUrl.substring(0, this.baseUrl.indexOf('/classification/') + '/classification/'.length);
|
|
18297
|
+
const urlParts = this.baseUrl.split('/');
|
|
18298
|
+
const context = urlParts[urlParts.length - 1] || 'Thesaurus';
|
|
18299
|
+
return `${baseUrl}fullpath/${context}/`;
|
|
18289
18300
|
default:
|
|
18290
18301
|
throw new Error(`Invalid origin: ${options.origin}`);
|
|
18291
18302
|
}
|