@paperless/core 3.2.0 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons/general/lamp.svg +3 -10
- package/dist/assets/icons/general/math.svg +7 -14
- package/dist/assets/icons/general/newtab.svg +3 -10
- package/dist/assets/icons/general/spinner.svg +0 -7
- package/dist/assets/icons/general/spinning.svg +0 -7
- package/dist/assets/icons/general/stack.svg +3 -10
- package/dist/build/index.esm.js +1 -1
- package/dist/build/{p-114447e4.entry.js → p-2c0ca302.entry.js} +1 -1
- package/dist/{paperless/p-BlJazAvY.js → build/p-DPmts3W0.js} +1 -1
- package/dist/{paperless/p-afa4d38a.entry.js → build/p-eaa0079d.entry.js} +1 -1
- package/dist/build/{p-1c3e36cf.js → p-fa2e80c6.js} +1 -1
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/{icons-BFoxhX6L.js → icons-BHz4nb3U.js} +16 -58
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/p-button_3.cjs.entry.js +1 -1
- package/dist/cjs/p-datepicker.cjs.entry.js +11 -6
- package/dist/collection/assets/icons/general/lamp.svg +3 -10
- package/dist/collection/assets/icons/general/math.svg +7 -14
- package/dist/collection/assets/icons/general/newtab.svg +3 -10
- package/dist/collection/assets/icons/general/spinner.svg +0 -7
- package/dist/collection/assets/icons/general/spinning.svg +0 -7
- package/dist/collection/assets/icons/general/stack.svg +3 -10
- package/dist/collection/components/molecules/datepicker/datepicker.component.js +11 -6
- package/dist/components/index.js +1 -1
- package/dist/components/{p-CXg0xBGH.js → p-0Uawv030.js} +1 -1
- package/dist/components/{p-DLYJuP63.js → p-48UlhVtz.js} +1 -1
- package/dist/components/{p-CeySqTb3.js → p-AkD55vN_.js} +1 -1
- package/dist/components/{p-DlMZf72T.js → p-BAvGAs2F.js} +1 -1
- package/dist/components/{p-5NU3sI-6.js → p-BEu_Xlbv.js} +1 -1
- package/dist/components/{p-BruraPn4.js → p-BmU3MAfH.js} +1 -1
- package/dist/components/{p-BwzYUgjx.js → p-COFt46UN.js} +1 -1
- package/dist/components/{p-CDP8S8lL.js → p-Cat2_HoM.js} +1 -1
- package/dist/components/{p-C1irPVgy.js → p-Cr_WB0kg.js} +1 -1
- package/dist/components/{p-D0Af7BtI.js → p-CtxKjhiD.js} +1 -1
- package/dist/components/{p-BtWP9QJR.js → p-D8FhwO0Q.js} +1 -1
- package/dist/components/{p-B7iPzLJ1.js → p-DKnCWy7F.js} +1 -1
- package/dist/{build/p-BlJazAvY.js → components/p-DPmts3W0.js} +1 -1
- package/dist/components/{p-nOG0jGaD.js → p-DR1auS78.js} +1 -1
- package/dist/components/{p-CyL9rHm8.js → p-DT72kk3I.js} +1 -1
- package/dist/components/{p-rXG9U1a1.js → p-DlQumf-0.js} +1 -1
- package/dist/components/{p-IbAvjZ3P.js → p-Dy1wXwZf.js} +1 -1
- package/dist/components/{p-DmlFVaBd.js → p-NEqovphH.js} +1 -1
- package/dist/components/{p-BKt8zLAB.js → p-SYK2C-7G.js} +1 -1
- package/dist/components/{p-D-y3A1iZ.js → p-ShAy0ruV.js} +1 -1
- package/dist/components/{p-Dk5Jl6vH.js → p-aZcUXH1b.js} +1 -1
- package/dist/components/p-accordion.js +1 -1
- package/dist/components/p-attachment.js +1 -1
- package/dist/components/p-button.js +1 -1
- package/dist/components/p-calendar.js +1 -1
- package/dist/components/p-card-header.js +1 -1
- package/dist/components/p-checkbox.js +1 -1
- package/dist/components/p-cropper.js +2 -2
- package/dist/components/p-datepicker.js +1 -1
- package/dist/components/p-drawer-header.js +1 -1
- package/dist/components/p-drawer.js +1 -1
- package/dist/components/p-dropdown-menu-item.js +1 -1
- package/dist/components/p-empty-state.js +1 -1
- package/dist/components/p-field-container.js +1 -1
- package/dist/components/p-field.js +1 -1
- package/dist/components/p-floating-menu-container.js +1 -1
- package/dist/components/p-floating-menu-item.js +1 -1
- package/dist/components/p-helper.js +1 -1
- package/dist/components/p-icon.js +1 -1
- package/dist/components/p-info-panel.js +1 -1
- package/dist/components/p-label.js +1 -1
- package/dist/components/p-listing-item.js +1 -1
- package/dist/components/p-modal-header.js +1 -1
- package/dist/components/p-modal.js +1 -1
- package/dist/components/p-navbar.js +1 -1
- package/dist/components/p-navigation-item.js +1 -1
- package/dist/components/p-pagination-pages.js +1 -1
- package/dist/components/p-pagination-size.js +1 -1
- package/dist/components/p-pagination.js +1 -1
- package/dist/components/p-profile.js +1 -1
- package/dist/components/p-range.js +1 -1
- package/dist/components/p-segment-item.js +1 -1
- package/dist/components/p-select.js +1 -1
- package/dist/components/p-table-footer.js +1 -1
- package/dist/components/p-table-header.js +1 -1
- package/dist/components/p-table.js +1 -1
- package/dist/components/p-toast.js +1 -1
- package/dist/esm/{icons-BlJazAvY.js → icons-DPmts3W0.js} +16 -58
- package/dist/esm/index.js +1 -1
- package/dist/esm/p-button_3.entry.js +1 -1
- package/dist/esm/p-datepicker.entry.js +11 -6
- package/dist/index.html +1 -1
- package/dist/paperless/index.esm.js +1 -1
- package/dist/paperless/{p-114447e4.entry.js → p-2c0ca302.entry.js} +1 -1
- package/dist/{components/p-BlJazAvY.js → paperless/p-DPmts3W0.js} +1 -1
- package/dist/{build/p-afa4d38a.entry.js → paperless/p-eaa0079d.entry.js} +1 -1
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/molecules/datepicker/datepicker.component.d.ts +1 -0
- package/hydrate/index.js +27 -64
- package/hydrate/index.mjs +27 -64
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as o,d as s}from"./p-
|
|
1
|
+
import{R as o,d as s}from"./p-0Uawv030.js";const a=o,p=s;export{a as PRange,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as o,d as s}from"./p-
|
|
1
|
+
import{S as o,d as s}from"./p-DR1auS78.js";const a=o,p=s;export{a as PSegmentItem,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as i,c as s,h as a}from"./p-CySg37XO.js";import{c as r}from"./p-CBWjHURv.js";import{T as o}from"./p-Au2WuEGF.js";import{a as h}from"./p-TyZ7uPES.js";import{c as n}from"./p-xs4N_Y-0.js";import{S as l}from"./p-CEaB2BT0.js";import{d as c}from"./p-iLGr9rDU.js";import{d}from"./p-CeySqTb3.js";import{d as p}from"./p-D-y3A1iZ.js";import{d as m}from"./p-BtliZ0U_.js";import{d as u}from"./p-BtH8h7p9.js";import{d as w}from"./p-rXG9U1a1.js";import{d as y}from"./p-IbAvjZ3P.js";import{d as x}from"./p-C1irPVgy.js";import{d as g}from"./p-BKt8zLAB.js";import{d as v}from"./p-Dk5Jl6vH.js";import{d as f}from"./p-D8faiybE.js";import{d as b}from"./p-2yaxaWU2.js";const k=r(["flex items-center gap-2","h-full min-w-0 flex-1","pointer-events-none overflow-hidden"]),C=r(["item group/item","pointer-events-auto cursor-pointer","flex h-[1.625rem] items-center gap-2","h-[1.625rem] px-2","whitespace-nowrap text-sm font-semibold","rounded-lg","bg-indigo-100","dark:bg-white/15"]),_=r("block w-full overflow-hidden text-start",{variants:{variant:{placeholder:"\n text-storm-400\n dark:text-white\n ",default:null},enableTextWrap:{true:!1,false:"text-ellipsis whitespace-nowrap"},error:{true:"\n text-negative-red-700\n group-hover/button:text-negative-red-800\n dark:text-negative-red-alternative\n ",false:null}}}),I=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.queryChange=s(this,"queryChange",3),this.valueChange=s(this,"valueChange",3),this.selectAllChange=s(this,"selectAllChange",3),this.dropdownShown=s(this,"dropdownShown",3),this.add=s(this,"add",3),this._internals=this.attachInternals()}items;multi;strategy="absolute";icon;query;placeholder;autocompletePlaceholder="Search...";value;displayKey="text";dropdownDisplayKey;selectionDisplayKey;valueKey;avatarKey;iconKey="icon";iconClassKey="iconClass";showIconOnSelectedItem;classKey="class";applyClassOnSelectedItem;applyClassOnSelectedItemInMenu;avatarLettersKey;identifierKey;queryKey;autoSelectFirst=!0;showChevron=!0;maxDisplayedItems=l;enableAutocomplete=!0;enableTextWrap=!1;asyncFilter=!1;loading=!1;enableSelectAll=!1;selectAllText="Select all";selectAllIcon;queryChange;valueChange;selectAllChange;dropdownShown;size="base";prefix;label;helper;required=!0;showOptional=!0;error;disabled=!1;showAddItem=!1;addItemText="Add item";add;emptyStateText="No items available";get _el(){return this}_showDropdown=!1;_selectedItem=null;_allSelected=!1;_amountHidden=0;_internals;_inputRef;autocompleteInputRef;_multiContainerRef;_resizeObserver;_resizeDebounceTimer;_checkSelectedItemsTimeout;get _items(){return this._getParsedItems()}get _displayValue(){const t=a("div",{class:_({variant:"placeholder"})},this.placeholder);return this._selectedItem?this.multi?0===this._selectedItem?.length?t:a("div",{class:k(),ref:t=>this._multiContainerRef=t},this._selectedItem.map((t=>a("div",{class:C(),onClick:()=>this._selectValue(t)},t[this.selectionDisplayKey??this.displayKey],a("p-icon",{class:"\n text-xs text-indigo-500\n group-hover/item:text-indigo-800\n dark:text-white/15\n dark:group-hover/item:text-white\n ",variant:"negative"})))),a("div",{class:"extra pointer-events-none hidden text-sm text-storm-100"},"+",this._amountHidden)):this._getDisplay(this._selectedItem,!0):t}get _identifierKey(){return this.identifierKey??this.valueKey??"value"}formResetCallback(){this._selectValue(null)}componentDidLoad(){if(!this.valueKey&&!this.identifierKey)throw Error("You must provide a valueKey or identifierKey");this.multi&&(this._setMultiContainerMaxWidth(),this._resizeObserver=new ResizeObserver((()=>{this._resizeDebounceTimer&&(clearTimeout(this._resizeDebounceTimer),this._resizeDebounceTimer=null),this._resizeDebounceTimer=setTimeout((()=>{this._setMultiContainerMaxWidth(),this._setCheckSelectedItemsTimeout()}),200)})),this._resizeObserver.observe(this._el)),this.value?this._valueChange():this.itemChanges()}componentDidRender(){this.multi&&this._setMultiContainerMaxWidth()}disconnectedCallback(){this.multi&&this._resizeObserver.disconnect()}render(){let t=this.icon;return this._selectedItem&&!this.avatarKey&&this.iconKey&&this._selectedItem?.[this.iconKey]&&!this.showIconOnSelectedItem&&(t=this._selectedItem[this.iconKey]),(this.avatarKey&&this._selectedItem?.[this.avatarKey]||this.avatarLettersKey&&this._selectedItem?.[this.avatarLettersKey])&&(t=null),this.error?.length&&(t="warning"),a(o,{key:"76b10df3dbbf0a1758ea13c7205ea4c11ea05056"},a("p-field-container",{key:"e17bca429b8a24a4c5e4399911c9efcebd8a6b24",error:this.error,forceShowTooltip:!!this.error?.length&&!this._showDropdown,helper:this.helper,label:this.label,prefix:this.prefix,required:this.required,showOptional:this.showOptional,variant:"write"},a("p-dropdown",{key:"1bcd1b15692330794bed8b34fbe203b8015681d9",applyChevron:!1,applyFullWidth:!0,applyMaxWidth:!1,"disable-trigger-click":this.disabled,insideClick:!0,manual:!0,manualChevron:!0,scrollable:!this.enableAutocomplete||"large",show:this._showDropdown,slot:"content",strategy:this.strategy,onIsOpen:t=>this._onDropdownOpen(t)},a("p-button",{key:"383466f2cec3fa3e7aa65aa3db077445cb2917ef",active:this._showDropdown,chevron:!!this.showChevron&&(this._showDropdown?"up":"down"),class:"w-full",error:!!this.error?.length,icon:t,iconClass:this.applyClassOnSelectedItem&&this._selectedItem?.[this.iconClassKey],size:this.size,slot:"trigger",variant:"secondary",onClick:t=>this._onClick(t)},a("div",{key:"8d5b4d842f4d49f029f1a61f98a8d768c61cf3ef",class:"relative min-w-0 flex-1",ref:t=>this._inputRef=t},this._displayValue)),this.loading?this._getLoadingItems():this._getItems(),this.showAddItem&&this._getAddItem())))}documentClickHandler(t){this._showDropdown&&!h(t,this._el)&&(this._showDropdown=!1)}_valueChange(){setTimeout((()=>{this._preselectItem(),this._setCheckSelectedItemsTimeout()}))}itemChanges(){setTimeout((()=>this._preselectItem()))}_showDropdownChanges(){this.dropdownShown.emit({value:this._showDropdown,query:this.query})}multiChanges(){this._selectedItem&&!Array.isArray(this._selectedItem)&&(this._selectedItem=[])}_preselectItem(){let t="string"==typeof this.value&&this.multi?JSON.parse(this.value):this.value;if(this.multi)return Array.isArray(t)?(this.value=t,0===t.length?void(this._selectedItem=[]):void(this._selectedItem=this.valueKey&&"false"!==this.valueKey?this._items.filter((e=>t.includes(e?.[this.valueKey]))):[...t])):(this.value=[],void this.valueChange.emit(this.value));this._selectedItem||t||!this.autoSelectFirst||(t=this._items[0]);const e="object"==typeof t&&null!==t?t[this._identifierKey]:t,i="string"==typeof e||"number"==typeof e?e:JSON.stringify(e),s=this._selectedItem?this._selectedItem?.[this._identifierKey]:null,a="string"==typeof s||"number"==typeof s?s:JSON.stringify(s);if(this._selectedItem&&a===i)return;if(!this._items?.length&&t)return void this._selectValue(t,!1);const r=this._getParsedItems(!1).find((t=>{const e=t?.[this._identifierKey];return("string"==typeof e||"number"==typeof e?e:JSON.stringify(e))===i}));this._selectValue(r??t,!1)}_selectValue(t,e=!0){let i=this.valueKey&&"false"!==this.valueKey&&null!==t&&!this.loading?t?.[this.valueKey]:t;if(this.multi){this._selectedItem&&Array.isArray(this._selectedItem)||(this._selectedItem=[]),this.value&&Array.isArray(this.value)||(this.value=[]);const e=[...this._selectedItem],s=[...this.value],a=e.findIndex((e=>e[this._identifierKey]===t[this._identifierKey]));return-1===a?(e.push(t),s.push(i)):(e.splice(a,1),s.splice(a,1)),this._selectedItem=e,this.value=s,void this.valueChange.emit(s)}this._selectedItem=t,this._onBlur(e),i!==this.value&&(this.value=i,this.valueChange.emit(i))}_onClick(t){const e=t?.composedPath();for(const t of e){if("p-button"===t.nodeName.toLowerCase())break;if(t.classList?.contains("item"))return}this._showDropdown=!this._showDropdown}_onBlur(t=!1){this.enableAutocomplete&&!t||(this._showDropdown=!1)}_onAutoComplete(t){this.enableAutocomplete&&(this._showDropdown=!0,this.query=t.detail,this.queryChange.emit(t.detail))}_checkvalue(t,e){return e?.[t]?.toString()?.toLowerCase().indexOf(this.query?.toLowerCase())>=0}_getItems(){let t=this._items.map((t=>{const e=this.multi&&this._selectedItem&&Array.isArray(this._selectedItem)?this._selectedItem.some((e=>e[this._identifierKey]===t[this._identifierKey])):t[this._identifierKey]===this._selectedItem?.[this._identifierKey];return a("p-dropdown-menu-item",{active:e,checkbox:!!this.multi,enableTextWrap:this.enableTextWrap,slot:"items",useContainer:!1,onClick:()=>this._selectValue(t)},this._getDisplay(t,!1,e))}));return 0===this._items.length&&(t=[a("p",{class:"\n w-full p-2 text-center text-sm text-storm-400\n dark:text-hurricane-200\n ",slot:"items"},this.emptyStateText)]),this.enableSelectAll&&this._items.length>0&&t.unshift(a("p-dropdown-menu-item",{active:this._allSelected,slot:"items",useContainer:!1,checkbox:!0,onClick:()=>this._selectAllChange()},this.selectAllIcon?.length?a("span",{class:"flex items-center gap-2"},a("div",{class:"flex w-6 justify-center text-lg"},a("p-icon",{variant:this.selectAllIcon}))," ",this.selectAllText):this.selectAllText)),this.enableAutocomplete&&t.unshift(this._getAutoCompleteItem()),t}_getAddItem(){return a("p-dropdown-menu-item",{slot:"items",useContainer:!1,onClick:()=>this.add.emit()},a("span",{class:"flex items-center gap-1 font-semibold text-indigo-600"},this.addItemText,a("p-icon",{variant:"plus"})))}_getLoadingItems(){const t=[0,0,0].map((()=>a("p-dropdown-menu-item",{enableHover:!1,slot:"items"},a("p-loader",{class:"h-6 w-full rounded",variant:"ghost"}))));return this.enableAutocomplete&&t.unshift(this._getAutoCompleteItem()),t}_getAutoCompleteItem(){return a("div",{class:"sticky top-0 z-10 mb-3 h-8",slot:"items"},a("p-field",{class:"block",placeholder:this.autocompletePlaceholder,value:this.query,onInputRefChange:t=>this.autocompleteInputRef=t.detail,onValueChange:t=>this._onAutoComplete(t)}))}_setMultiContainerMaxWidth(){this._inputRef&&this._multiContainerRef&&(this._multiContainerRef.style.maxWidth=Math.max(this._inputRef.clientWidth-16,16)+"px")}_setCheckSelectedItemsTimeout(){this._checkSelectedItemsTimeout&&clearTimeout(this._checkSelectedItemsTimeout),this._checkSelectedItemsTimeout=setTimeout((()=>this._checkSelectedItems()),50)}_checkSelectedItems(){if(!this._multiContainerRef)return;const t=this._multiContainerRef.getBoundingClientRect(),e=this._multiContainerRef.querySelectorAll(".item");let i=0;for(const s of e)s.classList.remove("hidden"),s.classList.add("flex"),s.getBoundingClientRect().right>t.right&&(s.classList.remove("flex"),s.classList.add("hidden"),i++);this._amountHidden=i;const s=this._multiContainerRef.querySelector(".extra");s&&(s.classList.contains("hidden")||s.classList.add("hidden"),i>0&&s.classList.remove("hidden"))}_onDropdownOpen(t){t.detail&&this.autocompleteInputRef&&setTimeout((()=>this.autocompleteInputRef.focus()),100)}_selectAllChange(){this._allSelected=!this._allSelected,this.selectAllChange.emit(this._allSelected)}_getDisplay(t,e=!1,i=!1){let s=a("div",{class:_({variant:"default",error:!!this.error?.length,enableTextWrap:this.enableTextWrap&&!e})},t[e?this.selectionDisplayKey??this.displayKey:this.displayKey]);return this.avatarKey&&(s=a("span",{class:"flex items-center gap-2"},a("p-avatar",{letters:t[this.avatarLettersKey],size:"sm",src:t[this.avatarKey]}),a("div",{class:_({variant:"default",error:!!this.error?.length,enableTextWrap:this.enableTextWrap&&!e})},t[this.dropdownDisplayKey??this.displayKey]))),!this.iconKey||e&&!this.showIconOnSelectedItem||(s=a("span",{class:"flex items-center gap-2"},t[this.iconKey]&&a("p-icon",{class:n("\n text-storm-300\n dark:text-hurricane-200\n ",e&&!this.applyClassOnSelectedItem||i&&!this.applyClassOnSelectedItemInMenu?"":t?.[this.iconClassKey]??""),variant:t[this.iconKey]}),a("div",{class:_({variant:"default",error:!!this.error?.length,enableTextWrap:this.enableTextWrap&&!e})},t[this.dropdownDisplayKey??this.displayKey]))),e&&!this.applyClassOnSelectedItem||i&&!this.applyClassOnSelectedItemInMenu||!t?.[this.classKey]?.length?s:a("div",{class:t[this.classKey]},s)}_getParsedItems(t=!0){if(!this.items||this.loading)return[];let e="string"==typeof this.items?JSON.parse(this.items):this.items;return"string"==typeof e?.[0]&&(this.displayKey="text",this.valueKey="value",e=e.map((t=>({value:t,text:t})))),this.query?.length&&!this.asyncFilter&&(e=e.filter((t=>this.queryKey?this._checkvalue(this.queryKey,t):this._checkvalue(this._identifierKey,t)||this._checkvalue(this.displayKey,t)))),t?e?.slice(0,this.maxDisplayedItems):e}static get formAssociated(){return!0}static get watchers(){return{value:[{_valueChange:0}],items:[{itemChanges:0}],_showDropdown:[{_showDropdownChanges:0}],multi:[{multiChanges:0}]}}static get style(){return"*{box-sizing:border-box}:host{--tw-translate-y:0px!important;--tw-translate-x:0px!important}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.static{position:static}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.z-10{z-index:10}.mb-3{margin-bottom:.75rem}.block{display:block}.flex{display:flex}.hidden{display:none}.h-6{height:1.5rem}.h-8{height:2rem}.h-\\[1\\.625rem\\]{height:1.625rem}.h-full{height:100%}.w-6{width:1.5rem}.w-full{width:100%}.min-w-0{min-width:0}.flex-1{flex:1 1 0%}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.overflow-hidden{overflow:hidden}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.bg-indigo-100{--tw-bg-opacity:1;background-color:rgb(227 236 254/var(--tw-bg-opacity,1))}.p-2{padding:.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.text-center{text-align:center}.text-start{text-align:start}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-semibold{font-weight:600}.text-indigo-500{--tw-text-opacity:1;color:rgb(142 179 251/var(--tw-text-opacity,1))}.text-indigo-600{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity,1))}.text-negative-red-700{--tw-text-opacity:1;color:rgb(147 16 16/var(--tw-text-opacity,1))}.text-storm-100{--tw-text-opacity:1;color:rgb(209 210 212/var(--tw-text-opacity,1))}.text-storm-300{--tw-text-opacity:1;color:rgb(116 120 127/var(--tw-text-opacity,1))}.text-storm-400{--tw-text-opacity:1;color:rgb(70 75 84/var(--tw-text-opacity,1))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.group\\/button:hover .group-hover\\/button\\:text-negative-red-800{--tw-text-opacity:1;color:rgb(141 16 16/var(--tw-text-opacity,1))}.group\\/item:hover .group-hover\\/item\\:text-indigo-800{--tw-text-opacity:1;color:rgb(27 88 210/var(--tw-text-opacity,1))}.dark\\:bg-white\\/15:where(:host([data-theme=dark]),:host([data-theme=dark]) *){background-color:hsla(0,0%,100%,.15)}.dark\\:text-hurricane-200:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(163 165 169/var(--tw-text-opacity,1))}.dark\\:text-negative-red-alternative:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(255 92 92/var(--tw-text-opacity,1))}.dark\\:text-white:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:text-white\\/15:where(:host([data-theme=dark]),:host([data-theme=dark]) *){color:hsla(0,0%,100%,.15)}.group\\/item:hover .dark\\:group-hover\\/item\\:text-white:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:bg-white\\/15:where([data-theme=dark],[data-theme=dark] *){background-color:hsla(0,0%,100%,.15)}.dark\\:text-hurricane-200:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(163 165 169/var(--tw-text-opacity,1))}.dark\\:text-negative-red-alternative:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(255 92 92/var(--tw-text-opacity,1))}.dark\\:text-white:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:text-white\\/15:where([data-theme=dark],[data-theme=dark] *){color:hsla(0,0%,100%,.15)}.group\\/item:hover .dark\\:group-hover\\/item\\:text-white:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}"}},[576,"p-select",{items:[1],multi:[516],strategy:[1],icon:[1],query:[1],placeholder:[1],autocompletePlaceholder:[1,"autocomplete-placeholder"],value:[8],displayKey:[1,"display-key"],dropdownDisplayKey:[1,"dropdown-display-key"],selectionDisplayKey:[1,"selection-display-key"],valueKey:[1,"value-key"],avatarKey:[1,"avatar-key"],iconKey:[1,"icon-key"],iconClassKey:[1,"icon-class-key"],showIconOnSelectedItem:[1,"show-icon-on-selected-item"],classKey:[1,"class-key"],applyClassOnSelectedItem:[4,"apply-class-on-selected-item"],applyClassOnSelectedItemInMenu:[4,"apply-class-on-selected-item-in-menu"],avatarLettersKey:[1,"avatar-letters-key"],identifierKey:[1,"identifier-key"],queryKey:[1,"query-key"],autoSelectFirst:[4,"auto-select-first"],showChevron:[4,"show-chevron"],maxDisplayedItems:[2,"max-displayed-items"],enableAutocomplete:[4,"enable-autocomplete"],enableTextWrap:[4,"enable-text-wrap"],asyncFilter:[4,"async-filter"],loading:[4],enableSelectAll:[4,"enable-select-all"],selectAllText:[1,"select-all-text"],selectAllIcon:[1,"select-all-icon"],size:[1],prefix:[1],label:[1],helper:[1],required:[516],showOptional:[516,"show-optional"],error:[513],disabled:[516],showAddItem:[4,"show-add-item"],addItemText:[1,"add-item-text"],emptyStateText:[1,"empty-state-text"],_showDropdown:[32],_selectedItem:[32],_allSelected:[32],_amountHidden:[32]},[[6,"click","documentClickHandler"]],{value:[{_valueChange:0}],items:[{itemChanges:0}],_showDropdown:[{_showDropdownChanges:0}],multi:[{multiChanges:0}]}]);function S(){"undefined"!=typeof customElements&&["p-select","p-avatar","p-button","p-checkbox","p-dropdown","p-dropdown-menu-container","p-dropdown-menu-item","p-field","p-field-container","p-helper","p-icon","p-loader","p-tooltip"].forEach((e=>{switch(e){case"p-select":customElements.get(t(e))||customElements.define(t(e),I);break;case"p-avatar":customElements.get(t(e))||c();break;case"p-button":customElements.get(t(e))||d();break;case"p-checkbox":customElements.get(t(e))||p();break;case"p-dropdown":customElements.get(t(e))||m();break;case"p-dropdown-menu-container":customElements.get(t(e))||u();break;case"p-dropdown-menu-item":customElements.get(t(e))||w();break;case"p-field":customElements.get(t(e))||y();break;case"p-field-container":customElements.get(t(e))||x();break;case"p-helper":customElements.get(t(e))||g();break;case"p-icon":customElements.get(t(e))||v();break;case"p-loader":customElements.get(t(e))||f();break;case"p-tooltip":customElements.get(t(e))||b()}}))}S();const T=I,A=S;export{T as PSelect,A as defineCustomElement}
|
|
1
|
+
import{t,p as e,H as i,c as s,h as a}from"./p-CySg37XO.js";import{c as r}from"./p-CBWjHURv.js";import{T as o}from"./p-Au2WuEGF.js";import{a as h}from"./p-TyZ7uPES.js";import{c as n}from"./p-xs4N_Y-0.js";import{S as l}from"./p-CEaB2BT0.js";import{d as c}from"./p-iLGr9rDU.js";import{d}from"./p-AkD55vN_.js";import{d as p}from"./p-ShAy0ruV.js";import{d as m}from"./p-BtliZ0U_.js";import{d as u}from"./p-BtH8h7p9.js";import{d as w}from"./p-DlQumf-0.js";import{d as y}from"./p-Dy1wXwZf.js";import{d as x}from"./p-Cr_WB0kg.js";import{d as g}from"./p-SYK2C-7G.js";import{d as v}from"./p-aZcUXH1b.js";import{d as f}from"./p-D8faiybE.js";import{d as b}from"./p-2yaxaWU2.js";const k=r(["flex items-center gap-2","h-full min-w-0 flex-1","pointer-events-none overflow-hidden"]),C=r(["item group/item","pointer-events-auto cursor-pointer","flex h-[1.625rem] items-center gap-2","h-[1.625rem] px-2","whitespace-nowrap text-sm font-semibold","rounded-lg","bg-indigo-100","dark:bg-white/15"]),_=r("block w-full overflow-hidden text-start",{variants:{variant:{placeholder:"\n text-storm-400\n dark:text-white\n ",default:null},enableTextWrap:{true:!1,false:"text-ellipsis whitespace-nowrap"},error:{true:"\n text-negative-red-700\n group-hover/button:text-negative-red-800\n dark:text-negative-red-alternative\n ",false:null}}}),I=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.queryChange=s(this,"queryChange",3),this.valueChange=s(this,"valueChange",3),this.selectAllChange=s(this,"selectAllChange",3),this.dropdownShown=s(this,"dropdownShown",3),this.add=s(this,"add",3),this._internals=this.attachInternals()}items;multi;strategy="absolute";icon;query;placeholder;autocompletePlaceholder="Search...";value;displayKey="text";dropdownDisplayKey;selectionDisplayKey;valueKey;avatarKey;iconKey="icon";iconClassKey="iconClass";showIconOnSelectedItem;classKey="class";applyClassOnSelectedItem;applyClassOnSelectedItemInMenu;avatarLettersKey;identifierKey;queryKey;autoSelectFirst=!0;showChevron=!0;maxDisplayedItems=l;enableAutocomplete=!0;enableTextWrap=!1;asyncFilter=!1;loading=!1;enableSelectAll=!1;selectAllText="Select all";selectAllIcon;queryChange;valueChange;selectAllChange;dropdownShown;size="base";prefix;label;helper;required=!0;showOptional=!0;error;disabled=!1;showAddItem=!1;addItemText="Add item";add;emptyStateText="No items available";get _el(){return this}_showDropdown=!1;_selectedItem=null;_allSelected=!1;_amountHidden=0;_internals;_inputRef;autocompleteInputRef;_multiContainerRef;_resizeObserver;_resizeDebounceTimer;_checkSelectedItemsTimeout;get _items(){return this._getParsedItems()}get _displayValue(){const t=a("div",{class:_({variant:"placeholder"})},this.placeholder);return this._selectedItem?this.multi?0===this._selectedItem?.length?t:a("div",{class:k(),ref:t=>this._multiContainerRef=t},this._selectedItem.map((t=>a("div",{class:C(),onClick:()=>this._selectValue(t)},t[this.selectionDisplayKey??this.displayKey],a("p-icon",{class:"\n text-xs text-indigo-500\n group-hover/item:text-indigo-800\n dark:text-white/15\n dark:group-hover/item:text-white\n ",variant:"negative"})))),a("div",{class:"extra pointer-events-none hidden text-sm text-storm-100"},"+",this._amountHidden)):this._getDisplay(this._selectedItem,!0):t}get _identifierKey(){return this.identifierKey??this.valueKey??"value"}formResetCallback(){this._selectValue(null)}componentDidLoad(){if(!this.valueKey&&!this.identifierKey)throw Error("You must provide a valueKey or identifierKey");this.multi&&(this._setMultiContainerMaxWidth(),this._resizeObserver=new ResizeObserver((()=>{this._resizeDebounceTimer&&(clearTimeout(this._resizeDebounceTimer),this._resizeDebounceTimer=null),this._resizeDebounceTimer=setTimeout((()=>{this._setMultiContainerMaxWidth(),this._setCheckSelectedItemsTimeout()}),200)})),this._resizeObserver.observe(this._el)),this.value?this._valueChange():this.itemChanges()}componentDidRender(){this.multi&&this._setMultiContainerMaxWidth()}disconnectedCallback(){this.multi&&this._resizeObserver.disconnect()}render(){let t=this.icon;return this._selectedItem&&!this.avatarKey&&this.iconKey&&this._selectedItem?.[this.iconKey]&&!this.showIconOnSelectedItem&&(t=this._selectedItem[this.iconKey]),(this.avatarKey&&this._selectedItem?.[this.avatarKey]||this.avatarLettersKey&&this._selectedItem?.[this.avatarLettersKey])&&(t=null),this.error?.length&&(t="warning"),a(o,{key:"76b10df3dbbf0a1758ea13c7205ea4c11ea05056"},a("p-field-container",{key:"e17bca429b8a24a4c5e4399911c9efcebd8a6b24",error:this.error,forceShowTooltip:!!this.error?.length&&!this._showDropdown,helper:this.helper,label:this.label,prefix:this.prefix,required:this.required,showOptional:this.showOptional,variant:"write"},a("p-dropdown",{key:"1bcd1b15692330794bed8b34fbe203b8015681d9",applyChevron:!1,applyFullWidth:!0,applyMaxWidth:!1,"disable-trigger-click":this.disabled,insideClick:!0,manual:!0,manualChevron:!0,scrollable:!this.enableAutocomplete||"large",show:this._showDropdown,slot:"content",strategy:this.strategy,onIsOpen:t=>this._onDropdownOpen(t)},a("p-button",{key:"383466f2cec3fa3e7aa65aa3db077445cb2917ef",active:this._showDropdown,chevron:!!this.showChevron&&(this._showDropdown?"up":"down"),class:"w-full",error:!!this.error?.length,icon:t,iconClass:this.applyClassOnSelectedItem&&this._selectedItem?.[this.iconClassKey],size:this.size,slot:"trigger",variant:"secondary",onClick:t=>this._onClick(t)},a("div",{key:"8d5b4d842f4d49f029f1a61f98a8d768c61cf3ef",class:"relative min-w-0 flex-1",ref:t=>this._inputRef=t},this._displayValue)),this.loading?this._getLoadingItems():this._getItems(),this.showAddItem&&this._getAddItem())))}documentClickHandler(t){this._showDropdown&&!h(t,this._el)&&(this._showDropdown=!1)}_valueChange(){setTimeout((()=>{this._preselectItem(),this._setCheckSelectedItemsTimeout()}))}itemChanges(){setTimeout((()=>this._preselectItem()))}_showDropdownChanges(){this.dropdownShown.emit({value:this._showDropdown,query:this.query})}multiChanges(){this._selectedItem&&!Array.isArray(this._selectedItem)&&(this._selectedItem=[])}_preselectItem(){let t="string"==typeof this.value&&this.multi?JSON.parse(this.value):this.value;if(this.multi)return Array.isArray(t)?(this.value=t,0===t.length?void(this._selectedItem=[]):void(this._selectedItem=this.valueKey&&"false"!==this.valueKey?this._items.filter((e=>t.includes(e?.[this.valueKey]))):[...t])):(this.value=[],void this.valueChange.emit(this.value));this._selectedItem||t||!this.autoSelectFirst||(t=this._items[0]);const e="object"==typeof t&&null!==t?t[this._identifierKey]:t,i="string"==typeof e||"number"==typeof e?e:JSON.stringify(e),s=this._selectedItem?this._selectedItem?.[this._identifierKey]:null,a="string"==typeof s||"number"==typeof s?s:JSON.stringify(s);if(this._selectedItem&&a===i)return;if(!this._items?.length&&t)return void this._selectValue(t,!1);const r=this._getParsedItems(!1).find((t=>{const e=t?.[this._identifierKey];return("string"==typeof e||"number"==typeof e?e:JSON.stringify(e))===i}));this._selectValue(r??t,!1)}_selectValue(t,e=!0){let i=this.valueKey&&"false"!==this.valueKey&&null!==t&&!this.loading?t?.[this.valueKey]:t;if(this.multi){this._selectedItem&&Array.isArray(this._selectedItem)||(this._selectedItem=[]),this.value&&Array.isArray(this.value)||(this.value=[]);const e=[...this._selectedItem],s=[...this.value],a=e.findIndex((e=>e[this._identifierKey]===t[this._identifierKey]));return-1===a?(e.push(t),s.push(i)):(e.splice(a,1),s.splice(a,1)),this._selectedItem=e,this.value=s,void this.valueChange.emit(s)}this._selectedItem=t,this._onBlur(e),i!==this.value&&(this.value=i,this.valueChange.emit(i))}_onClick(t){const e=t?.composedPath();for(const t of e){if("p-button"===t.nodeName.toLowerCase())break;if(t.classList?.contains("item"))return}this._showDropdown=!this._showDropdown}_onBlur(t=!1){this.enableAutocomplete&&!t||(this._showDropdown=!1)}_onAutoComplete(t){this.enableAutocomplete&&(this._showDropdown=!0,this.query=t.detail,this.queryChange.emit(t.detail))}_checkvalue(t,e){return e?.[t]?.toString()?.toLowerCase().indexOf(this.query?.toLowerCase())>=0}_getItems(){let t=this._items.map((t=>{const e=this.multi&&this._selectedItem&&Array.isArray(this._selectedItem)?this._selectedItem.some((e=>e[this._identifierKey]===t[this._identifierKey])):t[this._identifierKey]===this._selectedItem?.[this._identifierKey];return a("p-dropdown-menu-item",{active:e,checkbox:!!this.multi,enableTextWrap:this.enableTextWrap,slot:"items",useContainer:!1,onClick:()=>this._selectValue(t)},this._getDisplay(t,!1,e))}));return 0===this._items.length&&(t=[a("p",{class:"\n w-full p-2 text-center text-sm text-storm-400\n dark:text-hurricane-200\n ",slot:"items"},this.emptyStateText)]),this.enableSelectAll&&this._items.length>0&&t.unshift(a("p-dropdown-menu-item",{active:this._allSelected,slot:"items",useContainer:!1,checkbox:!0,onClick:()=>this._selectAllChange()},this.selectAllIcon?.length?a("span",{class:"flex items-center gap-2"},a("div",{class:"flex w-6 justify-center text-lg"},a("p-icon",{variant:this.selectAllIcon}))," ",this.selectAllText):this.selectAllText)),this.enableAutocomplete&&t.unshift(this._getAutoCompleteItem()),t}_getAddItem(){return a("p-dropdown-menu-item",{slot:"items",useContainer:!1,onClick:()=>this.add.emit()},a("span",{class:"flex items-center gap-1 font-semibold text-indigo-600"},this.addItemText,a("p-icon",{variant:"plus"})))}_getLoadingItems(){const t=[0,0,0].map((()=>a("p-dropdown-menu-item",{enableHover:!1,slot:"items"},a("p-loader",{class:"h-6 w-full rounded",variant:"ghost"}))));return this.enableAutocomplete&&t.unshift(this._getAutoCompleteItem()),t}_getAutoCompleteItem(){return a("div",{class:"sticky top-0 z-10 mb-3 h-8",slot:"items"},a("p-field",{class:"block",placeholder:this.autocompletePlaceholder,value:this.query,onInputRefChange:t=>this.autocompleteInputRef=t.detail,onValueChange:t=>this._onAutoComplete(t)}))}_setMultiContainerMaxWidth(){this._inputRef&&this._multiContainerRef&&(this._multiContainerRef.style.maxWidth=Math.max(this._inputRef.clientWidth-16,16)+"px")}_setCheckSelectedItemsTimeout(){this._checkSelectedItemsTimeout&&clearTimeout(this._checkSelectedItemsTimeout),this._checkSelectedItemsTimeout=setTimeout((()=>this._checkSelectedItems()),50)}_checkSelectedItems(){if(!this._multiContainerRef)return;const t=this._multiContainerRef.getBoundingClientRect(),e=this._multiContainerRef.querySelectorAll(".item");let i=0;for(const s of e)s.classList.remove("hidden"),s.classList.add("flex"),s.getBoundingClientRect().right>t.right&&(s.classList.remove("flex"),s.classList.add("hidden"),i++);this._amountHidden=i;const s=this._multiContainerRef.querySelector(".extra");s&&(s.classList.contains("hidden")||s.classList.add("hidden"),i>0&&s.classList.remove("hidden"))}_onDropdownOpen(t){t.detail&&this.autocompleteInputRef&&setTimeout((()=>this.autocompleteInputRef.focus()),100)}_selectAllChange(){this._allSelected=!this._allSelected,this.selectAllChange.emit(this._allSelected)}_getDisplay(t,e=!1,i=!1){let s=a("div",{class:_({variant:"default",error:!!this.error?.length,enableTextWrap:this.enableTextWrap&&!e})},t[e?this.selectionDisplayKey??this.displayKey:this.displayKey]);return this.avatarKey&&(s=a("span",{class:"flex items-center gap-2"},a("p-avatar",{letters:t[this.avatarLettersKey],size:"sm",src:t[this.avatarKey]}),a("div",{class:_({variant:"default",error:!!this.error?.length,enableTextWrap:this.enableTextWrap&&!e})},t[this.dropdownDisplayKey??this.displayKey]))),!this.iconKey||e&&!this.showIconOnSelectedItem||(s=a("span",{class:"flex items-center gap-2"},t[this.iconKey]&&a("p-icon",{class:n("\n text-storm-300\n dark:text-hurricane-200\n ",e&&!this.applyClassOnSelectedItem||i&&!this.applyClassOnSelectedItemInMenu?"":t?.[this.iconClassKey]??""),variant:t[this.iconKey]}),a("div",{class:_({variant:"default",error:!!this.error?.length,enableTextWrap:this.enableTextWrap&&!e})},t[this.dropdownDisplayKey??this.displayKey]))),e&&!this.applyClassOnSelectedItem||i&&!this.applyClassOnSelectedItemInMenu||!t?.[this.classKey]?.length?s:a("div",{class:t[this.classKey]},s)}_getParsedItems(t=!0){if(!this.items||this.loading)return[];let e="string"==typeof this.items?JSON.parse(this.items):this.items;return"string"==typeof e?.[0]&&(this.displayKey="text",this.valueKey="value",e=e.map((t=>({value:t,text:t})))),this.query?.length&&!this.asyncFilter&&(e=e.filter((t=>this.queryKey?this._checkvalue(this.queryKey,t):this._checkvalue(this._identifierKey,t)||this._checkvalue(this.displayKey,t)))),t?e?.slice(0,this.maxDisplayedItems):e}static get formAssociated(){return!0}static get watchers(){return{value:[{_valueChange:0}],items:[{itemChanges:0}],_showDropdown:[{_showDropdownChanges:0}],multi:[{multiChanges:0}]}}static get style(){return"*{box-sizing:border-box}:host{--tw-translate-y:0px!important;--tw-translate-x:0px!important}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.static{position:static}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.z-10{z-index:10}.mb-3{margin-bottom:.75rem}.block{display:block}.flex{display:flex}.hidden{display:none}.h-6{height:1.5rem}.h-8{height:2rem}.h-\\[1\\.625rem\\]{height:1.625rem}.h-full{height:100%}.w-6{width:1.5rem}.w-full{width:100%}.min-w-0{min-width:0}.flex-1{flex:1 1 0%}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.overflow-hidden{overflow:hidden}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.bg-indigo-100{--tw-bg-opacity:1;background-color:rgb(227 236 254/var(--tw-bg-opacity,1))}.p-2{padding:.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.text-center{text-align:center}.text-start{text-align:start}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-semibold{font-weight:600}.text-indigo-500{--tw-text-opacity:1;color:rgb(142 179 251/var(--tw-text-opacity,1))}.text-indigo-600{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity,1))}.text-negative-red-700{--tw-text-opacity:1;color:rgb(147 16 16/var(--tw-text-opacity,1))}.text-storm-100{--tw-text-opacity:1;color:rgb(209 210 212/var(--tw-text-opacity,1))}.text-storm-300{--tw-text-opacity:1;color:rgb(116 120 127/var(--tw-text-opacity,1))}.text-storm-400{--tw-text-opacity:1;color:rgb(70 75 84/var(--tw-text-opacity,1))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.group\\/button:hover .group-hover\\/button\\:text-negative-red-800{--tw-text-opacity:1;color:rgb(141 16 16/var(--tw-text-opacity,1))}.group\\/item:hover .group-hover\\/item\\:text-indigo-800{--tw-text-opacity:1;color:rgb(27 88 210/var(--tw-text-opacity,1))}.dark\\:bg-white\\/15:where(:host([data-theme=dark]),:host([data-theme=dark]) *){background-color:hsla(0,0%,100%,.15)}.dark\\:text-hurricane-200:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(163 165 169/var(--tw-text-opacity,1))}.dark\\:text-negative-red-alternative:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(255 92 92/var(--tw-text-opacity,1))}.dark\\:text-white:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:text-white\\/15:where(:host([data-theme=dark]),:host([data-theme=dark]) *){color:hsla(0,0%,100%,.15)}.group\\/item:hover .dark\\:group-hover\\/item\\:text-white:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:bg-white\\/15:where([data-theme=dark],[data-theme=dark] *){background-color:hsla(0,0%,100%,.15)}.dark\\:text-hurricane-200:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(163 165 169/var(--tw-text-opacity,1))}.dark\\:text-negative-red-alternative:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(255 92 92/var(--tw-text-opacity,1))}.dark\\:text-white:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:text-white\\/15:where([data-theme=dark],[data-theme=dark] *){color:hsla(0,0%,100%,.15)}.group\\/item:hover .dark\\:group-hover\\/item\\:text-white:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}"}},[576,"p-select",{items:[1],multi:[516],strategy:[1],icon:[1],query:[1],placeholder:[1],autocompletePlaceholder:[1,"autocomplete-placeholder"],value:[8],displayKey:[1,"display-key"],dropdownDisplayKey:[1,"dropdown-display-key"],selectionDisplayKey:[1,"selection-display-key"],valueKey:[1,"value-key"],avatarKey:[1,"avatar-key"],iconKey:[1,"icon-key"],iconClassKey:[1,"icon-class-key"],showIconOnSelectedItem:[1,"show-icon-on-selected-item"],classKey:[1,"class-key"],applyClassOnSelectedItem:[4,"apply-class-on-selected-item"],applyClassOnSelectedItemInMenu:[4,"apply-class-on-selected-item-in-menu"],avatarLettersKey:[1,"avatar-letters-key"],identifierKey:[1,"identifier-key"],queryKey:[1,"query-key"],autoSelectFirst:[4,"auto-select-first"],showChevron:[4,"show-chevron"],maxDisplayedItems:[2,"max-displayed-items"],enableAutocomplete:[4,"enable-autocomplete"],enableTextWrap:[4,"enable-text-wrap"],asyncFilter:[4,"async-filter"],loading:[4],enableSelectAll:[4,"enable-select-all"],selectAllText:[1,"select-all-text"],selectAllIcon:[1,"select-all-icon"],size:[1],prefix:[1],label:[1],helper:[1],required:[516],showOptional:[516,"show-optional"],error:[513],disabled:[516],showAddItem:[4,"show-add-item"],addItemText:[1,"add-item-text"],emptyStateText:[1,"empty-state-text"],_showDropdown:[32],_selectedItem:[32],_allSelected:[32],_amountHidden:[32]},[[6,"click","documentClickHandler"]],{value:[{_valueChange:0}],items:[{itemChanges:0}],_showDropdown:[{_showDropdownChanges:0}],multi:[{multiChanges:0}]}]);function S(){"undefined"!=typeof customElements&&["p-select","p-avatar","p-button","p-checkbox","p-dropdown","p-dropdown-menu-container","p-dropdown-menu-item","p-field","p-field-container","p-helper","p-icon","p-loader","p-tooltip"].forEach((e=>{switch(e){case"p-select":customElements.get(t(e))||customElements.define(t(e),I);break;case"p-avatar":customElements.get(t(e))||c();break;case"p-button":customElements.get(t(e))||d();break;case"p-checkbox":customElements.get(t(e))||p();break;case"p-dropdown":customElements.get(t(e))||m();break;case"p-dropdown-menu-container":customElements.get(t(e))||u();break;case"p-dropdown-menu-item":customElements.get(t(e))||w();break;case"p-field":customElements.get(t(e))||y();break;case"p-field-container":customElements.get(t(e))||x();break;case"p-helper":customElements.get(t(e))||g();break;case"p-icon":customElements.get(t(e))||v();break;case"p-loader":customElements.get(t(e))||f();break;case"p-tooltip":customElements.get(t(e))||b()}}))}S();const T=I,A=S;export{T as PSelect,A as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as o,d as s}from"./p-
|
|
1
|
+
import{T as o,d as s}from"./p-COFt46UN.js";const t=o,p=s;export{t as PTableFooter,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as o,d as s}from"./p-
|
|
1
|
+
import{T as o,d as s}from"./p-DKnCWy7F.js";const p=o,r=s;export{p as PTableHeader,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as i,c as s,h as a,d as o}from"./p-CySg37XO.js";import{f as n,g as l}from"./p-CwQG70_4.js";import{f as r}from"./p-WEZng7dj.js";import{f as c}from"./p-CWO2YJCh.js";import{c as h}from"./p-xs4N_Y-0.js";import{P as p,a as d,T as m}from"./p-CEaB2BT0.js";import{d as u}from"./p-Crasy6LB.js";import{d as b}from"./p-CeySqTb3.js";import{d as f}from"./p-D-y3A1iZ.js";import{d as g}from"./p-DP6H82uQ.js";import{d as w}from"./p-BtliZ0U_.js";import{d as k}from"./p-BtH8h7p9.js";import{d as y}from"./p-rXG9U1a1.js";import{d as S}from"./p-DlMZf72T.js";import{d as _}from"./p-IbAvjZ3P.js";import{d as x}from"./p-C1irPVgy.js";import{d as C}from"./p-CyL9rHm8.js";import{d as v}from"./p-BruraPn4.js";import{d as E}from"./p-BKt8zLAB.js";import{d as A}from"./p-Dk5Jl6vH.js";import{d as j}from"./p-CMmvAq1F.js";import{d as F}from"./p-D8faiybE.js";import{d as R}from"./p-D0Af7BtI.js";import{d as D}from"./p-DmlFVaBd.js";import{d as z}from"./p-BBAR0LE7.js";import{d as B}from"./p-BtWP9QJR.js";import{d as L}from"./p-DDV-lx3_.js";import{d as T}from"./p-nOG0jGaD.js";import{d as H}from"./p-CTQuFuDk.js";import{d as P}from"./p-CtAGaRd5.js";import{d as I}from"./p-BwzYUgjx.js";import{d as q}from"./p-B7iPzLJ1.js";import{d as O}from"./p-MeQ48Q-1.js";import{d as Q}from"./p-qeQ4j6y4.js";import{d as M}from"./p-2yaxaWU2.js";const U=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.selectedRowsChange=s(this,"selectedRowsChange",3),this.rowClick=s(this,"rowClick",3),this.rowSelected=s(this,"rowSelected",3),this.rowDeselected=s(this,"rowDeselected",3),this.hasRendered=s(this,"hasRendered",3),this.quickFilter=s(this,"quickFilter",3),this.queryChange=s(this,"queryChange",3),this.filter=s(this,"filter",3),this.action=s(this,"action",3),this.pageChange=s(this,"pageChange",3),this.pageSizeChange=s(this,"pageSizeChange",3),this.export=s(this,"export",3),this.emptyStateActionClick=s(this,"emptyStateActionClick",3)}items;loading=!1;headerLoading=!1;footerLoading=!1;amountOfLoadingRows=6;enableRowSelection=!0;rowSelectionLimit;enableRowClick=!0;selectedRows=[];enableFloatingMenu=!0;floatingMenuAmountSelectedTemplate=t=>n((1===t?this._locales.floating_menu?.amount_selected:this._locales.floating_menu?.amount_selected_plural)?.replace("{{amount}}",t));selectedRowsChange;selectionKey;canSelectKey;rowClick;rowSelected;rowDeselected;hasRendered;enableHeader=!0;quickFilters=[];activeQuickFilterIdentifier;enableSearch=!0;query;enableFilter=!0;enableFilterDesktop=!0;selectedFiltersAmount;filterButtonTemplate;enableAction=!1;actionButtonLoading=!1;actionButtonEnabled=!1;actionButtonIcon="pencil";actionButtonText;actionButtonTemplate;quickFilter;queryChange;filter;action;enableFooter=!0;enablePaginationSize=!0;enablePaginationPages=!0;enableExport=!0;page=1;total;pageChange;pageSize=p;pageSizeOptions=d;pageSizeChange;export;hideOnSinglePage=!0;emptyStateHeader=()=>n(this._locales.empty_state?.no_filter.header);emptyStateContent=()=>n(this._locales.empty_state?.no_filter.content);emptyStateAction=()=>n(this._locales.empty_state?.no_filter.action);enableEmptyStateAction=!0;emptyStateFilteredHeader=()=>n(this._locales.empty_state.filtered.header);emptyStateFilteredContent=()=>n(this._locales.empty_state.filtered.content);emptyStateActionClick;shadow=!0;get _el(){return this}_locales={};_extraHeaders=[];_columns=[];_items=[];_enableRowSelection=this.enableRowSelection;_rowSelectionLimit;_rowActionsFloatingAll=[];_rowActionsFloating=[];_rowActionsRow=[];_footerHidden=!1;_ctrlDown=!1;_hasCustomFilterSlot=!1;_hasCustomActionsSlot=!1;_floatingMenuShown=!1;_resizeTimeout;componentWillLoad(){this._hasCustomFilterSlot=!!this._el.querySelector(':scope > [slot="custom-filter"]'),this._hasCustomActionsSlot=!!this._el.querySelector(':scope > [slot="custom-actions"]'),this._setRowSelectionData(),this._setLocales(),this._parseItems(this.items),this._generateExtraHeaders(),this._generateColumns()}componentDidRender(){this.hasRendered.emit()}render(){return a(o,{key:"7ece1479d7c90b408fa55f045feba734f9e27b28",class:"z-0 flex flex-col"},a("p-table-container",{key:"290cf20abdacab6257ebef5479b834df529bccbd"},this.enableHeader&&a("p-table-header",{key:"6a1af71c86b2b23d26d8d344b1528b1356d7bd7b",actionButtonTemplate:this.actionButtonTemplate,actionIcon:this.actionButtonIcon,actionLoading:this.actionButtonLoading,actionText:this.actionButtonText,activeQuickFilterIdentifier:this.activeQuickFilterIdentifier,canUseAction:this.actionButtonEnabled,class:"mb-8",enableAction:this.enableAction,enableExport:this.enableExport,enableFilter:this.enableFilter,enableFilterDesktop:this.enableFilterDesktop,enableSearch:this.enableSearch,filterButtonTemplate:this.filterButtonTemplate,itemsSelectedAmount:this.selectedRows?.length,loading:this.headerLoading,query:this.query,quickFilters:this.quickFilters,selectedFiltersAmount:this.selectedFiltersAmount,onAction:()=>this.action.emit(),onExport:()=>this.export.emit(),onFilter:()=>this.filter.emit(),onQueryChange:({detail:t})=>this.queryChange.emit(t),onQuickFilter:({detail:t})=>this.quickFilter.emit(t)},this._hasCustomFilterSlot&&a("slot",{key:"6bfe4727050ba7d6a3e6e280cc1c467259b9166b",name:"custom-filter",slot:"custom-filter"}),this._hasCustomActionsSlot&&a("slot",{key:"da4f2aea31f0daa62749393a0390219fa4342b20",name:"custom-actions",slot:"custom-actions"})),this._getExtraHeader(),this._getHeader(),a("div",{key:"799d65d57bf36a924ff40e6cb9416c4be0da4eaf",class:"flex flex-1 flex-col"},this._getRows(),a("slot",{key:"b0060fa16edf49898787df195c86a35adf397798",name:"custom-rows"})),this.enableFloatingMenu&&this._enableRowSelection?a("p-floating-menu-container",{amount:this.selectedRows?.length,amountSelectedTemplate:this.floatingMenuAmountSelectedTemplate,class:r({hasFooter:this.enableFooter&&!this._footerHidden,active:!!this.selectedRows?.length,shown:this._floatingMenuShown}),enableAmountSelected:!!this._rowActionsFloating?.length,usedInTable:!0,onClose:()=>this._selectAllChange(null,!1)},this._rowActionsFloating?.length&&this._rowActionsFloating.map((t=>a("p-floating-menu-item",{disabled:t.disabled,icon:t.icon,iconFlip:t.iconFlip,iconRotate:t.iconRotate,loading:t.loading,slot:"floating-menu-item",onClick:()=>t.disabled||t.loading||!t.action||"single"!==t.type?t.action(this.selectedRows,!0):t.action(this.selectedRows[0],!1)},t.label)))):"",this.enableFooter&&a("p-table-footer",{key:"57d24f1f3803e58053eba3da5fad1ab6474eccc6",enablePaginationPages:this.enablePaginationPages,enablePaginationSize:this.enablePaginationSize,hideOnSinglePage:this.hideOnSinglePage,loading:this.footerLoading,page:this.page,pageSize:this.pageSize,pageSizeOptions:this.pageSizeOptions,tableHeaderHasAction:this.enableHeader&&this.enableAction&&this.actionButtonEnabled,total:this.total,onHiddenChange:({detail:t})=>this._footerHidden=t,onPageChange:({detail:t})=>this.pageChange.emit(t),onPageSizeChange:({detail:t})=>this.pageSizeChange.emit(t)})))}async _setLocales(){this._locales=await l(this._el)}onTableDefinitionUpdated(){this._generateColumns()}keyDown({key:t}){"Control"===t&&!0!==this._ctrlDown&&(this._ctrlDown=!0)}keyUp({key:t}){"Control"===t&&!1!==this._ctrlDown&&(this._ctrlDown=!1)}visibilityChange(){"hidden"===document.visibilityState&&!1!==this._ctrlDown&&(this._ctrlDown=!1)}_parseItems(t){this._items=t?Array.isArray(t)?t:JSON.parse(t):[]}_setRowSelectionData(){this._resizeTimeout&&clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout((()=>{const t=c(),e=[...this._el.querySelectorAll(":scope > p-table-row-action")];this._rowActionsRow=e.filter((t=>"both"===t.type||"single"===t.type)),this._rowActionsFloatingAll=e.filter((e=>this.enableRowSelection&&("both"===e.type||"multi"===e.type)||t&&"single"===e.type)).map((t=>("single"===t.type&&(t.disabled=this.selectedRows?.length>1),t)));let i=this.rowSelectionLimit;t&&this._rowActionsFloatingAll?.length&&(void 0!==i&&this.enableRowSelection||!this.enableRowSelection)&&(i=1),this._rowSelectionLimit=i;let s=this.enableRowSelection;t&&this._rowActionsFloatingAll?.length&&!s&&(s=!0),this._enableRowSelection=s,this._floatingMenuShown&&this._showFloatingMenu()}),200)}_generateExtraHeaders(){let t=[...this._el.querySelectorAll("p-table-extra-header")];t=this._parseDefinitions(t),this._extraHeaders=t}_generateColumns(){let t=[...this._el.querySelectorAll("p-table-column")];t=this._parseDefinitions(t),this._columns=t}_getExtraHeader(){return this._extraHeaders?.length?a("p-table-row",{isLast:!0,variant:"header-secondary"},this._extraHeaders.map(((t,e)=>a("p-table-cell",{checkboxOffset:0===e&&this._enableRowSelection,definition:t,index:e,variant:"header-secondary"},a("b",null,t.name))))):null}_getHeader(){return a("p-table-row",{variant:"header"},this._columns.map(((t,e)=>a("p-table-cell",{checkbox:0===e||t.hasCheckbox?this._getCheckbox(null,this.loading?"loading":"header"):null,definition:t,index:e,value:t.name,variant:"header"}))))}_getRows(){return this.loading?Array.from({length:this.amountOfLoadingRows},((t,e)=>a("p-table-row",{enableHover:this._enableRowSelection||this.enableRowClick,isLast:e===this.amountOfLoadingRows-1},this._getLoadingColumns(e)))):0===this._items.length?this._getEmptyState():this._items.map(((t,e)=>a("p-table-row",{checked:this._selectionContains(e),enableHover:this._enableRowSelection||this.enableRowClick,isLast:e===this._items.length-1,onClick:t=>this._rowClick(t,e)},this._getRowColumns(t,e),this._getActions(t,e))))}_getActions(t,e){const i=this._rowActionsRow.filter((e=>!e.showFunction||e.showFunction(t)));return i?.length&&!c()?a("p-table-row-actions-container",{checked:this._selectionContains(e),slot:"actions"},i.map((e=>a("p-tooltip",{content:e.label,strategy:"fixed"},a("p-button",{icon:e.icon,iconFlip:e.iconFlip,iconOnly:!0,iconRotate:e.iconRotate,size:"sm",slot:"trigger",variant:"secondary","data-is-action":!0,onClick:()=>"function"==typeof e.action&&e.action?.(t,!1)}))))):null}_getRowColumns(t,e){return this._columns.map(((i,s)=>a("p-table-cell",{checkbox:0===s||i.hasCheckbox?this._getCheckbox(e):null,definition:i,index:s,item:t,rowIndex:e})))}_getLoadingColumns(t){return this._columns.map(((e,i)=>a("p-table-cell",{checkbox:0===i||e.hasCheckbox?this._getCheckbox(t,"loading"):null,definition:e,index:i,rowIndex:t,variant:"loading"})))}_getCheckbox(t,e="default"){if(!this._enableRowSelection||!this.selectionKey&&!this._rowActionsFloating?.length)return;if("loading"===e)return a("p-loader",{class:"h-6 w-6 rounded",variant:"ghost"});if("header"===e)return a("p-checkbox",{checked:this._selectionContainsAll(),class:h({"opacity-0":void 0!==this._rowSelectionLimit}),disabled:void 0!==this._rowSelectionLimit,indeterminate:this._selectionIndeterminate(),onCheckedChange:t=>this._selectAllChange(t)});const i=this._items[t],s=this._selectionContains(t);return a("p-checkbox",{checked:s,class:"flex-shrink-0",disabled:this.canSelectKey&&!i[this.canSelectKey]||void 0!==this._rowSelectionLimit&&!s&&this.selectedRows.length===this._rowSelectionLimit,onCheckedChange:e=>this._checkboxChange(e,t)})}_getEmptyState(){return a("p-empty-state",this.query?.length||this.selectedFiltersAmount?{class:"my-16 self-center",content:this.emptyStateFilteredContent(),header:this.emptyStateFilteredHeader(),illustration:"search"}:{actionIcon:"plus",actionText:this.emptyStateAction(),class:"my-16 self-center",content:this.emptyStateContent(),enableAction:this.enableEmptyStateAction,header:this.emptyStateHeader(),illustration:"table",onAction:()=>this.enableAction&&this.action.emit()})}_selectAllChange(t,e){if(this._enableRowSelection){if(void 0===e?t?.detail??e:e){const t=[];for(let e=0;e<this._items.length;e++){const i=this._items[e];if((!this.canSelectKey||i[this.canSelectKey])&&!this._selectionContains(e)&&(t.push(i),this.rowSelected.emit(i),void 0!==this._rowSelectionLimit&&this.selectedRows.length+t.length===this._rowSelectionLimit))break}return this.selectedRows=[...this.selectedRows,...t],this.selectedRowsChange.emit(this.selectedRows),void(this.enableFloatingMenu&&!this._floatingMenuShown&&this._showFloatingMenu())}for(let t=0;t<this.selectedRows.length;t++){const e=this.selectedRows[t],i=this._items.find((i=>this._getSelectionValue(i,t)===this._getSelectionValue(e,t)));i&&this.rowDeselected.emit(i)}this.selectedRows=[],this.selectedRowsChange.emit(this.selectedRows)}}_checkboxChange({detail:t,target:e},i){if(!this._enableRowSelection)return;if(t&&void 0!==this._rowSelectionLimit&&this.selectedRows.length>=this._rowSelectionLimit)return void(e.checked=!1);const s=this._items[i];if(this.canSelectKey&&!s[this.canSelectKey])return void(e.checked=!1);if(t)return this.selectedRows=[...this.selectedRows,{...s,index:i}],this.selectedRowsChange.emit(this.selectedRows),this.rowSelected.emit(s),void(this.enableFloatingMenu&&!this._floatingMenuShown&&this._showFloatingMenu());const a=this._selectionContains(i,!0),o=[...this.selectedRows];o.splice(a,1),this.selectedRows=o,this.selectedRowsChange.emit(this.selectedRows),this.rowDeselected.emit(s)}_getSelectionValue(t,e){return this.selectionKey&&t?.[this.selectionKey]||e}_selectionContains(t,e=!1){const i=this.selectedRows.findIndex((e=>e.index===t));return e?i:-1!==i}_selectionContainsAll(){let t=!0;if(!this._items?.length)return!1;if(void 0!==this._rowSelectionLimit&&this.selectedRows.length===this._rowSelectionLimit)return!0;for(let e=0;e<this._items?.length;e++)if(!this._selectionContains(e)){t=!1;break}return t}_selectionIndeterminate(){if(!this._items?.length||!this.selectedRows?.length)return!1;if(void 0!==this._rowSelectionLimit&&this.selectedRows.length===this._rowSelectionLimit)return!1;let t=0;for(let e=0;e<this._items?.length;e++)this._selectionContains(e)&&t++;return t>0&&t!==this._items.length}_rowClick(t,e){const i=t.target;if("input"===i.tagName.toLowerCase()||"checkbox"===i.type)return;const s=this._findRow(t.target);if(this._findRowAction(t.target))return;if(this.enableRowClick)return void this.rowClick.emit({item:this._items[e],ctrlDown:this._ctrlDown});if(!this._enableRowSelection)return;const a=s?.querySelector('input[type="checkbox"]');a&&(a.checked=!a.checked,this._checkboxChange(a,e))}_findRow(t){return t?"p-table-row"===t?.tagName?.toLowerCase()?t:this._findRow(t?.parentElement):t}_findRowAction(t){return t?null!==t.dataset.isAction&&"false"!==t.dataset.isAction?t:"p-table-row"===t?.tagName?.toLowerCase()?null:this._findRowAction(t?.parentElement):null}_showFloatingMenu(){let t=this._rowActionsFloatingAll;1===this.rowSelectionLimit&&t.some((t=>("single"===t.type||"both"===t.type)&&t.showFunction))&&(t=t.filter((t=>"multi"===t.type||!t.showFunction||t.showFunction(this.selectedRows[0])))),this._rowActionsFloating=t,this._floatingMenuShown=!0}_parseDefinitions(t){return t.map((t=>this._parseDefinitionSizes(t)))}_parseDefinitionSizes(t){const e=t;let i={default:"full"};"string"!=typeof t.sizes||["auto","hidden","full"].includes(t.sizes)||(t.sizes=JSON.parse(t.sizes));for(const[t,s]of m.entries())i[s]="auto"!==e.sizes&&"hidden"!==e.sizes&&"full"!==e.sizes&&"number"!=typeof e.sizes?e.sizes[s]??i[m[t-1]]:"auto"===e.sizes?"full":e.sizes;return t.parsedSizes=i,t}static get watchers(){return{items:[{_parseItems:0}],enableRowSelection:[{_setRowSelectionData:0}],rowSelectionLimit:[{_setRowSelectionData:0}],selectedRows:[{_setRowSelectionData:0}]}}static get style(){return"*{box-sizing:border-box}.static{position:static}.fixed{position:fixed}.z-0{z-index:0}.my-16{margin-bottom:4rem;margin-top:4rem}.mb-8{margin-bottom:2rem}.flex{display:flex}.table{display:table}.hidden{display:none}.h-6{height:1.5rem}.w-6{width:1.5rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.resize{resize:both}.flex-col{flex-direction:column}.self-center{align-self:center}.rounded{border-radius:.25rem}.opacity-0{opacity:0}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}"}},[772,"p-table",{items:[1],loading:[4],headerLoading:[4,"header-loading"],footerLoading:[4,"footer-loading"],amountOfLoadingRows:[2,"amount-of-loading-rows"],enableRowSelection:[4,"enable-row-selection"],rowSelectionLimit:[2,"row-selection-limit"],enableRowClick:[4,"enable-row-click"],selectedRows:[16],enableFloatingMenu:[4,"enable-floating-menu"],floatingMenuAmountSelectedTemplate:[16],selectionKey:[1,"selection-key"],canSelectKey:[1,"can-select-key"],enableHeader:[4,"enable-header"],quickFilters:[1,"quick-filters"],activeQuickFilterIdentifier:[1,"active-quick-filter-identifier"],enableSearch:[4,"enable-search"],query:[1025],enableFilter:[4,"enable-filter"],enableFilterDesktop:[4,"enable-filter-desktop"],selectedFiltersAmount:[2,"selected-filters-amount"],filterButtonTemplate:[16],enableAction:[4,"enable-action"],actionButtonLoading:[4,"action-button-loading"],actionButtonEnabled:[4,"action-button-enabled"],actionButtonIcon:[1,"action-button-icon"],actionButtonText:[1,"action-button-text"],actionButtonTemplate:[16],enableFooter:[4,"enable-footer"],enablePaginationSize:[4,"enable-pagination-size"],enablePaginationPages:[4,"enable-pagination-pages"],enableExport:[4,"enable-export"],page:[1538],total:[2],pageSize:[2,"page-size"],pageSizeOptions:[16],hideOnSinglePage:[4,"hide-on-single-page"],emptyStateHeader:[16],emptyStateContent:[16],emptyStateAction:[16],enableEmptyStateAction:[4,"enable-empty-state-action"],emptyStateFilteredHeader:[16],emptyStateFilteredContent:[16],shadow:[4],_locales:[32],_extraHeaders:[32],_columns:[32],_items:[32],_enableRowSelection:[32],_rowSelectionLimit:[32],_rowActionsFloating:[32],_rowActionsRow:[32],_footerHidden:[32]},[[16,"localeChanged","_setLocales"],[16,"tableDefinitionChanged","onTableDefinitionUpdated"],[4,"keydown","keyDown"],[4,"keyup","keyUp"],[4,"visibilitychange","visibilityChange"],[9,"resize","_setRowSelectionData"]],{items:[{_parseItems:0}],enableRowSelection:[{_setRowSelectionData:0}],rowSelectionLimit:[{_setRowSelectionData:0}],selectedRows:[{_setRowSelectionData:0}]}]);function J(){"undefined"!=typeof customElements&&["p-table","p-badge","p-button","p-checkbox","p-divider","p-dropdown","p-dropdown-menu-container","p-dropdown-menu-item","p-empty-state","p-field","p-field-container","p-floating-menu-container","p-floating-menu-item","p-helper","p-icon","p-illustration","p-loader","p-pagination","p-pagination-pages","p-pagination-pages-item","p-pagination-size","p-segment-container","p-segment-item","p-table-cell","p-table-container","p-table-footer","p-table-header","p-table-row","p-table-row-actions-container","p-tooltip"].forEach((e=>{switch(e){case"p-table":customElements.get(t(e))||customElements.define(t(e),U);break;case"p-badge":customElements.get(t(e))||u();break;case"p-button":customElements.get(t(e))||b();break;case"p-checkbox":customElements.get(t(e))||f();break;case"p-divider":customElements.get(t(e))||g();break;case"p-dropdown":customElements.get(t(e))||w();break;case"p-dropdown-menu-container":customElements.get(t(e))||k();break;case"p-dropdown-menu-item":customElements.get(t(e))||y();break;case"p-empty-state":customElements.get(t(e))||S();break;case"p-field":customElements.get(t(e))||_();break;case"p-field-container":customElements.get(t(e))||x();break;case"p-floating-menu-container":customElements.get(t(e))||C();break;case"p-floating-menu-item":customElements.get(t(e))||v();break;case"p-helper":customElements.get(t(e))||E();break;case"p-icon":customElements.get(t(e))||A();break;case"p-illustration":customElements.get(t(e))||j();break;case"p-loader":customElements.get(t(e))||F();break;case"p-pagination":customElements.get(t(e))||R();break;case"p-pagination-pages":customElements.get(t(e))||D();break;case"p-pagination-pages-item":customElements.get(t(e))||z();break;case"p-pagination-size":customElements.get(t(e))||B();break;case"p-segment-container":customElements.get(t(e))||L();break;case"p-segment-item":customElements.get(t(e))||T();break;case"p-table-cell":customElements.get(t(e))||H();break;case"p-table-container":customElements.get(t(e))||P();break;case"p-table-footer":customElements.get(t(e))||I();break;case"p-table-header":customElements.get(t(e))||q();break;case"p-table-row":customElements.get(t(e))||O();break;case"p-table-row-actions-container":customElements.get(t(e))||Q();break;case"p-tooltip":customElements.get(t(e))||M()}}))}J();const G=U,K=J;export{G as PTable,K as defineCustomElement}
|
|
1
|
+
import{t,p as e,H as i,c as s,h as o,d as a}from"./p-CySg37XO.js";import{f as n,g as l}from"./p-CwQG70_4.js";import{f as r}from"./p-WEZng7dj.js";import{f as h}from"./p-CWO2YJCh.js";import{c}from"./p-xs4N_Y-0.js";import{P as p,a as d,T as m}from"./p-CEaB2BT0.js";import{d as u}from"./p-Crasy6LB.js";import{d as b}from"./p-AkD55vN_.js";import{d as f}from"./p-ShAy0ruV.js";import{d as g}from"./p-DP6H82uQ.js";import{d as w}from"./p-BtliZ0U_.js";import{d as k}from"./p-BtH8h7p9.js";import{d as y}from"./p-DlQumf-0.js";import{d as S}from"./p-BAvGAs2F.js";import{d as _}from"./p-Dy1wXwZf.js";import{d as x}from"./p-Cr_WB0kg.js";import{d as C}from"./p-DT72kk3I.js";import{d as v}from"./p-BmU3MAfH.js";import{d as E}from"./p-SYK2C-7G.js";import{d as A}from"./p-aZcUXH1b.js";import{d as F}from"./p-CMmvAq1F.js";import{d as j}from"./p-D8faiybE.js";import{d as R}from"./p-CtxKjhiD.js";import{d as D}from"./p-NEqovphH.js";import{d as z}from"./p-BBAR0LE7.js";import{d as B}from"./p-D8FhwO0Q.js";import{d as L}from"./p-DDV-lx3_.js";import{d as H}from"./p-DR1auS78.js";import{d as T}from"./p-CTQuFuDk.js";import{d as O}from"./p-CtAGaRd5.js";import{d as P}from"./p-COFt46UN.js";import{d as q}from"./p-DKnCWy7F.js";import{d as I}from"./p-MeQ48Q-1.js";import{d as Q}from"./p-qeQ4j6y4.js";import{d as U}from"./p-2yaxaWU2.js";const M=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.selectedRowsChange=s(this,"selectedRowsChange",3),this.rowClick=s(this,"rowClick",3),this.rowSelected=s(this,"rowSelected",3),this.rowDeselected=s(this,"rowDeselected",3),this.hasRendered=s(this,"hasRendered",3),this.quickFilter=s(this,"quickFilter",3),this.queryChange=s(this,"queryChange",3),this.filter=s(this,"filter",3),this.action=s(this,"action",3),this.pageChange=s(this,"pageChange",3),this.pageSizeChange=s(this,"pageSizeChange",3),this.export=s(this,"export",3),this.emptyStateActionClick=s(this,"emptyStateActionClick",3)}items;loading=!1;headerLoading=!1;footerLoading=!1;amountOfLoadingRows=6;enableRowSelection=!0;rowSelectionLimit;enableRowClick=!0;selectedRows=[];enableFloatingMenu=!0;floatingMenuAmountSelectedTemplate=t=>n((1===t?this._locales.floating_menu?.amount_selected:this._locales.floating_menu?.amount_selected_plural)?.replace("{{amount}}",t));selectedRowsChange;selectionKey;canSelectKey;rowClick;rowSelected;rowDeselected;hasRendered;enableHeader=!0;quickFilters=[];activeQuickFilterIdentifier;enableSearch=!0;query;enableFilter=!0;enableFilterDesktop=!0;selectedFiltersAmount;filterButtonTemplate;enableAction=!1;actionButtonLoading=!1;actionButtonEnabled=!1;actionButtonIcon="pencil";actionButtonText;actionButtonTemplate;quickFilter;queryChange;filter;action;enableFooter=!0;enablePaginationSize=!0;enablePaginationPages=!0;enableExport=!0;page=1;total;pageChange;pageSize=p;pageSizeOptions=d;pageSizeChange;export;hideOnSinglePage=!0;emptyStateHeader=()=>n(this._locales.empty_state?.no_filter.header);emptyStateContent=()=>n(this._locales.empty_state?.no_filter.content);emptyStateAction=()=>n(this._locales.empty_state?.no_filter.action);enableEmptyStateAction=!0;emptyStateFilteredHeader=()=>n(this._locales.empty_state.filtered.header);emptyStateFilteredContent=()=>n(this._locales.empty_state.filtered.content);emptyStateActionClick;shadow=!0;get _el(){return this}_locales={};_extraHeaders=[];_columns=[];_items=[];_enableRowSelection=this.enableRowSelection;_rowSelectionLimit;_rowActionsFloatingAll=[];_rowActionsFloating=[];_rowActionsRow=[];_footerHidden=!1;_ctrlDown=!1;_hasCustomFilterSlot=!1;_hasCustomActionsSlot=!1;_floatingMenuShown=!1;_resizeTimeout;componentWillLoad(){this._hasCustomFilterSlot=!!this._el.querySelector(':scope > [slot="custom-filter"]'),this._hasCustomActionsSlot=!!this._el.querySelector(':scope > [slot="custom-actions"]'),this._setRowSelectionData(),this._setLocales(),this._parseItems(this.items),this._generateExtraHeaders(),this._generateColumns()}componentDidRender(){this.hasRendered.emit()}render(){return o(a,{key:"7ece1479d7c90b408fa55f045feba734f9e27b28",class:"z-0 flex flex-col"},o("p-table-container",{key:"290cf20abdacab6257ebef5479b834df529bccbd"},this.enableHeader&&o("p-table-header",{key:"6a1af71c86b2b23d26d8d344b1528b1356d7bd7b",actionButtonTemplate:this.actionButtonTemplate,actionIcon:this.actionButtonIcon,actionLoading:this.actionButtonLoading,actionText:this.actionButtonText,activeQuickFilterIdentifier:this.activeQuickFilterIdentifier,canUseAction:this.actionButtonEnabled,class:"mb-8",enableAction:this.enableAction,enableExport:this.enableExport,enableFilter:this.enableFilter,enableFilterDesktop:this.enableFilterDesktop,enableSearch:this.enableSearch,filterButtonTemplate:this.filterButtonTemplate,itemsSelectedAmount:this.selectedRows?.length,loading:this.headerLoading,query:this.query,quickFilters:this.quickFilters,selectedFiltersAmount:this.selectedFiltersAmount,onAction:()=>this.action.emit(),onExport:()=>this.export.emit(),onFilter:()=>this.filter.emit(),onQueryChange:({detail:t})=>this.queryChange.emit(t),onQuickFilter:({detail:t})=>this.quickFilter.emit(t)},this._hasCustomFilterSlot&&o("slot",{key:"6bfe4727050ba7d6a3e6e280cc1c467259b9166b",name:"custom-filter",slot:"custom-filter"}),this._hasCustomActionsSlot&&o("slot",{key:"da4f2aea31f0daa62749393a0390219fa4342b20",name:"custom-actions",slot:"custom-actions"})),this._getExtraHeader(),this._getHeader(),o("div",{key:"799d65d57bf36a924ff40e6cb9416c4be0da4eaf",class:"flex flex-1 flex-col"},this._getRows(),o("slot",{key:"b0060fa16edf49898787df195c86a35adf397798",name:"custom-rows"})),this.enableFloatingMenu&&this._enableRowSelection?o("p-floating-menu-container",{amount:this.selectedRows?.length,amountSelectedTemplate:this.floatingMenuAmountSelectedTemplate,class:r({hasFooter:this.enableFooter&&!this._footerHidden,active:!!this.selectedRows?.length,shown:this._floatingMenuShown}),enableAmountSelected:!!this._rowActionsFloating?.length,usedInTable:!0,onClose:()=>this._selectAllChange(null,!1)},this._rowActionsFloating?.length&&this._rowActionsFloating.map((t=>o("p-floating-menu-item",{disabled:t.disabled,icon:t.icon,iconFlip:t.iconFlip,iconRotate:t.iconRotate,loading:t.loading,slot:"floating-menu-item",onClick:()=>t.disabled||t.loading||!t.action||"single"!==t.type?t.action(this.selectedRows,!0):t.action(this.selectedRows[0],!1)},t.label)))):"",this.enableFooter&&o("p-table-footer",{key:"57d24f1f3803e58053eba3da5fad1ab6474eccc6",enablePaginationPages:this.enablePaginationPages,enablePaginationSize:this.enablePaginationSize,hideOnSinglePage:this.hideOnSinglePage,loading:this.footerLoading,page:this.page,pageSize:this.pageSize,pageSizeOptions:this.pageSizeOptions,tableHeaderHasAction:this.enableHeader&&this.enableAction&&this.actionButtonEnabled,total:this.total,onHiddenChange:({detail:t})=>this._footerHidden=t,onPageChange:({detail:t})=>this.pageChange.emit(t),onPageSizeChange:({detail:t})=>this.pageSizeChange.emit(t)})))}async _setLocales(){this._locales=await l(this._el)}onTableDefinitionUpdated(){this._generateColumns()}keyDown({key:t}){"Control"===t&&!0!==this._ctrlDown&&(this._ctrlDown=!0)}keyUp({key:t}){"Control"===t&&!1!==this._ctrlDown&&(this._ctrlDown=!1)}visibilityChange(){"hidden"===document.visibilityState&&!1!==this._ctrlDown&&(this._ctrlDown=!1)}_parseItems(t){this._items=t?Array.isArray(t)?t:JSON.parse(t):[]}_setRowSelectionData(){this._resizeTimeout&&clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout((()=>{const t=h(),e=[...this._el.querySelectorAll(":scope > p-table-row-action")];this._rowActionsRow=e.filter((t=>"both"===t.type||"single"===t.type)),this._rowActionsFloatingAll=e.filter((e=>this.enableRowSelection&&("both"===e.type||"multi"===e.type)||t&&"single"===e.type)).map((t=>("single"===t.type&&(t.disabled=this.selectedRows?.length>1),t)));let i=this.rowSelectionLimit;t&&this._rowActionsFloatingAll?.length&&(void 0!==i&&this.enableRowSelection||!this.enableRowSelection)&&(i=1),this._rowSelectionLimit=i;let s=this.enableRowSelection;t&&this._rowActionsFloatingAll?.length&&!s&&(s=!0),this._enableRowSelection=s,this._floatingMenuShown&&this._showFloatingMenu()}),200)}_generateExtraHeaders(){let t=[...this._el.querySelectorAll("p-table-extra-header")];t=this._parseDefinitions(t),this._extraHeaders=t}_generateColumns(){let t=[...this._el.querySelectorAll("p-table-column")];t=this._parseDefinitions(t),this._columns=t}_getExtraHeader(){return this._extraHeaders?.length?o("p-table-row",{isLast:!0,variant:"header-secondary"},this._extraHeaders.map(((t,e)=>o("p-table-cell",{checkboxOffset:0===e&&this._enableRowSelection,definition:t,index:e,variant:"header-secondary"},o("b",null,t.name))))):null}_getHeader(){return o("p-table-row",{variant:"header"},this._columns.map(((t,e)=>o("p-table-cell",{checkbox:0===e||t.hasCheckbox?this._getCheckbox(null,this.loading?"loading":"header"):null,definition:t,index:e,value:t.name,variant:"header"}))))}_getRows(){return this.loading?Array.from({length:this.amountOfLoadingRows},((t,e)=>o("p-table-row",{enableHover:this._enableRowSelection||this.enableRowClick,isLast:e===this.amountOfLoadingRows-1},this._getLoadingColumns(e)))):0===this._items.length?this._getEmptyState():this._items.map(((t,e)=>o("p-table-row",{checked:this._selectionContains(e),enableHover:this._enableRowSelection||this.enableRowClick,isLast:e===this._items.length-1,onClick:t=>this._rowClick(t,e)},this._getRowColumns(t,e),this._getActions(t,e))))}_getActions(t,e){const i=this._rowActionsRow.filter((e=>!e.showFunction||e.showFunction(t)));return i?.length&&!h()?o("p-table-row-actions-container",{checked:this._selectionContains(e),slot:"actions"},i.map((e=>o("p-tooltip",{content:e.label,strategy:"fixed"},o("p-button",{icon:e.icon,iconFlip:e.iconFlip,iconOnly:!0,iconRotate:e.iconRotate,size:"sm",slot:"trigger",variant:"secondary","data-is-action":!0,onClick:()=>"function"==typeof e.action&&e.action?.(t,!1)}))))):null}_getRowColumns(t,e){return this._columns.map(((i,s)=>o("p-table-cell",{checkbox:0===s||i.hasCheckbox?this._getCheckbox(e):null,definition:i,index:s,item:t,rowIndex:e})))}_getLoadingColumns(t){return this._columns.map(((e,i)=>o("p-table-cell",{checkbox:0===i||e.hasCheckbox?this._getCheckbox(t,"loading"):null,definition:e,index:i,rowIndex:t,variant:"loading"})))}_getCheckbox(t,e="default"){if(!this._enableRowSelection||!this.selectionKey&&!this._rowActionsFloating?.length)return;if("loading"===e)return o("p-loader",{class:"h-6 w-6 rounded",variant:"ghost"});if("header"===e)return o("p-checkbox",{checked:this._selectionContainsAll(),class:c({"opacity-0":void 0!==this._rowSelectionLimit}),disabled:void 0!==this._rowSelectionLimit,indeterminate:this._selectionIndeterminate(),onCheckedChange:t=>this._selectAllChange(t)});const i=this._items[t],s=this._selectionContains(t);return o("p-checkbox",{checked:s,class:"flex-shrink-0",disabled:this.canSelectKey&&!i[this.canSelectKey]||void 0!==this._rowSelectionLimit&&!s&&this.selectedRows.length===this._rowSelectionLimit,onCheckedChange:e=>this._checkboxChange(e,t)})}_getEmptyState(){return o("p-empty-state",this.query?.length||this.selectedFiltersAmount?{class:"my-16 self-center",content:this.emptyStateFilteredContent(),header:this.emptyStateFilteredHeader(),illustration:"search"}:{actionIcon:"plus",actionText:this.emptyStateAction(),class:"my-16 self-center",content:this.emptyStateContent(),enableAction:this.enableEmptyStateAction,header:this.emptyStateHeader(),illustration:"table",onAction:()=>this.enableAction&&this.action.emit()})}_selectAllChange(t,e){if(this._enableRowSelection){if(void 0===e?t?.detail??e:e){const t=[];for(let e=0;e<this._items.length;e++){const i=this._items[e];if((!this.canSelectKey||i[this.canSelectKey])&&!this._selectionContains(e)&&(t.push(i),this.rowSelected.emit(i),void 0!==this._rowSelectionLimit&&this.selectedRows.length+t.length===this._rowSelectionLimit))break}return this.selectedRows=[...this.selectedRows,...t],this.selectedRowsChange.emit(this.selectedRows),void(this.enableFloatingMenu&&!this._floatingMenuShown&&this._showFloatingMenu())}for(let t=0;t<this.selectedRows.length;t++){const e=this.selectedRows[t],i=this._items.find((i=>this._getSelectionValue(i,t)===this._getSelectionValue(e,t)));i&&this.rowDeselected.emit(i)}this.selectedRows=[],this.selectedRowsChange.emit(this.selectedRows)}}_checkboxChange({detail:t,target:e},i){if(!this._enableRowSelection)return;if(t&&void 0!==this._rowSelectionLimit&&this.selectedRows.length>=this._rowSelectionLimit)return void(e.checked=!1);const s=this._items[i];if(this.canSelectKey&&!s[this.canSelectKey])return void(e.checked=!1);if(t)return this.selectedRows=[...this.selectedRows,{...s,index:i}],this.selectedRowsChange.emit(this.selectedRows),this.rowSelected.emit(s),void(this.enableFloatingMenu&&!this._floatingMenuShown&&this._showFloatingMenu());const o=this._selectionContains(i,!0),a=[...this.selectedRows];a.splice(o,1),this.selectedRows=a,this.selectedRowsChange.emit(this.selectedRows),this.rowDeselected.emit(s)}_getSelectionValue(t,e){return this.selectionKey&&t?.[this.selectionKey]||e}_selectionContains(t,e=!1){const i=this.selectedRows.findIndex((e=>e.index===t));return e?i:-1!==i}_selectionContainsAll(){let t=!0;if(!this._items?.length)return!1;if(void 0!==this._rowSelectionLimit&&this.selectedRows.length===this._rowSelectionLimit)return!0;for(let e=0;e<this._items?.length;e++)if(!this._selectionContains(e)){t=!1;break}return t}_selectionIndeterminate(){if(!this._items?.length||!this.selectedRows?.length)return!1;if(void 0!==this._rowSelectionLimit&&this.selectedRows.length===this._rowSelectionLimit)return!1;let t=0;for(let e=0;e<this._items?.length;e++)this._selectionContains(e)&&t++;return t>0&&t!==this._items.length}_rowClick(t,e){const i=t.target;if("input"===i.tagName.toLowerCase()||"checkbox"===i.type)return;const s=this._findRow(t.target);if(this._findRowAction(t.target))return;if(this.enableRowClick)return void this.rowClick.emit({item:this._items[e],ctrlDown:this._ctrlDown});if(!this._enableRowSelection)return;const o=s?.querySelector('input[type="checkbox"]');o&&(o.checked=!o.checked,this._checkboxChange(o,e))}_findRow(t){return t?"p-table-row"===t?.tagName?.toLowerCase()?t:this._findRow(t?.parentElement):t}_findRowAction(t){return t?null!==t.dataset.isAction&&"false"!==t.dataset.isAction?t:"p-table-row"===t?.tagName?.toLowerCase()?null:this._findRowAction(t?.parentElement):null}_showFloatingMenu(){let t=this._rowActionsFloatingAll;1===this.rowSelectionLimit&&t.some((t=>("single"===t.type||"both"===t.type)&&t.showFunction))&&(t=t.filter((t=>"multi"===t.type||!t.showFunction||t.showFunction(this.selectedRows[0])))),this._rowActionsFloating=t,this._floatingMenuShown=!0}_parseDefinitions(t){return t.map((t=>this._parseDefinitionSizes(t)))}_parseDefinitionSizes(t){const e=t;let i={default:"full"};"string"!=typeof t.sizes||["auto","hidden","full"].includes(t.sizes)||(t.sizes=JSON.parse(t.sizes));for(const[t,s]of m.entries())i[s]="auto"!==e.sizes&&"hidden"!==e.sizes&&"full"!==e.sizes&&"number"!=typeof e.sizes?e.sizes[s]??i[m[t-1]]:"auto"===e.sizes?"full":e.sizes;return t.parsedSizes=i,t}static get watchers(){return{items:[{_parseItems:0}],enableRowSelection:[{_setRowSelectionData:0}],rowSelectionLimit:[{_setRowSelectionData:0}],selectedRows:[{_setRowSelectionData:0}]}}static get style(){return"*{box-sizing:border-box}.static{position:static}.fixed{position:fixed}.z-0{z-index:0}.my-16{margin-bottom:4rem;margin-top:4rem}.mb-8{margin-bottom:2rem}.flex{display:flex}.table{display:table}.hidden{display:none}.h-6{height:1.5rem}.w-6{width:1.5rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.resize{resize:both}.flex-col{flex-direction:column}.self-center{align-self:center}.rounded{border-radius:.25rem}.opacity-0{opacity:0}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}"}},[772,"p-table",{items:[1],loading:[4],headerLoading:[4,"header-loading"],footerLoading:[4,"footer-loading"],amountOfLoadingRows:[2,"amount-of-loading-rows"],enableRowSelection:[4,"enable-row-selection"],rowSelectionLimit:[2,"row-selection-limit"],enableRowClick:[4,"enable-row-click"],selectedRows:[16],enableFloatingMenu:[4,"enable-floating-menu"],floatingMenuAmountSelectedTemplate:[16],selectionKey:[1,"selection-key"],canSelectKey:[1,"can-select-key"],enableHeader:[4,"enable-header"],quickFilters:[1,"quick-filters"],activeQuickFilterIdentifier:[1,"active-quick-filter-identifier"],enableSearch:[4,"enable-search"],query:[1025],enableFilter:[4,"enable-filter"],enableFilterDesktop:[4,"enable-filter-desktop"],selectedFiltersAmount:[2,"selected-filters-amount"],filterButtonTemplate:[16],enableAction:[4,"enable-action"],actionButtonLoading:[4,"action-button-loading"],actionButtonEnabled:[4,"action-button-enabled"],actionButtonIcon:[1,"action-button-icon"],actionButtonText:[1,"action-button-text"],actionButtonTemplate:[16],enableFooter:[4,"enable-footer"],enablePaginationSize:[4,"enable-pagination-size"],enablePaginationPages:[4,"enable-pagination-pages"],enableExport:[4,"enable-export"],page:[1538],total:[2],pageSize:[2,"page-size"],pageSizeOptions:[16],hideOnSinglePage:[4,"hide-on-single-page"],emptyStateHeader:[16],emptyStateContent:[16],emptyStateAction:[16],enableEmptyStateAction:[4,"enable-empty-state-action"],emptyStateFilteredHeader:[16],emptyStateFilteredContent:[16],shadow:[4],_locales:[32],_extraHeaders:[32],_columns:[32],_items:[32],_enableRowSelection:[32],_rowSelectionLimit:[32],_rowActionsFloating:[32],_rowActionsRow:[32],_footerHidden:[32]},[[16,"localeChanged","_setLocales"],[16,"tableDefinitionChanged","onTableDefinitionUpdated"],[4,"keydown","keyDown"],[4,"keyup","keyUp"],[4,"visibilitychange","visibilityChange"],[9,"resize","_setRowSelectionData"]],{items:[{_parseItems:0}],enableRowSelection:[{_setRowSelectionData:0}],rowSelectionLimit:[{_setRowSelectionData:0}],selectedRows:[{_setRowSelectionData:0}]}]);function K(){"undefined"!=typeof customElements&&["p-table","p-badge","p-button","p-checkbox","p-divider","p-dropdown","p-dropdown-menu-container","p-dropdown-menu-item","p-empty-state","p-field","p-field-container","p-floating-menu-container","p-floating-menu-item","p-helper","p-icon","p-illustration","p-loader","p-pagination","p-pagination-pages","p-pagination-pages-item","p-pagination-size","p-segment-container","p-segment-item","p-table-cell","p-table-container","p-table-footer","p-table-header","p-table-row","p-table-row-actions-container","p-tooltip"].forEach((e=>{switch(e){case"p-table":customElements.get(t(e))||customElements.define(t(e),M);break;case"p-badge":customElements.get(t(e))||u();break;case"p-button":customElements.get(t(e))||b();break;case"p-checkbox":customElements.get(t(e))||f();break;case"p-divider":customElements.get(t(e))||g();break;case"p-dropdown":customElements.get(t(e))||w();break;case"p-dropdown-menu-container":customElements.get(t(e))||k();break;case"p-dropdown-menu-item":customElements.get(t(e))||y();break;case"p-empty-state":customElements.get(t(e))||S();break;case"p-field":customElements.get(t(e))||_();break;case"p-field-container":customElements.get(t(e))||x();break;case"p-floating-menu-container":customElements.get(t(e))||C();break;case"p-floating-menu-item":customElements.get(t(e))||v();break;case"p-helper":customElements.get(t(e))||E();break;case"p-icon":customElements.get(t(e))||A();break;case"p-illustration":customElements.get(t(e))||F();break;case"p-loader":customElements.get(t(e))||j();break;case"p-pagination":customElements.get(t(e))||R();break;case"p-pagination-pages":customElements.get(t(e))||D();break;case"p-pagination-pages-item":customElements.get(t(e))||z();break;case"p-pagination-size":customElements.get(t(e))||B();break;case"p-segment-container":customElements.get(t(e))||L();break;case"p-segment-item":customElements.get(t(e))||H();break;case"p-table-cell":customElements.get(t(e))||T();break;case"p-table-container":customElements.get(t(e))||O();break;case"p-table-footer":customElements.get(t(e))||P();break;case"p-table-header":customElements.get(t(e))||q();break;case"p-table-row":customElements.get(t(e))||I();break;case"p-table-row-actions-container":customElements.get(t(e))||Q();break;case"p-tooltip":customElements.get(t(e))||U()}}))}K();const N=M,W=K;export{N as PTable,W as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as a,c as r,h as o}from"./p-CySg37XO.js";import{c as i}from"./p-CBWjHURv.js";import{T as d}from"./p-Au2WuEGF.js";import{d as c}from"./p-
|
|
1
|
+
import{t,p as e,H as a,c as r,h as o}from"./p-CySg37XO.js";import{c as i}from"./p-CBWjHURv.js";import{T as d}from"./p-Au2WuEGF.js";import{d as c}from"./p-aZcUXH1b.js";const n=i("h-9 w-[2px] flex-shrink-0 rounded-full",{variants:{variant:{neutral:"\n bg-indigo-800\n dark:bg-indigo-400\n ",positive:"\n bg-positive-green-500\n dark:bg-positive-green-alternative\n ",biased:"\n bg-amber-500\n dark:bg-amber-alternative\n ",negative:"\n bg-negative-red-500\n dark:bg-negative-red-alternative\n "}}}),b=i(["flex items-center justify-between gap-2","w-[calc(100%-2px-0.5rem)]"]),s=e(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.action=r(this,"action",3)}variant="positive";header;content;enableAction=!0;actionIcon="negative";actionIconFlip;actionIconRotate;action;render(){return o(d,{key:"691f56d7bd82c2c908b4773e39bf327174af3784"},o("div",{key:"d7ea2273b9ac2685b2a6583d25f7e7236061eeda",class:"\n flex gap-2 rounded-lg border border-solid border-storm-100 bg-white p-2\n shadow-2\n dark:border-hurricane-800 dark:bg-hurricane-800\n ",onClick:()=>this._onClick()},o("div",{key:"e7dba6bb34063d4c20df2c16bd87be7dbbe53815",class:n({variant:this.variant})}),o("div",{key:"1fc1320c89627a6da22f3010abcb7c6b7af25109",class:b()},o("div",{key:"1122c87ff8fa6f3410d416ee223fc7532c723652",class:"flex w-full min-w-0 flex-col"},o("p",{key:"78ea333ecd424872e1a1e99b14e6427ec1b3a68d",class:"\n m-0 overflow-hidden text-ellipsis whitespace-nowrap text-sm\n font-semibold text-storm-500\n dark:text-white\n "},this.header?.length?this.header:o("slot",{name:"header"})),o("p",{key:"899613703dc181f980c2e45ef54d6aeb24d7f3ab",class:"\n m-0 w-full overflow-hidden text-ellipsis whitespace-nowrap text-xs\n text-storm-300\n dark:text-hurricane-200\n "},this.content?.length?this.content:o("slot",{name:"content"}))),this.enableAction&&o("div",{key:"2fcede21976b5f039715905c282c0990f7b7b7cf",class:"\n flex-shrink-0 cursor-pointer p-2 text-storm-200\n hover:text-storm-500 hover:text-white\n dark:text-hurricane-200\n "},o("p-icon",{key:"12a6725ddedad306f9af430fb0e61f6ad3d4f9ef",flip:this.actionIconFlip,rotate:this.actionIconRotate,variant:this.actionIcon})))))}_onClick(){this.enableAction&&this.action.emit()}static get style(){return"*{box-sizing:border-box}.static{position:static}.m-0{margin:0}.flex{display:flex}.h-9{height:2.25rem}.w-\\[2px\\]{width:2px}.w-\\[calc\\(100\\%-2px-0\\.5rem\\)\\]{width:calc(100% - 2px - .5rem)}.w-full{width:100%}.min-w-0{min-width:0}.flex-shrink-0{flex-shrink:0}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.overflow-hidden{overflow:hidden}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-solid{border-style:solid}.border-storm-100{--tw-border-opacity:1;border-color:rgb(209 210 212/var(--tw-border-opacity,1))}.bg-amber-500{--tw-bg-opacity:1;background-color:rgb(225 159 35/var(--tw-bg-opacity,1))}.bg-indigo-800{--tw-bg-opacity:1;background-color:rgb(27 88 210/var(--tw-bg-opacity,1))}.bg-negative-red-500{--tw-bg-opacity:1;background-color:rgb(230 30 30/var(--tw-bg-opacity,1))}.bg-positive-green-500{--tw-bg-opacity:1;background-color:rgb(92 195 14/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.p-2{padding:.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-semibold{font-weight:600}.text-storm-200{--tw-text-opacity:1;color:rgb(163 165 169/var(--tw-text-opacity,1))}.text-storm-300{--tw-text-opacity:1;color:rgb(116 120 127/var(--tw-text-opacity,1))}.text-storm-500{--tw-text-opacity:1;color:rgb(24 30 41/var(--tw-text-opacity,1))}.shadow-2{--tw-shadow:0 1px 1px rgba(0,2,2,.04),0 2px 2px rgba(0,2,2,.04),0 4px 4px rgba(0,2,2,.04);--tw-shadow-colored:0 1px 1px var(--tw-shadow-color),0 2px 2px var(--tw-shadow-color),0 4px 4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\\:text-storm-500:hover{--tw-text-opacity:1;color:rgb(24 30 41/var(--tw-text-opacity,1))}.hover\\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:border-hurricane-800:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-border-opacity:1;border-color:rgb(24 30 41/var(--tw-border-opacity,1))}.dark\\:bg-amber-alternative:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1;background-color:rgb(255 231 92/var(--tw-bg-opacity,1))}.dark\\:bg-hurricane-800:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1;background-color:rgb(24 30 41/var(--tw-bg-opacity,1))}.dark\\:bg-indigo-400:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1;background-color:rgb(165 194 252/var(--tw-bg-opacity,1))}.dark\\:bg-negative-red-alternative:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1;background-color:rgb(255 92 92/var(--tw-bg-opacity,1))}.dark\\:bg-positive-green-alternative:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1;background-color:rgb(98 255 92/var(--tw-bg-opacity,1))}.dark\\:text-hurricane-200:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(163 165 169/var(--tw-text-opacity,1))}.dark\\:text-white:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:border-hurricane-800:where([data-theme=dark],[data-theme=dark] *){--tw-border-opacity:1;border-color:rgb(24 30 41/var(--tw-border-opacity,1))}.dark\\:bg-amber-alternative:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1;background-color:rgb(255 231 92/var(--tw-bg-opacity,1))}.dark\\:bg-hurricane-800:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1;background-color:rgb(24 30 41/var(--tw-bg-opacity,1))}.dark\\:bg-indigo-400:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1;background-color:rgb(165 194 252/var(--tw-bg-opacity,1))}.dark\\:bg-negative-red-alternative:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1;background-color:rgb(255 92 92/var(--tw-bg-opacity,1))}.dark\\:bg-positive-green-alternative:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1;background-color:rgb(98 255 92/var(--tw-bg-opacity,1))}.dark\\:text-hurricane-200:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(163 165 169/var(--tw-text-opacity,1))}.dark\\:text-white:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}"}},[769,"p-toast",{variant:[1],header:[1],content:[1],enableAction:[4,"enable-action"],actionIcon:[1,"action-icon"],actionIconFlip:[1,"action-icon-flip"],actionIconRotate:[2,"action-icon-rotate"]}]);function h(){"undefined"!=typeof customElements&&["p-toast","p-icon"].forEach((e=>{switch(e){case"p-toast":customElements.get(t(e))||customElements.define(t(e),s);break;case"p-icon":customElements.get(t(e))||c()}}))}h();const g=s,p=h;export{g as PToast,p as defineCustomElement}
|
|
@@ -736,16 +736,9 @@ var integration = `<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1
|
|
|
736
736
|
`;
|
|
737
737
|
|
|
738
738
|
var lamp = `<svg width="1em" height="1em" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
739
|
-
<
|
|
740
|
-
<path d="
|
|
741
|
-
<path d="
|
|
742
|
-
<path d="M8.5 3.5C9.75 3.71062 10.7881 4.75 11 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
743
|
-
</g>
|
|
744
|
-
<defs>
|
|
745
|
-
<clipPath id="clip0_4692_6386">
|
|
746
|
-
<rect width="1em" height="1em" fill="currentColor"/>
|
|
747
|
-
</clipPath>
|
|
748
|
-
</defs>
|
|
739
|
+
<path d="M5.5 14.5H10.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
740
|
+
<path d="M4.91874 10.4375C4.32434 9.97317 3.8429 9.38018 3.51058 8.70308C3.17825 8.02598 3.00368 7.28238 2.99999 6.52813C2.98499 3.81813 5.16999 1.5625 7.87936 1.5C8.92937 1.47457 9.96072 1.78044 10.8271 2.37421C11.6935 2.96799 12.3508 3.81951 12.706 4.80797C13.0611 5.79643 13.0959 6.87162 12.8055 7.88099C12.5151 8.89036 11.9142 9.78265 11.0881 10.4313C10.9059 10.5725 10.7582 10.7535 10.6563 10.9603C10.5544 11.1671 10.501 11.3944 10.5 11.625V12C10.5 12.1326 10.4473 12.2598 10.3535 12.3536C10.2598 12.4473 10.1326 12.5 9.99999 12.5H5.99999C5.86738 12.5 5.7402 12.4473 5.64643 12.3536C5.55266 12.2598 5.49999 12.1326 5.49999 12V11.625C5.49975 11.3959 5.44727 11.1699 5.34655 10.9641C5.24583 10.7583 5.09952 10.5782 4.91874 10.4375Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
741
|
+
<path d="M8.5 3.5C9.75 3.71062 10.7881 4.75 11 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
749
742
|
</svg>
|
|
750
743
|
`;
|
|
751
744
|
|
|
@@ -801,20 +794,13 @@ var mail = `<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fil
|
|
|
801
794
|
`;
|
|
802
795
|
|
|
803
796
|
var math = `<svg width="1em" height="1em" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
804
|
-
<
|
|
805
|
-
<path d="
|
|
806
|
-
<path d="
|
|
807
|
-
<path d="
|
|
808
|
-
<path d="M9.5
|
|
809
|
-
<path d="
|
|
810
|
-
<path d="
|
|
811
|
-
<path d="M13 3L10 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
812
|
-
</g>
|
|
813
|
-
<defs>
|
|
814
|
-
<clipPath id="clip0_4695_6421">
|
|
815
|
-
<rect width="1em" height="1em" fill="currentColor"/>
|
|
816
|
-
</clipPath>
|
|
817
|
-
</defs>
|
|
797
|
+
<path d="M2.5 4.5H6.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
798
|
+
<path d="M4.5 9.5V13.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
799
|
+
<path d="M2.5 11.5H6.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
800
|
+
<path d="M9.5 10.5H13.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
801
|
+
<path d="M9.5 12.5H13.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
802
|
+
<path d="M10 3L13 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
803
|
+
<path d="M13 3L10 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
818
804
|
</svg>
|
|
819
805
|
`;
|
|
820
806
|
|
|
@@ -904,16 +890,9 @@ var negative = `<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em"
|
|
|
904
890
|
`;
|
|
905
891
|
|
|
906
892
|
var newTab = `<svg width="1em" height="1em" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
907
|
-
<
|
|
908
|
-
<path d="
|
|
909
|
-
<path d="
|
|
910
|
-
<path d="M11.5 8.5V13C11.5 13.1326 11.4473 13.2598 11.3536 13.3536C11.2598 13.4473 11.1326 13.5 11 13.5H3C2.86739 13.5 2.74021 13.4473 2.64645 13.3536C2.55268 13.2598 2.5 13.1326 2.5 13V5C2.5 4.86739 2.55268 4.74021 2.64645 4.64645C2.74021 4.55268 2.86739 4.5 3 4.5H7.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
911
|
-
</g>
|
|
912
|
-
<defs>
|
|
913
|
-
<clipPath id="clip0_4683_10791">
|
|
914
|
-
<rect width="1em" height="1em" fill="currentColor"/>
|
|
915
|
-
</clipPath>
|
|
916
|
-
</defs>
|
|
893
|
+
<path d="M8.5 7.5L13.5 2.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
894
|
+
<path d="M13.5 6.5L13.4994 2.50062L9.5 2.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
895
|
+
<path d="M11.5 8.5V13C11.5 13.1326 11.4473 13.2598 11.3536 13.3536C11.2598 13.4473 11.1326 13.5 11 13.5H3C2.86739 13.5 2.74021 13.4473 2.64645 13.3536C2.55268 13.2598 2.5 13.1326 2.5 13V5C2.5 4.86739 2.55268 4.74021 2.64645 4.64645C2.74021 4.55268 2.86739 4.5 3 4.5H7.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
917
896
|
</svg>
|
|
918
897
|
`;
|
|
919
898
|
|
|
@@ -1157,7 +1136,6 @@ var sparkle = `<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em"
|
|
|
1157
1136
|
`;
|
|
1158
1137
|
|
|
1159
1138
|
var spinner = `<svg width="1em" height="1em" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1160
|
-
<g clip-path="url(#clip0_4515_39790)">
|
|
1161
1139
|
<path d="M8 2V4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1162
1140
|
<path d="M12.2425 3.75757L10.8281 5.17194" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1163
1141
|
<path d="M14 8H12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -1166,17 +1144,10 @@ var spinner = `<svg width="1em" height="1em" viewBox="0 0 16 16" fill="none" xml
|
|
|
1166
1144
|
<path d="M3.75751 12.2425L5.17188 10.8281" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1167
1145
|
<path d="M2 8H4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1168
1146
|
<path d="M3.75751 3.75757L5.17188 5.17194" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1169
|
-
</g>
|
|
1170
|
-
<defs>
|
|
1171
|
-
<clipPath id="clip0_4515_39790">
|
|
1172
|
-
<rect width="16" height="16" fill="white"/>
|
|
1173
|
-
</clipPath>
|
|
1174
|
-
</defs>
|
|
1175
1147
|
</svg>
|
|
1176
1148
|
`;
|
|
1177
1149
|
|
|
1178
1150
|
var spinning = `<svg width="1em" height="1em" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1179
|
-
<g clip-path="url(#clip0_4515_39800)">
|
|
1180
1151
|
<path d="M8 2V4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1181
1152
|
<path d="M14 8H12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1182
1153
|
<path d="M12.2425 12.2425L10.8281 10.8281" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -1184,26 +1155,13 @@ var spinning = `<svg width="1em" height="1em" viewBox="0 0 16 16" fill="none" xm
|
|
|
1184
1155
|
<path d="M3.75751 12.2425L5.17188 10.8281" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1185
1156
|
<path d="M2 8H4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1186
1157
|
<path d="M3.75751 3.75757L5.17188 5.17194" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1187
|
-
</g>
|
|
1188
|
-
<defs>
|
|
1189
|
-
<clipPath id="clip0_4515_39800">
|
|
1190
|
-
<rect width="16" height="16" fill="white"/>
|
|
1191
|
-
</clipPath>
|
|
1192
|
-
</defs>
|
|
1193
1158
|
</svg>
|
|
1194
1159
|
`;
|
|
1195
1160
|
|
|
1196
1161
|
var stack = `<svg width="1em" height="1em" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1197
|
-
<
|
|
1198
|
-
<path d="M2
|
|
1199
|
-
<path d="M2
|
|
1200
|
-
<path d="M2 5L8 8.5L14 5L8 1.5L2 5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1201
|
-
</g>
|
|
1202
|
-
<defs>
|
|
1203
|
-
<clipPath id="clip0_4695_6422">
|
|
1204
|
-
<rect width="1em" height="1em" fill="currentColor"/>
|
|
1205
|
-
</clipPath>
|
|
1206
|
-
</defs>
|
|
1162
|
+
<path d="M2 11L8 14.5L14 11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1163
|
+
<path d="M2 8L8 11.5L14 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1164
|
+
<path d="M2 5L8 8.5L14 5L8 1.5L2 5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1207
1165
|
</svg>
|
|
1208
1166
|
`;
|
|
1209
1167
|
|
package/dist/esm/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { s as screens } from './screens-CWO2YJCh.js';
|
|
|
2
2
|
export { g as getScreenSize, b as getScreenSizeInPixels, a as getScreenSizeInRem, d as isBetweenScreens, i as isBiggerThanScreen, j as isDesktop, f as isMobile, c as isSmallerThanScreen, h as isTablet, e as isTouchDevice } from './screens-CWO2YJCh.js';
|
|
3
3
|
export { i as initTheme, o as onStateChange, s as state, a as stateLocaleOptions, b as stateThemeOptions } from './state-BJbOyUuL.js';
|
|
4
4
|
export { c as childOf, a as childOfComposed } from './child-of-TyZ7uPES.js';
|
|
5
|
-
export { c as categorized, i as icons } from './icons-
|
|
5
|
+
export { c as categorized, i as icons } from './icons-DPmts3W0.js';
|
|
6
6
|
export { f as formatTranslation, g as getLocaleComponentStrings } from './localization-CwQG70_4.js';
|
|
7
7
|
export { f as floatingMenuContainerClass, g as getTableCellColumnClasses, a as getTableCellSizes } from './table-helpers-Bvtfm-ta.js';
|
|
8
8
|
export { o as objectGetByPath } from './object-get-by-path-CLLU0oUD.js';
|
|
@@ -3,7 +3,7 @@ import { c as cva } from './index-CO0T2jO4.js';
|
|
|
3
3
|
import { T as ThemedHost } from './themed-host.component-CUNsbvgN.js';
|
|
4
4
|
import { a as asBoolean } from './as-boolean-C5CTp9IA.js';
|
|
5
5
|
import { c as cn } from './cn-CsNqHcjL.js';
|
|
6
|
-
import { i as icons } from './icons-
|
|
6
|
+
import { i as icons } from './icons-DPmts3W0.js';
|
|
7
7
|
import './clsx-ChV9xqsO.js';
|
|
8
8
|
import './state-BJbOyUuL.js';
|
|
9
9
|
|
|
@@ -212,14 +212,16 @@ const Datepicker = class {
|
|
|
212
212
|
}
|
|
213
213
|
this.parseMinDate(this.minDate);
|
|
214
214
|
this.parseMaxDate(this.maxDate);
|
|
215
|
+
this._isMobileBrowser = isMobileBrowser();
|
|
216
|
+
this.parseValue(this.value);
|
|
217
|
+
}
|
|
218
|
+
componentWillRender() {
|
|
215
219
|
if (this.mode !== 'day' && this.format === this._defaultFormats['day']) {
|
|
216
220
|
this.format = this._defaultFormats[this.mode];
|
|
217
221
|
}
|
|
218
|
-
this._isMobileBrowser = isMobileBrowser();
|
|
219
|
-
this.parseValue(this.value);
|
|
220
222
|
}
|
|
221
223
|
render() {
|
|
222
|
-
return (h("p-dropdown", { key: '
|
|
224
|
+
return (h("p-dropdown", { key: '3024ca24d1ed1206612566b20e387a482ece7979', allowOverflow: true, applyFullWidth: false, applyMaxWidth: false, disableTriggerClick: true, insideClick: true, isDatepicker: true, placement: this.placement, show: this._showDropdown, strategy: this.strategy }, h("p-field", { key: '204a9a00ca533875c61c7838807629e54b822e01', autoShowError: false, disabled: asBoolean(this.disabled), error: this.error, focused: this._showDropdown, forceShowTooltip: !!this.error?.length && !this._showDropdown, helper: this.helper, icon: this.hideIconWhenFilled && !!this._value ? null : 'calendar-multi', iconPosition: 'start', label: this.label, loading: this.loading, placeholder: this.placeholder, prefix: this.prefix, required: asBoolean(this.required), showOptional: asBoolean(this.showOptional), size: this.size, slot: 'trigger', value: this._getFormattedDate(), onBlur: (ev) => this._onBlur(ev), onFocus: () => this._onFocus(), onInputRefChange: ev => (this._inputRef = ev.detail), onValueChange: ev => this._onValueChange(ev.detail) }), this.enableNativePicker && this._isMobileBrowser && (h("input", { key: '1d43b23fc1459b84fa72f5f8d35e62b576243f90', class: '\n pointer-events-none absolute left-0 top-0 z-[-10] overflow-hidden\n opacity-0\n ', max: this.maxDate &&
|
|
223
225
|
dateFnsExports.format(new Date(this.maxDate), 'yyyy-MM-dd', {
|
|
224
226
|
locale: state.locale === 'nl' ? localeExports.nl : localeExports.enUS,
|
|
225
227
|
}), min: this._minDate &&
|
|
@@ -228,7 +230,7 @@ const Datepicker = class {
|
|
|
228
230
|
}), ref: ref => (this._dateInputRef = ref), slot: 'trigger', type: this.mode === 'day' ? 'date' : 'month', value: this._value &&
|
|
229
231
|
dateFnsExports.format(this._value, 'yyyy-MM-dd', {
|
|
230
232
|
locale: state.locale === 'nl' ? localeExports.nl : localeExports.enUS,
|
|
231
|
-
}), onInput: ev => this._onNativeInput(ev) })), h("div", { key: '
|
|
233
|
+
}), onInput: ev => this._onNativeInput(ev) })), h("div", { key: 'ba83aeee5c1cc9073bd71361a9011696761073d1', slot: 'items', tabIndex: -1 }, h("p-calendar", { key: '13e5834b61f979f0deccb01ccf7bc938dabc4076', disableWeekends: this.disableWeekends, disabledDates: this.disabledDates, enableToday: this.enableToday, maxDate: this.maxDate, minDate: this.minDate, mode: this.mode, preselectToday: this.preselectToday, todayText: this.todayText, value: this._value, variant: 'embedded', onValueChange: ({ detail }) => (this.value = detail) }))));
|
|
232
234
|
}
|
|
233
235
|
documentClickHandler({ target }) {
|
|
234
236
|
if (!this._showDropdown || childOf(target, this._el)) {
|
|
@@ -245,7 +247,8 @@ const Datepicker = class {
|
|
|
245
247
|
}
|
|
246
248
|
this._showDropdown = true;
|
|
247
249
|
}
|
|
248
|
-
_onBlur(ev, parseFormat
|
|
250
|
+
_onBlur(ev, parseFormat) {
|
|
251
|
+
parseFormat = parseFormat || this.format;
|
|
249
252
|
if (this._isMobileBrowser && this._dateInputRef) {
|
|
250
253
|
return;
|
|
251
254
|
}
|
|
@@ -256,7 +259,9 @@ const Datepicker = class {
|
|
|
256
259
|
if (target.value === null) {
|
|
257
260
|
return;
|
|
258
261
|
}
|
|
259
|
-
const value = dateFnsExports.parse(target.value, parseFormat, new Date()
|
|
262
|
+
const value = dateFnsExports.parse(target.value, parseFormat, new Date(), {
|
|
263
|
+
locale: state.locale === 'nl' ? localeExports.nl : localeExports.enUS,
|
|
264
|
+
});
|
|
260
265
|
if (value === this._value) {
|
|
261
266
|
return;
|
|
262
267
|
}
|
package/dist/index.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!doctype html><html dir="ltr" lang="en"><head> <meta charset="utf-8"> <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" name="viewport"> <title>Stencil Component Starter</title> <link rel="modulepreload" href="/build/p-
|
|
1
|
+
<!doctype html><html dir="ltr" lang="en"><head> <meta charset="utf-8"> <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" name="viewport"> <title>Stencil Component Starter</title> <link rel="modulepreload" href="/build/p-fa2e80c6.js"><link rel="modulepreload" href="/build/p-6XOzWrsN.js"><link rel="modulepreload" href="/build/p-C5CTp9IA.js"><link rel="modulepreload" href="/build/p-CBWjHURv.js"><link rel="modulepreload" href="/build/p-CSySY6aC.js"><link rel="modulepreload" href="/build/p-ChV9xqsO.js"><link rel="modulepreload" href="/build/p-DPmts3W0.js"><link rel="modulepreload" href="/build/p-xs4N_Y-0.js"><link rel="modulepreload" href="/build/p-yFtRjnrU.js"><script type="module" src="/build/p-fa2e80c6.js" data-stencil data-resources-url="/build/" data-stencil-namespace="paperless"></script> <script nomodule="" src="/build/paperless.js" data-stencil></script> <link href="/build/p-ea6cc0bf.css" rel="stylesheet"> </head> <body> <p-button>Test</p-button> <script data-build="2026-02-23T16:08:19">
|
|
2
2
|
if ('serviceWorker' in navigator && location.protocol !== 'file:') {
|
|
3
3
|
window.addEventListener('load', function() {
|
|
4
4
|
navigator.serviceWorker.register('/sw.js')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as t}from"./p-CWO2YJCh.js";export{g as getScreenSize,b as getScreenSizeInPixels,a as getScreenSizeInRem,d as isBetweenScreens,i as isBiggerThanScreen,j as isDesktop,f as isMobile,c as isSmallerThanScreen,h as isTablet,e as isTouchDevice}from"./p-CWO2YJCh.js";export{i as initTheme,o as onStateChange,s as state,a as stateLocaleOptions,b as stateThemeOptions}from"./p-6XOzWrsN.js";export{c as childOf,a as childOfComposed}from"./p-TyZ7uPES.js";export{c as categorized,i as icons}from"./p-BlJazAvY.js";export{f as formatTranslation,g as getLocaleComponentStrings}from"./p-CwQG70_4.js";export{f as floatingMenuContainerClass,g as getTableCellColumnClasses,a as getTableCellSizes}from"./p-DeWIZIsV.js";export{o as objectGetByPath}from"./p-CLLU0oUD.js";export{i as isMobileBrowser}from"./p-DPc49L2n.js";export{c as cn}from"./p-xs4N_Y-0.js";export{P as PAGINATION_DEFAULT_PAGE_SIZE,a as PAGINATION_DEFAULT_PAGE_SIZE_OPTIONS,S as SELECT_DEFAULT_MAX_DISPLAYED_ITEMS,T as TABLE_COLUMN_SIZES}from"./p-CEaB2BT0.js";import"./p-yFtRjnrU.js";import"./p-CBWjHURv.js";import"./p-ChV9xqsO.js";function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n,l,m,p,v,u,x={},F={};function w(){return l||(l=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r}});const a=t((n||(n=1,function(e){function a(e,a){return{handler:e,config:a}}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}}),a.withOptions=function(e,a=()=>({})){const t=function(t){return{__options:t,handler:e(t),config:a(t)}};return t.__isOptionsFunction=!0,t.__pluginFunction=e,t.__configFunction=a,t};const t=a}(F)),F));function t(e){return e&&e.__esModule?e:{default:e}}const r=a.default}(x)),x}function E(){if(p)return m;p=1;let e=w();return m=(e.__esModule?e:{default:e}).default}var C,D,B=function(){if(u)return v;u=1;const e=E(),a={position:"relative",paddingBottom:"calc(var(--tw-aspect-h) / var(--tw-aspect-w) * 100%)"},t={position:"absolute",height:"100%",width:"100%",top:"0",right:"0",bottom:"0",left:"0"},r={".aspect-none":{position:"static",paddingBottom:"0"},".aspect-none > *":{position:"static",height:"auto",width:"auto",top:"auto",right:"auto",bottom:"auto",left:"auto"}},s=e((function({addComponents:e,matchComponents:s,theme:n,variants:o,e:i}){const l=n("aspectRatio");if(s)return s({"aspect-w":e=>[{...a,"--tw-aspect-w":e},{"> *":t}],"aspect-h":e=>({"--tw-aspect-h":e})},{values:l}),void e(r);const m=Object.entries(l).map((([e,a])=>`.${i(`aspect-w-${e}`)}`)).join(",\n"),f=Object.entries(l).map((([e,a])=>`.${i(`aspect-w-${e}`)} > *`)).join(",\n");e([{[m]:a,[f]:t},r,Object.entries(l).map((([e,a])=>({[`.${i(`aspect-w-${e}`)}`]:{"--tw-aspect-w":a}}))),Object.entries(l).map((([e,a])=>({[`.${i(`aspect-h-${e}`)}`]:{"--tw-aspect-h":a}})))],o("aspectRatio"))}),{theme:{aspectRatio:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",14:"14",15:"15",16:"16"}},variants:{aspectRatio:["responsive"]}});return v=s}(),O=r(B),y=r(function(){if(D)return C;D=1;const e=E()((function({addUtilities:e}){e({".scrollbar-hide":{"-ms-overflow-style":"none","scrollbar-width":"none","&::-webkit-scrollbar":{display:"none"}},".scrollbar-default":{"-ms-overflow-style":"auto","scrollbar-width":"auto","&::-webkit-scrollbar":{display:"block"}}},["responsive"])}));return C=e}()),A=r(E());const I=({addVariant:e})=>{e("has-hover","@media (hover: hover)"),e("no-hover","@media (hover: none)"),e("hover-never","@media (hover: hover) { &:hover }"),e("group-hover-never","@media (hover: hover) { :merge(.group):hover & }"),e("peer-hover-never","@media (hover: hover) { :merge(.peer):hover & }"),e("hover-always",["@media (hover: hover) { &:hover }","@media (hover: none)"]),e("group-hover-always",["@media (hover: hover) { :merge(.group):hover & }","@media (hover: none)"]),e("peer-hover-always",["@media (hover: hover) { :merge(.peer):hover & }","@media (hover: none)"])},Y=({addUtilities:e})=>{e({".m-safe":{marginTop:"env(safe-area-inset-top)",marginRight:"env(safe-area-inset-right)",marginBottom:"env(safe-area-inset-bottom)",marginLeft:"env(safe-area-inset-left)"},".mx-safe":{marginRight:"env(safe-area-inset-right)",marginLeft:"env(safe-area-inset-left)"},".my-safe":{marginTop:"env(safe-area-inset-top)",marginBottom:"env(safe-area-inset-bottom)"},".my-safe-2":{marginTop:"calc(env(safe-area-inset-top)+0.5rem)",marginBottom:"calc(env(safe-area-inset-bottom)+0.5rem)"},".mt-safe":{marginTop:"env(safe-area-inset-top)"},".mr-safe":{marginRight:"env(safe-area-inset-right)"},".mb-safe":{marginBottom:"env(safe-area-inset-bottom)"},".ml-safe":{marginLeft:"env(safe-area-inset-left)"},".p-safe":{paddingTop:"env(safe-area-inset-top)",paddingRight:"env(safe-area-inset-right)",paddingBottom:"env(safe-area-inset-bottom)",paddingLeft:"env(safe-area-inset-left)"},".px-safe":{paddingRight:"env(safe-area-inset-right)",paddingLeft:"env(safe-area-inset-left)"},".py-safe":{paddingTop:"env(safe-area-inset-top)",paddingBottom:"env(safe-area-inset-bottom)"},".py-safe-2":{paddingTop:"calc(env(safe-area-inset-top)+0.5rem)",paddingBottom:"calc(env(safe-area-inset-bottom)+0.5rem)"},".pt-safe":{paddingTop:"env(safe-area-inset-top)"},".pr-safe":{paddingRight:"env(safe-area-inset-right)"},".pb-safe":{paddingBottom:"env(safe-area-inset-bottom)"},".pl-safe":{paddingLeft:"env(safe-area-inset-left)"},".min-h-screen":{minHeight:"100vh"},".min-h-screen-safe":{minHeight:"calc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)))"},".max-h-screen":{maxHeight:"100vh"},".max-h-screen-safe":{maxHeight:"calc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)))"},".h-screen-safe":{height:"calc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)))"},".min-w-screen":{minWidth:"100vw"},".min-w-screen-safe":{minWidth:"calc(100vw - (env(safe-area-inset-left) + env(safe-area-inset-right)))"},".max-w-screen":{maxWidth:"100vw"},".max-w-screen-safe":{maxWidth:"calc(100vw - (env(safe-area-inset-left) + env(safe-area-inset-right)))"},".w-screen-safe":{width:"calc(100vw - (env(safe-area-inset-left) + env(safe-area-inset-right)))"}})};var L={animation:{"fade-in":"forwards fadeIn .2s ease","fade-out":"forwards fadeOut .2s ease","slide-in-right":"forwards slideInRight .5s ease","slide-in-left":"forwards slideInLeft .5s ease","slide-in-top":"forwards slideInTop .25 ease","slide-in-bottom":"forwards slideInBottom .5s ease","slide-in-right-small":"forwards slideInRightSmall .5s ease","slide-in-left-small":"forwards slideInLeftSmall .5s ease","slide-in-top-small":"forwards slideInTopSmall .5s ease","slide-in-bottom-small":"forwards slideInBottomSmall .5s ease","slide-out-right":"forwards slideOutRight .2s ease","slide-out-left":"forwards slideOutLeft .2s ease","slide-out-top":"forwards slideOutTop .2s ease","slide-out-bottom":"forwards slideOutBottom .5s ease","slide-out-top-small":"forwards slideOutTopSmall .5s ease","slide-out-bottom-small":"forwards slideOutBottomSmall .5s ease","floating-menu-container-out":"forwards floatingMenuContainerOut .5s ease","floating-menu-container-in":"forwards floatingMenuContainerIn .5s ease",wave:"wave .5s ease-in-out -0.5s infinite alternate forwards"},keyframes:{fadeIn:{"0%":{opacity:"0"},"100%":{opacity:"100"}},fadeOut:{"0%":{opacity:"100"},"100%":{opacity:"0"}},slideInRight:{"0%":{transform:"translateX(100%)"},"100%":{transform:"translateX(0)"}},slideInLeft:{"0%":{transform:"translateX(-100%)"},"100%":{transform:"translateX(0)"}},slideInTop:{"0%":{transform:"translateY(-100%)"},"100%":{transform:"translateY(0)"}},slideInBottom:{"0%":{transform:"translateY(100%)"},"100%":{transform:"translateY(0)"}},slideInRightSmall:{"0%":{transform:"translateX(20%)"},"100%":{transform:"translateX(0)"}},slideInLeftSmall:{"0%":{transform:"translateX(-20%)"},"100%":{transform:"translateX(0)"}},slideInTopSmall:{"0%":{transform:"translateY(-20%)"},"100%":{transform:"translateY(0)"}},slideInBottomSmall:{"0%":{transform:"translateY(20%)"},"100%":{transform:"translateY(0)"}},slideOutRight:{"0%":{transform:"translateX(0)"},"100%":{transform:"translateX(100%)"}},slideOutLeft:{"0%":{transform:"translateX(0)"},"100%":{transform:"translateX(-100%)"}},slideOutTop:{"0%":{transform:"translateY(0)"},"100%":{transform:"translateY(-100%)"}},slideOutBottom:{"0%":{transform:"translateY(0)"},"100%":{transform:"translateY(100%)"}},slideOutTopSmall:{"0%":{transform:"translateY(0)"},"100%":{transform:"translateY(-20%)"}},slideOutBottomSmall:{"0%":{transform:"translateY(0)"},"100%":{transform:"translateY(20%)"}},floatingMenuContainerOut:{"0%":{display:"flex",transform:"translateY(0)",opacity:"100"},"99%":{display:"flex",transform:"translateY(100%)",opacity:"0"},"100%":{display:"none",transform:"translateY(100%)",opacity:"0"}},floatingMenuContainerIn:{"0%":{display:"none",transform:"translateY(100%)",opacity:"0"},"1%":{display:"flex",transform:"translateY(100%)",opacity:"0"},"100%":{display:"flex",transform:"translateY(0)",opacity:"100"}},wave:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(-15deg)"}}}};const _={};for(let e=1;e<360;e++)_[`${e}`]=`${e}deg`,_[`-${e}`]=`-${e}deg`;var R={1:["0 1px 1px rgba(0, 2, 2, 0.08)"],2:["0 1px 1px rgba(0, 2, 2, 0.04)","0 2px 2px rgba(0, 2, 2, 0.04)","0 4px 4px rgba(0, 2, 2, 0.04)"],3:["0 1px 1px rgba(0, 2, 2, 0.08)","0 2px 2px rgba(0, 2, 2, 0.08)","0 4px 4px rgba(0, 2, 2, 0.08)"],modal:["0 0 0 1px rgba(0, 2, 2, 0.10)","0 1px 1px 0 rgba(0, 2, 2, 0.20)","0 2px 2px 0 rgba(0, 2, 2, 0.08)","0 4px 4px 0 rgba(0, 2, 2, 0.08)","0 8px 8px 0 rgba(0, 2, 2, 0.08)"],"supportive-lilac":"0px 1px 1px rgba(189, 140, 255, 0.20)","storm-10%":"0px 1px 0px rgba(3, 42, 36, 0.1)","primary-button":"0px 1px 1px 0px rgba(24, 30 41, 0.08)","off-white-600":"0px 0px 0px 1px #ECEAE5",inherit:"inherit",transparent:"transparent"},k={fontSize:{xxs:["0.5rem","1rem"],"3xl":["2rem","2.5rem"],"4xl":["2.5rem","3rem"]},lineHeight:{xs:"1rem",sm:"1.5rem",base:"1.5rem",lg:"1.75rem",xl:"1.75rem","2xl":"2rem","3xl":"2.5rem","4xl":"3rem"}};const X=A((e=>{Y(e),I(e)}),{theme:{colors:{inherit:"inherit",transparent:"transparent",current:"currentColor",black:"#000",white:{800:"#E4E3E3",700:"#F2F2F2",600:"#FAFAFA",500:"#FFFFFF",DEFAULT:"#FFFFFF"},"negative-red":{800:"#8D1010",700:"#931010",500:"#E61E1E",100:"#FFDDDD",50:"#FDEDED",alternative:"#FF5C5C"},"positive-green":{800:"#2F6407",500:"#5CC30E",100:"#D5FBC7",50:"#EAFDE3",alternative:"#62FF5C"},amber:{800:"#944D0B",500:"#E19F23",100:"#FFF6C2",50:"#FFFAE0",alternative:"#FFE75C"},indigo:{900:"#1349B6",800:"#1B58D2",700:"#2F6FF0",600:"#528AFA",500:"#8EB3FB",400:"#A5C2FC",300:"#BBD1FD",200:"#C7D9FD",100:"#E3ECFE",50:"#F1F6FF"},storm:{800:"#020815",700:"#080F1C",600:"#0F1622",500:"#181E29",400:"#464B54",300:"#74787F",200:"#A3A5A9",100:"#D1D2D4",50:"#E8E8EA"},hurricane:{900:"#020815",800:"#181E29",700:"#232934",600:"#2E343E",500:"#363C46",400:"#464B54",300:"#74787F",200:"#A3A5A9",100:"#D1D2D4",50:"#E8E8EA"},"off-white":{800:"#D5D0C3",700:"#DEDBD5",600:"#ECEAE5",500:"#F3F1ED",400:"#F5F4F1",300:"#F8F7F4",200:"#FAF9F8",100:"#FDFCFB",50:"#FEFEFD"}},boxShadow:R,dropShadow:R,extend:{animation:L.animation,keyframes:L.keyframes,fontFamily:{geist:["Geist","serif"],ambit:["Ambit","sans-serif"]},scale:{flip:"-1"},rotate:_,fontSize:k.fontSize,lineHeight:k.lineHeight,zIndex:{"floating-menu":"190",dropdown:"200","navbar-topbar":"280","navbar-backdrop":"290",navbar:"300",tooltip:"400",datepicker:"401",backdrop:"490",drawer:"500","drawer-header":"501",modal:"600",toast:"700"},screens:t,width:{unset:"unset",inherit:"inherit","content-mobile":"100%","content-1280":"62rem","content-1440":"71rem","content-1536":"77rem","content-1680":"83rem","sidebar-desktop-login":"100%","content-desktop-login":"21rem"},height:{unset:"unset",inherit:"inherit"},spacing:{"content-mobile-x":"1rem","content-mobile-y":"1.5rem","content-desktop-x":"2rem","content-desktop-y":"2rem",18:"4.5rem"},aspectRatio:{branding:"23/24"}}},plugins:[O,y,Y,I]}),$=e=>e.replaceAll(/[A-Z]/g,(e=>`_${e.toLowerCase()}`)),M=e=>e.toLowerCase().replaceAll(/([_-][a-z])/g,(e=>e.toUpperCase().replace("-","").replace("_",""))),z=e=>e.replaceAll("-"," "),U=e=>e.replaceAll(/\w\S*/g,(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()));export{$ as camelToSnakeCase,z as kebabToSpaces,X as paperless,M as snakeToCamelCase,U as titleCase}
|
|
1
|
+
import{s as t}from"./p-CWO2YJCh.js";export{g as getScreenSize,b as getScreenSizeInPixels,a as getScreenSizeInRem,d as isBetweenScreens,i as isBiggerThanScreen,j as isDesktop,f as isMobile,c as isSmallerThanScreen,h as isTablet,e as isTouchDevice}from"./p-CWO2YJCh.js";export{i as initTheme,o as onStateChange,s as state,a as stateLocaleOptions,b as stateThemeOptions}from"./p-6XOzWrsN.js";export{c as childOf,a as childOfComposed}from"./p-TyZ7uPES.js";export{c as categorized,i as icons}from"./p-DPmts3W0.js";export{f as formatTranslation,g as getLocaleComponentStrings}from"./p-CwQG70_4.js";export{f as floatingMenuContainerClass,g as getTableCellColumnClasses,a as getTableCellSizes}from"./p-DeWIZIsV.js";export{o as objectGetByPath}from"./p-CLLU0oUD.js";export{i as isMobileBrowser}from"./p-DPc49L2n.js";export{c as cn}from"./p-xs4N_Y-0.js";export{P as PAGINATION_DEFAULT_PAGE_SIZE,a as PAGINATION_DEFAULT_PAGE_SIZE_OPTIONS,S as SELECT_DEFAULT_MAX_DISPLAYED_ITEMS,T as TABLE_COLUMN_SIZES}from"./p-CEaB2BT0.js";import"./p-yFtRjnrU.js";import"./p-CBWjHURv.js";import"./p-ChV9xqsO.js";function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n,l,m,p,v,u,x={},F={};function w(){return l||(l=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r}});const a=t((n||(n=1,function(e){function a(e,a){return{handler:e,config:a}}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}}),a.withOptions=function(e,a=()=>({})){const t=function(t){return{__options:t,handler:e(t),config:a(t)}};return t.__isOptionsFunction=!0,t.__pluginFunction=e,t.__configFunction=a,t};const t=a}(F)),F));function t(e){return e&&e.__esModule?e:{default:e}}const r=a.default}(x)),x}function E(){if(p)return m;p=1;let e=w();return m=(e.__esModule?e:{default:e}).default}var C,D,B=function(){if(u)return v;u=1;const e=E(),a={position:"relative",paddingBottom:"calc(var(--tw-aspect-h) / var(--tw-aspect-w) * 100%)"},t={position:"absolute",height:"100%",width:"100%",top:"0",right:"0",bottom:"0",left:"0"},r={".aspect-none":{position:"static",paddingBottom:"0"},".aspect-none > *":{position:"static",height:"auto",width:"auto",top:"auto",right:"auto",bottom:"auto",left:"auto"}},s=e((function({addComponents:e,matchComponents:s,theme:n,variants:o,e:i}){const l=n("aspectRatio");if(s)return s({"aspect-w":e=>[{...a,"--tw-aspect-w":e},{"> *":t}],"aspect-h":e=>({"--tw-aspect-h":e})},{values:l}),void e(r);const m=Object.entries(l).map((([e,a])=>`.${i(`aspect-w-${e}`)}`)).join(",\n"),f=Object.entries(l).map((([e,a])=>`.${i(`aspect-w-${e}`)} > *`)).join(",\n");e([{[m]:a,[f]:t},r,Object.entries(l).map((([e,a])=>({[`.${i(`aspect-w-${e}`)}`]:{"--tw-aspect-w":a}}))),Object.entries(l).map((([e,a])=>({[`.${i(`aspect-h-${e}`)}`]:{"--tw-aspect-h":a}})))],o("aspectRatio"))}),{theme:{aspectRatio:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",14:"14",15:"15",16:"16"}},variants:{aspectRatio:["responsive"]}});return v=s}(),O=r(B),y=r(function(){if(D)return C;D=1;const e=E()((function({addUtilities:e}){e({".scrollbar-hide":{"-ms-overflow-style":"none","scrollbar-width":"none","&::-webkit-scrollbar":{display:"none"}},".scrollbar-default":{"-ms-overflow-style":"auto","scrollbar-width":"auto","&::-webkit-scrollbar":{display:"block"}}},["responsive"])}));return C=e}()),I=r(E());const A=({addVariant:e})=>{e("has-hover","@media (hover: hover)"),e("no-hover","@media (hover: none)"),e("hover-never","@media (hover: hover) { &:hover }"),e("group-hover-never","@media (hover: hover) { :merge(.group):hover & }"),e("peer-hover-never","@media (hover: hover) { :merge(.peer):hover & }"),e("hover-always",["@media (hover: hover) { &:hover }","@media (hover: none)"]),e("group-hover-always",["@media (hover: hover) { :merge(.group):hover & }","@media (hover: none)"]),e("peer-hover-always",["@media (hover: hover) { :merge(.peer):hover & }","@media (hover: none)"])},Y=({addUtilities:e})=>{e({".m-safe":{marginTop:"env(safe-area-inset-top)",marginRight:"env(safe-area-inset-right)",marginBottom:"env(safe-area-inset-bottom)",marginLeft:"env(safe-area-inset-left)"},".mx-safe":{marginRight:"env(safe-area-inset-right)",marginLeft:"env(safe-area-inset-left)"},".my-safe":{marginTop:"env(safe-area-inset-top)",marginBottom:"env(safe-area-inset-bottom)"},".my-safe-2":{marginTop:"calc(env(safe-area-inset-top)+0.5rem)",marginBottom:"calc(env(safe-area-inset-bottom)+0.5rem)"},".mt-safe":{marginTop:"env(safe-area-inset-top)"},".mr-safe":{marginRight:"env(safe-area-inset-right)"},".mb-safe":{marginBottom:"env(safe-area-inset-bottom)"},".ml-safe":{marginLeft:"env(safe-area-inset-left)"},".p-safe":{paddingTop:"env(safe-area-inset-top)",paddingRight:"env(safe-area-inset-right)",paddingBottom:"env(safe-area-inset-bottom)",paddingLeft:"env(safe-area-inset-left)"},".px-safe":{paddingRight:"env(safe-area-inset-right)",paddingLeft:"env(safe-area-inset-left)"},".py-safe":{paddingTop:"env(safe-area-inset-top)",paddingBottom:"env(safe-area-inset-bottom)"},".py-safe-2":{paddingTop:"calc(env(safe-area-inset-top)+0.5rem)",paddingBottom:"calc(env(safe-area-inset-bottom)+0.5rem)"},".pt-safe":{paddingTop:"env(safe-area-inset-top)"},".pr-safe":{paddingRight:"env(safe-area-inset-right)"},".pb-safe":{paddingBottom:"env(safe-area-inset-bottom)"},".pl-safe":{paddingLeft:"env(safe-area-inset-left)"},".min-h-screen":{minHeight:"100vh"},".min-h-screen-safe":{minHeight:"calc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)))"},".max-h-screen":{maxHeight:"100vh"},".max-h-screen-safe":{maxHeight:"calc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)))"},".h-screen-safe":{height:"calc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)))"},".min-w-screen":{minWidth:"100vw"},".min-w-screen-safe":{minWidth:"calc(100vw - (env(safe-area-inset-left) + env(safe-area-inset-right)))"},".max-w-screen":{maxWidth:"100vw"},".max-w-screen-safe":{maxWidth:"calc(100vw - (env(safe-area-inset-left) + env(safe-area-inset-right)))"},".w-screen-safe":{width:"calc(100vw - (env(safe-area-inset-left) + env(safe-area-inset-right)))"}})};var L={animation:{"fade-in":"forwards fadeIn .2s ease","fade-out":"forwards fadeOut .2s ease","slide-in-right":"forwards slideInRight .5s ease","slide-in-left":"forwards slideInLeft .5s ease","slide-in-top":"forwards slideInTop .25 ease","slide-in-bottom":"forwards slideInBottom .5s ease","slide-in-right-small":"forwards slideInRightSmall .5s ease","slide-in-left-small":"forwards slideInLeftSmall .5s ease","slide-in-top-small":"forwards slideInTopSmall .5s ease","slide-in-bottom-small":"forwards slideInBottomSmall .5s ease","slide-out-right":"forwards slideOutRight .2s ease","slide-out-left":"forwards slideOutLeft .2s ease","slide-out-top":"forwards slideOutTop .2s ease","slide-out-bottom":"forwards slideOutBottom .5s ease","slide-out-top-small":"forwards slideOutTopSmall .5s ease","slide-out-bottom-small":"forwards slideOutBottomSmall .5s ease","floating-menu-container-out":"forwards floatingMenuContainerOut .5s ease","floating-menu-container-in":"forwards floatingMenuContainerIn .5s ease",wave:"wave .5s ease-in-out -0.5s infinite alternate forwards"},keyframes:{fadeIn:{"0%":{opacity:"0"},"100%":{opacity:"100"}},fadeOut:{"0%":{opacity:"100"},"100%":{opacity:"0"}},slideInRight:{"0%":{transform:"translateX(100%)"},"100%":{transform:"translateX(0)"}},slideInLeft:{"0%":{transform:"translateX(-100%)"},"100%":{transform:"translateX(0)"}},slideInTop:{"0%":{transform:"translateY(-100%)"},"100%":{transform:"translateY(0)"}},slideInBottom:{"0%":{transform:"translateY(100%)"},"100%":{transform:"translateY(0)"}},slideInRightSmall:{"0%":{transform:"translateX(20%)"},"100%":{transform:"translateX(0)"}},slideInLeftSmall:{"0%":{transform:"translateX(-20%)"},"100%":{transform:"translateX(0)"}},slideInTopSmall:{"0%":{transform:"translateY(-20%)"},"100%":{transform:"translateY(0)"}},slideInBottomSmall:{"0%":{transform:"translateY(20%)"},"100%":{transform:"translateY(0)"}},slideOutRight:{"0%":{transform:"translateX(0)"},"100%":{transform:"translateX(100%)"}},slideOutLeft:{"0%":{transform:"translateX(0)"},"100%":{transform:"translateX(-100%)"}},slideOutTop:{"0%":{transform:"translateY(0)"},"100%":{transform:"translateY(-100%)"}},slideOutBottom:{"0%":{transform:"translateY(0)"},"100%":{transform:"translateY(100%)"}},slideOutTopSmall:{"0%":{transform:"translateY(0)"},"100%":{transform:"translateY(-20%)"}},slideOutBottomSmall:{"0%":{transform:"translateY(0)"},"100%":{transform:"translateY(20%)"}},floatingMenuContainerOut:{"0%":{display:"flex",transform:"translateY(0)",opacity:"100"},"99%":{display:"flex",transform:"translateY(100%)",opacity:"0"},"100%":{display:"none",transform:"translateY(100%)",opacity:"0"}},floatingMenuContainerIn:{"0%":{display:"none",transform:"translateY(100%)",opacity:"0"},"1%":{display:"flex",transform:"translateY(100%)",opacity:"0"},"100%":{display:"flex",transform:"translateY(0)",opacity:"100"}},wave:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(-15deg)"}}}};const _={};for(let e=1;e<360;e++)_[`${e}`]=`${e}deg`,_[`-${e}`]=`-${e}deg`;var R={1:["0 1px 1px rgba(0, 2, 2, 0.08)"],2:["0 1px 1px rgba(0, 2, 2, 0.04)","0 2px 2px rgba(0, 2, 2, 0.04)","0 4px 4px rgba(0, 2, 2, 0.04)"],3:["0 1px 1px rgba(0, 2, 2, 0.08)","0 2px 2px rgba(0, 2, 2, 0.08)","0 4px 4px rgba(0, 2, 2, 0.08)"],modal:["0 0 0 1px rgba(0, 2, 2, 0.10)","0 1px 1px 0 rgba(0, 2, 2, 0.20)","0 2px 2px 0 rgba(0, 2, 2, 0.08)","0 4px 4px 0 rgba(0, 2, 2, 0.08)","0 8px 8px 0 rgba(0, 2, 2, 0.08)"],"supportive-lilac":"0px 1px 1px rgba(189, 140, 255, 0.20)","storm-10%":"0px 1px 0px rgba(3, 42, 36, 0.1)","primary-button":"0px 1px 1px 0px rgba(24, 30 41, 0.08)","off-white-600":"0px 0px 0px 1px #ECEAE5",inherit:"inherit",transparent:"transparent"},k={fontSize:{xxs:["0.5rem","1rem"],"3xl":["2rem","2.5rem"],"4xl":["2.5rem","3rem"]},lineHeight:{xs:"1rem",sm:"1.5rem",base:"1.5rem",lg:"1.75rem",xl:"1.75rem","2xl":"2rem","3xl":"2.5rem","4xl":"3rem"}};const X=I((e=>{Y(e),A(e)}),{theme:{colors:{inherit:"inherit",transparent:"transparent",current:"currentColor",black:"#000",white:{800:"#E4E3E3",700:"#F2F2F2",600:"#FAFAFA",500:"#FFFFFF",DEFAULT:"#FFFFFF"},"negative-red":{800:"#8D1010",700:"#931010",500:"#E61E1E",100:"#FFDDDD",50:"#FDEDED",alternative:"#FF5C5C"},"positive-green":{800:"#2F6407",500:"#5CC30E",100:"#D5FBC7",50:"#EAFDE3",alternative:"#62FF5C"},amber:{800:"#944D0B",500:"#E19F23",100:"#FFF6C2",50:"#FFFAE0",alternative:"#FFE75C"},indigo:{900:"#1349B6",800:"#1B58D2",700:"#2F6FF0",600:"#528AFA",500:"#8EB3FB",400:"#A5C2FC",300:"#BBD1FD",200:"#C7D9FD",100:"#E3ECFE",50:"#F1F6FF"},storm:{800:"#020815",700:"#080F1C",600:"#0F1622",500:"#181E29",400:"#464B54",300:"#74787F",200:"#A3A5A9",100:"#D1D2D4",50:"#E8E8EA"},hurricane:{900:"#020815",800:"#181E29",700:"#232934",600:"#2E343E",500:"#363C46",400:"#464B54",300:"#74787F",200:"#A3A5A9",100:"#D1D2D4",50:"#E8E8EA"},"off-white":{800:"#D5D0C3",700:"#DEDBD5",600:"#ECEAE5",500:"#F3F1ED",400:"#F5F4F1",300:"#F8F7F4",200:"#FAF9F8",100:"#FDFCFB",50:"#FEFEFD"}},boxShadow:R,dropShadow:R,extend:{animation:L.animation,keyframes:L.keyframes,fontFamily:{geist:["Geist","serif"],ambit:["Ambit","sans-serif"]},scale:{flip:"-1"},rotate:_,fontSize:k.fontSize,lineHeight:k.lineHeight,zIndex:{"floating-menu":"190",dropdown:"200","navbar-topbar":"280","navbar-backdrop":"290",navbar:"300",tooltip:"400",datepicker:"401",backdrop:"490",drawer:"500","drawer-header":"501",modal:"600",toast:"700"},screens:t,width:{unset:"unset",inherit:"inherit","content-mobile":"100%","content-1280":"62rem","content-1440":"71rem","content-1536":"77rem","content-1680":"83rem","sidebar-desktop-login":"100%","content-desktop-login":"21rem"},height:{unset:"unset",inherit:"inherit"},spacing:{"content-mobile-x":"1rem","content-mobile-y":"1.5rem","content-desktop-x":"2rem","content-desktop-y":"2rem",18:"4.5rem"},aspectRatio:{branding:"23/24"}}},plugins:[O,y,Y,A]}),$=e=>e.replaceAll(/[A-Z]/g,(e=>`_${e.toLowerCase()}`)),M=e=>e.toLowerCase().replaceAll(/([_-][a-z])/g,(e=>e.toUpperCase().replace("-","").replace("_",""))),U=e=>e.replaceAll("-"," "),z=e=>e.replaceAll(/\w\S*/g,(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()));export{$ as camelToSnakeCase,U as kebabToSpaces,X as paperless,M as snakeToCamelCase,z as titleCase}
|