@infineon/infineon-design-system-stencil 29.3.0--canary.1639.1634b30a3424f7472ddda55e4836a0ecd8b3d25d.0 → 29.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/cjs/ifx-chip_3.cjs.entry.js +7 -2
  2. package/dist/cjs/ifx-chip_3.cjs.entry.js.map +1 -1
  3. package/dist/cjs/ifx-select.cjs.entry.js +58 -3
  4. package/dist/cjs/ifx-select.cjs.entry.js.map +1 -1
  5. package/dist/cjs/infineon-design-system-stencil.cjs.js +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/components/pagination/pagination.js +7 -2
  8. package/dist/collection/components/pagination/pagination.js.map +1 -1
  9. package/dist/collection/components/select/single-select/select.css +5 -7
  10. package/dist/collection/components/select/single-select/select.js +76 -3
  11. package/dist/collection/components/select/single-select/select.js.map +1 -1
  12. package/dist/components/ifx-pagination.js +1 -1
  13. package/dist/components/ifx-select.js +1 -1
  14. package/dist/components/ifx-set-filter.js +1 -1
  15. package/dist/components/ifx-table.js +2 -2
  16. package/dist/components/{p-06a50bfc.js → p-81357e99.js} +9 -4
  17. package/dist/components/p-81357e99.js.map +1 -0
  18. package/dist/components/{p-25e6cbc8.js → p-b9024e1a.js} +62 -5
  19. package/dist/components/p-b9024e1a.js.map +1 -0
  20. package/dist/esm/ifx-chip_3.entry.js +7 -2
  21. package/dist/esm/ifx-chip_3.entry.js.map +1 -1
  22. package/dist/esm/ifx-select.entry.js +58 -3
  23. package/dist/esm/ifx-select.entry.js.map +1 -1
  24. package/dist/esm/infineon-design-system-stencil.js +1 -1
  25. package/dist/esm/loader.js +1 -1
  26. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
  27. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js.map +1 -1
  28. package/dist/infineon-design-system-stencil/{p-7412e5f7.entry.js → p-b010bfcb.entry.js} +2 -2
  29. package/dist/infineon-design-system-stencil/p-b010bfcb.entry.js.map +1 -0
  30. package/dist/infineon-design-system-stencil/{p-50ed4300.entry.js → p-db4a364b.entry.js} +2 -2
  31. package/dist/infineon-design-system-stencil/{p-50ed4300.entry.js.map → p-db4a364b.entry.js.map} +1 -1
  32. package/dist/types/components/select/single-select/select.d.ts +7 -0
  33. package/dist/types/components.d.ts +1 -0
  34. package/package.json +1 -1
  35. package/dist/components/p-06a50bfc.js.map +0 -1
  36. package/dist/components/p-25e6cbc8.js.map +0 -1
  37. package/dist/infineon-design-system-stencil/p-7412e5f7.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","sourceRoot":"","sources":["../../../../src/components/select/single-select/select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAChG,OAAO,EAAsB,MAAM,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,SAAS,MAAM,YAAY,CAAC;AAoBnC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAOnE,MAAM,OAAO,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA4CO,KAAK;4BACC,OAAO;qBACd,EAAE;wBACE,KAAK;gCACE,aAAa;;oBAIzB,eAAe;8BACA,IAAI;;IAO1C,aAAa,CAAC,QAAiB;QAC7B,IAAI,QAAQ,EAAE,CAAC;YACb,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACxB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACvB,CAAC;IACH,CAAC;IAED,qBAAqB;QACnB,IAAI,CAAC,UAAU,EAAE,CAAA;QACjB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;Q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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { h, Component, Element, Method, Prop, Event, EventEmitter, State } from '@stencil/core';\nimport { HTMLStencilElement, Listen, Watch } from '@stencil/core/internal';\nimport ChoicesJs from 'choices.js';\n\nimport {\n AjaxFn,\n ClassNames,\n FuseOptions,\n IChoicesProps,\n IChoicesMethods,\n ItemFilterFn,\n NoResultsTextFn,\n NoChoicesTextFn,\n AddItemTextFn,\n MaxItemTextFn,\n SortFn,\n OnInit,\n OnCreateTemplates,\n UniqueItemText,\n ValueCompareFunction,\n CustomAddItemText,\n} from './interfaces';\nimport { filterObject, isDefined, isJSONParseable } from './utils';\n\n@Component({\n tag: 'ifx-select',\n styleUrl: 'select.scss',\n // shadow: true, //with shadow dom enabled, styles to the external choicesJs library cant be applied.\n})\nexport class Choices implements IChoicesProps, IChoicesMethods {\n @Prop() public value: string;\n @Prop() public name: string;\n @Prop() public items: Array<any>;\n @Prop() public choices: Array<any> | string;\n @Prop() public renderChoiceLimit: number;\n @Prop() public maxItemCount: number;\n @Prop() public addItems: boolean;\n @Prop() public removeItems: boolean;\n @Prop() public removeItemButton: boolean;\n @Prop() public editItems: boolean;\n @Prop() public duplicateItemsAllowed: boolean;\n @Prop() public delimiter: string;\n @Prop() public paste: boolean;\n @Prop() public showSearch: boolean;\n @Prop() public searchChoices: boolean;\n @Prop() public searchFields: Array<string> | string;\n @Prop() public searchFloor: number;\n @Prop() public searchResultLimit: number;\n @Prop() public position: 'auto' | 'top' | 'bottom';\n @Prop() public resetScrollPosition: boolean;\n @Prop() public shouldSort: boolean;\n @Prop() public shouldSortItems: boolean;\n @Prop() public sorter: SortFn;\n @Prop() public placeholder: boolean | string;\n @Prop() public searchPlaceholderValue: string;\n @Prop() public prependValue: string;\n @Prop() public appendValue: string;\n @Prop() public renderSelectedChoices: 'always' | 'auto';\n @Prop() public loadingText: string;\n @Prop() public noResultsText: string | NoResultsTextFn;\n @Prop() public noChoicesText: string | NoChoicesTextFn;\n @Prop() public itemSelectText: '';\n @Prop() public addItemText: string | AddItemTextFn;\n @Prop() public maxItemText: string | MaxItemTextFn;\n @Prop() public uniqueItemText: UniqueItemText;\n @Prop() public classNames: ClassNames;\n @Prop() public fuseOptions: FuseOptions;\n @Prop() public addItemFilter: string | RegExp | ItemFilterFn;\n @Prop() public customAddItemText: CustomAddItemText;\n @Prop() public callbackOnInit: OnInit;\n @Prop() public callbackOnCreateTemplates: OnCreateTemplates;\n @Prop() public valueComparer: ValueCompareFunction;\n //custom ifx props\n @Prop() error: boolean = false;\n @Prop() errorMessage: string = 'Error';\n @Prop() label: string = '';\n @Prop() disabled: boolean = false;\n @Prop() placeholderValue: string = 'Placeholder';\n @Event() ifxSelect: EventEmitter<CustomEvent>;\n @Event() ifxInput: EventEmitter<CustomEvent>;\n @Prop({ mutable: true }) options: any[] | string;\n @Prop() size: string = 'medium (40px)';\n @State() selectedOption: any | null = null;\n\n @Element() private readonly root: HTMLElement;\n private choice;\n private element;\n\n @Watch('disabled')\n watchDisabled(newValue: boolean) {\n if (newValue) {\n this.choice.disable();\n } else {\n this.choice.enable();\n }\n }\n\n handleDeleteSelection() {\n this.clearInput()\n this.selectedOption = null;\n this.setPreSelected(null);\n this.closeDropdown();\n this.ifxSelect.emit(null);\n }\n\n @Method()\n async handleChange() {\n this.ifxSelect.emit(this.choice.getValue());\n this.selectedOption = this.choice.getValue(); //store the selected option to reflect it in the template function\n this.setPreSelected(this.selectedOption.value); //set previously selected items from the input array to false and the new selection to true\n this.closeDropdown();\n }\n\n @Method()\n public async highlightItem(item: HTMLElement, runEvent?: boolean) {\n this.choice.highlightItem(item, runEvent);\n\n return this;\n }\n\n @Method()\n public async unhighlightItem(item: HTMLElement) {\n this.choice.unhighlightItem(item);\n\n return this;\n }\n\n @Method()\n public async highlightAll() {\n this.choice.highlightAll();\n\n return this;\n }\n\n @Method()\n public async unhighlightAll() {\n this.choice.unhighlightAll();\n\n return this;\n }\n\n @Method()\n public async removeActiveItemsByValue(value: string) {\n this.choice.removeActiveItemsByValue(value);\n return this;\n }\n\n @Method()\n public async removeActiveItems(excludedId?: number) {\n this.choice.removeActiveItems(excludedId);\n\n return this;\n }\n\n @Method()\n public async removeHighlightedItems(runEvent?: boolean) {\n this.choice.removeHighlightedItems(runEvent);\n\n return this;\n }\n\n @Method()\n public async showDropdown(focusInput?: boolean) {\n this.choice.showDropdown(focusInput);\n return this;\n }\n\n @Method()\n public async hideDropdown(blurInput?: boolean) {\n this.choice.hideDropdown(blurInput);\n\n return this;\n }\n\n @Method()\n public async getValue(valueOnly?: boolean): Promise<string | Array<string>> {\n return this.choice.getValue(valueOnly);\n }\n\n @Method()\n public async setValue(args: Array<any>) {\n this.choice.setValue(args);\n\n return this;\n }\n\n @Method()\n public async setChoiceByValue(value: string | Array<string>) {\n this.choice.setChoiceByValue(value);\n\n return this;\n }\n\n @Method()\n public async setChoices(choices: any[] | string, value: string, label: string, replaceChoices?: boolean) {\n let listOfChoices;\n if (typeof choices === 'string') {\n try {\n if (!isJSONParseable(choices)) {\n //meaning the input string comes from storybook as a non valid json string to be displayed in a beautified version on storybook\n choices = choices\n .replace(/'/g, '\"')\n .replace(/\"false\"/g, 'false')\n .replace(/\"true\"/g, 'true');\n }\n listOfChoices = [...JSON.parse(choices)];\n } catch (err) {\n console.error('Failed to parse choices:', err);\n }\n } else if (Array.isArray(choices) || typeof choices === 'object') {\n listOfChoices = [...choices];\n } else {\n console.error('Unexpected value for choices:', this.options);\n }\n\n this.choice.setChoices(listOfChoices, value, label, replaceChoices);\n return this;\n }\n\n @Method()\n public async clearChoices() {\n this.choice.clearChoices();\n\n return this;\n }\n\n @Method()\n public async clearStore() {\n this.choice.clearStore();\n\n return this;\n }\n\n @Method()\n public async clearInput() {\n this.choice.clearInput();\n\n return this;\n }\n\n @Method()\n public async ajax(fn: AjaxFn) {\n this.choice.ajax(fn);\n\n return this;\n }\n\n protected componentDidLoad() {\n this.init();\n this.addEventListenersToHandleCustomFocusAndActiveState();\n }\n\n protected componentDidUpdate() {\n this.init();\n }\n\n protected disconnectedCallback() {\n this.destroy();\n }\n\n protected render(): any {\n const attributes = {\n 'data-selector': 'root',\n 'name': this.name || null,\n // 'remove-item-button': false,\n };\n const choicesWrapperClass = `ifx-choices__wrapper ${this.getSizeClass()}`;\n\n // destroy choices element to restore previous dom structure\n // so vdom can replace the element correctly\n this.destroy();\n\n return (\n <div class={`ifx-select-container`}>\n {this.label ? (\n <div class=\"ifx-label-wrapper\">\n <span>{this.label}</span>\n </div>\n ) : null}\n <div\n class={`${choicesWrapperClass} \n ${this.disabled ? 'disabled' : ''} \n ${this.error ? 'error' : ''}`}\n onClick={this.disabled ? undefined : () => this.toggleDropdown()}\n onKeyDown={event => this.handleKeyDown(event)}\n >\n <select disabled = {this.disabled} {...attributes} data-trigger onChange={() => this.handleChange()}>\n {this.createSelectOptions(this.options)}\n </select>\n\n { this.selectedOption && (\n <div class=\"ifx-choices__icon-wrapper-delete\">\n <ifx-icon icon=\"cremove16\" onClick={() => this.handleDeleteSelection()}></ifx-icon>\n </div>\n )}\n <div class=\"ifx-choices__icon-wrapper-up\">\n <ifx-icon key=\"icon-up\" icon=\"chevronup-16\"></ifx-icon>\n </div>\n <div class=\"ifx-choices__icon-wrapper-down\">\n <ifx-icon key=\"icon-down\" icon=\"chevron-down-16\"></ifx-icon>\n </div>\n </div>\n {this.error ? (\n <div class=\"ifx-error-message-wrapper\">\n <span>{this.errorMessage}</span>\n </div>\n ) : null}\n </div>\n );\n }\n\n toggleDropdown() {\n const div = this.root.querySelector('.ifx-choices__wrapper') as HTMLDivElement;\n if (div.classList.contains('active') || this.choice.dropdown.isActive) {\n this.hideDropdown();\n div.classList.remove('active');\n } else {\n this.choice.showDropdown();\n div.classList.add('active');\n }\n const choicesElement = this.root.querySelector('.choices');\n choicesElement.classList.add('is-focused'); // Add the 'is-focused' class, cause a click on the wrapper (and not the embedded select element) doesnt add this automatically to the choices instance\n }\n\n closeDropdown() {\n const ifxChoicesWrapper = this.root.querySelector('.ifx-choices__wrapper') as HTMLDivElement;\n ifxChoicesWrapper.classList.remove('active');\n }\n\n @Listen('mousedown', { target: 'document' })\n handleOutsideClick(event: MouseEvent) {\n const path = event.composedPath();\n const ifxChoicesContainer = this.root.querySelector('.ifx-choices__wrapper') as HTMLDivElement;\n\n if (!path.includes(this.root)) {\n ifxChoicesContainer.classList.remove('active');\n }\n }\n\n handleKeyDown(event: KeyboardEvent) {\n if (this.disabled) return;\n\n const isSearchInput = (event.target as HTMLElement).classList.contains('choices__input');\n\n // If the event originated from the search input and the key is 'Space', do nothing.\n if (isSearchInput && event.code === 'Space') {\n return;\n }\n\n if (event.code === 'Enter' || (event.code === 'Space' && !isSearchInput)) {\n this.toggleDropdown();\n }\n\n // Only prevent default space behavior when it's not from the search input.\n if (event.code === 'Space' && !isSearchInput) {\n event.preventDefault(); // Prevent default page scrolling.\n }\n }\n\n getSizeClass() {\n return `${this.size}` === 's' ? 'small-select' : 'medium-select';\n }\n\n private init() {\n const props = {\n allowHTML: true,\n items: this.items,\n choices: this.choices,\n renderChoiceLimit: this.renderChoiceLimit,\n maxItemCount: this.maxItemCount,\n addItems: this.addItems,\n removeItems: this.removeItems,\n removeItemButton: this.removeItemButton,\n editItems: this.editItems,\n duplicateItemsAllowed: this.duplicateItemsAllowed,\n delimiter: this.delimiter,\n paste: this.paste,\n searchEnabled: this.showSearch,\n searchChoices: this.searchChoices,\n searchFields: this.searchFields,\n searchFloor: this.searchFloor,\n searchResultLimit: this.searchResultLimit,\n position: this.position,\n resetScrollPosition: this.resetScrollPosition,\n shouldSort: false, // choices/groups will appear in the order they were given.\n shouldSortItems: this.shouldSortItems,\n sorter: this.sorter,\n placeholder: this.placeholder,\n searchPlaceholderValue: this.searchPlaceholderValue,\n prependValue: this.prependValue,\n appendValue: this.appendValue,\n renderSelectedChoices: this.renderSelectedChoices,\n loadingText: this.loadingText,\n noResultsText: this.noResultsText,\n noChoicesText: this.noChoicesText,\n itemSelectText: this.itemSelectText,\n addItemText: this.addItemText,\n maxItemText: this.maxItemText,\n uniqueItemText: this.uniqueItemText,\n classNames: this.classNames,\n fuseOptions: this.fuseOptions,\n callbackOnInit: this.callbackOnInit,\n callbackOnCreateTemplates: this.callbackOnCreateTemplates,\n valueComparer: this.valueComparer,\n addItemFilter: this.addItemFilter,\n customAddItemText: this.customAddItemText,\n };\n\n const settings = filterObject(props, isDefined);\n\n //type check\n const element = this.root.querySelector('[data-selector=\"root\"]');\n if (element instanceof HTMLInputElement || element instanceof HTMLSelectElement) {\n // this.choice = new ChoicesJs(element, settings); //standard, without using custom templates\n const self = this; // save the context of this in a variable outside of the function to access it in the following\n\n this.choice = new ChoicesJs(\n element,\n Object.assign({}, settings, {\n callbackOnCreateTemplates: function (template) {\n return {\n //modifying the selected item template\n item: ({ classNames }, data) => {\n let removeButtonHTML = '';\n\n if (data.placeholder && !self.selectedOption?.value) {\n // For placeholders, use data-id=\"placeholder\"\n return template(`\n <div class=\"choices__placeholder\" data-item data-id=\"${data.id}\" data-value=\"${data.value}\" ${data.disabled ? 'aria-disabled=\"true\"' : ''}>\n ${data.label === undefined ? this.placeholderValue : data.label}\n ${removeButtonHTML}\n </div>\n `);\n } else {\n // For non-placeholder items, use the actual data ID\n return template(`\n <div class=\"${classNames.item} ${data.highlighted ? classNames.highlightedState : classNames.itemSelectable}\" \n data-item \n data-id=\"${self.selectedOption?.id !== undefined ? self.selectedOption?.id : self.choice.getValue().id}\" \n data-value=\"${self.selectedOption?.value !== undefined ? self.selectedOption?.value : self.choice.getValue().value}\" \n ${data.disabled ? 'aria-disabled=\"true\"' : ''}>\n <span>${self.selectedOption?.label !== undefined ? self.selectedOption?.label : self.choice.getValue().label}</span>\n <!-- Add your remove button here if needed -->\n </div>\n `);\n }\n },\n input: ({ classNames }) => {\n return template(`\n <input type=\"search\"\n class=\"${classNames.input} ${classNames.inputCloned} ${self.getSizeClass()}\"\n autocomplete=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n role=\"textbox\"\n aria-autocomplete=\"list\"\n aria-label=\"${this.showSearch ? this.searchPlaceholderValue : ''}\" > \n `);\n },\n\n //modifying the template of each item in the options list\n choice: ({ classNames }, data) => {\n return template(`\n <div class=\"${classNames.item} ${classNames.itemChoice} ${self.getSizeClass()} \n ${data.selected || self.selectedOption?.value === data.value || self.getPreSelected(self)?.value === data.value ? 'selected' : ''} \n ${data.placeholder ? classNames.placeholder : ''} \n ${data.disabled ? classNames.itemDisabled : classNames.itemSelectable} \n role=\"${data.groupId && data.groupId > 0 ? 'treeitem' : 'option'}\"\n data-choice ${data.disabled ? 'data-choice-disabled aria-disabled=\"true\"' : 'data-choice-selectable'} data-id=\"${data.id}\"\n data-value=\"${data.value}\"\n data-select-text=\"${this.config.itemSelectText}\">\n <span>${data.label}</span>\n ${data.selected || self.selectedOption?.value === data.value || self.getPreSelected(self)?.value === data.value ? '<ifx-icon icon=\"check16\"></ifx-icon>' : ''}\n </div>\n `);\n },\n };\n },\n }),\n );\n\n //set select options\n this.setChoices(this.options, 'value', 'label', true);\n //set custom event listener to listen for search input\n self.addSearchEventListener(self, this.choice);\n } else {\n // handle the case when the element is neither an HTMLInputElement nor an HTMLSelectElement\n }\n }\n\n private addEventListenersToHandleCustomFocusAndActiveState() {\n const div = this.root.querySelector('.ifx-choices__wrapper') as HTMLDivElement;\n\n if (!div) {\n console.error('.ifx-choices__wrapper not found');\n return;\n }\n\n div.tabIndex = 0;\n\n div.addEventListener('focus', function () {\n if (!this.classList.contains('disabled')) {\n this.classList.add('focus');\n }\n });\n\n div.addEventListener('blur', function () {\n this.classList.remove('focus');\n });\n }\n\n private addSearchEventListener(self, choiceElement: ChoicesJs) {\n choiceElement.passedElement.element.addEventListener(\n 'search',\n function (event: CustomEvent) {\n self.ifxInput.emit(event.detail.value);\n },\n false,\n );\n return choiceElement;\n }\n\n private destroy() {\n if (this.element) {\n this.element = null;\n }\n\n if (this.choice) {\n this.choice.destroy();\n this.choice = null;\n }\n }\n\n //get selected values from input array\n private getPreSelected(self) {\n const optionsArray: any[] = Array.isArray(self.options) ? self.options : JSON.parse(self.options);\n return optionsArray.find(option => option.selected === true) || null;\n }\n\n //set previously marked as selected items in the input array to unselected and select new ones\n private setPreSelected(newValue) {\n const optionsArray: any[] = Array.isArray(this.options) ? this.options : JSON.parse(this.options);\n\n this.options = optionsArray.map(obj => {\n return {\n ...obj,\n selected: obj.value === newValue\n };\n });\n }\n\n //setting the value that gets displayed in the select at component start (either the value prop or a placeholder)\n private createSelectOptions(ifxOptions): Array<HTMLStencilElement> {\n if (this.value !== 'undefined' || this.selectedOption?.value !== '') {\n let options;\n if (isJSONParseable(ifxOptions)) {\n options = [...JSON.parse(ifxOptions)];\n } else if (Array.isArray(ifxOptions) || typeof ifxOptions === 'object') {\n options = [...ifxOptions];\n }\n const optionValueBasedOnAvailableOptions = options?.find(option => option.value === this.value || this.selectedOption?.value);\n\n if (optionValueBasedOnAvailableOptions) {\n return [<option value={optionValueBasedOnAvailableOptions.value}>{optionValueBasedOnAvailableOptions.label}</option>];\n }\n }\n\n // Assign a unique id for the placeholder\n return this.placeholder !== 'false' ? [<option value=\"\">{this.placeholderValue}</option>] : [<option value=\"\"></option>];\n }\n}\n"]}
1
+ {"version":3,"file":"select.js","sourceRoot":"","sources":["../../../../src/components/select/single-select/select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAChG,OAAO,EAAsB,MAAM,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,SAAS,MAAM,YAAY,CAAC;AAoBnC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAOnE,MAAM,OAAO,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA4CO,KAAK;4BACC,OAAO;qBACd,EAAE;wBACE,KAAK;gCACE,aAAa;;oBAIzB,eAAe;8BACA,IAAI;gCACL,KAAK;;IAS1C,aAAa,CAAC,QAAiB;QAC7B,IAAI,QAAQ,EAAE,CAAC;YACb,IAAI,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { h, Component, Element, Method, Prop, Event, EventEmitter, State } from '@stencil/core';\nimport { HTMLStencilElement, Listen, Watch } from '@stencil/core/internal';\nimport ChoicesJs from 'choices.js';\n\nimport {\n AjaxFn,\n ClassNames,\n FuseOptions,\n IChoicesProps,\n IChoicesMethods,\n ItemFilterFn,\n NoResultsTextFn,\n NoChoicesTextFn,\n AddItemTextFn,\n MaxItemTextFn,\n SortFn,\n OnInit,\n OnCreateTemplates,\n UniqueItemText,\n ValueCompareFunction,\n CustomAddItemText,\n} from './interfaces';\nimport { filterObject, isDefined, isJSONParseable } from './utils';\n\n@Component({\n tag: 'ifx-select',\n styleUrl: 'select.scss',\n // shadow: true, //with shadow dom enabled, styles to the external choicesJs library cant be applied.\n})\nexport class Choices implements IChoicesProps, IChoicesMethods {\n @Prop() public value: string;\n @Prop() public name: string;\n @Prop() public items: Array<any>;\n @Prop() public choices: Array<any> | string;\n @Prop() public renderChoiceLimit: number;\n @Prop() public maxItemCount: number;\n @Prop() public addItems: boolean;\n @Prop() public removeItems: boolean;\n @Prop() public removeItemButton: boolean;\n @Prop() public editItems: boolean;\n @Prop() public duplicateItemsAllowed: boolean;\n @Prop() public delimiter: string;\n @Prop() public paste: boolean;\n @Prop() public showSearch: boolean;\n @Prop() public searchChoices: boolean;\n @Prop() public searchFields: Array<string> | string;\n @Prop() public searchFloor: number;\n @Prop() public searchResultLimit: number;\n @Prop() public position: 'auto' | 'top' | 'bottom';\n @Prop() public resetScrollPosition: boolean;\n @Prop() public shouldSort: boolean;\n @Prop() public shouldSortItems: boolean;\n @Prop() public sorter: SortFn;\n @Prop() public placeholder: boolean | string;\n @Prop() public searchPlaceholderValue: string;\n @Prop() public prependValue: string;\n @Prop() public appendValue: string;\n @Prop() public renderSelectedChoices: 'always' | 'auto';\n @Prop() public loadingText: string;\n @Prop() public noResultsText: string | NoResultsTextFn;\n @Prop() public noChoicesText: string | NoChoicesTextFn;\n @Prop() public itemSelectText: '';\n @Prop() public addItemText: string | AddItemTextFn;\n @Prop() public maxItemText: string | MaxItemTextFn;\n @Prop() public uniqueItemText: UniqueItemText;\n @Prop() public classNames: ClassNames;\n @Prop() public fuseOptions: FuseOptions;\n @Prop() public addItemFilter: string | RegExp | ItemFilterFn;\n @Prop() public customAddItemText: CustomAddItemText;\n @Prop() public callbackOnInit: OnInit;\n @Prop() public callbackOnCreateTemplates: OnCreateTemplates;\n @Prop() public valueComparer: ValueCompareFunction;\n //custom ifx props\n @Prop() error: boolean = false;\n @Prop() errorMessage: string = 'Error';\n @Prop() label: string = '';\n @Prop() disabled: boolean = false;\n @Prop() placeholderValue: string = 'Placeholder';\n @Event() ifxSelect: EventEmitter<CustomEvent>;\n @Event() ifxInput: EventEmitter<CustomEvent>;\n @Prop({ mutable: true }) options: any[] | string;\n @Prop() size: string = 'medium (40px)';\n @State() selectedOption: any | null = null;\n @State() optionIsSelected: boolean = false;\n\n private resizeObserver: ResizeObserver;\n\n @Element() private readonly root: HTMLElement;\n private choice;\n private element;\n\n @Watch('disabled')\n watchDisabled(newValue: boolean) {\n if (newValue) {\n this.choice.disable();\n } else {\n this.choice.enable();\n }\n }\n\n handleDeleteSelection() {\n this.clearInput()\n this.selectedOption = null;\n this.setPreSelected(null);\n this.closeDropdown();\n this.ifxSelect.emit(null);\n this.optionIsSelected = false;\n }\n\n @Method()\n async handleChange() {\n this.ifxSelect.emit(this.choice.getValue());\n this.selectedOption = this.choice.getValue(); //store the selected option to reflect it in the template function\n this.setPreSelected(this.selectedOption.value); //set previously selected items from the input array to false and the new selection to true\n this.closeDropdown();\n }\n\n @Method()\n public async highlightItem(item: HTMLElement, runEvent?: boolean) {\n this.choice.highlightItem(item, runEvent);\n\n return this;\n }\n\n @Method()\n public async unhighlightItem(item: HTMLElement) {\n this.choice.unhighlightItem(item);\n\n return this;\n }\n\n @Method()\n public async highlightAll() {\n this.choice.highlightAll();\n\n return this;\n }\n\n @Method()\n public async unhighlightAll() {\n this.choice.unhighlightAll();\n\n return this;\n }\n\n @Method()\n public async removeActiveItemsByValue(value: string) {\n this.choice.removeActiveItemsByValue(value);\n return this;\n }\n\n @Method()\n public async removeActiveItems(excludedId?: number) {\n this.choice.removeActiveItems(excludedId);\n\n return this;\n }\n\n @Method()\n public async removeHighlightedItems(runEvent?: boolean) {\n this.choice.removeHighlightedItems(runEvent);\n\n return this;\n }\n\n @Method()\n public async showDropdown(focusInput?: boolean) {\n this.choice.showDropdown(focusInput);\n return this;\n }\n\n @Method()\n public async hideDropdown(blurInput?: boolean) {\n this.choice.hideDropdown(blurInput);\n\n return this;\n }\n\n @Method()\n public async getValue(valueOnly?: boolean): Promise<string | Array<string>> {\n return this.choice.getValue(valueOnly);\n }\n\n @Method()\n public async setValue(args: Array<any>) {\n this.choice.setValue(args);\n\n return this;\n }\n\n @Method()\n public async setChoiceByValue(value: string | Array<string>) {\n this.choice.setChoiceByValue(value);\n\n return this;\n }\n\n @Method()\n public async setChoices(choices: any[] | string, value: string, label: string, replaceChoices?: boolean) {\n let listOfChoices;\n if (typeof choices === 'string') {\n try {\n if (!isJSONParseable(choices)) {\n //meaning the input string comes from storybook as a non valid json string to be displayed in a beautified version on storybook\n choices = choices\n .replace(/'/g, '\"')\n .replace(/\"false\"/g, 'false')\n .replace(/\"true\"/g, 'true');\n }\n listOfChoices = [...JSON.parse(choices)];\n } catch (err) {\n console.error('Failed to parse choices:', err);\n }\n } else if (Array.isArray(choices) || typeof choices === 'object') {\n listOfChoices = [...choices];\n } else {\n console.error('Unexpected value for choices:', this.options);\n }\n\n this.choice.setChoices(listOfChoices, value, label, replaceChoices);\n return this;\n }\n\n @Method()\n public async clearChoices() {\n this.choice.clearChoices();\n\n return this;\n }\n\n @Method()\n public async clearStore() {\n this.choice.clearStore();\n\n return this;\n }\n\n @Method()\n public async clearInput() {\n this.choice.clearInput();\n\n return this;\n }\n\n @Method()\n public async ajax(fn: AjaxFn) {\n this.choice.ajax(fn);\n\n return this;\n }\n\n @Method()\n async handleDeleteIcon() {\n const width = this.root.offsetWidth;\n const deleteIconWrapper = this.root.querySelector('.ifx-choices__icon-wrapper-delete');\n if(deleteIconWrapper) { \n if (width <= 180) {\n deleteIconWrapper.classList.add('hide')\n } else { \n deleteIconWrapper.classList.remove('hide')\n }\n }\n }\n\n\n handleCloseButton() { \n if(typeof this.options === 'string') { \n const optionsToArray = JSON.parse(this.options);\n const optionIsSelected = optionsToArray.find(option => option.selected === true)\n if(optionIsSelected) { \n this.optionIsSelected = true;\n } else { \n this.optionIsSelected = false;\n }\n } else if(this.options && Array.isArray(this.options)) { \n const optionIsSelected = this.options.find(option => option.selected === true)\n if(optionIsSelected) { \n this.optionIsSelected = true;\n } else { \n this.optionIsSelected = false;\n }\n }\n }\n\n protected componentWillLoad() { \n this.handleCloseButton()\n }\n\n protected componentWillUpdate() { \n this.handleCloseButton()\n \n }\n\n addResizeObserver() { \n this.resizeObserver = new ResizeObserver(() => {\n this.handleDeleteIcon();\n });\n \n const componentWrapper = this.root.querySelector('.ifx-choices__wrapper');\n this.resizeObserver.observe(componentWrapper);\n }\n\n protected componentDidLoad() {\n this.init();\n this.addEventListenersToHandleCustomFocusAndActiveState();\n this.handleDeleteIcon();\n this.addResizeObserver()\n }\n\n protected componentDidUpdate() {\n this.init();\n this.handleDeleteIcon()\n }\n\n protected disconnectedCallback() {\n this.destroy();\n\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n this.resizeObserver = null;\n }\n }\n\n protected render(): any {\n const attributes = {\n 'data-selector': 'root',\n 'name': this.name || null,\n // 'remove-item-button': false,\n };\n const choicesWrapperClass = `ifx-choices__wrapper ${this.getSizeClass()}`;\n\n // destroy choices element to restore previous dom structure\n // so vdom can replace the element correctly\n this.destroy();\n\n return (\n <div class={`ifx-select-container`}>\n {this.label ? (\n <div class=\"ifx-label-wrapper\">\n <span>{this.label}</span>\n </div>\n ) : null}\n <div\n class={`${choicesWrapperClass} \n ${this.disabled ? 'disabled' : ''} \n ${this.error ? 'error' : ''}`}\n onClick={this.disabled ? undefined : () => this.toggleDropdown()}\n onKeyDown={event => this.handleKeyDown(event)}\n >\n <select disabled = {this.disabled} {...attributes} data-trigger onChange={() => this.handleChange()}>\n {this.createSelectOptions(this.options)}\n </select>\n\n { this.optionIsSelected && (\n <div class=\"ifx-choices__icon-wrapper-delete\">\n <ifx-icon icon=\"cremove16\" onClick={() => this.handleDeleteSelection()}></ifx-icon>\n </div>\n )}\n <div class=\"ifx-choices__icon-wrapper-up\">\n <ifx-icon key=\"icon-up\" icon=\"chevronup-16\"></ifx-icon>\n </div>\n <div class=\"ifx-choices__icon-wrapper-down\">\n <ifx-icon key=\"icon-down\" icon=\"chevron-down-16\"></ifx-icon>\n </div>\n </div>\n {this.error ? (\n <div class=\"ifx-error-message-wrapper\">\n <span>{this.errorMessage}</span>\n </div>\n ) : null}\n </div>\n );\n }\n\n toggleDropdown() {\n const div = this.root.querySelector('.ifx-choices__wrapper') as HTMLDivElement;\n if (div.classList.contains('active') || this.choice.dropdown.isActive) {\n this.hideDropdown();\n div.classList.remove('active');\n } else {\n this.choice.showDropdown();\n div.classList.add('active');\n }\n const choicesElement = this.root.querySelector('.choices');\n choicesElement.classList.add('is-focused'); // Add the 'is-focused' class, cause a click on the wrapper (and not the embedded select element) doesnt add this automatically to the choices instance\n }\n\n closeDropdown() {\n const ifxChoicesWrapper = this.root.querySelector('.ifx-choices__wrapper') as HTMLDivElement;\n ifxChoicesWrapper.classList.remove('active');\n }\n\n @Listen('mousedown', { target: 'document' })\n handleOutsideClick(event: MouseEvent) {\n const path = event.composedPath();\n const ifxChoicesContainer = this.root.querySelector('.ifx-choices__wrapper') as HTMLDivElement;\n\n if (!path.includes(this.root)) {\n ifxChoicesContainer.classList.remove('active');\n }\n }\n\n handleKeyDown(event: KeyboardEvent) {\n if (this.disabled) return;\n\n const isSearchInput = (event.target as HTMLElement).classList.contains('choices__input');\n\n // If the event originated from the search input and the key is 'Space', do nothing.\n if (isSearchInput && event.code === 'Space') {\n return;\n }\n\n if (event.code === 'Enter' || (event.code === 'Space' && !isSearchInput)) {\n this.toggleDropdown();\n }\n\n // Only prevent default space behavior when it's not from the search input.\n if (event.code === 'Space' && !isSearchInput) {\n event.preventDefault(); // Prevent default page scrolling.\n }\n }\n\n getSizeClass() {\n return `${this.size}` === 's' ? 'small-select' : 'medium-select';\n }\n\n private init() {\n const props = {\n allowHTML: true,\n items: this.items,\n choices: this.choices,\n renderChoiceLimit: this.renderChoiceLimit,\n maxItemCount: this.maxItemCount,\n addItems: this.addItems,\n removeItems: this.removeItems,\n removeItemButton: this.removeItemButton,\n editItems: this.editItems,\n duplicateItemsAllowed: this.duplicateItemsAllowed,\n delimiter: this.delimiter,\n paste: this.paste,\n searchEnabled: this.showSearch,\n searchChoices: this.searchChoices,\n searchFields: this.searchFields,\n searchFloor: this.searchFloor,\n searchResultLimit: this.searchResultLimit,\n position: this.position,\n resetScrollPosition: this.resetScrollPosition,\n shouldSort: false, // choices/groups will appear in the order they were given.\n shouldSortItems: this.shouldSortItems,\n sorter: this.sorter,\n placeholder: this.placeholder,\n searchPlaceholderValue: this.searchPlaceholderValue,\n prependValue: this.prependValue,\n appendValue: this.appendValue,\n renderSelectedChoices: this.renderSelectedChoices,\n loadingText: this.loadingText,\n noResultsText: this.noResultsText,\n noChoicesText: this.noChoicesText,\n itemSelectText: this.itemSelectText,\n addItemText: this.addItemText,\n maxItemText: this.maxItemText,\n uniqueItemText: this.uniqueItemText,\n classNames: this.classNames,\n fuseOptions: this.fuseOptions,\n callbackOnInit: this.callbackOnInit,\n callbackOnCreateTemplates: this.callbackOnCreateTemplates,\n valueComparer: this.valueComparer,\n addItemFilter: this.addItemFilter,\n customAddItemText: this.customAddItemText,\n };\n\n const settings = filterObject(props, isDefined);\n\n //type check\n const element = this.root.querySelector('[data-selector=\"root\"]');\n if (element instanceof HTMLInputElement || element instanceof HTMLSelectElement) {\n // this.choice = new ChoicesJs(element, settings); //standard, without using custom templates\n const self = this; // save the context of this in a variable outside of the function to access it in the following\n\n this.choice = new ChoicesJs(\n element,\n Object.assign({}, settings, {\n callbackOnCreateTemplates: function (template) {\n return {\n //modifying the selected item template\n item: ({ classNames }, data) => {\n let removeButtonHTML = '';\n\n if (data.placeholder && !self.selectedOption?.value) {\n // For placeholders, use data-id=\"placeholder\"\n return template(`\n <div class=\"choices__placeholder\" data-item data-id=\"${data.id}\" data-value=\"${data.value}\" ${data.disabled ? 'aria-disabled=\"true\"' : ''}>\n ${data.label === undefined ? this.placeholderValue : data.label}\n ${removeButtonHTML}\n </div>\n `);\n } else {\n // For non-placeholder items, use the actual data ID\n return template(`\n <div class=\"${classNames.item} ${data.highlighted ? classNames.highlightedState : classNames.itemSelectable}\" \n data-item \n data-id=\"${self.selectedOption?.id !== undefined ? self.selectedOption?.id : self.choice.getValue().id}\" \n data-value=\"${self.selectedOption?.value !== undefined ? self.selectedOption?.value : self.choice.getValue().value}\" \n ${data.disabled ? 'aria-disabled=\"true\"' : ''}>\n <span>${self.selectedOption?.label !== undefined ? self.selectedOption?.label : self.choice.getValue().label}</span>\n <!-- Add your remove button here if needed -->\n </div>\n `);\n }\n },\n input: ({ classNames }) => {\n return template(`\n <input type=\"search\"\n class=\"${classNames.input} ${classNames.inputCloned} ${self.getSizeClass()}\"\n autocomplete=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n role=\"textbox\"\n aria-autocomplete=\"list\"\n aria-label=\"${this.showSearch ? this.searchPlaceholderValue : ''}\" > \n `);\n },\n\n //modifying the template of each item in the options list\n choice: ({ classNames }, data) => {\n return template(`\n <div class=\"${classNames.item} ${classNames.itemChoice} ${self.getSizeClass()} \n ${data.selected || self.selectedOption?.value === data.value || self.getPreSelected(self)?.value === data.value ? 'selected' : ''} \n ${data.placeholder ? classNames.placeholder : ''} \n ${data.disabled ? classNames.itemDisabled : classNames.itemSelectable} \n role=\"${data.groupId && data.groupId > 0 ? 'treeitem' : 'option'}\"\n data-choice ${data.disabled ? 'data-choice-disabled aria-disabled=\"true\"' : 'data-choice-selectable'} data-id=\"${data.id}\"\n data-value=\"${data.value}\"\n data-select-text=\"${this.config.itemSelectText}\">\n <span>${data.label}</span>\n ${data.selected || self.selectedOption?.value === data.value || self.getPreSelected(self)?.value === data.value ? '<ifx-icon icon=\"check16\"></ifx-icon>' : ''}\n </div>\n `);\n },\n };\n },\n }),\n );\n\n //set select options\n this.setChoices(this.options, 'value', 'label', true);\n //set custom event listener to listen for search input\n self.addSearchEventListener(self, this.choice);\n } else {\n // handle the case when the element is neither an HTMLInputElement nor an HTMLSelectElement\n }\n }\n\n private addEventListenersToHandleCustomFocusAndActiveState() {\n const div = this.root.querySelector('.ifx-choices__wrapper') as HTMLDivElement;\n\n if (!div) {\n console.error('.ifx-choices__wrapper not found');\n return;\n }\n\n div.tabIndex = 0;\n\n div.addEventListener('focus', function () {\n if (!this.classList.contains('disabled')) {\n this.classList.add('focus');\n }\n });\n\n div.addEventListener('blur', function () {\n this.classList.remove('focus');\n });\n }\n\n private addSearchEventListener(self, choiceElement: ChoicesJs) {\n choiceElement.passedElement.element.addEventListener(\n 'search',\n function (event: CustomEvent) {\n self.ifxInput.emit(event.detail.value);\n },\n false,\n );\n return choiceElement;\n }\n\n private destroy() {\n if (this.element) {\n this.element = null;\n }\n\n if (this.choice) {\n this.choice.destroy();\n this.choice = null;\n }\n }\n\n //get selected values from input array\n private getPreSelected(self) {\n const optionsArray: any[] = Array.isArray(self.options) ? self.options : JSON.parse(self.options);\n return optionsArray.find(option => option.selected === true) || null;\n }\n\n //set previously marked as selected items in the input array to unselected and select new ones\n private setPreSelected(newValue) {\n const optionsArray: any[] = Array.isArray(this.options) ? this.options : JSON.parse(this.options);\n\n this.options = optionsArray.map(obj => {\n return {\n ...obj,\n selected: obj.value === newValue\n };\n });\n }\n\n //setting the value that gets displayed in the select at component start (either the value prop or a placeholder)\n private createSelectOptions(ifxOptions): Array<HTMLStencilElement> {\n if (this.value !== 'undefined' || this.selectedOption?.value !== '') {\n let options;\n if (isJSONParseable(ifxOptions)) {\n options = [...JSON.parse(ifxOptions)];\n } else if (Array.isArray(ifxOptions) || typeof ifxOptions === 'object') {\n options = [...ifxOptions];\n }\n const optionValueBasedOnAvailableOptions = options?.find(option => option.value === this.value || this.selectedOption?.value);\n\n if (optionValueBasedOnAvailableOptions) {\n return [<option value={optionValueBasedOnAvailableOptions.value}>{optionValueBasedOnAvailableOptions.label}</option>];\n }\n }\n\n // Assign a unique id for the placeholder\n return this.placeholder !== 'false' ? [<option value=\"\">{this.placeholderValue}</option>] : [<option value=\"\"></option>];\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { P as Pagination, d as defineCustomElement$1 } from './p-06a50bfc.js';
1
+ import { P as Pagination, d as defineCustomElement$1 } from './p-81357e99.js';
2
2
 
3
3
  const IfxPagination = Pagination;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { C as Choices, d as defineCustomElement$1 } from './p-25e6cbc8.js';
1
+ import { C as Choices, d as defineCustomElement$1 } from './p-b9024e1a.js';
2
2
 
3
3
  const IfxSelect = Choices;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -3,7 +3,7 @@ import { d as defineCustomElement$7 } from './p-cc820c25.js';
3
3
  import { d as defineCustomElement$6 } from './p-0d986658.js';
4
4
  import { d as defineCustomElement$5 } from './p-a2411b44.js';
5
5
  import { d as defineCustomElement$4 } from './p-96fbc3db.js';
6
- import { d as defineCustomElement$3 } from './p-25e6cbc8.js';
6
+ import { d as defineCustomElement$3 } from './p-b9024e1a.js';
7
7
  import { d as defineCustomElement$2 } from './p-d5a199fb.js';
8
8
 
9
9
  const setFilterCss = "";
@@ -8,8 +8,8 @@ import { d as defineCustomElement$7 } from './p-77b40c27.js';
8
8
  import { d as defineCustomElement$6 } from './p-a2411b44.js';
9
9
  import { d as defineCustomElement$5 } from './p-6a771687.js';
10
10
  import { d as defineCustomElement$4 } from './p-56db9d3e.js';
11
- import { d as defineCustomElement$3 } from './p-06a50bfc.js';
12
- import { d as defineCustomElement$2 } from './p-25e6cbc8.js';
11
+ import { d as defineCustomElement$3 } from './p-81357e99.js';
12
+ import { d as defineCustomElement$2 } from './p-b9024e1a.js';
13
13
 
14
14
  const ButtonKeys = ['disabled', 'variant', 'size', 'target', 'color', 'text'];
15
15
 
@@ -1,7 +1,7 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h } from './p-4c09147f.js';
2
2
  import { d as defineCustomElement$3 } from './p-a2411b44.js';
3
3
  import { d as defineCustomElement$2 } from './p-6a771687.js';
4
- import { d as defineCustomElement$1 } from './p-25e6cbc8.js';
4
+ import { d as defineCustomElement$1 } from './p-b9024e1a.js';
5
5
 
6
6
  const paginationCss = "@charset \"UTF-8\";:root{--ifx-font-family:\"Source Sans 3\";font-family:var(--ifx-font-family, sans-serif)}:host{display:inline-flex}.container{display:inline-flex;justify-content:center;align-items:center;gap:32px;font-family:var(--ifx-font-family)}.container .items__per-page-wrapper{display:flex;align-items:center;gap:16px}.container .items__per-page-wrapper .items__per-page-label{color:#1D1D1D;font-size:14px;font-style:normal;font-weight:600;line-height:20px}.container .items__per-page-wrapper .items__per-page-field{display:flex;flex-direction:column;align-items:flex-start}.container .items__per-page-wrapper .items__per-page-field ifx-select{width:92px}.container .items__total-wrapper{display:flex;justify-content:center;align-items:center;gap:12px}.container .items__total-wrapper .items__total-button{display:flex;width:40px;height:40px;justify-content:center;align-items:center;border-radius:100px;border:1px solid #BFBBBB;background:#FFF}.container .items__total-wrapper .page__numbers-wrapper{display:flex;justify-content:center;align-items:center;gap:12px}.container .items__total-wrapper .page__numbers-wrapper .page__number-item{display:flex;padding:6px;flex-direction:column;justify-content:center;align-items:center;gap:10px;border-radius:100px}.container .items__total-wrapper .page__numbers-wrapper .page__number-item.active{background-color:#0A8276}.container .items__total-wrapper .page__numbers-wrapper .page__number-item.active span{color:#fff}.container .items__total-wrapper .page__numbers-wrapper .page__number-item:hover{cursor:pointer}.container .items__total-wrapper .page__numbers-wrapper .page__number-item:hover:not(.active){background-color:#ddd}.container .items__total-wrapper .page__numbers-wrapper .page__number-item:active:not(.active){background-color:#575352}.container .items__total-wrapper .page__numbers-wrapper .page__number-item span{display:flex;width:16px;height:16px;flex-direction:column;justify-content:center;color:#1D1D1D;text-align:center;font-size:13px;font-style:normal;font-weight:400;line-height:20px}.pagination{display:flex}.pagination ifx-icon-button:first-of-type{margin-right:12px}.pagination ifx-icon-button:last-of-type{margin-left:12px}a{padding:8px;border-radius:100px}ol{list-style-type:none;padding:0;margin:0;display:inline-flex;align-items:center;gap:12px}li{display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:100px}li:hover:not(.active) a{background-color:#EEEDED}li:active:not(.active) a{background-color:#575352;color:#fff}li.active{background-color:#0A8276}li.active a{color:#fff}li:hover{cursor:pointer}li a{text-decoration:none;display:flex;width:16px;height:16px;flex-direction:column;justify-content:center;color:#1D1D1D;text-align:center;font-size:13px;font-style:normal;font-weight:400;line-height:20px;align-items:center}.prev.disabled,.next.disabled{cursor:default}.prev.disabled:hover,.next.disabled:hover{cursor:default;text-decoration:none}.prev{margin-right:2.5px}.next{margin-left:2.5px}@media (min-width: 400px){li:first-child,li.active-sibling,li.active,li.active+li,li:last-child{display:inline-flex !important;flex-direction:row}li:first-child:nth-last-child(n+8)~li{display:none}li:first-child:nth-last-child(n+8)~li.active-sibling:before{content:\"…\";font-size:13px;display:inline-block;margin-right:6px}li:first-child:nth-last-child(n+8)~li.active+li:after{content:\"…\";font-size:13px;display:inline-block;margin-left:6px}li:first-child:nth-last-child(n+8)~li:nth-last-child(-n+5){display:inline-flex;flex-direction:row}li:first-child:nth-last-child(n+8)~li:nth-last-child(5):before{content:\"…\";font-size:13px;display:inline-block;margin-right:6px}li:first-child:nth-last-child(n+8)~li:nth-child(-n+2):before,li:first-child:nth-last-child(n+8)~li:nth-child(-n+2):after,li:first-child:nth-last-child(n+8)~li:nth-last-child(-n+2):before,li:first-child:nth-last-child(n+8)~li:nth-last-child(-n+2):after,li:first-child:nth-last-child(n+8)~li.active-sibling:nth-last-child(-n+4):before,li:first-child:nth-last-child(n+8)~li.active-sibling:nth-last-child(-n+4):after{display:none !important}li:first-child:nth-last-child(n+8).active~li:nth-last-child(-n+5),li:first-child:nth-last-child(n+8)~li.active~li:nth-last-child(-n+5){display:none}li:first-child:nth-last-child(n+8).active~li:nth-last-child(-n+5):before,li:first-child:nth-last-child(n+8)~li.active~li:nth-last-child(-n+5):before{display:none}li:first-child:nth-last-child(n+8).active~li:nth-child(-n+5),li:first-child:nth-last-child(n+8)~li.active~li:nth-child(-n+5){display:inline-flex !important;flex-direction:row}li:first-child:nth-last-child(n+8).active~li:nth-child(-n+4):after,li:first-child:nth-last-child(n+8)~li.active~li:nth-child(-n+4):after{display:none}li:first-child:nth-last-child(n+8).active~li:nth-child(5):after,li:first-child:nth-last-child(n+8)~li.active~li:nth-child(5):after{content:\"…\";font-size:13px;display:inline-block;margin-left:6px}li:first-child:nth-last-child(n+8).active:before,li:first-child:nth-last-child(n+8).active:after,li:first-child:nth-last-child(n+8)~li.active:before,li:first-child:nth-last-child(n+8)~li.active:after{display:none}}";
7
7
  const IfxPaginationStyle0 = paginationCss;
@@ -25,7 +25,12 @@ const Pagination = /*@__PURE__*/ proxyCustomElement(class Pagination extends H {
25
25
  this.total = 1;
26
26
  }
27
27
  setItemsPerPage(e) {
28
- this.itemsPerPage = parseInt(e.detail.label);
28
+ if (e.detail) {
29
+ this.itemsPerPage = parseInt(e.detail.label);
30
+ }
31
+ else {
32
+ this.itemsPerPage = 10;
33
+ }
29
34
  }
30
35
  componentDidLoad() {
31
36
  this.calculateVisiblePageIndices();
@@ -145,7 +150,7 @@ const Pagination = /*@__PURE__*/ proxyCustomElement(class Pagination extends H {
145
150
  this.initPagination(paginationElement);
146
151
  }
147
152
  render() {
148
- return (h("div", { key: '81ad7ccfd09a8910f5d2518dcd91b99cc14f41d1', "aria-label": 'a pagination', "aria-value": this.currentPage, class: "container" }, h("div", { key: 'b7a7bf4568fc3abd9b490752b629b592c6117e36', class: 'items__per-page-wrapper' }, h("div", { key: 'ee3705aa50d5f280441a1103180332aed19f6b34', class: 'items__per-page-label' }, "Results per Page"), h("div", { key: '4209e3ea87f521c521058abce05b84d142ff48a5', class: 'items__per-page-field' }, h("ifx-select", { key: '3e08099f17c94e8da0af423b76efccc42d67ee3d', value: 'undefined', size: 's', placeholder: 'false', "show-search": 'false', "search-placeholder-value": 'Search...', disabled: false, error: false, "error-message": 'Error', label: '', "placeholder-value": 'Placeholder', options: '[{"value":"ten","label":"10","selected":true}, {"value":"Twenty","label":"20","selected":false}, {"value":"Thirty","label":"30","selected":false}]' }))), h("div", { key: '6263309862456698c883c6657ca4a75de829a6fb', class: 'items__total-wrapper' }, h("div", { key: 'ae8646f4047bb64b18742cc6eed7333950ae3411', class: 'page__numbers-wrapper' }, h("div", { key: '9e79df9d12fed9c83e2cece8fde43804bb629295', class: "pagination" }, h("ifx-icon-button", { key: 'dcca426cb38bdfc7a659298f07b01ecbb0dfd0b4', variant: 'secondary', class: "prev", color: 'primary', icon: 'arrow-left-24' }), h("ol", { key: '4cfaa5390921cc509101ef693acec9b6a830ce73' }, this.numberOfPages.map((item) => h("li", { class: `${this.internalPage === item ? 'active' : ""}` }, h("a", { href: undefined }, item)))), h("ifx-icon-button", { key: '25a9a800f8d5bc4bf8c2bc90a2ddb985cd474699', class: "next", variant: 'secondary', color: 'primary', icon: 'arrow-right-24' }))))));
153
+ return (h("div", { key: 'fa57bfbd14b7ccfb8dbd5ef450c7db53a98bce50', "aria-label": 'a pagination', "aria-value": this.currentPage, class: "container" }, h("div", { key: 'f4eff578aa7189bbb52c0ac161faadd6a9ca2774', class: 'items__per-page-wrapper' }, h("div", { key: 'c199973fbd9d3518d21634fda3bc695bda392a24', class: 'items__per-page-label' }, "Results per Page"), h("div", { key: '3f8318383647cf41d67b5b1a0fd9c387dffe0e50', class: 'items__per-page-field' }, h("ifx-select", { key: '1cc33baebbb0d8930c8314ee5f39dbc393984d53', value: 'undefined', size: 's', placeholder: 'false', "show-search": 'false', "search-placeholder-value": 'Search...', disabled: false, error: false, "error-message": 'Error', label: '', "placeholder-value": 'Placeholder', options: '[{"value":"ten","label":"10","selected":true}, {"value":"Twenty","label":"20","selected":false}, {"value":"Thirty","label":"30","selected":false}]' }))), h("div", { key: '992b8b3219a3017fafc44d7d66be2d5997758945', class: 'items__total-wrapper' }, h("div", { key: 'ec4061b565a4dcd5fbe20fa655315328305bee4e', class: 'page__numbers-wrapper' }, h("div", { key: '67dfe394137b0edb704afe8367ed87697bbb52ee', class: "pagination" }, h("ifx-icon-button", { key: 'd6207f9becee00b57bda596fc7117bf4f757c10f', variant: 'secondary', class: "prev", color: 'primary', icon: 'arrow-left-24' }), h("ol", { key: 'c5a7300ffb926ab41a77a0e673cde2b85c8e196c' }, this.numberOfPages.map((item) => h("li", { class: `${this.internalPage === item ? 'active' : ""}` }, h("a", { href: undefined }, item)))), h("ifx-icon-button", { key: 'f2f96994c6cbd1b7c401eb9d81228d4b5dc7cfde', class: "next", variant: 'secondary', color: 'primary', icon: 'arrow-right-24' }))))));
149
154
  }
150
155
  get el() { return this; }
151
156
  static get style() { return IfxPaginationStyle0; }
@@ -187,4 +192,4 @@ function defineCustomElement() {
187
192
 
188
193
  export { Pagination as P, defineCustomElement as d };
189
194
 
190
- //# sourceMappingURL=p-06a50bfc.js.map
195
+ //# sourceMappingURL=p-81357e99.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-81357e99.js","mappings":";;;;;AAAA,MAAM,aAAa,GAAG,yjKAAyjK,CAAC;AAChlK,4BAAe,aAAa;;MCOf,UAAU;;;;;;;;QAWb,mBAAc,GAAG,UAAU,CAAA;QAC3B,iBAAY,GAAG,QAAQ,CAAA;QACvB,yBAAoB,GAAG,gBAAgB,CAAA;QACvC,aAAQ,GAAG,YAAY,CAAC;2BATF,CAAC;4BACC,CAAC;4BACD,EAAE;6BACC,EAAE;qBACb,CAAC;;IAQzB,eAAe,CAAC,CAAC;QACf,IAAG,CAAC,CAAC,MAAM,EAAE;YACX,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;SAC7C;aAAM;YACL,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;SACxB;KACF;IAED,gBAAgB;QACd,IAAI,CAAC,2BAA2B,EAAE,CAAA;QAClC,IAAI,iBAAiB,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;QACxE,IAAI,SAAS,G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C,uBAAuB,uBAAuB,EACzD,4DAAK,KAAK,EAAC,uBAAuB,IAChC,mEACE,KAAK,EAAC,WAAW,EACjB,IAAI,EAAC,GAAG,EACR,WAAW,EAAC,OAAO,iBACP,OAAO,8BACM,WAAW,EACpC,QAAQ,EAAE,KAAK,EACf,KAAK,EAAE,KAAK,mBACE,OAAO,EACrB,KAAK,EAAC,EAAE,uBACU,aAAa,EAC/B,OAAO,EAAC,oJAAoJ,GACjJ,CACT,CACF,EACN,4DAAK,KAAK,EAAC,sBAAsB,IAC/B,4DAAK,KAAK,EAAC,uBAAuB,IAChC,4DAAK,KAAK,EAAC,YAAY,IACrB,wEAAiB,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,SAAS,EAAC,IAAI,EAAC,eAAe,GAAmB,EACzG,6DACG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,KAC3B,UAAI,KAAK,EAAE,GAAG,IAAI,CAAC,YAAY,KAAK,IAAI,GAAG,QAAQ,GAAG,EAAE,EAAE,IAAE,SAAG,IAAI,EAAE,SAAS,IAAG,IAAI,CAAK,CAAK,CAAC,CAC/F,EACL,wEAAiB,KAAK,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,SAAS,EAAC,IAAI,EAAC,gBAAgB,GAAmB,CACtG,CACF,CACF,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/pagination/pagination.scss?tag=ifx-pagination&encapsulation=shadow","src/components/pagination/pagination.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n:host {\n display: inline-flex;\n}\n\n.container {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n gap: 32px;\n font-family: var(--ifx-font-family);\n\n\n & .items__per-page-wrapper {\n display: flex;\n align-items: center;\n gap: 16px;\n\n & .items__per-page-label {\n color: #1D1D1D;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: 20px;\n }\n\n & .items__per-page-field {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n\n & ifx-select {\n width: 92px;\n }\n }\n }\n\n & .items__total-wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 12px;\n\n & .items__total-button {\n display: flex;\n width: 40px;\n height: 40px;\n justify-content: center;\n align-items: center;\n border-radius: 100px;\n border: 1px solid #BFBBBB;\n background: #FFF;\n }\n\n & .page__numbers-wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 12px;\n\n & .page__number-item {\n display: flex;\n padding: 6px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 10px;\n border-radius: 100px;\n\n &.active {\n background-color: #0A8276;\n\n & span {\n color: #fff;\n }\n }\n\n &:hover {\n cursor: pointer;\n }\n\n &:hover:not(.active) {\n background-color: #ddd;\n\n }\n\n &:active:not(.active) {\n background-color: #575352;\n }\n\n & span {\n display: flex;\n width: 16px;\n height: 16px;\n flex-direction: column;\n justify-content: center;\n color: #1D1D1D;\n text-align: center;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n }\n }\n }\n }\n}\n\n\n.pagination {\n display: flex;\n\n & ifx-icon-button:first-of-type {\n margin-right: 12px;\n }\n\n & ifx-icon-button:last-of-type {\n margin-left: 12px;\n }\n}\n\na {\n padding: 8px;\n border-radius: 100px;\n}\n\nol {\n list-style-type: none;\n padding: 0;\n margin: 0;\n display: inline-flex;\n align-items: center;\n gap: 12px;\n}\n\nli {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n border-radius: 100px;\n\n &:hover:not(.active) {\n & a {\n background-color: #EEEDED;\n }\n }\n\n &:active:not(.active) {\n & a {\n background-color: #575352;\n color: #fff;\n }\n }\n\n &.active {\n background-color: #0A8276;\n\n & a {\n color: #fff;\n }\n }\n\n &:hover {\n cursor: pointer;\n }\n\n & a {\n text-decoration: none;\n display: flex;\n width: 16px;\n height: 16px;\n flex-direction: column;\n justify-content: center;\n color: #1D1D1D;\n text-align: center;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n align-items: center;\n }\n}\n\n.prev,\n.next {\n &.disabled {\n cursor: default;\n\n &:hover {\n cursor: default;\n text-decoration: none;\n }\n }\n}\n\n.prev {\n margin-right: 2.5px;\n}\n\n.next {\n margin-left: 2.5px;\n}\n\n\n@mixin ellipsis($before: true) {\n content: \"\\2026\";\n font-size: 13px;\n display: inline-block;\n\n @if($before) {\n margin-right: 6px;\n }\n\n @else {\n margin-left: 6px;\n }\n}\n\n\n// @media(max-width:460px) {\n// li {\n\n// &:first-child,\n// &.active,\n// &.active-sibling:nth-last-child(2), // Show second to last child if the last one is active\n// &:last-child {\n// //display: inline-block !important;\n// display: inline-flex !important;\n// flex-direction: row;\n// }\n\n// $how-many-on-ends: 3; // 1,2,3,...,10 || 1,...,8,9,10\n// // There are >= 5 pages\n// &:first-child:nth-last-child(n+6) {\n\n// &~li {\n// // Start out with all siblings hidden\n// display: none;\n\n// // Show the last children in the list by default\n// &:nth-last-child(-n+#{$how-many-on-ends}) {\n// //display: inline-block;\n// display: inline-flex;\n// flex-direction: row;\n\n// }\n\n// // The child at the beginning of the last group shows ellipsis for the group\n// &:nth-last-child(#{$how-many-on-ends}) {\n// &:before {\n// @include ellipsis(true);\n// }\n// }\n\n// // The very beginning elements do not need to show ellipsis\n// // The very end elements do not need to show ellipsis\n// }\n\n\n// &.active,\n// &~li.active {\n\n// // Show ellipsis before and after the active element\n// &:before {\n// @include ellipsis(true);\n// }\n// &:after {\n// @include ellipsis(false);\n// }\n\n\n// // If the active element is in the first or last group, don't show ellipsis (siblings will take care of it)\n// &:nth-child(-n+#{$how-many-on-ends - 1}),\n// &:nth-last-child(-n+#{$how-many-on-ends - 1}) {\n// &:before, &:after {\n// display: none;\n// }\n// }\n\n// // Hide the last group if \"active\" comes before them\n// &~li:nth-last-child(-n+#{$how-many-on-ends}) {\n// display: none;\n// }\n\n// // Show the first group together if \"active\" comes before them\n// &~li:nth-child(-n+#{$how-many-on-ends}) {\n// //display: inline-block;\n// display: inline-flex;\n// flex-direction: row;\n// }\n\n// // If \"active\" is before the last member in the group, don't show ellipsis\n// &~li:nth-child(-n+#{$how-many-on-ends - 1}) {\n// &:after {\n// display: none;\n// }\n// }\n\n\n// // The child at the end of the first group shows ellipsis for the group\n// &~li:nth-child(#{$how-many-on-ends}) {\n// &:after {\n// @include ellipsis(false);\n// }\n// }\n// }\n// }\n// }\n// }\n\n@media (min-width: 400px) {\n li {\n\n &:first-child,\n &.active-sibling,\n &.active,\n &.active+li,\n &:last-child {\n //display: inline-block!important;\n display: inline-flex !important;\n flex-direction: row;\n }\n\n // There are >= 7 pages\n &:first-child:nth-last-child(n+8) {\n $how-many-on-ends: 5; // 1,2,3,4,5,...,10 || 1,...6,7,8,9,10\n\n &~li {\n // Start out with all siblings hidden\n display: none;\n\n // Show ellipsis before the previous one\n &.active-sibling:before {\n @include ellipsis(true);\n }\n\n // Show ellipsis after the next one\n &.active+li:after {\n @include ellipsis(false);\n }\n\n // Show the last children in the list by default\n &:nth-last-child(-n+#{$how-many-on-ends}) {\n //display: inline-block;\n display: inline-flex;\n flex-direction: row;\n }\n\n // The child at the beginning of the last group shows ellipsis for the group\n &:nth-last-child(#{$how-many-on-ends}) {\n &:before {\n @include ellipsis(true);\n }\n }\n\n // The very beginning elements do not need to show ellipsis\n &:nth-child(-n+#{$how-many-on-ends - 3}),\n // The very end elements do not need to show ellipsis\n &:nth-last-child(-n+#{$how-many-on-ends - 3}),\n // Even if it's a sibling to \"active\"\n &.active-sibling:nth-last-child(-n+#{$how-many-on-ends - 1}) {\n\n &:before,\n &:after {\n display: none !important;\n }\n }\n }\n\n &.active,\n &~li.active {\n\n // Hide the last group if \"active\" comes before them\n &~li:nth-last-child(-n+#{$how-many-on-ends}) {\n display: none;\n\n // If there is overlap, the element will show, but hide it's ellipsis\n &:before {\n display: none;\n }\n }\n\n // Show the first group together if \"active\" comes before them\n &~li:nth-child(-n+#{$how-many-on-ends}) {\n //display: inline-block;\n display: inline-flex !important;\n flex-direction: row;\n }\n\n // If \"active\" is before the last member in the group, don't show ellipsis\n &~li:nth-child(-n+#{$how-many-on-ends - 1}) {\n &:after {\n display: none;\n }\n }\n\n\n // The child at the end of the first group shows ellipsis for the group\n &~li:nth-child(#{$how-many-on-ends}) {\n &:after {\n @include ellipsis(false);\n }\n }\n\n // \"active\" should never show ellipsis\n &:before,\n &:after {\n display: none;\n }\n }\n }\n }\n}","import { Component, h, Element, Event, EventEmitter, Prop, State, Listen } from '@stencil/core';\n \n\n@Component({\n tag: 'ifx-pagination',\n styleUrl: 'pagination.scss',\n shadow: true\n})\nexport class Pagination {\n @Element() el;\n @Event() ifxPageChange: EventEmitter;\n @Event() ifxNextPage: EventEmitter;\n @Event() ifxPrevPage: EventEmitter;\n @Prop() currentPage: number = 0;\n @State() internalPage: number = 1;\n @State() itemsPerPage: number = 10;\n @State() numberOfPages: number[] = [];\n @Prop() total: number = 1;\n\n private CLASS_DISABLED = \"disabled\"\n private CLASS_ACTIVE = \"active\"\n private CLASS_SIBLING_ACTIVE = \"active-sibling\"\n private DATA_KEY = \"pagination\";\n\n @Listen('ifxSelect')\n setItemsPerPage(e) {\n if(e.detail) {\n this.itemsPerPage = parseInt(e.detail.label)\n } else { \n this.itemsPerPage = 10;\n }\n }\n\n componentDidLoad() {\n this.calculateVisiblePageIndices()\n var paginationElement = this.el.shadowRoot.querySelector(\".pagination\");\n let leftArrow = paginationElement.querySelector('.prev')\n this.navigateSinglePage(leftArrow, true)\n\n }\n\n calculateNumberOfPages() {\n if (isNaN(this.currentPage)) {\n this.currentPage = 1;\n }\n const total = this.total <= this.itemsPerPage ? this.itemsPerPage : this.total;\n const itemsPerPage = this.itemsPerPage;\n const totalPageNumber = Math.ceil(total / itemsPerPage);\n\n if (this.currentPage <= 0) {\n this.internalPage = 1;\n } else if (this.currentPage > totalPageNumber) {\n this.internalPage = totalPageNumber;\n } else this.internalPage = this.currentPage;\n\n this.numberOfPages = Array.from({ length: totalPageNumber }, (_, index) => index + 1);\n }\n\n componentWillLoad() {\n this.calculateNumberOfPages()\n }\n\n componentDidUpdate() {\n var paginationElement = this.el.shadowRoot.querySelector(\".pagination\");\n var listItems = paginationElement.querySelectorAll(\"li\");\n this.addEventListenersToPageItems(listItems, paginationElement)\n\n if (paginationElement.dataset[this.DATA_KEY] < this.numberOfPages) {\n paginationElement.dataset[this.DATA_KEY] = paginationElement.dataset[this.DATA_KEY];\n } else paginationElement.dataset[this.DATA_KEY] = 0;\n\n this.changePage(paginationElement, false)\n }\n\n componentWillUpdate() {\n this.calculateNumberOfPages()\n }\n\n handleEventEmission(currActive) {\n let currentPage = currActive + 1;\n let totalPages = this.numberOfPages.length;\n let prevPage = currActive === 0 ? null : currActive;\n let nextPage = currActive + 2 > totalPages ? null : currActive + 2;\n let itemsPerPage = this.itemsPerPage\n this.ifxPageChange.emit({ currentPage, totalPages, prevPage, nextPage, itemsPerPage })\n }\n\n addEventListenersToPageItems(listItems, paginationContainer) {\n listItems.forEach((item) => {\n item.addEventListener(\"click\", (e) => {\n var parent = paginationContainer;\n let listItems = parent.querySelectorAll(\"li\");\n parent.dataset[this.DATA_KEY] = Array.from(listItems).indexOf(e.currentTarget)\n this.changePage(parent, false)\n });\n });\n }\n\n initPagination(paginationContainer) {\n var listItems = paginationContainer.querySelectorAll(\"li\");\n\n paginationContainer.dataset[this.DATA_KEY] = Array.from(listItems).indexOf(paginationContainer.querySelector(\".active\"));\n\n paginationContainer.querySelector(\".prev\").addEventListener(\"click\", (e) => this.navigateSinglePage(e, false));\n paginationContainer.querySelector(\".next\").addEventListener(\"click\", (e) => this.navigateSinglePage(e, false));\n\n this.addEventListenersToPageItems(listItems, paginationContainer)\n }\n\n navigateSinglePage(e, initialValue) {\n let el = e;\n if (typeof e.target === 'object') {\n el = e.target\n }\n\n if (!el.classList.contains(this.CLASS_DISABLED)) {\n var parent = el.closest(\".pagination\");\n var currActive = parseInt(parent.dataset[this.DATA_KEY], 10);\n currActive += 1 * (el.classList.contains(\"prev\") ? -1 : 1);\n\n if (currActive === -1) {\n currActive = 0;\n }\n\n parent.dataset[this.DATA_KEY] = currActive;\n this.changePage(parent, initialValue)\n }\n }\n\n changePage(pagination, initialValue) {\n const paginationContainer = pagination;\n var listItems = paginationContainer.querySelectorAll(\"li\");\n var currActive = parseInt(paginationContainer.dataset[this.DATA_KEY], 10);\n\n listItems.forEach((item) => {\n item.classList.remove(this.CLASS_ACTIVE);\n item.classList.remove(this.CLASS_SIBLING_ACTIVE);\n });\n\n if (initialValue && this.internalPage > 1) {\n currActive = Math.floor(this.internalPage - 1);\n paginationContainer.dataset[this.DATA_KEY] = currActive;\n }\n\n this.handleEventEmission(currActive)\n\n listItems[currActive].classList.add(this.CLASS_ACTIVE);\n\n if (currActive === 0) {\n paginationContainer.querySelector(\".prev\").classList.add(this.CLASS_DISABLED);\n paginationContainer.querySelector(\".prev\").disabled = true;\n\n } else {\n listItems[currActive - 1].classList.add(this.CLASS_SIBLING_ACTIVE);\n paginationContainer.querySelector(\".prev\").classList.remove(this.CLASS_DISABLED);\n paginationContainer.querySelector(\".prev\").disabled = false;\n }\n\n if (currActive === (listItems.length - 1)) {\n paginationContainer.querySelector(\".next\").classList.add(this.CLASS_DISABLED);\n paginationContainer.querySelector(\".next\").disabled = true;\n\n } else {\n paginationContainer.querySelector(\".next\").classList.remove(this.CLASS_DISABLED);\n paginationContainer.querySelector(\".next\").disabled = false;\n }\n }\n\n calculateVisiblePageIndices() {\n var paginationElement = this.el.shadowRoot.querySelector(\".pagination\");\n this.initPagination(paginationElement)\n }\n\n render() {\n return (\n <div aria-label='a pagination' aria-value={this.currentPage} class=\"container\">\n <div class='items__per-page-wrapper'>\n <div class='items__per-page-label'>Results per Page</div>\n <div class='items__per-page-field'>\n <ifx-select\n value='undefined'\n size='s'\n placeholder='false'\n show-search='false'\n search-placeholder-value='Search...'\n disabled={false}\n error={false}\n error-message='Error'\n label=''\n placeholder-value='Placeholder'\n options='[{\"value\":\"ten\",\"label\":\"10\",\"selected\":true}, {\"value\":\"Twenty\",\"label\":\"20\",\"selected\":false}, {\"value\":\"Thirty\",\"label\":\"30\",\"selected\":false}]' >\n </ifx-select>\n </div>\n </div>\n <div class='items__total-wrapper'>\n <div class='page__numbers-wrapper'>\n <div class=\"pagination\">\n <ifx-icon-button variant='secondary' class=\"prev\" color='primary' icon='arrow-left-24'></ifx-icon-button>\n <ol>\n {this.numberOfPages.map((item) =>\n <li class={`${this.internalPage === item ? 'active' : \"\"}`}><a href={undefined}>{item}</a></li>)}\n </ol>\n <ifx-icon-button class=\"next\" variant='secondary' color='primary' icon='arrow-right-24'></ifx-icon-button>\n </div>\n </div>\n </div>\n </div>\n );\n }\n}"],"version":3}
@@ -6831,7 +6831,7 @@ function isJSONParseable(str) {
6831
6831
  }
6832
6832
  }
6833
6833
 
6834
- const selectCss = ":root{--ifx-font-family:\"Source Sans 3\";font-family:var(--ifx-font-family, sans-serif)}.ifx-select-container{box-sizing:border-box;font-family:var(--ifx-font-family);}.ifx-select-container.small-select{height:36px}.ifx-select-container.medium-select{height:40px}.ifx-select-container:hover{cursor:pointer}.ifx-select-container .ifx-label-wrapper{font-size:1rem;line-height:1.5rem;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;max-width:100%;overflow:hidden}.ifx-select-container .ifx-error-message-wrapper{color:#CD002F;font-size:0.75rem;line-height:1rem;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;max-width:100%;overflow:hidden}.ifx-select-container .ifx-choices__wrapper{background-color:#FFFFFF;box-sizing:border-box;position:relative;display:flex;align-items:center;border:1px solid #8D8786;border-radius:1px;font-weight:400;font-style:normal}.ifx-select-container .ifx-choices__wrapper.small-select{height:36px;line-height:20px;padding:8px 12px;font-size:0.875rem;line-height:1.25rem}.ifx-select-container .ifx-choices__wrapper.medium-select{height:40px;line-height:24px;padding:8px 16px;font-size:1rem;line-height:1.5rem}.ifx-select-container .ifx-choices__wrapper.disabled{background:#EEEDED;color:#575352;border-color:#575352;cursor:default;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ifx-select-container .ifx-choices__wrapper.disabled .ifx-choices__icon-wrapper-down:hover{cursor:default}.ifx-select-container .ifx-choices__wrapper.error{border-color:#CD002F}.ifx-select-container .ifx-choices__wrapper:hover:not(.focus,:focus){border-color:#575352}.ifx-select-container .ifx-choices__wrapper.active{border-color:#0A8276 !important}.ifx-select-container .ifx-choices__wrapper.active .ifx-choices__icon-wrapper-up{display:flex;align-items:center;justify-content:center;padding-left:8px}.ifx-select-container .ifx-choices__wrapper.active .ifx-choices__icon-wrapper-down{display:none}.ifx-select-container .ifx-choices__wrapper:focus-visible:not(.active):not(:active){outline:none}.ifx-select-container .ifx-choices__wrapper:focus-visible:not(.active):not(:active)::before{content:\"\";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:50%;left:50%;transform:translate(-50%, -50%);border:2px solid #0A8276;border-radius:2px}.ifx-select-container .ifx-choices__wrapper:focus:not(.active,:active):not(.disabled)::before{content:\"\";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:50%;left:50%;transform:translate(-50%, -50%)}.ifx-select-container .ifx-choices__wrapper .ifx-choices__icon-wrapper-up{display:none}.ifx-select-container .ifx-choices__wrapper .ifx-choices__icon-wrapper-up:hover{cursor:pointer}.ifx-select-container .ifx-choices__wrapper .ifx-choices__icon-wrapper-down{display:flex;align-items:center;justify-content:center;padding-left:8px}.ifx-select-container .ifx-choices__wrapper .ifx-choices__icon-wrapper-down:hover{cursor:pointer}.ifx-select-container .ifx-choices__wrapper .ifx-choices__icon-wrapper-delete{display:none}@media (min-width: 180px){.ifx-select-container .ifx-choices__wrapper .ifx-choices__icon-wrapper-delete{display:flex;align-items:center;justify-content:center}}.ifx-select-container .choices{width:100%}.ifx-select-container .choices:focus{outline:none}.choices .ifx-select-container.is-focused{outline:none}.ifx-select-container .choices:last-child{margin-bottom:0}.ifx-select-container .choices.is-disabled .choices__inner,.ifx-select-container .choices.is-disabled .choices__input{cursor:default;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ifx-select-container .choices.is-disabled .choices__item{cursor:default;color:#575352}.ifx-select-container .choices [hidden]{display:none !important}.ifx-select-container .choices[data-type*=select-one]{cursor:pointer}.ifx-select-container .choices[data-type*=select-one] .choices__input{display:block;width:100%;padding:8px 16px;border-bottom:1px solid #8D8786;background-color:#ffffff;margin:0;font-style:normal;font-weight:400}.ifx-select-container .choices[data-type*=select-one] .choices__input.small-select{font-size:0.875rem;line-height:1.25rem}.ifx-select-container .choices[data-type*=select-one] .choices__input.medium-select{font-size:1rem;line-height:1.5rem}.ifx-select-container .choices[data-type*=select-one] .choices__single-button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);padding:0;background-size:8px;position:absolute;top:50%;right:0;margin-top:-10px;margin-right:25px;height:20px;width:20px;border-radius:10em;opacity:0.5}.ifx-select-container .choices[data-type*=select-one] .choices__single-button:hover,.ifx-select-container .choices[data-type*=select-one] .choices__single-button:focus{opacity:1}.ifx-select-container .choices[data-type*=select-one] .choices__single-button:focus{box-shadow:0px 0px 0px 2px #0A8276}.ifx-select-container .choices[data-type*=select-one] .choices__item[data-value=\"\"] .choices__single-button{display:none}.ifx-select-container .choices[data-type*=select-one].is-open:after{margin-top:-7.5px}.ifx-select-container .choices[data-type*=select-one][dir=rtl]:after{left:11.5px;right:auto}.ifx-select-container .choices[data-type*=select-one][dir=rtl] .choices__single-button{right:auto;left:0;margin-left:25px;margin-right:0}.ifx-select-container .choices[data-type*=select-multiple]{cursor:pointer}.ifx-select-container .choices[data-type*=select-multiple] .choices__input{display:block;width:100%;margin:0}.ifx-select-container .choices[data-type*=select-multiple] .choices__inner,.ifx-select-container .choices[data-type*=text] .choices__inner{cursor:text}.ifx-select-container .choices[data-type*=select-multiple] .choices__button,.ifx-select-container .choices[data-type*=text] .choices__button{position:relative;display:inline-block;margin-top:0;margin-right:-4px;margin-bottom:0;margin-left:8px;padding-left:16px;border-left:1px solid #0A8276;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);background-size:8px;width:8px;line-height:1;opacity:0.75;border-radius:0}.ifx-select-container .choices[data-type*=select-multiple] .choices__button:hover,.ifx-select-container .choices[data-type*=select-multiple] .choices__button:focus,.ifx-select-container .choices[data-type*=text] .choices__button:hover,.ifx-select-container .choices[data-type*=text] .choices__button:focus{opacity:1}.ifx-select-container .choices__inner{overflow:hidden}.ifx-select-container .is-focused .choices__inner,.ifx-select-container .is-open .choices__inner{border-color:#b7b7b7}.ifx-select-container .is-open .choices__inner{border-radius:2.5px 2.5px 0 0}.ifx-select-container .is-flipped.is-open .choices__inner{border-radius:0 0 2.5px 2.5px}.ifx-select-container .choices__list{margin:0;padding-left:0;list-style:none}.ifx-select-container .choices__list--single .choices__item{width:100%;display:flex;justify-content:space-between}.ifx-select-container .disabled>.choices__list--single .choices__item[data-value=\"\"]{color:#8D8786;}.ifx-select-container .choices__list--multiple .choices__item{display:inline-block;vertical-align:middle;border-radius:20px;padding:4px 10px;font-size:0.75rem;line-height:1rem;font-weight:500;margin-right:3.75px;margin-bottom:3.75px;background-color:#0A8276;border:1px solid #0A8276;color:#FFFFFF;word-break:break-all;box-sizing:border-box}.ifx-select-container .choices__list--multiple .choices__item[data-deletable]{padding-right:5px}.ifx-select-container [dir=rtl] .choices__list--multiple .choices__item{margin-right:0;margin-left:3.75px}.ifx-select-container .choices__list--multiple .choices__item.is-highlighted{background-color:#EEEDED;border:1px solid #0A8276}.ifx-select-container .choices__list--dropdown{visibility:hidden;box-sizing:border-box;position:absolute;width:100%;background-color:#fff;top:100%;margin-top:-1px;overflow:hidden;word-break:break-all;will-change:visibility;box-shadow:0px 0px 16px rgba(29, 29, 29, 0.12);border-radius:1px;margin-top:8px;z-index:1000;left:0}.ifx-select-container .choices__list--dropdown.is-active{visibility:visible}.ifx-select-container .is-open .choices__list--dropdown{border-color:#b7b7b7}.ifx-select-container .is-flipped .choices__list--dropdown{top:auto;bottom:100%;margin-top:0;margin-bottom:-1px;border-radius:0.25rem 0.25rem 0 0}.ifx-select-container .choices__list--dropdown .choices__list{position:relative;max-height:300px;overflow:auto;-webkit-overflow-scrolling:touch;will-change:scroll-position}.ifx-select-container .choices__list--dropdown .choices__item{position:relative;padding:8px 16px;gap:8px;align-items:center;display:flex;justify-content:space-between;font-style:normal;font-weight:400}.ifx-select-container .choices__list--dropdown .choices__item.small-select{font-size:0.875rem;line-height:1.25rem}.ifx-select-container .choices__list--dropdown .choices__item.medium-select{font-size:1rem;line-height:1.5rem}.ifx-select-container .choices__list--dropdown .choices__item.selected{color:#0A8276}.ifx-select-container [dir=rtl] .choices__list--dropdown .choices__item{text-align:right}@media (min-width: 640px){.ifx-select-container .choices__list--dropdown .choices__item--selectable:after{font-size:0.75rem;line-height:1rem;opacity:0;position:absolute;right:10px;top:50%;transform:translateY(-50%)}.ifx-select-container [dir=rtl] .choices__list--dropdown .choices__item--selectable{text-align:right;padding-left:100px;padding-right:10px}.ifx-select-container [dir=rtl] .choices__list--dropdown .choices__item--selectable:after{right:auto;left:10px}}.ifx-select-container .choices__list--dropdown .choices__item--selectable.is-highlighted{background-color:#EEEDED}.ifx-select-container .choices__list--dropdown .choices__item--selectable.is-highlighted.selected{color:#0A8276}.ifx-select-container .choices__list--dropdown .choices__item--selectable:hover{background-color:#EEEDED}.ifx-select-container .choices__list--dropdown .choices__item--selectable:hover.selected{color:#0A8276}.ifx-select-container .choices__list--dropdown .choices__item--selectable.is-highlighted:after{opacity:0.5}.ifx-select-container .choices__item{cursor:default}.ifx-select-container .choices__item--selectable{cursor:pointer}.ifx-select-container .choices__item--disabled{cursor:default;-webkit-user-select:none;-ms-user-select:none;user-select:none;opacity:0.5}.ifx-select-container .choices__heading{font-weight:600;font-size:0.75rem;line-height:1rem;padding:10px;border-bottom:1px solid #f7f7f7;color:#1D1D1D}.ifx-select-container .choices__button{text-indent:-9999px;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer}.ifx-select-container .choices__button:focus{outline:none}.ifx-select-container .choices__single-button{text-indent:-9999px;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer;visibility:hidden}.ifx-select-container .choices__single-button:focus{outline:none}.ifx-select-container .choices__input{display:inline-block;vertical-align:baseline;background-color:#f9f9f9;font-size:0.875rem;line-height:1.25rem;margin-bottom:5px;border:0;border-radius:0;max-width:100%}.ifx-select-container .choices__input--cloned{background-color:transparent}.ifx-select-container .choices__input::-ms-clear{display:none;width:0;height:0}.ifx-select-container .choices__input::-ms-reveal{display:none;width:0;height:0}.ifx-select-container .choices__input::-webkit-search-decoration,.ifx-select-container .choices__input::-webkit-search-cancel-button,.ifx-select-container .choices__input::-webkit-search-results-button,.ifx-select-container .choices__input::-webkit-search-results-decoration{display:none}.ifx-select-container .choices__input:focus{outline:0}.ifx-select-container [dir=rtl] .choices__input{padding-right:2px;padding-left:0}.ifx-select-container .choices__placeholder{opacity:0.5}";
6834
+ const selectCss = ":root{--ifx-font-family:\"Source Sans 3\";font-family:var(--ifx-font-family, sans-serif)}.ifx-select-container{box-sizing:border-box;font-family:var(--ifx-font-family);}.ifx-select-container.small-select{height:36px}.ifx-select-container.medium-select{height:40px}.ifx-select-container:hover{cursor:pointer}.ifx-select-container .ifx-label-wrapper{font-size:1rem;line-height:1.5rem;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;max-width:100%;overflow:hidden}.ifx-select-container .ifx-error-message-wrapper{color:#CD002F;font-size:0.75rem;line-height:1rem;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;max-width:100%;overflow:hidden}.ifx-select-container .ifx-choices__wrapper{background-color:#FFFFFF;box-sizing:border-box;position:relative;display:flex;align-items:center;border:1px solid #8D8786;border-radius:1px;font-weight:400;font-style:normal}.ifx-select-container .ifx-choices__wrapper.small-select{height:36px;line-height:20px;padding:8px 12px;font-size:0.875rem;line-height:1.25rem}.ifx-select-container .ifx-choices__wrapper.medium-select{height:40px;line-height:24px;padding:8px 16px;font-size:1rem;line-height:1.5rem}.ifx-select-container .ifx-choices__wrapper.disabled{background:#EEEDED;color:#575352;border-color:#575352;cursor:default;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ifx-select-container .ifx-choices__wrapper.disabled .ifx-choices__icon-wrapper-down:hover{cursor:default}.ifx-select-container .ifx-choices__wrapper.error{border-color:#CD002F}.ifx-select-container .ifx-choices__wrapper:hover:not(.focus,:focus){border-color:#575352}.ifx-select-container .ifx-choices__wrapper.active{border-color:#0A8276 !important}.ifx-select-container .ifx-choices__wrapper.active .ifx-choices__icon-wrapper-up{display:flex;align-items:center;justify-content:center;padding-left:8px}.ifx-select-container .ifx-choices__wrapper.active .ifx-choices__icon-wrapper-down{display:none}.ifx-select-container .ifx-choices__wrapper:focus-visible:not(.active):not(:active){outline:none}.ifx-select-container .ifx-choices__wrapper:focus-visible:not(.active):not(:active)::before{content:\"\";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:50%;left:50%;transform:translate(-50%, -50%);border:2px solid #0A8276;border-radius:2px}.ifx-select-container .ifx-choices__wrapper:focus:not(.active,:active):not(.disabled)::before{content:\"\";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:50%;left:50%;transform:translate(-50%, -50%)}.ifx-select-container .ifx-choices__wrapper .ifx-choices__icon-wrapper-up{display:none}.ifx-select-container .ifx-choices__wrapper .ifx-choices__icon-wrapper-up:hover{cursor:pointer}.ifx-select-container .ifx-choices__wrapper .ifx-choices__icon-wrapper-down{display:flex;align-items:center;justify-content:center;padding-left:8px}.ifx-select-container .ifx-choices__wrapper .ifx-choices__icon-wrapper-down:hover{cursor:pointer}.ifx-select-container .ifx-choices__wrapper .ifx-choices__icon-wrapper-delete{display:flex;align-items:center;justify-content:center}.ifx-select-container .ifx-choices__wrapper .ifx-choices__icon-wrapper-delete.hide{display:none}.ifx-select-container .choices{width:100%}.ifx-select-container .choices:focus{outline:none}.choices .ifx-select-container.is-focused{outline:none}.ifx-select-container .choices:last-child{margin-bottom:0}.ifx-select-container .choices.is-disabled .choices__inner,.ifx-select-container .choices.is-disabled .choices__input{cursor:default;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ifx-select-container .choices.is-disabled .choices__item{cursor:default;color:#575352}.ifx-select-container .choices [hidden]{display:none !important}.ifx-select-container .choices[data-type*=select-one]{cursor:pointer}.ifx-select-container .choices[data-type*=select-one] .choices__input{display:block;width:100%;padding:8px 16px;border-bottom:1px solid #8D8786;background-color:#ffffff;margin:0;font-style:normal;font-weight:400}.ifx-select-container .choices[data-type*=select-one] .choices__input.small-select{font-size:0.875rem;line-height:1.25rem}.ifx-select-container .choices[data-type*=select-one] .choices__input.medium-select{font-size:1rem;line-height:1.5rem}.ifx-select-container .choices[data-type*=select-one] .choices__single-button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);padding:0;background-size:8px;position:absolute;top:50%;right:0;margin-top:-10px;margin-right:25px;height:20px;width:20px;border-radius:10em;opacity:0.5}.ifx-select-container .choices[data-type*=select-one] .choices__single-button:hover,.ifx-select-container .choices[data-type*=select-one] .choices__single-button:focus{opacity:1}.ifx-select-container .choices[data-type*=select-one] .choices__single-button:focus{box-shadow:0px 0px 0px 2px #0A8276}.ifx-select-container .choices[data-type*=select-one] .choices__item[data-value=\"\"] .choices__single-button{display:none}.ifx-select-container .choices[data-type*=select-one].is-open:after{margin-top:-7.5px}.ifx-select-container .choices[data-type*=select-one][dir=rtl]:after{left:11.5px;right:auto}.ifx-select-container .choices[data-type*=select-one][dir=rtl] .choices__single-button{right:auto;left:0;margin-left:25px;margin-right:0}.ifx-select-container .choices[data-type*=select-multiple]{cursor:pointer}.ifx-select-container .choices[data-type*=select-multiple] .choices__input{display:block;width:100%;margin:0}.ifx-select-container .choices[data-type*=select-multiple] .choices__inner,.ifx-select-container .choices[data-type*=text] .choices__inner{cursor:text}.ifx-select-container .choices[data-type*=select-multiple] .choices__button,.ifx-select-container .choices[data-type*=text] .choices__button{position:relative;display:inline-block;margin-top:0;margin-right:-4px;margin-bottom:0;margin-left:8px;padding-left:16px;border-left:1px solid #0A8276;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);background-size:8px;width:8px;line-height:1;opacity:0.75;border-radius:0}.ifx-select-container .choices[data-type*=select-multiple] .choices__button:hover,.ifx-select-container .choices[data-type*=select-multiple] .choices__button:focus,.ifx-select-container .choices[data-type*=text] .choices__button:hover,.ifx-select-container .choices[data-type*=text] .choices__button:focus{opacity:1}.ifx-select-container .choices__inner{overflow:hidden}.ifx-select-container .is-focused .choices__inner,.ifx-select-container .is-open .choices__inner{border-color:#b7b7b7}.ifx-select-container .is-open .choices__inner{border-radius:2.5px 2.5px 0 0}.ifx-select-container .is-flipped.is-open .choices__inner{border-radius:0 0 2.5px 2.5px}.ifx-select-container .choices__list{margin:0;padding-left:0;list-style:none}.ifx-select-container .choices__list--single .choices__item{width:100%;display:flex;justify-content:space-between}.ifx-select-container .disabled>.choices__list--single .choices__item[data-value=\"\"]{color:#8D8786;}.ifx-select-container .choices__list--multiple .choices__item{display:inline-block;vertical-align:middle;border-radius:20px;padding:4px 10px;font-size:0.75rem;line-height:1rem;font-weight:500;margin-right:3.75px;margin-bottom:3.75px;background-color:#0A8276;border:1px solid #0A8276;color:#FFFFFF;word-break:break-all;box-sizing:border-box}.ifx-select-container .choices__list--multiple .choices__item[data-deletable]{padding-right:5px}.ifx-select-container [dir=rtl] .choices__list--multiple .choices__item{margin-right:0;margin-left:3.75px}.ifx-select-container .choices__list--multiple .choices__item.is-highlighted{background-color:#EEEDED;border:1px solid #0A8276}.ifx-select-container .choices__list--dropdown{visibility:hidden;box-sizing:border-box;position:absolute;width:100%;background-color:#fff;top:100%;margin-top:-1px;overflow:hidden;word-break:break-all;will-change:visibility;box-shadow:0px 0px 16px rgba(29, 29, 29, 0.12);border-radius:1px;margin-top:8px;z-index:1000;left:0}.ifx-select-container .choices__list--dropdown.is-active{visibility:visible}.ifx-select-container .is-open .choices__list--dropdown{border-color:#b7b7b7}.ifx-select-container .is-flipped .choices__list--dropdown{top:auto;bottom:100%;margin-top:0;margin-bottom:-1px;border-radius:0.25rem 0.25rem 0 0}.ifx-select-container .choices__list--dropdown .choices__list{position:relative;max-height:300px;overflow:auto;-webkit-overflow-scrolling:touch;will-change:scroll-position}.ifx-select-container .choices__list--dropdown .choices__item{position:relative;padding:8px 16px;gap:8px;align-items:center;display:flex;justify-content:space-between;font-style:normal;font-weight:400}.ifx-select-container .choices__list--dropdown .choices__item.small-select{font-size:0.875rem;line-height:1.25rem}.ifx-select-container .choices__list--dropdown .choices__item.medium-select{font-size:1rem;line-height:1.5rem}.ifx-select-container .choices__list--dropdown .choices__item.selected{color:#0A8276}.ifx-select-container [dir=rtl] .choices__list--dropdown .choices__item{text-align:right}@media (min-width: 640px){.ifx-select-container .choices__list--dropdown .choices__item--selectable:after{font-size:0.75rem;line-height:1rem;opacity:0;position:absolute;right:10px;top:50%;transform:translateY(-50%)}.ifx-select-container [dir=rtl] .choices__list--dropdown .choices__item--selectable{text-align:right;padding-left:100px;padding-right:10px}.ifx-select-container [dir=rtl] .choices__list--dropdown .choices__item--selectable:after{right:auto;left:10px}}.ifx-select-container .choices__list--dropdown .choices__item--selectable.is-highlighted{background-color:#EEEDED}.ifx-select-container .choices__list--dropdown .choices__item--selectable.is-highlighted.selected{color:#0A8276}.ifx-select-container .choices__list--dropdown .choices__item--selectable:hover{background-color:#EEEDED}.ifx-select-container .choices__list--dropdown .choices__item--selectable:hover.selected{color:#0A8276}.ifx-select-container .choices__list--dropdown .choices__item--selectable.is-highlighted:after{opacity:0.5}.ifx-select-container .choices__item{cursor:default}.ifx-select-container .choices__item--selectable{cursor:pointer}.ifx-select-container .choices__item--disabled{cursor:default;-webkit-user-select:none;-ms-user-select:none;user-select:none;opacity:0.5}.ifx-select-container .choices__heading{font-weight:600;font-size:0.75rem;line-height:1rem;padding:10px;border-bottom:1px solid #f7f7f7;color:#1D1D1D}.ifx-select-container .choices__button{text-indent:-9999px;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer}.ifx-select-container .choices__button:focus{outline:none}.ifx-select-container .choices__single-button{text-indent:-9999px;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer;visibility:hidden}.ifx-select-container .choices__single-button:focus{outline:none}.ifx-select-container .choices__input{display:inline-block;vertical-align:baseline;background-color:#f9f9f9;font-size:0.875rem;line-height:1.25rem;margin-bottom:5px;border:0;border-radius:0;max-width:100%}.ifx-select-container .choices__input--cloned{background-color:transparent}.ifx-select-container .choices__input::-ms-clear{display:none;width:0;height:0}.ifx-select-container .choices__input::-ms-reveal{display:none;width:0;height:0}.ifx-select-container .choices__input::-webkit-search-decoration,.ifx-select-container .choices__input::-webkit-search-cancel-button,.ifx-select-container .choices__input::-webkit-search-results-button,.ifx-select-container .choices__input::-webkit-search-results-decoration{display:none}.ifx-select-container .choices__input:focus{outline:0}.ifx-select-container [dir=rtl] .choices__input{padding-right:2px;padding-left:0}.ifx-select-container .choices__placeholder{opacity:0.5}";
6835
6835
  const IfxSelectStyle0 = selectCss;
6836
6836
 
6837
6837
  const Choices = /*@__PURE__*/ proxyCustomElement(class Choices extends H {
@@ -6890,6 +6890,7 @@ const Choices = /*@__PURE__*/ proxyCustomElement(class Choices extends H {
6890
6890
  this.options = undefined;
6891
6891
  this.size = 'medium (40px)';
6892
6892
  this.selectedOption = null;
6893
+ this.optionIsSelected = false;
6893
6894
  }
6894
6895
  watchDisabled(newValue) {
6895
6896
  if (newValue) {
@@ -6905,6 +6906,7 @@ const Choices = /*@__PURE__*/ proxyCustomElement(class Choices extends H {
6905
6906
  this.setPreSelected(null);
6906
6907
  this.closeDropdown();
6907
6908
  this.ifxSelect.emit(null);
6909
+ this.optionIsSelected = false;
6908
6910
  }
6909
6911
  async handleChange() {
6910
6912
  this.ifxSelect.emit(this.choice.getValue());
@@ -7001,15 +7003,68 @@ const Choices = /*@__PURE__*/ proxyCustomElement(class Choices extends H {
7001
7003
  this.choice.ajax(fn);
7002
7004
  return this;
7003
7005
  }
7006
+ async handleDeleteIcon() {
7007
+ const width = this.root.offsetWidth;
7008
+ const deleteIconWrapper = this.root.querySelector('.ifx-choices__icon-wrapper-delete');
7009
+ if (deleteIconWrapper) {
7010
+ if (width <= 180) {
7011
+ deleteIconWrapper.classList.add('hide');
7012
+ }
7013
+ else {
7014
+ deleteIconWrapper.classList.remove('hide');
7015
+ }
7016
+ }
7017
+ }
7018
+ handleCloseButton() {
7019
+ if (typeof this.options === 'string') {
7020
+ const optionsToArray = JSON.parse(this.options);
7021
+ const optionIsSelected = optionsToArray.find(option => option.selected === true);
7022
+ if (optionIsSelected) {
7023
+ this.optionIsSelected = true;
7024
+ }
7025
+ else {
7026
+ this.optionIsSelected = false;
7027
+ }
7028
+ }
7029
+ else if (this.options && Array.isArray(this.options)) {
7030
+ const optionIsSelected = this.options.find(option => option.selected === true);
7031
+ if (optionIsSelected) {
7032
+ this.optionIsSelected = true;
7033
+ }
7034
+ else {
7035
+ this.optionIsSelected = false;
7036
+ }
7037
+ }
7038
+ }
7039
+ componentWillLoad() {
7040
+ this.handleCloseButton();
7041
+ }
7042
+ componentWillUpdate() {
7043
+ this.handleCloseButton();
7044
+ }
7045
+ addResizeObserver() {
7046
+ this.resizeObserver = new ResizeObserver(() => {
7047
+ this.handleDeleteIcon();
7048
+ });
7049
+ const componentWrapper = this.root.querySelector('.ifx-choices__wrapper');
7050
+ this.resizeObserver.observe(componentWrapper);
7051
+ }
7004
7052
  componentDidLoad() {
7005
7053
  this.init();
7006
7054
  this.addEventListenersToHandleCustomFocusAndActiveState();
7055
+ this.handleDeleteIcon();
7056
+ this.addResizeObserver();
7007
7057
  }
7008
7058
  componentDidUpdate() {
7009
7059
  this.init();
7060
+ this.handleDeleteIcon();
7010
7061
  }
7011
7062
  disconnectedCallback() {
7012
7063
  this.destroy();
7064
+ if (this.resizeObserver) {
7065
+ this.resizeObserver.disconnect();
7066
+ this.resizeObserver = null;
7067
+ }
7013
7068
  }
7014
7069
  render() {
7015
7070
  const attributes = {
@@ -7021,9 +7076,9 @@ const Choices = /*@__PURE__*/ proxyCustomElement(class Choices extends H {
7021
7076
  // destroy choices element to restore previous dom structure
7022
7077
  // so vdom can replace the element correctly
7023
7078
  this.destroy();
7024
- return (h("div", { key: '8cf47589d945551c72311b4f5455f762f08f7a26', class: `ifx-select-container` }, this.label ? (h("div", { class: "ifx-label-wrapper" }, h("span", null, this.label))) : null, h("div", { key: '2213086b1eb32e79083b2923cad86124fa194ef5', class: `${choicesWrapperClass}
7079
+ return (h("div", { key: 'c41ec36261a1133b438648bc6a564107267c5b1a', class: `ifx-select-container` }, this.label ? (h("div", { class: "ifx-label-wrapper" }, h("span", null, this.label))) : null, h("div", { key: 'dae048e7ad4c6a40bf5c900fb5c2c2e01ea58a4e', class: `${choicesWrapperClass}
7025
7080
  ${this.disabled ? 'disabled' : ''}
7026
- ${this.error ? 'error' : ''}`, onClick: this.disabled ? undefined : () => this.toggleDropdown(), onKeyDown: event => this.handleKeyDown(event) }, h("select", Object.assign({ key: '9a23dd60f211c992ecc3c2891da9ea6d6f118746', disabled: this.disabled }, attributes, { "data-trigger": true, onChange: () => this.handleChange() }), this.createSelectOptions(this.options)), this.selectedOption && (h("div", { key: '426aa5e034a46914a62679e6a5f0fb7368aad56b', class: "ifx-choices__icon-wrapper-delete" }, h("ifx-icon", { key: '68e6983c06284cd6ed5f330d658374772579edb2', icon: "cremove16", onClick: () => this.handleDeleteSelection() }))), h("div", { key: 'a331c9820540932fcd5b39825c1d6d998a4bdf5b', class: "ifx-choices__icon-wrapper-up" }, h("ifx-icon", { key: "icon-up", icon: "chevronup-16" })), h("div", { key: 'da47191d2517942454ebf50f7018d3773b00685a', class: "ifx-choices__icon-wrapper-down" }, h("ifx-icon", { key: "icon-down", icon: "chevron-down-16" }))), this.error ? (h("div", { class: "ifx-error-message-wrapper" }, h("span", null, this.errorMessage))) : null));
7081
+ ${this.error ? 'error' : ''}`, onClick: this.disabled ? undefined : () => this.toggleDropdown(), onKeyDown: event => this.handleKeyDown(event) }, h("select", Object.assign({ key: 'c2ae87cc9b9a9401b9a414acaf9cabd02a8c1a3a', disabled: this.disabled }, attributes, { "data-trigger": true, onChange: () => this.handleChange() }), this.createSelectOptions(this.options)), this.optionIsSelected && (h("div", { key: '19ef95cd95e990f2d8707428e5b5138db7a97a93', class: "ifx-choices__icon-wrapper-delete" }, h("ifx-icon", { key: '4457e333e2c96f26a48eb32978f8146be973c94d', icon: "cremove16", onClick: () => this.handleDeleteSelection() }))), h("div", { key: '0c30abd8c4446d05e05b1d4aa33c264b0b810a6f', class: "ifx-choices__icon-wrapper-up" }, h("ifx-icon", { key: "icon-up", icon: "chevronup-16" })), h("div", { key: '16472c10d36e48a4545d91d5a3431bb8bedeefb7', class: "ifx-choices__icon-wrapper-down" }, h("ifx-icon", { key: "icon-down", icon: "chevron-down-16" }))), this.error ? (h("div", { class: "ifx-error-message-wrapper" }, h("span", null, this.errorMessage))) : null));
7027
7082
  }
7028
7083
  toggleDropdown() {
7029
7084
  const div = this.root.querySelector('.ifx-choices__wrapper');
@@ -7304,6 +7359,7 @@ const Choices = /*@__PURE__*/ proxyCustomElement(class Choices extends H {
7304
7359
  "options": [1025],
7305
7360
  "size": [1],
7306
7361
  "selectedOption": [32],
7362
+ "optionIsSelected": [32],
7307
7363
  "handleChange": [64],
7308
7364
  "highlightItem": [64],
7309
7365
  "unhighlightItem": [64],
@@ -7321,7 +7377,8 @@ const Choices = /*@__PURE__*/ proxyCustomElement(class Choices extends H {
7321
7377
  "clearChoices": [64],
7322
7378
  "clearStore": [64],
7323
7379
  "clearInput": [64],
7324
- "ajax": [64]
7380
+ "ajax": [64],
7381
+ "handleDeleteIcon": [64]
7325
7382
  }, [[5, "mousedown", "handleOutsideClick"]], {
7326
7383
  "disabled": ["watchDisabled"]
7327
7384
  }]);
@@ -7346,4 +7403,4 @@ function defineCustomElement() {
7346
7403
 
7347
7404
  export { Choices as C, defineCustomElement as d };
7348
7405
 
7349
- //# sourceMappingURL=p-25e6cbc8.js.map
7406
+ //# sourceMappingURL=p-b9024e1a.js.map