@genexus/genexus-ide-ui 1.1.13 → 1.1.15

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 (142) hide show
  1. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  2. package/dist/cjs/gx-ide-about.cjs.entry.js +29 -15
  3. package/dist/cjs/gx-ide-about.cjs.entry.js.map +1 -1
  4. package/dist/cjs/gx-ide-bpm-export-xpdl.cjs.entry.js +2 -2
  5. package/dist/cjs/gx-ide-bpm-export-xpdl.cjs.entry.js.map +1 -1
  6. package/dist/cjs/gx-ide-data-type-selector.cjs.entry.js +121 -40
  7. package/dist/cjs/gx-ide-data-type-selector.cjs.entry.js.map +1 -1
  8. package/dist/cjs/gx-ide-empty-state.cjs.entry.js +2 -2
  9. package/dist/cjs/gx-ide-empty-state.cjs.entry.js.map +1 -1
  10. package/dist/cjs/gx-ide-file-uploader.cjs.entry.js +0 -13
  11. package/dist/cjs/gx-ide-file-uploader.cjs.entry.js.map +1 -1
  12. package/dist/cjs/gx-ide-plugin-details.cjs.entry.js +201 -0
  13. package/dist/cjs/gx-ide-plugin-details.cjs.entry.js.map +1 -0
  14. package/dist/cjs/gx-ide-plugin-explorer.cjs.entry.js +159 -0
  15. package/dist/cjs/gx-ide-plugin-explorer.cjs.entry.js.map +1 -0
  16. package/dist/cjs/gx-ide-sc-chat-container.cjs.entry.js +0 -1
  17. package/dist/cjs/gx-ide-sc-chat-container.cjs.entry.js.map +1 -1
  18. package/dist/cjs/loader.cjs.js +1 -1
  19. package/dist/collection/collection-manifest.json +3 -1
  20. package/dist/collection/components/_helpers/empty-state/gx-ide-empty-state.css +4 -0
  21. package/dist/collection/components/_helpers/empty-state/gx-ide-empty-state.js +1 -1
  22. package/dist/collection/components/_helpers/empty-state/gx-ide-empty-state.js.map +1 -1
  23. package/dist/collection/components/{_branding/about → about}/about.css +44 -15
  24. package/dist/collection/components/{_branding/about → about}/about.js +46 -62
  25. package/dist/collection/components/about/about.js.map +1 -0
  26. package/dist/collection/components/{_branding/about → about}/gx-ide-assets/about/langs/about.lang.en.json +3 -3
  27. package/dist/collection/components/{_branding/about → about}/gx-ide-assets/about/langs/about.lang.ja.json +3 -3
  28. package/dist/collection/components/{_branding/about → about}/gx-ide-assets/about/langs/about.lang.zh.json +3 -3
  29. package/dist/collection/components/bpm/export-xpdl/bpm-export-xpdl.js +2 -2
  30. package/dist/collection/components/bpm/export-xpdl/bpm-export-xpdl.js.map +1 -1
  31. package/dist/collection/components/data-type-selector/data-type-selector.css +1 -0
  32. package/dist/collection/components/data-type-selector/data-type-selector.js +165 -43
  33. package/dist/collection/components/data-type-selector/data-type-selector.js.map +1 -1
  34. package/dist/collection/components/data-type-selector/gx-ide-assets/data-type-selector/langs/data-type-selector.lang.en.json +1 -1
  35. package/dist/collection/components/data-type-selector/helpers.js +2 -0
  36. package/dist/collection/components/data-type-selector/helpers.js.map +1 -1
  37. package/dist/collection/components/file-uploader/file-uploader.js +0 -13
  38. package/dist/collection/components/file-uploader/file-uploader.js.map +1 -1
  39. package/dist/collection/components/plugin-details/gx-ide-assets/plugin-details/langs/plugin-details.lang.en.json +9 -0
  40. package/dist/collection/components/plugin-details/gx-ide-assets/plugin-details/langs/plugin-details.lang.ja.json +9 -0
  41. package/dist/collection/components/plugin-details/gx-ide-assets/plugin-details/langs/plugin-details.lang.zh.json +9 -0
  42. package/dist/collection/components/plugin-details/plugin-details.css +168 -0
  43. package/dist/collection/components/plugin-details/plugin-details.js +292 -0
  44. package/dist/collection/components/plugin-details/plugin-details.js.map +1 -0
  45. package/dist/collection/components/plugin-explorer/gx-ide-assets/plugin-explorer/images/plugin-icon.svg +10 -0
  46. package/dist/collection/components/plugin-explorer/gx-ide-assets/plugin-explorer/langs/plugin-explorer.lang.en.json +10 -0
  47. package/dist/collection/components/plugin-explorer/gx-ide-assets/plugin-explorer/langs/plugin-explorer.lang.ja.json +10 -0
  48. package/dist/collection/components/plugin-explorer/gx-ide-assets/plugin-explorer/langs/plugin-explorer.lang.zh.json +10 -0
  49. package/dist/collection/components/plugin-explorer/plugin-explorer.css +106 -0
  50. package/dist/collection/components/plugin-explorer/plugin-explorer.js +263 -0
  51. package/dist/collection/components/plugin-explorer/plugin-explorer.js.map +1 -0
  52. package/dist/collection/components/team-dev/bring-changes/gx-ide-assets/team-dev-bring-changes/langs/team-dev-bring-changes.lang.ja.json +45 -45
  53. package/dist/collection/pages/assets/images/plugin/docker-iso.svg +12 -0
  54. package/dist/collection/showcase/chat-container/callbacks.js +0 -1
  55. package/dist/collection/showcase/chat-container/callbacks.js.map +1 -1
  56. package/dist/collection/testing/locale.e2e.js +2 -0
  57. package/dist/collection/testing/locale.e2e.js.map +1 -1
  58. package/dist/components/gx-ide-about.js +32 -19
  59. package/dist/components/gx-ide-about.js.map +1 -1
  60. package/dist/components/gx-ide-bpm-export-xpdl.js +2 -2
  61. package/dist/components/gx-ide-bpm-export-xpdl.js.map +1 -1
  62. package/dist/components/gx-ide-data-type-selector.js +126 -42
  63. package/dist/components/gx-ide-data-type-selector.js.map +1 -1
  64. package/dist/components/gx-ide-empty-state2.js +2 -2
  65. package/dist/components/gx-ide-empty-state2.js.map +1 -1
  66. package/dist/components/gx-ide-file-uploader.js +0 -13
  67. package/dist/components/gx-ide-file-uploader.js.map +1 -1
  68. package/dist/components/gx-ide-plugin-details.d.ts +11 -0
  69. package/dist/components/gx-ide-plugin-details.js +222 -0
  70. package/dist/components/gx-ide-plugin-details.js.map +1 -0
  71. package/dist/components/gx-ide-plugin-explorer.d.ts +11 -0
  72. package/dist/components/gx-ide-plugin-explorer.js +194 -0
  73. package/dist/components/gx-ide-plugin-explorer.js.map +1 -0
  74. package/dist/components/gx-ide-sc-chat-container.js +0 -1
  75. package/dist/components/gx-ide-sc-chat-container.js.map +1 -1
  76. package/dist/esm/genexus-ide-ui.js +1 -1
  77. package/dist/esm/gx-ide-about.entry.js +29 -15
  78. package/dist/esm/gx-ide-about.entry.js.map +1 -1
  79. package/dist/esm/gx-ide-bpm-export-xpdl.entry.js +2 -2
  80. package/dist/esm/gx-ide-bpm-export-xpdl.entry.js.map +1 -1
  81. package/dist/esm/gx-ide-data-type-selector.entry.js +121 -40
  82. package/dist/esm/gx-ide-data-type-selector.entry.js.map +1 -1
  83. package/dist/esm/gx-ide-empty-state.entry.js +2 -2
  84. package/dist/esm/gx-ide-empty-state.entry.js.map +1 -1
  85. package/dist/esm/gx-ide-file-uploader.entry.js +0 -13
  86. package/dist/esm/gx-ide-file-uploader.entry.js.map +1 -1
  87. package/dist/esm/gx-ide-plugin-details.entry.js +197 -0
  88. package/dist/esm/gx-ide-plugin-details.entry.js.map +1 -0
  89. package/dist/esm/gx-ide-plugin-explorer.entry.js +155 -0
  90. package/dist/esm/gx-ide-plugin-explorer.entry.js.map +1 -0
  91. package/dist/esm/gx-ide-sc-chat-container.entry.js +0 -1
  92. package/dist/esm/gx-ide-sc-chat-container.entry.js.map +1 -1
  93. package/dist/esm/loader.js +1 -1
  94. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  95. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  96. package/dist/genexus-ide-ui/gx-ide-assets/about/langs/about.lang.en.json +3 -3
  97. package/dist/genexus-ide-ui/gx-ide-assets/about/langs/about.lang.ja.json +3 -3
  98. package/dist/genexus-ide-ui/gx-ide-assets/about/langs/about.lang.zh.json +3 -3
  99. package/dist/genexus-ide-ui/gx-ide-assets/data-type-selector/langs/data-type-selector.lang.en.json +1 -1
  100. package/dist/genexus-ide-ui/gx-ide-assets/plugin-details/langs/plugin-details.lang.en.json +9 -0
  101. package/dist/genexus-ide-ui/gx-ide-assets/plugin-details/langs/plugin-details.lang.ja.json +9 -0
  102. package/dist/genexus-ide-ui/gx-ide-assets/plugin-details/langs/plugin-details.lang.zh.json +9 -0
  103. package/dist/genexus-ide-ui/gx-ide-assets/plugin-explorer/images/plugin-icon.svg +10 -0
  104. package/dist/genexus-ide-ui/gx-ide-assets/plugin-explorer/langs/plugin-explorer.lang.en.json +10 -0
  105. package/dist/genexus-ide-ui/gx-ide-assets/plugin-explorer/langs/plugin-explorer.lang.ja.json +10 -0
  106. package/dist/genexus-ide-ui/gx-ide-assets/plugin-explorer/langs/plugin-explorer.lang.zh.json +10 -0
  107. package/dist/genexus-ide-ui/gx-ide-assets/team-dev-bring-changes/langs/team-dev-bring-changes.lang.ja.json +45 -45
  108. package/dist/genexus-ide-ui/{p-a47d71eb.entry.js → p-4328be14.entry.js} +7 -7
  109. package/dist/genexus-ide-ui/p-4328be14.entry.js.map +1 -0
  110. package/dist/genexus-ide-ui/p-476b74a1.entry.js +109 -0
  111. package/dist/genexus-ide-ui/p-476b74a1.entry.js.map +1 -0
  112. package/dist/genexus-ide-ui/{p-6d996621.entry.js → p-4e6425f3.entry.js} +1 -2
  113. package/dist/genexus-ide-ui/p-4e6425f3.entry.js.map +1 -0
  114. package/dist/genexus-ide-ui/p-641c79a9.entry.js +198 -0
  115. package/dist/genexus-ide-ui/p-641c79a9.entry.js.map +1 -0
  116. package/dist/genexus-ide-ui/p-6b4fdf55.entry.js +344 -0
  117. package/dist/genexus-ide-ui/p-6b4fdf55.entry.js.map +1 -0
  118. package/dist/genexus-ide-ui/{p-17dc4c9c.entry.js → p-7d7cf30d.entry.js} +35 -51
  119. package/dist/genexus-ide-ui/p-7d7cf30d.entry.js.map +1 -0
  120. package/dist/genexus-ide-ui/p-84c1c1bb.entry.js +270 -0
  121. package/dist/genexus-ide-ui/p-84c1c1bb.entry.js.map +1 -0
  122. package/dist/genexus-ide-ui/{p-844b7117.entry.js → p-86365635.entry.js} +3 -3
  123. package/dist/genexus-ide-ui/p-86365635.entry.js.map +1 -0
  124. package/dist/types/components/{_branding/about → about}/about.d.ts +6 -10
  125. package/dist/types/components/data-type-selector/data-type-selector.d.ts +16 -12
  126. package/dist/types/components/plugin-details/plugin-details.d.ts +55 -0
  127. package/dist/types/components/plugin-explorer/plugin-explorer.d.ts +43 -0
  128. package/dist/types/components.d.ts +126 -26
  129. package/package.json +1 -1
  130. package/dist/collection/components/_branding/about/about.js.map +0 -1
  131. package/dist/genexus-ide-ui/p-0550fd5f.entry.js +0 -96
  132. package/dist/genexus-ide-ui/p-0550fd5f.entry.js.map +0 -1
  133. package/dist/genexus-ide-ui/p-17dc4c9c.entry.js.map +0 -1
  134. package/dist/genexus-ide-ui/p-6d996621.entry.js.map +0 -1
  135. package/dist/genexus-ide-ui/p-844b7117.entry.js.map +0 -1
  136. package/dist/genexus-ide-ui/p-a47d71eb.entry.js.map +0 -1
  137. package/dist/genexus-ide-ui/p-ca6eb9fd.entry.js +0 -255
  138. package/dist/genexus-ide-ui/p-ca6eb9fd.entry.js.map +0 -1
  139. /package/dist/collection/components/{_branding/about → about}/gx-ide-assets/about/images/copyrights-illustration.png +0 -0
  140. /package/dist/collection/components/{_branding/about → about}/gx-ide-assets/about/images/next-arrow.svg +0 -0
  141. /package/dist/collection/components/{_branding/about → about}/gx-ide-assets/about/images/next-logo.svg +0 -0
  142. /package/dist/collection/components/{_branding/about → about}/gx-ide-assets/about/images/next-square.svg +0 -0
