@aquera/nile-elements 1.4.4-beta-1.2 → 1.4.5-beta-1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +3 -0
  2. package/demo/index.html +3 -7
  3. package/demo/variables.css +1 -0
  4. package/dist/index.js +11 -11
  5. package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
  6. package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
  7. package/dist/nile-auto-complete/nile-auto-complete.esm.js +3 -3
  8. package/dist/nile-chip/nile-chip.cjs.js +1 -1
  9. package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
  10. package/dist/nile-chip/nile-chip.esm.js +11 -11
  11. package/dist/nile-dropdown/nile-dropdown.cjs.js +1 -1
  12. package/dist/nile-dropdown/nile-dropdown.cjs.js.map +1 -1
  13. package/dist/nile-dropdown/nile-dropdown.esm.js +2 -2
  14. package/dist/nile-toast/nile-toast.cjs.js +1 -1
  15. package/dist/nile-toast/nile-toast.cjs.js.map +1 -1
  16. package/dist/nile-toast/nile-toast.esm.js +2 -2
  17. package/dist/src/nile-accesibility/index.d.ts +1 -0
  18. package/dist/src/nile-accesibility/index.js +2 -0
  19. package/dist/src/nile-accesibility/index.js.map +1 -0
  20. package/dist/src/nile-accesibility/nile-accesibility.css.d.ts +12 -0
  21. package/dist/src/nile-accesibility/nile-accesibility.css.js +41 -0
  22. package/dist/src/nile-accesibility/nile-accesibility.css.js.map +1 -0
  23. package/dist/src/nile-accesibility/nile-accesibility.d.ts +18 -0
  24. package/dist/src/nile-accesibility/nile-accesibility.js +61 -0
  25. package/dist/src/nile-accesibility/nile-accesibility.js.map +1 -0
  26. package/dist/src/nile-auto-complete/nile-auto-complete.d.ts +1 -0
  27. package/dist/src/nile-auto-complete/nile-auto-complete.js +13 -3
  28. package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
  29. package/dist/src/nile-chip/nile-chip.d.ts +2 -0
  30. package/dist/src/nile-chip/nile-chip.js +10 -4
  31. package/dist/src/nile-chip/nile-chip.js.map +1 -1
  32. package/dist/src/nile-dropdown/nile-dropdown.js +4 -0
  33. package/dist/src/nile-dropdown/nile-dropdown.js.map +1 -1
  34. package/dist/src/nile-toast/nile-toast.d.ts +1 -1
  35. package/dist/src/nile-toast/nile-toast.js +4 -4
  36. package/dist/src/nile-toast/nile-toast.js.map +1 -1
  37. package/dist/src/version.js +1 -1
  38. package/dist/src/version.js.map +1 -1
  39. package/dist/tsconfig.tsbuildinfo +1 -1
  40. package/package.json +1 -1
  41. package/src/nile-auto-complete/nile-auto-complete.ts +9 -3
  42. package/src/nile-chip/nile-chip.ts +5 -10
  43. package/src/nile-dropdown/nile-dropdown.ts +3 -0
  44. package/src/nile-toast/nile-toast.ts +4 -4
  45. package/vscode-html-custom-data.json +16 -2
