@genexus/genexus-ide-ui 1.1.15 → 1.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,7 +46,7 @@ const mapDataTypesToList = (dataTypes) => {
46
46
  });
47
47
  };
48
48
 
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)}";
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)}.list-box::part(item__action),.list-box::part(group__action){font-size:var(--font-size-body-s) !important}";
50
50
 
51
51
  var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
52
52
  if (kind === "a" && !f)
@@ -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,QAAQ,EAAE,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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}
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,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,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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AAC,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;IA+ND,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,GAAG,EAAE,OAAM,EAAE;gBACX,uBAAA,IAAI,sCAAiB,EAAmC,MAAA,CAAC;gBACzD,uBAAA,IAAI,sCAAU,MAAd,IAAI,CAAY,CAAC;aAClB,EACD,KAAK,EAAC,UAAU,EAChB,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAClC,SAAS,EAAC,QAAQ,EAClB,SAAS,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\n// WA: Reduce font-size. This should be solved on Mercury.\n.list-box::part(item__action),\n.list-box::part(group__action) {\n font-size: var(--font-size-body-s) !important;\n}\n","// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n// Other Libraries\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\nimport {\n ActionListItemModel,\n ActionListModel\n} from \"@genexus/chameleon-controls-library\";\nimport { ActionListItemGroup } from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\n// Gx Ide Ui\nimport { Locale } from \"../../common/locale\";\nimport { mapCategoryToListItemGroup, mapDataTypesToList } from \"./helpers\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/list-box\",\n \"utils/form--full\",\n \"utils/typography\",\n \"utils/layout\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst ARROW_UP_KEY = \"ArrowUp\";\nconst ARROW_DOWN_KEY = \"ArrowDown\";\nconst ENTER_KEY = \"Enter\";\nconst TAB_KEY = \"Tab\";\n\nconst ALL_CATEGORY_ID = \"all\";\nconst RECENTLY_USED_CATEGORY_ID = \"recenttly-used\";\n\nconst CLOCK_ICON = getIconPath({\n category: \"system\",\n name: \"time\",\n colorType: \"primary\"\n});\n\n@Component({\n tag: \"gx-ide-data-type-selector\",\n styleUrl: \"data-type-selector.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/data-type-selector\"]\n})\nexport class GxIdeKbManagerImport {\n #_componentLocale: any;\n #showAll: boolean = false;\n #categoriesActionListItemGroupMap: Map<string, ActionListItemGroup> = new Map<\n string,\n ActionListItemGroup\n >();\n\n #dataTypeCategoryMap: Map<string, string> = new Map<string, string>();\n #dataTypeDataIdMap: Map<string, DataTypeData> = new Map<\n string,\n DataTypeData\n >();\n #lastArrowKey: typeof ARROW_UP_KEY | typeof ARROW_DOWN_KEY | null = null;\n #selectedDataTypeIds: SelectedDataTypeIds = {\n // For setting focus\n categoryId: undefined,\n dataTypeId: undefined\n };\n #focusAlreadySet: boolean = false;\n\n #actionListEl!: HTMLChActionListRenderElement;\n @Element() el: HTMLGxIdeDataTypeSelectorElement;\n\n @State() categoriesListBoxModel: ActionListItemModel[] = [];\n @State() selectedCategory: string;\n @State() recentlyUsedActionListModel: ActionListModel = [];\n @State() loading: boolean = true;\n @State() categoriesJustChanged: boolean = false;\n @State() actionListDidRender: boolean = false;\n\n /**\n * All possible types and its category\n */\n @Prop() readonly categories: DataTypeCategoryData[] = undefined;\n @Watch(\"categories\")\n categoriesChanged(newCategories: DataTypeCategoryData[]) {\n if (!newCategories?.length) {\n return;\n }\n\n this.#categoriesActionListItemGroupMap.clear();\n newCategories.forEach(category => {\n const categoryListBoxModel = mapCategoryToListItemGroup(category);\n this.#categoriesActionListItemGroupMap.set(\n category.name,\n categoryListBoxModel\n );\n category.types.forEach(type => {\n const isSelected = type.selected;\n if (isSelected) {\n // For setting focus\n this.#selectedDataTypeIds.categoryId = category.name;\n this.#selectedDataTypeIds.dataTypeId = type.name;\n }\n\n this.#dataTypeCategoryMap.set(type.name, category.id);\n this.#dataTypeDataIdMap.set(type.name, {\n id: category.id,\n name: type.name,\n icon: type.icon,\n selected: type.selected\n });\n });\n });\n this.loading = false;\n this.#showAllObjects();\n this.categoriesJustChanged = true;\n }\n\n /**\n * Callback invoked when the user has selected an item type\n */\n @Prop() readonly dataTypeSelectedCallback: DataTypeSelectedCallback;\n\n /**\n * Defines the type of focus applied when the component renders for the first time.\n */\n @Prop() readonly arrowUpOnFirstElement: ArrowFirstOnFirstElement;\n\n /**\n * Defines the type of focus applied when the component renders for the first time.\n */\n @Prop() readonly focusType: \"first-element\" | \"selected\" = \"first-element\";\n\n /**\n * All recently used types list\n */\n @Prop() readonly recentlyUsed: DataTypeData[] = [];\n @Watch(\"recentlyUsed\")\n recentlyUsedChanged(newRecentlyUsed: DataTypeData[]) {\n this.recentlyUsedActionListModel = null;\n this.recentlyUsedActionListModel = mapDataTypesToList(newRecentlyUsed);\n }\n\n async componentWillLoad() {\n this.#_componentLocale = await Locale.getComponentStrings(this.el);\n // initialize models\n this.recentlyUsed.length && this.recentlyUsedChanged(this.recentlyUsed);\n }\n\n #evaluateSelectionChanged = (path: EventTarget[]) => {\n const chActionListItem = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-ITEM\"\n );\n if (chActionListItem) {\n const id = (chActionListItem as HTMLElement).id;\n const dataTypeData = this.#dataTypeDataIdMap.get(id);\n this.dataTypeSelectedCallback(dataTypeData);\n }\n };\n\n #listKeyDownHandler = (event: KeyboardEvent) => {\n const pressedKey = event.key;\n const path = event.composedPath();\n\n if (pressedKey === ARROW_UP_KEY || pressedKey === ARROW_DOWN_KEY) {\n this.#lastArrowKey = pressedKey;\n\n if (pressedKey === ARROW_UP_KEY) {\n // Check if this is the first group. IF it is, let the host know,\n // so it can close the dialog.\n\n const chActionListItem = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-ITEM\"\n );\n\n if (chActionListItem !== undefined) {\n return;\n }\n\n // This is a ch-action-list-group\n const actionGroup = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-GROUP\"\n );\n const currentFocusedActionGroupId = (actionGroup as HTMLElement).id;\n\n const firstActionListGroupId =\n this.#actionListEl.shadowRoot.firstElementChild.id;\n\n if (currentFocusedActionGroupId === firstActionListGroupId) {\n this.arrowUpOnFirstElement();\n }\n }\n } else if (pressedKey === ENTER_KEY) {\n this.#evaluateSelectionChanged(path);\n } else if (pressedKey === TAB_KEY) {\n event.stopPropagation();\n }\n };\n\n #listClickHandler = (event: MouseEvent) => {\n if (this.#lastArrowKey) {\n // User navigated with ArrowUp or ArrowDown\n // Ignore, since this was not a click event.\n } else if (event.detail === 0) {\n // ignore keyboard Enter (Enter happens by default on buttons on onClick)\n return;\n } else {\n const path = event.composedPath();\n this.#evaluateSelectionChanged(path);\n }\n this.#lastArrowKey = null;\n };\n\n #showAllObjects = () => {\n if (!this.#showAll) {\n const allCategoriesActionListModel: ActionListItemModel[] = [];\n let counter = 1;\n const mapLength = this.#categoriesActionListItemGroupMap.size;\n for (const key of this.#categoriesActionListItemGroupMap.keys()) {\n allCategoriesActionListModel.push(\n this.#categoriesActionListItemGroupMap.get(key)\n );\n if (counter !== mapLength) {\n allCategoriesActionListModel.push({ type: \"separator\" });\n }\n counter++;\n }\n this.categoriesListBoxModel = allCategoriesActionListModel;\n this.#showAll = true;\n this.selectedCategory = ALL_CATEGORY_ID;\n }\n };\n\n #showRecentlyObjects = () => {\n this.#showAll = false;\n this.categoriesListBoxModel = this.recentlyUsedActionListModel;\n this.selectedCategory = RECENTLY_USED_CATEGORY_ID;\n };\n\n private selectedCategoryHandler = (e: MouseEvent) => {\n this.selectedCategory = (e.currentTarget as HTMLButtonElement).dataset.name;\n const newSelectedCategory = [\n this.#categoriesActionListItemGroupMap.get(this.selectedCategory)\n ];\n this.categoriesListBoxModel = newSelectedCategory;\n this.#showAll = false;\n };\n\n #handleButtonTab = (event: KeyboardEvent) => {\n // Prevents bubbling, which causes this component to close, due to how the IDE handles Tab event\n // in a parent element.\n if (event.key === TAB_KEY || event.key === ENTER_KEY) {\n event.stopPropagation();\n }\n };\n\n #renderFooter = () => {\n const recentlyUsedBtnClass =\n this.selectedCategory === RECENTLY_USED_CATEGORY_ID\n ? \"button-secondary\"\n : \"button-tertiary\";\n const allBtnClass =\n this.selectedCategory === ALL_CATEGORY_ID\n ? \"button-secondary\"\n : \"button-tertiary\";\n let selectedCategoryDescription = this.selectedCategory;\n if (this.selectedCategory === RECENTLY_USED_CATEGORY_ID) {\n selectedCategoryDescription =\n this.#_componentLocale.fixedTypes.recentlyUsed;\n } else if (this.selectedCategory === ALL_CATEGORY_ID) {\n selectedCategoryDescription = this.#_componentLocale.fixedTypes.all;\n } else {\n selectedCategoryDescription = this.selectedCategory;\n }\n\n return (\n <footer\n class=\"footer control-footer control-footer-start scrollable\n \"\n >\n <div class=\"buttons-spacer\">\n {this.recentlyUsed && this.recentlyUsed.length > 0 && (\n <button\n class={`button-icon-only ${recentlyUsedBtnClass}`}\n aria-label={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.recentlyUsed\n }`}\n title={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.recentlyUsed\n }`}\n onClick={this.#showRecentlyObjects}\n onKeyDown={this.#handleButtonTab}\n >\n <ch-image class=\"icon-md\" src={CLOCK_ICON}></ch-image>\n </button>\n )}\n <button\n class={`button-icon-only ${allBtnClass}`}\n onClick={this.#showAllObjects}\n onKeyDown={this.#handleButtonTab}\n aria-label={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.all\n }`}\n title={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.all\n }`}\n >\n [*]\n </button>\n {this.categories.map(category => {\n const buttonClass =\n category.name === this.selectedCategory\n ? \"button-secondary\"\n : \"button-tertiary\";\n\n return (\n <button\n class={`button-icon-only ${buttonClass}`}\n aria-label={category.name}\n title={category.name}\n onClick={this.selectedCategoryHandler}\n onKeyDown={this.#handleButtonTab}\n data-name={category.name}\n >\n <ch-image class=\"icon-md\" src={category.icon}></ch-image>\n </button>\n );\n })}\n </div>\n <p class=\"body-regular-s selected-category\">\n {selectedCategoryDescription}\n </p>\n </footer>\n );\n };\n\n #setFocus = async () => {\n if (this.#focusAlreadySet) {\n return;\n }\n let focusableElement: HTMLElement;\n\n setTimeout(() => {\n // setTimeout as a WA, since the list-box elements are not rendered/read immediatelly\n if (\n this.focusType === \"selected\" &&\n this.#selectedDataTypeIds.categoryId &&\n this.#selectedDataTypeIds.dataTypeId\n ) {\n // set focus on the selected element\n const selectedDataTypeEl = this.#actionListEl.shadowRoot.getElementById(\n this.#selectedDataTypeIds.dataTypeId\n );\n if (selectedDataTypeEl) {\n focusableElement = selectedDataTypeEl;\n }\n } else {\n // set focus of the first element\n const firstActionListGroup =\n this.#actionListEl.shadowRoot.firstElementChild;\n\n const firstButton = firstActionListGroup.shadowRoot.firstElementChild;\n focusableElement = firstButton as HTMLButtonElement;\n }\n\n focusableElement && (focusableElement as HTMLElement).focus();\n this.#focusAlreadySet = true;\n }, 150);\n };\n\n render(): void {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n {this.loading ? (\n <gx-ide-loader\n loaderTitle={this.#_componentLocale.loader.title}\n description={this.#_componentLocale.loader.description}\n show\n ></gx-ide-loader>\n ) : (\n <section class=\"main\">\n <ch-action-list-render\n ref={async el => {\n this.#actionListEl = el as HTMLChActionListRenderElement;\n this.#setFocus();\n }}\n class=\"list-box\"\n model={this.categoriesListBoxModel}\n selection=\"single\"\n onKeyDown={this.#listKeyDownHandler}\n onClick={this.#listClickHandler}\n ></ch-action-list-render>\n {this.#renderFooter()}\n </section>\n )}\n </Host>\n );\n }\n}\n\nexport type DataTypeCategoryData = {\n id: string;\n name: string;\n icon: string;\n types: DataTypeData[];\n};\nexport type DataTypeData = {\n id: string;\n name: string;\n icon: string;\n selected: boolean;\n};\n\nexport type DataTypeSelectedCallback = (data: DataTypeData) => Promise<void>;\n\ntype SelectedDataTypeIds = {\n categoryId: string;\n dataTypeId: string;\n};\n\nexport type ArrowFirstOnFirstElement = () => Promise<void>;\n"],"version":3}
@@ -22,4 +22,9 @@
22
22
  .footer {
23
23
  overflow: auto;
24
24
  padding: var(--mer-spacing--xs);
25
+ }
26
+
27
+ .list-box::part(item__action),
28
+ .list-box::part(group__action) {
29
+ font-size: var(--font-size-body-s) !important;
25
30
  }
@@ -43,7 +43,7 @@ const mapDataTypesToList = (dataTypes) => {
43
43
  });
44
44
  };
45
45
 
46
- 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)}";
46
+ 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)}.list-box::part(item__action),.list-box::part(group__action){font-size:var(--font-size-body-s) !important}";
47
47
 
48
48
  var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
49
49
  if (kind === "a" && !f)
