@genexus/genexus-ide-ui 1.0.72 → 1.0.73

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 (35) hide show
  1. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  2. package/dist/cjs/gx-ide-bpm-task-documents.cjs.entry.js +282 -0
  3. package/dist/cjs/gx-ide-bpm-task-documents.cjs.entry.js.map +1 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/collection/collection-manifest.json +1 -0
  6. package/dist/collection/components/bpm/task-documents/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.en.json +23 -0
  7. package/dist/collection/components/bpm/task-documents/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.ja.json +23 -0
  8. package/dist/collection/components/bpm/task-documents/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.zh.json +23 -0
  9. package/dist/collection/components/bpm/task-documents/gx-ide-assets/bpm-task-documents/shortcuts.json +15 -0
  10. package/dist/collection/components/bpm/task-documents/helpers.js +34 -0
  11. package/dist/collection/components/bpm/task-documents/helpers.js.map +1 -0
  12. package/dist/collection/components/bpm/task-documents/task-documents.css +26 -0
  13. package/dist/collection/components/bpm/task-documents/task-documents.js +440 -0
  14. package/dist/collection/components/bpm/task-documents/task-documents.js.map +1 -0
  15. package/dist/collection/testing/locale.e2e.js +1 -0
  16. package/dist/collection/testing/locale.e2e.js.map +1 -1
  17. package/dist/components/gx-ide-bpm-task-documents.d.ts +11 -0
  18. package/dist/components/gx-ide-bpm-task-documents.js +313 -0
  19. package/dist/components/gx-ide-bpm-task-documents.js.map +1 -0
  20. package/dist/esm/genexus-ide-ui.js +1 -1
  21. package/dist/esm/gx-ide-bpm-task-documents.entry.js +278 -0
  22. package/dist/esm/gx-ide-bpm-task-documents.entry.js.map +1 -0
  23. package/dist/esm/loader.js +1 -1
  24. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  25. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  26. package/dist/genexus-ide-ui/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.en.json +23 -0
  27. package/dist/genexus-ide-ui/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.ja.json +23 -0
  28. package/dist/genexus-ide-ui/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.zh.json +23 -0
  29. package/dist/genexus-ide-ui/gx-ide-assets/bpm-task-documents/shortcuts.json +15 -0
  30. package/dist/genexus-ide-ui/p-a3361024.entry.js +419 -0
  31. package/dist/genexus-ide-ui/p-a3361024.entry.js.map +1 -0
  32. package/dist/types/components/bpm/task-documents/helpers.d.ts +8 -0
  33. package/dist/types/components/bpm/task-documents/task-documents.d.ts +71 -0
  34. package/dist/types/components.d.ts +150 -62
  35. 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,IAAW;;MAOJC,IAAqB;;;;;IAChCC,EAAAC,IAAAC,WAAA;IACAC,EAAAF,IAAAC,MAAqB;IACrBE,EAAAH,IAAAC,MAAgBG,EACd;IAKFC,EAAAL,IAAAC,WAAA;IACAK,EAAAN,IAAAC,WAAA;IACAM,EAAAP,IAAAC,WAAA;IAEAO,EAAAR,IAAAC,WAAA;IAC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wBC,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,8 @@
1
+ import { TaskDocumentData } from "./task-documents";
2
+ import { ActionListItemModel } from "@genexus/chameleon-controls-library/dist/types/components/action-list/types";
3
+ import { ComboBoxItemModel } from "@genexus/chameleon-controls-library/dist/types/components/combo-box/types";
4
+ export declare const taskDocumentsToActionListItemModel: (objects: TaskDocumentData[], selectedDocument?: TaskDocumentData) => ActionListItemModel[];
5
+ /**
6
+ * @description This function converts string[] to ComboBoxItemModel[]
7
+ */
8
+ export declare const convertSuggestedDocumentsToSuggestItems: (suggestedDocuments: string[]) => ComboBoxItemModel[];
@@ -0,0 +1,71 @@
1
+ import { EventEmitter } from "../../../stencil-public-runtime";
2
+ import { ActionListItemModel } from "@genexus/chameleon-controls-library/dist/types/components/action-list/types";
3
+ import { ComboBoxItemModel } from "@genexus/chameleon-controls-library/dist/types/components/combo-box/types";
4
+ export declare class GxIdeBpmTaskDocuments {
5
+ #private;
6
+ el: HTMLGxIdeBpmTaskDocumentsElement;
7
+ /**
8
+ * Documents state for the action list
9
+ */
10
+ documentsActionListState: ActionListItemModel[];
11
+ documentName: string;
12
+ /**
13
+ * Document selected in the action list
14
+ */
15
+ selectedDocument: TaskDocumentData;
16
+ /**
17
+ * Possible suggestions for the documents
18
+ */
19
+ suggestedDocuments: ComboBoxItemModel[];
20
+ /**
21
+ * @property documents
22
+ * @description The current value of the documents for the task
23
+ */
24
+ documents: TaskDocumentData[];
25
+ /**
26
+ * @property cancelCallback
27
+ * @description Callback invoked when the user cancels the application declaration (Cancel button)
28
+ */
29
+ readonly cancelCallback: CancelCallback;
30
+ /**
31
+ * @property confirmCallback
32
+ * @description Callback invoked when the user confirms the application declaration (Ok button)
33
+ */
34
+ readonly confirmCallback: ConfirmCallback;
35
+ /**
36
+ * @property selectDocumentCallback
37
+ * @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.
38
+ */
39
+ readonly selectDocumentCallback: SelectDocumentCallback;
40
+ /**
41
+ * @property suggestDocumentsCallback
42
+ * @description Callback that must be called to obtain options for the document input.
43
+ */
44
+ readonly suggestDocumentsCallback: SuggestDocumentsCallback;
45
+ /**
46
+ * @description Gets fired when the component has rendered for the first time.
47
+ */
48
+ componentDidRenderFirstTime: EventEmitter<string>;
49
+ componentWillLoad(): Promise<void>;
50
+ componentDidRender(): void;
51
+ /**
52
+ * Suspends or reactivates the shortcuts
53
+ */
54
+ suspendShortcuts(suspendShortcuts: boolean): Promise<void>;
55
+ render(): any;
56
+ }
57
+ export type TaskDocumentData = {
58
+ name: string;
59
+ readEnabled: boolean;
60
+ readRequired: boolean;
61
+ newEnabled: boolean;
62
+ newRequired: boolean;
63
+ updateEnabled: boolean;
64
+ updateRequired: boolean;
65
+ deleteEnabled: boolean;
66
+ deleteRequired: boolean;
67
+ };
68
+ export type SuggestDocumentsCallback = (documentName: string) => Promise<string[] | undefined>;
69
+ export type SelectDocumentCallback = () => Promise<string | undefined>;
70
+ export type ConfirmCallback = (data: TaskDocumentData[]) => Promise<void>;
71
+ export type CancelCallback = () => Promise<void>;