@genexus/genexus-ide-ui 1.1.71 → 1.1.72

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.
Files changed (32) hide show
  1. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  2. package/dist/cjs/gx-ide-select-kb-items.cjs.entry.js +28 -17
  3. package/dist/cjs/gx-ide-select-kb-items.cjs.entry.js.map +1 -1
  4. package/dist/cjs/gx-ide-team-dev-history.cjs.entry.js +18 -51
  5. package/dist/cjs/gx-ide-team-dev-history.cjs.entry.js.map +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/components/select-kb-items/select-kb-items.js +75 -28
  8. package/dist/collection/components/select-kb-items/select-kb-items.js.map +1 -1
  9. package/dist/collection/components/team-dev/history/history.js +50 -69
  10. package/dist/collection/components/team-dev/history/history.js.map +1 -1
  11. package/dist/components/gx-ide-team-dev-history.js +21 -58
  12. package/dist/components/gx-ide-team-dev-history.js.map +1 -1
  13. package/dist/components/select-kb-items.js +32 -20
  14. package/dist/components/select-kb-items.js.map +1 -1
  15. package/dist/esm/genexus-ide-ui.js +1 -1
  16. package/dist/esm/gx-ide-select-kb-items.entry.js +28 -17
  17. package/dist/esm/gx-ide-select-kb-items.entry.js.map +1 -1
  18. package/dist/esm/gx-ide-team-dev-history.entry.js +18 -51
  19. package/dist/esm/gx-ide-team-dev-history.entry.js.map +1 -1
  20. package/dist/esm/loader.js +1 -1
  21. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  22. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  23. package/dist/genexus-ide-ui/{p-8897c6de.entry.js → p-2d6228e8.entry.js} +201 -194
  24. package/dist/genexus-ide-ui/p-2d6228e8.entry.js.map +1 -0
  25. package/dist/genexus-ide-ui/{p-3ca03a38.entry.js → p-74f8bd45.entry.js} +60 -90
  26. package/dist/genexus-ide-ui/p-74f8bd45.entry.js.map +1 -0
  27. package/dist/types/components/select-kb-items/select-kb-items.d.ts +12 -3
  28. package/dist/types/components/team-dev/history/history.d.ts +3 -12
  29. package/dist/types/components.d.ts +22 -20
  30. package/package.json +1 -1
  31. package/dist/genexus-ide-ui/p-3ca03a38.entry.js.map +0 -1
  32. package/dist/genexus-ide-ui/p-8897c6de.entry.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { r as t, g as e, h as s, H as i, a as n } from "./p-9b9ccd0c.js";
1
+ import { r as t, g as e, h as i, H as s, a as n } from "./p-9b9ccd0c.js";
2
2
 
3
3
  import { g as o } from "./p-d42e842b.js";
4
4
 
@@ -10,27 +10,27 @@ import "lit/directives/when.js";
10
10
 
11
11
  import "lit/directives/if-defined.js";
12
12
 
13
- import { L as r } from "./p-311eedf3.js";
13
+ import { L as a } from "./p-311eedf3.js";
14
14
 
