@paperless/core 1.28.2 → 1.28.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/build/{p-008f1920.entry.js → p-b4cc7289.entry.js} +2 -2
  3. package/dist/{paperless/p-008f1920.entry.js.map → build/p-b4cc7289.entry.js.map} +1 -1
  4. package/dist/{paperless/p-682db916.entry.js → build/p-fffaacc2.entry.js} +2 -2
  5. package/dist/{paperless/p-682db916.entry.js.map → build/p-fffaacc2.entry.js.map} +1 -1
  6. package/dist/build/paperless.esm.js +1 -1
  7. package/dist/cjs/p-navigation-item.cjs.entry.js +1 -1
  8. package/dist/cjs/p-navigation-item.cjs.entry.js.map +1 -1
  9. package/dist/cjs/p-select.cjs.entry.js +1 -1
  10. package/dist/cjs/p-select.cjs.entry.js.map +1 -1
  11. package/dist/collection/components/molecules/navigation-item/navigation-item.component.js +1 -1
  12. package/dist/collection/components/molecules/navigation-item/navigation-item.component.js.map +1 -1
  13. package/dist/collection/components/molecules/select/select.component.js +1 -1
  14. package/dist/collection/components/molecules/select/select.component.js.map +1 -1
  15. package/dist/components/p-navigation-item.js +1 -1
  16. package/dist/components/p-navigation-item.js.map +1 -1
  17. package/dist/components/p-select.js +1 -1
  18. package/dist/components/p-select.js.map +1 -1
  19. package/dist/esm/p-navigation-item.entry.js +1 -1
  20. package/dist/esm/p-navigation-item.entry.js.map +1 -1
  21. package/dist/esm/p-select.entry.js +1 -1
  22. package/dist/esm/p-select.entry.js.map +1 -1
  23. package/dist/index.html +1 -1
  24. package/dist/paperless/{p-008f1920.entry.js → p-b4cc7289.entry.js} +2 -2
  25. package/dist/{build/p-008f1920.entry.js.map → paperless/p-b4cc7289.entry.js.map} +1 -1
  26. package/dist/{build/p-682db916.entry.js → paperless/p-fffaacc2.entry.js} +2 -2
  27. package/dist/{build/p-682db916.entry.js.map → paperless/p-fffaacc2.entry.js.map} +1 -1
  28. package/dist/paperless/paperless.esm.js +1 -1
  29. package/dist/sw.js +1 -1
  30. package/dist/sw.js.map +1 -1
  31. package/hydrate/index.js +2 -2
  32. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.28.4](https://github.com/ionic-team/stencil-component-starter/compare/v1.28.3...v1.28.4) (2024-04-08)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **Molecules/Navigation Item:** Don't show an empty 0 when 0 is passed ([0043cdb](https://github.com/ionic-team/stencil-component-starter/commit/0043cdbc46d1f2d6c9e40a266aa7c550e5b5cbf7))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.28.3](https://github.com/ionic-team/stencil-component-starter/compare/v1.28.2...v1.28.3) (2024-04-05)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **Molecules/Select:** Don't hide dropdown after items async loaded with autocomplete enabled ([0711652](https://github.com/ionic-team/stencil-component-starter/commit/0711652e95e3c270faf583bbecf58113d001b33f))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [1.28.2](https://github.com/ionic-team/stencil-component-starter/compare/v1.28.1...v1.28.2) (2024-03-29)
7
29
 
8
30
 
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,h as e,H as r,g as s}from"./p-e4d5e7a7.js";import{c as o}from"./p-4d330cfc.js";const n=".pointer-events-none{pointer-events:none!important}.pointer-events-auto{pointer-events:auto!important}.absolute{position:absolute!important}.relative{position:relative!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.flex{display:flex!important}.h-10{height:2.5rem!important}.h-8{height:2rem!important}.h-\\[1\\.625rem\\]{height:1.625rem!important}.w-full{width:100%!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}.overflow-hidden{overflow:hidden!important}.rounded{border-radius:.25rem!important}.border-b{border-bottom-width:1px!important}.border-l{border-left-width:1px!important}.border-r{border-right-width:1px!important}.border-solid{border-style:solid!important}.border-indigo{--tw-border-opacity:1!important;border-color:rgb(82 138 250/var(--tw-border-opacity))!important}.border-mystic-dark{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important}.bg-indigo-light{background-color:rgb(241 246 255/var(--tw-bg-opacity))!important}.bg-indigo-light,.bg-white{--tw-bg-opacity:1!important}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.px-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.py-4{padding-bottom:1rem!important;padding-top:1rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-semibold{font-weight:600!important}.text-indigo{--tw-text-opacity:1!important;color:rgb(82 138 250/var(--tw-text-opacity))!important}.text-indigo-dark{--tw-text-opacity:1!important;color:rgb(44 75 169/var(--tw-text-opacity))!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}.outline-none{outline:2px solid transparent!important;outline-offset:2px!important}*{box-sizing:border-box}p-select{display:flex;flex-direction:column;position:relative;text-overflow:ellipsis;width:100%}p-select .p-input{--tw-text-opacity:1;--tw-bg-opacity:1;--tw-border-opacity:1!important;align-items:center;background-color:rgb(255 255 255/var(--tw-bg-opacity));border-color:rgb(218 230 240/var(--tw-border-opacity))!important;border-radius:.375rem;border-style:solid!important;border-width:1px;color:rgb(39 40 56/var(--tw-text-opacity));display:flex;font-size:1rem;height:2.5rem;justify-content:flex-start;line-height:1.5rem;outline:2px solid transparent!important;outline-offset:2px!important;padding-left:1rem;padding-right:1rem;width:100%!important}p-select .p-input::-moz-placeholder{--tw-text-opacity:1;color:rgb(128 130 158/var(--tw-text-opacity));font-size:1rem;line-height:1.5rem}p-select .p-input::placeholder{--tw-text-opacity:1;color:rgb(128 130 158/var(--tw-text-opacity));font-size:1rem;line-height:1.5rem}p-select .p-input.active,p-select .p-input.focus,p-select .p-input:focus,p-select .p-input:focus-visible,p-select .p-input:focus-within,p-select .p-input[active]{--tw-border-opacity:1!important;border-color:rgb(82 138 250/var(--tw-border-opacity))!important;outline:2px solid transparent!important;outline-offset:2px!important}p-select .p-input.size-small{font-size:.875rem;height:2rem!important;line-height:1.25rem}p-select .p-input.size-small::-moz-placeholder{font-size:.875rem;line-height:1.25rem}p-select .p-input.size-small::placeholder{font-size:.875rem;line-height:1.25rem}p-select .multi-container{align-items:center;bottom:0;display:flex;gap:.5rem;height:2.5rem;left:0;overflow:hidden;padding:1rem .5rem;pointer-events:none;position:absolute;width:100%}p-select .multi-container.size-small{height:2rem;padding:.5rem .25rem}p-select .multi-container .item{--tw-bg-opacity:1;--tw-text-opacity:1;align-items:center;background-color:rgb(241 246 255/var(--tw-bg-opacity));border-radius:.25rem;color:rgb(44 75 169/var(--tw-text-opacity));cursor:pointer;display:flex;font-size:.875rem;font-weight:600;gap:.5rem;height:1.625rem;line-height:1.25rem;padding-left:.5rem;padding-right:.5rem;pointer-events:auto;white-space:nowrap}p-select .multi-container .item p-icon{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity));font-size:.75rem;line-height:1rem}p-select .multi-container .extra{--tw-text-opacity:1;color:rgb(128 130 158/var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem;pointer-events:none}.static{position:static!important}.sticky{position:sticky!important}.top-0{top:0!important}.top-2{top:.5rem!important}.-mt-2{margin-top:-.5rem!important}.mb-2{margin-bottom:.5rem!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.justify-center{justify-content:center!important}.gap-1{gap:.25rem!important}.p-2{padding:.5rem!important}.pb-1{padding-bottom:.25rem!important}.pt-2{padding-top:.5rem!important}.text-center{text-align:center!important}.text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.blur{--tw-blur:blur(8px)!important}.blur,.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)!important}";const h=class{constructor(e){t(this,e);this.queryChange=i(this,"queryChange",3);this.valueChange=i(this,"valueChange",3);this.selectAllChange=i(this,"selectAllChange",3);this.dropdownShown=i(this,"dropdownShown",3);this.add=i(this,"add",3);this.items=undefined;this.multi=undefined;this.icon=undefined;this.query=undefined;this.placeholder=undefined;this.autocompletePlaceholder="Search...";this.value=undefined;this.displayKey="text";this.dropdownDisplayKey=undefined;this.selectionDisplayKey=undefined;this.valueKey=undefined;this.avatarKey=undefined;this.avatarLettersKey=undefined;this.identifierKey=undefined;this.queryKey=undefined;this.autoSelectFirst=true;this.showChevron=true;this.maxDisplayedItems=10;this.enableAutocomplete=true;this.asyncFilter=false;this.loading=false;this.enableSelectAll=false;this.selectAllText="Select all";this.selectAllIcon=undefined;this.size="medium";this.prefix=undefined;this.label=undefined;this.helper=undefined;this.required=undefined;this.error=undefined;this.disabled=false;this.showAddItem=false;this.addItemText="Add item";this.emptyStateText="No items available";this._showDropdown=false;this._selectedItem=null;this._allSelected=false;this._amountHidden=0}get _items(){var t;if(!this.items||this.loading){return[]}let i=typeof this.items==="string"?JSON.parse(this.items):this.items;if(typeof(i===null||i===void 0?void 0:i[0])==="string"){this.displayKey="text";this.valueKey="value";i=i.map((t=>({value:t,text:t})))}if(((t=this.query)===null||t===void 0?void 0:t.length)&&!this.asyncFilter){i=i.filter((t=>{if(this.queryKey){return this._checkvalue(this.queryKey,t)}return this._checkvalue(this._identifierKey,t)||this._checkvalue(this.displayKey,t)}))}return i===null||i===void 0?void 0:i.slice(0,this.maxDisplayedItems)}get _displayValue(){var t,i,e,r;if(this.multi){if(!((t=this._selectedItem)===null||t===void 0?void 0:t.length)){return[]}return(i=this._selectedItem)===null||i===void 0?void 0:i.map((t=>t===null||t===void 0?void 0:t[this.displayKey])).filter((t=>!!t))}return(e=this._selectedItem)===null||e===void 0?void 0:e[(r=this.selectionDisplayKey)!==null&&r!==void 0?r:this.displayKey]}get _identifierKey(){var t,i;return(i=(t=this.identifierKey)!==null&&t!==void 0?t:this.valueKey)!==null&&i!==void 0?i:"value"}componentDidLoad(){if(!this.valueKey&&!this.identifierKey){throw new Error("You must provide a valueKey or identifierKey")}if(this.multi){this._setMultiContainerMaxWidth();this._resizeObserver=new ResizeObserver((()=>{if(this._resizeDebounceTimer){clearTimeout(this._resizeDebounceTimer);this._resizeDebounceTimer=null}this._resizeDebounceTimer=setTimeout((()=>{this._setMultiContainerMaxWidth();this._checkSelectedItems()}),200)}));this._resizeObserver.observe(this._el)}if(this.value){this._valueChange();return}this.itemChanges()}componentDidRender(){if(this.multi){this._setMultiContainerMaxWidth();this._checkSelectedItems()}}disconnectedCallback(){if(this.multi){this._resizeObserver.disconnect()}}render(){var t,i;return e(r,{class:"p-select"},e("p-dropdown",{disableTriggerClick:true,calculateWidth:true,insideClick:true,scrollable:true,show:this._showDropdown,onIsOpen:t=>this._onDropdownOpen(t)},e("p-input-group",{slot:"trigger",icon:this.icon,size:this.size,prefix:this.prefix,label:this.label,helper:this.helper,required:this.required,error:this.error,disabled:this.disabled,focused:this._showDropdown,focusMethod:"click"},e("input",{slot:"input",type:"text",placeholder:this.placeholder,value:this.multi&&((t=this._displayValue)===null||t===void 0?void 0:t.length)?" ":this._displayValue,class:"p-input cursor-pointer read-only",onFocus:t=>this._onFocus(t),onMouseDown:t=>this._onMouseDown(t),onClick:()=>this._onClick(),ref:t=>this._inputRef=t}),this.showChevron&&e("p-icon",{variant:"chevron",slot:"suffix"})),e("div",{slot:"items"},this.loading?this._getLoadingItems():this._getItems(),this.showAddItem&&this._getAddItem())),this.multi&&((i=this._selectedItem)===null||i===void 0?void 0:i.length)>0&&e("div",{class:`multi-container size-${this.size}`,ref:t=>this._multiContainerRef=t},this._selectedItem.map((t=>{var i;return e("div",{class:"item",onClick:()=>this._selectValue(t)},t[(i=this.selectionDisplayKey)!==null&&i!==void 0?i:this.displayKey],e("p-icon",{variant:"negative"}))})),e("div",{class:"extra hidden"},"+",this._amountHidden)))}documentClickHandler({target:t}){if(!this._showDropdown||o(t,this._el)){return}this._showDropdown=false}_valueChange(){this._preselectItem()}itemChanges(){this._preselectItem()}_showDropdownChanges(){this.dropdownShown.emit({value:this._showDropdown,query:this.query})}multiChanges(){if(this._selectedItem&&!Array.isArray(this._selectedItem)){this._selectedItem=[]}}_preselectItem(){var t,i;let e=typeof this.value==="string"&&this.multi?JSON.parse(this.value):this.value;if(this.multi){if(!Array.isArray(e)){this.value=[];this.valueChange.emit(this.value);return}this.value=e;if(!e.length){this._selectedItem=[];return}this._selectedItem=!!this.valueKey&&this.valueKey!=="false"?this._items.filter((t=>e.includes(t===null||t===void 0?void 0:t[this.valueKey]))):[...e];return}if(!this._selectedItem&&!e&&this.autoSelectFirst){e=this._items[0]}const r=typeof e==="object"&&e!==null?e[this._identifierKey]:e;const s=typeof r==="string"||typeof r==="number"?r:JSON.stringify(r);const o=this._selectedItem?(t=this._selectedItem)===null||t===void 0?void 0:t[this._identifierKey]:null;const n=typeof o==="string"||typeof o==="number"?o:JSON.stringify(o);if(this._selectedItem&&n===s){return}if(!((i=this._items)===null||i===void 0?void 0:i.length)&&e){this._selectValue(e,false);return}const h=this._items.find((t=>{const i=t===null||t===void 0?void 0:t[this._identifierKey];const e=typeof i==="string"||typeof i==="number"?i:JSON.stringify(i);return e===s}));this._selectValue(!!h?h:e,false)}_selectValue(t,i=true){let e=!!this.valueKey&&this.valueKey!=="false"&&t!==null?t===null||t===void 0?void 0:t[this.valueKey]:t;if(this.multi){if(!this._selectedItem||!Array.isArray(this._selectedItem)){this._selectedItem=[]}if(!this.value||!Array.isArray(this.value)){this.value=[]}const i=[...this._selectedItem];const r=[...this.value];const s=i.findIndex((i=>i[this._identifierKey]===t[this._identifierKey]));if(s===-1){i.push(t);r.push(e)}else{i.splice(s,1);r.splice(s,1)}this._selectedItem=i;this.value=r;this.valueChange.emit(r);return}this._selectedItem=t;this.value=e;this.valueChange.emit(e);this._onBlur(i)}_onFocus(t){t.preventDefault();this._inputRef.blur();if(!this._showDropdown){this._showDropdown=true}return}_onMouseDown(t){if(this.enableAutocomplete){return}t.preventDefault()}_onClick(){if(this.enableAutocomplete){return}this._showDropdown=!this._showDropdown}_onBlur(t=false){if(!this.enableAutocomplete&&!t){return}this._showDropdown=false}_onAutoComplete(t){if(!this.enableAutocomplete){return}this._showDropdown=true;this.query=t.target.value;this.queryChange.emit(t.target.value)}_checkvalue(t,i){var e,r,s;return((r=(e=i===null||i===void 0?void 0:i[t])===null||e===void 0?void 0:e.toString())===null||r===void 0?void 0:r.toLowerCase().indexOf((s=this.query)===null||s===void 0?void 0:s.toLowerCase()))>=0}_getItems(){var t;let i=this._items.map((t=>{var i,r;return e("p-dropdown-menu-item",{onClick:()=>this._selectValue(t),active:this.multi&&!!this._selectedItem&&Array.isArray(this._selectedItem)?this._selectedItem.findIndex((i=>i[this._identifierKey]===t[this._identifierKey]))>=0:t[this._identifierKey]===((i=this._selectedItem)===null||i===void 0?void 0:i[this._identifierKey]),variant:this.multi?"checkbox":"default"},this.avatarKey?e("span",{class:"flex items-center gap-2"},e("p-avatar",{size:"xsmall",src:t[this.avatarKey],letters:t[this.avatarLettersKey]}),t[(r=this.dropdownDisplayKey)!==null&&r!==void 0?r:this.displayKey]):t[this.displayKey])}));if(!this._items.length){i=[e("p",{class:"w-full p-2 text-storm-medium text-sm text-center"},this.emptyStateText)]}if(this.enableSelectAll&&this._items.length){i.unshift(e("p-dropdown-menu-item",{variant:"checkbox",onClick:()=>this._selectAllChange(),active:this._allSelected},((t=this.selectAllIcon)===null||t===void 0?void 0:t.length)?e("span",{class:"flex items-center gap-2"},e("div",{class:"w-6 justify-center flex text-lg"},e("p-icon",{variant:this.selectAllIcon})),this.selectAllText):this.selectAllText))}if(this.enableAutocomplete){i.unshift(this._getAutoCompleteItem())}return i}_getAddItem(){return e("p-dropdown-menu-item",{onClick:()=>this.add.emit()},e("span",{class:"text-indigo font-semibold flex gap-1 items-center"},this.addItemText,e("p-icon",{variant:"plus"})))}_getLoadingItems(){const t=[0,0,0].map((()=>e("p-dropdown-menu-item",{enableHover:false},e("p-loader",{variant:"ghost",class:"h-6 w-full rounded"}))));if(this.enableAutocomplete){t.unshift(this._getAutoCompleteItem())}return t}_getAutoCompleteItem(){return e("div",{class:"bg-white sticky top-0 pt-2 pb-1 -mt-2"},e("input",{class:"p-input size-small mb-2 sticky top-2",placeholder:this.autocompletePlaceholder,onInput:t=>this._onAutoComplete(t),ref:t=>this.autocompleteInputRef=t}))}_setMultiContainerMaxWidth(){if(!this._inputRef||!this._multiContainerRef){return}this._multiContainerRef.style.maxWidth=`${this._inputRef.clientWidth-16}px`}_checkSelectedItems(){if(!this._multiContainerRef){return}const t=this._multiContainerRef.getBoundingClientRect();const i=Array.from(this._multiContainerRef.querySelectorAll(".item"));let e=0;for(const r of i){r.classList.remove("hidden");const i=r.getBoundingClientRect();if(i.right>t.right){r.classList.add("hidden");e++}}this._amountHidden=e;const r=this._multiContainerRef.querySelector(".extra");if(!r){return}if(!r.classList.contains("hidden")){r.classList.add("hidden")}if(e>0){r.classList.remove("hidden")}}_onDropdownOpen(t){if(!t.detail||!this.autocompleteInputRef){return}this.autocompleteInputRef.focus()}_selectAllChange(){this._allSelected=!this._allSelected;this.selectAllChange.emit(this._allSelected)}get _el(){return s(this)}static get watchers(){return{value:["_valueChange"],items:["itemChanges"],_showDropdown:["_showDropdownChanges"],multi:["multiChanges"]}}};h.style=n;export{h as p_select};
2
- //# sourceMappingURL=p-008f1920.entry.js.map
1
+ import{r as t,c as i,h as e,H as r,g as s}from"./p-e4d5e7a7.js";import{c as o}from"./p-4d330cfc.js";const n=".pointer-events-none{pointer-events:none!important}.pointer-events-auto{pointer-events:auto!important}.absolute{position:absolute!important}.relative{position:relative!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.flex{display:flex!important}.h-10{height:2.5rem!important}.h-8{height:2rem!important}.h-\\[1\\.625rem\\]{height:1.625rem!important}.w-full{width:100%!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}.overflow-hidden{overflow:hidden!important}.rounded{border-radius:.25rem!important}.border-b{border-bottom-width:1px!important}.border-l{border-left-width:1px!important}.border-r{border-right-width:1px!important}.border-solid{border-style:solid!important}.border-indigo{--tw-border-opacity:1!important;border-color:rgb(82 138 250/var(--tw-border-opacity))!important}.border-mystic-dark{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important}.bg-indigo-light{background-color:rgb(241 246 255/var(--tw-bg-opacity))!important}.bg-indigo-light,.bg-white{--tw-bg-opacity:1!important}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.px-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.py-4{padding-bottom:1rem!important;padding-top:1rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-semibold{font-weight:600!important}.text-indigo{--tw-text-opacity:1!important;color:rgb(82 138 250/var(--tw-text-opacity))!important}.text-indigo-dark{--tw-text-opacity:1!important;color:rgb(44 75 169/var(--tw-text-opacity))!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}.outline-none{outline:2px solid transparent!important;outline-offset:2px!important}*{box-sizing:border-box}p-select{display:flex;flex-direction:column;position:relative;text-overflow:ellipsis;width:100%}p-select .p-input{--tw-text-opacity:1;--tw-bg-opacity:1;--tw-border-opacity:1!important;align-items:center;background-color:rgb(255 255 255/var(--tw-bg-opacity));border-color:rgb(218 230 240/var(--tw-border-opacity))!important;border-radius:.375rem;border-style:solid!important;border-width:1px;color:rgb(39 40 56/var(--tw-text-opacity));display:flex;font-size:1rem;height:2.5rem;justify-content:flex-start;line-height:1.5rem;outline:2px solid transparent!important;outline-offset:2px!important;padding-left:1rem;padding-right:1rem;width:100%!important}p-select .p-input::-moz-placeholder{--tw-text-opacity:1;color:rgb(128 130 158/var(--tw-text-opacity));font-size:1rem;line-height:1.5rem}p-select .p-input::placeholder{--tw-text-opacity:1;color:rgb(128 130 158/var(--tw-text-opacity));font-size:1rem;line-height:1.5rem}p-select .p-input.active,p-select .p-input.focus,p-select .p-input:focus,p-select .p-input:focus-visible,p-select .p-input:focus-within,p-select .p-input[active]{--tw-border-opacity:1!important;border-color:rgb(82 138 250/var(--tw-border-opacity))!important;outline:2px solid transparent!important;outline-offset:2px!important}p-select .p-input.size-small{font-size:.875rem;height:2rem!important;line-height:1.25rem}p-select .p-input.size-small::-moz-placeholder{font-size:.875rem;line-height:1.25rem}p-select .p-input.size-small::placeholder{font-size:.875rem;line-height:1.25rem}p-select .multi-container{align-items:center;bottom:0;display:flex;gap:.5rem;height:2.5rem;left:0;overflow:hidden;padding:1rem .5rem;pointer-events:none;position:absolute;width:100%}p-select .multi-container.size-small{height:2rem;padding:.5rem .25rem}p-select .multi-container .item{--tw-bg-opacity:1;--tw-text-opacity:1;align-items:center;background-color:rgb(241 246 255/var(--tw-bg-opacity));border-radius:.25rem;color:rgb(44 75 169/var(--tw-text-opacity));cursor:pointer;display:flex;font-size:.875rem;font-weight:600;gap:.5rem;height:1.625rem;line-height:1.25rem;padding-left:.5rem;padding-right:.5rem;pointer-events:auto;white-space:nowrap}p-select .multi-container .item p-icon{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity));font-size:.75rem;line-height:1rem}p-select .multi-container .extra{--tw-text-opacity:1;color:rgb(128 130 158/var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem;pointer-events:none}.static{position:static!important}.sticky{position:sticky!important}.top-0{top:0!important}.top-2{top:.5rem!important}.-mt-2{margin-top:-.5rem!important}.mb-2{margin-bottom:.5rem!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.justify-center{justify-content:center!important}.gap-1{gap:.25rem!important}.p-2{padding:.5rem!important}.pb-1{padding-bottom:.25rem!important}.pt-2{padding-top:.5rem!important}.text-center{text-align:center!important}.text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.blur{--tw-blur:blur(8px)!important}.blur,.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)!important}";const h=class{constructor(e){t(this,e);this.queryChange=i(this,"queryChange",3);this.valueChange=i(this,"valueChange",3);this.selectAllChange=i(this,"selectAllChange",3);this.dropdownShown=i(this,"dropdownShown",3);this.add=i(this,"add",3);this.items=undefined;this.multi=undefined;this.icon=undefined;this.query=undefined;this.placeholder=undefined;this.autocompletePlaceholder="Search...";this.value=undefined;this.displayKey="text";this.dropdownDisplayKey=undefined;this.selectionDisplayKey=undefined;this.valueKey=undefined;this.avatarKey=undefined;this.avatarLettersKey=undefined;this.identifierKey=undefined;this.queryKey=undefined;this.autoSelectFirst=true;this.showChevron=true;this.maxDisplayedItems=10;this.enableAutocomplete=true;this.asyncFilter=false;this.loading=false;this.enableSelectAll=false;this.selectAllText="Select all";this.selectAllIcon=undefined;this.size="medium";this.prefix=undefined;this.label=undefined;this.helper=undefined;this.required=undefined;this.error=undefined;this.disabled=false;this.showAddItem=false;this.addItemText="Add item";this.emptyStateText="No items available";this._showDropdown=false;this._selectedItem=null;this._allSelected=false;this._amountHidden=0}get _items(){var t;if(!this.items||this.loading){return[]}let i=typeof this.items==="string"?JSON.parse(this.items):this.items;if(typeof(i===null||i===void 0?void 0:i[0])==="string"){this.displayKey="text";this.valueKey="value";i=i.map((t=>({value:t,text:t})))}if(((t=this.query)===null||t===void 0?void 0:t.length)&&!this.asyncFilter){i=i.filter((t=>{if(this.queryKey){return this._checkvalue(this.queryKey,t)}return this._checkvalue(this._identifierKey,t)||this._checkvalue(this.displayKey,t)}))}return i===null||i===void 0?void 0:i.slice(0,this.maxDisplayedItems)}get _displayValue(){var t,i,e,r;if(this.multi){if(!((t=this._selectedItem)===null||t===void 0?void 0:t.length)){return[]}return(i=this._selectedItem)===null||i===void 0?void 0:i.map((t=>t===null||t===void 0?void 0:t[this.displayKey])).filter((t=>!!t))}return(e=this._selectedItem)===null||e===void 0?void 0:e[(r=this.selectionDisplayKey)!==null&&r!==void 0?r:this.displayKey]}get _identifierKey(){var t,i;return(i=(t=this.identifierKey)!==null&&t!==void 0?t:this.valueKey)!==null&&i!==void 0?i:"value"}componentDidLoad(){if(!this.valueKey&&!this.identifierKey){throw new Error("You must provide a valueKey or identifierKey")}if(this.multi){this._setMultiContainerMaxWidth();this._resizeObserver=new ResizeObserver((()=>{if(this._resizeDebounceTimer){clearTimeout(this._resizeDebounceTimer);this._resizeDebounceTimer=null}this._resizeDebounceTimer=setTimeout((()=>{this._setMultiContainerMaxWidth();this._checkSelectedItems()}),200)}));this._resizeObserver.observe(this._el)}if(this.value){this._valueChange();return}this.itemChanges()}componentDidRender(){if(this.multi){this._setMultiContainerMaxWidth();this._checkSelectedItems()}}disconnectedCallback(){if(this.multi){this._resizeObserver.disconnect()}}render(){var t,i;return e(r,{class:"p-select"},e("p-dropdown",{disableTriggerClick:true,calculateWidth:true,insideClick:true,scrollable:true,show:this._showDropdown,onIsOpen:t=>this._onDropdownOpen(t)},e("p-input-group",{slot:"trigger",icon:this.icon,size:this.size,prefix:this.prefix,label:this.label,helper:this.helper,required:this.required,error:this.error,disabled:this.disabled,focused:this._showDropdown,focusMethod:"click"},e("input",{slot:"input",type:"text",placeholder:this.placeholder,value:this.multi&&((t=this._displayValue)===null||t===void 0?void 0:t.length)?" ":this._displayValue,class:"p-input cursor-pointer read-only",onFocus:t=>this._onFocus(t),onMouseDown:t=>this._onMouseDown(t),onClick:()=>this._onClick(),ref:t=>this._inputRef=t}),this.showChevron&&e("p-icon",{variant:"chevron",slot:"suffix"})),e("div",{slot:"items"},this.loading?this._getLoadingItems():this._getItems(),this.showAddItem&&this._getAddItem())),this.multi&&((i=this._selectedItem)===null||i===void 0?void 0:i.length)>0&&e("div",{class:`multi-container size-${this.size}`,ref:t=>this._multiContainerRef=t},this._selectedItem.map((t=>{var i;return e("div",{class:"item",onClick:()=>this._selectValue(t)},t[(i=this.selectionDisplayKey)!==null&&i!==void 0?i:this.displayKey],e("p-icon",{variant:"negative"}))})),e("div",{class:"extra hidden"},"+",this._amountHidden)))}documentClickHandler({target:t}){if(!this._showDropdown||o(t,this._el)){return}this._showDropdown=false}_valueChange(){this._preselectItem()}itemChanges(){this._preselectItem()}_showDropdownChanges(){this.dropdownShown.emit({value:this._showDropdown,query:this.query})}multiChanges(){if(this._selectedItem&&!Array.isArray(this._selectedItem)){this._selectedItem=[]}}_preselectItem(){var t,i;let e=typeof this.value==="string"&&this.multi?JSON.parse(this.value):this.value;if(this.multi){if(!Array.isArray(e)){this.value=[];this.valueChange.emit(this.value);return}this.value=e;if(!e.length){this._selectedItem=[];return}this._selectedItem=!!this.valueKey&&this.valueKey!=="false"?this._items.filter((t=>e.includes(t===null||t===void 0?void 0:t[this.valueKey]))):[...e];return}if(!this._selectedItem&&!e&&this.autoSelectFirst){e=this._items[0]}const r=typeof e==="object"&&e!==null?e[this._identifierKey]:e;const s=typeof r==="string"||typeof r==="number"?r:JSON.stringify(r);const o=this._selectedItem?(t=this._selectedItem)===null||t===void 0?void 0:t[this._identifierKey]:null;const n=typeof o==="string"||typeof o==="number"?o:JSON.stringify(o);if(this._selectedItem&&n===s){return}if(!((i=this._items)===null||i===void 0?void 0:i.length)&&e){this._selectValue(e,false);return}const h=this._items.find((t=>{const i=t===null||t===void 0?void 0:t[this._identifierKey];const e=typeof i==="string"||typeof i==="number"?i:JSON.stringify(i);return e===s}));this._selectValue(!!h?h:e,false)}_selectValue(t,i=true){let e=!!this.valueKey&&this.valueKey!=="false"&&t!==null?t===null||t===void 0?void 0:t[this.valueKey]:t;if(this.multi){if(!this._selectedItem||!Array.isArray(this._selectedItem)){this._selectedItem=[]}if(!this.value||!Array.isArray(this.value)){this.value=[]}const i=[...this._selectedItem];const r=[...this.value];const s=i.findIndex((i=>i[this._identifierKey]===t[this._identifierKey]));if(s===-1){i.push(t);r.push(e)}else{i.splice(s,1);r.splice(s,1)}this._selectedItem=i;this.value=r;this.valueChange.emit(r);return}this._selectedItem=t;this.value=e;this.valueChange.emit(e);this._onBlur(i)}_onFocus(t){t.preventDefault();this._inputRef.blur();if(!this._showDropdown){this._showDropdown=true}return}_onMouseDown(t){if(this.enableAutocomplete){return}t.preventDefault()}_onClick(){if(this.enableAutocomplete){return}this._showDropdown=!this._showDropdown}_onBlur(t=false){if(this.enableAutocomplete&&!t){return}this._showDropdown=false}_onAutoComplete(t){if(!this.enableAutocomplete){return}this._showDropdown=true;this.query=t.target.value;this.queryChange.emit(t.target.value)}_checkvalue(t,i){var e,r,s;return((r=(e=i===null||i===void 0?void 0:i[t])===null||e===void 0?void 0:e.toString())===null||r===void 0?void 0:r.toLowerCase().indexOf((s=this.query)===null||s===void 0?void 0:s.toLowerCase()))>=0}_getItems(){var t;let i=this._items.map((t=>{var i,r;return e("p-dropdown-menu-item",{onClick:()=>this._selectValue(t),active:this.multi&&!!this._selectedItem&&Array.isArray(this._selectedItem)?this._selectedItem.findIndex((i=>i[this._identifierKey]===t[this._identifierKey]))>=0:t[this._identifierKey]===((i=this._selectedItem)===null||i===void 0?void 0:i[this._identifierKey]),variant:this.multi?"checkbox":"default"},this.avatarKey?e("span",{class:"flex items-center gap-2"},e("p-avatar",{size:"xsmall",src:t[this.avatarKey],letters:t[this.avatarLettersKey]}),t[(r=this.dropdownDisplayKey)!==null&&r!==void 0?r:this.displayKey]):t[this.displayKey])}));if(!this._items.length){i=[e("p",{class:"w-full p-2 text-storm-medium text-sm text-center"},this.emptyStateText)]}if(this.enableSelectAll&&this._items.length){i.unshift(e("p-dropdown-menu-item",{variant:"checkbox",onClick:()=>this._selectAllChange(),active:this._allSelected},((t=this.selectAllIcon)===null||t===void 0?void 0:t.length)?e("span",{class:"flex items-center gap-2"},e("div",{class:"w-6 justify-center flex text-lg"},e("p-icon",{variant:this.selectAllIcon})),this.selectAllText):this.selectAllText))}if(this.enableAutocomplete){i.unshift(this._getAutoCompleteItem())}return i}_getAddItem(){return e("p-dropdown-menu-item",{onClick:()=>this.add.emit()},e("span",{class:"text-indigo font-semibold flex gap-1 items-center"},this.addItemText,e("p-icon",{variant:"plus"})))}_getLoadingItems(){const t=[0,0,0].map((()=>e("p-dropdown-menu-item",{enableHover:false},e("p-loader",{variant:"ghost",class:"h-6 w-full rounded"}))));if(this.enableAutocomplete){t.unshift(this._getAutoCompleteItem())}return t}_getAutoCompleteItem(){return e("div",{class:"bg-white sticky top-0 pt-2 pb-1 -mt-2"},e("input",{class:"p-input size-small mb-2 sticky top-2",placeholder:this.autocompletePlaceholder,onInput:t=>this._onAutoComplete(t),ref:t=>this.autocompleteInputRef=t}))}_setMultiContainerMaxWidth(){if(!this._inputRef||!this._multiContainerRef){return}this._multiContainerRef.style.maxWidth=`${this._inputRef.clientWidth-16}px`}_checkSelectedItems(){if(!this._multiContainerRef){return}const t=this._multiContainerRef.getBoundingClientRect();const i=Array.from(this._multiContainerRef.querySelectorAll(".item"));let e=0;for(const r of i){r.classList.remove("hidden");const i=r.getBoundingClientRect();if(i.right>t.right){r.classList.add("hidden");e++}}this._amountHidden=e;const r=this._multiContainerRef.querySelector(".extra");if(!r){return}if(!r.classList.contains("hidden")){r.classList.add("hidden")}if(e>0){r.classList.remove("hidden")}}_onDropdownOpen(t){if(!t.detail||!this.autocompleteInputRef){return}this.autocompleteInputRef.focus()}_selectAllChange(){this._allSelected=!this._allSelected;this.selectAllChange.emit(this._allSelected)}get _el(){return s(this)}static get watchers(){return{value:["_valueChange"],items:["itemChanges"],_showDropdown:["_showDropdownChanges"],multi:["multiChanges"]}}};h.style=n;export{h as p_select};
2
+ //# sourceMappingURL=p-b4cc7289.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["selectComponentCss","Select","_items","this","items","loading","JSON","parse","displayKey","valueKey","map","str","value","text","_a","query","length","asyncFilter","filter","item","queryKey","_checkvalue","_identifierKey","slice","maxDisplayedItems","_displayValue","multi","_selectedItem","_b","i","_c","_d","selectionDisplayKey","identifierKey","componentDidLoad","Error","_setMultiContainerMaxWidth","_resizeObserver","ResizeObserver","_resizeDebounceTimer","clearTimeout","setTimeout","_checkSelectedItems","observe","_el","_valueChange","itemChanges","componentDidRender","disconnectedCallback","disconnect","render","h","Host","class","disableTriggerClick","calculateWidth","insideClick","scrollable","show","_showDropdown","onIsOpen","ev","_onDropdownOpen","slot","icon","size","prefix","label","helper","required","error","disabled","focused","focusMethod","type","placeholder","onFocus","_onFocus","onMouseDown","_onMouseDown","onClick","_onClick","ref","_inputRef","showChevron","variant","_getLoadingItems","_getItems","showAddItem","_getAddItem","_multiContainerRef","_selectValue","_amountHidden","documentClickHandler","target","childOf","_preselectItem","_showDropdownChanges","dropdownShown","emit","multiChanges","Array","isArray","valueChange","includes","autoSelectFirst","identifier","parsedValue","stringify","currentValue","currentParsedValue","find","itemIdentifier","parsedItemIdentifier","forceBlur","selectedItem","valueArray","includesIndex","findIndex","push","splice","_onBlur","preventDefault","blur","enableAutocomplete","force","_onAutoComplete","queryChange","key","toString","toLowerCase","indexOf","active","avatarKey","src","letters","avatarLettersKey","dropdownDisplayKey","emptyStateText","enableSelectAll","unshift","_selectAllChange","_allSelected","selectAllIcon","selectAllText","_getAutoCompleteItem","add","addItemText","enableHover","autocompletePlaceholder","onInput","autocompleteInputRef","style","maxWidth","clientWidth","containerRect","getBoundingClientRect","from","querySelectorAll","amountHidden","child","classList","remove","childRect","right","extra","querySelector","contains","detail","focus","selectAllChange"],"sources":["src/components/molecules/select/select.component.scss?tag=p-select","src/components/molecules/select/select.component.tsx"],"sourcesContent":["@import '../../../style/form/mixins';\n\np-select {\n\t@apply flex w-full flex-col relative text-ellipsis;\n\n\t.p-input {\n\t\t@include inputDefaultState();\n\t}\n\n\t.multi-container {\n\t\t@apply absolute bottom-0 left-0 h-10 flex gap-2 items-center px-2 py-4 overflow-hidden pointer-events-none w-full;\n\n\t\t&.size-small {\n\t\t\t@apply px-1 py-2 h-8;\n\t\t}\n\n\t\t.item {\n\t\t\t@apply bg-indigo-light rounded px-2 flex gap-2 items-center cursor-pointer text-indigo-dark h-[1.625rem] text-sm font-semibold pointer-events-auto whitespace-nowrap;\n\n\t\t\tp-icon {\n\t\t\t\t@apply text-indigo text-xs;\n\t\t\t}\n\t\t}\n\n\t\t.extra {\n\t\t\t@apply text-sm text-storm-medium pointer-events-none;\n\t\t}\n\t}\n}\n","import {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tState,\n\tWatch,\n} from '@stencil/core';\n\nimport { childOf } from '../../../utils';\nimport { IconVariant } from '../../atoms/icon/icon.component';\n\n@Component({\n\ttag: 'p-select',\n\tstyleUrl: 'select.component.scss',\n\tshadow: false,\n})\nexport class Select {\n\t/**\n\t * The items to show in the dropdown\n\t */\n\t@Prop() items: string | any[];\n\n\t/**\n\t * Wether to enable multi select\n\t */\n\t@Prop({ reflect: true }) multi: boolean;\n\n\t/**\n\t * Icon of the select box\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * The current query\n\t */\n\t@Prop() query: string;\n\n\t/**\n\t * The placeholder of the input\n\t */\n\t@Prop() placeholder: string;\n\n\t/**\n\t * The placeholder of the input used for auto complete\n\t */\n\t@Prop() autocompletePlaceholder: string = 'Search...';\n\n\t/**\n\t * The current value\n\t */\n\t@Prop() value: any;\n\n\t/**\n\t * The key of the object to display\n\t */\n\t@Prop() displayKey: string = 'text';\n\n\t/**\n\t * The key of the object to display in the dropdown (overwrites displayKey)\n\t */\n\t@Prop() dropdownDisplayKey: string | undefined;\n\n\t/**\n\t * The key of the object to display in the input (overwrites displayKey)\n\t */\n\t@Prop() selectionDisplayKey: string | undefined;\n\n\t/**\n\t * The key of the object to return\n\t */\n\t@Prop() valueKey: string;\n\n\t/**\n\t * The key of avatar within an item to show\n\t */\n\t@Prop() avatarKey: string;\n\n\t/**\n\t * The key of avatar letters within an item to show when the avatar url doesn't work\n\t */\n\t@Prop() avatarLettersKey: string;\n\n\t/**\n\t * The key to identify an object\n\t */\n\t@Prop() identifierKey: string;\n\n\t/**\n\t * The key of the object to display\n\t */\n\t@Prop() queryKey?: string;\n\n\t/**\n\t * Wether to automatically select the first item\n\t */\n\t@Prop() autoSelectFirst: boolean = true;\n\n\t/**\n\t * Wether to show the chevron or not\n\t */\n\t@Prop() showChevron: boolean = true;\n\n\t/**\n\t * The maximum amount of items to display\n\t */\n\t@Prop() maxDisplayedItems: number = 10;\n\n\t/**\n\t * Wether to enable autocomplete\n\t */\n\t@Prop() enableAutocomplete: boolean = true;\n\n\t/**\n\t * Wether the input uses async filtering\n\t */\n\t@Prop() asyncFilter: boolean = false;\n\n\t/**\n\t * Wether to show loading items\n\t */\n\t@Prop() loading: boolean = false;\n\n\t/**\n\t * Wether to show the select all item with multi select\n\t */\n\t@Prop() enableSelectAll: boolean = false;\n\n\t/**\n\t * The text of the select all item\n\t */\n\t@Prop() selectAllText: string = 'Select all';\n\n\t/**\n\t * The icon to prefix for select all\n\t */\n\t@Prop() selectAllIcon: IconVariant | undefined;\n\n\t/**\n\t * Event when the query of the autocomplete changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tqueryChange: EventEmitter<string>;\n\n\t/**\n\t * Event when the value changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tvalueChange: EventEmitter<any>;\n\n\t/**\n\t * Event when the select all item has been selected or not\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tselectAllChange: EventEmitter<any>;\n\n\t/**\n\t * Event when the dropdown shows\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tdropdownShown: EventEmitter<any>;\n\n\t/**\n\t * The size of the input group used by the select\n\t */\n\t@Prop() size: 'small' | 'medium' = 'medium';\n\n\t/**\n\t * The prefix of the input group used by the select\n\t */\n\t@Prop() prefix: string;\n\n\t/**\n\t * The label of the input group used by the select\n\t */\n\t@Prop() label: string;\n\n\t/**\n\t * The helper of the input group used by the select\n\t */\n\t@Prop() helper: string;\n\n\t/**\n\t * Wether the field is required\n\t */\n\t@Prop({ reflect: true }) required: boolean;\n\n\t/**\n\t * The helper of the input group used by the select\n\t */\n\t@Prop({ reflect: true }) error: string;\n\n\t/**\n\t * Wether the input group is disabled used by the select\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether to show a \"add\" item\n\t */\n\t@Prop() showAddItem: boolean = false;\n\n\t/**\n\t * The text to show when add item is being shown\n\t */\n\t@Prop() addItemText: string = 'Add item';\n\n\t/**\n\t * Event when the add item is clicked\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tadd: EventEmitter;\n\n\t/**\n\t * The text to show when items is empty\n\t */\n\t@Prop() emptyStateText: string = 'No items available';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _showDropdown: any = false;\n\t@State() private _selectedItem: any = null;\n\n\t@State() private _allSelected: boolean = false;\n\n\t@State() private _amountHidden = 0;\n\n\tprivate _inputRef: HTMLInputElement;\n\tprivate autocompleteInputRef: HTMLInputElement;\n\tprivate _multiContainerRef: HTMLElement;\n\n\tprivate _resizeObserver: ResizeObserver;\n\tprivate _resizeDebounceTimer: NodeJS.Timer;\n\n\tget _items() {\n\t\tif (!this.items || this.loading) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet items =\n\t\t\ttypeof this.items === 'string'\n\t\t\t\t? JSON.parse(this.items)\n\t\t\t\t: this.items;\n\n\t\tif (typeof items?.[0] === 'string') {\n\t\t\tthis.displayKey = 'text';\n\t\t\tthis.valueKey = 'value';\n\n\t\t\titems = items.map((str) => ({\n\t\t\t\tvalue: str,\n\t\t\t\ttext: str,\n\t\t\t}));\n\t\t}\n\n\t\tif (this.query?.length && !this.asyncFilter) {\n\t\t\titems = items.filter((item) => {\n\t\t\t\tif (this.queryKey) {\n\t\t\t\t\treturn this._checkvalue(this.queryKey, item);\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\tthis._checkvalue(this._identifierKey, item) ||\n\t\t\t\t\tthis._checkvalue(this.displayKey, item)\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\n\t\treturn items?.slice(0, this.maxDisplayedItems);\n\t}\n\n\tget _displayValue() {\n\t\tif (this.multi) {\n\t\t\tif (!this._selectedItem?.length) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\treturn this._selectedItem\n\t\t\t\t?.map((i) => i?.[this.displayKey])\n\t\t\t\t.filter((i) => !!i);\n\t\t}\n\n\t\treturn this._selectedItem?.[\n\t\t\tthis.selectionDisplayKey ?? this.displayKey\n\t\t];\n\t}\n\n\tget _identifierKey() {\n\t\treturn this.identifierKey ?? this.valueKey ?? 'value';\n\t}\n\n\tcomponentDidLoad() {\n\t\tif (!this.valueKey && !this.identifierKey) {\n\t\t\tthrow new Error('You must provide a valueKey or identifierKey');\n\t\t}\n\n\t\tif (this.multi) {\n\t\t\tthis._setMultiContainerMaxWidth();\n\n\t\t\tthis._resizeObserver = new ResizeObserver(() => {\n\t\t\t\tif (this._resizeDebounceTimer) {\n\t\t\t\t\tclearTimeout(this._resizeDebounceTimer);\n\t\t\t\t\tthis._resizeDebounceTimer = null;\n\t\t\t\t}\n\n\t\t\t\tthis._resizeDebounceTimer = setTimeout(() => {\n\t\t\t\t\tthis._setMultiContainerMaxWidth();\n\t\t\t\t\tthis._checkSelectedItems();\n\t\t\t\t}, 200);\n\t\t\t});\n\t\t\tthis._resizeObserver.observe(this._el);\n\t\t}\n\n\t\tif (this.value) {\n\t\t\tthis._valueChange();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.itemChanges();\n\t}\n\n\tcomponentDidRender() {\n\t\tif (this.multi) {\n\t\t\tthis._setMultiContainerMaxWidth();\n\t\t\tthis._checkSelectedItems();\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tif (this.multi) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-select\">\n\t\t\t\t<p-dropdown\n\t\t\t\t\tdisableTriggerClick={true}\n\t\t\t\t\tcalculateWidth={true}\n\t\t\t\t\tinsideClick={true}\n\t\t\t\t\tscrollable={true}\n\t\t\t\t\tshow={this._showDropdown}\n\t\t\t\t\tonIsOpen={(ev) => this._onDropdownOpen(ev)}\n\t\t\t\t>\n\t\t\t\t\t<p-input-group\n\t\t\t\t\t\tslot=\"trigger\"\n\t\t\t\t\t\ticon={this.icon}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\tprefix={this.prefix}\n\t\t\t\t\t\tlabel={this.label}\n\t\t\t\t\t\thelper={this.helper}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\terror={this.error}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tfocused={this._showDropdown}\n\t\t\t\t\t\tfocusMethod=\"click\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tslot=\"input\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tthis.multi && this._displayValue?.length\n\t\t\t\t\t\t\t\t\t? ' '\n\t\t\t\t\t\t\t\t\t: this._displayValue\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tclass=\"p-input cursor-pointer read-only\"\n\t\t\t\t\t\t\tonFocus={(ev) => this._onFocus(ev)}\n\t\t\t\t\t\t\tonMouseDown={(ev) => this._onMouseDown(ev)}\n\t\t\t\t\t\t\tonClick={() => this._onClick()}\n\t\t\t\t\t\t\tref={(ref) => (this._inputRef = ref)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t{this.showChevron && (\n\t\t\t\t\t\t\t<p-icon variant=\"chevron\" slot=\"suffix\" />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</p-input-group>\n\t\t\t\t\t<div slot=\"items\">\n\t\t\t\t\t\t{this.loading\n\t\t\t\t\t\t\t? this._getLoadingItems()\n\t\t\t\t\t\t\t: this._getItems()}\n\t\t\t\t\t\t{this.showAddItem && this._getAddItem()}\n\t\t\t\t\t</div>\n\t\t\t\t</p-dropdown>\n\n\t\t\t\t{this.multi && this._selectedItem?.length > 0 && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={`multi-container size-${this.size}`}\n\t\t\t\t\t\tref={(ref) => (this._multiContainerRef = ref)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this._selectedItem.map((item) => (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass=\"item\"\n\t\t\t\t\t\t\t\tonClick={() => this._selectValue(item)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\titem[\n\t\t\t\t\t\t\t\t\t\tthis.selectionDisplayKey ??\n\t\t\t\t\t\t\t\t\t\t\tthis.displayKey\n\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t<p-icon variant=\"negative\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\n\t\t\t\t\t\t<div class=\"extra hidden\">+{this._amountHidden}</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler({ target }) {\n\t\tif (!this._showDropdown || childOf(target, this._el)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = false;\n\t}\n\n\t@Watch('value')\n\tprivate _valueChange() {\n\t\tthis._preselectItem();\n\t}\n\n\t@Watch('items')\n\tpublic itemChanges() {\n\t\tthis._preselectItem();\n\t}\n\n\t@Watch('_showDropdown')\n\tpublic _showDropdownChanges() {\n\t\tthis.dropdownShown.emit({\n\t\t\tvalue: this._showDropdown,\n\t\t\tquery: this.query,\n\t\t});\n\t}\n\n\t@Watch('multi')\n\tpublic multiChanges() {\n\t\tif (this._selectedItem && !Array.isArray(this._selectedItem)) {\n\t\t\tthis._selectedItem = [];\n\t\t}\n\t}\n\n\tprivate _preselectItem() {\n\t\tlet value =\n\t\t\ttypeof this.value === 'string' && this.multi\n\t\t\t\t? JSON.parse(this.value)\n\t\t\t\t: this.value;\n\n\t\tif (this.multi) {\n\t\t\tif (!Array.isArray(value)) {\n\t\t\t\tthis.value = [];\n\t\t\t\tthis.valueChange.emit(this.value);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.value = value;\n\t\t\tif (!value.length) {\n\t\t\t\tthis._selectedItem = [];\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._selectedItem =\n\t\t\t\t!!this.valueKey && this.valueKey !== 'false'\n\t\t\t\t\t? this._items.filter((i) =>\n\t\t\t\t\t\t\tvalue.includes(i?.[this.valueKey])\n\t\t\t\t\t\t)\n\t\t\t\t\t: [...value];\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._selectedItem && !value && this.autoSelectFirst) {\n\t\t\tvalue = this._items[0];\n\t\t}\n\n\t\tconst identifier =\n\t\t\ttypeof value === 'object' && value !== null\n\t\t\t\t? value[this._identifierKey]\n\t\t\t\t: value;\n\t\tconst parsedValue =\n\t\t\ttypeof identifier === 'string' || typeof identifier === 'number'\n\t\t\t\t? identifier\n\t\t\t\t: JSON.stringify(identifier);\n\n\t\tconst currentValue = this._selectedItem\n\t\t\t? this._selectedItem?.[this._identifierKey]\n\t\t\t: null;\n\t\tconst currentParsedValue =\n\t\t\ttypeof currentValue === 'string' || typeof currentValue === 'number'\n\t\t\t\t? currentValue\n\t\t\t\t: JSON.stringify(currentValue);\n\n\t\tif (this._selectedItem && currentParsedValue === parsedValue) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._items?.length && value) {\n\t\t\tthis._selectValue(value, false);\n\t\t\treturn;\n\t\t}\n\n\t\tconst item = this._items.find((i) => {\n\t\t\tconst itemIdentifier = i?.[this._identifierKey];\n\t\t\tconst parsedItemIdentifier =\n\t\t\t\ttypeof itemIdentifier === 'string' ||\n\t\t\t\ttypeof itemIdentifier === 'number'\n\t\t\t\t\t? itemIdentifier\n\t\t\t\t\t: JSON.stringify(itemIdentifier);\n\n\t\t\treturn parsedItemIdentifier === parsedValue;\n\t\t});\n\n\t\tthis._selectValue(!!item ? item : value, false);\n\t}\n\n\tprivate _selectValue(item, forceBlur = true) {\n\t\tlet value =\n\t\t\t!!this.valueKey && this.valueKey !== 'false' && item !== null\n\t\t\t\t? item?.[this.valueKey]\n\t\t\t\t: item;\n\n\t\tif (this.multi) {\n\t\t\tif (!this._selectedItem || !Array.isArray(this._selectedItem)) {\n\t\t\t\tthis._selectedItem = [];\n\t\t\t}\n\n\t\t\tif (!this.value || !Array.isArray(this.value)) {\n\t\t\t\tthis.value = [];\n\t\t\t}\n\n\t\t\tconst selectedItem = [...this._selectedItem];\n\t\t\tconst valueArray = [...this.value];\n\n\t\t\tconst includesIndex = selectedItem.findIndex(\n\t\t\t\t(i) => i[this._identifierKey] === item[this._identifierKey]\n\t\t\t);\n\t\t\tif (includesIndex === -1) {\n\t\t\t\tselectedItem.push(item);\n\t\t\t\tvalueArray.push(value);\n\t\t\t} else {\n\t\t\t\tselectedItem.splice(includesIndex, 1);\n\t\t\t\tvalueArray.splice(includesIndex, 1);\n\t\t\t}\n\n\t\t\tthis._selectedItem = selectedItem;\n\t\t\tthis.value = valueArray;\n\t\t\tthis.valueChange.emit(valueArray);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._selectedItem = item;\n\t\tthis.value = value;\n\t\tthis.valueChange.emit(value);\n\n\t\tthis._onBlur(forceBlur);\n\t}\n\n\tprivate _onFocus(ev) {\n\t\tev.preventDefault();\n\t\tthis._inputRef.blur();\n\n\t\tif (!this._showDropdown) {\n\t\t\tthis._showDropdown = true;\n\t\t}\n\n\t\treturn;\n\t}\n\n\tprivate _onMouseDown(ev) {\n\t\tif (this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tev.preventDefault();\n\t}\n\n\tprivate _onClick() {\n\t\tif (this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = !this._showDropdown;\n\t}\n\n\tprivate _onBlur(force = false) {\n\t\tif (!this.enableAutocomplete && !force) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = false;\n\t}\n\n\tprivate _onAutoComplete(ev) {\n\t\tif (!this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = true;\n\n\t\tthis.query = ev.target.value;\n\t\tthis.queryChange.emit(ev.target.value);\n\t}\n\n\tprivate _checkvalue(key, item) {\n\t\treturn (\n\t\t\titem?.[key]\n\t\t\t\t?.toString()\n\t\t\t\t?.toLowerCase()\n\t\t\t\t.indexOf(this.query?.toLowerCase()) >= 0\n\t\t);\n\t}\n\n\tprivate _getItems() {\n\t\tlet items = this._items.map((item) => (\n\t\t\t<p-dropdown-menu-item\n\t\t\t\tonClick={() => this._selectValue(item)}\n\t\t\t\tactive={\n\t\t\t\t\tthis.multi &&\n\t\t\t\t\t!!this._selectedItem &&\n\t\t\t\t\tArray.isArray(this._selectedItem)\n\t\t\t\t\t\t? this._selectedItem.findIndex(\n\t\t\t\t\t\t\t\t(i) =>\n\t\t\t\t\t\t\t\t\ti[this._identifierKey] ===\n\t\t\t\t\t\t\t\t\titem[this._identifierKey]\n\t\t\t\t\t\t\t) >= 0\n\t\t\t\t\t\t: item[this._identifierKey] ===\n\t\t\t\t\t\t\tthis._selectedItem?.[this._identifierKey]\n\t\t\t\t}\n\t\t\t\tvariant={this.multi ? 'checkbox' : 'default'}\n\t\t\t>\n\t\t\t\t{this.avatarKey ? (\n\t\t\t\t\t<span class=\"flex items-center gap-2\">\n\t\t\t\t\t\t<p-avatar\n\t\t\t\t\t\t\tsize=\"xsmall\"\n\t\t\t\t\t\t\tsrc={item[this.avatarKey]}\n\t\t\t\t\t\t\tletters={item[this.avatarLettersKey]}\n\t\t\t\t\t\t></p-avatar>\n\t\t\t\t\t\t{item[this.dropdownDisplayKey ?? this.displayKey]}\n\t\t\t\t\t</span>\n\t\t\t\t) : (\n\t\t\t\t\titem[this.displayKey]\n\t\t\t\t)}\n\t\t\t</p-dropdown-menu-item>\n\t\t));\n\n\t\tif (!this._items.length) {\n\t\t\titems = [\n\t\t\t\t<p class=\"w-full p-2 text-storm-medium text-sm text-center\">\n\t\t\t\t\t{this.emptyStateText}\n\t\t\t\t</p>,\n\t\t\t];\n\t\t}\n\n\t\tif (this.enableSelectAll && this._items.length) {\n\t\t\titems.unshift(\n\t\t\t\t<p-dropdown-menu-item\n\t\t\t\t\tvariant=\"checkbox\"\n\t\t\t\t\tonClick={() => this._selectAllChange()}\n\t\t\t\t\tactive={this._allSelected}\n\t\t\t\t>\n\t\t\t\t\t{this.selectAllIcon?.length ? (\n\t\t\t\t\t\t<span class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t<div class=\"w-6 justify-center flex text-lg\">\n\t\t\t\t\t\t\t\t<p-icon variant={this.selectAllIcon} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{this.selectAllText}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) : (\n\t\t\t\t\t\tthis.selectAllText\n\t\t\t\t\t)}\n\t\t\t\t</p-dropdown-menu-item>\n\t\t\t);\n\t\t}\n\n\t\tif (this.enableAutocomplete) {\n\t\t\titems.unshift(this._getAutoCompleteItem());\n\t\t}\n\n\t\treturn items;\n\t}\n\n\tprivate _getAddItem() {\n\t\treturn (\n\t\t\t<p-dropdown-menu-item onClick={() => this.add.emit()}>\n\t\t\t\t<span class=\"text-indigo font-semibold flex gap-1 items-center\">\n\t\t\t\t\t{this.addItemText}\n\t\t\t\t\t<p-icon variant=\"plus\" />\n\t\t\t\t</span>\n\t\t\t</p-dropdown-menu-item>\n\t\t);\n\t}\n\n\tprivate _getLoadingItems() {\n\t\tconst items = [0, 0, 0].map(() => (\n\t\t\t<p-dropdown-menu-item enableHover={false}>\n\t\t\t\t<p-loader variant=\"ghost\" class=\"h-6 w-full rounded\" />\n\t\t\t</p-dropdown-menu-item>\n\t\t));\n\n\t\tif (this.enableAutocomplete) {\n\t\t\titems.unshift(this._getAutoCompleteItem());\n\t\t}\n\n\t\treturn items;\n\t}\n\n\tprivate _getAutoCompleteItem() {\n\t\treturn (\n\t\t\t<div class=\"bg-white sticky top-0 pt-2 pb-1 -mt-2\">\n\t\t\t\t<input\n\t\t\t\t\tclass=\"p-input size-small mb-2 sticky top-2\"\n\t\t\t\t\tplaceholder={this.autocompletePlaceholder}\n\t\t\t\t\tonInput={(ev) => this._onAutoComplete(ev)}\n\t\t\t\t\tref={(ref) => (this.autocompleteInputRef = ref)}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tprivate _setMultiContainerMaxWidth() {\n\t\tif (!this._inputRef || !this._multiContainerRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._multiContainerRef.style.maxWidth = `${this._inputRef.clientWidth - 16}px`;\n\t}\n\n\tprivate _checkSelectedItems() {\n\t\tif (!this._multiContainerRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst containerRect = this._multiContainerRef.getBoundingClientRect();\n\t\tconst items = Array.from(\n\t\t\tthis._multiContainerRef.querySelectorAll('.item')\n\t\t) as HTMLElement[];\n\n\t\tlet amountHidden = 0;\n\n\t\tfor (const child of items) {\n\t\t\tchild.classList.remove('hidden');\n\n\t\t\tconst childRect = child.getBoundingClientRect();\n\t\t\tif (childRect.right > containerRect.right) {\n\t\t\t\tchild.classList.add('hidden');\n\t\t\t\tamountHidden++;\n\t\t\t}\n\t\t}\n\n\t\tthis._amountHidden = amountHidden;\n\t\tconst extra = this._multiContainerRef.querySelector('.extra');\n\t\tif (!extra) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!extra.classList.contains('hidden')) {\n\t\t\textra.classList.add('hidden');\n\t\t}\n\n\t\tif (amountHidden > 0) {\n\t\t\textra.classList.remove('hidden');\n\t\t}\n\t}\n\n\tprivate _onDropdownOpen(ev) {\n\t\tif (!ev.detail || !this.autocompleteInputRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.autocompleteInputRef.focus();\n\t}\n\n\tprivate _selectAllChange() {\n\t\tthis._allSelected = !this._allSelected;\n\t\tthis.selectAllChange.emit(this._allSelected);\n\t}\n}\n"],"mappings":"oGAAA,MAAMA,EAAqB,itK,MCqBdC,EAAM,M,6WA6BwB,Y,qCAUb,O,gOAwCM,K,iBAKJ,K,uBAKK,G,wBAKE,K,iBAKP,M,aAKJ,M,qBAKQ,M,mBAKH,a,uCA0CG,S,4HA8BU,M,iBAKd,M,iBAKD,W,oBAaG,qB,mBAOK,M,mBACA,K,kBAEG,M,mBAER,C,CASjC,UAAIC,G,MACH,IAAKC,KAAKC,OAASD,KAAKE,QAAS,CAChC,MAAO,E,CAGR,IAAID,SACID,KAAKC,QAAU,SACnBE,KAAKC,MAAMJ,KAAKC,OAChBD,KAAKC,MAET,UAAWA,IAAK,MAALA,SAAK,SAALA,EAAQ,MAAO,SAAU,CACnCD,KAAKK,WAAa,OAClBL,KAAKM,SAAW,QAEhBL,EAAQA,EAAMM,KAAKC,IAAG,CACrBC,MAAOD,EACPE,KAAMF,K,CAIR,KAAIG,EAAAX,KAAKY,SAAK,MAAAD,SAAA,SAAAA,EAAEE,UAAWb,KAAKc,YAAa,CAC5Cb,EAAQA,EAAMc,QAAQC,IACrB,GAAIhB,KAAKiB,SAAU,CAClB,OAAOjB,KAAKkB,YAAYlB,KAAKiB,SAAUD,E,CAGxC,OACChB,KAAKkB,YAAYlB,KAAKmB,eAAgBH,IACtChB,KAAKkB,YAAYlB,KAAKK,WAA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J,qBAAqBkB,O,CAGnB,gBAAA5B,GACP1I,KAAK2I,cAAgB3I,KAAK2I,aAC1B3I,KAAKuK,gBAAgBvE,KAAKhG,KAAK2I,a"}
1
+ {"version":3,"names":["selectComponentCss","Select","_items","this","items","loading","JSON","parse","displayKey","valueKey","map","str","value","text","_a","query","length","asyncFilter","filter","item","queryKey","_checkvalue","_identifierKey","slice","maxDisplayedItems","_displayValue","multi","_selectedItem","_b","i","_c","_d","selectionDisplayKey","identifierKey","componentDidLoad","Error","_setMultiContainerMaxWidth","_resizeObserver","ResizeObserver","_resizeDebounceTimer","clearTimeout","setTimeout","_checkSelectedItems","observe","_el","_valueChange","itemChanges","componentDidRender","disconnectedCallback","disconnect","render","h","Host","class","disableTriggerClick","calculateWidth","insideClick","scrollable","show","_showDropdown","onIsOpen","ev","_onDropdownOpen","slot","icon","size","prefix","label","helper","required","error","disabled","focused","focusMethod","type","placeholder","onFocus","_onFocus","onMouseDown","_onMouseDown","onClick","_onClick","ref","_inputRef","showChevron","variant","_getLoadingItems","_getItems","showAddItem","_getAddItem","_multiContainerRef","_selectValue","_amountHidden","documentClickHandler","target","childOf","_preselectItem","_showDropdownChanges","dropdownShown","emit","multiChanges","Array","isArray","valueChange","includes","autoSelectFirst","identifier","parsedValue","stringify","currentValue","currentParsedValue","find","itemIdentifier","parsedItemIdentifier","forceBlur","selectedItem","valueArray","includesIndex","findIndex","push","splice","_onBlur","preventDefault","blur","enableAutocomplete","force","_onAutoComplete","queryChange","key","toString","toLowerCase","indexOf","active","avatarKey","src","letters","avatarLettersKey","dropdownDisplayKey","emptyStateText","enableSelectAll","unshift","_selectAllChange","_allSelected","selectAllIcon","selectAllText","_getAutoCompleteItem","add","addItemText","enableHover","autocompletePlaceholder","onInput","autocompleteInputRef","style","maxWidth","clientWidth","containerRect","getBoundingClientRect","from","querySelectorAll","amountHidden","child","classList","remove","childRect","right","extra","querySelector","contains","detail","focus","selectAllChange"],"sources":["src/components/molecules/select/select.component.scss?tag=p-select","src/components/molecules/select/select.component.tsx"],"sourcesContent":["@import '../../../style/form/mixins';\n\np-select {\n\t@apply flex w-full flex-col relative text-ellipsis;\n\n\t.p-input {\n\t\t@include inputDefaultState();\n\t}\n\n\t.multi-container {\n\t\t@apply absolute bottom-0 left-0 h-10 flex gap-2 items-center px-2 py-4 overflow-hidden pointer-events-none w-full;\n\n\t\t&.size-small {\n\t\t\t@apply px-1 py-2 h-8;\n\t\t}\n\n\t\t.item {\n\t\t\t@apply bg-indigo-light rounded px-2 flex gap-2 items-center cursor-pointer text-indigo-dark h-[1.625rem] text-sm font-semibold pointer-events-auto whitespace-nowrap;\n\n\t\t\tp-icon {\n\t\t\t\t@apply text-indigo text-xs;\n\t\t\t}\n\t\t}\n\n\t\t.extra {\n\t\t\t@apply text-sm text-storm-medium pointer-events-none;\n\t\t}\n\t}\n}\n","import {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tState,\n\tWatch,\n} from '@stencil/core';\n\nimport { childOf } from '../../../utils';\nimport { IconVariant } from '../../atoms/icon/icon.component';\n\n@Component({\n\ttag: 'p-select',\n\tstyleUrl: 'select.component.scss',\n\tshadow: false,\n})\nexport class Select {\n\t/**\n\t * The items to show in the dropdown\n\t */\n\t@Prop() items: string | any[];\n\n\t/**\n\t * Wether to enable multi select\n\t */\n\t@Prop({ reflect: true }) multi: boolean;\n\n\t/**\n\t * Icon of the select box\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * The current query\n\t */\n\t@Prop() query: string;\n\n\t/**\n\t * The placeholder of the input\n\t */\n\t@Prop() placeholder: string;\n\n\t/**\n\t * The placeholder of the input used for auto complete\n\t */\n\t@Prop() autocompletePlaceholder: string = 'Search...';\n\n\t/**\n\t * The current value\n\t */\n\t@Prop() value: any;\n\n\t/**\n\t * The key of the object to display\n\t */\n\t@Prop() displayKey: string = 'text';\n\n\t/**\n\t * The key of the object to display in the dropdown (overwrites displayKey)\n\t */\n\t@Prop() dropdownDisplayKey: string | undefined;\n\n\t/**\n\t * The key of the object to display in the input (overwrites displayKey)\n\t */\n\t@Prop() selectionDisplayKey: string | undefined;\n\n\t/**\n\t * The key of the object to return\n\t */\n\t@Prop() valueKey: string;\n\n\t/**\n\t * The key of avatar within an item to show\n\t */\n\t@Prop() avatarKey: string;\n\n\t/**\n\t * The key of avatar letters within an item to show when the avatar url doesn't work\n\t */\n\t@Prop() avatarLettersKey: string;\n\n\t/**\n\t * The key to identify an object\n\t */\n\t@Prop() identifierKey: string;\n\n\t/**\n\t * The key of the object to display\n\t */\n\t@Prop() queryKey?: string;\n\n\t/**\n\t * Wether to automatically select the first item\n\t */\n\t@Prop() autoSelectFirst: boolean = true;\n\n\t/**\n\t * Wether to show the chevron or not\n\t */\n\t@Prop() showChevron: boolean = true;\n\n\t/**\n\t * The maximum amount of items to display\n\t */\n\t@Prop() maxDisplayedItems: number = 10;\n\n\t/**\n\t * Wether to enable autocomplete\n\t */\n\t@Prop() enableAutocomplete: boolean = true;\n\n\t/**\n\t * Wether the input uses async filtering\n\t */\n\t@Prop() asyncFilter: boolean = false;\n\n\t/**\n\t * Wether to show loading items\n\t */\n\t@Prop() loading: boolean = false;\n\n\t/**\n\t * Wether to show the select all item with multi select\n\t */\n\t@Prop() enableSelectAll: boolean = false;\n\n\t/**\n\t * The text of the select all item\n\t */\n\t@Prop() selectAllText: string = 'Select all';\n\n\t/**\n\t * The icon to prefix for select all\n\t */\n\t@Prop() selectAllIcon: IconVariant | undefined;\n\n\t/**\n\t * Event when the query of the autocomplete changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tqueryChange: EventEmitter<string>;\n\n\t/**\n\t * Event when the value changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tvalueChange: EventEmitter<any>;\n\n\t/**\n\t * Event when the select all item has been selected or not\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tselectAllChange: EventEmitter<any>;\n\n\t/**\n\t * Event when the dropdown shows\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tdropdownShown: EventEmitter<any>;\n\n\t/**\n\t * The size of the input group used by the select\n\t */\n\t@Prop() size: 'small' | 'medium' = 'medium';\n\n\t/**\n\t * The prefix of the input group used by the select\n\t */\n\t@Prop() prefix: string;\n\n\t/**\n\t * The label of the input group used by the select\n\t */\n\t@Prop() label: string;\n\n\t/**\n\t * The helper of the input group used by the select\n\t */\n\t@Prop() helper: string;\n\n\t/**\n\t * Wether the field is required\n\t */\n\t@Prop({ reflect: true }) required: boolean;\n\n\t/**\n\t * The helper of the input group used by the select\n\t */\n\t@Prop({ reflect: true }) error: string;\n\n\t/**\n\t * Wether the input group is disabled used by the select\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether to show a \"add\" item\n\t */\n\t@Prop() showAddItem: boolean = false;\n\n\t/**\n\t * The text to show when add item is being shown\n\t */\n\t@Prop() addItemText: string = 'Add item';\n\n\t/**\n\t * Event when the add item is clicked\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tadd: EventEmitter;\n\n\t/**\n\t * The text to show when items is empty\n\t */\n\t@Prop() emptyStateText: string = 'No items available';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _showDropdown: any = false;\n\t@State() private _selectedItem: any = null;\n\n\t@State() private _allSelected: boolean = false;\n\n\t@State() private _amountHidden = 0;\n\n\tprivate _inputRef: HTMLInputElement;\n\tprivate autocompleteInputRef: HTMLInputElement;\n\tprivate _multiContainerRef: HTMLElement;\n\n\tprivate _resizeObserver: ResizeObserver;\n\tprivate _resizeDebounceTimer: NodeJS.Timer;\n\n\tget _items() {\n\t\tif (!this.items || this.loading) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet items =\n\t\t\ttypeof this.items === 'string'\n\t\t\t\t? JSON.parse(this.items)\n\t\t\t\t: this.items;\n\n\t\tif (typeof items?.[0] === 'string') {\n\t\t\tthis.displayKey = 'text';\n\t\t\tthis.valueKey = 'value';\n\n\t\t\titems = items.map((str) => ({\n\t\t\t\tvalue: str,\n\t\t\t\ttext: str,\n\t\t\t}));\n\t\t}\n\n\t\tif (this.query?.length && !this.asyncFilter) {\n\t\t\titems = items.filter((item) => {\n\t\t\t\tif (this.queryKey) {\n\t\t\t\t\treturn this._checkvalue(this.queryKey, item);\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\tthis._checkvalue(this._identifierKey, item) ||\n\t\t\t\t\tthis._checkvalue(this.displayKey, item)\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\n\t\treturn items?.slice(0, this.maxDisplayedItems);\n\t}\n\n\tget _displayValue() {\n\t\tif (this.multi) {\n\t\t\tif (!this._selectedItem?.length) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\treturn this._selectedItem\n\t\t\t\t?.map((i) => i?.[this.displayKey])\n\t\t\t\t.filter((i) => !!i);\n\t\t}\n\n\t\treturn this._selectedItem?.[\n\t\t\tthis.selectionDisplayKey ?? this.displayKey\n\t\t];\n\t}\n\n\tget _identifierKey() {\n\t\treturn this.identifierKey ?? this.valueKey ?? 'value';\n\t}\n\n\tcomponentDidLoad() {\n\t\tif (!this.valueKey && !this.identifierKey) {\n\t\t\tthrow new Error('You must provide a valueKey or identifierKey');\n\t\t}\n\n\t\tif (this.multi) {\n\t\t\tthis._setMultiContainerMaxWidth();\n\n\t\t\tthis._resizeObserver = new ResizeObserver(() => {\n\t\t\t\tif (this._resizeDebounceTimer) {\n\t\t\t\t\tclearTimeout(this._resizeDebounceTimer);\n\t\t\t\t\tthis._resizeDebounceTimer = null;\n\t\t\t\t}\n\n\t\t\t\tthis._resizeDebounceTimer = setTimeout(() => {\n\t\t\t\t\tthis._setMultiContainerMaxWidth();\n\t\t\t\t\tthis._checkSelectedItems();\n\t\t\t\t}, 200);\n\t\t\t});\n\t\t\tthis._resizeObserver.observe(this._el);\n\t\t}\n\n\t\tif (this.value) {\n\t\t\tthis._valueChange();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.itemChanges();\n\t}\n\n\tcomponentDidRender() {\n\t\tif (this.multi) {\n\t\t\tthis._setMultiContainerMaxWidth();\n\t\t\tthis._checkSelectedItems();\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tif (this.multi) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-select\">\n\t\t\t\t<p-dropdown\n\t\t\t\t\tdisableTriggerClick={true}\n\t\t\t\t\tcalculateWidth={true}\n\t\t\t\t\tinsideClick={true}\n\t\t\t\t\tscrollable={true}\n\t\t\t\t\tshow={this._showDropdown}\n\t\t\t\t\tonIsOpen={(ev) => this._onDropdownOpen(ev)}\n\t\t\t\t>\n\t\t\t\t\t<p-input-group\n\t\t\t\t\t\tslot=\"trigger\"\n\t\t\t\t\t\ticon={this.icon}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\tprefix={this.prefix}\n\t\t\t\t\t\tlabel={this.label}\n\t\t\t\t\t\thelper={this.helper}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\terror={this.error}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tfocused={this._showDropdown}\n\t\t\t\t\t\tfocusMethod=\"click\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tslot=\"input\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tthis.multi && this._displayValue?.length\n\t\t\t\t\t\t\t\t\t? ' '\n\t\t\t\t\t\t\t\t\t: this._displayValue\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tclass=\"p-input cursor-pointer read-only\"\n\t\t\t\t\t\t\tonFocus={(ev) => this._onFocus(ev)}\n\t\t\t\t\t\t\tonMouseDown={(ev) => this._onMouseDown(ev)}\n\t\t\t\t\t\t\tonClick={() => this._onClick()}\n\t\t\t\t\t\t\tref={(ref) => (this._inputRef = ref)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t{this.showChevron && (\n\t\t\t\t\t\t\t<p-icon variant=\"chevron\" slot=\"suffix\" />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</p-input-group>\n\t\t\t\t\t<div slot=\"items\">\n\t\t\t\t\t\t{this.loading\n\t\t\t\t\t\t\t? this._getLoadingItems()\n\t\t\t\t\t\t\t: this._getItems()}\n\t\t\t\t\t\t{this.showAddItem && this._getAddItem()}\n\t\t\t\t\t</div>\n\t\t\t\t</p-dropdown>\n\n\t\t\t\t{this.multi && this._selectedItem?.length > 0 && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={`multi-container size-${this.size}`}\n\t\t\t\t\t\tref={(ref) => (this._multiContainerRef = ref)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this._selectedItem.map((item) => (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass=\"item\"\n\t\t\t\t\t\t\t\tonClick={() => this._selectValue(item)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\titem[\n\t\t\t\t\t\t\t\t\t\tthis.selectionDisplayKey ??\n\t\t\t\t\t\t\t\t\t\t\tthis.displayKey\n\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t<p-icon variant=\"negative\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\n\t\t\t\t\t\t<div class=\"extra hidden\">+{this._amountHidden}</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler({ target }) {\n\t\tif (!this._showDropdown || childOf(target, this._el)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = false;\n\t}\n\n\t@Watch('value')\n\tprivate _valueChange() {\n\t\tthis._preselectItem();\n\t}\n\n\t@Watch('items')\n\tpublic itemChanges() {\n\t\tthis._preselectItem();\n\t}\n\n\t@Watch('_showDropdown')\n\tpublic _showDropdownChanges() {\n\t\tthis.dropdownShown.emit({\n\t\t\tvalue: this._showDropdown,\n\t\t\tquery: this.query,\n\t\t});\n\t}\n\n\t@Watch('multi')\n\tpublic multiChanges() {\n\t\tif (this._selectedItem && !Array.isArray(this._selectedItem)) {\n\t\t\tthis._selectedItem = [];\n\t\t}\n\t}\n\n\tprivate _preselectItem() {\n\t\tlet value =\n\t\t\ttypeof this.value === 'string' && this.multi\n\t\t\t\t? JSON.parse(this.value)\n\t\t\t\t: this.value;\n\n\t\tif (this.multi) {\n\t\t\tif (!Array.isArray(value)) {\n\t\t\t\tthis.value = [];\n\t\t\t\tthis.valueChange.emit(this.value);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.value = value;\n\t\t\tif (!value.length) {\n\t\t\t\tthis._selectedItem = [];\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._selectedItem =\n\t\t\t\t!!this.valueKey && this.valueKey !== 'false'\n\t\t\t\t\t? this._items.filter((i) =>\n\t\t\t\t\t\t\tvalue.includes(i?.[this.valueKey])\n\t\t\t\t\t\t)\n\t\t\t\t\t: [...value];\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._selectedItem && !value && this.autoSelectFirst) {\n\t\t\tvalue = this._items[0];\n\t\t}\n\n\t\tconst identifier =\n\t\t\ttypeof value === 'object' && value !== null\n\t\t\t\t? value[this._identifierKey]\n\t\t\t\t: value;\n\t\tconst parsedValue =\n\t\t\ttypeof identifier === 'string' || typeof identifier === 'number'\n\t\t\t\t? identifier\n\t\t\t\t: JSON.stringify(identifier);\n\n\t\tconst currentValue = this._selectedItem\n\t\t\t? this._selectedItem?.[this._identifierKey]\n\t\t\t: null;\n\t\tconst currentParsedValue =\n\t\t\ttypeof currentValue === 'string' || typeof currentValue === 'number'\n\t\t\t\t? currentValue\n\t\t\t\t: JSON.stringify(currentValue);\n\n\t\tif (this._selectedItem && currentParsedValue === parsedValue) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._items?.length && value) {\n\t\t\tthis._selectValue(value, false);\n\t\t\treturn;\n\t\t}\n\n\t\tconst item = this._items.find((i) => {\n\t\t\tconst itemIdentifier = i?.[this._identifierKey];\n\t\t\tconst parsedItemIdentifier =\n\t\t\t\ttypeof itemIdentifier === 'string' ||\n\t\t\t\ttypeof itemIdentifier === 'number'\n\t\t\t\t\t? itemIdentifier\n\t\t\t\t\t: JSON.stringify(itemIdentifier);\n\n\t\t\treturn parsedItemIdentifier === parsedValue;\n\t\t});\n\n\t\tthis._selectValue(!!item ? item : value, false);\n\t}\n\n\tprivate _selectValue(item, forceBlur = true) {\n\t\tlet value =\n\t\t\t!!this.valueKey && this.valueKey !== 'false' && item !== null\n\t\t\t\t? item?.[this.valueKey]\n\t\t\t\t: item;\n\n\t\tif (this.multi) {\n\t\t\tif (!this._selectedItem || !Array.isArray(this._selectedItem)) {\n\t\t\t\tthis._selectedItem = [];\n\t\t\t}\n\n\t\t\tif (!this.value || !Array.isArray(this.value)) {\n\t\t\t\tthis.value = [];\n\t\t\t}\n\n\t\t\tconst selectedItem = [...this._selectedItem];\n\t\t\tconst valueArray = [...this.value];\n\n\t\t\tconst includesIndex = selectedItem.findIndex(\n\t\t\t\t(i) => i[this._identifierKey] === item[this._identifierKey]\n\t\t\t);\n\t\t\tif (includesIndex === -1) {\n\t\t\t\tselectedItem.push(item);\n\t\t\t\tvalueArray.push(value);\n\t\t\t} else {\n\t\t\t\tselectedItem.splice(includesIndex, 1);\n\t\t\t\tvalueArray.splice(includesIndex, 1);\n\t\t\t}\n\n\t\t\tthis._selectedItem = selectedItem;\n\t\t\tthis.value = valueArray;\n\t\t\tthis.valueChange.emit(valueArray);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._selectedItem = item;\n\t\tthis.value = value;\n\t\tthis.valueChange.emit(value);\n\n\t\tthis._onBlur(forceBlur);\n\t}\n\n\tprivate _onFocus(ev) {\n\t\tev.preventDefault();\n\t\tthis._inputRef.blur();\n\n\t\tif (!this._showDropdown) {\n\t\t\tthis._showDropdown = true;\n\t\t}\n\n\t\treturn;\n\t}\n\n\tprivate _onMouseDown(ev) {\n\t\tif (this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tev.preventDefault();\n\t}\n\n\tprivate _onClick() {\n\t\tif (this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = !this._showDropdown;\n\t}\n\n\tprivate _onBlur(force = false) {\n\t\tif (this.enableAutocomplete && !force) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = false;\n\t}\n\n\tprivate _onAutoComplete(ev) {\n\t\tif (!this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = true;\n\n\t\tthis.query = ev.target.value;\n\t\tthis.queryChange.emit(ev.target.value);\n\t}\n\n\tprivate _checkvalue(key, item) {\n\t\treturn (\n\t\t\titem?.[key]\n\t\t\t\t?.toString()\n\t\t\t\t?.toLowerCase()\n\t\t\t\t.indexOf(this.query?.toLowerCase()) >= 0\n\t\t);\n\t}\n\n\tprivate _getItems() {\n\t\tlet items = this._items.map((item) => (\n\t\t\t<p-dropdown-menu-item\n\t\t\t\tonClick={() => this._selectValue(item)}\n\t\t\t\tactive={\n\t\t\t\t\tthis.multi &&\n\t\t\t\t\t!!this._selectedItem &&\n\t\t\t\t\tArray.isArray(this._selectedItem)\n\t\t\t\t\t\t? this._selectedItem.findIndex(\n\t\t\t\t\t\t\t\t(i) =>\n\t\t\t\t\t\t\t\t\ti[this._identifierKey] ===\n\t\t\t\t\t\t\t\t\titem[this._identifierKey]\n\t\t\t\t\t\t\t) >= 0\n\t\t\t\t\t\t: item[this._identifierKey] ===\n\t\t\t\t\t\t\tthis._selectedItem?.[this._identifierKey]\n\t\t\t\t}\n\t\t\t\tvariant={this.multi ? 'checkbox' : 'default'}\n\t\t\t>\n\t\t\t\t{this.avatarKey ? (\n\t\t\t\t\t<span class=\"flex items-center gap-2\">\n\t\t\t\t\t\t<p-avatar\n\t\t\t\t\t\t\tsize=\"xsmall\"\n\t\t\t\t\t\t\tsrc={item[this.avatarKey]}\n\t\t\t\t\t\t\tletters={item[this.avatarLettersKey]}\n\t\t\t\t\t\t></p-avatar>\n\t\t\t\t\t\t{item[this.dropdownDisplayKey ?? this.displayKey]}\n\t\t\t\t\t</span>\n\t\t\t\t) : (\n\t\t\t\t\titem[this.displayKey]\n\t\t\t\t)}\n\t\t\t</p-dropdown-menu-item>\n\t\t));\n\n\t\tif (!this._items.length) {\n\t\t\titems = [\n\t\t\t\t<p class=\"w-full p-2 text-storm-medium text-sm text-center\">\n\t\t\t\t\t{this.emptyStateText}\n\t\t\t\t</p>,\n\t\t\t];\n\t\t}\n\n\t\tif (this.enableSelectAll && this._items.length) {\n\t\t\titems.unshift(\n\t\t\t\t<p-dropdown-menu-item\n\t\t\t\t\tvariant=\"checkbox\"\n\t\t\t\t\tonClick={() => this._selectAllChange()}\n\t\t\t\t\tactive={this._allSelected}\n\t\t\t\t>\n\t\t\t\t\t{this.selectAllIcon?.length ? (\n\t\t\t\t\t\t<span class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t<div class=\"w-6 justify-center flex text-lg\">\n\t\t\t\t\t\t\t\t<p-icon variant={this.selectAllIcon} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{this.selectAllText}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) : (\n\t\t\t\t\t\tthis.selectAllText\n\t\t\t\t\t)}\n\t\t\t\t</p-dropdown-menu-item>\n\t\t\t);\n\t\t}\n\n\t\tif (this.enableAutocomplete) {\n\t\t\titems.unshift(this._getAutoCompleteItem());\n\t\t}\n\n\t\treturn items;\n\t}\n\n\tprivate _getAddItem() {\n\t\treturn (\n\t\t\t<p-dropdown-menu-item onClick={() => this.add.emit()}>\n\t\t\t\t<span class=\"text-indigo font-semibold flex gap-1 items-center\">\n\t\t\t\t\t{this.addItemText}\n\t\t\t\t\t<p-icon variant=\"plus\" />\n\t\t\t\t</span>\n\t\t\t</p-dropdown-menu-item>\n\t\t);\n\t}\n\n\tprivate _getLoadingItems() {\n\t\tconst items = [0, 0, 0].map(() => (\n\t\t\t<p-dropdown-menu-item enableHover={false}>\n\t\t\t\t<p-loader variant=\"ghost\" class=\"h-6 w-full rounded\" />\n\t\t\t</p-dropdown-menu-item>\n\t\t));\n\n\t\tif (this.enableAutocomplete) {\n\t\t\titems.unshift(this._getAutoCompleteItem());\n\t\t}\n\n\t\treturn items;\n\t}\n\n\tprivate _getAutoCompleteItem() {\n\t\treturn (\n\t\t\t<div class=\"bg-white sticky top-0 pt-2 pb-1 -mt-2\">\n\t\t\t\t<input\n\t\t\t\t\tclass=\"p-input size-small mb-2 sticky top-2\"\n\t\t\t\t\tplaceholder={this.autocompletePlaceholder}\n\t\t\t\t\tonInput={(ev) => this._onAutoComplete(ev)}\n\t\t\t\t\tref={(ref) => (this.autocompleteInputRef = ref)}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tprivate _setMultiContainerMaxWidth() {\n\t\tif (!this._inputRef || !this._multiContainerRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._multiContainerRef.style.maxWidth = `${this._inputRef.clientWidth - 16}px`;\n\t}\n\n\tprivate _checkSelectedItems() {\n\t\tif (!this._multiContainerRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst containerRect = this._multiContainerRef.getBoundingClientRect();\n\t\tconst items = Array.from(\n\t\t\tthis._multiContainerRef.querySelectorAll('.item')\n\t\t) as HTMLElement[];\n\n\t\tlet amountHidden = 0;\n\n\t\tfor (const child of items) {\n\t\t\tchild.classList.remove('hidden');\n\n\t\t\tconst childRect = child.getBoundingClientRect();\n\t\t\tif (childRect.right > containerRect.right) {\n\t\t\t\tchild.classList.add('hidden');\n\t\t\t\tamountHidden++;\n\t\t\t}\n\t\t}\n\n\t\tthis._amountHidden = amountHidden;\n\t\tconst extra = this._multiContainerRef.querySelector('.extra');\n\t\tif (!extra) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!extra.classList.contains('hidden')) {\n\t\t\textra.classList.add('hidden');\n\t\t}\n\n\t\tif (amountHidden > 0) {\n\t\t\textra.classList.remove('hidden');\n\t\t}\n\t}\n\n\tprivate _onDropdownOpen(ev) {\n\t\tif (!ev.detail || !this.autocompleteInputRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.autocompleteInputRef.focus();\n\t}\n\n\tprivate _selectAllChange() {\n\t\tthis._allSelected = !this._allSelected;\n\t\tthis.selectAllChange.emit(this._allSelected);\n\t}\n}\n"],"mappings":"oGAAA,MAAMA,EAAqB,itK,MCqBdC,EAAM,M,6WA6BwB,Y,qCAUb,O,gOAwCM,K,iBAKJ,K,uBAKK,G,wBAKE,K,iBAKP,M,aAKJ,M,qBAKQ,M,mBAKH,a,uCA0CG,S,4HA8BU,M,iBAKd,M,iBAKD,W,oBAaG,qB,mBAOK,M,mBACA,K,kBAEG,M,mBAER,C,CASjC,UAAIC,G,MACH,IAAKC,KAAKC,OAASD,KAAKE,QAAS,CAChC,MAAO,E,CAGR,IAAID,SACID,KAAKC,QAAU,SACnBE,KAAKC,MAAMJ,KAAKC,OAChBD,KAAKC,MAET,UAAWA,IAAK,MAALA,SAAK,SAALA,EAAQ,MAAO,SAAU,CACnCD,KAAKK,WAAa,OAClBL,KAAKM,SAAW,QAEhBL,EAAQA,EAAMM,KAAKC,IAAG,CACrBC,MAAOD,EACPE,KAAMF,K,CAIR,KAAIG,EAAAX,KAAKY,SAAK,MAAAD,SAAA,SAAAA,EAAEE,UAAWb,KAAKc,YAAa,CAC5Cb,EAAQA,EAAMc,QAAQC,IACrB,GAAIhB,KAAKiB,SAAU,CAClB,OAAOjB,KAAKkB,YAAYlB,KAAKiB,SAAUD,E,CAGx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BD,GACvB,IAAKA,EAAG2G,SAAWrK,KAAKoJ,qBAAsB,CAC7C,M,CAGDpJ,KAAKoJ,qBAAqBkB,O,CAGnB,gBAAA5B,GACP1I,KAAK2I,cAAgB3I,KAAK2I,aAC1B3I,KAAKuK,gBAAgBvE,KAAKhG,KAAK2I,a"}
@@ -1,2 +1,2 @@
1
- import{r as t,h as i,H as o}from"./p-e4d5e7a7.js";const r=".inline-block{display:inline-block!important}.flex{display:flex!important}.h-8{height:2rem!important}.w-full{width:100%!important}.cursor-pointer{cursor:pointer!important}.items-center{align-items:center!important}.rounded-large{border-radius:.375rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.text-indigo{color:rgb(82 138 250/var(--tw-text-opacity))!important}.text-indigo,.text-storm{--tw-text-opacity:1!important}.text-storm{color:rgb(81 83 107/var(--tw-text-opacity))!important}*{box-sizing:border-box}:host{display:inline-block;margin-bottom:.25rem;width:100%}:host>a{--tw-text-opacity:1;align-items:center;border-radius:.375rem;color:rgb(81 83 107/var(--tw-text-opacity));cursor:pointer;display:flex;font-weight:600;gap:.5rem;height:2rem;padding-left:.5rem;padding-right:.5rem;text-decoration-line:none;width:100%}:host>a:hover{--tw-bg-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity))}:host>a>p-icon{--tw-text-opacity:1;color:rgb(81 83 107/var(--tw-text-opacity))}:host>a>p-counter{margin-left:auto}:host(.active)>a{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));color:rgb(82 138 250/var(--tw-text-opacity))}:host(.active)>a>p-icon{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity))}.static{position:static!important}";const a=class{constructor(i){t(this,i);this.active=false;this.icon=undefined;this.counter=undefined;this.href=undefined;this.target=undefined}render(){return i(o,{class:`p-navigation-item ${this.active&&"active"}`},i("a",{href:this.href,target:this.target},this.icon&&i("p-icon",{variant:this.icon}),i("span",{class:this.counter&&"has-counter"},i("slot",null)),this.counter&&i("p-counter",{variant:"negative"},this.counter)))}};a.style=r;export{a as p_navigation_item};
2
- //# sourceMappingURL=p-682db916.entry.js.map
1
+ import{r as t,h as i,H as o}from"./p-e4d5e7a7.js";const r=".inline-block{display:inline-block!important}.flex{display:flex!important}.h-8{height:2rem!important}.w-full{width:100%!important}.cursor-pointer{cursor:pointer!important}.items-center{align-items:center!important}.rounded-large{border-radius:.375rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.text-indigo{color:rgb(82 138 250/var(--tw-text-opacity))!important}.text-indigo,.text-storm{--tw-text-opacity:1!important}.text-storm{color:rgb(81 83 107/var(--tw-text-opacity))!important}*{box-sizing:border-box}:host{display:inline-block;margin-bottom:.25rem;width:100%}:host>a{--tw-text-opacity:1;align-items:center;border-radius:.375rem;color:rgb(81 83 107/var(--tw-text-opacity));cursor:pointer;display:flex;font-weight:600;gap:.5rem;height:2rem;padding-left:.5rem;padding-right:.5rem;text-decoration-line:none;width:100%}:host>a:hover{--tw-bg-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity))}:host>a>p-icon{--tw-text-opacity:1;color:rgb(81 83 107/var(--tw-text-opacity))}:host>a>p-counter{margin-left:auto}:host(.active)>a{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));color:rgb(82 138 250/var(--tw-text-opacity))}:host(.active)>a>p-icon{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity))}.static{position:static!important}";const a=class{constructor(i){t(this,i);this.active=false;this.icon=undefined;this.counter=undefined;this.href=undefined;this.target=undefined}render(){return i(o,{class:`p-navigation-item ${this.active&&"active"}`},i("a",{href:this.href,target:this.target},this.icon&&i("p-icon",{variant:this.icon}),i("span",{class:this.counter&&"has-counter"},i("slot",null)),!!this.counter&&this.counter!=="0"&&i("p-counter",{variant:"negative"},this.counter)))}};a.style=r;export{a as p_navigation_item};
2
+ //# sourceMappingURL=p-fffaacc2.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["navigationItemComponentCss","NavigationItem","render","h","Host","class","this","active","href","target","icon","variant","counter"],"sources":["src/components/molecules/navigation-item/navigation-item.component.scss?tag=p-navigation-item&encapsulation=shadow","src/components/molecules/navigation-item/navigation-item.component.tsx"],"sourcesContent":[":host {\n\t@apply w-full inline-block mb-1;\n\n\t> a {\n\t\t@apply w-full h-8 px-2 cursor-pointer rounded-large no-underline;\n\t\t@apply flex items-center gap-2;\n\t\t@apply text-storm font-semibold;\n\n\t\t@apply hover:bg-indigo-light;\n\n\t\t> p-icon {\n\t\t\t@apply text-storm;\n\t\t}\n\n\t\t> p-counter {\n\t\t\t@apply ml-auto;\n\t\t}\n\t}\n}\n\n:host(.active) {\n\t> a {\n\t\t@apply text-indigo bg-indigo-light;\n\n\t\t> p-icon {\n\t\t\t@apply text-indigo;\n\t\t}\n\t}\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { IconVariant } from '../../atoms/icon/icon.component';\n\n@Component({\n\ttag: 'p-navigation-item',\n\tstyleUrl: 'navigation-item.component.scss',\n\tshadow: true,\n})\nexport class NavigationItem {\n\t/**\n\t * Wether the navigation item is active\n\t */\n\t@Prop() active: boolean = false;\n\n\t/**\n\t * Icon of the navigation item\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * Icon of the navigation item\n\t */\n\t@Prop() counter: number | string;\n\n\t/**\n\t * The href of the navigation item\n\t */\n\t@Prop() href: string;\n\n\t/**\n\t * The target of the navigation item\n\t */\n\t@Prop() target: string;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={`p-navigation-item ${this.active && 'active'}`}>\n\t\t\t\t<a href={this.href} target={this.target}>\n\t\t\t\t\t{this.icon && <p-icon variant={this.icon} />}\n\t\t\t\t\t<span class={this.counter && 'has-counter'}>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</span>\n\t\t\t\t\t{this.counter && (\n\t\t\t\t\t\t<p-counter variant=\"negative\">{this.counter}</p-counter>\n\t\t\t\t\t)}\n\t\t\t\t</a>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"mappings":"kDAAA,MAAMA,EAA6B,uzC,MCQtBC,EAAc,M,qCAIA,M,qFAsB1B,MAAAC,GACC,OACCC,EAACC,EAAI,CAACC,MAAO,qBAAqBC,KAAKC,QAAU,YAChDJ,EAAA,KAAGK,KAAMF,KAAKE,KAAMC,OAAQH,KAAKG,QAC/BH,KAAKI,MAAQP,EAAA,UAAQQ,QAASL,KAAKI,OACpCP,EAAA,QAAME,MAAOC,KAAKM,SAAW,eAC5BT,EAAA,cAEAG,KAAKM,SACLT,EAAA,aAAWQ,QAAQ,YAAYL,KAAKM,U"}
1
+ {"version":3,"names":["navigationItemComponentCss","NavigationItem","render","h","Host","class","this","active","href","target","icon","variant","counter"],"sources":["src/components/molecules/navigation-item/navigation-item.component.scss?tag=p-navigation-item&encapsulation=shadow","src/components/molecules/navigation-item/navigation-item.component.tsx"],"sourcesContent":[":host {\n\t@apply w-full inline-block mb-1;\n\n\t> a {\n\t\t@apply w-full h-8 px-2 cursor-pointer rounded-large no-underline;\n\t\t@apply flex items-center gap-2;\n\t\t@apply text-storm font-semibold;\n\n\t\t@apply hover:bg-indigo-light;\n\n\t\t> p-icon {\n\t\t\t@apply text-storm;\n\t\t}\n\n\t\t> p-counter {\n\t\t\t@apply ml-auto;\n\t\t}\n\t}\n}\n\n:host(.active) {\n\t> a {\n\t\t@apply text-indigo bg-indigo-light;\n\n\t\t> p-icon {\n\t\t\t@apply text-indigo;\n\t\t}\n\t}\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { IconVariant } from '../../atoms/icon/icon.component';\n\n@Component({\n\ttag: 'p-navigation-item',\n\tstyleUrl: 'navigation-item.component.scss',\n\tshadow: true,\n})\nexport class NavigationItem {\n\t/**\n\t * Wether the navigation item is active\n\t */\n\t@Prop() active: boolean = false;\n\n\t/**\n\t * Icon of the navigation item\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * Icon of the navigation item\n\t */\n\t@Prop() counter: number | string;\n\n\t/**\n\t * The href of the navigation item\n\t */\n\t@Prop() href: string;\n\n\t/**\n\t * The target of the navigation item\n\t */\n\t@Prop() target: string;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={`p-navigation-item ${this.active && 'active'}`}>\n\t\t\t\t<a href={this.href} target={this.target}>\n\t\t\t\t\t{this.icon && <p-icon variant={this.icon} />}\n\t\t\t\t\t<span class={this.counter && 'has-counter'}>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</span>\n\t\t\t\t\t{!!this.counter && this.counter !== '0' && (\n\t\t\t\t\t\t<p-counter variant=\"negative\">{this.counter}</p-counter>\n\t\t\t\t\t)}\n\t\t\t\t</a>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"mappings":"kDAAA,MAAMA,EAA6B,uzC,MCQtBC,EAAc,M,qCAIA,M,qFAsB1B,MAAAC,GACC,OACCC,EAACC,EAAI,CAACC,MAAO,qBAAqBC,KAAKC,QAAU,YAChDJ,EAAA,KAAGK,KAAMF,KAAKE,KAAMC,OAAQH,KAAKG,QAC/BH,KAAKI,MAAQP,EAAA,UAAQQ,QAASL,KAAKI,OACpCP,EAAA,QAAME,MAAOC,KAAKM,SAAW,eAC5BT,EAAA,gBAEEG,KAAKM,SAAWN,KAAKM,UAAY,KACnCT,EAAA,aAAWQ,QAAQ,YAAYL,KAAKM,U"}
@@ -1,2 +1,2 @@
1
- import{p as e,b as a}from"./p-e4d5e7a7.js";export{s as setNonce}from"./p-e4d5e7a7.js";const t=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};t().then((e=>a(JSON.parse('[["p-daeadc69",[[4,"p-button",{"variant":[1],"underline":[4],"href":[1],"target":[1],"size":[1],"loading":[4],"chevron":[8],"chevronPosition":[1,"chevron-position"],"disabled":[4],"icon":[1],"iconOnly":[4,"icon-only"],"iconPosition":[1,"icon-position"],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"],"inheritText":[4,"inherit-text"]},[[2,"click","handleClick"]]],[1,"p-loader",{"show":[4],"variant":[1],"color":[1],"modalTitle":[1,"modal-title"],"modalDescription":[1,"modal-description"]}],[0,"p-icon",{"variant":[1],"size":[1],"rotate":[2],"flip":[1]}]]],["p-06f224c5",[[4,"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"],"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":[16],"activeQuickFilterIdentifier":[1,"active-quick-filter-identifier"],"enableSearch":[4,"enable-search"],"query":[1025],"enableFilter":[4,"enable-filter"],"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"],"enablePageSize":[4,"enable-page-size"],"enablePagination":[4,"enable-pagination"],"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],"_columns":[32],"_items":[32]},[[16,"localeChanged","_setLocales"],[16,"tableDefinitionChanged","onTableDefinitionUpdated"],[4,"keydown","keyDown"],[4,"keyup","keyUp"],[4,"visibilitychange","visibilityChange"]],{"items":["_parseItems"]}]]],["p-008f1920",[[0,"p-select",{"items":[1],"multi":[516],"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"],"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"],"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],"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"],"items":["itemChanges"],"_showDropdown":["_showDropdownChanges"],"multi":["multiChanges"]}]]],["p-fb45a664",[[1,"p-modal",{"size":[1],"variant":[1],"header":[1],"show":[4],"applyBlur":[4,"apply-blur"],"showClose":[4,"show-close"],"showMobileFooter":[4,"show-mobile-footer"],"backdropClickClose":[4,"backdrop-click-close"],"scrollLock":[4,"scroll-lock"],"padding":[4],"_closing":[32]},[[8,"closeModal","handleCloseModal"]]]]],["p-c9b840a7",[[0,"p-datepicker",{"placeholder":[1],"value":[1],"preselectToday":[4,"preselect-today"],"disabledDates":[1,"disabled-dates"],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"disableWeekends":[4,"disable-weekends"],"mode":[1],"format":[1],"size":[1],"prefix":[1],"label":[1],"helper":[1],"required":[516],"error":[513],"disabled":[516],"_showDropdown":[32],"_value":[32],"_minDate":[32],"_maxDate":[32],"_disabledDates":[32]},[[6,"click","documentClickHandler"]],{"value":["parseValue"],"minDate":["parseMinDate"],"maxDate":["parseMaxDate"],"disabledDates":["parseDisabledDates"]}]]],["p-0d71fc44",[[1,"p-drawer",{"header":[1],"show":[4],"applyBlur":[4,"apply-blur"],"showClose":[4,"show-close"],"backdropClickClose":[4,"backdrop-click-close"],"canClose":[4,"can-close"],"scrollLock":[4,"scroll-lock"],"_closing":[32]},[[8,"closeDrawer","handleCloseDrawer"]]]]],["p-699e0b35",[[1,"p-attachment",{"mode":[1],"loading":[4],"error":[1],"downloading":[4]}]]],["p-179efb16",[[1,"p-navbar",{"closeText":[1,"close-text"],"menuText":[1,"menu-text"],"_showMenu":[32]},[[8,"closeNavbar","handleCloseNavbar"],[8,"openNavbar","handleOpenNavbar"]]]]],["p-93052b42",[[1,"p-profile",{"variant":[1],"size":[513],"_dropdownOpen":[32]}]]],["p-4c30c74b",[[1,"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"]}]]],["p-a2b552f9",[[1,"p-divider",{"variant":[513]}]]],["p-d0796984",[[1,"p-accordion",{"header":[1],"open":[4],"closeable":[4],"openable":[4]}]]],["p-682db916",[[1,"p-navigation-item",{"active":[4],"icon":[1],"counter":[8],"href":[1],"target":[1]}]]],["p-5d678a05",[[4,"p-card-header",{"header":[1],"arrow":[4]}]]],["p-cb2674b5",[[1,"p-content-slider",{"hideMobileIndicator":[4,"hide-mobile-indicator"],"disableDrag":[4,"disable-drag"],"disableAutoCenter":[4,"disable-auto-center"],"disableIndicatorClick":[4,"disable-indicator-click"],"_visibleIndex":[32],"_outerHeight":[32],"_totalWidth":[32],"_dragging":[32]},[[9,"mouseup","mouseUpHandler"],[9,"touchend","mouseUpHandler"],[9,"resize","resizeHandler"]]]]],["p-7bf042c9",[[1,"p-cropper",{"variant":[513],"value":[8],"returnType":[1,"return-type"],"_loaded":[32],"_currentScale":[32]},[[9,"resize","onResize"]]]]],["p-97bcf0b5",[[1,"p-info-panel",{"variant":[1],"header":[1],"content":[1],"closeable":[4]}]]],["p-cf7bd354",[[4,"p-status",{"variant":[1],"icon":[1],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"]}]]],["p-d8641c29",[[1,"p-stepper-line",{"active":[516],"direction":[513]}]]],["p-085e6ff4",[[1,"p-stepper",{"activeStep":[2,"active-step"],"direction":[513],"contentPosition":[513,"content-position"]},null,{"activeStep":["_generateSteps"]}]]],["p-fe39443a",[[1,"p-stepper-item",{"align":[513],"direction":[513],"contentPosition":[513,"content-position"],"finished":[516],"active":[516]}]]],["p-ec29eed0",[[1,"p-tab-group"]]],["p-af6b813e",[[4,"p-avatar-group",{"extra":[2]}]]],["p-8426ca20",[[4,"p-card-body",{"inheritText":[516,"inherit-text"]}]]],["p-f0f1a46b",[[1,"p-card-container",{"hoverable":[516],"shadow":[516]}]]],["p-bbe63029",[[1,"p-layout",{"variant":[1]}]]],["p-7793ba3a",[[1,"p-tab-item",{"active":[4]}]]],["p-4dc5647e",[[0,"p-table-column",{"path":[1537],"type":[1537],"name":[1537],"useSlot":[1540,"use-slot"],"hasCheckbox":[1540,"has-checkbox"],"align":[1537],"isLast":[1540,"is-last"],"sizes":[1032]}]]],["p-606ad811",[[1,"p-toast-container",{"placement":[1]}]]],["p-dace47c5",[[1,"p-calendar",{"variant":[1],"value":[1],"preselectToday":[4,"preselect-today"],"disabledDates":[1,"disabled-dates"],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"disableWeekends":[4,"disable-weekends"],"mode":[1],"_view":[32],"_viewDate":[32],"_value":[32],"_minDate":[32],"_maxDate":[32],"_disabledDates":[32]},null,{"value":["_parseValue"],"minDate":["_parseMinDate"],"maxDate":["_parseMaxDate"],"disabledDates":["_parseDisabledDates"]}]]],["p-3ea2d7a2",[[0,"p-avatar",{"variant":[513],"size":[513],"defaultImage":[1,"default-image"],"src":[1],"letters":[1],"_src":[32],"_failed":[32]},null,{"src":["onSrchChange"]}]]],["p-2becd73c",[[1,"p-counter",{"variant":[1],"size":[1]}]]],["p-ec15ee73",[[1,"p-slider-indicator",{"active":[4]}]]],["p-4e9e4ce2",[[1,"p-drawer-header",{"showClose":[4,"show-close"]}],[1,"p-drawer-body",{"variant":[1]}],[4,"p-drawer-container",{"closing":[4]}]]],["p-b848c222",[[1,"p-backdrop",{"variant":[1],"applyBlur":[4,"apply-blur"],"closing":[4],"scrollLock":[4,"scroll-lock"]},[[2,"click","handleClick"]]]]],["p-2786d383",[[1,"p-modal-header",{"showClose":[4,"show-close"]}],[1,"p-modal-footer"],[1,"p-modal-body",{"variant":[1],"rounded":[4],"padding":[4]}],[4,"p-modal-container",{"size":[1],"closing":[4]}]]],["p-2cd5062f",[[1,"p-label",{"variant":[513],"behavior":[513],"iconPosition":[1,"icon-position"],"icon":[513],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"],"size":[513],"keepMobileContent":[516,"keep-mobile-content"]}],[1,"p-segment-item",{"active":[4],"iconOnly":[4,"icon-only"],"size":[513],"icon":[1],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"]}],[4,"p-segment-container"]]],["p-06c83915",[[4,"p-dropdown-menu-container",{"maxWidth":[4,"max-width"],"fullWidth":[4,"full-width"],"scrollable":[8]}]]],["p-6cbe8dc8",[[1,"p-dropdown-menu-item",{"active":[4],"variant":[1],"enableHover":[4,"enable-hover"],"icon":[1]}],[1,"p-dropdown",{"placement":[513],"strategy":[1],"show":[4],"calculateWidth":[4,"calculate-width"],"applyMaxWidth":[4,"apply-max-width"],"applyFullWidth":[4,"apply-full-width"],"scrollable":[8],"insideClick":[4,"inside-click"],"disableTriggerClick":[4,"disable-trigger-click"],"applyChevron":[4,"apply-chevron"],"chevronPosition":[1,"chevron-position"],"chevronDirection":[1,"chevron-direction"]},[[6,"click","documentClickHandler"]],{"show":["onShowChange"]}]]],["p-35c563a7",[[1,"p-page-size-select",{"size":[1538],"sizeOptions":[16],"chevronPosition":[1,"chevron-position"],"buttonSize":[1,"button-size"],"buttonTemplate":[16],"itemTemplate":[16],"hidden":[4],"_locales":[32]},[[16,"localeChanged","_setLocales"]]],[0,"p-pagination",{"page":[1538],"pageSize":[2,"page-size"],"hideOnSinglePage":[4,"hide-on-single-page"],"total":[2]},null,{"page":["pageChangeHandler"],"pageSize":["pageChangeHandler"],"total":["pageChangeHandler"]}],[1,"p-pagination-item",{"active":[4]}]]],["p-b7c0f157",[[1,"p-tooltip",{"variant":[1],"content":[8],"placement":[1],"strategy":[1],"enableUserInput":[4,"enable-user-input"],"show":[4],"canManuallyClose":[4,"can-manually-close"]},[[2,"click","clickHandler"],[6,"click","documentClickHandler"],[1,"mouseenter","mouseEnterHandler"],[0,"focus","mouseEnterHandler"],[1,"mouseleave","mouseLeaveHandler"],[0,"blur","mouseLeaveHandler"]]]]],["p-6a5aeb90",[[1,"p-input-group",{"size":[1],"prefix":[1],"suffix":[1],"icon":[1],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"],"iconPosition":[1,"icon-position"],"label":[1],"helper":[1],"required":[516],"error":[513],"disabled":[516],"focused":[516],"focusMethod":[1,"focus-method"],"_forceShowTooltip":[32]},[[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"]]],[1,"p-helper",{"placement":[1]}],[1,"p-input-error",{"error":[1],"forceShowTooltip":[4,"force-show-tooltip"],"_showTooltip":[32]}]]],["p-1079ffc6",[[1,"p-table-header",{"quickFilters":[16],"activeQuickFilterIdentifier":[1,"active-quick-filter-identifier"],"loading":[4],"enableSearch":[4,"enable-search"],"itemsSelectedAmount":[2,"items-selected-amount"],"query":[1025],"enableFilter":[4,"enable-filter"],"selectedFiltersAmount":[2,"selected-filters-amount"],"filterButtonTemplate":[16],"enableAction":[4,"enable-action"],"actionLoading":[4,"action-loading"],"actionIcon":[1,"action-icon"],"actionText":[1,"action-text"],"canUseAction":[1028,"can-use-action"],"actionButtonTemplate":[16],"_locales":[32]},[[16,"localeChanged","_setLocales"]]],[1,"p-table-footer",{"enablePageSize":[4,"enable-page-size"],"enablePagination":[4,"enable-pagination"],"enableExport":[4,"enable-export"],"loading":[4],"page":[1538],"total":[2],"pageSize":[2,"page-size"],"pageSizeOptions":[16],"hideOnSinglePage":[4,"hide-on-single-page"],"_locales":[32]},[[16,"localeChanged","_setLocales"]]],[4,"p-table-cell",{"variant":[1],"index":[2],"rowIndex":[2,"row-index"],"definition":[16],"item":[8],"value":[8],"checkbox":[8],"template":[16]}],[1,"p-table-row",{"variant":[1],"enableHover":[4,"enable-hover"]}],[1,"p-floating-menu-container",{"usedInTable":[4,"used-in-table"]}],[1,"p-floating-menu-item",{"hover":[516]}],[0,"p-illustration",{"variant":[1]}],[1,"p-table-container",{"shadow":[4]}]]]]'),e)));
1
+ import{p as e,b as a}from"./p-e4d5e7a7.js";export{s as setNonce}from"./p-e4d5e7a7.js";const t=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};t().then((e=>a(JSON.parse('[["p-daeadc69",[[4,"p-button",{"variant":[1],"underline":[4],"href":[1],"target":[1],"size":[1],"loading":[4],"chevron":[8],"chevronPosition":[1,"chevron-position"],"disabled":[4],"icon":[1],"iconOnly":[4,"icon-only"],"iconPosition":[1,"icon-position"],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"],"inheritText":[4,"inherit-text"]},[[2,"click","handleClick"]]],[1,"p-loader",{"show":[4],"variant":[1],"color":[1],"modalTitle":[1,"modal-title"],"modalDescription":[1,"modal-description"]}],[0,"p-icon",{"variant":[1],"size":[1],"rotate":[2],"flip":[1]}]]],["p-06f224c5",[[4,"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"],"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":[16],"activeQuickFilterIdentifier":[1,"active-quick-filter-identifier"],"enableSearch":[4,"enable-search"],"query":[1025],"enableFilter":[4,"enable-filter"],"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"],"enablePageSize":[4,"enable-page-size"],"enablePagination":[4,"enable-pagination"],"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],"_columns":[32],"_items":[32]},[[16,"localeChanged","_setLocales"],[16,"tableDefinitionChanged","onTableDefinitionUpdated"],[4,"keydown","keyDown"],[4,"keyup","keyUp"],[4,"visibilitychange","visibilityChange"]],{"items":["_parseItems"]}]]],["p-b4cc7289",[[0,"p-select",{"items":[1],"multi":[516],"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"],"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"],"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],"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"],"items":["itemChanges"],"_showDropdown":["_showDropdownChanges"],"multi":["multiChanges"]}]]],["p-fb45a664",[[1,"p-modal",{"size":[1],"variant":[1],"header":[1],"show":[4],"applyBlur":[4,"apply-blur"],"showClose":[4,"show-close"],"showMobileFooter":[4,"show-mobile-footer"],"backdropClickClose":[4,"backdrop-click-close"],"scrollLock":[4,"scroll-lock"],"padding":[4],"_closing":[32]},[[8,"closeModal","handleCloseModal"]]]]],["p-c9b840a7",[[0,"p-datepicker",{"placeholder":[1],"value":[1],"preselectToday":[4,"preselect-today"],"disabledDates":[1,"disabled-dates"],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"disableWeekends":[4,"disable-weekends"],"mode":[1],"format":[1],"size":[1],"prefix":[1],"label":[1],"helper":[1],"required":[516],"error":[513],"disabled":[516],"_showDropdown":[32],"_value":[32],"_minDate":[32],"_maxDate":[32],"_disabledDates":[32]},[[6,"click","documentClickHandler"]],{"value":["parseValue"],"minDate":["parseMinDate"],"maxDate":["parseMaxDate"],"disabledDates":["parseDisabledDates"]}]]],["p-0d71fc44",[[1,"p-drawer",{"header":[1],"show":[4],"applyBlur":[4,"apply-blur"],"showClose":[4,"show-close"],"backdropClickClose":[4,"backdrop-click-close"],"canClose":[4,"can-close"],"scrollLock":[4,"scroll-lock"],"_closing":[32]},[[8,"closeDrawer","handleCloseDrawer"]]]]],["p-699e0b35",[[1,"p-attachment",{"mode":[1],"loading":[4],"error":[1],"downloading":[4]}]]],["p-179efb16",[[1,"p-navbar",{"closeText":[1,"close-text"],"menuText":[1,"menu-text"],"_showMenu":[32]},[[8,"closeNavbar","handleCloseNavbar"],[8,"openNavbar","handleOpenNavbar"]]]]],["p-93052b42",[[1,"p-profile",{"variant":[1],"size":[513],"_dropdownOpen":[32]}]]],["p-4c30c74b",[[1,"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"]}]]],["p-a2b552f9",[[1,"p-divider",{"variant":[513]}]]],["p-d0796984",[[1,"p-accordion",{"header":[1],"open":[4],"closeable":[4],"openable":[4]}]]],["p-fffaacc2",[[1,"p-navigation-item",{"active":[4],"icon":[1],"counter":[8],"href":[1],"target":[1]}]]],["p-5d678a05",[[4,"p-card-header",{"header":[1],"arrow":[4]}]]],["p-cb2674b5",[[1,"p-content-slider",{"hideMobileIndicator":[4,"hide-mobile-indicator"],"disableDrag":[4,"disable-drag"],"disableAutoCenter":[4,"disable-auto-center"],"disableIndicatorClick":[4,"disable-indicator-click"],"_visibleIndex":[32],"_outerHeight":[32],"_totalWidth":[32],"_dragging":[32]},[[9,"mouseup","mouseUpHandler"],[9,"touchend","mouseUpHandler"],[9,"resize","resizeHandler"]]]]],["p-7bf042c9",[[1,"p-cropper",{"variant":[513],"value":[8],"returnType":[1,"return-type"],"_loaded":[32],"_currentScale":[32]},[[9,"resize","onResize"]]]]],["p-97bcf0b5",[[1,"p-info-panel",{"variant":[1],"header":[1],"content":[1],"closeable":[4]}]]],["p-cf7bd354",[[4,"p-status",{"variant":[1],"icon":[1],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"]}]]],["p-d8641c29",[[1,"p-stepper-line",{"active":[516],"direction":[513]}]]],["p-085e6ff4",[[1,"p-stepper",{"activeStep":[2,"active-step"],"direction":[513],"contentPosition":[513,"content-position"]},null,{"activeStep":["_generateSteps"]}]]],["p-fe39443a",[[1,"p-stepper-item",{"align":[513],"direction":[513],"contentPosition":[513,"content-position"],"finished":[516],"active":[516]}]]],["p-ec29eed0",[[1,"p-tab-group"]]],["p-af6b813e",[[4,"p-avatar-group",{"extra":[2]}]]],["p-8426ca20",[[4,"p-card-body",{"inheritText":[516,"inherit-text"]}]]],["p-f0f1a46b",[[1,"p-card-container",{"hoverable":[516],"shadow":[516]}]]],["p-bbe63029",[[1,"p-layout",{"variant":[1]}]]],["p-7793ba3a",[[1,"p-tab-item",{"active":[4]}]]],["p-4dc5647e",[[0,"p-table-column",{"path":[1537],"type":[1537],"name":[1537],"useSlot":[1540,"use-slot"],"hasCheckbox":[1540,"has-checkbox"],"align":[1537],"isLast":[1540,"is-last"],"sizes":[1032]}]]],["p-606ad811",[[1,"p-toast-container",{"placement":[1]}]]],["p-dace47c5",[[1,"p-calendar",{"variant":[1],"value":[1],"preselectToday":[4,"preselect-today"],"disabledDates":[1,"disabled-dates"],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"disableWeekends":[4,"disable-weekends"],"mode":[1],"_view":[32],"_viewDate":[32],"_value":[32],"_minDate":[32],"_maxDate":[32],"_disabledDates":[32]},null,{"value":["_parseValue"],"minDate":["_parseMinDate"],"maxDate":["_parseMaxDate"],"disabledDates":["_parseDisabledDates"]}]]],["p-3ea2d7a2",[[0,"p-avatar",{"variant":[513],"size":[513],"defaultImage":[1,"default-image"],"src":[1],"letters":[1],"_src":[32],"_failed":[32]},null,{"src":["onSrchChange"]}]]],["p-2becd73c",[[1,"p-counter",{"variant":[1],"size":[1]}]]],["p-ec15ee73",[[1,"p-slider-indicator",{"active":[4]}]]],["p-4e9e4ce2",[[1,"p-drawer-header",{"showClose":[4,"show-close"]}],[1,"p-drawer-body",{"variant":[1]}],[4,"p-drawer-container",{"closing":[4]}]]],["p-b848c222",[[1,"p-backdrop",{"variant":[1],"applyBlur":[4,"apply-blur"],"closing":[4],"scrollLock":[4,"scroll-lock"]},[[2,"click","handleClick"]]]]],["p-2786d383",[[1,"p-modal-header",{"showClose":[4,"show-close"]}],[1,"p-modal-footer"],[1,"p-modal-body",{"variant":[1],"rounded":[4],"padding":[4]}],[4,"p-modal-container",{"size":[1],"closing":[4]}]]],["p-2cd5062f",[[1,"p-label",{"variant":[513],"behavior":[513],"iconPosition":[1,"icon-position"],"icon":[513],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"],"size":[513],"keepMobileContent":[516,"keep-mobile-content"]}],[1,"p-segment-item",{"active":[4],"iconOnly":[4,"icon-only"],"size":[513],"icon":[1],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"]}],[4,"p-segment-container"]]],["p-06c83915",[[4,"p-dropdown-menu-container",{"maxWidth":[4,"max-width"],"fullWidth":[4,"full-width"],"scrollable":[8]}]]],["p-6cbe8dc8",[[1,"p-dropdown-menu-item",{"active":[4],"variant":[1],"enableHover":[4,"enable-hover"],"icon":[1]}],[1,"p-dropdown",{"placement":[513],"strategy":[1],"show":[4],"calculateWidth":[4,"calculate-width"],"applyMaxWidth":[4,"apply-max-width"],"applyFullWidth":[4,"apply-full-width"],"scrollable":[8],"insideClick":[4,"inside-click"],"disableTriggerClick":[4,"disable-trigger-click"],"applyChevron":[4,"apply-chevron"],"chevronPosition":[1,"chevron-position"],"chevronDirection":[1,"chevron-direction"]},[[6,"click","documentClickHandler"]],{"show":["onShowChange"]}]]],["p-35c563a7",[[1,"p-page-size-select",{"size":[1538],"sizeOptions":[16],"chevronPosition":[1,"chevron-position"],"buttonSize":[1,"button-size"],"buttonTemplate":[16],"itemTemplate":[16],"hidden":[4],"_locales":[32]},[[16,"localeChanged","_setLocales"]]],[0,"p-pagination",{"page":[1538],"pageSize":[2,"page-size"],"hideOnSinglePage":[4,"hide-on-single-page"],"total":[2]},null,{"page":["pageChangeHandler"],"pageSize":["pageChangeHandler"],"total":["pageChangeHandler"]}],[1,"p-pagination-item",{"active":[4]}]]],["p-b7c0f157",[[1,"p-tooltip",{"variant":[1],"content":[8],"placement":[1],"strategy":[1],"enableUserInput":[4,"enable-user-input"],"show":[4],"canManuallyClose":[4,"can-manually-close"]},[[2,"click","clickHandler"],[6,"click","documentClickHandler"],[1,"mouseenter","mouseEnterHandler"],[0,"focus","mouseEnterHandler"],[1,"mouseleave","mouseLeaveHandler"],[0,"blur","mouseLeaveHandler"]]]]],["p-6a5aeb90",[[1,"p-input-group",{"size":[1],"prefix":[1],"suffix":[1],"icon":[1],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"],"iconPosition":[1,"icon-position"],"label":[1],"helper":[1],"required":[516],"error":[513],"disabled":[516],"focused":[516],"focusMethod":[1,"focus-method"],"_forceShowTooltip":[32]},[[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"]]],[1,"p-helper",{"placement":[1]}],[1,"p-input-error",{"error":[1],"forceShowTooltip":[4,"force-show-tooltip"],"_showTooltip":[32]}]]],["p-1079ffc6",[[1,"p-table-header",{"quickFilters":[16],"activeQuickFilterIdentifier":[1,"active-quick-filter-identifier"],"loading":[4],"enableSearch":[4,"enable-search"],"itemsSelectedAmount":[2,"items-selected-amount"],"query":[1025],"enableFilter":[4,"enable-filter"],"selectedFiltersAmount":[2,"selected-filters-amount"],"filterButtonTemplate":[16],"enableAction":[4,"enable-action"],"actionLoading":[4,"action-loading"],"actionIcon":[1,"action-icon"],"actionText":[1,"action-text"],"canUseAction":[1028,"can-use-action"],"actionButtonTemplate":[16],"_locales":[32]},[[16,"localeChanged","_setLocales"]]],[1,"p-table-footer",{"enablePageSize":[4,"enable-page-size"],"enablePagination":[4,"enable-pagination"],"enableExport":[4,"enable-export"],"loading":[4],"page":[1538],"total":[2],"pageSize":[2,"page-size"],"pageSizeOptions":[16],"hideOnSinglePage":[4,"hide-on-single-page"],"_locales":[32]},[[16,"localeChanged","_setLocales"]]],[4,"p-table-cell",{"variant":[1],"index":[2],"rowIndex":[2,"row-index"],"definition":[16],"item":[8],"value":[8],"checkbox":[8],"template":[16]}],[1,"p-table-row",{"variant":[1],"enableHover":[4,"enable-hover"]}],[1,"p-floating-menu-container",{"usedInTable":[4,"used-in-table"]}],[1,"p-floating-menu-item",{"hover":[516]}],[0,"p-illustration",{"variant":[1]}],[1,"p-table-container",{"shadow":[4]}]]]]'),e)));
2
2
  //# sourceMappingURL=paperless.esm.js.map
