@aquera/nile-elements 1.4.4-beta-1.0 → 1.4.4-beta-1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/demo/index.html +31 -65
- package/demo/nxtgen.css +1 -0
- package/dist/axe.min-140df6c2.cjs.js +2 -0
- package/dist/axe.min-140df6c2.cjs.js.map +1 -0
- package/dist/axe.min-591c52c3.esm.js +1 -0
- package/dist/{fixture-54600b35.cjs.js → fixture-1c49c014.cjs.js} +2 -2
- package/dist/{fixture-73855806.cjs.js.map → fixture-1c49c014.cjs.js.map} +1 -1
- package/dist/{fixture-9871e8a9.esm.js → fixture-985bba12.esm.js} +1 -1
- package/dist/{fixture-73855806.cjs.js → fixture-dff65c89.cjs.js} +2 -2
- package/dist/{fixture-54600b35.cjs.js.map → fixture-dff65c89.cjs.js.map} +1 -1
- package/dist/{fixture-cf7bfcf5.esm.js → fixture-eddab1c0.esm.js} +2 -2
- package/dist/{fixture-5b79f853.cjs.js → fixture-f575d0df.cjs.js} +4 -4
- package/dist/fixture-f575d0df.cjs.js.map +1 -0
- package/dist/floating-ui.dom-70d5643f.esm.js +1 -0
- package/dist/floating-ui.dom-f19772dc.cjs.js +2 -0
- package/dist/floating-ui.dom-f19772dc.cjs.js.map +1 -0
- package/dist/flow-3e83b6f4.esm.js +17 -0
- package/dist/flow-ca47f938.cjs.js +14 -0
- package/dist/flow-ca47f938.cjs.js.map +1 -0
- package/dist/index.js +5 -3
- package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
- package/dist/nile-accordion/nile-accordian.test.esm.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
- package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
- package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
- package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
- package/dist/nile-badge/nile-badge.test.esm.js +1 -1
- package/dist/nile-button/nile-button.test.cjs.js +1 -1
- package/dist/nile-button/nile-button.test.esm.js +1 -1
- package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
- package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +1 -1
- package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
- package/dist/nile-card/nile-card.test.cjs.js +1 -1
- package/dist/nile-card/nile-card.test.esm.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
- 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 +11 -9
- package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.test.esm.js +1 -1
- package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
- package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.test.esm.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
- package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
- package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.test.cjs.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.test.esm.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.test.cjs.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.test.esm.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +1 -1
- package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
- package/dist/nile-form-group/nile-form-group.test.esm.js +1 -1
- package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
- package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -1
- package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
- package/dist/nile-hero/nile-hero.test.esm.js +1 -1
- package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
- package/dist/nile-icon/nile-icon.test.esm.js +1 -1
- package/dist/nile-input/nile-input.test.cjs.js +1 -1
- package/dist/nile-input/nile-input.test.esm.js +1 -1
- package/dist/nile-light-tooltip/index.cjs.js +2 -0
- package/dist/nile-light-tooltip/index.esm.js +1 -0
- package/dist/nile-light-tooltip/nile-light-tooltip.cjs.js +2 -0
- package/dist/nile-light-tooltip/nile-light-tooltip.cjs.js.map +1 -0
- package/dist/nile-light-tooltip/nile-light-tooltip.css.cjs.js +2 -0
- package/dist/nile-light-tooltip/nile-light-tooltip.css.cjs.js.map +1 -0
- package/dist/nile-light-tooltip/nile-light-tooltip.css.esm.js +5 -0
- package/dist/nile-light-tooltip/nile-light-tooltip.esm.js +1 -0
- package/dist/nile-light-tooltip/utils.cjs.js +2 -0
- package/dist/nile-light-tooltip/utils.cjs.js.map +1 -0
- package/dist/nile-light-tooltip/utils.esm.js +1 -0
- package/dist/nile-link/nile-link.test.cjs.js +1 -1
- package/dist/nile-link/nile-link.test.esm.js +1 -1
- package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
- package/dist/nile-loader/nile-loader.test.esm.js +1 -1
- package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.test.esm.js +1 -1
- package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
- package/dist/nile-popup/nile-popup.test.esm.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
- package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
- package/dist/nile-radio/nile-radio.test.esm.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
- package/dist/nile-select/nile-select.test.cjs.js +1 -1
- package/dist/nile-select/nile-select.test.esm.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
- package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
- package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.test.cjs.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.test.esm.js +1 -1
- package/dist/scopedElementsWrapper-067597d2.cjs.js +6 -0
- package/dist/scopedElementsWrapper-067597d2.cjs.js.map +1 -0
- package/dist/scopedElementsWrapper-4374e962.esm.js +7 -0
- package/dist/sinon-esm-283dcc9b.cjs.js +2 -0
- package/dist/sinon-esm-283dcc9b.cjs.js.map +1 -0
- package/dist/sinon-esm-abe9b0ec.esm.js +1 -0
- package/dist/src/internal/accessibility/a11y.custom-value.enum.d.ts +45 -0
- package/dist/src/internal/accessibility/a11y.custom-value.enum.js +47 -0
- package/dist/src/internal/accessibility/a11y.custom-value.enum.js.map +1 -0
- package/dist/src/internal/accessibility/a11y.property.enum.d.ts +31 -0
- package/dist/src/internal/accessibility/a11y.property.enum.js +33 -0
- package/dist/src/internal/accessibility/a11y.property.enum.js.map +1 -0
- package/dist/src/internal/accessibility/a11y.role.enum.d.ts +41 -0
- package/dist/src/internal/accessibility/a11y.role.enum.js +43 -0
- package/dist/src/internal/accessibility/a11y.role.enum.js.map +1 -0
- package/dist/src/internal/accessibility/a11y.state.enum.d.ts +16 -0
- package/dist/src/internal/accessibility/a11y.state.enum.js +18 -0
- package/dist/src/internal/accessibility/a11y.state.enum.js.map +1 -0
- package/dist/src/internal/accessibility/accessibility.const.d.ts +8 -0
- package/dist/src/internal/accessibility/accessibility.const.js +9 -0
- package/dist/src/internal/accessibility/accessibility.const.js.map +1 -0
- package/dist/src/internal/accessibility/role.enum.d.ts +3 -0
- package/dist/src/internal/accessibility/role.enum.js +5 -0
- package/dist/src/internal/accessibility/role.enum.js.map +1 -0
- package/dist/src/nile-chip/nile-chip.d.ts +3 -0
- package/dist/src/nile-chip/nile-chip.js +19 -0
- package/dist/src/nile-chip/nile-chip.js.map +1 -1
- package/dist/src/nile-css-tooltip/index.d.ts +1 -0
- package/dist/src/nile-css-tooltip/index.js +2 -0
- package/dist/src/nile-css-tooltip/index.js.map +1 -0
- package/dist/src/nile-css-tooltip/nile-css-tooltip.css.d.ts +12 -0
- package/dist/src/nile-css-tooltip/nile-css-tooltip.css.js +76 -0
- package/dist/src/nile-css-tooltip/nile-css-tooltip.css.js.map +1 -0
- package/dist/src/nile-css-tooltip/nile-css-tooltip.d.ts +12 -0
- package/dist/src/nile-css-tooltip/nile-css-tooltip.js +31 -0
- package/dist/src/nile-css-tooltip/nile-css-tooltip.js.map +1 -0
- package/dist/src/nile-light-tooltip/index.d.ts +1 -0
- package/dist/src/nile-light-tooltip/index.js +2 -0
- package/dist/src/nile-light-tooltip/index.js.map +1 -0
- package/dist/src/nile-light-tooltip/nile-light-tooltip.css.d.ts +12 -0
- package/dist/src/nile-light-tooltip/nile-light-tooltip.css.js +17 -0
- package/dist/src/nile-light-tooltip/nile-light-tooltip.css.js.map +1 -0
- package/dist/src/nile-light-tooltip/nile-light-tooltip.d.ts +79 -0
- package/dist/src/nile-light-tooltip/nile-light-tooltip.js +350 -0
- package/dist/src/nile-light-tooltip/nile-light-tooltip.js.map +1 -0
- package/dist/src/nile-light-tooltip/nile-lite-tooltip.css.d.ts +12 -0
- package/dist/src/nile-light-tooltip/nile-lite-tooltip.css.js +17 -0
- package/dist/src/nile-light-tooltip/nile-lite-tooltip.css.js.map +1 -0
- package/dist/src/nile-light-tooltip/nile-lite-tooltip.d.ts +79 -0
- package/dist/src/nile-light-tooltip/nile-lite-tooltip.js +350 -0
- package/dist/src/nile-light-tooltip/nile-lite-tooltip.js.map +1 -0
- package/dist/src/nile-light-tooltip/utils.d.ts +2 -0
- package/dist/src/nile-light-tooltip/utils.js +29 -0
- package/dist/src/nile-light-tooltip/utils.js.map +1 -0
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/virtualize-73f68d08.esm.js +22 -0
- package/dist/virtualize-eb33a9a0.cjs.js +18 -0
- package/dist/virtualize-eb33a9a0.cjs.js.map +1 -0
- package/package.json +1 -1
- package/src/nile-chip/nile-chip.ts +30 -1
- package/vscode-html-custom-data.json +1 -1
- package/dist/fixture-5b79f853.cjs.js.map +0 -1
- package/dist/fixture-90b199c4.esm.js +0 -569
- package/dist/fixture-c1d78368.cjs.js +0 -395
- package/dist/fixture-c1d78368.cjs.js.map +0 -1
- package/dist/fixture-dbd66009.cjs.js +0 -395
- package/dist/fixture-dbd66009.cjs.js.map +0 -1
- package/dist/nile-code-editor/backup_nile-code-editor copy.cjs.js +0 -2
- package/dist/nile-code-editor/backup_nile-code-editor copy.cjs.js.map +0 -1
- package/dist/nile-code-editor/backup_nile-code-editor copy.esm.js +0 -1
- package/dist/nile-grid-body/index.cjs.js +0 -2
- package/dist/nile-grid-body/index.esm.js +0 -1
- package/dist/nile-grid-body/nile-grid-body.cjs.js +0 -2
- package/dist/nile-grid-body/nile-grid-body.cjs.js.map +0 -1
- package/dist/nile-grid-body/nile-grid-body.css.cjs.js +0 -2
- package/dist/nile-grid-body/nile-grid-body.css.cjs.js.map +0 -1
- package/dist/nile-grid-body/nile-grid-body.css.esm.js +0 -10
- package/dist/nile-grid-body/nile-grid-body.esm.js +0 -5
- package/dist/nile-grid-cell-item/index.cjs.js +0 -2
- package/dist/nile-grid-cell-item/index.cjs.js.map +0 -1
- package/dist/nile-grid-cell-item/index.esm.js +0 -1
- package/dist/nile-grid-cell-item/nile-grid-cell-item.cjs.js +0 -2
- package/dist/nile-grid-cell-item/nile-grid-cell-item.cjs.js.map +0 -1
- package/dist/nile-grid-cell-item/nile-grid-cell-item.css.cjs.js +0 -2
- package/dist/nile-grid-cell-item/nile-grid-cell-item.css.cjs.js.map +0 -1
- package/dist/nile-grid-cell-item/nile-grid-cell-item.css.esm.js +0 -35
- package/dist/nile-grid-cell-item/nile-grid-cell-item.esm.js +0 -12
- package/dist/nile-grid-cell-item/nile-grid-cell-item.utils.cjs.js +0 -2
- package/dist/nile-grid-cell-item/nile-grid-cell-item.utils.cjs.js.map +0 -1
- package/dist/nile-grid-cell-item/nile-grid-cell-item.utils.esm.js +0 -1
- package/dist/nile-grid-head/index.cjs.js +0 -2
- package/dist/nile-grid-head/index.cjs.js.map +0 -1
- package/dist/nile-grid-head/index.esm.js +0 -1
- package/dist/nile-grid-head/nile-grid-head.cjs.js +0 -2
- package/dist/nile-grid-head/nile-grid-head.cjs.js.map +0 -1
- package/dist/nile-grid-head/nile-grid-head.css.cjs.js +0 -2
- package/dist/nile-grid-head/nile-grid-head.css.cjs.js.map +0 -1
- package/dist/nile-grid-head/nile-grid-head.css.esm.js +0 -7
- package/dist/nile-grid-head/nile-grid-head.esm.js +0 -5
- package/dist/nile-grid-head-item/index.cjs.js +0 -2
- package/dist/nile-grid-head-item/index.cjs.js.map +0 -1
- package/dist/nile-grid-head-item/index.esm.js +0 -1
- package/dist/nile-grid-head-item/nile-grid-head-item.cjs.js +0 -2
- package/dist/nile-grid-head-item/nile-grid-head-item.cjs.js.map +0 -1
- package/dist/nile-grid-head-item/nile-grid-head-item.css.cjs.js +0 -2
- package/dist/nile-grid-head-item/nile-grid-head-item.css.cjs.js.map +0 -1
- package/dist/nile-grid-head-item/nile-grid-head-item.css.esm.js +0 -34
- package/dist/nile-grid-head-item/nile-grid-head-item.esm.js +0 -12
- package/dist/nile-grid-head-item/nile-grid-head-item.utils.cjs.js +0 -2
- package/dist/nile-grid-head-item/nile-grid-head-item.utils.cjs.js.map +0 -1
- package/dist/nile-grid-head-item/nile-grid-head-item.utils.esm.js +0 -1
- package/dist/nile-grid-row/index.cjs.js +0 -2
- package/dist/nile-grid-row/index.cjs.js.map +0 -1
- package/dist/nile-grid-row/index.esm.js +0 -1
- package/dist/nile-grid-row/nile-grid-row.cjs.js +0 -2
- package/dist/nile-grid-row/nile-grid-row.cjs.js.map +0 -1
- package/dist/nile-grid-row/nile-grid-row.css.cjs.js +0 -2
- package/dist/nile-grid-row/nile-grid-row.css.cjs.js.map +0 -1
- package/dist/nile-grid-row/nile-grid-row.css.esm.js +0 -15
- package/dist/nile-grid-row/nile-grid-row.esm.js +0 -7
- package/dist/nile-rich-text-editor/utils.cjs.js +0 -2
- package/dist/nile-rich-text-editor/utils.cjs.js.map +0 -1
- package/dist/nile-rich-text-editor/utils.esm.js +0 -1
- package/dist/nile-sidebar/index.cjs.js +0 -2
- package/dist/nile-sidebar/index.cjs.js.map +0 -1
- package/dist/nile-sidebar/index.esm.js +0 -75
- package/dist/nile-sidebar-menu/index.cjs.js +0 -2
- package/dist/nile-sidebar-menu/index.cjs.js.map +0 -1
- package/dist/nile-sidebar-menu/index.esm.js +0 -1
- package/dist/nile-sidebar-menu/nile-sidebar-menu.cjs.js +0 -2
- package/dist/nile-sidebar-menu/nile-sidebar-menu.cjs.js.map +0 -1
- package/dist/nile-sidebar-menu/nile-sidebar-menu.css.cjs.js +0 -2
- package/dist/nile-sidebar-menu/nile-sidebar-menu.css.cjs.js.map +0 -1
- package/dist/nile-sidebar-menu/nile-sidebar-menu.css.esm.js +0 -38
- package/dist/nile-sidebar-menu/nile-sidebar-menu.esm.js +0 -10
- package/dist/nile-sidebar-menu-items/index.cjs.js +0 -2
- package/dist/nile-sidebar-menu-items/index.cjs.js.map +0 -1
- package/dist/nile-sidebar-menu-items/index.esm.js +0 -1
- package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.cjs.js +0 -2
- package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.cjs.js.map +0 -1
- package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.css.cjs.js +0 -2
- package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.css.cjs.js.map +0 -1
- package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.css.esm.js +0 -36
- package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.esm.js +0 -15
- package/dist/nile-sidebar-wrapper/index.cjs.js +0 -2
- package/dist/nile-sidebar-wrapper/index.cjs.js.map +0 -1
- package/dist/nile-sidebar-wrapper/index.esm.js +0 -1
- package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.cjs.js +0 -2
- package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.cjs.js.map +0 -1
- package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.css.cjs.js +0 -2
- package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.css.cjs.js.map +0 -1
- package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.css.esm.js +0 -105
- package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.esm.js +0 -16
- package/dist/nile-virtual-select/group-manager.cjs.js +0 -2
- package/dist/nile-virtual-select/group-manager.cjs.js.map +0 -1
- package/dist/nile-virtual-select/group-manager.esm.js +0 -1
- package/dist/nile-virtual-select/temp_nile-virtual-select copy.cjs.js +0 -2
- package/dist/nile-virtual-select/temp_nile-virtual-select copy.cjs.js.map +0 -1
- package/dist/nile-virtual-select/temp_nile-virtual-select copy.esm.js +0 -231
- package/dist/scopedElementsWrapper-4c29be11.esm.js +0 -7
- package/dist/scopedElementsWrapper-a112fc73.cjs.js +0 -6
- package/dist/scopedElementsWrapper-a112fc73.cjs.js.map +0 -1
- package/dist/scopedElementsWrapper-c815042c.cjs.js +0 -2
- package/dist/scopedElementsWrapper-c815042c.cjs.js.map +0 -1
- package/dist/src/internal/portal-manager.d.ts +0 -53
- package/dist/src/internal/portal-manager.js +0 -196
- package/dist/src/internal/portal-manager.js.map +0 -1
- package/dist/src/internal/portal.d.ts +0 -60
- package/dist/src/internal/portal.js +0 -199
- package/dist/src/internal/portal.js.map +0 -1
- package/dist/src/internal/resizable-helper.d.ts +0 -59
- package/dist/src/internal/resizable-helper.js +0 -115
- package/dist/src/internal/resizable-helper.js.map +0 -1
- package/dist/src/internal/resizable-styles.d.ts +0 -16
- package/dist/src/internal/resizable-styles.js +0 -144
- package/dist/src/internal/resizable-styles.js.map +0 -1
- package/dist/src/internal/virtualizer-error-handler.d.ts +0 -30
- package/dist/src/internal/virtualizer-error-handler.js +0 -82
- package/dist/src/internal/virtualizer-error-handler.js.map +0 -1
- package/dist/src/lib/index.d.ts +0 -7
- package/dist/src/lib/index.js +0 -8
- package/dist/src/lib/index.js.map +0 -1
- package/dist/src/lib/virtualize.d.ts +0 -32
- package/dist/src/lib/virtualize.js +0 -105
- package/dist/src/lib/virtualize.js.map +0 -1
- package/dist/src/lib/virtualize.test.d.ts +0 -7
- package/dist/src/lib/virtualize.test.js +0 -57
- package/dist/src/lib/virtualize.test.js.map +0 -1
- package/dist/src/nile-badge/__snapshots__/nile-badge.test.snap.js +0 -17
- package/dist/src/nile-calendar/__snapshots__/nile-calendar.test.snap.js +0 -310
- package/dist/src/nile-card/__snapshots__/nile-card.test.snap.js +0 -34
- package/dist/src/nile-checkbox/__snapshots__/nile-checkbox.test.snap.js +0 -31
- package/dist/src/nile-code-editor/Old_theme copy.d.ts +0 -191
- package/dist/src/nile-code-editor/Old_theme copy.js +0 -193
- package/dist/src/nile-code-editor/Old_theme copy.js.map +0 -1
- package/dist/src/nile-code-editor/backup_nile-code-editor copy.d.ts +0 -0
- package/dist/src/nile-code-editor/backup_nile-code-editor copy.js +0 -675
- package/dist/src/nile-code-editor/backup_nile-code-editor copy.js.map +0 -1
- package/dist/src/nile-code-editor/theme copy.d.ts +0 -191
- package/dist/src/nile-code-editor/theme copy.js +0 -193
- package/dist/src/nile-code-editor/theme copy.js.map +0 -1
- package/dist/src/nile-grid/data-processor.d.ts +0 -37
- package/dist/src/nile-grid/data-processor.js +0 -122
- package/dist/src/nile-grid/data-processor.js.map +0 -1
- package/dist/src/nile-grid/event-handlers.d.ts +0 -35
- package/dist/src/nile-grid/event-handlers.js +0 -158
- package/dist/src/nile-grid/event-handlers.js.map +0 -1
- package/dist/src/nile-grid/renderer.d.ts +0 -8
- package/dist/src/nile-grid/renderer.js +0 -78
- package/dist/src/nile-grid/renderer.js.map +0 -1
- package/dist/src/nile-grid/resize-handler.d.ts +0 -4
- package/dist/src/nile-grid/resize-handler.js +0 -36
- package/dist/src/nile-grid/resize-handler.js.map +0 -1
- package/dist/src/nile-grid/types.d.ts +0 -32
- package/dist/src/nile-grid/types.js +0 -2
- package/dist/src/nile-grid/types.js.map +0 -1
- package/dist/src/nile-grid/utils.d.ts +0 -4
- package/dist/src/nile-grid/utils.js +0 -32
- package/dist/src/nile-grid/utils.js.map +0 -1
- package/dist/src/nile-grid-body/index.d.ts +0 -1
- package/dist/src/nile-grid-body/index.js +0 -2
- package/dist/src/nile-grid-body/index.js.map +0 -1
- package/dist/src/nile-grid-body/nile-grid-body.css.d.ts +0 -12
- package/dist/src/nile-grid-body/nile-grid-body.css.js +0 -22
- package/dist/src/nile-grid-body/nile-grid-body.css.js.map +0 -1
- package/dist/src/nile-grid-body/nile-grid-body.d.ts +0 -29
- package/dist/src/nile-grid-body/nile-grid-body.js +0 -43
- package/dist/src/nile-grid-body/nile-grid-body.js.map +0 -1
- package/dist/src/nile-grid-cell-item/index.d.ts +0 -1
- package/dist/src/nile-grid-cell-item/index.js +0 -2
- package/dist/src/nile-grid-cell-item/index.js.map +0 -1
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.css.d.ts +0 -12
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.css.js +0 -47
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.css.js.map +0 -1
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.d.ts +0 -36
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.js +0 -93
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.js.map +0 -1
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.utils.d.ts +0 -10
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.utils.js +0 -34
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.utils.js.map +0 -1
- package/dist/src/nile-grid-head/index.d.ts +0 -1
- package/dist/src/nile-grid-head/index.js +0 -2
- package/dist/src/nile-grid-head/index.js.map +0 -1
- package/dist/src/nile-grid-head/nile-grid-head.css.d.ts +0 -12
- package/dist/src/nile-grid-head/nile-grid-head.css.js +0 -19
- package/dist/src/nile-grid-head/nile-grid-head.css.js.map +0 -1
- package/dist/src/nile-grid-head/nile-grid-head.d.ts +0 -28
- package/dist/src/nile-grid-head/nile-grid-head.js +0 -41
- package/dist/src/nile-grid-head/nile-grid-head.js.map +0 -1
- package/dist/src/nile-grid-head-item/index.d.ts +0 -1
- package/dist/src/nile-grid-head-item/index.js +0 -2
- package/dist/src/nile-grid-head-item/index.js.map +0 -1
- package/dist/src/nile-grid-head-item/nile-grid-head-item.css.d.ts +0 -12
- package/dist/src/nile-grid-head-item/nile-grid-head-item.css.js +0 -46
- package/dist/src/nile-grid-head-item/nile-grid-head-item.css.js.map +0 -1
- package/dist/src/nile-grid-head-item/nile-grid-head-item.d.ts +0 -37
- package/dist/src/nile-grid-head-item/nile-grid-head-item.js +0 -100
- package/dist/src/nile-grid-head-item/nile-grid-head-item.js.map +0 -1
- package/dist/src/nile-grid-head-item/nile-grid-head-item.utils.d.ts +0 -10
- package/dist/src/nile-grid-head-item/nile-grid-head-item.utils.js +0 -34
- package/dist/src/nile-grid-head-item/nile-grid-head-item.utils.js.map +0 -1
- package/dist/src/nile-grid-row/index.d.ts +0 -1
- package/dist/src/nile-grid-row/index.js +0 -2
- package/dist/src/nile-grid-row/index.js.map +0 -1
- package/dist/src/nile-grid-row/nile-grid-row.css.d.ts +0 -12
- package/dist/src/nile-grid-row/nile-grid-row.css.js +0 -27
- package/dist/src/nile-grid-row/nile-grid-row.css.js.map +0 -1
- package/dist/src/nile-grid-row/nile-grid-row.d.ts +0 -29
- package/dist/src/nile-grid-row/nile-grid-row.js +0 -45
- package/dist/src/nile-grid-row/nile-grid-row.js.map +0 -1
- package/dist/src/nile-hero/__snapshots__/nile-hero.test.snap.js +0 -47
- package/dist/src/nile-icon/__snapshots__/nile-icon.test.snap.js +0 -16
- package/dist/src/nile-input/__snapshots__/nile-input.test.snap.js +0 -75
- package/dist/src/nile-menu/portal-manager.d.ts +0 -39
- package/dist/src/nile-menu/portal-manager.js +0 -340
- package/dist/src/nile-menu/portal-manager.js.map +0 -1
- package/dist/src/nile-menu/portal-utils.d.ts +0 -21
- package/dist/src/nile-menu/portal-utils.js +0 -128
- package/dist/src/nile-menu/portal-utils.js.map +0 -1
- package/dist/src/nile-popover/__snapshots__/nile-popover.test.snap.js +0 -22
- package/dist/src/nile-popover/popover-portal-handler.d.ts +0 -21
- package/dist/src/nile-popover/popover-portal-handler.js +0 -106
- package/dist/src/nile-popover/popover-portal-handler.js.map +0 -1
- package/dist/src/nile-portal-wrapper/index.d.ts +0 -1
- package/dist/src/nile-portal-wrapper/index.js +0 -2
- package/dist/src/nile-portal-wrapper/index.js.map +0 -1
- package/dist/src/nile-portal-wrapper/nile-portal-wrapper.d.ts +0 -47
- package/dist/src/nile-portal-wrapper/nile-portal-wrapper.js +0 -451
- package/dist/src/nile-portal-wrapper/nile-portal-wrapper.js.map +0 -1
- package/dist/src/nile-rich-text-editor/utils.d.ts +0 -13
- package/dist/src/nile-rich-text-editor/utils.js +0 -538
- package/dist/src/nile-rich-text-editor/utils.js.map +0 -1
- package/dist/src/nile-select/body-append-manager.d.ts +0 -90
- package/dist/src/nile-select/body-append-manager.js +0 -298
- package/dist/src/nile-select/body-append-manager.js.map +0 -1
- package/dist/src/nile-sidebar/index.d.ts +0 -28
- package/dist/src/nile-sidebar/index.js +0 -116
- package/dist/src/nile-sidebar/index.js.map +0 -1
- package/dist/src/nile-sidebar-menu/index.d.ts +0 -1
- package/dist/src/nile-sidebar-menu/index.js +0 -2
- package/dist/src/nile-sidebar-menu/index.js.map +0 -1
- package/dist/src/nile-sidebar-menu/nile-sidebar-menu.css.d.ts +0 -12
- package/dist/src/nile-sidebar-menu/nile-sidebar-menu.css.js +0 -47
- package/dist/src/nile-sidebar-menu/nile-sidebar-menu.css.js.map +0 -1
- package/dist/src/nile-sidebar-menu/nile-sidebar-menu.d.ts +0 -37
- package/dist/src/nile-sidebar-menu/nile-sidebar-menu.js +0 -84
- package/dist/src/nile-sidebar-menu/nile-sidebar-menu.js.map +0 -1
- package/dist/src/nile-sidebar-menu-items/index.d.ts +0 -1
- package/dist/src/nile-sidebar-menu-items/index.js +0 -2
- package/dist/src/nile-sidebar-menu-items/index.js.map +0 -1
- package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.css.d.ts +0 -12
- package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.css.js +0 -45
- package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.css.js.map +0 -1
- package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.d.ts +0 -35
- package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.js +0 -78
- package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.js.map +0 -1
- package/dist/src/nile-sidebar-wrapper/index.d.ts +0 -1
- package/dist/src/nile-sidebar-wrapper/index.js +0 -2
- package/dist/src/nile-sidebar-wrapper/index.js.map +0 -1
- package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.css.d.ts +0 -12
- package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.css.js +0 -114
- package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.css.js.map +0 -1
- package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.d.ts +0 -35
- package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.js +0 -89
- package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.js.map +0 -1
- package/dist/src/nile-table-body/virtual-scroll-helper.d.ts +0 -9
- package/dist/src/nile-table-body/virtual-scroll-helper.js +0 -24
- package/dist/src/nile-table-body/virtual-scroll-helper.js.map +0 -1
- package/dist/src/nile-virtual-select/body-append-helper.d.ts +0 -16
- package/dist/src/nile-virtual-select/body-append-helper.js +0 -95
- package/dist/src/nile-virtual-select/body-append-helper.js.map +0 -1
- package/dist/src/nile-virtual-select/group-manager.d.ts +0 -32
- package/dist/src/nile-virtual-select/group-manager.js +0 -134
- package/dist/src/nile-virtual-select/group-manager.js.map +0 -1
- package/dist/src/nile-virtual-select/portal-utils.d.ts +0 -65
- package/dist/src/nile-virtual-select/portal-utils.js +0 -376
- package/dist/src/nile-virtual-select/portal-utils.js.map +0 -1
- package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.d.ts +0 -273
- package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.js +0 -1305
- package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.js.map +0 -1
- package/dist/src/nile-virtual-select/virtualizer-error-handler.d.ts +0 -21
- package/dist/src/nile-virtual-select/virtualizer-error-handler.js +0 -56
- package/dist/src/nile-virtual-select/virtualizer-error-handler.js.map +0 -1
- package/dist/src/nile-virtual-select-disabled/index.d.ts +0 -1
- package/dist/src/nile-virtual-select-disabled/index.js +0 -2
- package/dist/src/nile-virtual-select-disabled/index.js.map +0 -1
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.css.d.ts +0 -12
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.css.js +0 -538
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.css.js.map +0 -1
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.d.ts +0 -299
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.js +0 -1441
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.js.map +0 -1
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.test.d.ts +0 -7
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.test.js +0 -631
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.test.js.map +0 -1
- package/dist/src/nile-virtual-select-disabled/portal-manager.d.ts +0 -45
- package/dist/src/nile-virtual-select-disabled/portal-manager.js +0 -333
- package/dist/src/nile-virtual-select-disabled/portal-manager.js.map +0 -1
- package/dist/src/nile-virtual-select-disabled/renderer.d.ts +0 -16
- package/dist/src/nile-virtual-select-disabled/renderer.js +0 -79
- package/dist/src/nile-virtual-select-disabled/renderer.js.map +0 -1
- package/dist/src/nile-virtual-select-disabled/search-manager.d.ts +0 -12
- package/dist/src/nile-virtual-select-disabled/search-manager.js +0 -40
- package/dist/src/nile-virtual-select-disabled/search-manager.js.map +0 -1
- package/dist/src/nile-virtual-select-disabled/selection-manager.d.ts +0 -12
- package/dist/src/nile-virtual-select-disabled/selection-manager.js +0 -64
- package/dist/src/nile-virtual-select-disabled/selection-manager.js.map +0 -1
- package/dist/src/nile-virtual-select-disabled/types.d.ts +0 -50
- package/dist/src/nile-virtual-select-disabled/types.js +0 -8
- package/dist/src/nile-virtual-select-disabled/types.js.map +0 -1
- package/dist/src/nile-virtual-table-body/index.d.ts +0 -2
- package/dist/src/nile-virtual-table-body/index.js +0 -3
- package/dist/src/nile-virtual-table-body/index.js.map +0 -1
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.d.ts +0 -1
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.js +0 -44
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.js.map +0 -1
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.d.ts +0 -50
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.js +0 -135
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.js.map +0 -1
- package/dist/src/nile-virtual-table-body/renderer.d.ts +0 -16
- package/dist/src/nile-virtual-table-body/renderer.js +0 -49
- package/dist/src/nile-virtual-table-body/renderer.js.map +0 -1
- package/dist/src/utilities/stepper-utils.d.ts +0 -71
- package/dist/src/utilities/stepper-utils.js +0 -108
- package/dist/src/utilities/stepper-utils.js.map +0 -1
- /package/dist/{nile-grid-body → nile-light-tooltip}/index.cjs.js.map +0 -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","lit/directives/unsafe-html.js","../utilities/visibility-manager.cjs.js"],function(_export,_context){"use strict";var t,i,s,e,h,o,l,n,a,r,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){a=_internalSlotCjsJs.H;},function(_internalNileElementCjsJs){r=_internalNileElementCjsJs.N;},function(_litDirectivesUnsafeHtmlJs){p=_litDirectivesUnsafeHtmlJs.unsafeHTML;},function(_utilitiesVisibilityManagerCjsJs){c=_utilitiesVisibilityManagerCjsJs.V;}],execute:function execute(){_export("N",d=/*#__PURE__*/function(_r){function d(){var _this;_classCallCheck(this,d);_this=_callSuper(this,d,arguments),_this.hasSlotController=new a(_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.handleDocumentClick=function(t){t.composedPath().includes(_assertThisInitialized(_this))||(_this.addOnBlur&&_this.acceptUserInput&&_this.inputValue&&_this.addChipFromInputValue(),_this.isDropdownOpen=!1);};return _this;}_inherits(d,_r);return _createClass(d,[{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:"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 ></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),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;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.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];}}]);}(r));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.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));}};});
|
|
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';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { VisibilityManager } from '../utilities/visibility-manager.js';\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 @state() tooltips: (string | null)[] = [];\n @state() private chipFocusIndex: number | null = null;\n\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@property({ type: Boolean }) noAutoComplete = false;\n\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 @property({ type: String }) tagVariant: string = ''; // can be '', 'normal', 'success', etc.\n\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) acceptUserInput = false;\n\n /** When true, adds a chip when the input loses focus or when clicking outside the component. Only works when acceptUserInput is true. */\n @property({ type: Boolean }) addOnBlur = 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 /** \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 // 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: (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 private visibilityManager?: VisibilityManager;\n\n @property({ type: Boolean, reflect: true }) enableVisibilityEffect = false;\n\n @property({ type: Boolean, reflect: true }) enableTabClose = false;\n\n @property({ type: Boolean }) showTooltip: boolean = false;\n\n @property({ type: Boolean }) enableTagDelete = false;\n\n\n protected updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties);\n if (changedProperties.has('autoCompleteOptions')) {\n let options = this.autoCompleteOptions;\n if (typeof options === 'string') {\n try {\n options = JSON.parse(options);\n } catch (e) {\n options = [];\n }\n }\n this.filteredAutoCompleteOptions = Array.isArray(options) ? [...options] : [];\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 protected async firstUpdated(_changed: PropertyValues) {\n await this.updateComplete;\n \n const inputTarget =\n this.noAutoComplete\n ? this.renderRoot.querySelector('nile-input')?.input\n : this.autoComplete?.inputElement?.input || this.autoComplete?.inputElement;\n \n this.visibilityManager = new VisibilityManager({\n host: this,\n target: inputTarget,\n enableVisibilityEffect: this.enableVisibilityEffect,\n enableTabClose: this.enableTabClose,\n isOpen: () => this.isDropdownOpen,\n onAnchorOutOfView: () => {\n this.isDropdownOpen = false;\n if (this.autoComplete) {\n this.autoComplete.isDropdownOpen = false;\n } \n this.emit('nile-visibility-change', {\n visible: false,\n reason: 'anchor-out-of-view',\n });\n },\n onDocumentHidden: () => {\n this.isDropdownOpen = false;\n if (this.autoComplete) {\n this.autoComplete.isDropdownOpen = false;\n }\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\n \n private handleDocumentClick = (event: MouseEvent) => {\n const path = event.composedPath();\n if (!path.includes(this)) {\n if (this.addOnBlur && this.acceptUserInput && this.inputValue) {\n this.addChipFromInputValue();\n }\n this.isDropdownOpen = false; \n }\n };\n \n connectedCallback() {\n super.connectedCallback();\n document.addEventListener('click', this.handleDocumentClick);\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.visibilityManager?.cleanup();\n document.removeEventListener('click', this.handleDocumentClick);\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 part='base' \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 'nile-chip--open': this.isDropdownOpen, \n })}\n >\n ${this.tags.map((tag, index) => {\n const tooltipContent = this.tooltips[index];\n const isFocused = this.enableTagDelete && this.chipFocusIndex === index;\n let tagText = \"\";\n if(tag || typeof tag === \"number\") {\n tagText = tag.toString();\n }\n const tagTemplate = html`\n <nile-tag\n class=${classMap({\n 'nile-chip__tags': true,\n 'nile-chip__tags--focused': isFocused,\n })}\n aria-selected=${isFocused ? 'true' : 'false'}\n .variant=${this.errorIndexes.includes(index)\n ? 'error'\n : 'normal'}\n @nile-remove=${() => this.handleRemove(tag)}\n removable\n ?pill=${this.tagVariant !== 'normal'}\n ?disabled=${this.disabled}\n >\n ${unsafeHTML(tagText)}\n </nile-tag>\n `;\n\n if (this.showTooltip && tooltipContent) {\n return html`\n <nile-lite-tooltip allowHTML .content=${tooltipContent}>\n ${tagTemplate}\n </nile-lite-tooltip>\n `;\n }\n\n return tagTemplate;\n })}\n\n <div class=\"nile-chip__auto-complete\">\n ${this.noAutoComplete\n ? html`\n <nile-input\n .value=${this.inputValue}\n .placeholder=${this.placeholder}\n .disabled=${this.disabled}\n ?no-border=${true}\n ?no-outline=${true}\n ?no-padding=${true}\n @nile-input=${this.handleInputChange}\n @keydown=${this.handleInputKeydown}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n exportparts=\"input\"\n ></nile-input>\n `\n : html`\n <nile-auto-complete\n .enableVirtualScroll=${this.enableVirtualScroll}\n .allMenuItems=${this.filteredAutoCompleteOptions}\n .filterFunction=${this.filterFunction}\n .renderItemFunction=${this.renderItemFunction}\n .showTooltips=${this.showTooltip}\n .loading=\"${this.loading}\"\n .value=${this.inputValue}\n ?isDropdownOpen=${this.isDropdownOpen}\n .noBorder=${true}\n .noOutline=${true}\n .noPadding=${true}\n .disabled=${this.disabled}\n .readonly=${this.readonly}\n .portal=${this.portal}\n openOnFocus\n exportparts=\"options__wrapper, input, base\"\n .placeholder=${this.placeholder}\n @nile-input=${this.handleInputChange}\n @keydown=${this.handleInputKeydown}\n @nile-focus=${this.handleFocus}\n @nile-blur=${this.handleBlur}\n @nile-complete=${this.handleSelect}\n ></nile-auto-complete>\n `}\n </div>\n </div>\n ${hasHelpText\n ? html` <nile-form-help-text>${this.helpText}</nile-form-help-text> `\n : ``}\n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\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 const selectedValue = event.detail.value;\n const selectedOption = this.autoCompleteOptions.find(\n (opt) => opt.name === selectedValue || opt.id === selectedValue\n );\n\n let tooltipContent: string | null = null;\n \n if (this.showTooltip) {\n if (selectedOption?.tooltip?.content) {\n const { content, for: showFor } = selectedOption.tooltip;\n if (!showFor || showFor === 'tag') {\n if (content instanceof Promise) {\n this.tooltips = [...this.tooltips, 'Loading...'];\n \n const currentIndex = this.tooltips.length - 1;\n content.then((resolved) => {\n this.tooltips[currentIndex] = resolved;\n this.requestUpdate();\n });\n } else {\n tooltipContent = content;\n }\n }\n } else {\n tooltipContent = selectedOption?.name || selectedValue;\n }\n }\n\n if (!this.noDuplicates || !this.tags.includes(selectedValue)) {\n this.tags = [...this.tags, selectedValue];\n \n\n if (!(selectedOption?.tooltip?.content instanceof Promise)) {\n this.tooltips = [...this.tooltips, tooltipContent];\n }\n \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 addChipFromInputValue(): boolean {\n if (this.noDuplicates && this.tags.includes(this.inputValue)) {\n this.emit('nile-duplicates-blocked');\n return false;\n }\n\n this.tags = [...this.tags, this.inputValue];\n if (this.showTooltip) {\n this.tooltips = [...this.tooltips, this.inputValue];\n } else {\n this.tooltips = [...this.tooltips, null];\n }\n\n this.inputValue = '';\n this.visibilityManager?.cleanup();\n this.emit('nile-chip-change', { value: this.tags });\n return true;\n }\n\n private handleInputKeydown(event: KeyboardEvent) {\n if (\n this.enableTagDelete &&\n (event.key === 'Backspace' || event.key === 'Delete') &&\n !this.inputValue &&\n !this.readonly &&\n !this.disabled\n ) {\n if (this.tags.length === 0) {\n this.chipFocusIndex = null;\n return;\n }\n\n event.preventDefault();\n if (this.chipFocusIndex === null) {\n this.chipFocusIndex = this.tags.length - 1;\n this.requestUpdate();\n return;\n }\n const index = this.chipFocusIndex;\n const removedTag = this.tags[index];\n\n this.tags = this.tags.filter((_, i) => i !== index);\n this.tooltips = this.tooltips.filter((_, i) => i !== index);\n\n this.emit('nile-chip-change', { value: this.tags });\n if (this.tags.length > 0) {\n this.chipFocusIndex = Math.max(0, index - 1);\n } else {\n this.chipFocusIndex = null;\n }\n\n return;\n }\n\n if (this.readonly) {\n const allowedKeys = ['ArrowUp', 'ArrowDown', 'Enter', 'Tab'];\n if (!allowedKeys.includes(event.key)) {\n event.preventDefault();\n return;\n }\n }\n\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 if (this.showTooltip) {\n this.tooltips = [...this.tooltips, this.inputValue];\n } else {\n this.tooltips = [...this.tooltips, null];\n }\n \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 if (this.noAutoComplete) {\n return;\n }\n this.visibilityManager?.setup();\n this.isDropdownOpen = true;\n }\n\n private handleBlur() {\n if (this.addOnBlur && this.acceptUserInput && this.inputValue) {\n this.addChipFromInputValue();\n }\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.visibilityManager?.cleanup();\n if (!this.noAutoComplete && this.autoComplete) {\n this.autoComplete.value = '';\n this.autoComplete.handleFocus();\n }\n } \n}\n\nexport default NileChip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-chip': NileChip;\n }\n}\n"],"names":["NileChip","d","this","hasSlotController","HasSlotController","tags","inputValue","isDropdownOpen","tooltips","chipFocusIndex","warning","noAutoComplete","error","success","noDuplicates","label","tagVariant","acceptUserInput","addOnBlur","clearable","placeholder","readonly","disabled","portal","enableVirtualScroll","autoCompleteOptions","filteredAutoCompleteOptions","value","noWrap","loading","errorIndexes","helpText","errorMessage","filterFunction","item","searchedValue","toLowerCase","includes","renderItemFunction","enableVisibilityEffect","enableTabClose","showTooltip","enableTagDelete","handleDocumentClick","event","composedPath","addChipFromInputValue","_this","_inherits","_r","_createClass","key","updated","changedProperties","super","has","options","JSON","parse","e","Array","isArray","filter","option","onTagsChanged","_firstUpdated","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_changed","updateComplete","inputTarget","renderRoot","querySelector","input","autoComplete","inputElement","visibilityManager","VisibilityManager","host","target","isOpen","onAnchorOutOfView","emit","visible","reason","onDocumentHidden","detail","_context2","stop","firstUpdated","connectedCallback","document","addEventListener","disconnectedCallback","cleanup","removeEventListener","render","hasLabelSlot","test","hasLabel","hasHelpText","hasErrorMessage","html","_templateObject","_taggedTemplateLiteral","classMap","map","tag","index","tooltipContent","isFocused","tagText","toString","tagTemplate","_templateObject2","handleRemove","unsafeHTML","_templateObject3","_templateObject4","handleInputChange","handleInputKeydown","handleFocus","handleBlur","_templateObject5","handleSelect","_templateObject6","_templateObject7","_s$tooltip","_this6","_s$tooltip3","selectedValue","selectedOption","find","opt","name","id","tooltip","content","_s$tooltip2","for","showFor","Promise","currentIndex","length","then","resolved","requestUpdate","concat","_toConsumableArray","resetInput","_this$visibilityManag2","preventDefault","_","i","Math","max","setup","_this$visibilityManag4","__decorate","get","styles","NileElement","state","prototype","query","property","type","Boolean","String","reflect","attribute","_export","customElement"],"mappings":"0paA2BaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,uEAKYC,KAAAA,CAAiBC,iBAAG,CAAA,GAAIC,CAAAA,gCAEvC,WAAA,CACA,SAGOF,KAAAA,CAAIG,IAAAA,CAAa,GAEjBH,KAAAA,CAAUI,UAAAA,CAAW,GAErBJ,KAAAA,CAAcK,cAAAA,CAAAA,CAAY,CAC1BL,CAAAA,KAAAA,CAAQM,QAAsB,CAAA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A,CAAAqK,SAAA,CAAA,oBAAA,CAAA,IAAA,EAI5CL,CAAAA,CAAAA,CAAAA,CAAA,CAA3CO,CAAS,CAAA,CAAEC,KAAMC,OAASE,CAAAA,OAAAA,CAAAA,CAAS,KAAuC3K,CAAAqK,CAAAA,SAAAA,CAAA,6BAAA,EAE/BL,CAAAA,CAAAA,CAAAA,CAAA,CAA3CO,CAAS,CAAA,CAAEC,KAAMC,OAASE,CAAAA,OAAAA,CAAAA,CAAS,KAA+B3K,CAAAqK,CAAAA,SAAAA,CAAA,gBAAA,CAAA,IAAA,EAAA,CAAA,CAEtCL,CAAA,CAAA,CAA5BO,EAAS,CAAEC,IAAAA,CAAMC,WAAwCzK,CAAAqK,CAAAA,SAAAA,CAAA,kBAAA,EAE7BL,CAAAA,CAAAA,CAAAA,CAAA,CAA5BO,CAAS,CAAA,CAAEC,KAAMC,OAAmCzK,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAqK,UAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAAQ,OAAA,KApG1C7K,EAAQgK,CAAA,CAAA,CADpBc,CAAc,CAAA,WAAA,CAAA,CAAA,CACF9K"}
|
|
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';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { VisibilityManager } from '../utilities/visibility-manager.js';\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 @state() tooltips: (string | null)[] = [];\n @state() private chipFocusIndex: number | null = null;\n\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@property({ type: Boolean }) noAutoComplete = false;\n\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 @property({ type: String }) tagVariant: string = ''; // can be '', 'normal', 'success', etc.\n\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) acceptUserInput = false;\n\n /** When true, adds a chip when the input loses focus or when clicking outside the component. Only works when acceptUserInput is true. */\n @property({ type: Boolean }) addOnBlur = 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 /** \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 // 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: (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 private visibilityManager?: VisibilityManager;\n\n @property({ type: Boolean, reflect: true }) enableVisibilityEffect = false;\n\n @property({ type: Boolean, reflect: true }) enableTabClose = false;\n\n @property({ type: Boolean }) showTooltip: boolean = false;\n\n @property({ type: Boolean }) enableTagDelete = false;\n\n private isSelectingFromDropdown = false;\n\n\n private resetDropdownState() {\n this.isSelectingFromDropdown = false;\n }\n \n\n protected updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties);\n if (changedProperties.has('autoCompleteOptions')) {\n let options = this.autoCompleteOptions;\n if (typeof options === 'string') {\n try {\n options = JSON.parse(options);\n } catch (e) {\n options = [];\n }\n }\n this.filteredAutoCompleteOptions = Array.isArray(options) ? [...options] : [];\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 protected async firstUpdated(_changed: PropertyValues) {\n await this.updateComplete;\n \n const inputTarget =\n this.noAutoComplete\n ? this.renderRoot.querySelector('nile-input')?.input\n : this.autoComplete?.inputElement?.input || this.autoComplete?.inputElement;\n \n this.visibilityManager = new VisibilityManager({\n host: this,\n target: inputTarget,\n enableVisibilityEffect: this.enableVisibilityEffect,\n enableTabClose: this.enableTabClose,\n isOpen: () => this.isDropdownOpen,\n onAnchorOutOfView: () => {\n this.isDropdownOpen = false;\n if (this.autoComplete) {\n this.autoComplete.isDropdownOpen = false;\n } \n this.emit('nile-visibility-change', {\n visible: false,\n reason: 'anchor-out-of-view',\n });\n },\n onDocumentHidden: () => {\n this.isDropdownOpen = false;\n if (this.autoComplete) {\n this.autoComplete.isDropdownOpen = false;\n }\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\n \n private handleDocumentClick = (event: MouseEvent) => {\n const path = event.composedPath();\n \n if (this.isSelectingFromDropdown) {\n // Do NOT process addOnBlur while selecting dropdown\n this.resetDropdownState();\n return;\n }\n \n // User clicked outside chip → normal addOnBlur path\n if (!path.includes(this)) {\n if (this.addOnBlur && this.acceptUserInput && this.inputValue) {\n this.addChipFromInputValue();\n }\n this.isDropdownOpen = false;\n }\n };\n \n \n \n connectedCallback() {\n super.connectedCallback();\n document.addEventListener('click', this.handleDocumentClick);\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.visibilityManager?.cleanup();\n document.removeEventListener('click', this.handleDocumentClick);\n this.emit('nile-destroy');\n }\n\n private markDropdownSelectStart(event: MouseEvent) {\n this.isSelectingFromDropdown = true;\n }\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 part='base' \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 'nile-chip--open': this.isDropdownOpen, \n })}\n >\n ${this.tags.map((tag, index) => {\n const tooltipContent = this.tooltips[index];\n const isFocused = this.enableTagDelete && this.chipFocusIndex === index;\n let tagText = \"\";\n if(tag || typeof tag === \"number\") {\n tagText = tag.toString();\n }\n const tagTemplate = html`\n <nile-tag\n class=${classMap({\n 'nile-chip__tags': true,\n 'nile-chip__tags--focused': isFocused,\n })}\n aria-selected=${isFocused ? 'true' : 'false'}\n .variant=${this.errorIndexes.includes(index)\n ? 'error'\n : 'normal'}\n @nile-remove=${() => this.handleRemove(tag)}\n removable\n ?pill=${this.tagVariant !== 'normal'}\n ?disabled=${this.disabled}\n >\n ${unsafeHTML(tagText)}\n </nile-tag>\n `;\n\n if (this.showTooltip && tooltipContent) {\n return html`\n <nile-lite-tooltip allowHTML .content=${tooltipContent}>\n ${tagTemplate}\n </nile-lite-tooltip>\n `;\n }\n\n return tagTemplate;\n })}\n\n <div class=\"nile-chip__auto-complete\">\n ${this.noAutoComplete\n ? html`\n <nile-input\n .value=${this.inputValue}\n .placeholder=${this.placeholder}\n .disabled=${this.disabled}\n ?no-border=${true}\n ?no-outline=${true}\n ?no-padding=${true}\n @nile-input=${this.handleInputChange}\n @keydown=${this.handleInputKeydown}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n exportparts=\"input\"\n ></nile-input>\n `\n : html`\n <nile-auto-complete\n .enableVirtualScroll=${this.enableVirtualScroll}\n .allMenuItems=${this.filteredAutoCompleteOptions}\n .filterFunction=${this.filterFunction}\n .renderItemFunction=${this.renderItemFunction}\n .showTooltips=${this.showTooltip}\n .loading=\"${this.loading}\"\n .value=${this.inputValue}\n ?isDropdownOpen=${this.isDropdownOpen}\n .noBorder=${true}\n .noOutline=${true}\n .noPadding=${true}\n .disabled=${this.disabled}\n .readonly=${this.readonly}\n .portal=${this.portal}\n openOnFocus\n exportparts=\"options__wrapper, input, base\"\n .placeholder=${this.placeholder}\n @nile-input=${this.handleInputChange}\n @keydown=${this.handleInputKeydown}\n @nile-focus=${this.handleFocus}\n @nile-blur=${this.handleBlur}\n @nile-complete=${this.handleSelect}\n @mousedown=${this.markDropdownSelectStart}\n\n ></nile-auto-complete>\n `}\n </div>\n </div>\n ${hasHelpText\n ? html` <nile-form-help-text>${this.helpText}</nile-form-help-text> `\n : ``}\n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n </div>\n `;\n }\n\n private handleSelect(event: CustomEvent<CustomEventDetail>) {\n this.isSelectingFromDropdown = false;\n this.resetDropdownState();\n\n // Add the selected value to the tags array only if it doesn't already exist\n const selectedValue = event.detail.value;\n const selectedOption = this.autoCompleteOptions.find(\n (opt) => opt.name === selectedValue || opt.id === selectedValue\n );\n\n let tooltipContent: string | null = null;\n \n if (this.showTooltip) {\n if (selectedOption?.tooltip?.content) {\n const { content, for: showFor } = selectedOption.tooltip;\n if (!showFor || showFor === 'tag') {\n if (content instanceof Promise) {\n this.tooltips = [...this.tooltips, 'Loading...'];\n \n const currentIndex = this.tooltips.length - 1;\n content.then((resolved) => {\n this.tooltips[currentIndex] = resolved;\n this.requestUpdate();\n });\n } else {\n tooltipContent = content;\n }\n }\n } else {\n tooltipContent = selectedOption?.name || selectedValue;\n }\n }\n\n if (!this.noDuplicates || !this.tags.includes(selectedValue)) {\n this.tags = [...this.tags, selectedValue];\n \n\n if (!(selectedOption?.tooltip?.content instanceof Promise)) {\n this.tooltips = [...this.tooltips, tooltipContent];\n }\n \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 addChipFromInputValue(): boolean {\n if (this.noDuplicates && this.tags.includes(this.inputValue)) {\n this.emit('nile-duplicates-blocked');\n return false;\n }\n\n this.tags = [...this.tags, this.inputValue];\n if (this.showTooltip) {\n this.tooltips = [...this.tooltips, this.inputValue];\n } else {\n this.tooltips = [...this.tooltips, null];\n }\n\n this.inputValue = '';\n this.visibilityManager?.cleanup();\n this.emit('nile-chip-change', { value: this.tags });\n return true;\n }\n\n private handleInputKeydown(event: KeyboardEvent) {\n if (\n this.enableTagDelete &&\n (event.key === 'Backspace' || event.key === 'Delete') &&\n !this.inputValue &&\n !this.readonly &&\n !this.disabled\n ) {\n if (this.tags.length === 0) {\n this.chipFocusIndex = null;\n return;\n }\n\n event.preventDefault();\n if (this.chipFocusIndex === null) {\n this.chipFocusIndex = this.tags.length - 1;\n this.requestUpdate();\n return;\n }\n const index = this.chipFocusIndex;\n const removedTag = this.tags[index];\n\n this.tags = this.tags.filter((_, i) => i !== index);\n this.tooltips = this.tooltips.filter((_, i) => i !== index);\n\n this.emit('nile-chip-change', { value: this.tags });\n if (this.tags.length > 0) {\n this.chipFocusIndex = Math.max(0, index - 1);\n } else {\n this.chipFocusIndex = null;\n }\n\n return;\n }\n\n if (this.readonly) {\n const allowedKeys = ['ArrowUp', 'ArrowDown', 'Enter', 'Tab'];\n if (!allowedKeys.includes(event.key)) {\n event.preventDefault();\n return;\n }\n }\n\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 if (this.showTooltip) {\n this.tooltips = [...this.tooltips, this.inputValue];\n } else {\n this.tooltips = [...this.tooltips, null];\n }\n \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 if (this.noAutoComplete) {\n return;\n }\n this.visibilityManager?.setup();\n this.isDropdownOpen = true;\n }\n\n private handleBlur() {\n if (this.isSelectingFromDropdown) return;\n \n if (this.addOnBlur && this.acceptUserInput && this.inputValue) {\n this.addChipFromInputValue();\n }\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.visibilityManager?.cleanup();\n if (!this.noAutoComplete && this.autoComplete) {\n this.autoComplete.value = '';\n this.autoComplete.handleFocus();\n }\n } \n}\n\nexport default NileChip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-chip': NileChip;\n }\n}\n"],"names":["NileChip","d","this","hasSlotController","HasSlotController","tags","inputValue","isDropdownOpen","tooltips","chipFocusIndex","warning","noAutoComplete","error","success","noDuplicates","label","tagVariant","acceptUserInput","addOnBlur","clearable","placeholder","readonly","disabled","portal","enableVirtualScroll","autoCompleteOptions","filteredAutoCompleteOptions","value","noWrap","loading","errorIndexes","helpText","errorMessage","filterFunction","item","searchedValue","toLowerCase","includes","renderItemFunction","enableVisibilityEffect","enableTabClose","showTooltip","enableTagDelete","isSelectingFromDropdown","handleDocumentClick","event","path","composedPath","resetDropdownState","addChipFromInputValue","_this","_inherits","_a","_createClass","key","updated","changedProperties","_this2","super","has","options","JSON","parse","e","Array","isArray","filter","option","onTagsChanged","_firstUpdated","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_changed","updateComplete","inputTarget","renderRoot","querySelector","input","autoComplete","inputElement","visibilityManager","VisibilityManager","host","target","isOpen","onAnchorOutOfView","emit","visible","reason","onDocumentHidden","detail","_context2","stop","firstUpdated","connectedCallback","document","addEventListener","disconnectedCallback","cleanup","removeEventListener","markDropdownSelectStart","render","hasLabelSlot","test","hasLabel","hasHelpText","hasErrorMessage","html","_templateObject","_taggedTemplateLiteral","classMap","map","tag","index","tooltipContent","isFocused","tagText","toString","tagTemplate","_templateObject2","handleRemove","unsafeHTML","_templateObject3","_templateObject4","handleInputChange","handleInputKeydown","handleFocus","handleBlur","_templateObject5","handleSelect","_templateObject6","_templateObject7","selectedValue","selectedOption","find","opt","name","id","tooltip","content","_s$tooltip2","showFor","Promise","concat","_toConsumableArray","currentIndex","length","then","resolved","requestUpdate","resetInput","preventDefault","_","i","Math","max","setup","_this$visibilityManag4","__decorate","get","styles","NileElement","state","prototype","query","property","type","Boolean","String","reflect","attribute","_export","customElement"],"mappings":"0paA2BaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,uEAKYC,KAAAA,CAAiBC,iBAAAA,CAAG,GAAIC,CAAAA,CACvCF,CAAAA,sBAAAA,CAAAA,KAAAA,EACA,WACA,CAAA,OAAA,CAAA,CAGOA,KAAAA,CAAIG,IAAAA,CAAa,GAEjBH,KAAAA,CAAUI,UAAAA,CAAW,GAErBJ,KAAAA,CAAcK,cAAAA,CAAAA,CAAY,EAC1BL,KAAAA,CAAQM,QAAAA,CAAsB,EACtBN,CAAAA,KAAAA,CAAcO,cAAkB,CAAA,IAAA,CAMpBP,KAAAA,CAAOQ,OAAG,CAAA,CAAA,CAAA,CAEZR,KAAAA,CAAcS,cAAG,CAAA,CAAA,CAAA,CAIfT,KAAAA,CAAKU,KAAG,CAAA,CAAA,CAAA,CAGRV,KAAAA,CAAOW,OAAAA,CAAAA,CAAG,CAGVX,CAAAA,KAAAA,CAAYY,cAA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A0B3K,EAAAqK,SAAA,CAAA,cAAA,CAAA,IAAA,IAE7CL,CAAA,CAAA,CAA7BO,EAAS,CAAEK,SAAAA,CAAAA,CAAU,KAAmK5K,CAAAqK,CAAAA,SAAAA,CAAA,qBAAA,EAE3JL,CAAAA,CAAAA,CAAAA,CAAA,CAA7BO,CAAS,CAAA,CAAEK,WAAU,CAAkE5K,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAqK,SAAA,CAAA,oBAAA,CAAA,IAAA,EAI5CL,CAAAA,CAAAA,CAAAA,CAAA,CAA3CO,CAAS,CAAA,CAAEC,KAAMC,OAASE,CAAAA,OAAAA,CAAAA,CAAS,KAAuC3K,CAAAqK,CAAAA,SAAAA,CAAA,6BAAA,EAE/BL,CAAAA,CAAAA,CAAAA,CAAA,CAA3CO,CAAS,CAAA,CAAEC,KAAMC,OAASE,CAAAA,OAAAA,CAAAA,CAAS,KAA+B3K,CAAAqK,CAAAA,SAAAA,CAAA,gBAAA,CAAA,IAAA,EAAA,CAAA,CAEtCL,CAAA,CAAA,CAA5BO,EAAS,CAAEC,IAAAA,CAAMC,WAAwCzK,CAAAqK,CAAAA,SAAAA,CAAA,kBAAA,EAE7BL,CAAAA,CAAAA,CAAAA,CAAA,CAA5BO,CAAS,CAAA,CAAEC,KAAMC,OAAmCzK,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAqK,UAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAAQ,OAAA,KApG1C7K,EAAQgK,CAAA,CAAA,CADpBc,CAAc,CAAA,WAAA,CAAA,CAAA,CACF9K"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{__decorate as t}from"tslib";import{html as i}from"lit";import{state as
|
|
1
|
+
import{__decorate as t}from"tslib";import{html as i}from"lit";import{state as s,query as e,property as h,customElement as o}from"lit/decorators.js";import{s as l}from"./nile-chip.css.esm.js";import{classMap as n}from"lit/directives/class-map.js";import{H as r}from"../internal/slot.esm.js";import{N as a}from"../internal/nile-element.esm.js";import{unsafeHTML as p}from"lit/directives/unsafe-html.js";import{V as c}from"../utilities/visibility-manager.esm.js";let d=class extends a{constructor(){super(...arguments),this.hasSlotController=new r(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=(t,i)=>t.toLowerCase().includes(i.toLowerCase()),this.renderItemFunction=t=>t,this.enableVisibilityEffect=!1,this.enableTabClose=!1,this.showTooltip=!1,this.enableTagDelete=!1,this.isSelectingFromDropdown=!1,this.handleDocumentClick=t=>{const i=t.composedPath();this.isSelectingFromDropdown?this.resetDropdownState():i.includes(this)||(this.addOnBlur&&this.acceptUserInput&&this.inputValue&&this.addChipFromInputValue(),this.isDropdownOpen=!1)}}static get styles(){return[l]}resetDropdownState(){this.isSelectingFromDropdown=!1}updated(t){if(super.updated(t),t.has("autoCompleteOptions")){let t=this.autoCompleteOptions;if("string"==typeof t)try{t=JSON.parse(t)}catch(i){t=[]}this.filteredAutoCompleteOptions=Array.isArray(t)?[...t]:[],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()}async firstUpdated(t){await this.updateComplete;const i=this.noAutoComplete?this.renderRoot.querySelector("nile-input")?.input:this.autoComplete?.inputElement?.input||this.autoComplete?.inputElement;this.visibilityManager=new c({host:this,target:i,enableVisibilityEffect:this.enableVisibilityEffect,enableTabClose:this.enableTabClose,isOpen:()=>this.isDropdownOpen,onAnchorOutOfView:()=>{this.isDropdownOpen=!1,this.autoComplete&&(this.autoComplete.isDropdownOpen=!1),this.emit("nile-visibility-change",{visible:!1,reason:"anchor-out-of-view"})},onDocumentHidden:()=>{this.isDropdownOpen=!1,this.autoComplete&&(this.autoComplete.isDropdownOpen=!1),this.emit("nile-visibility-change",{visible:!1,reason:"document-hidden"})},emit:(t,i)=>this.emit(`nile-${t}`,i)})}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleDocumentClick),this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter((t=>!this.value.includes(t)))),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.visibilityManager?.cleanup(),document.removeEventListener("click",this.handleDocumentClick),this.emit("nile-destroy")}markDropdownSelectStart(t){this.isSelectingFromDropdown=!0}render(){const t=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const s=!!this.label||!!t,e=!!this.helpText,h=!!this.errorMessage;return i`
|
|
2
2
|
<div
|
|
3
3
|
part="form-control"
|
|
4
|
-
class=${n({"form-control":!0,"form-control--medium":!0,"form-control--has-label":
|
|
4
|
+
class=${n({"form-control":!0,"form-control--medium":!0,"form-control--has-label":s,"form-control--has-help-text":e,"nile-chip--disabled":this.disabled})}
|
|
5
5
|
>
|
|
6
6
|
<label
|
|
7
7
|
part="form-control-label"
|
|
8
8
|
class="form-control__label"
|
|
9
9
|
for="input"
|
|
10
|
-
aria-hidden=${
|
|
10
|
+
aria-hidden=${s?"false":"true"}
|
|
11
11
|
>
|
|
12
12
|
<slot name="label">${this.label}</slot>
|
|
13
13
|
</label>
|
|
@@ -16,11 +16,11 @@ import{__decorate as t}from"tslib";import{html as i}from"lit";import{state as e,
|
|
|
16
16
|
part='base'
|
|
17
17
|
class=${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})}
|
|
18
18
|
>
|
|
19
|
-
${this.tags.map(((t,
|
|
19
|
+
${this.tags.map(((t,s)=>{const e=this.tooltips[s],h=this.enableTagDelete&&this.chipFocusIndex===s;let o="";(t||"number"==typeof t)&&(o=t.toString());const l=i`
|
|
20
20
|
<nile-tag
|
|
21
21
|
class=${n({"nile-chip__tags":!0,"nile-chip__tags--focused":h})}
|
|
22
22
|
aria-selected=${h?"true":"false"}
|
|
23
|
-
.variant=${this.errorIndexes.includes(
|
|
23
|
+
.variant=${this.errorIndexes.includes(s)?"error":"normal"}
|
|
24
24
|
@nile-remove=${()=>this.handleRemove(t)}
|
|
25
25
|
removable
|
|
26
26
|
?pill=${"normal"!==this.tagVariant}
|
|
@@ -28,8 +28,8 @@ import{__decorate as t}from"tslib";import{html as i}from"lit";import{state as e,
|
|
|
28
28
|
>
|
|
29
29
|
${p(o)}
|
|
30
30
|
</nile-tag>
|
|
31
|
-
`;return this.showTooltip&&
|
|
32
|
-
<nile-lite-tooltip allowHTML .content=${
|
|
31
|
+
`;return this.showTooltip&&e?i`
|
|
32
|
+
<nile-lite-tooltip allowHTML .content=${e}>
|
|
33
33
|
${l}
|
|
34
34
|
</nile-lite-tooltip>
|
|
35
35
|
`:l}))}
|
|
@@ -73,15 +73,17 @@ import{__decorate as t}from"tslib";import{html as i}from"lit";import{state as e,
|
|
|
73
73
|
@nile-focus=${this.handleFocus}
|
|
74
74
|
@nile-blur=${this.handleBlur}
|
|
75
75
|
@nile-complete=${this.handleSelect}
|
|
76
|
+
@mousedown=${this.markDropdownSelectStart}
|
|
77
|
+
|
|
76
78
|
></nile-auto-complete>
|
|
77
79
|
`}
|
|
78
80
|
</div>
|
|
79
81
|
</div>
|
|
80
|
-
${
|
|
82
|
+
${e?i` <nile-form-help-text>${this.helpText}</nile-form-help-text> `:""}
|
|
81
83
|
${h?i`
|
|
82
84
|
<nile-form-error-message
|
|
83
85
|
>${this.errorMessage}</nile-form-error-message
|
|
84
86
|
>
|
|
85
87
|
`:""}
|
|
86
88
|
</div>
|
|
87
|
-
`}handleSelect(t){const i=t.detail.value,
|
|
89
|
+
`}handleSelect(t){this.isSelectingFromDropdown=!1,this.resetDropdownState();const i=t.detail.value,s=this.autoCompleteOptions.find((t=>t.name===i||t.id===i));let e=null;if(this.showTooltip)if(s?.tooltip?.content){const{content:t,for:i}=s.tooltip;if(!i||"tag"===i)if(t instanceof Promise){this.tooltips=[...this.tooltips,"Loading..."];const i=this.tooltips.length-1;t.then((t=>{this.tooltips[i]=t,this.requestUpdate()}))}else e=t}else e=s?.name||i;this.noDuplicates&&this.tags.includes(i)||(this.tags=[...this.tags,i],s?.tooltip?.content instanceof Promise||(this.tooltips=[...this.tooltips,e]),this.emit("nile-chip-change",{value:this.tags}),this.resetInput())}handleRemove(t){this.tags=this.tags.filter((i=>i!==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}addChipFromInputValue(){return this.noDuplicates&&this.tags.includes(this.inputValue)?(this.emit("nile-duplicates-blocked"),!1):(this.tags=[...this.tags,this.inputValue],this.showTooltip?this.tooltips=[...this.tooltips,this.inputValue]:this.tooltips=[...this.tooltips,null],this.inputValue="",this.visibilityManager?.cleanup(),this.emit("nile-chip-change",{value:this.tags}),!0)}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();const i=this.chipFocusIndex;return this.tags[i],this.tags=this.tags.filter(((t,s)=>s!==i)),this.tooltips=this.tooltips.filter(((t,s)=>s!==i)),this.emit("nile-chip-change",{value:this.tags}),void(this.tags.length>0?this.chipFocusIndex=Math.max(0,i-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=[...this.tags,this.inputValue],this.showTooltip?this.tooltips=[...this.tooltips,this.inputValue]:this.tooltips=[...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"))}handleFocus(){this.noAutoComplete||(this.visibilityManager?.setup(),this.isDropdownOpen=!0)}handleBlur(){this.isSelectingFromDropdown||this.addOnBlur&&this.acceptUserInput&&this.inputValue&&this.addChipFromInputValue()}onTagsChanged(){this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter((t=>!this.tags.includes(t))))}resetInput(){this.inputValue="",this.isDropdownOpen=!1,this.visibilityManager?.cleanup(),!this.noAutoComplete&&this.autoComplete&&(this.autoComplete.value="",this.autoComplete.handleFocus())}};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),d=t([o("nile-chip")],d);export{d as N};
|