@genexus/genexus-ide-ui 1.1.14 → 1.1.16

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 (26) hide show
  1. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  2. package/dist/cjs/gx-ide-data-type-selector.cjs.entry.js +121 -40
  3. package/dist/cjs/gx-ide-data-type-selector.cjs.entry.js.map +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/collection/components/data-type-selector/data-type-selector.css +6 -0
  6. package/dist/collection/components/data-type-selector/data-type-selector.js +165 -43
  7. package/dist/collection/components/data-type-selector/data-type-selector.js.map +1 -1
  8. package/dist/collection/components/data-type-selector/gx-ide-assets/data-type-selector/langs/data-type-selector.lang.en.json +1 -1
  9. package/dist/collection/components/data-type-selector/helpers.js +2 -0
  10. package/dist/collection/components/data-type-selector/helpers.js.map +1 -1
  11. package/dist/components/gx-ide-data-type-selector.js +126 -42
  12. package/dist/components/gx-ide-data-type-selector.js.map +1 -1
  13. package/dist/esm/genexus-ide-ui.js +1 -1
  14. package/dist/esm/gx-ide-data-type-selector.entry.js +121 -40
  15. package/dist/esm/gx-ide-data-type-selector.entry.js.map +1 -1
  16. package/dist/esm/loader.js +1 -1
  17. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  18. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  19. package/dist/genexus-ide-ui/gx-ide-assets/data-type-selector/langs/data-type-selector.lang.en.json +1 -1
  20. package/dist/genexus-ide-ui/p-7cece7a8.entry.js +344 -0
  21. package/dist/genexus-ide-ui/p-7cece7a8.entry.js.map +1 -0
  22. package/dist/types/components/data-type-selector/data-type-selector.d.ts +16 -12
  23. package/dist/types/components.d.ts +20 -4
  24. package/package.json +1 -1
  25. package/dist/genexus-ide-ui/p-ca6eb9fd.entry.js +0 -255
  26. package/dist/genexus-ide-ui/p-ca6eb9fd.entry.js.map +0 -1