@@ -16,7 +16,7 @@ const NavigationItem = class {
16
16
  this.target = undefined;
17
17
  }
18
18
  render() {
19
- return (index.h(index.Host, { class: `p-navigation-item ${this.active && 'active'}` }, index.h("a", { href: this.href, target: this.target }, this.icon && index.h("p-icon", { variant: this.icon }), index.h("span", { class: this.counter && 'has-counter' }, index.h("slot", null)), this.counter && (index.h("p-counter", { variant: "negative" }, this.counter)))));
19
+ return (index.h(index.Host, { class: `p-navigation-item ${this.active && 'active'}` }, index.h("a", { href: this.href, target: this.target }, this.icon && index.h("p-icon", { variant: this.icon }), index.h("span", { class: this.counter && 'has-counter' }, index.h("slot", null)), !!this.counter && this.counter !== '0' && (index.h("p-counter", { variant: "negative" }, this.counter)))));
20
20
  }
21
21
  };
22
22
  NavigationItem.style = navigationItemComponentCss;
@@ -1 +1 @@
1
- {"file":"p-navigation-item.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,0BAA0B,GAAG,szCAAszC;;MCQ50C,cAAc;;;kBAIA,KAAK;;;;;;EAsB/B,MAAM;IACL,QACCA,QAACC,UAAI,IAAC,KAAK,EAAE,qBAAqB,IAAI,CAAC,MAAM,IAAI,QAAQ,EAAE,IAC1DD,eAAG,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,IACrC,IAAI,CAAC,IAAI,IAAIA,oBAAQ,OAAO,EAAE,IAAI,CAAC,IAAI,GAAI,EAC5CA,kBAAM,KAAK,EAAE,IAAI,CAAC,OAAO,IAAI,aAAa,IACzCA,qBAAQ,CACF,EACN,IAAI,CAAC,OAAO,KACZA,uBAAW,OAAO,EAAC,UAAU,IAAE,IAAI,CAAC,OAAO,CAAa,CACxD,CACE,CACE,EACN;GACF;;;;;;","names":["h","Host"],"sources":["src/components/molecules/navigation-item/navigation-item.component.scss?tag=p-navigation-item&encapsulation=shadow","src/components/molecules/navigation-item/navigation-item.component.tsx"],"sourcesContent":[":host {\n\t@apply w-full inline-block mb-1;\n\n\t> a {\n\t\t@apply w-full h-8 px-2 cursor-pointer rounded-large no-underline;\n\t\t@apply flex items-center gap-2;\n\t\t@apply text-storm font-semibold;\n\n\t\t@apply hover:bg-indigo-light;\n\n\t\t> p-icon {\n\t\t\t@apply text-storm;\n\t\t}\n\n\t\t> p-counter {\n\t\t\t@apply ml-auto;\n\t\t}\n\t}\n}\n\n:host(.active) {\n\t> a {\n\t\t@apply text-indigo bg-indigo-light;\n\n\t\t> p-icon {\n\t\t\t@apply text-indigo;\n\t\t}\n\t}\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { IconVariant } from '../../atoms/icon/icon.component';\n\n@Component({\n\ttag: 'p-navigation-item',\n\tstyleUrl: 'navigation-item.component.scss',\n\tshadow: true,\n})\nexport class NavigationItem {\n\t/**\n\t * Wether the navigation item is active\n\t */\n\t@Prop() active: boolean = false;\n\n\t/**\n\t * Icon of the navigation item\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * Icon of the navigation item\n\t */\n\t@Prop() counter: number | string;\n\n\t/**\n\t * The href of the navigation item\n\t */\n\t@Prop() href: string;\n\n\t/**\n\t * The target of the navigation item\n\t */\n\t@Prop() target: string;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={`p-navigation-item ${this.active && 'active'}`}>\n\t\t\t\t<a href={this.href} target={this.target}>\n\t\t\t\t\t{this.icon && <p-icon variant={this.icon} />}\n\t\t\t\t\t<span class={this.counter && 'has-counter'}>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</span>\n\t\t\t\t\t{this.counter && (\n\t\t\t\t\t\t<p-counter variant=\"negative\">{this.counter}</p-counter>\n\t\t\t\t\t)}\n\t\t\t\t</a>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}
1
+ {"file":"p-navigation-item.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,0BAA0B,GAAG,szCAAszC;;MCQ50C,cAAc;;;kBAIA,KAAK;;;;;;EAsB/B,MAAM;IACL,QACCA,QAACC,UAAI,IAAC,KAAK,EAAE,qBAAqB,IAAI,CAAC,MAAM,IAAI,QAAQ,EAAE,IAC1DD,eAAG,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,IACrC,IAAI,CAAC,IAAI,IAAIA,oBAAQ,OAAO,EAAE,IAAI,CAAC,IAAI,GAAI,EAC5CA,kBAAM,KAAK,EAAE,IAAI,CAAC,OAAO,IAAI,aAAa,IACzCA,qBAAQ,CACF,EACN,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,KAAK,GAAG,KACtCA,uBAAW,OAAO,EAAC,UAAU,IAAE,IAAI,CAAC,OAAO,CAAa,CACxD,CACE,CACE,EACN;GACF;;;;;;","names":["h","Host"],"sources":["src/components/molecules/navigation-item/navigation-item.component.scss?tag=p-navigation-item&encapsulation=shadow","src/components/molecules/navigation-item/navigation-item.component.tsx"],"sourcesContent":[":host {\n\t@apply w-full inline-block mb-1;\n\n\t> a {\n\t\t@apply w-full h-8 px-2 cursor-pointer rounded-large no-underline;\n\t\t@apply flex items-center gap-2;\n\t\t@apply text-storm font-semibold;\n\n\t\t@apply hover:bg-indigo-light;\n\n\t\t> p-icon {\n\t\t\t@apply text-storm;\n\t\t}\n\n\t\t> p-counter {\n\t\t\t@apply ml-auto;\n\t\t}\n\t}\n}\n\n:host(.active) {\n\t> a {\n\t\t@apply text-indigo bg-indigo-light;\n\n\t\t> p-icon {\n\t\t\t@apply text-indigo;\n\t\t}\n\t}\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { IconVariant } from '../../atoms/icon/icon.component';\n\n@Component({\n\ttag: 'p-navigation-item',\n\tstyleUrl: 'navigation-item.component.scss',\n\tshadow: true,\n})\nexport class NavigationItem {\n\t/**\n\t * Wether the navigation item is active\n\t */\n\t@Prop() active: boolean = false;\n\n\t/**\n\t * Icon of the navigation item\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * Icon of the navigation item\n\t */\n\t@Prop() counter: number | string;\n\n\t/**\n\t * The href of the navigation item\n\t */\n\t@Prop() href: string;\n\n\t/**\n\t * The target of the navigation item\n\t */\n\t@Prop() target: string;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={`p-navigation-item ${this.active && 'active'}`}>\n\t\t\t\t<a href={this.href} target={this.target}>\n\t\t\t\t\t{this.icon && <p-icon variant={this.icon} />}\n\t\t\t\t\t<span class={this.counter && 'has-counter'}>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</span>\n\t\t\t\t\t{!!this.counter && this.counter !== '0' && (\n\t\t\t\t\t\t<p-counter variant=\"negative\">{this.counter}</p-counter>\n\t\t\t\t\t)}\n\t\t\t\t</a>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}
@@ -271,7 +271,7 @@ const Select = class {
271
271
  this._showDropdown = !this._showDropdown;
272
272
  }
273
273
  _onBlur(force = false) {
274
- if (!this.enableAutocomplete && !force) {
274
+ if (this.enableAutocomplete && !force) {
275
275
  return;
276
276
  }
277
277
  this._showDropdown = false;