@@ -1 +1 @@
1
- {"file":"gx-ide-data-type-selector.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,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,qBAAqB,EAAE;oBACrB,eAAe,EAAE;wBACf,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;qBAChC;iBACF;gBACD,IAAI,EAAE,YAAY;aACnB,CAAC;SACH,CAAC;KACH,CAAC;IACF,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC;AAEK,MAAM,kBAAkB,GAAG,CAChC,SAAyB;IAEzB,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK;QACnC,OAAO;YACL,OAAO,EAAE,QAAQ,CAAC,IAAI;YACtB,EAAE,EAAE,QAAQ,CAAC,IAAI;YACjB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,qBAAqB,EAAE;gBACrB,eAAe,EAAE;oBACf,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,IAAI,SAAS,EAAE,CAAC;iBACjD;aACF;YACD,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,KAAK;SACb,CAAC;KACH,CAA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AC,KAAK,EAChD,WAAW,EAAE,uBAAA,IAAI,8CAAkB,CAAC,MAAM,CAAC,WAAW,EACtD,IAAI,SACW,KAEjB,eAAS,KAAK,EAAC,MAAM,IACnB,6BACE,GAAG,EAAE,OAAM,EAAE;gBACX,uBAAA,IAAI,sCAAiB,EAAmC,MAAA,CAAC;gBACzD,uBAAA,IAAI,sCAAU,MAAd,IAAI,CAAY,CAAC;aAClB,EACD,KAAK,EAAC,UAAU,EAChB,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAClC,SAAS,EAAC,QAAQ,EAClB,SAAS,EAAE,uBAAA,IAAI,gDAAoB,EACnC,OAAO,EAAE,uBAAA,IAAI,8CAAkB,GACR,EACxB,uBAAA,IAAI,0CAAc,MAAlB,IAAI,CAAgB,CACb,CACX,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/data-type-selector/helpers.ts","src/components/data-type-selector/data-type-selector.scss?tag=gx-ide-data-type-selector&encapsulation=shadow","src/components/data-type-selector/data-type-selector.tsx"],"sourcesContent":["import { DataTypeCategoryData, DataTypeData } from \"./data-type-selector\";\nimport {\n ActionListItemGroup,\n ActionListModel\n} from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\n\nexport const mapCategoryToListItemGroup = (\n category: DataTypeCategoryData\n): ActionListItemGroup => {\n const categoryGroup: ActionListItemGroup = {\n caption: category.name,\n id: category.name,\n type: \"group\",\n expanded: true,\n expandable: true,\n items: category.types.map(type => {\n return {\n caption: type.name,\n id: type.name,\n selected: type.selected,\n additionalInformation: {\n \"stretch-start\": {\n center: [{ imgSrc: type.icon }]\n }\n },\n type: \"actionable\"\n };\n })\n };\n return categoryGroup;\n};\n\nexport const mapDataTypesToList = (\n dataTypes: DataTypeData[]\n): ActionListModel => {\n return dataTypes.map((dataType, index) => {\n return {\n caption: dataType.name,\n id: dataType.name,\n selected: dataType.selected,\n additionalInformation: {\n \"stretch-start\": {\n center: [{ imgSrc: dataType.icon || undefined }]\n }\n },\n type: \"actionable\",\n order: index\n };\n });\n};\n",":host {\n position: relative;\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr max-content;\n\n // WA: Prevent a custom css rule on genexus-web from overriding --control__border-width value.\n // TDOO: remove this when the custom style is removed from genexus-web.\n // custom stlye is: .gx-struct-editor .tabular-grid-cell {\n // --control__border-width: 0;\n // }\n\n --control__border-width: var(--mer-border__width--sm);\n --control__border-radius: var(--mer-border__radius--sm);\n}\n\n.main {\n display: contents;\n}\n\n.selected-category {\n margin: 0;\n text-transform: capitalize;\n margin-inline-start: var(\n --mer-spacing--md\n ); // TODO: Create a semantic class in Mercury for this case.\n white-space: nowrap;\n}\n\n.footer {\n overflow: auto;\n padding: var(--mer-spacing--xs);\n}\n","// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n// Other Libraries\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\nimport {\n ActionListItemModel,\n ActionListModel\n} from \"@genexus/chameleon-controls-library\";\nimport { ActionListItemGroup } from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\n// Gx Ide Ui\nimport { Locale } from \"../../common/locale\";\nimport { mapCategoryToListItemGroup, mapDataTypesToList } from \"./helpers\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/list-box\",\n \"utils/form--full\",\n \"utils/typography\",\n \"utils/layout\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst ARROW_UP_KEY = \"ArrowUp\";\nconst ARROW_DOWN_KEY = \"ArrowDown\";\nconst ENTER_KEY = \"Enter\";\nconst TAB_KEY = \"Tab\";\n\nconst ALL_CATEGORY_ID = \"all\";\nconst RECENTLY_USED_CATEGORY_ID = \"recenttly-used\";\n\nconst CLOCK_ICON = getIconPath({\n category: \"system\",\n name: \"time\",\n colorType: \"primary\"\n});\n\n@Component({\n tag: \"gx-ide-data-type-selector\",\n styleUrl: \"data-type-selector.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/data-type-selector\"]\n})\nexport class GxIdeKbManagerImport {\n #_componentLocale: any;\n #showAll: boolean = false;\n #categoriesActionListItemGroupMap: Map<string, ActionListItemGroup> = new Map<\n string,\n ActionListItemGroup\n >();\n\n #dataTypeCategoryMap: Map<string, string> = new Map<string, string>();\n #dataTypeDataIdMap: Map<string, DataTypeData> = new Map<\n string,\n DataTypeData\n >();\n #lastArrowKey: typeof ARROW_UP_KEY | typeof ARROW_DOWN_KEY | null = null;\n #selectedDataTypeIds: SelectedDataTypeIds = {\n // For setting focus\n categoryId: undefined,\n dataTypeId: undefined\n };\n #focusAlreadySet: boolean = false;\n\n #actionListEl!: HTMLChActionListRenderElement;\n @Element() el: HTMLGxIdeDataTypeSelectorElement;\n\n @State() categoriesListBoxModel: ActionListItemModel[] = [];\n @State() selectedCategory: string;\n @State() recentlyUsedActionListModel: ActionListModel = [];\n @State() loading: boolean = true;\n @State() categoriesJustChanged: boolean = false;\n @State() actionListDidRender: boolean = false;\n\n /**\n * All possible types and its category\n */\n @Prop() readonly categories: DataTypeCategoryData[] = undefined;\n @Watch(\"categories\")\n categoriesChanged(newCategories: DataTypeCategoryData[]) {\n if (!newCategories?.length) {\n return;\n }\n\n this.#categoriesActionListItemGroupMap.clear();\n newCategories.forEach(category => {\n const categoryListBoxModel = mapCategoryToListItemGroup(category);\n this.#categoriesActionListItemGroupMap.set(\n category.name,\n categoryListBoxModel\n );\n category.types.forEach(type => {\n const isSelected = type.selected;\n if (isSelected) {\n // For setting focus\n this.#selectedDataTypeIds.categoryId = category.name;\n this.#selectedDataTypeIds.dataTypeId = type.name;\n }\n\n this.#dataTypeCategoryMap.set(type.name, category.id);\n this.#dataTypeDataIdMap.set(type.name, {\n id: category.id,\n name: type.name,\n icon: type.icon,\n selected: type.selected\n });\n });\n });\n this.loading = false;\n this.#showAllObjects();\n this.categoriesJustChanged = true;\n }\n\n /**\n * Callback invoked when the user has selected an item type\n */\n @Prop() readonly dataTypeSelectedCallback: DataTypeSelectedCallback;\n\n /**\n * Defines the type of focus applied when the component renders for the first time.\n */\n @Prop() readonly arrowUpOnFirstElement: ArrowFirstOnFirstElement;\n\n /**\n * Defines the type of focus applied when the component renders for the first time.\n */\n @Prop() readonly focusType: \"first-element\" | \"selected\" = \"first-element\";\n\n /**\n * All recently used types list\n */\n @Prop() readonly recentlyUsed: DataTypeData[] = [];\n @Watch(\"recentlyUsed\")\n recentlyUsedChanged(newRecentlyUsed: DataTypeData[]) {\n this.recentlyUsedActionListModel = null;\n this.recentlyUsedActionListModel = mapDataTypesToList(newRecentlyUsed);\n }\n\n async componentWillLoad() {\n this.#_componentLocale = await Locale.getComponentStrings(this.el);\n // initialize models\n this.recentlyUsed.length && this.recentlyUsedChanged(this.recentlyUsed);\n }\n\n #evaluateSelectionChanged = (path: EventTarget[]) => {\n const chActionListItem = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-ITEM\"\n );\n if (chActionListItem) {\n const id = (chActionListItem as HTMLElement).id;\n const dataTypeData = this.#dataTypeDataIdMap.get(id);\n this.dataTypeSelectedCallback(dataTypeData);\n }\n };\n\n #listKeyDownHandler = (event: KeyboardEvent) => {\n const pressedKey = event.key;\n const path = event.composedPath();\n\n if (pressedKey === ARROW_UP_KEY || pressedKey === ARROW_DOWN_KEY) {\n this.#lastArrowKey = pressedKey;\n\n if (pressedKey === ARROW_UP_KEY) {\n // Check if this is the first group. IF it is, let the host know,\n // so it can close the dialog.\n\n const chActionListItem = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-ITEM\"\n );\n\n if (chActionListItem !== undefined) {\n return;\n }\n\n // This is a ch-action-list-group\n const actionGroup = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-GROUP\"\n );\n const currentFocusedActionGroupId = (actionGroup as HTMLElement).id;\n\n const firstActionListGroupId =\n this.#actionListEl.shadowRoot.firstElementChild.id;\n\n if (currentFocusedActionGroupId === firstActionListGroupId) {\n this.arrowUpOnFirstElement();\n }\n }\n } else if (pressedKey === ENTER_KEY) {\n this.#evaluateSelectionChanged(path);\n } else if (pressedKey === TAB_KEY) {\n event.stopPropagation();\n }\n };\n\n #listClickHandler = (event: MouseEvent) => {\n if (this.#lastArrowKey) {\n // User navigated with ArrowUp or ArrowDown\n // Ignore, since this was not a click event.\n } else if (event.detail === 0) {\n // ignore keyboard Enter (Enter happens by default on buttons on onClick)\n return;\n } else {\n const path = event.composedPath();\n this.#evaluateSelectionChanged(path);\n }\n this.#lastArrowKey = null;\n };\n\n #showAllObjects = () => {\n if (!this.#showAll) {\n const allCategoriesActionListModel: ActionListItemModel[] = [];\n let counter = 1;\n const mapLength = this.#categoriesActionListItemGroupMap.size;\n for (const key of this.#categoriesActionListItemGroupMap.keys()) {\n allCategoriesActionListModel.push(\n this.#categoriesActionListItemGroupMap.get(key)\n );\n if (counter !== mapLength) {\n allCategoriesActionListModel.push({ type: \"separator\" });\n }\n counter++;\n }\n this.categoriesListBoxModel = allCategoriesActionListModel;\n this.#showAll = true;\n this.selectedCategory = ALL_CATEGORY_ID;\n }\n };\n\n #showRecentlyObjects = () => {\n this.#showAll = false;\n this.categoriesListBoxModel = this.recentlyUsedActionListModel;\n this.selectedCategory = RECENTLY_USED_CATEGORY_ID;\n };\n\n private selectedCategoryHandler = (e: MouseEvent) => {\n this.selectedCategory = (e.currentTarget as HTMLButtonElement).dataset.name;\n const newSelectedCategory = [\n this.#categoriesActionListItemGroupMap.get(this.selectedCategory)\n ];\n this.categoriesListBoxModel = newSelectedCategory;\n this.#showAll = false;\n };\n\n #handleButtonTab = (event: KeyboardEvent) => {\n // Prevents bubbling, which causes this component to close, due to how the IDE handles Tab event\n // in a parent element.\n if (event.key === TAB_KEY || event.key === ENTER_KEY) {\n event.stopPropagation();\n }\n };\n\n #renderFooter = () => {\n const recentlyUsedBtnClass =\n this.selectedCategory === RECENTLY_USED_CATEGORY_ID\n ? \"button-secondary\"\n : \"button-tertiary\";\n const allBtnClass =\n this.selectedCategory === ALL_CATEGORY_ID\n ? \"button-secondary\"\n : \"button-tertiary\";\n let selectedCategoryDescription = this.selectedCategory;\n if (this.selectedCategory === RECENTLY_USED_CATEGORY_ID) {\n selectedCategoryDescription =\n this.#_componentLocale.fixedTypes.recentlyUsed;\n } else if (this.selectedCategory === ALL_CATEGORY_ID) {\n selectedCategoryDescription = this.#_componentLocale.fixedTypes.all;\n } else {\n selectedCategoryDescription = this.selectedCategory;\n }\n\n return (\n <footer\n class=\"footer control-footer control-footer-start scrollable\n \"\n >\n <div class=\"buttons-spacer\">\n {this.recentlyUsed && this.recentlyUsed.length > 0 && (\n <button\n class={`button-icon-only ${recentlyUsedBtnClass}`}\n aria-label={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.recentlyUsed\n }`}\n title={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.recentlyUsed\n }`}\n onClick={this.#showRecentlyObjects}\n onKeyDown={this.#handleButtonTab}\n >\n <ch-image class=\"icon-md\" src={CLOCK_ICON}></ch-image>\n </button>\n )}\n <button\n class={`button-icon-only ${allBtnClass}`}\n onClick={this.#showAllObjects}\n onKeyDown={this.#handleButtonTab}\n aria-label={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.all\n }`}\n title={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.all\n }`}\n >\n [*]\n </button>\n {this.categories.map(category => {\n const buttonClass =\n category.name === this.selectedCategory\n ? \"button-secondary\"\n : \"button-tertiary\";\n\n return (\n <button\n class={`button-icon-only ${buttonClass}`}\n aria-label={category.name}\n title={category.name}\n onClick={this.selectedCategoryHandler}\n onKeyDown={this.#handleButtonTab}\n data-name={category.name}\n >\n <ch-image class=\"icon-md\" src={category.icon}></ch-image>\n </button>\n );\n })}\n </div>\n <p class=\"body-regular-s selected-category\">\n {selectedCategoryDescription}\n </p>\n </footer>\n );\n };\n\n #setFocus = async () => {\n if (this.#focusAlreadySet) {\n return;\n }\n let focusableElement: HTMLElement;\n\n setTimeout(() => {\n // setTimeout as a WA, since the list-box elements are not rendered/read immediatelly\n if (\n this.focusType === \"selected\" &&\n this.#selectedDataTypeIds.categoryId &&\n this.#selectedDataTypeIds.dataTypeId\n ) {\n // set focus on the selected element\n const selectedDataTypeEl = this.#actionListEl.shadowRoot.getElementById(\n this.#selectedDataTypeIds.dataTypeId\n );\n if (selectedDataTypeEl) {\n focusableElement = selectedDataTypeEl;\n }\n } else {\n // set focus of the first element\n const firstActionListGroup =\n this.#actionListEl.shadowRoot.firstElementChild;\n\n const firstButton = firstActionListGroup.shadowRoot.firstElementChild;\n focusableElement = firstButton as HTMLButtonElement;\n }\n\n focusableElement && (focusableElement as HTMLElement).focus();\n this.#focusAlreadySet = true;\n }, 150);\n };\n\n render(): void {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n {this.loading ? (\n <gx-ide-loader\n loaderTitle={this.#_componentLocale.loader.title}\n description={this.#_componentLocale.loader.description}\n show\n ></gx-ide-loader>\n ) : (\n <section class=\"main\">\n <ch-action-list-render\n ref={async el => {\n this.#actionListEl = el as HTMLChActionListRenderElement;\n this.#setFocus();\n }}\n class=\"list-box\"\n model={this.categoriesListBoxModel}\n selection=\"single\"\n onKeyDown={this.#listKeyDownHandler}\n onClick={this.#listClickHandler}\n ></ch-action-list-render>\n {this.#renderFooter()}\n </section>\n )}\n </Host>\n );\n }\n}\n\nexport type DataTypeCategoryData = {\n id: string;\n name: string;\n icon: string;\n types: DataTypeData[];\n};\nexport type DataTypeData = {\n id: string;\n name: string;\n icon: string;\n selected: boolean;\n};\n\nexport type DataTypeSelectedCallback = (data: DataTypeData) => Promise<void>;\n\ntype SelectedDataTypeIds = {\n categoryId: string;\n dataTypeId: string;\n};\n\nexport type ArrowFirstOnFirstElement = () => Promise<void>;\n"],"version":3}
1
+ {"file":"gx-ide-data-type-selector.js","mappings":";;;;;AAMO,MAAM,0BAA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MAAA,CAAC;gBACzD,uBAAA,IAAI,sCAAU,MAAd,IAAI,CAAY,CAAC;aAClB,EACD,KAAK,EAAC,UAAU,EAChB,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAClC,SAAS,EAAC,QAAQ,EAClB,SAAS,EAAE,uBAAA,IAAI,gDAAoB,EACnC,OAAO,EAAE,uBAAA,IAAI,8CAAkB,GACR,EACxB,uBAAA,IAAI,0CAAc,MAAlB,IAAI,CAAgB,CACb,CACX,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/data-type-selector/helpers.ts","src/components/data-type-selector/data-type-selector.scss?tag=gx-ide-data-type-selector&encapsulation=shadow","src/components/data-type-selector/data-type-selector.tsx"],"sourcesContent":["import { DataTypeCategoryData, DataTypeData } from \"./data-type-selector\";\nimport {\n ActionListItemGroup,\n ActionListModel\n} from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\n\nexport const mapCategoryToListItemGroup = (\n category: DataTypeCategoryData\n): ActionListItemGroup => {\n const categoryGroup: ActionListItemGroup = {\n caption: category.name,\n id: category.name,\n type: \"group\",\n expanded: true,\n expandable: true,\n items: category.types.map(type => {\n return {\n caption: type.name,\n id: type.name,\n selected: type.selected,\n additionalInformation: {\n \"stretch-start\": {\n center: [{ imgSrc: type.icon }]\n }\n },\n type: \"actionable\"\n };\n })\n };\n return categoryGroup;\n};\n\nexport const mapDataTypesToList = (\n dataTypes: DataTypeData[]\n): ActionListModel => {\n return dataTypes.map((dataType, index) => {\n return {\n caption: dataType.name,\n id: dataType.name,\n selected: dataType.selected,\n additionalInformation: {\n \"stretch-start\": {\n center: [{ imgSrc: dataType.icon || undefined }]\n }\n },\n type: \"actionable\",\n order: index\n };\n });\n};\n",":host {\n position: relative;\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr max-content;\n\n // WA: Prevent a custom css rule on genexus-web from overriding --control__border-width value.\n // TDOO: remove this when the custom style is removed from genexus-web.\n // custom stlye is: .gx-struct-editor .tabular-grid-cell {\n // --control__border-width: 0;\n // }\n\n --control__border-width: var(--mer-border__width--sm);\n --control__border-radius: var(--mer-border__radius--sm);\n}\n\n.main {\n display: contents;\n}\n\n.selected-category {\n margin: 0;\n text-transform: capitalize;\n margin-inline-start: var(\n --mer-spacing--md\n ); // TODO: Create a semantic class in Mercury for this case.\n white-space: nowrap;\n}\n\n.footer {\n overflow: auto;\n padding: var(--mer-spacing--xs);\n}\n\n// WA: Reduce font-size. This should be solved on Mercury.\n.list-box::part(item__action),\n.list-box::part(group__action) {\n font-size: var(--font-size-body-s) !important;\n}\n","// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n// Other Libraries\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\nimport {\n ActionListItemModel,\n ActionListModel\n} from \"@genexus/chameleon-controls-library\";\nimport { ActionListItemGroup } from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\n// Gx Ide Ui\nimport { Locale } from \"../../common/locale\";\nimport { mapCategoryToListItemGroup, mapDataTypesToList } from \"./helpers\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/list-box\",\n \"utils/form--full\",\n \"utils/typography\",\n \"utils/layout\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst ARROW_UP_KEY = \"ArrowUp\";\nconst ARROW_DOWN_KEY = \"ArrowDown\";\nconst ENTER_KEY = \"Enter\";\nconst TAB_KEY = \"Tab\";\n\nconst ALL_CATEGORY_ID = \"all\";\nconst RECENTLY_USED_CATEGORY_ID = \"recenttly-used\";\n\nconst CLOCK_ICON = getIconPath({\n category: \"system\",\n name: \"time\",\n colorType: \"primary\"\n});\n\n@Component({\n tag: \"gx-ide-data-type-selector\",\n styleUrl: \"data-type-selector.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/data-type-selector\"]\n})\nexport class GxIdeKbManagerImport {\n #_componentLocale: any;\n #showAll: boolean = false;\n #categoriesActionListItemGroupMap: Map<string, ActionListItemGroup> = new Map<\n string,\n ActionListItemGroup\n >();\n\n #dataTypeCategoryMap: Map<string, string> = new Map<string, string>();\n #dataTypeDataIdMap: Map<string, DataTypeData> = new Map<\n string,\n DataTypeData\n >();\n #lastArrowKey: typeof ARROW_UP_KEY | typeof ARROW_DOWN_KEY | null = null;\n #selectedDataTypeIds: SelectedDataTypeIds = {\n // For setting focus\n categoryId: undefined,\n dataTypeId: undefined\n };\n #focusAlreadySet: boolean = false;\n\n #actionListEl!: HTMLChActionListRenderElement;\n @Element() el: HTMLGxIdeDataTypeSelectorElement;\n\n @State() categoriesListBoxModel: ActionListItemModel[] = [];\n @State() selectedCategory: string;\n @State() recentlyUsedActionListModel: ActionListModel = [];\n @State() loading: boolean = true;\n @State() categoriesJustChanged: boolean = false;\n @State() actionListDidRender: boolean = false;\n\n /**\n * All possible types and its category\n */\n @Prop() readonly categories: DataTypeCategoryData[] = undefined;\n @Watch(\"categories\")\n categoriesChanged(newCategories: DataTypeCategoryData[]) {\n if (!newCategories?.length) {\n return;\n }\n\n this.#categoriesActionListItemGroupMap.clear();\n newCategories.forEach(category => {\n const categoryListBoxModel = mapCategoryToListItemGroup(category);\n this.#categoriesActionListItemGroupMap.set(\n category.name,\n categoryListBoxModel\n );\n category.types.forEach(type => {\n const isSelected = type.selected;\n if (isSelected) {\n // For setting focus\n this.#selectedDataTypeIds.categoryId = category.name;\n this.#selectedDataTypeIds.dataTypeId = type.name;\n }\n\n this.#dataTypeCategoryMap.set(type.name, category.id);\n this.#dataTypeDataIdMap.set(type.name, {\n id: category.id,\n name: type.name,\n icon: type.icon,\n selected: type.selected\n });\n });\n });\n this.loading = false;\n this.#showAllObjects();\n this.categoriesJustChanged = true;\n }\n\n /**\n * Callback invoked when the user has selected an item type\n */\n @Prop() readonly dataTypeSelectedCallback: DataTypeSelectedCallback;\n\n /**\n * Defines the type of focus applied when the component renders for the first time.\n */\n @Prop() readonly arrowUpOnFirstElement: ArrowFirstOnFirstElement;\n\n /**\n * Defines the type of focus applied when the component renders for the first time.\n */\n @Prop() readonly focusType: \"first-element\" | \"selected\" = \"first-element\";\n\n /**\n * All recently used types list\n */\n @Prop() readonly recentlyUsed: DataTypeData[] = [];\n @Watch(\"recentlyUsed\")\n recentlyUsedChanged(newRecentlyUsed: DataTypeData[]) {\n this.recentlyUsedActionListModel = null;\n this.recentlyUsedActionListModel = mapDataTypesToList(newRecentlyUsed);\n }\n\n async componentWillLoad() {\n this.#_componentLocale = await Locale.getComponentStrings(this.el);\n // initialize models\n this.recentlyUsed.length && this.recentlyUsedChanged(this.recentlyUsed);\n }\n\n #evaluateSelectionChanged = (path: EventTarget[]) => {\n const chActionListItem = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-ITEM\"\n );\n if (chActionListItem) {\n const id = (chActionListItem as HTMLElement).id;\n const dataTypeData = this.#dataTypeDataIdMap.get(id);\n this.dataTypeSelectedCallback(dataTypeData);\n }\n };\n\n #listKeyDownHandler = (event: KeyboardEvent) => {\n const pressedKey = event.key;\n const path = event.composedPath();\n\n if (pressedKey === ARROW_UP_KEY || pressedKey === ARROW_DOWN_KEY) {\n this.#lastArrowKey = pressedKey;\n\n if (pressedKey === ARROW_UP_KEY) {\n // Check if this is the first group. IF it is, let the host know,\n // so it can close the dialog.\n\n const chActionListItem = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-ITEM\"\n );\n\n if (chActionListItem !== undefined) {\n return;\n }\n\n // This is a ch-action-list-group\n const actionGroup = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-GROUP\"\n );\n const currentFocusedActionGroupId = (actionGroup as HTMLElement).id;\n\n const firstActionListGroupId =\n this.#actionListEl.shadowRoot.firstElementChild.id;\n\n if (currentFocusedActionGroupId === firstActionListGroupId) {\n this.arrowUpOnFirstElement();\n }\n }\n } else if (pressedKey === ENTER_KEY) {\n this.#evaluateSelectionChanged(path);\n } else if (pressedKey === TAB_KEY) {\n event.stopPropagation();\n }\n };\n\n #listClickHandler = (event: MouseEvent) => {\n if (this.#lastArrowKey) {\n // User navigated with ArrowUp or ArrowDown\n // Ignore, since this was not a click event.\n } else if (event.detail === 0) {\n // ignore keyboard Enter (Enter happens by default on buttons on onClick)\n return;\n } else {\n const path = event.composedPath();\n this.#evaluateSelectionChanged(path);\n }\n this.#lastArrowKey = null;\n };\n\n #showAllObjects = () => {\n if (!this.#showAll) {\n const allCategoriesActionListModel: ActionListItemModel[] = [];\n let counter = 1;\n const mapLength = this.#categoriesActionListItemGroupMap.size;\n for (const key of this.#categoriesActionListItemGroupMap.keys()) {\n allCategoriesActionListModel.push(\n this.#categoriesActionListItemGroupMap.get(key)\n );\n if (counter !== mapLength) {\n allCategoriesActionListModel.push({ type: \"separator\" });\n }\n counter++;\n }\n this.categoriesListBoxModel = allCategoriesActionListModel;\n this.#showAll = true;\n this.selectedCategory = ALL_CATEGORY_ID;\n }\n };\n\n #showRecentlyObjects = () => {\n this.#showAll = false;\n this.categoriesListBoxModel = this.recentlyUsedActionListModel;\n this.selectedCategory = RECENTLY_USED_CATEGORY_ID;\n };\n\n private selectedCategoryHandler = (e: MouseEvent) => {\n this.selectedCategory = (e.currentTarget as HTMLButtonElement).dataset.name;\n const newSelectedCategory = [\n this.#categoriesActionListItemGroupMap.get(this.selectedCategory)\n ];\n this.categoriesListBoxModel = newSelectedCategory;\n this.#showAll = false;\n };\n\n #handleButtonTab = (event: KeyboardEvent) => {\n // Prevents bubbling, which causes this component to close, due to how the IDE handles Tab event\n // in a parent element.\n if (event.key === TAB_KEY || event.key === ENTER_KEY) {\n event.stopPropagation();\n }\n };\n\n #renderFooter = () => {\n const recentlyUsedBtnClass =\n this.selectedCategory === RECENTLY_USED_CATEGORY_ID\n ? \"button-secondary\"\n : \"button-tertiary\";\n const allBtnClass =\n this.selectedCategory === ALL_CATEGORY_ID\n ? \"button-secondary\"\n : \"button-tertiary\";\n let selectedCategoryDescription = this.selectedCategory;\n if (this.selectedCategory === RECENTLY_USED_CATEGORY_ID) {\n selectedCategoryDescription =\n this.#_componentLocale.fixedTypes.recentlyUsed;\n } else if (this.selectedCategory === ALL_CATEGORY_ID) {\n selectedCategoryDescription = this.#_componentLocale.fixedTypes.all;\n } else {\n selectedCategoryDescription = this.selectedCategory;\n }\n\n return (\n <footer\n class=\"footer control-footer control-footer-start scrollable\n \"\n >\n <div class=\"buttons-spacer\">\n {this.recentlyUsed && this.recentlyUsed.length > 0 && (\n <button\n class={`button-icon-only ${recentlyUsedBtnClass}`}\n aria-label={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.recentlyUsed\n }`}\n title={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.recentlyUsed\n }`}\n onClick={this.#showRecentlyObjects}\n onKeyDown={this.#handleButtonTab}\n >\n <ch-image class=\"icon-md\" src={CLOCK_ICON}></ch-image>\n </button>\n )}\n <button\n class={`button-icon-only ${allBtnClass}`}\n onClick={this.#showAllObjects}\n onKeyDown={this.#handleButtonTab}\n aria-label={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.all\n }`}\n title={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.all\n }`}\n >\n [*]\n </button>\n {this.categories.map(category => {\n const buttonClass =\n category.name === this.selectedCategory\n ? \"button-secondary\"\n : \"button-tertiary\";\n\n return (\n <button\n class={`button-icon-only ${buttonClass}`}\n aria-label={category.name}\n title={category.name}\n onClick={this.selectedCategoryHandler}\n onKeyDown={this.#handleButtonTab}\n data-name={category.name}\n >\n <ch-image class=\"icon-md\" src={category.icon}></ch-image>\n </button>\n );\n })}\n </div>\n <p class=\"body-regular-s selected-category\">\n {selectedCategoryDescription}\n </p>\n </footer>\n );\n };\n\n #setFocus = async () => {\n if (this.#focusAlreadySet) {\n return;\n }\n let focusableElement: HTMLElement;\n\n setTimeout(() => {\n // setTimeout as a WA, since the list-box elements are not rendered/read immediatelly\n if (\n this.focusType === \"selected\" &&\n this.#selectedDataTypeIds.categoryId &&\n this.#selectedDataTypeIds.dataTypeId\n ) {\n // set focus on the selected element\n const selectedDataTypeEl = this.#actionListEl.shadowRoot.getElementById(\n this.#selectedDataTypeIds.dataTypeId\n );\n if (selectedDataTypeEl) {\n focusableElement = selectedDataTypeEl;\n }\n } else {\n // set focus of the first element\n const firstActionListGroup =\n this.#actionListEl.shadowRoot.firstElementChild;\n\n const firstButton = firstActionListGroup.shadowRoot.firstElementChild;\n focusableElement = firstButton as HTMLButtonElement;\n }\n\n focusableElement && (focusableElement as HTMLElement).focus();\n this.#focusAlreadySet = true;\n }, 150);\n };\n\n render(): void {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n {this.loading ? (\n <gx-ide-loader\n loaderTitle={this.#_componentLocale.loader.title}\n description={this.#_componentLocale.loader.description}\n show\n ></gx-ide-loader>\n ) : (\n <section class=\"main\">\n <ch-action-list-render\n ref={async el => {\n this.#actionListEl = el as HTMLChActionListRenderElement;\n this.#setFocus();\n }}\n class=\"list-box\"\n model={this.categoriesListBoxModel}\n selection=\"single\"\n onKeyDown={this.#listKeyDownHandler}\n onClick={this.#listClickHandler}\n ></ch-action-list-render>\n {this.#renderFooter()}\n </section>\n )}\n </Host>\n );\n }\n}\n\nexport type DataTypeCategoryData = {\n id: string;\n name: string;\n icon: string;\n types: DataTypeData[];\n};\nexport type DataTypeData = {\n id: string;\n name: string;\n icon: string;\n selected: boolean;\n};\n\nexport type DataTypeSelectedCallback = (data: DataTypeData) => Promise<void>;\n\ntype SelectedDataTypeIds = {\n categoryId: string;\n dataTypeId: string;\n};\n\nexport type ArrowFirstOnFirstElement = () => Promise<void>;\n"],"version":3}
@@ -42,7 +42,7 @@ const mapDataTypesToList = (dataTypes) => {
42
42
  });
43
43
  };
44
44
 
45
- const dataTypeSelectorCss = ":host{position:relative;display:grid;block-size:100%;overflow:auto;grid-template-rows:1fr max-content;--control__border-width:var(--mer-border__width--sm);--control__border-radius:var(--mer-border__radius--sm)}.main{display:contents}.selected-category{margin:0;text-transform:capitalize;margin-inline-start:var(--mer-spacing--md);white-space:nowrap}.footer{overflow:auto;padding:var(--mer-spacing--xs)}";
45
+ const dataTypeSelectorCss = ":host{position:relative;display:grid;block-size:100%;overflow:auto;grid-template-rows:1fr max-content;--control__border-width:var(--mer-border__width--sm);--control__border-radius:var(--mer-border__radius--sm)}.main{display:contents}.selected-category{margin:0;text-transform:capitalize;margin-inline-start:var(--mer-spacing--md);white-space:nowrap}.footer{overflow:auto;padding:var(--mer-spacing--xs)}.list-box::part(item__action),.list-box::part(group__action){font-size:var(--font-size-body-s) !important}";
46
46
 
47
47
  var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
48
48
  if (kind === "a" && !f)