@@ -0,0 +1,344 @@
1
+ import { r as t, h as e, H as s, a as i } from "./p-25a9f1d7.js";
2
+
3
+ import { g as n } from "./p-2987a259.js";
4
+
5
+ import { L as o } from "./p-311eedf3.js";
6
+
7
+ const mapCategoryToListItemGroup = t => {
8
+ const e = {
9
+ caption: t.name,
10
+ id: t.name,
11
+ type: "group",
12
+ expanded: true,
13
+ expandable: true,
14
+ items: t.types.map((t => ({
15
+ caption: t.name,
16
+ id: t.name,
17
+ selected: t.selected,
18
+ additionalInformation: {
19
+ "stretch-start": {
20
+ center: [ {
21
+ imgSrc: t.icon
22
+ } ]
23
+ }
24
+ },
25
+ type: "actionable"
26
+ })))
27
+ };
28
+ return e;
29
+ };
30
+
31
+ const mapDataTypesToList = t => t.map(((t, e) => ({
32
+ caption: t.name,
33
+ id: t.name,
34
+ selected: t.selected,
35
+ additionalInformation: {
36
+ "stretch-start": {
37
+ center: [ {
38
+ imgSrc: t.icon || undefined
39
+ } ]
40
+ }
41
+ },
42
+ type: "actionable",
43
+ order: e
44
+ })));
45
+
46
+ const a = ":host{position:relative;display:grid;block-size:100%;overflow:auto;grid-template-rows:1fr max-content;--control__border-width:var(--mer-border__width--sm);--control__border-radius:var(--mer-border__radius--sm)}.main{display:contents}.selected-category{margin:0;text-transform:capitalize;margin-inline-start:var(--mer-spacing--md);white-space:nowrap}.footer{overflow:auto;padding:var(--mer-spacing--xs)}.list-box::part(item__action),.list-box::part(group__action){font-size:var(--font-size-body-s) !important}";
47
+
48
+ var r = undefined && undefined.__classPrivateFieldGet || function(t, e, s, i) {
49
+ if (s === "a" && !i) throw new TypeError("Private accessor was defined without a getter");
50
+ if (typeof e === "function" ? t !== e || !i : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
51
+ return s === "m" ? i : s === "a" ? i.call(t) : i ? i.value : e.get(t);
52
+ };
53
+
54
+ var h = undefined && undefined.__classPrivateFieldSet || function(t, e, s, i, n) {
55
+ if (i === "m") throw new TypeError("Private method is not writable");
56
+ if (i === "a" && !n) throw new TypeError("Private accessor was defined without a setter");
57
+ if (typeof e === "function" ? t !== e || !n : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
58
+ return i === "a" ? n.call(t, s) : n ? n.value = s : e.set(t, s), s;
59
+ };
60
+
61
+ var c, f, l, d, p, u, w, m, y, b, g, k, M, v, T, W, C;
62
+
63
+ const _ = [ "resets/box-sizing", "components/list-box", "utils/form--full", "utils/typography", "utils/layout", "utils/spacing", "chameleon/scrollbar" ];
64
+
65
+ const x = "ArrowUp";
66
+
67
+ const I = "ArrowDown";
68
+
69
+ const $ = "Enter";
70
+
71
+ const E = "Tab";
72
+
73
+ const D = "all";
74
+
75
+ const j = "recenttly-used";
76
+
77
+ const z = n({
78
+ category: "system",
79
+ name: "time",
80
+ colorType: "primary"
81
+ });
82
+
83
+ const A = class {
84
+ constructor(s) {
85
+ t(this, s);
86
+ c.set(this, void 0);
87
+ f.set(this, false);
88
+ l.set(this, new Map);
89
+ d.set(this, new Map);
90
+ p.set(this, new Map);
91
+ u.set(this, null);
92
+ w.set(this, {
93
+ // For setting focus
94
+ categoryId: undefined,
95
+ dataTypeId: undefined
96
+ });
97
+ m.set(this, false);
98
+ y.set(this, void 0);
99
+ b.set(this, (t => {
100
+ const e = t.find((t => t.tagName === "CH-ACTION-LIST-ITEM"));
101
+ if (e) {
102
+ const t = e.id;
103
+ const s = r(this, p, "f").get(t);
104
+ this.dataTypeSelectedCallback(s);
105
+ }
106
+ }));
107
+ g.set(this, (t => {
108
+ const e = t.key;
109
+ const s = t.composedPath();
110
+ if (e === x || e === I) {
111
+ h(this, u, e, "f");
112
+ if (e === x) {
113
+ // Check if this is the first group. IF it is, let the host know,
114
+ // so it can close the dialog.
115
+ const t = s.find((t => t.tagName === "CH-ACTION-LIST-ITEM"));
116
+ if (t !== undefined) {
117
+ return;
118
+ }
119
+ // This is a ch-action-list-group
120
+ const e = s.find((t => t.tagName === "CH-ACTION-LIST-GROUP"));
121
+ const i = e.id;
122
+ const n = r(this, y, "f").shadowRoot.firstElementChild.id;
123
+ if (i === n) {
124
+ this.arrowUpOnFirstElement();
125
+ }
126
+ }
127
+ } else if (e === $) {
128
+ r(this, b, "f").call(this, s);
129
+ } else if (e === E) {
130
+ t.stopPropagation();
131
+ }
132
+ }));
133
+ k.set(this, (t => {
134
+ if (r(this, u, "f")) ; else if (t.detail === 0) {
135
+ // ignore keyboard Enter (Enter happens by default on buttons on onClick)
136
+ return;
137
+ } else {
138
+ const e = t.composedPath();
139
+ r(this, b, "f").call(this, e);
140
+ }
141
+ h(this, u, null, "f");
142
+ }));
143
+ M.set(this, (() => {
144
+ if (!r(this, f, "f")) {
145
+ const t = [];
146
+ let e = 1;
147
+ const s = r(this, l, "f").size;
148
+ for (const i of r(this, l, "f").keys()) {
149
+ t.push(r(this, l, "f").get(i));
150
+ if (e !== s) {
151
+ t.push({
152
+ type: "separator"
153
+ });
154
+ }
155
+ e++;
156
+ }
157
+ this.categoriesListBoxModel = t;
158
+ h(this, f, true, "f");
159
+ this.selectedCategory = D;
160
+ }
161
+ }));
162
+ v.set(this, (() => {
163
+ h(this, f, false, "f");
164
+ this.categoriesListBoxModel = this.recentlyUsedActionListModel;
165
+ this.selectedCategory = j;
166
+ }));
167
+ this.selectedCategoryHandler = t => {
168
+ this.selectedCategory = t.currentTarget.dataset.name;
169
+ const e = [ r(this, l, "f").get(this.selectedCategory) ];
170
+ this.categoriesListBoxModel = e;
171
+ h(this, f, false, "f");
172
+ };
173
+ T.set(this, (t => {
174
+ // Prevents bubbling, which causes this component to close, due to how the IDE handles Tab event
175
+ // in a parent element.
176
+ if (t.key === E || t.key === $) {
177
+ t.stopPropagation();
178
+ }
179
+ }));
180
+ W.set(this, (() => {
181
+ const t = this.selectedCategory === j ? "button-secondary" : "button-tertiary";
182
+ const s = this.selectedCategory === D ? "button-secondary" : "button-tertiary";
183
+ let i = this.selectedCategory;
184
+ if (this.selectedCategory === j) {
185
+ i = r(this, c, "f").fixedTypes.recentlyUsed;
186
+ } else if (this.selectedCategory === D) {
187
+ i = r(this, c, "f").fixedTypes.all;
188
+ } else {
189
+ i = this.selectedCategory;
190
+ }
191
+ return e("footer", {
192
+ class: "footer control-footer control-footer-start scrollable\n "
193
+ }, e("div", {
194
+ class: "buttons-spacer"
195
+ }, this.recentlyUsed && this.recentlyUsed.length > 0 && e("button", {
196
+ class: `button-icon-only ${t}`,
197
+ "aria-label": `${r(this, c, "f").select} ${r(this, c, "f").fixedTypes.recentlyUsed}`,
198
+ title: `${r(this, c, "f").select} ${r(this, c, "f").fixedTypes.recentlyUsed}`,
199
+ onClick: r(this, v, "f"),
200
+ onKeyDown: r(this, T, "f")
201
+ }, e("ch-image", {
202
+ class: "icon-md",
203
+ src: z
204
+ })), e("button", {
205
+ class: `button-icon-only ${s}`,
206
+ onClick: r(this, M, "f"),
207
+ onKeyDown: r(this, T, "f"),
208
+ "aria-label": `${r(this, c, "f").select} ${r(this, c, "f").fixedTypes.all}`,
209
+ title: `${r(this, c, "f").select} ${r(this, c, "f").fixedTypes.all}`
210
+ }, "[*]"), this.categories.map((t => {
211
+ const s = t.name === this.selectedCategory ? "button-secondary" : "button-tertiary";
212
+ return e("button", {
213
+ class: `button-icon-only ${s}`,
214
+ "aria-label": t.name,
215
+ title: t.name,
216
+ onClick: this.selectedCategoryHandler,
217
+ onKeyDown: r(this, T, "f"),
218
+ "data-name": t.name
219
+ }, e("ch-image", {
220
+ class: "icon-md",
221
+ src: t.icon
222
+ }));
223
+ }))), e("p", {
224
+ class: "body-regular-s selected-category"
225
+ }, i));
226
+ }));
227
+ C.set(this, (async () => {
228
+ if (r(this, m, "f")) {
229
+ return;
230
+ }
231
+ let t;
232
+ setTimeout((() => {
233
+ // setTimeout as a WA, since the list-box elements are not rendered/read immediatelly
234
+ if (this.focusType === "selected" && r(this, w, "f").categoryId && r(this, w, "f").dataTypeId) {
235
+ // set focus on the selected element
236
+ const e = r(this, y, "f").shadowRoot.getElementById(r(this, w, "f").dataTypeId);
237
+ if (e) {
238
+ t = e;
239
+ }
240
+ } else {
241
+ // set focus of the first element
242
+ const e = r(this, y, "f").shadowRoot.firstElementChild;
243
+ const s = e.shadowRoot.firstElementChild;
244
+ t = s;
245
+ }
246
+ t && t.focus();
247
+ h(this, m, true, "f");
248
+ }), 150);
249
+ }));
250
+ this.categoriesListBoxModel = [];
251
+ this.selectedCategory = undefined;
252
+ this.recentlyUsedActionListModel = [];
253
+ this.loading = true;
254
+ this.categoriesJustChanged = false;
255
+ this.actionListDidRender = false;
256
+ this.categories = undefined;
257
+ this.dataTypeSelectedCallback = undefined;
258
+ this.arrowUpOnFirstElement = undefined;
259
+ this.focusType = "first-element";
260
+ this.recentlyUsed = [];
261
+ }
262
+ categoriesChanged(t) {
263
+ if (!(t === null || t === void 0 ? void 0 : t.length)) {
264
+ return;
265
+ }
266
+ r(this, l, "f").clear();
267
+ t.forEach((t => {
268
+ const e = mapCategoryToListItemGroup(t);
269
+ r(this, l, "f").set(t.name, e);
270
+ t.types.forEach((e => {
271
+ const s = e.selected;
272
+ if (s) {
273
+ // For setting focus
274
+ r(this, w, "f").categoryId = t.name;
275
+ r(this, w, "f").dataTypeId = e.name;
276
+ }
277
+ r(this, d, "f").set(e.name, t.id);
278
+ r(this, p, "f").set(e.name, {
279
+ id: t.id,
280
+ name: e.name,
281
+ icon: e.icon,
282
+ selected: e.selected
283
+ });
284
+ }));
285
+ }));
286
+ this.loading = false;
287
+ r(this, M, "f").call(this);
288
+ this.categoriesJustChanged = true;
289
+ }
290
+ recentlyUsedChanged(t) {
291
+ this.recentlyUsedActionListModel = null;
292
+ this.recentlyUsedActionListModel = mapDataTypesToList(t);
293
+ }
294
+ async componentWillLoad() {
295
+ h(this, c, await o.getComponentStrings(this.el), "f");
296
+ // initialize models
297
+ this.recentlyUsed.length && this.recentlyUsedChanged(this.recentlyUsed);
298
+ }
299
+ render() {
300
+ return e(s, {
301
+ class: "widget"
302
+ }, e("ch-theme", {
303
+ model: _
304
+ }), this.loading ? e("gx-ide-loader", {
305
+ loaderTitle: r(this, c, "f").loader.title,
306
+ description: r(this, c, "f").loader.description,
307
+ show: true
308
+ }) : e("section", {
309
+ class: "main"
310
+ }, e("ch-action-list-render", {
311
+ ref: async t => {
312
+ h(this, y, t, "f");
313
+ r(this, C, "f").call(this);
314
+ },
315
+ class: "list-box",
316
+ model: this.categoriesListBoxModel,
317
+ selection: "single",
318
+ onKeyDown: r(this, g, "f"),
319
+ onClick: r(this, k, "f")
320
+ }), r(this, W, "f").call(this)));
321
+ }
322
+ static get assetsDirs() {
323
+ return [ "gx-ide-assets/data-type-selector" ];
324
+ }
325
+ get el() {
326
+ return i(this);
327
+ }
328
+ static get watchers() {
329
+ return {
330
+ categories: [ "categoriesChanged" ],
331
+ recentlyUsed: [ "recentlyUsedChanged" ]
332
+ };
333
+ }
334
+ };
335
+
336
+ c = new WeakMap, f = new WeakMap, l = new WeakMap, d = new WeakMap, p = new WeakMap,
337
+ u = new WeakMap, w = new WeakMap, m = new WeakMap, y = new WeakMap, b = new WeakMap,
338
+ g = new WeakMap, k = new WeakMap, M = new WeakMap, v = new WeakMap, T = new WeakMap,
339
+ W = new WeakMap, C = new WeakMap;
340
+
341
+ A.style = a;
342
+
343
+ export { A as gx_ide_data_type_selector };
344
+ //# sourceMappingURL=p-7cece7a8.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["mapCategoryToListItemGroup","category","categoryGroup","caption","name","id","type","expanded","expandable","items","types","map","selected","additionalInformation","center","imgSrc","icon","mapDataTypesToList","dataTypes","dataType","index","undefined","order","dataTypeSelectorCss","CSS_BUNDLES","ARROW_UP_KEY","ARROW_DOWN_KEY","ENTER_KEY","TAB_KEY","ALL_CATEGORY_ID","RECENTLY_USED_CATEGORY_ID","CLOCK_ICON","getIconPath","colorType","GxIdeKbManagerImport","_GxIdeKbManagerImport__componentLocale","set","this","_GxIdeKbManagerImport_showAll","_GxIdeKbManagerImport_categoriesActionListItemGroupMap","Map","_GxIdeKbManagerImport_dataTypeCategoryMap","_GxIdeKbManagerImport_dataTypeDataIdMap","_GxIdeKbManagerImport_lastArrowKey","_GxIdeKbManagerImport_selectedDataTypeIds","categoryId","dataTypeId","_GxIdeKbManagerImport_focusAlreadySet","_GxIdeKbManagerImport_actionListEl","_GxIdeKbManagerImport_evaluateSelectionChanged","path","chActionListItem","find","el","tagName","dataTypeData","__classPrivateFieldGet","get","dataTypeSelectedCallback","_GxIdeKbManagerImport_listKeyDownHandler","event","pressedKey","key","composedPath","__classPrivateFieldSet","actionGroup","currentFocusedActionGroupId","firstActionListGroupId","shadowRoot","firstElementChild","arrowUpOnFirstElement","call","stopPropagation","_GxIdeKbManagerImport_listClickHandler","detail","_GxIdeKbManagerImport_showAllObjects","allCategoriesActionListModel","counter","mapLength","size","keys","push","categoriesListBoxModel","selectedCategory","_GxIdeKbManagerImport_showRecentlyObjects","recentlyUsedActionListModel","selectedCategoryHandler","e","currentTarget","dataset","newSelectedCategory","_GxIdeKbManagerImport_handleButtonTab","_GxIdeKbManagerImport_renderFooter","recentlyUsedBtnClass","allBtnClass","selectedCategoryDescription","fixedTypes","recentlyUsed","all","h","class","length","select","title","onClick","onKeyDown","src","categories","buttonClass","_GxIdeKbManagerImport_setFocus","async","focusableElement","setTimeout","focusType","selectedDataTypeEl","getElementById","firstActionListGroup","firstButton","focus","categoriesChanged","newCategories","clear","forEach","categoryListBoxModel","isSelected","loading","categoriesJustChanged","recentlyUsedChanged","newRecentlyUsed","componentWillLoad","Locale","getComponentStrings","render","Host","model","loaderTitle","loader","description","show","ref","selection"],"sources":["src/components/data-type-selector/helpers.ts","src/components/data-type-selector/data-type-selector.scss?tag=gx-ide-data-type-selector&encapsulation=shadow","src/components/data-type-selector/data-type-selector.tsx"],"sourcesContent":["import { DataTypeCategoryData, DataTypeData } from \"./data-type-selector\";\nimport {\n ActionListItemGroup,\n ActionListModel\n} from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\n\nexport const mapCategoryToListItemGroup = (\n category: DataTypeCategoryData\n): ActionListItemGroup => {\n const categoryGroup: ActionListItemGroup = {\n caption: category.name,\n id: category.name,\n type: \"group\",\n expanded: true,\n expandable: true,\n items: category.types.map(type => {\n return {\n caption: type.name,\n id: type.name,\n selected: type.selected,\n additionalInformation: {\n \"stretch-start\": {\n center: [{ imgSrc: type.icon }]\n }\n },\n type: \"actionable\"\n };\n })\n };\n return categoryGroup;\n};\n\nexport const mapDataTypesToList = (\n dataTypes: DataTypeData[]\n): ActionListModel => {\n return dataTypes.map((dataType, index) => {\n return {\n caption: dataType.name,\n id: dataType.name,\n selected: dataType.selected,\n additionalInformation: {\n \"stretch-start\": {\n center: [{ imgSrc: dataType.icon || undefined }]\n }\n },\n type: \"actionable\",\n order: index\n };\n });\n};\n",":host {\n position: relative;\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr max-content;\n\n // WA: Prevent a custom css rule on genexus-web from overriding --control__border-width value.\n // TDOO: remove this when the custom style is removed from genexus-web.\n // custom stlye is: .gx-struct-editor .tabular-grid-cell {\n // --control__border-width: 0;\n // }\n\n --control__border-width: var(--mer-border__width--sm);\n --control__border-radius: var(--mer-border__radius--sm);\n}\n\n.main {\n display: contents;\n}\n\n.selected-category {\n margin: 0;\n text-transform: capitalize;\n margin-inline-start: var(\n --mer-spacing--md\n ); // TODO: Create a semantic class in Mercury for this case.\n white-space: nowrap;\n}\n\n.footer {\n overflow: auto;\n padding: var(--mer-spacing--xs);\n}\n\n// WA: Reduce font-size. This should be solved on Mercury.\n.list-box::part(item__action),\n.list-box::part(group__action) {\n font-size: var(--font-size-body-s) !important;\n}\n","// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n// Other Libraries\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\nimport {\n ActionListItemModel,\n ActionListModel\n} from \"@genexus/chameleon-controls-library\";\nimport { ActionListItemGroup } from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\n// Gx Ide Ui\nimport { Locale } from \"../../common/locale\";\nimport { mapCategoryToListItemGroup, mapDataTypesToList } from \"./helpers\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/list-box\",\n \"utils/form--full\",\n \"utils/typography\",\n \"utils/layout\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst ARROW_UP_KEY = \"ArrowUp\";\nconst ARROW_DOWN_KEY = \"ArrowDown\";\nconst ENTER_KEY = \"Enter\";\nconst TAB_KEY = \"Tab\";\n\nconst ALL_CATEGORY_ID = \"all\";\nconst RECENTLY_USED_CATEGORY_ID = \"recenttly-used\";\n\nconst CLOCK_ICON = getIconPath({\n category: \"system\",\n name: \"time\",\n colorType: \"primary\"\n});\n\n@Component({\n tag: \"gx-ide-data-type-selector\",\n styleUrl: \"data-type-selector.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/data-type-selector\"]\n})\nexport class GxIdeKbManagerImport {\n #_componentLocale: any;\n #showAll: boolean = false;\n #categoriesActionListItemGroupMap: Map<string, ActionListItemGroup> = new Map<\n string,\n ActionListItemGroup\n >();\n\n #dataTypeCategoryMap: Map<string, string> = new Map<string, string>();\n #dataTypeDataIdMap: Map<string, DataTypeData> = new Map<\n string,\n DataTypeData\n >();\n #lastArrowKey: typeof ARROW_UP_KEY | typeof ARROW_DOWN_KEY | null = null;\n #selectedDataTypeIds: SelectedDataTypeIds = {\n // For setting focus\n categoryId: undefined,\n dataTypeId: undefined\n };\n #focusAlreadySet: boolean = false;\n\n #actionListEl!: HTMLChActionListRenderElement;\n @Element() el: HTMLGxIdeDataTypeSelectorElement;\n\n @State() categoriesListBoxModel: ActionListItemModel[] = [];\n @State() selectedCategory: string;\n @State() recentlyUsedActionListModel: ActionListModel = [];\n @State() loading: boolean = true;\n @State() categoriesJustChanged: boolean = false;\n @State() actionListDidRender: boolean = false;\n\n /**\n * All possible types and its category\n */\n @Prop() readonly categories: DataTypeCategoryData[] = undefined;\n @Watch(\"categories\")\n categoriesChanged(newCategories: DataTypeCategoryData[]) {\n if (!newCategories?.length) {\n return;\n }\n\n this.#categoriesActionListItemGroupMap.clear();\n newCategories.forEach(category => {\n const categoryListBoxModel = mapCategoryToListItemGroup(category);\n this.#categoriesActionListItemGroupMap.set(\n category.name,\n categoryListBoxModel\n );\n category.types.forEach(type => {\n const isSelected = type.selected;\n if (isSelected) {\n // For setting focus\n this.#selectedDataTypeIds.categoryId = category.name;\n this.#selectedDataTypeIds.dataTypeId = type.name;\n }\n\n this.#dataTypeCategoryMap.set(type.name, category.id);\n this.#dataTypeDataIdMap.set(type.name, {\n id: category.id,\n name: type.name,\n icon: type.icon,\n selected: type.selected\n });\n });\n });\n this.loading = false;\n this.#showAllObjects();\n this.categoriesJustChanged = true;\n }\n\n /**\n * Callback invoked when the user has selected an item type\n */\n @Prop() readonly dataTypeSelectedCallback: DataTypeSelectedCallback;\n\n /**\n * Defines the type of focus applied when the component renders for the first time.\n */\n @Prop() readonly arrowUpOnFirstElement: ArrowFirstOnFirstElement;\n\n /**\n * Defines the type of focus applied when the component renders for the first time.\n */\n @Prop() readonly focusType: \"first-element\" | \"selected\" = \"first-element\";\n\n /**\n * All recently used types list\n */\n @Prop() readonly recentlyUsed: DataTypeData[] = [];\n @Watch(\"recentlyUsed\")\n recentlyUsedChanged(newRecentlyUsed: DataTypeData[]) {\n this.recentlyUsedActionListModel = null;\n this.recentlyUsedActionListModel = mapDataTypesToList(newRecentlyUsed);\n }\n\n async componentWillLoad() {\n this.#_componentLocale = await Locale.getComponentStrings(this.el);\n // initialize models\n this.recentlyUsed.length && this.recentlyUsedChanged(this.recentlyUsed);\n }\n\n #evaluateSelectionChanged = (path: EventTarget[]) => {\n const chActionListItem = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-ITEM\"\n );\n if (chActionListItem) {\n const id = (chActionListItem as HTMLElement).id;\n const dataTypeData = this.#dataTypeDataIdMap.get(id);\n this.dataTypeSelectedCallback(dataTypeData);\n }\n };\n\n #listKeyDownHandler = (event: KeyboardEvent) => {\n const pressedKey = event.key;\n const path = event.composedPath();\n\n if (pressedKey === ARROW_UP_KEY || pressedKey === ARROW_DOWN_KEY) {\n this.#lastArrowKey = pressedKey;\n\n if (pressedKey === ARROW_UP_KEY) {\n // Check if this is the first group. IF it is, let the host know,\n // so it can close the dialog.\n\n const chActionListItem = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-ITEM\"\n );\n\n if (chActionListItem !== undefined) {\n return;\n }\n\n // This is a ch-action-list-group\n const actionGroup = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-GROUP\"\n );\n const currentFocusedActionGroupId = (actionGroup as HTMLElement).id;\n\n const firstActionListGroupId =\n this.#actionListEl.shadowRoot.firstElementChild.id;\n\n if (currentFocusedActionGroupId === firstActionListGroupId) {\n this.arrowUpOnFirstElement();\n }\n }\n } else if (pressedKey === ENTER_KEY) {\n this.#evaluateSelectionChanged(path);\n } else if (pressedKey === TAB_KEY) {\n event.stopPropagation();\n }\n };\n\n #listClickHandler = (event: MouseEvent) => {\n if (this.#lastArrowKey) {\n // User navigated with ArrowUp or ArrowDown\n // Ignore, since this was not a click event.\n } else if (event.detail === 0) {\n // ignore keyboard Enter (Enter happens by default on buttons on onClick)\n return;\n } else {\n const path = event.composedPath();\n this.#evaluateSelectionChanged(path);\n }\n this.#lastArrowKey = null;\n };\n\n #showAllObjects = () => {\n if (!this.#showAll) {\n const allCategoriesActionListModel: ActionListItemModel[] = [];\n let counter = 1;\n const mapLength = this.#categoriesActionListItemGroupMap.size;\n for (const key of this.#categoriesActionListItemGroupMap.keys()) {\n allCategoriesActionListModel.push(\n this.#categoriesActionListItemGroupMap.get(key)\n );\n if (counter !== mapLength) {\n allCategoriesActionListModel.push({ type: \"separator\" });\n }\n counter++;\n }\n this.categoriesListBoxModel = allCategoriesActionListModel;\n this.#showAll = true;\n this.selectedCategory = ALL_CATEGORY_ID;\n }\n };\n\n #showRecentlyObjects = () => {\n this.#showAll = false;\n this.categoriesListBoxModel = this.recentlyUsedActionListModel;\n this.selectedCategory = RECENTLY_USED_CATEGORY_ID;\n };\n\n private selectedCategoryHandler = (e: MouseEvent) => {\n this.selectedCategory = (e.currentTarget as HTMLButtonElement).dataset.name;\n const newSelectedCategory = [\n this.#categoriesActionListItemGroupMap.get(this.selectedCategory)\n ];\n this.categoriesListBoxModel = newSelectedCategory;\n this.#showAll = false;\n };\n\n #handleButtonTab = (event: KeyboardEvent) => {\n // Prevents bubbling, which causes this component to close, due to how the IDE handles Tab event\n // in a parent element.\n if (event.key === TAB_KEY || event.key === ENTER_KEY) {\n event.stopPropagation();\n }\n };\n\n #renderFooter = () => {\n const recentlyUsedBtnClass =\n this.selectedCategory === RECENTLY_USED_CATEGORY_ID\n ? \"button-secondary\"\n : \"button-tertiary\";\n const allBtnClass =\n this.selectedCategory === ALL_CATEGORY_ID\n ? \"button-secondary\"\n : \"button-tertiary\";\n let selectedCategoryDescription = this.selectedCategory;\n if (this.selectedCategory === RECENTLY_USED_CATEGORY_ID) {\n selectedCategoryDescription =\n this.#_componentLocale.fixedTypes.recentlyUsed;\n } else if (this.selectedCategory === ALL_CATEGORY_ID) {\n selectedCategoryDescription = this.#_componentLocale.fixedTypes.all;\n } else {\n selectedCategoryDescription = this.selectedCategory;\n }\n\n return (\n <footer\n class=\"footer control-footer control-footer-start scrollable\n \"\n >\n <div class=\"buttons-spacer\">\n {this.recentlyUsed && this.recentlyUsed.length > 0 && (\n <button\n class={`button-icon-only ${recentlyUsedBtnClass}`}\n aria-label={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.recentlyUsed\n }`}\n title={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.recentlyUsed\n }`}\n onClick={this.#showRecentlyObjects}\n onKeyDown={this.#handleButtonTab}\n >\n <ch-image class=\"icon-md\" src={CLOCK_ICON}></ch-image>\n </button>\n )}\n <button\n class={`button-icon-only ${allBtnClass}`}\n onClick={this.#showAllObjects}\n onKeyDown={this.#handleButtonTab}\n aria-label={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.all\n }`}\n title={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.all\n }`}\n >\n [*]\n </button>\n {this.categories.map(category => {\n const buttonClass =\n category.name === this.selectedCategory\n ? \"button-secondary\"\n : \"button-tertiary\";\n\n return (\n <button\n class={`button-icon-only ${buttonClass}`}\n aria-label={category.name}\n title={category.name}\n onClick={this.selectedCategoryHandler}\n onKeyDown={this.#handleButtonTab}\n data-name={category.name}\n >\n <ch-image class=\"icon-md\" src={category.icon}></ch-image>\n </button>\n );\n })}\n </div>\n <p class=\"body-regular-s selected-category\">\n {selectedCategoryDescription}\n </p>\n </footer>\n );\n };\n\n #setFocus = async () => {\n if (this.#focusAlreadySet) {\n return;\n }\n let focusableElement: HTMLElement;\n\n setTimeout(() => {\n // setTimeout as a WA, since the list-box elements are not rendered/read immediatelly\n if (\n this.focusType === \"selected\" &&\n this.#selectedDataTypeIds.categoryId &&\n this.#selectedDataTypeIds.dataTypeId\n ) {\n // set focus on the selected element\n const selectedDataTypeEl = this.#actionListEl.shadowRoot.getElementById(\n this.#selectedDataTypeIds.dataTypeId\n );\n if (selectedDataTypeEl) {\n focusableElement = selectedDataTypeEl;\n }\n } else {\n // set focus of the first element\n const firstActionListGroup =\n this.#actionListEl.shadowRoot.firstElementChild;\n\n const firstButton = firstActionListGroup.shadowRoot.firstElementChild;\n focusableElement = firstButton as HTMLButtonElement;\n }\n\n focusableElement && (focusableElement as HTMLElement).focus();\n this.#focusAlreadySet = true;\n }, 150);\n };\n\n render(): void {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n {this.loading ? (\n <gx-ide-loader\n loaderTitle={this.#_componentLocale.loader.title}\n description={this.#_componentLocale.loader.description}\n show\n ></gx-ide-loader>\n ) : (\n <section class=\"main\">\n <ch-action-list-render\n ref={async el => {\n this.#actionListEl = el as HTMLChActionListRenderElement;\n this.#setFocus();\n }}\n class=\"list-box\"\n model={this.categoriesListBoxModel}\n selection=\"single\"\n onKeyDown={this.#listKeyDownHandler}\n onClick={this.#listClickHandler}\n ></ch-action-list-render>\n {this.#renderFooter()}\n </section>\n )}\n </Host>\n );\n }\n}\n\nexport type DataTypeCategoryData = {\n id: string;\n name: string;\n icon: string;\n types: DataTypeData[];\n};\nexport type DataTypeData = {\n id: string;\n name: string;\n icon: string;\n selected: boolean;\n};\n\nexport type DataTypeSelectedCallback = (data: DataTypeData) => Promise<void>;\n\ntype SelectedDataTypeIds = {\n categoryId: string;\n dataTypeId: string;\n};\n\nexport type ArrowFirstOnFirstElement = () => Promise<void>;\n"],"mappings":";;;;;;AAMO,MAAMA,6BACXC;EAEA,MAAMC,IAAqC;IACzCC,SAASF,EAASG;IAClBC,IAAIJ,EAASG;IACbE,MAAM;IACNC,UAAU;IACVC,YAAY;IACZC,OAAOR,EAASS,MAAMC,KAAIL,MACjB;MACLH,SAASG,EAAKF;MACdC,IAAIC,EAAKF;MACTQ,UAAUN,EAAKM;MACfC,uBAAuB;QACrB,iBAAiB;UACfC,QAAQ,EAAC;YAAEC,QAAQT,EAAKU;;;;MAG5BV,MAAM;;;EAIZ,OAAOJ;AAAa;;AAGf,MAAMe,qBACXC,KAEOA,EAAUP,KAAI,CAACQ,GAAUC,OACvB;EACLjB,SAASgB,EAASf;EAClBC,IAAIc,EAASf;EACbQ,UAAUO,EAASP;EACnBC,uBAAuB;IACrB,iBAAiB;MACfC,QAAQ,EAAC;QAAEC,QAAQI,EAASH,QAAQK;;;;EAGxCf,MAAM;EACNgB,OAAOF;;;AC9Cb,MAAMG,IAAsB;;;;;;;;;;;;;;;;;ACa5B,MAAMC,IAA8B,EAClC,qBACA,uBACA,oBACA,oBACA,gBACA,iBACA;;AAGF,MAAMC,IAAe;;AACrB,MAAMC,IAAiB;;AACvB,MAAMC,IAAY;;AAClB,MAAMC,IAAU;;AAEhB,MAAMC,IAAkB;;AACxB,MAAMC,IAA4B;;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jB,EAAAnB,MAAIuD,GAAA,KAAcrB,KAAlBlC"}
@@ -4,18 +4,27 @@ export declare class GxIdeKbManagerImport {
4
4
  el: HTMLGxIdeDataTypeSelectorElement;
5
5
  categoriesListBoxModel: ActionListItemModel[];
6
6
  selectedCategory: string;
7
- statusInfo: StatusInfo[];
8
7
  recentlyUsedActionListModel: ActionListModel;
9
8
  loading: boolean;
9
+ categoriesJustChanged: boolean;
10
+ actionListDidRender: boolean;
10
11
  /**
11
12
  * All possible types and its category
12
13
  */
13
14
  readonly categories: DataTypeCategoryData[];
14
15
  categoriesChanged(newCategories: DataTypeCategoryData[]): void;
15
16
  /**
16
- * Callback invoked when user select an item type
17
+ * Callback invoked when the user has selected an item type
17
18
  */
18
19
  readonly dataTypeSelectedCallback: DataTypeSelectedCallback;
20
+ /**
21
+ * Defines the type of focus applied when the component renders for the first time.
22
+ */
23
+ readonly arrowUpOnFirstElement: ArrowFirstOnFirstElement;
24
+ /**
25
+ * Defines the type of focus applied when the component renders for the first time.
26
+ */
27
+ readonly focusType: "first-element" | "selected";
19
28
  /**
20
29
  * All recently used types list
21
30
  */
@@ -25,22 +34,17 @@ export declare class GxIdeKbManagerImport {
25
34
  private selectedCategoryHandler;
26
35
  render(): void;
27
36
  }
28
- type StatusInfo = {
29
- [key: string]: {
30
- display: boolean;
31
- };
32
- };
33
37
  export type DataTypeCategoryData = {
38
+ id: string;
34
39
  name: string;
35
40
  icon: string;
36
41
  types: DataTypeData[];
37
42
  };
38
43
  export type DataTypeData = {
44
+ id: string;
39
45
  name: string;
40
46
  icon: string;
47
+ selected: boolean;
41
48
  };
42
- export type DataTypeSelectedCallback = (data: {
43
- name: string;
44
- icon: string;
45
- }) => Promise<void>;
46
- export {};
49
+ export type DataTypeSelectedCallback = (data: DataTypeData) => Promise<void>;
50
+ export type ArrowFirstOnFirstElement = () => Promise<void>;
@@ -29,7 +29,7 @@ import { KBData, KBVersion, KnowledgeBaseInfo } from "./components/team-dev/crea
29
29
  import { MenuAlign, Mode, UserInfo } from "./components/current-user-info/current-user-info";
30
30
  import { EditResult, EnvironmentData, KBData as KBData1, recentObjectData } from "./components/dashboard-home/dashboard-home";
31
31
  import { CancelCallback as CancelCallback4, ConfirmCallback as ConfirmCallback3, EditCallback, LoadItemsCallback, NewVariableCallback, SelectObjectCallback } from "./components/data-selector/data-selector";
32
- import { DataTypeCategoryData, DataTypeData, DataTypeSelectedCallback } from "./components/data-type-selector/data-type-selector";
32
+ import { ArrowFirstOnFirstElement, DataTypeCategoryData, DataTypeData, DataTypeSelectedCallback } from "./components/data-type-selector/data-type-selector";
33
33
  import { AddObjectsCallback, CreateDeploymentUnitCallback, DeployCallback, DeployTargetData, GetDeploymentUnitObjectsCallback, ObjectTypeData, OptionsCallback } from "./components/deployment-tool/deployment-tool";
34
34
  import { CancelCallback as CancelCallback5, ConfirmCallback as ConfirmCallback4, LoadCallback, LoadDesignSystemCallback, LoadFontCallback, LoadImageCallback, LoadPanelDataCallback, ReactiveSettings, RequiresAccessTokenCallback, SelectModuleCallback, TextEditorFactoryCallback } from "./components/design-import/design-import";
35
35
  import { DirectorySelectorLabels, LabelPosition } from "./components/_helpers/directory-selector/directory-selector";
@@ -100,7 +100,7 @@ export { KBData, KBVersion, KnowledgeBaseInfo } from "./components/team-dev/crea
100
100
  export { MenuAlign, Mode, UserInfo } from "./components/current-user-info/current-user-info";
101
101
  export { EditResult, EnvironmentData, KBData as KBData1, recentObjectData } from "./components/dashboard-home/dashboard-home";
102
102
  export { CancelCallback as CancelCallback4, ConfirmCallback as ConfirmCallback3, EditCallback, LoadItemsCallback, NewVariableCallback, SelectObjectCallback } from "./components/data-selector/data-selector";
103
- export { DataTypeCategoryData, DataTypeData, DataTypeSelectedCallback } from "./components/data-type-selector/data-type-selector";
103
+ export { ArrowFirstOnFirstElement, DataTypeCategoryData, DataTypeData, DataTypeSelectedCallback } from "./components/data-type-selector/data-type-selector";
104
104
  export { AddObjectsCallback, CreateDeploymentUnitCallback, DeployCallback, DeployTargetData, GetDeploymentUnitObjectsCallback, ObjectTypeData, OptionsCallback } from "./components/deployment-tool/deployment-tool";
105
105
  export { CancelCallback as CancelCallback5, ConfirmCallback as ConfirmCallback4, LoadCallback, LoadDesignSystemCallback, LoadFontCallback, LoadImageCallback, LoadPanelDataCallback, ReactiveSettings, RequiresAccessTokenCallback, SelectModuleCallback, TextEditorFactoryCallback } from "./components/design-import/design-import";
106
106
  export { DirectorySelectorLabels, LabelPosition } from "./components/_helpers/directory-selector/directory-selector";
@@ -820,14 +820,22 @@ export namespace Components {
820
820
  "validate": () => Promise<boolean>;
821
821
  }
822
822
  interface GxIdeDataTypeSelector {
823
+ /**
824
+ * Defines the type of focus applied when the component renders for the first time.
825
+ */
826
+ "arrowUpOnFirstElement": ArrowFirstOnFirstElement;
823
827
  /**
824
828
  * All possible types and its category
825
829
  */
826
830
  "categories": DataTypeCategoryData[];
827
831
  /**
828
- * Callback invoked when user select an item type
832
+ * Callback invoked when the user has selected an item type
829
833
  */
830
834
  "dataTypeSelectedCallback": DataTypeSelectedCallback;
835
+ /**
836
+ * Defines the type of focus applied when the component renders for the first time.
837
+ */
838
+ "focusType": "first-element" | "selected";
831
839
  /**
832
840
  * All recently used types list
833
841
  */
@@ -4392,14 +4400,22 @@ declare namespace LocalJSX {
4392
4400
  "selectionType"?: "single" | "multiple";
4393
4401
  }
4394
4402
  interface GxIdeDataTypeSelector {
4403
+ /**
4404
+ * Defines the type of focus applied when the component renders for the first time.
4405
+ */
4406
+ "arrowUpOnFirstElement"?: ArrowFirstOnFirstElement;
4395
4407
  /**
4396
4408
  * All possible types and its category
4397
4409
  */
4398
4410
  "categories"?: DataTypeCategoryData[];
4399
4411
  /**
4400
- * Callback invoked when user select an item type
4412
+ * Callback invoked when the user has selected an item type
4401
4413
  */
4402
4414
  "dataTypeSelectedCallback"?: DataTypeSelectedCallback;
4415
+ /**
4416
+ * Defines the type of focus applied when the component renders for the first time.
4417
+ */
4418
+ "focusType"?: "first-element" | "selected";
4403
4419
  /**
4404
4420
  * All recently used types list
4405
4421
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genexus/genexus-ide-ui",
3
3
  "license": "Apache-2.0",
4
- "version": "1.1.14",
4
+ "version": "1.1.16",
5
5
  "description": "GeneXus IDE UI components",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.js",