@genexus/genexus-ide-ui 1.0.72 → 1.0.74

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 (59) hide show
  1. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  2. package/dist/cjs/gx-ide-bpm-sync-gam-roles.cjs.entry.js +104 -0
  3. package/dist/cjs/gx-ide-bpm-sync-gam-roles.cjs.entry.js.map +1 -0
  4. package/dist/cjs/gx-ide-bpm-task-documents.cjs.entry.js +282 -0
  5. package/dist/cjs/gx-ide-bpm-task-documents.cjs.entry.js.map +1 -0
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/collection-manifest.json +2 -0
  8. package/dist/collection/components/bpm/sync-gam-roles/bpm-sync-gam-roles.css +6 -0
  9. package/dist/collection/components/bpm/sync-gam-roles/bpm-sync-gam-roles.js +167 -0
  10. package/dist/collection/components/bpm/sync-gam-roles/bpm-sync-gam-roles.js.map +1 -0
  11. package/dist/collection/components/bpm/sync-gam-roles/gx-ide-assets/bpm-sync-gam-roles/langs/bpm-sync-gam-roles.lang.en.json +18 -0
  12. package/dist/collection/components/bpm/sync-gam-roles/gx-ide-assets/bpm-sync-gam-roles/langs/bpm-sync-gam-roles.lang.ja.json +18 -0
  13. package/dist/collection/components/bpm/sync-gam-roles/gx-ide-assets/bpm-sync-gam-roles/langs/bpm-sync-gam-roles.lang.zh.json +18 -0
  14. package/dist/collection/components/bpm/sync-gam-roles/gx-ide-assets/bpm-sync-gam-roles/shortcuts.json +15 -0
  15. package/dist/collection/components/bpm/sync-gam-roles/helpers.js +12 -0
  16. package/dist/collection/components/bpm/sync-gam-roles/helpers.js.map +1 -0
  17. package/dist/collection/components/bpm/task-documents/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.en.json +23 -0
  18. package/dist/collection/components/bpm/task-documents/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.ja.json +23 -0
  19. package/dist/collection/components/bpm/task-documents/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.zh.json +23 -0
  20. package/dist/collection/components/bpm/task-documents/gx-ide-assets/bpm-task-documents/shortcuts.json +15 -0
  21. package/dist/collection/components/bpm/task-documents/helpers.js +34 -0
  22. package/dist/collection/components/bpm/task-documents/helpers.js.map +1 -0
  23. package/dist/collection/components/bpm/task-documents/task-documents.css +26 -0
  24. package/dist/collection/components/bpm/task-documents/task-documents.js +440 -0
  25. package/dist/collection/components/bpm/task-documents/task-documents.js.map +1 -0
  26. package/dist/collection/testing/locale.e2e.js +2 -0
  27. package/dist/collection/testing/locale.e2e.js.map +1 -1
  28. package/dist/components/gx-ide-bpm-sync-gam-roles.d.ts +11 -0
  29. package/dist/components/gx-ide-bpm-sync-gam-roles.js +122 -0
  30. package/dist/components/gx-ide-bpm-sync-gam-roles.js.map +1 -0
  31. package/dist/components/gx-ide-bpm-task-documents.d.ts +11 -0
  32. package/dist/components/gx-ide-bpm-task-documents.js +313 -0
  33. package/dist/components/gx-ide-bpm-task-documents.js.map +1 -0
  34. package/dist/esm/genexus-ide-ui.js +1 -1
  35. package/dist/esm/gx-ide-bpm-sync-gam-roles.entry.js +100 -0
  36. package/dist/esm/gx-ide-bpm-sync-gam-roles.entry.js.map +1 -0
  37. package/dist/esm/gx-ide-bpm-task-documents.entry.js +278 -0
  38. package/dist/esm/gx-ide-bpm-task-documents.entry.js.map +1 -0
  39. package/dist/esm/loader.js +1 -1
  40. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  41. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  42. package/dist/genexus-ide-ui/gx-ide-assets/bpm-sync-gam-roles/langs/bpm-sync-gam-roles.lang.en.json +18 -0
  43. package/dist/genexus-ide-ui/gx-ide-assets/bpm-sync-gam-roles/langs/bpm-sync-gam-roles.lang.ja.json +18 -0
  44. package/dist/genexus-ide-ui/gx-ide-assets/bpm-sync-gam-roles/langs/bpm-sync-gam-roles.lang.zh.json +18 -0
  45. package/dist/genexus-ide-ui/gx-ide-assets/bpm-sync-gam-roles/shortcuts.json +15 -0
  46. package/dist/genexus-ide-ui/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.en.json +23 -0
  47. package/dist/genexus-ide-ui/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.ja.json +23 -0
  48. package/dist/genexus-ide-ui/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.zh.json +23 -0
  49. package/dist/genexus-ide-ui/gx-ide-assets/bpm-task-documents/shortcuts.json +15 -0
  50. package/dist/genexus-ide-ui/p-a3361024.entry.js +419 -0
  51. package/dist/genexus-ide-ui/p-a3361024.entry.js.map +1 -0
  52. package/dist/genexus-ide-ui/p-ded7444c.entry.js +136 -0
  53. package/dist/genexus-ide-ui/p-ded7444c.entry.js.map +1 -0
  54. package/dist/types/components/bpm/sync-gam-roles/bpm-sync-gam-roles.d.ts +23 -0
  55. package/dist/types/components/bpm/sync-gam-roles/helpers.d.ts +2 -0
  56. package/dist/types/components/bpm/task-documents/helpers.d.ts +8 -0
  57. package/dist/types/components/bpm/task-documents/task-documents.d.ts +71 -0
  58. package/dist/types/components.d.ts +185 -62
  59. package/package.json +1 -1
