@infineon/infineon-design-system-stencil 36.0.0--canary.1926.89e102ab50f43d510e7b9312dc5bc975589b12f6.0 → 36.0.0--canary.1926.88662e70adbb01ff9fc529ce945b0628449634b7.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.
- package/dist/cjs/ifx-chip_3.cjs.entry.js +4 -4
- package/dist/cjs/ifx-chip_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-multiselect_2.cjs.entry.js +4 -10
- package/dist/cjs/ifx-multiselect_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-search-field.cjs.entry.js +1 -1
- package/dist/cjs/ifx-search-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-segmented-control.cjs.entry.js +1 -1
- package/dist/cjs/ifx-segmented-control.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-select.cjs.entry.js +1 -1
- package/dist/cjs/ifx-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-spinner_2.cjs.entry.js +1 -1
- package/dist/cjs/ifx-spinner_2.cjs.entry.js.map +1 -1
- package/dist/collection/components/chip/chip.js +4 -4
- package/dist/collection/components/chip/chip.js.map +1 -1
- package/dist/collection/components/search-field/search-field.js +1 -1
- package/dist/collection/components/search-field/search-field.js.map +1 -1
- package/dist/collection/components/segmented-control/segmented-control.js +1 -1
- package/dist/collection/components/segmented-control/segmented-control.js.map +1 -1
- package/dist/collection/components/select/multi-select/multiselect-option.js +4 -10
- package/dist/collection/components/select/multi-select/multiselect-option.js.map +1 -1
- package/dist/collection/components/select/single-select/select.js +1 -1
- package/dist/collection/components/select/single-select/select.js.map +1 -1
- package/dist/collection/components/text-field/text-field.js +1 -1
- package/dist/collection/components/text-field/text-field.js.map +1 -1
- package/dist/components/ifx-chip.js +1 -1
- package/dist/components/ifx-filter-search.js +1 -1
- package/dist/components/ifx-icons-preview.js +1 -1
- package/dist/components/ifx-multiselect-option.js +1 -1
- package/dist/components/ifx-multiselect.js +1 -1
- package/dist/components/ifx-pagination.js +1 -1
- package/dist/components/ifx-search-bar.js +1 -1
- package/dist/components/ifx-search-field.js +1 -1
- package/dist/components/ifx-segmented-control.js +1 -1
- package/dist/components/ifx-segmented-control.js.map +1 -1
- package/dist/components/ifx-select.js +1 -1
- package/dist/components/ifx-set-filter.js +5 -5
- package/dist/components/ifx-table.js +3 -3
- package/dist/components/ifx-template.js +1 -1
- package/dist/components/ifx-templates-ui.js +2 -2
- package/dist/components/ifx-text-field.js +1 -1
- package/dist/components/{p-3138739e.js → p-1bfd69f4.js} +2 -2
- package/dist/components/{p-3138739e.js.map → p-1bfd69f4.js.map} +1 -1
- package/dist/components/{p-1c516dc9.js → p-1c80b52e.js} +2 -2
- package/dist/components/{p-1c516dc9.js.map → p-1c80b52e.js.map} +1 -1
- package/dist/components/{p-cf70732a.js → p-34a36730.js} +2 -2
- package/dist/components/{p-cf70732a.js.map → p-34a36730.js.map} +1 -1
- package/dist/components/{p-b5ab8dee.js → p-3906f639.js} +5 -11
- package/dist/components/p-3906f639.js.map +1 -0
- package/dist/components/{p-a47ca38d.js → p-98c86d16.js} +2 -2
- package/dist/components/{p-a47ca38d.js.map → p-98c86d16.js.map} +1 -1
- package/dist/components/{p-f0693b44.js → p-afd6d4f5.js} +2 -2
- package/dist/components/{p-f0693b44.js.map → p-afd6d4f5.js.map} +1 -1
- package/dist/components/{p-c6dfc658.js → p-b293963f.js} +5 -5
- package/dist/components/p-b293963f.js.map +1 -0
- package/dist/components/{p-76da03ca.js → p-fe3f24e7.js} +2 -2
- package/dist/components/{p-76da03ca.js.map → p-fe3f24e7.js.map} +1 -1
- package/dist/esm/ifx-chip_3.entry.js +4 -4
- package/dist/esm/ifx-chip_3.entry.js.map +1 -1
- package/dist/esm/ifx-multiselect_2.entry.js +4 -10
- package/dist/esm/ifx-multiselect_2.entry.js.map +1 -1
- package/dist/esm/ifx-search-field.entry.js +1 -1
- package/dist/esm/ifx-search-field.entry.js.map +1 -1
- package/dist/esm/ifx-segmented-control.entry.js +1 -1
- package/dist/esm/ifx-segmented-control.entry.js.map +1 -1
- package/dist/esm/ifx-select.entry.js +1 -1
- package/dist/esm/ifx-select.entry.js.map +1 -1
- package/dist/esm/ifx-spinner_2.entry.js +1 -1
- package/dist/esm/ifx-spinner_2.entry.js.map +1 -1
- package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
- package/dist/infineon-design-system-stencil/{p-135110b2.entry.js → p-2e7d87ed.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-135110b2.entry.js.map → p-2e7d87ed.entry.js.map} +1 -1
- package/dist/infineon-design-system-stencil/{p-cd07f70b.entry.js → p-3349d2da.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-cd07f70b.entry.js.map → p-3349d2da.entry.js.map} +1 -1
- package/dist/infineon-design-system-stencil/{p-99faadcf.entry.js → p-5b5c144f.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-99faadcf.entry.js.map → p-5b5c144f.entry.js.map} +1 -1
- package/dist/infineon-design-system-stencil/{p-7619bd75.entry.js → p-676fb63a.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-7619bd75.entry.js.map → p-676fb63a.entry.js.map} +1 -1
- package/dist/infineon-design-system-stencil/p-9149a20a.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-9149a20a.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-6e7b0250.entry.js → p-b6dd2ac0.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-6e7b0250.entry.js.map → p-b6dd2ac0.entry.js.map} +1 -1
- package/package.json +1 -1
- package/dist/components/p-b5ab8dee.js.map +0 -1
- package/dist/components/p-c6dfc658.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-b9c761d3.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-b9c761d3.entry.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../../../src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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 @Prop() showClearButton: boolean = true;\n\n private resizeObserver: ResizeObserver;\n private previousOptions: any[] = [];\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 @Method()\n async clearSelection() {\n this.clearInput()\n this.clearSelectField()\n this.setPreSelected(null);\n this.closeDropdown();\n this.optionIsSelected = false;\n }\n\n clearSelectField() { \n this.selectedOption = null;\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 @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 if(this.showClearButton) { \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 this.previousOptions = [...this.options];\n const optionsAreEqual = this.isEqual(this.options, this.previousOptions);\n if (this.options && !optionsAreEqual) {\n this.clearSelectField();\n }\n }\n\n isEqual(a: any, b: any[]) {\n return JSON.stringify(a) === JSON.stringify(b);\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 private handleWrapperClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n const isSearchInput = target.classList.contains('choices__input') || target.closest('.choices__input');\n const isDropdownItem = target.closest('.choices__list--dropdown .choices__item');\n \n // Only toggle dropdown if clicking on wrapper itself\n if (!isSearchInput && !isDropdownItem) {\n this.toggleDropdown();\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 : (e) => this.handleWrapperClick(e)}\n onKeyDown={event => this.handleKeyDown(event)}\n >\n <select class='single__select-input-field' disabled = {this.disabled} {...attributes} data-trigger onChange={() => this.handleChange()}>\n {this.createSelectOptions(this.options)}\n </select>\n\n <div class='single__select-icon-container'>\n { this.optionIsSelected && (\n <div class={`ifx-choices__icon-wrapper-delete ${!this.showClearButton ? 'hide' : ''}`}>\n <ifx-icon icon=\"cremove16\" onClick={() => this.clearSelection()}></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 </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}"]}
|
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;IALpB;QAgDE,kBAAkB;QACV,UAAK,GAAY,KAAK,CAAC;QACvB,iBAAY,GAAW,OAAO,CAAC;QAC/B,UAAK,GAAW,EAAE,CAAC;QACnB,aAAQ,GAAY,KAAK,CAAC;QAC1B,qBAAgB,GAAW,aAAa,CAAC;QAIzC,SAAI,GAAW,eAAe,CAAC;QAC9B,mBAAc,GAAe,IAAI,CAAC;QAClC,qBAAgB,GAAY,KAAK,CAAC;QACnC,oBAAe,GAAY,IAAI,CAAC;QAGhC,oBAAe,GAAU,EAAE,CAAC;KA+jBrC;IAxjBC,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;IAGD,KAAK,CAAC,cAAc;QAClB,IAAI,CAAC,UAAU,EAAE,CAAA;QACjB,IAAI,CAAC,gBAAgB,EAAE,CAAA;QACvB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC1B,IAAI,CAAC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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 @Prop() showClearButton: boolean = true;\n\n private resizeObserver: ResizeObserver;\n private previousOptions: any[] = [];\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 @Method()\n async clearSelection() {\n this.clearInput()\n this.clearSelectField()\n this.setPreSelected(null);\n this.closeDropdown();\n this.optionIsSelected = false;\n }\n\n clearSelectField() { \n this.selectedOption = null;\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 @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 if(this.showClearButton) { \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 this.previousOptions = [...this.options];\n const optionsAreEqual = this.isEqual(this.options, this.previousOptions);\n if (this.options && !optionsAreEqual) {\n this.clearSelectField();\n }\n }\n\n isEqual(a: any, b: any[]) {\n return JSON.stringify(a) === JSON.stringify(b);\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 private handleWrapperClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n const isSearchInput = target.classList.contains('choices__input') || target.closest('.choices__input');\n const isDropdownItem = target.closest('.choices__list--dropdown .choices__item');\n \n // Only toggle dropdown if clicking on wrapper itself\n if (!isSearchInput && !isDropdownItem) {\n this.toggleDropdown();\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 : (e) => this.handleWrapperClick(e)}\n onKeyDown={event => this.handleKeyDown(event)}\n >\n <select class='single__select-input-field' disabled = {this.disabled} {...attributes} data-trigger onChange={() => this.handleChange()}>\n {this.createSelectOptions(this.options)}\n </select>\n\n <div class='single__select-icon-container'>\n { this.optionIsSelected && (\n <div class={`ifx-choices__icon-wrapper-delete ${!this.showClearButton ? 'hide' : ''}`}>\n <ifx-icon icon=\"cRemove16\" onClick={() => this.clearSelection()}></ifx-icon>\n </div>\n )}\n <div class=\"ifx-choices__icon-wrapper-up\">\n <ifx-icon key=\"icon-up\" icon=\"chevron-up-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 </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}"]}
|
@@ -50,7 +50,7 @@ export class TextField {
|
|
50
50
|
return (h("div", { key: '7e6d9942880560a221d43b3b0a0d5af928ec5a08', "aria-label": "a text field for user input", "aria-value": this.value, "aria-disabled": this.disabled, class: `textInput__container ${this.disabled ? 'disabled' : ""}` }, h("div", { key: '51d490a767e8dd89b86ec21f502e02f0d5cbdc09', class: "textInput__top-wrapper" }, h("label", { key: '7ea9c6e9cae679fd1ba3a5f5a05ec18a44ead60f', htmlFor: this.internalId }, h("slot", { key: '9e3771cd10ad31856f3f4a4bb1873b4ffb255658' }), this.optional && this.required ? (h("span", { class: "optional-required" }, "(optional) *")) : this.optional ? (h("span", { class: "optional" }, "(optional)")) : this.required ? (h("span", { class: `required ${this.error ? 'error' : ""}` }, "*")) : null)), h("div", { key: 'cbce67112a8fd5941bd656f9073142609393318b', class: "textInput__bottom-wrapper" }, h("div", { key: '922d433c60dc90b097fdaa1bb6616c986b0e5f5a', class: "input-container" }, this.icon && (h("ifx-icon", { key: '46cfc15b14449c14dccb67d3feaff46492f1e917', class: 'input-icon', icon: this.icon })), h("input", { key: 'f66cc1e95cdb64937f8231dfbdcae41ecb98fd7e', ref: (el) => (this.inputElement = el), disabled: this.disabled, autocomplete: this.autocomplete, type: this.internalType, id: this.internalId, value: this.value, onInput: () => this.handleInput(), placeholder: this.placeholder, maxlength: this.maxlength, class: `${this.icon ? 'icon' : ""}
|
51
51
|
${this.error ? 'error' : ""}
|
52
52
|
${this.size === "s" ? "input-s" : ""}
|
53
|
-
${this.success ? "success" : ""}` }), (this.showDeleteIcon && this.value) && (h("ifx-icon", { key: 'b6fbd2ec39451aa061a53150cd2519c3648241ad', class: "delete-icon", icon: "
|
53
|
+
${this.success ? "success" : ""}` }), (this.showDeleteIcon && this.value) && (h("ifx-icon", { key: 'b6fbd2ec39451aa061a53150cd2519c3648241ad', class: "delete-icon", icon: "cRemove16", onClick: () => this.handleDeleteContent() }))), this.caption && !this.error &&
|
54
54
|
h("div", { key: 'f78fbb3244d64e9ec1aa5643a06f706db13eb0e3', class: `textInput__bottom-wrapper-caption ${this.disabled} ? disabled : ""` }, this.caption), this.error &&
|
55
55
|
h("div", { key: '6290ff909a864d53e4a44859b34307773250ff64', class: "textInput__bottom-wrapper-caption error" }, this.caption))));
|
56
56
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"text-field.js","sourceRoot":"","sources":["../../../src/components/text-field/text-field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAgB,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAUxH,MAAM,OAAO,SAAS;IAPtB;QAUU,gBAAW,GAAW,aAAa,CAAA;QAClB,UAAK,GAAW,EAAE,CAAC;QACpC,UAAK,GAAY,KAAK,CAAC;QACvB,UAAK,GAAW,EAAE,CAAC;QACnB,SAAI,GAAW,EAAE,CAAC;QAClB,YAAO,GAAW,EAAE,CAAC;QACrB,SAAI,GAAW,GAAG,CAAC;QACnB,aAAQ,GAAY,KAAK,CAAC;QAC1B,aAAQ,GAAY,KAAK,CAAC;QAC1B,YAAO,GAAY,KAAK,CAAC;QACzB,aAAQ,GAAY,KAAK,CAAC;QAE1B,mBAAc,GAAY,KAAK,CAAC;QAChC,iBAAY,GAAW,IAAI,CAAA;QAC3B,SAAI,GAAwB,MAAM,CAAC;QACnC,eAAU,GAAW,YAAY,CAAA;KAoG1C;IA1FC,YAAY,CAAC,QAAgB;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Emitter, Watch, Method, AttachInternals, State } from '@stencil/core';\n \n\n@Component({\n tag: 'ifx-text-field',\n styleUrl: 'text-field.scss',\n shadow: true,\n formAssociated: true\n})\n\nexport class TextField {\n private inputElement: HTMLInputElement;\n @Element() el;\n @Prop() placeholder: string = \"Placeholder\"\n @Prop({ mutable: true }) value: string = '';\n @Prop() error: boolean = false;\n @Prop() label: string = \"\";\n @Prop() icon: string = \"\";\n @Prop() caption: string = \"\";\n @Prop() size: string = 'm';\n @Prop() required: boolean = false;\n @Prop() optional: boolean = false;\n @Prop() success: boolean = false;\n @Prop() disabled: boolean = false;\n @Prop() maxlength?: number;\n @Prop() showDeleteIcon: boolean = false;\n @Prop() autocomplete: string = 'on'\n @Prop() type: 'text' | 'password' = 'text';\n @Prop() internalId: string = \"text-field\"\n @State() internalType: string;\n @Event() ifxInput: EventEmitter<String>;\n // @Prop({ reflect: true })\n // resetOnSubmit: boolean = false;\n\n @AttachInternals() internals: ElementInternals;\n\n\n @Watch('value')\n valueWatcher(newValue: string) {\n if (newValue !== this.inputElement.value) {\n this.inputElement.value = newValue;\n }\n }\n\n @Method()\n async reset() {\n this.value = '';\n this.inputElement.value = '';\n }\n\n handleDeleteContent() {\n this.reset();\n this.ifxInput.emit(this.value);\n }\n\n handleInput() {\n const query = this.inputElement.value;\n this.value = query; // update the value property when input changes\n this.internals.setFormValue(query) // update form value\n this.ifxInput.emit(this.value);\n }\n\n handleTypeProp() { \n this.internalType = this.type === 'text' || this.type === 'password' ? this.type : 'text'\n }\n\n formResetCallback() {\n this.internals.setValidity({});\n this.internals.setFormValue(\"\");\n }\n\n componentWillLoad() { \n this.handleTypeProp()\n }\n\n render() {\n return (\n <div aria-label=\"a text field for user input\" aria-value={this.value} aria-disabled={this.disabled} class={`textInput__container ${this.disabled ? 'disabled' : \"\"}`}>\n <div class=\"textInput__top-wrapper\">\n <label htmlFor={this.internalId}>\n <slot></slot>\n {this.optional && this.required ? (\n <span class=\"optional-required\">(optional) *</span>\n ) : this.optional ? (\n <span class=\"optional\">(optional)</span>\n ) : this.required ? (\n <span class={`required ${this.error ? 'error' : \"\"}`}>*</span>\n ) : null}\n </label>\n </div>\n\n <div class=\"textInput__bottom-wrapper\">\n <div class=\"input-container\">\n {this.icon && (\n <ifx-icon class='input-icon' icon={this.icon} />\n )}\n <input\n ref={(el) => (this.inputElement = el)}\n disabled={this.disabled}\n autocomplete={this.autocomplete}\n type={this.internalType}\n id={this.internalId}\n value={this.value}\n onInput={() => this.handleInput()}\n placeholder={this.placeholder}\n maxlength={this.maxlength}\n class={\n `${this.icon ? 'icon' : \"\"}\n ${this.error ? 'error' : \"\"} \n ${this.size === \"s\" ? \"input-s\" : \"\"}\n ${this.success ? \"success\" : \"\"}`} />\n\n { (this.showDeleteIcon && this.value) && (\n <ifx-icon class=\"delete-icon\" icon=\"
|
1
|
+
{"version":3,"file":"text-field.js","sourceRoot":"","sources":["../../../src/components/text-field/text-field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAgB,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAUxH,MAAM,OAAO,SAAS;IAPtB;QAUU,gBAAW,GAAW,aAAa,CAAA;QAClB,UAAK,GAAW,EAAE,CAAC;QACpC,UAAK,GAAY,KAAK,CAAC;QACvB,UAAK,GAAW,EAAE,CAAC;QACnB,SAAI,GAAW,EAAE,CAAC;QAClB,YAAO,GAAW,EAAE,CAAC;QACrB,SAAI,GAAW,GAAG,CAAC;QACnB,aAAQ,GAAY,KAAK,CAAC;QAC1B,aAAQ,GAAY,KAAK,CAAC;QAC1B,YAAO,GAAY,KAAK,CAAC;QACzB,aAAQ,GAAY,KAAK,CAAC;QAE1B,mBAAc,GAAY,KAAK,CAAC;QAChC,iBAAY,GAAW,IAAI,CAAA;QAC3B,SAAI,GAAwB,MAAM,CAAC;QACnC,eAAU,GAAW,YAAY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;;;;CACF","sourcesContent":["import { Component, h, Event, Element, Prop, EventEmitter, Watch, Method, AttachInternals, State } from '@stencil/core';\n \n\n@Component({\n tag: 'ifx-text-field',\n styleUrl: 'text-field.scss',\n shadow: true,\n formAssociated: true\n})\n\nexport class TextField {\n private inputElement: HTMLInputElement;\n @Element() el;\n @Prop() placeholder: string = \"Placeholder\"\n @Prop({ mutable: true }) value: string = '';\n @Prop() error: boolean = false;\n @Prop() label: string = \"\";\n @Prop() icon: string = \"\";\n @Prop() caption: string = \"\";\n @Prop() size: string = 'm';\n @Prop() required: boolean = false;\n @Prop() optional: boolean = false;\n @Prop() success: boolean = false;\n @Prop() disabled: boolean = false;\n @Prop() maxlength?: number;\n @Prop() showDeleteIcon: boolean = false;\n @Prop() autocomplete: string = 'on'\n @Prop() type: 'text' | 'password' = 'text';\n @Prop() internalId: string = \"text-field\"\n @State() internalType: string;\n @Event() ifxInput: EventEmitter<String>;\n // @Prop({ reflect: true })\n // resetOnSubmit: boolean = false;\n\n @AttachInternals() internals: ElementInternals;\n\n\n @Watch('value')\n valueWatcher(newValue: string) {\n if (newValue !== this.inputElement.value) {\n this.inputElement.value = newValue;\n }\n }\n\n @Method()\n async reset() {\n this.value = '';\n this.inputElement.value = '';\n }\n\n handleDeleteContent() {\n this.reset();\n this.ifxInput.emit(this.value);\n }\n\n handleInput() {\n const query = this.inputElement.value;\n this.value = query; // update the value property when input changes\n this.internals.setFormValue(query) // update form value\n this.ifxInput.emit(this.value);\n }\n\n handleTypeProp() { \n this.internalType = this.type === 'text' || this.type === 'password' ? this.type : 'text'\n }\n\n formResetCallback() {\n this.internals.setValidity({});\n this.internals.setFormValue(\"\");\n }\n\n componentWillLoad() { \n this.handleTypeProp()\n }\n\n render() {\n return (\n <div aria-label=\"a text field for user input\" aria-value={this.value} aria-disabled={this.disabled} class={`textInput__container ${this.disabled ? 'disabled' : \"\"}`}>\n <div class=\"textInput__top-wrapper\">\n <label htmlFor={this.internalId}>\n <slot></slot>\n {this.optional && this.required ? (\n <span class=\"optional-required\">(optional) *</span>\n ) : this.optional ? (\n <span class=\"optional\">(optional)</span>\n ) : this.required ? (\n <span class={`required ${this.error ? 'error' : \"\"}`}>*</span>\n ) : null}\n </label>\n </div>\n\n <div class=\"textInput__bottom-wrapper\">\n <div class=\"input-container\">\n {this.icon && (\n <ifx-icon class='input-icon' icon={this.icon} />\n )}\n <input\n ref={(el) => (this.inputElement = el)}\n disabled={this.disabled}\n autocomplete={this.autocomplete}\n type={this.internalType}\n id={this.internalId}\n value={this.value}\n onInput={() => this.handleInput()}\n placeholder={this.placeholder}\n maxlength={this.maxlength}\n class={\n `${this.icon ? 'icon' : \"\"}\n ${this.error ? 'error' : \"\"} \n ${this.size === \"s\" ? \"input-s\" : \"\"}\n ${this.success ? \"success\" : \"\"}`} />\n\n { (this.showDeleteIcon && this.value) && (\n <ifx-icon class=\"delete-icon\" icon=\"cRemove16\" onClick={() => this.handleDeleteContent()}></ifx-icon> \n )}\n </div>\n {this.caption && !this.error &&\n <div class={`textInput__bottom-wrapper-caption ${this.disabled} ? disabled : \"\"`}>\n {this.caption}\n </div>}\n {this.error &&\n <div class=\"textInput__bottom-wrapper-caption error\">\n {this.caption}\n </div>}\n </div>\n </div>\n );\n }\n}\n"]}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h } from './p-f8e6a4ef.js';
|
2
2
|
import { d as defineCustomElement$3 } from './p-12e75dad.js';
|
3
|
-
import { d as defineCustomElement$2 } from './p-
|
3
|
+
import { d as defineCustomElement$2 } from './p-afd6d4f5.js';
|
4
4
|
|
5
5
|
const filterSearchCss = ".sidebar-filter-search-wrapper{display:flex;padding:12px 16px 16px 16px;flex-direction:column;align-items:flex-start;align-self:stretch;gap:4px;font-family:var(--ifx-font-family);background:#EEEDED}.topbar-filter-search-wrapper{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch;gap:4px;font-family:var(--ifx-font-family)}.topbar-filter-search-wrapper ifx-search-field{width:100%;}.filter-name{font-size:1rem;line-height:1.5rem;font-weight:600}";
|
6
6
|
const IfxFilterSearchStyle0 = filterSearchCss;
|
@@ -2,7 +2,7 @@ import { p as proxyCustomElement, H, h } from './p-f8e6a4ef.js';
|
|
2
2
|
import { i as icons, d as defineCustomElement$5 } from './p-12e75dad.js';
|
3
3
|
import { d as defineCustomElement$4 } from './p-53d4339c.js';
|
4
4
|
import { d as defineCustomElement$3 } from './p-20d6a006.js';
|
5
|
-
import { d as defineCustomElement$2 } from './p-
|
5
|
+
import { d as defineCustomElement$2 } from './p-afd6d4f5.js';
|
6
6
|
|
7
7
|
const iconsPreviewCss = ".container{display:flex;flex-direction:column;gap:10px}.alert__wrapper{margin-bottom:40px}.snippet__wrapper{display:flex;flex-direction:column;gap:5px;position:sticky;top:0;left:0;z-index:99;background-color:white}.html-wrapper{background:rgb(38, 38, 38);padding:20px;color:white;font-family:monospace}.html-wrapper button{position:absolute;right:0px;bottom:0px;background:rgba(0, 0, 0, 0.85);color:#C9CDCF;border:0 none;padding:4px 10px;font-size:0.75rem;font-family:\"Nunito Sans\";font-weight:700;border-top:1px solid rgba(255, 255, 255, 0.1);border-left:1px solid rgba(255, 255, 255, 0.1);margin-left:-1px;border-radius:4px 0 0 0;cursor:pointer}.html-wrapper .component-name{color:#A8FF60}.html-wrapper .attribute-name{color:rgb(150, 203, 254)}.html-wrapper .attribute-value{color:rgb(180, 116, 221)}.preview__container{box-sizing:border-box;display:flex;align-items:center;padding:2px;flex-wrap:wrap;gap:4px}.preview__container .no-results{width:100%;text-align:center}.preview__container .preview__container-item{display:flex;justify-content:center;align-items:center;border:1px solid #f1f1f1;padding:2px;width:50px;height:50px;position:relative}.preview__container .preview__container-item:active{border-color:#378375}.preview__container .preview__container-item:hover{cursor:pointer}.preview__container .preview__container-item.copied::after{z-index:50;content:\"copied!\";position:absolute;top:0;left:50px;background-color:#000;color:white;padding:3px;border-radius:4px}";
|
8
8
|
const IfxIconsPreviewStyle0 = iconsPreviewCss;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { M as MultiselectOption, d as defineCustomElement$1 } from './p-
|
1
|
+
import { M as MultiselectOption, d as defineCustomElement$1 } from './p-3906f639.js';
|
2
2
|
|
3
3
|
const IfxMultiselectOption = MultiselectOption;
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h } from './p-f8e6a4ef.js';
|
2
2
|
import { d as defineCustomElement$3 } from './p-12e75dad.js';
|
3
|
-
import { d as defineCustomElement$2 } from './p-
|
3
|
+
import { d as defineCustomElement$2 } from './p-afd6d4f5.js';
|
4
4
|
|
5
5
|
const searchBarCss = ":root{--ifx-font-family:\"Source Sans 3\", \"Arial, sans-serif\"}:host{width:100%;display:flex}.search-bar{box-sizing:border-box;height:40px;background-color:#FFFFFF;display:flex;flex-direction:row;align-items:center;width:100%;font-family:var(--ifx-font-family)}.search-bar.closed{display:flex;width:auto;justify-content:flex-start}.search-bar .search-bar-wrapper{display:flex;align-items:center;gap:16px;width:100%}.search-bar .search-bar-wrapper a{text-decoration:none;font-size:1rem;font-style:normal;font-weight:600;line-height:1.5rem;color:#0A8276;cursor:pointer}.search-bar .search-bar-wrapper ifx-search-field{width:100%}.search-bar .search-bar__icon-wrapper{display:none;flex-direction:row;align-items:center}.search-bar .search-bar__icon-wrapper ifx-icon:hover{cursor:pointer}.search-bar.closed .search-bar__icon-wrapper{display:flex}.search-bar.closed .search-bar-wrapper{display:none}";
|
6
6
|
const IfxSearchBarStyle0 = searchBarCss;
|
@@ -68,7 +68,7 @@ const SegmentedControl = /*@__PURE__*/ proxyCustomElement(class SegmentedControl
|
|
68
68
|
}
|
69
69
|
render() {
|
70
70
|
return (h("div", { key: '457f1ff3d1035a563716cd6f122cefe00478f1a5', "aria-value": this.selectedValue, "aria-label": 'segmented control', class: 'group' }, h("div", { key: '6d447d98f9fe9d1bc37e3664bd11e6f9a2e606a3', class: 'group__label' }, this.label.trim()), h("div", { key: '7d982526d1f2dd696e799a010b345438900686a4', class: 'group__controls' }, h("slot", { key: '86342c60b0fbbd955c6e34b5dd03ccab1381606f' })), this.caption.trim() &&
|
71
|
-
h("div", { key: 'fd818c6ec5152bb22abd8cb66415ba7fd9dc9e0d', class: 'group__caption' }, h("ifx-icon", { key: '
|
71
|
+
h("div", { key: 'fd818c6ec5152bb22abd8cb66415ba7fd9dc9e0d', class: 'group__caption' }, h("ifx-icon", { key: '05472adcc835a253772046f3e6ca7aa72a15ff79', icon: 'c-info-16' }), " ", this.caption.trim())));
|
72
72
|
}
|
73
73
|
componentDidRender() {
|
74
74
|
this.setSegmentSize();
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ifx-segmented-control.js","mappings":";;;AAAA,MAAM,mBAAmB,GAAG,ubAAub,CAAC;AACpd,kCAAe,mBAAmB;;MCOrB,gBAAgB;IAN7B;;;;;QAWY,YAAO,GAAW,EAAE,CAAC;QACrB,UAAK,GAAW,EAAE,CAAC;QACnB,SAAI,GAAwB,SAAS,CAAC;QAStC,kBAAa,GAAW,EAAE,CAAC;KA4EtC;IAlFG,eAAe,CAAC,KAAkB;QAC9B,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC,uBAAuB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACpF,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC,CAAC;KACzD;IAID,uBAAuB,CAAC,gBAAwB;QAC5C,IAAI,aAAqB,CAAC;QAC1B,IAAI,aAAqB,CAAC;QAE1B,MAAM,QAAQ,GAAa,IAAI,CAAC,WAAW,EAAE,CAAC;QAC9C,QAAQ,CAAC,OAAO,CAAC,CAAC,OAA8B;YAC5C,IAAI,OAAO,CAAC,QAAQ,EAAE;gBAClB,IAAI,OAAO,CAAC,YAAY,KAAK,gBAAgB,EAAE;oB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AW,GAAY,OAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAC1D,CAER,EACR;KACL;IAED,kBAAkB;QACd,IAAI,CAAC,cAAc,EAAE,CAAC;KACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/segmented-control/segmented-control.scss?tag=ifx-segmented-control&encapsulation=shadow","src/components/segmented-control/segmented-control.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n.group {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: tokens.$ifxSpace150;\n}\n\n.group__label {\n font: tokens.$ifxBodyBody05;\n\n &:empty {\n display: none;\n }\n}\n\n.group__controls {\n display: flex;\n flex-wrap: wrap;\n}\n\n.group__controls ::slotted(*) {\n margin-left: -1px;\n margin-top: -1px;\n}\n\n.group__caption {\n display: flex;\n align-items: center;\n gap: tokens.$ifxSpace100;\n \n font: tokens.$ifxBodyBody05;\n}\n","import { h, Component, Element, Event, EventEmitter, Listen, Prop } from \"@stencil/core\";\n\n@Component ({\n tag: 'ifx-segmented-control',\n styleUrl: 'segmented-control.scss',\n shadow: true\n})\n\nexport class SegmentedControl {\n @Element() SegmentedControl: HTMLIfxSegmentedControlElement;\n\n @Event() ifxChange: EventEmitter<{ previousValue: string, selectedValue: string }>;\n\n @Prop() caption: string = '';\n @Prop() label: string = '';\n @Prop() size: 'regular' | 'small' = 'regular';\n\n @Listen('segmentSelect')\n onSegmentSelect(event: CustomEvent) {\n const { previousValue, selectedValue } = this.unselectPreviousSegment(event.detail);\n this.selectedValue = selectedValue;\n this.ifxChange.emit({ previousValue, selectedValue });\n }\n\n private selectedValue: string = '';\n\n unselectPreviousSegment(newSelectedIndex: number): { previousValue: string, selectedValue: string } {\n let previousValue: string;\n let selectedValue: string;\n\n const segments: NodeList = this.getSegments();\n segments.forEach((control: HTMLIfxSegmentElement) => {\n if (control.selected) {\n if (control.segmentIndex !== newSelectedIndex) {\n control.selected = false;\n previousValue = control.value;\n } else {\n selectedValue = control.value;\n }\n }\n })\n\n return { previousValue, selectedValue };\n }\n\n getSegments(): NodeList {\n return this.SegmentedControl.querySelectorAll('ifx-segment');\n }\n\n setActiveSegment(): void {\n const segments: NodeList = this.getSegments();\n let activeSegmentedControlFound = false;\n segments.forEach((control: HTMLIfxSegmentElement, idx: number) => {\n control.segmentIndex = idx;\n if (activeSegmentedControlFound) {\n if (control.selected) control.selected = false;\n } else {\n if (control.selected) {\n activeSegmentedControlFound = true;\n this.selectedValue = control.value;\n }\n }\n });\n }\n\n setSegmentSize(): void {\n const segments: NodeList = this.getSegments();\n segments.forEach((control: HTMLIfxSegmentElement) => {\n control.shadowRoot.querySelector('.segment').classList.add(`segment--${this.size}`);\n });\n }\n\n componentDidLoad() {\n this.setActiveSegment();\n }\n\n render() {\n return (\n <div aria-value={this.selectedValue} aria-label='segmented control' class='group'>\n <div class='group__label'>\n { this.label.trim() }\n </div>\n \n <div class='group__controls'>\n <slot />\n </div>\n \n {\n this.caption.trim() &&\n <div class='group__caption'>\n <ifx-icon icon='c-info-16'></ifx-icon> { this.caption.trim() }\n </div>\n }\n </div>\n );\n }\n\n componentDidRender() {\n this.setSegmentSize();\n }\n}"],"version":3}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h } from './p-f8e6a4ef.js';
|
2
2
|
import { d as defineCustomElement$8 } from './p-b6b0d09b.js';
|
3
3
|
import { d as defineCustomElement$7 } from './p-12e75dad.js';
|
4
|
-
import { d as defineCustomElement$6 } from './p-
|
5
|
-
import { d as defineCustomElement$5 } from './p-
|
6
|
-
import { d as defineCustomElement$4 } from './p-
|
7
|
-
import { d as defineCustomElement$3 } from './p-
|
8
|
-
import { d as defineCustomElement$2 } from './p-
|
4
|
+
import { d as defineCustomElement$6 } from './p-1c80b52e.js';
|
5
|
+
import { d as defineCustomElement$5 } from './p-3906f639.js';
|
6
|
+
import { d as defineCustomElement$4 } from './p-afd6d4f5.js';
|
7
|
+
import { d as defineCustomElement$3 } from './p-98c86d16.js';
|
8
|
+
import { d as defineCustomElement$2 } from './p-fe3f24e7.js';
|
9
9
|
|
10
10
|
const setFilterCss = "";
|
11
11
|
const IfxSetFilterStyle0 = setFilterCss;
|
@@ -3,13 +3,13 @@ import { c as classNames } from './p-5cdc6210.js';
|
|
3
3
|
import { c as createGrid } from './p-1429e9ea.js';
|
4
4
|
import { d as defineCustomElement$a } from './p-17df0350.js';
|
5
5
|
import { d as defineCustomElement$9 } from './p-b6b0d09b.js';
|
6
|
-
import { d as defineCustomElement$8 } from './p-
|
6
|
+
import { d as defineCustomElement$8 } from './p-b293963f.js';
|
7
7
|
import { d as defineCustomElement$7 } from './p-2a500ed7.js';
|
8
8
|
import { d as defineCustomElement$6 } from './p-12e75dad.js';
|
9
9
|
import { d as defineCustomElement$5 } from './p-f2f58eb1.js';
|
10
10
|
import { d as defineCustomElement$4 } from './p-9142f93b.js';
|
11
|
-
import { d as defineCustomElement$3 } from './p-
|
12
|
-
import { d as defineCustomElement$2 } from './p-
|
11
|
+
import { d as defineCustomElement$3 } from './p-1bfd69f4.js';
|
12
|
+
import { d as defineCustomElement$2 } from './p-98c86d16.js';
|
13
13
|
|
14
14
|
class ButtonCellRenderer {
|
15
15
|
init(params) {
|
@@ -5,8 +5,8 @@ import { d as defineCustomElement$7 } from './p-12e75dad.js';
|
|
5
5
|
import { d as defineCustomElement$6 } from './p-f2f58eb1.js';
|
6
6
|
import { d as defineCustomElement$5 } from './p-53d4339c.js';
|
7
7
|
import { d as defineCustomElement$4 } from './p-351949f1.js';
|
8
|
-
import { d as defineCustomElement$3 } from './p-
|
9
|
-
import { d as defineCustomElement$2 } from './p-
|
8
|
+
import { d as defineCustomElement$3 } from './p-34a36730.js';
|
9
|
+
import { d as defineCustomElement$2 } from './p-fe3f24e7.js';
|
10
10
|
|
11
11
|
const templatesUiCss = "*{padding:0;margin:0}.templates__container{display:flex;flex-direction:column;align-items:center}.templates__container .back__btn-wrapper{display:none}.templates__container .back__btn-wrapper.show{display:flex;justify-content:space-between;width:100%}.templates__container .back__btn-wrapper .alert__wrapper{display:none}.templates__container .back__btn-wrapper .alert__wrapper.show{display:block}.templates__container .templates__wrapper{display:flex;padding:20px 0px;gap:20px;flex-wrap:wrap}.templates__container .templates__title.hide{display:none}";
|
12
12
|
const IfxTemplatesUiStyle0 = templatesUiCss;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h } from './p-f8e6a4ef.js';
|
2
2
|
import { d as defineCustomElement$3 } from './p-12e75dad.js';
|
3
3
|
import { d as defineCustomElement$2 } from './p-f2f58eb1.js';
|
4
|
-
import { d as defineCustomElement$1 } from './p-
|
4
|
+
import { d as defineCustomElement$1 } from './p-98c86d16.js';
|
5
5
|
|
6
6
|
const paginationCss = "@charset \"UTF-8\";:root{--ifx-font-family:\"Source Sans 3\", \"Arial, 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;
|
@@ -177,4 +177,4 @@ function defineCustomElement() {
|
|
177
177
|
|
178
178
|
export { Pagination as P, defineCustomElement as d };
|
179
179
|
|
180
|
-
//# sourceMappingURL=p-
|
180
|
+
//# sourceMappingURL=p-1bfd69f4.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"p-3138739e.js","mappings":";;;;;AAAA,MAAM,aAAa,GAAG,iiKAAiiK,CAAC;AACxjK,4BAAe,aAAa;;MCMf,UAAU;IALvB;;;;;QAQU,gBAAW,GAAW,CAAC,CAAC;QACvB,iBAAY,GAAW,CAAC,CAAC;QACzB,yBAAoB,GAAW,EAAE,CAAC;QAClC,kBAAa,GAAa,EAAE,CAAC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pB,4DAAK,KAAK,EAAC,yBAAyB,IAClC,4DAAK,KAAK,EAAC,uBAAuB,uBAAuB,EACzD,4DAAK,KAAK,EAAC,uBAAuB,IAChC,mEACE,WAAW,EAAC,OAAO,iBACP,OAAO,EACnB,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,KAAK,EACf,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,GAAG,EACR,OAAO,EAAE,IAAI,CAAC,oBAAoB,uBAChB,QAAQ,GACd,CACV,CACF,EAEN,4DAAK,KAAK,EAAC,sBAAsB,IAC/B,4DAAK,KAAK,EAAC,YAAY,IACrB,wEACE,KAAK,EAAC,MAAM,EACZ,IAAI,EAAC,eAAe,EACpB,OAAO,EAAE,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,GACpC,EAEnB,6DACC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,IAAI,KAAK,QAAQ,IAC1D,UACE,GAAG,EAAE,QAAQ,IAAI,EAAE,EACnB,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,GAAG,IAAI,KAAK,IAAI,CAAC,YAAY,EAAE,eAC/C,IAAI,IAEf,SAAG,IAAI,EAAC,oBAAoB,IAAE,IAAI,CAAK,CACpC,KAEL,UAAI,KAAK,EAAC,UAAU,EAAC,GAAG,EAAE,YAAY,CAAC,EAAE,IACvC,sBAAgB,CACb,CACN,CAAC,CACG,EAEL,wEACE,KAAK,EAAC,MAAM,EACZ,IAAI,EAAC,gBAAgB,EACrB,OAAO,EAAE,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,GACpC,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); // tokens.$ifxFontFamilyBody;\n\n\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@Component({\n tag: 'ifx-pagination',\n styleUrl: 'pagination.scss',\n shadow: true\n})\nexport class Pagination {\n @Element() el: HTMLElement;\n @Event() ifxPageChange: EventEmitter;\n @Prop() currentPage: number = 1;\n @State() internalPage: number = 1;\n @State() internalItemsPerPage: number = 10;\n @State() numberOfPages: number[] = [];\n @Prop() total: number = 1;\n @Prop() itemsPerPage: any[] | string;\n @State() filteredItemsPerPage: any[] = [];\n @State() visiblePages: (number | string)[] = [];\n\n private CLASS_DISABLED = \"disabled\";\n private CLASS_ACTIVE = \"active\";\n private prevInternalPage: number;\n\n @Listen('ifxSelect')\n setItemsPerPage(e: CustomEvent) {\n const selectedValue = e.detail?.value || e.detail?.label; \n const newItemsPerPage = parseInt(selectedValue) || 10;\n\n if (newItemsPerPage === this.internalItemsPerPage) {\n return;\n }\n\n this.internalItemsPerPage = newItemsPerPage;\n this.internalPage = 1; \n this.calculateNumberOfPages();\n this.updateVisiblePages();\n this.handleEventEmission();\n }\n\n componentDidLoad() {\n this.initPagination();\n }\n\n updateVisiblePages() {\n const buffer = 2;\n const totalPages = this.numberOfPages.length;\n const current = this.internalPage;\n let pages: (number | string)[] = [];\n \n if (totalPages <= 5) {\n pages = [...this.numberOfPages];\n } else {\n pages.push(1);\n \n if (current > buffer + 1) pages.push('...');\n \n let start = Math.max(2, current - buffer);\n let end = Math.min(totalPages - 1, current + buffer);\n \n if (current <= buffer + 1) end = buffer * 2 + 1;\n if (current >= totalPages - buffer) start = totalPages - buffer * 2;\n \n for (let i = start; i <= end; i++) pages.push(i);\n \n if (current < totalPages - buffer) pages.push('...');\n pages.push(totalPages);\n }\n \n this.visiblePages = [...new Set(pages)];\n }\n\n calculateNumberOfPages() {\n const totalPages = Math.ceil(this.total / this.internalItemsPerPage);\n this.numberOfPages = Array.from({ length: totalPages }, (_, i) => i + 1);\n this.internalPage = Math.max(1, Math.min(this.currentPage, totalPages));\n }\n\n filterOptionsArray() { \n const items = typeof this.itemsPerPage === 'string' ? \n JSON.parse(this.itemsPerPage) : this.itemsPerPage;\n this.filteredItemsPerPage = items.map(item => ({\n ...item,\n label: item.label || item.value\n }));\n }\n\n componentWillLoad() {\n this.calculateNumberOfPages();\n this.filterOptionsArray();\n this.updateVisiblePages();\n }\n\n componentWillUpdate() { \n if (this.prevInternalPage !== this.internalPage) {\n this.updateVisiblePages();\n this.prevInternalPage = this.internalPage;\n }\n }\n\n componentDidUpdate() {\n this.initPagination();\n }\n\n handleEventEmission() {\n this.ifxPageChange.emit({\n currentPage: this.internalPage,\n totalPages: this.numberOfPages.length,\n itemsPerPage: this.internalItemsPerPage\n });\n }\n\n initPagination() {\n const pagination = this.el.shadowRoot.querySelector('.pagination');\n if (!pagination) return;\n\n const updateButtons = () => {\n const prev = pagination.querySelector<HTMLButtonElement>('.prev');\n const next = pagination.querySelector<HTMLButtonElement>('.next');\n if (prev) {\n prev.disabled = this.internalPage === 1;\n prev.classList.toggle(this.CLASS_DISABLED, this.internalPage === 1);\n }\n if (next) {\n next.disabled = this.internalPage === this.numberOfPages.length;\n next.classList.toggle(this.CLASS_DISABLED, this.internalPage === this.numberOfPages.length);\n }\n };\n\n pagination.querySelectorAll('li').forEach(li => {\n li.removeEventListener('click', this.handlePageClick);\n li.addEventListener('click', this.handlePageClick);\n });\n\n updateButtons();\n }\n\n private handlePageClick = (e: Event) => {\n const li = e.currentTarget as HTMLLIElement;\n const page = parseInt(li.dataset.page);\n if (!isNaN(page)) this.changePage(page);\n };\n\n changePage(newPage: number) {\n newPage = Math.max(1, Math.min(newPage, this.numberOfPages.length));\n if (newPage === this.internalPage) return;\n \n this.internalPage = newPage;\n this.handleEventEmission();\n this.initPagination();\n }\n\n render() {\n return (\n <div 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 placeholder='false'\n show-search='false'\n value={undefined}\n disabled={false}\n error={false}\n size=\"s\"\n options={this.filteredItemsPerPage}\n placeholder-value=\"Select\"\n ></ifx-select>\n </div>\n </div>\n \n <div class=\"items__total-wrapper\">\n <div class=\"pagination\">\n <ifx-icon-button\n class=\"prev\"\n icon=\"arrow-left-16\"\n onClick={() => this.changePage(this.internalPage - 1)}\n ></ifx-icon-button>\n \n <ol>\n {this.visiblePages.map((page, i) => typeof page === 'number' ? (\n <li \n key={`page-${page}`}\n class={{ [this.CLASS_ACTIVE]: page === this.internalPage }}\n data-page={page}\n >\n <a href=\"javascript:void(0)\">{page}</a>\n </li>\n ) : (\n <li class=\"ellipsis\" key={`ellipsis-${i}`}>\n <span>...</span>\n </li>\n ))}\n </ol>\n \n <ifx-icon-button\n class=\"next\"\n icon=\"arrow-right-16\"\n onClick={() => this.changePage(this.internalPage + 1)}\n ></ifx-icon-button>\n </div>\n </div>\n </div>\n );\n }\n}"],"version":3}
|
1
|
+
{"file":"p-1bfd69f4.js","mappings":";;;;;AAAA,MAAM,aAAa,GAAG,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C,YAAY,GAAG,CAAC,CAAC,GACpC,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); // tokens.$ifxFontFamilyBody;\n\n\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@Component({\n tag: 'ifx-pagination',\n styleUrl: 'pagination.scss',\n shadow: true\n})\nexport class Pagination {\n @Element() el: HTMLElement;\n @Event() ifxPageChange: EventEmitter;\n @Prop() currentPage: number = 1;\n @State() internalPage: number = 1;\n @State() internalItemsPerPage: number = 10;\n @State() numberOfPages: number[] = [];\n @Prop() total: number = 1;\n @Prop() itemsPerPage: any[] | string;\n @State() filteredItemsPerPage: any[] = [];\n @State() visiblePages: (number | string)[] = [];\n\n private CLASS_DISABLED = \"disabled\";\n private CLASS_ACTIVE = \"active\";\n private prevInternalPage: number;\n\n @Listen('ifxSelect')\n setItemsPerPage(e: CustomEvent) {\n const selectedValue = e.detail?.value || e.detail?.label; \n const newItemsPerPage = parseInt(selectedValue) || 10;\n\n if (newItemsPerPage === this.internalItemsPerPage) {\n return;\n }\n\n this.internalItemsPerPage = newItemsPerPage;\n this.internalPage = 1; \n this.calculateNumberOfPages();\n this.updateVisiblePages();\n this.handleEventEmission();\n }\n\n componentDidLoad() {\n this.initPagination();\n }\n\n updateVisiblePages() {\n const buffer = 2;\n const totalPages = this.numberOfPages.length;\n const current = this.internalPage;\n let pages: (number | string)[] = [];\n \n if (totalPages <= 5) {\n pages = [...this.numberOfPages];\n } else {\n pages.push(1);\n \n if (current > buffer + 1) pages.push('...');\n \n let start = Math.max(2, current - buffer);\n let end = Math.min(totalPages - 1, current + buffer);\n \n if (current <= buffer + 1) end = buffer * 2 + 1;\n if (current >= totalPages - buffer) start = totalPages - buffer * 2;\n \n for (let i = start; i <= end; i++) pages.push(i);\n \n if (current < totalPages - buffer) pages.push('...');\n pages.push(totalPages);\n }\n \n this.visiblePages = [...new Set(pages)];\n }\n\n calculateNumberOfPages() {\n const totalPages = Math.ceil(this.total / this.internalItemsPerPage);\n this.numberOfPages = Array.from({ length: totalPages }, (_, i) => i + 1);\n this.internalPage = Math.max(1, Math.min(this.currentPage, totalPages));\n }\n\n filterOptionsArray() { \n const items = typeof this.itemsPerPage === 'string' ? \n JSON.parse(this.itemsPerPage) : this.itemsPerPage;\n this.filteredItemsPerPage = items.map(item => ({\n ...item,\n label: item.label || item.value\n }));\n }\n\n componentWillLoad() {\n this.calculateNumberOfPages();\n this.filterOptionsArray();\n this.updateVisiblePages();\n }\n\n componentWillUpdate() { \n if (this.prevInternalPage !== this.internalPage) {\n this.updateVisiblePages();\n this.prevInternalPage = this.internalPage;\n }\n }\n\n componentDidUpdate() {\n this.initPagination();\n }\n\n handleEventEmission() {\n this.ifxPageChange.emit({\n currentPage: this.internalPage,\n totalPages: this.numberOfPages.length,\n itemsPerPage: this.internalItemsPerPage\n });\n }\n\n initPagination() {\n const pagination = this.el.shadowRoot.querySelector('.pagination');\n if (!pagination) return;\n\n const updateButtons = () => {\n const prev = pagination.querySelector<HTMLButtonElement>('.prev');\n const next = pagination.querySelector<HTMLButtonElement>('.next');\n if (prev) {\n prev.disabled = this.internalPage === 1;\n prev.classList.toggle(this.CLASS_DISABLED, this.internalPage === 1);\n }\n if (next) {\n next.disabled = this.internalPage === this.numberOfPages.length;\n next.classList.toggle(this.CLASS_DISABLED, this.internalPage === this.numberOfPages.length);\n }\n };\n\n pagination.querySelectorAll('li').forEach(li => {\n li.removeEventListener('click', this.handlePageClick);\n li.addEventListener('click', this.handlePageClick);\n });\n\n updateButtons();\n }\n\n private handlePageClick = (e: Event) => {\n const li = e.currentTarget as HTMLLIElement;\n const page = parseInt(li.dataset.page);\n if (!isNaN(page)) this.changePage(page);\n };\n\n changePage(newPage: number) {\n newPage = Math.max(1, Math.min(newPage, this.numberOfPages.length));\n if (newPage === this.internalPage) return;\n \n this.internalPage = newPage;\n this.handleEventEmission();\n this.initPagination();\n }\n\n render() {\n return (\n <div 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 placeholder='false'\n show-search='false'\n value={undefined}\n disabled={false}\n error={false}\n size=\"s\"\n options={this.filteredItemsPerPage}\n placeholder-value=\"Select\"\n ></ifx-select>\n </div>\n </div>\n \n <div class=\"items__total-wrapper\">\n <div class=\"pagination\">\n <ifx-icon-button\n class=\"prev\"\n icon=\"arrow-left-16\"\n onClick={() => this.changePage(this.internalPage - 1)}\n ></ifx-icon-button>\n \n <ol>\n {this.visiblePages.map((page, i) => typeof page === 'number' ? (\n <li \n key={`page-${page}`}\n class={{ [this.CLASS_ACTIVE]: page === this.internalPage }}\n data-page={page}\n >\n <a href=\"javascript:void(0)\">{page}</a>\n </li>\n ) : (\n <li class=\"ellipsis\" key={`ellipsis-${i}`}>\n <span>...</span>\n </li>\n ))}\n </ol>\n \n <ifx-icon-button\n class=\"next\"\n icon=\"arrow-right-16\"\n onClick={() => this.changePage(this.internalPage + 1)}\n ></ifx-icon-button>\n </div>\n </div>\n </div>\n );\n }\n}"],"version":3}
|