@@ -1 +1 @@
1
- {"file":"gx-ide-data-type-selector.entry.js","mappings":";;;;AAMO,MAAM,0BAA0B,GAAG,CACxC,QAA8B;IAE9B,MAAM,aAAa,GAAwB;QACzC,OAAO,EAAE,QAAQ,CAAC,IAAI;QACtB,EAAE,EAAE,QAAQ,CAAC,IAAI;QACjB,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI;QAChB,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI;YAC5B,OAAO;gBACL,OAAO,EAAE,IAAI,CAAC,IAAI;gBAClB,EAAE,EAAE,IAAI,CAAC,IAAI;gBACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,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;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AiB;QACrB,uBAAA,IAAI,0CAAqB,MAAM,MAAM,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC,MAAA,CAAC;;QAEnE,IAAI,CAAC,YAAY,CAAC,MAAM,IAAI,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KACzE;IA+ND,MAAM;QACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,IAClB,gBAAU,KAAK,EAAE,WAAW,GAAa,EACxC,IAAI,CAAC,OAAO,IACX,qBACE,WAAW,EAAE,uBAAA,IAAI,8CAAkB,CAAC,MAAM,CAAC,KAAK,EAChD,WAAW,EAAE,uBAAA,IAAI,8CAAkB,CAAC,MAAM,CAAC,WAAW,EACtD,IAAI,SACW,KAEjB,eAAS,KAAK,EAAC,MAAM,IACnB,6BACE,GAAG,EAAE,OAAM,EAAE;gBACX,uBAAA,IAAI,sCAAiB,EAAmC,MAAA,CAAC;gBACzD,uBAAA,IAAI,sCAAU,MAAd,IAAI,CAAY,CAAC;aAClB,EACD,KAAK,EAAC,UAAU,EAChB,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAClC,SAAS,EAAC,QAAQ,EAClB,SAAS,EAAE,uBAAA,IAAI,gDAAoB,EACnC,OAAO,EAAE,uBAAA,IAAI,8CAAkB,GACR,EACxB,uBAAA,IAAI,0CAAc,MAAlB,IAAI,CAAgB,CACb,CACX,CACI,EACP;KACH;;;;;;;;;;;;;","names":[],"sources":["src/components/data-type-selector/helpers.ts","src/components/data-type-selector/data-type-selector.scss?tag=gx-ide-data-type-selector&encapsulation=shadow","src/components/data-type-selector/data-type-selector.tsx"],"sourcesContent":["import { DataTypeCategoryData, DataTypeData } from \"./data-type-selector\";\nimport {\n ActionListItemGroup,\n ActionListModel\n} from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\n\nexport const mapCategoryToListItemGroup = (\n category: DataTypeCategoryData\n): ActionListItemGroup => {\n const categoryGroup: ActionListItemGroup = {\n caption: category.name,\n id: category.name,\n type: \"group\",\n expanded: true,\n expandable: true,\n items: category.types.map(type => {\n return {\n caption: type.name,\n id: type.name,\n selected: type.selected,\n additionalInformation: {\n \"stretch-start\": {\n center: [{ imgSrc: type.icon }]\n }\n },\n type: \"actionable\"\n };\n })\n };\n return categoryGroup;\n};\n\nexport const mapDataTypesToList = (\n dataTypes: DataTypeData[]\n): ActionListModel => {\n return dataTypes.map((dataType, index) => {\n return {\n caption: dataType.name,\n id: dataType.name,\n selected: dataType.selected,\n additionalInformation: {\n \"stretch-start\": {\n center: [{ imgSrc: dataType.icon || undefined }]\n }\n },\n type: \"actionable\",\n order: index\n };\n });\n};\n",":host {\n position: relative;\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr max-content;\n\n // WA: Prevent a custom css rule on genexus-web from overriding --control__border-width value.\n // TDOO: remove this when the custom style is removed from genexus-web.\n // custom stlye is: .gx-struct-editor .tabular-grid-cell {\n // --control__border-width: 0;\n // }\n\n --control__border-width: var(--mer-border__width--sm);\n --control__border-radius: var(--mer-border__radius--sm);\n}\n\n.main {\n display: contents;\n}\n\n.selected-category {\n margin: 0;\n text-transform: capitalize;\n margin-inline-start: var(\n --mer-spacing--md\n ); // TODO: Create a semantic class in Mercury for this case.\n white-space: nowrap;\n}\n\n.footer {\n overflow: auto;\n padding: var(--mer-spacing--xs);\n}\n","// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n// Other Libraries\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\nimport {\n ActionListItemModel,\n ActionListModel\n} from \"@genexus/chameleon-controls-library\";\nimport { ActionListItemGroup } from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\n// Gx Ide Ui\nimport { Locale } from \"../../common/locale\";\nimport { mapCategoryToListItemGroup, mapDataTypesToList } from \"./helpers\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/list-box\",\n \"utils/form--full\",\n \"utils/typography\",\n \"utils/layout\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst ARROW_UP_KEY = \"ArrowUp\";\nconst ARROW_DOWN_KEY = \"ArrowDown\";\nconst ENTER_KEY = \"Enter\";\nconst TAB_KEY = \"Tab\";\n\nconst ALL_CATEGORY_ID = \"all\";\nconst RECENTLY_USED_CATEGORY_ID = \"recenttly-used\";\n\nconst CLOCK_ICON = getIconPath({\n category: \"system\",\n name: \"time\",\n colorType: \"primary\"\n});\n\n@Component({\n tag: \"gx-ide-data-type-selector\",\n styleUrl: \"data-type-selector.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/data-type-selector\"]\n})\nexport class GxIdeKbManagerImport {\n #_componentLocale: any;\n #showAll: boolean = false;\n #categoriesActionListItemGroupMap: Map<string, ActionListItemGroup> = new Map<\n string,\n ActionListItemGroup\n >();\n\n #dataTypeCategoryMap: Map<string, string> = new Map<string, string>();\n #dataTypeDataIdMap: Map<string, DataTypeData> = new Map<\n string,\n DataTypeData\n >();\n #lastArrowKey: typeof ARROW_UP_KEY | typeof ARROW_DOWN_KEY | null = null;\n #selectedDataTypeIds: SelectedDataTypeIds = {\n // For setting focus\n categoryId: undefined,\n dataTypeId: undefined\n };\n #focusAlreadySet: boolean = false;\n\n #actionListEl!: HTMLChActionListRenderElement;\n @Element() el: HTMLGxIdeDataTypeSelectorElement;\n\n @State() categoriesListBoxModel: ActionListItemModel[] = [];\n @State() selectedCategory: string;\n @State() recentlyUsedActionListModel: ActionListModel = [];\n @State() loading: boolean = true;\n @State() categoriesJustChanged: boolean = false;\n @State() actionListDidRender: boolean = false;\n\n /**\n * All possible types and its category\n */\n @Prop() readonly categories: DataTypeCategoryData[] = undefined;\n @Watch(\"categories\")\n categoriesChanged(newCategories: DataTypeCategoryData[]) {\n if (!newCategories?.length) {\n return;\n }\n\n this.#categoriesActionListItemGroupMap.clear();\n newCategories.forEach(category => {\n const categoryListBoxModel = mapCategoryToListItemGroup(category);\n this.#categoriesActionListItemGroupMap.set(\n category.name,\n categoryListBoxModel\n );\n category.types.forEach(type => {\n const isSelected = type.selected;\n if (isSelected) {\n // For setting focus\n this.#selectedDataTypeIds.categoryId = category.name;\n this.#selectedDataTypeIds.dataTypeId = type.name;\n }\n\n this.#dataTypeCategoryMap.set(type.name, category.id);\n this.#dataTypeDataIdMap.set(type.name, {\n id: category.id,\n name: type.name,\n icon: type.icon,\n selected: type.selected\n });\n });\n });\n this.loading = false;\n this.#showAllObjects();\n this.categoriesJustChanged = true;\n }\n\n /**\n * Callback invoked when the user has selected an item type\n */\n @Prop() readonly dataTypeSelectedCallback: DataTypeSelectedCallback;\n\n /**\n * Defines the type of focus applied when the component renders for the first time.\n */\n @Prop() readonly arrowUpOnFirstElement: ArrowFirstOnFirstElement;\n\n /**\n * Defines the type of focus applied when the component renders for the first time.\n */\n @Prop() readonly focusType: \"first-element\" | \"selected\" = \"first-element\";\n\n /**\n * All recently used types list\n */\n @Prop() readonly recentlyUsed: DataTypeData[] = [];\n @Watch(\"recentlyUsed\")\n recentlyUsedChanged(newRecentlyUsed: DataTypeData[]) {\n this.recentlyUsedActionListModel = null;\n this.recentlyUsedActionListModel = mapDataTypesToList(newRecentlyUsed);\n }\n\n async componentWillLoad() {\n this.#_componentLocale = await Locale.getComponentStrings(this.el);\n // initialize models\n this.recentlyUsed.length && this.recentlyUsedChanged(this.recentlyUsed);\n }\n\n #evaluateSelectionChanged = (path: EventTarget[]) => {\n const chActionListItem = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-ITEM\"\n );\n if (chActionListItem) {\n const id = (chActionListItem as HTMLElement).id;\n const dataTypeData = this.#dataTypeDataIdMap.get(id);\n this.dataTypeSelectedCallback(dataTypeData);\n }\n };\n\n #listKeyDownHandler = (event: KeyboardEvent) => {\n const pressedKey = event.key;\n const path = event.composedPath();\n\n if (pressedKey === ARROW_UP_KEY || pressedKey === ARROW_DOWN_KEY) {\n this.#lastArrowKey = pressedKey;\n\n if (pressedKey === ARROW_UP_KEY) {\n // Check if this is the first group. IF it is, let the host know,\n // so it can close the dialog.\n\n const chActionListItem = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-ITEM\"\n );\n\n if (chActionListItem !== undefined) {\n return;\n }\n\n // This is a ch-action-list-group\n const actionGroup = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-GROUP\"\n );\n const currentFocusedActionGroupId = (actionGroup as HTMLElement).id;\n\n const firstActionListGroupId =\n this.#actionListEl.shadowRoot.firstElementChild.id;\n\n if (currentFocusedActionGroupId === firstActionListGroupId) {\n this.arrowUpOnFirstElement();\n }\n }\n } else if (pressedKey === ENTER_KEY) {\n this.#evaluateSelectionChanged(path);\n } else if (pressedKey === TAB_KEY) {\n event.stopPropagation();\n }\n };\n\n #listClickHandler = (event: MouseEvent) => {\n if (this.#lastArrowKey) {\n // User navigated with ArrowUp or ArrowDown\n // Ignore, since this was not a click event.\n } else if (event.detail === 0) {\n // ignore keyboard Enter (Enter happens by default on buttons on onClick)\n return;\n } else {\n const path = event.composedPath();\n this.#evaluateSelectionChanged(path);\n }\n this.#lastArrowKey = null;\n };\n\n #showAllObjects = () => {\n if (!this.#showAll) {\n const allCategoriesActionListModel: ActionListItemModel[] = [];\n let counter = 1;\n const mapLength = this.#categoriesActionListItemGroupMap.size;\n for (const key of this.#categoriesActionListItemGroupMap.keys()) {\n allCategoriesActionListModel.push(\n this.#categoriesActionListItemGroupMap.get(key)\n );\n if (counter !== mapLength) {\n allCategoriesActionListModel.push({ type: \"separator\" });\n }\n counter++;\n }\n this.categoriesListBoxModel = allCategoriesActionListModel;\n this.#showAll = true;\n this.selectedCategory = ALL_CATEGORY_ID;\n }\n };\n\n #showRecentlyObjects = () => {\n this.#showAll = false;\n this.categoriesListBoxModel = this.recentlyUsedActionListModel;\n this.selectedCategory = RECENTLY_USED_CATEGORY_ID;\n };\n\n private selectedCategoryHandler = (e: MouseEvent) => {\n this.selectedCategory = (e.currentTarget as HTMLButtonElement).dataset.name;\n const newSelectedCategory = [\n this.#categoriesActionListItemGroupMap.get(this.selectedCategory)\n ];\n this.categoriesListBoxModel = newSelectedCategory;\n this.#showAll = false;\n };\n\n #handleButtonTab = (event: KeyboardEvent) => {\n // Prevents bubbling, which causes this component to close, due to how the IDE handles Tab event\n // in a parent element.\n if (event.key === TAB_KEY || event.key === ENTER_KEY) {\n event.stopPropagation();\n }\n };\n\n #renderFooter = () => {\n const recentlyUsedBtnClass =\n this.selectedCategory === RECENTLY_USED_CATEGORY_ID\n ? \"button-secondary\"\n : \"button-tertiary\";\n const allBtnClass =\n this.selectedCategory === ALL_CATEGORY_ID\n ? \"button-secondary\"\n : \"button-tertiary\";\n let selectedCategoryDescription = this.selectedCategory;\n if (this.selectedCategory === RECENTLY_USED_CATEGORY_ID) {\n selectedCategoryDescription =\n this.#_componentLocale.fixedTypes.recentlyUsed;\n } else if (this.selectedCategory === ALL_CATEGORY_ID) {\n selectedCategoryDescription = this.#_componentLocale.fixedTypes.all;\n } else {\n selectedCategoryDescription = this.selectedCategory;\n }\n\n return (\n <footer\n class=\"footer control-footer control-footer-start scrollable\n \"\n >\n <div class=\"buttons-spacer\">\n {this.recentlyUsed && this.recentlyUsed.length > 0 && (\n <button\n class={`button-icon-only ${recentlyUsedBtnClass}`}\n aria-label={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.recentlyUsed\n }`}\n title={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.recentlyUsed\n }`}\n onClick={this.#showRecentlyObjects}\n onKeyDown={this.#handleButtonTab}\n >\n <ch-image class=\"icon-md\" src={CLOCK_ICON}></ch-image>\n </button>\n )}\n <button\n class={`button-icon-only ${allBtnClass}`}\n onClick={this.#showAllObjects}\n onKeyDown={this.#handleButtonTab}\n aria-label={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.all\n }`}\n title={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.all\n }`}\n >\n [*]\n </button>\n {this.categories.map(category => {\n const buttonClass =\n category.name === this.selectedCategory\n ? \"button-secondary\"\n : \"button-tertiary\";\n\n return (\n <button\n class={`button-icon-only ${buttonClass}`}\n aria-label={category.name}\n title={category.name}\n onClick={this.selectedCategoryHandler}\n onKeyDown={this.#handleButtonTab}\n data-name={category.name}\n >\n <ch-image class=\"icon-md\" src={category.icon}></ch-image>\n </button>\n );\n })}\n </div>\n <p class=\"body-regular-s selected-category\">\n {selectedCategoryDescription}\n </p>\n </footer>\n );\n };\n\n #setFocus = async () => {\n if (this.#focusAlreadySet) {\n return;\n }\n let focusableElement: HTMLElement;\n\n setTimeout(() => {\n // setTimeout as a WA, since the list-box elements are not rendered/read immediatelly\n if (\n this.focusType === \"selected\" &&\n this.#selectedDataTypeIds.categoryId &&\n this.#selectedDataTypeIds.dataTypeId\n ) {\n // set focus on the selected element\n const selectedDataTypeEl = this.#actionListEl.shadowRoot.getElementById(\n this.#selectedDataTypeIds.dataTypeId\n );\n if (selectedDataTypeEl) {\n focusableElement = selectedDataTypeEl;\n }\n } else {\n // set focus of the first element\n const firstActionListGroup =\n this.#actionListEl.shadowRoot.firstElementChild;\n\n const firstButton = firstActionListGroup.shadowRoot.firstElementChild;\n focusableElement = firstButton as HTMLButtonElement;\n }\n\n focusableElement && (focusableElement as HTMLElement).focus();\n this.#focusAlreadySet = true;\n }, 150);\n };\n\n render(): void {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n {this.loading ? (\n <gx-ide-loader\n loaderTitle={this.#_componentLocale.loader.title}\n description={this.#_componentLocale.loader.description}\n show\n ></gx-ide-loader>\n ) : (\n <section class=\"main\">\n <ch-action-list-render\n ref={async el => {\n this.#actionListEl = el as HTMLChActionListRenderElement;\n this.#setFocus();\n }}\n class=\"list-box\"\n model={this.categoriesListBoxModel}\n selection=\"single\"\n onKeyDown={this.#listKeyDownHandler}\n onClick={this.#listClickHandler}\n ></ch-action-list-render>\n {this.#renderFooter()}\n </section>\n )}\n </Host>\n );\n }\n}\n\nexport type DataTypeCategoryData = {\n id: string;\n name: string;\n icon: string;\n types: DataTypeData[];\n};\nexport type DataTypeData = {\n id: string;\n name: string;\n icon: string;\n selected: boolean;\n};\n\nexport type DataTypeSelectedCallback = (data: DataTypeData) => Promise<void>;\n\ntype SelectedDataTypeIds = {\n categoryId: string;\n dataTypeId: string;\n};\n\nexport type ArrowFirstOnFirstElement = () => Promise<void>;\n"],"version":3}
1
+ {"file":"gx-ide-data-type-selector.entry.js","mappings":";;;;AAMO,MAAM,0BAA0B,GAAG,CACxC,QAA8B;IAE9B,MAAM,aAAa,GAAwB;QACzC,OAAO,EAAE,QAAQ,CAAC,IAAI;QACtB,EAAE,EAAE,QAAQ,CAAC,IAAI;QACjB,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI;QAChB,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI;YAC5B,OAAO;gBACL,OAAO,EAAE,IAAI,CAAC,IAAI;gBAClB,EAAE,EAAE,IAAI,CAAC,IAAI;gBACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,qBAAqB,EAAE;oBACrB,eAAe,EAAE;wBACf,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;qBAChC;iBACF;gBACD,IAAI,EAAE,YAAY;aACnB,CAAC;SACH,CAAC;KACH,CAAC;IACF,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC;AAEK,MAAM,kBAAkB,GAAG,CAChC,SAAyB;IAEzB,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK;QACnC,OAAO;YACL,OAAO,EAAE,QAAQ,CAAC,IAAI;YACtB,EAAE,EAAE,QAAQ,CAAC,IAAI;YACjB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,qBAAqB,EAAE;gBACrB,eAAe,EAAE;oBACf,MA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C,IAAI,IAAC,KAAK,EAAC,QAAQ,IAClB,gBAAU,KAAK,EAAE,WAAW,GAAa,EACxC,IAAI,CAAC,OAAO,IACX,qBACE,WAAW,EAAE,uBAAA,IAAI,8CAAkB,CAAC,MAAM,CAAC,KAAK,EAChD,WAAW,EAAE,uBAAA,IAAI,8CAAkB,CAAC,MAAM,CAAC,WAAW,EACtD,IAAI,SACW,KAEjB,eAAS,KAAK,EAAC,MAAM,IACnB,6BACE,GAAG,EAAE,OAAM,EAAE;gBACX,uBAAA,IAAI,sCAAiB,EAAmC,MAAA,CAAC;gBACzD,uBAAA,IAAI,sCAAU,MAAd,IAAI,CAAY,CAAC;aAClB,EACD,KAAK,EAAC,UAAU,EAChB,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAClC,SAAS,EAAC,QAAQ,EAClB,SAAS,EAAE,uBAAA,IAAI,gDAAoB,EACnC,OAAO,EAAE,uBAAA,IAAI,8CAAkB,GACR,EACxB,uBAAA,IAAI,0CAAc,MAAlB,IAAI,CAAgB,CACb,CACX,CACI,EACP;KACH;;;;;;;;;;;;;","names":[],"sources":["src/components/data-type-selector/helpers.ts","src/components/data-type-selector/data-type-selector.scss?tag=gx-ide-data-type-selector&encapsulation=shadow","src/components/data-type-selector/data-type-selector.tsx"],"sourcesContent":["import { DataTypeCategoryData, DataTypeData } from \"./data-type-selector\";\nimport {\n ActionListItemGroup,\n ActionListModel\n} from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\n\nexport const mapCategoryToListItemGroup = (\n category: DataTypeCategoryData\n): ActionListItemGroup => {\n const categoryGroup: ActionListItemGroup = {\n caption: category.name,\n id: category.name,\n type: \"group\",\n expanded: true,\n expandable: true,\n items: category.types.map(type => {\n return {\n caption: type.name,\n id: type.name,\n selected: type.selected,\n additionalInformation: {\n \"stretch-start\": {\n center: [{ imgSrc: type.icon }]\n }\n },\n type: \"actionable\"\n };\n })\n };\n return categoryGroup;\n};\n\nexport const mapDataTypesToList = (\n dataTypes: DataTypeData[]\n): ActionListModel => {\n return dataTypes.map((dataType, index) => {\n return {\n caption: dataType.name,\n id: dataType.name,\n selected: dataType.selected,\n additionalInformation: {\n \"stretch-start\": {\n center: [{ imgSrc: dataType.icon || undefined }]\n }\n },\n type: \"actionable\",\n order: index\n };\n });\n};\n",":host {\n position: relative;\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr max-content;\n\n // WA: Prevent a custom css rule on genexus-web from overriding --control__border-width value.\n // TDOO: remove this when the custom style is removed from genexus-web.\n // custom stlye is: .gx-struct-editor .tabular-grid-cell {\n // --control__border-width: 0;\n // }\n\n --control__border-width: var(--mer-border__width--sm);\n --control__border-radius: var(--mer-border__radius--sm);\n}\n\n.main {\n display: contents;\n}\n\n.selected-category {\n margin: 0;\n text-transform: capitalize;\n margin-inline-start: var(\n --mer-spacing--md\n ); // TODO: Create a semantic class in Mercury for this case.\n white-space: nowrap;\n}\n\n.footer {\n overflow: auto;\n padding: var(--mer-spacing--xs);\n}\n\n// WA: Reduce font-size. This should be solved on Mercury.\n.list-box::part(item__action),\n.list-box::part(group__action) {\n font-size: var(--font-size-body-s) !important;\n}\n","// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n// Other Libraries\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\nimport {\n ActionListItemModel,\n ActionListModel\n} from \"@genexus/chameleon-controls-library\";\nimport { ActionListItemGroup } from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\n// Gx Ide Ui\nimport { Locale } from \"../../common/locale\";\nimport { mapCategoryToListItemGroup, mapDataTypesToList } from \"./helpers\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/list-box\",\n \"utils/form--full\",\n \"utils/typography\",\n \"utils/layout\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst ARROW_UP_KEY = \"ArrowUp\";\nconst ARROW_DOWN_KEY = \"ArrowDown\";\nconst ENTER_KEY = \"Enter\";\nconst TAB_KEY = \"Tab\";\n\nconst ALL_CATEGORY_ID = \"all\";\nconst RECENTLY_USED_CATEGORY_ID = \"recenttly-used\";\n\nconst CLOCK_ICON = getIconPath({\n category: \"system\",\n name: \"time\",\n colorType: \"primary\"\n});\n\n@Component({\n tag: \"gx-ide-data-type-selector\",\n styleUrl: \"data-type-selector.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/data-type-selector\"]\n})\nexport class GxIdeKbManagerImport {\n #_componentLocale: any;\n #showAll: boolean = false;\n #categoriesActionListItemGroupMap: Map<string, ActionListItemGroup> = new Map<\n string,\n ActionListItemGroup\n >();\n\n #dataTypeCategoryMap: Map<string, string> = new Map<string, string>();\n #dataTypeDataIdMap: Map<string, DataTypeData> = new Map<\n string,\n DataTypeData\n >();\n #lastArrowKey: typeof ARROW_UP_KEY | typeof ARROW_DOWN_KEY | null = null;\n #selectedDataTypeIds: SelectedDataTypeIds = {\n // For setting focus\n categoryId: undefined,\n dataTypeId: undefined\n };\n #focusAlreadySet: boolean = false;\n\n #actionListEl!: HTMLChActionListRenderElement;\n @Element() el: HTMLGxIdeDataTypeSelectorElement;\n\n @State() categoriesListBoxModel: ActionListItemModel[] = [];\n @State() selectedCategory: string;\n @State() recentlyUsedActionListModel: ActionListModel = [];\n @State() loading: boolean = true;\n @State() categoriesJustChanged: boolean = false;\n @State() actionListDidRender: boolean = false;\n\n /**\n * All possible types and its category\n */\n @Prop() readonly categories: DataTypeCategoryData[] = undefined;\n @Watch(\"categories\")\n categoriesChanged(newCategories: DataTypeCategoryData[]) {\n if (!newCategories?.length) {\n return;\n }\n\n this.#categoriesActionListItemGroupMap.clear();\n newCategories.forEach(category => {\n const categoryListBoxModel = mapCategoryToListItemGroup(category);\n this.#categoriesActionListItemGroupMap.set(\n category.name,\n categoryListBoxModel\n );\n category.types.forEach(type => {\n const isSelected = type.selected;\n if (isSelected) {\n // For setting focus\n this.#selectedDataTypeIds.categoryId = category.name;\n this.#selectedDataTypeIds.dataTypeId = type.name;\n }\n\n this.#dataTypeCategoryMap.set(type.name, category.id);\n this.#dataTypeDataIdMap.set(type.name, {\n id: category.id,\n name: type.name,\n icon: type.icon,\n selected: type.selected\n });\n });\n });\n this.loading = false;\n this.#showAllObjects();\n this.categoriesJustChanged = true;\n }\n\n /**\n * Callback invoked when the user has selected an item type\n */\n @Prop() readonly dataTypeSelectedCallback: DataTypeSelectedCallback;\n\n /**\n * Defines the type of focus applied when the component renders for the first time.\n */\n @Prop() readonly arrowUpOnFirstElement: ArrowFirstOnFirstElement;\n\n /**\n * Defines the type of focus applied when the component renders for the first time.\n */\n @Prop() readonly focusType: \"first-element\" | \"selected\" = \"first-element\";\n\n /**\n * All recently used types list\n */\n @Prop() readonly recentlyUsed: DataTypeData[] = [];\n @Watch(\"recentlyUsed\")\n recentlyUsedChanged(newRecentlyUsed: DataTypeData[]) {\n this.recentlyUsedActionListModel = null;\n this.recentlyUsedActionListModel = mapDataTypesToList(newRecentlyUsed);\n }\n\n async componentWillLoad() {\n this.#_componentLocale = await Locale.getComponentStrings(this.el);\n // initialize models\n this.recentlyUsed.length && this.recentlyUsedChanged(this.recentlyUsed);\n }\n\n #evaluateSelectionChanged = (path: EventTarget[]) => {\n const chActionListItem = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-ITEM\"\n );\n if (chActionListItem) {\n const id = (chActionListItem as HTMLElement).id;\n const dataTypeData = this.#dataTypeDataIdMap.get(id);\n this.dataTypeSelectedCallback(dataTypeData);\n }\n };\n\n #listKeyDownHandler = (event: KeyboardEvent) => {\n const pressedKey = event.key;\n const path = event.composedPath();\n\n if (pressedKey === ARROW_UP_KEY || pressedKey === ARROW_DOWN_KEY) {\n this.#lastArrowKey = pressedKey;\n\n if (pressedKey === ARROW_UP_KEY) {\n // Check if this is the first group. IF it is, let the host know,\n // so it can close the dialog.\n\n const chActionListItem = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-ITEM\"\n );\n\n if (chActionListItem !== undefined) {\n return;\n }\n\n // This is a ch-action-list-group\n const actionGroup = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-GROUP\"\n );\n const currentFocusedActionGroupId = (actionGroup as HTMLElement).id;\n\n const firstActionListGroupId =\n this.#actionListEl.shadowRoot.firstElementChild.id;\n\n if (currentFocusedActionGroupId === firstActionListGroupId) {\n this.arrowUpOnFirstElement();\n }\n }\n } else if (pressedKey === ENTER_KEY) {\n this.#evaluateSelectionChanged(path);\n } else if (pressedKey === TAB_KEY) {\n event.stopPropagation();\n }\n };\n\n #listClickHandler = (event: MouseEvent) => {\n if (this.#lastArrowKey) {\n // User navigated with ArrowUp or ArrowDown\n // Ignore, since this was not a click event.\n } else if (event.detail === 0) {\n // ignore keyboard Enter (Enter happens by default on buttons on onClick)\n return;\n } else {\n const path = event.composedPath();\n this.#evaluateSelectionChanged(path);\n }\n this.#lastArrowKey = null;\n };\n\n #showAllObjects = () => {\n if (!this.#showAll) {\n const allCategoriesActionListModel: ActionListItemModel[] = [];\n let counter = 1;\n const mapLength = this.#categoriesActionListItemGroupMap.size;\n for (const key of this.#categoriesActionListItemGroupMap.keys()) {\n allCategoriesActionListModel.push(\n this.#categoriesActionListItemGroupMap.get(key)\n );\n if (counter !== mapLength) {\n allCategoriesActionListModel.push({ type: \"separator\" });\n }\n counter++;\n }\n this.categoriesListBoxModel = allCategoriesActionListModel;\n this.#showAll = true;\n this.selectedCategory = ALL_CATEGORY_ID;\n }\n };\n\n #showRecentlyObjects = () => {\n this.#showAll = false;\n this.categoriesListBoxModel = this.recentlyUsedActionListModel;\n this.selectedCategory = RECENTLY_USED_CATEGORY_ID;\n };\n\n private selectedCategoryHandler = (e: MouseEvent) => {\n this.selectedCategory = (e.currentTarget as HTMLButtonElement).dataset.name;\n const newSelectedCategory = [\n this.#categoriesActionListItemGroupMap.get(this.selectedCategory)\n ];\n this.categoriesListBoxModel = newSelectedCategory;\n this.#showAll = false;\n };\n\n #handleButtonTab = (event: KeyboardEvent) => {\n // Prevents bubbling, which causes this component to close, due to how the IDE handles Tab event\n // in a parent element.\n if (event.key === TAB_KEY || event.key === ENTER_KEY) {\n event.stopPropagation();\n }\n };\n\n #renderFooter = () => {\n const recentlyUsedBtnClass =\n this.selectedCategory === RECENTLY_USED_CATEGORY_ID\n ? \"button-secondary\"\n : \"button-tertiary\";\n const allBtnClass =\n this.selectedCategory === ALL_CATEGORY_ID\n ? \"button-secondary\"\n : \"button-tertiary\";\n let selectedCategoryDescription = this.selectedCategory;\n if (this.selectedCategory === RECENTLY_USED_CATEGORY_ID) {\n selectedCategoryDescription =\n this.#_componentLocale.fixedTypes.recentlyUsed;\n } else if (this.selectedCategory === ALL_CATEGORY_ID) {\n selectedCategoryDescription = this.#_componentLocale.fixedTypes.all;\n } else {\n selectedCategoryDescription = this.selectedCategory;\n }\n\n return (\n <footer\n class=\"footer control-footer control-footer-start scrollable\n \"\n >\n <div class=\"buttons-spacer\">\n {this.recentlyUsed && this.recentlyUsed.length > 0 && (\n <button\n class={`button-icon-only ${recentlyUsedBtnClass}`}\n aria-label={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.recentlyUsed\n }`}\n title={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.recentlyUsed\n }`}\n onClick={this.#showRecentlyObjects}\n onKeyDown={this.#handleButtonTab}\n >\n <ch-image class=\"icon-md\" src={CLOCK_ICON}></ch-image>\n </button>\n )}\n <button\n class={`button-icon-only ${allBtnClass}`}\n onClick={this.#showAllObjects}\n onKeyDown={this.#handleButtonTab}\n aria-label={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.all\n }`}\n title={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.all\n }`}\n >\n [*]\n </button>\n {this.categories.map(category => {\n const buttonClass =\n category.name === this.selectedCategory\n ? \"button-secondary\"\n : \"button-tertiary\";\n\n return (\n <button\n class={`button-icon-only ${buttonClass}`}\n aria-label={category.name}\n title={category.name}\n onClick={this.selectedCategoryHandler}\n onKeyDown={this.#handleButtonTab}\n data-name={category.name}\n >\n <ch-image class=\"icon-md\" src={category.icon}></ch-image>\n </button>\n );\n })}\n </div>\n <p class=\"body-regular-s selected-category\">\n {selectedCategoryDescription}\n </p>\n </footer>\n );\n };\n\n #setFocus = async () => {\n if (this.#focusAlreadySet) {\n return;\n }\n let focusableElement: HTMLElement;\n\n setTimeout(() => {\n // setTimeout as a WA, since the list-box elements are not rendered/read immediatelly\n if (\n this.focusType === \"selected\" &&\n this.#selectedDataTypeIds.categoryId &&\n this.#selectedDataTypeIds.dataTypeId\n ) {\n // set focus on the selected element\n const selectedDataTypeEl = this.#actionListEl.shadowRoot.getElementById(\n this.#selectedDataTypeIds.dataTypeId\n );\n if (selectedDataTypeEl) {\n focusableElement = selectedDataTypeEl;\n }\n } else {\n // set focus of the first element\n const firstActionListGroup =\n this.#actionListEl.shadowRoot.firstElementChild;\n\n const firstButton = firstActionListGroup.shadowRoot.firstElementChild;\n focusableElement = firstButton as HTMLButtonElement;\n }\n\n focusableElement && (focusableElement as HTMLElement).focus();\n this.#focusAlreadySet = true;\n }, 150);\n };\n\n render(): void {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n {this.loading ? (\n <gx-ide-loader\n loaderTitle={this.#_componentLocale.loader.title}\n description={this.#_componentLocale.loader.description}\n show\n ></gx-ide-loader>\n ) : (\n <section class=\"main\">\n <ch-action-list-render\n ref={async el => {\n this.#actionListEl = el as HTMLChActionListRenderElement;\n this.#setFocus();\n }}\n class=\"list-box\"\n model={this.categoriesListBoxModel}\n selection=\"single\"\n onKeyDown={this.#listKeyDownHandler}\n onClick={this.#listClickHandler}\n ></ch-action-list-render>\n {this.#renderFooter()}\n </section>\n )}\n </Host>\n );\n }\n}\n\nexport type DataTypeCategoryData = {\n id: string;\n name: string;\n icon: string;\n types: DataTypeData[];\n};\nexport type DataTypeData = {\n id: string;\n name: string;\n icon: string;\n selected: boolean;\n};\n\nexport type DataTypeSelectedCallback = (data: DataTypeData) => Promise<void>;\n\ntype SelectedDataTypeIds = {\n categoryId: string;\n dataTypeId: string;\n};\n\nexport type ArrowFirstOnFirstElement = () => Promise<void>;\n"],"version":3}
@@ -13,5 +13,5 @@ export { s as setNonce } from "./p-25a9f1d7.js";
13
13
  return e(t);
