@aquera/nile-elements 0.1.22 → 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/dist/flow-8340c041.esm.js +16 -0
- package/dist/flow-d0fa8803.cjs.js +14 -0
- package/dist/flow-d0fa8803.cjs.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/nile-auto-complete/index.cjs.js +1 -1
- package/dist/nile-auto-complete/index.esm.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js +25 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.css.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.css.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.css.esm.js +11 -2
- package/dist/nile-auto-complete/nile-auto-complete.esm.js +50 -10
- package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +5 -5
- package/dist/nile-chip/nile-chip.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.esm.js +3 -2
- package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.test.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.test.esm.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
- package/dist/nile-code-editor/nile-code-editor.esm.js +2 -2
- package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js.map +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.css.esm.js +7 -2
- package/dist/nile-tab-group/nile-tab-group.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
- package/dist/nile-tab-group/nile-tab-group.css.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.css.cjs.js.map +1 -1
- package/dist/nile-tab-group/nile-tab-group.css.esm.js +11 -3
- package/dist/nile-tab-group/nile-tab-group.esm.js +2 -0
- package/dist/src/nile-auto-complete/nile-auto-complete.css.js +9 -0
- package/dist/src/nile-auto-complete/nile-auto-complete.css.js.map +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.d.ts +5 -0
- package/dist/src/nile-auto-complete/nile-auto-complete.js +32 -11
- package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
- package/dist/src/nile-chip/nile-chip.d.ts +2 -0
- package/dist/src/nile-chip/nile-chip.js +7 -1
- package/dist/src/nile-chip/nile-chip.js.map +1 -1
- package/dist/src/nile-code-editor/nile-code-editor.d.ts +1 -0
- package/dist/src/nile-code-editor/nile-code-editor.js +5 -1
- package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js +5 -0
- package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js.map +1 -1
- package/dist/src/nile-tab-group/nile-tab-group.css.js +11 -3
- package/dist/src/nile-tab-group/nile-tab-group.css.js.map +1 -1
- package/dist/src/nile-tab-group/nile-tab-group.js +2 -0
- package/dist/src/nile-tab-group/nile-tab-group.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/src/nile-auto-complete/nile-auto-complete.css.ts +9 -0
- package/src/nile-auto-complete/nile-auto-complete.ts +33 -13
- package/src/nile-chip/nile-chip.ts +6 -1
- package/src/nile-code-editor/nile-code-editor.ts +4 -2
- package/src/nile-slide-toggle/nile-slide-toggle.css.ts +5 -0
- package/src/nile-tab-group/nile-tab-group.css.ts +11 -3
- package/src/nile-tab-group/nile-tab-group.ts +2 -0
- package/vscode-html-custom-data.json +18 -3
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-auto-complete.test.cjs.js","sources":["../../../src/nile-auto-complete/nile-auto-complete.test.ts"],"sourcesContent":["import { fixture, html, expect, oneEvent, elementUpdated } from '@open-wc/testing';\nimport './nile-auto-complete';\nimport { NileAutoComplete } from './nile-auto-complete';\n\nconst wait=(ms:number=50000)=>new Promise(resolve => setTimeout(resolve, ms))\n\ndescribe('NileAutoComplete', () => {\n it('should render correctly', async () => {\n const el = await fixture<NileAutoComplete>(html`<nile-auto-complete></nile-auto-complete>`);\n expect(el).to.be.instanceOf(NileAutoComplete);\n expect(el.shadowRoot).not.to.be.null;\n });\n\n it('should have an empty value and dropdown closed by default', async () => {\n const el = await fixture<NileAutoComplete>(html`<nile-auto-complete></nile-auto-complete>`);\n expect(el.value).to.equal('');\n expect(el.isDropdownOpen).to.be.false;\n });\n\n // it('should open the dropdown when input is focused and openOnFocus is true', async () => {\n // const el = await fixture<NileAutoComplete>(html`<nile-auto-complete openOnFocus></nile-auto-complete>`);\n\n // // Focus the input\n // const input = el.shadowRoot?.querySelector('nile-input');\n // input?.dispatchEvent(new Event('focus'));\n\t// \tawait wait()\n // await elementUpdated(el);\n\n // expect(el.isDropdownOpen).to.be.true;\n // });\n\n // it('should filter menu items based on the input value', async () => {\n // const el = await fixture<NileAutoComplete>(html`\n // <nile-auto-complete .allMenuItems=${['Apple', 'Banana', 'Cherry']}></nile-auto-complete>\n // `);\n\n // // Simulate typing in the input\n // const input = el.shadowRoot?.querySelector('nile-input');\n // input?.dispatchEvent(new CustomEvent('nile-input', { detail: { value: 'Ap' } }));\n // await elementUpdated(el);\n\n // expect(el.menuItems).to.deep.equal(['Apple']);\n // });\n\n it('should close the dropdown if no items match the search', async () => {\n const el = await fixture<NileAutoComplete>(html`\n <nile-auto-complete .allMenuItems=${['Apple', 'Banana', 'Cherry']}></nile-auto-complete>\n `);\n\n // Simulate typing in the input with a non-matching value\n const input = el.shadowRoot?.querySelector('nile-input');\n input?.dispatchEvent(new CustomEvent('nile-input', { detail: { value: 'Orange' } }));\n await elementUpdated(el);\n\n expect(el.menuItems).to.deep.equal([]);\n expect(el.isDropdownOpen).to.be.false;\n });\n\n // it('should select an item from the menu', async () => {\n // const el = await fixture<NileAutoComplete>(html`\n // <nile-auto-complete .allMenuItems=${['Apple', 'Banana', 'Cherry']}></nile-auto-complete>\n // `);\n\n // // Simulate typing in the input\n // const input = el.shadowRoot?.querySelector('nile-input');\n // input?.dispatchEvent(new CustomEvent('nile-input', { detail: { value: 'Ban' } }));\n // await elementUpdated(el);\n\n // const menuItem = el.shadowRoot?.querySelector('nile-menu-item[value=\"Banana\"]');\n // expect(menuItem).to.exist;\n\n // // Select the menu item\n // const selectEvent = new CustomEvent('nile-select', { detail: { value: 'Banana' } });\n // menuItem?.dispatchEvent(selectEvent);\n // await elementUpdated(el);\n\n // expect(el.value).to.equal('Banana');\n // expect(el.isDropdownOpen).to.be.false;\n // });\n\n // it('should emit nile-complete event when an item is selected', async () => {\n // const el = await fixture<NileAutoComplete>(html`\n // <nile-auto-complete .allMenuItems=${['Apple', 'Banana', 'Cherry']}></nile-auto-complete>\n // `);\n\n // // Simulate typing in the input\n // const input = el.shadowRoot?.querySelector('nile-input');\n // input?.dispatchEvent(new CustomEvent('nile-input', { detail: { value: 'App' } }));\n // await elementUpdated(el);\n\n // // Wait for the selection event\n // const selectEvent = oneEvent(el, 'nile-complete');\n\n // // Select an item\n // const menuItem = el.shadowRoot?.querySelector('nile-menu-item[value=\"Apple\"]');\n // const event = new CustomEvent('nile-select', { detail: { value: 'Apple' } });\n // menuItem?.dispatchEvent(event);\n\n // const { detail } = await selectEvent;\n // expect(detail.value).to.equal('Apple');\n // });\n\n it('should apply the placeholder text to the input', async () => {\n const el = await fixture<NileAutoComplete>(html`\n <nile-auto-complete placeholder=\"Search items...\"></nile-auto-complete>\n `);\n\n const input = el.shadowRoot?.querySelector('nile-input');\n expect(input?.getAttribute('placeholder')).to.equal('Search items...');\n });\n\n it('should toggle border visibility based on the noBorder property', async () => {\n const el = await fixture<NileAutoComplete>(html`\n <nile-auto-complete noBorder></nile-auto-complete>\n `);\n\n const input = el.shadowRoot?.querySelector('nile-input');\n expect(input?.hasAttribute('no-border')).to.be.true;\n\n el.noBorder = false;\n await elementUpdated(el);\n\n expect(input?.hasAttribute('no-border')).to.be.false;\n });\n\n it('should handle an empty list of menu items', async () => {\n const el = await fixture<NileAutoComplete>(html`<nile-auto-complete .allMenuItems=${[]}></nile-auto-complete>`);\n\n const input = el.shadowRoot?.querySelector('nile-input');\n input?.dispatchEvent(new CustomEvent('nile-input', { detail: { value: 'test' } }));\n await elementUpdated(el);\n\n expect(el.menuItems.length).to.equal(0);\n expect(el.isDropdownOpen).to.be.false;\n });\n\n it('should hide the dropdown when no results are found', async () => {\n const el = await fixture<NileAutoComplete>(html`\n <nile-auto-complete .allMenuItems=${['Apple', 'Banana', 'Cherry']}></nile-auto-complete>\n `);\n\n const input = el.shadowRoot?.querySelector('nile-input');\n input?.dispatchEvent(new CustomEvent('nile-input', { detail: { value: 'NonMatchingValue' } }));\n await elementUpdated(el);\n\n expect(el.isDropdownOpen).to.be.false;\n expect(el.menuItems.length).to.equal(0);\n });\n});\n"],"names":["_regeneratorRuntime","e","t","r","Object","prototype","n","hasOwnProperty","o","defineProperty","value","i","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","call","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","Error","done","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","isNaN","length","displayName","isGeneratorFunction","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","keys","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","_catch","delegateYield","_taggedTemplateLiteral","freeze","defineProperties","raw","asyncGeneratorStep","_asyncToGenerator","arguments","apply","_next","_throw","setters","_fixture002CjsJs","describe","it","fixture","html","_templateObject","el","expect","to","be","instanceOf","NileAutoComplete","shadowRoot","not","null","_context2","_callee","_templateObject2","equal","isDropdownOpen","false","_context3","_callee2","_templateObject3","input","querySelector","dispatchEvent","CustomEvent","detail","elementUpdated","menuItems","deep","_context4","_callee3","_templateObject4","getAttribute","_context5","_callee4","_templateObject5","hasAttribute","true","noBorder","_context6","_callee5","_templateObject6","_context7","_callee6","_templateObject7","_context8","_callee7"],"mappings":"8vBA8C0C,oJAAAA,mBAAA,UAAAA,oBAAA,SAAAC,CAAA,OAAAC,CAAA,CAAAD,CAAA,IAAAE,CAAA,CAAAC,MAAA,CAAAC,SAAA,CAAAC,CAAA,CAAAH,CAAA,CAAAI,cAAA,CAAAC,CAAA,CAAAJ,MAAA,CAAAK,cAAA,WAAAP,CAAA,CAAAD,CAAA,CAAAE,CAAA,EAAAD,CAAA,CAAAD,CAAA,EAAAE,CAAA,CAAAO,KAAA,GAAAC,CAAA,oBAAAC,MAAA,CAAAA,MAAA,IAAAC,CAAA,CAAAF,CAAA,CAAAG,QAAA,eAAAC,CAAA,CAAAJ,CAAA,CAAAK,aAAA,oBAAAC,CAAA,CAAAN,CAAA,CAAAO,WAAA,2BAAAC,OAAAjB,CAAA,CAAAD,CAAA,CAAAE,CAAA,SAAAC,MAAA,CAAAK,cAAA,CAAAP,CAAA,CAAAD,CAAA,EAAAS,KAAA,CAAAP,CAAA,CAAAiB,UAAA,IAAAC,YAAA,IAAAC,QAAA,MAAApB,CAAA,CAAAD,CAAA,OAAAkB,MAAA,eAAAjB,CAAA,EAAAiB,MAAA,UAAAA,OAAAjB,CAAA,CAAAD,CAAA,CAAAE,CAAA,SAAAD,CAAA,CAAAD,CAAA,EAAAE,CAAA,aA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AAAA,EAAAA,cAAAA,CAAQlB,CAAGM,CAAAA,UAAAA,UAAAA,cAAAA,iBAAHN,cAAAA,CAAemB,aAAc,CAAA,YAAA,CAAA,CAC3CD,CAAOE,SAAPF,CAAOE,WAAPF,CAAOE,CAAAA,aAAAA,CAAc,GAAIC,CAAAA,WAAAA,CAAY,YAAc,CAAA,CAAEC,MAAQ,CAAA,CAAEpI,KAAO,CAAA,kBAAA,CAAA,CAAA,CAAA,CAAA,CAAAwJ,SAAA,CAAAhG,IAAA,SAChE6E,CAAAA,CAAevB,CAAAA,CAAAA,CAAAA,QAErBC,CAAOD,CAAAA,CAAAA,CAAGa,cAAgBX,CAAAA,CAAAA,EAAAA,CAAGC,EAAGW,SAAAA,CAChCb,CAAOD,CAAAA,CAAAA,CAAGwB,SAAUjE,CAAAA,MAAAA,CAAAA,CAAQ2C,EAAGU,CAAAA,KAAAA,CAAM,EAAE,yBAAA8B,SAAA,CAAAlE,IAAA,MAAAmE,QAAA,GACvC,EAAA,CAAA,EAAA,CAAA,CAAA"}
|
1
|
+
{"version":3,"file":"nile-auto-complete.test.cjs.js","sources":["../../../src/nile-auto-complete/nile-auto-complete.test.ts"],"sourcesContent":["import { fixture, html, expect, oneEvent, elementUpdated } from '@open-wc/testing';\nimport './nile-auto-complete';\nimport { NileAutoComplete } from './nile-auto-complete';\n\nconst wait=(ms:number=50000)=>new Promise(resolve => setTimeout(resolve, ms))\n\ndescribe('NileAutoComplete', () => {\n it('should render correctly', async () => {\n const el = await fixture<NileAutoComplete>(html`<nile-auto-complete></nile-auto-complete>`);\n expect(el).to.be.instanceOf(NileAutoComplete);\n expect(el.shadowRoot).not.to.be.null;\n });\n\n it('should have an empty value and dropdown closed by default', async () => {\n const el = await fixture<NileAutoComplete>(html`<nile-auto-complete></nile-auto-complete>`);\n expect(el.value).to.equal('');\n expect(el.isDropdownOpen).to.be.false;\n });\n\n // it('should open the dropdown when input is focused and openOnFocus is true', async () => {\n // const el = await fixture<NileAutoComplete>(html`<nile-auto-complete openOnFocus></nile-auto-complete>`);\n\n // // Focus the input\n // const input = el.shadowRoot?.querySelector('nile-input');\n // input?.dispatchEvent(new Event('focus'));\n\t// \tawait wait()\n // await elementUpdated(el);\n\n // expect(el.isDropdownOpen).to.be.true;\n // });\n\n // it('should filter menu items based on the input value', async () => {\n // const el = await fixture<NileAutoComplete>(html`\n // <nile-auto-complete .allMenuItems=${['Apple', 'Banana', 'Cherry']}></nile-auto-complete>\n // `);\n\n // // Simulate typing in the input\n // const input = el.shadowRoot?.querySelector('nile-input');\n // input?.dispatchEvent(new CustomEvent('nile-input', { detail: { value: 'Ap' } }));\n // await elementUpdated(el);\n\n // expect(el.menuItems).to.deep.equal(['Apple']);\n // });\n\n it('should close the dropdown if no items match the search', async () => {\n const el = await fixture<NileAutoComplete>(html`\n <nile-auto-complete .allMenuItems=${['Apple', 'Banana', 'Cherry']}></nile-auto-complete>\n `);\n\n // Simulate typing in the input with a non-matching value\n const input = el.shadowRoot?.querySelector('nile-input');\n input?.dispatchEvent(new CustomEvent('nile-input', { detail: { value: 'Orange' } }));\n await elementUpdated(el);\n\n expect(el.menuItems).to.deep.equal([]);\n expect(el.isDropdownOpen).to.be.false;\n });\n\n // it('should select an item from the menu', async () => {\n // const el = await fixture<NileAutoComplete>(html`\n // <nile-auto-complete .allMenuItems=${['Apple', 'Banana', 'Cherry']}></nile-auto-complete>\n // `);\n\n // // Simulate typing in the input\n // const input = el.shadowRoot?.querySelector('nile-input');\n // input?.dispatchEvent(new CustomEvent('nile-input', { detail: { value: 'Ban' } }));\n // await elementUpdated(el);\n\n // const menuItem = el.shadowRoot?.querySelector('nile-menu-item[value=\"Banana\"]');\n // expect(menuItem).to.exist;\n\n // // Select the menu item\n // const selectEvent = new CustomEvent('nile-select', { detail: { value: 'Banana' } });\n // menuItem?.dispatchEvent(selectEvent);\n // await elementUpdated(el);\n\n // expect(el.value).to.equal('Banana');\n // expect(el.isDropdownOpen).to.be.false;\n // });\n\n // it('should emit nile-complete event when an item is selected', async () => {\n // const el = await fixture<NileAutoComplete>(html`\n // <nile-auto-complete .allMenuItems=${['Apple', 'Banana', 'Cherry']}></nile-auto-complete>\n // `);\n\n // // Simulate typing in the input\n // const input = el.shadowRoot?.querySelector('nile-input');\n // input?.dispatchEvent(new CustomEvent('nile-input', { detail: { value: 'App' } }));\n // await elementUpdated(el);\n\n // // Wait for the selection event\n // const selectEvent = oneEvent(el, 'nile-complete');\n\n // // Select an item\n // const menuItem = el.shadowRoot?.querySelector('nile-menu-item[value=\"Apple\"]');\n // const event = new CustomEvent('nile-select', { detail: { value: 'Apple' } });\n // menuItem?.dispatchEvent(event);\n\n // const { detail } = await selectEvent;\n // expect(detail.value).to.equal('Apple');\n // });\n\n it('should apply the placeholder text to the input', async () => {\n const el = await fixture<NileAutoComplete>(html`\n <nile-auto-complete placeholder=\"Search items...\"></nile-auto-complete>\n `);\n\n const input = el.shadowRoot?.querySelector('nile-input');\n expect(input?.getAttribute('placeholder')).to.equal('Search items...');\n });\n\n it('should toggle border visibility based on the noBorder property', async () => {\n const el = await fixture<NileAutoComplete>(html`\n <nile-auto-complete noBorder></nile-auto-complete>\n `);\n\n const input = el.shadowRoot?.querySelector('nile-input');\n expect(input?.hasAttribute('no-border')).to.be.true;\n\n el.noBorder = false;\n await elementUpdated(el);\n\n expect(input?.hasAttribute('no-border')).to.be.false;\n });\n\n it('should handle an empty list of menu items', async () => {\n const el = await fixture<NileAutoComplete>(html`<nile-auto-complete .allMenuItems=${[]}></nile-auto-complete>`);\n\n const input = el.shadowRoot?.querySelector('nile-input');\n input?.dispatchEvent(new CustomEvent('nile-input', { detail: { value: 'test' } }));\n await elementUpdated(el);\n\n expect(el.menuItems.length).to.equal(0);\n expect(el.isDropdownOpen).to.be.false;\n });\n\n it('should hide the dropdown when no results are found', async () => {\n const el = await fixture<NileAutoComplete>(html`\n <nile-auto-complete .allMenuItems=${['Apple', 'Banana', 'Cherry']}></nile-auto-complete>\n `);\n\n const input = el.shadowRoot?.querySelector('nile-input');\n input?.dispatchEvent(new CustomEvent('nile-input', { detail: { value: 'NonMatchingValue' } }));\n await elementUpdated(el);\n\n expect(el.isDropdownOpen).to.be.false;\n expect(el.menuItems.length).to.equal(0);\n });\n});\n"],"names":["_regeneratorRuntime","e","t","r","Object","prototype","n","hasOwnProperty","o","defineProperty","value","i","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","call","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","Error","done","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","isNaN","length","displayName","isGeneratorFunction","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","keys","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","_catch","delegateYield","_taggedTemplateLiteral","freeze","defineProperties","raw","asyncGeneratorStep","_asyncToGenerator","arguments","apply","_next","_throw","setters","_fixture002CjsJs","describe","it","fixture","html","_templateObject","el","expect","to","be","instanceOf","NileAutoComplete","shadowRoot","not","_context2","_callee","_templateObject2","equal","isDropdownOpen","_context3","_callee2","_templateObject3","input","querySelector","dispatchEvent","CustomEvent","detail","elementUpdated","menuItems","deep","_context4","_callee3","_templateObject4","getAttribute","_context5","_callee4","_templateObject5","hasAttribute","true","noBorder","_context6","_callee5","_templateObject6","_context7","_callee6","_templateObject7","_context8","false","_callee7"],"mappings":"k2BA8C0C,oJAAAA,mBAAA,UAAAA,oBAAA,SAAAC,CAAA,OAAAC,CAAA,CAAAD,CAAA,IAAAE,CAAA,CAAAC,MAAA,CAAAC,SAAA,CAAAC,CAAA,CAAAH,CAAA,CAAAI,cAAA,CAAAC,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|
@@ -1,9 +1,9 @@
|
|
1
|
-
import{f as e,a as t,e as
|
1
|
+
import{f as e,a as t,e as i}from"../fixture-372df3b0.esm.js";import{html as o}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import{N as l}from"./nile-auto-complete.esm.js";import"tslib";import"lit/decorators.js";import"./nile-auto-complete.css.esm.js";import"../internal/nile-element.esm.js";import"lit/decorators/property.js";import"lit/directive.js";import"lit/async-directive.js";import"lit/directives/repeat.js";describe("NileAutoComplete",(()=>{it("should render correctly",(async()=>{const i=await e(o`<nile-auto-complete></nile-auto-complete>`);t(i).to.be.instanceOf(l),t(i.shadowRoot).not.to.be.null})),it("should have an empty value and dropdown closed by default",(async()=>{const i=await e(o`<nile-auto-complete></nile-auto-complete>`);t(i.value).to.equal(""),t(i.isDropdownOpen).to.be.false})),it("should close the dropdown if no items match the search",(async()=>{const l=await e(o`
|
2
2
|
<nile-auto-complete .allMenuItems=${["Apple","Banana","Cherry"]}></nile-auto-complete>
|
3
|
-
`),a=
|
3
|
+
`),a=l.shadowRoot?.querySelector("nile-input");a?.dispatchEvent(new CustomEvent("nile-input",{detail:{value:"Orange"}})),await i(l),t(l.menuItems).to.deep.equal([]),t(l.isDropdownOpen).to.be.false})),it("should apply the placeholder text to the input",(async()=>{const i=await e(o`
|
4
4
|
<nile-auto-complete placeholder="Search items..."></nile-auto-complete>
|
5
|
-
`),i
|
5
|
+
`),l=i.shadowRoot?.querySelector("nile-input");t(l?.getAttribute("placeholder")).to.equal("Search items...")})),it("should toggle border visibility based on the noBorder property",(async()=>{const l=await e(o`
|
6
6
|
<nile-auto-complete noBorder></nile-auto-complete>
|
7
|
-
`),a=
|
7
|
+
`),a=l.shadowRoot?.querySelector("nile-input");t(a?.hasAttribute("no-border")).to.be.true,l.noBorder=!1,await i(l),t(a?.hasAttribute("no-border")).to.be.false})),it("should handle an empty list of menu items",(async()=>{const l=await e(o`<nile-auto-complete .allMenuItems=${[]}></nile-auto-complete>`),a=l.shadowRoot?.querySelector("nile-input");a?.dispatchEvent(new CustomEvent("nile-input",{detail:{value:"test"}})),await i(l),t(l.menuItems.length).to.equal(0),t(l.isDropdownOpen).to.be.false})),it("should hide the dropdown when no results are found",(async()=>{const l=await e(o`
|
8
8
|
<nile-auto-complete .allMenuItems=${["Apple","Banana","Cherry"]}></nile-auto-complete>
|
9
|
-
`),a=
|
9
|
+
`),a=l.shadowRoot?.querySelector("nile-input");a?.dispatchEvent(new CustomEvent("nile-input",{detail:{value:"NonMatchingValue"}})),await i(l),t(l.isDropdownOpen).to.be.false,t(l.menuItems.length).to.equal(0)}))}));
|
@@ -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"],function(_export,_context){"use strict";var t,e,i,s,o,l,h,r,n,a,_templateObject,_templateObject2,_templateObject3,_templateObject4,p;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}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){e=_lit.html;},function(_litDecoratorsJs){i=_litDecoratorsJs.state;s=_litDecoratorsJs.query;o=_litDecoratorsJs.property;l=_litDecoratorsJs.customElement;},function(_nileChipCssCjsJs){h=_nileChipCssCjsJs.s;},function(_litDirectivesClassMapJs){r=_litDirectivesClassMapJs.classMap;},function(_internalSlotCjsJs){n=_internalSlotCjsJs.H;},function(_internalNileElementCjsJs){a=_internalNileElementCjsJs.N;}],execute:function execute(){_export("N",p=/*#__PURE__*/function(_a){function p(){var _this;_classCallCheck(this,p);_this=_callSuper(this,p,arguments),_this.hasSlotController=new n(_assertThisInitialized(_this),"help-text","label"),_this.tags=[],_this.inputValue="",_this.isDropdownOpen=!1,_this.warning=!1,_this.error=!1,_this.success=!1,_this.noDuplicates=!1,_this.label="",_this.acceptUserInput=!1,_this.clearable=!1,_this.placeholder="type here...",_this.readonly=!1,_this.disabled=!1,_this.autoCompleteOptions=[],_this.filteredAutoCompleteOptions=[],_this.value=[],_this.noWrap=!1,_this.loading=!1,_this.errorIndexes=[],_this.helpText="",_this.errorMessage="",_this.filterFunction=function(t,e){return t.toLowerCase().includes(e.toLowerCase());},_this.renderItemFunction=function(t){return t;};return _this;}_inherits(p,_a);return _createClass(p,[{key:"updated",value:function updated(t){var _this2=this;_superPropGet(p,"updated",this,3)([t]),t.has("autoCompleteOptions")&&(this.filteredAutoCompleteOptions=_toConsumableArray(this.autoCompleteOptions),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:"connectedCallback",value:function connectedCallback(){var _this3=this;_superPropGet(p,"connectedCallback",this,3)([]),this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter(function(t){return!_this3.value.includes(t);})),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_superPropGet(p,"disconnectedCallback",this,3)([]),this.emit("nile-destroy");}},{key:"render",value:function render(){var _this4=this;var t=this.hasSlotController.test("label");this.hasSlotController.test("help-text");var i=!!this.label||!!t,s=!!this.helpText,o=!!this.errorMessage;return e(_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 class=","\n >\n ","\n <div class=\"nile-chip__auto-complete\">\n <nile-auto-complete\n .allMenuItems=","\n .filterFunction=","\n .renderItemFunction=","\n .loading=\"","\"\n .value=","\n ?isDropdownOpen=","\n .noBorder=","\n openOnFocus\n exportparts=\"options__wrapper\"\n .placeholder=","\n @nile-input=","\n @keydown=","\n @nile-focus=","\n @nile-complete=","\n ></nile-auto-complete>\n </div>\n <slot\n name=\"help-text\"\n part=\"form-control-help-text\"\n id=\"help-text\"\n class=\"form-control__help-text\"\n aria-hidden=","\n >\n ","\n </slot>\n </div>\n ","\n\n ","\n </div>\n "])),r({"form-control":!0,"form-control--medium":!0,"form-control--has-label":i,"form-control--has-help-text":s,"nile-chip--disabled":this.disabled}),i?"false":"true",this.label,r({"nile-chip":!0,"nile-chip--warning":this.warning,"nile-chip--error":this.error,"nile-chip--success":this.success,"nile-chip--no-wrap":this.noWrap}),this.tags.map(function(t,i){return e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-tag\n class=","\n .variant=","\n @nile-remove=","\n removable\n pill\n >\n ","\n </nile-tag>\n "])),r({"nile-chip__tags":!0}),_this4.errorIndexes.includes(i)?"error":"normal",function(){return _this4.handleRemove(t);},t);}),this.filteredAutoCompleteOptions,this.filterFunction,this.renderItemFunction,this.loading,this.inputValue,this.isDropdownOpen,!0,this.placeholder,this.handleInputChange,this.handleInputKeydown,this.handleFocus,this.handleSelect,s?"false":"true",this.helpText,s?e(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-form-help-text>","</nile-form-help-text>\n "])),this.helpText):"",o?e(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-form-error-message\n >","</nile-form-error-message\n >\n "])),this.errorMessage):"");}},{key:"handleSelect",value:function handleSelect(t){this.noDuplicates&&this.tags.includes(t.detail.value)||(this.tags=[].concat(_toConsumableArray(this.tags),[t.detail.value]),this.emit("nile-chip-change",{value:this.tags}),this.resetInput());}},{key:"handleRemove",value:function handleRemove(t){this.tags=this.tags.filter(function(e){return e!==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:"handleInputKeydown",value:function handleInputKeydown(t){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.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(){this.isDropdownOpen=!0;}},{key:"onTagsChanged",value:function onTagsChanged(){var _this5=this;this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter(function(t){return!_this5.tags.includes(t);}));}},{key:"resetInput",value:function resetInput(){this.inputValue="",this.isDropdownOpen=!1,this.autoComplete.value="",this.autoComplete.handleFocus();}}],[{key:"styles",get:function get(){return[h];}}]);}(a));t([i()],p.prototype,"tags",void 0),t([i()],p.prototype,"inputValue",void 0),t([i()],p.prototype,"isDropdownOpen",void 0),t([s("nile-auto-complete")],p.prototype,"autoComplete",void 0),t([o({type:Boolean})],p.prototype,"warning",void 0),t([o({type:Boolean})],p.prototype,"error",void 0),t([o({type:Boolean})],p.prototype,"success",void 0),t([o({type:Boolean})],p.prototype,"noDuplicates",void 0),t([o()],p.prototype,"label",void 0),t([o({type:Boolean})],p.prototype,"acceptUserInput",void 0),t([o({type:Boolean})],p.prototype,"clearable",void 0),t([o()],p.prototype,"placeholder",void 0),t([o({type:Boolean,reflect:!0})],p.prototype,"readonly",void 0),t([o({type:Boolean,reflect:!0})],p.prototype,"disabled",void 0),t([o({type:Array})],p.prototype,"autoCompleteOptions",void 0),t([o({type:Array})],p.prototype,"filteredAutoCompleteOptions",void 0),t([o({type:Array})],p.prototype,"value",void 0),t([o({type:Boolean})],p.prototype,"noWrap",void 0),t([o({type:Boolean})],p.prototype,"loading",void 0),t([o({type:Array})],p.prototype,"errorIndexes",void 0),t([o({attribute:"help-text",reflect:!0})],p.prototype,"helpText",void 0),t([o({attribute:"error-message",reflect:!0})],p.prototype,"errorMessage",void 0),t([o({attribute:!1})],p.prototype,"filterFunction",void 0),t([o({attribute:!1})],p.prototype,"renderItemFunction",void 0),_export("N",p=t([l("nile-chip")],p));}};});
|
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"],function(_export,_context){"use strict";var t,e,i,s,o,l,h,r,n,a,_templateObject,_templateObject2,_templateObject3,_templateObject4,p;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}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){e=_lit.html;},function(_litDecoratorsJs){i=_litDecoratorsJs.state;s=_litDecoratorsJs.query;o=_litDecoratorsJs.property;l=_litDecoratorsJs.customElement;},function(_nileChipCssCjsJs){h=_nileChipCssCjsJs.s;},function(_litDirectivesClassMapJs){r=_litDirectivesClassMapJs.classMap;},function(_internalSlotCjsJs){n=_internalSlotCjsJs.H;},function(_internalNileElementCjsJs){a=_internalNileElementCjsJs.N;}],execute:function execute(){_export("N",p=/*#__PURE__*/function(_a){function p(){var _this;_classCallCheck(this,p);_this=_callSuper(this,p,arguments),_this.hasSlotController=new n(_assertThisInitialized(_this),"help-text","label"),_this.tags=[],_this.inputValue="",_this.isDropdownOpen=!1,_this.warning=!1,_this.error=!1,_this.success=!1,_this.noDuplicates=!1,_this.label="",_this.acceptUserInput=!1,_this.clearable=!1,_this.placeholder="type here...",_this.readonly=!1,_this.disabled=!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,e){return t.toLowerCase().includes(e.toLowerCase());},_this.renderItemFunction=function(t){return t;};return _this;}_inherits(p,_a);return _createClass(p,[{key:"updated",value:function updated(t){var _this2=this;_superPropGet(p,"updated",this,3)([t]),t.has("autoCompleteOptions")&&(this.filteredAutoCompleteOptions=_toConsumableArray(this.autoCompleteOptions),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:"connectedCallback",value:function connectedCallback(){var _this3=this;_superPropGet(p,"connectedCallback",this,3)([]),this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter(function(t){return!_this3.value.includes(t);})),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_superPropGet(p,"disconnectedCallback",this,3)([]),this.emit("nile-destroy");}},{key:"render",value:function render(){var _this4=this;var t=this.hasSlotController.test("label");this.hasSlotController.test("help-text");var i=!!this.label||!!t,s=!!this.helpText,o=!!this.errorMessage;return e(_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 class=","\n >\n ","\n <div class=\"nile-chip__auto-complete\">\n <nile-auto-complete\n .enableVirtualScroll=","\n .allMenuItems=","\n .filterFunction=","\n .renderItemFunction=","\n .loading=\"","\"\n .value=","\n ?isDropdownOpen=","\n .noBorder=","\n openOnFocus\n exportparts=\"options__wrapper\"\n .placeholder=","\n @nile-input=","\n @keydown=","\n @nile-focus=","\n @nile-complete=","\n ></nile-auto-complete>\n </div>\n <slot\n name=\"help-text\"\n part=\"form-control-help-text\"\n id=\"help-text\"\n class=\"form-control__help-text\"\n aria-hidden=","\n >\n ","\n </slot>\n </div>\n ","\n\n ","\n </div>\n "])),r({"form-control":!0,"form-control--medium":!0,"form-control--has-label":i,"form-control--has-help-text":s,"nile-chip--disabled":this.disabled}),i?"false":"true",this.label,r({"nile-chip":!0,"nile-chip--warning":this.warning,"nile-chip--error":this.error,"nile-chip--success":this.success,"nile-chip--no-wrap":this.noWrap}),this.tags.map(function(t,i){return e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-tag\n class=","\n .variant=","\n @nile-remove=","\n removable\n pill\n >\n ","\n </nile-tag>\n "])),r({"nile-chip__tags":!0}),_this4.errorIndexes.includes(i)?"error":"normal",function(){return _this4.handleRemove(t);},t);}),this.enableVirtualScroll,this.filteredAutoCompleteOptions,this.filterFunction,this.renderItemFunction,this.loading,this.inputValue,this.isDropdownOpen,!0,this.placeholder,this.handleInputChange,this.handleInputKeydown,this.handleFocus,this.handleSelect,s?"false":"true",this.helpText,s?e(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-form-help-text>","</nile-form-help-text>\n "])),this.helpText):"",o?e(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-form-error-message\n >","</nile-form-error-message\n >\n "])),this.errorMessage):"");}},{key:"handleSelect",value:function handleSelect(t){this.noDuplicates&&this.tags.includes(t.detail.value)||(this.tags=[].concat(_toConsumableArray(this.tags),[t.detail.value]),this.emit("nile-chip-change",{value:this.tags}),this.resetInput());}},{key:"handleRemove",value:function handleRemove(t){this.tags=this.tags.filter(function(e){return e!==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:"handleInputKeydown",value:function handleInputKeydown(t){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.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(){this.isDropdownOpen=!0;}},{key:"onTagsChanged",value:function onTagsChanged(){var _this5=this;this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter(function(t){return!_this5.tags.includes(t);}));}},{key:"resetInput",value:function resetInput(){this.inputValue="",this.isDropdownOpen=!1,this.autoComplete.value="",this.autoComplete.handleFocus();}}],[{key:"styles",get:function get(){return[h];}}]);}(a));t([i()],p.prototype,"tags",void 0),t([i()],p.prototype,"inputValue",void 0),t([i()],p.prototype,"isDropdownOpen",void 0),t([s("nile-auto-complete")],p.prototype,"autoComplete",void 0),t([o({type:Boolean})],p.prototype,"warning",void 0),t([o({type:Boolean})],p.prototype,"error",void 0),t([o({type:Boolean})],p.prototype,"success",void 0),t([o({type:Boolean})],p.prototype,"noDuplicates",void 0),t([o()],p.prototype,"label",void 0),t([o({type:Boolean})],p.prototype,"acceptUserInput",void 0),t([o({type:Boolean})],p.prototype,"clearable",void 0),t([o()],p.prototype,"placeholder",void 0),t([o({type:Boolean,reflect:!0})],p.prototype,"readonly",void 0),t([o({type:Boolean,reflect:!0})],p.prototype,"disabled",void 0),t([o({type:Boolean})],p.prototype,"enableVirtualScroll",void 0),t([o({type:Array})],p.prototype,"autoCompleteOptions",void 0),t([o({type:Array})],p.prototype,"filteredAutoCompleteOptions",void 0),t([o({type:Array})],p.prototype,"value",void 0),t([o({type:Boolean})],p.prototype,"noWrap",void 0),t([o({type:Boolean})],p.prototype,"loading",void 0),t([o({type:Array})],p.prototype,"errorIndexes",void 0),t([o({attribute:"help-text",reflect:!0})],p.prototype,"helpText",void 0),t([o({attribute:"error-message",reflect:!0})],p.prototype,"errorMessage",void 0),t([o({attribute:!1})],p.prototype,"filterFunction",void 0),t([o({attribute:!1})],p.prototype,"renderItemFunction",void 0),_export("N",p=t([l("nile-chip")],p));}};});
|
2
2
|
//# sourceMappingURL=nile-chip.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-chip.cjs.js","sources":["../../../src/nile-chip/nile-chip.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n PropertyValues,\n} from 'lit';\nimport { customElement, query, state, property } from 'lit/decorators.js';\nimport { styles } from './nile-chip.css';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { HasSlotController } from '../internal/slot';\nimport NileElement, { NileFormControl } from '../internal/nile-element';\n\ninterface CustomEventDetail {\n value: string;\n}\n\n@customElement('nile-chip')\nexport class NileChip extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private readonly hasSlotController = new HasSlotController(\n this,\n 'help-text',\n 'label'\n );\n\n @state() tags: string[] = [];\n\n @state() inputValue: string = '';\n\n @state() isDropdownOpen: boolean = false;\n\n @query('nile-auto-complete') autoComplete!: any;\n\n /** Sets the input to a warning state, changing its visual appearance. */\n @property({ type: Boolean }) warning = false;\n\n /** Sets the input to an error state, changing its visual appearance. */\n @property({ type: Boolean }) error = false;\n\n /** Sets the input to a success state, changing its visual appearance. */\n @property({ type: Boolean }) success = false;\n\n /** Disables the duplicate entries. */\n @property({ type: Boolean }) noDuplicates = false;\n\n /** The input's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) acceptUserInput = false;\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) clearable = false;\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = 'type here...';\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /** Disables the input. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n // Auto-complete options\n @property({ type: Array }) autoCompleteOptions: any[] = [];\n\n @property({ type: Array }) filteredAutoCompleteOptions: any[] = [];\n\n @property({ type: Array }) value: any[] = [];\n\n @property({ type: Boolean }) noWrap: boolean = false;\n\n @property({ type: Boolean }) loading: boolean = false;\n\n @property({ type: Array }) errorIndexes: number[] = [];\n\n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n\n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n\n @property({ attribute:false}) filterFunction: any = (item:string,searchedValue:string)=>item.toLowerCase().includes(searchedValue.toLowerCase());\n\n @property({ attribute:false}) renderItemFunction: any = (item:any)=>item;\n\n protected updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties);\n if (changedProperties.has('autoCompleteOptions')) {\n this.filteredAutoCompleteOptions = [...this.autoCompleteOptions];\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.value.includes(option)\n );\n }\n }\n if (changedProperties.has('value')){\n this.tags = [...this.value];\n this.onTagsChanged();\n }\n if (changedProperties.has('tags')){\n this.onTagsChanged();\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.value.includes(option)\n );\n }\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n render() {\n // Check if slots are present\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n\n // Check if label and help text are present\n const hasLabel = this.label ? true : !!hasLabelSlot;\n\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n\n return html`\n <div\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--medium': true,\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n 'nile-chip--disabled': this.disabled,\n })}\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n <div\n class=${classMap({\n 'nile-chip': true,\n 'nile-chip--warning': this.warning,\n 'nile-chip--error': this.error,\n 'nile-chip--success': this.success,\n 'nile-chip--no-wrap': this.noWrap,\n })}\n >\n ${this.tags.map(\n (tag, index) => html`\n <nile-tag\n class=${classMap({\n 'nile-chip__tags': true,\n })}\n .variant=${this.errorIndexes.includes(index) ? 'error' : 'normal'}\n @nile-remove=${() => this.handleRemove(tag)}\n removable\n pill\n >\n ${tag}\n </nile-tag>\n `\n )}\n <div class=\"nile-chip__auto-complete\">\n <nile-auto-complete\n .allMenuItems=${this.filteredAutoCompleteOptions}\n .filterFunction=${this.filterFunction}\n .renderItemFunction=${this.renderItemFunction}\n .loading=\"${this.loading}\"\n .value=${this.inputValue}\n ?isDropdownOpen=${this.isDropdownOpen}\n .noBorder=${true}\n openOnFocus\n exportparts=\"options__wrapper\"\n .placeholder=${this.placeholder}\n @nile-input=${this.handleInputChange}\n @keydown=${this.handleInputKeydown}\n @nile-focus=${this.handleFocus}\n @nile-complete=${this.handleSelect}\n ></nile-auto-complete>\n </div>\n <slot\n name=\"help-text\"\n part=\"form-control-help-text\"\n id=\"help-text\"\n class=\"form-control__help-text\"\n aria-hidden=${hasHelpText ? 'false' : 'true'}\n >\n ${this.helpText}\n </slot>\n </div>\n ${\n hasHelpText\n ? html`\n <nile-form-help-text>${this.helpText}</nile-form-help-text>\n `\n : ``\n }\n\n ${\n hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``\n }\n </div>\n `;\n }\n\n private handleSelect(event: CustomEvent<CustomEventDetail>) {\n // Add the selected value to the tags array only if it doesn't already exist\n if (!this.noDuplicates || !this.tags.includes(event.detail.value)) {\n this.tags = [...this.tags, event.detail.value];\n this.emit('nile-chip-change', { value: this.tags });\n this.resetInput();\n }\n }\n\n private handleRemove(value: string) {\n // Remove the tag from the tags array\n this.tags = this.tags.filter(tag => tag !== value);\n\n if (this.noDuplicates && this.autoCompleteOptions.includes(value)) {\n this.filteredAutoCompleteOptions = [\n ...this.filteredAutoCompleteOptions,\n value,\n ];\n }\n this.emit('nile-chip-change', { value: this.tags });\n }\n\n private handleInputChange(event: CustomEvent<CustomEventDetail>) {\n // Update the input value\n this.inputValue = event.detail.value;\n }\n\n private handleInputKeydown(event: KeyboardEvent) {\n if (!this.acceptUserInput) {\n return;\n }\n\n if(event.key === 'Tab'){\n event.preventDefault()\n }\n \n if (\n (event.key === 'Enter' || event.key === 'Tab' ) \n && this.inputValue \n && (!this.noDuplicates || !this.tags.includes(this.inputValue))\n ) {\n event.preventDefault()\n this.tags = [...this.tags, this.inputValue];\n this.resetInput();\n this.emit('nile-chip-change', { value: this.tags });\n }\n\n if(\n (event.key === 'Enter'|| event.key === 'Tab' ) \n && this.inputValue \n && (this.noDuplicates || this.tags.includes(this.inputValue))\n ){\n this.emit('nile-duplicates-blocked');\n }\n }\n\n private handleFocus() {\n this.isDropdownOpen = true;\n }\n\n onTagsChanged() {\n if (this.noDuplicates)\n this.filteredAutoCompleteOptions = this.filteredAutoCompleteOptions.filter(option => !this.tags.includes(option));\n }\n\n\n private resetInput() {\n // Reset the input-related properties\n this.inputValue = '';\n this.isDropdownOpen = false;\n this.autoComplete.value = '';\n this.autoComplete.handleFocus();\n }\n}\n\nexport default NileChip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-chip': NileChip;\n }\n}\n"],"names":["NileChip","p","constructor","this","hasSlotController","HasSlotController","tags","inputValue","isDropdownOpen","warning","error","success","noDuplicates","label","acceptUserInput","clearable","placeholder","readonly","disabled","autoCompleteOptions","filteredAutoCompleteOptions","value","noWrap","loading","errorIndexes","helpText","errorMessage","filterFunction","item","searchedValue","toLowerCase","includes","renderItemFunction","_this","_inherits","_a","_createClass","key","updated","changedProperties","super","has","filter","option","onTagsChanged","connectedCallback","emit","disconnectedCallback","render","hasLabelSlot","test","hasLabel","hasHelpText","hasErrorMessage","html","_templateObject","_taggedTemplateLiteral","classMap","map","tag","index","_templateObject2","handleRemove","handleInputChange","handleInputKeydown","handleFocus","handleSelect","_templateObject3","_templateObject4","event","detail","resetInput","concat","_toConsumableArray","preventDefault","autoComplete","__decorate","get","styles","NileElement","state","prototype","query","property","type","Boolean","reflect","Array","attribute","_export","customElement"],"mappings":"63JAyBaA,4BAAN,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCAKYC,KAAAA,CAAiBC,iBAAG,CAAA,GAAIC,CAAAA,gCAEvC,WAAA,CACA,SAGOF,KAAAA,CAAIG,IAAAA,CAAa,EAEjBH,CAAAA,KAAAA,CAAUI,UAAW,CAAA,EAAA,CAErBJ,KAAAA,CAAcK,cAAY,CAAA,CAAA,CAAA,CAKNL,KAAAA,CAAOM,OAAAA,CAAAA,CAAG,CAGVN,CAAAA,KAAAA,CAAKO,OAAG,CAGRP,CAAAA,KAAAA,CAAOQ,OAAG,CAAA,CAAA,CAAA,CAGVR,KAAAA,CAAYS,YAAAA,CAAAA,CAAG,EAGhCT,KAAAA,CAAKU,KAAAA,CAAG,GAGSV,KAAAA,CAAeW,eAAAA,CAAAA,CAAG,EAGlBX,KAAAA,CAASY,SAAAA,CAAAA,CAAG,CAG7BZ,CAAAA,KAAAA,CAAWa,WAAG,CAAA,cAAA,CAGkBb,KAAAA,CAAQc,QAAG,CAAA,CAAA,CAAA,CAGXd,KAAAA,CAAQe,QAAG,CAAA,CAAA,CAAA,CAG5Bf,KAAAA,CAAmBgB,mBAAU,CAAA,EAAA,CAE7BhB,KAAAA,CAA2BiB,2BAAAA,CAAU,EAErCjB,CAAAA,KAAAA,CAAKkB,MAAU,EAEblB,CAAAA,KAAAA,CAAMmB,QAAY,CAElBnB,CAAAA,KAAAA,CAAOoB,SAAY,CAErBpB,CAAAA,KAAAA,CAAYqB,YAAa,CAAA,EAAA,CAECrB,KAAAA,CAAQsB,QAAAA,CAAG,GAEPtB,KAAAA,CAAYuB,YAAAA,CAAG,EAE1CvB,CAAAA,KAAAA,CAAcwB,cAAQ,CAAA,SAACC,EAAYC,CAAuBD,QAAAA,CAAAA,CAAAA,CAAKE,WAAcC,CAAAA,CAAAA,CAAAA,QA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C,OAAoCrF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAiF,UAAA,SAAA,CAAA,IAAA,EAAA,CAAA,CAE3BL,EAAA,CAA1BO,CAAAA,CAAS,CAAEC,IAAMG,CAAAA,KAAAA,CAAAA,CAAAA,CAAAA,CAAqCvF,CAAAiF,CAAAA,SAAAA,CAAA,cAAA,CAAA,IAAA,EAAA,CAAA,CAEFL,EAAA,CAApDO,CAAAA,CAAS,CAAEK,SAAW,CAAA,WAAA,CAAaF,SAAS,CAAsBtF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAiF,UAAA,UAAA,CAAA,IAAA,EAAA,CAAA,CAEVL,EAAA,CAAxDO,CAAAA,CAAS,CAAEK,SAAW,CAAA,eAAA,CAAiBF,SAAS,CAA0BtF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAiF,SAAA,CAAA,cAAA,CAAA,IAAA,EAE7CL,CAAAA,CAAAA,CAAAA,CAAA,CAA7BO,CAAS,CAAA,CAAEK,WAAU,CAA2HxF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAiF,UAAA,gBAAA,CAAA,IAAA,EAAA,CAAA,CAEnHL,CAAA,CAAA,CAA7BO,CAAS,CAAA,CAAEK,WAAU,CAAmDxF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAiF,UAAA,oBAAA,CAAA,IAAA,EAAA,CAAA,CAAAQ,OAAA,KApE9DzF,EAAQ4E,CAAA,CAAA,CADpBc,CAAc,CAAA,WAAA,CAAA,CAAA,CACF1F"}
|
1
|
+
{"version":3,"file":"nile-chip.cjs.js","sources":["../../../src/nile-chip/nile-chip.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n PropertyValues,\n} from 'lit';\nimport { customElement, query, state, property } from 'lit/decorators.js';\nimport { styles } from './nile-chip.css';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { HasSlotController } from '../internal/slot';\nimport NileElement, { NileFormControl } from '../internal/nile-element';\n\ninterface CustomEventDetail {\n value: string;\n}\n\n@customElement('nile-chip')\nexport class NileChip extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private readonly hasSlotController = new HasSlotController(\n this,\n 'help-text',\n 'label'\n );\n\n @state() tags: string[] = [];\n\n @state() inputValue: string = '';\n\n @state() isDropdownOpen: boolean = false;\n\n @query('nile-auto-complete') autoComplete!: any;\n\n /** Sets the input to a warning state, changing its visual appearance. */\n @property({ type: Boolean }) warning = false;\n\n /** Sets the input to an error state, changing its visual appearance. */\n @property({ type: Boolean }) error = false;\n\n /** Sets the input to a success state, changing its visual appearance. */\n @property({ type: Boolean }) success = false;\n\n /** Disables the duplicate entries. */\n @property({ type: Boolean }) noDuplicates = false;\n\n /** The input's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) acceptUserInput = false;\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) clearable = false;\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = 'type here...';\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /** Disables the input. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n // AUTO-COMPLETE-OPTIONS\n\n /** Virtual scroll in dropdown options. */\n @property({ type: Boolean }) enableVirtualScroll = false;\n\n @property({ type: Array }) autoCompleteOptions: any[] = [];\n\n @property({ type: Array }) filteredAutoCompleteOptions: any[] = [];\n\n @property({ type: Array }) value: any[] = [];\n\n @property({ type: Boolean }) noWrap: boolean = false;\n\n @property({ type: Boolean }) loading: boolean = false;\n\n @property({ type: Array }) errorIndexes: number[] = [];\n\n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n\n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n\n @property({ attribute:false}) filterFunction: any = (item:string,searchedValue:string)=>item.toLowerCase().includes(searchedValue.toLowerCase());\n\n @property({ attribute:false}) renderItemFunction: any = (item:any)=>item;\n\n protected updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties);\n if (changedProperties.has('autoCompleteOptions')) {\n this.filteredAutoCompleteOptions = [...this.autoCompleteOptions];\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.value.includes(option)\n );\n }\n }\n if (changedProperties.has('value')){\n this.tags = [...this.value];\n this.onTagsChanged();\n }\n if (changedProperties.has('tags')){\n this.onTagsChanged();\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.value.includes(option)\n );\n }\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n render() {\n // Check if slots are present\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n\n // Check if label and help text are present\n const hasLabel = this.label ? true : !!hasLabelSlot;\n\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n\n return html`\n <div\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--medium': true,\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n 'nile-chip--disabled': this.disabled,\n })}\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n <div\n class=${classMap({\n 'nile-chip': true,\n 'nile-chip--warning': this.warning,\n 'nile-chip--error': this.error,\n 'nile-chip--success': this.success,\n 'nile-chip--no-wrap': this.noWrap,\n })}\n >\n ${this.tags.map(\n (tag, index) => html`\n <nile-tag\n class=${classMap({\n 'nile-chip__tags': true,\n })}\n .variant=${this.errorIndexes.includes(index) ? 'error' : 'normal'}\n @nile-remove=${() => this.handleRemove(tag)}\n removable\n pill\n >\n ${tag}\n </nile-tag>\n `\n )}\n <div class=\"nile-chip__auto-complete\">\n <nile-auto-complete\n .enableVirtualScroll=${this.enableVirtualScroll}\n .allMenuItems=${this.filteredAutoCompleteOptions}\n .filterFunction=${this.filterFunction}\n .renderItemFunction=${this.renderItemFunction}\n .loading=\"${this.loading}\"\n .value=${this.inputValue}\n ?isDropdownOpen=${this.isDropdownOpen}\n .noBorder=${true}\n openOnFocus\n exportparts=\"options__wrapper\"\n .placeholder=${this.placeholder}\n @nile-input=${this.handleInputChange}\n @keydown=${this.handleInputKeydown}\n @nile-focus=${this.handleFocus}\n @nile-complete=${this.handleSelect}\n ></nile-auto-complete>\n </div>\n <slot\n name=\"help-text\"\n part=\"form-control-help-text\"\n id=\"help-text\"\n class=\"form-control__help-text\"\n aria-hidden=${hasHelpText ? 'false' : 'true'}\n >\n ${this.helpText}\n </slot>\n </div>\n ${\n hasHelpText\n ? html`\n <nile-form-help-text>${this.helpText}</nile-form-help-text>\n `\n : ``\n }\n\n ${\n hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``\n }\n </div>\n `;\n }\n\n private handleSelect(event: CustomEvent<CustomEventDetail>) {\n // Add the selected value to the tags array only if it doesn't already exist\n if (!this.noDuplicates || !this.tags.includes(event.detail.value)) {\n this.tags = [...this.tags, event.detail.value];\n this.emit('nile-chip-change', { value: this.tags });\n this.resetInput();\n }\n }\n\n private handleRemove(value: string) {\n // Remove the tag from the tags array\n this.tags = this.tags.filter(tag => tag !== value);\n\n if (this.noDuplicates && this.autoCompleteOptions.includes(value)) {\n this.filteredAutoCompleteOptions = [\n ...this.filteredAutoCompleteOptions,\n value,\n ];\n }\n this.emit('nile-chip-change', { value: this.tags });\n }\n\n private handleInputChange(event: CustomEvent<CustomEventDetail>) {\n // Update the input value\n this.inputValue = event.detail.value;\n }\n\n private handleInputKeydown(event: KeyboardEvent) {\n if (!this.acceptUserInput) {\n return;\n }\n\n if(event.key === 'Tab'){\n event.preventDefault()\n }\n \n if (\n (event.key === 'Enter' || event.key === 'Tab' ) \n && this.inputValue \n && (!this.noDuplicates || !this.tags.includes(this.inputValue))\n ) {\n event.preventDefault()\n this.tags = [...this.tags, this.inputValue];\n this.resetInput();\n this.emit('nile-chip-change', { value: this.tags });\n }\n\n if(\n (event.key === 'Enter'|| event.key === 'Tab' ) \n && this.inputValue \n && (this.noDuplicates || this.tags.includes(this.inputValue))\n ){\n this.emit('nile-duplicates-blocked');\n }\n }\n\n private handleFocus() {\n this.isDropdownOpen = true;\n }\n\n onTagsChanged() {\n if (this.noDuplicates)\n this.filteredAutoCompleteOptions = this.filteredAutoCompleteOptions.filter(option => !this.tags.includes(option));\n }\n\n\n private resetInput() {\n // Reset the input-related properties\n this.inputValue = '';\n this.isDropdownOpen = false;\n this.autoComplete.value = '';\n this.autoComplete.handleFocus();\n }\n}\n\nexport default NileChip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-chip': NileChip;\n }\n}\n"],"names":["NileChip","p","this","hasSlotController","HasSlotController","tags","inputValue","isDropdownOpen","warning","error","success","noDuplicates","label","acceptUserInput","clearable","placeholder","readonly","disabled","enableVirtualScroll","autoCompleteOptions","filteredAutoCompleteOptions","value","noWrap","loading","errorIndexes","helpText","errorMessage","filterFunction","item","searchedValue","toLowerCase","includes","renderItemFunction","_this","_inherits","_a","_createClass","key","updated","changedProperties","super","has","filter","option","onTagsChanged","connectedCallback","emit","disconnectedCallback","render","hasLabelSlot","test","hasLabel","hasHelpText","hasErrorMessage","html","_templateObject","_taggedTemplateLiteral","classMap","map","tag","index","_templateObject2","handleRemove","handleInputChange","handleInputKeydown","handleFocus","handleSelect","_templateObject3","_templateObject4","event","detail","concat","_toConsumableArray","resetInput","preventDefault","autoComplete","get","styles","NileElement","__decorate","state","prototype","query","property","type","Boolean","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e}from"lit";import{state as i,query as s,property as o,customElement as l}from"lit/decorators.js";import{s as h}from"./nile-chip.css.esm.js";import{classMap as r}from"lit/directives/class-map.js";import{H as n}from"../internal/slot.esm.js";import{N as a}from"../internal/nile-element.esm.js";let p=class extends a{constructor(){super(...arguments),this.hasSlotController=new n(this,"help-text","label"),this.tags=[],this.inputValue="",this.isDropdownOpen=!1,this.warning=!1,this.error=!1,this.success=!1,this.noDuplicates=!1,this.label="",this.acceptUserInput=!1,this.clearable=!1,this.placeholder="type here...",this.readonly=!1,this.disabled=!1,this.autoCompleteOptions=[],this.filteredAutoCompleteOptions=[],this.value=[],this.noWrap=!1,this.loading=!1,this.errorIndexes=[],this.helpText="",this.errorMessage="",this.filterFunction=(t,e)=>t.toLowerCase().includes(e.toLowerCase()),this.renderItemFunction=t=>t}static get styles(){return[h]}updated(t){super.updated(t),t.has("autoCompleteOptions")&&(this.filteredAutoCompleteOptions=[...this.autoCompleteOptions],this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter((t=>!this.value.includes(t))))),t.has("value")&&(this.tags=[...this.value],this.onTagsChanged()),t.has("tags")&&this.onTagsChanged()}connectedCallback(){super.connectedCallback(),this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter((t=>!this.value.includes(t)))),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}render(){const t=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const i=!!this.label||!!t,s=!!this.helpText,o=!!this.errorMessage;return e`
|
1
|
+
import{__decorate as t}from"tslib";import{html as e}from"lit";import{state as i,query as s,property as o,customElement as l}from"lit/decorators.js";import{s as h}from"./nile-chip.css.esm.js";import{classMap as r}from"lit/directives/class-map.js";import{H as n}from"../internal/slot.esm.js";import{N as a}from"../internal/nile-element.esm.js";let p=class extends a{constructor(){super(...arguments),this.hasSlotController=new n(this,"help-text","label"),this.tags=[],this.inputValue="",this.isDropdownOpen=!1,this.warning=!1,this.error=!1,this.success=!1,this.noDuplicates=!1,this.label="",this.acceptUserInput=!1,this.clearable=!1,this.placeholder="type here...",this.readonly=!1,this.disabled=!1,this.enableVirtualScroll=!1,this.autoCompleteOptions=[],this.filteredAutoCompleteOptions=[],this.value=[],this.noWrap=!1,this.loading=!1,this.errorIndexes=[],this.helpText="",this.errorMessage="",this.filterFunction=(t,e)=>t.toLowerCase().includes(e.toLowerCase()),this.renderItemFunction=t=>t}static get styles(){return[h]}updated(t){super.updated(t),t.has("autoCompleteOptions")&&(this.filteredAutoCompleteOptions=[...this.autoCompleteOptions],this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter((t=>!this.value.includes(t))))),t.has("value")&&(this.tags=[...this.value],this.onTagsChanged()),t.has("tags")&&this.onTagsChanged()}connectedCallback(){super.connectedCallback(),this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter((t=>!this.value.includes(t)))),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}render(){const t=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const i=!!this.label||!!t,s=!!this.helpText,o=!!this.errorMessage;return e`
|
2
2
|
<div
|
3
3
|
part="form-control"
|
4
4
|
class=${r({"form-control":!0,"form-control--medium":!0,"form-control--has-label":i,"form-control--has-help-text":s,"nile-chip--disabled":this.disabled})}
|
@@ -28,6 +28,7 @@ import{__decorate as t}from"tslib";import{html as e}from"lit";import{state as i,
|
|
28
28
|
`))}
|
29
29
|
<div class="nile-chip__auto-complete">
|
30
30
|
<nile-auto-complete
|
31
|
+
.enableVirtualScroll=${this.enableVirtualScroll}
|
31
32
|
.allMenuItems=${this.filteredAutoCompleteOptions}
|
32
33
|
.filterFunction=${this.filterFunction}
|
33
34
|
.renderItemFunction=${this.renderItemFunction}
|
@@ -64,4 +65,4 @@ import{__decorate as t}from"tslib";import{html as e}from"lit";import{state as i,
|
|
64
65
|
>
|
65
66
|
`:""}
|
66
67
|
</div>
|
67
|
-
`}handleSelect(t){this.noDuplicates&&this.tags.includes(t.detail.value)||(this.tags=[...this.tags,t.detail.value],this.emit("nile-chip-change",{value:this.tags}),this.resetInput())}handleRemove(t){this.tags=this.tags.filter((e=>e!==t)),this.noDuplicates&&this.autoCompleteOptions.includes(t)&&(this.filteredAutoCompleteOptions=[...this.filteredAutoCompleteOptions,t]),this.emit("nile-chip-change",{value:this.tags})}handleInputChange(t){this.inputValue=t.detail.value}handleInputKeydown(t){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=[...this.tags,this.inputValue],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"))}handleFocus(){this.isDropdownOpen=!0}onTagsChanged(){this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter((t=>!this.tags.includes(t))))}resetInput(){this.inputValue="",this.isDropdownOpen=!1,this.autoComplete.value="",this.autoComplete.handleFocus()}};t([i()],p.prototype,"tags",void 0),t([i()],p.prototype,"inputValue",void 0),t([i()],p.prototype,"isDropdownOpen",void 0),t([s("nile-auto-complete")],p.prototype,"autoComplete",void 0),t([o({type:Boolean})],p.prototype,"warning",void 0),t([o({type:Boolean})],p.prototype,"error",void 0),t([o({type:Boolean})],p.prototype,"success",void 0),t([o({type:Boolean})],p.prototype,"noDuplicates",void 0),t([o()],p.prototype,"label",void 0),t([o({type:Boolean})],p.prototype,"acceptUserInput",void 0),t([o({type:Boolean})],p.prototype,"clearable",void 0),t([o()],p.prototype,"placeholder",void 0),t([o({type:Boolean,reflect:!0})],p.prototype,"readonly",void 0),t([o({type:Boolean,reflect:!0})],p.prototype,"disabled",void 0),t([o({type:Array})],p.prototype,"autoCompleteOptions",void 0),t([o({type:Array})],p.prototype,"filteredAutoCompleteOptions",void 0),t([o({type:Array})],p.prototype,"value",void 0),t([o({type:Boolean})],p.prototype,"noWrap",void 0),t([o({type:Boolean})],p.prototype,"loading",void 0),t([o({type:Array})],p.prototype,"errorIndexes",void 0),t([o({attribute:"help-text",reflect:!0})],p.prototype,"helpText",void 0),t([o({attribute:"error-message",reflect:!0})],p.prototype,"errorMessage",void 0),t([o({attribute:!1})],p.prototype,"filterFunction",void 0),t([o({attribute:!1})],p.prototype,"renderItemFunction",void 0),p=t([l("nile-chip")],p);export{p as N};
|
68
|
+
`}handleSelect(t){this.noDuplicates&&this.tags.includes(t.detail.value)||(this.tags=[...this.tags,t.detail.value],this.emit("nile-chip-change",{value:this.tags}),this.resetInput())}handleRemove(t){this.tags=this.tags.filter((e=>e!==t)),this.noDuplicates&&this.autoCompleteOptions.includes(t)&&(this.filteredAutoCompleteOptions=[...this.filteredAutoCompleteOptions,t]),this.emit("nile-chip-change",{value:this.tags})}handleInputChange(t){this.inputValue=t.detail.value}handleInputKeydown(t){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=[...this.tags,this.inputValue],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"))}handleFocus(){this.isDropdownOpen=!0}onTagsChanged(){this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter((t=>!this.tags.includes(t))))}resetInput(){this.inputValue="",this.isDropdownOpen=!1,this.autoComplete.value="",this.autoComplete.handleFocus()}};t([i()],p.prototype,"tags",void 0),t([i()],p.prototype,"inputValue",void 0),t([i()],p.prototype,"isDropdownOpen",void 0),t([s("nile-auto-complete")],p.prototype,"autoComplete",void 0),t([o({type:Boolean})],p.prototype,"warning",void 0),t([o({type:Boolean})],p.prototype,"error",void 0),t([o({type:Boolean})],p.prototype,"success",void 0),t([o({type:Boolean})],p.prototype,"noDuplicates",void 0),t([o()],p.prototype,"label",void 0),t([o({type:Boolean})],p.prototype,"acceptUserInput",void 0),t([o({type:Boolean})],p.prototype,"clearable",void 0),t([o()],p.prototype,"placeholder",void 0),t([o({type:Boolean,reflect:!0})],p.prototype,"readonly",void 0),t([o({type:Boolean,reflect:!0})],p.prototype,"disabled",void 0),t([o({type:Boolean})],p.prototype,"enableVirtualScroll",void 0),t([o({type:Array})],p.prototype,"autoCompleteOptions",void 0),t([o({type:Array})],p.prototype,"filteredAutoCompleteOptions",void 0),t([o({type:Array})],p.prototype,"value",void 0),t([o({type:Boolean})],p.prototype,"noWrap",void 0),t([o({type:Boolean})],p.prototype,"loading",void 0),t([o({type:Array})],p.prototype,"errorIndexes",void 0),t([o({attribute:"help-text",reflect:!0})],p.prototype,"helpText",void 0),t([o({attribute:"error-message",reflect:!0})],p.prototype,"errorMessage",void 0),t([o({attribute:!1})],p.prototype,"filterFunction",void 0),t([o({attribute:!1})],p.prototype,"renderItemFunction",void 0),p=t([l("nile-chip")],p);export{p as N};
|