@paperless/core 2.14.14 → 2.14.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/build/p-11df525e.entry.js +2 -0
  3. package/dist/build/p-11df525e.entry.js.map +1 -0
  4. package/dist/build/p-28724747.entry.js +2 -0
  5. package/dist/build/p-28724747.entry.js.map +1 -0
  6. package/dist/build/{p-2ea4c8d2.js → p-c7feda9a.js} +1 -1
  7. package/dist/build/p-pagination.p-pagination-pages.p-pagination-size.entry.esm.js.map +1 -1
  8. package/dist/build/p-select.entry.esm.js.map +1 -1
  9. package/dist/build/paperless.esm.js +1 -1
  10. package/dist/cjs/p-pagination.p-pagination-pages.p-pagination-size.entry.cjs.js.map +1 -1
  11. package/dist/cjs/p-pagination_3.cjs.entry.js +2 -2
  12. package/dist/cjs/p-pagination_3.cjs.entry.js.map +1 -1
  13. package/dist/cjs/p-select.cjs.entry.js +4 -16
  14. package/dist/cjs/p-select.cjs.entry.js.map +1 -1
  15. package/dist/cjs/p-select.entry.cjs.js.map +1 -1
  16. package/dist/collection/components/molecules/pagination/pages/pagination-pages.component.js +2 -2
  17. package/dist/collection/components/molecules/pagination/pages/pagination-pages.component.js.map +1 -1
  18. package/dist/collection/components/molecules/select/select.component.js +4 -16
  19. package/dist/collection/components/molecules/select/select.component.js.map +1 -1
  20. package/dist/components/{p-3zGaOHKS.js → p-CH16O2GD.js} +4 -4
  21. package/dist/components/{p-3zGaOHKS.js.map → p-CH16O2GD.js.map} +1 -1
  22. package/dist/components/{p-Cct7UU1q.js → p-D2ho0n_2.js} +3 -3
  23. package/dist/components/{p-Cct7UU1q.js.map → p-D2ho0n_2.js.map} +1 -1
  24. package/dist/components/{p-4E4JRnEa.js → p-DbFdNThQ.js} +4 -4
  25. package/dist/components/p-DbFdNThQ.js.map +1 -0
  26. package/dist/components/p-pagination-pages.js +1 -1
  27. package/dist/components/p-pagination.js +1 -1
  28. package/dist/components/p-select.js +4 -16
  29. package/dist/components/p-select.js.map +1 -1
  30. package/dist/components/p-table-footer.js +1 -1
  31. package/dist/components/p-table.js +3 -3
  32. package/dist/esm/p-pagination.p-pagination-pages.p-pagination-size.entry.js.map +1 -1
  33. package/dist/esm/p-pagination_3.entry.js +2 -2
  34. package/dist/esm/p-pagination_3.entry.js.map +1 -1
  35. package/dist/esm/p-select.entry.js +4 -16
  36. package/dist/esm/p-select.entry.js.map +1 -1
  37. package/dist/index.html +1 -1
  38. package/dist/paperless/p-11df525e.entry.js +2 -0
  39. package/dist/paperless/p-11df525e.entry.js.map +1 -0
  40. package/dist/paperless/p-28724747.entry.js +2 -0
  41. package/dist/paperless/p-28724747.entry.js.map +1 -0
  42. package/dist/paperless/p-pagination.p-pagination-pages.p-pagination-size.entry.esm.js.map +1 -1
  43. package/dist/paperless/p-select.entry.esm.js.map +1 -1
  44. package/dist/paperless/paperless.esm.js +1 -1
  45. package/dist/sw.js +1 -1
  46. package/dist/sw.js.map +1 -1
  47. package/package.json +1 -1
  48. package/dist/build/p-641222ac.entry.js +0 -2
  49. package/dist/build/p-641222ac.entry.js.map +0 -1
  50. package/dist/build/p-acc09f05.entry.js +0 -2
  51. package/dist/build/p-acc09f05.entry.js.map +0 -1
  52. package/dist/components/p-4E4JRnEa.js.map +0 -1
  53. package/dist/paperless/p-641222ac.entry.js +0 -2
  54. package/dist/paperless/p-641222ac.entry.js.map +0 -1
  55. package/dist/paperless/p-acc09f05.entry.js +0 -2
  56. package/dist/paperless/p-acc09f05.entry.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"names":["selectComponentCss","multiContainer","cva","multiItem","textContainer","variants","variant","placeholder","default","enableTextWrap","true","false","error","Select","items","multi","strategy","icon","query","autocompletePlaceholder","value","displayKey","dropdownDisplayKey","selectionDisplayKey","valueKey","avatarKey","iconKey","iconClassKey","showIconOnSelectedItem","classKey","applyClassOnSelectedItem","applyClassOnSelectedItemInMenu","avatarLettersKey","identifierKey","queryKey","autoSelectFirst","showChevron","maxDisplayedItems","SELECT_DEFAULT_MAX_DISPLAYED_ITEMS","enableAutocomplete","asyncFilter","loading","enableSelectAll","selectAllText","selectAllIcon","queryChange","valueChange","selectAllChange","dropdownShown","size","prefix","label","helper","required","showOptional","disabled","showAddItem","addItemText","add","emptyStateText","_showDropdown","_selectedItem","_allSelected","_amountHidden","_internals","_inputRef","autocompleteInputRef","_multiContainerRef","_resizeObserver","_resizeDebounceTimer","_checkSelectedItemsTimeout","_items","this","_getParsedItems","_displayValue","h","class","length","ref","map","item","onClick","_selectValue","_getDisplay","_identifierKey","formResetCallback","componentDidLoad","Error","_setMultiContainerMaxWidth","ResizeObserver","clearTimeout","setTimeout","_setCheckSelectedItemsTimeout","observe","_el","_valueChange","itemChanges","componentDidRender","disconnectedCallback","disconnect","render","buttonIcon","ThemedHost","key","forceShowTooltip","applyFullWidth","applyMaxWidth","slot","insideClick","manual","scrollable","show","onIsOpen","ev","_onDropdownOpen","chevron","active","iconClass","_onClick","_getLoadingItems","_getItems","_getAddItem","documentClickHandler","event","childOfComposed","_preselectItem","_showDropdownChanges","emit","multiChanges","Array","isArray","JSON","parse","filter","i","includes","identifier","parsedValue","stringify","currentValue","currentParsedValue","find","itemIdentifier","parsedItemIdentifier","forceBlur","selectedItem","valueArray","includesIndex","findIndex","push","splice","_onBlur","composed","composedPath","nodeName","toLowerCase","classList","contains","force","_onAutoComplete","detail","_checkvalue","toString","indexOf","isSelected","useContainer","checkbox","unshift","_selectAllChange","_getAutoCompleteItem","enableHover","onValueChange","onInputRefChange","calced","clientWidth","style","maxWidth","_checkSelectedItems","containerRect","getBoundingClientRect","querySelectorAll","amountHidden","child","remove","childRect","right","extra","querySelector","focus","isSelection","isSelectedInMenu","content","src","letters","cn","applyPagination","str","text","slice"],"sources":["src/components/molecules/select/select.component.css?tag=p-select","src/components/molecules/select/select.component.tsx"],"sourcesContent":[":host {\n\t--tw-translate-y: 0px !important;\n\t--tw-translate-x: 0px !important;\n}\n","import { Strategy } from '@floating-ui/dom';\nimport {\n\tAttachInternals,\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tListen,\n\tProp,\n\tState,\n\tWatch,\n} from '@stencil/core';\nimport { childOfComposed, cn } from '../../../utils';\nimport { IconVariant } from '../../atoms/icon/icon.component';\n\nimport { cva } from 'class-variance-authority';\nimport { ThemedHost } from '../../../internal/themed-host.component';\nimport { SELECT_DEFAULT_MAX_DISPLAYED_ITEMS } from '../../../utils/constants';\n\nconst multiContainer = cva([\n\t'flex items-center gap-2',\n\t'flex-1 min-w-0 h-full',\n\t'pointer-events-none overflow-hidden',\n]);\n\nconst multiItem = cva([\n\t'item group/item',\n\t'pointer-events-auto cursor-pointer',\n\t'flex h-[1.625rem] items-center gap-2',\n\t'h-[1.625rem] px-2',\n\t'text-sm font-semibold whitespace-nowrap',\n\t'rounded-lg',\n\t'bg-indigo-100',\n\t'dark:bg-white/15',\n]);\n\nconst textContainer = cva('block w-full overflow-hidden text-start', {\n\tvariants: {\n\t\tvariant: {\n\t\t\tplaceholder: 'text-storm-400 dark:text-white',\n\t\t\tdefault: null,\n\t\t},\n\t\tenableTextWrap: {\n\t\t\ttrue: false,\n\t\t\tfalse: 'text-ellipsis whitespace-nowrap',\n\t\t},\n\t\terror: {\n\t\t\ttrue: 'text-negative-red-700 dark:text-negative-red-alternative group-hover/button:text-negative-red-800',\n\t\t\tfalse: null,\n\t\t},\n\t},\n});\n\n@Component({\n\ttag: 'p-select',\n\tstyleUrl: 'select.component.css',\n\tformAssociated: true,\n})\nexport class Select {\n\t/**\n\t * The items to show in the dropdown\n\t */\n\t@Prop() items: string | any[];\n\n\t/**\n\t * Wether to enable multi select\n\t */\n\t@Prop({ reflect: true }) multi: boolean;\n\n\t/**\n\t * The strategy to use for the dropdown placement\n\t */\n\t@Prop() strategy: Strategy = 'absolute';\n\n\t/**\n\t * Icon of the select box\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * The current query\n\t */\n\t@Prop() query: string;\n\n\t/**\n\t * The placeholder of the input\n\t */\n\t@Prop() placeholder: string;\n\n\t/**\n\t * The placeholder of the input used for auto complete\n\t */\n\t@Prop() autocompletePlaceholder: string = 'Search...';\n\n\t/**\n\t * The current value\n\t */\n\t@Prop() value: any;\n\n\t/**\n\t * The key of the object to display\n\t */\n\t@Prop() displayKey: string = 'text';\n\n\t/**\n\t * The key of the object to display in the dropdown (overwrites displayKey)\n\t */\n\t@Prop() dropdownDisplayKey: string | undefined;\n\n\t/**\n\t * The key of the object to display in the input (overwrites displayKey)\n\t */\n\t@Prop() selectionDisplayKey: string | undefined;\n\n\t/**\n\t * The key of the object to return\n\t */\n\t@Prop() valueKey: string;\n\n\t/**\n\t * The key of avatar within an item to show\n\t */\n\t@Prop() avatarKey: string;\n\n\t/**\n\t * The key of icon variant within an item to show\n\t */\n\t@Prop() iconKey: string = 'icon';\n\n\t/**\n\t * The key of the class we can apploy to the icon\n\t */\n\t@Prop() iconClassKey: string = 'iconClass';\n\n\t/**\n\t * Wether to apply the item's icon on the selected item display\n\t */\n\t@Prop() showIconOnSelectedItem: string;\n\n\t/**\n\t * The key of a class in an item to apply\n\t */\n\t@Prop() classKey: string = 'class';\n\n\t/**\n\t * Wether to apply the item's class also on the selected item\n\t */\n\t@Prop() applyClassOnSelectedItem: boolean;\n\n\t/**\n\t * Wether to apply the item's class also on the selected item within the menu\n\t */\n\t@Prop() applyClassOnSelectedItemInMenu: boolean;\n\n\t/**\n\t * The key of avatar letters within an item to show when the avatar url doesn't work\n\t */\n\t@Prop() avatarLettersKey: string;\n\n\t/**\n\t * The key to identify an object\n\t */\n\t@Prop() identifierKey: string;\n\n\t/**\n\t * The key of the object to display\n\t */\n\t@Prop() queryKey?: string;\n\n\t/**\n\t * Wether to automatically select the first item\n\t */\n\t@Prop() autoSelectFirst: boolean = true;\n\n\t/**\n\t * Wether to show the chevron or not\n\t */\n\t@Prop() showChevron: boolean = true;\n\n\t/**\n\t * The maximum amount of items to display\n\t */\n\t@Prop() maxDisplayedItems: number = SELECT_DEFAULT_MAX_DISPLAYED_ITEMS;\n\n\t/**\n\t * Wether to enable autocomplete\n\t */\n\t@Prop() enableAutocomplete: boolean = true;\n\n\t/**\n\t * Wether to enable wrapping the text to a new line in the dropdown menu\n\t */\n\t@Prop() enableTextWrap?: boolean = false;\n\n\t/**\n\t * Wether the input uses async filtering\n\t */\n\t@Prop() asyncFilter: boolean = false;\n\n\t/**\n\t * Wether to show loading items\n\t */\n\t@Prop() loading: boolean = false;\n\n\t/**\n\t * Wether to show the select all item with multi select\n\t */\n\t@Prop() enableSelectAll: boolean = false;\n\n\t/**\n\t * The text of the select all item\n\t */\n\t@Prop() selectAllText: string = 'Select all';\n\n\t/**\n\t * The icon to prefix for select all\n\t */\n\t@Prop() selectAllIcon: IconVariant | undefined;\n\n\t/**\n\t * Event when the query of the autocomplete changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tqueryChange: EventEmitter<string>;\n\n\t/**\n\t * Event when the value changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tvalueChange: EventEmitter<any>;\n\n\t/**\n\t * Event when the select all item has been selected or not\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tselectAllChange: EventEmitter<any>;\n\n\t/**\n\t * Event when the dropdown shows\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tdropdownShown: EventEmitter<any>;\n\n\t/**\n\t * The size of the input group used by the select\n\t */\n\t@Prop() size: 'sm' | 'base' = 'base';\n\n\t/**\n\t * The prefix of the input group used by the select\n\t */\n\t@Prop() prefix: string;\n\n\t/**\n\t * The label of the input group used by the select\n\t */\n\t@Prop() label: string;\n\n\t/**\n\t * The helper of the input group used by the select\n\t */\n\t@Prop() helper: string;\n\n\t/**\n\t * Wether the field is required\n\t */\n\t@Prop({ reflect: true }) required: boolean = true;\n\n\t/**\n\t * Wether to show optional when not required\n\t */\n\t@Prop({ reflect: true }) showOptional: boolean = true;\n\n\t/**\n\t * The helper of the input group used by the select\n\t */\n\t@Prop({ reflect: true }) error: string;\n\n\t/**\n\t * Wether the input group is disabled used by the select\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether to show a \"add\" item\n\t */\n\t@Prop() showAddItem: boolean = false;\n\n\t/**\n\t * The text to show when add item is being shown\n\t */\n\t@Prop() addItemText: string = 'Add item';\n\n\t/**\n\t * Event when the add item is clicked\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tadd: EventEmitter;\n\n\t/**\n\t * The text to show when items is empty\n\t */\n\t@Prop() emptyStateText: string = 'No items available';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _showDropdown: any = false;\n\t@State() private _selectedItem: any = null;\n\n\t@State() private _allSelected: boolean = false;\n\n\t@State() private _amountHidden = 0;\n\n\t@AttachInternals() _internals: ElementInternals;\n\n\tprivate _inputRef: HTMLDivElement;\n\tprivate autocompleteInputRef: HTMLInputElement | HTMLTextAreaElement;\n\tprivate _multiContainerRef: HTMLElement;\n\n\tprivate _resizeObserver: ResizeObserver;\n\tprivate _resizeDebounceTimer: NodeJS.Timeout | undefined;\n\tprivate _checkSelectedItemsTimeout: NodeJS.Timeout | undefined;\n\n\tget _items() {\n\t\treturn this._getParsedItems();\n\t}\n\n\tget _displayValue() {\n\t\tconst placeholder = (\n\t\t\t<div class={textContainer({ variant: 'placeholder' })}>\n\t\t\t\t{this.placeholder}\n\t\t\t</div>\n\t\t);\n\n\t\tif (!this._selectedItem) {\n\t\t\treturn placeholder;\n\t\t}\n\n\t\tif (this.multi) {\n\t\t\tif (this._selectedItem?.length === 0) {\n\t\t\t\treturn placeholder;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tclass={multiContainer()}\n\t\t\t\t\tref={ref => (this._multiContainerRef = ref)}\n\t\t\t\t>\n\t\t\t\t\t{this._selectedItem.map(item => (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass={multiItem()}\n\t\t\t\t\t\t\tonClick={() => this._selectValue(item)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{item[this.selectionDisplayKey ?? this.displayKey]}\n\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\tclass='text-xs text-indigo-500 group-hover/item:text-indigo-800 dark:text-white/15 dark:group-hover/item:text-white'\n\t\t\t\t\t\t\t\tvariant='negative'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t))}\n\n\t\t\t\t\t<div class='extra pointer-events-none hidden text-sm text-storm-100'>\n\t\t\t\t\t\t+{this._amountHidden}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn this._getDisplay(this._selectedItem, true);\n\t}\n\n\tget _identifierKey() {\n\t\treturn this.identifierKey ?? this.valueKey ?? 'value';\n\t}\n\n\tformResetCallback() {\n\t\tthis._selectValue(null);\n\t}\n\n\t// formDisabledCallback(disabled: boolean) {\n\t// \tif (!this._internals.form) {\n\t// \t\treturn;\n\t// \t}\n\t//\n\t// \t//this.disabled = disabled;\n\t// }\n\t//\n\tcomponentDidLoad() {\n\t\tif (!this.valueKey && !this.identifierKey) {\n\t\t\tthrow new Error('You must provide a valueKey or identifierKey');\n\t\t}\n\n\t\tif (this.multi) {\n\t\t\tthis._setMultiContainerMaxWidth();\n\n\t\t\tthis._resizeObserver = new ResizeObserver(() => {\n\t\t\t\tif (this._resizeDebounceTimer) {\n\t\t\t\t\tclearTimeout(this._resizeDebounceTimer);\n\t\t\t\t\tthis._resizeDebounceTimer = null;\n\t\t\t\t}\n\n\t\t\t\tthis._resizeDebounceTimer = setTimeout(() => {\n\t\t\t\t\tthis._setMultiContainerMaxWidth();\n\t\t\t\t\tthis._setCheckSelectedItemsTimeout();\n\t\t\t\t}, 200);\n\t\t\t});\n\t\t\tthis._resizeObserver.observe(this._el);\n\t\t}\n\n\t\tif (this.value) {\n\t\t\tthis._valueChange();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.itemChanges();\n\t}\n\n\tcomponentDidRender() {\n\t\tif (this.multi) {\n\t\t\tthis._setMultiContainerMaxWidth();\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tif (this.multi) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t}\n\t}\n\n\trender() {\n\t\tlet buttonIcon = this.icon;\n\n\t\tif (\n\t\t\tthis._selectedItem &&\n\t\t\t!this.avatarKey &&\n\t\t\t!!this.iconKey &&\n\t\t\tthis._selectedItem?.[this.iconKey] &&\n\t\t\t!this.showIconOnSelectedItem\n\t\t) {\n\t\t\tbuttonIcon = this._selectedItem[this.iconKey];\n\t\t}\n\n\t\tif (\n\t\t\t(this.avatarKey && this._selectedItem?.[this.avatarKey]) ||\n\t\t\t(this.avatarLettersKey && this._selectedItem?.[this.avatarLettersKey])\n\t\t) {\n\t\t\tbuttonIcon = null;\n\t\t}\n\n\t\tif (this.error?.length) {\n\t\t\tbuttonIcon = 'warning';\n\t\t}\n\n\t\treturn (\n\t\t\t<ThemedHost>\n\t\t\t\t<p-field-container\n\t\t\t\t\tvariant='write'\n\t\t\t\t\tprefix={this.prefix}\n\t\t\t\t\tlabel={this.label}\n\t\t\t\t\thelper={this.helper}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\tshowOptional={this.showOptional}\n\t\t\t\t\terror={this.error}\n\t\t\t\t\tforceShowTooltip={!!this.error?.length && !this._showDropdown}\n\t\t\t\t>\n\t\t\t\t\t<p-dropdown\n\t\t\t\t\t\tapplyFullWidth={true}\n\t\t\t\t\t\tapplyMaxWidth={false}\n\t\t\t\t\t\tslot='content'\n\t\t\t\t\t\tinsideClick={true}\n\t\t\t\t\t\tmanual={true}\n\t\t\t\t\t\tscrollable={this.enableAutocomplete ? 'large' : true}\n\t\t\t\t\t\tdisable-trigger-click={this.disabled}\n\t\t\t\t\t\tshow={this._showDropdown}\n\t\t\t\t\t\tonIsOpen={ev => this._onDropdownOpen(ev)}\n\t\t\t\t\t\tstrategy={this.strategy}\n\t\t\t\t\t>\n\t\t\t\t\t\t<p-button\n\t\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t\t\tclass='w-full'\n\t\t\t\t\t\t\tvariant='secondary'\n\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\tchevron={\n\t\t\t\t\t\t\t\tthis.showChevron ? (this._showDropdown ? 'up' : 'down') : false\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tactive={this._showDropdown}\n\t\t\t\t\t\t\terror={!!this.error?.length}\n\t\t\t\t\t\t\ticon={buttonIcon}\n\t\t\t\t\t\t\ticonClass={\n\t\t\t\t\t\t\t\tthis.applyClassOnSelectedItem &&\n\t\t\t\t\t\t\t\tthis._selectedItem?.[this.iconClassKey]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonClick={ev => this._onClick(ev)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass='relative min-w-0 flex-1'\n\t\t\t\t\t\t\t\tref={ref => (this._inputRef = ref)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this._displayValue}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</p-button>\n\t\t\t\t\t\t{this.loading ? this._getLoadingItems() : this._getItems()}\n\t\t\t\t\t\t{this.showAddItem && this._getAddItem()}\n\t\t\t\t\t</p-dropdown>\n\t\t\t\t</p-field-container>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler(event) {\n\t\tif (!this._showDropdown || childOfComposed(event, this._el)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = false;\n\t}\n\n\t@Watch('value')\n\tprivate _valueChange() {\n\t\tsetTimeout(() => {\n\t\t\tthis._preselectItem();\n\t\t\tthis._setCheckSelectedItemsTimeout();\n\t\t});\n\t}\n\n\t@Watch('items')\n\tpublic itemChanges() {\n\t\tsetTimeout(() => this._preselectItem());\n\t}\n\n\t@Watch('_showDropdown')\n\tpublic _showDropdownChanges() {\n\t\tthis.dropdownShown.emit({\n\t\t\tvalue: this._showDropdown,\n\t\t\tquery: this.query,\n\t\t});\n\t}\n\n\t@Watch('multi')\n\tpublic multiChanges() {\n\t\tif (this._selectedItem && !Array.isArray(this._selectedItem)) {\n\t\t\tthis._selectedItem = [];\n\t\t}\n\t}\n\n\tprivate _preselectItem() {\n\t\tlet value =\n\t\t\ttypeof this.value === 'string' && this.multi\n\t\t\t\t? JSON.parse(this.value)\n\t\t\t\t: this.value;\n\n\t\tif (this.multi) {\n\t\t\tif (!Array.isArray(value)) {\n\t\t\t\tthis.value = [];\n\t\t\t\tthis.valueChange.emit(this.value);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.value = value;\n\t\t\tif (!value.length) {\n\t\t\t\tthis._selectedItem = [];\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._selectedItem =\n\t\t\t\t!!this.valueKey && this.valueKey !== 'false'\n\t\t\t\t\t? this._items.filter(i => value.includes(i?.[this.valueKey]))\n\t\t\t\t\t: [...value];\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._selectedItem && !value && this.autoSelectFirst) {\n\t\t\tvalue = this._items[0];\n\t\t}\n\n\t\tconst identifier =\n\t\t\ttypeof value === 'object' && value !== null\n\t\t\t\t? value[this._identifierKey]\n\t\t\t\t: value;\n\t\tconst parsedValue =\n\t\t\ttypeof identifier === 'string' || typeof identifier === 'number'\n\t\t\t\t? identifier\n\t\t\t\t: JSON.stringify(identifier);\n\n\t\tconst currentValue = this._selectedItem\n\t\t\t? this._selectedItem?.[this._identifierKey]\n\t\t\t: null;\n\t\tconst currentParsedValue =\n\t\t\ttypeof currentValue === 'string' || typeof currentValue === 'number'\n\t\t\t\t? currentValue\n\t\t\t\t: JSON.stringify(currentValue);\n\n\t\tif (this._selectedItem && currentParsedValue === parsedValue) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._items?.length && value) {\n\t\t\tthis._selectValue(value, false);\n\t\t\treturn;\n\t\t}\n\n\t\tconst items = this._getParsedItems(false);\n\t\tconst item = items.find(i => {\n\t\t\tconst itemIdentifier = i?.[this._identifierKey];\n\t\t\tconst parsedItemIdentifier =\n\t\t\t\ttypeof itemIdentifier === 'string' || typeof itemIdentifier === 'number'\n\t\t\t\t\t? itemIdentifier\n\t\t\t\t\t: JSON.stringify(itemIdentifier);\n\n\t\t\treturn parsedItemIdentifier === parsedValue;\n\t\t});\n\n\t\tthis._selectValue(!!item ? item : value, false);\n\t}\n\n\tprivate _selectValue(item, forceBlur = true) {\n\t\tlet value =\n\t\t\t!!this.valueKey &&\n\t\t\tthis.valueKey !== 'false' &&\n\t\t\titem !== null &&\n\t\t\t!this.loading\n\t\t\t\t? item?.[this.valueKey]\n\t\t\t\t: item;\n\n\t\tif (this.multi) {\n\t\t\tif (!this._selectedItem || !Array.isArray(this._selectedItem)) {\n\t\t\t\tthis._selectedItem = [];\n\t\t\t}\n\n\t\t\tif (!this.value || !Array.isArray(this.value)) {\n\t\t\t\tthis.value = [];\n\t\t\t}\n\n\t\t\tconst selectedItem = [...this._selectedItem];\n\t\t\tconst valueArray = [...this.value];\n\n\t\t\tconst includesIndex = selectedItem.findIndex(\n\t\t\t\ti => i[this._identifierKey] === item[this._identifierKey]\n\t\t\t);\n\t\t\tif (includesIndex === -1) {\n\t\t\t\tselectedItem.push(item);\n\t\t\t\tvalueArray.push(value);\n\t\t\t} else {\n\t\t\t\tselectedItem.splice(includesIndex, 1);\n\t\t\t\tvalueArray.splice(includesIndex, 1);\n\t\t\t}\n\n\t\t\tthis._selectedItem = selectedItem;\n\t\t\tthis.value = valueArray;\n\t\t\tthis.valueChange.emit(valueArray);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._selectedItem = item;\n\t\tthis._onBlur(forceBlur);\n\n\t\tif (value === this.value) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.value = value;\n\t\tthis.valueChange.emit(value);\n\t}\n\n\tprivate _onClick(event) {\n\t\tconst composed = event?.composedPath();\n\n\t\tfor (const item of composed) {\n\t\t\tif (item.nodeName.toLowerCase() === 'p-button') {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (item.classList?.contains('item')) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tthis._showDropdown = !this._showDropdown;\n\t}\n\n\tprivate _onBlur(force = false) {\n\t\tif (this.enableAutocomplete && !force) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = false;\n\t}\n\n\tprivate _onAutoComplete(ev) {\n\t\tif (!this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = true;\n\n\t\tthis.query = ev.detail;\n\t\tthis.queryChange.emit(ev.detail);\n\t}\n\n\tprivate _checkvalue(key, item) {\n\t\treturn (\n\t\t\titem?.[key]\n\t\t\t\t?.toString()\n\t\t\t\t?.toLowerCase()\n\t\t\t\t.indexOf(this.query?.toLowerCase()) >= 0\n\t\t);\n\t}\n\n\tprivate _getItems() {\n\t\tlet items = this._items.map(item => {\n\t\t\tconst isSelected =\n\t\t\t\tthis.multi && !!this._selectedItem && Array.isArray(this._selectedItem)\n\t\t\t\t\t? this._selectedItem.findIndex(\n\t\t\t\t\t\t\ti => i[this._identifierKey] === item[this._identifierKey]\n\t\t\t\t\t ) >= 0\n\t\t\t\t\t: item[this._identifierKey] ===\n\t\t\t\t\t this._selectedItem?.[this._identifierKey];\n\t\t\treturn (\n\t\t\t\t<p-dropdown-menu-item\n\t\t\t\t\tenableTextWrap={this.enableTextWrap}\n\t\t\t\t\tuseContainer={false}\n\t\t\t\t\tonClick={() => this._selectValue(item)}\n\t\t\t\t\tactive={isSelected}\n\t\t\t\t\tcheckbox={this.multi ? true : false}\n\t\t\t\t\tslot='items'\n\t\t\t\t>\n\t\t\t\t\t{this._getDisplay(item, false, isSelected)}\n\t\t\t\t</p-dropdown-menu-item>\n\t\t\t);\n\t\t});\n\n\t\tif (!this._items.length) {\n\t\t\titems = [\n\t\t\t\t<p\n\t\t\t\t\tclass='w-full p-2 text-center text-sm text-storm-400 dark:text-hurricane-200'\n\t\t\t\t\tslot='items'\n\t\t\t\t>\n\t\t\t\t\t{this.emptyStateText}\n\t\t\t\t</p>,\n\t\t\t];\n\t\t}\n\n\t\tif (this.enableSelectAll && this._items.length) {\n\t\t\titems.unshift(\n\t\t\t\t<p-dropdown-menu-item\n\t\t\t\t\tslot='items'\n\t\t\t\t\tuseContainer={false}\n\t\t\t\t\tcheckbox\n\t\t\t\t\tonClick={() => this._selectAllChange()}\n\t\t\t\t\tactive={this._allSelected}\n\t\t\t\t>\n\t\t\t\t\t{this.selectAllIcon?.length ? (\n\t\t\t\t\t\t<span class='flex items-center gap-2'>\n\t\t\t\t\t\t\t<div class='flex w-6 justify-center text-lg'>\n\t\t\t\t\t\t\t\t<p-icon variant={this.selectAllIcon} />\n\t\t\t\t\t\t\t</div>{' '}\n\t\t\t\t\t\t\t{this.selectAllText}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) : (\n\t\t\t\t\t\tthis.selectAllText\n\t\t\t\t\t)}\n\t\t\t\t</p-dropdown-menu-item>\n\t\t\t);\n\t\t}\n\n\t\tif (this.enableAutocomplete) {\n\t\t\titems.unshift(this._getAutoCompleteItem());\n\t\t}\n\n\t\treturn items;\n\t}\n\n\tprivate _getAddItem() {\n\t\treturn (\n\t\t\t<p-dropdown-menu-item\n\t\t\t\tonClick={() => this.add.emit()}\n\t\t\t\tuseContainer={false}\n\t\t\t\tslot='items'\n\t\t\t>\n\t\t\t\t<span class='flex items-center gap-1 font-semibold text-indigo-600'>\n\t\t\t\t\t{this.addItemText}\n\t\t\t\t\t<p-icon variant='plus' />\n\t\t\t\t</span>\n\t\t\t</p-dropdown-menu-item>\n\t\t);\n\t}\n\n\tprivate _getLoadingItems() {\n\t\tconst items = [0, 0, 0].map(() => (\n\t\t\t<p-dropdown-menu-item\n\t\t\t\tenableHover={false}\n\t\t\t\tslot='items'\n\t\t\t>\n\t\t\t\t<p-loader\n\t\t\t\t\tvariant='ghost'\n\t\t\t\t\tclass='h-6 w-full rounded'\n\t\t\t\t/>\n\t\t\t</p-dropdown-menu-item>\n\t\t));\n\n\t\tif (this.enableAutocomplete) {\n\t\t\titems.unshift(this._getAutoCompleteItem());\n\t\t}\n\n\t\treturn items;\n\t}\n\n\tprivate _getAutoCompleteItem() {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclass='sticky top-0 z-10 mb-3 h-8'\n\t\t\t\tslot='items'\n\t\t\t>\n\t\t\t\t<p-field\n\t\t\t\t\tclass='block'\n\t\t\t\t\tplaceholder={this.autocompletePlaceholder}\n\t\t\t\t\tonValueChange={ev => this._onAutoComplete(ev)}\n\t\t\t\t\tonInputRefChange={ev => (this.autocompleteInputRef = ev.detail)}\n\t\t\t\t\tvalue={this.query}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tprivate _setMultiContainerMaxWidth() {\n\t\tif (!this._inputRef || !this._multiContainerRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst calced = this._inputRef.clientWidth - 16;\n\t\tthis._multiContainerRef.style.maxWidth = `${calced >= 16 ? calced : 16}px`;\n\t}\n\n\tprivate _setCheckSelectedItemsTimeout() {\n\t\tif (this._checkSelectedItemsTimeout) {\n\t\t\tclearTimeout(this._checkSelectedItemsTimeout);\n\t\t}\n\n\t\tthis._checkSelectedItemsTimeout = setTimeout(\n\t\t\t() => this._checkSelectedItems(),\n\t\t\t50\n\t\t);\n\t}\n\n\tprivate _checkSelectedItems() {\n\t\tif (!this._multiContainerRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst containerRect = this._multiContainerRef.getBoundingClientRect();\n\t\tconst items = this._multiContainerRef.querySelectorAll('.item');\n\n\t\tlet amountHidden = 0;\n\n\t\tfor (const child of items) {\n\t\t\tchild.classList.remove('hidden');\n\t\t\tchild.classList.add('flex');\n\n\t\t\tconst childRect = child.getBoundingClientRect();\n\t\t\tif (childRect.right > containerRect.right) {\n\t\t\t\tchild.classList.remove('flex');\n\t\t\t\tchild.classList.add('hidden');\n\t\t\t\tamountHidden++;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tthis._amountHidden = amountHidden;\n\t\tconst extra = this._multiContainerRef.querySelector('.extra');\n\t\tif (!extra) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!extra.classList.contains('hidden')) {\n\t\t\textra.classList.add('hidden');\n\t\t}\n\n\t\tif (amountHidden > 0) {\n\t\t\textra.classList.remove('hidden');\n\t\t}\n\t}\n\n\tprivate _onDropdownOpen(ev) {\n\t\tif (!ev.detail || !this.autocompleteInputRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetTimeout(() => this.autocompleteInputRef.focus(), 100);\n\t}\n\n\tprivate _selectAllChange() {\n\t\tthis._allSelected = !this._allSelected;\n\t\tthis.selectAllChange.emit(this._allSelected);\n\t}\n\n\tprivate _getDisplay(item, isSelection = false, isSelectedInMenu = false) {\n\t\tlet content = (\n\t\t\t<div\n\t\t\t\tclass={textContainer({\n\t\t\t\t\tvariant: 'default',\n\t\t\t\t\terror: !!this.error?.length,\n\t\t\t\t\tenableTextWrap: this.enableTextWrap && !isSelection,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{\n\t\t\t\t\titem[\n\t\t\t\t\t\tisSelection\n\t\t\t\t\t\t\t? this.selectionDisplayKey ?? this.displayKey\n\t\t\t\t\t\t\t: this.displayKey\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t</div>\n\t\t);\n\n\t\tif (this.avatarKey) {\n\t\t\tcontent = (\n\t\t\t\t<span class='flex items-center gap-2'>\n\t\t\t\t\t<p-avatar\n\t\t\t\t\t\tsize='sm'\n\t\t\t\t\t\tsrc={item[this.avatarKey]}\n\t\t\t\t\t\tletters={item[this.avatarLettersKey]}\n\t\t\t\t\t></p-avatar>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={textContainer({\n\t\t\t\t\t\t\tvariant: 'default',\n\t\t\t\t\t\t\terror: !!this.error?.length,\n\t\t\t\t\t\t\tenableTextWrap: this.enableTextWrap && !isSelection,\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t{item[this.dropdownDisplayKey ?? this.displayKey]}\n\t\t\t\t\t</div>\n\t\t\t\t</span>\n\t\t\t);\n\t\t}\n\n\t\tif (this.iconKey && (!isSelection || this.showIconOnSelectedItem)) {\n\t\t\tcontent = (\n\t\t\t\t<span class='flex items-center gap-2'>\n\t\t\t\t\t{item[this.iconKey] && (\n\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\tclass={cn(\n\t\t\t\t\t\t\t\t'text-storm-300 dark:text-hurricane-200',\n\t\t\t\t\t\t\t\t(!isSelection || !!this.applyClassOnSelectedItem) &&\n\t\t\t\t\t\t\t\t\t(!isSelectedInMenu || !!this.applyClassOnSelectedItemInMenu)\n\t\t\t\t\t\t\t\t\t? item?.[this.iconClassKey] ?? ''\n\t\t\t\t\t\t\t\t\t: ''\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\tvariant={item[this.iconKey] as IconVariant}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={textContainer({\n\t\t\t\t\t\t\tvariant: 'default',\n\t\t\t\t\t\t\terror: !!this.error?.length,\n\t\t\t\t\t\t\tenableTextWrap: this.enableTextWrap && !isSelection,\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t{item[this.dropdownDisplayKey ?? this.displayKey]}\n\t\t\t\t\t</div>\n\t\t\t\t</span>\n\t\t\t);\n\t\t}\n\n\t\tif (\n\t\t\t(!isSelection || !!this.applyClassOnSelectedItem) &&\n\t\t\t(!isSelectedInMenu || !!this.applyClassOnSelectedItemInMenu) &&\n\t\t\t!!item?.[this.classKey]?.length\n\t\t) {\n\t\t\treturn <div class={item[this.classKey]}>{content}</div>;\n\t\t}\n\n\t\treturn content;\n\t}\n\n\tprivate _getParsedItems(applyPagination = true) {\n\t\tif (!this.items || this.loading) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet items =\n\t\t\ttypeof this.items === 'string' ? JSON.parse(this.items) : this.items;\n\n\t\tif (typeof items?.[0] === 'string') {\n\t\t\tthis.displayKey = 'text';\n\t\t\tthis.valueKey = 'value';\n\n\t\t\titems = items.map(str => ({\n\t\t\t\tvalue: str,\n\t\t\t\ttext: str,\n\t\t\t}));\n\t\t}\n\n\t\tif (this.query?.length && !this.asyncFilter) {\n\t\t\titems = items.filter(item => {\n\t\t\t\tif (this.queryKey) {\n\t\t\t\t\treturn this._checkvalue(this.queryKey, item);\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\tthis._checkvalue(this._identifierKey, item) ||\n\t\t\t\t\tthis._checkvalue(this.displayKey, item)\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\n\t\tif (!applyPagination) {\n\t\t\treturn items;\n\t\t}\n\n\t\treturn items?.slice(0, this.maxDisplayedItems);\n\t}\n}\n"],"mappings":"6RAAA,MAAMA,EAAqB,mlJCoB3B,MAAMC,EAAiBC,EAAI,CAC1B,0BACA,wBACA,wCAGD,MAAMC,EAAYD,EAAI,CACrB,kBACA,qCACA,uCACA,oBACA,0CACA,aACA,gBACA,qBAGD,MAAME,EAAgBF,EAAI,0CAA2C,CACpEG,SAAU,CACTC,QAAS,CACRC,YAAa,iCACbC,QAAS,MAEVC,eAAgB,CACfC,KAAM,MACNC,MAAO,mCAERC,MAAO,CACNF,KAAM,oGACNC,MAAO,S,MAUGE,EAAM,M,sYAIVC,MAKiBC,MAKjBC,SAAqB,WAKrBC,KAKAC,MAKAX,YAKAY,wBAAkC,YAKlCC,MAKAC,WAAqB,OAKrBC,mBAKAC,oBAKAC,SAKAC,UAKAC,QAAkB,OAKlBC,aAAuB,YAKvBC,uBAKAC,SAAm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L,C,CAGR,OAAOA,GAAOwL,MAAM,EAAG9H,KAAKnC,kB","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,h as a,F as r,g as i}from"./p-Dpmiv2da.js";import{c as o}from"./p-CBWjHURv.js";import{T as n}from"./p-C1iNEsnH.js";import{P as s,a as h}from"./p-vyRrSf5s.js";import{a as p}from"./p-BFSNj6hu.js";import{f as d,g}from"./p-DiJj8rmO.js";import{c}from"./p-CT54OXR2.js";import{a as m}from"./p-C5CTp9IA.js";import"./p-ChV9xqsO.js";import"./p-BIwGgs9f.js";const l="*{box-sizing:border-box}.static{position:static!important}.mx-0{margin-left:0!important;margin-right:0!important}.flex{display:flex!important}.hidden{display:none!important}.h-4{height:1rem!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}.rounded-full{border-radius:9999px!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-off-white-700{--tw-border-opacity:1!important;border-color:rgb(222 219 213/var(--tw-border-opacity,1))!important}.bg-off-white-300{--tw-bg-opacity:1!important;background-color:rgb(248 247 244/var(--tw-bg-opacity,1))!important}.p-1{padding:.25rem!important}.text-off-white-700{--tw-text-opacity:1!important;color:rgb(222 219 213/var(--tw-text-opacity,1))!important}.dark\\:border-hurricane-400:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-border-opacity:1!important;border-color:rgb(70 75 84/var(--tw-border-opacity,1))!important}.dark\\:bg-hurricane-500:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1!important;background-color:rgb(54 60 70/var(--tw-bg-opacity,1))!important}.dark\\:text-hurricane-400:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(70 75 84/var(--tw-text-opacity,1))!important}.dark\\:border-hurricane-400:where([data-theme=dark],[data-theme=dark] *){--tw-border-opacity:1!important;border-color:rgb(70 75 84/var(--tw-border-opacity,1))!important}.dark\\:bg-hurricane-500:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1!important;background-color:rgb(54 60 70/var(--tw-bg-opacity,1))!important}.dark\\:text-hurricane-400:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(70 75 84/var(--tw-text-opacity,1))!important}";const w=o(["p-pagination","items-center gap-2","rounded-full","bg-off-white-300 border border-solid border-off-white-700","dark:bg-hurricane-500 dark:border-hurricane-400","p-1"],{variants:{hidden:{false:"flex",true:"hidden"}}});const f=class{constructor(a){t(this,a);this.pageChange=e(this,"pageChange",3);this.pageSizeChange=e(this,"pageSizeChange",3);this.pagesChange=e(this,"pagesChange",3)}hideOnSinglePage=true;enablePaginationSize=true;enablePaginationPages=true;page=1;total;pageSize=s;pageSizeOptions=h;pageChange;pageSizeChange;pagesChange;_hasPaginationPages=true;render(){const t=this.hideOnSinglePage&&this.total<=this.pageSizeOptions?.[0];return a(n,{key:"bcde797de60d6429022c715ce087064cf02be38d"},a("div",{key:"8ec4343e86455080017a71aa0aab3c533ee2af6c",class:w({hidden:t&&!this._hasPaginationPages||!this.enablePaginationSize&&!this.enablePaginationPages})},this.enablePaginationPages&&this.enablePaginationSize&&a(r,{key:"8d99901d0bc501b5aa66b40fd2a8c60415049f05"},a("p-pagination-size",{key:"8a5799ac33e9e84630c9eebc6f1c1a4931b325d5",hidden:t,size:this.pageSize,sizeOptions:this.pageSizeOptions,onSizeChange:({detail:t})=>this._changePageSize(t)}),!t&&this.hideOnSinglePage&&this._hasPaginationPages&&a("p-divider",{key:"48900c21a0de1af114e4f0c784e8b680c7527d03",variant:"vertical",class:"mx-0 h-4 text-off-white-700 dark:text-hurricane-400"})),this.enablePaginationPages&&a("p-pagination-pages",{key:"9ffb6d5a3c282f14df3adcb99ffa16c0ed147b2c",pageSize:this.pageSize,total:this.total,page:this.page,hideOnSinglePage:this.hideOnSinglePage,onPageChange:({detail:t})=>this.pageChange.emit(t),onPagesChange:({detail:t})=>{this._hasPaginationPages=t>1;this.pagesChange.emit(t)}})))}_changePageSize(t){if(!t){return}this.pageSize=t;this.pageSizeChange.emit(this.pageSize)}};f.style=l;const b="*{box-sizing:border-box}.static{position:static!important}.mt-2{margin-top:.5rem!important}.flex{display:flex!important}.hidden{display:none!important}.w-28{width:7rem!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}";const u=o(["p-pagination","flex gap-2 items-center"],{variants:{hidden:{false:"flex",true:"hidden"}}});const v=class{constructor(a){t(this,a);this.pageChange=e(this,"pageChange",3);this.pagesChange=e(this,"pagesChange",3)}_defaultDropdownPageTemplate=t=>d(this._locales.page,{page:t});page=1;pageChange;dropdownPageTemplate=this._defaultDropdownPageTemplate;pageSize=s;hideOnSinglePage=false;total;pagesChange;_showDropdown=[false,false];_dropdowns=[];_locales={};get _el(){return i(this)}_pages=[];_set=[];componentWillLoad(){this._setLocales()}componentWillRender(){this._generate()}render(){return a(n,{key:"aaf3e71903ad861f039ceabfefbfdc0be38a6568"},a("div",{key:"41ffcc99576ba46d8b2f3730c7db0fec8823c1f8",class:u({hidden:this.hideOnSinglePage&&this._set?.length===3})},this._set?.map((t=>{if(t.type==="previous"||t.type==="next"){return a("p-pagination-pages-item",{variant:"carousel",disabled:this._carouselDisabled(t.type),onClick:()=>t.type==="previous"?this._previousClick():this._nextClick()},t.value)}if(t.type==="ellipsis"){return a("p-dropdown",{placement:"top",applyChevron:false,insideClick:true,show:this._showDropdown[t.dropdownIndex],onIsOpen:({detail:e})=>this._onShowDropdown(e,t.dropdownIndex),ref:e=>this._dropdowns[t.dropdownIndex]=e},a("p-pagination-pages-item",{slot:"trigger"},"..."),t.options?.slice(0,5).map((t=>a("p-dropdown-menu-item",{variant:"pagination",autoHeight:true,onClick:()=>this._pageClick(t),slot:"items"},this.dropdownPageTemplate?this.dropdownPageTemplate(t):this._defaultDropdownPageTemplate(t)))),t.options?.length>5&&this._showDropdown[t.dropdownIndex]&&a("p-field",{class:"mt-2 w-28",size:"sm",icon:"enter-key",iconPosition:"end",type:"number",properties:{min:1,max:this._pages.length,step:1},autoFocus:true,onEnter:({detail:t})=>this._enterPress(t),slot:"items"}))}return a("p-pagination-pages-item",{active:t.value===this.page,onClick:()=>this._pageClick(t.value)},t.value)}))))}pageChangeHandler(){this._generate()}async _setLocales(){this._locales=await g(this._el)}documentClickHandler(t){const e=[false,false];if(this._dropdowns[0]&&p(t,this._dropdowns[0])){e[0]=true}if(this._dropdowns[1]&&p(t,this._dropdowns[1])){e[1]=true}this._showDropdown=e}_generate(){this._pages=this._generatePages();this._set=this._generateSet();if(this.page>this._pages?.length){this._changePage(this._pages.length)}}_changePage(t){if(!t){return}this._showDropdown=[false,false];this.page=t;this.pageChange.emit(this.page)}_previousClick(){if(this._carouselDisabled("previous")){return}this._changePage(this.page-1)}_nextClick=()=>{if(this._carouselDisabled("next")){return}this._changePage(this.page+1)};_carouselDisabled=t=>{if(t==="next"){const t=this.page+1;if(t>this._pages[this._pages.length-1]){return true}}if(t==="previous"){const t=this.page-1;if(t<this._pages[0]){return true}}return false};_pageClick=t=>this._changePage(t);_enterPress(t){if(typeof t==="string"){t=parseInt(t)}if(isNaN(t)){return}if(t<1){t=1}if(t>this._pages.length){t=this._pages.length}this._changePage(t)}_onShowDropdown(t=false,e){const a=[...this._showDropdown];a[e]=t;this._showDropdown=a}_generatePages(){if(!this.total||!this.pageSize){return[]}const t=Math.ceil(this.total/this.pageSize);this.pagesChange.emit(t);return new Array(t).fill(undefined).map(((t,e)=>e+1))}_generateSet=(t=1,e=true)=>{const r=this._pages.length;if(!r){return[]}let i=this.page-t;let o=this.page+t;if(o>r){o=r;i=r-t*2;i=i<1?1:i}if(i<=1){i=1;o=Math.min(t*2+1,r)}const n=[];const s={type:"previous",value:a("p-icon",{variant:"caret",size:"sm",rotate:90})};const h={type:"next",value:a("p-icon",{variant:"caret",size:"sm",rotate:-90})};if(t===null){const t=this._pages.map((t=>({type:"page",value:t})));return e?[s,...t,h]:t}if(e){n.push(s)}let p=0;if(i<=3){for(let t=1;t<i;t++){n.push({type:"page",value:this._pages[t-1]})}}else{n.push({type:"page",value:1});n.push({type:"ellipsis",dropdownIndex:p,options:Array.from({length:i-2},((t,e)=>e+2))});p++}for(let t=i;t<=o;t++){n.push({type:"page",value:this._pages[t-1]})}if(o>=r-2){for(let t=o+1;t<=r;t++){n.push({type:"page",value:this._pages[t-1]})}}else{n.push({type:"ellipsis",dropdownIndex:p,options:Array.from({length:r-o-1},((t,e)=>e+o+1))});p++;n.push({type:"page",value:this._pages[this._pages.length-1]})}if(e){n.push(h)}return n};static get watchers(){return{page:["pageChangeHandler"],pageSize:["pageChangeHandler"],total:["pageChangeHandler"]}}};v.style=b;const x="*{box-sizing:border-box}.static{position:static!important}.flex{display:flex!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.min-w-0{min-width:0!important}.flex-1{flex:1 1 0%!important}.flex-shrink-0{flex-shrink:0!important}.cursor-pointer{cursor:pointer!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}.overflow-hidden{overflow:hidden!important}.text-ellipsis{text-overflow:ellipsis!important}.text-nowrap{text-wrap:nowrap!important}.rounded-full{border-radius:9999px!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-indigo-600{--tw-border-opacity:1!important;border-color:rgb(82 138 250/var(--tw-border-opacity,1))!important}.border-transparent{border-color:transparent!important}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.bg-white,.bg-white-600{--tw-bg-opacity:1!important}.bg-white-600{background-color:rgb(250 250 250/var(--tw-bg-opacity,1))!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-medium{font-weight:500!important}.text-hurricane-200{--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}.text-storm-300{--tw-text-opacity:1!important;color:rgb(116 120 127/var(--tw-text-opacity,1))!important}.text-storm-500{color:rgb(24 30 41/var(--tw-text-opacity,1))!important}.text-storm-500,.text-white{--tw-text-opacity:1!important}.text-white{color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.shadow-1{--tw-shadow:0 1px 1px rgba(0,2,2,.08)!important;--tw-shadow-colored:0 1px 1px var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important}.ring,.ring-2{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important}.ring-indigo-100{--tw-ring-opacity:1!important;--tw-ring-color:rgb(227 236 254/var(--tw-ring-opacity,1))!important}.hover\\:bg-white-600:hover{--tw-bg-opacity:1!important;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))!important}.group\\/pagination-size-trigger:hover .group-hover\\/pagination-size-trigger\\:text-storm-500{--tw-text-opacity:1!important;color:rgb(24 30 41/var(--tw-text-opacity,1))!important}.dark\\:bg-white\\/15:where(:host([data-theme=dark]),:host([data-theme=dark]) *){background-color:hsla(0,0%,100%,.15)!important}.dark\\:bg-white\\/25:where(:host([data-theme=dark]),:host([data-theme=dark]) *){background-color:hsla(0,0%,100%,.25)!important}.dark\\:text-hurricane-200:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}.dark\\:text-white:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.dark\\:ring-0:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.dark\\:hover\\:bg-white\\/25:hover:where(:host([data-theme=dark]),:host([data-theme=dark]) *){background-color:hsla(0,0%,100%,.25)!important}.group\\/pagination-size-trigger:hover .dark\\:group-hover\\/pagination-size-trigger\\:text-white:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.dark\\:bg-white\\/15:where([data-theme=dark],[data-theme=dark] *){background-color:hsla(0,0%,100%,.15)!important}.dark\\:bg-white\\/25:where([data-theme=dark],[data-theme=dark] *){background-color:hsla(0,0%,100%,.25)!important}.dark\\:text-hurricane-200:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}.dark\\:text-white:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.dark\\:ring-0:where([data-theme=dark],[data-theme=dark] *){--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.dark\\:hover\\:bg-white\\/25:hover:where([data-theme=dark],[data-theme=dark] *){background-color:hsla(0,0%,100%,.25)!important}.group\\/pagination-size-trigger:hover .dark\\:group-hover\\/pagination-size-trigger\\:text-white:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}";const k=o("p-pagination-size",{variants:{hidden:{false:null,true:"hidden"}}});const y=o(["group/pagination-size-trigger","flex items-center gap-2","px-2 h-6","text-sm text-storm-500 font-medium ","dark:text-white","cursor-pointer rounded-full","shadow-1 border border-solid"],{variants:{active:{false:["bg-white hover:bg-white-600 border-transparent","dark:bg-white/15 dark:hover:bg-white/25"],true:["bg-white-600 border-indigo-600 ring ring-2 ring-indigo-100","dark:bg-white/25 dark:ring-0"]}}});const z=class{constructor(a){t(this,a);this.sizeChange=e(this,"sizeChange",3)}_defaultItemTemplate=t=>d(this._locales.item,{size:t});size=s;sizeOptions=h;sizeChange;itemTemplate=this._defaultItemTemplate;get _el(){return i(this)}hidden=false;dropdownIsOpen=false;_locales={};componentWillLoad(){this._setLocales()}render(){return a(n,{key:"a18dd95925cb38687e6463f32e2e7c8d04c4d689",class:k({hidden:m(this.hidden)})},a("p-dropdown",{key:"f7ffc0bfe61c6d4fded92b543cd26603c7352625",applyFullWidth:true,applyMaxWidth:false,placement:"top-start",chevronDirection:"down",onIsOpen:({detail:t})=>this.dropdownIsOpen=t},a("div",{key:"15eceebfd2f2cfa644efe43e795126c6c9a62a35",class:y({active:this.dropdownIsOpen}),slot:"trigger"},a("p",{key:"f8b00116365d9065943e10325bad2a0337788156",class:"min-w-0 flex-1 overflow-hidden text-ellipsis text-nowrap"},this.itemTemplate?this.itemTemplate(this.size):this._defaultItemTemplate(this.size)),a("p-icon",{key:"1a8d46f5e8128174359bf17d89892a3abb989299",class:c(["flex-shrink-0","group-hover/pagination-size-trigger:text-storm-500","dark:group-hover/pagination-size-trigger:text-white"],{"text-storm-300 dark:text-hurricane-200":!this.dropdownIsOpen,"text-storm-500 dark:text-white":!!this.dropdownIsOpen}),variant:"double-caret",size:"sm"})),a("slot",{key:"5a53c7343a61ef699a6bdae8044224141748c47f",slot:"items"},this.sizeOptions.map((t=>a("p-dropdown-menu-item",{active:t===this.size,onClick:()=>this._changeSize(t)},this.itemTemplate?this.itemTemplate(t):this._defaultItemTemplate(t)))))))}async _setLocales(){this._locales=await g(this._el)}_changeSize(t){if(!t){return}this.size=t;this.sizeChange.emit(this.size)}};z.style=x;export{f as p_pagination,v as p_pagination_pages,z as p_pagination_size};