14
14
  };
15
15
 
16
- patchBrowser().then((e => a(JSON.parse('[["p-4328be14",[[1,"gx-ide-bpm-export-xpdl",{"displayTitle":[4,"display-title"],"exportCallback":[16],"cancelCallback":[16],"addCallback":[16],"referencesCallback":[16],"emptyInput":[32],"emptyObjects":[32],"notExporting":[32]}]]],["p-04c6bd23",[[1,"gx-ide-bpm-import-files",{"displayTitle":[4,"display-title"],"allowedExtensions":[16],"confirmCallback":[16],"cancelCallback":[16],"files":[32],"selectedFiles":[32]}]]],["p-45539ad0",[[1,"gx-ide-kb-manager-import",{"cancelCallback":[16],"importCallback":[16],"loadCallback":[16],"objectContextMenuCallback":[16],"optionsCallback":[16],"selectedFile":[1040],"statusMinimal":[4,"status-minimal"],"checkedObjectsIds":[32],"selectAllCheckboxValue":[32],"selectAllCheckboxIndeterminate":[32],"importStatusMessage":[32],"importTreeState":[32],"importedTreeFilterRegExp":[32],"importingIsInProcess":[32],"importTreeFilterList":[32],"noImport":[32],"noObjects":[32],"objectsTreeModel":[32],"showHiddenImportsMessage":[32],"someStatusVisible":[32],"statusInfo":[32],"addResultItem":[64]},null,{"importTreeState":["importTreeStateChanged","watchImportTreeStateHandler"],"objectsTreeModel":["watchObjectsTreeModelHandler"],"selectedFile":["selectedFileChanged"]}]]],["p-14165308",[[1,"gx-ide-team-dev-select-recent-comment",{"displayTitle":[4,"display-title"],"comments":[16],"confirmCallback":[16],"cancelCallback":[16]}]]],["p-75a5c51f",[[1,"gx-ide-team-dev-update",{"displayTitle":[4,"display-title"],"confirmCallback":[16],"gridContextMenuCallback":[16],"loadCallback":[16],"objectsScopeCallback":[16],"openServerCallback":[16],"pendingItemsCheckedCallback":[16],"revisionScopeCallback":[16],"objectsContextMenuCallback":[16],"selectCallback":[16],"types":[16],"updateCallback":[16],"updateFrom":[16],"isLoading":[32],"objectScopeText":[32],"openTab":[32],"revisionScopeText":[32],"showFilter":[32],"updateData":[32],"updateResultData":[32],"reload":[64]}]]],["p-ca9978e1",[[17,"gx-ide-data-selector",{"cancelCallback":[16],"confirmCallback":[16],"defaultModule":[16],"displayTitle":[4,"display-title"],"editCallback":[16],"loadItemsCallback":[16],"loader":[4],"newVariableCallback":[16],"selectObjectCallback":[16],"selectionType":[1,"selection-type"],"loading":[32],"objects":[32],"selectedObjectsIds":[32],"suspendShortcuts":[64],"validate":[64]}]]],["p-c92332af",[[1,"gx-ide-manage-module-references",{"displayTitle":[4,"display-title"],"servers":[16],"serverSelectedCallback":[16],"executeActionCallback":[16],"addServerCallback":[16],"serverContextMenuCallback":[16],"showServerCommands":[4,"show-server-commands"],"modulesAll":[32],"filteredModules":[32],"selectedModule":[32],"selectedServerId":[32],"selectedModuleAction":[32],"modulesSelectedVersion":[32],"actionCompleted":[32],"closeProgressBar":[32],"progressValue":[32],"progressState":[32],"loadingServer":[32],"reRenderCounter":[32],"validate":[64]},null,{"modulesAll":["modulesAllWatcher","onPropValueChange"],"loadingServer":["loadingServerHandler"]}]]],["p-7ae2a57f",[[1,"gx-ide-manage-module-references-v2",{"displayTitle":[4,"display-title"],"servers":[16],"serverSelectedCallback":[16],"executeActionCallback":[16],"serverContextMenuCallback":[16],"showServerCommands":[4,"show-server-commands"],"searchModulesFilterValue":[32],"selectedButtonFilter":[32],"serverModules":[32],"serverModulesExtended":[32],"filteredServerModules":[32],"modulesMap":[32],"selectedModule":[32],"selectedServerId":[32],"selectedModuleAction":[32],"modulesSelectedVersionMap":[32],"actionCompleted":[32],"closeProgressBar":[32],"progressValue":[32],"progressState":[32],"loadingServer":[32]},null,{"loadingServer":["loadingServerHandler"]}]]],["p-de7f0c1f",[[1,"gx-ide-navigation-report",{"headerData":[16],"confirmCallback":[16],"cancelCallback":[16],"closeCallback":[16],"itemSelectedCallback":[16],"reportTreeItems":[32],"navigationItemsStatusRegExpString":[32],"navigationItemsCaptionRegExpString":[32],"navigationItemsRegExp":[32],"confirmed":[32],"headerState":[32],"statusInfo":[32],"someStatusVisible":[32],"addItem":[64],"clearItems":[64]},null,{"navigationItemsStatusRegExpString":["navigationItemsStatusRegExpStringChanged"],"navigationItemsCaptionRegExpString":["navigationItemsCaptionRegExpStringChanged"]}]]],["p-83cc3bcd",[[17,"gx-ide-object-selector",{"cancelCallback":[16],"categories":[16],"defaultCategory":[1,"default-category"],"defaultModule":[16],"defaultType":[1,"default-type"],"loader":[4],"loadCallback":[16],"multiSelection":[4,"multi-selection"],"newObjectCallback":[16],"openSelectionCallback":[16],"patternValue":[1,"pattern-value"],"selectModuleCallback":[16],"types":[16],"filterModified":[32],"loading":[32],"modifiedAfterValue":[32],"objects":[32],"selectedObjectsIdsArray":[32],"suspendShortcuts":[64],"validate":[64]}]]],["p-60e39b2f",[[1,"gx-ide-team-dev-history",{"types":[16],"itemContextMenuCallback":[16],"gridContextMenuCallback":[16],"selectedVersionId":[1025,"selected-version-id"],"versions":[1040],"loadCallback":[16],"loadDetailCallback":[16],"selectedVersionChangeCallback":[16],"historyDetail":[32],"objects":[32],"isFirstLoad":[32],"sidebarExpanded":[32],"filtersHidden":[32],"loading":[32],"selectedRevisionId":[32],"hasActiveVersion":[32]},null,{"selectedVersionId":["selectedVersionIdChanged"],"versions":["versionsListChanged"]}]]],["p-d77582b8",[[1,"gx-ide-ww-attributes",{"contextMenuCallback":[16],"deleteSelectionCallback":[16],"loadCallback":[16],"objectActionCallback":[16],"objects":[16],"openSelectionCallback":[16],"selectionChangeCallback":[16],"types":[16],"attributes":[32],"selectedAttributesIds":[32],"filterMore":[32],"name":[32],"loading":[32],"object":[32],"type":[32],"reload":[64],"validate":[64]},[[1,"keydown","keyDownHandler"]]]]],["p-3b5a4e2e",[[1,"gx-ide-ww-images",{"displayTitle":[4,"display-title"],"secondaryFilter":[4,"secondary-filter"],"categories":[16],"densities":[16],"defaultCategory":[1,"default-category"],"defaultModule":[16],"defaultType":[1,"default-type"],"filterModules":[16],"languages":[16],"layers":[16],"contextMenuCallback":[16],"deleteSelectionCallback":[16],"loadCallback":[16],"loadImageItemsCallback":[16],"newObjectCallback":[16],"openSelectionCallback":[16],"selectModuleCallback":[16],"selectionObjectChangedCallback":[16],"shadow":[4],"styles":[16],"types":[16],"filtersHidden":[32],"filterAfterType":[32],"filterModified":[32],"images":[32],"filteredImages":[32],"imagesSelectedItems":[32],"selectedObjectsIds":[32],"filterImagesInputValue":[32],"validate":[64],"reload":[64]},[[1,"keydown","keyDownHandler"]],{"filtersHidden":["filtersHiddenHandler"]}]]],["p-4b38fffc",[[1,"gx-ide-bpm-assign-roles",{"displayTitle":[4,"display-title"],"roles":[16],"assignedRoles":[16],"confirmCallback":[16],"cancelCallback":[16],"unassignedRolesState":[32],"assignedRolesState":[32],"filterUnassignedInput":[32],"filterAssignedInput":[32],"unassignedSelected":[32],"assignedSelected":[32]}]]],["p-e24902a0",[[1,"gx-ide-bpm-import-gxpm",{"displayTitle":[4,"display-title"],"confirmCallback":[16],"cancelCallback":[16],"selectedFile":[32],"pathValue":[32]}]]],["p-767e0f6d",[[1,"gx-ide-bpm-timer-duration",{"displayTitle":[4,"display-title"],"duration":[16],"confirmCallback":[16],"cancelCallback":[16]}]]],["p-a869ec48",[[1,"gx-ide-design-import",{"reactiveSettings":[16],"extensions":[16],"defaultModule":[16],"path":[1025],"accessToken":[1025,"access-token"],"importAsWebPanels":[4,"import-as-web-panels"],"selectModuleCallback":[16],"cancelCallback":[16],"confirmCallback":[16],"loadCallback":[16],"loadDesignSystemCallback":[16],"loadFontCallback":[16],"loadImageCallback":[16],"loadPanelDataCallback":[16],"requiresAccessTokenCallback":[16],"styles":[16],"textEditorFactoryCallback":[16],"reRenderCounter":[32],"stylesAsComboBoxModel":[32],"styleValue":[32],"accessTokenHasError":[32],"pathIsValid":[32],"tabsModel":[32],"activeTabs":[32],"renderedTabs":[32],"designData":[32],"detailTreeModel":[32],"isLoading":[32],"isLoaded":[32],"messages":[32],"selectedFile":[32],"selectedDesignType":[32],"selectedDesignItem":[32],"requiresAccessToken":[32],"designDataTreeDataModel":[32],"updateTabsActiveTab":[32],"fitImages":[32],"lastLoadCallbackSettingValues":[32]},null,{"pathIsValid":["pathIsValidChanged"],"designData":["designDataChanged"],"path":["pathChanged"],"accessToken":["accessTokenChanged"],"styles":["stylesChanged"],"messages":["watchMessagesHandler"]}]]],["p-45996535",[[1,"gx-ide-edit-module-server",{"types":[16],"name":[1],"source":[1],"type":[1],"confirmCallback":[16],"selectSourceCallback":[16],"cancelCallback":[16],"selectedType":[32]}]]],["p-fd440291",[[1,"gx-ide-kb-manager-export",{"addKBPropertiesCallback":[16],"addObjectsCallback":[16],"addReferencesCallback":[16],"cancelCallback":[16],"exportCallback":[16],"exportFileDirectoryCallback":[16],"fileName":[1,"file-name"],"kbPropertiesTypes":[16],"loader":[4],"objectTypes":[16],"optionsCallback":[16],"addKbPropertiesIsChecked":[32],"atLeastOnePropertyItemIsChecked":[32],"atLeastOneObjectItemIsChecked":[32],"checkedObjectsIds":[32],"checkedPropertiesIds":[32],"exportAllIsChecked":[32],"exportingIsInProcess":[32],"hasObjects":[32],"objectsTreeViewModel":[32]},null,{"objectsTreeViewModel":["objectsTreeViewModelChanged"],"objectTypes":["objectTypesChanged"]}]]],["p-641c79a9",[[1,"gx-ide-plugin-explorer",{"plugins":[1040],"filterCallback":[16],"showDetailsCallback":[16],"executeActionCallback":[16],"loading":[32],"pluginsActionListModel":[32]},null,{"plugins":["pluginsChangedHandler"]}]]],["p-4e6425f3",[[1,"gx-ide-sc-chat-container",{"mode":[1],"generatingResponse":[32],"loadingState":[32],"showAdditionalContent":[32],"conversationCopied":[32],"assistantStatus":[32],"chatItems":[32],"exitWelcome":[64]}]]],["p-54fb1287",[[1,"gx-ide-start-page",{"createKBCallback":[16],"openKbCallback":[16],"secondarySection":[16],"kbs":[16],"kbsFilterThreshold":[2,"kbs-filter-threshold"],"kbFilterValue":[32],"filteredKbs":[32],"loading":[32]},null,{"kbFilterValue":["kbFilterValueChanged"],"kbs":["kbsChanged"]}]]],["p-16138f55",[[1,"gx-ide-team-dev-bring-changes",{"commitDetail":[16],"commitInformation":[16],"commitObjects":[16],"enableRowOptions":[4,"enable-row-options"],"hideFilters":[4,"hide-filters"],"mergeObjectsCallback":[16],"mergePillAsButton":[4,"merge-pill-as-button"],"alreadyMergedObjectsIdsArray":[32],"atLeastOneObjectIsChecked":[32],"loading":[32],"menuContextAction":[32],"objectsFiltered":[32],"searchValue":[32],"stateFilterValue":[32],"markedObjectsSet":[32],"objectsStatesMap":[32],"commitObjectsMessagesMap":[32],"merging":[32],"updateObjectState":[64]},null,{"objectsStatesMap":["objectsStatesMapChanged"],"commitObjects":["commitObjectsChanged"]}]]],["p-34fd4875",[[1,"gx-ide-team-dev-commit",{"displayTitle":[4,"display-title"],"changeSet":[16],"types":[16],"folders":[16],"categories":[16],"getRecentCommentCallback":[16],"loadCallback":[16],"commitCallback":[16],"selectCallback":[16],"pendingItemsCheckedCallback":[16],"objectsContextMenuCallback":[16],"filtersHidden":[32],"comment":[32],"pendingCommits":[32],"ignoredObjects":[32],"commitButtonEnabled":[32],"filterHasConditions":[32],"reload":[64]}]]],["p-b1851e6b",[[1,"gx-ide-team-dev-update-partial-selection",{"displayTitle":[4,"display-title"],"addCallback":[16],"cancelCallback":[16],"confirmCallback":[16],"selection":[1040],"selectedObjectsIds":[32],"validate":[64]}]]],["p-f722955f",[[1,"gx-ide-team-dev-update-to-revision",{"displayTitle":[4,"display-title"],"cancelCallback":[16],"confirmCallback":[16],"currentRevision":[1,"current-revision"],"validate":[64]}]]],["p-b58fb87b",[[1,"gx-ide-template",{"displayTitle":[4,"display-title"]}]]],["p-b2928645",[[1,"gx-ide-wf-settings",{"displayTitle":[4,"display-title"],"configurationType":[1,"configuration-type"],"defaultConfiguration":[16],"saveCallback":[16],"cancelCallback":[16]}]]],["p-f49bb305",[[1,"gx-ide-ai-assistant",{"messages":[1040],"promptMaxHeight":[1,"prompt-max-height"],"assistantStatus":[1025,"assistant-status"],"focusShortcuts":[16],"userMessageCallback":[16],"clearCallback":[16],"promptValue":[1,"prompt-value"],"filter":[4],"userHasTyped":[32],"aIInProgress":[32],"showFilter":[32],"promptHasFocus":[32],"filterValue":[32],"clear":[64],"addMessage":[64]},[[2,"focus","handleFocus"]],{"aIInProgress":["watchAIInProgressHandler"],"messages":["watchMessagesHandler"]}]]],["p-7f65f9e3",[[1,"gx-ide-bpm-app-declaration",{"application":[1040],"cancelCallback":[16],"confirmCallback":[16],"getDataMappingCallback":[16],"selectApplicationCallback":[16],"selectMappingCallback":[16],"suggestApplicationsCallback":[16],"applicationComboBoxModel":[32]}]]],["p-1be1db4e",[[1,"gx-ide-bpm-task-documents",{"documents":[1040],"cancelCallback":[16],"confirmCallback":[16],"selectDocumentCallback":[16],"suggestDocumentsCallback":[16],"documentsActionListState":[32],"documentName":[32],"selectedDocument":[32],"suggestedDocuments":[32],"suspendShortcuts":[64]}]]],["p-667965d3",[[1,"gx-ide-dashboard-home",{"kb":[16],"enableEditKBName":[4,"enable-edit-k-b-name"],"environment":[16],"enableEditEnvironmentName":[4,"enable-edit-environment-name"],"projectDescription":[1,"project-description"],"enableEditDescription":[4,"enable-edit-description"],"recentObjects":[16],"renameKBCallback":[16],"renameEnvironmentCallback":[16],"editDescriptionCallback":[16],"openObjectCallback":[16],"editingEnvName":[32],"editingProjectDescription":[32]},null,{"recentObjects":["recentObjectsHandler"]}]]],["p-6b4fdf55",[[1,"gx-ide-data-type-selector",{"categories":[16],"dataTypeSelectedCallback":[16],"arrowUpOnFirstElement":[16],"focusType":[1,"focus-type"],"recentlyUsed":[16],"categoriesListBoxModel":[32],"selectedCategory":[32],"recentlyUsedActionListModel":[32],"loading":[32],"categoriesJustChanged":[32],"actionListDidRender":[32]},null,{"categories":["categoriesChanged"],"recentlyUsed":["recentlyUsedChanged"]}]]],["p-03dbccde",[[1,"gx-ide-deployment-tool",{"deploymentUnits":[16],"targetTypes":[16],"defaultTargetTypeId":[1,"default-target-type-id"],"newDeploymentUnitId":[1,"new-deployment-unit-id"],"objectTypes":[16],"getDeploymentUnitObjectsCallback":[16],"optionsCallback":[16],"deployCallback":[16],"addObjectsCallback":[16],"createDeploymentUnitCallback":[16],"checkedObjectsIds":[32],"noObjects":[32],"selectedDeployTargetData":[32],"addedObjects":[32],"allObjectTypes":[32],"treeModel":[32],"allowDeploy":[32]},null,{"treeModel":["watchTreeModelHandler"],"objectTypes":["watchObjectTypesHandler"]}]]],["p-7d7cf30d",[[1,"gx-ide-file-uploader",{"types":[16],"multiple":[4],"canEditName":[4,"can-edit-name"],"label":[1],"uploadFunction":[16],"cancelUploadFunction":[16],"fileUploadedCallback":[16],"dialogCanceledCallback":[16],"dialogConfirmedCallback":[16],"uploadCancelledCallback":[16],"fileRenamedCallback":[16],"fileValidationErrorCallback":[16],"fileDeletionErrorCallback":[16],"fileDeletedCallback":[16],"onBeforeDelete":[16],"fileStates":[32],"isDragging":[32],"clear":[64]}]]],["p-1bc2613e",[[17,"gx-ide-new-object",{"defaultTypeId":[1,"default-type-id"],"defaultParent":[16],"displayTitle":[4,"display-title"],"cancelCallback":[16],"createCallback":[16],"shadow":[4],"typeCategories":[1040],"parent":[16],"selectModuleCallback":[16],"validateNameCallback":[16],"suggestNameCallback":[16],"suggestDescriptionCallback":[16],"description":[32],"name":[32],"nameValidationErrorMessage":[32],"selectedCategory":[32],"selectedType":[32],"typeCategoriesActionListModel":[32],"typesActionListModel":[32],"selectedTypeMap":[32],"suspendShortcuts":[64]},null,{"typeCategories":["typeCategoriesChanged"]}]]],["p-1292a6b9",[[1,"gx-ide-open-api-import",{"defaultParent":[16],"displayTitle":[4,"display-title"],"cancelCallback":[16],"importCallback":[16],"loadCallback":[16],"selectParentCallback":[16],"actionListItems":[32],"importingIsInProcess":[32],"operations":[32],"selectedFile":[32],"selectedOperationForDescription":[32],"selectedOperations":[32],"selectAllCheckboxValue":[32],"selectAllCheckboxIndeterminate":[32],"suspendShortcuts":[64]}]]],["p-c50b9883",[[1,"gx-ide-references",{"loadReferencesCallback":[16],"openObjectCallback":[16],"openSelectorDialogCallback":[16],"selectReferenceCallback":[16],"selectorSourceCallback":[16],"selectedObject":[1040],"barHidden":[32],"objectsSuggestions":[32],"referencedByTreeData":[32],"referencesToTreeData":[32]},null,{"selectedObject":["selectedObjectChanged"]}]]],["p-d095a37c",[[1,"gx-ide-select-user-team",{"cancelCallback":[16],"continueCallback":[16],"teams":[16],"slideIsVisible":[32],"teamsModelReady":[32]},null,{"teams":["teamsChanged"]}]]],["p-68969051",[[1,"gx-ide-sign-in-team",{"authStep":[1,"auth-step"],"continueCallback":[16],"signInCallback":[16],"termsConfirmationRequired":[4,"terms-confirmation-required"],"teams":[16],"termsCallback":[16],"privacyCallback":[16],"authStepInternal":[32],"slideIsVisible":[32],"termsAndConditionsAccepted":[32]},null,{"authStep":["authStepChanged"],"teams":["teamsChanged"]}]]],["p-385c9544",[[1,"gx-ide-ww-files",{"categories":[16],"defaultCategory":[1,"default-category"],"defaultModule":[16],"filterModules":[16],"types":[16],"contextMenuCallback":[16],"deleteSelectionCallback":[16],"loadCallback":[16],"newFileCallback":[16],"openSelectionCallback":[16],"selectModuleCallback":[16],"selectionChangeCallback":[16],"showSearchContents":[4,"show-search-contents"],"showDescription":[4,"show-description"],"showModifiedDate":[4,"show-modified-date"],"showLastUser":[4,"show-last-user"],"showImportDate":[4,"show-import-date"],"showType":[4,"show-type"],"showLastBuildDate":[4,"show-last-build-date"],"categoriesComboBoxModel":[32],"afterCurrentValue":[32],"filterAfterOptions":[32],"enabledModifiedControls":[32],"filterModified":[32],"filterMore":[32],"objects":[32],"filterFilesInputValue":[32],"filteredFiles":[32],"selectedObjectsIds":[32],"advancedFilterAccordionExpanded":[32],"validate":[64],"reload":[64]},[[1,"keydown","keyDownHandler"]],{"categories":["categoriesChanged"]}]]],["p-476b74a1",[[1,"gx-ide-about",{"versions":[16],"detailsCallback":[16],"privacyPolicyCallback":[16],"termsAndConditionsCallback":[16],"copying":[32]}]]],["p-ded7444c",[[1,"gx-ide-bpm-sync-gam-roles",{"cancelCallback":[16],"saveCallback":[16],"suspendShortcuts":[64]}]]],["p-35f9ebbc",[[1,"gx-ide-card",{"cardTitle":[1,"card-title"],"cardSubTitle":[1,"card-sub-title"],"icon":[1]}]]],["p-e502c2fd",[[1,"gx-ide-connect-gx-server",{"authenticationTypes":[16],"cancelCallback":[16],"connectCallback":[16],"defaultConnectionData":[16],"enableCustomServer":[4,"enable-custom-server"],"serverUrls":[16],"authenticationTypesComboBoxModel":[32],"gxServerConnectionData":[32],"serverUrlsComboBoxModel":[32],"validatableControls":[32]},null,{"authenticationTypes":["authenticationTypesChanged"],"serverUrls":["serverUrlsChanged"]}]]],["p-760d8f2a",[[1,"gx-ide-create-kb-from-server",{"connectionData":[16],"cancelCallback":[16],"changeConnectionCallback":[16],"createKBCallback":[16],"getGXserverKBsCallback":[16],"selectKBVersionsCallback":[16],"enableSelectVersionsButton":[32],"localKbNameInputValue":[32],"filterValue":[32],"kbsFilteredActionListModel":[32],"validatableControls":[32],"versionSelectedType":[32],"versionsValueInput":[32]}]]],["p-7d107d2f",[[1,"gx-ide-current-user-info",{"userInfo":[16],"myAccountCallback":[16],"changeTeamCallback":[16],"changeLanguageCallback":[16],"changeModeCallback":[16],"menuAlign":[16],"signOutCallback":[16],"termsCallback":[16],"privacyCallback":[16],"showMenu":[32]}]]],["p-31beae9e",[[1,"gx-ide-directory-selector",{"accessibilityLabels":[16],"label":[1],"labelPosition":[513,"label-position"],"centerLabel":[1028,"center-label"],"labelWidth":[1,"label-width"],"selectDirectoryCallback":[16],"value":[1025],"icon":[32]}]]],["p-f7421997",[[1,"gx-ide-gam-installation-settings",{"cancelCallback":[16],"canSelectPanels":[4,"can-select-panels"],"configurationType":[1,"configuration-type"],"defaultConfiguration":[16],"repairCallback":[16],"saveCallback":[16]}]]],["p-82878950",[[1,"gx-ide-new-environment",{"cancelCallback":[16],"createCallback":[16],"dataStores":[1040],"environmentName":[1025,"environment-name"],"getDataSourcesCallback":[16],"getEnvironmentNameCallback":[16],"getFrontEndsCallback":[16],"isAdvanced":[4,"is-advanced"],"languages":[16],"runtimes":[16],"setAsTarget":[4,"set-as-target"],"advancedTabIsVisible":[32],"frontEnds":[32],"validatableControls":[32],"dataStoresComboBoxModel":[32],"languageComboBoxModel":[32],"runtimesRadioGroupModel":[32],"suspendShortcuts":[64]},null,{"dataStores":["dataStoresChanged"],"languages":["languagesChanged"],"runtimes":["runtimesChanged"]}]]],["p-b465f29d",[[1,"gx-ide-new-kb",{"authenticationTypes":[16],"cancelCallback":[16],"collations":[16],"createCallback":[16],"createDataFilesInKBFolder":[4,"create-data-files-in-k-b-folder"],"databaseName":[1,"database-name"],"defaultDataSources":[1040],"getDataSourcesCallback":[16],"getFrontEndsCallback":[16],"isAdvanced":[4,"is-advanced"],"kbLocation":[1025,"kb-location"],"kbName":[1,"kb-name"],"password":[1],"prototypingEnvironments":[16],"prototypingTargets":[16],"savePassword":[4,"save-password"],"selectLocationCallback":[16],"serverNames":[16],"userInterfaceLanguages":[16],"userName":[1,"user-name"],"advancedTabIsVisible":[32],"frontEnds":[32],"validatableControls":[32],"createDataInKbDisabled":[32],"userNameVisible":[32],"passwordVisible":[32],"savePasswordVisible":[32],"authenticationTypesComboBoxModel":[32],"authenticationTypesInitialValue":[32],"collationsComboBoxModel":[32],"collationsInitialValue":[32],"defaultDataSourcesComboBoxModel":[32],"defaultDataSourcesInitialValue":[32],"prototypingTargetsComboBoxModel":[32],"prototypingTargetsInitialValue":[32],"prototypingEnvironmentsComboBoxModel":[32],"prototypingEnvironmentsInitialValue":[32],"serverNamesComboBoxModel":[32],"serverNamesInitialValue":[32],"userInterfaceLanguagesComboBoxModel":[32],"userInterfaceLanguagesInitialValue":[32],"suspendShortcuts":[64]},null,{"authenticationTypes":["watchAuthenticationTypes"],"collations":["watchCollations"],"defaultDataSources":["watchDefaultDataSources"],"prototypingEnvironments":["watchPrototypingEnvironments"],"prototypingTargets":["watchPrototypingTargets"],"serverNames":["watchServerNames"],"userInterfaceLanguages":["watchUserInterfaceLanguages"]}]]],["p-80c1ddc3",[[1,"gx-ide-new-version",{"isRemoteOperation":[4,"is-remote-operation"],"isFreezeOperation":[4,"is-freeze-operation"],"showLinkedLocalVersionCheckbox":[4,"show-linked-local-version-checkbox"],"cancelCallback":[16],"createCallback":[16],"defaultInputValues":[16],"versionName":[32],"versionDescription":[32],"setNewVersionAsActive":[32],"createLinkedLocalVersion":[32],"createAsProtectedVersion":[32],"validatableControls":[32]},null,{"defaultInputValues":["defaultInputValuesChanged"]}]]],["p-84c1c1bb",[[1,"gx-ide-plugin-details",{"data":[16],"installCallback":[16],"openLinkCallback":[16],"uninstallCallback":[16],"docsTabModel":[32],"selectedTabId":[32]}]]],["p-72e346b9",[[1,"gx-ide-share-kb",{"connectionData":[16],"cancelCallback":[16],"changeConnectionCallback":[16],"kbName":[1025,"kb-name"],"shareKBCallback":[16],"selectKBVersionsCallback":[16],"enableSelectVersionsButton":[32],"validatableControls":[32],"versionSelectedType":[32],"versionsValueInput":[32]}]]],["p-6b957e82",[[1,"gx-ide-sign-in",{"termsCallback":[16],"signInCallback":[16]}]]],["p-bbb5b0fb",[[1,"gx-ide-splash",{"downloadDockerCallback":[16],"quitCallback":[16],"messages":[16],"openLogCallback":[16],"showQuitButton":[4,"show-quit-button"],"showOpenLogLink":[4,"show-open-log-link"],"showDockerMissingError":[4,"show-docker-missing-error"],"ariaBusy":[32]}]]],["p-304d5629",[[1,"gx-ide-switch-panel"]]],["p-c58e0a92",[[1,"gx-ide-switcher"]]],["p-46ffec64",[[1,"gx-ide-test",{"name":[1],"filterOn":[32]}]]],["p-cbe2dd13",[[1,"gx-ide-top-bar",{"topBarTitle":[1,"top-bar-title"]}]]],["p-93cdb6f8",[[1,"gx-ide-welcome-page",{"transitionType":[1,"transition-type"],"wordsPerMinute":[2,"words-per-minute"],"closeCallback":[16],"slides":[16],"activeSlideIndex":[32],"displaySlider":[32],"copyrightsVisible":[32],"lastSlideReached":[32],"sliderVisible":[32],"slideTransitioning":[32],"userHasChangedSlide":[32]}]]],["p-d8379699",[[1,"gx-ide-bpm-objects-selector",{"displayTitle":[4,"display-title"],"selection":[1040],"addCallback":[16],"referencesCallback":[16],"objects":[32],"selectedObjects":[32]}]]],["p-52f37ec7",[[1,"gx-ide-select-kb-items",{"activeItemCallback":[16],"cancelCallback":[16],"checkboxType":[1,"checkbox-type"],"expandOnClick":[4,"expand-on-click"],"checkedChanged":[16],"confirmCallback":[16],"dialogActions":[16],"itemContextMenuCallback":[16],"itemsList":[16],"multiSelection":[4,"multi-selection"],"showActiveItemLink":[4,"show-active-item-link"],"selectionChanged":[16],"activeItemNode":[32],"renderFooter":[32],"nodeListFlattenedTreeModel":[32],"loading":[32],"nodesVersionsViewType":[32],"nodeVersionsListTreeModel":[32],"searchPatternValue":[32],"toggleCheckboxes":[32],"suspendShortcuts":[64],"updateSelection":[64]},null,{"itemsList":["watchNodeListHandler"]}]]],["p-74a0cb25",[[0,"gx-ide-ai-message",{"aiAssistantHostRef":[16],"message":[1],"messageType":[1,"message-type"],"filterValue":[1,"filter-value"],"hidden":[4],"translations":[16],"visible":[32],"showCopiedMessage":[32]}]]],["p-7053c38e",[[1,"gx-ide-file-item",{"file":[16],"editable":[4],"fileDeletedCallback":[16],"fileDeletionErrorCallback":[16],"isEditing":[32],"currentName":[32]},null,{"file":["handleFileChange"]}]]],["p-e7fb3ee3",[[1,"gx-ide-status-buttons",{"active":[4],"errors":[2],"hideError":[4,"hide-error"],"warnings":[2],"hideWarning":[4,"hide-warning"],"successes":[2],"hideSuccess":[4,"hide-success"],"messages":[2],"hideMessage":[4,"hide-message"],"minimal":[4],"compact":[516],"noInnerBorders":[516,"no-inner-borders"],"iconsSize":[32]}]]],["p-0cd3ab87",[[4,"gx-ide-chat-container",{"chatTitle":[1,"chat-title"],"copyConversationCallback":[16],"deleteConversationCallback":[16],"displayWelcomeScreen":[4,"display-welcome-screen"],"displayConversationCopiedMessage":[32],"menuIsExpanded":[32],"showCopyConversationMessage":[64]}],[1,"gx-ide-chat-welcome",{"welcomeTitle":[1025,"welcome-title"],"welcomeGreeting":[1025,"welcome-greeting"],"suggestedPrompts":[1040],"suggestedPrompRequestedCallback":[16],"showHeader":[32],"showSuggestedPrompts":[32],"hideWelcome":[32],"exitWelcome":[64]}]]],["p-c9bca7c0",[[1,"gx-ide-entity-selector",{"defaultValue":[16],"disabled":[516],"labelCaption":[1,"label-caption"],"labelPosition":[513,"label-position"],"name":[513],"selectEntityCallback":[16],"value":[1040],"buttonHasFocus":[32],"iconSrc":[32]},null,{"value":["valueChangedHandler"]}]]],["p-94904819",[[1,"gx-ide-loader",{"abortTime":[2,"abort-time"],"cancelCallback":[16],"cancelLabel":[1,"cancel-label"],"description":[1],"displayBorder":[516,"display-border"],"loaderTitle":[1,"loader-title"],"show":[1028],"showWrapper":[32]}]]],["p-05b04291",[[1,"gx-ide-list-selector",{"ordered":[4],"readonly":[4],"type":[1],"required":[4],"ellipsis":[4],"value":[1025],"listName":[1,"list-name"],"noItemsBorder":[4,"no-items-border"],"noListBorder":[516,"no-list-border"]},[[2,"itemSelectionChanged","itemSelectionChangedHandler"]]],[4,"gx-ide-list-selector-item",{"itemId":[513,"item-id"],"itemValue":[1,"item-value"],"itemChecked":[1028,"item-checked"],"readonly":[1540],"ellipsis":[1540],"icon":[1],"noBorder":[1540,"no-border"],"universalSlotEnd":[516,"universal-slot-end"]}]]],["p-86365635",[[1,"gx-ide-empty-state",{"isAnimated":[4,"is-animated"],"stateDescription":[1,"state-description"],"stateIconSrc":[1,"state-icon-src"],"stateTitle":[1,"state-title"]}]]],["p-1dd7be84",[[1,"gx-ide-container",{"inactiveTitle":[4,"inactive-title"],"containerTitle":[1,"container-title"],"titleType":[1,"title-type"],"displayBorder":[4,"display-border"],"displayBorderTop":[4,"display-border-top"],"displayBorderEnd":[4,"display-border-end"],"displayBorderBottom":[4,"display-border-bottom"],"displayBorderStart":[4,"display-border-start"],"sectionsPadding":[1,"sections-padding"],"titleAlignment":[1,"title-alignment"],"noHeadingBorder":[4,"no-heading-border"],"noHeadingGap":[4,"no-heading-gap"],"noHeadingPadding":[4,"no-heading-padding"],"noHeadingPaddingBlockEnd":[4,"no-heading-padding-block-end"],"headingPaddingTop":[4,"heading-padding-top"],"headingJustify":[1,"heading-justify"],"titleHeightAsInput":[4,"title-height-as-input"],"flexRow":[4,"flex-row"],"flexContent":[4,"flex-content"],"noContentBorderTop":[4,"no-content-border-top"],"noContentPadding":[4,"no-content-padding"],"noContentGap":[4,"no-content-gap"],"alignItems":[1,"align-items"],"justifyContent":[1,"justify-content"],"contentBorderEnd":[4,"content-border-end"],"slimmerAboveFooter":[4,"slimmer-above-footer"],"noAboveFooterPadding":[4,"no-above-footer-padding"],"noBorderAboveFooter":[4,"no-border-above-footer"],"slimmerFooter":[4,"slimmer-footer"],"noFooterPadding":[4,"no-footer-padding"],"footerJustify":[1,"footer-justify"],"noBorderFooter":[4,"no-border-footer"],"hasHeaderSlot":[32],"hasSlottedContent":[32],"hasFooterSlot":[32],"hasAboveFooterSlot":[32],"hasOnlyHeading":[32],"hasOnlyContent":[32],"hasOnlyFooter":[32]}],[1,"gx-ide-title",{"titleCaption":[1,"title-caption"],"type":[1],"alignment":[1],"padding":[516],"noPaddingBottom":[516,"no-padding-bottom"],"border":[516]}]]]]'), e)));
16
+ patchBrowser().then((e => a(JSON.parse('[["p-4328be14",[[1,"gx-ide-bpm-export-xpdl",{"displayTitle":[4,"display-title"],"exportCallback":[16],"cancelCallback":[16],"addCallback":[16],"referencesCallback":[16],"emptyInput":[32],"emptyObjects":[32],"notExporting":[32]}]]],["p-04c6bd23",[[1,"gx-ide-bpm-import-files",{"displayTitle":[4,"display-title"],"allowedExtensions":[16],"confirmCallback":[16],"cancelCallback":[16],"files":[32],"selectedFiles":[32]}]]],["p-45539ad0",[[1,"gx-ide-kb-manager-import",{"cancelCallback":[16],"importCallback":[16],"loadCallback":[16],"objectContextMenuCallback":[16],"optionsCallback":[16],"selectedFile":[1040],"statusMinimal":[4,"status-minimal"],"checkedObjectsIds":[32],"selectAllCheckboxValue":[32],"selectAllCheckboxIndeterminate":[32],"importStatusMessage":[32],"importTreeState":[32],"importedTreeFilterRegExp":[32],"importingIsInProcess":[32],"importTreeFilterList":[32],"noImport":[32],"noObjects":[32],"objectsTreeModel":[32],"showHiddenImportsMessage":[32],"someStatusVisible":[32],"statusInfo":[32],"addResultItem":[64]},null,{"importTreeState":["importTreeStateChanged","watchImportTreeStateHandler"],"objectsTreeModel":["watchObjectsTreeModelHandler"],"selectedFile":["selectedFileChanged"]}]]],["p-14165308",[[1,"gx-ide-team-dev-select-recent-comment",{"displayTitle":[4,"display-title"],"comments":[16],"confirmCallback":[16],"cancelCallback":[16]}]]],["p-75a5c51f",[[1,"gx-ide-team-dev-update",{"displayTitle":[4,"display-title"],"confirmCallback":[16],"gridContextMenuCallback":[16],"loadCallback":[16],"objectsScopeCallback":[16],"openServerCallback":[16],"pendingItemsCheckedCallback":[16],"revisionScopeCallback":[16],"objectsContextMenuCallback":[16],"selectCallback":[16],"types":[16],"updateCallback":[16],"updateFrom":[16],"isLoading":[32],"objectScopeText":[32],"openTab":[32],"revisionScopeText":[32],"showFilter":[32],"updateData":[32],"updateResultData":[32],"reload":[64]}]]],["p-ca9978e1",[[17,"gx-ide-data-selector",{"cancelCallback":[16],"confirmCallback":[16],"defaultModule":[16],"displayTitle":[4,"display-title"],"editCallback":[16],"loadItemsCallback":[16],"loader":[4],"newVariableCallback":[16],"selectObjectCallback":[16],"selectionType":[1,"selection-type"],"loading":[32],"objects":[32],"selectedObjectsIds":[32],"suspendShortcuts":[64],"validate":[64]}]]],["p-c92332af",[[1,"gx-ide-manage-module-references",{"displayTitle":[4,"display-title"],"servers":[16],"serverSelectedCallback":[16],"executeActionCallback":[16],"addServerCallback":[16],"serverContextMenuCallback":[16],"showServerCommands":[4,"show-server-commands"],"modulesAll":[32],"filteredModules":[32],"selectedModule":[32],"selectedServerId":[32],"selectedModuleAction":[32],"modulesSelectedVersion":[32],"actionCompleted":[32],"closeProgressBar":[32],"progressValue":[32],"progressState":[32],"loadingServer":[32],"reRenderCounter":[32],"validate":[64]},null,{"modulesAll":["modulesAllWatcher","onPropValueChange"],"loadingServer":["loadingServerHandler"]}]]],["p-7ae2a57f",[[1,"gx-ide-manage-module-references-v2",{"displayTitle":[4,"display-title"],"servers":[16],"serverSelectedCallback":[16],"executeActionCallback":[16],"serverContextMenuCallback":[16],"showServerCommands":[4,"show-server-commands"],"searchModulesFilterValue":[32],"selectedButtonFilter":[32],"serverModules":[32],"serverModulesExtended":[32],"filteredServerModules":[32],"modulesMap":[32],"selectedModule":[32],"selectedServerId":[32],"selectedModuleAction":[32],"modulesSelectedVersionMap":[32],"actionCompleted":[32],"closeProgressBar":[32],"progressValue":[32],"progressState":[32],"loadingServer":[32]},null,{"loadingServer":["loadingServerHandler"]}]]],["p-de7f0c1f",[[1,"gx-ide-navigation-report",{"headerData":[16],"confirmCallback":[16],"cancelCallback":[16],"closeCallback":[16],"itemSelectedCallback":[16],"reportTreeItems":[32],"navigationItemsStatusRegExpString":[32],"navigationItemsCaptionRegExpString":[32],"navigationItemsRegExp":[32],"confirmed":[32],"headerState":[32],"statusInfo":[32],"someStatusVisible":[32],"addItem":[64],"clearItems":[64]},null,{"navigationItemsStatusRegExpString":["navigationItemsStatusRegExpStringChanged"],"navigationItemsCaptionRegExpString":["navigationItemsCaptionRegExpStringChanged"]}]]],["p-83cc3bcd",[[17,"gx-ide-object-selector",{"cancelCallback":[16],"categories":[16],"defaultCategory":[1,"default-category"],"defaultModule":[16],"defaultType":[1,"default-type"],"loader":[4],"loadCallback":[16],"multiSelection":[4,"multi-selection"],"newObjectCallback":[16],"openSelectionCallback":[16],"patternValue":[1,"pattern-value"],"selectModuleCallback":[16],"types":[16],"filterModified":[32],"loading":[32],"modifiedAfterValue":[32],"objects":[32],"selectedObjectsIdsArray":[32],"suspendShortcuts":[64],"validate":[64]}]]],["p-60e39b2f",[[1,"gx-ide-team-dev-history",{"types":[16],"itemContextMenuCallback":[16],"gridContextMenuCallback":[16],"selectedVersionId":[1025,"selected-version-id"],"versions":[1040],"loadCallback":[16],"loadDetailCallback":[16],"selectedVersionChangeCallback":[16],"historyDetail":[32],"objects":[32],"isFirstLoad":[32],"sidebarExpanded":[32],"filtersHidden":[32],"loading":[32],"selectedRevisionId":[32],"hasActiveVersion":[32]},null,{"selectedVersionId":["selectedVersionIdChanged"],"versions":["versionsListChanged"]}]]],["p-d77582b8",[[1,"gx-ide-ww-attributes",{"contextMenuCallback":[16],"deleteSelectionCallback":[16],"loadCallback":[16],"objectActionCallback":[16],"objects":[16],"openSelectionCallback":[16],"selectionChangeCallback":[16],"types":[16],"attributes":[32],"selectedAttributesIds":[32],"filterMore":[32],"name":[32],"loading":[32],"object":[32],"type":[32],"reload":[64],"validate":[64]},[[1,"keydown","keyDownHandler"]]]]],["p-3b5a4e2e",[[1,"gx-ide-ww-images",{"displayTitle":[4,"display-title"],"secondaryFilter":[4,"secondary-filter"],"categories":[16],"densities":[16],"defaultCategory":[1,"default-category"],"defaultModule":[16],"defaultType":[1,"default-type"],"filterModules":[16],"languages":[16],"layers":[16],"contextMenuCallback":[16],"deleteSelectionCallback":[16],"loadCallback":[16],"loadImageItemsCallback":[16],"newObjectCallback":[16],"openSelectionCallback":[16],"selectModuleCallback":[16],"selectionObjectChangedCallback":[16],"shadow":[4],"styles":[16],"types":[16],"filtersHidden":[32],"filterAfterType":[32],"filterModified":[32],"images":[32],"filteredImages":[32],"imagesSelectedItems":[32],"selectedObjectsIds":[32],"filterImagesInputValue":[32],"validate":[64],"reload":[64]},[[1,"keydown","keyDownHandler"]],{"filtersHidden":["filtersHiddenHandler"]}]]],["p-4b38fffc",[[1,"gx-ide-bpm-assign-roles",{"displayTitle":[4,"display-title"],"roles":[16],"assignedRoles":[16],"confirmCallback":[16],"cancelCallback":[16],"unassignedRolesState":[32],"assignedRolesState":[32],"filterUnassignedInput":[32],"filterAssignedInput":[32],"unassignedSelected":[32],"assignedSelected":[32]}]]],["p-e24902a0",[[1,"gx-ide-bpm-import-gxpm",{"displayTitle":[4,"display-title"],"confirmCallback":[16],"cancelCallback":[16],"selectedFile":[32],"pathValue":[32]}]]],["p-767e0f6d",[[1,"gx-ide-bpm-timer-duration",{"displayTitle":[4,"display-title"],"duration":[16],"confirmCallback":[16],"cancelCallback":[16]}]]],["p-a869ec48",[[1,"gx-ide-design-import",{"reactiveSettings":[16],"extensions":[16],"defaultModule":[16],"path":[1025],"accessToken":[1025,"access-token"],"importAsWebPanels":[4,"import-as-web-panels"],"selectModuleCallback":[16],"cancelCallback":[16],"confirmCallback":[16],"loadCallback":[16],"loadDesignSystemCallback":[16],"loadFontCallback":[16],"loadImageCallback":[16],"loadPanelDataCallback":[16],"requiresAccessTokenCallback":[16],"styles":[16],"textEditorFactoryCallback":[16],"reRenderCounter":[32],"stylesAsComboBoxModel":[32],"styleValue":[32],"accessTokenHasError":[32],"pathIsValid":[32],"tabsModel":[32],"activeTabs":[32],"renderedTabs":[32],"designData":[32],"detailTreeModel":[32],"isLoading":[32],"isLoaded":[32],"messages":[32],"selectedFile":[32],"selectedDesignType":[32],"selectedDesignItem":[32],"requiresAccessToken":[32],"designDataTreeDataModel":[32],"updateTabsActiveTab":[32],"fitImages":[32],"lastLoadCallbackSettingValues":[32]},null,{"pathIsValid":["pathIsValidChanged"],"designData":["designDataChanged"],"path":["pathChanged"],"accessToken":["accessTokenChanged"],"styles":["stylesChanged"],"messages":["watchMessagesHandler"]}]]],["p-45996535",[[1,"gx-ide-edit-module-server",{"types":[16],"name":[1],"source":[1],"type":[1],"confirmCallback":[16],"selectSourceCallback":[16],"cancelCallback":[16],"selectedType":[32]}]]],["p-fd440291",[[1,"gx-ide-kb-manager-export",{"addKBPropertiesCallback":[16],"addObjectsCallback":[16],"addReferencesCallback":[16],"cancelCallback":[16],"exportCallback":[16],"exportFileDirectoryCallback":[16],"fileName":[1,"file-name"],"kbPropertiesTypes":[16],"loader":[4],"objectTypes":[16],"optionsCallback":[16],"addKbPropertiesIsChecked":[32],"atLeastOnePropertyItemIsChecked":[32],"atLeastOneObjectItemIsChecked":[32],"checkedObjectsIds":[32],"checkedPropertiesIds":[32],"exportAllIsChecked":[32],"exportingIsInProcess":[32],"hasObjects":[32],"objectsTreeViewModel":[32]},null,{"objectsTreeViewModel":["objectsTreeViewModelChanged"],"objectTypes":["objectTypesChanged"]}]]],["p-641c79a9",[[1,"gx-ide-plugin-explorer",{"plugins":[1040],"filterCallback":[16],"showDetailsCallback":[16],"executeActionCallback":[16],"loading":[32],"pluginsActionListModel":[32]},null,{"plugins":["pluginsChangedHandler"]}]]],["p-4e6425f3",[[1,"gx-ide-sc-chat-container",{"mode":[1],"generatingResponse":[32],"loadingState":[32],"showAdditionalContent":[32],"conversationCopied":[32],"assistantStatus":[32],"chatItems":[32],"exitWelcome":[64]}]]],["p-54fb1287",[[1,"gx-ide-start-page",{"createKBCallback":[16],"openKbCallback":[16],"secondarySection":[16],"kbs":[16],"kbsFilterThreshold":[2,"kbs-filter-threshold"],"kbFilterValue":[32],"filteredKbs":[32],"loading":[32]},null,{"kbFilterValue":["kbFilterValueChanged"],"kbs":["kbsChanged"]}]]],["p-16138f55",[[1,"gx-ide-team-dev-bring-changes",{"commitDetail":[16],"commitInformation":[16],"commitObjects":[16],"enableRowOptions":[4,"enable-row-options"],"hideFilters":[4,"hide-filters"],"mergeObjectsCallback":[16],"mergePillAsButton":[4,"merge-pill-as-button"],"alreadyMergedObjectsIdsArray":[32],"atLeastOneObjectIsChecked":[32],"loading":[32],"menuContextAction":[32],"objectsFiltered":[32],"searchValue":[32],"stateFilterValue":[32],"markedObjectsSet":[32],"objectsStatesMap":[32],"commitObjectsMessagesMap":[32],"merging":[32],"updateObjectState":[64]},null,{"objectsStatesMap":["objectsStatesMapChanged"],"commitObjects":["commitObjectsChanged"]}]]],["p-34fd4875",[[1,"gx-ide-team-dev-commit",{"displayTitle":[4,"display-title"],"changeSet":[16],"types":[16],"folders":[16],"categories":[16],"getRecentCommentCallback":[16],"loadCallback":[16],"commitCallback":[16],"selectCallback":[16],"pendingItemsCheckedCallback":[16],"objectsContextMenuCallback":[16],"filtersHidden":[32],"comment":[32],"pendingCommits":[32],"ignoredObjects":[32],"commitButtonEnabled":[32],"filterHasConditions":[32],"reload":[64]}]]],["p-b1851e6b",[[1,"gx-ide-team-dev-update-partial-selection",{"displayTitle":[4,"display-title"],"addCallback":[16],"cancelCallback":[16],"confirmCallback":[16],"selection":[1040],"selectedObjectsIds":[32],"validate":[64]}]]],["p-f722955f",[[1,"gx-ide-team-dev-update-to-revision",{"displayTitle":[4,"display-title"],"cancelCallback":[16],"confirmCallback":[16],"currentRevision":[1,"current-revision"],"validate":[64]}]]],["p-b58fb87b",[[1,"gx-ide-template",{"displayTitle":[4,"display-title"]}]]],["p-b2928645",[[1,"gx-ide-wf-settings",{"displayTitle":[4,"display-title"],"configurationType":[1,"configuration-type"],"defaultConfiguration":[16],"saveCallback":[16],"cancelCallback":[16]}]]],["p-f49bb305",[[1,"gx-ide-ai-assistant",{"messages":[1040],"promptMaxHeight":[1,"prompt-max-height"],"assistantStatus":[1025,"assistant-status"],"focusShortcuts":[16],"userMessageCallback":[16],"clearCallback":[16],"promptValue":[1,"prompt-value"],"filter":[4],"userHasTyped":[32],"aIInProgress":[32],"showFilter":[32],"promptHasFocus":[32],"filterValue":[32],"clear":[64],"addMessage":[64]},[[2,"focus","handleFocus"]],{"aIInProgress":["watchAIInProgressHandler"],"messages":["watchMessagesHandler"]}]]],["p-7f65f9e3",[[1,"gx-ide-bpm-app-declaration",{"application":[1040],"cancelCallback":[16],"confirmCallback":[16],"getDataMappingCallback":[16],"selectApplicationCallback":[16],"selectMappingCallback":[16],"suggestApplicationsCallback":[16],"applicationComboBoxModel":[32]}]]],["p-1be1db4e",[[1,"gx-ide-bpm-task-documents",{"documents":[1040],"cancelCallback":[16],"confirmCallback":[16],"selectDocumentCallback":[16],"suggestDocumentsCallback":[16],"documentsActionListState":[32],"documentName":[32],"selectedDocument":[32],"suggestedDocuments":[32],"suspendShortcuts":[64]}]]],["p-667965d3",[[1,"gx-ide-dashboard-home",{"kb":[16],"enableEditKBName":[4,"enable-edit-k-b-name"],"environment":[16],"enableEditEnvironmentName":[4,"enable-edit-environment-name"],"projectDescription":[1,"project-description"],"enableEditDescription":[4,"enable-edit-description"],"recentObjects":[16],"renameKBCallback":[16],"renameEnvironmentCallback":[16],"editDescriptionCallback":[16],"openObjectCallback":[16],"editingEnvName":[32],"editingProjectDescription":[32]},null,{"recentObjects":["recentObjectsHandler"]}]]],["p-7cece7a8",[[1,"gx-ide-data-type-selector",{"categories":[16],"dataTypeSelectedCallback":[16],"arrowUpOnFirstElement":[16],"focusType":[1,"focus-type"],"recentlyUsed":[16],"categoriesListBoxModel":[32],"selectedCategory":[32],"recentlyUsedActionListModel":[32],"loading":[32],"categoriesJustChanged":[32],"actionListDidRender":[32]},null,{"categories":["categoriesChanged"],"recentlyUsed":["recentlyUsedChanged"]}]]],["p-03dbccde",[[1,"gx-ide-deployment-tool",{"deploymentUnits":[16],"targetTypes":[16],"defaultTargetTypeId":[1,"default-target-type-id"],"newDeploymentUnitId":[1,"new-deployment-unit-id"],"objectTypes":[16],"getDeploymentUnitObjectsCallback":[16],"optionsCallback":[16],"deployCallback":[16],"addObjectsCallback":[16],"createDeploymentUnitCallback":[16],"checkedObjectsIds":[32],"noObjects":[32],"selectedDeployTargetData":[32],"addedObjects":[32],"allObjectTypes":[32],"treeModel":[32],"allowDeploy":[32]},null,{"treeModel":["watchTreeModelHandler"],"objectTypes":["watchObjectTypesHandler"]}]]],["p-7d7cf30d",[[1,"gx-ide-file-uploader",{"types":[16],"multiple":[4],"canEditName":[4,"can-edit-name"],"label":[1],"uploadFunction":[16],"cancelUploadFunction":[16],"fileUploadedCallback":[16],"dialogCanceledCallback":[16],"dialogConfirmedCallback":[16],"uploadCancelledCallback":[16],"fileRenamedCallback":[16],"fileValidationErrorCallback":[16],"fileDeletionErrorCallback":[16],"fileDeletedCallback":[16],"onBeforeDelete":[16],"fileStates":[32],"isDragging":[32],"clear":[64]}]]],["p-1bc2613e",[[17,"gx-ide-new-object",{"defaultTypeId":[1,"default-type-id"],"defaultParent":[16],"displayTitle":[4,"display-title"],"cancelCallback":[16],"createCallback":[16],"shadow":[4],"typeCategories":[1040],"parent":[16],"selectModuleCallback":[16],"validateNameCallback":[16],"suggestNameCallback":[16],"suggestDescriptionCallback":[16],"description":[32],"name":[32],"nameValidationErrorMessage":[32],"selectedCategory":[32],"selectedType":[32],"typeCategoriesActionListModel":[32],"typesActionListModel":[32],"selectedTypeMap":[32],"suspendShortcuts":[64]},null,{"typeCategories":["typeCategoriesChanged"]}]]],["p-1292a6b9",[[1,"gx-ide-open-api-import",{"defaultParent":[16],"displayTitle":[4,"display-title"],"cancelCallback":[16],"importCallback":[16],"loadCallback":[16],"selectParentCallback":[16],"actionListItems":[32],"importingIsInProcess":[32],"operations":[32],"selectedFile":[32],"selectedOperationForDescription":[32],"selectedOperations":[32],"selectAllCheckboxValue":[32],"selectAllCheckboxIndeterminate":[32],"suspendShortcuts":[64]}]]],["p-c50b9883",[[1,"gx-ide-references",{"loadReferencesCallback":[16],"openObjectCallback":[16],"openSelectorDialogCallback":[16],"selectReferenceCallback":[16],"selectorSourceCallback":[16],"selectedObject":[1040],"barHidden":[32],"objectsSuggestions":[32],"referencedByTreeData":[32],"referencesToTreeData":[32]},null,{"selectedObject":["selectedObjectChanged"]}]]],["p-d095a37c",[[1,"gx-ide-select-user-team",{"cancelCallback":[16],"continueCallback":[16],"teams":[16],"slideIsVisible":[32],"teamsModelReady":[32]},null,{"teams":["teamsChanged"]}]]],["p-68969051",[[1,"gx-ide-sign-in-team",{"authStep":[1,"auth-step"],"continueCallback":[16],"signInCallback":[16],"termsConfirmationRequired":[4,"terms-confirmation-required"],"teams":[16],"termsCallback":[16],"privacyCallback":[16],"authStepInternal":[32],"slideIsVisible":[32],"termsAndConditionsAccepted":[32]},null,{"authStep":["authStepChanged"],"teams":["teamsChanged"]}]]],["p-385c9544",[[1,"gx-ide-ww-files",{"categories":[16],"defaultCategory":[1,"default-category"],"defaultModule":[16],"filterModules":[16],"types":[16],"contextMenuCallback":[16],"deleteSelectionCallback":[16],"loadCallback":[16],"newFileCallback":[16],"openSelectionCallback":[16],"selectModuleCallback":[16],"selectionChangeCallback":[16],"showSearchContents":[4,"show-search-contents"],"showDescription":[4,"show-description"],"showModifiedDate":[4,"show-modified-date"],"showLastUser":[4,"show-last-user"],"showImportDate":[4,"show-import-date"],"showType":[4,"show-type"],"showLastBuildDate":[4,"show-last-build-date"],"categoriesComboBoxModel":[32],"afterCurrentValue":[32],"filterAfterOptions":[32],"enabledModifiedControls":[32],"filterModified":[32],"filterMore":[32],"objects":[32],"filterFilesInputValue":[32],"filteredFiles":[32],"selectedObjectsIds":[32],"advancedFilterAccordionExpanded":[32],"validate":[64],"reload":[64]},[[1,"keydown","keyDownHandler"]],{"categories":["categoriesChanged"]}]]],["p-476b74a1",[[1,"gx-ide-about",{"versions":[16],"detailsCallback":[16],"privacyPolicyCallback":[16],"termsAndConditionsCallback":[16],"copying":[32]}]]],["p-ded7444c",[[1,"gx-ide-bpm-sync-gam-roles",{"cancelCallback":[16],"saveCallback":[16],"suspendShortcuts":[64]}]]],["p-35f9ebbc",[[1,"gx-ide-card",{"cardTitle":[1,"card-title"],"cardSubTitle":[1,"card-sub-title"],"icon":[1]}]]],["p-e502c2fd",[[1,"gx-ide-connect-gx-server",{"authenticationTypes":[16],"cancelCallback":[16],"connectCallback":[16],"defaultConnectionData":[16],"enableCustomServer":[4,"enable-custom-server"],"serverUrls":[16],"authenticationTypesComboBoxModel":[32],"gxServerConnectionData":[32],"serverUrlsComboBoxModel":[32],"validatableControls":[32]},null,{"authenticationTypes":["authenticationTypesChanged"],"serverUrls":["serverUrlsChanged"]}]]],["p-760d8f2a",[[1,"gx-ide-create-kb-from-server",{"connectionData":[16],"cancelCallback":[16],"changeConnectionCallback":[16],"createKBCallback":[16],"getGXserverKBsCallback":[16],"selectKBVersionsCallback":[16],"enableSelectVersionsButton":[32],"localKbNameInputValue":[32],"filterValue":[32],"kbsFilteredActionListModel":[32],"validatableControls":[32],"versionSelectedType":[32],"versionsValueInput":[32]}]]],["p-7d107d2f",[[1,"gx-ide-current-user-info",{"userInfo":[16],"myAccountCallback":[16],"changeTeamCallback":[16],"changeLanguageCallback":[16],"changeModeCallback":[16],"menuAlign":[16],"signOutCallback":[16],"termsCallback":[16],"privacyCallback":[16],"showMenu":[32]}]]],["p-31beae9e",[[1,"gx-ide-directory-selector",{"accessibilityLabels":[16],"label":[1],"labelPosition":[513,"label-position"],"centerLabel":[1028,"center-label"],"labelWidth":[1,"label-width"],"selectDirectoryCallback":[16],"value":[1025],"icon":[32]}]]],["p-f7421997",[[1,"gx-ide-gam-installation-settings",{"cancelCallback":[16],"canSelectPanels":[4,"can-select-panels"],"configurationType":[1,"configuration-type"],"defaultConfiguration":[16],"repairCallback":[16],"saveCallback":[16]}]]],["p-82878950",[[1,"gx-ide-new-environment",{"cancelCallback":[16],"createCallback":[16],"dataStores":[1040],"environmentName":[1025,"environment-name"],"getDataSourcesCallback":[16],"getEnvironmentNameCallback":[16],"getFrontEndsCallback":[16],"isAdvanced":[4,"is-advanced"],"languages":[16],"runtimes":[16],"setAsTarget":[4,"set-as-target"],"advancedTabIsVisible":[32],"frontEnds":[32],"validatableControls":[32],"dataStoresComboBoxModel":[32],"languageComboBoxModel":[32],"runtimesRadioGroupModel":[32],"suspendShortcuts":[64]},null,{"dataStores":["dataStoresChanged"],"languages":["languagesChanged"],"runtimes":["runtimesChanged"]}]]],["p-b465f29d",[[1,"gx-ide-new-kb",{"authenticationTypes":[16],"cancelCallback":[16],"collations":[16],"createCallback":[16],"createDataFilesInKBFolder":[4,"create-data-files-in-k-b-folder"],"databaseName":[1,"database-name"],"defaultDataSources":[1040],"getDataSourcesCallback":[16],"getFrontEndsCallback":[16],"isAdvanced":[4,"is-advanced"],"kbLocation":[1025,"kb-location"],"kbName":[1,"kb-name"],"password":[1],"prototypingEnvironments":[16],"prototypingTargets":[16],"savePassword":[4,"save-password"],"selectLocationCallback":[16],"serverNames":[16],"userInterfaceLanguages":[16],"userName":[1,"user-name"],"advancedTabIsVisible":[32],"frontEnds":[32],"validatableControls":[32],"createDataInKbDisabled":[32],"userNameVisible":[32],"passwordVisible":[32],"savePasswordVisible":[32],"authenticationTypesComboBoxModel":[32],"authenticationTypesInitialValue":[32],"collationsComboBoxModel":[32],"collationsInitialValue":[32],"defaultDataSourcesComboBoxModel":[32],"defaultDataSourcesInitialValue":[32],"prototypingTargetsComboBoxModel":[32],"prototypingTargetsInitialValue":[32],"prototypingEnvironmentsComboBoxModel":[32],"prototypingEnvironmentsInitialValue":[32],"serverNamesComboBoxModel":[32],"serverNamesInitialValue":[32],"userInterfaceLanguagesComboBoxModel":[32],"userInterfaceLanguagesInitialValue":[32],"suspendShortcuts":[64]},null,{"authenticationTypes":["watchAuthenticationTypes"],"collations":["watchCollations"],"defaultDataSources":["watchDefaultDataSources"],"prototypingEnvironments":["watchPrototypingEnvironments"],"prototypingTargets":["watchPrototypingTargets"],"serverNames":["watchServerNames"],"userInterfaceLanguages":["watchUserInterfaceLanguages"]}]]],["p-80c1ddc3",[[1,"gx-ide-new-version",{"isRemoteOperation":[4,"is-remote-operation"],"isFreezeOperation":[4,"is-freeze-operation"],"showLinkedLocalVersionCheckbox":[4,"show-linked-local-version-checkbox"],"cancelCallback":[16],"createCallback":[16],"defaultInputValues":[16],"versionName":[32],"versionDescription":[32],"setNewVersionAsActive":[32],"createLinkedLocalVersion":[32],"createAsProtectedVersion":[32],"validatableControls":[32]},null,{"defaultInputValues":["defaultInputValuesChanged"]}]]],["p-84c1c1bb",[[1,"gx-ide-plugin-details",{"data":[16],"installCallback":[16],"openLinkCallback":[16],"uninstallCallback":[16],"docsTabModel":[32],"selectedTabId":[32]}]]],["p-72e346b9",[[1,"gx-ide-share-kb",{"connectionData":[16],"cancelCallback":[16],"changeConnectionCallback":[16],"kbName":[1025,"kb-name"],"shareKBCallback":[16],"selectKBVersionsCallback":[16],"enableSelectVersionsButton":[32],"validatableControls":[32],"versionSelectedType":[32],"versionsValueInput":[32]}]]],["p-6b957e82",[[1,"gx-ide-sign-in",{"termsCallback":[16],"signInCallback":[16]}]]],["p-bbb5b0fb",[[1,"gx-ide-splash",{"downloadDockerCallback":[16],"quitCallback":[16],"messages":[16],"openLogCallback":[16],"showQuitButton":[4,"show-quit-button"],"showOpenLogLink":[4,"show-open-log-link"],"showDockerMissingError":[4,"show-docker-missing-error"],"ariaBusy":[32]}]]],["p-304d5629",[[1,"gx-ide-switch-panel"]]],["p-c58e0a92",[[1,"gx-ide-switcher"]]],["p-46ffec64",[[1,"gx-ide-test",{"name":[1],"filterOn":[32]}]]],["p-cbe2dd13",[[1,"gx-ide-top-bar",{"topBarTitle":[1,"top-bar-title"]}]]],["p-93cdb6f8",[[1,"gx-ide-welcome-page",{"transitionType":[1,"transition-type"],"wordsPerMinute":[2,"words-per-minute"],"closeCallback":[16],"slides":[16],"activeSlideIndex":[32],"displaySlider":[32],"copyrightsVisible":[32],"lastSlideReached":[32],"sliderVisible":[32],"slideTransitioning":[32],"userHasChangedSlide":[32]}]]],["p-d8379699",[[1,"gx-ide-bpm-objects-selector",{"displayTitle":[4,"display-title"],"selection":[1040],"addCallback":[16],"referencesCallback":[16],"objects":[32],"selectedObjects":[32]}]]],["p-52f37ec7",[[1,"gx-ide-select-kb-items",{"activeItemCallback":[16],"cancelCallback":[16],"checkboxType":[1,"checkbox-type"],"expandOnClick":[4,"expand-on-click"],"checkedChanged":[16],"confirmCallback":[16],"dialogActions":[16],"itemContextMenuCallback":[16],"itemsList":[16],"multiSelection":[4,"multi-selection"],"showActiveItemLink":[4,"show-active-item-link"],"selectionChanged":[16],"activeItemNode":[32],"renderFooter":[32],"nodeListFlattenedTreeModel":[32],"loading":[32],"nodesVersionsViewType":[32],"nodeVersionsListTreeModel":[32],"searchPatternValue":[32],"toggleCheckboxes":[32],"suspendShortcuts":[64],"updateSelection":[64]},null,{"itemsList":["watchNodeListHandler"]}]]],["p-74a0cb25",[[0,"gx-ide-ai-message",{"aiAssistantHostRef":[16],"message":[1],"messageType":[1,"message-type"],"filterValue":[1,"filter-value"],"hidden":[4],"translations":[16],"visible":[32],"showCopiedMessage":[32]}]]],["p-7053c38e",[[1,"gx-ide-file-item",{"file":[16],"editable":[4],"fileDeletedCallback":[16],"fileDeletionErrorCallback":[16],"isEditing":[32],"currentName":[32]},null,{"file":["handleFileChange"]}]]],["p-e7fb3ee3",[[1,"gx-ide-status-buttons",{"active":[4],"errors":[2],"hideError":[4,"hide-error"],"warnings":[2],"hideWarning":[4,"hide-warning"],"successes":[2],"hideSuccess":[4,"hide-success"],"messages":[2],"hideMessage":[4,"hide-message"],"minimal":[4],"compact":[516],"noInnerBorders":[516,"no-inner-borders"],"iconsSize":[32]}]]],["p-0cd3ab87",[[4,"gx-ide-chat-container",{"chatTitle":[1,"chat-title"],"copyConversationCallback":[16],"deleteConversationCallback":[16],"displayWelcomeScreen":[4,"display-welcome-screen"],"displayConversationCopiedMessage":[32],"menuIsExpanded":[32],"showCopyConversationMessage":[64]}],[1,"gx-ide-chat-welcome",{"welcomeTitle":[1025,"welcome-title"],"welcomeGreeting":[1025,"welcome-greeting"],"suggestedPrompts":[1040],"suggestedPrompRequestedCallback":[16],"showHeader":[32],"showSuggestedPrompts":[32],"hideWelcome":[32],"exitWelcome":[64]}]]],["p-c9bca7c0",[[1,"gx-ide-entity-selector",{"defaultValue":[16],"disabled":[516],"labelCaption":[1,"label-caption"],"labelPosition":[513,"label-position"],"name":[513],"selectEntityCallback":[16],"value":[1040],"buttonHasFocus":[32],"iconSrc":[32]},null,{"value":["valueChangedHandler"]}]]],["p-94904819",[[1,"gx-ide-loader",{"abortTime":[2,"abort-time"],"cancelCallback":[16],"cancelLabel":[1,"cancel-label"],"description":[1],"displayBorder":[516,"display-border"],"loaderTitle":[1,"loader-title"],"show":[1028],"showWrapper":[32]}]]],["p-05b04291",[[1,"gx-ide-list-selector",{"ordered":[4],"readonly":[4],"type":[1],"required":[4],"ellipsis":[4],"value":[1025],"listName":[1,"list-name"],"noItemsBorder":[4,"no-items-border"],"noListBorder":[516,"no-list-border"]},[[2,"itemSelectionChanged","itemSelectionChangedHandler"]]],[4,"gx-ide-list-selector-item",{"itemId":[513,"item-id"],"itemValue":[1,"item-value"],"itemChecked":[1028,"item-checked"],"readonly":[1540],"ellipsis":[1540],"icon":[1],"noBorder":[1540,"no-border"],"universalSlotEnd":[516,"universal-slot-end"]}]]],["p-86365635",[[1,"gx-ide-empty-state",{"isAnimated":[4,"is-animated"],"stateDescription":[1,"state-description"],"stateIconSrc":[1,"state-icon-src"],"stateTitle":[1,"state-title"]}]]],["p-1dd7be84",[[1,"gx-ide-container",{"inactiveTitle":[4,"inactive-title"],"containerTitle":[1,"container-title"],"titleType":[1,"title-type"],"displayBorder":[4,"display-border"],"displayBorderTop":[4,"display-border-top"],"displayBorderEnd":[4,"display-border-end"],"displayBorderBottom":[4,"display-border-bottom"],"displayBorderStart":[4,"display-border-start"],"sectionsPadding":[1,"sections-padding"],"titleAlignment":[1,"title-alignment"],"noHeadingBorder":[4,"no-heading-border"],"noHeadingGap":[4,"no-heading-gap"],"noHeadingPadding":[4,"no-heading-padding"],"noHeadingPaddingBlockEnd":[4,"no-heading-padding-block-end"],"headingPaddingTop":[4,"heading-padding-top"],"headingJustify":[1,"heading-justify"],"titleHeightAsInput":[4,"title-height-as-input"],"flexRow":[4,"flex-row"],"flexContent":[4,"flex-content"],"noContentBorderTop":[4,"no-content-border-top"],"noContentPadding":[4,"no-content-padding"],"noContentGap":[4,"no-content-gap"],"alignItems":[1,"align-items"],"justifyContent":[1,"justify-content"],"contentBorderEnd":[4,"content-border-end"],"slimmerAboveFooter":[4,"slimmer-above-footer"],"noAboveFooterPadding":[4,"no-above-footer-padding"],"noBorderAboveFooter":[4,"no-border-above-footer"],"slimmerFooter":[4,"slimmer-footer"],"noFooterPadding":[4,"no-footer-padding"],"footerJustify":[1,"footer-justify"],"noBorderFooter":[4,"no-border-footer"],"hasHeaderSlot":[32],"hasSlottedContent":[32],"hasFooterSlot":[32],"hasAboveFooterSlot":[32],"hasOnlyHeading":[32],"hasOnlyContent":[32],"hasOnlyFooter":[32]}],[1,"gx-ide-title",{"titleCaption":[1,"title-caption"],"type":[1],"alignment":[1],"padding":[516],"noPaddingBottom":[516,"no-padding-bottom"],"border":[516]}]]]]'), e)));
17
17
  //# sourceMappingURL=genexus-ide-ui.esm.js.map
