@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
@@ -17,6 +17,7 @@ const mapCategoryToListItemGroup = (category) => {
17
17
  return {
18
18
  caption: type.name,
19
19
  id: type.name,
20
+ selected: type.selected,
20
21
  additionalInformation: {
21
22
  "stretch-start": {
22
23
  center: [{ imgSrc: type.icon }]
@@ -33,6 +34,7 @@ const mapDataTypesToList = (dataTypes) => {
33
34
  return {
34
35
  caption: dataType.name,
35
36
  id: dataType.name,
37
+ selected: dataType.selected,
36
38
  additionalInformation: {
37
39
  "stretch-start": {
38
40
  center: [{ imgSrc: dataType.icon || undefined }]
@@ -44,7 +46,7 @@ const mapDataTypesToList = (dataTypes) => {
44
46
  });
45
47
  };
46
48
 
47
- 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}";
49
+ 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)}";
48
50
 
49
51
  var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
50
52
  if (kind === "a" && !f)
@@ -62,19 +64,20 @@ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) ||
62
64
  throw new TypeError("Cannot write private member to an object whose class did not declare it");
63
65
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
64
66
  };
65
- var _GxIdeKbManagerImport__componentLocale, _GxIdeKbManagerImport_showAll, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, _GxIdeKbManagerImport_handleSelectionChange, _GxIdeKbManagerImport_updateListBoxModelState, _GxIdeKbManagerImport_showAllObjects, _GxIdeKbManagerImport_showRecentlyObjects, _GxIdeKbManagerImport_renderFooter;
67
+ 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;
66
68
  const CSS_BUNDLES = [
67
69
  "resets/box-sizing",
68
- "components/tab",
69
- "components/tooltip",
70
70
  "components/list-box",
71
- "components/tree-view",
72
71
  "utils/form--full",
73
- "utils/layout",
74
72
  "utils/typography",
73
+ "utils/layout",
75
74
  "utils/spacing",
76
75
  "chameleon/scrollbar"
77
76
  ];
77
+ const ARROW_UP_KEY = "ArrowUp";
78
+ const ARROW_DOWN_KEY = "ArrowDown";
79
+ const ENTER_KEY = "Enter";
80
+ const TAB_KEY = "Tab";
78
81
  const ALL_CATEGORY_ID = "all";
79
82
  const RECENTLY_USED_CATEGORY_ID = "recenttly-used";
80
83
  const CLOCK_ICON = MERCURY_ASSETS.getIconPath({
@@ -88,41 +91,64 @@ const GxIdeKbManagerImport = class {
88
91
  _GxIdeKbManagerImport__componentLocale.set(this, void 0);
89
92
  _GxIdeKbManagerImport_showAll.set(this, false);
90
93
  _GxIdeKbManagerImport_categoriesActionListItemGroupMap.set(this, new Map());
91
- _GxIdeKbManagerImport_handleSelectionChange.set(this, (event) => {
92
- var _a;
93
- const eventType = (_a = event.detail[0]) === null || _a === void 0 ? void 0 : _a.item.type;
94
- if (eventType === "actionable") {
95
- const name = event.detail[0].item.caption;
96
- const itemAdditionalBase = event.detail[0].item.additionalInformation["stretch-start"].center[0];
97
- const icon = itemAdditionalBase.imgSrc;
98
- this.dataTypeSelectedCallback({
99
- name: name,
100
- icon: icon
101
- });
102
- __classPrivateFieldGet(this, _GxIdeKbManagerImport_updateListBoxModelState, "f").call(this, event.detail[0].item.caption, "actionable");
103
- }
104
- else if (eventType === "group") {
105
- __classPrivateFieldGet(this, _GxIdeKbManagerImport_updateListBoxModelState, "f").call(this, event.detail[0].item.caption, "group");
94
+ _GxIdeKbManagerImport_dataTypeCategoryMap.set(this, new Map());
95
+ _GxIdeKbManagerImport_dataTypeDataIdMap.set(this, new Map());
96
+ _GxIdeKbManagerImport_lastArrowKey.set(this, null);
97
+ _GxIdeKbManagerImport_selectedDataTypeIds.set(this, {
98
+ // For setting focus
99
+ categoryId: undefined,
100
+ dataTypeId: undefined
101
+ });
102
+ _GxIdeKbManagerImport_focusAlreadySet.set(this, false);
103
+ _GxIdeKbManagerImport_actionListEl.set(this, void 0);
104
+ _GxIdeKbManagerImport_evaluateSelectionChanged.set(this, (path) => {
105
+ const chActionListItem = path.find(el => el.tagName === "CH-ACTION-LIST-ITEM");
106
+ if (chActionListItem) {
107
+ const id = chActionListItem.id;
108
+ const dataTypeData = __classPrivateFieldGet(this, _GxIdeKbManagerImport_dataTypeDataIdMap, "f").get(id);
109
+ this.dataTypeSelectedCallback(dataTypeData);
106
110
  }
107
111
  });
108
- _GxIdeKbManagerImport_updateListBoxModelState.set(this, (name, type) => {
109
- if (this.selectedCategory === RECENTLY_USED_CATEGORY_ID) {
110
- this.recentlyUsedActionListModel.forEach(item => {
111
- // clear selected
112
- item.selected = false;
113
- });
114
- const selectedItemIndex = this.recentlyUsed.findIndex(item => item.name === name);
115
- if (selectedItemIndex !== -1) {
116
- this.recentlyUsedActionListModel[selectedItemIndex].selected = true;
112
+ _GxIdeKbManagerImport_listKeyDownHandler.set(this, (event) => {
113
+ const pressedKey = event.key;
114
+ const path = event.composedPath();
115
+ if (pressedKey === ARROW_UP_KEY || pressedKey === ARROW_DOWN_KEY) {
116
+ __classPrivateFieldSet(this, _GxIdeKbManagerImport_lastArrowKey, pressedKey, "f");
117
+ if (pressedKey === ARROW_UP_KEY) {
118
+ // Check if this is the first group. IF it is, let the host know,
119
+ // so it can close the dialog.
120
+ const chActionListItem = path.find(el => el.tagName === "CH-ACTION-LIST-ITEM");
121
+ if (chActionListItem !== undefined) {
122
+ return;
123
+ }
124
+ // This is a ch-action-list-group
125
+ const actionGroup = path.find(el => el.tagName === "CH-ACTION-LIST-GROUP");
126
+ const currentFocusedActionGroupId = actionGroup.id;
127
+ const firstActionListGroupId = __classPrivateFieldGet(this, _GxIdeKbManagerImport_actionListEl, "f").shadowRoot.firstElementChild.id;
128
+ if (currentFocusedActionGroupId === firstActionListGroupId) {
129
+ this.arrowUpOnFirstElement();
130
+ }
117
131
  }
118
132
  }
119
- else if (type === "group" &&
120
- __classPrivateFieldGet(this, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, "f").has(name)) {
121
- const group = __classPrivateFieldGet(this, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, "f").get(name);
122
- const groupUpdated = Object.assign(Object.assign({}, group), { expanded: group.expanded });
123
- __classPrivateFieldGet(this, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, "f").set(name, groupUpdated);
133
+ else if (pressedKey === ENTER_KEY) {
134
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_evaluateSelectionChanged, "f").call(this, path);
135
+ }
136
+ else if (pressedKey === TAB_KEY) {
137
+ event.stopPropagation();
124
138
  }
125
139
  });
140
+ _GxIdeKbManagerImport_listClickHandler.set(this, (event) => {
141
+ if (__classPrivateFieldGet(this, _GxIdeKbManagerImport_lastArrowKey, "f")) ;
142
+ else if (event.detail === 0) {
143
+ // ignore keyboard Enter (Enter happens by default on buttons on onClick)
144
+ return;
145
+ }
146
+ else {
147
+ const path = event.composedPath();
148
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_evaluateSelectionChanged, "f").call(this, path);
149
+ }
150
+ __classPrivateFieldSet(this, _GxIdeKbManagerImport_lastArrowKey, null, "f");
151
+ });
126
152
  _GxIdeKbManagerImport_showAllObjects.set(this, () => {
127
153
  if (!__classPrivateFieldGet(this, _GxIdeKbManagerImport_showAll, "f")) {
128
154
  const allCategoriesActionListModel = [];
@@ -153,6 +179,13 @@ const GxIdeKbManagerImport = class {
153
179
  this.categoriesListBoxModel = newSelectedCategory;
154
180
  __classPrivateFieldSet(this, _GxIdeKbManagerImport_showAll, false, "f");
155
181
  };
182
+ _GxIdeKbManagerImport_handleButtonTab.set(this, (event) => {
183
+ // Prevents bubbling, which causes this component to close, due to how the IDE handles Tab event
184
+ // in a parent element.
185
+ if (event.key === TAB_KEY || event.key === ENTER_KEY) {
186
+ event.stopPropagation();
187
+ }
188
+ });
156
189
  _GxIdeKbManagerImport_renderFooter.set(this, () => {
157
190
  const recentlyUsedBtnClass = this.selectedCategory === RECENTLY_USED_CATEGORY_ID
158
191
  ? "button-secondary"
@@ -171,20 +204,49 @@ const GxIdeKbManagerImport = class {
171
204
  else {
172
205
  selectedCategoryDescription = this.selectedCategory;
173
206
  }
174
- return (index.h("footer", { class: "footer control-footer control-footer-start spacing-body-inline spacing-body-block scrollable\n " }, index.h("div", { class: "buttons-spacer" }, this.recentlyUsed && this.recentlyUsed.length > 0 && (index.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") }, index.h("ch-image", { class: "icon-md", src: CLOCK_ICON }))), index.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 => {
207
+ return (index.h("footer", { class: "footer control-footer control-footer-start scrollable\n " }, index.h("div", { class: "buttons-spacer" }, this.recentlyUsed && this.recentlyUsed.length > 0 && (index.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") }, index.h("ch-image", { class: "icon-md", src: CLOCK_ICON }))), index.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 => {
175
208
  const buttonClass = category.name === this.selectedCategory
176
209
  ? "button-secondary"
177
210
  : "button-tertiary";
178
- return (index.h("button", { class: `button-icon-only ${buttonClass}`, "aria-label": category.name, title: category.name, onClick: this.selectedCategoryHandler, "data-name": category.name }, index.h("ch-image", { class: "icon-md", src: category.icon })));
211
+ return (index.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 }, index.h("ch-image", { class: "icon-md", src: category.icon })));
179
212
  })), index.h("p", { class: "body-regular-s selected-category" }, selectedCategoryDescription)));
180
213
  });
214
+ _GxIdeKbManagerImport_setFocus.set(this, async () => {
215
+ if (__classPrivateFieldGet(this, _GxIdeKbManagerImport_focusAlreadySet, "f")) {
216
+ return;
217
+ }
218
+ let focusableElement;
219
+ setTimeout(() => {
220
+ // setTimeout as a WA, since the list-box elements are not rendered/read immediatelly
221
+ if (this.focusType === "selected" &&
222
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_selectedDataTypeIds, "f").categoryId &&
223
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_selectedDataTypeIds, "f").dataTypeId) {
224
+ // set focus on the selected element
225
+ const selectedDataTypeEl = __classPrivateFieldGet(this, _GxIdeKbManagerImport_actionListEl, "f").shadowRoot.getElementById(__classPrivateFieldGet(this, _GxIdeKbManagerImport_selectedDataTypeIds, "f").dataTypeId);
226
+ if (selectedDataTypeEl) {
227
+ focusableElement = selectedDataTypeEl;
228
+ }
229
+ }
230
+ else {
231
+ // set focus of the first element
232
+ const firstActionListGroup = __classPrivateFieldGet(this, _GxIdeKbManagerImport_actionListEl, "f").shadowRoot.firstElementChild;
233
+ const firstButton = firstActionListGroup.shadowRoot.firstElementChild;
234
+ focusableElement = firstButton;
235
+ }
236
+ focusableElement && focusableElement.focus();
237
+ __classPrivateFieldSet(this, _GxIdeKbManagerImport_focusAlreadySet, true, "f");
238
+ }, 150);
239
+ });
181
240
  this.categoriesListBoxModel = [];
182
241
  this.selectedCategory = undefined;
183
- this.statusInfo = [];
184
242
  this.recentlyUsedActionListModel = [];
185
243
  this.loading = true;
244
+ this.categoriesJustChanged = false;
245
+ this.actionListDidRender = false;
186
246
  this.categories = undefined;
187
247
  this.dataTypeSelectedCallback = undefined;
248
+ this.arrowUpOnFirstElement = undefined;
249
+ this.focusType = "first-element";
188
250
  this.recentlyUsed = [];
189
251
  }
190
252
  categoriesChanged(newCategories) {
@@ -195,9 +257,25 @@ const GxIdeKbManagerImport = class {
195
257
  newCategories.forEach(category => {
196
258
  const categoryListBoxModel = mapCategoryToListItemGroup(category);
197
259
  __classPrivateFieldGet(this, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, "f").set(category.name, categoryListBoxModel);
260
+ category.types.forEach(type => {
261
+ const isSelected = type.selected;
262
+ if (isSelected) {
263
+ // For setting focus
264
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_selectedDataTypeIds, "f").categoryId = category.name;
265
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_selectedDataTypeIds, "f").dataTypeId = type.name;
266
+ }
267
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_dataTypeCategoryMap, "f").set(type.name, category.id);
268
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_dataTypeDataIdMap, "f").set(type.name, {
269
+ id: category.id,
270
+ name: type.name,
271
+ icon: type.icon,
272
+ selected: type.selected
273
+ });
274
+ });
198
275
  });
199
276
  this.loading = false;
200
277
  __classPrivateFieldGet(this, _GxIdeKbManagerImport_showAllObjects, "f").call(this);
278
+ this.categoriesJustChanged = true;
201
279
  }
202
280
  recentlyUsedChanged(newRecentlyUsed) {
203
281
  this.recentlyUsedActionListModel = null;
@@ -209,7 +287,10 @@ const GxIdeKbManagerImport = class {
209
287
  this.recentlyUsed.length && this.recentlyUsedChanged(this.recentlyUsed);
210
288
  }
211
289
  render() {
212
- return (index.h(index.Host, { class: "widget" }, index.h("ch-theme", { model: CSS_BUNDLES }), this.loading ? (index.h("gx-ide-loader", { loaderTitle: __classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").loader.title, description: __classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").loader.description, show: true })) : (index.h("section", { class: "main" }, index.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)))));
290
+ return (index.h(index.Host, { class: "widget" }, index.h("ch-theme", { model: CSS_BUNDLES }), this.loading ? (index.h("gx-ide-loader", { loaderTitle: __classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").loader.title, description: __classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").loader.description, show: true })) : (index.h("section", { class: "main" }, index.h("ch-action-list-render", { ref: async (el) => {
291
+ __classPrivateFieldSet(this, _GxIdeKbManagerImport_actionListEl, el, "f");
292
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_setFocus, "f").call(this);
293
+ }, 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)))));
213
294
  }
214
295
  static get assetsDirs() { return ["gx-ide-assets/data-type-selector"]; }
215
296
  get el() { return index.getElement(this); }
@@ -218,7 +299,7 @@ const GxIdeKbManagerImport = class {
218
299
  "recentlyUsed": ["recentlyUsedChanged"]
219
300
  }; }
220
301
  };
221
- _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();
302
+ _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();
222
303
  GxIdeKbManagerImport.style = dataTypeSelectorCss;
223
304
 
224
305
  exports.gx_ide_data_type_selector = GxIdeKbManagerImport;
@@ -1 +1 @@
1
- {"file":"gx-ide-data-type-selector.entry.cjs.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,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,OAAO,GAAG,KAAK,CAAC;QACrB,uBAAA,IAAI,4CAAgB,MAApB,IAAI,CAAkB,CAAC;KACxB;IAYD,mBAAmB,CAAC,eAA+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,MAAMC,aAAM,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,QACED,QAACE,UAAI,IAAC,KAAK,EAAC,QAAQ,IAClBF,sBAAU,KAAK,EAAE,WAAW,GAAa,EACxC,IAAI,CAAC,OAAO,IACXA,2BACE,WAAW,EAAE,uBAAA,IAAI,8CAAkB,CAAC,MAAM,CAAC,KAAK,EAChD,WAAW,EAAE,uBAAA,IAAI,8CAAkB,CAAC,MAAM,CAAC,WAAW,EACtD,IAAI,SACW,KAEjBA,qBAAS,KAAK,EAAC,MAAM,IACnBA,mCACE,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":["getIconPath","h","Locale","Host"],"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.cjs.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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,EAAE,uBAAA,IAAI,gDAAoB,EACnC,OAAO,EAAE,uBAAA,IAAI,8CAAkB,GACR,EACxB,uBAAA,IAAI,0CAAc,MAAlB,IAAI,CAAgB,CACb,CACX,CACI,EACP;KACH;;;;;;;;;;;;;","names":["getIconPath","h","Locale","Host"],"sources":["src/components/data-type-selector/helpers.ts","src/components/data-type-selector/data-type-selector.scss?tag=gx-ide-data-type-selector&encapsulation=shadow","src/components/data-type-selector/data-type-selector.tsx"],"sourcesContent":["import { DataTypeCategoryData, DataTypeData } from \"./data-type-selector\";\nimport {\n ActionListItemGroup,\n ActionListModel\n} from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\n\nexport const mapCategoryToListItemGroup = (\n category: DataTypeCategoryData\n): ActionListItemGroup => {\n const categoryGroup: ActionListItemGroup = {\n caption: category.name,\n id: category.name,\n type: \"group\",\n expanded: true,\n expandable: true,\n items: category.types.map(type => {\n return {\n caption: type.name,\n id: type.name,\n selected: type.selected,\n additionalInformation: {\n \"stretch-start\": {\n center: [{ imgSrc: type.icon }]\n }\n },\n type: \"actionable\"\n };\n })\n };\n return categoryGroup;\n};\n\nexport const mapDataTypesToList = (\n dataTypes: DataTypeData[]\n): ActionListModel => {\n return dataTypes.map((dataType, index) => {\n return {\n caption: dataType.name,\n id: dataType.name,\n selected: dataType.selected,\n additionalInformation: {\n \"stretch-start\": {\n center: [{ imgSrc: dataType.icon || undefined }]\n }\n },\n type: \"actionable\",\n order: index\n };\n });\n};\n",":host {\n position: relative;\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr max-content;\n\n // WA: Prevent a custom css rule on genexus-web from overriding --control__border-width value.\n // TDOO: remove this when the custom style is removed from genexus-web.\n // custom stlye is: .gx-struct-editor .tabular-grid-cell {\n // --control__border-width: 0;\n // }\n\n --control__border-width: var(--mer-border__width--sm);\n --control__border-radius: var(--mer-border__radius--sm);\n}\n\n.main {\n display: contents;\n}\n\n.selected-category {\n margin: 0;\n text-transform: capitalize;\n margin-inline-start: var(\n --mer-spacing--md\n ); // TODO: Create a semantic class in Mercury for this case.\n white-space: nowrap;\n}\n\n.footer {\n overflow: auto;\n padding: var(--mer-spacing--xs);\n}\n","// 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}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e227aefb.js');
6
6
 
7
- 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}}";
7
+ 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}}";
8
8
 
9
9
  const CSS_BUNDLES = [
10
10
  "resets/box-sizing",
@@ -21,7 +21,7 @@ const GxIdeEmptyState = class {
21
21
  this.stateTitle = undefined;
22
22
  }
23
23
  render() {
24
- return (index.h(index.Host, { class: { animate: this.isAnimated } }, index.h("ch-theme", { model: CSS_BUNDLES }), index.h("article", { class: "main-container" }, this.stateIconSrc && (index.h("span", { class: "main-container__icon-wrapper" }, index.h("ch-image", { src: this.stateIconSrc, class: "icon-md" }))), index.h("div", { class: "main-container__content" }, this.stateTitle && (index.h("h2", { class: "body-regular-m" }, this.stateTitle)), this.stateDescription && (index.h("p", { class: "body-regular-s" }, this.stateDescription))), index.h("slot", null))));
24
+ return (index.h(index.Host, { class: { animate: this.isAnimated } }, index.h("ch-theme", { model: CSS_BUNDLES }), index.h("article", { class: "main-container" }, this.stateIconSrc && (index.h("span", { class: "main-container__icon-wrapper" }, index.h("ch-image", { src: this.stateIconSrc, class: "icon-md" }))), index.h("div", { class: "main-container__content" }, this.stateTitle && (index.h("h2", { class: "body-regular-m" }, this.stateTitle)), this.stateDescription && (index.h("p", { class: "body-regular-s description" }, this.stateDescription))), index.h("slot", null))));
25
25
  }
26
26
  get el() { return index.getElement(this); }
27
27
  };
@@ -1 +1 @@
1
- {"file":"gx-ide-empty-state.entry.cjs.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,QACEA,QAACC,UAAI,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,IACvCD,sBAAU,KAAK,EAAE,WAAW,GAAa,EACzCA,qBAAS,KAAK,EAAC,gBAAgB,IAC5B,IAAI,CAAC,YAAY,KAChBA,kBAAM,KAAK,EAAC,8BAA8B,IACxCA,sBAAU,GAAG,EAAE,IAAI,CAAC,YAAY,EAAE,KAAK,EAAC,SAAS,GAAY,CACxD,CACR,EACDA,iBAAK,KAAK,EAAC,yBAAyB,IACjC,IAAI,CAAC,UAAU,KACdA,gBAAI,KAAK,EAAC,gBAAgB,IAAE,IAAI,CAAC,UAAU,CAAM,CAClD,EACA,IAAI,CAAC,gBAAgB,KACpBA,eAAG,KAAK,EAAC,gBAAgB,IAAE,IAAI,CAAC,gBAAgB,CAAK,CACtD,CACG,EACNA,qBAAa,CACL,CACL,EACP;KACH;;;;;;;","names":["h","Host"],"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.cjs.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,QACEA,QAACC,UAAI,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,IACvCD,sBAAU,KAAK,EAAE,WAAW,GAAa,EACzCA,qBAAS,KAAK,EAAC,gBAAgB,IAC5B,IAAI,CAAC,YAAY,KAChBA,kBAAM,KAAK,EAAC,8BAA8B,IACxCA,sBAAU,GAAG,EAAE,IAAI,CAAC,YAAY,EAAE,KAAK,EAAC,SAAS,GAAY,CACxD,CACR,EACDA,iBAAK,KAAK,EAAC,yBAAyB,IACjC,IAAI,CAAC,UAAU,KACdA,gBAAI,KAAK,EAAC,gBAAgB,IAAE,IAAI,CAAC,UAAU,CAAM,CAClD,EACA,IAAI,CAAC,gBAAgB,KACpBA,eAAG,KAAK,EAAC,4BAA4B,IAAE,IAAI,CAAC,gBAAgB,CAAK,CAClE,CACG,EACNA,qBAAa,CACL,CACL,EACP;KACH;;;;;;;","names":["h","Host"],"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}
@@ -131,13 +131,11 @@ const FileUploader = class {
131
131
  const stateWithPromise = Object.assign(Object.assign({}, this.fileStates.get(id)), { uploadPromise });
132
132
  this.fileStates = new Map(this.fileStates.set(id, stateWithPromise));
133
133
  const result = await uploadPromise;
134
- console.log("Upload result:", { id, result });
135
134
  const state = this.fileStates.get(id);
136
135
  if (state) {
137
136
  if (result.success && result.remoteId) {
138
137
  const updatedState = Object.assign(Object.assign({}, state), { remoteId: result.remoteId, pending: false, progress: 100 });
139
138
  this.fileStates = new Map(this.fileStates.set(id, updatedState));
140
- console.log("File uploaded successfully:", updatedState);
141
139
  await ((_a = this.fileUploadedCallback) === null || _a === void 0 ? void 0 : _a.call(this, {
142
140
  name: state.name,
143
141
  originalName: state.file.name,
@@ -147,7 +145,6 @@ const FileUploader = class {
147
145
  else {
148
146
  const updatedState = Object.assign(Object.assign({}, state), { error: ((_b = result.errors) === null || _b === void 0 ? void 0 : _b.upload) || "Upload failed", pending: false });
149
147
  this.fileStates = new Map(this.fileStates.set(id, updatedState));
150
- console.log("File upload failed:", updatedState);
151
148
  }
152
149
  }
153
150
  }
@@ -158,7 +155,6 @@ const FileUploader = class {
158
155
  ? error.message
159
156
  : "Unknown error occurred", pending: false });
160
157
  this.fileStates = new Map(this.fileStates.set(id, updatedState));
161
- console.log("File upload error:", updatedState);
162
158
  }
163
159
  }
164
160
  }
@@ -232,14 +228,6 @@ const FileUploader = class {
232
228
  const uploadedFiles = Array.from(this.fileStates.values())
233
229
  .filter(file => {
234
230
  const isValid = !file.pending && file.remoteId && !file.error;
235
- console.log("File validation:", {
236
- id: file.id,
237
- name: file.name,
238
- pending: file.pending,
239
- remoteId: file.remoteId,
240
- error: file.error,
241
- isValid
242
- });
243
231
  return isValid;
244
232
  })
245
233
  .map(file => ({
@@ -247,7 +235,6 @@ const FileUploader = class {
247
235
  originalName: file.file.name,
248
236
  remoteId: file.remoteId
249
237
  }));
250
- console.log("Files to be confirmed:", uploadedFiles);
251
238
  if (uploadedFiles.length > 0) {
252
239
  await ((_a = this.dialogConfirmedCallback) === null || _a === void 0 ? void 0 : _a.call(this, uploadedFiles));
253
240
  }