@@ -0,0 +1,419 @@
1
+ import { r as e, c as t, g as s, h as i, H as a, a as l } from "./p-25a9f1d7.js";
2
+
3
+ import { L as c } from "./p-311eedf3.js";
4
+
5
+ import { g as o } from "./p-6e4208d8.js";
6
+
7
+ import "./p-c9551186.js";
8
+
9
+ const taskDocumentsToActionListItemModel = (e, t) => {
10
+ const s = [];
11
+ e === null || e === void 0 ? void 0 : e.forEach(((e, i) => {
12
+ const a = `task-${e.name}`;
13
+ const l = e.name;
14
+ s.push({
15
+ id: a,
16
+ caption: l,
17
+ selected: t ? t.name === e.name : i === 0,
18
+ type: "actionable"
19
+ });
20
+ }));
21
+ return s;
22
+ };
23
+
24
+ /* References Types*/
25
+ /**
26
+ * @description This function converts string[] to ComboBoxItemModel[]
27
+ */ const convertSuggestedDocumentsToSuggestItems = e => {
28
+ const t = [];
29
+ if (e.length) {
30
+ e.forEach((e => {
31
+ const s = {
32
+ value: e,
33
+ caption: e
34
+ };
35
+ t.push(s);
36
+ }));
37
+ }
38
+ return t;
39
+ };
40
+
41
+ const n = ":host{display:grid;grid-template-columns:1fr;grid-template-rows:1fr max-content;block-size:100%;overflow:auto}.section{display:contents}.main{display:grid;grid-template-rows:max-content 1fr max-content;block-size:100%;overflow:auto}.documents__header{grid-template-columns:1fr max-content}.documents__suggest{flex:1}";
42
+
43
+ var r = undefined && undefined.__classPrivateFieldGet || function(e, t, s, i) {
44
+ if (s === "a" && !i) throw new TypeError("Private accessor was defined without a getter");
45
+ if (typeof t === "function" ? e !== t || !i : !t.has(e)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
46
+ return s === "m" ? i : s === "a" ? i.call(e) : i ? i.value : t.get(e);
47
+ };
48
+
49
+ var h = undefined && undefined.__classPrivateFieldSet || function(e, t, s, i, a) {
50
+ if (i === "m") throw new TypeError("Private method is not writable");
51
+ if (i === "a" && !a) throw new TypeError("Private accessor was defined without a setter");
52
+ if (typeof t === "function" ? e !== t || !a : !t.has(e)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
53
+ return i === "a" ? a.call(e, s) : a ? a.value = s : t.set(e, s), s;
54
+ };
55
+
56
+ var d, u, f, b, m, g, p, k, w, v, x, y, M, W, _, C, E, T, I, R, j, q, D, V, S, z, B, N;
57
+
58
+ const A = "true";
59
+
60
+ const G = [ "resets/box-sizing", "components/list-box", "components/tabular-grid", "utils/form--full", "utils/layout", "utils/spacing", "chameleon/scrollbar" ];
61
+
62
+ const H = o({
63
+ category: "objects",
64
+ name: "module"
65
+ });
66
+
67
+ const P = o({
68
+ category: "gemini-tools",
69
+ name: "show-more-horizontal",
70
+ colorType: "primary"
71
+ });
72
+
73
+ const L = o({
74
+ category: "menus",
75
+ name: "delete",
76
+ colorType: "primary"
77
+ });
78
+
79
+ const O = "CH-CHECKBOX";
80
+
81
+ const F = class {
82
+ constructor(a) {
83
+ e(this, a);
84
+ this.componentDidRenderFirstTime = t(this, "componentDidRenderFirstTime", 7);
85
+ d.add(this);
86
+ u.set(this, void 0);
87
+ f.set(this, false);
88
+ b.set(this, s(`./gx-ide-assets/bpm-task-documents/shortcuts.json`));
89
+ m.set(this, void 0);
90
+ g.set(this, void 0);
91
+ p.set(this, void 0);
92
+ k.set(this, void 0);
93
+ w.set(this, void 0);
94
+ v.set(this, void 0);
95
+ x.set(this, void 0);
96
+ y.set(this, void 0);
97
+ M.set(this, void 0);
98
+ C.set(this, (() => {
99
+ this.cancelCallback();
100
+ }));
101
+ E.set(this, (() => {
102
+ this.confirmCallback(this.documents);
103
+ }));
104
+ T.set(this, (async e => {
105
+ const t = e.detail;
106
+ this.suggestDocumentsCallback(t).then((e => {
107
+ this.suggestedDocuments = convertSuggestedDocumentsToSuggestItems(e);
108
+ })).catch((() => {}));
109
+ }));
110
+ R.set(this, (() => {
111
+ this.documents = this.documents.filter((e => e.name !== this.selectedDocument.name));
112
+ this.selectedDocument = null;
113
+ r(this, D, "f").call(this);
114
+ }));
115
+ j.set(this, (async e => {
116
+ if (e.detail) {
117
+ r(this, d, "m", _).call(this, e.detail);
118
+ }
119
+ }));
120
+ q.set(this, (e => {
121
+ this.selectedDocument = this.documents.find((t => {
122
+ var s;
123
+ return t.name === ((s = e.detail[0]) === null || s === void 0 ? void 0 : s.item.caption);
124
+ }));
125
+ }));
126
+ D.set(this, (() => {
127
+ var e, t;
128
+ (e = this.documents) === null || e === void 0 ? void 0 : e.sort(((e, t) => e.name.localeCompare(t.name)));
129
+ this.documentsActionListState = taskDocumentsToActionListItemModel(this.documents, this.selectedDocument);
130
+ this.selectedDocument = this.selectedDocument || ((t = this.documents) === null || t === void 0 ? void 0 : t[0]) || null;
131
+ }));
132
+ V.set(this, (async () => {
133
+ const e = await this.selectDocumentCallback();
134
+ if (e) {
135
+ this.documentName = e;
136
+ r(this, d, "m", _).call(this, e);
137
+ }
138
+ }));
139
+ S.set(this, (() => {
140
+ var e, t, s, a, l, c, o, n;
141
+ return i("ch-tabular-grid", {
142
+ class: "tabular-grid scrollable",
143
+ rowSelectionMode: "none",
144
+ keyboardNavigationMode: "focus",
145
+ columnResizeMode: "single"
146
+ }, i("ch-tabular-grid-columnset", {
147
+ class: "tabular-grid-column-set"
148
+ }, i("ch-tabular-grid-column", {
149
+ class: "tabular-grid-column",
150
+ columnId: "code",
151
+ columnName: "",
152
+ settingable: false
153
+ }), i("ch-tabular-grid-column", {
154
+ class: "tabular-grid-column",
155
+ columnId: "enabled",
156
+ settingable: false,
157
+ columnName: r(this, u, "f").actions.enabledCheckbox
158
+ }), i("ch-tabular-grid-column", {
159
+ class: "tabular-grid-column",
160
+ columnId: "required",
161
+ settingable: false,
162
+ columnName: r(this, u, "f").actions.requiredCheckbox
163
+ })), i("ch-tabular-grid-row", {
164
+ // read
165
+ class: "tabular-grid-row",
166
+ rowid: "read"
167
+ }, i("ch-tabular-grid-cell", {
168
+ class: "tabular-grid-cell"
169
+ }, r(this, u, "f").actions.readLabel), i("ch-tabular-grid-cell", {
170
+ class: "tabular-grid-cell"
171
+ }, i("ch-checkbox", {
172
+ class: "checkbox",
173
+ checkedValue: A,
174
+ value: (e = this.selectedDocument) === null || e === void 0 ? void 0 : e.readEnabled.toString(),
175
+ ref: e => h(this, v, e, "f")
176
+ })), i("ch-tabular-grid-cell", {
177
+ class: "tabular-grid-cell"
178
+ }, i("ch-checkbox", {
179
+ class: "checkbox",
180
+ checkedValue: A,
181
+ value: (t = this.selectedDocument) === null || t === void 0 ? void 0 : t.readRequired.toString(),
182
+ ref: e => h(this, x, e, "f")
183
+ }))), i("ch-tabular-grid-row", {
184
+ // new
185
+ class: "tabular-grid-row",
186
+ rowid: "read"
187
+ }, i("ch-tabular-grid-cell", {
188
+ class: "tabular-grid-cell"
189
+ }, r(this, u, "f").actions.newLabel), i("ch-tabular-grid-cell", {
190
+ class: "tabular-grid-cell"
191
+ }, i("ch-checkbox", {
192
+ class: "checkbox",
193
+ checkedValue: A,
194
+ value: (s = this.selectedDocument) === null || s === void 0 ? void 0 : s.newEnabled.toString(),
195
+ ref: e => h(this, k, e, "f")
196
+ })), i("ch-tabular-grid-cell", {
197
+ class: "tabular-grid-cell"
198
+ }, i("ch-checkbox", {
199
+ class: "checkbox",
200
+ checkedValue: A,
201
+ value: (a = this.selectedDocument) === null || a === void 0 ? void 0 : a.newRequired.toString(),
202
+ ref: e => h(this, w, e, "f")
203
+ }))), i("ch-tabular-grid-row", {
204
+ // update
205
+ class: "tabular-grid-row",
206
+ rowid: "read"
207
+ }, i("ch-tabular-grid-cell", {
208
+ class: "tabular-grid-cell"
209
+ }, r(this, u, "f").actions.updateLabel), i("ch-tabular-grid-cell", {
210
+ class: "tabular-grid-cell"
211
+ }, i("ch-checkbox", {
212
+ class: "checkbox",
213
+ checkedValue: A,
214
+ value: (l = this.selectedDocument) === null || l === void 0 ? void 0 : l.updateEnabled.toString(),
215
+ ref: e => h(this, y, e, "f")
216
+ })), i("ch-tabular-grid-cell", {
217
+ class: "tabular-grid-cell"
218
+ }, i("ch-checkbox", {
219
+ class: "checkbox",
220
+ checkedValue: A,
221
+ value: (c = this.selectedDocument) === null || c === void 0 ? void 0 : c.updateRequired.toString(),
222
+ ref: e => h(this, M, e, "f")
223
+ }))), i("ch-tabular-grid-row", {
224
+ // delete
225
+ class: "tabular-grid-row",
226
+ rowid: "read"
227
+ }, i("ch-tabular-grid-cell", {
228
+ class: "tabular-grid-cell"
229
+ }, r(this, u, "f").actions.deleteLabel), i("ch-tabular-grid-cell", {
230
+ class: "tabular-grid-cell"
231
+ }, i("ch-checkbox", {
232
+ class: "checkbox",
233
+ checkedValue: A,
234
+ value: (o = this.selectedDocument) === null || o === void 0 ? void 0 : o.deleteEnabled.toString(),
235
+ ref: e => h(this, g, e, "f")
236
+ })), i("ch-tabular-grid-cell", {
237
+ class: "tabular-grid-cell"
238
+ }, i("ch-checkbox", {
239
+ class: "checkbox",
240
+ checkedValue: A,
241
+ value: (n = this.selectedDocument) === null || n === void 0 ? void 0 : n.deleteRequired.toString(),
242
+ ref: e => h(this, p, e, "f")
243
+ }))));
244
+ }));
245
+ z.set(this, (() => i("gx-ide-empty-state", {
246
+ class: "recent-objects__empty-state",
247
+ stateIconSrc: H,
248
+ isAnimated: r(this, f, "f"),
249
+ stateTitle: r(this, u, "f").emptyRightPanelInfo.title
250
+ }, i("button", {
251
+ class: "button-secondary",
252
+ onClick: r(this, V, "f")
253
+ }, r(this, u, "f").emptyRightPanelInfo.buttonCaption))));
254
+ B.set(this, (() => i("footer", {
255
+ class: "footer control-footer control-footer-with-border spacing-body-block-end spacing-body-inline"
256
+ }, i("div", {
257
+ class: "buttons-spacer"
258
+ }, i("button", {
259
+ class: "button-secondary",
260
+ id: "button-cancel",
261
+ onClick: r(this, C, "f"),
262
+ part: "button-cancel"
263
+ }, r(this, u, "f").footer.cancelButton), i("button", {
264
+ class: "button-primary",
265
+ id: "button-create",
266
+ onClick: r(this, E, "f"),
267
+ part: "button-create"
268
+ }, r(this, u, "f").footer.confirmButton)))));
269
+ N.set(this, (() => [ i("div", {
270
+ class: "documents__list spacing-body-inline"
271
+ }, i("ch-action-list-render", {
272
+ selection: "single",
273
+ class: "list-box",
274
+ model: this.documentsActionListState,
275
+ onSelectedItemsChange: r(this, q, "f")
276
+ })), r(this, S, "f").call(this) ]));
277
+ this.documentsActionListState = [];
278
+ this.documentName = null;
279
+ this.selectedDocument = null;
280
+ this.suggestedDocuments = undefined;
281
+ this.documents = undefined;
282
+ this.cancelCallback = undefined;
283
+ this.confirmCallback = undefined;
284
+ this.selectDocumentCallback = undefined;
285
+ this.suggestDocumentsCallback = undefined;
286
+ }
287
+ async componentWillLoad() {
288
+ h(this, u, await c.getComponentStrings(this.el), "f");
289
+ r(this, D, "f").call(this);
290
+ }
291
+ componentDidRender() {
292
+ if (!r(this, f, "f")) {
293
+ this.componentDidRenderFirstTime.emit(r(this, u, "f").componentName);
294
+ h(this, f, true, "f");
295
+ }
296
+ const e = this.el.shadowRoot;
297
+ const t = r(this, d, "m", W).call(this, e);
298
+ if (t) {
299
+ t.forEach((e => {
300
+ e.addEventListener("input", r(this, d, "m", I).bind(this));
301
+ }));
302
+ }
303
+ }
304
+ /**
305
+ * Suspends or reactivates the shortcuts
306
+ */ async suspendShortcuts(e) {
307
+ if (e) {
308
+ r(this, m, "f").suspend = true;
309
+ } else {
310
+ r(this, m, "f").suspend = false;
311
+ }
312
+ }
313
+ render() {
314
+ return i(a, {
315
+ class: "widget"
316
+ }, i("ch-theme", {
317
+ model: G
318
+ }), i("ch-shortcuts", {
319
+ src: r(this, b, "f"),
320
+ ref: e => h(this, m, e, "f")
321
+ }), i("section", {
322
+ class: "section"
323
+ }, i("div", {
324
+ class: "main field-group"
325
+ }, i("div", {
326
+ class: "documents__header buttons-spacer spacing-body-inline spacing-body-block-start"
327
+ }, i("ch-combo-box-render", {
328
+ class: "combo-box documents__suggest",
329
+ model: this.suggestedDocuments,
330
+ placeholder: r(this, u, "f").documents.suggestPlaceholder,
331
+ suggest: true,
332
+ onInput: r(this, T, "f"),
333
+ onChange: r(this, j, "f"),
334
+ suggestOptions: {
335
+ alreadyProcessed: false,
336
+ autoExpand: true,
337
+ hideMatchesAndShowNonMatches: false,
338
+ highlightMatchedItems: false,
339
+ matchCase: false,
340
+ regularExpression: false,
341
+ strict: false
342
+ }
343
+ }), i("span", null, i("button", {
344
+ class: "button-tertiary button-icon-only",
345
+ "aria-label": r(this, u, "f").documents.addDocumentButtonLabel,
346
+ title: r(this, u, "f").documents.addDocumentButtonLabel,
347
+ onClick: r(this, V, "f")
348
+ }, i("ch-image", {
349
+ class: "icon-sm",
350
+ src: P
351
+ })), i("button", {
352
+ class: "button-tertiary button-icon-only",
353
+ "aria-label": r(this, u, "f").documents.clearDocumentButtonLabel,
354
+ title: r(this, u, "f").documents.clearDocumentButtonLabel,
355
+ onClick: r(this, R, "f")
356
+ }, i("ch-image", {
357
+ class: "icon-sm",
358
+ src: L
359
+ })))), this.documentsActionListState.length ? r(this, N, "f").call(this) : r(this, z, "f").call(this)), r(this, B, "f").call(this)));
360
+ }
361
+ static get assetsDirs() {
362
+ return [ "gx-ide-assets/bpm-task-documents" ];
363
+ }
364
+ get el() {
365
+ return l(this);
366
+ }
367
+ };
368
+
369
+ u = new WeakMap, f = new WeakMap, b = new WeakMap, m = new WeakMap, g = new WeakMap,
370
+ p = new WeakMap, k = new WeakMap, w = new WeakMap, v = new WeakMap, x = new WeakMap,
371
+ y = new WeakMap, M = new WeakMap, C = new WeakMap, E = new WeakMap, T = new WeakMap,
372
+ R = new WeakMap, j = new WeakMap, q = new WeakMap, D = new WeakMap, V = new WeakMap,
373
+ S = new WeakMap, z = new WeakMap, B = new WeakMap, N = new WeakMap, d = new WeakSet,
374
+ W = function _GxIdeBpmTaskDocuments_getAllCheckboxes(e) {
375
+ const t = [];
376
+ e.childNodes.forEach((e => {
377
+ if (e.nodeName === O) {
378
+ t.push(e);
379
+ } else if (e instanceof HTMLElement) {
380
+ t.push(...r(this, d, "m", _GxIdeBpmTaskDocuments_getAllCheckboxes).call(this, e));
381
+ }
382
+ }));
383
+ return t;
384
+ }, _ = function _GxIdeBpmTaskDocuments_addDocument(e) {
385
+ const t = this.documents.some((t => t.name === e));
386
+ if (!t) {
387
+ this.documents = [ ...this.documents, {
388
+ name: e,
389
+ deleteEnabled: false,
390
+ deleteRequired: false,
391
+ newEnabled: false,
392
+ newRequired: false,
393
+ readEnabled: false,
394
+ readRequired: false,
395
+ updateEnabled: false,
396
+ updateRequired: false
397
+ } ];
398
+ r(this, D, "f").call(this);
399
+ }
400
+ }, I = function _GxIdeBpmTaskDocuments_handleCheckboxChange() {
401
+ const e = {
402
+ name: this.selectedDocument.name,
403
+ readEnabled: r(this, v, "f").value === A,
404
+ readRequired: r(this, x, "f").value === A,
405
+ newEnabled: r(this, k, "f").value === A,
406
+ newRequired: r(this, w, "f").value === A,
407
+ updateEnabled: r(this, y, "f").value === A,
408
+ updateRequired: r(this, M, "f").value === A,
409
+ deleteEnabled: r(this, g, "f").value === A,
410
+ deleteRequired: r(this, p, "f").value === A
411
+ };
412
+ this.selectedDocument = e;
413
+ this.documents = this.documents.map((e => e.name === this.selectedDocument.name ? this.selectedDocument : e));
414
+ };
415
+
416
+ F.style = n;
417
+
418
+ export { F as gx_ide_bpm_task_documents };
419
+ //# sourceMappingURL=p-a3361024.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["taskDocumentsToActionListItemModel","objects","selectedDocument","actionListDocuments","forEach","object","index","itemId","name","itemValue","push","id","caption","selected","type","convertSuggestedDocumentsToSuggestItems","suggestedDocuments","suggestItems","length","suggestedDocument","suggestItem","value","taskDocumentsCss","CHECKED_VALUE","CSS_BUNDLES","MODULE_ICON","getIconPath","category","MORE_ICON","colorType","DELETE_ICON","NODENAME","GxIdeBpmTaskDocuments","_GxIdeBpmTaskDocuments__componentLocale","set","this","_GxIdeBpmTaskDocuments_renderedFirstTime","_GxIdeBpmTaskDocuments_shortcutsSrc","getAssetPath","_GxIdeBpmTaskDocuments_chShortcutsEl","_GxIdeBpmTaskDocuments_deleteEnabledCheckboxEl","_GxIdeBpmTaskDocuments_deleteRequiredCheckboxEl","_GxIdeBpmTaskDocuments_newEnabledCheckboxEl","_GxIdeBpmTaskDocuments_newRequiredCheckboxEl","_GxIdeBpmTaskDocuments_readEnabledCheckboxEl","_GxIdeBpmTaskDocuments_readRequiredCheckboxEl","_GxIdeBpmTaskDocuments_updateEnabledCheckboxEl","_GxIdeBpmTaskDocuments_updateRequiredCheckboxEl","_GxIdeBpmTaskDocuments_cancelCallbackHandler","cancelCallback","_GxIdeBpmTaskDocuments_confirmCallbackHandler","confirmCallback","documents","_GxIdeBpmTaskDocuments_documentSuggestValueChangedHandler","async","e","detail","suggestDocumentsCallback","then","result","catch","_GxIdeBpmTaskDocuments_handleDeleteButton","filter","doc","__classPrivateFieldGet","_GxIdeBpmTaskDocuments_refreshDocumentsActionListState","call","_GxIdeBpmTaskDocuments_listenDocumentSelected","_GxIdeBpmTaskDocuments_instances","_GxIdeBpmTaskDocuments_addDocument","_GxIdeBpmTaskDocuments_objectSelectionChangedHandler","find","_a","item","sort","a","b","localeCompare","documentsActionListState","_b","_GxIdeBpmTaskDocuments_selectDocumentCallbackHandler","callbackResult","selectDocumentCallback","documentName","_GxIdeBpmTaskDocuments_renderActions","h","class","rowSelectionMode","keyboardNavigationMode","columnResizeMode","columnId","columnName","settingable","actions","enabledCheckbox","requiredCheckbox","rowid","readLabel","checkedValue","readEnabled","toString","ref","el","__classPrivateFieldSet","readRequired","newLabel","_c","newEnabled","_d","newRequired","updateLabel","_e","updateEnabled","_f","updateRequired","deleteLabel","_g","deleteEnabled","_h","deleteRequired","_GxIdeBpmTaskDocuments_renderEmptyState","stateIconSrc","isAnimated","stateTitle","emptyRightPanelInfo","title","onClick","buttonCaption","_GxIdeBpmTaskDocuments_renderFooter","part","footer","cancelButton","confirmButton","_GxIdeBpmTaskDocuments_renderMain","selection","model","onSelectedItemsChange","componentWillLoad","Locale","getComponentStrings","componentDidRender","componentDidRenderFirstTime","emit","componentName","shadowRoot","checkboxes","_GxIdeBpmTaskDocuments_getAllCheckboxes","checkbox","addEventListener","_GxIdeBpmTaskDocuments_handleCheckboxChange","bind","suspendShortcuts","suspend","render","Host","src","placeholder","suggestPlaceholder","suggest","onInput","onChange","suggestOptions","alreadyProcessed","autoExpand","hideMatchesAndShowNonMatches","highlightMatchedItems","matchCase","regularExpression","strict","addDocumentButtonLabel","clearDocumentButtonLabel","node","childNodes","child","nodeName","HTMLElement","documentExists","some","data","map"],"sources":["src/components/bpm/task-documents/helpers.ts","src/components/bpm/task-documents/task-documents.scss?tag=gx-ide-bpm-task-documents&encapsulation=shadow","src/components/bpm/task-documents/task-documents.tsx"],"sourcesContent":["import { TaskDocumentData } from \"./task-documents\";\nimport { ActionListItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\nimport { ComboBoxItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/combo-box/types\";\n\nexport const taskDocumentsToActionListItemModel = (\n objects: TaskDocumentData[],\n selectedDocument?: TaskDocumentData\n): ActionListItemModel[] => {\n const actionListDocuments: ActionListItemModel[] = [];\n objects?.forEach((object, index) => {\n const itemId = `task-${object.name}`;\n const itemValue = object.name;\n actionListDocuments.push({\n id: itemId,\n caption: itemValue,\n selected: selectedDocument\n ? selectedDocument.name === object.name\n : index === 0,\n type: \"actionable\"\n });\n });\n return actionListDocuments;\n};\n\n/* References Types*/\n\n/**\n * @description This function converts string[] to ComboBoxItemModel[]\n */\nexport const convertSuggestedDocumentsToSuggestItems = (\n suggestedDocuments: string[]\n): ComboBoxItemModel[] => {\n const suggestItems: ComboBoxItemModel[] = [];\n if (suggestedDocuments.length) {\n suggestedDocuments.forEach((suggestedDocument: string) => {\n const suggestItem: ComboBoxItemModel = {\n value: suggestedDocument,\n caption: suggestedDocument\n };\n suggestItems.push(suggestItem);\n });\n }\n return suggestItems;\n};\n",":host {\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: 1fr max-content;\n block-size: 100%;\n overflow: auto;\n}\n.section {\n display: contents;\n}\n.main {\n display: grid;\n grid-template-rows: max-content 1fr max-content;\n block-size: 100%;\n overflow: auto;\n}\n\n.documents__header {\n grid-template-columns: 1fr max-content;\n}\n.documents__suggest {\n flex: 1;\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n State,\n getAssetPath,\n Method\n} from \"@stencil/core\";\nimport { Locale } from \"../../../common/locale\";\nimport {\n convertSuggestedDocumentsToSuggestItems,\n taskDocumentsToActionListItemModel\n} from \"./helpers\";\nimport { getIconPath, MercuryBundles } from \"@genexus/mercury\";\nimport { ActionListItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\nimport { ComboBoxItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/combo-box/types\";\nimport { ChComboBoxRenderCustomEvent } from \"@genexus/chameleon-controls-library\";\n\nconst CHECKED_VALUE = \"true\";\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/list-box\",\n \"components/tabular-grid\",\n \"utils/form--full\",\n \"utils/layout\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\nconst MODULE_ICON = getIconPath({\n category: \"objects\",\n name: \"module\"\n});\nconst MORE_ICON = getIconPath({\n category: \"gemini-tools\",\n name: \"show-more-horizontal\",\n colorType: \"primary\"\n});\nconst DELETE_ICON = getIconPath({\n category: \"menus\",\n name: \"delete\",\n colorType: \"primary\"\n});\n\nconst NODENAME = \"CH-CHECKBOX\";\n@Component({\n tag: \"gx-ide-bpm-task-documents\",\n styleUrl: \"task-documents.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/bpm-task-documents\"]\n})\nexport class GxIdeBpmTaskDocuments {\n #_componentLocale: any;\n #renderedFirstTime = false;\n #shortcutsSrc = getAssetPath(\n `./gx-ide-assets/bpm-task-documents/shortcuts.json`\n );\n\n @Element() el: HTMLGxIdeBpmTaskDocumentsElement;\n\n #chShortcutsEl: HTMLChShortcutsElement;\n #deleteEnabledCheckboxEl: HTMLChCheckboxElement;\n #deleteRequiredCheckboxEl: HTMLChCheckboxElement;\n\n #newEnabledCheckboxEl: HTMLChCheckboxElement;\n #newRequiredCheckboxEl: HTMLChCheckboxElement;\n #readEnabledCheckboxEl: HTMLChCheckboxElement;\n #readRequiredCheckboxEl: HTMLChCheckboxElement;\n #updateEnabledCheckboxEl: HTMLChCheckboxElement;\n #updateRequiredCheckboxEl: HTMLChCheckboxElement;\n\n /**\n * Documents state for the action list\n */\n @State() documentsActionListState: ActionListItemModel[] = [];\n\n @State() documentName: string = null;\n\n /**\n * Document selected in the action list\n */\n @State() selectedDocument: TaskDocumentData = null;\n\n /**\n * Possible suggestions for the documents\n */\n @State() suggestedDocuments: ComboBoxItemModel[];\n\n /**\n * @property documents\n * @description The current value of the documents for the task\n */\n\n @Prop({ mutable: true }) documents: TaskDocumentData[];\n\n /**\n * @property cancelCallback\n * @description Callback invoked when the user cancels the application declaration (Cancel button)\n */\n @Prop() readonly cancelCallback: CancelCallback;\n\n /**\n * @property confirmCallback\n * @description Callback invoked when the user confirms the application declaration (Ok button)\n */\n @Prop() readonly confirmCallback: ConfirmCallback;\n\n /**\n * @property selectDocumentCallback\n * @description Callback invoked when the user presses the '...' button to access the WorkflowDocuments selection dialog. Returns the name of the document to be inserted in the input or 'undefined' if it was canceled.\n */\n @Prop() readonly selectDocumentCallback: SelectDocumentCallback;\n\n /**\n * @property suggestDocumentsCallback\n * @description Callback that must be called to obtain options for the document input.\n */\n @Prop() readonly suggestDocumentsCallback: SuggestDocumentsCallback;\n\n /**\n * @description Gets fired when the component has rendered for the first time.\n */\n @Event() componentDidRenderFirstTime: EventEmitter<string>;\n\n async componentWillLoad() {\n this.#_componentLocale = await Locale.getComponentStrings(this.el);\n this.#refreshDocumentsActionListState();\n }\n\n componentDidRender() {\n if (!this.#renderedFirstTime) {\n this.componentDidRenderFirstTime.emit(\n this.#_componentLocale.componentName\n );\n this.#renderedFirstTime = true;\n }\n const shadowRoot = this.el.shadowRoot;\n const checkboxes = this.#getAllCheckboxes(\n shadowRoot as unknown as HTMLElement\n );\n if (checkboxes) {\n checkboxes.forEach(checkbox => {\n checkbox.addEventListener(\n \"input\",\n this.#handleCheckboxChange.bind(this)\n );\n });\n }\n }\n\n /**\n * Suspends or reactivates the shortcuts\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n if (suspendShortcuts) {\n this.#chShortcutsEl.suspend = true;\n } else {\n this.#chShortcutsEl.suspend = false;\n }\n }\n\n #getAllCheckboxes(node: HTMLElement): HTMLChCheckboxElement[] {\n const checkboxes: HTMLChCheckboxElement[] = [];\n\n node.childNodes.forEach(child => {\n if (child.nodeName === NODENAME) {\n checkboxes.push(child as HTMLChCheckboxElement);\n } else if (child instanceof HTMLElement) {\n checkboxes.push(...this.#getAllCheckboxes(child));\n }\n });\n\n return checkboxes;\n }\n #addDocument(documentName: string) {\n const documentExists = this.documents.some(\n doc => doc.name === documentName\n );\n if (!documentExists) {\n this.documents = [\n ...this.documents,\n {\n name: documentName,\n deleteEnabled: false,\n deleteRequired: false,\n newEnabled: false,\n newRequired: false,\n readEnabled: false,\n readRequired: false,\n updateEnabled: false,\n updateRequired: false\n }\n ];\n this.#refreshDocumentsActionListState();\n }\n }\n\n #cancelCallbackHandler = () => {\n this.cancelCallback();\n };\n #confirmCallbackHandler = () => {\n this.confirmCallback(this.documents);\n };\n\n #documentSuggestValueChangedHandler = async (\n e: ChComboBoxRenderCustomEvent<string> & InputEvent\n ) => {\n const value = e.detail;\n this.suggestDocumentsCallback(value)\n .then(result => {\n this.suggestedDocuments =\n convertSuggestedDocumentsToSuggestItems(result);\n })\n .catch(() => {\n // to do\n });\n };\n\n #handleCheckboxChange() {\n const data: TaskDocumentData = {\n name: this.selectedDocument.name,\n readEnabled: this.#readEnabledCheckboxEl.value === CHECKED_VALUE,\n readRequired: this.#readRequiredCheckboxEl.value === CHECKED_VALUE,\n newEnabled: this.#newEnabledCheckboxEl.value === CHECKED_VALUE,\n newRequired: this.#newRequiredCheckboxEl.value === CHECKED_VALUE,\n updateEnabled: this.#updateEnabledCheckboxEl.value === CHECKED_VALUE,\n updateRequired: this.#updateRequiredCheckboxEl.value === CHECKED_VALUE,\n deleteEnabled: this.#deleteEnabledCheckboxEl.value === CHECKED_VALUE,\n deleteRequired: this.#deleteRequiredCheckboxEl.value === CHECKED_VALUE\n };\n\n this.selectedDocument = data;\n\n this.documents = this.documents.map(doc =>\n doc.name === this.selectedDocument.name ? this.selectedDocument : doc\n );\n }\n\n #handleDeleteButton = () => {\n this.documents = this.documents.filter(\n doc => doc.name !== this.selectedDocument.name\n );\n this.selectedDocument = null;\n this.#refreshDocumentsActionListState();\n };\n\n #listenDocumentSelected = async (e: CustomEvent<string>) => {\n if (e.detail) {\n this.#addDocument(e.detail);\n }\n };\n\n #objectSelectionChangedHandler = (e: CustomEvent) => {\n this.selectedDocument = this.documents.find(\n doc => doc.name === e.detail[0]?.item.caption\n );\n };\n\n #refreshDocumentsActionListState = () => {\n this.documents?.sort((a, b) => {\n return a.name.localeCompare(b.name);\n });\n this.documentsActionListState = taskDocumentsToActionListItemModel(\n this.documents,\n this.selectedDocument\n );\n\n this.selectedDocument =\n this.selectedDocument || this.documents?.[0] || null;\n };\n\n #selectDocumentCallbackHandler = async () => {\n const callbackResult = await this.selectDocumentCallback();\n if (callbackResult) {\n this.documentName = callbackResult;\n this.#addDocument(callbackResult);\n }\n };\n\n #renderActions = () => {\n return (\n <ch-tabular-grid\n class=\"tabular-grid scrollable\"\n rowSelectionMode=\"none\"\n keyboardNavigationMode=\"focus\"\n columnResizeMode=\"single\"\n >\n <ch-tabular-grid-columnset class=\"tabular-grid-column-set\">\n <ch-tabular-grid-column\n class=\"tabular-grid-column\"\n columnId=\"code\"\n columnName=\"\"\n settingable={false}\n ></ch-tabular-grid-column>\n <ch-tabular-grid-column\n class=\"tabular-grid-column\"\n columnId=\"enabled\"\n settingable={false}\n columnName={this.#_componentLocale.actions.enabledCheckbox}\n ></ch-tabular-grid-column>\n <ch-tabular-grid-column\n class=\"tabular-grid-column\"\n columnId=\"required\"\n settingable={false}\n columnName={this.#_componentLocale.actions.requiredCheckbox}\n ></ch-tabular-grid-column>\n </ch-tabular-grid-columnset>\n\n <ch-tabular-grid-row\n // read\n class=\"tabular-grid-row\"\n rowid=\"read\"\n >\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {this.#_componentLocale.actions.readLabel}\n </ch-tabular-grid-cell>\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n <ch-checkbox\n class=\"checkbox\"\n checkedValue={CHECKED_VALUE}\n value={this.selectedDocument?.readEnabled.toString()}\n ref={el =>\n (this.#readEnabledCheckboxEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n </ch-tabular-grid-cell>\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n <ch-checkbox\n class=\"checkbox\"\n checkedValue={CHECKED_VALUE}\n value={this.selectedDocument?.readRequired.toString()}\n ref={el =>\n (this.#readRequiredCheckboxEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n </ch-tabular-grid-cell>\n </ch-tabular-grid-row>\n\n <ch-tabular-grid-row\n // new\n class=\"tabular-grid-row\"\n rowid=\"read\"\n >\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {this.#_componentLocale.actions.newLabel}\n </ch-tabular-grid-cell>\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n <ch-checkbox\n class=\"checkbox\"\n checkedValue={CHECKED_VALUE}\n value={this.selectedDocument?.newEnabled.toString()}\n ref={el =>\n (this.#newEnabledCheckboxEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n </ch-tabular-grid-cell>\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n <ch-checkbox\n class=\"checkbox\"\n checkedValue={CHECKED_VALUE}\n value={this.selectedDocument?.newRequired.toString()}\n ref={el =>\n (this.#newRequiredCheckboxEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n </ch-tabular-grid-cell>\n </ch-tabular-grid-row>\n\n <ch-tabular-grid-row\n // update\n class=\"tabular-grid-row\"\n rowid=\"read\"\n >\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {this.#_componentLocale.actions.updateLabel}\n </ch-tabular-grid-cell>\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n <ch-checkbox\n class=\"checkbox\"\n checkedValue={CHECKED_VALUE}\n value={this.selectedDocument?.updateEnabled.toString()}\n ref={el =>\n (this.#updateEnabledCheckboxEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n </ch-tabular-grid-cell>\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n <ch-checkbox\n class=\"checkbox\"\n checkedValue={CHECKED_VALUE}\n value={this.selectedDocument?.updateRequired.toString()}\n ref={el =>\n (this.#updateRequiredCheckboxEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n </ch-tabular-grid-cell>\n </ch-tabular-grid-row>\n\n <ch-tabular-grid-row\n // delete\n class=\"tabular-grid-row\"\n rowid=\"read\"\n >\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {this.#_componentLocale.actions.deleteLabel}\n </ch-tabular-grid-cell>\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n <ch-checkbox\n class=\"checkbox\"\n checkedValue={CHECKED_VALUE}\n value={this.selectedDocument?.deleteEnabled.toString()}\n ref={el =>\n (this.#deleteEnabledCheckboxEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n </ch-tabular-grid-cell>\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n <ch-checkbox\n class=\"checkbox\"\n checkedValue={CHECKED_VALUE}\n value={this.selectedDocument?.deleteRequired.toString()}\n ref={el =>\n (this.#deleteRequiredCheckboxEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n </ch-tabular-grid-cell>\n </ch-tabular-grid-row>\n </ch-tabular-grid>\n );\n };\n\n #renderEmptyState = () => {\n return (\n <gx-ide-empty-state\n class=\"recent-objects__empty-state\"\n stateIconSrc={MODULE_ICON}\n isAnimated={this.#renderedFirstTime}\n stateTitle={this.#_componentLocale.emptyRightPanelInfo.title}\n >\n <button\n class=\"button-secondary\"\n onClick={this.#selectDocumentCallbackHandler}\n >\n {this.#_componentLocale.emptyRightPanelInfo.buttonCaption}\n </button>\n </gx-ide-empty-state>\n );\n };\n\n #renderFooter = () => {\n return (\n <footer class=\"footer control-footer control-footer-with-border spacing-body-block-end spacing-body-inline\">\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n id=\"button-cancel\"\n onClick={this.#cancelCallbackHandler}\n part=\"button-cancel\"\n >\n {this.#_componentLocale.footer.cancelButton}\n </button>\n <button\n class=\"button-primary\"\n id=\"button-create\"\n onClick={this.#confirmCallbackHandler}\n part=\"button-create\"\n >\n {this.#_componentLocale.footer.confirmButton}\n </button>\n </div>\n </footer>\n );\n };\n\n #renderMain = () => {\n return [\n <div class=\"documents__list spacing-body-inline\">\n <ch-action-list-render\n selection=\"single\"\n class=\"list-box\"\n model={this.documentsActionListState}\n onSelectedItemsChange={this.#objectSelectionChangedHandler}\n ></ch-action-list-render>\n </div>,\n this.#renderActions()\n ];\n };\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.#chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n <section class=\"section\">\n <div class=\"main field-group\">\n <div class=\"documents__header buttons-spacer spacing-body-inline spacing-body-block-start\">\n <ch-combo-box-render\n class=\"combo-box documents__suggest\"\n model={this.suggestedDocuments}\n placeholder={\n this.#_componentLocale.documents.suggestPlaceholder\n }\n suggest={true}\n onInput={this.#documentSuggestValueChangedHandler}\n onChange={this.#listenDocumentSelected}\n suggestOptions={{\n alreadyProcessed: false,\n autoExpand: true,\n hideMatchesAndShowNonMatches: false,\n highlightMatchedItems: false,\n matchCase: false,\n regularExpression: false,\n strict: false\n }}\n ></ch-combo-box-render>\n\n <span>\n <button\n class=\"button-tertiary button-icon-only\"\n aria-label={\n this.#_componentLocale.documents.addDocumentButtonLabel\n }\n title={\n this.#_componentLocale.documents.addDocumentButtonLabel\n }\n onClick={this.#selectDocumentCallbackHandler}\n >\n <ch-image class=\"icon-sm\" src={MORE_ICON}></ch-image>\n </button>\n\n <button\n class=\"button-tertiary button-icon-only\"\n aria-label={\n this.#_componentLocale.documents.clearDocumentButtonLabel\n }\n title={\n this.#_componentLocale.documents.clearDocumentButtonLabel\n }\n onClick={this.#handleDeleteButton}\n >\n <ch-image class=\"icon-sm\" src={DELETE_ICON}></ch-image>\n </button>\n </span>\n </div>\n\n {this.documentsActionListState.length\n ? this.#renderMain()\n : this.#renderEmptyState()}\n </div>\n {this.#renderFooter()}\n </section>\n </Host>\n );\n }\n}\n\nexport type TaskDocumentData = {\n name: string;\n readEnabled: boolean;\n readRequired: boolean;\n newEnabled: boolean;\n newRequired: boolean;\n updateEnabled: boolean;\n updateRequired: boolean;\n deleteEnabled: boolean;\n deleteRequired: boolean;\n};\n\nexport type SuggestDocumentsCallback = (\n documentName: string\n) => Promise<string[] | undefined>;\nexport type SelectDocumentCallback = () => Promise<string | undefined>;\nexport type ConfirmCallback = (data: TaskDocumentData[]) => Promise<void>;\nexport type CancelCallback = () => Promise<void>;\n"],"mappings":";;;;;;;;AAIO,MAAMA,qCAAqC,CAChDC,GACAC;EAEA,MAAMC,IAA6C;EACnDF,MAAO,QAAPA,WAAO,aAAPA,EAASG,SAAQ,CAACC,GAAQC;IACxB,MAAMC,IAAS,QAAQF,EAAOG;IAC9B,MAAMC,IAAYJ,EAAOG;IACzBL,EAAoBO,KAAK;MACvBC,IAAIJ;MACJK,SAASH;MACTI,UAAUX,IACNA,EAAiBM,SAASH,EAAOG,OACjCF,MAAU;MACdQ,MAAM;;AACN;EAEJ,OAAOX;AAAmB;;;;;GAQrB,OAAMY,0CACXC;EAEA,MAAMC,IAAoC;EAC1C,IAAID,EAAmBE,QAAQ;IAC7BF,EAAmBZ,SAASe;MAC1B,MAAMC,IAAiC;QACrCC,OAAOF;QACPP,SAASO;;MAEXF,EAAaP,KAAKU;AAAY;;EAGlC,OAAOH;AAAY;;AC1CrB,MAAMK,IAAmB;;;;;;;;;;;;;;;;;ACsBzB,MAAMC,IAAgB;;AACtB,MAAMC,IAA8B,EAClC,qBACA,uBACA,2BACA,oBACA,gBACA,iBACA;;AAEF,MAAMC,IAAcC,EAAY;EAC9BC,UAAU;EACVnB,MAAM;;;AAER,MAAMoB,IAAYF,EAAY;EAC5BC,UAAU;EACVnB,MAAM;EACNqB,WAAW;;;AAEb,MAAMC,IAAcJ,EAAY;EAC9BC,UAAU;EACVnB,MAAM;EACNqB,WAAW;;;AAGb,MAAME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AAY,KACZjB,KAAKiB,WACR;MACE5C,MAAM2E;MACNkC,eAAe;MACfE,gBAAgB;MAChBZ,YAAY;MACZE,aAAa;MACbV,aAAa;MACbK,cAAc;MACdQ,eAAe;MACfE,gBAAgB;;IAGpBlD,EAAA7B,MAAI8B,GAAA,KAAiCC,KAArC/B;;AAEJ,GAACkH,IAAA,SAAAA;EAwBC,MAAM6B,IAAyB;IAC7B1K,MAAM2B,KAAKjC,iBAAiBM;IAC5B2F,aAAanC,EAAA7B,MAAIS,GAAA,KAAwBvB,UAAUE;IACnDiF,cAAcxC,EAAA7B,MAAIU,GAAA,KAAyBxB,UAAUE;IACrDoF,YAAY3C,EAAA7B,MAAIO,GAAA,KAAuBrB,UAAUE;IACjDsF,aAAa7C,EAAA7B,MAAIQ,GAAA,KAAwBtB,UAAUE;IACnDyF,eAAehD,EAAA7B,MAAIW,GAAA,KAA0BzB,UAAUE;IACvD2F,gBAAgBlD,EAAA7B,MAAIY,GAAA,KAA2B1B,UAAUE;IACzD8F,eAAerD,EAAA7B,MAAIK,GAAA,KAA0BnB,UAAUE;IACvDgG,gBAAgBvD,EAAA7B,MAAIM,GAAA,KAA2BpB,UAAUE;;EAG3DY,KAAKjC,mBAAmBgL;EAExB/I,KAAKiB,YAAYjB,KAAKiB,UAAU+H,KAAIpH,KAClCA,EAAIvD,SAAS2B,KAAKjC,iBAAiBM,OAAO2B,KAAKjC,mBAAmB6D;AAEtE"}
@@ -0,0 +1,136 @@
1
+ import { r as t, g as e, h as s, H as i, a as o } from "./p-25a9f1d7.js";
2
+
3
+ import { L as a } from "./p-311eedf3.js";
4
+
5
+ const mapTypesToComboBoxItemModel = t => {
6
+ const e = [];
7
+ t.forEach((t => {
8
+ const s = {
9
+ value: t.value,
10
+ caption: t.caption
11
+ };
12
+ e.push(s);
13
+ }));
14
+ return e;
15
+ };
16
+
17
+ const n = ":host{display:grid;block-size:100%;overflow:hidden;grid-template-rows:1fr max-content}";
18
+
19
+ var r = undefined && undefined.__classPrivateFieldGet || function(t, e, s, i) {
20
+ if (s === "a" && !i) throw new TypeError("Private accessor was defined without a getter");
21
+ 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");
22
+ return s === "m" ? i : s === "a" ? i.call(t) : i ? i.value : e.get(t);
23
+ };
24
+
25
+ var c = undefined && undefined.__classPrivateFieldSet || function(t, e, s, i, o) {
26
+ if (i === "m") throw new TypeError("Private method is not writable");
27
+ if (i === "a" && !o) throw new TypeError("Private accessor was defined without a setter");
28
+ if (typeof e === "function" ? t !== e || !o : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
29
+ return i === "a" ? o.call(t, s) : o ? o.value = s : e.set(t, s), s;
30
+ };
31
+
32
+ var h, l, d, f, p, u, b, m, w;
33
+
34
+ const y = [ "resets/box-sizing", "components/tooltip", "utils/form--full", "utils/layout", "utils/typography", "utils/spacing", "chameleon/scrollbar" ];
35
+
36
+ const v = class {
37
+ constructor(i) {
38
+ t(this, i);
39
+ h.set(this, void 0);
40
+ l.set(this, e(`./gx-ide-assets/bpm-sync-gam-roles/shortcuts.json`));
41
+ d.set(this, []);
42
+ f.set(this, void 0);
43
+ p.set(this, void 0);
44
+ u.set(this, void 0);
45
+ b.set(this, (() => {
46
+ if (this.cancelCallback) {
47
+ this.cancelCallback();
48
+ }
49
+ }));
50
+ m.set(this, (async () => {
51
+ var t;
52
+ if (this.saveCallback) {
53
+ const e = {
54
+ automaticBackup: !!((t = r(this, f, "f")) === null || t === void 0 ? void 0 : t.value),
55
+ syncType: r(this, u, "f").value
56
+ };
57
+ await this.saveCallback(e);
58
+ }
59
+ }));
60
+ w.set(this, (() => s("footer", {
61
+ class: "control-footer control-footer-with-border spacing-body-block-end spacing-body-inline"
62
+ }, s("div", {
63
+ class: "buttons-spacer"
64
+ }, s("button", {
65
+ class: "button-secondary",
66
+ id: "button-cancel",
67
+ onClick: r(this, b, "f"),
68
+ part: "button-cancel"
69
+ }, r(this, h, "f").footer.cancelButtonText), s("button", {
70
+ class: "button-primary",
71
+ id: "button-create",
72
+ onClick: r(this, m, "f"),
73
+ part: "button-ok"
74
+ }, r(this, h, "f").footer.okButtonText)))));
75
+ this.cancelCallback = undefined;
76
+ this.saveCallback = undefined;
77
+ }
78
+ async componentWillLoad() {
79
+ c(this, h, await a.getComponentStrings(this.el), "f");
80
+ c(this, d, mapTypesToComboBoxItemModel(r(this, h, "f").main.synchronizationTypeOptions), "f");
81
+ }
82
+ /**
83
+ * Suspends or reactivates the shortcuts
84
+ */ async suspendShortcuts(t) {
85
+ if (t) {
86
+ r(this, p, "f").suspend = true;
87
+ } else {
88
+ r(this, p, "f").suspend = false;
89
+ }
90
+ }
91
+ render() {
92
+ return s(i, {
93
+ class: "widget"
94
+ }, s("ch-theme", {
95
+ model: y
96
+ }), s("ch-shortcuts", {
97
+ src: r(this, l, "f"),
98
+ ref: t => c(this, p, t, "f")
99
+ }), s("section", {
100
+ class: "section spacing-body"
101
+ }, s("div", {
102
+ class: "main field-group"
103
+ }, s("div", {
104
+ class: "field field-block"
105
+ }, s("label", {
106
+ class: "label",
107
+ htmlFor: "synch-type"
108
+ }, r(this, h, "f").main.synchronizationTypeLabel), s("ch-combo-box-render", {
109
+ accessibleName: "Synchronization types",
110
+ class: "combo-box",
111
+ id: "synch-type",
112
+ value: r(this, d, "f")[0].caption,
113
+ model: r(this, d, "f"),
114
+ ref: t => c(this, u, t, "f")
115
+ })), s("ch-checkbox", {
116
+ class: "checkbox",
117
+ caption: r(this, h, "f").main.checkBoxLabel,
118
+ checkedValue: "true",
119
+ ref: t => c(this, f, t, "f")
120
+ }))), r(this, w, "f").call(this));
121
+ }
122
+ static get assetsDirs() {
123
+ return [ "gx-ide-assets/bpm-sync-gam-roles" ];
124
+ }
125
+ get el() {
126
+ return o(this);
127
+ }
128
+ };
129
+
130
+ h = new WeakMap, l = new WeakMap, d = new WeakMap, f = new WeakMap, p = new WeakMap,
131
+ u = new WeakMap, b = new WeakMap, m = new WeakMap, w = new WeakMap;
132
+
133
+ v.style = n;
134
+
135
+ export { v as gx_ide_bpm_sync_gam_roles };
136
+ //# sourceMappingURL=p-ded7444c.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["mapTypesToComboBoxItemModel","synchronizationTypes","syncTypes","forEach","synchronizationType","newSynchType","value","caption","push","bpmSyncGamRolesCss","CSS_BUNDLES","GxIdeBpmSyncGamRoles","_GxIdeBpmSyncGamRoles__componentLocale","set","this","_GxIdeBpmSyncGamRoles_shortcutsSrc","getAssetPath","_GxIdeBpmSyncGamRoles_synchronizationTypes","_GxIdeBpmSyncGamRoles_automaticBackupCheckBoxEl","_GxIdeBpmSyncGamRoles_chShortcutsEl","_GxIdeBpmSyncGamRoles_synchTypeComboBoxEl","_GxIdeBpmSyncGamRoles_cancelButtonHandler","cancelCallback","_GxIdeBpmSyncGamRoles_okButtonHandler","async","saveCallback","syncData","automaticBackup","_a","__classPrivateFieldGet","syncType","_GxIdeBpmSyncGamRoles_renderFooter","h","class","id","onClick","part","footer","cancelButtonText","okButtonText","componentWillLoad","__classPrivateFieldSet","Locale","getComponentStrings","el","main","synchronizationTypeOptions","suspendShortcuts","suspend","render","Host","model","src","ref","htmlFor","synchronizationTypeLabel","accessibleName","checkBoxLabel","checkedValue","call"],"sources":["src/components/bpm/sync-gam-roles/helpers.tsx","src/components/bpm/sync-gam-roles/bpm-sync-gam-roles.scss?tag=gx-ide-bpm-sync-gam-roles&encapsulation=shadow","src/components/bpm/sync-gam-roles/bpm-sync-gam-roles.tsx"],"sourcesContent":["import { ComboBoxItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/combo-box/types\";\n\nexport const mapTypesToComboBoxItemModel = (\n synchronizationTypes: any[]\n): ComboBoxItemModel[] => {\n const syncTypes: ComboBoxItemModel[] = [];\n\n synchronizationTypes.forEach(synchronizationType => {\n const newSynchType: ComboBoxItemModel = {\n value: synchronizationType.value,\n caption: synchronizationType.caption\n };\n syncTypes.push(newSynchType);\n });\n return syncTypes;\n};\n",":host {\n display: grid;\n block-size: 100%;\n overflow: hidden;\n grid-template-rows: 1fr max-content;\n}\n","import {\n Component,\n Host,\n h,\n Element,\n getAssetPath,\n Method,\n Prop\n} from \"@stencil/core\";\nimport { Locale } from \"../../../common/locale\";\nimport { MercuryBundles } from \"@genexus/mercury\";\nimport { ComboBoxItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/combo-box/types\";\nimport { mapTypesToComboBoxItemModel } from \"./helpers\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/tooltip\",\n \"utils/form--full\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\n@Component({\n tag: \"gx-ide-bpm-sync-gam-roles\",\n styleUrl: \"bpm-sync-gam-roles.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/bpm-sync-gam-roles\"]\n})\nexport class GxIdeBpmSyncGamRoles {\n #_componentLocale: any;\n #shortcutsSrc = getAssetPath(\n `./gx-ide-assets/bpm-sync-gam-roles/shortcuts.json`\n );\n #synchronizationTypes: ComboBoxItemModel[] = [];\n\n @Element() el: HTMLGxIdeBpmSyncGamRolesElement;\n #automaticBackupCheckBoxEl: HTMLChCheckboxElement;\n #chShortcutsEl: HTMLChShortcutsElement;\n #synchTypeComboBoxEl: HTMLChComboBoxRenderElement;\n\n async componentWillLoad() {\n this.#_componentLocale = await Locale.getComponentStrings(this.el);\n this.#synchronizationTypes = mapTypesToComboBoxItemModel(\n this.#_componentLocale.main.synchronizationTypeOptions\n );\n }\n\n /**\n * Callback invoked when the user press the 'Cancel' button\n */\n @Prop() readonly cancelCallback: () => Promise<void>;\n\n /**\n * Callback invoked when the user press the 'Ok' button\n */\n @Prop() readonly saveCallback: (syncData: SyncData) => Promise<boolean>;\n\n /**\n * Suspends or reactivates the shortcuts\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n if (suspendShortcuts) {\n this.#chShortcutsEl.suspend = true;\n } else {\n this.#chShortcutsEl.suspend = false;\n }\n }\n\n #cancelButtonHandler = () => {\n if (this.cancelCallback) {\n this.cancelCallback();\n }\n };\n #okButtonHandler = async () => {\n if (this.saveCallback) {\n const syncData: SyncData = {\n automaticBackup: !!this.#automaticBackupCheckBoxEl?.value,\n syncType: this.#synchTypeComboBoxEl.value as SyncType\n };\n\n await this.saveCallback(syncData);\n }\n };\n\n #renderFooter = () => {\n return (\n <footer class=\"control-footer control-footer-with-border spacing-body-block-end spacing-body-inline\">\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n id=\"button-cancel\"\n onClick={this.#cancelButtonHandler}\n part=\"button-cancel\"\n >\n {this.#_componentLocale.footer.cancelButtonText}\n </button>\n <button\n class=\"button-primary\"\n id=\"button-create\"\n onClick={this.#okButtonHandler}\n part=\"button-ok\"\n >\n {this.#_componentLocale.footer.okButtonText}\n </button>\n </div>\n </footer>\n );\n };\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.#chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n <section class=\"section spacing-body\">\n <div class=\"main field-group\">\n <div class=\"field field-block\">\n <label class=\"label\" htmlFor=\"synch-type\">\n {this.#_componentLocale.main.synchronizationTypeLabel}\n </label>\n <ch-combo-box-render\n accessibleName=\"Synchronization types\"\n class=\"combo-box\"\n id=\"synch-type\"\n value={this.#synchronizationTypes[0].caption}\n model={this.#synchronizationTypes}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#synchTypeComboBoxEl =\n el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n </div>\n\n <ch-checkbox\n class=\"checkbox\"\n caption={this.#_componentLocale.main.checkBoxLabel}\n checkedValue=\"true\"\n ref={(el: HTMLChCheckboxElement) =>\n (this.#automaticBackupCheckBoxEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n </div>\n </section>\n {this.#renderFooter()}\n </Host>\n );\n }\n}\n\nexport type SyncType = \"From GAM\" | \"To GAM\" | \"Both\";\n\nexport type SyncData = {\n syncType: SyncType;\n automaticBackup: boolean;\n};\n"],"mappings":";;;;AAEO,MAAMA,8BACXC;EAEA,MAAMC,IAAiC;EAEvCD,EAAqBE,SAAQC;IAC3B,MAAMC,IAAkC;MACtCC,OAAOF,EAAoBE;MAC3BC,SAASH,EAAoBG;;IAE/BL,EAAUM,KAAKH;AAAa;EAE9B,OAAOH;AAAS;;ACdlB,MAAMO,IAAqB;;;;;;;;;;;;;;;;;ACc3B,MAAMC,IAA8B,EAClC,qBACA,sBACA,oBACA,gBACA,oBACA,iBACA;;MASWC,IAAoB;;;IAC/BC,EAAAC,IAAAC,WAAA;IACAC,EAAAF,IAAAC,MAAgBE,EACd;IAEFC,EAAAJ,IAAAC,MAA6C;IAG7CI,EAAAL,IAAAC,WAAA;IACAK,EAAAN,IAAAC,WAAA;IACAM,EAAAP,IAAAC,WAAA;IA+BAO,EAAAR,IAAAC,OAAuB;MACrB,IAAIA,KAAKQ,gBAAgB;QACvBR,KAAKQ;;;IAGTC,EAAAV,IAAAC,OAAmBU;;MACjB,IAAIV,KAAKW,cAAc;QACrB,MAAMC,IAAqB;UACzBC,qBAAmBC,IAAAC,EAAAf,MAAII,GAAA,UAA2B,QAAAU,WAAA,aAAAA,EAAEtB;UACpDwB,UAAUD,EAAAf,MAAIM,GAAA,KAAsBd;;cAGhCQ,KAAKW,aAAaC;;;IAI5BK,EAAAlB,IAAAC,OAAgB,MAEZkB,EAAA;MAAQC,OAAM;OACZD,EAAA;MAAKC,OAAM;OACTD,EAAA;MACEC,OAAM;MACNC,IAAG;MACHC,SAASN,EAAAf,MAAIO,GAAA;MACbe,MAAK;OAEJP,EAAAf,MAAIF,GAAA,KAAmByB,OAAOC,mBAEjCN,EAAA;MACEC,OAAM;MACNC,IAAG;MACHC,SAAS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