@genexus/genexus-ide-ui 1.0.44 → 1.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-entity-selector.cjs.entry.js +3 -1
- package/dist/cjs/gx-ide-entity-selector.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-ww-attributes.cjs.entry.js +244 -0
- package/dist/cjs/gx-ide-ww-attributes.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/_helpers/entity-selector/entity-selector.js +4 -2
- package/dist/collection/components/_helpers/entity-selector/entity-selector.js.map +1 -1
- package/dist/collection/components/ww-attributes/gx-ide-assets/ww-attributes/langs/ww-attributes.lang.en.json +30 -0
- package/dist/collection/components/ww-attributes/gx-ide-assets/ww-attributes/langs/ww-attributes.lang.ja.json +30 -0
- package/dist/collection/components/ww-attributes/gx-ide-assets/ww-attributes/langs/ww-attributes.lang.zh.json +30 -0
- package/dist/collection/components/ww-attributes/helpers.js +11 -0
- package/dist/collection/components/ww-attributes/helpers.js.map +1 -0
- package/dist/collection/components/ww-attributes/ww-attributes.css +70 -0
- package/dist/collection/components/ww-attributes/ww-attributes.js +468 -0
- package/dist/collection/components/ww-attributes/ww-attributes.js.map +1 -0
- package/dist/collection/testing/locale.e2e.js +1 -0
- package/dist/collection/testing/locale.e2e.js.map +1 -1
- package/dist/components/entity-selector.js +3 -1
- package/dist/components/entity-selector.js.map +1 -1
- package/dist/components/gx-ide-ww-attributes.d.ts +11 -0
- package/dist/components/gx-ide-ww-attributes.js +294 -0
- package/dist/components/gx-ide-ww-attributes.js.map +1 -0
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-entity-selector.entry.js +3 -1
- package/dist/esm/gx-ide-entity-selector.entry.js.map +1 -1
- package/dist/esm/gx-ide-ww-attributes.entry.js +240 -0
- package/dist/esm/gx-ide-ww-attributes.entry.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/ww-attributes/langs/ww-attributes.lang.en.json +30 -0
- package/dist/genexus-ide-ui/gx-ide-assets/ww-attributes/langs/ww-attributes.lang.ja.json +30 -0
- package/dist/genexus-ide-ui/gx-ide-assets/ww-attributes/langs/ww-attributes.lang.zh.json +30 -0
- package/dist/genexus-ide-ui/{p-04d7f44c.entry.js → p-1693a2d1.entry.js} +4 -2
- package/dist/genexus-ide-ui/p-1693a2d1.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-5619120d.entry.js +341 -0
- package/dist/genexus-ide-ui/p-5619120d.entry.js.map +1 -0
- package/dist/types/components/_helpers/entity-selector/entity-selector.d.ts +1 -1
- package/dist/types/components/ww-attributes/helpers.d.ts +3 -0
- package/dist/types/components/ww-attributes/ww-attributes.d.ts +95 -0
- package/dist/types/components.d.ts +99 -12
- package/package.json +1 -1
- package/dist/genexus-ide-ui/p-04d7f44c.entry.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["mapOptionsToComboBoxItemModel","options","map","option","value","id","caption","label","startImgSrc","_a","iconName","wwAttributesCss","CSS_BUNDLES","FILTER_ICON","getIconPath","category","name","colorType","GxIdeWWAttributes","_GxIdeWWAttributes__componentLocale","set","this","_GxIdeWWAttributes_chGridEl","_GxIdeWWAttributes_contextMenuCallbackHandler","ev","contextMenuCallback","selection","selectedAttributesIds","clientX","clientY","_GxIdeWWAttributes_deleteSelectionCallbackHandle","deleteSelectionCallback","_GxIdeWWAttributes_deselectAll","__classPrivateFieldGet","selectAllRows","_GxIdeWWAttributes_getAttributes","loading","filters","trim","type","object","loadCallback","then","items","attributes","length","call","_GxIdeWWAttributes_listenChanges","addEventListener","detail","rowsId","selectionChangeCallback","preventDefault","stopPropagation","_GxIdeWWAttributes_openSelectionCallbackHandle","openSelectionCallback","_GxIdeWWAttributes_entityCallbackHandler","async","result","objectActionCallback","iconSrc","Promise","resolve","_GxIdeWWAttributes_entityValueChangedHandler","event","_GxIdeWWAttributes_renderAttributesGrid","tabularGridEmpty","h","class","main","ref","el","__classPrivateFieldSet","part","settingable","size","config","tabularGrid","colSize","maxContent","tableHead","auto","description","_GxIdeWWAttributes_evaluateAttributesGridContent","loaderTitle","loader","title","show","attr","rowid","src","icon","stateIconSrc","stateTitle","emptyStateTitle","isAnimated","_GxIdeWWAttributes_renderFilter","htmlFor","filter","debounce","onInput","_GxIdeWWAttributes_nameInputHandler","disabled","types","model","_GxIdeWWAttributes_typeInputHandler","labelPosition","defaultValue","selectEntityCallback","onValueChanged","_GxIdeWWAttributes_selectAll","e","componentWillLoad","Locale","getComponentStrings","componentDidLoad","keyDownHandler","eventInfo","document","activeElement","key","reload","validate","isValid","render","btnDisabled","matchingAttributesLabel","matchingAttribute","matchingAttributes","attributesLength","_b","Host","onClick","footer","btnSelectAll"],"sources":["src/components/ww-attributes/helpers.tsx","src/components/ww-attributes/ww-attributes.scss?tag=gx-ide-ww-attributes&encapsulation=shadow","src/components/ww-attributes/ww-attributes.tsx"],"sourcesContent":["import { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\nimport { GxOption } from \"../..\";\n\nexport const mapOptionsToComboBoxItemModel = (\n options: GxOption[]\n): ComboBoxModel => {\n return options.map(option => {\n return {\n value: option.id,\n caption: option.label,\n startImgSrc: option.iconName ?? \"\"\n };\n });\n};\n","@import \"../../../node_modules/@genexus/mercury/dist/mercury.scss\"; // for the tabular-grid-cell-layout mixin\n\n$nameInlineSize: 40px;\n$moreBtnInlineSize: 64px;\n\n:host {\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.section {\n display: contents;\n}\n// Header\n.header {\n grid-template:\n \"name type\" max-content\n \"object object\" max-content;\n grid-template-columns: 1fr 1fr;\n}\n.name__field {\n grid-area: name;\n}\n.name__label {\n inline-size: $nameInlineSize;\n}\n.type__field {\n grid-area: type;\n}\n.more__btn {\n grid-area: more;\n inline-size: $moreBtnInlineSize;\n}\n.object-selector__field {\n grid-area: object;\n}\n\n// Main\n.main {\n overflow: auto;\n}\n\nch-tabular-grid.tabular-grid--empty::part(main) {\n // WA to avoid scrollbar flickering when displaying the empty-state message\n overflow: hidden;\n}\nch-tabular-grid-rowset-empty {\n position: relative; // makes this the bounder element for the loader\n}\n\n@include tabular-grid-cell-layout(\n $tabular-grid-selector: \".tabular-grid-row\",\n $tabular-grid-cell-node-type: \"text\",\n $tabular-grid-cell-apply-ellipsis: true,\n $tabular-grid-affected-columns-nth-list: (\n 2,\n 3,\n 4\n )\n);\n\n// WA: remove this when Mercury removes margin from p elements\n.matching-attributes {\n margin: 0;\n}\n","/* eslint-disable @stencil-community/own-props-must-be-private */\n// Stencil\nimport {\n Component,\n Element,\n Host,\n Listen,\n Method,\n Prop,\n State,\n h\n} from \"@stencil/core\";\n// Other Libraries\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\n// Custom Imports\nimport { config } from \"../../common/config\";\nimport { Locale } from \"../../common/locale\";\nimport { ContextMenuInfo, EntityData, GxOption } from \"../../common/types\";\nimport { mapOptionsToComboBoxItemModel } from \"./helpers\";\nimport { ChEditCustomEvent } from \"@genexus/chameleon-controls-library\";\nimport HTMLChTabularGridRowsetElement from \"@genexus/chameleon-controls-library/dist/types/components/tabular-grid/rowset/tabular-grid-rowset\";\nimport { GxIdeEntitySelectorCustomEvent } from \"../../components\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/edit\",\n \"components/combo-box\",\n \"components/tabular-grid\",\n \"components/icon\",\n \"utils/form\",\n \"utils/layout\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst FILTER_ICON = getIconPath({\n category: \"window-tools\",\n name: \"filter\",\n colorType: \"on-elevation\"\n});\n\n@Component({\n tag: \"gx-ide-ww-attributes\",\n styleUrl: \"ww-attributes.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/ww-attributes\"]\n})\nexport class GxIdeWWAttributes {\n /**\n * Component hard-coded strings translations.\n */\n #_componentLocale: any;\n\n @Element() el: HTMLGxIdeWwAttributesElement;\n\n /* References needed to collect data */\n #chGridEl!: HTMLChTabularGridElement;\n\n /**\n * Attributes rendered in the table\n */\n @State() attributes: AttributeData[];\n\n /**\n * Selected attributes in the table of attributes\n */\n @State() selectedAttributesIds: string[] = [];\n\n /**\n * Show or hide advanced filters\n */\n @State() filterMore = false;\n\n /**\n * The attribute filter name\n */\n @State() name: string = \"\";\n\n /**\n * True if loadCallback hasn't been resolved yet\n */\n @State() loading: boolean = true;\n\n /**\n * The attribute object value\n */\n @State() object: EntityData;\n\n /**\n * The attribute filter type value\n */\n @State() type: string;\n\n /**\n * Callback invoked when user right-clicks on the grid\n */\n @Prop() readonly contextMenuCallback!: ContextMenuCallback;\n\n /**\n * Callback invoked when user deletes an object\n */\n @Prop() readonly deleteSelectionCallback!: DeleteSelectionCallback;\n\n /**\n * Callback invoked when user filters the objects\n */\n @Prop() readonly loadCallback!: LoadCallback;\n\n /**\n * Callback invoked when user executes filter action\n */\n @Prop() readonly objectActionCallback!: ObjectActionCallback;\n\n /**\n * Objects rendered in the object selector\n */\n @Prop() readonly objects!: GxOption[];\n\n /**\n * Callback invoked when user opens the selection dialog\n */\n @Prop() readonly openSelectionCallback!: OpenSelectionCallback;\n\n /**\n * Callback invoked when user selects or deselects an object\n */\n @Prop() readonly selectionChangeCallback!: SelectionChangeCallback;\n\n /**\n * Types rendered in the filter type selector\n */\n @Prop() readonly types!: GxOption[];\n\n async componentWillLoad() {\n this.#_componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n componentDidLoad() {\n this.#listenChanges();\n this.type = this.types[0].id; // before #getAttributes\n this.#getAttributes();\n }\n\n @Listen(\"keydown\", { passive: true })\n keyDownHandler(eventInfo: KeyboardEvent) {\n if (document.activeElement === this.el) {\n switch (eventInfo.key) {\n case \"Enter\":\n this.#openSelectionCallbackHandle();\n break;\n case \"Delete\":\n this.#deleteSelectionCallbackHandle();\n break;\n }\n }\n }\n\n /**\n * Reloads the view, refreshing the filters and attributes table.\n */\n @Method()\n async reload(): Promise<void> {\n this.name = \"\";\n this.type = this.types[0].id;\n this.object = null;\n this.#getAttributes();\n }\n\n /**\n * Validate necessary data input\n */\n @Method()\n async validate(): Promise<boolean> {\n const isValid = true;\n return isValid;\n }\n\n #contextMenuCallbackHandler = (ev: MouseEvent): void => {\n this.contextMenuCallback({\n selection: this.selectedAttributesIds,\n clientX: ev.clientX,\n clientY: ev.clientY\n });\n };\n\n #deleteSelectionCallbackHandle = (): void => {\n this.deleteSelectionCallback(this.selectedAttributesIds);\n };\n\n #deselectAll = (): void => {\n (this.#chGridEl as any).selectAllRows(false);\n };\n\n #getAttributes = (): void => {\n this.loading = true;\n const filters: AttributeFiltersData = {\n name: this.name.trim(),\n type: this.type,\n object: this.object?.id\n };\n this.loadCallback(filters).then((items: AttributeData[]) => {\n this.attributes = items;\n if (this.selectedAttributesIds?.length > 0) {\n this.selectedAttributesIds = [];\n this.#deselectAll();\n }\n this.loading = false;\n });\n };\n\n #listenChanges = (): void => {\n // for grid selection\n this.#chGridEl.addEventListener(\"selectionChanged\", (ev: any): void => {\n this.selectedAttributesIds = ev.detail.rowsId;\n this.selectionChangeCallback(this.selectedAttributesIds);\n });\n this.#chGridEl.addEventListener(\"contextmenu\", (ev: MouseEvent): void => {\n ev.preventDefault();\n ev.stopPropagation();\n this.#contextMenuCallbackHandler(ev);\n });\n\n this.#chGridEl.addEventListener(\"rowDoubleClicked\", (): void => {\n this.#openSelectionCallbackHandle();\n });\n };\n\n #openSelectionCallbackHandle = (): void => {\n this.openSelectionCallback(this.selectedAttributesIds);\n };\n\n #entityCallbackHandler = async (): Promise<null> => {\n const result = await this.objectActionCallback();\n this.object = {\n id: result.id,\n name: result.name,\n iconSrc: result.iconSrc\n };\n return new Promise(resolve => {\n resolve(null);\n });\n };\n\n #entityValueChangedHandler = (\n event: GxIdeEntitySelectorCustomEvent<EntityData>\n ) => {\n this.object = event.detail;\n this.#getAttributes();\n };\n\n #renderAttributesGrid = (): Element => {\n const tabularGridEmpty = this.attributes?.length === 0 || !this.attributes;\n return (\n <ch-tabular-grid\n class={{\n \"tabular-grid\": true,\n \"tabular-grid--empty\": tabularGridEmpty,\n \"main\": true\n }}\n ref={(el: HTMLChTabularGridElement) => (this.#chGridEl = el)}\n row-selection-mode=\"multiple\"\n part=\"ch-grid-attributes\"\n >\n <ch-tabular-grid-columnset class=\"tabular-grid-column-set\">\n <ch-tabular-grid-column\n column-name=\"\"\n column-name-position=\"text\"\n settingable={false}\n size={config.tabularGrid.colSize.maxContent}\n class=\"tabular-grid-column\"\n ></ch-tabular-grid-column>\n <ch-tabular-grid-column\n column-name={this.#_componentLocale.tableHead.name}\n column-name-position=\"text\"\n size={config.tabularGrid.colSize.auto}\n class=\"tabular-grid-column\"\n settingable={false}\n ></ch-tabular-grid-column>\n <ch-tabular-grid-column\n column-name={this.#_componentLocale.tableHead.type}\n column-name-position=\"text\"\n class=\"tabular-grid-column\"\n size={config.tabularGrid.colSize.auto}\n settingable={false}\n ></ch-tabular-grid-column>\n <ch-tabular-grid-column\n column-name={this.#_componentLocale.tableHead.description}\n column-name-position=\"text\"\n size={config.tabularGrid.colSize.auto}\n class=\"tabular-grid-column\"\n settingable={false}\n ></ch-tabular-grid-column>\n </ch-tabular-grid-columnset>\n\n {this.#evaluateAttributesGridContent()}\n </ch-tabular-grid>\n );\n };\n\n #evaluateAttributesGridContent = (): HTMLChTabularGridRowsetElement => {\n if (this.loading) {\n return (\n <ch-tabular-grid-rowset class=\"tabular-grid-rowset\">\n <ch-tabular-grid-rowset-empty>\n <gx-ide-loader\n loaderTitle={this.#_componentLocale.loader.title}\n description={this.#_componentLocale.loader.description}\n show\n ></gx-ide-loader>\n </ch-tabular-grid-rowset-empty>\n </ch-tabular-grid-rowset>\n );\n } else if (this.attributes.length) {\n return (\n <ch-tabular-grid-rowset class=\"tabular-grid-rowset\">\n {this.attributes.map((attr: AttributeData) => (\n <ch-tabular-grid-row class=\"tabular-grid-row\" rowid={attr.id}>\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n <ch-image class=\"icon-sm\" src={attr.icon}></ch-image>\n </ch-tabular-grid-cell>\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {attr.name}\n </ch-tabular-grid-cell>\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {attr.type}\n </ch-tabular-grid-cell>\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {attr.description}\n </ch-tabular-grid-cell>\n </ch-tabular-grid-row>\n ))}\n </ch-tabular-grid-rowset>\n );\n } else {\n // filter returned none\n return (\n <ch-tabular-grid-rowset class=\"tabular-grid-rowset\">\n <ch-tabular-grid-rowset-empty>\n <gx-ide-empty-state\n stateIconSrc={FILTER_ICON}\n stateTitle={this.#_componentLocale.emptyStateTitle}\n isAnimated={true}\n ></gx-ide-empty-state>\n </ch-tabular-grid-rowset-empty>\n </ch-tabular-grid-rowset>\n );\n }\n };\n\n #renderFilter = (): Element => {\n return (\n <header class=\"header field-group control-header-with-border spacing-body\">\n <div class=\"field field-inline name__field\">\n <label class=\"label name__label\" htmlFor=\"name\">\n {this.#_componentLocale.filter.name}\n </label>\n <ch-edit\n // Name\n id=\"name\"\n class=\"input\"\n value={this.name}\n debounce={300}\n onInput={this.#nameInputHandler}\n part=\"filter-name\"\n ></ch-edit>\n </div>\n\n <div class=\"field field-inline type__field\">\n <label class=\"label\" htmlFor=\"type\">\n {this.#_componentLocale.filter.type}\n </label>\n <ch-combo-box-render\n // Type\n id=\"type\"\n class=\"combo-box\"\n disabled={!this.types}\n value={this.type}\n model={mapOptionsToComboBoxItemModel(this.types ?? [])}\n part=\"filter-type\"\n onInput={this.#typeInputHandler}\n ></ch-combo-box-render>\n </div>\n\n {/* <button\n // TODO: Check with Design if it maes sense to have a button that toggles only one control.\n // More\n class=\"button-primary more__btn\"\n onClick={this.#showMoreFilter}\n part=\"button button--more-less\"\n >\n {this.filterMore\n ? this.#_componentLocale.filter.btnLess\n : this.#_componentLocale.filter.btnMore}\n </button> */}\n\n <div class=\"field field-inline object-selector__field\">\n <label class=\"label\" htmlFor=\"object-selector\">\n {this.#_componentLocale.filter.object}\n </label>\n <gx-ide-entity-selector\n // Object\n id=\"object-selector\"\n value={this.object}\n labelPosition=\"none\"\n defaultValue={null}\n selectEntityCallback={this.#entityCallbackHandler}\n onValueChanged={this.#entityValueChangedHandler}\n part=\"filter-module-folder\"\n ></gx-ide-entity-selector>\n </div>\n </header>\n );\n };\n\n #selectAll = (): void => {\n (this.#chGridEl as any).selectAllRows();\n };\n\n #nameInputHandler = (e: ChEditCustomEvent<string> | InputEvent) => {\n this.name = (e as ChEditCustomEvent<string>).detail.trim();\n this.#getAttributes();\n };\n\n #typeInputHandler = (e: CustomEvent<string> | InputEvent) => {\n this.type = e.detail as string;\n this.#getAttributes();\n };\n\n render(): void {\n const btnDisabled = !this.attributes || this.attributes.length === 0;\n const matchingAttributesLabel =\n this.attributes?.length === 1\n ? this.#_componentLocale.matchingAttribute\n : this.#_componentLocale.matchingAttributes;\n const attributesLength = this.attributes?.length || 0;\n\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <section class=\"section\">\n {this.#renderFilter()}\n\n {this.#renderAttributesGrid()}\n\n <footer class=\"control-footer control-footer-with-border spacing-body-block-end spacing-body-inline control-footer-space-between\">\n <p class=\"text-body-regular-s matching-attributes\">\n {`${attributesLength} ${matchingAttributesLabel}`}\n </p>\n\n <button\n id=\"button-select-all\"\n class=\"button-primary\"\n onClick={this.#selectAll}\n disabled={btnDisabled}\n part=\"button button--select-all\"\n >\n {this.#_componentLocale.footer.btnSelectAll}\n </button>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type ContextMenuCallback = (\n contextMenuInfo: ContextMenuInfo\n) => Promise<void>;\n\nexport type DeleteSelectionCallback = (ids: string[]) => Promise<void>;\n\nexport type LoadCallback = (\n filters: AttributeFiltersData\n) => Promise<AttributeData[]>;\n\nexport type ObjectActionCallback = () => Promise<EntityData | undefined>;\n\nexport type OpenSelectionCallback = (ids: string[]) => Promise<void>;\n\nexport type SelectionChangeCallback = (ids: string[]) => Promise<void>;\n\nexport interface AttributeData {\n id: string;\n icon: string;\n name: string;\n type: string;\n description: string;\n}\n\nexport interface AttributeFiltersData {\n name?: string;\n type?: string;\n object?: string;\n}\n"],"mappings":";;;;;;;;AAGO,MAAMA,gCACXC,KAEOA,EAAQC,KAAIC;;EACjB,OAAO;IACLC,OAAOD,EAAOE;IACdC,SAASH,EAAOI;IAChBC,cAAaC,IAAAN,EAAOO,cAAQ,QAAAD,WAAA,IAAAA,IAAI;;AACjC;;ACXL,MAAME,IAAkB;;;;;;;;;;;;;;;;;ACuBxB,MAAMC,IAA8B,EAClC,qBACA,qBACA,mBACA,wBACA,2BACA,mBACA,cACA,gBACA,iBACA;;AAGF,MAAMC,IAAcC,EAAY;EAC9BC,UAAU;EACVC,MAAM;EACNC,WAAW;;;MASAC,IAAiB;;;;;eAI5BC,EAAAC,IAAAC,WAAA;+CAKAC,EAAAF,IAAAC,WAAA;IAyHAE,EAAAH,IAAAC,OAA+BG;MAC7BH,KAAKI,oBAAoB;QACvBC,WAAWL,KAAKM;QAChBC,SAASJ,EAAGI;QACZC,SAASL,EAAGK;;AACZ;IAGJC,EAAAV,IAAAC,OAAiC;MAC/BA,KAAKU,wBAAwBV,KAAKM;AAAsB;IAG1DK,EAAAZ,IAAAC,OAAe;MACZY,EAAAZ,MAAIC,GAAA,KAAmBY,cAAc;AAAM;IAG9CC,EAAAf,IAAAC,OAAiB;;MACfA,KAAKe,UAAU;MACf,MAAMC,IAAgC;QACpCrB,MAAMK,KAAKL,KAAKsB;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gBAAU,QAAAnC,WAAA,aAAAA,EAAEoC,YAAW,IACxBZ,EAAAZ,MAAIF,GAAA,KAAmB4G,oBACvB9F,EAAAZ,MAAIF,GAAA,KAAmB6G;IAC7B,MAAMC,MAAmBC,IAAA7G,KAAKuB,gBAAU,QAAAsF,WAAA,aAAAA,EAAErF,WAAU;IAEpD,OACEsB,EAACgE,GAAI;MAAC/D,OAAM;OACVD,EAAA;MAAUqC,OAAO5F;QACjBuD,EAAA;MAASC,OAAM;OACZnC,EAAAZ,MAAI2E,GAAA,KAAclD,KAAlBzB,OAEAY,EAAAZ,MAAI4C,GAAA,KAAsBnB,KAA1BzB,OAED8C,EAAA;MAAQC,OAAM;OACZD,EAAA;MAAGC,OAAM;OACN,GAAG6D,KAAoBH,MAG1B3D,EAAA;MACE9D,IAAG;MACH+D,OAAM;MACNgE,SAASnG,EAAAZ,MAAIyF,GAAA;MACbR,UAAUuB;MACVpD,MAAK;OAEJxC,EAAAZ,MAAIF,GAAA,KAAmBkH,OAAOC"}
|
|
@@ -34,7 +34,7 @@ export declare class GxIdeEntitySelector {
|
|
|
34
34
|
/**
|
|
35
35
|
* Callback invoked when the action button is pressed. Returns the new value.
|
|
36
36
|
*/
|
|
37
|
-
readonly selectEntityCallback: () => Promise<EntityData
|
|
37
|
+
readonly selectEntityCallback: () => Promise<EntityData> | null;
|
|
38
38
|
/**
|
|
39
39
|
* Value currently assigned.
|
|
40
40
|
*/
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { ContextMenuInfo, EntityData, GxOption } from "../../common/types";
|
|
2
|
+
export declare class GxIdeWWAttributes {
|
|
3
|
+
#private;
|
|
4
|
+
el: HTMLGxIdeWwAttributesElement;
|
|
5
|
+
/**
|
|
6
|
+
* Attributes rendered in the table
|
|
7
|
+
*/
|
|
8
|
+
attributes: AttributeData[];
|
|
9
|
+
/**
|
|
10
|
+
* Selected attributes in the table of attributes
|
|
11
|
+
*/
|
|
12
|
+
selectedAttributesIds: string[];
|
|
13
|
+
/**
|
|
14
|
+
* Show or hide advanced filters
|
|
15
|
+
*/
|
|
16
|
+
filterMore: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The attribute filter name
|
|
19
|
+
*/
|
|
20
|
+
name: string;
|
|
21
|
+
/**
|
|
22
|
+
* True if loadCallback hasn't been resolved yet
|
|
23
|
+
*/
|
|
24
|
+
loading: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* The attribute object value
|
|
27
|
+
*/
|
|
28
|
+
object: EntityData;
|
|
29
|
+
/**
|
|
30
|
+
* The attribute filter type value
|
|
31
|
+
*/
|
|
32
|
+
type: string;
|
|
33
|
+
/**
|
|
34
|
+
* Callback invoked when user right-clicks on the grid
|
|
35
|
+
*/
|
|
36
|
+
readonly contextMenuCallback: ContextMenuCallback;
|
|
37
|
+
/**
|
|
38
|
+
* Callback invoked when user deletes an object
|
|
39
|
+
*/
|
|
40
|
+
readonly deleteSelectionCallback: DeleteSelectionCallback;
|
|
41
|
+
/**
|
|
42
|
+
* Callback invoked when user filters the objects
|
|
43
|
+
*/
|
|
44
|
+
readonly loadCallback: LoadCallback;
|
|
45
|
+
/**
|
|
46
|
+
* Callback invoked when user executes filter action
|
|
47
|
+
*/
|
|
48
|
+
readonly objectActionCallback: ObjectActionCallback;
|
|
49
|
+
/**
|
|
50
|
+
* Objects rendered in the object selector
|
|
51
|
+
*/
|
|
52
|
+
readonly objects: GxOption[];
|
|
53
|
+
/**
|
|
54
|
+
* Callback invoked when user opens the selection dialog
|
|
55
|
+
*/
|
|
56
|
+
readonly openSelectionCallback: OpenSelectionCallback;
|
|
57
|
+
/**
|
|
58
|
+
* Callback invoked when user selects or deselects an object
|
|
59
|
+
*/
|
|
60
|
+
readonly selectionChangeCallback: SelectionChangeCallback;
|
|
61
|
+
/**
|
|
62
|
+
* Types rendered in the filter type selector
|
|
63
|
+
*/
|
|
64
|
+
readonly types: GxOption[];
|
|
65
|
+
componentWillLoad(): Promise<void>;
|
|
66
|
+
componentDidLoad(): void;
|
|
67
|
+
keyDownHandler(eventInfo: KeyboardEvent): void;
|
|
68
|
+
/**
|
|
69
|
+
* Reloads the view, refreshing the filters and attributes table.
|
|
70
|
+
*/
|
|
71
|
+
reload(): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Validate necessary data input
|
|
74
|
+
*/
|
|
75
|
+
validate(): Promise<boolean>;
|
|
76
|
+
render(): void;
|
|
77
|
+
}
|
|
78
|
+
export type ContextMenuCallback = (contextMenuInfo: ContextMenuInfo) => Promise<void>;
|
|
79
|
+
export type DeleteSelectionCallback = (ids: string[]) => Promise<void>;
|
|
80
|
+
export type LoadCallback = (filters: AttributeFiltersData) => Promise<AttributeData[]>;
|
|
81
|
+
export type ObjectActionCallback = () => Promise<EntityData | undefined>;
|
|
82
|
+
export type OpenSelectionCallback = (ids: string[]) => Promise<void>;
|
|
83
|
+
export type SelectionChangeCallback = (ids: string[]) => Promise<void>;
|
|
84
|
+
export interface AttributeData {
|
|
85
|
+
id: string;
|
|
86
|
+
icon: string;
|
|
87
|
+
name: string;
|
|
88
|
+
type: string;
|
|
89
|
+
description: string;
|
|
90
|
+
}
|
|
91
|
+
export interface AttributeFiltersData {
|
|
92
|
+
name?: string;
|
|
93
|
+
type?: string;
|
|
94
|
+
object?: string;
|
|
95
|
+
}
|
|
@@ -58,7 +58,8 @@ import { cancelCallbackFn, confirmCallbackFn } from "./components/team-dev/updat
|
|
|
58
58
|
import { TitleAlignment as TitleAlignment1, TitleType as TitleType1 } from "./components/_helpers/title/title";
|
|
59
59
|
import { CloseCallback as CloseCallback1, SlideInfo, TransitionType } from "./components/welcome-page/welcome-page";
|
|
60
60
|
import { WFConfigData } from "./components/wf-settings/wf-settings";
|
|
61
|
-
import { ContextMenuCallback, DeleteSelectionCallback, LoadCallback as LoadCallback5,
|
|
61
|
+
import { ContextMenuCallback, DeleteSelectionCallback, LoadCallback as LoadCallback5, ObjectActionCallback, OpenSelectionCallback as OpenSelectionCallback1, SelectionChangeCallback } from "./components/ww-attributes/ww-attributes";
|
|
62
|
+
import { ContextMenuCallback as ContextMenuCallback1, DeleteSelectionCallback as DeleteSelectionCallback1, LoadCallback as LoadCallback6, LoadImageItemsCallback, NewObjectCallback as NewObjectCallback1, OpenSelectionCallback as OpenSelectionCallback2, SelectionObjectCallback, SelectModuleCallback as SelectModuleCallback3 } from "./components/ww-images/ww-images";
|
|
62
63
|
export { AiStatus, Message, UserMessageCallback } from "./components/ai-assistant/ai-assistant";
|
|
63
64
|
export { MessageType } from "./components/ai-assistant/ai-assistant";
|
|
64
65
|
export { Translations } from "./components/ai-assistant/ai-message";
|
|
@@ -112,7 +113,8 @@ export { cancelCallbackFn, confirmCallbackFn } from "./components/team-dev/updat
|
|
|
112
113
|
export { TitleAlignment as TitleAlignment1, TitleType as TitleType1 } from "./components/_helpers/title/title";
|
|
113
114
|
export { CloseCallback as CloseCallback1, SlideInfo, TransitionType } from "./components/welcome-page/welcome-page";
|
|
114
115
|
export { WFConfigData } from "./components/wf-settings/wf-settings";
|
|
115
|
-
export { ContextMenuCallback, DeleteSelectionCallback, LoadCallback as LoadCallback5,
|
|
116
|
+
export { ContextMenuCallback, DeleteSelectionCallback, LoadCallback as LoadCallback5, ObjectActionCallback, OpenSelectionCallback as OpenSelectionCallback1, SelectionChangeCallback } from "./components/ww-attributes/ww-attributes";
|
|
117
|
+
export { ContextMenuCallback as ContextMenuCallback1, DeleteSelectionCallback as DeleteSelectionCallback1, LoadCallback as LoadCallback6, LoadImageItemsCallback, NewObjectCallback as NewObjectCallback1, OpenSelectionCallback as OpenSelectionCallback2, SelectionObjectCallback, SelectModuleCallback as SelectModuleCallback3 } from "./components/ww-images/ww-images";
|
|
116
118
|
export namespace Components {
|
|
117
119
|
interface GxIdeAiAssistant {
|
|
118
120
|
/**
|
|
@@ -858,7 +860,7 @@ export namespace Components {
|
|
|
858
860
|
/**
|
|
859
861
|
* Callback invoked when the action button is pressed. Returns the new value.
|
|
860
862
|
*/
|
|
861
|
-
"selectEntityCallback": () => Promise<EntityData
|
|
863
|
+
"selectEntityCallback": () => Promise<EntityData> | null;
|
|
862
864
|
/**
|
|
863
865
|
* Value currently assigned.
|
|
864
866
|
*/
|
|
@@ -1869,6 +1871,48 @@ export namespace Components {
|
|
|
1869
1871
|
*/
|
|
1870
1872
|
"saveCallback": (config: WFConfigData) => Promise<void>;
|
|
1871
1873
|
}
|
|
1874
|
+
interface GxIdeWwAttributes {
|
|
1875
|
+
/**
|
|
1876
|
+
* Callback invoked when user right-clicks on the grid
|
|
1877
|
+
*/
|
|
1878
|
+
"contextMenuCallback": ContextMenuCallback;
|
|
1879
|
+
/**
|
|
1880
|
+
* Callback invoked when user deletes an object
|
|
1881
|
+
*/
|
|
1882
|
+
"deleteSelectionCallback": DeleteSelectionCallback;
|
|
1883
|
+
/**
|
|
1884
|
+
* Callback invoked when user filters the objects
|
|
1885
|
+
*/
|
|
1886
|
+
"loadCallback": LoadCallback5;
|
|
1887
|
+
/**
|
|
1888
|
+
* Callback invoked when user executes filter action
|
|
1889
|
+
*/
|
|
1890
|
+
"objectActionCallback": ObjectActionCallback;
|
|
1891
|
+
/**
|
|
1892
|
+
* Objects rendered in the object selector
|
|
1893
|
+
*/
|
|
1894
|
+
"objects": GxOption[];
|
|
1895
|
+
/**
|
|
1896
|
+
* Callback invoked when user opens the selection dialog
|
|
1897
|
+
*/
|
|
1898
|
+
"openSelectionCallback": OpenSelectionCallback1;
|
|
1899
|
+
/**
|
|
1900
|
+
* Reloads the view, refreshing the filters and attributes table.
|
|
1901
|
+
*/
|
|
1902
|
+
"reload": () => Promise<void>;
|
|
1903
|
+
/**
|
|
1904
|
+
* Callback invoked when user selects or deselects an object
|
|
1905
|
+
*/
|
|
1906
|
+
"selectionChangeCallback": SelectionChangeCallback;
|
|
1907
|
+
/**
|
|
1908
|
+
* Types rendered in the filter type selector
|
|
1909
|
+
*/
|
|
1910
|
+
"types": GxOption[];
|
|
1911
|
+
/**
|
|
1912
|
+
* Validate necessary data input
|
|
1913
|
+
*/
|
|
1914
|
+
"validate": () => Promise<boolean>;
|
|
1915
|
+
}
|
|
1872
1916
|
interface GxIdeWwImages {
|
|
1873
1917
|
/**
|
|
1874
1918
|
* The categories render in the filter category selector
|
|
@@ -1877,7 +1921,7 @@ export namespace Components {
|
|
|
1877
1921
|
/**
|
|
1878
1922
|
* This is a function provided by the developer for expanded the data of images that is double-clicked or entered.
|
|
1879
1923
|
*/
|
|
1880
|
-
"contextMenuCallback":
|
|
1924
|
+
"contextMenuCallback": ContextMenuCallback1;
|
|
1881
1925
|
/**
|
|
1882
1926
|
* The default value for the 'categories' filter
|
|
1883
1927
|
*/
|
|
@@ -1893,7 +1937,7 @@ export namespace Components {
|
|
|
1893
1937
|
/**
|
|
1894
1938
|
* This is a function provided by the developer for expanded the data of images that is double-clicked or entered.
|
|
1895
1939
|
*/
|
|
1896
|
-
"deleteSelectionCallback":
|
|
1940
|
+
"deleteSelectionCallback": DeleteSelectionCallback1;
|
|
1897
1941
|
/**
|
|
1898
1942
|
* The densities render in the filter density selector
|
|
1899
1943
|
*/
|
|
@@ -1917,7 +1961,7 @@ export namespace Components {
|
|
|
1917
1961
|
/**
|
|
1918
1962
|
* This is a function provided by the developer that return a list of images to populate the table of images.
|
|
1919
1963
|
*/
|
|
1920
|
-
"loadCallback":
|
|
1964
|
+
"loadCallback": LoadCallback6;
|
|
1921
1965
|
/**
|
|
1922
1966
|
* This is a function provided by the developer that return a list of items of the image selected.
|
|
1923
1967
|
*/
|
|
@@ -1929,7 +1973,7 @@ export namespace Components {
|
|
|
1929
1973
|
/**
|
|
1930
1974
|
* This is a function provided by the developer for expanded the data of images that is double-clicked or entered.
|
|
1931
1975
|
*/
|
|
1932
|
-
"openSelectionCallback":
|
|
1976
|
+
"openSelectionCallback": OpenSelectionCallback2;
|
|
1933
1977
|
/**
|
|
1934
1978
|
* This method reload the view, refreshing the filters and the table of images.
|
|
1935
1979
|
*/
|
|
@@ -2765,6 +2809,12 @@ declare global {
|
|
|
2765
2809
|
prototype: HTMLGxIdeWfSettingsElement;
|
|
2766
2810
|
new (): HTMLGxIdeWfSettingsElement;
|
|
2767
2811
|
};
|
|
2812
|
+
interface HTMLGxIdeWwAttributesElement extends Components.GxIdeWwAttributes, HTMLStencilElement {
|
|
2813
|
+
}
|
|
2814
|
+
var HTMLGxIdeWwAttributesElement: {
|
|
2815
|
+
prototype: HTMLGxIdeWwAttributesElement;
|
|
2816
|
+
new (): HTMLGxIdeWwAttributesElement;
|
|
2817
|
+
};
|
|
2768
2818
|
interface HTMLGxIdeWwImagesElementEventMap {
|
|
2769
2819
|
"componentDidLoadEvent": boolean;
|
|
2770
2820
|
"componentDidRenderFirstTime": string;
|
|
@@ -2840,6 +2890,7 @@ declare global {
|
|
|
2840
2890
|
"gx-ide-top-bar": HTMLGxIdeTopBarElement;
|
|
2841
2891
|
"gx-ide-welcome-page": HTMLGxIdeWelcomePageElement;
|
|
2842
2892
|
"gx-ide-wf-settings": HTMLGxIdeWfSettingsElement;
|
|
2893
|
+
"gx-ide-ww-attributes": HTMLGxIdeWwAttributesElement;
|
|
2843
2894
|
"gx-ide-ww-images": HTMLGxIdeWwImagesElement;
|
|
2844
2895
|
}
|
|
2845
2896
|
}
|
|
@@ -3624,7 +3675,7 @@ declare namespace LocalJSX {
|
|
|
3624
3675
|
/**
|
|
3625
3676
|
* Callback invoked when the action button is pressed. Returns the new value.
|
|
3626
3677
|
*/
|
|
3627
|
-
"selectEntityCallback": () => Promise<EntityData
|
|
3678
|
+
"selectEntityCallback": () => Promise<EntityData> | null;
|
|
3628
3679
|
/**
|
|
3629
3680
|
* Value currently assigned.
|
|
3630
3681
|
*/
|
|
@@ -4691,6 +4742,40 @@ declare namespace LocalJSX {
|
|
|
4691
4742
|
*/
|
|
4692
4743
|
"saveCallback"?: (config: WFConfigData) => Promise<void>;
|
|
4693
4744
|
}
|
|
4745
|
+
interface GxIdeWwAttributes {
|
|
4746
|
+
/**
|
|
4747
|
+
* Callback invoked when user right-clicks on the grid
|
|
4748
|
+
*/
|
|
4749
|
+
"contextMenuCallback": ContextMenuCallback;
|
|
4750
|
+
/**
|
|
4751
|
+
* Callback invoked when user deletes an object
|
|
4752
|
+
*/
|
|
4753
|
+
"deleteSelectionCallback": DeleteSelectionCallback;
|
|
4754
|
+
/**
|
|
4755
|
+
* Callback invoked when user filters the objects
|
|
4756
|
+
*/
|
|
4757
|
+
"loadCallback": LoadCallback5;
|
|
4758
|
+
/**
|
|
4759
|
+
* Callback invoked when user executes filter action
|
|
4760
|
+
*/
|
|
4761
|
+
"objectActionCallback": ObjectActionCallback;
|
|
4762
|
+
/**
|
|
4763
|
+
* Objects rendered in the object selector
|
|
4764
|
+
*/
|
|
4765
|
+
"objects": GxOption[];
|
|
4766
|
+
/**
|
|
4767
|
+
* Callback invoked when user opens the selection dialog
|
|
4768
|
+
*/
|
|
4769
|
+
"openSelectionCallback": OpenSelectionCallback1;
|
|
4770
|
+
/**
|
|
4771
|
+
* Callback invoked when user selects or deselects an object
|
|
4772
|
+
*/
|
|
4773
|
+
"selectionChangeCallback": SelectionChangeCallback;
|
|
4774
|
+
/**
|
|
4775
|
+
* Types rendered in the filter type selector
|
|
4776
|
+
*/
|
|
4777
|
+
"types": GxOption[];
|
|
4778
|
+
}
|
|
4694
4779
|
interface GxIdeWwImages {
|
|
4695
4780
|
/**
|
|
4696
4781
|
* The categories render in the filter category selector
|
|
@@ -4699,7 +4784,7 @@ declare namespace LocalJSX {
|
|
|
4699
4784
|
/**
|
|
4700
4785
|
* This is a function provided by the developer for expanded the data of images that is double-clicked or entered.
|
|
4701
4786
|
*/
|
|
4702
|
-
"contextMenuCallback":
|
|
4787
|
+
"contextMenuCallback": ContextMenuCallback1;
|
|
4703
4788
|
/**
|
|
4704
4789
|
* The default value for the 'categories' filter
|
|
4705
4790
|
*/
|
|
@@ -4715,7 +4800,7 @@ declare namespace LocalJSX {
|
|
|
4715
4800
|
/**
|
|
4716
4801
|
* This is a function provided by the developer for expanded the data of images that is double-clicked or entered.
|
|
4717
4802
|
*/
|
|
4718
|
-
"deleteSelectionCallback":
|
|
4803
|
+
"deleteSelectionCallback": DeleteSelectionCallback1;
|
|
4719
4804
|
/**
|
|
4720
4805
|
* The densities render in the filter density selector
|
|
4721
4806
|
*/
|
|
@@ -4739,7 +4824,7 @@ declare namespace LocalJSX {
|
|
|
4739
4824
|
/**
|
|
4740
4825
|
* This is a function provided by the developer that return a list of images to populate the table of images.
|
|
4741
4826
|
*/
|
|
4742
|
-
"loadCallback":
|
|
4827
|
+
"loadCallback": LoadCallback6;
|
|
4743
4828
|
/**
|
|
4744
4829
|
* This is a function provided by the developer that return a list of items of the image selected.
|
|
4745
4830
|
*/
|
|
@@ -4759,7 +4844,7 @@ declare namespace LocalJSX {
|
|
|
4759
4844
|
/**
|
|
4760
4845
|
* This is a function provided by the developer for expanded the data of images that is double-clicked or entered.
|
|
4761
4846
|
*/
|
|
4762
|
-
"openSelectionCallback":
|
|
4847
|
+
"openSelectionCallback": OpenSelectionCallback2;
|
|
4763
4848
|
/**
|
|
4764
4849
|
* Displays a secondary filter, used to filter over the filtered images
|
|
4765
4850
|
*/
|
|
@@ -4842,6 +4927,7 @@ declare namespace LocalJSX {
|
|
|
4842
4927
|
"gx-ide-top-bar": GxIdeTopBar;
|
|
4843
4928
|
"gx-ide-welcome-page": GxIdeWelcomePage;
|
|
4844
4929
|
"gx-ide-wf-settings": GxIdeWfSettings;
|
|
4930
|
+
"gx-ide-ww-attributes": GxIdeWwAttributes;
|
|
4845
4931
|
"gx-ide-ww-images": GxIdeWwImages;
|
|
4846
4932
|
}
|
|
4847
4933
|
}
|
|
@@ -4905,6 +4991,7 @@ declare module "@stencil/core" {
|
|
|
4905
4991
|
"gx-ide-top-bar": LocalJSX.GxIdeTopBar & JSXBase.HTMLAttributes<HTMLGxIdeTopBarElement>;
|
|
4906
4992
|
"gx-ide-welcome-page": LocalJSX.GxIdeWelcomePage & JSXBase.HTMLAttributes<HTMLGxIdeWelcomePageElement>;
|
|
4907
4993
|
"gx-ide-wf-settings": LocalJSX.GxIdeWfSettings & JSXBase.HTMLAttributes<HTMLGxIdeWfSettingsElement>;
|
|
4994
|
+
"gx-ide-ww-attributes": LocalJSX.GxIdeWwAttributes & JSXBase.HTMLAttributes<HTMLGxIdeWwAttributesElement>;
|
|
4908
4995
|
"gx-ide-ww-images": LocalJSX.GxIdeWwImages & JSXBase.HTMLAttributes<HTMLGxIdeWwImagesElement>;
|
|
4909
4996
|
}
|
|
4910
4997
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["entitySelectorCss","CSS_BUNDLES","SELECT_DEFAULT_ICON","getIconPath","category","name","colorType","CLEAR_ICON","GxIdeEntitySelector","_GxIdeEntitySelector_componentLocale","set","this","_GxIdeEntitySelector_btnClearClickHandler","value","defaultValue","iconSrc","_a","_GxIdeEntitySelector_btnSelectClickHandler","selectEntityCallback","then","result","_GxIdeEntitySelector_buttonFocusHandler","e","type","buttonHasFocus","_GxIdeEntitySelector_renderControl","h","part","class","accessibleName","labelPosition","__classPrivateFieldGet","entitySelectorInputAccessibleName","disabled","entitySelectorNameAttribute","startImgSrc","readonly","_b","id","clearButtonLabel","title","onClick","onFocus","undefined","onBlur","src","selectButtonLabel","_GxIdeEntitySelector_updateIconSrc","valueChangedHandler","valueChanged","emit","call","componentWillLoad","__classPrivateFieldSet","Locale","getComponentStrings","el","connectedCallback","render","Host","model","field","htmlFor","labelCaption"],"sources":["src/components/_helpers/entity-selector/entity-selector.scss?tag=gx-ide-entity-selector&encapsulation=shadow","src/components/_helpers/entity-selector/entity-selector.tsx"],"sourcesContent":["/*wrapper*/\n.wrapper {\n display: grid;\n grid-template-columns: 1fr max-content max-content;\n gap: var(--mer-spacing--xs);\n border-radius: var(--control__border-radius);\n border: var(--control__border-width) var(--control__border-style)\n var(--control__border-color);\n padding: var(--control__padding-block) var(--control__padding-inline);\n\n &:hover {\n --control__border-color: var(--control__border-color--hover);\n }\n &:focus {\n }\n}\n/*input*/\n.input {\n --control__padding-block: 0;\n --control__padding-inline: 0;\n // Remove control border. We want to simulate a input that includes two buttons at the end.\n --control__border-width: 0;\n --focus__outline-width: 0;\n}\n:host(:focus-within) {\n .wrapper {\n --control__border-color: var(--focus__outline-color);\n }\n}\n:host(.entity-selector--button-has-focus) {\n .wrapper {\n outline: none;\n }\n}\n\n:host([disabled]) {\n pointer-events: none;\n .wrapper {\n background-color: var(--control__background-color--disabled);\n border-color: var(--control__border-color--disabled);\n }\n}\n/*custom button icon*/\n","import {\n Component,\n Host,\n h,\n Prop,\n Element,\n State,\n Event,\n EventEmitter,\n Watch\n} from \"@stencil/core\";\n\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../../common/locale\";\nimport { LabelPosition } from \"../../../common/types\";\nimport { EntityData } from \"../../../common/types\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/edit\",\n \"components/button\",\n \"components/icon\",\n \"utils/form\"\n];\nconst SELECT_DEFAULT_ICON = getIconPath({\n category: \"gemini-tools\",\n name: \"show-more-horizontal\",\n colorType: \"primary\"\n});\nconst CLEAR_ICON = getIconPath({\n category: \"gemini-tools\",\n name: \"reset\",\n colorType: \"primary\"\n});\n\n@Component({\n tag: \"gx-ide-entity-selector\",\n styleUrl: \"entity-selector.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/entity-selector\"]\n})\nexport class GxIdeEntitySelector {\n #componentLocale: any;\n\n @Element() el: HTMLGxIdeEntitySelectorElement;\n\n /**\n * Adds/removes a CSS class on the host. It removes focus-within styles when\n * focus is on a button.\n */\n @State() buttonHasFocus = false;\n\n @State() iconSrc: string = null;\n\n /**\n * Default value for the component. Used when the 'X' button is pressed.\n */\n @Prop() readonly defaultValue?: EntityData | null | undefined;\n\n /**\n * This attribute lets you specify if the element is disabled.\n */\n @Prop({ reflect: true }) readonly disabled: boolean = false;\n\n /**\n * The label caption. Only visible if \"labelPosition\" is not \"none\".\n * I no \"labelCaption\" is provided, a generic caption \"Select Entity\" will be provided\n */\n @Prop() readonly labelCaption?: string;\n\n /**\n * The label position\n */\n @Prop({ reflect: true }) readonly labelPosition?: LabelPosition =\n \"block-start\";\n\n /**\n * This property specifies the `name` of the control when used in a form.\n */\n @Prop({ reflect: true }) readonly name?: string;\n\n /**\n * Callback invoked when the action button is pressed. Returns the new value.\n */\n @Prop() readonly selectEntityCallback!: () => Promise<EntityData>;\n\n /**\n * Value currently assigned.\n */\n @Prop({ mutable: true }) value: EntityData | null | undefined;\n @Watch(\"value\")\n valueChangedHandler() {\n this.valueChanged.emit(this.value);\n this.#updateIconSrc();\n }\n\n /**\n * Emits the input value every time it changes\n */\n @Event() valueChanged: EventEmitter<EntityData>;\n\n // 6.Component Lifecycle Events\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n connectedCallback() {\n this.#updateIconSrc();\n }\n\n #btnClearClickHandler = () => {\n this.value = this.defaultValue;\n this.iconSrc = this.defaultValue?.iconSrc;\n };\n\n #btnSelectClickHandler = () => {\n this.selectEntityCallback().then(result => {\n this.value = result;\n });\n };\n\n #buttonFocusHandler = (e: FocusEvent) => {\n if (e.type === \"focus\") {\n this.buttonHasFocus = true;\n } else if (e.type === \"blur\") {\n this.buttonHasFocus = false;\n }\n };\n\n #renderControl = (): HTMLDivElement => {\n return (\n <div part=\"wrapper\" class=\"wrapper\">\n <ch-edit\n accessibleName={\n this.labelPosition === \"none\" &&\n this.#componentLocale.entitySelectorInputAccessibleName\n }\n class=\"input\"\n disabled={this.disabled}\n name={this.name || this.#componentLocale.entitySelectorNameAttribute}\n startImgSrc={this.iconSrc}\n readonly\n value={this.value?.name || this.defaultValue?.name}\n id=\"entity-input\"\n ></ch-edit>\n\n <button\n part=\"button-clear\"\n class=\"icon-button\"\n aria-label={this.#componentLocale.clearButtonLabel}\n title={this.#componentLocale.clearButtonLabel}\n type=\"button\"\n disabled={this.disabled}\n onClick={this.#btnClearClickHandler}\n onFocus={this.buttonHasFocus ? this.#buttonFocusHandler : undefined}\n onBlur={!this.buttonHasFocus ? this.#buttonFocusHandler : undefined}\n >\n <ch-image\n class=\"icon-md\"\n src={CLEAR_ICON}\n disabled={this.disabled}\n ></ch-image>\n </button>\n\n <button\n class=\"icon-button\"\n aria-label={this.#componentLocale.selectButtonLabel}\n title={this.#componentLocale.selectButtonLabel}\n type=\"button\"\n disabled={!this.selectEntityCallback || this.disabled}\n onClick={this.#btnSelectClickHandler}\n onBlur={!this.buttonHasFocus ? this.#buttonFocusHandler : undefined}\n onFocus={this.buttonHasFocus ? this.#buttonFocusHandler : undefined}\n >\n <ch-image\n class=\"icon-md\"\n src={SELECT_DEFAULT_ICON}\n disabled={this.disabled}\n ></ch-image>\n </button>\n </div>\n );\n };\n\n #updateIconSrc = () => {\n if (this.value && this.value.iconSrc) {\n this.iconSrc = this.value.iconSrc;\n }\n };\n\n render() {\n return (\n <Host\n class={{\n \"entity-selector--button-has-focus\": this.buttonHasFocus\n }}\n >\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n {this.labelPosition !== \"none\" ? (\n <div\n class={{\n \"field\": true,\n \"field-block\": this.labelPosition === \"block-start\",\n \"field-inline\": this.labelPosition === \"inline-start\"\n }}\n >\n <label class=\"label\" htmlFor=\"entity-input\">\n {this.labelCaption ||\n this.#componentLocale.entitySelectorInputAccessibleName}\n </label>\n {this.#renderControl()}\n </div>\n ) : (\n this.#renderControl()\n )}\n </Host>\n );\n }\n}\n\nexport type EntitySelectorLabels = {\n buttonClearLabel: string;\n buttonSelectLabel: string;\n};\n"],"mappings":";;;;;;AAAA,MAAMA,IAAoB;;;;;;;;;;;;;;;;;ACkB1B,MAAMC,IAA8B,EAClC,qBACA,mBACA,qBACA,mBACA;;AAEF,MAAMC,IAAsBC,EAAY;EACtCC,UAAU;EACVC,MAAM;EACNC,WAAW;;;AAEb,MAAMC,IAAaJ,EAAY;EAC7BC,UAAU;EACVC,MAAM;EACNC,WAAW;;;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