@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.
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-bpm-task-documents.cjs.entry.js +282 -0
- package/dist/cjs/gx-ide-bpm-task-documents.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/bpm/task-documents/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.en.json +23 -0
- package/dist/collection/components/bpm/task-documents/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.ja.json +23 -0
- package/dist/collection/components/bpm/task-documents/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.zh.json +23 -0
- package/dist/collection/components/bpm/task-documents/gx-ide-assets/bpm-task-documents/shortcuts.json +15 -0
- package/dist/collection/components/bpm/task-documents/helpers.js +34 -0
- package/dist/collection/components/bpm/task-documents/helpers.js.map +1 -0
- package/dist/collection/components/bpm/task-documents/task-documents.css +26 -0
- package/dist/collection/components/bpm/task-documents/task-documents.js +440 -0
- package/dist/collection/components/bpm/task-documents/task-documents.js.map +1 -0
- package/dist/collection/testing/locale.e2e.js +1 -0
- package/dist/collection/testing/locale.e2e.js.map +1 -1
- package/dist/components/gx-ide-bpm-task-documents.d.ts +11 -0
- package/dist/components/gx-ide-bpm-task-documents.js +313 -0
- package/dist/components/gx-ide-bpm-task-documents.js.map +1 -0
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-bpm-task-documents.entry.js +278 -0
- package/dist/esm/gx-ide-bpm-task-documents.entry.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.en.json +23 -0
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.ja.json +23 -0
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.zh.json +23 -0
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-task-documents/shortcuts.json +15 -0
- package/dist/genexus-ide-ui/p-a3361024.entry.js +419 -0
- package/dist/genexus-ide-ui/p-a3361024.entry.js.map +1 -0
- package/dist/types/components/bpm/task-documents/helpers.d.ts +8 -0
- package/dist/types/components/bpm/task-documents/task-documents.d.ts +71 -0
- package/dist/types/components.d.ts +150 -62
- package/package.json +1 -1
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f)
|
|
3
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
5
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
6
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
9
|
+
if (kind === "m")
|
|
10
|
+
throw new TypeError("Private method is not writable");
|
|
11
|
+
if (kind === "a" && !f)
|
|
12
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
14
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
16
|
+
};
|
|
17
|
+
var _GxIdeBpmTaskDocuments_instances, _GxIdeBpmTaskDocuments__componentLocale, _GxIdeBpmTaskDocuments_renderedFirstTime, _GxIdeBpmTaskDocuments_shortcutsSrc, _GxIdeBpmTaskDocuments_chShortcutsEl, _GxIdeBpmTaskDocuments_deleteEnabledCheckboxEl, _GxIdeBpmTaskDocuments_deleteRequiredCheckboxEl, _GxIdeBpmTaskDocuments_newEnabledCheckboxEl, _GxIdeBpmTaskDocuments_newRequiredCheckboxEl, _GxIdeBpmTaskDocuments_readEnabledCheckboxEl, _GxIdeBpmTaskDocuments_readRequiredCheckboxEl, _GxIdeBpmTaskDocuments_updateEnabledCheckboxEl, _GxIdeBpmTaskDocuments_updateRequiredCheckboxEl, _GxIdeBpmTaskDocuments_getAllCheckboxes, _GxIdeBpmTaskDocuments_addDocument, _GxIdeBpmTaskDocuments_cancelCallbackHandler, _GxIdeBpmTaskDocuments_confirmCallbackHandler, _GxIdeBpmTaskDocuments_documentSuggestValueChangedHandler, _GxIdeBpmTaskDocuments_handleCheckboxChange, _GxIdeBpmTaskDocuments_handleDeleteButton, _GxIdeBpmTaskDocuments_listenDocumentSelected, _GxIdeBpmTaskDocuments_objectSelectionChangedHandler, _GxIdeBpmTaskDocuments_refreshDocumentsActionListState, _GxIdeBpmTaskDocuments_selectDocumentCallbackHandler, _GxIdeBpmTaskDocuments_renderActions, _GxIdeBpmTaskDocuments_renderEmptyState, _GxIdeBpmTaskDocuments_renderFooter, _GxIdeBpmTaskDocuments_renderMain;
|
|
18
|
+
import { Host, h, getAssetPath } from "@stencil/core";
|
|
19
|
+
import { Locale } from "../../../common/locale";
|
|
20
|
+
import { convertSuggestedDocumentsToSuggestItems, taskDocumentsToActionListItemModel } from "./helpers";
|
|
21
|
+
import { getIconPath } from "@genexus/mercury";
|
|
22
|
+
const CHECKED_VALUE = "true";
|
|
23
|
+
const CSS_BUNDLES = [
|
|
24
|
+
"resets/box-sizing",
|
|
25
|
+
"components/list-box",
|
|
26
|
+
"components/tabular-grid",
|
|
27
|
+
"utils/form--full",
|
|
28
|
+
"utils/layout",
|
|
29
|
+
"utils/spacing",
|
|
30
|
+
"chameleon/scrollbar"
|
|
31
|
+
];
|
|
32
|
+
const MODULE_ICON = getIconPath({
|
|
33
|
+
category: "objects",
|
|
34
|
+
name: "module"
|
|
35
|
+
});
|
|
36
|
+
const MORE_ICON = getIconPath({
|
|
37
|
+
category: "gemini-tools",
|
|
38
|
+
name: "show-more-horizontal",
|
|
39
|
+
colorType: "primary"
|
|
40
|
+
});
|
|
41
|
+
const DELETE_ICON = getIconPath({
|
|
42
|
+
category: "menus",
|
|
43
|
+
name: "delete",
|
|
44
|
+
colorType: "primary"
|
|
45
|
+
});
|
|
46
|
+
const NODENAME = "CH-CHECKBOX";
|
|
47
|
+
export class GxIdeBpmTaskDocuments {
|
|
48
|
+
constructor() {
|
|
49
|
+
_GxIdeBpmTaskDocuments_instances.add(this);
|
|
50
|
+
_GxIdeBpmTaskDocuments__componentLocale.set(this, void 0);
|
|
51
|
+
_GxIdeBpmTaskDocuments_renderedFirstTime.set(this, false);
|
|
52
|
+
_GxIdeBpmTaskDocuments_shortcutsSrc.set(this, getAssetPath(`./gx-ide-assets/bpm-task-documents/shortcuts.json`));
|
|
53
|
+
_GxIdeBpmTaskDocuments_chShortcutsEl.set(this, void 0);
|
|
54
|
+
_GxIdeBpmTaskDocuments_deleteEnabledCheckboxEl.set(this, void 0);
|
|
55
|
+
_GxIdeBpmTaskDocuments_deleteRequiredCheckboxEl.set(this, void 0);
|
|
56
|
+
_GxIdeBpmTaskDocuments_newEnabledCheckboxEl.set(this, void 0);
|
|
57
|
+
_GxIdeBpmTaskDocuments_newRequiredCheckboxEl.set(this, void 0);
|
|
58
|
+
_GxIdeBpmTaskDocuments_readEnabledCheckboxEl.set(this, void 0);
|
|
59
|
+
_GxIdeBpmTaskDocuments_readRequiredCheckboxEl.set(this, void 0);
|
|
60
|
+
_GxIdeBpmTaskDocuments_updateEnabledCheckboxEl.set(this, void 0);
|
|
61
|
+
_GxIdeBpmTaskDocuments_updateRequiredCheckboxEl.set(this, void 0);
|
|
62
|
+
_GxIdeBpmTaskDocuments_cancelCallbackHandler.set(this, () => {
|
|
63
|
+
this.cancelCallback();
|
|
64
|
+
});
|
|
65
|
+
_GxIdeBpmTaskDocuments_confirmCallbackHandler.set(this, () => {
|
|
66
|
+
this.confirmCallback(this.documents);
|
|
67
|
+
});
|
|
68
|
+
_GxIdeBpmTaskDocuments_documentSuggestValueChangedHandler.set(this, async (e) => {
|
|
69
|
+
const value = e.detail;
|
|
70
|
+
this.suggestDocumentsCallback(value)
|
|
71
|
+
.then(result => {
|
|
72
|
+
this.suggestedDocuments =
|
|
73
|
+
convertSuggestedDocumentsToSuggestItems(result);
|
|
74
|
+
})
|
|
75
|
+
.catch(() => {
|
|
76
|
+
// to do
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
_GxIdeBpmTaskDocuments_handleDeleteButton.set(this, () => {
|
|
80
|
+
this.documents = this.documents.filter(doc => doc.name !== this.selectedDocument.name);
|
|
81
|
+
this.selectedDocument = null;
|
|
82
|
+
__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_refreshDocumentsActionListState, "f").call(this);
|
|
83
|
+
});
|
|
84
|
+
_GxIdeBpmTaskDocuments_listenDocumentSelected.set(this, async (e) => {
|
|
85
|
+
if (e.detail) {
|
|
86
|
+
__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_instances, "m", _GxIdeBpmTaskDocuments_addDocument).call(this, e.detail);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
_GxIdeBpmTaskDocuments_objectSelectionChangedHandler.set(this, (e) => {
|
|
90
|
+
this.selectedDocument = this.documents.find(doc => { var _a; return doc.name === ((_a = e.detail[0]) === null || _a === void 0 ? void 0 : _a.item.caption); });
|
|
91
|
+
});
|
|
92
|
+
_GxIdeBpmTaskDocuments_refreshDocumentsActionListState.set(this, () => {
|
|
93
|
+
var _a, _b;
|
|
94
|
+
(_a = this.documents) === null || _a === void 0 ? void 0 : _a.sort((a, b) => {
|
|
95
|
+
return a.name.localeCompare(b.name);
|
|
96
|
+
});
|
|
97
|
+
this.documentsActionListState = taskDocumentsToActionListItemModel(this.documents, this.selectedDocument);
|
|
98
|
+
this.selectedDocument =
|
|
99
|
+
this.selectedDocument || ((_b = this.documents) === null || _b === void 0 ? void 0 : _b[0]) || null;
|
|
100
|
+
});
|
|
101
|
+
_GxIdeBpmTaskDocuments_selectDocumentCallbackHandler.set(this, async () => {
|
|
102
|
+
const callbackResult = await this.selectDocumentCallback();
|
|
103
|
+
if (callbackResult) {
|
|
104
|
+
this.documentName = callbackResult;
|
|
105
|
+
__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_instances, "m", _GxIdeBpmTaskDocuments_addDocument).call(this, callbackResult);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
_GxIdeBpmTaskDocuments_renderActions.set(this, () => {
|
|
109
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
110
|
+
return (h("ch-tabular-grid", { class: "tabular-grid scrollable", rowSelectionMode: "none", keyboardNavigationMode: "focus", columnResizeMode: "single" }, h("ch-tabular-grid-columnset", { class: "tabular-grid-column-set" }, h("ch-tabular-grid-column", { class: "tabular-grid-column", columnId: "code", columnName: "", settingable: false }), h("ch-tabular-grid-column", { class: "tabular-grid-column", columnId: "enabled", settingable: false, columnName: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").actions.enabledCheckbox }), h("ch-tabular-grid-column", { class: "tabular-grid-column", columnId: "required", settingable: false, columnName: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").actions.requiredCheckbox })), h("ch-tabular-grid-row", {
|
|
111
|
+
// read
|
|
112
|
+
class: "tabular-grid-row", rowid: "read"
|
|
113
|
+
}, h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").actions.readLabel), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, h("ch-checkbox", { class: "checkbox", checkedValue: CHECKED_VALUE, value: (_a = this.selectedDocument) === null || _a === void 0 ? void 0 : _a.readEnabled.toString(), ref: el => (__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments_readEnabledCheckboxEl, el, "f")) })), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, h("ch-checkbox", { class: "checkbox", checkedValue: CHECKED_VALUE, value: (_b = this.selectedDocument) === null || _b === void 0 ? void 0 : _b.readRequired.toString(), ref: el => (__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments_readRequiredCheckboxEl, el, "f")) }))), h("ch-tabular-grid-row", {
|
|
114
|
+
// new
|
|
115
|
+
class: "tabular-grid-row", rowid: "read"
|
|
116
|
+
}, h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").actions.newLabel), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, h("ch-checkbox", { class: "checkbox", checkedValue: CHECKED_VALUE, value: (_c = this.selectedDocument) === null || _c === void 0 ? void 0 : _c.newEnabled.toString(), ref: el => (__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments_newEnabledCheckboxEl, el, "f")) })), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, h("ch-checkbox", { class: "checkbox", checkedValue: CHECKED_VALUE, value: (_d = this.selectedDocument) === null || _d === void 0 ? void 0 : _d.newRequired.toString(), ref: el => (__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments_newRequiredCheckboxEl, el, "f")) }))), h("ch-tabular-grid-row", {
|
|
117
|
+
// update
|
|
118
|
+
class: "tabular-grid-row", rowid: "read"
|
|
119
|
+
}, h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").actions.updateLabel), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, h("ch-checkbox", { class: "checkbox", checkedValue: CHECKED_VALUE, value: (_e = this.selectedDocument) === null || _e === void 0 ? void 0 : _e.updateEnabled.toString(), ref: el => (__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments_updateEnabledCheckboxEl, el, "f")) })), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, h("ch-checkbox", { class: "checkbox", checkedValue: CHECKED_VALUE, value: (_f = this.selectedDocument) === null || _f === void 0 ? void 0 : _f.updateRequired.toString(), ref: el => (__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments_updateRequiredCheckboxEl, el, "f")) }))), h("ch-tabular-grid-row", {
|
|
120
|
+
// delete
|
|
121
|
+
class: "tabular-grid-row", rowid: "read"
|
|
122
|
+
}, h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").actions.deleteLabel), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, h("ch-checkbox", { class: "checkbox", checkedValue: CHECKED_VALUE, value: (_g = this.selectedDocument) === null || _g === void 0 ? void 0 : _g.deleteEnabled.toString(), ref: el => (__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments_deleteEnabledCheckboxEl, el, "f")) })), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, h("ch-checkbox", { class: "checkbox", checkedValue: CHECKED_VALUE, value: (_h = this.selectedDocument) === null || _h === void 0 ? void 0 : _h.deleteRequired.toString(), ref: el => (__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments_deleteRequiredCheckboxEl, el, "f")) })))));
|
|
123
|
+
});
|
|
124
|
+
_GxIdeBpmTaskDocuments_renderEmptyState.set(this, () => {
|
|
125
|
+
return (h("gx-ide-empty-state", { class: "recent-objects__empty-state", stateIconSrc: MODULE_ICON, isAnimated: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_renderedFirstTime, "f"), stateTitle: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").emptyRightPanelInfo.title }, h("button", { class: "button-secondary", onClick: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_selectDocumentCallbackHandler, "f") }, __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").emptyRightPanelInfo.buttonCaption)));
|
|
126
|
+
});
|
|
127
|
+
_GxIdeBpmTaskDocuments_renderFooter.set(this, () => {
|
|
128
|
+
return (h("footer", { class: "footer control-footer control-footer-with-border spacing-body-block-end spacing-body-inline" }, h("div", { class: "buttons-spacer" }, h("button", { class: "button-secondary", id: "button-cancel", onClick: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_cancelCallbackHandler, "f"), part: "button-cancel" }, __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").footer.cancelButton), h("button", { class: "button-primary", id: "button-create", onClick: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_confirmCallbackHandler, "f"), part: "button-create" }, __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").footer.confirmButton))));
|
|
129
|
+
});
|
|
130
|
+
_GxIdeBpmTaskDocuments_renderMain.set(this, () => {
|
|
131
|
+
return [
|
|
132
|
+
h("div", { class: "documents__list spacing-body-inline" }, h("ch-action-list-render", { selection: "single", class: "list-box", model: this.documentsActionListState, onSelectedItemsChange: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_objectSelectionChangedHandler, "f") })),
|
|
133
|
+
__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_renderActions, "f").call(this)
|
|
134
|
+
];
|
|
135
|
+
});
|
|
136
|
+
this.documentsActionListState = [];
|
|
137
|
+
this.documentName = null;
|
|
138
|
+
this.selectedDocument = null;
|
|
139
|
+
this.suggestedDocuments = undefined;
|
|
140
|
+
this.documents = undefined;
|
|
141
|
+
this.cancelCallback = undefined;
|
|
142
|
+
this.confirmCallback = undefined;
|
|
143
|
+
this.selectDocumentCallback = undefined;
|
|
144
|
+
this.suggestDocumentsCallback = undefined;
|
|
145
|
+
}
|
|
146
|
+
async componentWillLoad() {
|
|
147
|
+
__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments__componentLocale, await Locale.getComponentStrings(this.el), "f");
|
|
148
|
+
__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_refreshDocumentsActionListState, "f").call(this);
|
|
149
|
+
}
|
|
150
|
+
componentDidRender() {
|
|
151
|
+
if (!__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_renderedFirstTime, "f")) {
|
|
152
|
+
this.componentDidRenderFirstTime.emit(__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").componentName);
|
|
153
|
+
__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments_renderedFirstTime, true, "f");
|
|
154
|
+
}
|
|
155
|
+
const shadowRoot = this.el.shadowRoot;
|
|
156
|
+
const checkboxes = __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_instances, "m", _GxIdeBpmTaskDocuments_getAllCheckboxes).call(this, shadowRoot);
|
|
157
|
+
if (checkboxes) {
|
|
158
|
+
checkboxes.forEach(checkbox => {
|
|
159
|
+
checkbox.addEventListener("input", __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_instances, "m", _GxIdeBpmTaskDocuments_handleCheckboxChange).bind(this));
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Suspends or reactivates the shortcuts
|
|
165
|
+
*/
|
|
166
|
+
async suspendShortcuts(suspendShortcuts) {
|
|
167
|
+
if (suspendShortcuts) {
|
|
168
|
+
__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_chShortcutsEl, "f").suspend = true;
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_chShortcutsEl, "f").suspend = false;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
render() {
|
|
175
|
+
return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), h("ch-shortcuts", { src: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_shortcutsSrc, "f"), ref: (el) => (__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments_chShortcutsEl, el, "f")) }), h("section", { class: "section" }, h("div", { class: "main field-group" }, h("div", { class: "documents__header buttons-spacer spacing-body-inline spacing-body-block-start" }, h("ch-combo-box-render", { class: "combo-box documents__suggest", model: this.suggestedDocuments, placeholder: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").documents.suggestPlaceholder, suggest: true, onInput: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_documentSuggestValueChangedHandler, "f"), onChange: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_listenDocumentSelected, "f"), suggestOptions: {
|
|
176
|
+
alreadyProcessed: false,
|
|
177
|
+
autoExpand: true,
|
|
178
|
+
hideMatchesAndShowNonMatches: false,
|
|
179
|
+
highlightMatchedItems: false,
|
|
180
|
+
matchCase: false,
|
|
181
|
+
regularExpression: false,
|
|
182
|
+
strict: false
|
|
183
|
+
} }), h("span", null, h("button", { class: "button-tertiary button-icon-only", "aria-label": __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").documents.addDocumentButtonLabel, title: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").documents.addDocumentButtonLabel, onClick: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_selectDocumentCallbackHandler, "f") }, h("ch-image", { class: "icon-sm", src: MORE_ICON })), h("button", { class: "button-tertiary button-icon-only", "aria-label": __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").documents.clearDocumentButtonLabel, title: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").documents.clearDocumentButtonLabel, onClick: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_handleDeleteButton, "f") }, h("ch-image", { class: "icon-sm", src: DELETE_ICON })))), this.documentsActionListState.length
|
|
184
|
+
? __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_renderMain, "f").call(this)
|
|
185
|
+
: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_renderEmptyState, "f").call(this)), __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_renderFooter, "f").call(this))));
|
|
186
|
+
}
|
|
187
|
+
static get is() { return "gx-ide-bpm-task-documents"; }
|
|
188
|
+
static get encapsulation() { return "shadow"; }
|
|
189
|
+
static get originalStyleUrls() {
|
|
190
|
+
return {
|
|
191
|
+
"$": ["task-documents.scss"]
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
static get styleUrls() {
|
|
195
|
+
return {
|
|
196
|
+
"$": ["task-documents.css"]
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
static get assetsDirs() { return ["gx-ide-assets/bpm-task-documents"]; }
|
|
200
|
+
static get properties() {
|
|
201
|
+
return {
|
|
202
|
+
"documents": {
|
|
203
|
+
"type": "unknown",
|
|
204
|
+
"mutable": true,
|
|
205
|
+
"complexType": {
|
|
206
|
+
"original": "TaskDocumentData[]",
|
|
207
|
+
"resolved": "TaskDocumentData[]",
|
|
208
|
+
"references": {
|
|
209
|
+
"TaskDocumentData": {
|
|
210
|
+
"location": "local",
|
|
211
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/bpm/task-documents/task-documents.tsx",
|
|
212
|
+
"id": "src/components/bpm/task-documents/task-documents.tsx::TaskDocumentData"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"required": false,
|
|
217
|
+
"optional": false,
|
|
218
|
+
"docs": {
|
|
219
|
+
"tags": [{
|
|
220
|
+
"name": "property",
|
|
221
|
+
"text": "documents"
|
|
222
|
+
}, {
|
|
223
|
+
"name": "description",
|
|
224
|
+
"text": "The current value of the documents for the task"
|
|
225
|
+
}],
|
|
226
|
+
"text": ""
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"cancelCallback": {
|
|
230
|
+
"type": "unknown",
|
|
231
|
+
"mutable": false,
|
|
232
|
+
"complexType": {
|
|
233
|
+
"original": "CancelCallback",
|
|
234
|
+
"resolved": "() => Promise<void>",
|
|
235
|
+
"references": {
|
|
236
|
+
"CancelCallback": {
|
|
237
|
+
"location": "local",
|
|
238
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/bpm/task-documents/task-documents.tsx",
|
|
239
|
+
"id": "src/components/bpm/task-documents/task-documents.tsx::CancelCallback"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"required": false,
|
|
244
|
+
"optional": false,
|
|
245
|
+
"docs": {
|
|
246
|
+
"tags": [{
|
|
247
|
+
"name": "property",
|
|
248
|
+
"text": "cancelCallback"
|
|
249
|
+
}, {
|
|
250
|
+
"name": "description",
|
|
251
|
+
"text": "Callback invoked when the user cancels the application declaration (Cancel button)"
|
|
252
|
+
}],
|
|
253
|
+
"text": ""
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
"confirmCallback": {
|
|
257
|
+
"type": "unknown",
|
|
258
|
+
"mutable": false,
|
|
259
|
+
"complexType": {
|
|
260
|
+
"original": "ConfirmCallback",
|
|
261
|
+
"resolved": "(data: TaskDocumentData[]) => Promise<void>",
|
|
262
|
+
"references": {
|
|
263
|
+
"ConfirmCallback": {
|
|
264
|
+
"location": "local",
|
|
265
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/bpm/task-documents/task-documents.tsx",
|
|
266
|
+
"id": "src/components/bpm/task-documents/task-documents.tsx::ConfirmCallback"
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
"required": false,
|
|
271
|
+
"optional": false,
|
|
272
|
+
"docs": {
|
|
273
|
+
"tags": [{
|
|
274
|
+
"name": "property",
|
|
275
|
+
"text": "confirmCallback"
|
|
276
|
+
}, {
|
|
277
|
+
"name": "description",
|
|
278
|
+
"text": "Callback invoked when the user confirms the application declaration (Ok button)"
|
|
279
|
+
}],
|
|
280
|
+
"text": ""
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"selectDocumentCallback": {
|
|
284
|
+
"type": "unknown",
|
|
285
|
+
"mutable": false,
|
|
286
|
+
"complexType": {
|
|
287
|
+
"original": "SelectDocumentCallback",
|
|
288
|
+
"resolved": "() => Promise<string>",
|
|
289
|
+
"references": {
|
|
290
|
+
"SelectDocumentCallback": {
|
|
291
|
+
"location": "local",
|
|
292
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/bpm/task-documents/task-documents.tsx",
|
|
293
|
+
"id": "src/components/bpm/task-documents/task-documents.tsx::SelectDocumentCallback"
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"required": false,
|
|
298
|
+
"optional": false,
|
|
299
|
+
"docs": {
|
|
300
|
+
"tags": [{
|
|
301
|
+
"name": "property",
|
|
302
|
+
"text": "selectDocumentCallback"
|
|
303
|
+
}, {
|
|
304
|
+
"name": "description",
|
|
305
|
+
"text": "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."
|
|
306
|
+
}],
|
|
307
|
+
"text": ""
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"suggestDocumentsCallback": {
|
|
311
|
+
"type": "unknown",
|
|
312
|
+
"mutable": false,
|
|
313
|
+
"complexType": {
|
|
314
|
+
"original": "SuggestDocumentsCallback",
|
|
315
|
+
"resolved": "(documentName: string) => Promise<string[]>",
|
|
316
|
+
"references": {
|
|
317
|
+
"SuggestDocumentsCallback": {
|
|
318
|
+
"location": "local",
|
|
319
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/bpm/task-documents/task-documents.tsx",
|
|
320
|
+
"id": "src/components/bpm/task-documents/task-documents.tsx::SuggestDocumentsCallback"
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
"required": false,
|
|
325
|
+
"optional": false,
|
|
326
|
+
"docs": {
|
|
327
|
+
"tags": [{
|
|
328
|
+
"name": "property",
|
|
329
|
+
"text": "suggestDocumentsCallback"
|
|
330
|
+
}, {
|
|
331
|
+
"name": "description",
|
|
332
|
+
"text": "Callback that must be called to obtain options for the document input."
|
|
333
|
+
}],
|
|
334
|
+
"text": ""
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
static get states() {
|
|
340
|
+
return {
|
|
341
|
+
"documentsActionListState": {},
|
|
342
|
+
"documentName": {},
|
|
343
|
+
"selectedDocument": {},
|
|
344
|
+
"suggestedDocuments": {}
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
static get events() {
|
|
348
|
+
return [{
|
|
349
|
+
"method": "componentDidRenderFirstTime",
|
|
350
|
+
"name": "componentDidRenderFirstTime",
|
|
351
|
+
"bubbles": true,
|
|
352
|
+
"cancelable": true,
|
|
353
|
+
"composed": true,
|
|
354
|
+
"docs": {
|
|
355
|
+
"tags": [{
|
|
356
|
+
"name": "description",
|
|
357
|
+
"text": "Gets fired when the component has rendered for the first time."
|
|
358
|
+
}],
|
|
359
|
+
"text": ""
|
|
360
|
+
},
|
|
361
|
+
"complexType": {
|
|
362
|
+
"original": "string",
|
|
363
|
+
"resolved": "string",
|
|
364
|
+
"references": {}
|
|
365
|
+
}
|
|
366
|
+
}];
|
|
367
|
+
}
|
|
368
|
+
static get methods() {
|
|
369
|
+
return {
|
|
370
|
+
"suspendShortcuts": {
|
|
371
|
+
"complexType": {
|
|
372
|
+
"signature": "(suspendShortcuts: boolean) => Promise<void>",
|
|
373
|
+
"parameters": [{
|
|
374
|
+
"name": "suspendShortcuts",
|
|
375
|
+
"type": "boolean",
|
|
376
|
+
"docs": ""
|
|
377
|
+
}],
|
|
378
|
+
"references": {
|
|
379
|
+
"Promise": {
|
|
380
|
+
"location": "global",
|
|
381
|
+
"id": "global::Promise"
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
"return": "Promise<void>"
|
|
385
|
+
},
|
|
386
|
+
"docs": {
|
|
387
|
+
"text": "Suspends or reactivates the shortcuts",
|
|
388
|
+
"tags": []
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
static get elementRef() { return "el"; }
|
|
394
|
+
}
|
|
395
|
+
_GxIdeBpmTaskDocuments__componentLocale = new WeakMap(), _GxIdeBpmTaskDocuments_renderedFirstTime = new WeakMap(), _GxIdeBpmTaskDocuments_shortcutsSrc = new WeakMap(), _GxIdeBpmTaskDocuments_chShortcutsEl = new WeakMap(), _GxIdeBpmTaskDocuments_deleteEnabledCheckboxEl = new WeakMap(), _GxIdeBpmTaskDocuments_deleteRequiredCheckboxEl = new WeakMap(), _GxIdeBpmTaskDocuments_newEnabledCheckboxEl = new WeakMap(), _GxIdeBpmTaskDocuments_newRequiredCheckboxEl = new WeakMap(), _GxIdeBpmTaskDocuments_readEnabledCheckboxEl = new WeakMap(), _GxIdeBpmTaskDocuments_readRequiredCheckboxEl = new WeakMap(), _GxIdeBpmTaskDocuments_updateEnabledCheckboxEl = new WeakMap(), _GxIdeBpmTaskDocuments_updateRequiredCheckboxEl = new WeakMap(), _GxIdeBpmTaskDocuments_cancelCallbackHandler = new WeakMap(), _GxIdeBpmTaskDocuments_confirmCallbackHandler = new WeakMap(), _GxIdeBpmTaskDocuments_documentSuggestValueChangedHandler = new WeakMap(), _GxIdeBpmTaskDocuments_handleDeleteButton = new WeakMap(), _GxIdeBpmTaskDocuments_listenDocumentSelected = new WeakMap(), _GxIdeBpmTaskDocuments_objectSelectionChangedHandler = new WeakMap(), _GxIdeBpmTaskDocuments_refreshDocumentsActionListState = new WeakMap(), _GxIdeBpmTaskDocuments_selectDocumentCallbackHandler = new WeakMap(), _GxIdeBpmTaskDocuments_renderActions = new WeakMap(), _GxIdeBpmTaskDocuments_renderEmptyState = new WeakMap(), _GxIdeBpmTaskDocuments_renderFooter = new WeakMap(), _GxIdeBpmTaskDocuments_renderMain = new WeakMap(), _GxIdeBpmTaskDocuments_instances = new WeakSet(), _GxIdeBpmTaskDocuments_getAllCheckboxes = function _GxIdeBpmTaskDocuments_getAllCheckboxes(node) {
|
|
396
|
+
const checkboxes = [];
|
|
397
|
+
node.childNodes.forEach(child => {
|
|
398
|
+
if (child.nodeName === NODENAME) {
|
|
399
|
+
checkboxes.push(child);
|
|
400
|
+
}
|
|
401
|
+
else if (child instanceof HTMLElement) {
|
|
402
|
+
checkboxes.push(...__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_instances, "m", _GxIdeBpmTaskDocuments_getAllCheckboxes).call(this, child));
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
return checkboxes;
|
|
406
|
+
}, _GxIdeBpmTaskDocuments_addDocument = function _GxIdeBpmTaskDocuments_addDocument(documentName) {
|
|
407
|
+
const documentExists = this.documents.some(doc => doc.name === documentName);
|
|
408
|
+
if (!documentExists) {
|
|
409
|
+
this.documents = [
|
|
410
|
+
...this.documents,
|
|
411
|
+
{
|
|
412
|
+
name: documentName,
|
|
413
|
+
deleteEnabled: false,
|
|
414
|
+
deleteRequired: false,
|
|
415
|
+
newEnabled: false,
|
|
416
|
+
newRequired: false,
|
|
417
|
+
readEnabled: false,
|
|
418
|
+
readRequired: false,
|
|
419
|
+
updateEnabled: false,
|
|
420
|
+
updateRequired: false
|
|
421
|
+
}
|
|
422
|
+
];
|
|
423
|
+
__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_refreshDocumentsActionListState, "f").call(this);
|
|
424
|
+
}
|
|
425
|
+
}, _GxIdeBpmTaskDocuments_handleCheckboxChange = function _GxIdeBpmTaskDocuments_handleCheckboxChange() {
|
|
426
|
+
const data = {
|
|
427
|
+
name: this.selectedDocument.name,
|
|
428
|
+
readEnabled: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_readEnabledCheckboxEl, "f").value === CHECKED_VALUE,
|
|
429
|
+
readRequired: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_readRequiredCheckboxEl, "f").value === CHECKED_VALUE,
|
|
430
|
+
newEnabled: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_newEnabledCheckboxEl, "f").value === CHECKED_VALUE,
|
|
431
|
+
newRequired: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_newRequiredCheckboxEl, "f").value === CHECKED_VALUE,
|
|
432
|
+
updateEnabled: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_updateEnabledCheckboxEl, "f").value === CHECKED_VALUE,
|
|
433
|
+
updateRequired: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_updateRequiredCheckboxEl, "f").value === CHECKED_VALUE,
|
|
434
|
+
deleteEnabled: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_deleteEnabledCheckboxEl, "f").value === CHECKED_VALUE,
|
|
435
|
+
deleteRequired: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_deleteRequiredCheckboxEl, "f").value === CHECKED_VALUE
|
|
436
|
+
};
|
|
437
|
+
this.selectedDocument = data;
|
|
438
|
+
this.documents = this.documents.map(doc => doc.name === this.selectedDocument.name ? this.selectedDocument : doc);
|
|
439
|
+
};
|
|
440
|
+
//# sourceMappingURL=task-documents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-documents.js","sourceRoot":"","sources":["../../../../src/components/bpm/task-documents/task-documents.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,OAAO,EACP,KAAK,EAEL,KAAK,EACL,YAAY,EACZ,MAAM,EACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EACL,uCAAuC,EACvC,kCAAkC,EACnC,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,WAAW,EAAkB,MAAM,kBAAkB,CAAC;AAK/D,MAAM,aAAa,GAAG,MAAM,CAAC;AAC7B,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB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AK;gBAClB,WAAW,EAAE,KAAK;gBAClB,YAAY,EAAE,KAAK;gBACnB,aAAa,EAAE,KAAK;gBACpB,cAAc,EAAE,KAAK;aACtB;SACF,CAAC;QACF,uBAAA,IAAI,8DAAiC,MAArC,IAAI,CAAmC,CAAC;KACzC;AACH,CAAC;IAwBC,MAAM,IAAI,GAAqB;QAC7B,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI;QAChC,WAAW,EAAE,uBAAA,IAAI,oDAAuB,CAAC,KAAK,KAAK,aAAa;QAChE,YAAY,EAAE,uBAAA,IAAI,qDAAwB,CAAC,KAAK,KAAK,aAAa;QAClE,UAAU,EAAE,uBAAA,IAAI,mDAAsB,CAAC,KAAK,KAAK,aAAa;QAC9D,WAAW,EAAE,uBAAA,IAAI,oDAAuB,CAAC,KAAK,KAAK,aAAa;QAChE,aAAa,EAAE,uBAAA,IAAI,sDAAyB,CAAC,KAAK,KAAK,aAAa;QACpE,cAAc,EAAE,uBAAA,IAAI,uDAA0B,CAAC,KAAK,KAAK,aAAa;QACtE,aAAa,EAAE,uBAAA,IAAI,sDAAyB,CAAC,KAAK,KAAK,aAAa;QACpE,cAAc,EAAE,uBAAA,IAAI,uDAA0B,CAAC,KAAK,KAAK,aAAa;KACvE,CAAC;IAEF,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAE7B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CACxC,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,CACtE,CAAC;AACJ,CAAC","sourcesContent":["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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locale.e2e.js","sourceRoot":"","sources":["../../src/testing/locale.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,gBAAgB,GAAG,SAAS,CAAC;AACnC,MAAM,SAAS,GAAqC;IAClD,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE;IAC/B,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE;IAC/B,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE;CACjC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,uBAAoD,EAAE,EAAE;IAC1E,QAAQ,CAAC,YAAY,uBAAuB,GAAG,EAAE,GAAG,EAAE;QACpD,IAAI,IAAa,CAAC;QAClB,MAAM,aAAa,GAAG,uBAAuB,CAAC,OAAO,CAAC,gBAAgB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CAAC;IAC7C,oCAAoC,EAAE,CAAC;IACvC,iBAAiB,EAAE,CAAC;IACpB,aAAa,EAAE,CAAC;IAChB,cAAc,EAAE,CAAC;IACjB,gBAAgB,EAAE,CAAC;IACnB,oBAAoB,EAAE,CAAC;IACvB,kBAAkB,EAAE,CAAC;IACrB,sBAAsB,EAAE,CAAC;IACzB,iBAAiB,EAAE,CAAC;IACpB,0BAA0B,EAAE,CAAC;IAC7B,eAAe,EAAE,CAAC;IAClB,qBAAqB,EAAE,CAAC;IACxB,wBAAwB,EAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,6BAA6B,GAAG,IAAI,GAAG,CAA8B;IACzE,mBAAmB;IACnB,uBAAuB;IACvB,kBAAkB;IAClB,0BAA0B;IAC1B,2BAA2B;IAC3B,oBAAoB;IACpB,sBAAsB;IACtB,2BAA2B;IAC3B,eAAe;IACf,qBAAqB;IACrB,iBAAiB;IACjB,aAAa;IACb,cAAc;IACd,gBAAgB;CACjB,CAAC,CAAC;AAEH,MAAM,0BAA0B,GAAG,MAAM,CAAC,IAAI,CAC5C,yBAAyB,CAC1B,CAAC,MAAM,CACN,SAAS,CAAC,EAAE,CACV,CAAC,6BAA6B,CAAC,GAAG,CAAC,SAAwC,CAAC,CAC/E,CAAC;AAEF,0BAA0B,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC","sourcesContent":["import { E2EPage, newE2EPage } from \"@stencil/core/testing\";\nimport { GeneXusIdeUIControlsTagName } from \"../common/types\";\nimport { haveSameStructure } from \"./same-structure.e2e\";\n\nconst COMPONENT_PREFIX = \"gx-ide-\";\nconst languages: { name: string; attr: string }[] = [\n { name: \"chinese\", attr: \"zh\" },\n { name: \"english\", attr: \"en\" },\n { name: \"japanese\", attr: \"ja\" }\n];\n\nconst testLocale = (componentNameWithPrefix: GeneXusIdeUIControlsTagName) => {\n describe(`[locale][${componentNameWithPrefix}]`, () => {\n let page: E2EPage;\n const componentName = componentNameWithPrefix.replace(COMPONENT_PREFIX, \"\");\n\n // This implementation is a WA since we can't evaluate JS classes in the page.\n // TODO: Implement the locale utility as a function, which can be evaluated\n // in the page\n const getTranslations = () =>\n page.evaluate(component => {\n const ASSETS_FOLDER = \"gx-ide-assets/\";\n const DEFAULT_LANGUAGE = \"en\";\n const LANGS_FOLDER = \"langs/\";\n const LANG_PREFIX = \".lang.\";\n const LANG_EXTENSION = \".json\";\n const lang =\n document\n .getElementsByTagName(\"html\")[0]\n .getAttribute(\"lang\")\n ?.valueOf() ?? DEFAULT_LANGUAGE;\n const folder = `${component}/`;\n\n const path =\n `/build/${ASSETS_FOLDER}${folder}${LANGS_FOLDER}${component}${LANG_PREFIX}${lang}${LANG_EXTENSION}` as const;\n\n return new Promise(resolve => {\n fetch(path)\n .then(async langFile => {\n if (langFile.ok) {\n const fileObject = await langFile.json();\n resolve(fileObject);\n } else {\n resolve(undefined);\n }\n })\n .catch(() => resolve(undefined));\n });\n }, componentName);\n\n beforeEach(async () => {\n page = await newE2EPage({\n failOnConsoleError: true,\n html: \"\" // Necessary\n });\n });\n\n it(\"should work without specifying the language (lang attr) in the browser\", async () => {\n const languageFile: any | undefined = await getTranslations();\n expect(languageFile).toBeTruthy();\n });\n\n it(\"should default to english language when there is no language (lang attr) in the browser\", async () => {\n const languageFile: any | undefined = await getTranslations();\n expect(languageFile).toBeTruthy();\n\n await page.evaluate(() =>\n document.documentElement.setAttribute(\"lang\", \"en\")\n );\n\n const languageEnglishFile: any | undefined = await getTranslations();\n expect(languageEnglishFile).toBeTruthy();\n expect(languageFile).toEqual(languageEnglishFile);\n });\n\n languages.forEach(language => {\n it(`should work with ${language.name} language`, async () => {\n await page.evaluate(\n (attr: string) => document.documentElement.setAttribute(\"lang\", attr),\n language.attr\n );\n const languageFile: any | undefined = await getTranslations();\n expect(languageFile).toBeTruthy();\n });\n });\n\n for (let index = 0; index < languages.length - 1; index++) {\n const language1 = languages[index];\n const language2 = languages[index + 1];\n\n // TODO: Complete all translations. At this moment, Japanese and Chinese\n // translations have missing literals\n it(`should translate the same literals (${language1.name} and ${language2.name})`, async () => {\n await page.evaluate(\n (attr: string) => document.documentElement.setAttribute(\"lang\", attr),\n language1.attr\n );\n const language1File: any | undefined = await getTranslations();\n\n await page.evaluate(\n (attr: string) => document.documentElement.setAttribute(\"lang\", attr),\n language2.attr\n );\n const language2File: any | undefined = await getTranslations();\n\n expect(language1File).toBeTruthy();\n expect(language2File).toBeTruthy();\n expect(haveSameStructure(language1File, language2File)).toBe(true);\n });\n }\n });\n};\n\n// TypeScript does not have a built-in type to exhaust a list with union types\nconst allGeneXusIdeUIComponents: { [key in GeneXusIdeUIControlsTagName]: 0 } = {\n \"gx-ide-about\": 0,\n \"gx-ide-ai-assistant\": 0,\n \"gx-ide-ai-message\": 0,\n \"gx-ide-bpm-app-declaration\": 0,\n \"gx-ide-bpm-assign-roles\": 0,\n \"gx-ide-bpm-import-files\": 0,\n \"gx-ide-bpm-import-gxpm\": 0,\n \"gx-ide-bpm-objects-selector\": 0,\n \"gx-ide-bpm-timer-duration\": 0,\n \"gx-ide-card\": 0,\n \"gx-ide-chat-container\": 0,\n \"gx-ide-sc-chat-container\": 0,\n \"gx-ide-connect-gx-server\": 0,\n \"gx-ide-container\": 0,\n \"gx-ide-create-kb-from-server\": 0,\n \"gx-ide-current-user-info\": 0,\n \"gx-ide-dashboard-home\": 0,\n \"gx-ide-data-selector\": 0,\n \"gx-ide-data-type-selector\": 0,\n \"gx-ide-design-import\": 0,\n \"gx-ide-directory-selector\": 0,\n \"gx-ide-edit-module-server\": 0,\n \"gx-ide-empty-state\": 0,\n \"gx-ide-entity-selector\": 0,\n \"gx-ide-gam-installation-settings\": 0,\n \"gx-ide-kb-manager-export\": 0,\n \"gx-ide-kb-manager-import\": 0,\n \"gx-ide-list-selector\": 0,\n \"gx-ide-list-selector-item\": 0,\n \"gx-ide-loader\": 0,\n \"gx-ide-manage-module-references\": 0,\n \"gx-ide-manage-module-references-v2\": 0,\n \"gx-ide-new-environment\": 0,\n \"gx-ide-new-kb\": 0,\n \"gx-ide-new-object\": 0,\n \"gx-ide-new-version\": 0,\n \"gx-ide-object-selector\": 0,\n \"gx-ide-references\": 0,\n \"gx-ide-select-kb-items\": 0,\n \"gx-ide-select-user-team\": 0,\n \"gx-ide-sign-in\": 0,\n \"gx-ide-sign-in-team\": 0,\n \"gx-ide-share-kb\": 0,\n \"gx-ide-start-page\": 0,\n \"gx-ide-status-buttons\": 0,\n \"gx-ide-switch-panel\": 0,\n \"gx-ide-switcher\": 0,\n \"gx-ide-team-dev-commit\": 0,\n \"gx-ide-team-dev-select-recent-comment\": 0,\n \"gx-ide-team-dev-update\": 0,\n \"gx-ide-team-dev-update-partial-selection\": 0,\n \"gx-ide-team-dev-update-to-revision\": 0,\n \"gx-ide-template\": 0,\n \"gx-ide-test\": 0,\n \"gx-ide-title\": 0,\n \"gx-ide-top-bar\": 0,\n \"gx-ide-wf-settings\": 0,\n \"gx-ide-ww-images\": 0,\n \"gx-ide-ww-attributes\": 0,\n \"gx-ide-ww-files\": 0,\n \"gx-ide-navigation-report\": 0,\n \"gx-ide-splash\": 0,\n \"gx-ide-welcome-page\": 0,\n \"gx-ide-bpm-export-xpdl\": 0\n};\n\nconst componentsWithoutTranslations = new Set<GeneXusIdeUIControlsTagName>([\n \"gx-ide-ai-message\",\n \"gx-ide-chat-container\",\n \"gx-ide-container\",\n \"gx-ide-sc-chat-container\",\n \"gx-ide-directory-selector\",\n \"gx-ide-empty-state\",\n \"gx-ide-list-selector\",\n \"gx-ide-list-selector-item\",\n \"gx-ide-loader\",\n \"gx-ide-switch-panel\",\n \"gx-ide-switcher\",\n \"gx-ide-test\",\n \"gx-ide-title\",\n \"gx-ide-top-bar\"\n]);\n\nconst componentsWithTranslations = Object.keys(\n allGeneXusIdeUIComponents\n).filter(\n component =>\n !componentsWithoutTranslations.has(component as GeneXusIdeUIControlsTagName)\n);\n\ncomponentsWithTranslations.forEach(testLocale);\n"]}
|
|
1
|
+
{"version":3,"file":"locale.e2e.js","sourceRoot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CAAC,CAAC;AAEH,MAAM,0BAA0B,GAAG,MAAM,CAAC,IAAI,CAC5C,yBAAyB,CAC1B,CAAC,MAAM,CACN,SAAS,CAAC,EAAE,CACV,CAAC,6BAA6B,CAAC,GAAG,CAAC,SAAwC,CAAC,CAC/E,CAAC;AAEF,0BAA0B,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC","sourcesContent":["import { E2EPage, newE2EPage } from \"@stencil/core/testing\";\nimport { GeneXusIdeUIControlsTagName } from \"../common/types\";\nimport { haveSameStructure } from \"./same-structure.e2e\";\n\nconst COMPONENT_PREFIX = \"gx-ide-\";\nconst languages: { name: string; attr: string }[] = [\n { name: \"chinese\", attr: \"zh\" },\n { name: \"english\", attr: \"en\" },\n { name: \"japanese\", attr: \"ja\" }\n];\n\nconst testLocale = (componentNameWithPrefix: GeneXusIdeUIControlsTagName) => {\n describe(`[locale][${componentNameWithPrefix}]`, () => {\n let page: E2EPage;\n const componentName = componentNameWithPrefix.replace(COMPONENT_PREFIX, \"\");\n\n // This implementation is a WA since we can't evaluate JS classes in the page.\n // TODO: Implement the locale utility as a function, which can be evaluated\n // in the page\n const getTranslations = () =>\n page.evaluate(component => {\n const ASSETS_FOLDER = \"gx-ide-assets/\";\n const DEFAULT_LANGUAGE = \"en\";\n const LANGS_FOLDER = \"langs/\";\n const LANG_PREFIX = \".lang.\";\n const LANG_EXTENSION = \".json\";\n const lang =\n document\n .getElementsByTagName(\"html\")[0]\n .getAttribute(\"lang\")\n ?.valueOf() ?? DEFAULT_LANGUAGE;\n const folder = `${component}/`;\n\n const path =\n `/build/${ASSETS_FOLDER}${folder}${LANGS_FOLDER}${component}${LANG_PREFIX}${lang}${LANG_EXTENSION}` as const;\n\n return new Promise(resolve => {\n fetch(path)\n .then(async langFile => {\n if (langFile.ok) {\n const fileObject = await langFile.json();\n resolve(fileObject);\n } else {\n resolve(undefined);\n }\n })\n .catch(() => resolve(undefined));\n });\n }, componentName);\n\n beforeEach(async () => {\n page = await newE2EPage({\n failOnConsoleError: true,\n html: \"\" // Necessary\n });\n });\n\n it(\"should work without specifying the language (lang attr) in the browser\", async () => {\n const languageFile: any | undefined = await getTranslations();\n expect(languageFile).toBeTruthy();\n });\n\n it(\"should default to english language when there is no language (lang attr) in the browser\", async () => {\n const languageFile: any | undefined = await getTranslations();\n expect(languageFile).toBeTruthy();\n\n await page.evaluate(() =>\n document.documentElement.setAttribute(\"lang\", \"en\")\n );\n\n const languageEnglishFile: any | undefined = await getTranslations();\n expect(languageEnglishFile).toBeTruthy();\n expect(languageFile).toEqual(languageEnglishFile);\n });\n\n languages.forEach(language => {\n it(`should work with ${language.name} language`, async () => {\n await page.evaluate(\n (attr: string) => document.documentElement.setAttribute(\"lang\", attr),\n language.attr\n );\n const languageFile: any | undefined = await getTranslations();\n expect(languageFile).toBeTruthy();\n });\n });\n\n for (let index = 0; index < languages.length - 1; index++) {\n const language1 = languages[index];\n const language2 = languages[index + 1];\n\n // TODO: Complete all translations. At this moment, Japanese and Chinese\n // translations have missing literals\n it(`should translate the same literals (${language1.name} and ${language2.name})`, async () => {\n await page.evaluate(\n (attr: string) => document.documentElement.setAttribute(\"lang\", attr),\n language1.attr\n );\n const language1File: any | undefined = await getTranslations();\n\n await page.evaluate(\n (attr: string) => document.documentElement.setAttribute(\"lang\", attr),\n language2.attr\n );\n const language2File: any | undefined = await getTranslations();\n\n expect(language1File).toBeTruthy();\n expect(language2File).toBeTruthy();\n expect(haveSameStructure(language1File, language2File)).toBe(true);\n });\n }\n });\n};\n\n// TypeScript does not have a built-in type to exhaust a list with union types\nconst allGeneXusIdeUIComponents: { [key in GeneXusIdeUIControlsTagName]: 0 } = {\n \"gx-ide-about\": 0,\n \"gx-ide-ai-assistant\": 0,\n \"gx-ide-ai-message\": 0,\n \"gx-ide-bpm-app-declaration\": 0,\n \"gx-ide-bpm-assign-roles\": 0,\n \"gx-ide-bpm-import-files\": 0,\n \"gx-ide-bpm-import-gxpm\": 0,\n \"gx-ide-bpm-objects-selector\": 0,\n \"gx-ide-bpm-task-documents\": 0,\n \"gx-ide-bpm-timer-duration\": 0,\n \"gx-ide-card\": 0,\n \"gx-ide-chat-container\": 0,\n \"gx-ide-sc-chat-container\": 0,\n \"gx-ide-connect-gx-server\": 0,\n \"gx-ide-container\": 0,\n \"gx-ide-create-kb-from-server\": 0,\n \"gx-ide-current-user-info\": 0,\n \"gx-ide-dashboard-home\": 0,\n \"gx-ide-data-selector\": 0,\n \"gx-ide-data-type-selector\": 0,\n \"gx-ide-design-import\": 0,\n \"gx-ide-directory-selector\": 0,\n \"gx-ide-edit-module-server\": 0,\n \"gx-ide-empty-state\": 0,\n \"gx-ide-entity-selector\": 0,\n \"gx-ide-gam-installation-settings\": 0,\n \"gx-ide-kb-manager-export\": 0,\n \"gx-ide-kb-manager-import\": 0,\n \"gx-ide-list-selector\": 0,\n \"gx-ide-list-selector-item\": 0,\n \"gx-ide-loader\": 0,\n \"gx-ide-manage-module-references\": 0,\n \"gx-ide-manage-module-references-v2\": 0,\n \"gx-ide-new-environment\": 0,\n \"gx-ide-new-kb\": 0,\n \"gx-ide-new-object\": 0,\n \"gx-ide-new-version\": 0,\n \"gx-ide-object-selector\": 0,\n \"gx-ide-references\": 0,\n \"gx-ide-select-kb-items\": 0,\n \"gx-ide-select-user-team\": 0,\n \"gx-ide-sign-in\": 0,\n \"gx-ide-sign-in-team\": 0,\n \"gx-ide-share-kb\": 0,\n \"gx-ide-start-page\": 0,\n \"gx-ide-status-buttons\": 0,\n \"gx-ide-switch-panel\": 0,\n \"gx-ide-switcher\": 0,\n \"gx-ide-team-dev-commit\": 0,\n \"gx-ide-team-dev-select-recent-comment\": 0,\n \"gx-ide-team-dev-update\": 0,\n \"gx-ide-team-dev-update-partial-selection\": 0,\n \"gx-ide-team-dev-update-to-revision\": 0,\n \"gx-ide-template\": 0,\n \"gx-ide-test\": 0,\n \"gx-ide-title\": 0,\n \"gx-ide-top-bar\": 0,\n \"gx-ide-wf-settings\": 0,\n \"gx-ide-ww-images\": 0,\n \"gx-ide-ww-attributes\": 0,\n \"gx-ide-ww-files\": 0,\n \"gx-ide-navigation-report\": 0,\n \"gx-ide-splash\": 0,\n \"gx-ide-welcome-page\": 0,\n \"gx-ide-bpm-export-xpdl\": 0\n};\n\nconst componentsWithoutTranslations = new Set<GeneXusIdeUIControlsTagName>([\n \"gx-ide-ai-message\",\n \"gx-ide-chat-container\",\n \"gx-ide-container\",\n \"gx-ide-sc-chat-container\",\n \"gx-ide-directory-selector\",\n \"gx-ide-empty-state\",\n \"gx-ide-list-selector\",\n \"gx-ide-list-selector-item\",\n \"gx-ide-loader\",\n \"gx-ide-switch-panel\",\n \"gx-ide-switcher\",\n \"gx-ide-test\",\n \"gx-ide-title\",\n \"gx-ide-top-bar\"\n]);\n\nconst componentsWithTranslations = Object.keys(\n allGeneXusIdeUIComponents\n).filter(\n component =>\n !componentsWithoutTranslations.has(component as GeneXusIdeUIControlsTagName)\n);\n\ncomponentsWithTranslations.forEach(testLocale);\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface GxIdeBpmTaskDocuments extends Components.GxIdeBpmTaskDocuments, HTMLElement {}
|
|
4
|
+
export const GxIdeBpmTaskDocuments: {
|
|
5
|
+
prototype: GxIdeBpmTaskDocuments;
|
|
6
|
+
new (): GxIdeBpmTaskDocuments;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|