@@ -1 +1 @@
1
- {"version":3,"file":"nile-auto-complete.cjs.js","sources":["../../../src/nile-auto-complete/nile-auto-complete.ts"],"sourcesContent":["import {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n nothing,\n} from 'lit';\nimport { customElement, query, state, property } from 'lit/decorators.js';\nimport { styles } from './nile-auto-complete.css';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup, PropertyValues } from 'lit';\nimport { NileDropdown } from '../nile-dropdown';\nimport { watch } from '../internal/watch';\nimport { AutoCompletePortalManager } from './portal-manager';\nimport { NileInput } from '../nile-input';\n\nimport { virtualize } from '@lit-labs/virtualizer/virtualize.js';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { VisibilityManager } from '../utilities/visibility-manager.js';\n\n\n// Define the custom element 'nile-auto-complete'\n@customElement('nile-auto-complete')\nexport class NileAutoComplete extends NileElement {\n\n static styles: CSSResultGroup = styles;\n private visibilityManager?: VisibilityManager;\n\n\n @query('nile-dropdown') dropdownElement: NileDropdown;\n\n @query('nile-input') inputElement: NileInput;\n\n // Define component properties\n\n @property({ type: Boolean }) disabled: boolean = false;\n\n @property({ type: Boolean }) isDropdownOpen: boolean = false;\n\n /** \n * When true, the dropdown menu will be appended to the document body instead of the parent container.\n * This is useful when the parent has overflow: hidden, clip-path, or transform applied.\n */\n @property({ type: Boolean, reflect: true }) portal = false;\n\n private readonly portalManager = new AutoCompletePortalManager(this);\n\n @property({ type: Boolean }) enableVirtualScroll: boolean = false;\n\n @property({ type: Boolean }) openOnFocus: boolean = false;\n\n @property({ type: String }) value: string = '';\n\n @property({ type: String }) placeholder: string = 'Type here ..';\n\n @property({ type: Boolean }) noBorder: boolean = false;\n \n @property({ type: Boolean }) noOutline: boolean = false;\n\n @property({ type: Boolean }) noPadding: boolean = false;\n\n @property({ type: Boolean }) loading: boolean = false;\n\n @property({ attribute:false}) filterFunction: (item:string,searchedValue:string)=>boolean=(item:string,searchedValue:string)=>item.toLowerCase().includes(searchedValue.toLowerCase());\n\n @property({ attribute:false}) renderItemFunction: (item:any)=>string = (item:any)=>item;\n\n @property({ type: Array }) allMenuItems: any = [];\n\n @property({ type: Boolean, reflect: true }) enableVisibilityEffect = false;\n\n @property({ type: Boolean, reflect: true }) enableTabClose = false;\n\n\n @state() menuItems: any = [];\n\n\n protected async firstUpdated(_changed: PropertyValues) {\n await this.updateComplete;\n\n this.visibilityManager = new VisibilityManager({\n host: this,\n target: this.inputElement.input, \n enableVisibilityEffect: this.enableVisibilityEffect,\nenableTabClose: this.enableTabClose,\n isOpen: () => this.isDropdownOpen,\n onAnchorOutOfView: () => {\n this.isDropdownOpen = false;\n this.dropdownElement?.hide();\n this.emit('nile-visibility-change', {\n visible: false,\n reason: 'anchor-out-of-view',\n });\n },\n onDocumentHidden: () => {\n this.isDropdownOpen = false;\n this.dropdownElement?.hide();\n this.emit('nile-visibility-change', {\n visible: false,\n reason: 'document-hidden',\n });\n },\n emit: (event, detail) => this.emit(`nile-${event}`, detail),\n });\n }\n connectedCallback() {\n super.connectedCallback();\n this.renderItemFunction=(item:any)=>item;\n this.handleDocumentFocusIn = this.handleDocumentFocusIn.bind(this);\n this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this);\n this.handleWindowResize = this.handleWindowResize.bind(this);\n this.handleWindowScroll = this.handleWindowScroll.bind(this);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeOpenListeners();\n this.visibilityManager?.cleanup();\n this.portalManager.cleanupPortalAppend();\n }\n\n protected updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties);\n if (changedProperties.has('allMenuItems')){\n this.menuItems = this.applyFilter(this.allMenuItems,this.filterFunction);\n this.setVirtualMenuWidth();\n if (this.portal && this.isDropdownOpen) {\n this.portalManager.updatePortalOptions();\n }\n }\n if (changedProperties.has('isDropdownOpen')) {\n this.menuItems = this.applyFilter(this.allMenuItems,this.filterFunction);\n this.handleDropdownOpenChange();\n }\n if (changedProperties.has('value')){\n this.menuItems = this.applyFilter(this.allMenuItems,this.filterFunction);\n if (this.portal && this.isDropdownOpen) {\n this.portalManager.updatePortalOptions();\n }\n }\n if (changedProperties.has('portal')) {\n this.handlePortalChange();\n }\n }\n\n @watch('portal', { waitUntilFirstUpdate: true })\n handlePortalChange(): void {\n if (this.isDropdownOpen) {\n if (this.portal) {\n this.portalManager.setupPortalAppend();\n } else {\n this.portalManager.cleanupPortalAppend();\n }\n }\n }\n\n private handleDropdownOpenChange(): void {\n if (this.isDropdownOpen) {\n this.addOpenListeners();\n this.visibilityManager?.setup();\n if (this.portal) {\n this.portalManager.setupPortalAppend();\n }\n } else {\n this.removeOpenListeners();\n this.visibilityManager?.cleanup();\n if (this.portal) {\n this.portalManager.cleanupPortalAppend();\n }\n }\n }\n\n private addOpenListeners(): void {\n document.addEventListener('focusin', this.handleDocumentFocusIn);\n document.addEventListener('mousedown', this.handleDocumentMouseDown);\n \n if (this.portal) {\n window.addEventListener('resize', this.handleWindowResize);\n window.addEventListener('scroll', this.handleWindowScroll, true);\n }\n }\n\n private removeOpenListeners(): void {\n document.removeEventListener('focusin', this.handleDocumentFocusIn);\n document.removeEventListener('mousedown', this.handleDocumentMouseDown);\n window.removeEventListener('resize', this.handleWindowResize);\n window.removeEventListener('scroll', this.handleWindowScroll, true);\n }\n\n private handleDocumentFocusIn(event: FocusEvent) {\n if (!this.isDropdownOpen) return;\n const path = event.composedPath();\n const hitSelf = path.includes(this);\n const hitDropdown = this.dropdownElement && path.includes(this.dropdownElement);\n const hitPortalAppend = this.portal && this.portalManager.portalContainerElement && path.includes(this.portalManager.portalContainerElement);\n\n if (!hitSelf && !hitDropdown && !hitPortalAppend) {\n this.isDropdownOpen = false;\n this.dropdownElement?.hide();\n }\n }\n\n private handleDocumentMouseDown(event: MouseEvent) {\n if (!this.isDropdownOpen) return;\n \n const path = event.composedPath();\n const hitSelf = path.includes(this);\n const hitDropdown = this.dropdownElement && path.includes(this.dropdownElement);\n const hitPortalAppend = this.portal && this.portalManager.portalContainerElement && path.includes(this.portalManager.portalContainerElement);\n \n if (!hitSelf && !hitDropdown && !hitPortalAppend) {\n this.isDropdownOpen = false;\n this.dropdownElement?.hide();\n }\n }\n\n private handleWindowResize = (): void => {\n this.portalManager.updatePortalAppendPosition();\n };\n\n private handleWindowScroll = (): void => {\n this.portalManager.updatePortalAppendPosition();\n };\n\n public render(): TemplateResult {\n const content=this.enableVirtualScroll?this.getVirtualizedContent():this.getContent();\n return html`\n <nile-dropdown class=\"nile-dropdown--input\" ?open=${this.isDropdownOpen} noOpenOnCLick exportparts=\"input, base\">\n <nile-input class=\"nile-auto-complete--input\"\n ?no-border=${this.noBorder}\n ?no-outline=${this.noOutline}\n ?no-padding=${this.noPadding}\n .disabled=${this.disabled}\n .value=${this.value}\n @nile-input=${this.handleSearch}\n @focus=${this.handleFocus}\n @click=${this.handleClick}\n slot=\"trigger\"\n placeholder=${this.placeholder}\n exportparts=\"input, base\"\n >\n ${this.loading?html`<nile-icon slot=\"suffix\" color=\"var(--nile-colors-primary-600)\" name=\"var(--nile-icon-button-loading-blue-animated, var(--ng-icon-button-loading-blue-animated))\" method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\" library=\"system\"></nile-icon>`:nothing}\n </nile-input>\n ${this.menuItems.length > 0 && !this.loading\n ? content\n : nothing}\n </nile-dropdown>\n `;\n } \n \n getVirtualizedContent():TemplateResult{\n return html`\n <nile-menu class=\"virtualized__menu\" @nile-select=${this.handleSelect} id=\"content-menu\" exportparts=\"menu__items-wrapper:options__wrapper\" style=${this.portal ? 'display: none;' : ''}>\n ${virtualize({\n items: this.menuItems,\n renderItem: (item:any):TemplateResult=>this.getItemRenderFunction(item),\n\t\t\t\t\tscroller:true\n })}\n </nile-menu>\n `\n }\n\n getContent():TemplateResult{\n return html`\n <nile-menu id=\"content-menu\" @nile-select=${this.handleSelect} exportparts=\"menu__items-wrapper:options__wrapper\" style=${this.portal ? 'display: none;' : ''}>\n ${this.menuItems.map((item: any) => this.getItemRenderFunction(item))}\n </nile-menu>`\n }\n\n getItemRenderFunction(item: any): TemplateResult {\n const value = this.renderItemFunction(item);\n let strValue = \"\";\n if(value || typeof value === \"number\") {\n strValue = value.toString();\n }\n const hasTooltip = !!item.tooltip;\n const shouldShowTooltip =\n hasTooltip && (!item.tooltip.for || item.tooltip.for === 'menu');\n \n if (!shouldShowTooltip) {\n return html`\n <nile-menu-item value=${value}>${unsafeHTML(strValue)}</nile-menu-item>\n `;\n }\n \n let tooltipContent: string | null = null;\n \n const content = item.tooltip.content;\n if (content instanceof Promise) {\n tooltipContent = 'Loading...'; \n content.then((resolved: string) => {\n item.tooltip.content = resolved;\n this.requestUpdate(); \n });\n } else {\n tooltipContent = content;\n }\n \n return html`\n <nile-menu-item value=${value}>\n <nile-lite-tooltip allowHTML .content=${tooltipContent ?? \"\"}>\n <span class=\"menu-item-text\">${unsafeHTML(strValue)}</span>\n </nile-lite-tooltip>\n </nile-menu-item>\n `;\n }\n\n handleSelect(event: CustomEvent) {\n this.value = event.detail.value;\n this.emit('nile-complete', { value: event.detail.value });\n this.isDropdownOpen = false;\n this.dropdownElement?.hide();\n }\n\n private setVirtualMenuWidth() {\n const maxLengthOption = this.menuItems\n .reduce((acc: number, curr: any) => {\n const currLength = this.renderItemFunction(curr).length\n return acc > currLength ? acc : currLength\n }, 0)\n const defaultWith = 110;\n const pixelMultiplier = 9.5;\n const menuWidth = maxLengthOption * pixelMultiplier < defaultWith ? defaultWith : maxLengthOption * pixelMultiplier;\n this.style.setProperty(\"--virtual-scroll-container-width\", menuWidth + \"px\");\n }\n\n private handleSearch(event: CustomEvent) {\n this.value = event.detail.value;\n\n // Filter menu items based on the search value\n this.menuItems = this.applyFilter(this.allMenuItems,this.filterFunction);\n\n this.isDropdownOpen = this.menuItems.length > 0;\n if (this.isDropdownOpen) {\n this.dropdownElement?.show();\n if (this.portal) {\n this.portalManager.updatePortalOptions();\n }\n }\n }\n\n public handleFocus() {\n if (!this.openOnFocus) {\n return;\n }\n\n if(this.portal) {\n this.inputElement?.focus();\n }\n\n // Delay opening the dropdown to allow focus to take effect\n setTimeout(() => {\n this.isDropdownOpen = true;\n this.dropdownElement?.show();\n }, 300);\n }\n\n private handleClick() {\n this.isDropdownOpen = true;\n this.dropdownElement?.show();\n }\n\n applyFilter<T>(list: T[], filterFn: (item: T,searchValue?:string) => boolean): T[] {\n if(typeof(list)!=='object') return []\n const res:T[]=[]\n list.forEach( el=> filterFn(el,this.value) && res.push(el) )\n return res\n }\n\n}\n\nexport default NileAutoComplete;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-auto-complete': NileAutoComplete;\n }\n}\n"],"names":["NileAutoComplete","m","constructor","this","disabled","isDropdownOpen","portal","portalManager","AutoCompletePortalManager","enableVirtualScroll","openOnFocus","value","placeholder","noBorder","noOutline","noPadding","loading","filterFunction","item","searchedValue","toLowerCase","includes","renderItemFunction","allMenuItems","enableVisibilityEffect","enableTabClose","menuItems","handleWindowResize","updatePortalAppendPosition","handleWindowScroll","_this","_inherits","_r","_createClass","key","_firstUpdated","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_changed","updateComplete","visibilityManager","VisibilityManager","host","target","inputElement","input","isOpen","onAnchorOutOfView","_this2$dropdownElemen","dropdownElement","hide","emit","visible","reason","onDocumentHidden","_this2$dropdownElemen2","event","detail","_context2","stop","firstUpdated","connectedCallback","super","handleDocumentFocusIn","bind","handleDocumentMouseDown","disconnectedCallback","removeOpenListeners","cleanup","cleanupPortalAppend","updated","changedProperties","has","applyFilter","setVirtualMenuWidth","updatePortalOptions","handleDropdownOpenChange","handlePortalChange","setupPortalAppend","addOpenListeners","setup","document","addEventListener","window","removeEventListener","_this$dropdownElement","path","composedPath","hitSelf","hitDropdown","hitPortalAppend","portalContainerElement","_this$dropdownElement2","render","content","getVirtualizedContent","getContent","html","_templateObject","_taggedTemplateLiteral","handleSearch","handleFocus","handleClick","_templateObject2","nothing","length","_this3","_templateObject3","handleSelect","virtualize","items","renderItem","getItemRenderFunction","scroller","_this4","_templateObject4","map","_this5","strValue","toString","tooltip","_templateObject5","unsafeHTML","tooltipContent","Promise","then","resolved","requestUpdate","_templateObject6","maxLengthOption","reduce","acc","curr","currLength","menuWidth","style","setProperty","show","focus","setTimeout","_this7$dropdownElemen","_this$dropdownElement5","list","filterFn","_this8","t","res","forEach","el","push","NileElement","styles","__decorate","query","prototype","property","type","Boolean","reflect","String","attribute","Array","state","watch","waitUntilFirstUpdate","customElement"],"mappings":"ooZAuBaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCAYwBC,KAAAA,CAAQC,QAAAA,CAAAA,CAAY,CAEpBD,CAAAA,KAAAA,CAAcE,cAAY,CAAA,CAAA,CAAA,CAMXF,KAAAA,CAAMG,MAAG,CAAA,CAAA,CAAA,CAEpCH,KAAAA,CAAAI,aAAAA,CAAgB,GAAIC,CAAAA,CAAAA,CAAAA,sBAAAA,CAAAA,KAAAA,CAERL,CAAAA,CAAAA,KAAAA,CAAmBM,mBAAY,CAAA,CAAA,CAAA,CAE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CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAgB0J,EAAA,CAD5Ba,CAAAA,CAAc,uBACFvK"}
1
+ {"version":3,"file":"nile-auto-complete.cjs.js","sources":["../../../src/nile-auto-complete/nile-auto-complete.ts"],"sourcesContent":["import {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n nothing,\n} from 'lit';\nimport { customElement, query, state, property } from 'lit/decorators.js';\nimport { styles } from './nile-auto-complete.css';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup, PropertyValues } from 'lit';\nimport { NileDropdown } from '../nile-dropdown';\nimport { watch } from '../internal/watch';\nimport { AutoCompletePortalManager } from './portal-manager';\nimport { NileInput } from '../nile-input';\n\nimport { virtualize } from '@lit-labs/virtualizer/virtualize.js';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { VisibilityManager } from '../utilities/visibility-manager.js';\n\n\n// Define the custom element 'nile-auto-complete'\n@customElement('nile-auto-complete')\nexport class NileAutoComplete extends NileElement {\n\n static styles: CSSResultGroup = styles;\n private visibilityManager?: VisibilityManager;\n\n\n @query('nile-dropdown') dropdownElement: NileDropdown;\n\n @query('nile-input') inputElement: NileInput;\n\n // Define component properties\n\n @property({ type: Boolean }) disabled: boolean = false;\n\n @property({ type: Boolean }) isDropdownOpen: boolean = false;\n\n /** \n * When true, the dropdown menu will be appended to the document body instead of the parent container.\n * This is useful when the parent has overflow: hidden, clip-path, or transform applied.\n */\n @property({ type: Boolean, reflect: true }) portal = false;\n\n private readonly portalManager = new AutoCompletePortalManager(this);\n\n @property({ type: Boolean }) enableVirtualScroll: boolean = false;\n\n @property({ type: Boolean }) openOnFocus: boolean = false;\n\n @property({ type: String }) value: string = '';\n\n @property({ type: String }) placeholder: string = 'Type here ..';\n\n @property({ type: Boolean }) noBorder: boolean = false;\n \n @property({ type: Boolean }) noOutline: boolean = false;\n\n @property({ type: Boolean }) noPadding: boolean = false;\n\n @property({ type: Boolean }) loading: boolean = false;\n\n @property({ attribute:false}) filterFunction: (item:string,searchedValue:string)=>boolean=(item:string,searchedValue:string)=>item.toLowerCase().includes(searchedValue.toLowerCase());\n\n @property({ attribute:false}) renderItemFunction: (item:any)=>string = (item:any)=>item;\n\n @property({ type: Array }) allMenuItems: any = [];\n\n @property({ type: Boolean, reflect: true }) enableVisibilityEffect = false;\n\n @property({ type: Boolean, reflect: true }) enableTabClose = false;\n\n @property({ type: Boolean, reflect: true, attribute: true }) noDropdownClose = false;\n\n @state() menuItems: any = [];\n\n\n protected async firstUpdated(_changed: PropertyValues) {\n await this.updateComplete;\n\n this.visibilityManager = new VisibilityManager({\n host: this,\n target: this.inputElement.input, \n enableVisibilityEffect: this.enableVisibilityEffect,\nenableTabClose: this.enableTabClose,\n isOpen: () => this.isDropdownOpen,\n onAnchorOutOfView: () => {\n this.isDropdownOpen = false;\n this.dropdownElement?.hide();\n this.emit('nile-visibility-change', {\n visible: false,\n reason: 'anchor-out-of-view',\n });\n },\n onDocumentHidden: () => {\n this.isDropdownOpen = false;\n this.dropdownElement?.hide();\n this.emit('nile-visibility-change', {\n visible: false,\n reason: 'document-hidden',\n });\n },\n emit: (event, detail) => this.emit(`nile-${event}`, detail),\n });\n }\n connectedCallback() {\n super.connectedCallback();\n this.renderItemFunction=(item:any)=>item;\n this.handleDocumentFocusIn = this.handleDocumentFocusIn.bind(this);\n this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this);\n this.handleWindowResize = this.handleWindowResize.bind(this);\n this.handleWindowScroll = this.handleWindowScroll.bind(this);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeOpenListeners();\n this.visibilityManager?.cleanup();\n this.portalManager.cleanupPortalAppend();\n }\n\n protected updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties);\n if (changedProperties.has('allMenuItems')){\n this.menuItems = this.applyFilter(this.allMenuItems,this.filterFunction);\n this.setVirtualMenuWidth();\n if (this.portal && this.isDropdownOpen) {\n this.portalManager.updatePortalOptions();\n }\n }\n if (changedProperties.has('isDropdownOpen')) {\n this.menuItems = this.applyFilter(this.allMenuItems,this.filterFunction);\n this.handleDropdownOpenChange();\n }\n if (changedProperties.has('value')){\n this.menuItems = this.applyFilter(this.allMenuItems,this.filterFunction);\n if (this.portal && this.isDropdownOpen) {\n this.portalManager.updatePortalOptions();\n }\n }\n if (changedProperties.has('portal')) {\n this.handlePortalChange();\n }\n }\n\n @watch('portal', { waitUntilFirstUpdate: true })\n handlePortalChange(): void {\n if (this.isDropdownOpen) {\n if (this.portal) {\n this.portalManager.setupPortalAppend();\n } else {\n this.portalManager.cleanupPortalAppend();\n }\n }\n }\n\n private handleDropdownOpenChange(): void {\n if (this.isDropdownOpen) {\n this.addOpenListeners();\n this.visibilityManager?.setup();\n if (this.portal) {\n this.portalManager.setupPortalAppend();\n }\n } else {\n this.removeOpenListeners();\n this.visibilityManager?.cleanup();\n if (this.portal) {\n this.portalManager.cleanupPortalAppend();\n }\n }\n }\n\n private addOpenListeners(): void {\n document.addEventListener('focusin', this.handleDocumentFocusIn);\n document.addEventListener('mousedown', this.handleDocumentMouseDown);\n \n if (this.portal) {\n window.addEventListener('resize', this.handleWindowResize);\n window.addEventListener('scroll', this.handleWindowScroll, true);\n }\n }\n\n private removeOpenListeners(): void {\n document.removeEventListener('focusin', this.handleDocumentFocusIn);\n document.removeEventListener('mousedown', this.handleDocumentMouseDown);\n window.removeEventListener('resize', this.handleWindowResize);\n window.removeEventListener('scroll', this.handleWindowScroll, true);\n }\n\n private handleDocumentFocusIn(event: FocusEvent) {\n if (!this.isDropdownOpen) return;\n const path = event.composedPath();\n const hitSelf = path.includes(this);\n const hitDropdown = this.dropdownElement && path.includes(this.dropdownElement);\n const hitPortalAppend = this.portal && this.portalManager.portalContainerElement && path.includes(this.portalManager.portalContainerElement);\n\n if (!hitSelf && !hitDropdown && !hitPortalAppend) {\n this.isDropdownOpen = false;\n this.dropdownElement?.hide();\n }\n }\n\n private handleDocumentMouseDown(event: MouseEvent) {\n if (!this.isDropdownOpen) return;\n \n const path = event.composedPath();\n const hitSelf = path.includes(this);\n const hitDropdown = this.dropdownElement && path.includes(this.dropdownElement);\n const hitPortalAppend = this.portal && this.portalManager.portalContainerElement && path.includes(this.portalManager.portalContainerElement);\n \n if (!hitSelf && !hitDropdown && !hitPortalAppend) {\n this.isDropdownOpen = false;\n this.dropdownElement?.hide();\n }\n }\n\n private handleWindowResize = (): void => {\n this.portalManager.updatePortalAppendPosition();\n };\n\n private handleWindowScroll = (): void => {\n this.portalManager.updatePortalAppendPosition();\n };\n\n public render(): TemplateResult {\n const content=this.enableVirtualScroll?this.getVirtualizedContent():this.getContent();\n return html`\n <nile-dropdown class=\"nile-dropdown--input\" ?open=${this.isDropdownOpen} ?stay-open-on-select=${this.noDropdownClose} noOpenOnCLick exportparts=\"input, base\">\n <nile-input class=\"nile-auto-complete--input\"\n ?no-border=${this.noBorder}\n ?no-outline=${this.noOutline}\n ?no-padding=${this.noPadding}\n .disabled=${this.disabled}\n .value=${this.value}\n @nile-input=${this.handleSearch}\n @focus=${this.handleFocus}\n @click=${this.handleClick}\n slot=\"trigger\"\n placeholder=${this.placeholder}\n exportparts=\"input, base\"\n >\n ${this.loading?html`<nile-icon slot=\"suffix\" color=\"var(--nile-colors-primary-600)\" name=\"var(--nile-icon-button-loading-blue-animated, var(--ng-icon-button-loading-blue-animated))\" method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\" library=\"system\"></nile-icon>`:nothing}\n </nile-input>\n ${this.menuItems.length > 0 && !this.loading\n ? content\n : nothing}\n </nile-dropdown>\n `;\n } \n \n getVirtualizedContent():TemplateResult{\n return html`\n <nile-menu class=\"virtualized__menu\" @nile-select=${this.handleSelect} id=\"content-menu\" exportparts=\"menu__items-wrapper:options__wrapper\" style=${this.portal ? 'display: none;' : ''}>\n ${virtualize({\n items: this.menuItems,\n renderItem: (item:any):TemplateResult=>this.getItemRenderFunction(item),\n\t\t\t\t\tscroller:true\n })}\n </nile-menu>\n `\n }\n\n getContent():TemplateResult{\n return html`\n <nile-menu id=\"content-menu\" @nile-select=${this.handleSelect} exportparts=\"menu__items-wrapper:options__wrapper\" style=${this.portal ? 'display: none;' : ''}>\n ${this.menuItems.map((item: any) => this.getItemRenderFunction(item))}\n </nile-menu>`\n }\n\n getItemRenderFunction(item: any): TemplateResult {\n const value = this.renderItemFunction(item);\n let strValue = \"\";\n if(value || typeof value === \"number\") {\n strValue = value.toString();\n }\n const hasTooltip = !!item.tooltip;\n const shouldShowTooltip =\n hasTooltip && (!item.tooltip.for || item.tooltip.for === 'menu');\n \n if (!shouldShowTooltip) {\n return html`\n <nile-menu-item value=${value}>${unsafeHTML(strValue)}</nile-menu-item>\n `;\n }\n \n let tooltipContent: string | null = null;\n \n const content = item.tooltip.content;\n if (content instanceof Promise) {\n tooltipContent = 'Loading...'; \n content.then((resolved: string) => {\n item.tooltip.content = resolved;\n this.requestUpdate(); \n });\n } else {\n tooltipContent = content;\n }\n \n return html`\n <nile-menu-item value=${value}>\n <nile-lite-tooltip allowHTML .content=${tooltipContent ?? \"\"}>\n <span class=\"menu-item-text\">${unsafeHTML(strValue)}</span>\n </nile-lite-tooltip>\n </nile-menu-item>\n `;\n }\n\n handleSelect(event: CustomEvent) {\n this.value = event.detail.value;\n this.emit('nile-complete', { value: event.detail.value });\n if (this.noDropdownClose) {\n this.isDropdownOpen = true;\n this.dropdownElement?.show();\n } else {\n this.isDropdownOpen = false;\n this.dropdownElement?.hide();\n }\n }\n\n private setVirtualMenuWidth() {\n const maxLengthOption = this.menuItems\n .reduce((acc: number, curr: any) => {\n const currLength = this.renderItemFunction(curr).length\n return acc > currLength ? acc : currLength\n }, 0)\n const defaultWith = 110;\n const pixelMultiplier = 9.5;\n const menuWidth = maxLengthOption * pixelMultiplier < defaultWith ? defaultWith : maxLengthOption * pixelMultiplier;\n this.style.setProperty(\"--virtual-scroll-container-width\", menuWidth + \"px\");\n }\n\n private handleSearch(event: CustomEvent) {\n this.value = event.detail.value;\n\n // Filter menu items based on the search value\n this.menuItems = this.applyFilter(this.allMenuItems,this.filterFunction);\n\n this.isDropdownOpen = this.menuItems.length > 0;\n if (this.isDropdownOpen) {\n this.dropdownElement?.show();\n if (this.portal) {\n this.portalManager.updatePortalOptions();\n }\n }\n }\n\n public handleFocus() {\n if (!this.openOnFocus) {\n return;\n }\n\n if(this.portal) {\n this.inputElement?.focus();\n }\n\n // Delay opening the dropdown to allow focus to take effect\n setTimeout(() => {\n this.isDropdownOpen = true;\n this.dropdownElement?.show();\n }, 300);\n }\n\n private handleClick() {\n this.isDropdownOpen = true;\n this.dropdownElement?.show();\n }\n\n applyFilter<T>(list: T[], filterFn: (item: T,searchValue?:string) => boolean): T[] {\n if(typeof(list)!=='object') return []\n const res:T[]=[]\n list.forEach( el=> filterFn(el,this.value) && res.push(el) )\n return res\n }\n\n}\n\nexport default NileAutoComplete;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-auto-complete': NileAutoComplete;\n }\n}\n"],"names":["this","NileAutoComplete","m","constructor","disabled","isDropdownOpen","portal","portalManager","AutoCompletePortalManager","enableVirtualScroll","openOnFocus","value","placeholder","noBorder","noOutline","noPadding","loading","filterFunction","item","searchedValue","toLowerCase","includes","renderItemFunction","allMenuItems","enableVisibilityEffect","enableTabClose","noDropdownClose","menuItems","handleWindowResize","updatePortalAppendPosition","handleWindowScroll","_this","_inherits","_r","_createClass","key","_firstUpdated","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_changed","updateComplete","visibilityManager","VisibilityManager","host","target","inputElement","input","isOpen","onAnchorOutOfView","_this2$dropdownElemen","dropdownElement","hide","emit","visible","reason","onDocumentHidden","_this2$dropdownElemen2","event","detail","_context2","stop","firstUpdated","connectedCallback","super","handleDocumentFocusIn","bind","handleDocumentMouseDown","disconnectedCallback","removeOpenListeners","cleanup","cleanupPortalAppend","updated","changedProperties","has","applyFilter","setVirtualMenuWidth","updatePortalOptions","handleDropdownOpenChange","handlePortalChange","setupPortalAppend","addOpenListeners","setup","document","addEventListener","window","removeEventListener","path","composedPath","hitSelf","hitDropdown","hitPortalAppend","portalContainerElement","_this$dropdownElement2","render","content","getVirtualizedContent","getContent","html","_templateObject","_taggedTemplateLiteral","handleSearch","handleFocus","handleClick","_templateObject2","nothing","length","_this3","_templateObject3","handleSelect","virtualize","items","renderItem","getItemRenderFunction","scroller","_this4","_templateObject4","map","_this5","strValue","toString","tooltip","_templateObject5","unsafeHTML","tooltipContent","Promise","then","resolved","requestUpdate","_templateObject6","_this$dropdownElement3","show","_this$dropdownElement4","maxLengthOption","reduce","acc","curr","currLength","menuWidth","style","setProperty","focus","setTimeout","_this$dropdownElement6","list","filterFn","_this8","t","res","forEach","el","push","NileElement","styles","__decorate","query","prototype","property","type","Boolean","reflect","String","attribute","Array","state","watch","waitUntilFirstUpdate","customElement"],"mappings":"gjCAoO0DA,oJAAAA,mBAAAA,UAAAA,oBAAAA,SAAAA,CAAAA,OAAAA,CAAAA,CAAAA,CAAAA,IAAAA,CAAAA,CAAAA,MAAAA,CAAAA,SAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,cAAAA,CAAAA,CAAAA,CAAAA,MAAAA,CAAAA,cAAAA,WAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,KAAAA,GAAAA,CAAAA,oBAAAA,MAAAA,CAAAA,MAAAA,IAAAA,CAAAA,CAAAA,CAAAA,CAAAA,QAAAA,eAAAA,CAAAA,CAAAA,CAAAA,CAAAA,aAAAA,oBAAAA,CAAAA,CAAAA,CAAAA,CAAAA,WAAAA,2BAAAA,OAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,SAAAA,MAAAA,CAAAA,cAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,KAAAA,CAAAA,CAAAA,CAAAA,UAAAA,IAAAA,YAAAA,IAAAA,QAAAA,MAAAA,CAAAA,CAAAA,CAAAA,OAAAA,MAAAA,eAAAA,CAAA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AAAA,CAAAA,CAAAA,CAAAA,CAAA4J,UAAA,gBAAA,CAAA,IAAA,EAAA,CAAA,CAENF,EAAA,CAA5DG,CAAAA,CAAS,CAAEC,IAAMC,CAAAA,OAAAA,CAASC,SAAS,CAAME,CAAAA,SAAAA,CAAAA,CAAW,KAAgClK,CAAA4J,CAAAA,SAAAA,CAAA,sBAAA,EAE5EF,CAAAA,CAAAA,CAAAA,CAAA,CAARU,CAA4BpK,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA4J,UAAA,WAAA,CAAA,IAAA,EAAA,CAAA,CAwE7BF,EAAA,CADCW,CAAAA,CAAM,SAAU,CAAEC,oBAAAA,CAAAA,CAAsB,KASxCtK,CAAA4J,CAAAA,SAAAA,CAAA,qBAAA,IApIU5J,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAgB0J,EAAA,CAD5Ba,CAAAA,CAAc,uBACFvK"}
@@ -1,5 +1,5 @@
1
- import{__decorate as t}from"tslib";import{html as i,nothing as e}from"lit";import{query as s,property as n,state as o,customElement as h}from"lit/decorators.js";import{s as l}from"./nile-auto-complete.css.esm.js";import{N as r}from"../internal/nile-element.esm.js";import{w as a}from"../internal/watch.esm.js";import{A as p}from"./portal-manager.esm.js";import{v as d}from"../virtualize-a4a40d96.esm.js";import{unsafeHTML as m}from"lit/directives/unsafe-html.js";import{V as u}from"../utilities/visibility-manager.esm.js";import"../floating-ui.dom-cc9126da.esm.js";import"./portal-utils.esm.js";import"../lit-html-39a6718c.esm.js";import"lit/directive.js";import"lit/async-directive.js";import"lit/directives/repeat.js";let c=class extends r{constructor(){super(...arguments),this.disabled=!1,this.isDropdownOpen=!1,this.portal=!1,this.portalManager=new p(this),this.enableVirtualScroll=!1,this.openOnFocus=!1,this.value="",this.placeholder="Type here ..",this.noBorder=!1,this.noOutline=!1,this.noPadding=!1,this.loading=!1,this.filterFunction=(t,i)=>t.toLowerCase().includes(i.toLowerCase()),this.renderItemFunction=t=>t,this.allMenuItems=[],this.enableVisibilityEffect=!1,this.enableTabClose=!1,this.menuItems=[],this.handleWindowResize=()=>{this.portalManager.updatePortalAppendPosition()},this.handleWindowScroll=()=>{this.portalManager.updatePortalAppendPosition()}}async firstUpdated(t){await this.updateComplete,this.visibilityManager=new u({host:this,target:this.inputElement.input,enableVisibilityEffect:this.enableVisibilityEffect,enableTabClose:this.enableTabClose,isOpen:()=>this.isDropdownOpen,onAnchorOutOfView:()=>{this.isDropdownOpen=!1,this.dropdownElement?.hide(),this.emit("nile-visibility-change",{visible:!1,reason:"anchor-out-of-view"})},onDocumentHidden:()=>{this.isDropdownOpen=!1,this.dropdownElement?.hide(),this.emit("nile-visibility-change",{visible:!1,reason:"document-hidden"})},emit:(t,i)=>this.emit(`nile-${t}`,i)})}connectedCallback(){super.connectedCallback(),this.renderItemFunction=t=>t,this.handleDocumentFocusIn=this.handleDocumentFocusIn.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.handleWindowResize=this.handleWindowResize.bind(this),this.handleWindowScroll=this.handleWindowScroll.bind(this)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.visibilityManager?.cleanup(),this.portalManager.cleanupPortalAppend()}updated(t){super.updated(t),t.has("allMenuItems")&&(this.menuItems=this.applyFilter(this.allMenuItems,this.filterFunction),this.setVirtualMenuWidth(),this.portal&&this.isDropdownOpen&&this.portalManager.updatePortalOptions()),t.has("isDropdownOpen")&&(this.menuItems=this.applyFilter(this.allMenuItems,this.filterFunction),this.handleDropdownOpenChange()),t.has("value")&&(this.menuItems=this.applyFilter(this.allMenuItems,this.filterFunction),this.portal&&this.isDropdownOpen&&this.portalManager.updatePortalOptions()),t.has("portal")&&this.handlePortalChange()}handlePortalChange(){this.isDropdownOpen&&(this.portal?this.portalManager.setupPortalAppend():this.portalManager.cleanupPortalAppend())}handleDropdownOpenChange(){this.isDropdownOpen?(this.addOpenListeners(),this.visibilityManager?.setup(),this.portal&&this.portalManager.setupPortalAppend()):(this.removeOpenListeners(),this.visibilityManager?.cleanup(),this.portal&&this.portalManager.cleanupPortalAppend())}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.portal&&(window.addEventListener("resize",this.handleWindowResize),window.addEventListener("scroll",this.handleWindowScroll,!0))}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("scroll",this.handleWindowScroll,!0)}handleDocumentFocusIn(t){if(!this.isDropdownOpen)return;const i=t.composedPath(),e=i.includes(this),s=this.dropdownElement&&i.includes(this.dropdownElement),n=this.portal&&this.portalManager.portalContainerElement&&i.includes(this.portalManager.portalContainerElement);e||s||n||(this.isDropdownOpen=!1,this.dropdownElement?.hide())}handleDocumentMouseDown(t){if(!this.isDropdownOpen)return;const i=t.composedPath(),e=i.includes(this),s=this.dropdownElement&&i.includes(this.dropdownElement),n=this.portal&&this.portalManager.portalContainerElement&&i.includes(this.portalManager.portalContainerElement);e||s||n||(this.isDropdownOpen=!1,this.dropdownElement?.hide())}render(){const t=this.enableVirtualScroll?this.getVirtualizedContent():this.getContent();return i`
2
- <nile-dropdown class="nile-dropdown--input" ?open=${this.isDropdownOpen} noOpenOnCLick exportparts="input, base">
1
+ import{__decorate as t}from"tslib";import{html as i,nothing as e}from"lit";import{query as s,property as n,state as o,customElement as h}from"lit/decorators.js";import{s as l}from"./nile-auto-complete.css.esm.js";import{N as r}from"../internal/nile-element.esm.js";import{w as a}from"../internal/watch.esm.js";import{A as p}from"./portal-manager.esm.js";import{v as d}from"../virtualize-a4a40d96.esm.js";import{unsafeHTML as m}from"lit/directives/unsafe-html.js";import{V as u}from"../utilities/visibility-manager.esm.js";import"../floating-ui.dom-cc9126da.esm.js";import"./portal-utils.esm.js";import"../lit-html-39a6718c.esm.js";import"lit/directive.js";import"lit/async-directive.js";import"lit/directives/repeat.js";let c=class extends r{constructor(){super(...arguments),this.disabled=!1,this.isDropdownOpen=!1,this.portal=!1,this.portalManager=new p(this),this.enableVirtualScroll=!1,this.openOnFocus=!1,this.value="",this.placeholder="Type here ..",this.noBorder=!1,this.noOutline=!1,this.noPadding=!1,this.loading=!1,this.filterFunction=(t,i)=>t.toLowerCase().includes(i.toLowerCase()),this.renderItemFunction=t=>t,this.allMenuItems=[],this.enableVisibilityEffect=!1,this.enableTabClose=!1,this.noDropdownClose=!1,this.menuItems=[],this.handleWindowResize=()=>{this.portalManager.updatePortalAppendPosition()},this.handleWindowScroll=()=>{this.portalManager.updatePortalAppendPosition()}}async firstUpdated(t){await this.updateComplete,this.visibilityManager=new u({host:this,target:this.inputElement.input,enableVisibilityEffect:this.enableVisibilityEffect,enableTabClose:this.enableTabClose,isOpen:()=>this.isDropdownOpen,onAnchorOutOfView:()=>{this.isDropdownOpen=!1,this.dropdownElement?.hide(),this.emit("nile-visibility-change",{visible:!1,reason:"anchor-out-of-view"})},onDocumentHidden:()=>{this.isDropdownOpen=!1,this.dropdownElement?.hide(),this.emit("nile-visibility-change",{visible:!1,reason:"document-hidden"})},emit:(t,i)=>this.emit(`nile-${t}`,i)})}connectedCallback(){super.connectedCallback(),this.renderItemFunction=t=>t,this.handleDocumentFocusIn=this.handleDocumentFocusIn.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.handleWindowResize=this.handleWindowResize.bind(this),this.handleWindowScroll=this.handleWindowScroll.bind(this)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.visibilityManager?.cleanup(),this.portalManager.cleanupPortalAppend()}updated(t){super.updated(t),t.has("allMenuItems")&&(this.menuItems=this.applyFilter(this.allMenuItems,this.filterFunction),this.setVirtualMenuWidth(),this.portal&&this.isDropdownOpen&&this.portalManager.updatePortalOptions()),t.has("isDropdownOpen")&&(this.menuItems=this.applyFilter(this.allMenuItems,this.filterFunction),this.handleDropdownOpenChange()),t.has("value")&&(this.menuItems=this.applyFilter(this.allMenuItems,this.filterFunction),this.portal&&this.isDropdownOpen&&this.portalManager.updatePortalOptions()),t.has("portal")&&this.handlePortalChange()}handlePortalChange(){this.isDropdownOpen&&(this.portal?this.portalManager.setupPortalAppend():this.portalManager.cleanupPortalAppend())}handleDropdownOpenChange(){this.isDropdownOpen?(this.addOpenListeners(),this.visibilityManager?.setup(),this.portal&&this.portalManager.setupPortalAppend()):(this.removeOpenListeners(),this.visibilityManager?.cleanup(),this.portal&&this.portalManager.cleanupPortalAppend())}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.portal&&(window.addEventListener("resize",this.handleWindowResize),window.addEventListener("scroll",this.handleWindowScroll,!0))}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("scroll",this.handleWindowScroll,!0)}handleDocumentFocusIn(t){if(!this.isDropdownOpen)return;const i=t.composedPath(),e=i.includes(this),s=this.dropdownElement&&i.includes(this.dropdownElement),n=this.portal&&this.portalManager.portalContainerElement&&i.includes(this.portalManager.portalContainerElement);e||s||n||(this.isDropdownOpen=!1,this.dropdownElement?.hide())}handleDocumentMouseDown(t){if(!this.isDropdownOpen)return;const i=t.composedPath(),e=i.includes(this),s=this.dropdownElement&&i.includes(this.dropdownElement),n=this.portal&&this.portalManager.portalContainerElement&&i.includes(this.portalManager.portalContainerElement);e||s||n||(this.isDropdownOpen=!1,this.dropdownElement?.hide())}render(){const t=this.enableVirtualScroll?this.getVirtualizedContent():this.getContent();return i`
2
+ <nile-dropdown class="nile-dropdown--input" ?open=${this.isDropdownOpen} ?stay-open-on-select=${this.noDropdownClose} noOpenOnCLick exportparts="input, base">
3
3
  <nile-input class="nile-auto-complete--input"
4
4
  ?no-border=${this.noBorder}
5
5
  ?no-outline=${this.noOutline}
@@ -32,4 +32,4 @@ import{__decorate as t}from"tslib";import{html as i,nothing as e}from"lit";impor
32
32
  <span class="menu-item-text">${m(s)}</span>
33
33
  </nile-lite-tooltip>
34
34
  </nile-menu-item>
35
- `}handleSelect(t){this.value=t.detail.value,this.emit("nile-complete",{value:t.detail.value}),this.isDropdownOpen=!1,this.dropdownElement?.hide()}setVirtualMenuWidth(){const t=this.menuItems.reduce(((t,i)=>{const e=this.renderItemFunction(i).length;return t>e?t:e}),0),i=9.5*t<110?110:9.5*t;this.style.setProperty("--virtual-scroll-container-width",i+"px")}handleSearch(t){this.value=t.detail.value,this.menuItems=this.applyFilter(this.allMenuItems,this.filterFunction),this.isDropdownOpen=this.menuItems.length>0,this.isDropdownOpen&&(this.dropdownElement?.show(),this.portal&&this.portalManager.updatePortalOptions())}handleFocus(){this.openOnFocus&&(this.portal&&this.inputElement?.focus(),setTimeout((()=>{this.isDropdownOpen=!0,this.dropdownElement?.show()}),300))}handleClick(){this.isDropdownOpen=!0,this.dropdownElement?.show()}applyFilter(t,i){if("object"!=typeof t)return[];const e=[];return t.forEach((t=>i(t,this.value)&&e.push(t))),e}};c.styles=l,t([s("nile-dropdown")],c.prototype,"dropdownElement",void 0),t([s("nile-input")],c.prototype,"inputElement",void 0),t([n({type:Boolean})],c.prototype,"disabled",void 0),t([n({type:Boolean})],c.prototype,"isDropdownOpen",void 0),t([n({type:Boolean,reflect:!0})],c.prototype,"portal",void 0),t([n({type:Boolean})],c.prototype,"enableVirtualScroll",void 0),t([n({type:Boolean})],c.prototype,"openOnFocus",void 0),t([n({type:String})],c.prototype,"value",void 0),t([n({type:String})],c.prototype,"placeholder",void 0),t([n({type:Boolean})],c.prototype,"noBorder",void 0),t([n({type:Boolean})],c.prototype,"noOutline",void 0),t([n({type:Boolean})],c.prototype,"noPadding",void 0),t([n({type:Boolean})],c.prototype,"loading",void 0),t([n({attribute:!1})],c.prototype,"filterFunction",void 0),t([n({attribute:!1})],c.prototype,"renderItemFunction",void 0),t([n({type:Array})],c.prototype,"allMenuItems",void 0),t([n({type:Boolean,reflect:!0})],c.prototype,"enableVisibilityEffect",void 0),t([n({type:Boolean,reflect:!0})],c.prototype,"enableTabClose",void 0),t([o()],c.prototype,"menuItems",void 0),t([a("portal",{waitUntilFirstUpdate:!0})],c.prototype,"handlePortalChange",null),c=t([h("nile-auto-complete")],c);export{c as N};
35
+ `}handleSelect(t){this.value=t.detail.value,this.emit("nile-complete",{value:t.detail.value}),this.noDropdownClose?(this.isDropdownOpen=!0,this.dropdownElement?.show()):(this.isDropdownOpen=!1,this.dropdownElement?.hide())}setVirtualMenuWidth(){const t=this.menuItems.reduce(((t,i)=>{const e=this.renderItemFunction(i).length;return t>e?t:e}),0),i=9.5*t<110?110:9.5*t;this.style.setProperty("--virtual-scroll-container-width",i+"px")}handleSearch(t){this.value=t.detail.value,this.menuItems=this.applyFilter(this.allMenuItems,this.filterFunction),this.isDropdownOpen=this.menuItems.length>0,this.isDropdownOpen&&(this.dropdownElement?.show(),this.portal&&this.portalManager.updatePortalOptions())}handleFocus(){this.openOnFocus&&(this.portal&&this.inputElement?.focus(),setTimeout((()=>{this.isDropdownOpen=!0,this.dropdownElement?.show()}),300))}handleClick(){this.isDropdownOpen=!0,this.dropdownElement?.show()}applyFilter(t,i){if("object"!=typeof t)return[];const e=[];return t.forEach((t=>i(t,this.value)&&e.push(t))),e}};c.styles=l,t([s("nile-dropdown")],c.prototype,"dropdownElement",void 0),t([s("nile-input")],c.prototype,"inputElement",void 0),t([n({type:Boolean})],c.prototype,"disabled",void 0),t([n({type:Boolean})],c.prototype,"isDropdownOpen",void 0),t([n({type:Boolean,reflect:!0})],c.prototype,"portal",void 0),t([n({type:Boolean})],c.prototype,"enableVirtualScroll",void 0),t([n({type:Boolean})],c.prototype,"openOnFocus",void 0),t([n({type:String})],c.prototype,"value",void 0),t([n({type:String})],c.prototype,"placeholder",void 0),t([n({type:Boolean})],c.prototype,"noBorder",void 0),t([n({type:Boolean})],c.prototype,"noOutline",void 0),t([n({type:Boolean})],c.prototype,"noPadding",void 0),t([n({type:Boolean})],c.prototype,"loading",void 0),t([n({attribute:!1})],c.prototype,"filterFunction",void 0),t([n({attribute:!1})],c.prototype,"renderItemFunction",void 0),t([n({type:Array})],c.prototype,"allMenuItems",void 0),t([n({type:Boolean,reflect:!0})],c.prototype,"enableVisibilityEffect",void 0),t([n({type:Boolean,reflect:!0})],c.prototype,"enableTabClose",void 0),t([n({type:Boolean,reflect:!0,attribute:!0})],c.prototype,"noDropdownClose",void 0),t([o()],c.prototype,"menuItems",void 0),t([a("portal",{waitUntilFirstUpdate:!0})],c.prototype,"handlePortalChange",null),c=t([h("nile-auto-complete")],c);export{c as N};
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-chip.css.cjs.js","lit/directives/class-map.js","../internal/slot.cjs.js","../internal/nile-element.cjs.js","lit/directives/unsafe-html.js","../utilities/visibility-manager.cjs.js"],function(_export,_context){"use strict";var t,i,s,e,h,o,l,n,r,a,p,c,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,d;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){i=_lit.html;},function(_litDecoratorsJs){s=_litDecoratorsJs.state;e=_litDecoratorsJs.query;h=_litDecoratorsJs.property;o=_litDecoratorsJs.customElement;},function(_nileChipCssCjsJs){l=_nileChipCssCjsJs.s;},function(_litDirectivesClassMapJs){n=_litDirectivesClassMapJs.classMap;},function(_internalSlotCjsJs){r=_internalSlotCjsJs.H;},function(_internalNileElementCjsJs){a=_internalNileElementCjsJs.N;},function(_litDirectivesUnsafeHtmlJs){p=_litDirectivesUnsafeHtmlJs.unsafeHTML;},function(_utilitiesVisibilityManagerCjsJs){c=_utilitiesVisibilityManagerCjsJs.V;}],execute:function execute(){_export("N",d=/*#__PURE__*/function(_a){function d(){var _this;_classCallCheck(this,d);_this=_callSuper(this,d,arguments),_this.hasSlotController=new r(_assertThisInitialized(_this),"help-text","label"),_this.tags=[],_this.inputValue="",_this.isDropdownOpen=!1,_this.tooltips=[],_this.chipFocusIndex=null,_this.warning=!1,_this.noAutoComplete=!1,_this.error=!1,_this.success=!1,_this.noDuplicates=!1,_this.label="",_this.tagVariant="",_this.acceptUserInput=!1,_this.addOnBlur=!1,_this.clearable=!1,_this.placeholder="type here...",_this.readonly=!1,_this.disabled=!1,_this.portal=!1,_this.enableVirtualScroll=!1,_this.autoCompleteOptions=[],_this.filteredAutoCompleteOptions=[],_this.value=[],_this.noWrap=!1,_this.loading=!1,_this.errorIndexes=[],_this.helpText="",_this.errorMessage="",_this.filterFunction=function(t,i){return t.toLowerCase().includes(i.toLowerCase());},_this.renderItemFunction=function(t){return t;},_this.enableVisibilityEffect=!1,_this.enableTabClose=!1,_this.showTooltip=!1,_this.enableTagDelete=!1,_this.isSelectingFromDropdown=!1,_this.handleDocumentClick=function(t){var i=t.composedPath();_this.isSelectingFromDropdown?_this.resetDropdownState():i.includes(_assertThisInitialized(_this))||(_this.addOnBlur&&_this.acceptUserInput&&_this.inputValue&&_this.addChipFromInputValue(),_this.isDropdownOpen=!1);};return _this;}_inherits(d,_a);return _createClass(d,[{key:"resetDropdownState",value:function resetDropdownState(){this.isSelectingFromDropdown=!1;}},{key:"updated",value:function updated(t){var _this2=this;if(_superPropGet(d,"updated",this,3)([t]),t.has("autoCompleteOptions")){var _t=this.autoCompleteOptions;if("string"==typeof _t)try{_t=JSON.parse(_t);}catch(i){_t=[];}this.filteredAutoCompleteOptions=Array.isArray(_t)?_toConsumableArray(_t):[],this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter(function(t){return!_this2.value.includes(t);}));}t.has("value")&&(this.tags=_toConsumableArray(this.value),this.onTagsChanged()),t.has("tags")&&this.onTagsChanged();}},{key:"firstUpdated",value:function(){var _firstUpdated=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(t){var _this$renderRoot$quer,_this$autoComplete,_this$autoComplete2,_this3=this;var i;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return this.updateComplete;case 2:i=this.noAutoComplete?(_this$renderRoot$quer=this.renderRoot.querySelector("nile-input"))===null||_this$renderRoot$quer===void 0?void 0:_this$renderRoot$quer.input:((_this$autoComplete=this.autoComplete)===null||_this$autoComplete===void 0||(_this$autoComplete=_this$autoComplete.inputElement)===null||_this$autoComplete===void 0?void 0:_this$autoComplete.input)||((_this$autoComplete2=this.autoComplete)===null||_this$autoComplete2===void 0?void 0:_this$autoComplete2.inputElement);this.visibilityManager=new c({host:this,target:i,enableVisibilityEffect:this.enableVisibilityEffect,enableTabClose:this.enableTabClose,isOpen:function isOpen(){return _this3.isDropdownOpen;},onAnchorOutOfView:function onAnchorOutOfView(){_this3.isDropdownOpen=!1,_this3.autoComplete&&(_this3.autoComplete.isDropdownOpen=!1),_this3.emit("nile-visibility-change",{visible:!1,reason:"anchor-out-of-view"});},onDocumentHidden:function onDocumentHidden(){_this3.isDropdownOpen=!1,_this3.autoComplete&&(_this3.autoComplete.isDropdownOpen=!1),_this3.emit("nile-visibility-change",{visible:!1,reason:"document-hidden"});},emit:function emit(t,i){return _this3.emit("nile-".concat(t),i);}});case 4:case"end":return _context2.stop();}},_callee,this);}));function firstUpdated(_x){return _firstUpdated.apply(this,arguments);}return firstUpdated;}()},{key:"connectedCallback",value:function connectedCallback(){var _this4=this;_superPropGet(d,"connectedCallback",this,3)([]),document.addEventListener("click",this.handleDocumentClick),this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter(function(t){return!_this4.value.includes(t);})),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){var _this$visibilityManag;_superPropGet(d,"disconnectedCallback",this,3)([]),(_this$visibilityManag=this.visibilityManager)!==null&&_this$visibilityManag!==void 0&&_this$visibilityManag.cleanup(),document.removeEventListener("click",this.handleDocumentClick),this.emit("nile-destroy");}},{key:"markDropdownSelectStart",value:function markDropdownSelectStart(t){this.isSelectingFromDropdown=!0;}},{key:"render",value:function render(){var _this5=this;var t=this.hasSlotController.test("label");this.hasSlotController.test("help-text");var s=!!this.label||!!t,e=!!this.helpText,h=!!this.errorMessage;return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"form-control\"\n class=","\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=","\n >\n <slot name=\"label\">","</slot>\n </label>\n\n <div\n part='base' \n class=","\n >\n ","\n\n <div class=\"nile-chip__auto-complete\">\n ","\n </div>\n </div>\n ","\n ","\n </div>\n "])),n({"form-control":!0,"form-control--medium":!0,"form-control--has-label":s,"form-control--has-help-text":e,"nile-chip--disabled":this.disabled}),s?"false":"true",this.label,n({"nile-chip":!0,"nile-chip--warning":this.warning,"nile-chip--error":this.error,"nile-chip--success":this.success,"nile-chip--no-wrap":this.noWrap,"nile-chip--open":this.isDropdownOpen}),this.tags.map(function(t,s){var e=_this5.tooltips[s],h=_this5.enableTagDelete&&_this5.chipFocusIndex===s;var o="";(t||"number"==typeof t)&&(o=t.toString());var l=i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-tag\n class=","\n aria-selected=","\n .variant=","\n @nile-remove=","\n removable\n ?pill=","\n ?disabled=","\n >\n ","\n </nile-tag>\n "])),n({"nile-chip__tags":!0,"nile-chip__tags--focused":h}),h?"true":"false",_this5.errorIndexes.includes(s)?"error":"normal",function(){return _this5.handleRemove(t);},"normal"!==_this5.tagVariant,_this5.disabled,p(o));return _this5.showTooltip&&e?i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-lite-tooltip allowHTML .content=",">\n ","\n </nile-lite-tooltip>\n "])),e,l):l;}),this.noAutoComplete?i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-input\n .value=","\n .placeholder=","\n .disabled=","\n ?no-border=","\n ?no-outline=","\n ?no-padding=","\n @nile-input=","\n @keydown=","\n @focus=","\n @blur=","\n exportparts=\"input\"\n ></nile-input>\n "])),this.inputValue,this.placeholder,this.disabled,!0,!0,!0,this.handleInputChange,this.handleInputKeydown,this.handleFocus,this.handleBlur):i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-auto-complete\n .enableVirtualScroll=","\n .allMenuItems=","\n .filterFunction=","\n .renderItemFunction=","\n .showTooltips=","\n .loading=\"","\"\n .value=","\n ?isDropdownOpen=","\n .noBorder=","\n .noOutline=","\n .noPadding=","\n .disabled=","\n .readonly=","\n .portal=","\n openOnFocus\n exportparts=\"options__wrapper, input, base\"\n .placeholder=","\n @nile-input=","\n @keydown=","\n @nile-focus=","\n @nile-blur=","\n @nile-complete=","\n @mousedown=","\n\n ></nile-auto-complete>\n "])),this.enableVirtualScroll,this.filteredAutoCompleteOptions,this.filterFunction,this.renderItemFunction,this.showTooltip,this.loading,this.inputValue,this.isDropdownOpen,!0,!0,!0,this.disabled,this.readonly,this.portal,this.placeholder,this.handleInputChange,this.handleInputKeydown,this.handleFocus,this.handleBlur,this.handleSelect,this.markDropdownSelectStart),e?i(_templateObject6||(_templateObject6=_taggedTemplateLiteral([" <nile-form-help-text>","</nile-form-help-text> "])),this.helpText):"",h?i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <nile-form-error-message\n >","</nile-form-error-message\n >\n "])),this.errorMessage):"");}},{key:"handleSelect",value:function handleSelect(t){var _s$tooltip,_this6=this,_s$tooltip3;this.isSelectingFromDropdown=!1,this.resetDropdownState();var i=t.detail.value,s=this.autoCompleteOptions.find(function(t){return t.name===i||t.id===i;});var e=null;if(this.showTooltip)if(s!==null&&s!==void 0&&(_s$tooltip=s.tooltip)!==null&&_s$tooltip!==void 0&&_s$tooltip.content){var _s$tooltip2=s.tooltip,_t2=_s$tooltip2.content,_i=_s$tooltip2["for"];if(!_i||"tag"===_i)if(_t2 instanceof Promise){this.tooltips=[].concat(_toConsumableArray(this.tooltips),["Loading..."]);var _i2=this.tooltips.length-1;_t2.then(function(t){_this6.tooltips[_i2]=t,_this6.requestUpdate();});}else e=_t2;}else e=(s===null||s===void 0?void 0:s.name)||i;this.noDuplicates&&this.tags.includes(i)||(this.tags=[].concat(_toConsumableArray(this.tags),[i]),(s===null||s===void 0||(_s$tooltip3=s.tooltip)===null||_s$tooltip3===void 0?void 0:_s$tooltip3.content)instanceof Promise||(this.tooltips=[].concat(_toConsumableArray(this.tooltips),[e])),this.emit("nile-chip-change",{value:this.tags}),this.resetInput());}},{key:"handleRemove",value:function handleRemove(t){this.tags=this.tags.filter(function(i){return i!==t;}),this.noDuplicates&&this.autoCompleteOptions.includes(t)&&(this.filteredAutoCompleteOptions=[].concat(_toConsumableArray(this.filteredAutoCompleteOptions),[t])),this.emit("nile-chip-change",{value:this.tags});}},{key:"handleInputChange",value:function handleInputChange(t){this.inputValue=t.detail.value;}},{key:"addChipFromInputValue",value:function addChipFromInputValue(){var _this$visibilityManag2;return this.noDuplicates&&this.tags.includes(this.inputValue)?(this.emit("nile-duplicates-blocked"),!1):(this.tags=[].concat(_toConsumableArray(this.tags),[this.inputValue]),this.showTooltip?this.tooltips=[].concat(_toConsumableArray(this.tooltips),[this.inputValue]):this.tooltips=[].concat(_toConsumableArray(this.tooltips),[null]),this.inputValue="",(_this$visibilityManag2=this.visibilityManager)!==null&&_this$visibilityManag2!==void 0&&_this$visibilityManag2.cleanup(),this.emit("nile-chip-change",{value:this.tags}),!0);}},{key:"handleInputKeydown",value:function handleInputKeydown(t){if(this.enableTagDelete&&("Backspace"===t.key||"Delete"===t.key)&&!this.inputValue&&!this.readonly&&!this.disabled){if(0===this.tags.length)return void(this.chipFocusIndex=null);if(t.preventDefault(),null===this.chipFocusIndex)return this.chipFocusIndex=this.tags.length-1,void this.requestUpdate();var _i3=this.chipFocusIndex;return this.tags[_i3],this.tags=this.tags.filter(function(t,s){return s!==_i3;}),this.tooltips=this.tooltips.filter(function(t,s){return s!==_i3;}),this.emit("nile-chip-change",{value:this.tags}),void(this.tags.length>0?this.chipFocusIndex=Math.max(0,_i3-1):this.chipFocusIndex=null);}if(this.readonly){if(!["ArrowUp","ArrowDown","Enter","Tab"].includes(t.key))return void t.preventDefault();}this.acceptUserInput&&("Tab"===t.key&&t.preventDefault(),"Enter"!==t.key&&"Tab"!==t.key||!this.inputValue||this.noDuplicates&&this.tags.includes(this.inputValue)||(t.preventDefault(),this.tags=[].concat(_toConsumableArray(this.tags),[this.inputValue]),this.showTooltip?this.tooltips=[].concat(_toConsumableArray(this.tooltips),[this.inputValue]):this.tooltips=[].concat(_toConsumableArray(this.tooltips),[null]),this.resetInput(),this.emit("nile-chip-change",{value:this.tags})),"Enter"!==t.key&&"Tab"!==t.key||!this.inputValue||!this.noDuplicates&&!this.tags.includes(this.inputValue)||this.emit("nile-duplicates-blocked"));}},{key:"handleFocus",value:function handleFocus(){var _this$visibilityManag3;this.noAutoComplete||((_this$visibilityManag3=this.visibilityManager)!==null&&_this$visibilityManag3!==void 0&&_this$visibilityManag3.setup(),this.isDropdownOpen=!0);}},{key:"handleBlur",value:function handleBlur(){this.isSelectingFromDropdown||this.addOnBlur&&this.acceptUserInput&&this.inputValue&&this.addChipFromInputValue();}},{key:"onTagsChanged",value:function onTagsChanged(){var _this7=this;this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter(function(t){return!_this7.tags.includes(t);}));}},{key:"resetInput",value:function resetInput(){var _this$visibilityManag4;this.inputValue="",this.isDropdownOpen=!1,(_this$visibilityManag4=this.visibilityManager)!==null&&_this$visibilityManag4!==void 0&&_this$visibilityManag4.cleanup(),!this.noAutoComplete&&this.autoComplete&&(this.autoComplete.value="",this.autoComplete.handleFocus());}}],[{key:"styles",get:function get(){return[l];}}]);}(a));t([s()],d.prototype,"tags",void 0),t([s()],d.prototype,"inputValue",void 0),t([s()],d.prototype,"isDropdownOpen",void 0),t([s()],d.prototype,"tooltips",void 0),t([s()],d.prototype,"chipFocusIndex",void 0),t([e("nile-auto-complete")],d.prototype,"autoComplete",void 0),t([h({type:Boolean})],d.prototype,"warning",void 0),t([h({type:Boolean})],d.prototype,"noAutoComplete",void 0),t([h({type:Boolean})],d.prototype,"error",void 0),t([h({type:Boolean})],d.prototype,"success",void 0),t([h({type:Boolean})],d.prototype,"noDuplicates",void 0),t([h()],d.prototype,"label",void 0),t([h({type:String})],d.prototype,"tagVariant",void 0),t([h({type:Boolean})],d.prototype,"acceptUserInput",void 0),t([h({type:Boolean})],d.prototype,"addOnBlur",void 0),t([h({type:Boolean})],d.prototype,"clearable",void 0),t([h()],d.prototype,"placeholder",void 0),t([h({type:Boolean,reflect:!0})],d.prototype,"readonly",void 0),t([h({type:Boolean,reflect:!0})],d.prototype,"disabled",void 0),t([h({type:Boolean,reflect:!0})],d.prototype,"portal",void 0),t([h({type:Boolean})],d.prototype,"enableVirtualScroll",void 0),t([h({type:Array})],d.prototype,"autoCompleteOptions",void 0),t([h({type:Array})],d.prototype,"filteredAutoCompleteOptions",void 0),t([h({type:Array})],d.prototype,"value",void 0),t([h({type:Boolean})],d.prototype,"noWrap",void 0),t([h({type:Boolean})],d.prototype,"loading",void 0),t([h({type:Array})],d.prototype,"errorIndexes",void 0),t([h({attribute:"help-text",reflect:!0})],d.prototype,"helpText",void 0),t([h({attribute:"error-message",reflect:!0})],d.prototype,"errorMessage",void 0),t([h({attribute:!1})],d.prototype,"filterFunction",void 0),t([h({attribute:!1})],d.prototype,"renderItemFunction",void 0),t([h({type:Boolean,reflect:!0})],d.prototype,"enableVisibilityEffect",void 0),t([h({type:Boolean,reflect:!0})],d.prototype,"enableTabClose",void 0),t([h({type:Boolean})],d.prototype,"showTooltip",void 0),t([h({type:Boolean})],d.prototype,"enableTagDelete",void 0),_export("N",d=t([o("nile-chip")],d));}};});
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-chip.css.cjs.js","lit/directives/class-map.js","../internal/slot.cjs.js","../internal/nile-element.cjs.js","lit/directives/unsafe-html.js","../utilities/visibility-manager.cjs.js"],function(_export,_context){"use strict";var t,i,s,e,h,o,l,n,r,a,p,c,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,d;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){i=_lit.html;},function(_litDecoratorsJs){s=_litDecoratorsJs.state;e=_litDecoratorsJs.query;h=_litDecoratorsJs.property;o=_litDecoratorsJs.customElement;},function(_nileChipCssCjsJs){l=_nileChipCssCjsJs.s;},function(_litDirectivesClassMapJs){n=_litDirectivesClassMapJs.classMap;},function(_internalSlotCjsJs){r=_internalSlotCjsJs.H;},function(_internalNileElementCjsJs){a=_internalNileElementCjsJs.N;},function(_litDirectivesUnsafeHtmlJs){p=_litDirectivesUnsafeHtmlJs.unsafeHTML;},function(_utilitiesVisibilityManagerCjsJs){c=_utilitiesVisibilityManagerCjsJs.V;}],execute:function execute(){_export("N",d=/*#__PURE__*/function(_a){function d(){var _this;_classCallCheck(this,d);_this=_callSuper(this,d,arguments),_this.hasSlotController=new r(_assertThisInitialized(_this),"help-text","label"),_this.tags=[],_this.inputValue="",_this.isDropdownOpen=!1,_this.tooltips=[],_this.chipFocusIndex=null,_this.warning=!1,_this.noAutoComplete=!1,_this.error=!1,_this.success=!1,_this.noDuplicates=!1,_this.label="",_this.tagVariant="",_this.acceptUserInput=!1,_this.addOnBlur=!1,_this.clearable=!1,_this.placeholder="type here...",_this.readonly=!1,_this.disabled=!1,_this.portal=!1,_this.enableVirtualScroll=!1,_this.autoCompleteOptions=[],_this.filteredAutoCompleteOptions=[],_this.value=[],_this.noWrap=!1,_this.loading=!1,_this.errorIndexes=[],_this.helpText="",_this.errorMessage="",_this.filterFunction=function(t,i){return t.toLowerCase().includes(i.toLowerCase());},_this.renderItemFunction=function(t){return t;},_this.enableVisibilityEffect=!1,_this.enableTabClose=!1,_this.showTooltip=!1,_this.enableTagDelete=!1,_this.openDropdownOnFocus="true",_this.noDropdownClose=!1,_this.isSelectingFromDropdown=!1,_this.handleDocumentClick=function(t){var i=t.composedPath();_this.isSelectingFromDropdown?_this.resetDropdownState():i.includes(_assertThisInitialized(_this))||(_this.addOnBlur&&_this.acceptUserInput&&_this.inputValue&&_this.addChipFromInputValue(),_this.isDropdownOpen=!1);};return _this;}_inherits(d,_a);return _createClass(d,[{key:"resetDropdownState",value:function resetDropdownState(){this.isSelectingFromDropdown=!1;}},{key:"updated",value:function updated(t){var _this2=this;if(_superPropGet(d,"updated",this,3)([t]),t.has("autoCompleteOptions")){var _t=this.autoCompleteOptions;if("string"==typeof _t)try{_t=JSON.parse(_t);}catch(i){_t=[];}this.filteredAutoCompleteOptions=Array.isArray(_t)?_toConsumableArray(_t):[],this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter(function(t){return!_this2.value.includes(t);}));}t.has("value")&&(this.tags=_toConsumableArray(this.value),this.onTagsChanged()),t.has("tags")&&this.onTagsChanged();}},{key:"firstUpdated",value:function(){var _firstUpdated=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(t){var _this$renderRoot$quer,_this$autoComplete,_this$autoComplete2,_this3=this;var i;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return this.updateComplete;case 2:i=this.noAutoComplete?(_this$renderRoot$quer=this.renderRoot.querySelector("nile-input"))===null||_this$renderRoot$quer===void 0?void 0:_this$renderRoot$quer.input:((_this$autoComplete=this.autoComplete)===null||_this$autoComplete===void 0||(_this$autoComplete=_this$autoComplete.inputElement)===null||_this$autoComplete===void 0?void 0:_this$autoComplete.input)||((_this$autoComplete2=this.autoComplete)===null||_this$autoComplete2===void 0?void 0:_this$autoComplete2.inputElement);this.visibilityManager=new c({host:this,target:i,enableVisibilityEffect:this.enableVisibilityEffect,enableTabClose:this.enableTabClose,isOpen:function isOpen(){return _this3.isDropdownOpen;},onAnchorOutOfView:function onAnchorOutOfView(){_this3.isDropdownOpen=!1,_this3.autoComplete&&(_this3.autoComplete.isDropdownOpen=!1),_this3.emit("nile-visibility-change",{visible:!1,reason:"anchor-out-of-view"});},onDocumentHidden:function onDocumentHidden(){_this3.isDropdownOpen=!1,_this3.autoComplete&&(_this3.autoComplete.isDropdownOpen=!1),_this3.emit("nile-visibility-change",{visible:!1,reason:"document-hidden"});},emit:function emit(t,i){return _this3.emit("nile-".concat(t),i);}});case 4:case"end":return _context2.stop();}},_callee,this);}));function firstUpdated(_x){return _firstUpdated.apply(this,arguments);}return firstUpdated;}()},{key:"connectedCallback",value:function connectedCallback(){var _this4=this;_superPropGet(d,"connectedCallback",this,3)([]),document.addEventListener("click",this.handleDocumentClick),this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter(function(t){return!_this4.value.includes(t);})),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){var _this$visibilityManag;_superPropGet(d,"disconnectedCallback",this,3)([]),(_this$visibilityManag=this.visibilityManager)!==null&&_this$visibilityManag!==void 0&&_this$visibilityManag.cleanup(),document.removeEventListener("click",this.handleDocumentClick),this.emit("nile-destroy");}},{key:"markDropdownSelectStart",value:function markDropdownSelectStart(t){this.isSelectingFromDropdown=!0;}},{key:"render",value:function render(){var _this5=this;var t=this.hasSlotController.test("label");this.hasSlotController.test("help-text");var s=!!this.label||!!t,e=!!this.helpText,h=!!this.errorMessage;return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"form-control\"\n class=","\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=","\n >\n <slot name=\"label\">","</slot>\n </label>\n\n <div\n part='base' \n class=","\n >\n ","\n\n <div class=\"nile-chip__auto-complete\">\n ","\n </div>\n </div>\n ","\n ","\n </div>\n "])),n({"form-control":!0,"form-control--medium":!0,"form-control--has-label":s,"form-control--has-help-text":e,"nile-chip--disabled":this.disabled}),s?"false":"true",this.label,n({"nile-chip":!0,"nile-chip--warning":this.warning,"nile-chip--error":this.error,"nile-chip--success":this.success,"nile-chip--no-wrap":this.noWrap,"nile-chip--open":this.isDropdownOpen}),this.tags.map(function(t,s){var e=_this5.tooltips[s],h=_this5.enableTagDelete&&_this5.chipFocusIndex===s;var o="";(t||"number"==typeof t)&&(o=t.toString());var l=i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-tag\n class=","\n aria-selected=","\n .variant=","\n @nile-remove=","\n removable\n ?pill=","\n ?disabled=","\n >\n ","\n </nile-tag>\n "])),n({"nile-chip__tags":!0,"nile-chip__tags--focused":h}),h?"true":"false",_this5.errorIndexes.includes(s)?"error":"normal",function(){return _this5.handleRemove(t);},"normal"!==_this5.tagVariant,_this5.disabled,p(o));return _this5.showTooltip&&e?i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-lite-tooltip allowHTML .content=",">\n ","\n </nile-lite-tooltip>\n "])),e,l):l;}),this.noAutoComplete?i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-input\n .value=","\n .placeholder=","\n .disabled=","\n ?no-border=","\n ?no-outline=","\n ?no-padding=","\n @nile-input=","\n @keydown=","\n @focus=","\n @blur=","\n exportparts=\"input\"\n ></nile-input>\n "])),this.inputValue,this.placeholder,this.disabled,!0,!0,!0,this.handleInputChange,this.handleInputKeydown,this.handleFocus,this.handleBlur):i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-auto-complete\n .enableVirtualScroll=","\n .allMenuItems=","\n .filterFunction=","\n .renderItemFunction=","\n .showTooltips=","\n .loading=\"","\"\n .value=","\n ?isDropdownOpen=","\n .noBorder=","\n .noOutline=","\n .noPadding=","\n .disabled=","\n .readonly=","\n .portal=","\n ?openOnFocus=","\n exportparts=\"options__wrapper, input, base\"\n .placeholder=","\n @nile-input=","\n @keydown=","\n @nile-focus=","\n @nile-blur=","\n @nile-complete=","\n @mousedown=","\n .noDropdownClose=","\n ></nile-auto-complete>\n "])),this.enableVirtualScroll,this.filteredAutoCompleteOptions,this.filterFunction,this.renderItemFunction,this.showTooltip,this.loading,this.inputValue,this.isDropdownOpen,!0,!0,!0,this.disabled,this.readonly,this.portal,"true"===this.openDropdownOnFocus,this.placeholder,this.handleInputChange,this.handleInputKeydown,this.handleFocus,this.handleBlur,this.handleSelect,this.markDropdownSelectStart,this.noDropdownClose),e?i(_templateObject6||(_templateObject6=_taggedTemplateLiteral([" <nile-form-help-text>","</nile-form-help-text> "])),this.helpText):"",h?i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <nile-form-error-message\n >","</nile-form-error-message\n >\n "])),this.errorMessage):"");}},{key:"handleSelect",value:function handleSelect(t){var _s$tooltip,_this6=this,_s$tooltip3;this.isSelectingFromDropdown=!1,this.resetDropdownState();var i=t.detail.value,s=this.autoCompleteOptions.find(function(t){return t.name===i||t.id===i;});var e=null;if(this.showTooltip)if(s!==null&&s!==void 0&&(_s$tooltip=s.tooltip)!==null&&_s$tooltip!==void 0&&_s$tooltip.content){var _s$tooltip2=s.tooltip,_t2=_s$tooltip2.content,_i=_s$tooltip2["for"];if(!_i||"tag"===_i)if(_t2 instanceof Promise){this.tooltips=[].concat(_toConsumableArray(this.tooltips),["Loading..."]);var _i2=this.tooltips.length-1;_t2.then(function(t){_this6.tooltips[_i2]=t,_this6.requestUpdate();});}else e=_t2;}else e=(s===null||s===void 0?void 0:s.name)||i;this.noDuplicates&&this.tags.includes(i)||(this.tags=[].concat(_toConsumableArray(this.tags),[i]),(s===null||s===void 0||(_s$tooltip3=s.tooltip)===null||_s$tooltip3===void 0?void 0:_s$tooltip3.content)instanceof Promise||(this.tooltips=[].concat(_toConsumableArray(this.tooltips),[e])),this.emit("nile-chip-change",{value:this.tags}),this.resetInput());}},{key:"handleRemove",value:function handleRemove(t){this.tags=this.tags.filter(function(i){return i!==t;}),this.noDuplicates&&this.autoCompleteOptions.includes(t)&&(this.filteredAutoCompleteOptions=[].concat(_toConsumableArray(this.filteredAutoCompleteOptions),[t])),this.emit("nile-chip-change",{value:this.tags});}},{key:"handleInputChange",value:function handleInputChange(t){this.inputValue=t.detail.value;}},{key:"addChipFromInputValue",value:function addChipFromInputValue(){var _this$visibilityManag2;return this.noDuplicates&&this.tags.includes(this.inputValue)?(this.emit("nile-duplicates-blocked"),!1):(this.tags=[].concat(_toConsumableArray(this.tags),[this.inputValue]),this.showTooltip?this.tooltips=[].concat(_toConsumableArray(this.tooltips),[this.inputValue]):this.tooltips=[].concat(_toConsumableArray(this.tooltips),[null]),this.inputValue="",(_this$visibilityManag2=this.visibilityManager)!==null&&_this$visibilityManag2!==void 0&&_this$visibilityManag2.cleanup(),this.emit("nile-chip-change",{value:this.tags}),!0);}},{key:"handleInputKeydown",value:function handleInputKeydown(t){if(this.enableTagDelete&&("Backspace"===t.key||"Delete"===t.key)&&!this.inputValue&&!this.readonly&&!this.disabled){if(0===this.tags.length)return void(this.chipFocusIndex=null);if(t.preventDefault(),null===this.chipFocusIndex)return this.chipFocusIndex=this.tags.length-1,void this.requestUpdate();var _i3=this.chipFocusIndex;return this.tags[_i3],this.tags=this.tags.filter(function(t,s){return s!==_i3;}),this.tooltips=this.tooltips.filter(function(t,s){return s!==_i3;}),this.emit("nile-chip-change",{value:this.tags}),void(this.tags.length>0?this.chipFocusIndex=Math.max(0,_i3-1):this.chipFocusIndex=null);}if(this.readonly){if(!["ArrowUp","ArrowDown","Enter","Tab"].includes(t.key))return void t.preventDefault();}this.acceptUserInput&&("Tab"===t.key&&t.preventDefault(),"Enter"!==t.key&&"Tab"!==t.key||!this.inputValue||this.noDuplicates&&this.tags.includes(this.inputValue)||(t.preventDefault(),this.tags=[].concat(_toConsumableArray(this.tags),[this.inputValue]),this.showTooltip?this.tooltips=[].concat(_toConsumableArray(this.tooltips),[this.inputValue]):this.tooltips=[].concat(_toConsumableArray(this.tooltips),[null]),this.resetInput(),this.emit("nile-chip-change",{value:this.tags})),"Enter"!==t.key&&"Tab"!==t.key||!this.inputValue||!this.noDuplicates&&!this.tags.includes(this.inputValue)||this.emit("nile-duplicates-blocked"));}},{key:"handleFocus",value:function handleFocus(){var _this$visibilityManag3;this.noAutoComplete||((_this$visibilityManag3=this.visibilityManager)!==null&&_this$visibilityManag3!==void 0&&_this$visibilityManag3.setup(),this.isDropdownOpen=!0);}},{key:"handleBlur",value:function handleBlur(){this.isSelectingFromDropdown||this.addOnBlur&&this.acceptUserInput&&this.inputValue&&this.addChipFromInputValue();}},{key:"onTagsChanged",value:function onTagsChanged(){var _this7=this;this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter(function(t){return!_this7.tags.includes(t);}));}},{key:"resetInput",value:function resetInput(){var _this$visibilityManag4;this.inputValue="",this.isDropdownOpen=!1,(_this$visibilityManag4=this.visibilityManager)!==null&&_this$visibilityManag4!==void 0&&_this$visibilityManag4.cleanup(),!this.noAutoComplete&&this.autoComplete&&(this.autoComplete.value="",this.autoComplete.handleFocus());}}],[{key:"styles",get:function get(){return[l];}}]);}(a));t([s()],d.prototype,"tags",void 0),t([s()],d.prototype,"inputValue",void 0),t([s()],d.prototype,"isDropdownOpen",void 0),t([s()],d.prototype,"tooltips",void 0),t([s()],d.prototype,"chipFocusIndex",void 0),t([e("nile-auto-complete")],d.prototype,"autoComplete",void 0),t([h({type:Boolean})],d.prototype,"warning",void 0),t([h({type:Boolean})],d.prototype,"noAutoComplete",void 0),t([h({type:Boolean})],d.prototype,"error",void 0),t([h({type:Boolean})],d.prototype,"success",void 0),t([h({type:Boolean})],d.prototype,"noDuplicates",void 0),t([h()],d.prototype,"label",void 0),t([h({type:String})],d.prototype,"tagVariant",void 0),t([h({type:Boolean})],d.prototype,"acceptUserInput",void 0),t([h({type:Boolean})],d.prototype,"addOnBlur",void 0),t([h({type:Boolean})],d.prototype,"clearable",void 0),t([h()],d.prototype,"placeholder",void 0),t([h({type:Boolean,reflect:!0})],d.prototype,"readonly",void 0),t([h({type:Boolean,reflect:!0})],d.prototype,"disabled",void 0),t([h({type:Boolean,reflect:!0})],d.prototype,"portal",void 0),t([h({type:Boolean})],d.prototype,"enableVirtualScroll",void 0),t([h({type:Array})],d.prototype,"autoCompleteOptions",void 0),t([h({type:Array})],d.prototype,"filteredAutoCompleteOptions",void 0),t([h({type:Array})],d.prototype,"value",void 0),t([h({type:Boolean})],d.prototype,"noWrap",void 0),t([h({type:Boolean})],d.prototype,"loading",void 0),t([h({type:Array})],d.prototype,"errorIndexes",void 0),t([h({attribute:"help-text",reflect:!0})],d.prototype,"helpText",void 0),t([h({attribute:"error-message",reflect:!0})],d.prototype,"errorMessage",void 0),t([h({attribute:!1})],d.prototype,"filterFunction",void 0),t([h({attribute:!1})],d.prototype,"renderItemFunction",void 0),t([h({type:Boolean,reflect:!0})],d.prototype,"enableVisibilityEffect",void 0),t([h({type:Boolean,reflect:!0})],d.prototype,"enableTabClose",void 0),t([h({type:Boolean})],d.prototype,"showTooltip",void 0),t([h({type:Boolean})],d.prototype,"enableTagDelete",void 0),t([h({type:String,reflect:!0,attribute:!0})],d.prototype,"openDropdownOnFocus",void 0),t([h({type:Boolean,reflect:!0,attribute:!0})],d.prototype,"noDropdownClose",void 0),_export("N",d=t([o("nile-chip")],d));}};});
2
2
  //# sourceMappingURL=nile-chip.cjs.js.map