@@ -43,7 +43,7 @@ const mapDataTypesToList = t => t.map(((t, e) => ({
43
43
  order: e
44
44
  })));
45
45
 
46
- const a = ":host{position:relative;display:grid;block-size:100%;overflow:auto;grid-template-rows:1fr max-content;--control__border-width:var(--mer-border__width--sm);--control__border-radius:var(--mer-border__radius--sm)}.main{display:contents}.selected-category{margin:0;text-transform:capitalize;margin-inline-start:var(--mer-spacing--md);white-space:nowrap}.footer{overflow:auto;padding:var(--mer-spacing--xs)}";
46
+ const a = ":host{position:relative;display:grid;block-size:100%;overflow:auto;grid-template-rows:1fr max-content;--control__border-width:var(--mer-border__width--sm);--control__border-radius:var(--mer-border__radius--sm)}.main{display:contents}.selected-category{margin:0;text-transform:capitalize;margin-inline-start:var(--mer-spacing--md);white-space:nowrap}.footer{overflow:auto;padding:var(--mer-spacing--xs)}.list-box::part(item__action),.list-box::part(group__action){font-size:var(--font-size-body-s) !important}";
47
47
 
48
48
  var r = undefined && undefined.__classPrivateFieldGet || function(t, e, s, i) {
49
49
  if (s === "a" && !i) throw new TypeError("Private accessor was defined without a getter");
@@ -58,13 +58,13 @@ var h = undefined && undefined.__classPrivateFieldSet || function(t, e, s, i, n)
58
58
  return i === "a" ? n.call(t, s) : n ? n.value = s : e.set(t, s), s;
59
59
  };