15
- const a = o({
15
+ const r = o({
16
16
  category: "system",
17
17
  name: "check-circle",
18
18
  colorType: "primary"
19
19
  });
20
20
 
21
21
  const convertItemsNodeListToFlattenedTreeViewModel = (t, e) => {
22
- const s = [];
22
+ const i = [];
23
23
  const processNode = t => {
24
- var i;
25
- const n = t.active && !t.iconStart ? a : t.iconStart;
26
- const o = !((i = t.nodes) === null || i === void 0 ? void 0 : i.length);
27
- const r = e === "all" || e === "custom" && t.checkbox || e === "leaf" && o;
24
+ var s;
25
+ const n = t.active && !t.iconStart ? r : t.iconStart;
26
+ const o = !((s = t.nodes) === null || s === void 0 ? void 0 : s.length);
27
+ const a = e === "all" || e === "custom" && t.checkbox || e === "leaf" && o;
28
28
  const c = JSON.stringify({
29
29
  versionType: t.type
30
30
  });
31
- s.push({
31
+ i.push({
32
32
  caption: t.name,
33
- checkbox: r,
33
+ checkbox: a,
34
34
  checked: t.checked,
35
35
  startImgSrc: n,
36
36
  endImgSrc: t.iconEnd,
@@ -48,16 +48,16 @@ const convertItemsNodeListToFlattenedTreeViewModel = (t, e) => {
48
48
  }
49
49
  };
50
50
  t.forEach((t => processNode(t)));
51
- return s;
51
+ return i;
52
52
  };
53
53
 
54
54
  const convertItemsListToTreeViewModel = (t, e) => {
55
- const s = [];
55
+ const i = [];
56
56
  t.forEach((t => {
57
- var i;
58
- const n = t.active && !t.iconStart ? a : t.iconStart;
59
- const o = !((i = t.nodes) === null || i === void 0 ? void 0 : i.length);
60
- const r = e === "all" || e === "custom" && t.checkbox || e === "leaf" && o;
57
+ var s;
58
+ const n = t.active && !t.iconStart ? r : t.iconStart;
59
+ const o = !((s = t.nodes) === null || s === void 0 ? void 0 : s.length);
60
+ const a = e === "all" || e === "custom" && t.checkbox || e === "leaf" && o;
61
61
  const c = t.expanded;
62
62
  const h = n;
63
63
  const l = t.iconEnd;
@@ -65,9 +65,9 @@ const convertItemsListToTreeViewModel = (t, e) => {
65
65
  versionType: t.type
66
66
  });
67
67
  const f = parseInt(t.id);
68
- s.push({
68
+ i.push({
69
69
  caption: t.name,
70
- checkbox: r,
70
+ checkbox: a,
71
71
  checked: t.checked,
72
72
  startImgSrc: h,
73
73
  endImgSrc: l,
@@ -81,7 +81,7 @@ const convertItemsListToTreeViewModel = (t, e) => {
81
81
  selected: t.selected
82
82
  });
83
83
  }));
84
- return s;
84
+ return i;
85
85
  };
86
86
 
87
87
  const findItemNode = (t, e) => {
@@ -89,8 +89,8 @@ const findItemNode = (t, e) => {
89
89
  return e;
90
90
  }
91
91
  if (e.nodes) {
92
- for (const s of e.nodes) {
93
- const e = findItemNode(t, s);
92
+ for (const i of e.nodes) {
93
+ const e = findItemNode(t, i);
94
94
  if (e) {
95
95
  return e;
96
96
  }
@@ -100,8 +100,8 @@ const findItemNode = (t, e) => {
100
100
  };
101
101
 
102
102
  function findItemInArray(t, e) {
103
- for (const s of t) {
104
- const t = findItemNode(e, s);
103
+ for (const i of t) {
104
+ const t = findItemNode(e, i);
105
105
  if (t) {
106
106
  return t;
107
107
  }
@@ -135,9 +135,9 @@ const unselectAllNodes = t => {
135
135
  const checkItems = (t, e) => {
136
136
  setAllLeafsCheckedFalse(t);
137
137
  e.forEach((e => {
138
- const s = findItemInArray(t, e);
139
- if (s) {
140
- s.checked = true;
138
+ const i = findItemInArray(t, e);
139
+ if (i) {
140
+ i.checked = true;
141
141
  }
142
142
  }));
143
143
  return t;
@@ -145,9 +145,9 @@ const checkItems = (t, e) => {
145
145
 
146
146
  const expandItems = (t, e) => {
147
147
  e.forEach((e => {
148
- const s = findItemInArray(t, e);
149
- if (s) {
150
- s.expanded = true;
148
+ const i = findItemInArray(t, e);
149
+ if (i) {
150
+ i.expanded = true;
151
151
  }
152
152
  }));
153
153
  return t;
@@ -155,27 +155,27 @@ const expandItems = (t, e) => {
155
155
 
156
156
  const selectItems = (t, e) => {
157
157
  e.forEach((e => {
158
- const s = findItemInArray(t, e);
159
- if (s) {
160
- s.selected = true;
158
+ const i = findItemInArray(t, e);
159
+ if (i) {
160
+ i.selected = true;
161
161
  }
162
162
  }));
163
163
  return t;
164
164
  };
165
165
 
166
166
  function searchInNode(t, e) {
167
- var s;
167
+ var i;
168
168
  // If the current node is the searched node, we return an empty list (it has no parents in this branch)
169
169
  if (t.id === e) {
170
170
  return [];
171
171
  }
172
172
  // We traverse each child looking for the target node
173
- if ((s = t.nodes) === null || s === void 0 ? void 0 : s.length) {
174
- for (const s of t.nodes) {
175
- const i = searchInNode(s, e);
176
- if (i !== null) {
173
+ if ((i = t.nodes) === null || i === void 0 ? void 0 : i.length) {
174
+ for (const i of t.nodes) {
175
+ const s = searchInNode(i, e);
176
+ if (s !== null) {
177
177
  // If we find it, we include the current node at the beginning of the path and return
178
- return [ t.id, ...i ];
178
+ return [ t.id, ...s ];
179
179
  }
180
180
  }
181
181
  }
@@ -183,18 +183,18 @@ function searchInNode(t, e) {
183
183
  }
184
184
 
185
185
  const searchParentsItems = (t, e) => {
186
- const s = [];
187
- for (const i of e) {
186
+ const i = [];
187
+ for (const s of e) {
188
188
  for (const e of t) {
189
- const t = searchInNode(e, i);
189
+ const t = searchInNode(e, s);
190
190
  if (t !== null) {
191
191
  t.forEach((t => {
192
- s.push(t);
192
+ i.push(t);
193
193
  }));
194
194
  }
195
195
  }
196
196
  }
197
- return s;
197
+ return i;
198
198
  };
199
199
 
200
200
  /**
@@ -209,20 +209,20 @@ const searchParentsItems = (t, e) => {
209
209
  return null;
210
210
  }
211
211
  // Iterate through each node in the array
212
- for (const s of t) {
212
+ for (const i of t) {
213
213
  // Create a new path that includes the current node
214
- const t = [ ...e, s.id ];
214
+ const t = [ ...e, i.id ];
215
215
  // Check if the current node is active
216
- if (s.active === true) {
216
+ if (i.active === true) {
217
217
  return {
218
- caption: s.name,
219
- iconStart: s.iconStart,
218
+ caption: i.name,
219
+ iconStart: i.iconStart,
220
220
  path: t
221
221
  };
222
222
  }
223
223
  // If the node has children, search through them with the updated path
224
- if (s.nodes && s.nodes.length > 0) {
225
- const e = findActiveWithPath(s.nodes, t);
224
+ if (i.nodes && i.nodes.length > 0) {
225
+ const e = findActiveWithPath(i.nodes, t);
226
226
  // If we find an active node in this subtree, return it immediately
227
227
  if (e !== null) {
228
228
  return e;
@@ -238,51 +238,52 @@ const searchParentsItems = (t, e) => {
238
238
 
239
239
  const c = ":host{--search-input-max-inline-size:400px;display:grid;block-size:100%}:host(:not(.has-footer)){grid-template-rows:max-content 1fr}:host(.has-footer){grid-template-rows:max-content 1fr max-content}.header.has-active-item{grid-area:header}.section{display:contents}.header__first-row,.header__second-row{display:grid;grid-auto-flow:column}.header__first-row{column-gap:var(--field-group__column-gap);grid-auto-columns:max-content}.header__second-row{column-gap:12px;grid-template-columns:minmax(150px, var(--search-input-max-inline-size)) max-content}.header__second-row--one-row{grid-template-columns:minmax(150px, var(--search-input-max-inline-size))}.active-item{background-color:var(--mer-surface__elevation--01);border-radius:var(--mer-border__radius--sm);padding:var(--mer-spacing--xs) var(--mer-spacing--sm);display:flex;align-items:center;gap:var(--mer-spacing--xs)}.active-item__icon-container{display:contents}.active-item__icon{pointer-events:none}.active-item__link{text-decoration:underline;color:var(--mer-text__primary);cursor:pointer}.active-item__link:hover{color:var(--mer-text__primary--hover)}.active-item__link:active{color:var(--mer-text__primary--active)}.dummy-control-block-size{block-size:32px}.trees{position:relative}";
240
240
 
241
- var h = undefined && undefined.__classPrivateFieldGet || function(t, e, s, i) {
242
- if (s === "a" && !i) throw new TypeError("Private accessor was defined without a getter");
243
- if (typeof e === "function" ? t !== e || !i : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
244
- return s === "m" ? i : s === "a" ? i.call(t) : i ? i.value : e.get(t);
241
+ var h = undefined && undefined.__classPrivateFieldGet || function(t, e, i, s) {
242
+ if (i === "a" && !s) throw new TypeError("Private accessor was defined without a getter");
243
+ if (typeof e === "function" ? t !== e || !s : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
244
+ return i === "m" ? s : i === "a" ? s.call(t) : s ? s.value : e.get(t);
245
245
  };
246
246
 
247
- var l = undefined && undefined.__classPrivateFieldSet || function(t, e, s, i, n) {
248
- if (i === "m") throw new TypeError("Private method is not writable");
249
- if (i === "a" && !n) throw new TypeError("Private accessor was defined without a setter");
247
+ var l = undefined && undefined.__classPrivateFieldSet || function(t, e, i, s, n) {
248
+ if (s === "m") throw new TypeError("Private method is not writable");
249
+ if (s === "a" && !n) throw new TypeError("Private accessor was defined without a setter");
250
250
  if (typeof e === "function" ? t !== e || !n : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
251
- return i === "a" ? n.call(t, s) : n ? n.value = s : e.set(t, s), s;
251
+ return s === "a" ? n.call(t, i) : n ? n.value = i : e.set(t, i), i;
252
252
  };
253
253
 
254
- var d, f, u, p, m, v, w, g, b, k, y, _, x, I, W, M, C, S, T, j, z, N;
254
+ var d, f, u, p, m, v, w, g, b, k, y, _, x, I, W, M, C, S, T, j, z, E, N, A;
255
255
 
256
256
  const L = [ "resets/box-sizing", "chameleon/scrollbar", "components/tooltip", "components/tree-view", "utils/form--full", "utils/layout", "utils/spacing", "utils/typography" ];
257
257
 
258
- const A = o({
258
+ const O = o({
259
259
  category: "system",
260
260
  name: "search",
261
261
  colorType: "on-surface"
262
262
  });
263
263
 
264
- const E = "tree";
264
+ const P = "tree";
265
265
 
266
- const H = "list";
266
+ const F = "list";
267
267
 
268
- const O = "on";
268
+ const J = "on";
269
269
 
270
- const P = class {
271
- constructor(i) {
272
- t(this, i);
273
- d.set(this, void 0);
270
+ const X = class {
271
+ constructor(s) {
272
+ t(this, s);
273
+ d.add(this);
274
274
  f.set(this, void 0);
275
- u.set(this, []);
276
- p.set(this, e(`./gx-ide-assets/select-kb-items/shortcuts.json`));
277
- m.set(this, []);
278
- v.set(this, void 0);
275
+ u.set(this, void 0);
276
+ p.set(this, []);
277
+ m.set(this, e(`./gx-ide-assets/select-kb-items/shortcuts.json`));
278
+ v.set(this, []);
279
279
  w.set(this, void 0);
280
- g.set(this, (() => {
280
+ g.set(this, void 0);
281
+ k.set(this, (() => {
281
282
  if (this.cancelCallback) {
282
283
  this.cancelCallback();
283
284
  }
284
285
  }));
285
- b.set(this, (async t => {
286
+ y.set(this, (async t => {
286
287
  let e = [];
287
288
  t.detail.forEach((t => {
288
289
  if (t.item.checked) {
@@ -291,45 +292,45 @@ const P = class {
291
292
  }));
292
293
  if (this.singleChecks) {
293
294
  // Detect the last change by comparing previous and new state
294
- let s = null;
295
+ let i = null;
295
296
  // If there are more in the new state, it was a check; if less, it was an uncheck
296
297
  if (e.length > this.checkedNodesIds.length) {
297
298
  // Find the newly checked item
298
- s = e.find((t => !this.checkedNodesIds.includes(t))) || null;
299
+ i = e.find((t => !this.checkedNodesIds.includes(t))) || null;
299
300
  } else if (e.length < this.checkedNodesIds.length) {
300
301
  // Find the unchecked item (not used in single check, but kept for clarity)
301
- s = this.checkedNodesIds.find((t => !e.includes(t))) || null;
302
+ i = this.checkedNodesIds.find((t => !e.includes(t))) || null;
302
303
  }
303
304
  // Only allow one if multiChecks is false
304
305
  if (this.singleChecks && e.length > 1) {
305
306
  // If we detected the last checked, keep it; otherwise, keep the first
306
- e = s ? [ s ] : [ e[0] ];
307
+ e = i ? [ i ] : [ e[0] ];
307
308
  // Uncheck the others
308
- h(this, w, "f").updateItemsProperties(Array.from(t.detail.keys()).filter((t => t !== e[0])), {
309
+ h(this, g, "f").updateItemsProperties(Array.from(t.detail.keys()).filter((t => t !== e[0])), {
309
310
  checked: false
310
311
  });
311
312
  }
312
313
  }
313
314
  this.checkedNodesIds = e;
314
- l(this, m, checkItems(this.itemsList, this.checkedNodesIds), "f");
315
+ l(this, v, checkItems(this.itemsList, this.checkedNodesIds), "f");
315
316
  if (this.checkedChanged) {
316
317
  this.checkedChanged(this.checkedNodesIds);
317
318
  }
318
319
  }));
319
- k.set(this, (() => {
320
+ _.set(this, (() => {
320
321
  if (this.confirmCallback) {
321
322
  this.confirmCallback(this.checkedNodesIds);
322
323
  }
323
324
  }));
324
- y.set(this, (async t => {
325
+ x.set(this, (async t => {
325
326
  if (this.itemContextMenuCallback) {
326
327
  let e;
327
- const s = h(this, u, "f").find((e => e === t.detail.id));
328
- if (!h(this, u, "f").length || !s) {
329
- await h(this, w, "f").updateItemsProperties(h(this, u, "f"), {
328
+ const i = h(this, p, "f").find((e => e === t.detail.id));
329
+ if (!h(this, p, "f").length || !i) {
330
+ await h(this, g, "f").updateItemsProperties(h(this, p, "f"), {
330
331
  selected: false
331
332
  });
332
- await h(this, w, "f").updateItemsProperties([ t.detail.id ], {
333
+ await h(this, g, "f").updateItemsProperties([ t.detail.id ], {
333
334
  selected: true
334
335
  });
335
336
  e = {
@@ -341,88 +342,88 @@ const P = class {
341
342
  e = {
342
343
  clientX: t.detail.contextmenuEvent.clientX,
343
344
  clientY: t.detail.contextmenuEvent.clientY,
344
- selection: h(this, u, "f")
345
+ selection: h(this, p, "f")
345
346
  };
346
347
  }
347
348
  this.itemContextMenuCallback(e);
348
349
  }
349
350
  }));
350
- _.set(this, (t => () => {
351
- t(this.checkedNodesIds, h(this, u, "f"));
351
+ I.set(this, (t => () => {
352
+ t(this.checkedNodesIds, h(this, p, "f"));
352
353
  }));
353
- x.set(this, (t => {
354
+ W.set(this, (t => {
354
355
  this.searchPatternValue = t.detail.toString();
355
356
  }));
356
- I.set(this, (() => s("div", null, this.dialogActions.map((t => s("button", {
357
+ M.set(this, (() => i("div", null, this.dialogActions.map((t => i("button", {
357
358
  class: "button-tertiary",
358
359
  part: `button button-${t.name}`,
359
- onClick: h(this, _, "f").call(this, t.callback),
360
+ onClick: h(this, I, "f").call(this, t.callback),
360
361
  disabled: this.loading
361
362
  }, t.name))))));
362
- W.set(this, (() => {
363
+ C.set(this, (() => {
363
364
  var t;
364
- return s("footer", {
365
+ return i("footer", {
365
366
  class: "footer control-footer-with-border spacing-body-inline spacing-body-block-end control-footer-space-between"
366
- }, h(this, I, "f").call(this), s("div", {
367
+ }, h(this, M, "f").call(this), i("div", {
367
368
  class: "buttons-spacer "
368
- }, this.cancelCallback && s("button", {
369
+ }, this.cancelCallback && i("button", {
369
370
  class: "button-secondary",
370
371
  part: "cancel-button",
371
- onClick: h(this, g, "f")
372
- }, h(this, d, "f").footer.cancel), this.confirmCallback && s("button", {
372
+ onClick: h(this, k, "f")
373
+ }, h(this, f, "f").footer.cancel), this.confirmCallback && i("button", {
373
374
  class: "button-primary",
374
375
  part: "confirm-button",
375
- onClick: h(this, k, "f"),
376
+ onClick: h(this, _, "f"),
376
377
  disabled: this.loading || ((t = this.checkedNodesIds) === null || t === void 0 ? void 0 : t.length) === 0
377
- }, h(this, d, "f").footer.select)));
378
+ }, h(this, f, "f").footer.select)));
378
379
  }));
379
- M.set(this, (t => {
380
+ S.set(this, (t => {
380
381
  const e = [];
381
382
  unselectAllNodes(this.itemsList);
382
383
  t.detail.forEach((t => {
383
384
  e.push(t.item.id);
384
385
  }));
385
- l(this, u, e, "f");
386
+ l(this, p, e, "f");
386
387
  if (this.selectionChanged) {
387
- this.selectionChanged(h(this, u, "f"));
388
+ this.selectionChanged(h(this, p, "f"));
388
389
  }
389
- l(this, m, selectItems(this.itemsList, e), "f");
390
+ l(this, v, selectItems(this.itemsList, e), "f");
390
391
  }));
391
- C.set(this, (async t => {
392
+ T.set(this, (async t => {
392
393
  const e = searchParentsItems(this.itemsList, t);
393
- const s = selectItems(this.itemsList, t);
394
- const i = expandItems(s, e);
395
- h(this, T, "f").call(this, i);
394
+ const i = selectItems(this.itemsList, t);
395
+ const s = expandItems(i, e);
396
+ h(this, z, "f").call(this, s);
396
397
  }));
397
- S.set(this, (async t => {
398
+ j.set(this, (async t => {
398
399
  const e = searchParentsItems(this.itemsList, t);
399
- const s = expandItems(this.itemsList, e);
400
- h(this, T, "f").call(this, s);
400
+ const i = expandItems(this.itemsList, e);
401
+ h(this, z, "f").call(this, i);
401
402
  }));
402
- T.set(this, (t => {
403
+ z.set(this, (t => {
403
404
  this.nodeVersionsListTreeModel = convertItemsListToTreeViewModel(t, this.checkboxType);
404
405
  this.nodeListFlattenedTreeModel = convertItemsNodeListToFlattenedTreeViewModel(t, this.checkboxType);
405
406
  }));
406
- j.set(this, (async t => {
407
+ E.set(this, (async t => {
407
408
  const e = t.detail;
408
409
  this.nodesVersionsViewType = e;
409
410
  if (this.nodesVersionsViewType === "tree") {
410
- await h(this, C, "f").call(this, h(this, u, "f"));
411
- await h(this, S, "f").call(this, this.checkedNodesIds);
411
+ await h(this, T, "f").call(this, h(this, p, "f"));
412
+ await h(this, j, "f").call(this, this.checkedNodesIds);
412
413
  }
413
- h(this, T, "f").call(this, h(this, m, "f"));
414
+ h(this, z, "f").call(this, h(this, v, "f"));
414
415
  }));
415
- z.set(this, (t => {
416
- this.toggleCheckboxes = t.detail === O;
416
+ N.set(this, (t => {
417
+ this.toggleCheckboxes = t.detail === J;
417
418
  }));
418
- N.set(this, (() => {
419
+ A.set(this, (async () => {
419
420
  var t;
420
- const e = h(this, w, "f") && ((t = this.activeItemNode) === null || t === void 0 ? void 0 : t.path);
421
+ const e = h(this, g, "f") && ((t = this.activeItemNode) === null || t === void 0 ? void 0 : t.path);
421
422
  if (e) {
422
- h(this, w, "f").scrollIntoVisible(this.activeItemNode.path);
423
+ await h(this, g, "f").scrollIntoVisible(this.activeItemNode.path);
423
424
  }
424
425
  if (this.activeItemCallback) {
425
- this.activeItemCallback();
426
+ await this.activeItemCallback();
426
427
  }
427
428
  }));
428
429
  this.activeItemNode = undefined;
@@ -434,6 +435,7 @@ const P = class {
434
435
  this.nodeVersionsListTreeModel = [];
435
436
  this.searchPatternValue = null;
436
437
  this.toggleCheckboxes = undefined;
438
+ this.itemsList = [];
437
439
  this.activeItemCallback = undefined;
438
440
  this.cancelCallback = undefined;
439
441
  this.checkboxType = undefined;
@@ -442,50 +444,48 @@ const P = class {
442
444
  this.confirmCallback = undefined;
443
445
  this.dialogActions = [];
444
446
  this.itemContextMenuCallback = undefined;
445
- this.itemsList = [];
447
+ this.loadItemsCallback = undefined;
446
448
  this.showToggleCheckboxes = true;
447
449
  this.multiSelection = false;
448
450
  this.singleChecks = false;
449
451
  this.showActiveItemLink = false;
452
+ this.useLoader = true;
450
453
  this.selectionChanged = undefined;
451
454
  }
452
- watchNodeListHandler(t) {
453
- h(this, T, "f").call(this, t);
454
- // Check and update activeItem
455
- this.activeItemNode = findFirstActiveNode(t);
456
- this.loading = false;
457
- }
458
455
  async componentWillLoad() {
459
- this.loading = true;
460
- l(this, d, await r.getComponentStrings(this.el), "f");
456
+ l(this, f, await a.getComponentStrings(this.el), "f");
461
457
  this.toggleCheckboxes = this.showToggleCheckboxes;
462
- l(this, v, [ {
463
- value: E,
464
- caption: h(this, d, "f").main.tree
458
+ l(this, w, [ {
459
+ value: P,
460
+ caption: h(this, f, "f").main.tree
465
461
  }, {
466
- value: H,
462
+ value: F,
467
463
  caption: "List"
468
464
  } ], "f");
469
465
  this.renderFooter = this.dialogActions.length > 0 || !!this.cancelCallback || !!this.confirmCallback;
466
+ h(this, d, "m", b).call(this);
467
+ }
468
+ async reloadItems() {
469
+ await h(this, d, "m", b).call(this);
470
470
  }
471
471
  /**
472
472
  * Suspends or reactivates the shortcuts
473
473
  */ async suspendShortcuts(t) {
474
474
  if (t) {
475
- h(this, f, "f").suspend = true;
475
+ h(this, u, "f").suspend = true;
476
476
  } else {
477
- h(this, f, "f").suspend = false;
477
+ h(this, u, "f").suspend = false;
478
478
  }
479
479
  }
480
480
  /**
481
481
  * Allow to update the selected items
482
482
  */ async updateSelection(t) {
483
483
  // first clear selected
484
- h(this, w, "f").updateItemsProperties(h(this, u, "f"), {
484
+ h(this, g, "f").updateItemsProperties(h(this, p, "f"), {
485
485
  selected: false
486
486
  });
487
487
  // then select
488
- h(this, w, "f").updateItemsProperties(t, {
488
+ h(this, g, "f").updateItemsProperties(t, {
489
489
  selected: true
490
490
  });
491
491
  }
@@ -493,100 +493,100 @@ const P = class {
493
493
  * Allow to update the checked items
494
494
  */ async updateCheckedItems(t) {
495
495
  // first clear checks
496
- h(this, w, "f").updateItemsProperties(this.checkedNodesIds, {
496
+ h(this, g, "f").updateItemsProperties(this.checkedNodesIds, {
497
497
  checked: false
498
498
  });
499
499
  // then select
500
- h(this, w, "f").updateItemsProperties(t, {
500
+ h(this, g, "f").updateItemsProperties(t, {
501
501
  checked: true
502
502
  });
503
503
  this.checkedNodesIds = t;
504
504
  }
505
505
  render() {
506
- return s(i, {
506
+ return i(s, {
507
507
  class: {
508
508
  widget: true,
509
509
  "has-footer": this.renderFooter
510
510
  }
511
- }, s("ch-theme", {
511
+ }, i("ch-theme", {
512
512
  model: L
513
- }), s("ch-shortcuts", {
514
- src: h(this, p, "f"),
515
- ref: t => l(this, f, t, "f")
516
- }), s("section", {
513
+ }), i("ch-shortcuts", {
514
+ src: h(this, m, "f"),
515
+ ref: t => l(this, u, t, "f")
516
+ }), i("section", {
517
517
  class: "section"
518
- }, s("header", {
518
+ }, i("header", {
519
519
  part: "header",
520
520
  class: "header control-header field-group spacing-body-block-start spacing-body-inline"
521
- }, s("div", {
521
+ }, i("div", {
522
522
  class: "header__first-row"
523
- }, s("div", {
523
+ }, i("div", {
524
524
  class: "field field-inline"
525
- }, s("label", {
525
+ }, i("label", {
526
526
  class: "label",
527
527
  htmlFor: "view-mode"
528
- }, "Select view mode:"), s("ch-radio-group-render", {
528
+ }, "Select view mode:"), i("ch-radio-group-render", {
529
529
  class: "radio-group dummy-control-block-size",
530
530
  id: "view-mode",
531
- model: h(this, v, "f"),
532
- onChange: h(this, j, "f"),
533
- value: h(this, v, "f")[0].value
534
- })), this.checkboxType !== "none" && this.showToggleCheckboxes && s("div", {
531
+ model: h(this, w, "f"),
532
+ onChange: h(this, E, "f"),
533
+ value: h(this, w, "f")[0].value
534
+ })), this.checkboxType !== "none" && this.showToggleCheckboxes && i("div", {
535
535
  class: "field field-inline"
536
- }, s("label", {
536
+ }, i("label", {
537
537
  class: "label",
538
538
  htmlFor: "toggle-checkboxes"
539
- }, "Toggle Checkboxes"), s("ch-checkbox", {
539
+ }, "Toggle Checkboxes"), i("ch-checkbox", {
540
540
  class: "checkbox dummy-control-block-size",
541
541
  id: "toggle-checkboxes",
542
- checkedValue: O,
543
- value: O,
544
- onInput: h(this, z, "f")
545
- }))), s("div", {
542
+ checkedValue: J,
543
+ value: J,
544
+ onInput: h(this, N, "f")
545
+ }))), i("div", {
546
546
  class: {
547
547
  "header__second-row": true,
548
548
  "header__second-row--one-row": !this.showActiveItemLink
549
549
  }
550
- }, s("ch-edit", {
550
+ }, i("ch-edit", {
551
551
  class: "input",
552
- placeholder: h(this, d, "f").header.searchPatternPlaceholder,
553
- startImgSrc: A,
554
- onInput: h(this, x, "f"),
552
+ placeholder: h(this, f, "f").header.searchPatternPlaceholder,
553
+ startImgSrc: O,
554
+ onInput: h(this, W, "f"),
555
555
  accessibleName: "search pattern"
556
- }), this.activeItemNode && this.showActiveItemLink && s("div", {
556
+ }), this.activeItemNode && this.showActiveItemLink && i("div", {
557
557
  class: "active-item"
558
- }, s("span", {
558
+ }, i("span", {
559
559
  class: "active-item__icon-container"
560
- }, s("ch-image", {
560
+ }, i("ch-image", {
561
561
  class: "icon-md active-item__icon",
562
- src: this.activeItemNode.iconStart || a,
562
+ src: this.activeItemNode.iconStart || r,
563
563
  containerRef: null
564
- })), h(this, d, "f").header.activeItem, s("button", {
564
+ })), h(this, f, "f").header.activeItem, i("button", {
565
565
  class: "active-item__link",
566
- onClick: h(this, N, "f")
567
- }, this.activeItemNode.caption)))), s("div", {
566
+ onClick: h(this, A, "f")
567
+ }, this.activeItemNode.caption)))), i("div", {
568
568
  class: "spacing-body-inline-start trees"
569
- }, this.loading ? s("gx-ide-loader", {
570
- loaderTitle: h(this, d, "f").loader.title,
571
- description: h(this, d, "f").loader.description,
569
+ }, this.useLoader && this.loading ? i("gx-ide-loader", {
570
+ loaderTitle: h(this, f, "f").loader.title,
571
+ description: h(this, f, "f").loader.description,
572
572
  show: true
573
- }) : s("ch-tree-view-render", {
573
+ }) : i("ch-tree-view-render", {
574
574
  class: "tree-view",
575
575
  model: this.nodesVersionsViewType === "tree" ? this.nodeVersionsListTreeModel : this.nodeListFlattenedTreeModel,
576
576
  "show-lines": this.nodesVersionsViewType === "tree" ? "all" : "none",
577
577
  expandableButton: this.nodesVersionsViewType === "tree" ? "decorative" : "no",
578
- onItemContextmenu: h(this, y, "f"),
579
- onCheckedItemsChange: h(this, b, "f"),
580
- onSelectedItemsChange: h(this, M, "f"),
578
+ onItemContextmenu: h(this, x, "f"),
579
+ onCheckedItemsChange: h(this, y, "f"),
580
+ onSelectedItemsChange: h(this, S, "f"),
581
581
  expandOnClick: this.expandOnClick,
582
582
  multiSelection: this.multiSelection,
583
583
  filter: this.searchPatternValue,
584
584
  filterType: "caption",
585
585
  toggleCheckboxes: this.toggleCheckboxes,
586
586
  ref: t => {
587
- l(this, w, t, "f");
587
+ l(this, g, t, "f");
588
588
  }
589
- })), this.renderFooter && h(this, W, "f").call(this)));
589
+ })), this.renderFooter && h(this, C, "f").call(this)));
590
590
  }
591
591
  static get assetsDirs() {
592
592
  return [ "gx-ide-assets/select-kb-items" ];
@@ -594,20 +594,27 @@ const P = class {
594
594
  get el() {
595
595
  return n(this);
596
596
  }
597
- static get watchers() {
598
- return {
599
- itemsList: [ "watchNodeListHandler" ]
600
- };
601
- }
602
597
  };
603
598
 
604
- d = new WeakMap, f = new WeakMap, u = new WeakMap, p = new WeakMap, m = new WeakMap,
605
- v = new WeakMap, w = new WeakMap, g = new WeakMap, b = new WeakMap, k = new WeakMap,
606
- y = new WeakMap, _ = new WeakMap, x = new WeakMap, I = new WeakMap, W = new WeakMap,
607
- M = new WeakMap, C = new WeakMap, S = new WeakMap, T = new WeakMap, j = new WeakMap,
608
- z = new WeakMap, N = new WeakMap;
599
+ f = new WeakMap, u = new WeakMap, p = new WeakMap, m = new WeakMap, v = new WeakMap,
600
+ w = new WeakMap, g = new WeakMap, k = new WeakMap, y = new WeakMap, _ = new WeakMap,
601
+ x = new WeakMap, I = new WeakMap, W = new WeakMap, M = new WeakMap, C = new WeakMap,
602
+ S = new WeakMap, T = new WeakMap, j = new WeakMap, z = new WeakMap, E = new WeakMap,
603
+ N = new WeakMap, A = new WeakMap, d = new WeakSet, b = async function _GxIdeSelectKbItems_loadItems() {
604
+ try {
605
+ this.loading = true;
606
+ this.itemsList = await this.loadItemsCallback();
607
+ h(this, z, "f").call(this, this.itemsList);
608
+ // Check and update activeItem
609
+ this.activeItemNode = findFirstActiveNode(this.itemsList);
610
+ } catch (t) {
611
+ console.error("Error loading items:", t);
612
+ } finally {
613
+ this.loading = false;
614
+ }
615
+ };
609
616
 
610
- P.style = c;
617
+ X.style = c;
611
618
 
612
- export { P as gx_ide_select_kb_items };
613
- //# sourceMappingURL=p-8897c6de.entry.js.map
619
+ export { X as gx_ide_select_kb_items };
620
+ //# sourceMappingURL=p-2d6228e8.entry.js.map