@@ -13,6 +13,7 @@ const mapCategoryToListItemGroup = (category) => {
13
13
  return {
14
14
  caption: type.name,
15
15
  id: type.name,
16
+ selected: type.selected,
16
17
  additionalInformation: {
17
18
  "stretch-start": {
18
19
  center: [{ imgSrc: type.icon }]
@@ -29,6 +30,7 @@ const mapDataTypesToList = (dataTypes) => {
29
30
  return {
30
31
  caption: dataType.name,
31
32
  id: dataType.name,
33
+ selected: dataType.selected,
32
34
  additionalInformation: {
33
35
  "stretch-start": {
34
36
  center: [{ imgSrc: dataType.icon || undefined }]
@@ -40,7 +42,7 @@ const mapDataTypesToList = (dataTypes) => {
40
42
  });
41
43
  };
42
44
 
43
- const dataTypeSelectorCss = ":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}";
45
+ const dataTypeSelectorCss = ":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)}";
44
46
 
45
47
  var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
46
48
  if (kind === "a" && !f)
@@ -58,19 +60,20 @@ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) ||
58
60
  throw new TypeError("Cannot write private member to an object whose class did not declare it");
59
61
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
60
62
  };
61
- var _GxIdeKbManagerImport__componentLocale, _GxIdeKbManagerImport_showAll, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, _GxIdeKbManagerImport_handleSelectionChange, _GxIdeKbManagerImport_updateListBoxModelState, _GxIdeKbManagerImport_showAllObjects, _GxIdeKbManagerImport_showRecentlyObjects, _GxIdeKbManagerImport_renderFooter;
63
+ var _GxIdeKbManagerImport__componentLocale, _GxIdeKbManagerImport_showAll, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, _GxIdeKbManagerImport_dataTypeCategoryMap, _GxIdeKbManagerImport_dataTypeDataIdMap, _GxIdeKbManagerImport_lastArrowKey, _GxIdeKbManagerImport_selectedDataTypeIds, _GxIdeKbManagerImport_focusAlreadySet, _GxIdeKbManagerImport_actionListEl, _GxIdeKbManagerImport_evaluateSelectionChanged, _GxIdeKbManagerImport_listKeyDownHandler, _GxIdeKbManagerImport_listClickHandler, _GxIdeKbManagerImport_showAllObjects, _GxIdeKbManagerImport_showRecentlyObjects, _GxIdeKbManagerImport_handleButtonTab, _GxIdeKbManagerImport_renderFooter, _GxIdeKbManagerImport_setFocus;
62
64
  const CSS_BUNDLES = [
63
65
  "resets/box-sizing",
64
- "components/tab",
65
- "components/tooltip",
66
66
  "components/list-box",
67
- "components/tree-view",
68
67
  "utils/form--full",
69
- "utils/layout",
70
68
  "utils/typography",
69
+ "utils/layout",
71
70
  "utils/spacing",
72
71
  "chameleon/scrollbar"
73
72
  ];
73
+ const ARROW_UP_KEY = "ArrowUp";
74
+ const ARROW_DOWN_KEY = "ArrowDown";
75
+ const ENTER_KEY = "Enter";
76
+ const TAB_KEY = "Tab";
74
77
  const ALL_CATEGORY_ID = "all";
75
78
  const RECENTLY_USED_CATEGORY_ID = "recenttly-used";
76
79
  const CLOCK_ICON = getIconPath({
@@ -84,41 +87,64 @@ const GxIdeKbManagerImport = class {
84
87
  _GxIdeKbManagerImport__componentLocale.set(this, void 0);
85
88
  _GxIdeKbManagerImport_showAll.set(this, false);
86
89
  _GxIdeKbManagerImport_categoriesActionListItemGroupMap.set(this, new Map());
87
- _GxIdeKbManagerImport_handleSelectionChange.set(this, (event) => {
88
- var _a;
89
- const eventType = (_a = event.detail[0]) === null || _a === void 0 ? void 0 : _a.item.type;
90
- if (eventType === "actionable") {
91
- const name = event.detail[0].item.caption;
92
- const itemAdditionalBase = event.detail[0].item.additionalInformation["stretch-start"].center[0];
93
- const icon = itemAdditionalBase.imgSrc;
94
- this.dataTypeSelectedCallback({
95
- name: name,
96
- icon: icon
97
- });
98
- __classPrivateFieldGet(this, _GxIdeKbManagerImport_updateListBoxModelState, "f").call(this, event.detail[0].item.caption, "actionable");
99
- }
100
- else if (eventType === "group") {
101
- __classPrivateFieldGet(this, _GxIdeKbManagerImport_updateListBoxModelState, "f").call(this, event.detail[0].item.caption, "group");
90
+ _GxIdeKbManagerImport_dataTypeCategoryMap.set(this, new Map());
91
+ _GxIdeKbManagerImport_dataTypeDataIdMap.set(this, new Map());
92
+ _GxIdeKbManagerImport_lastArrowKey.set(this, null);
93
+ _GxIdeKbManagerImport_selectedDataTypeIds.set(this, {
94
+ // For setting focus
95
+ categoryId: undefined,
96
+ dataTypeId: undefined
97
+ });
98
+ _GxIdeKbManagerImport_focusAlreadySet.set(this, false);
99
+ _GxIdeKbManagerImport_actionListEl.set(this, void 0);
100
+ _GxIdeKbManagerImport_evaluateSelectionChanged.set(this, (path) => {
101
+ const chActionListItem = path.find(el => el.tagName === "CH-ACTION-LIST-ITEM");
102
+ if (chActionListItem) {
103
+ const id = chActionListItem.id;
104
+ const dataTypeData = __classPrivateFieldGet(this, _GxIdeKbManagerImport_dataTypeDataIdMap, "f").get(id);
105
+ this.dataTypeSelectedCallback(dataTypeData);
102
106
  }
103
107
  });
104
- _GxIdeKbManagerImport_updateListBoxModelState.set(this, (name, type) => {
105
- if (this.selectedCategory === RECENTLY_USED_CATEGORY_ID) {
106
- this.recentlyUsedActionListModel.forEach(item => {
107
- // clear selected
108
- item.selected = false;
109
- });
110
- const selectedItemIndex = this.recentlyUsed.findIndex(item => item.name === name);
111
- if (selectedItemIndex !== -1) {
112
- this.recentlyUsedActionListModel[selectedItemIndex].selected = true;
108
+ _GxIdeKbManagerImport_listKeyDownHandler.set(this, (event) => {
109
+ const pressedKey = event.key;
110
+ const path = event.composedPath();
111
+ if (pressedKey === ARROW_UP_KEY || pressedKey === ARROW_DOWN_KEY) {
112
+ __classPrivateFieldSet(this, _GxIdeKbManagerImport_lastArrowKey, pressedKey, "f");
113
+ if (pressedKey === ARROW_UP_KEY) {
114
+ // Check if this is the first group. IF it is, let the host know,
115
+ // so it can close the dialog.
116
+ const chActionListItem = path.find(el => el.tagName === "CH-ACTION-LIST-ITEM");
117
+ if (chActionListItem !== undefined) {
118
+ return;
119
+ }
120
+ // This is a ch-action-list-group
121
+ const actionGroup = path.find(el => el.tagName === "CH-ACTION-LIST-GROUP");
122
+ const currentFocusedActionGroupId = actionGroup.id;
123
+ const firstActionListGroupId = __classPrivateFieldGet(this, _GxIdeKbManagerImport_actionListEl, "f").shadowRoot.firstElementChild.id;
124
+ if (currentFocusedActionGroupId === firstActionListGroupId) {
125
+ this.arrowUpOnFirstElement();
126
+ }
113
127
  }
114
128
  }
115
- else if (type === "group" &&
116
- __classPrivateFieldGet(this, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, "f").has(name)) {
117
- const group = __classPrivateFieldGet(this, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, "f").get(name);
118
- const groupUpdated = Object.assign(Object.assign({}, group), { expanded: group.expanded });
119
- __classPrivateFieldGet(this, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, "f").set(name, groupUpdated);
129
+ else if (pressedKey === ENTER_KEY) {
130
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_evaluateSelectionChanged, "f").call(this, path);
131
+ }
132
+ else if (pressedKey === TAB_KEY) {
133
+ event.stopPropagation();
120
134
  }
121
135
  });
136
+ _GxIdeKbManagerImport_listClickHandler.set(this, (event) => {
137
+ if (__classPrivateFieldGet(this, _GxIdeKbManagerImport_lastArrowKey, "f")) ;
138
+ else if (event.detail === 0) {
139
+ // ignore keyboard Enter (Enter happens by default on buttons on onClick)
140
+ return;
141
+ }
142
+ else {
143
+ const path = event.composedPath();
144
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_evaluateSelectionChanged, "f").call(this, path);
145
+ }
146
+ __classPrivateFieldSet(this, _GxIdeKbManagerImport_lastArrowKey, null, "f");
147
+ });
122
148
  _GxIdeKbManagerImport_showAllObjects.set(this, () => {
123
149
  if (!__classPrivateFieldGet(this, _GxIdeKbManagerImport_showAll, "f")) {
124
150
  const allCategoriesActionListModel = [];
@@ -149,6 +175,13 @@ const GxIdeKbManagerImport = class {
149
175
  this.categoriesListBoxModel = newSelectedCategory;
150
176
  __classPrivateFieldSet(this, _GxIdeKbManagerImport_showAll, false, "f");
151
177
  };
178
+ _GxIdeKbManagerImport_handleButtonTab.set(this, (event) => {
179
+ // Prevents bubbling, which causes this component to close, due to how the IDE handles Tab event
180
+ // in a parent element.
181
+ if (event.key === TAB_KEY || event.key === ENTER_KEY) {
182
+ event.stopPropagation();
183
+ }
184
+ });
152
185
  _GxIdeKbManagerImport_renderFooter.set(this, () => {
153
186
  const recentlyUsedBtnClass = this.selectedCategory === RECENTLY_USED_CATEGORY_ID
154
187
  ? "button-secondary"
@@ -167,20 +200,49 @@ const GxIdeKbManagerImport = class {
167
200
  else {
168
201
  selectedCategoryDescription = this.selectedCategory;
169
202
  }
170
- return (h("footer", { class: "footer control-footer control-footer-start spacing-body-inline spacing-body-block scrollable\n " }, h("div", { class: "buttons-spacer" }, this.recentlyUsed && this.recentlyUsed.length > 0 && (h("button", { class: `button-icon-only ${recentlyUsedBtnClass}`, "aria-label": `${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").select} ${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").fixedTypes.recentlyUsed}`, title: `${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").select} ${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").fixedTypes.recentlyUsed}`, onClick: __classPrivateFieldGet(this, _GxIdeKbManagerImport_showRecentlyObjects, "f") }, h("ch-image", { class: "icon-md", src: CLOCK_ICON }))), h("button", { class: `button-icon-only ${allBtnClass}`, onClick: __classPrivateFieldGet(this, _GxIdeKbManagerImport_showAllObjects, "f"), "aria-label": `${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").select} ${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").fixedTypes.all}`, title: `${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").select} ${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").fixedTypes.all}` }, "[*]"), this.categories.map(category => {
203
+ return (h("footer", { class: "footer control-footer control-footer-start scrollable\n " }, h("div", { class: "buttons-spacer" }, this.recentlyUsed && this.recentlyUsed.length > 0 && (h("button", { class: `button-icon-only ${recentlyUsedBtnClass}`, "aria-label": `${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").select} ${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").fixedTypes.recentlyUsed}`, title: `${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").select} ${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").fixedTypes.recentlyUsed}`, onClick: __classPrivateFieldGet(this, _GxIdeKbManagerImport_showRecentlyObjects, "f"), onKeyDown: __classPrivateFieldGet(this, _GxIdeKbManagerImport_handleButtonTab, "f") }, h("ch-image", { class: "icon-md", src: CLOCK_ICON }))), h("button", { class: `button-icon-only ${allBtnClass}`, onClick: __classPrivateFieldGet(this, _GxIdeKbManagerImport_showAllObjects, "f"), onKeyDown: __classPrivateFieldGet(this, _GxIdeKbManagerImport_handleButtonTab, "f"), "aria-label": `${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").select} ${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").fixedTypes.all}`, title: `${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").select} ${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").fixedTypes.all}` }, "[*]"), this.categories.map(category => {
171
204
  const buttonClass = category.name === this.selectedCategory
172
205
  ? "button-secondary"
173
206
  : "button-tertiary";
174
- return (h("button", { class: `button-icon-only ${buttonClass}`, "aria-label": category.name, title: category.name, onClick: this.selectedCategoryHandler, "data-name": category.name }, h("ch-image", { class: "icon-md", src: category.icon })));
207
+ return (h("button", { class: `button-icon-only ${buttonClass}`, "aria-label": category.name, title: category.name, onClick: this.selectedCategoryHandler, onKeyDown: __classPrivateFieldGet(this, _GxIdeKbManagerImport_handleButtonTab, "f"), "data-name": category.name }, h("ch-image", { class: "icon-md", src: category.icon })));
175
208
  })), h("p", { class: "body-regular-s selected-category" }, selectedCategoryDescription)));
176
209
  });
210
+ _GxIdeKbManagerImport_setFocus.set(this, async () => {
211
+ if (__classPrivateFieldGet(this, _GxIdeKbManagerImport_focusAlreadySet, "f")) {
212
+ return;
213
+ }
214
+ let focusableElement;
215
+ setTimeout(() => {
216
+ // setTimeout as a WA, since the list-box elements are not rendered/read immediatelly
217
+ if (this.focusType === "selected" &&
218
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_selectedDataTypeIds, "f").categoryId &&
219
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_selectedDataTypeIds, "f").dataTypeId) {
220
+ // set focus on the selected element
221
+ const selectedDataTypeEl = __classPrivateFieldGet(this, _GxIdeKbManagerImport_actionListEl, "f").shadowRoot.getElementById(__classPrivateFieldGet(this, _GxIdeKbManagerImport_selectedDataTypeIds, "f").dataTypeId);
222
+ if (selectedDataTypeEl) {
223
+ focusableElement = selectedDataTypeEl;
224
+ }
225
+ }
226
+ else {
227
+ // set focus of the first element
228
+ const firstActionListGroup = __classPrivateFieldGet(this, _GxIdeKbManagerImport_actionListEl, "f").shadowRoot.firstElementChild;
229
+ const firstButton = firstActionListGroup.shadowRoot.firstElementChild;
230
+ focusableElement = firstButton;
231
+ }
232
+ focusableElement && focusableElement.focus();
233
+ __classPrivateFieldSet(this, _GxIdeKbManagerImport_focusAlreadySet, true, "f");
234
+ }, 150);
235
+ });
177
236
  this.categoriesListBoxModel = [];
178
237
  this.selectedCategory = undefined;
179
- this.statusInfo = [];
180
238
  this.recentlyUsedActionListModel = [];
181
239
  this.loading = true;
240
+ this.categoriesJustChanged = false;
241
+ this.actionListDidRender = false;
182
242
  this.categories = undefined;
183
243
  this.dataTypeSelectedCallback = undefined;
244
+ this.arrowUpOnFirstElement = undefined;
245
+ this.focusType = "first-element";
184
246
  this.recentlyUsed = [];
185
247
  }
186
248
  categoriesChanged(newCategories) {
@@ -191,9 +253,25 @@ const GxIdeKbManagerImport = class {
191
253
  newCategories.forEach(category => {
192
254
  const categoryListBoxModel = mapCategoryToListItemGroup(category);
193
255
  __classPrivateFieldGet(this, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, "f").set(category.name, categoryListBoxModel);
256
+ category.types.forEach(type => {
257
+ const isSelected = type.selected;
258
+ if (isSelected) {
259
+ // For setting focus
260
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_selectedDataTypeIds, "f").categoryId = category.name;
261
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_selectedDataTypeIds, "f").dataTypeId = type.name;
262
+ }
263
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_dataTypeCategoryMap, "f").set(type.name, category.id);
264
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_dataTypeDataIdMap, "f").set(type.name, {
265
+ id: category.id,
266
+ name: type.name,
267
+ icon: type.icon,
268
+ selected: type.selected
269
+ });
270
+ });
194
271
  });
195
272
  this.loading = false;
196
273
  __classPrivateFieldGet(this, _GxIdeKbManagerImport_showAllObjects, "f").call(this);
274
+ this.categoriesJustChanged = true;
197
275
  }
198
276
  recentlyUsedChanged(newRecentlyUsed) {
199
277
  this.recentlyUsedActionListModel = null;
@@ -205,7 +283,10 @@ const GxIdeKbManagerImport = class {
205
283
  this.recentlyUsed.length && this.recentlyUsedChanged(this.recentlyUsed);
206
284
  }
207
285
  render() {
208
- return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), this.loading ? (h("gx-ide-loader", { loaderTitle: __classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").loader.title, description: __classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").loader.description, show: true })) : (h("section", { class: "main" }, h("ch-action-list-render", { class: "list-box", model: this.categoriesListBoxModel, selection: "single", onSelectedItemsChange: __classPrivateFieldGet(this, _GxIdeKbManagerImport_handleSelectionChange, "f") }), __classPrivateFieldGet(this, _GxIdeKbManagerImport_renderFooter, "f").call(this)))));
286
+ return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), this.loading ? (h("gx-ide-loader", { loaderTitle: __classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").loader.title, description: __classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").loader.description, show: true })) : (h("section", { class: "main" }, h("ch-action-list-render", { ref: async (el) => {
287
+ __classPrivateFieldSet(this, _GxIdeKbManagerImport_actionListEl, el, "f");
288
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_setFocus, "f").call(this);
289
+ }, class: "list-box", model: this.categoriesListBoxModel, selection: "single", onKeyDown: __classPrivateFieldGet(this, _GxIdeKbManagerImport_listKeyDownHandler, "f"), onClick: __classPrivateFieldGet(this, _GxIdeKbManagerImport_listClickHandler, "f") }), __classPrivateFieldGet(this, _GxIdeKbManagerImport_renderFooter, "f").call(this)))));
209
290
  }
210
291
  static get assetsDirs() { return ["gx-ide-assets/data-type-selector"]; }
211
292
  get el() { return getElement(this); }
@@ -214,7 +295,7 @@ const GxIdeKbManagerImport = class {
214
295
  "recentlyUsed": ["recentlyUsedChanged"]
215
296
  }; }
216
297
  };
217
- _GxIdeKbManagerImport__componentLocale = new WeakMap(), _GxIdeKbManagerImport_showAll = new WeakMap(), _GxIdeKbManagerImport_categoriesActionListItemGroupMap = new WeakMap(), _GxIdeKbManagerImport_handleSelectionChange = new WeakMap(), _GxIdeKbManagerImport_updateListBoxModelState = new WeakMap(), _GxIdeKbManagerImport_showAllObjects = new WeakMap(), _GxIdeKbManagerImport_showRecentlyObjects = new WeakMap(), _GxIdeKbManagerImport_renderFooter = new WeakMap();
298
+ _GxIdeKbManagerImport__componentLocale = new WeakMap(), _GxIdeKbManagerImport_showAll = new WeakMap(), _GxIdeKbManagerImport_categoriesActionListItemGroupMap = new WeakMap(), _GxIdeKbManagerImport_dataTypeCategoryMap = new WeakMap(), _GxIdeKbManagerImport_dataTypeDataIdMap = new WeakMap(), _GxIdeKbManagerImport_lastArrowKey = new WeakMap(), _GxIdeKbManagerImport_selectedDataTypeIds = new WeakMap(), _GxIdeKbManagerImport_focusAlreadySet = new WeakMap(), _GxIdeKbManagerImport_actionListEl = new WeakMap(), _GxIdeKbManagerImport_evaluateSelectionChanged = new WeakMap(), _GxIdeKbManagerImport_listKeyDownHandler = new WeakMap(), _GxIdeKbManagerImport_listClickHandler = new WeakMap(), _GxIdeKbManagerImport_showAllObjects = new WeakMap(), _GxIdeKbManagerImport_showRecentlyObjects = new WeakMap(), _GxIdeKbManagerImport_handleButtonTab = new WeakMap(), _GxIdeKbManagerImport_renderFooter = new WeakMap(), _GxIdeKbManagerImport_setFocus = new WeakMap();
218
299
  GxIdeKbManagerImport.style = dataTypeSelectorCss;
219
300
 
220
301
  export { GxIdeKbManagerImport as gx_ide_data_type_selector };
@@ -1 +1 @@
1
- {"file":"gx-ide-data-type-selector.entry.js","mappings":";;;;AAMO,MAAM,0BAA0B,GAAG,CACxC,QAA8B;IAE9B,MAAM,aAAa,GAAwB;QACzC,OAAO,EAAE,QAAQ,CAAC,IAAI;QACtB,EAAE,EAAE,QAAQ,CAAC,IAAI;QACjB,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI;QAChB,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI;YAC5B,OAAO;gBACL,OAAO,EAAE,IAAI,CAAC,IAAI;gBAClB,EAAE,EAAE,IAAI,CAAC,IAAI;gBACb,qBAAqB,EAAE;oBACrB,eAAe,EAAE;wBACf,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;qBAChC;iBACF;gBACD,IAAI,EAAE,YAAY;aACnB,CAAC;SACH,CAAC;KACH,CAAC;IACF,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC;AAEK,MAAM,kBAAkB,GAAG,CAChC,SAAyB;IAEzB,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK;QACnC,OAAO;YACL,OAAO,EAAE,QAAQ,CAAC,IAAI;YACtB,EAAE,EAAE,QAAQ,CAAC,IAAI;YACjB,qBAAqB,EAAE;gBACrB,eAAe,EA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B;QACjD,IAAI,CAAC,2BAA2B,GAAG,IAAI,CAAC;QACxC,IAAI,CAAC,2BAA2B,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC;KACxE;IAED,MAAM,iBAAiB;QACrB,uBAAA,IAAI,0CAAqB,MAAM,MAAM,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC,MAAA,CAAC;;QAEnE,IAAI,CAAC,YAAY,CAAC,MAAM,IAAI,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KACzE;IAqKD,MAAM;QACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,IAClB,gBAAU,KAAK,EAAE,WAAW,GAAa,EACxC,IAAI,CAAC,OAAO,IACX,qBACE,WAAW,EAAE,uBAAA,IAAI,8CAAkB,CAAC,MAAM,CAAC,KAAK,EAChD,WAAW,EAAE,uBAAA,IAAI,8CAAkB,CAAC,MAAM,CAAC,WAAW,EACtD,IAAI,SACW,KAEjB,eAAS,KAAK,EAAC,MAAM,IACnB,6BACE,KAAK,EAAC,UAAU,EAChB,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAClC,SAAS,EAAC,QAAQ,EAClB,qBAAqB,EAAE,uBAAA,IAAI,mDAAuB,GAC3B,EACxB,uBAAA,IAAI,0CAAc,MAAlB,IAAI,CAAgB,CACb,CACX,CACI,EACP;KACH;;;;;;;;;;;;;","names":[],"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 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 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}\n","// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n// Other Libraries\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\nimport {\n ActionListItemActionable,\n ActionListItemModel,\n ActionListItemModelExtended,\n ActionListItemType,\n ActionListModel\n} from \"@genexus/chameleon-controls-library\";\nimport {\n ActionListItemAdditionalBase,\n ActionListItemGroup\n} 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/tab\",\n \"components/tooltip\",\n \"components/list-box\",\n \"components/tree-view\",\n \"utils/form--full\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\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 @Element() el: HTMLGxIdeDataTypeSelectorElement;\n\n @State() categoriesListBoxModel: ActionListItemModel[] = [];\n @State() selectedCategory: string;\n @State() statusInfo: StatusInfo[] = [];\n @State() recentlyUsedActionListModel: ActionListModel = [];\n @State() loading: boolean = true;\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 this.#categoriesActionListItemGroupMap.clear();\n newCategories.forEach(category => {\n const categoryListBoxModel = mapCategoryToListItemGroup(category);\n this.#categoriesActionListItemGroupMap.set(\n category.name,\n categoryListBoxModel\n );\n });\n this.loading = false;\n this.#showAllObjects();\n }\n\n /**\n * Callback invoked when user select an item type\n */\n @Prop() readonly dataTypeSelectedCallback: DataTypeSelectedCallback;\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 #handleSelectionChange = (\n event: CustomEvent<ActionListItemModelExtended[]>\n ) => {\n const eventType = event.detail[0]?.item.type;\n if (eventType === \"actionable\") {\n const name = event.detail[0].item.caption;\n\n const itemAdditionalBase = event.detail[0].item.additionalInformation[\n \"stretch-start\"\n ].center[0] as ActionListItemAdditionalBase;\n const icon = itemAdditionalBase.imgSrc;\n\n this.dataTypeSelectedCallback({\n name: name,\n icon: icon\n });\n\n this.#updateListBoxModelState(event.detail[0].item.caption, \"actionable\");\n } else if (eventType === \"group\") {\n this.#updateListBoxModelState(event.detail[0].item.caption, \"group\");\n }\n };\n\n #updateListBoxModelState = (name: string, type: ActionListItemType) => {\n if (this.selectedCategory === RECENTLY_USED_CATEGORY_ID) {\n this.recentlyUsedActionListModel.forEach(item => {\n // clear selected\n (item as ActionListItemActionable).selected = false;\n });\n const selectedItemIndex = this.recentlyUsed.findIndex(\n item => item.name === name\n );\n if (selectedItemIndex !== -1) {\n (\n this.recentlyUsedActionListModel[\n selectedItemIndex\n ] as ActionListItemActionable\n ).selected = true;\n }\n } else if (\n type === \"group\" &&\n this.#categoriesActionListItemGroupMap.has(name)\n ) {\n const group = this.#categoriesActionListItemGroupMap.get(\n name\n ) as ActionListItemGroup;\n const groupUpdated = { ...group, expanded: group.expanded };\n this.#categoriesActionListItemGroupMap.set(name, groupUpdated);\n }\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 #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 spacing-body-inline spacing-body-block 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 >\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 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 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 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 class=\"list-box\"\n model={this.categoriesListBoxModel}\n selection=\"single\"\n onSelectedItemsChange={this.#handleSelectionChange}\n ></ch-action-list-render>\n {this.#renderFooter()}\n </section>\n )}\n </Host>\n );\n }\n}\n\ntype StatusInfo = {\n [key: string]: {\n display: boolean;\n };\n};\n\nexport type DataTypeCategoryData = {\n name: string;\n icon: string;\n types: DataTypeData[];\n};\nexport type DataTypeData = {\n name: string;\n icon: string;\n};\n\nexport type DataTypeSelectedCallback = (data: {\n name: string;\n icon: string;\n}) => Promise<void>;\n"],"version":3}
1
+ {"file":"gx-ide-data-type-selector.entry.js","mappings":";;;;AAMO,MAAM,0BAA0B,GAAG,CACxC,QAA8B;IAE9B,MAAM,aAAa,GAAwB;QACzC,OAAO,EAAE,QAAQ,CAAC,IAAI;QACtB,EAAE,EAAE,QAAQ,CAAC,IAAI;QACjB,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI;QAChB,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI;YAC5B,OAAO;gBACL,OAAO,EAAE,IAAI,CAAC,IAAI;gBAClB,EAAE,EAAE,IAAI,C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":["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","// 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"],"version":3}
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, H as Host, a as getElement } from './index-10af18cf.js';
2
2
 
3
- const gxIdeEmptyStateCss = ":root{--ui-animaton-speed:0.2s}.gxg-title-01{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-01--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-02{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-02--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--color-on-primary)}.gxg-title-03{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-03--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-04{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-04--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-05{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-05--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable)}.gxg-text--negative{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text--gray{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--dimmed)}.gxg-quote{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);font-style:italic}.gxg-quote--negative{color:var(--ds-base-font-color--negative)}.gxg-link{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block}.gxg-link:hover{color:var(--ds-base-font-color--link-hover)}.gxg-link:active{color:var(--ds-base-font-color--link-active)}.gxg-link-gray{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed)}.gxg-link-gray:hover{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed);filter:brightness(1.4)}.gxg-alert-error{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--error);display:inline-block}.gxg-alert-warning{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--warning);display:inline-block}.gxg-alert-success{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--success);display:inline-block}.gxg-tab--disabled{color:var(--color-primary-disabled);pointer-events:none}.gxg-tab--disabled[disabled]{color:var(--color-primary-disabled);pointer-events:none}.gxg-label{font-family:var(--ds-base-font-family-primary);font-weight:var(--gxg-label-font-weight);font-size:var(--gxg-label-font-size);color:var(--gxg-label-color);text-align:center;line-height:1.455em;display:flex;align-items:center}.gxg-label:hover{color:var(--color-primary-hover)}.gxg-label:focus{color:var(--color-primary-active)}.gxg-label:active{color:var(--color-primary-active)}.gxg-label[disabled]{color:var(--color-primary-disabled)}.gxg-label--negative{color:var(--color-on-primary)}.gxg-label--negative[disabled]{color:var(--color-on-disabled)}.gxg-scrollbar{}.gxg-scrollbar::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gxg-scrollbar::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gxg-scrollbar::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}:host{display:grid;block-size:100%}.card-regular{background-color:var(--mer-surface__elevation--01);border:var(--mer-border__width--sm) solid var(--mer-border-color__on-elevation--01);border-radius:var(--mer-border__radius--md);padding:var(--mer-spacing--md) var(--mer-spacing--md);display:grid}.card-small{background-color:var(--mer-surface__elevation--02);border-radius:var(--mer-border__radius--sm);padding:var(--mer-spacing--sm) var(--mer-spacing--sm)}.card-small--actionable:hover{background-color:var(--mer-color__neutral-gray--600)}.card-small--actionable:active{background-color:var(--mer-color__neutral-gray--650)}.card-small:focus-visible{outline:var(--focus__outline-width) var(--focus__outline-style) var(--focus__outline-color);outline-offset:var(--focus__outline-offset)}.empty-state{block-size:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:var(--mer-spacing--sm);text-align:center}.empty-state__title,.empty-state__button,.empty-state__link{max-inline-size:300px}.opacity-0{opacity:0}.opacity-1{opacity:1}.display-contents{display:contents}.pill-tag{padding:1px 4px;border-radius:2px;min-inline-size:40px;text-align:center;margin-inline-end:10px;font-size:11px}.gxi-hidden{display:none !important}.gxi-full-height{height:100%}.gxi-overflow-auto{overflow:auto}.gxi-display-flex{display:flex}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.overflow-auto{overflow:auto}.justify-start{display:flex;justify-content:start}.justify-center{display:flex;justify-content:center}.justify-end{display:flex;justify-content:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}ch-grid-cell{display:flex}ch-grid{overflow:auto;height:100%}ch-grid-column{z-index:99;border-bottom:1px solid var(--mer-color__neutral-gray--800)}ch-grid-column:first-child{padding-inline-start:var(--gx-ide-container__padding) !important}ch-grid-column:last-child{padding-inline-end:var(--gx-ide-container__padding) !important}ch-grid-cell{--mer-spacing--xs:var(--gx-ide-container__padding)}.layout{display:grid;gap:var(--mer-spacing--lg);box-sizing:border-box}.layout--two-cols{grid-template-columns:1fr 1fr}.layout--space-above{padding-block-start:var(--mer-spacing--lg)}gxg-tabs{box-shadow:none}:host(.gx-ide-component){height:100% !important;display:flex !important;flex-direction:column !important}:host(:focus-within) gx-ide-top-bar::part(wrapper){background-color:var(--color-secondary-enabled)}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--mer-font__weight--regular);font-size:var(--mer-font__size--xs);font-family:var(--mer-font-family--primary);height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1;box-sizing:border-box}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-main::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-main::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-main::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-overflow::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.tree-view-primary{font-size:var(--mer-font__size--2xs)}p{margin:0;font-size:var(--mer-font__size--xxs)}.buttons-container{display:flex;gap:var(--mer-spacing--xs)}:host{display:flex;align-items:center;justify-content:center;text-align:center;inline-size:100%;position:relative}:host(.animate){animation:fadeIn var(--mer-timing--fast) forwards;inset-block-start:0}.main-container{max-width:320px;margin:0 auto;gap:var(--mer-spacing--md);padding:var(--mer-spacing--md)}.main-container__icon-wrapper{border:var(--mer-border__width--sm) dashed var(--mer-accent__primary);border-radius:50%;min-width:40px;min-height:40px;display:flex;align-items:center;justify-content:center;pointer-events:none}.main-container__content{gap:var(--mer-spacing--sm)}.main-container,.main-container__content{display:flex;align-items:center;flex-direction:column}@keyframes fadeIn{0%{opacity:0;inset-block-start:5px}}";
3
+ const gxIdeEmptyStateCss = ":root{--ui-animaton-speed:0.2s}.gxg-title-01{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-01--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-02{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-02--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--color-on-primary)}.gxg-title-03{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-03--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-04{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-04--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-05{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-05--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable)}.gxg-text--negative{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text--gray{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--dimmed)}.gxg-quote{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);font-style:italic}.gxg-quote--negative{color:var(--ds-base-font-color--negative)}.gxg-link{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block}.gxg-link:hover{color:var(--ds-base-font-color--link-hover)}.gxg-link:active{color:var(--ds-base-font-color--link-active)}.gxg-link-gray{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed)}.gxg-link-gray:hover{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed);filter:brightness(1.4)}.gxg-alert-error{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--error);display:inline-block}.gxg-alert-warning{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--warning);display:inline-block}.gxg-alert-success{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--success);display:inline-block}.gxg-tab--disabled{color:var(--color-primary-disabled);pointer-events:none}.gxg-tab--disabled[disabled]{color:var(--color-primary-disabled);pointer-events:none}.gxg-label{font-family:var(--ds-base-font-family-primary);font-weight:var(--gxg-label-font-weight);font-size:var(--gxg-label-font-size);color:var(--gxg-label-color);text-align:center;line-height:1.455em;display:flex;align-items:center}.gxg-label:hover{color:var(--color-primary-hover)}.gxg-label:focus{color:var(--color-primary-active)}.gxg-label:active{color:var(--color-primary-active)}.gxg-label[disabled]{color:var(--color-primary-disabled)}.gxg-label--negative{color:var(--color-on-primary)}.gxg-label--negative[disabled]{color:var(--color-on-disabled)}.gxg-scrollbar{}.gxg-scrollbar::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gxg-scrollbar::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gxg-scrollbar::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}:host{display:grid;block-size:100%}.card-regular{background-color:var(--mer-surface__elevation--01);border:var(--mer-border__width--sm) solid var(--mer-border-color__on-elevation--01);border-radius:var(--mer-border__radius--md);padding:var(--mer-spacing--md) var(--mer-spacing--md);display:grid}.card-small{background-color:var(--mer-surface__elevation--02);border-radius:var(--mer-border__radius--sm);padding:var(--mer-spacing--sm) var(--mer-spacing--sm)}.card-small--actionable:hover{background-color:var(--mer-color__neutral-gray--600)}.card-small--actionable:active{background-color:var(--mer-color__neutral-gray--650)}.card-small:focus-visible{outline:var(--focus__outline-width) var(--focus__outline-style) var(--focus__outline-color);outline-offset:var(--focus__outline-offset)}.empty-state{block-size:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:var(--mer-spacing--sm);text-align:center}.empty-state__title,.empty-state__button,.empty-state__link{max-inline-size:300px}.opacity-0{opacity:0}.opacity-1{opacity:1}.display-contents{display:contents}.pill-tag{padding:1px 4px;border-radius:2px;min-inline-size:40px;text-align:center;margin-inline-end:10px;font-size:11px}.gxi-hidden{display:none !important}.gxi-full-height{height:100%}.gxi-overflow-auto{overflow:auto}.gxi-display-flex{display:flex}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.overflow-auto{overflow:auto}.justify-start{display:flex;justify-content:start}.justify-center{display:flex;justify-content:center}.justify-end{display:flex;justify-content:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}ch-grid-cell{display:flex}ch-grid{overflow:auto;height:100%}ch-grid-column{z-index:99;border-bottom:1px solid var(--mer-color__neutral-gray--800)}ch-grid-column:first-child{padding-inline-start:var(--gx-ide-container__padding) !important}ch-grid-column:last-child{padding-inline-end:var(--gx-ide-container__padding) !important}ch-grid-cell{--mer-spacing--xs:var(--gx-ide-container__padding)}.layout{display:grid;gap:var(--mer-spacing--lg);box-sizing:border-box}.layout--two-cols{grid-template-columns:1fr 1fr}.layout--space-above{padding-block-start:var(--mer-spacing--lg)}gxg-tabs{box-shadow:none}:host(.gx-ide-component){height:100% !important;display:flex !important;flex-direction:column !important}:host(:focus-within) gx-ide-top-bar::part(wrapper){background-color:var(--color-secondary-enabled)}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--mer-font__weight--regular);font-size:var(--mer-font__size--xs);font-family:var(--mer-font-family--primary);height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1;box-sizing:border-box}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-main::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-main::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-main::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-overflow::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.tree-view-primary{font-size:var(--mer-font__size--2xs)}p{margin:0;font-size:var(--mer-font__size--xxs)}.buttons-container{display:flex;gap:var(--mer-spacing--xs)}:host{display:flex;align-items:center;justify-content:center;text-align:center;inline-size:100%;position:relative}:host(.animate){animation:fadeIn var(--mer-timing--fast) forwards;inset-block-start:0}.main-container{max-width:320px;margin:0 auto;gap:var(--mer-spacing--md);padding:var(--mer-spacing--md)}.main-container__icon-wrapper{border:var(--mer-border__width--sm) dashed var(--mer-accent__primary);border-radius:50%;min-width:40px;min-height:40px;display:flex;align-items:center;justify-content:center;pointer-events:none}.main-container__content{gap:var(--mer-spacing--sm)}.main-container,.main-container__content{display:flex;align-items:center;flex-direction:column}.description{line-height:1.5 !important}@keyframes fadeIn{0%{opacity:0;inset-block-start:5px}}";
4
4
 
5
5
  const CSS_BUNDLES = [
6
6
  "resets/box-sizing",
@@ -17,7 +17,7 @@ const GxIdeEmptyState = class {
17
17
  this.stateTitle = undefined;
18
18
  }
19
19
  render() {
20
- return (h(Host, { class: { animate: this.isAnimated } }, h("ch-theme", { model: CSS_BUNDLES }), h("article", { class: "main-container" }, this.stateIconSrc && (h("span", { class: "main-container__icon-wrapper" }, h("ch-image", { src: this.stateIconSrc, class: "icon-md" }))), h("div", { class: "main-container__content" }, this.stateTitle && (h("h2", { class: "body-regular-m" }, this.stateTitle)), this.stateDescription && (h("p", { class: "body-regular-s" }, this.stateDescription))), h("slot", null))));
20
+ return (h(Host, { class: { animate: this.isAnimated } }, h("ch-theme", { model: CSS_BUNDLES }), h("article", { class: "main-container" }, this.stateIconSrc && (h("span", { class: "main-container__icon-wrapper" }, h("ch-image", { src: this.stateIconSrc, class: "icon-md" }))), h("div", { class: "main-container__content" }, this.stateTitle && (h("h2", { class: "body-regular-m" }, this.stateTitle)), this.stateDescription && (h("p", { class: "body-regular-s description" }, this.stateDescription))), h("slot", null))));
21
21
  }
22
22
  get el() { return getElement(this); }
23
23
  };
@@ -1 +1 @@
1
- {"file":"gx-ide-empty-state.entry.js","mappings":";;AAAA,MAAM,kBAAkB,GAAG,g1ZAAg1Z;;ACG32Z,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,mBAAmB;IACnB,iBAAiB;IACjB,kBAAkB;CACnB,CAAC;MAOW,eAAe;;;0BAOa,KAAK;;;;;IAiB5C,MAAM;QACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,IACvC,gBAAU,KAAK,EAAE,WAAW,GAAa,EACzC,eAAS,KAAK,EAAC,gBAAgB,IAC5B,IAAI,CAAC,YAAY,KAChB,YAAM,KAAK,EAAC,8BAA8B,IACxC,gBAAU,GAAG,EAAE,IAAI,CAAC,YAAY,EAAE,KAAK,EAAC,SAAS,GAAY,CACxD,CACR,EACD,WAAK,KAAK,EAAC,yBAAyB,IACjC,IAAI,CAAC,UAAU,KACd,UAAI,KAAK,EAAC,gBAAgB,IAAE,IAAI,CAAC,UAAU,CAAM,CAClD,EACA,IAAI,CAAC,gBAAgB,KACpB,SAAG,KAAK,EAAC,gBAAgB,IAAE,IAAI,CAAC,gBAAgB,CAAK,CACtD,CACG,EACN,eAAa,CACL,CACL,EACP;KACH;;;;;;;","names":[],"sources":["src/components/_helpers/empty-state/gx-ide-empty-state.scss?tag=gx-ide-empty-state&encapsulation=shadow","src/components/_helpers/empty-state/gx-ide-empty-state.tsx"],"sourcesContent":["@import \"../../../global/gx-ide-common.scss\";\n\n:host {\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n inline-size: 100%;\n position: relative;\n}\n:host(.animate) {\n animation: fadeIn var(--mer-timing--fast) forwards;\n inset-block-start: 0;\n}\n.main-container {\n max-width: 320px;\n margin: 0 auto;\n gap: var(--mer-spacing--md);\n padding: var(--mer-spacing--md);\n\n &__icon-wrapper {\n border: var(--mer-border__width--sm) dashed var(--mer-accent__primary);\n border-radius: 50%;\n min-width: 40px;\n min-height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n }\n\n &__content {\n gap: var(--mer-spacing--sm);\n }\n}\n.main-container,\n.main-container__content {\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n inset-block-start: 5px;\n }\n}\n","import { Component, Host, h, Prop, Element } from \"@stencil/core\";\nimport { MercuryBundles } from \"@genexus/mercury\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/icon\",\n \"utils/typography\"\n];\n\n@Component({\n tag: \"gx-ide-empty-state\",\n styleUrl: \"gx-ide-empty-state.scss\",\n shadow: true\n})\nexport class GxIdeEmptyState {\n @Element() el: HTMLGxIdeEmptyStateElement;\n\n /**\n * Includes a subtle entry animation\n */\n // eslint-disable-next-line @stencil-community/reserved-member-names\n @Prop() readonly isAnimated: boolean = false;\n\n /**\n * The state description\n */\n @Prop() readonly stateDescription?: string;\n\n /**\n * The state icon\n */\n @Prop() readonly stateIconSrc?: string;\n\n /**\n * The state title\n */\n @Prop() readonly stateTitle!: string;\n\n render() {\n return (\n <Host class={{ animate: this.isAnimated }}>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <article class=\"main-container\">\n {this.stateIconSrc && (\n <span class=\"main-container__icon-wrapper\">\n <ch-image src={this.stateIconSrc} class=\"icon-md\"></ch-image>\n </span>\n )}\n <div class=\"main-container__content\">\n {this.stateTitle && (\n <h2 class=\"body-regular-m\">{this.stateTitle}</h2>\n )}\n {this.stateDescription && (\n <p class=\"body-regular-s\">{this.stateDescription}</p>\n )}\n </div>\n <slot></slot>\n </article>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"gx-ide-empty-state.entry.js","mappings":";;AAAA,MAAM,kBAAkB,GAAG,w3ZAAw3Z;;ACGn5Z,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,mBAAmB;IACnB,iBAAiB;IACjB,kBAAkB;CACnB,CAAC;MAOW,eAAe;;;0BAOa,KAAK;;;;;IAiB5C,MAAM;QACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,IACvC,gBAAU,KAAK,EAAE,WAAW,GAAa,EACzC,eAAS,KAAK,EAAC,gBAAgB,IAC5B,IAAI,CAAC,YAAY,KAChB,YAAM,KAAK,EAAC,8BAA8B,IACxC,gBAAU,GAAG,EAAE,IAAI,CAAC,YAAY,EAAE,KAAK,EAAC,SAAS,GAAY,CACxD,CACR,EACD,WAAK,KAAK,EAAC,yBAAyB,IACjC,IAAI,CAAC,UAAU,KACd,UAAI,KAAK,EAAC,gBAAgB,IAAE,IAAI,CAAC,UAAU,CAAM,CAClD,EACA,IAAI,CAAC,gBAAgB,KACpB,SAAG,KAAK,EAAC,4BAA4B,IAAE,IAAI,CAAC,gBAAgB,CAAK,CAClE,CACG,EACN,eAAa,CACL,CACL,EACP;KACH;;;;;;;","names":[],"sources":["src/components/_helpers/empty-state/gx-ide-empty-state.scss?tag=gx-ide-empty-state&encapsulation=shadow","src/components/_helpers/empty-state/gx-ide-empty-state.tsx"],"sourcesContent":["@import \"../../../global/gx-ide-common.scss\";\n\n:host {\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n inline-size: 100%;\n position: relative;\n}\n:host(.animate) {\n animation: fadeIn var(--mer-timing--fast) forwards;\n inset-block-start: 0;\n}\n.main-container {\n max-width: 320px;\n margin: 0 auto;\n gap: var(--mer-spacing--md);\n padding: var(--mer-spacing--md);\n\n &__icon-wrapper {\n border: var(--mer-border__width--sm) dashed var(--mer-accent__primary);\n border-radius: 50%;\n min-width: 40px;\n min-height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n }\n\n &__content {\n gap: var(--mer-spacing--sm);\n }\n}\n.main-container,\n.main-container__content {\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n\n.description {\n // WA: current font style (.body-regular-m) has a tight line-height\n line-height: 1.5 !important;\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n inset-block-start: 5px;\n }\n}\n","import { Component, Host, h, Prop, Element } from \"@stencil/core\";\nimport { MercuryBundles } from \"@genexus/mercury\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/icon\",\n \"utils/typography\"\n];\n\n@Component({\n tag: \"gx-ide-empty-state\",\n styleUrl: \"gx-ide-empty-state.scss\",\n shadow: true\n})\nexport class GxIdeEmptyState {\n @Element() el: HTMLGxIdeEmptyStateElement;\n\n /**\n * Includes a subtle entry animation\n */\n // eslint-disable-next-line @stencil-community/reserved-member-names\n @Prop() readonly isAnimated: boolean = false;\n\n /**\n * The state description\n */\n @Prop() readonly stateDescription?: string;\n\n /**\n * The state icon\n */\n @Prop() readonly stateIconSrc?: string;\n\n /**\n * The state title\n */\n @Prop() readonly stateTitle!: string;\n\n render() {\n return (\n <Host class={{ animate: this.isAnimated }}>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <article class=\"main-container\">\n {this.stateIconSrc && (\n <span class=\"main-container__icon-wrapper\">\n <ch-image src={this.stateIconSrc} class=\"icon-md\"></ch-image>\n </span>\n )}\n <div class=\"main-container__content\">\n {this.stateTitle && (\n <h2 class=\"body-regular-m\">{this.stateTitle}</h2>\n )}\n {this.stateDescription && (\n <p class=\"body-regular-s description\">{this.stateDescription}</p>\n )}\n </div>\n <slot></slot>\n </article>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -127,13 +127,11 @@ const FileUploader = class {
127
127
  const stateWithPromise = Object.assign(Object.assign({}, this.fileStates.get(id)), { uploadPromise });
128
128
  this.fileStates = new Map(this.fileStates.set(id, stateWithPromise));
129
129
  const result = await uploadPromise;
130
- console.log("Upload result:", { id, result });
131
130
  const state = this.fileStates.get(id);
132
131
  if (state) {
133
132
  if (result.success && result.remoteId) {
134
133
  const updatedState = Object.assign(Object.assign({}, state), { remoteId: result.remoteId, pending: false, progress: 100 });
135
134
  this.fileStates = new Map(this.fileStates.set(id, updatedState));
136
- console.log("File uploaded successfully:", updatedState);
137
135
  await ((_a = this.fileUploadedCallback) === null || _a === void 0 ? void 0 : _a.call(this, {
138
136
  name: state.name,
139
137
  originalName: state.file.name,
@@ -143,7 +141,6 @@ const FileUploader = class {
143
141
  else {
144
142
  const updatedState = Object.assign(Object.assign({}, state), { error: ((_b = result.errors) === null || _b === void 0 ? void 0 : _b.upload) || "Upload failed", pending: false });
145
143
  this.fileStates = new Map(this.fileStates.set(id, updatedState));
146
- console.log("File upload failed:", updatedState);
147
144
  }
148
145
  }
149
146
  }
@@ -154,7 +151,6 @@ const FileUploader = class {
154
151
  ? error.message
155
152
  : "Unknown error occurred", pending: false });
156
153
  this.fileStates = new Map(this.fileStates.set(id, updatedState));
157
- console.log("File upload error:", updatedState);
158
154
  }
159
155
  }
160
156
  }
@@ -228,14 +224,6 @@ const FileUploader = class {
228
224
  const uploadedFiles = Array.from(this.fileStates.values())
229
225
  .filter(file => {
230
226
  const isValid = !file.pending && file.remoteId && !file.error;
231
- console.log("File validation:", {
232
- id: file.id,
233
- name: file.name,
234
- pending: file.pending,
235
- remoteId: file.remoteId,
236
- error: file.error,
237
- isValid
238
- });
239
227
  return isValid;
240
228
  })
241
229
  .map(file => ({
@@ -243,7 +231,6 @@ const FileUploader = class {
243
231
  originalName: file.file.name,
244
232
  remoteId: file.remoteId
245
233
  }));
246
- console.log("Files to be confirmed:", uploadedFiles);
247
234
  if (uploadedFiles.length > 0) {
248
235
  await ((_a = this.dialogConfirmedCallback) === null || _a === void 0 ? void 0 : _a.call(this, uploadedFiles));
249
236
  }