60
60
 
61
- var c, f, l, d, p, u, w, m, y, g, b, k, M, v, T, W, C;
61
+ var c, f, l, d, p, u, w, m, y, b, g, k, M, v, T, W, C;
62
62
 
63
- const x = [ "resets/box-sizing", "components/list-box", "utils/form--full", "utils/typography", "utils/layout", "utils/spacing", "chameleon/scrollbar" ];
63
+ const _ = [ "resets/box-sizing", "components/list-box", "utils/form--full", "utils/typography", "utils/layout", "utils/spacing", "chameleon/scrollbar" ];
64
64
 
65
- const I = "ArrowUp";
65
+ const x = "ArrowUp";
66
66
 
67
- const _ = "ArrowDown";
67
+ const I = "ArrowDown";
68
68
 
69
69
  const $ = "Enter";
70
70
 
@@ -74,13 +74,13 @@ const D = "all";
74
74
 
75
75
  const j = "recenttly-used";
76
76
 
77
- const A = n({
77
+ const z = n({
78
78
  category: "system",
79
79
  name: "time",
80
80
  colorType: "primary"
81
81
  });
82
82
 
83
- const L = class {
83
+ const A = class {
84
84
  constructor(s) {
85
85
  t(this, s);
86
86
  c.set(this, void 0);
@@ -96,7 +96,7 @@ const L = class {
96
96
  });
97
97
  m.set(this, false);
98
98
  y.set(this, void 0);
99
- g.set(this, (t => {
99
+ b.set(this, (t => {
100
100
  const e = t.find((t => t.tagName === "CH-ACTION-LIST-ITEM"));
101
101
  if (e) {
102
102
  const t = e.id;
@@ -104,12 +104,12 @@ const L = class {
104
104
  this.dataTypeSelectedCallback(s);
105
105
  }
106
106
  }));
107
- b.set(this, (t => {
107
+ g.set(this, (t => {
108
108
  const e = t.key;
109
109
  const s = t.composedPath();
110
- if (e === I || e === _) {
110
+ if (e === x || e === I) {
111
111
  h(this, u, e, "f");
112
- if (e === I) {
112
+ if (e === x) {
113
113
  // Check if this is the first group. IF it is, let the host know,
114
114
  // so it can close the dialog.
115
115
  const t = s.find((t => t.tagName === "CH-ACTION-LIST-ITEM"));
@@ -125,7 +125,7 @@ const L = class {
125
125
  }
126
126
  }
127
127
  } else if (e === $) {
128
- r(this, g, "f").call(this, s);
128
+ r(this, b, "f").call(this, s);
129
129
  } else if (e === E) {
130
130
  t.stopPropagation();
131
131
  }
@@ -136,7 +136,7 @@ const L = class {
136
136
  return;
137
137
  } else {
138
138
  const e = t.composedPath();
139
- r(this, g, "f").call(this, e);
139
+ r(this, b, "f").call(this, e);
140
140
  }
141
141
  h(this, u, null, "f");
142
142
  }));
@@ -200,7 +200,7 @@ const L = class {
200
200
  onKeyDown: r(this, T, "f")
201
201
  }, e("ch-image", {
202
202
  class: "icon-md",
203
- src: A
203
+ src: z
204
204
  })), e("button", {
205
205
  class: `button-icon-only ${s}`,
206
206
  onClick: r(this, M, "f"),
@@ -300,7 +300,7 @@ const L = class {
300
300
  return e(s, {
301
301
  class: "widget"
302
302
  }, e("ch-theme", {
303
- model: x
303
+ model: _
304
304
  }), this.loading ? e("gx-ide-loader", {
305
305
  loaderTitle: r(this, c, "f").loader.title,
306
306
  description: r(this, c, "f").loader.description,
@@ -315,7 +315,7 @@ const L = class {
315
315
  class: "list-box",
316
316
  model: this.categoriesListBoxModel,
317
317
  selection: "single",
318
- onKeyDown: r(this, b, "f"),
318
+ onKeyDown: r(this, g, "f"),
319
319
  onClick: r(this, k, "f")
320
320
  }), r(this, W, "f").call(this)));
321
321
  }
@@ -334,11 +334,11 @@ const L = class {
334
334
  };
335
335
 
336
336
  c = new WeakMap, f = new WeakMap, l = new WeakMap, d = new WeakMap, p = new WeakMap,
337
- u = new WeakMap, w = new WeakMap, m = new WeakMap, y = new WeakMap, g = new WeakMap,
338
- b = new WeakMap, k = new WeakMap, M = new WeakMap, v = new WeakMap, T = new WeakMap,
337
+ u = new WeakMap, w = new WeakMap, m = new WeakMap, y = new WeakMap, b = new WeakMap,
338
+ g = new WeakMap, k = new WeakMap, M = new WeakMap, v = new WeakMap, T = new WeakMap,
339
339
  W = new WeakMap, C = new WeakMap;
340
340
 
341
- L.style = a;
341
+ A.style = a;
342
342
 
343
- export { L as gx_ide_data_type_selector };
344
- //# sourceMappingURL=p-6b4fdf55.entry.js.map
343
+ export { A as gx_ide_data_type_selector };
344
+ //# sourceMappingURL=p-7cece7a8.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["mapCategoryToListItemGroup","category","categoryGroup","caption","name","id","type","expanded","expandable","items","types","map","selected","additionalInformation","center","imgSrc","icon","mapDataTypesToList","dataTypes","dataType","index","undefined","order","dataTypeSelectorCss","CSS_BUNDLES","ARROW_UP_KEY","ARROW_DOWN_KEY","ENTER_KEY","TAB_KEY","ALL_CATEGORY_ID","RECENTLY_USED_CATEGORY_ID","CLOCK_ICON","getIconPath","colorType","GxIdeKbManagerImport","_GxIdeKbManagerImport__componentLocale","set","this","_GxIdeKbManagerImport_showAll","_GxIdeKbManagerImport_categoriesActionListItemGroupMap","Map","_GxIdeKbManagerImport_dataTypeCategoryMap","_GxIdeKbManagerImport_dataTypeDataIdMap","_GxIdeKbManagerImport_lastArrowKey","_GxIdeKbManagerImport_selectedDataTypeIds","categoryId","dataTypeId","_GxIdeKbManagerImport_focusAlreadySet","_GxIdeKbManagerImport_actionListEl","_GxIdeKbManagerImport_evaluateSelectionChanged","path","chActionListItem","find","el","tagName","dataTypeData","__classPrivateFieldGet","get","dataTypeSelectedCallback","_GxIdeKbManagerImport_listKeyDownHandler","event","pressedKey","key","composedPath","__classPrivateFieldSet","actionGroup","currentFocusedActionGroupId","firstActionListGroupId","shadowRoot","firstElementChild","arrowUpOnFirstElement","call","stopPropagation","_GxIdeKbManagerImport_listClickHandler","detail","_GxIdeKbManagerImport_showAllObjects","allCategoriesActionListModel","counter","mapLength","size","keys","push","categoriesListBoxModel","selectedCategory","_GxIdeKbManagerImport_showRecentlyObjects","recentlyUsedActionListModel","selectedCategoryHandler","e","currentTarget","dataset","newSelectedCategory","_GxIdeKbManagerImport_handleButtonTab","_GxIdeKbManagerImport_renderFooter","recentlyUsedBtnClass","allBtnClass","selectedCategoryDescription","fixedTypes","recentlyUsed","all","h","class","length","select","title","onClick","onKeyDown","src","categories","buttonClass","_GxIdeKbManagerImport_setFocus","async","focusableElement","setTimeout","focusType","selectedDataTypeEl","getElementById","firstActionListGroup","firstButton","focus","categoriesChanged","newCategories","clear","forEach","categoryListBoxModel","isSelected","loading","categoriesJustChanged","recentlyUsedChanged","newRecentlyUsed","componentWillLoad","Locale","getComponentStrings","render","Host","model","loaderTitle","loader","description","show","ref","selection"],"sources":["src/components/data-type-selector/helpers.ts","src/components/data-type-selector/data-type-selector.scss?tag=gx-ide-data-type-selector&encapsulation=shadow","src/components/data-type-selector/data-type-selector.tsx"],"sourcesContent":["import { DataTypeCategoryData, DataTypeData } from \"./data-type-selector\";\nimport {\n ActionListItemGroup,\n ActionListModel\n} from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\n\nexport const mapCategoryToListItemGroup = (\n category: DataTypeCategoryData\n): ActionListItemGroup => {\n const categoryGroup: ActionListItemGroup = {\n caption: category.name,\n id: category.name,\n type: \"group\",\n expanded: true,\n expandable: true,\n items: category.types.map(type => {\n return {\n caption: type.name,\n id: type.name,\n selected: type.selected,\n additionalInformation: {\n \"stretch-start\": {\n center: [{ imgSrc: type.icon }]\n }\n },\n type: \"actionable\"\n };\n })\n };\n return categoryGroup;\n};\n\nexport const mapDataTypesToList = (\n dataTypes: DataTypeData[]\n): ActionListModel => {\n return dataTypes.map((dataType, index) => {\n return {\n caption: dataType.name,\n id: dataType.name,\n selected: dataType.selected,\n additionalInformation: {\n \"stretch-start\": {\n center: [{ imgSrc: dataType.icon || undefined }]\n }\n },\n type: \"actionable\",\n order: index\n };\n });\n};\n",":host {\n position: relative;\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr max-content;\n\n // WA: Prevent a custom css rule on genexus-web from overriding --control__border-width value.\n // TDOO: remove this when the custom style is removed from genexus-web.\n // custom stlye is: .gx-struct-editor .tabular-grid-cell {\n // --control__border-width: 0;\n // }\n\n --control__border-width: var(--mer-border__width--sm);\n --control__border-radius: var(--mer-border__radius--sm);\n}\n\n.main {\n display: contents;\n}\n\n.selected-category {\n margin: 0;\n text-transform: capitalize;\n margin-inline-start: var(\n --mer-spacing--md\n ); // TODO: Create a semantic class in Mercury for this case.\n white-space: nowrap;\n}\n\n.footer {\n overflow: auto;\n padding: var(--mer-spacing--xs);\n}\n\n// WA: Reduce font-size. This should be solved on Mercury.\n.list-box::part(item__action),\n.list-box::part(group__action) {\n font-size: var(--font-size-body-s) !important;\n}\n","// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n// Other Libraries\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\nimport {\n ActionListItemModel,\n ActionListModel\n} from \"@genexus/chameleon-controls-library\";\nimport { ActionListItemGroup } from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\n// Gx Ide Ui\nimport { Locale } from \"../../common/locale\";\nimport { mapCategoryToListItemGroup, mapDataTypesToList } from \"./helpers\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/list-box\",\n \"utils/form--full\",\n \"utils/typography\",\n \"utils/layout\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst ARROW_UP_KEY = \"ArrowUp\";\nconst ARROW_DOWN_KEY = \"ArrowDown\";\nconst ENTER_KEY = \"Enter\";\nconst TAB_KEY = \"Tab\";\n\nconst ALL_CATEGORY_ID = \"all\";\nconst RECENTLY_USED_CATEGORY_ID = \"recenttly-used\";\n\nconst CLOCK_ICON = getIconPath({\n category: \"system\",\n name: \"time\",\n colorType: \"primary\"\n});\n\n@Component({\n tag: \"gx-ide-data-type-selector\",\n styleUrl: \"data-type-selector.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/data-type-selector\"]\n})\nexport class GxIdeKbManagerImport {\n #_componentLocale: any;\n #showAll: boolean = false;\n #categoriesActionListItemGroupMap: Map<string, ActionListItemGroup> = new Map<\n string,\n ActionListItemGroup\n >();\n\n #dataTypeCategoryMap: Map<string, string> = new Map<string, string>();\n #dataTypeDataIdMap: Map<string, DataTypeData> = new Map<\n string,\n DataTypeData\n >();\n #lastArrowKey: typeof ARROW_UP_KEY | typeof ARROW_DOWN_KEY | null = null;\n #selectedDataTypeIds: SelectedDataTypeIds = {\n // For setting focus\n categoryId: undefined,\n dataTypeId: undefined\n };\n #focusAlreadySet: boolean = false;\n\n #actionListEl!: HTMLChActionListRenderElement;\n @Element() el: HTMLGxIdeDataTypeSelectorElement;\n\n @State() categoriesListBoxModel: ActionListItemModel[] = [];\n @State() selectedCategory: string;\n @State() recentlyUsedActionListModel: ActionListModel = [];\n @State() loading: boolean = true;\n @State() categoriesJustChanged: boolean = false;\n @State() actionListDidRender: boolean = false;\n\n /**\n * All possible types and its category\n */\n @Prop() readonly categories: DataTypeCategoryData[] = undefined;\n @Watch(\"categories\")\n categoriesChanged(newCategories: DataTypeCategoryData[]) {\n if (!newCategories?.length) {\n return;\n }\n\n this.#categoriesActionListItemGroupMap.clear();\n newCategories.forEach(category => {\n const categoryListBoxModel = mapCategoryToListItemGroup(category);\n this.#categoriesActionListItemGroupMap.set(\n category.name,\n categoryListBoxModel\n );\n category.types.forEach(type => {\n const isSelected = type.selected;\n if (isSelected) {\n // For setting focus\n this.#selectedDataTypeIds.categoryId = category.name;\n this.#selectedDataTypeIds.dataTypeId = type.name;\n }\n\n this.#dataTypeCategoryMap.set(type.name, category.id);\n this.#dataTypeDataIdMap.set(type.name, {\n id: category.id,\n name: type.name,\n icon: type.icon,\n selected: type.selected\n });\n });\n });\n this.loading = false;\n this.#showAllObjects();\n this.categoriesJustChanged = true;\n }\n\n /**\n * Callback invoked when the user has selected an item type\n */\n @Prop() readonly dataTypeSelectedCallback: DataTypeSelectedCallback;\n\n /**\n * Defines the type of focus applied when the component renders for the first time.\n */\n @Prop() readonly arrowUpOnFirstElement: ArrowFirstOnFirstElement;\n\n /**\n * Defines the type of focus applied when the component renders for the first time.\n */\n @Prop() readonly focusType: \"first-element\" | \"selected\" = \"first-element\";\n\n /**\n * All recently used types list\n */\n @Prop() readonly recentlyUsed: DataTypeData[] = [];\n @Watch(\"recentlyUsed\")\n recentlyUsedChanged(newRecentlyUsed: DataTypeData[]) {\n this.recentlyUsedActionListModel = null;\n this.recentlyUsedActionListModel = mapDataTypesToList(newRecentlyUsed);\n }\n\n async componentWillLoad() {\n this.#_componentLocale = await Locale.getComponentStrings(this.el);\n // initialize models\n this.recentlyUsed.length && this.recentlyUsedChanged(this.recentlyUsed);\n }\n\n #evaluateSelectionChanged = (path: EventTarget[]) => {\n const chActionListItem = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-ITEM\"\n );\n if (chActionListItem) {\n const id = (chActionListItem as HTMLElement).id;\n const dataTypeData = this.#dataTypeDataIdMap.get(id);\n this.dataTypeSelectedCallback(dataTypeData);\n }\n };\n\n #listKeyDownHandler = (event: KeyboardEvent) => {\n const pressedKey = event.key;\n const path = event.composedPath();\n\n if (pressedKey === ARROW_UP_KEY || pressedKey === ARROW_DOWN_KEY) {\n this.#lastArrowKey = pressedKey;\n\n if (pressedKey === ARROW_UP_KEY) {\n // Check if this is the first group. IF it is, let the host know,\n // so it can close the dialog.\n\n const chActionListItem = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-ITEM\"\n );\n\n if (chActionListItem !== undefined) {\n return;\n }\n\n // This is a ch-action-list-group\n const actionGroup = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-GROUP\"\n );\n const currentFocusedActionGroupId = (actionGroup as HTMLElement).id;\n\n const firstActionListGroupId =\n this.#actionListEl.shadowRoot.firstElementChild.id;\n\n if (currentFocusedActionGroupId === firstActionListGroupId) {\n this.arrowUpOnFirstElement();\n }\n }\n } else if (pressedKey === ENTER_KEY) {\n this.#evaluateSelectionChanged(path);\n } else if (pressedKey === TAB_KEY) {\n event.stopPropagation();\n }\n };\n\n #listClickHandler = (event: MouseEvent) => {\n if (this.#lastArrowKey) {\n // User navigated with ArrowUp or ArrowDown\n // Ignore, since this was not a click event.\n } else if (event.detail === 0) {\n // ignore keyboard Enter (Enter happens by default on buttons on onClick)\n return;\n } else {\n const path = event.composedPath();\n this.#evaluateSelectionChanged(path);\n }\n this.#lastArrowKey = null;\n };\n\n #showAllObjects = () => {\n if (!this.#showAll) {\n const allCategoriesActionListModel: ActionListItemModel[] = [];\n let counter = 1;\n const mapLength = this.#categoriesActionListItemGroupMap.size;\n for (const key of this.#categoriesActionListItemGroupMap.keys()) {\n allCategoriesActionListModel.push(\n this.#categoriesActionListItemGroupMap.get(key)\n );\n if (counter !== mapLength) {\n allCategoriesActionListModel.push({ type: \"separator\" });\n }\n counter++;\n }\n this.categoriesListBoxModel = allCategoriesActionListModel;\n this.#showAll = true;\n this.selectedCategory = ALL_CATEGORY_ID;\n }\n };\n\n #showRecentlyObjects = () => {\n this.#showAll = false;\n this.categoriesListBoxModel = this.recentlyUsedActionListModel;\n this.selectedCategory = RECENTLY_USED_CATEGORY_ID;\n };\n\n private selectedCategoryHandler = (e: MouseEvent) => {\n this.selectedCategory = (e.currentTarget as HTMLButtonElement).dataset.name;\n const newSelectedCategory = [\n this.#categoriesActionListItemGroupMap.get(this.selectedCategory)\n ];\n this.categoriesListBoxModel = newSelectedCategory;\n this.#showAll = false;\n };\n\n #handleButtonTab = (event: KeyboardEvent) => {\n // Prevents bubbling, which causes this component to close, due to how the IDE handles Tab event\n // in a parent element.\n if (event.key === TAB_KEY || event.key === ENTER_KEY) {\n event.stopPropagation();\n }\n };\n\n #renderFooter = () => {\n const recentlyUsedBtnClass =\n this.selectedCategory === RECENTLY_USED_CATEGORY_ID\n ? \"button-secondary\"\n : \"button-tertiary\";\n const allBtnClass =\n this.selectedCategory === ALL_CATEGORY_ID\n ? \"button-secondary\"\n : \"button-tertiary\";\n let selectedCategoryDescription = this.selectedCategory;\n if (this.selectedCategory === RECENTLY_USED_CATEGORY_ID) {\n selectedCategoryDescription =\n this.#_componentLocale.fixedTypes.recentlyUsed;\n } else if (this.selectedCategory === ALL_CATEGORY_ID) {\n selectedCategoryDescription = this.#_componentLocale.fixedTypes.all;\n } else {\n selectedCategoryDescription = this.selectedCategory;\n }\n\n return (\n <footer\n class=\"footer control-footer control-footer-start scrollable\n \"\n >\n <div class=\"buttons-spacer\">\n {this.recentlyUsed && this.recentlyUsed.length > 0 && (\n <button\n class={`button-icon-only ${recentlyUsedBtnClass}`}\n aria-label={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.recentlyUsed\n }`}\n title={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.recentlyUsed\n }`}\n onClick={this.#showRecentlyObjects}\n onKeyDown={this.#handleButtonTab}\n >\n <ch-image class=\"icon-md\" src={CLOCK_ICON}></ch-image>\n </button>\n )}\n <button\n class={`button-icon-only ${allBtnClass}`}\n onClick={this.#showAllObjects}\n onKeyDown={this.#handleButtonTab}\n aria-label={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.all\n }`}\n title={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.all\n }`}\n >\n [*]\n </button>\n {this.categories.map(category => {\n const buttonClass =\n category.name === this.selectedCategory\n ? \"button-secondary\"\n : \"button-tertiary\";\n\n return (\n <button\n class={`button-icon-only ${buttonClass}`}\n aria-label={category.name}\n title={category.name}\n onClick={this.selectedCategoryHandler}\n onKeyDown={this.#handleButtonTab}\n data-name={category.name}\n >\n <ch-image class=\"icon-md\" src={category.icon}></ch-image>\n </button>\n );\n })}\n </div>\n <p class=\"body-regular-s selected-category\">\n {selectedCategoryDescription}\n </p>\n </footer>\n );\n };\n\n #setFocus = async () => {\n if (this.#focusAlreadySet) {\n return;\n }\n let focusableElement: HTMLElement;\n\n setTimeout(() => {\n // setTimeout as a WA, since the list-box elements are not rendered/read immediatelly\n if (\n this.focusType === \"selected\" &&\n this.#selectedDataTypeIds.categoryId &&\n this.#selectedDataTypeIds.dataTypeId\n ) {\n // set focus on the selected element\n const selectedDataTypeEl = this.#actionListEl.shadowRoot.getElementById(\n this.#selectedDataTypeIds.dataTypeId\n );\n if (selectedDataTypeEl) {\n focusableElement = selectedDataTypeEl;\n }\n } else {\n // set focus of the first element\n const firstActionListGroup =\n this.#actionListEl.shadowRoot.firstElementChild;\n\n const firstButton = firstActionListGroup.shadowRoot.firstElementChild;\n focusableElement = firstButton as HTMLButtonElement;\n }\n\n focusableElement && (focusableElement as HTMLElement).focus();\n this.#focusAlreadySet = true;\n }, 150);\n };\n\n render(): void {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n {this.loading ? (\n <gx-ide-loader\n loaderTitle={this.#_componentLocale.loader.title}\n description={this.#_componentLocale.loader.description}\n show\n ></gx-ide-loader>\n ) : (\n <section class=\"main\">\n <ch-action-list-render\n ref={async el => {\n this.#actionListEl = el as HTMLChActionListRenderElement;\n this.#setFocus();\n }}\n class=\"list-box\"\n model={this.categoriesListBoxModel}\n selection=\"single\"\n onKeyDown={this.#listKeyDownHandler}\n onClick={this.#listClickHandler}\n ></ch-action-list-render>\n {this.#renderFooter()}\n </section>\n )}\n </Host>\n );\n }\n}\n\nexport type DataTypeCategoryData = {\n id: string;\n name: string;\n icon: string;\n types: DataTypeData[];\n};\nexport type DataTypeData = {\n id: string;\n name: string;\n icon: string;\n selected: boolean;\n};\n\nexport type DataTypeSelectedCallback = (data: DataTypeData) => Promise<void>;\n\ntype SelectedDataTypeIds = {\n categoryId: string;\n dataTypeId: string;\n};\n\nexport type ArrowFirstOnFirstElement = () => Promise<void>;\n"],"mappings":";;;;;;AAMO,MAAMA,6BACXC;EAEA,MAAMC,IAAqC;IACzCC,SAASF,EAASG;IAClBC,IAAIJ,EAASG;IACbE,MAAM;IACNC,UAAU;IACVC,YAAY;IACZC,OAAOR,EAASS,MAAMC,KAAIL,MACjB;MACLH,SAASG,EAAKF;MACdC,IAAIC,EAAKF;MACTQ,UAAUN,EAAKM;MACfC,uBAAuB;QACrB,iBAAiB;UACfC,QAAQ,EAAC;YAAEC,QAAQT,EAAKU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mC;IACE,OACEjC,EAACkC,GAAI;MAACjC,OAAM;OACVD,EAAA;MAAUmC,OAAO9G;QAChBa,KAAKwF,UACJ1B,EAAA;MACEoC,aAAa/E,EAAAnB,MAAIF,GAAA,KAAmBqG,OAAOjC;MAC3CkC,aAAajF,EAAAnB,MAAIF,GAAA,KAAmBqG,OAAOC;MAC3CC,MAAI;SAGNvC,EAAA;MAASC,OAAM;OACbD,EAAA;MACEwC,KAAK7B,MAAMzD;QACTW,EAAA3B,MAAIW,GAAiBK,GAAmC;QACxDG,EAAAnB,MAAIwE,GAAA,KAAUtC,KAAdlC;AAAgB;MAElB+D,OAAM;MACNkC,OAAOjG,KAAK6C;MACZ0D,WAAU;MACVnC,WAAWjD,EAAAnB,MAAIsB,GAAA;MACf6C,SAAShD,EAAAnB,MAAIoC,GAAA;QAEdjB,EAAAnB,MAAIuD,GAAA,KAAcrB,KAAlBlC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genexus/genexus-ide-ui",
3
3
  "license": "Apache-2.0",
4
- "version": "1.1.15",
4
+ "version": "1.1.16",
5
5
  "description": "GeneXus IDE UI components",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.js",
@@ -1 +0,0 @@
1
- {"version":3,"names":["mapCategoryToListItemGroup","category","categoryGroup","caption","name","id","type","expanded","expandable","items","types","map","selected","additionalInformation","center","imgSrc","icon","mapDataTypesToList","dataTypes","dataType","index","undefined","order","dataTypeSelectorCss","CSS_BUNDLES","ARROW_UP_KEY","ARROW_DOWN_KEY","ENTER_KEY","TAB_KEY","ALL_CATEGORY_ID","RECENTLY_USED_CATEGORY_ID","CLOCK_ICON","getIconPath","colorType","GxIdeKbManagerImport","_GxIdeKbManagerImport__componentLocale","set","this","_GxIdeKbManagerImport_showAll","_GxIdeKbManagerImport_categoriesActionListItemGroupMap","Map","_GxIdeKbManagerImport_dataTypeCategoryMap","_GxIdeKbManagerImport_dataTypeDataIdMap","_GxIdeKbManagerImport_lastArrowKey","_GxIdeKbManagerImport_selectedDataTypeIds","categoryId","dataTypeId","_GxIdeKbManagerImport_focusAlreadySet","_GxIdeKbManagerImport_actionListEl","_GxIdeKbManagerImport_evaluateSelectionChanged","path","chActionListItem","find","el","tagName","dataTypeData","__classPrivateFieldGet","get","dataTypeSelectedCallback","_GxIdeKbManagerImport_listKeyDownHandler","event","pressedKey","key","composedPath","__classPrivateFieldSet","actionGroup","currentFocusedActionGroupId","firstActionListGroupId","shadowRoot","firstElementChild","arrowUpOnFirstElement","call","stopPropagation","_GxIdeKbManagerImport_listClickHandler","detail","_GxIdeKbManagerImport_showAllObjects","allCategoriesActionListModel","counter","mapLength","size","keys","push","categoriesListBoxModel","selectedCategory","_GxIdeKbManagerImport_showRecentlyObjects","recentlyUsedActionListModel","selectedCategoryHandler","e","currentTarget","dataset","newSelectedCategory","_GxIdeKbManagerImport_handleButtonTab","_GxIdeKbManagerImport_renderFooter","recentlyUsedBtnClass","allBtnClass","selectedCategoryDescription","fixedTypes","recentlyUsed","all","h","class","length","select","title","onClick","onKeyDown","src","categories","buttonClass","_GxIdeKbManagerImport_setFocus","async","focusableElement","setTimeout","focusType","selectedDataTypeEl","getElementById","firstActionListGroup","firstButton","focus","categoriesChanged","newCategories","clear","forEach","categoryListBoxModel","isSelected","loading","categoriesJustChanged","recentlyUsedChanged","newRecentlyUsed","componentWillLoad","Locale","getComponentStrings","render","Host","model","loaderTitle","loader","description","show","ref","selection"],"sources":["src/components/data-type-selector/helpers.ts","src/components/data-type-selector/data-type-selector.scss?tag=gx-ide-data-type-selector&encapsulation=shadow","src/components/data-type-selector/data-type-selector.tsx"],"sourcesContent":["import { DataTypeCategoryData, DataTypeData } from \"./data-type-selector\";\nimport {\n ActionListItemGroup,\n ActionListModel\n} from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\n\nexport const mapCategoryToListItemGroup = (\n category: DataTypeCategoryData\n): ActionListItemGroup => {\n const categoryGroup: ActionListItemGroup = {\n caption: category.name,\n id: category.name,\n type: \"group\",\n expanded: true,\n expandable: true,\n items: category.types.map(type => {\n return {\n caption: type.name,\n id: type.name,\n selected: type.selected,\n additionalInformation: {\n \"stretch-start\": {\n center: [{ imgSrc: type.icon }]\n }\n },\n type: \"actionable\"\n };\n })\n };\n return categoryGroup;\n};\n\nexport const mapDataTypesToList = (\n dataTypes: DataTypeData[]\n): ActionListModel => {\n return dataTypes.map((dataType, index) => {\n return {\n caption: dataType.name,\n id: dataType.name,\n selected: dataType.selected,\n additionalInformation: {\n \"stretch-start\": {\n center: [{ imgSrc: dataType.icon || undefined }]\n }\n },\n type: \"actionable\",\n order: index\n };\n });\n};\n",":host {\n position: relative;\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr max-content;\n\n // WA: Prevent a custom css rule on genexus-web from overriding --control__border-width value.\n // TDOO: remove this when the custom style is removed from genexus-web.\n // custom stlye is: .gx-struct-editor .tabular-grid-cell {\n // --control__border-width: 0;\n // }\n\n --control__border-width: var(--mer-border__width--sm);\n --control__border-radius: var(--mer-border__radius--sm);\n}\n\n.main {\n display: contents;\n}\n\n.selected-category {\n margin: 0;\n text-transform: capitalize;\n margin-inline-start: var(\n --mer-spacing--md\n ); // TODO: Create a semantic class in Mercury for this case.\n white-space: nowrap;\n}\n\n.footer {\n overflow: auto;\n padding: var(--mer-spacing--xs);\n}\n","// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n// Other Libraries\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\nimport {\n ActionListItemModel,\n ActionListModel\n} from \"@genexus/chameleon-controls-library\";\nimport { ActionListItemGroup } from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\n// Gx Ide Ui\nimport { Locale } from \"../../common/locale\";\nimport { mapCategoryToListItemGroup, mapDataTypesToList } from \"./helpers\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/list-box\",\n \"utils/form--full\",\n \"utils/typography\",\n \"utils/layout\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst ARROW_UP_KEY = \"ArrowUp\";\nconst ARROW_DOWN_KEY = \"ArrowDown\";\nconst ENTER_KEY = \"Enter\";\nconst TAB_KEY = \"Tab\";\n\nconst ALL_CATEGORY_ID = \"all\";\nconst RECENTLY_USED_CATEGORY_ID = \"recenttly-used\";\n\nconst CLOCK_ICON = getIconPath({\n category: \"system\",\n name: \"time\",\n colorType: \"primary\"\n});\n\n@Component({\n tag: \"gx-ide-data-type-selector\",\n styleUrl: \"data-type-selector.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/data-type-selector\"]\n})\nexport class GxIdeKbManagerImport {\n #_componentLocale: any;\n #showAll: boolean = false;\n #categoriesActionListItemGroupMap: Map<string, ActionListItemGroup> = new Map<\n string,\n ActionListItemGroup\n >();\n\n #dataTypeCategoryMap: Map<string, string> = new Map<string, string>();\n #dataTypeDataIdMap: Map<string, DataTypeData> = new Map<\n string,\n DataTypeData\n >();\n #lastArrowKey: typeof ARROW_UP_KEY | typeof ARROW_DOWN_KEY | null = null;\n #selectedDataTypeIds: SelectedDataTypeIds = {\n // For setting focus\n categoryId: undefined,\n dataTypeId: undefined\n };\n #focusAlreadySet: boolean = false;\n\n #actionListEl!: HTMLChActionListRenderElement;\n @Element() el: HTMLGxIdeDataTypeSelectorElement;\n\n @State() categoriesListBoxModel: ActionListItemModel[] = [];\n @State() selectedCategory: string;\n @State() recentlyUsedActionListModel: ActionListModel = [];\n @State() loading: boolean = true;\n @State() categoriesJustChanged: boolean = false;\n @State() actionListDidRender: boolean = false;\n\n /**\n * All possible types and its category\n */\n @Prop() readonly categories: DataTypeCategoryData[] = undefined;\n @Watch(\"categories\")\n categoriesChanged(newCategories: DataTypeCategoryData[]) {\n if (!newCategories?.length) {\n return;\n }\n\n this.#categoriesActionListItemGroupMap.clear();\n newCategories.forEach(category => {\n const categoryListBoxModel = mapCategoryToListItemGroup(category);\n this.#categoriesActionListItemGroupMap.set(\n category.name,\n categoryListBoxModel\n );\n category.types.forEach(type => {\n const isSelected = type.selected;\n if (isSelected) {\n // For setting focus\n this.#selectedDataTypeIds.categoryId = category.name;\n this.#selectedDataTypeIds.dataTypeId = type.name;\n }\n\n this.#dataTypeCategoryMap.set(type.name, category.id);\n this.#dataTypeDataIdMap.set(type.name, {\n id: category.id,\n name: type.name,\n icon: type.icon,\n selected: type.selected\n });\n });\n });\n this.loading = false;\n this.#showAllObjects();\n this.categoriesJustChanged = true;\n }\n\n /**\n * Callback invoked when the user has selected an item type\n */\n @Prop() readonly dataTypeSelectedCallback: DataTypeSelectedCallback;\n\n /**\n * Defines the type of focus applied when the component renders for the first time.\n */\n @Prop() readonly arrowUpOnFirstElement: ArrowFirstOnFirstElement;\n\n /**\n * Defines the type of focus applied when the component renders for the first time.\n */\n @Prop() readonly focusType: \"first-element\" | \"selected\" = \"first-element\";\n\n /**\n * All recently used types list\n */\n @Prop() readonly recentlyUsed: DataTypeData[] = [];\n @Watch(\"recentlyUsed\")\n recentlyUsedChanged(newRecentlyUsed: DataTypeData[]) {\n this.recentlyUsedActionListModel = null;\n this.recentlyUsedActionListModel = mapDataTypesToList(newRecentlyUsed);\n }\n\n async componentWillLoad() {\n this.#_componentLocale = await Locale.getComponentStrings(this.el);\n // initialize models\n this.recentlyUsed.length && this.recentlyUsedChanged(this.recentlyUsed);\n }\n\n #evaluateSelectionChanged = (path: EventTarget[]) => {\n const chActionListItem = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-ITEM\"\n );\n if (chActionListItem) {\n const id = (chActionListItem as HTMLElement).id;\n const dataTypeData = this.#dataTypeDataIdMap.get(id);\n this.dataTypeSelectedCallback(dataTypeData);\n }\n };\n\n #listKeyDownHandler = (event: KeyboardEvent) => {\n const pressedKey = event.key;\n const path = event.composedPath();\n\n if (pressedKey === ARROW_UP_KEY || pressedKey === ARROW_DOWN_KEY) {\n this.#lastArrowKey = pressedKey;\n\n if (pressedKey === ARROW_UP_KEY) {\n // Check if this is the first group. IF it is, let the host know,\n // so it can close the dialog.\n\n const chActionListItem = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-ITEM\"\n );\n\n if (chActionListItem !== undefined) {\n return;\n }\n\n // This is a ch-action-list-group\n const actionGroup = path.find(\n el => (el as HTMLElement).tagName === \"CH-ACTION-LIST-GROUP\"\n );\n const currentFocusedActionGroupId = (actionGroup as HTMLElement).id;\n\n const firstActionListGroupId =\n this.#actionListEl.shadowRoot.firstElementChild.id;\n\n if (currentFocusedActionGroupId === firstActionListGroupId) {\n this.arrowUpOnFirstElement();\n }\n }\n } else if (pressedKey === ENTER_KEY) {\n this.#evaluateSelectionChanged(path);\n } else if (pressedKey === TAB_KEY) {\n event.stopPropagation();\n }\n };\n\n #listClickHandler = (event: MouseEvent) => {\n if (this.#lastArrowKey) {\n // User navigated with ArrowUp or ArrowDown\n // Ignore, since this was not a click event.\n } else if (event.detail === 0) {\n // ignore keyboard Enter (Enter happens by default on buttons on onClick)\n return;\n } else {\n const path = event.composedPath();\n this.#evaluateSelectionChanged(path);\n }\n this.#lastArrowKey = null;\n };\n\n #showAllObjects = () => {\n if (!this.#showAll) {\n const allCategoriesActionListModel: ActionListItemModel[] = [];\n let counter = 1;\n const mapLength = this.#categoriesActionListItemGroupMap.size;\n for (const key of this.#categoriesActionListItemGroupMap.keys()) {\n allCategoriesActionListModel.push(\n this.#categoriesActionListItemGroupMap.get(key)\n );\n if (counter !== mapLength) {\n allCategoriesActionListModel.push({ type: \"separator\" });\n }\n counter++;\n }\n this.categoriesListBoxModel = allCategoriesActionListModel;\n this.#showAll = true;\n this.selectedCategory = ALL_CATEGORY_ID;\n }\n };\n\n #showRecentlyObjects = () => {\n this.#showAll = false;\n this.categoriesListBoxModel = this.recentlyUsedActionListModel;\n this.selectedCategory = RECENTLY_USED_CATEGORY_ID;\n };\n\n private selectedCategoryHandler = (e: MouseEvent) => {\n this.selectedCategory = (e.currentTarget as HTMLButtonElement).dataset.name;\n const newSelectedCategory = [\n this.#categoriesActionListItemGroupMap.get(this.selectedCategory)\n ];\n this.categoriesListBoxModel = newSelectedCategory;\n this.#showAll = false;\n };\n\n #handleButtonTab = (event: KeyboardEvent) => {\n // Prevents bubbling, which causes this component to close, due to how the IDE handles Tab event\n // in a parent element.\n if (event.key === TAB_KEY || event.key === ENTER_KEY) {\n event.stopPropagation();\n }\n };\n\n #renderFooter = () => {\n const recentlyUsedBtnClass =\n this.selectedCategory === RECENTLY_USED_CATEGORY_ID\n ? \"button-secondary\"\n : \"button-tertiary\";\n const allBtnClass =\n this.selectedCategory === ALL_CATEGORY_ID\n ? \"button-secondary\"\n : \"button-tertiary\";\n let selectedCategoryDescription = this.selectedCategory;\n if (this.selectedCategory === RECENTLY_USED_CATEGORY_ID) {\n selectedCategoryDescription =\n this.#_componentLocale.fixedTypes.recentlyUsed;\n } else if (this.selectedCategory === ALL_CATEGORY_ID) {\n selectedCategoryDescription = this.#_componentLocale.fixedTypes.all;\n } else {\n selectedCategoryDescription = this.selectedCategory;\n }\n\n return (\n <footer\n class=\"footer control-footer control-footer-start scrollable\n \"\n >\n <div class=\"buttons-spacer\">\n {this.recentlyUsed && this.recentlyUsed.length > 0 && (\n <button\n class={`button-icon-only ${recentlyUsedBtnClass}`}\n aria-label={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.recentlyUsed\n }`}\n title={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.recentlyUsed\n }`}\n onClick={this.#showRecentlyObjects}\n onKeyDown={this.#handleButtonTab}\n >\n <ch-image class=\"icon-md\" src={CLOCK_ICON}></ch-image>\n </button>\n )}\n <button\n class={`button-icon-only ${allBtnClass}`}\n onClick={this.#showAllObjects}\n onKeyDown={this.#handleButtonTab}\n aria-label={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.all\n }`}\n title={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.all\n }`}\n >\n [*]\n </button>\n {this.categories.map(category => {\n const buttonClass =\n category.name === this.selectedCategory\n ? \"button-secondary\"\n : \"button-tertiary\";\n\n return (\n <button\n class={`button-icon-only ${buttonClass}`}\n aria-label={category.name}\n title={category.name}\n onClick={this.selectedCategoryHandler}\n onKeyDown={this.#handleButtonTab}\n data-name={category.name}\n >\n <ch-image class=\"icon-md\" src={category.icon}></ch-image>\n </button>\n );\n })}\n </div>\n <p class=\"body-regular-s selected-category\">\n {selectedCategoryDescription}\n </p>\n </footer>\n );\n };\n\n #setFocus = async () => {\n if (this.#focusAlreadySet) {\n return;\n }\n let focusableElement: HTMLElement;\n\n setTimeout(() => {\n // setTimeout as a WA, since the list-box elements are not rendered/read immediatelly\n if (\n this.focusType === \"selected\" &&\n this.#selectedDataTypeIds.categoryId &&\n this.#selectedDataTypeIds.dataTypeId\n ) {\n // set focus on the selected element\n const selectedDataTypeEl = this.#actionListEl.shadowRoot.getElementById(\n this.#selectedDataTypeIds.dataTypeId\n );\n if (selectedDataTypeEl) {\n focusableElement = selectedDataTypeEl;\n }\n } else {\n // set focus of the first element\n const firstActionListGroup =\n this.#actionListEl.shadowRoot.firstElementChild;\n\n const firstButton = firstActionListGroup.shadowRoot.firstElementChild;\n focusableElement = firstButton as HTMLButtonElement;\n }\n\n focusableElement && (focusableElement as HTMLElement).focus();\n this.#focusAlreadySet = true;\n }, 150);\n };\n\n render(): void {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n {this.loading ? (\n <gx-ide-loader\n loaderTitle={this.#_componentLocale.loader.title}\n description={this.#_componentLocale.loader.description}\n show\n ></gx-ide-loader>\n ) : (\n <section class=\"main\">\n <ch-action-list-render\n ref={async el => {\n this.#actionListEl = el as HTMLChActionListRenderElement;\n this.#setFocus();\n }}\n class=\"list-box\"\n model={this.categoriesListBoxModel}\n selection=\"single\"\n onKeyDown={this.#listKeyDownHandler}\n onClick={this.#listClickHandler}\n ></ch-action-list-render>\n {this.#renderFooter()}\n </section>\n )}\n </Host>\n );\n }\n}\n\nexport type DataTypeCategoryData = {\n id: string;\n name: string;\n icon: string;\n types: DataTypeData[];\n};\nexport type DataTypeData = {\n id: string;\n name: string;\n icon: string;\n selected: boolean;\n};\n\nexport type DataTypeSelectedCallback = (data: DataTypeData) => Promise<void>;\n\ntype SelectedDataTypeIds = {\n categoryId: string;\n dataTypeId: string;\n};\n\nexport type ArrowFirstOnFirstElement = () => Promise<void>;\n"],"mappings":";;;;;;AAMO,MAAMA,6BACXC;EAEA,MAAMC,IAAqC;IACzCC,SAASF,EAASG;IAClBC,IAAIJ,EAASG;IACbE,MAAM;IACNC,UAAU;IACVC,YAAY;IACZC,OAAOR,EAASS,MAAMC,KAAIL,MACjB;MACLH,SAASG,EAAKF;MACdC,IAAIC,EAAKF;MACTQ,UAAUN,EAAKM;MACfC,uBAAuB;QACrB,iBAAiB;UACfC,QAAQ,EAAC;YAAEC,QAAQT,EAAKU;;;;MAG5BV,MAAM;;;EAIZ,OAAOJ;AAAa;;AAGf,MAAMe,qBACXC,KAEOA,EAAUP,KAAI,CAACQ,GAAUC,OACvB;EACLjB,SAASgB,EAASf;EAClBC,IAAIc,EAASf;EACbQ,UAAUO,EAASP;EACnBC,uBAAuB;IACrB,iBAAiB;MACfC,QAAQ,EAAC;QAAEC,QAAQI,EAASH,QAAQK;;;;EAGxCf,MAAM;EACNgB,OAAOF;;;AC9Cb,MAAMG,IAAsB;;;;;;;;;;;;;;;;;ACa5B,MAAMC,IAA8B,EAClC,qBACA,uBACA,oBACA,oBACA,gBACA,iBACA;;AAGF,MAAMC,IAAe;;AACrB,MAAMC,IAAiB;;AACvB,MAAMC,IAAY;;AAClB,MAAMC,IAAU;;AAEhB,MAAMC,IAAkB;;AACxB,MAAMC,IAA4B;;AAElC,MAAMC,IAAaC,EAAY;EAC7B/B,UAAU;EACVG,MAAM;EACN6B,WAAW;;;MASAC,IAAoB;;;IAC/BC,EAAAC,IAAAC,WAAA;IACAC,EAAAF,IAAAC,MAAoB;IAC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