2
+ //# sourceMappingURL=p-28724747.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["paginationComponentCss","pagination","cva","variants","hidden","false","true","Pagination","hideOnSinglePage","enablePaginationSize","enablePaginationPages","page","total","pageSize","PAGINATION_DEFAULT_PAGE_SIZE","pageSizeOptions","PAGINATION_DEFAULT_PAGE_SIZE_OPTIONS","pageChange","pageSizeChange","pagesChange","_hasPaginationPages","render","hidePageSizeSelect","this","h","ThemedHost","key","class","Fragment","size","sizeOptions","onSizeChange","detail","_changePageSize","variant","onPageChange","emit","onPagesChange","s","paginationPagesComponentCss","PaginationPages","_defaultDropdownPageTemplate","formatTranslation","_locales","dropdownPageTemplate","_showDropdown","_dropdowns","_pages","_set","componentWillLoad","_setLocales","componentWillRender","_generate","length","map","p","type","disabled","_carouselDisabled","onClick","_previousClick","_nextClick","value","placement","applyChevron","insideClick","show","dropdownIndex","onIsOpen","_onShowDropdown","ref","el","slot","options","slice","v","autoHeight","_pageClick","icon","iconPosition","properties","min","max","step","autoFocus","onEnter","_enterPress","active","pageChangeHandler","getLocaleComponentStrings","_el","documentClickHandler","event","dropdowns","childOfComposed","_generatePages","_generateSet","_changePage","nextPage","previousPage","parseInt","isNaN","showDropdown","pages","Math","ceil","Array","fill","undefined","_","i","range","enableBoundaries","totalPages","start","end","set","previous","rotate","next","push","from","paginationSizeComponentCss","paginationSize","trigger","PaginationSize","_defaultItemTemplate","item","sizeChange","itemTemplate","dropdownIsOpen","asBoolean","applyFullWidth","applyMaxWidth","chevronDirection","cn","option","_changeSize"],"sources":["src/components/molecules/pagination/pagination/pagination.component.css?tag=p-pagination&encapsulation=shadow","src/components/molecules/pagination/pagination/pagination.component.tsx","src/components/molecules/pagination/pages/pagination-pages.component.css?tag=p-pagination-pages&encapsulation=shadow","src/components/molecules/pagination/pages/pagination-pages.component.tsx","src/components/molecules/pagination/size/pagination-size.component.css?tag=p-pagination-size&encapsulation=shadow","src/components/molecules/pagination/size/pagination-size.component.tsx"],"sourcesContent":[null,"import {\n\tComponent,\n\tEvent,\n\tEventEmitter,\n\tFragment,\n\th,\n\tProp,\n\tState,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { ThemedHost } from '../../../../internal/themed-host.component';\nimport {\n\tPAGINATION_DEFAULT_PAGE_SIZE,\n\tPAGINATION_DEFAULT_PAGE_SIZE_OPTIONS,\n} from '../../../../utils/constants';\n\nconst pagination = cva(\n\t[\n\t\t'p-pagination',\n\t\t'items-center gap-2',\n\t\t'rounded-full',\n\t\t'bg-off-white-300 border border-solid border-off-white-700',\n\t\t'dark:bg-hurricane-500 dark:border-hurricane-400',\n\t\t'p-1',\n\t],\n\t{\n\t\tvariants: {\n\t\t\thidden: {\n\t\t\t\tfalse: 'flex',\n\t\t\t\ttrue: 'hidden',\n\t\t\t},\n\t\t},\n\t}\n);\n\n@Component({\n\ttag: 'p-pagination',\n\tstyleUrl: 'pagination.component.css',\n\tshadow: true,\n})\nexport class Pagination {\n\t/**\n\t * Wether to hide when there is only 1 page available\n\t */\n\t@Prop() hideOnSinglePage: boolean = true;\n\n\t/**\n\t * Wether to enable pagination size select\n\t */\n\t@Prop() enablePaginationSize: boolean = true;\n\n\t/**\n\t * Wether to enable pagination pages\n\t */\n\t@Prop() enablePaginationPages: boolean = true;\n\n\t/**\n\t * The current page\n\t */\n\t@Prop({ mutable: true, reflect: true }) page: number = 1;\n\n\t/**\n\t * The total amount of items\n\t */\n\t@Prop() total!: number;\n\n\t/**\n\t * The amount of items per page\n\t */\n\t@Prop() pageSize: number = PAGINATION_DEFAULT_PAGE_SIZE;\n\n\t/**\n\t * The options for the page size\n\t */\n\t@Prop() pageSizeOptions: number[] = PAGINATION_DEFAULT_PAGE_SIZE_OPTIONS;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageChange: EventEmitter<number>;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageSizeChange: EventEmitter<number>;\n\n\t/**\n\t * The pages that were generated\n\t */\n\t@Event({ bubbles: false }) pagesChange: EventEmitter<number>;\n\n\t@State() private _hasPaginationPages = true;\n\n\trender() {\n\t\tconst hidePageSizeSelect =\n\t\t\tthis.hideOnSinglePage && this.total <= this.pageSizeOptions?.[0];\n\n\t\treturn (\n\t\t\t<ThemedHost>\n\t\t\t\t<div\n\t\t\t\t\tclass={pagination({\n\t\t\t\t\t\thidden:\n\t\t\t\t\t\t\t(hidePageSizeSelect && !this._hasPaginationPages) ||\n\t\t\t\t\t\t\t(!this.enablePaginationSize && !this.enablePaginationPages),\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{this.enablePaginationPages && this.enablePaginationSize && (\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<p-pagination-size\n\t\t\t\t\t\t\t\thidden={hidePageSizeSelect}\n\t\t\t\t\t\t\t\tsize={this.pageSize}\n\t\t\t\t\t\t\t\tsizeOptions={this.pageSizeOptions}\n\t\t\t\t\t\t\t\tonSizeChange={({ detail }) => this._changePageSize(detail)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t{!hidePageSizeSelect &&\n\t\t\t\t\t\t\t\tthis.hideOnSinglePage &&\n\t\t\t\t\t\t\t\tthis._hasPaginationPages && (\n\t\t\t\t\t\t\t\t\t<p-divider\n\t\t\t\t\t\t\t\t\t\tvariant='vertical'\n\t\t\t\t\t\t\t\t\t\tclass='mx-0 h-4 text-off-white-700 dark:text-hurricane-400'\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{this.enablePaginationPages && (\n\t\t\t\t\t\t<p-pagination-pages\n\t\t\t\t\t\t\tpageSize={this.pageSize}\n\t\t\t\t\t\t\ttotal={this.total}\n\t\t\t\t\t\t\tpage={this.page}\n\t\t\t\t\t\t\thideOnSinglePage={this.hideOnSinglePage}\n\t\t\t\t\t\t\tonPageChange={({ detail }) => this.pageChange.emit(detail)}\n\t\t\t\t\t\t\tonPagesChange={({ detail }) => {\n\t\t\t\t\t\t\t\tthis._hasPaginationPages = detail > 1;\n\t\t\t\t\t\t\t\tthis.pagesChange.emit(detail);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\tprivate _changePageSize(s?: number) {\n\t\tif (!s) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pageSize = s;\n\t\tthis.pageSizeChange.emit(this.pageSize);\n\t}\n}\n",null,"import {\n\tComponent,\n\tEvent,\n\tEventEmitter,\n\th,\n\tProp,\n\tWatch,\n\tState,\n\tListen,\n\tElement,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { ThemedHost } from '../../../../internal/themed-host.component';\nimport { childOfComposed } from '../../../../utils/child-of';\nimport { PAGINATION_DEFAULT_PAGE_SIZE } from '../../../../utils/constants';\nimport {\n\tformatTranslation,\n\tgetLocaleComponentStrings,\n} from '../../../../utils/localization';\n\nexport type templateFunc = (page: number) => string;\n\ntype PaginationSetItem = {\n\ttype: string;\n\tvalue?: number | Element | JSX.Element | string;\n\tdropdownIndex?: number;\n\toptions?: number[];\n};\n\nconst pagination = cva(['p-pagination', 'flex gap-2 items-center'], {\n\tvariants: {\n\t\thidden: {\n\t\t\tfalse: 'flex',\n\t\t\ttrue: 'hidden',\n\t\t},\n\t},\n});\n\n@Component({\n\ttag: 'p-pagination-pages',\n\tstyleUrl: 'pagination-pages.component.css',\n\tshadow: true,\n})\nexport class PaginationPages {\n\tprivate _defaultDropdownPageTemplate: templateFunc = page =>\n\t\tformatTranslation(this._locales.page, { page });\n\n\t/**\n\t * The current page\n\t */\n\t@Prop({ mutable: true, reflect: true }) page: number = 1;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageChange: EventEmitter<number>;\n\n\t/**\n\t * The template for the data view\n\t */\n\t@Prop() dropdownPageTemplate: templateFunc =\n\t\tthis._defaultDropdownPageTemplate;\n\n\t/**\n\t * The amount of items per page\n\t */\n\t@Prop() pageSize: number = PAGINATION_DEFAULT_PAGE_SIZE;\n\n\t/**\n\t * Wether to hide when there is only 1 page available\n\t */\n\t@Prop() hideOnSinglePage: boolean = false;\n\n\t/**\n\t * The total amount of items\n\t */\n\t@Prop() total!: number;\n\n\t/**\n\t * The pages that were generated\n\t */\n\t@Event({ bubbles: false }) pagesChange: EventEmitter<number>;\n\n\t@State() private _showDropdown = [false, false];\n\t@State() private _dropdowns = [];\n\n\t/**\n\t * Locales used for this component\n\t */\n\t@State() private _locales: any = {};\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _pages: number[] = [];\n\tprivate _set: PaginationSetItem[] = [];\n\n\tcomponentWillLoad() {\n\t\tthis._setLocales();\n\t}\n\n\tcomponentWillRender() {\n\t\tthis._generate();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<ThemedHost>\n\t\t\t\t<div\n\t\t\t\t\tclass={pagination({\n\t\t\t\t\t\thidden: this.hideOnSinglePage && this._set?.length === 3,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{this._set?.map(p => {\n\t\t\t\t\t\tif (p.type === 'previous' || p.type === 'next') {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<p-pagination-pages-item\n\t\t\t\t\t\t\t\t\tvariant='carousel'\n\t\t\t\t\t\t\t\t\tdisabled={this._carouselDisabled(p.type)}\n\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\tp.type === 'previous'\n\t\t\t\t\t\t\t\t\t\t\t? this._previousClick()\n\t\t\t\t\t\t\t\t\t\t\t: this._nextClick()\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{p.value}\n\t\t\t\t\t\t\t\t</p-pagination-pages-item>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (p.type === 'ellipsis') {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<p-dropdown\n\t\t\t\t\t\t\t\t\tplacement='top'\n\t\t\t\t\t\t\t\t\tapplyChevron={false}\n\t\t\t\t\t\t\t\t\tinsideClick={true}\n\t\t\t\t\t\t\t\t\tshow={this._showDropdown[p.dropdownIndex]}\n\t\t\t\t\t\t\t\t\tonIsOpen={({ detail }) =>\n\t\t\t\t\t\t\t\t\t\tthis._onShowDropdown(detail, p.dropdownIndex)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tref={el => (this._dropdowns[p.dropdownIndex] = el)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<p-pagination-pages-item slot='trigger'>\n\t\t\t\t\t\t\t\t\t\t...\n\t\t\t\t\t\t\t\t\t</p-pagination-pages-item>\n\t\t\t\t\t\t\t\t\t{p.options?.slice(0, 5).map(v => (\n\t\t\t\t\t\t\t\t\t\t<p-dropdown-menu-item\n\t\t\t\t\t\t\t\t\t\t\tvariant='pagination'\n\t\t\t\t\t\t\t\t\t\t\tautoHeight={true}\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => this._pageClick(v)}\n\t\t\t\t\t\t\t\t\t\t\tslot='items'\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{this.dropdownPageTemplate\n\t\t\t\t\t\t\t\t\t\t\t\t? this.dropdownPageTemplate(v)\n\t\t\t\t\t\t\t\t\t\t\t\t: this._defaultDropdownPageTemplate(v)}\n\t\t\t\t\t\t\t\t\t\t</p-dropdown-menu-item>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t{p.options?.length > 5 &&\n\t\t\t\t\t\t\t\t\t\tthis._showDropdown[p.dropdownIndex] && (\n\t\t\t\t\t\t\t\t\t\t\t<p-field\n\t\t\t\t\t\t\t\t\t\t\t\tclass='mt-2 w-28'\n\t\t\t\t\t\t\t\t\t\t\t\tsize='sm'\n\t\t\t\t\t\t\t\t\t\t\t\ticon='enter-key'\n\t\t\t\t\t\t\t\t\t\t\t\ticonPosition='end'\n\t\t\t\t\t\t\t\t\t\t\t\ttype='number'\n\t\t\t\t\t\t\t\t\t\t\t\tproperties={{\n\t\t\t\t\t\t\t\t\t\t\t\t\tmin: 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\tmax: this._pages.length,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstep: 1,\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tautoFocus={true}\n\t\t\t\t\t\t\t\t\t\t\t\tonEnter={({ detail }) => this._enterPress(detail)}\n\t\t\t\t\t\t\t\t\t\t\t\tslot='items'\n\t\t\t\t\t\t\t\t\t\t\t></p-field>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</p-dropdown>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<p-pagination-pages-item\n\t\t\t\t\t\t\t\tactive={p.value === this.page}\n\t\t\t\t\t\t\t\tonClick={() => this._pageClick(p.value as number)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{p.value}\n\t\t\t\t\t\t\t</p-pagination-pages-item>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Watch('page')\n\t@Watch('pageSize')\n\t@Watch('total')\n\tprotected pageChangeHandler() {\n\t\tthis._generate();\n\t}\n\n\t@Listen('localeChanged', { target: 'body' })\n\tprivate async _setLocales(): Promise<void> {\n\t\tthis._locales = await getLocaleComponentStrings(this._el);\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler(event) {\n\t\tconst dropdowns = [false, false];\n\t\tif (this._dropdowns[0] && childOfComposed(event, this._dropdowns[0])) {\n\t\t\tdropdowns[0] = true;\n\t\t}\n\n\t\tif (this._dropdowns[1] && childOfComposed(event, this._dropdowns[1])) {\n\t\t\tdropdowns[1] = true;\n\t\t}\n\n\t\tthis._showDropdown = dropdowns;\n\t}\n\n\tprivate _generate() {\n\t\tthis._pages = this._generatePages();\n\t\tthis._set = this._generateSet();\n\n\t\tif (this.page > this._pages?.length) {\n\t\t\tthis._changePage(this._pages.length);\n\t\t}\n\t}\n\n\tprivate _changePage(p?: number) {\n\t\tif (!p) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = [false, false];\n\t\tthis.page = p;\n\t\tthis.pageChange.emit(this.page);\n\t}\n\n\tprivate _previousClick() {\n\t\tif (this._carouselDisabled('previous')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._changePage(this.page - 1);\n\t}\n\n\tprivate _nextClick = () => {\n\t\tif (this._carouselDisabled('next')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._changePage(this.page + 1);\n\t};\n\n\tprivate _carouselDisabled = (type: 'previous' | 'next') => {\n\t\tif (type === 'next') {\n\t\t\tconst nextPage = this.page + 1;\n\t\t\tif (nextPage > this._pages[this._pages.length - 1]) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tif (type === 'previous') {\n\t\t\tconst previousPage = this.page - 1;\n\t\t\tif (previousPage < this._pages[0]) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t};\n\n\tprivate _pageClick = (p?: number) => this._changePage(p);\n\n\tprivate _enterPress(p: string | number) {\n\t\tif (typeof p === 'string') {\n\t\t\tp = parseInt(p);\n\t\t}\n\n\t\tif (isNaN(p)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (p < 1) {\n\t\t\tp = 1;\n\t\t}\n\n\t\tif (p > this._pages.length) {\n\t\t\tp = this._pages.length;\n\t\t}\n\n\t\tthis._changePage(p);\n\t}\n\n\tprivate _onShowDropdown(show = false, dropdownIndex: number) {\n\t\tconst showDropdown = [...this._showDropdown];\n\t\tshowDropdown[dropdownIndex] = show;\n\t\tthis._showDropdown = showDropdown;\n\t}\n\n\tprivate _generatePages() {\n\t\tif (!this.total || !this.pageSize) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst pages = Math.ceil(this.total / this.pageSize);\n\t\tthis.pagesChange.emit(pages);\n\t\treturn new Array(pages).fill(undefined).map((_, i) => i + 1);\n\t}\n\n\tprivate _generateSet = (\n\t\trange: number = 1,\n\t\tenableBoundaries: boolean = true\n\t): PaginationSetItem[] => {\n\t\tconst totalPages = this._pages.length;\n\n\t\tif (!totalPages) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet start = this.page - range;\n\t\tlet end = this.page + range;\n\n\t\tif (end > totalPages) {\n\t\t\tend = totalPages;\n\t\t\tstart = totalPages - range * 2;\n\t\t\tstart = start < 1 ? 1 : start;\n\t\t}\n\n\t\tif (start <= 1) {\n\t\t\tstart = 1;\n\t\t\tend = Math.min(range * 2 + 1, totalPages);\n\t\t}\n\n\t\tconst set = [];\n\n\t\tconst previous = {\n\t\t\ttype: 'previous',\n\t\t\tvalue: (\n\t\t\t\t<p-icon\n\t\t\t\t\tvariant='caret'\n\t\t\t\t\tsize='sm'\n\t\t\t\t\trotate={90}\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\tconst next = {\n\t\t\ttype: 'next',\n\t\t\tvalue: (\n\t\t\t\t<p-icon\n\t\t\t\t\tvariant='caret'\n\t\t\t\t\tsize='sm'\n\t\t\t\t\trotate={-90}\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\t// Disable page range, display all the pages\n\t\tif (range === null) {\n\t\t\tconst p = this._pages.map(p => ({\n\t\t\t\ttype: 'page',\n\t\t\t\tvalue: p,\n\t\t\t}));\n\n\t\t\treturn enableBoundaries ? [previous, ...p, next] : p;\n\t\t}\n\n\t\tif (enableBoundaries) {\n\t\t\tset.push(previous);\n\t\t}\n\n\t\tlet dropdownIndex = 0;\n\n\t\tif (start <= 3) {\n\t\t\tfor (let i = 1; i < start; i++) {\n\t\t\t\tset.push({\n\t\t\t\t\ttype: 'page',\n\t\t\t\t\tvalue: this._pages[i - 1],\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tset.push({\n\t\t\t\ttype: 'page',\n\t\t\t\tvalue: 1,\n\t\t\t});\n\n\t\t\tset.push({\n\t\t\t\ttype: 'ellipsis',\n\t\t\t\tdropdownIndex,\n\t\t\t\toptions: Array.from({ length: start - 2 }, (_, i) => i + 2),\n\t\t\t});\n\t\t\tdropdownIndex++;\n\t\t}\n\n\t\tfor (let i = start; i <= end; i++) {\n\t\t\tset.push({\n\t\t\t\ttype: 'page',\n\t\t\t\tvalue: this._pages[i - 1],\n\t\t\t});\n\t\t}\n\n\t\tif (end >= totalPages - 2) {\n\t\t\tfor (let i = end + 1; i <= totalPages; i++) {\n\t\t\t\tset.push({\n\t\t\t\t\ttype: 'page',\n\t\t\t\t\tvalue: this._pages[i - 1],\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tset.push({\n\t\t\t\ttype: 'ellipsis',\n\t\t\t\tdropdownIndex,\n\t\t\t\toptions: Array.from(\n\t\t\t\t\t{ length: totalPages - end - 1 },\n\t\t\t\t\t(_, i) => i + end + 1\n\t\t\t\t),\n\t\t\t});\n\t\t\tdropdownIndex++;\n\n\t\t\tset.push({\n\t\t\t\ttype: 'page',\n\t\t\t\tvalue: this._pages[this._pages.length - 1],\n\t\t\t});\n\t\t}\n\n\t\tif (enableBoundaries) {\n\t\t\tset.push(next);\n\t\t}\n\n\t\treturn set;\n\t};\n}\n",null,"import {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tListen,\n\tProp,\n\tState,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { ThemedHost } from '../../../../internal/themed-host.component';\nimport { cn } from '../../../../utils';\nimport { asBoolean } from '../../../../utils/as-boolean';\nimport {\n\tPAGINATION_DEFAULT_PAGE_SIZE,\n\tPAGINATION_DEFAULT_PAGE_SIZE_OPTIONS,\n} from '../../../../utils/constants';\nimport {\n\tformatTranslation,\n\tgetLocaleComponentStrings,\n} from '../../../../utils/localization';\n\nexport type templateFunc = (value: number) => string;\n\nconst paginationSize = cva('p-pagination-size', {\n\tvariants: {\n\t\thidden: {\n\t\t\tfalse: null,\n\t\t\ttrue: 'hidden',\n\t\t},\n\t},\n});\n\nconst trigger = cva(\n\t[\n\t\t'group/pagination-size-trigger',\n\t\t'flex items-center gap-2',\n\t\t'px-2 h-6',\n\t\t'text-sm text-storm-500 font-medium ',\n\t\t'dark:text-white',\n\t\t'cursor-pointer rounded-full',\n\t\t'shadow-1 border border-solid',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tactive: {\n\t\t\t\tfalse: [\n\t\t\t\t\t'bg-white hover:bg-white-600 border-transparent',\n\t\t\t\t\t'dark:bg-white/15 dark:hover:bg-white/25',\n\t\t\t\t],\n\t\t\t\ttrue: [\n\t\t\t\t\t'bg-white-600 border-indigo-600 ring ring-2 ring-indigo-100',\n\t\t\t\t\t'dark:bg-white/25 dark:ring-0',\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t}\n);\n\n@Component({\n\ttag: 'p-pagination-size',\n\tstyleUrl: 'pagination-size.component.css',\n\tshadow: true,\n})\nexport class PaginationSize {\n\tprivate _defaultItemTemplate: templateFunc = size =>\n\t\tformatTranslation(this._locales.item, { size });\n\t/**\n\t * The current page\n\t */\n\t@Prop({ mutable: true, reflect: true }) size: number =\n\t\tPAGINATION_DEFAULT_PAGE_SIZE;\n\n\t/**\n\t * The available sizes\n\t */\n\t@Prop() sizeOptions: number[] = PAGINATION_DEFAULT_PAGE_SIZE_OPTIONS;\n\n\t/**\n\t * Event whenever the size changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tsizeChange: EventEmitter<number>;\n\n\t/**\n\t * The template for the data view\n\t */\n\t@Prop() itemTemplate: templateFunc = this._defaultItemTemplate;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t/**\n\t * Wether to hide when there is only 1 page available\n\t */\n\t@Prop() hidden: boolean = false;\n\n\t/**\n\t * Wether the dropdown is open\n\t */\n\t@State() dropdownIsOpen = false;\n\n\t/**\n\t * Locales used for this component\n\t */\n\t@State() private _locales: any = {};\n\n\tcomponentWillLoad() {\n\t\tthis._setLocales();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<ThemedHost class={paginationSize({ hidden: asBoolean(this.hidden) })}>\n\t\t\t\t<p-dropdown\n\t\t\t\t\tapplyFullWidth={true}\n\t\t\t\t\tapplyMaxWidth={false}\n\t\t\t\t\tplacement='top-start'\n\t\t\t\t\tchevronDirection='down'\n\t\t\t\t\tonIsOpen={({ detail }) => (this.dropdownIsOpen = detail)}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={trigger({\n\t\t\t\t\t\t\tactive: this.dropdownIsOpen,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t>\n\t\t\t\t\t\t<p class='min-w-0 flex-1 overflow-hidden text-ellipsis text-nowrap'>\n\t\t\t\t\t\t\t{this.itemTemplate\n\t\t\t\t\t\t\t\t? this.itemTemplate(this.size)\n\t\t\t\t\t\t\t\t: this._defaultItemTemplate(this.size)}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\tclass={cn(\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'flex-shrink-0',\n\t\t\t\t\t\t\t\t\t'group-hover/pagination-size-trigger:text-storm-500',\n\t\t\t\t\t\t\t\t\t'dark:group-hover/pagination-size-trigger:text-white',\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'text-storm-300 dark:text-hurricane-200':\n\t\t\t\t\t\t\t\t\t\t!this.dropdownIsOpen,\n\t\t\t\t\t\t\t\t\t'text-storm-500 dark:text-white': !!this.dropdownIsOpen,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\tvariant='double-caret'\n\t\t\t\t\t\t\tsize='sm'\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<slot slot='items'>\n\t\t\t\t\t\t{this.sizeOptions.map(option => (\n\t\t\t\t\t\t\t<p-dropdown-menu-item\n\t\t\t\t\t\t\t\tactive={option === this.size}\n\t\t\t\t\t\t\t\tonClick={() => this._changeSize(option)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this.itemTemplate\n\t\t\t\t\t\t\t\t\t? this.itemTemplate(option)\n\t\t\t\t\t\t\t\t\t: this._defaultItemTemplate(option)}\n\t\t\t\t\t\t\t</p-dropdown-menu-item>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</slot>\n\t\t\t\t</p-dropdown>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Listen('localeChanged', { target: 'body' })\n\tprivate async _setLocales(): Promise<void> {\n\t\tthis._locales = await getLocaleComponentStrings(this._el);\n\t}\n\n\tprivate _changeSize(s?: number) {\n\t\tif (!s) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.size = s;\n\t\tthis.sizeChange.emit(this.size);\n\t}\n}\n"],"mappings":"gXAAA,MAAMA,EAAyB,4vDCgB/B,MAAMC,EAAaC,EAClB,CACC,eACA,qBACA,eACA,4DACA,kDACA,OAED,CACCC,SAAU,CACTC,OAAQ,CACPC,MAAO,OACPC,KAAM,a,MAWGC,EAAU,M,wJAIdC,iBAA4B,KAK5BC,qBAAgC,KA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KAAKM,MACvBN,KAAKuG,qBAAqBvG,KAAKM,OAEnCL,EACC,UAAAE,IAAA,2CAAAC,MAAO4G,EACN,CACC,gBACA,qDACA,uDAED,CACC,0CACEhH,KAAK2G,eACP,mCAAoC3G,KAAK2G,iBAG3ChG,QAAQ,eACRL,KAAK,QAGPL,EAAA,QAAAE,IAAA,2CAAM8C,KAAK,SACTjD,KAAKO,YAAYwB,KAAIkF,GACrBhH,EAAA,wBACC+D,OAAQiD,IAAWjH,KAAKM,KACxB8B,QAAS,IAAMpC,KAAKkH,YAAYD,IAE/BjH,KAAK0G,aACH1G,KAAK0G,aAAaO,GAClBjH,KAAKuG,qBAAqBU,Q,CAU5B,iBAAMtF,GACb3B,KAAKoB,eAAiB8C,EAA0BlE,KAAKmE,I,CAG9C,WAAA+C,CAAYnG,GACnB,IAAKA,EAAG,CACP,M,CAGDf,KAAKM,KAAOS,EACZf,KAAKyG,WAAW5F,KAAKb,KAAKM,K","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"p-pagination.p-pagination-pages.p-pagination-size.entry.esm.js","sources":["src/components/molecules/pagination/pagination/pagination.component.css?tag=p-pagination&encapsulation=shadow","src/components/molecules/pagination/pagination/pagination.component.tsx","src/components/molecules/pagination/pages/pagination-pages.component.css?tag=p-pagination-pages&encapsulation=shadow","src/components/molecules/pagination/pages/pagination-pages.component.tsx","src/components/molecules/pagination/size/pagination-size.component.css?tag=p-pagination-size&encapsulation=shadow","src/components/molecules/pagination/size/pagination-size.component.tsx"],"sourcesContent":["","import {\n\tComponent,\n\tEvent,\n\tEventEmitter,\n\tFragment,\n\th,\n\tProp,\n\tState,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { ThemedHost } from '../../../../internal/themed-host.component';\nimport {\n\tPAGINATION_DEFAULT_PAGE_SIZE,\n\tPAGINATION_DEFAULT_PAGE_SIZE_OPTIONS,\n} from '../../../../utils/constants';\n\nconst pagination = cva(\n\t[\n\t\t'p-pagination',\n\t\t'items-center gap-2',\n\t\t'rounded-full',\n\t\t'bg-off-white-300 border border-solid border-off-white-700',\n\t\t'dark:bg-hurricane-500 dark:border-hurricane-400',\n\t\t'p-1',\n\t],\n\t{\n\t\tvariants: {\n\t\t\thidden: {\n\t\t\t\tfalse: 'flex',\n\t\t\t\ttrue: 'hidden',\n\t\t\t},\n\t\t},\n\t}\n);\n\n@Component({\n\ttag: 'p-pagination',\n\tstyleUrl: 'pagination.component.css',\n\tshadow: true,\n})\nexport class Pagination {\n\t/**\n\t * Wether to hide when there is only 1 page available\n\t */\n\t@Prop() hideOnSinglePage: boolean = true;\n\n\t/**\n\t * Wether to enable pagination size select\n\t */\n\t@Prop() enablePaginationSize: boolean = true;\n\n\t/**\n\t * Wether to enable pagination pages\n\t */\n\t@Prop() enablePaginationPages: boolean = true;\n\n\t/**\n\t * The current page\n\t */\n\t@Prop({ mutable: true, reflect: true }) page: number = 1;\n\n\t/**\n\t * The total amount of items\n\t */\n\t@Prop() total!: number;\n\n\t/**\n\t * The amount of items per page\n\t */\n\t@Prop() pageSize: number = PAGINATION_DEFAULT_PAGE_SIZE;\n\n\t/**\n\t * The options for the page size\n\t */\n\t@Prop() pageSizeOptions: number[] = PAGINATION_DEFAULT_PAGE_SIZE_OPTIONS;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageChange: EventEmitter<number>;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageSizeChange: EventEmitter<number>;\n\n\t/**\n\t * The pages that were generated\n\t */\n\t@Event({ bubbles: false }) pagesChange: EventEmitter<number>;\n\n\t@State() private _hasPaginationPages = true;\n\n\trender() {\n\t\tconst hidePageSizeSelect =\n\t\t\tthis.hideOnSinglePage && this.total <= this.pageSizeOptions?.[0];\n\n\t\treturn (\n\t\t\t<ThemedHost>\n\t\t\t\t<div\n\t\t\t\t\tclass={pagination({\n\t\t\t\t\t\thidden:\n\t\t\t\t\t\t\t(hidePageSizeSelect && !this._hasPaginationPages) ||\n\t\t\t\t\t\t\t(!this.enablePaginationSize && !this.enablePaginationPages),\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{this.enablePaginationPages && this.enablePaginationSize && (\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<p-pagination-size\n\t\t\t\t\t\t\t\thidden={hidePageSizeSelect}\n\t\t\t\t\t\t\t\tsize={this.pageSize}\n\t\t\t\t\t\t\t\tsizeOptions={this.pageSizeOptions}\n\t\t\t\t\t\t\t\tonSizeChange={({ detail }) => this._changePageSize(detail)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t{!hidePageSizeSelect &&\n\t\t\t\t\t\t\t\tthis.hideOnSinglePage &&\n\t\t\t\t\t\t\t\tthis._hasPaginationPages && (\n\t\t\t\t\t\t\t\t\t<p-divider\n\t\t\t\t\t\t\t\t\t\tvariant='vertical'\n\t\t\t\t\t\t\t\t\t\tclass='mx-0 h-4 text-off-white-700 dark:text-hurricane-400'\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{this.enablePaginationPages && (\n\t\t\t\t\t\t<p-pagination-pages\n\t\t\t\t\t\t\tpageSize={this.pageSize}\n\t\t\t\t\t\t\ttotal={this.total}\n\t\t\t\t\t\t\tpage={this.page}\n\t\t\t\t\t\t\thideOnSinglePage={this.hideOnSinglePage}\n\t\t\t\t\t\t\tonPageChange={({ detail }) => this.pageChange.emit(detail)}\n\t\t\t\t\t\t\tonPagesChange={({ detail }) => {\n\t\t\t\t\t\t\t\tthis._hasPaginationPages = detail > 1;\n\t\t\t\t\t\t\t\tthis.pagesChange.emit(detail);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\tprivate _changePageSize(s?: number) {\n\t\tif (!s) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pageSize = s;\n\t\tthis.pageSizeChange.emit(this.pageSize);\n\t}\n}\n","","import {\n\tComponent,\n\tEvent,\n\tEventEmitter,\n\th,\n\tProp,\n\tWatch,\n\tState,\n\tListen,\n\tElement,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { ThemedHost } from '../../../../internal/themed-host.component';\nimport { childOfComposed } from '../../../../utils/child-of';\nimport { PAGINATION_DEFAULT_PAGE_SIZE } from '../../../../utils/constants';\nimport {\n\tformatTranslation,\n\tgetLocaleComponentStrings,\n} from '../../../../utils/localization';\n\nexport type templateFunc = (page: number) => string;\n\ntype PaginationSetItem = {\n\ttype: string;\n\tvalue?: number | Element | JSX.Element | string;\n\tdropdownIndex?: number;\n\toptions?: number[];\n};\n\nconst pagination = cva(['p-pagination', 'flex gap-2 items-center'], {\n\tvariants: {\n\t\thidden: {\n\t\t\tfalse: 'flex',\n\t\t\ttrue: 'hidden',\n\t\t},\n\t},\n});\n\n@Component({\n\ttag: 'p-pagination-pages',\n\tstyleUrl: 'pagination-pages.component.css',\n\tshadow: true,\n})\nexport class PaginationPages {\n\tprivate _defaultDropdownPageTemplate: templateFunc = page =>\n\t\tformatTranslation(this._locales.page, { page });\n\n\t/**\n\t * The current page\n\t */\n\t@Prop({ mutable: true, reflect: true }) page: number = 1;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageChange: EventEmitter<number>;\n\n\t/**\n\t * The template for the data view\n\t */\n\t@Prop() dropdownPageTemplate: templateFunc =\n\t\tthis._defaultDropdownPageTemplate;\n\n\t/**\n\t * The amount of items per page\n\t */\n\t@Prop() pageSize: number = PAGINATION_DEFAULT_PAGE_SIZE;\n\n\t/**\n\t * Wether to hide when there is only 1 page available\n\t */\n\t@Prop() hideOnSinglePage: boolean = false;\n\n\t/**\n\t * The total amount of items\n\t */\n\t@Prop() total!: number;\n\n\t/**\n\t * The pages that were generated\n\t */\n\t@Event({ bubbles: false }) pagesChange: EventEmitter<number>;\n\n\t@State() private _showDropdown = [false, false];\n\t@State() private _dropdowns = [];\n\n\t/**\n\t * Locales used for this component\n\t */\n\t@State() private _locales: any = {};\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _pages: number[] = [];\n\tprivate _set: PaginationSetItem[] = [];\n\n\tcomponentWillLoad() {\n\t\tthis._setLocales();\n\t}\n\n\tcomponentWillRender() {\n\t\tthis._generate();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<ThemedHost>\n\t\t\t\t<div\n\t\t\t\t\tclass={pagination({\n\t\t\t\t\t\thidden: this.hideOnSinglePage && this._set?.length === 3,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{this._set?.map(p => {\n\t\t\t\t\t\tif (p.type === 'previous' || p.type === 'next') {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<p-pagination-pages-item\n\t\t\t\t\t\t\t\t\tvariant='carousel'\n\t\t\t\t\t\t\t\t\tdisabled={this._carouselDisabled(p.type)}\n\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\tp.type === 'previous'\n\t\t\t\t\t\t\t\t\t\t\t? this._previousClick()\n\t\t\t\t\t\t\t\t\t\t\t: this._nextClick()\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{p.value}\n\t\t\t\t\t\t\t\t</p-pagination-pages-item>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (p.type === 'ellipsis') {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<p-dropdown\n\t\t\t\t\t\t\t\t\tplacement='top'\n\t\t\t\t\t\t\t\t\tapplyChevron={false}\n\t\t\t\t\t\t\t\t\tinsideClick={true}\n\t\t\t\t\t\t\t\t\tshow={this._showDropdown[p.dropdownIndex]}\n\t\t\t\t\t\t\t\t\tonIsOpen={({ detail }) =>\n\t\t\t\t\t\t\t\t\t\tthis._onShowDropdown(detail, p.dropdownIndex)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tref={el => (this._dropdowns[p.dropdownIndex] = el)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<p-pagination-pages-item slot='trigger'>\n\t\t\t\t\t\t\t\t\t\t...\n\t\t\t\t\t\t\t\t\t</p-pagination-pages-item>\n\t\t\t\t\t\t\t\t\t<slot slot='items'>\n\t\t\t\t\t\t\t\t\t\t{p.options?.slice(0, 5).map(v => (\n\t\t\t\t\t\t\t\t\t\t\t<p-dropdown-menu-item\n\t\t\t\t\t\t\t\t\t\t\t\tvariant='pagination'\n\t\t\t\t\t\t\t\t\t\t\t\tautoHeight={true}\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => this._pageClick(v)}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{this.dropdownPageTemplate\n\t\t\t\t\t\t\t\t\t\t\t\t\t? this.dropdownPageTemplate(v)\n\t\t\t\t\t\t\t\t\t\t\t\t\t: this._defaultDropdownPageTemplate(v)}\n\t\t\t\t\t\t\t\t\t\t\t</p-dropdown-menu-item>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t{p.options?.length > 5 &&\n\t\t\t\t\t\t\t\t\t\t\tthis._showDropdown[p.dropdownIndex] && (\n\t\t\t\t\t\t\t\t\t\t\t\t<p-field\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass='mt-2 w-28'\n\t\t\t\t\t\t\t\t\t\t\t\t\tsize='sm'\n\t\t\t\t\t\t\t\t\t\t\t\t\ticon='enter-key'\n\t\t\t\t\t\t\t\t\t\t\t\t\ticonPosition='end'\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype='number'\n\t\t\t\t\t\t\t\t\t\t\t\t\tproperties={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmin: 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmax: this._pages.length,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstep: 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\tautoFocus={true}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonEnter={({ detail }) => this._enterPress(detail)}\n\t\t\t\t\t\t\t\t\t\t\t\t></p-field>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t\t\t</p-dropdown>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<p-pagination-pages-item\n\t\t\t\t\t\t\t\tactive={p.value === this.page}\n\t\t\t\t\t\t\t\tonClick={() => this._pageClick(p.value as number)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{p.value}\n\t\t\t\t\t\t\t</p-pagination-pages-item>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Watch('page')\n\t@Watch('pageSize')\n\t@Watch('total')\n\tprotected pageChangeHandler() {\n\t\tthis._generate();\n\t}\n\n\t@Listen('localeChanged', { target: 'body' })\n\tprivate async _setLocales(): Promise<void> {\n\t\tthis._locales = await getLocaleComponentStrings(this._el);\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler(event) {\n\t\tconst dropdowns = [false, false];\n\t\tif (this._dropdowns[0] && childOfComposed(event, this._dropdowns[0])) {\n\t\t\tdropdowns[0] = true;\n\t\t}\n\n\t\tif (this._dropdowns[1] && childOfComposed(event, this._dropdowns[1])) {\n\t\t\tdropdowns[1] = true;\n\t\t}\n\n\t\tthis._showDropdown = dropdowns;\n\t}\n\n\tprivate _generate() {\n\t\tthis._pages = this._generatePages();\n\t\tthis._set = this._generateSet();\n\n\t\tif (this.page > this._pages?.length) {\n\t\t\tthis._changePage(this._pages.length);\n\t\t}\n\t}\n\n\tprivate _changePage(p?: number) {\n\t\tif (!p) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = [false, false];\n\t\tthis.page = p;\n\t\tthis.pageChange.emit(this.page);\n\t}\n\n\tprivate _previousClick() {\n\t\tif (this._carouselDisabled('previous')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._changePage(this.page - 1);\n\t}\n\n\tprivate _nextClick = () => {\n\t\tif (this._carouselDisabled('next')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._changePage(this.page + 1);\n\t};\n\n\tprivate _carouselDisabled = (type: 'previous' | 'next') => {\n\t\tif (type === 'next') {\n\t\t\tconst nextPage = this.page + 1;\n\t\t\tif (nextPage > this._pages[this._pages.length - 1]) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tif (type === 'previous') {\n\t\t\tconst previousPage = this.page - 1;\n\t\t\tif (previousPage < this._pages[0]) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t};\n\n\tprivate _pageClick = (p?: number) => this._changePage(p);\n\n\tprivate _enterPress(p: string | number) {\n\t\tif (typeof p === 'string') {\n\t\t\tp = parseInt(p);\n\t\t}\n\n\t\tif (isNaN(p)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (p < 1) {\n\t\t\tp = 1;\n\t\t}\n\n\t\tif (p > this._pages.length) {\n\t\t\tp = this._pages.length;\n\t\t}\n\n\t\tthis._changePage(p);\n\t}\n\n\tprivate _onShowDropdown(show = false, dropdownIndex: number) {\n\t\tconst showDropdown = [...this._showDropdown];\n\t\tshowDropdown[dropdownIndex] = show;\n\t\tthis._showDropdown = showDropdown;\n\t}\n\n\tprivate _generatePages() {\n\t\tif (!this.total || !this.pageSize) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst pages = Math.ceil(this.total / this.pageSize);\n\t\tthis.pagesChange.emit(pages);\n\t\treturn new Array(pages).fill(undefined).map((_, i) => i + 1);\n\t}\n\n\tprivate _generateSet = (\n\t\trange: number = 1,\n\t\tenableBoundaries: boolean = true\n\t): PaginationSetItem[] => {\n\t\tconst totalPages = this._pages.length;\n\n\t\tif (!totalPages) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet start = this.page - range;\n\t\tlet end = this.page + range;\n\n\t\tif (end > totalPages) {\n\t\t\tend = totalPages;\n\t\t\tstart = totalPages - range * 2;\n\t\t\tstart = start < 1 ? 1 : start;\n\t\t}\n\n\t\tif (start <= 1) {\n\t\t\tstart = 1;\n\t\t\tend = Math.min(range * 2 + 1, totalPages);\n\t\t}\n\n\t\tconst set = [];\n\n\t\tconst previous = {\n\t\t\ttype: 'previous',\n\t\t\tvalue: (\n\t\t\t\t<p-icon\n\t\t\t\t\tvariant='caret'\n\t\t\t\t\tsize='sm'\n\t\t\t\t\trotate={90}\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\tconst next = {\n\t\t\ttype: 'next',\n\t\t\tvalue: (\n\t\t\t\t<p-icon\n\t\t\t\t\tvariant='caret'\n\t\t\t\t\tsize='sm'\n\t\t\t\t\trotate={-90}\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\t// Disable page range, display all the pages\n\t\tif (range === null) {\n\t\t\tconst p = this._pages.map(p => ({\n\t\t\t\ttype: 'page',\n\t\t\t\tvalue: p,\n\t\t\t}));\n\n\t\t\treturn enableBoundaries ? [previous, ...p, next] : p;\n\t\t}\n\n\t\tif (enableBoundaries) {\n\t\t\tset.push(previous);\n\t\t}\n\n\t\tlet dropdownIndex = 0;\n\n\t\tif (start <= 3) {\n\t\t\tfor (let i = 1; i < start; i++) {\n\t\t\t\tset.push({\n\t\t\t\t\ttype: 'page',\n\t\t\t\t\tvalue: this._pages[i - 1],\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tset.push({\n\t\t\t\ttype: 'page',\n\t\t\t\tvalue: 1,\n\t\t\t});\n\n\t\t\tset.push({\n\t\t\t\ttype: 'ellipsis',\n\t\t\t\tdropdownIndex,\n\t\t\t\toptions: Array.from({ length: start - 2 }, (_, i) => i + 2),\n\t\t\t});\n\t\t\tdropdownIndex++;\n\t\t}\n\n\t\tfor (let i = start; i <= end; i++) {\n\t\t\tset.push({\n\t\t\t\ttype: 'page',\n\t\t\t\tvalue: this._pages[i - 1],\n\t\t\t});\n\t\t}\n\n\t\tif (end >= totalPages - 2) {\n\t\t\tfor (let i = end + 1; i <= totalPages; i++) {\n\t\t\t\tset.push({\n\t\t\t\t\ttype: 'page',\n\t\t\t\t\tvalue: this._pages[i - 1],\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tset.push({\n\t\t\t\ttype: 'ellipsis',\n\t\t\t\tdropdownIndex,\n\t\t\t\toptions: Array.from(\n\t\t\t\t\t{ length: totalPages - end - 1 },\n\t\t\t\t\t(_, i) => i + end + 1\n\t\t\t\t),\n\t\t\t});\n\t\t\tdropdownIndex++;\n\n\t\t\tset.push({\n\t\t\t\ttype: 'page',\n\t\t\t\tvalue: this._pages[this._pages.length - 1],\n\t\t\t});\n\t\t}\n\n\t\tif (enableBoundaries) {\n\t\t\tset.push(next);\n\t\t}\n\n\t\treturn set;\n\t};\n}\n","","import {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tListen,\n\tProp,\n\tState,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { ThemedHost } from '../../../../internal/themed-host.component';\nimport { cn } from '../../../../utils';\nimport { asBoolean } from '../../../../utils/as-boolean';\nimport {\n\tPAGINATION_DEFAULT_PAGE_SIZE,\n\tPAGINATION_DEFAULT_PAGE_SIZE_OPTIONS,\n} from '../../../../utils/constants';\nimport {\n\tformatTranslation,\n\tgetLocaleComponentStrings,\n} from '../../../../utils/localization';\n\nexport type templateFunc = (value: number) => string;\n\nconst paginationSize = cva('p-pagination-size', {\n\tvariants: {\n\t\thidden: {\n\t\t\tfalse: null,\n\t\t\ttrue: 'hidden',\n\t\t},\n\t},\n});\n\nconst trigger = cva(\n\t[\n\t\t'group/pagination-size-trigger',\n\t\t'flex items-center gap-2',\n\t\t'px-2 h-6',\n\t\t'text-sm text-storm-500 font-medium ',\n\t\t'dark:text-white',\n\t\t'cursor-pointer rounded-full',\n\t\t'shadow-1 border border-solid',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tactive: {\n\t\t\t\tfalse: [\n\t\t\t\t\t'bg-white hover:bg-white-600 border-transparent',\n\t\t\t\t\t'dark:bg-white/15 dark:hover:bg-white/25',\n\t\t\t\t],\n\t\t\t\ttrue: [\n\t\t\t\t\t'bg-white-600 border-indigo-600 ring ring-2 ring-indigo-100',\n\t\t\t\t\t'dark:bg-white/25 dark:ring-0',\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t}\n);\n\n@Component({\n\ttag: 'p-pagination-size',\n\tstyleUrl: 'pagination-size.component.css',\n\tshadow: true,\n})\nexport class PaginationSize {\n\tprivate _defaultItemTemplate: templateFunc = size =>\n\t\tformatTranslation(this._locales.item, { size });\n\t/**\n\t * The current page\n\t */\n\t@Prop({ mutable: true, reflect: true }) size: number =\n\t\tPAGINATION_DEFAULT_PAGE_SIZE;\n\n\t/**\n\t * The available sizes\n\t */\n\t@Prop() sizeOptions: number[] = PAGINATION_DEFAULT_PAGE_SIZE_OPTIONS;\n\n\t/**\n\t * Event whenever the size changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tsizeChange: EventEmitter<number>;\n\n\t/**\n\t * The template for the data view\n\t */\n\t@Prop() itemTemplate: templateFunc = this._defaultItemTemplate;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t/**\n\t * Wether to hide when there is only 1 page available\n\t */\n\t@Prop() hidden: boolean = false;\n\n\t/**\n\t * Wether the dropdown is open\n\t */\n\t@State() dropdownIsOpen = false;\n\n\t/**\n\t * Locales used for this component\n\t */\n\t@State() private _locales: any = {};\n\n\tcomponentWillLoad() {\n\t\tthis._setLocales();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<ThemedHost class={paginationSize({ hidden: asBoolean(this.hidden) })}>\n\t\t\t\t<p-dropdown\n\t\t\t\t\tapplyFullWidth={true}\n\t\t\t\t\tapplyMaxWidth={false}\n\t\t\t\t\tplacement='top-start'\n\t\t\t\t\tchevronDirection='down'\n\t\t\t\t\tonIsOpen={({ detail }) => (this.dropdownIsOpen = detail)}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={trigger({\n\t\t\t\t\t\t\tactive: this.dropdownIsOpen,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t>\n\t\t\t\t\t\t<p class='min-w-0 flex-1 overflow-hidden text-ellipsis text-nowrap'>\n\t\t\t\t\t\t\t{this.itemTemplate\n\t\t\t\t\t\t\t\t? this.itemTemplate(this.size)\n\t\t\t\t\t\t\t\t: this._defaultItemTemplate(this.size)}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\tclass={cn(\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'flex-shrink-0',\n\t\t\t\t\t\t\t\t\t'group-hover/pagination-size-trigger:text-storm-500',\n\t\t\t\t\t\t\t\t\t'dark:group-hover/pagination-size-trigger:text-white',\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'text-storm-300 dark:text-hurricane-200':\n\t\t\t\t\t\t\t\t\t\t!this.dropdownIsOpen,\n\t\t\t\t\t\t\t\t\t'text-storm-500 dark:text-white': !!this.dropdownIsOpen,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\tvariant='double-caret'\n\t\t\t\t\t\t\tsize='sm'\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<slot slot='items'>\n\t\t\t\t\t\t{this.sizeOptions.map(option => (\n\t\t\t\t\t\t\t<p-dropdown-menu-item\n\t\t\t\t\t\t\t\tactive={option === this.size}\n\t\t\t\t\t\t\t\tonClick={() => this._changeSize(option)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this.itemTemplate\n\t\t\t\t\t\t\t\t\t? this.itemTemplate(option)\n\t\t\t\t\t\t\t\t\t: this._defaultItemTemplate(option)}\n\t\t\t\t\t\t\t</p-dropdown-menu-item>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</slot>\n\t\t\t\t</p-dropdown>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Listen('localeChanged', { target: 'body' })\n\tprivate async _setLocales(): Promise<void> {\n\t\tthis._locales = await getLocaleComponentStrings(this._el);\n\t}\n\n\tprivate _changeSize(s?: number) {\n\t\tif (!s) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.size = s;\n\t\tthis.sizeChange.emit(this.size);\n\t}\n}\n"],"names":["pagination"],"mappings":";;;;;;;;;;;AAAA,MAAM,sBAAsB,GAAG,2vDAA2vD;;ACgB1xD,MAAMA,YAAU,GAAG,GAAG,CACrB;IACC,cAAc;IACd,oBAAoB;IACpB,cAAc;IACd,2DAA2D;IAC3D,iDAAiD;IACjD,KAAK;CACL,EACD;AACC,IAAA,QAAQ,EAAE;AACT,QAAA,MAAM,EAAE;AACP,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,IAAI,EAAE,QAAQ;AACd,SAAA;AACD,KAAA;AACD,CAAA,CACD;MAOY,UAAU,GAAA,MAAA;;;;;;;AACtB;;AAEG;IACK,gBAAgB,GAAY,IAAI;AAExC;;AAEG;IACK,oBAAoB,GAAY,IAAI;AAE5C;;AAEG;IACK,qBAAqB,GAAY,IAAI;AAE7C;;AAEG;IACqC,IAAI,GAAW,CAAC;AAExD;;AAEG;AACK,IAAA,KAAK;AAEb;;AAEG;IACK,QA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IAAI,CAAC,CACpC,EACJ,CACC,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,EAAE,CACR;gBACC,eAAe;gBACf,oDAAoD;gBACpD,qDAAqD;aACrD,EACD;AACC,gBAAA,wCAAwC,EACvC,CAAC,IAAI,CAAC,cAAc;AACrB,gBAAA,gCAAgC,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc;AACvD,aAAA,CACD,EACD,OAAO,EAAC,cAAc,EACtB,IAAI,EAAC,IAAI,EAAA,CACR,CACG,EACN,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,OAAO,EAChB,EAAA,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,KAC3B,CAAA,CAAA,sBAAA,EAAA,EACC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC,IAAI,EAC5B,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAEtC,EAAA,IAAI,CAAC;AACL,cAAE,IAAI,CAAC,YAAY,CAAC,MAAM;AAC1B,cAAE,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,CACd,CACvB,CAAC,CACI,CACK,CACD;;AAKP,IAAA,MAAM,WAAW,GAAA;QACxB,IAAI,CAAC,QAAQ,GAAG,MAAM,yBAAyB,CAAC,IAAI,CAAC,GAAG,CAAC;;AAGlD,IAAA,WAAW,CAAC,CAAU,EAAA;QAC7B,IAAI,CAAC,CAAC,EAAE;YACP;;AAGD,QAAA,IAAI,CAAC,IAAI,GAAG,CAAC;QACb,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;"}
1
+ {"version":3,"file":"p-pagination.p-pagination-pages.p-pagination-size.entry.esm.js","sources":["src/components/molecules/pagination/pagination/pagination.component.css?tag=p-pagination&encapsulation=shadow","src/components/molecules/pagination/pagination/pagination.component.tsx","src/components/molecules/pagination/pages/pagination-pages.component.css?tag=p-pagination-pages&encapsulation=shadow","src/components/molecules/pagination/pages/pagination-pages.component.tsx","src/components/molecules/pagination/size/pagination-size.component.css?tag=p-pagination-size&encapsulation=shadow","src/components/molecules/pagination/size/pagination-size.component.tsx"],"sourcesContent":["","import {\n\tComponent,\n\tEvent,\n\tEventEmitter,\n\tFragment,\n\th,\n\tProp,\n\tState,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { ThemedHost } from '../../../../internal/themed-host.component';\nimport {\n\tPAGINATION_DEFAULT_PAGE_SIZE,\n\tPAGINATION_DEFAULT_PAGE_SIZE_OPTIONS,\n} from '../../../../utils/constants';\n\nconst pagination = cva(\n\t[\n\t\t'p-pagination',\n\t\t'items-center gap-2',\n\t\t'rounded-full',\n\t\t'bg-off-white-300 border border-solid border-off-white-700',\n\t\t'dark:bg-hurricane-500 dark:border-hurricane-400',\n\t\t'p-1',\n\t],\n\t{\n\t\tvariants: {\n\t\t\thidden: {\n\t\t\t\tfalse: 'flex',\n\t\t\t\ttrue: 'hidden',\n\t\t\t},\n\t\t},\n\t}\n);\n\n@Component({\n\ttag: 'p-pagination',\n\tstyleUrl: 'pagination.component.css',\n\tshadow: true,\n})\nexport class Pagination {\n\t/**\n\t * Wether to hide when there is only 1 page available\n\t */\n\t@Prop() hideOnSinglePage: boolean = true;\n\n\t/**\n\t * Wether to enable pagination size select\n\t */\n\t@Prop() enablePaginationSize: boolean = true;\n\n\t/**\n\t * Wether to enable pagination pages\n\t */\n\t@Prop() enablePaginationPages: boolean = true;\n\n\t/**\n\t * The current page\n\t */\n\t@Prop({ mutable: true, reflect: true }) page: number = 1;\n\n\t/**\n\t * The total amount of items\n\t */\n\t@Prop() total!: number;\n\n\t/**\n\t * The amount of items per page\n\t */\n\t@Prop() pageSize: number = PAGINATION_DEFAULT_PAGE_SIZE;\n\n\t/**\n\t * The options for the page size\n\t */\n\t@Prop() pageSizeOptions: number[] = PAGINATION_DEFAULT_PAGE_SIZE_OPTIONS;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageChange: EventEmitter<number>;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageSizeChange: EventEmitter<number>;\n\n\t/**\n\t * The pages that were generated\n\t */\n\t@Event({ bubbles: false }) pagesChange: EventEmitter<number>;\n\n\t@State() private _hasPaginationPages = true;\n\n\trender() {\n\t\tconst hidePageSizeSelect =\n\t\t\tthis.hideOnSinglePage && this.total <= this.pageSizeOptions?.[0];\n\n\t\treturn (\n\t\t\t<ThemedHost>\n\t\t\t\t<div\n\t\t\t\t\tclass={pagination({\n\t\t\t\t\t\thidden:\n\t\t\t\t\t\t\t(hidePageSizeSelect && !this._hasPaginationPages) ||\n\t\t\t\t\t\t\t(!this.enablePaginationSize && !this.enablePaginationPages),\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{this.enablePaginationPages && this.enablePaginationSize && (\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<p-pagination-size\n\t\t\t\t\t\t\t\thidden={hidePageSizeSelect}\n\t\t\t\t\t\t\t\tsize={this.pageSize}\n\t\t\t\t\t\t\t\tsizeOptions={this.pageSizeOptions}\n\t\t\t\t\t\t\t\tonSizeChange={({ detail }) => this._changePageSize(detail)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t{!hidePageSizeSelect &&\n\t\t\t\t\t\t\t\tthis.hideOnSinglePage &&\n\t\t\t\t\t\t\t\tthis._hasPaginationPages && (\n\t\t\t\t\t\t\t\t\t<p-divider\n\t\t\t\t\t\t\t\t\t\tvariant='vertical'\n\t\t\t\t\t\t\t\t\t\tclass='mx-0 h-4 text-off-white-700 dark:text-hurricane-400'\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{this.enablePaginationPages && (\n\t\t\t\t\t\t<p-pagination-pages\n\t\t\t\t\t\t\tpageSize={this.pageSize}\n\t\t\t\t\t\t\ttotal={this.total}\n\t\t\t\t\t\t\tpage={this.page}\n\t\t\t\t\t\t\thideOnSinglePage={this.hideOnSinglePage}\n\t\t\t\t\t\t\tonPageChange={({ detail }) => this.pageChange.emit(detail)}\n\t\t\t\t\t\t\tonPagesChange={({ detail }) => {\n\t\t\t\t\t\t\t\tthis._hasPaginationPages = detail > 1;\n\t\t\t\t\t\t\t\tthis.pagesChange.emit(detail);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\tprivate _changePageSize(s?: number) {\n\t\tif (!s) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pageSize = s;\n\t\tthis.pageSizeChange.emit(this.pageSize);\n\t}\n}\n","","import {\n\tComponent,\n\tEvent,\n\tEventEmitter,\n\th,\n\tProp,\n\tWatch,\n\tState,\n\tListen,\n\tElement,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { ThemedHost } from '../../../../internal/themed-host.component';\nimport { childOfComposed } from '../../../../utils/child-of';\nimport { PAGINATION_DEFAULT_PAGE_SIZE } from '../../../../utils/constants';\nimport {\n\tformatTranslation,\n\tgetLocaleComponentStrings,\n} from '../../../../utils/localization';\n\nexport type templateFunc = (page: number) => string;\n\ntype PaginationSetItem = {\n\ttype: string;\n\tvalue?: number | Element | JSX.Element | string;\n\tdropdownIndex?: number;\n\toptions?: number[];\n};\n\nconst pagination = cva(['p-pagination', 'flex gap-2 items-center'], {\n\tvariants: {\n\t\thidden: {\n\t\t\tfalse: 'flex',\n\t\t\ttrue: 'hidden',\n\t\t},\n\t},\n});\n\n@Component({\n\ttag: 'p-pagination-pages',\n\tstyleUrl: 'pagination-pages.component.css',\n\tshadow: true,\n})\nexport class PaginationPages {\n\tprivate _defaultDropdownPageTemplate: templateFunc = page =>\n\t\tformatTranslation(this._locales.page, { page });\n\n\t/**\n\t * The current page\n\t */\n\t@Prop({ mutable: true, reflect: true }) page: number = 1;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageChange: EventEmitter<number>;\n\n\t/**\n\t * The template for the data view\n\t */\n\t@Prop() dropdownPageTemplate: templateFunc =\n\t\tthis._defaultDropdownPageTemplate;\n\n\t/**\n\t * The amount of items per page\n\t */\n\t@Prop() pageSize: number = PAGINATION_DEFAULT_PAGE_SIZE;\n\n\t/**\n\t * Wether to hide when there is only 1 page available\n\t */\n\t@Prop() hideOnSinglePage: boolean = false;\n\n\t/**\n\t * The total amount of items\n\t */\n\t@Prop() total!: number;\n\n\t/**\n\t * The pages that were generated\n\t */\n\t@Event({ bubbles: false }) pagesChange: EventEmitter<number>;\n\n\t@State() private _showDropdown = [false, false];\n\t@State() private _dropdowns = [];\n\n\t/**\n\t * Locales used for this component\n\t */\n\t@State() private _locales: any = {};\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _pages: number[] = [];\n\tprivate _set: PaginationSetItem[] = [];\n\n\tcomponentWillLoad() {\n\t\tthis._setLocales();\n\t}\n\n\tcomponentWillRender() {\n\t\tthis._generate();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<ThemedHost>\n\t\t\t\t<div\n\t\t\t\t\tclass={pagination({\n\t\t\t\t\t\thidden: this.hideOnSinglePage && this._set?.length === 3,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{this._set?.map(p => {\n\t\t\t\t\t\tif (p.type === 'previous' || p.type === 'next') {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<p-pagination-pages-item\n\t\t\t\t\t\t\t\t\tvariant='carousel'\n\t\t\t\t\t\t\t\t\tdisabled={this._carouselDisabled(p.type)}\n\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\tp.type === 'previous'\n\t\t\t\t\t\t\t\t\t\t\t? this._previousClick()\n\t\t\t\t\t\t\t\t\t\t\t: this._nextClick()\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{p.value}\n\t\t\t\t\t\t\t\t</p-pagination-pages-item>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (p.type === 'ellipsis') {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<p-dropdown\n\t\t\t\t\t\t\t\t\tplacement='top'\n\t\t\t\t\t\t\t\t\tapplyChevron={false}\n\t\t\t\t\t\t\t\t\tinsideClick={true}\n\t\t\t\t\t\t\t\t\tshow={this._showDropdown[p.dropdownIndex]}\n\t\t\t\t\t\t\t\t\tonIsOpen={({ detail }) =>\n\t\t\t\t\t\t\t\t\t\tthis._onShowDropdown(detail, p.dropdownIndex)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tref={el => (this._dropdowns[p.dropdownIndex] = el)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<p-pagination-pages-item slot='trigger'>\n\t\t\t\t\t\t\t\t\t\t...\n\t\t\t\t\t\t\t\t\t</p-pagination-pages-item>\n\t\t\t\t\t\t\t\t\t{p.options?.slice(0, 5).map(v => (\n\t\t\t\t\t\t\t\t\t\t<p-dropdown-menu-item\n\t\t\t\t\t\t\t\t\t\t\tvariant='pagination'\n\t\t\t\t\t\t\t\t\t\t\tautoHeight={true}\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => this._pageClick(v)}\n\t\t\t\t\t\t\t\t\t\t\tslot='items'\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{this.dropdownPageTemplate\n\t\t\t\t\t\t\t\t\t\t\t\t? this.dropdownPageTemplate(v)\n\t\t\t\t\t\t\t\t\t\t\t\t: this._defaultDropdownPageTemplate(v)}\n\t\t\t\t\t\t\t\t\t\t</p-dropdown-menu-item>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t{p.options?.length > 5 &&\n\t\t\t\t\t\t\t\t\t\tthis._showDropdown[p.dropdownIndex] && (\n\t\t\t\t\t\t\t\t\t\t\t<p-field\n\t\t\t\t\t\t\t\t\t\t\t\tclass='mt-2 w-28'\n\t\t\t\t\t\t\t\t\t\t\t\tsize='sm'\n\t\t\t\t\t\t\t\t\t\t\t\ticon='enter-key'\n\t\t\t\t\t\t\t\t\t\t\t\ticonPosition='end'\n\t\t\t\t\t\t\t\t\t\t\t\ttype='number'\n\t\t\t\t\t\t\t\t\t\t\t\tproperties={{\n\t\t\t\t\t\t\t\t\t\t\t\t\tmin: 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\tmax: this._pages.length,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstep: 1,\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tautoFocus={true}\n\t\t\t\t\t\t\t\t\t\t\t\tonEnter={({ detail }) => this._enterPress(detail)}\n\t\t\t\t\t\t\t\t\t\t\t\tslot='items'\n\t\t\t\t\t\t\t\t\t\t\t></p-field>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</p-dropdown>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<p-pagination-pages-item\n\t\t\t\t\t\t\t\tactive={p.value === this.page}\n\t\t\t\t\t\t\t\tonClick={() => this._pageClick(p.value as number)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{p.value}\n\t\t\t\t\t\t\t</p-pagination-pages-item>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Watch('page')\n\t@Watch('pageSize')\n\t@Watch('total')\n\tprotected pageChangeHandler() {\n\t\tthis._generate();\n\t}\n\n\t@Listen('localeChanged', { target: 'body' })\n\tprivate async _setLocales(): Promise<void> {\n\t\tthis._locales = await getLocaleComponentStrings(this._el);\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler(event) {\n\t\tconst dropdowns = [false, false];\n\t\tif (this._dropdowns[0] && childOfComposed(event, this._dropdowns[0])) {\n\t\t\tdropdowns[0] = true;\n\t\t}\n\n\t\tif (this._dropdowns[1] && childOfComposed(event, this._dropdowns[1])) {\n\t\t\tdropdowns[1] = true;\n\t\t}\n\n\t\tthis._showDropdown = dropdowns;\n\t}\n\n\tprivate _generate() {\n\t\tthis._pages = this._generatePages();\n\t\tthis._set = this._generateSet();\n\n\t\tif (this.page > this._pages?.length) {\n\t\t\tthis._changePage(this._pages.length);\n\t\t}\n\t}\n\n\tprivate _changePage(p?: number) {\n\t\tif (!p) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = [false, false];\n\t\tthis.page = p;\n\t\tthis.pageChange.emit(this.page);\n\t}\n\n\tprivate _previousClick() {\n\t\tif (this._carouselDisabled('previous')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._changePage(this.page - 1);\n\t}\n\n\tprivate _nextClick = () => {\n\t\tif (this._carouselDisabled('next')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._changePage(this.page + 1);\n\t};\n\n\tprivate _carouselDisabled = (type: 'previous' | 'next') => {\n\t\tif (type === 'next') {\n\t\t\tconst nextPage = this.page + 1;\n\t\t\tif (nextPage > this._pages[this._pages.length - 1]) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tif (type === 'previous') {\n\t\t\tconst previousPage = this.page - 1;\n\t\t\tif (previousPage < this._pages[0]) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t};\n\n\tprivate _pageClick = (p?: number) => this._changePage(p);\n\n\tprivate _enterPress(p: string | number) {\n\t\tif (typeof p === 'string') {\n\t\t\tp = parseInt(p);\n\t\t}\n\n\t\tif (isNaN(p)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (p < 1) {\n\t\t\tp = 1;\n\t\t}\n\n\t\tif (p > this._pages.length) {\n\t\t\tp = this._pages.length;\n\t\t}\n\n\t\tthis._changePage(p);\n\t}\n\n\tprivate _onShowDropdown(show = false, dropdownIndex: number) {\n\t\tconst showDropdown = [...this._showDropdown];\n\t\tshowDropdown[dropdownIndex] = show;\n\t\tthis._showDropdown = showDropdown;\n\t}\n\n\tprivate _generatePages() {\n\t\tif (!this.total || !this.pageSize) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst pages = Math.ceil(this.total / this.pageSize);\n\t\tthis.pagesChange.emit(pages);\n\t\treturn new Array(pages).fill(undefined).map((_, i) => i + 1);\n\t}\n\n\tprivate _generateSet = (\n\t\trange: number = 1,\n\t\tenableBoundaries: boolean = true\n\t): PaginationSetItem[] => {\n\t\tconst totalPages = this._pages.length;\n\n\t\tif (!totalPages) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet start = this.page - range;\n\t\tlet end = this.page + range;\n\n\t\tif (end > totalPages) {\n\t\t\tend = totalPages;\n\t\t\tstart = totalPages - range * 2;\n\t\t\tstart = start < 1 ? 1 : start;\n\t\t}\n\n\t\tif (start <= 1) {\n\t\t\tstart = 1;\n\t\t\tend = Math.min(range * 2 + 1, totalPages);\n\t\t}\n\n\t\tconst set = [];\n\n\t\tconst previous = {\n\t\t\ttype: 'previous',\n\t\t\tvalue: (\n\t\t\t\t<p-icon\n\t\t\t\t\tvariant='caret'\n\t\t\t\t\tsize='sm'\n\t\t\t\t\trotate={90}\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\tconst next = {\n\t\t\ttype: 'next',\n\t\t\tvalue: (\n\t\t\t\t<p-icon\n\t\t\t\t\tvariant='caret'\n\t\t\t\t\tsize='sm'\n\t\t\t\t\trotate={-90}\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\t// Disable page range, display all the pages\n\t\tif (range === null) {\n\t\t\tconst p = this._pages.map(p => ({\n\t\t\t\ttype: 'page',\n\t\t\t\tvalue: p,\n\t\t\t}));\n\n\t\t\treturn enableBoundaries ? [previous, ...p, next] : p;\n\t\t}\n\n\t\tif (enableBoundaries) {\n\t\t\tset.push(previous);\n\t\t}\n\n\t\tlet dropdownIndex = 0;\n\n\t\tif (start <= 3) {\n\t\t\tfor (let i = 1; i < start; i++) {\n\t\t\t\tset.push({\n\t\t\t\t\ttype: 'page',\n\t\t\t\t\tvalue: this._pages[i - 1],\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tset.push({\n\t\t\t\ttype: 'page',\n\t\t\t\tvalue: 1,\n\t\t\t});\n\n\t\t\tset.push({\n\t\t\t\ttype: 'ellipsis',\n\t\t\t\tdropdownIndex,\n\t\t\t\toptions: Array.from({ length: start - 2 }, (_, i) => i + 2),\n\t\t\t});\n\t\t\tdropdownIndex++;\n\t\t}\n\n\t\tfor (let i = start; i <= end; i++) {\n\t\t\tset.push({\n\t\t\t\ttype: 'page',\n\t\t\t\tvalue: this._pages[i - 1],\n\t\t\t});\n\t\t}\n\n\t\tif (end >= totalPages - 2) {\n\t\t\tfor (let i = end + 1; i <= totalPages; i++) {\n\t\t\t\tset.push({\n\t\t\t\t\ttype: 'page',\n\t\t\t\t\tvalue: this._pages[i - 1],\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tset.push({\n\t\t\t\ttype: 'ellipsis',\n\t\t\t\tdropdownIndex,\n\t\t\t\toptions: Array.from(\n\t\t\t\t\t{ length: totalPages - end - 1 },\n\t\t\t\t\t(_, i) => i + end + 1\n\t\t\t\t),\n\t\t\t});\n\t\t\tdropdownIndex++;\n\n\t\t\tset.push({\n\t\t\t\ttype: 'page',\n\t\t\t\tvalue: this._pages[this._pages.length - 1],\n\t\t\t});\n\t\t}\n\n\t\tif (enableBoundaries) {\n\t\t\tset.push(next);\n\t\t}\n\n\t\treturn set;\n\t};\n}\n","","import {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tListen,\n\tProp,\n\tState,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { ThemedHost } from '../../../../internal/themed-host.component';\nimport { cn } from '../../../../utils';\nimport { asBoolean } from '../../../../utils/as-boolean';\nimport {\n\tPAGINATION_DEFAULT_PAGE_SIZE,\n\tPAGINATION_DEFAULT_PAGE_SIZE_OPTIONS,\n} from '../../../../utils/constants';\nimport {\n\tformatTranslation,\n\tgetLocaleComponentStrings,\n} from '../../../../utils/localization';\n\nexport type templateFunc = (value: number) => string;\n\nconst paginationSize = cva('p-pagination-size', {\n\tvariants: {\n\t\thidden: {\n\t\t\tfalse: null,\n\t\t\ttrue: 'hidden',\n\t\t},\n\t},\n});\n\nconst trigger = cva(\n\t[\n\t\t'group/pagination-size-trigger',\n\t\t'flex items-center gap-2',\n\t\t'px-2 h-6',\n\t\t'text-sm text-storm-500 font-medium ',\n\t\t'dark:text-white',\n\t\t'cursor-pointer rounded-full',\n\t\t'shadow-1 border border-solid',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tactive: {\n\t\t\t\tfalse: [\n\t\t\t\t\t'bg-white hover:bg-white-600 border-transparent',\n\t\t\t\t\t'dark:bg-white/15 dark:hover:bg-white/25',\n\t\t\t\t],\n\t\t\t\ttrue: [\n\t\t\t\t\t'bg-white-600 border-indigo-600 ring ring-2 ring-indigo-100',\n\t\t\t\t\t'dark:bg-white/25 dark:ring-0',\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t}\n);\n\n@Component({\n\ttag: 'p-pagination-size',\n\tstyleUrl: 'pagination-size.component.css',\n\tshadow: true,\n})\nexport class PaginationSize {\n\tprivate _defaultItemTemplate: templateFunc = size =>\n\t\tformatTranslation(this._locales.item, { size });\n\t/**\n\t * The current page\n\t */\n\t@Prop({ mutable: true, reflect: true }) size: number =\n\t\tPAGINATION_DEFAULT_PAGE_SIZE;\n\n\t/**\n\t * The available sizes\n\t */\n\t@Prop() sizeOptions: number[] = PAGINATION_DEFAULT_PAGE_SIZE_OPTIONS;\n\n\t/**\n\t * Event whenever the size changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tsizeChange: EventEmitter<number>;\n\n\t/**\n\t * The template for the data view\n\t */\n\t@Prop() itemTemplate: templateFunc = this._defaultItemTemplate;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t/**\n\t * Wether to hide when there is only 1 page available\n\t */\n\t@Prop() hidden: boolean = false;\n\n\t/**\n\t * Wether the dropdown is open\n\t */\n\t@State() dropdownIsOpen = false;\n\n\t/**\n\t * Locales used for this component\n\t */\n\t@State() private _locales: any = {};\n\n\tcomponentWillLoad() {\n\t\tthis._setLocales();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<ThemedHost class={paginationSize({ hidden: asBoolean(this.hidden) })}>\n\t\t\t\t<p-dropdown\n\t\t\t\t\tapplyFullWidth={true}\n\t\t\t\t\tapplyMaxWidth={false}\n\t\t\t\t\tplacement='top-start'\n\t\t\t\t\tchevronDirection='down'\n\t\t\t\t\tonIsOpen={({ detail }) => (this.dropdownIsOpen = detail)}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={trigger({\n\t\t\t\t\t\t\tactive: this.dropdownIsOpen,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t>\n\t\t\t\t\t\t<p class='min-w-0 flex-1 overflow-hidden text-ellipsis text-nowrap'>\n\t\t\t\t\t\t\t{this.itemTemplate\n\t\t\t\t\t\t\t\t? this.itemTemplate(this.size)\n\t\t\t\t\t\t\t\t: this._defaultItemTemplate(this.size)}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\tclass={cn(\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'flex-shrink-0',\n\t\t\t\t\t\t\t\t\t'group-hover/pagination-size-trigger:text-storm-500',\n\t\t\t\t\t\t\t\t\t'dark:group-hover/pagination-size-trigger:text-white',\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'text-storm-300 dark:text-hurricane-200':\n\t\t\t\t\t\t\t\t\t\t!this.dropdownIsOpen,\n\t\t\t\t\t\t\t\t\t'text-storm-500 dark:text-white': !!this.dropdownIsOpen,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\tvariant='double-caret'\n\t\t\t\t\t\t\tsize='sm'\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<slot slot='items'>\n\t\t\t\t\t\t{this.sizeOptions.map(option => (\n\t\t\t\t\t\t\t<p-dropdown-menu-item\n\t\t\t\t\t\t\t\tactive={option === this.size}\n\t\t\t\t\t\t\t\tonClick={() => this._changeSize(option)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this.itemTemplate\n\t\t\t\t\t\t\t\t\t? this.itemTemplate(option)\n\t\t\t\t\t\t\t\t\t: this._defaultItemTemplate(option)}\n\t\t\t\t\t\t\t</p-dropdown-menu-item>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</slot>\n\t\t\t\t</p-dropdown>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Listen('localeChanged', { target: 'body' })\n\tprivate async _setLocales(): Promise<void> {\n\t\tthis._locales = await getLocaleComponentStrings(this._el);\n\t}\n\n\tprivate _changeSize(s?: number) {\n\t\tif (!s) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.size = s;\n\t\tthis.sizeChange.emit(this.size);\n\t}\n}\n"],"names":["pagination"],"mappings":";;;;;;;;;;;AAAA,MAAM,sBAAsB,GAAG,2vDAA2vD;;ACgB1xD,MAAMA,YAAU,GAAG,GAAG,CACrB;IACC,cAAc;IACd,oBAAoB;IACpB,cAAc;IACd,2DAA2D;IAC3D,iDAAiD;IACjD,KAAK;C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