@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
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
System.register([],function(_export,_context){"use strict";var t,r,n;function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}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);}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n4=0,F=function F(){};return{s:F,n:function n(){return _n4>=r.length?{done:!0}:{done:!1,value:r[_n4++]};},e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}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 _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);}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);}/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/function i(t){return"horizontal"===t?"width":"height";}/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2021 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
+
*/function s(t){return"horizontal"===t?"marginLeft":"marginTop";}function h(t){return"horizontal"===t?"marginRight":"marginBottom";}function e(t,i){var s=[t,i].sort();return s[1]<=0?Math.min.apply(Math,_toConsumableArray(s)):s[0]>=0?Math.max.apply(Math,_toConsumableArray(s)):s[0]+s[1];}return{setters:[],execute:function execute(){/**
|
|
10
|
+
* @license
|
|
11
|
+
* Copyright 2021 Google LLC
|
|
12
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
+
*/t=/*#__PURE__*/function(){function t(_t){_classCallCheck(this,t);this._map=new Map(),this._roundAverageSize=!1,this.totalSize=0,!0===(_t===null||_t===void 0?void 0:_t.roundAverageSize)&&(this._roundAverageSize=!0);}return _createClass(t,[{key:"set",value:function set(_t2,i){var s=this._map.get(_t2)||0;this._map.set(_t2,i),this.totalSize+=i-s;}},{key:"averageSize",get:function get(){if(this._map.size>0){var _t3=this.totalSize/this._map.size;return this._roundAverageSize?Math.round(_t3):_t3;}return 0;}},{key:"getSize",value:function getSize(_t4){return this._map.get(_t4);}},{key:"clear",value:function clear(){this._map.clear(),this.totalSize=0;}}]);}();r=/*#__PURE__*/function(){function r(){_classCallCheck(this,r);this._childSizeCache=new t(),this._marginSizeCache=new t(),this._metricsCache=new Map();}return _createClass(r,[{key:"update",value:function update(t,_r){var _this=this;var n=new Set();Object.keys(t).forEach(function(s){var h=Number(s);_this._metricsCache.set(h,t[h]),_this._childSizeCache.set(h,t[h][i(_r)]),n.add(h),n.add(h+1);});var _iterator=_createForOfIteratorHelper(n),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _this$_metricsCache$g,_this$_metricsCache$g2;var _t5=_step.value;var _i=((_this$_metricsCache$g=this._metricsCache.get(_t5))===null||_this$_metricsCache$g===void 0?void 0:_this$_metricsCache$g[s(_r)])||0,_n=((_this$_metricsCache$g2=this._metricsCache.get(_t5-1))===null||_this$_metricsCache$g2===void 0?void 0:_this$_metricsCache$g2[h(_r)])||0;this._marginSizeCache.set(_t5,e(_i,_n));}}catch(err){_iterator.e(err);}finally{_iterator.f();}}},{key:"averageChildSize",get:function get(){return this._childSizeCache.averageSize;}},{key:"totalChildSize",get:function get(){return this._childSizeCache.totalSize;}},{key:"averageMarginSize",get:function get(){return this._marginSizeCache.averageSize;}},{key:"totalMarginSize",get:function get(){return this._marginSizeCache.totalSize;}},{key:"getLeadingMarginValue",value:function getLeadingMarginValue(t,i){var _this$_metricsCache$g3;return((_this$_metricsCache$g3=this._metricsCache.get(t))===null||_this$_metricsCache$g3===void 0?void 0:_this$_metricsCache$g3[s(i)])||0;}},{key:"getChildSize",value:function getChildSize(t){return this._childSizeCache.getSize(t);}},{key:"getMarginSize",value:function getMarginSize(t){return this._marginSizeCache.getSize(t);}},{key:"clear",value:function clear(){this._childSizeCache.clear(),this._marginSizeCache.clear(),this._metricsCache.clear();}}]);}();_export("FlowLayout",n=/*#__PURE__*/function(_ref){function n(){var _this2;_classCallCheck(this,n);_this2=_callSuper(this,n,arguments),_this2._itemSize={width:100,height:100},_this2._physicalItems=new Map(),_this2._newPhysicalItems=new Map(),_this2._metricsCache=new r(),_this2._anchorIdx=null,_this2._anchorPos=null,_this2._stable=!0,_this2._measureChildren=!0,_this2._estimate=!0;return _this2;}_inherits(n,_ref);return _createClass(n,[{key:"measureChildren",get:function get(){return this._measureChildren;}},{key:"updateItemSizes",value:function updateItemSizes(t){this._metricsCache.update(t,this.direction),this._scheduleReflow();}},{key:"_getPhysicalItem",value:function _getPhysicalItem(t){var _this$_newPhysicalIte;return(_this$_newPhysicalIte=this._newPhysicalItems.get(t))!==null&&_this$_newPhysicalIte!==void 0?_this$_newPhysicalIte:this._physicalItems.get(t);}},{key:"_getSize",value:function _getSize(t){return this._getPhysicalItem(t)&&this._metricsCache.getChildSize(t);}},{key:"_getAverageSize",value:function _getAverageSize(){return this._metricsCache.averageChildSize||this._itemSize[this._sizeDim];}},{key:"_estimatePosition",value:function _estimatePosition(t){var i=this._metricsCache;if(-1===this._first||-1===this._last)return i.averageMarginSize+t*(i.averageMarginSize+this._getAverageSize());if(t<this._first){var _s=this._first-t;return this._getPhysicalItem(this._first).pos-(i.getMarginSize(this._first-1)||i.averageMarginSize)-(_s*i.averageChildSize+(_s-1)*i.averageMarginSize);}{var _s2=t-this._last;return this._getPhysicalItem(this._last).pos+(i.getChildSize(this._last)||i.averageChildSize)+(i.getMarginSize(this._last)||i.averageMarginSize)+_s2*(i.averageChildSize+i.averageMarginSize);}}},{key:"_getPosition",value:function _getPosition(t){var _this$_metricsCache$g4;var i=this._getPhysicalItem(t),s=this._metricsCache.averageMarginSize;return 0===t?(_this$_metricsCache$g4=this._metricsCache.getMarginSize(0))!==null&&_this$_metricsCache$g4!==void 0?_this$_metricsCache$g4:s:i?i.pos:this._estimatePosition(t);}},{key:"_calculateAnchor",value:function _calculateAnchor(t,i){return t<=0?0:i>this._scrollSize-this._viewDim1?this.items.length-1:Math.max(0,Math.min(this.items.length-1,Math.floor((t+i)/2/this._delta)));}},{key:"_getAnchor",value:function _getAnchor(t,i){if(0===this._physicalItems.size)return this._calculateAnchor(t,i);if(this._first<0)return this._calculateAnchor(t,i);if(this._last<0)return this._calculateAnchor(t,i);var s=this._getPhysicalItem(this._first),h=this._getPhysicalItem(this._last),e=s.pos;if(h.pos+this._metricsCache.getChildSize(this._last)<t)return this._calculateAnchor(t,i);if(e>i)return this._calculateAnchor(t,i);var r=this._firstVisible-1,_n2=-1/0;for(;_n2<t;){_n2=this._getPhysicalItem(++r).pos+this._metricsCache.getChildSize(r);}return r;}},{key:"_getActiveItems",value:function _getActiveItems(){0===this._viewDim1||0===this.items.length?this._clearItems():this._getItems();}},{key:"_clearItems",value:function _clearItems(){this._first=-1,this._last=-1,this._physicalMin=0,this._physicalMax=0;var t=this._newPhysicalItems;this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=t,this._stable=!0;}},{key:"_getItems",value:function _getItems(){var _this$_metricsCache$g5,_this$_metricsCache$g6;var t=this._newPhysicalItems;var i,s;if(this._stable=!0,null!==this.pin){var _t6=this.pin.index;this._anchorIdx=_t6,this._anchorPos=this._getPosition(_t6);}if(i=this._scrollPosition-this._overhang,s=this._scrollPosition+this._viewDim1+this._overhang,s<0||i>this._scrollSize)return void this._clearItems();null!==this._anchorIdx&&null!==this._anchorPos||(this._anchorIdx=this._getAnchor(i,s),this._anchorPos=this._getPosition(this._anchorIdx));var h=this._getSize(this._anchorIdx);void 0===h&&(this._stable=!1,h=this._getAverageSize());var e=(_this$_metricsCache$g5=this._metricsCache.getMarginSize(this._anchorIdx))!==null&&_this$_metricsCache$g5!==void 0?_this$_metricsCache$g5:this._metricsCache.averageMarginSize,r=(_this$_metricsCache$g6=this._metricsCache.getMarginSize(this._anchorIdx+1))!==null&&_this$_metricsCache$g6!==void 0?_this$_metricsCache$g6:this._metricsCache.averageMarginSize;0===this._anchorIdx&&(this._anchorPos=e),this._anchorIdx===this.items.length-1&&(this._anchorPos=this._scrollSize-r-h);var _n3=0;for(this._anchorPos+h+r<i&&(_n3=i-(this._anchorPos+h+r)),this._anchorPos-e>s&&(_n3=s-(this._anchorPos-e)),_n3&&(this._scrollPosition-=_n3,i-=_n3,s-=_n3,this._scrollError+=_n3),t.set(this._anchorIdx,{pos:this._anchorPos,size:h}),this._first=this._last=this._anchorIdx,this._physicalMin=this._anchorPos-e,this._physicalMax=this._anchorPos+h+r;this._physicalMin>i&&this._first>0;){var _i2=this._getSize(--this._first);void 0===_i2&&(this._stable=!1,_i2=this._getAverageSize());var _s3=this._metricsCache.getMarginSize(this._first);void 0===_s3&&(this._stable=!1,_s3=this._metricsCache.averageMarginSize),this._physicalMin-=_i2;var _h=this._physicalMin;if(t.set(this._first,{pos:_h,size:_i2}),this._physicalMin-=_s3,!1===this._stable&&!1===this._estimate)break;}for(;this._physicalMax<s&&this._last<this.items.length-1;){var _i3=this._getSize(++this._last);void 0===_i3&&(this._stable=!1,_i3=this._getAverageSize());var _s4=this._metricsCache.getMarginSize(this._last);void 0===_s4&&(this._stable=!1,_s4=this._metricsCache.averageMarginSize);var _h2=this._physicalMax;if(t.set(this._last,{pos:_h2,size:_i3}),this._physicalMax+=_i3+_s4,!this._stable&&!this._estimate)break;}var o=this._calculateError();o&&(this._physicalMin-=o,this._physicalMax-=o,this._anchorPos-=o,this._scrollPosition-=o,t.forEach(function(t){return t.pos-=o;}),this._scrollError+=o),this._stable&&(this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=t);}},{key:"_calculateError",value:function _calculateError(){return 0===this._first?this._physicalMin:this._physicalMin<=0?this._physicalMin-this._first*this._delta:this._last===this.items.length-1?this._physicalMax-this._scrollSize:this._physicalMax>=this._scrollSize?this._physicalMax-this._scrollSize+(this.items.length-1-this._last)*this._delta:0;}},{key:"_reflow",value:function _reflow(){var t=this._first,i=this._last;_superPropGet(n,"_reflow",this,3)([]),(-1===this._first&&-1==this._last||this._first===t&&this._last===i)&&this._resetReflowState();}},{key:"_resetReflowState",value:function _resetReflowState(){this._anchorIdx=null,this._anchorPos=null,this._stable=!0;}},{key:"_updateScrollSize",value:function _updateScrollSize(){var t=this._metricsCache.averageMarginSize;this._scrollSize=Math.max(1,this.items.length*(t+this._getAverageSize())+t);}},{key:"_delta",get:function get(){var t=this._metricsCache.averageMarginSize;return this._getAverageSize()+t;}},{key:"_getItemPosition",value:function _getItemPosition(t){var _this$_metricsCache$g7;return _defineProperty(_defineProperty(_defineProperty({},this._positionDim,this._getPosition(t)),this._secondaryPositionDim,0),(i=this.direction,"horizontal"===i?"xOffset":"yOffset"),-((_this$_metricsCache$g7=this._metricsCache.getLeadingMarginValue(t,this.direction))!==null&&_this$_metricsCache$g7!==void 0?_this$_metricsCache$g7:this._metricsCache.averageMarginSize));var i;}},{key:"_getItemSize",value:function _getItemSize(t){return _defineProperty(_defineProperty({},this._sizeDim,this._getSize(t)||this._getAverageSize()),this._secondarySizeDim,this._itemSize[this._secondarySizeDim]);}},{key:"_viewDim2Changed",value:function _viewDim2Changed(){this._metricsCache.clear(),this._scheduleReflow();}}]);}(/*#__PURE__*/function(){function _class(t,i){var _this3=this;_classCallCheck(this,_class);this._latestCoords={left:0,top:0},this._direction=null,this._viewportSize={width:0,height:0},this.totalScrollSize={width:0,height:0},this.offsetWithinScroller={left:0,top:0},this._pendingReflow=!1,this._pendingLayoutUpdate=!1,this._pin=null,this._firstVisible=0,this._lastVisible=0,this._physicalMin=0,this._physicalMax=0,this._first=-1,this._last=-1,this._sizeDim="height",this._secondarySizeDim="width",this._positionDim="top",this._secondaryPositionDim="left",this._scrollPosition=0,this._scrollError=0,this._items=[],this._scrollSize=1,this._overhang=1e3,this._hostSink=t,Promise.resolve().then(function(){return _this3.config=i||_this3._getDefaultConfig();});}return _createClass(_class,[{key:"_getDefaultConfig",value:function _getDefaultConfig(){return{direction:"vertical"};}},{key:"config",get:function get(){return{direction:this.direction};},set:function set(t){Object.assign(this,Object.assign({},this._getDefaultConfig(),t));}},{key:"items",get:function get(){return this._items;},set:function set(t){this._setItems(t);}},{key:"_setItems",value:function _setItems(t){t!==this._items&&(this._items=t,this._scheduleReflow());}},{key:"direction",get:function get(){return this._direction;},set:function set(t){(t="horizontal"===t?t:"vertical")!==this._direction&&(this._direction=t,this._sizeDim="horizontal"===t?"width":"height",this._secondarySizeDim="horizontal"===t?"height":"width",this._positionDim="horizontal"===t?"left":"top",this._secondaryPositionDim="horizontal"===t?"top":"left",this._triggerReflow());}},{key:"viewportSize",get:function get(){return this._viewportSize;},set:function set(t){var i=this._viewDim1,s=this._viewDim2;Object.assign(this._viewportSize,t),s!==this._viewDim2?this._scheduleLayoutUpdate():i!==this._viewDim1&&this._checkThresholds();}},{key:"viewportScroll",get:function get(){return this._latestCoords;},set:function set(t){Object.assign(this._latestCoords,t);var i=this._scrollPosition;this._scrollPosition=this._latestCoords[this._positionDim];Math.abs(i-this._scrollPosition)>=1&&this._checkThresholds();}},{key:"reflowIfNeeded",value:function reflowIfNeeded(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;(t||this._pendingReflow)&&(this._pendingReflow=!1,this._reflow());}},{key:"pin",get:function get(){if(null!==this._pin){var _this$_pin=this._pin,_t7=_this$_pin.index,_i4=_this$_pin.block;return{index:Math.max(0,Math.min(_t7,this.items.length-1)),block:_i4};}return null;},set:function set(t){this._pin=t,this._triggerReflow();}},{key:"_clampScrollPosition",value:function _clampScrollPosition(t){return Math.max(-this.offsetWithinScroller[this._positionDim],Math.min(t,this.totalScrollSize[i(this.direction)]-this._viewDim1));}},{key:"unpin",value:function unpin(){null!==this._pin&&(this._sendUnpinnedMessage(),this._pin=null);}},{key:"_updateLayout",value:function _updateLayout(){}},{key:"_viewDim1",get:function get(){return this._viewportSize[this._sizeDim];}},{key:"_viewDim2",get:function get(){return this._viewportSize[this._secondarySizeDim];}},{key:"_scheduleReflow",value:function _scheduleReflow(){this._pendingReflow=!0;}},{key:"_scheduleLayoutUpdate",value:function _scheduleLayoutUpdate(){this._pendingLayoutUpdate=!0,this._scheduleReflow();}},{key:"_triggerReflow",value:function _triggerReflow(){var _this4=this;this._scheduleLayoutUpdate(),Promise.resolve().then(function(){return _this4.reflowIfNeeded();});}},{key:"_reflow",value:function _reflow(){this._pendingLayoutUpdate&&(this._updateLayout(),this._pendingLayoutUpdate=!1),this._updateScrollSize(),this._setPositionFromPin(),this._getActiveItems(),this._updateVisibleIndices(),this._sendStateChangedMessage();}},{key:"_setPositionFromPin",value:function _setPositionFromPin(){if(null!==this.pin){var _t8=this._scrollPosition,_this$pin=this.pin,_i5=_this$pin.index,_s5=_this$pin.block;this._scrollPosition=this._calculateScrollIntoViewPosition({index:_i5,block:_s5||"start"})-this.offsetWithinScroller[this._positionDim],this._scrollError=_t8-this._scrollPosition;}}},{key:"_calculateScrollIntoViewPosition",value:function _calculateScrollIntoViewPosition(t){var i=t.block,s=Math.min(this.items.length,Math.max(0,t.index)),h=this._getItemPosition(s)[this._positionDim];var e=h;if("start"!==i){var _t9=this._getItemSize(s)[this._sizeDim];if("center"===i)e=h-.5*this._viewDim1+.5*_t9;else{var _s6=h-this._viewDim1+_t9;if("end"===i)e=_s6;else{var _t0=this._scrollPosition;e=Math.abs(_t0-h)<Math.abs(_t0-_s6)?h:_s6;}}}return e+=this.offsetWithinScroller[this._positionDim],this._clampScrollPosition(e);}},{key:"getScrollIntoViewCoordinates",value:function getScrollIntoViewCoordinates(t){return _defineProperty({},this._positionDim,this._calculateScrollIntoViewPosition(t));}},{key:"_sendUnpinnedMessage",value:function _sendUnpinnedMessage(){this._hostSink({type:"unpinned"});}},{key:"_sendVisibilityChangedMessage",value:function _sendVisibilityChangedMessage(){this._hostSink({type:"visibilityChanged",firstVisible:this._firstVisible,lastVisible:this._lastVisible});}},{key:"_sendStateChangedMessage",value:function _sendStateChangedMessage(){var t=new Map();if(-1!==this._first&&-1!==this._last)for(var _i6=this._first;_i6<=this._last;_i6++)t.set(_i6,this._getItemPosition(_i6));var i={type:"stateChanged",scrollSize:_defineProperty(_defineProperty({},this._sizeDim,this._scrollSize),this._secondarySizeDim,null),range:{first:this._first,last:this._last,firstVisible:this._firstVisible,lastVisible:this._lastVisible},childPositions:t};this._scrollError&&(i.scrollError=_defineProperty(_defineProperty({},this._positionDim,this._scrollError),this._secondaryPositionDim,0),this._scrollError=0),this._hostSink(i);}},{key:"_num",get:function get(){return-1===this._first||-1===this._last?0:this._last-this._first+1;}},{key:"_checkThresholds",value:function _checkThresholds(){if(0===this._viewDim1&&this._num>0||null!==this._pin)this._scheduleReflow();else{var _t1=Math.max(0,this._scrollPosition-this._overhang),_i7=Math.min(this._scrollSize,this._scrollPosition+this._viewDim1+this._overhang);this._physicalMin>_t1||this._physicalMax<_i7?this._scheduleReflow():this._updateVisibleIndices({emit:!0});}}},{key:"_updateVisibleIndices",value:function _updateVisibleIndices(t){if(-1===this._first||-1===this._last)return;var i=this._first;for(;i<this._last&&Math.round(this._getItemPosition(i)[this._positionDim]+this._getItemSize(i)[this._sizeDim])<=Math.round(this._scrollPosition);)i++;var s=this._last;for(;s>this._first&&Math.round(this._getItemPosition(s)[this._positionDim])>=Math.round(this._scrollPosition+this._viewDim1);)s--;i===this._firstVisible&&s===this._lastVisible||(this._firstVisible=i,this._lastVisible=s,t&&t.emit&&this._sendVisibilityChangedMessage());}}]);}()));}};});
|
|
14
|
+
//# sourceMappingURL=flow-ca47f938.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow-ca47f938.cjs.js","sources":["../../../node_modules/@lit-labs/virtualizer/layouts/shared/BaseLayout.js","../../../node_modules/@lit-labs/virtualizer/layouts/flow.js","../../../node_modules/@lit-labs/virtualizer/layouts/shared/SizeCache.js"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nexport function dim1(direction) {\n return direction === 'horizontal' ? 'width' : 'height';\n}\nexport function dim2(direction) {\n return direction === 'horizontal' ? 'height' : 'width';\n}\nexport function pos1(direction) {\n return direction === 'horizontal' ? 'left' : 'top';\n}\nexport function pos2(direction) {\n return direction === 'horizontal' ? 'top' : 'left';\n}\nexport class BaseLayout {\n _getDefaultConfig() {\n return {\n direction: 'vertical',\n };\n }\n constructor(hostSink, config) {\n /**\n * The last set viewport scroll position.\n */\n this._latestCoords = { left: 0, top: 0 };\n /**\n * Scrolling direction.\n */\n this._direction = null;\n /**\n * Dimensions of the viewport.\n */\n this._viewportSize = { width: 0, height: 0 };\n this.totalScrollSize = { width: 0, height: 0 };\n this.offsetWithinScroller = { left: 0, top: 0 };\n /**\n * Flag for debouncing asynchronous reflow requests.\n */\n this._pendingReflow = false;\n this._pendingLayoutUpdate = false;\n this._pin = null;\n /**\n * The index of the first item intersecting the viewport.\n */\n this._firstVisible = 0;\n /**\n * The index of the last item intersecting the viewport.\n */\n this._lastVisible = 0;\n /**\n * Pixel offset in the scroll direction of the first child.\n */\n this._physicalMin = 0;\n /**\n * Pixel offset in the scroll direction of the last child.\n */\n this._physicalMax = 0;\n /**\n * Index of the first child.\n */\n this._first = -1;\n /**\n * Index of the last child.\n */\n this._last = -1;\n /**\n * Length in the scrolling direction.\n */\n this._sizeDim = 'height';\n /**\n * Length in the non-scrolling direction.\n */\n this._secondarySizeDim = 'width';\n /**\n * Position in the scrolling direction.\n */\n this._positionDim = 'top';\n /**\n * Position in the non-scrolling direction.\n */\n this._secondaryPositionDim = 'left';\n /**\n * Current scroll offset in pixels.\n */\n this._scrollPosition = 0;\n /**\n * Difference between current scroll offset and scroll offset calculated due\n * to a reflow.\n */\n this._scrollError = 0;\n /**\n * Total number of items that could possibly be displayed. Used to help\n * calculate the scroll size.\n */\n this._items = [];\n /**\n * The total (estimated) length of all items in the scrolling direction.\n */\n this._scrollSize = 1;\n /**\n * Number of pixels beyond the viewport to still include\n * in the active range of items.\n */\n // TODO (graynorton): Probably want to make this something we calculate based\n // on viewport size, item size, other factors, possibly still with a dial of some kind\n this._overhang = 1000;\n this._hostSink = hostSink;\n // Delay setting config so that subclasses do setup work first\n Promise.resolve().then(() => (this.config = config || this._getDefaultConfig()));\n }\n set config(config) {\n Object.assign(this, Object.assign({}, this._getDefaultConfig(), config));\n }\n get config() {\n return {\n direction: this.direction,\n };\n }\n /**\n * Maximum index of children + 1, to help estimate total height of the scroll\n * space.\n */\n get items() {\n return this._items;\n }\n set items(items) {\n this._setItems(items);\n }\n _setItems(items) {\n if (items !== this._items) {\n this._items = items;\n this._scheduleReflow();\n }\n }\n /**\n * Primary scrolling direction.\n */\n get direction() {\n return this._direction;\n }\n set direction(dir) {\n // Force it to be either horizontal or vertical.\n dir = dir === 'horizontal' ? dir : 'vertical';\n if (dir !== this._direction) {\n this._direction = dir;\n this._sizeDim = dir === 'horizontal' ? 'width' : 'height';\n this._secondarySizeDim = dir === 'horizontal' ? 'height' : 'width';\n this._positionDim = dir === 'horizontal' ? 'left' : 'top';\n this._secondaryPositionDim = dir === 'horizontal' ? 'top' : 'left';\n this._triggerReflow();\n }\n }\n /**\n * Height and width of the viewport.\n */\n get viewportSize() {\n return this._viewportSize;\n }\n set viewportSize(dims) {\n const { _viewDim1, _viewDim2 } = this;\n Object.assign(this._viewportSize, dims);\n if (_viewDim2 !== this._viewDim2) {\n // this._viewDim2Changed();\n this._scheduleLayoutUpdate();\n }\n else if (_viewDim1 !== this._viewDim1) {\n this._checkThresholds();\n }\n }\n /**\n * Scroll offset of the viewport.\n */\n get viewportScroll() {\n return this._latestCoords;\n }\n set viewportScroll(coords) {\n Object.assign(this._latestCoords, coords);\n const oldPos = this._scrollPosition;\n this._scrollPosition = this._latestCoords[this._positionDim];\n const change = Math.abs(oldPos - this._scrollPosition);\n if (change >= 1) {\n this._checkThresholds();\n }\n }\n /**\n * Perform a reflow if one has been scheduled.\n */\n reflowIfNeeded(force = false) {\n if (force || this._pendingReflow) {\n this._pendingReflow = false;\n this._reflow();\n }\n }\n set pin(options) {\n this._pin = options;\n this._triggerReflow();\n }\n get pin() {\n if (this._pin !== null) {\n const { index, block } = this._pin;\n return {\n index: Math.max(0, Math.min(index, this.items.length - 1)),\n block,\n };\n }\n return null;\n }\n _clampScrollPosition(val) {\n return Math.max(-this.offsetWithinScroller[this._positionDim], Math.min(val, this.totalScrollSize[dim1(this.direction)] - this._viewDim1));\n }\n unpin() {\n if (this._pin !== null) {\n this._sendUnpinnedMessage();\n this._pin = null;\n }\n }\n _updateLayout() {\n // Override\n }\n // protected _viewDim2Changed(): void {\n // this._scheduleLayoutUpdate();\n // }\n /**\n * The height or width of the viewport, whichever corresponds to the scrolling direction.\n */\n get _viewDim1() {\n return this._viewportSize[this._sizeDim];\n }\n /**\n * The height or width of the viewport, whichever does NOT correspond to the scrolling direction.\n */\n get _viewDim2() {\n return this._viewportSize[this._secondarySizeDim];\n }\n _scheduleReflow() {\n this._pendingReflow = true;\n }\n _scheduleLayoutUpdate() {\n this._pendingLayoutUpdate = true;\n this._scheduleReflow();\n }\n // For triggering a reflow based on incoming changes to\n // the layout config.\n _triggerReflow() {\n this._scheduleLayoutUpdate();\n // TODO graynorton@: reflowIfNeeded() isn't really supposed\n // to be called internally. Address in larger cleanup\n // of virtualizer / layout interaction pattern.\n // this.reflowIfNeeded(true);\n Promise.resolve().then(() => this.reflowIfNeeded());\n }\n _reflow() {\n if (this._pendingLayoutUpdate) {\n this._updateLayout();\n this._pendingLayoutUpdate = false;\n }\n this._updateScrollSize();\n this._setPositionFromPin();\n this._getActiveItems();\n this._updateVisibleIndices();\n this._sendStateChangedMessage();\n }\n /**\n * If we are supposed to be pinned to a particular\n * item or set of coordinates, we set `_scrollPosition`\n * accordingly and adjust `_scrollError` as needed\n * so that the virtualizer can keep the scroll\n * position in the DOM in sync\n */\n _setPositionFromPin() {\n if (this.pin !== null) {\n const lastScrollPosition = this._scrollPosition;\n const { index, block } = this.pin;\n this._scrollPosition =\n this._calculateScrollIntoViewPosition({\n index,\n block: block || 'start',\n }) - this.offsetWithinScroller[this._positionDim];\n this._scrollError = lastScrollPosition - this._scrollPosition;\n }\n }\n /**\n * Calculate the coordinates to scroll to, given\n * a request to scroll to the element at a specific\n * index.\n *\n * Supports the same positioning options (`start`,\n * `center`, `end`, `nearest`) as the standard\n * `Element.scrollIntoView()` method, but currently\n * only considers the provided value in the `block`\n * dimension, since we don't yet have any layouts\n * that support virtualization in two dimensions.\n */\n _calculateScrollIntoViewPosition(options) {\n const { block } = options;\n const index = Math.min(this.items.length, Math.max(0, options.index));\n const itemStartPosition = this._getItemPosition(index)[this._positionDim];\n let scrollPosition = itemStartPosition;\n if (block !== 'start') {\n const itemSize = this._getItemSize(index)[this._sizeDim];\n if (block === 'center') {\n scrollPosition =\n itemStartPosition - 0.5 * this._viewDim1 + 0.5 * itemSize;\n }\n else {\n const itemEndPosition = itemStartPosition - this._viewDim1 + itemSize;\n if (block === 'end') {\n scrollPosition = itemEndPosition;\n }\n else {\n // block === 'nearest'\n const currentScrollPosition = this._scrollPosition;\n scrollPosition =\n Math.abs(currentScrollPosition - itemStartPosition) <\n Math.abs(currentScrollPosition - itemEndPosition)\n ? itemStartPosition\n : itemEndPosition;\n }\n }\n }\n scrollPosition += this.offsetWithinScroller[this._positionDim];\n return this._clampScrollPosition(scrollPosition);\n }\n getScrollIntoViewCoordinates(options) {\n return {\n [this._positionDim]: this._calculateScrollIntoViewPosition(options),\n };\n }\n _sendUnpinnedMessage() {\n this._hostSink({\n type: 'unpinned',\n });\n }\n _sendVisibilityChangedMessage() {\n this._hostSink({\n type: 'visibilityChanged',\n firstVisible: this._firstVisible,\n lastVisible: this._lastVisible,\n });\n }\n _sendStateChangedMessage() {\n const childPositions = new Map();\n if (this._first !== -1 && this._last !== -1) {\n for (let idx = this._first; idx <= this._last; idx++) {\n childPositions.set(idx, this._getItemPosition(idx));\n }\n }\n const message = {\n type: 'stateChanged',\n scrollSize: {\n [this._sizeDim]: this._scrollSize,\n [this._secondarySizeDim]: null,\n },\n range: {\n first: this._first,\n last: this._last,\n firstVisible: this._firstVisible,\n lastVisible: this._lastVisible,\n },\n childPositions,\n };\n if (this._scrollError) {\n message.scrollError = {\n [this._positionDim]: this._scrollError,\n [this._secondaryPositionDim]: 0,\n };\n this._scrollError = 0;\n }\n this._hostSink(message);\n }\n /**\n * Number of items to display.\n */\n get _num() {\n if (this._first === -1 || this._last === -1) {\n return 0;\n }\n return this._last - this._first + 1;\n }\n _checkThresholds() {\n if ((this._viewDim1 === 0 && this._num > 0) || this._pin !== null) {\n this._scheduleReflow();\n }\n else {\n const min = Math.max(0, this._scrollPosition - this._overhang);\n const max = Math.min(this._scrollSize, this._scrollPosition + this._viewDim1 + this._overhang);\n if (this._physicalMin > min || this._physicalMax < max) {\n this._scheduleReflow();\n }\n else {\n this._updateVisibleIndices({ emit: true });\n }\n }\n }\n /**\n * Find the indices of the first and last items to intersect the viewport.\n * Emit a visibleindiceschange event when either index changes.\n */\n _updateVisibleIndices(options) {\n if (this._first === -1 || this._last === -1)\n return;\n let firstVisible = this._first;\n while (firstVisible < this._last &&\n Math.round(this._getItemPosition(firstVisible)[this._positionDim] +\n this._getItemSize(firstVisible)[this._sizeDim]) <= Math.round(this._scrollPosition)) {\n firstVisible++;\n }\n let lastVisible = this._last;\n while (lastVisible > this._first &&\n Math.round(this._getItemPosition(lastVisible)[this._positionDim]) >=\n Math.round(this._scrollPosition + this._viewDim1)) {\n lastVisible--;\n }\n if (firstVisible !== this._firstVisible ||\n lastVisible !== this._lastVisible) {\n this._firstVisible = firstVisible;\n this._lastVisible = lastVisible;\n if (options && options.emit) {\n this._sendVisibilityChangedMessage();\n }\n }\n }\n}\n//# sourceMappingURL=BaseLayout.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { SizeCache } from './shared/SizeCache.js';\nimport { BaseLayout, dim1 } from './shared/BaseLayout.js';\nexport const flow = (config) => Object.assign({\n type: FlowLayout,\n}, config);\nfunction leadingMargin(direction) {\n return direction === 'horizontal' ? 'marginLeft' : 'marginTop';\n}\nfunction trailingMargin(direction) {\n return direction === 'horizontal' ? 'marginRight' : 'marginBottom';\n}\nfunction offset(direction) {\n return direction === 'horizontal' ? 'xOffset' : 'yOffset';\n}\nfunction collapseMargins(a, b) {\n const m = [a, b].sort();\n return m[1] <= 0 ? Math.min(...m) : m[0] >= 0 ? Math.max(...m) : m[0] + m[1];\n}\nclass MetricsCache {\n constructor() {\n this._childSizeCache = new SizeCache();\n this._marginSizeCache = new SizeCache();\n this._metricsCache = new Map();\n }\n update(metrics, direction) {\n const marginsToUpdate = new Set();\n Object.keys(metrics).forEach((key) => {\n const k = Number(key);\n this._metricsCache.set(k, metrics[k]);\n this._childSizeCache.set(k, metrics[k][dim1(direction)]);\n marginsToUpdate.add(k);\n marginsToUpdate.add(k + 1);\n });\n for (const k of marginsToUpdate) {\n const a = this._metricsCache.get(k)?.[leadingMargin(direction)] || 0;\n const b = this._metricsCache.get(k - 1)?.[trailingMargin(direction)] || 0;\n this._marginSizeCache.set(k, collapseMargins(a, b));\n }\n }\n get averageChildSize() {\n return this._childSizeCache.averageSize;\n }\n get totalChildSize() {\n return this._childSizeCache.totalSize;\n }\n get averageMarginSize() {\n return this._marginSizeCache.averageSize;\n }\n get totalMarginSize() {\n return this._marginSizeCache.totalSize;\n }\n getLeadingMarginValue(index, direction) {\n return this._metricsCache.get(index)?.[leadingMargin(direction)] || 0;\n }\n getChildSize(index) {\n return this._childSizeCache.getSize(index);\n }\n getMarginSize(index) {\n return this._marginSizeCache.getSize(index);\n }\n clear() {\n this._childSizeCache.clear();\n this._marginSizeCache.clear();\n this._metricsCache.clear();\n }\n}\nexport class FlowLayout extends BaseLayout {\n constructor() {\n super(...arguments);\n /**\n * Initial estimate of item size\n */\n this._itemSize = { width: 100, height: 100 };\n /**\n * Indices of children mapped to their (position and length) in the scrolling\n * direction. Used to keep track of children that are in range.\n */\n this._physicalItems = new Map();\n /**\n * Used in tandem with _physicalItems to track children in range across\n * reflows.\n */\n this._newPhysicalItems = new Map();\n /**\n * Width and height of children by their index.\n */\n this._metricsCache = new MetricsCache();\n /**\n * anchorIdx is the anchor around which we reflow. It is designed to allow\n * jumping to any point of the scroll size. We choose it once and stick with\n * it until stable. _first and _last are deduced around it.\n */\n this._anchorIdx = null;\n /**\n * Position in the scrolling direction of the anchor child.\n */\n this._anchorPos = null;\n /**\n * Whether all children in range were in range during the previous reflow.\n */\n this._stable = true;\n this._measureChildren = true;\n this._estimate = true;\n }\n // protected _defaultConfig: BaseLayoutConfig = Object.assign({}, super._defaultConfig, {\n // })\n // constructor(config: Layout1dConfig) {\n // super(config);\n // }\n get measureChildren() {\n return this._measureChildren;\n }\n /**\n * Determine the average size of all children represented in the sizes\n * argument.\n */\n updateItemSizes(sizes) {\n this._metricsCache.update(sizes, this.direction);\n // if (this._nMeasured) {\n // this._updateItemSize();\n this._scheduleReflow();\n // }\n }\n /**\n * Set the average item size based on the total length and number of children\n * in range.\n */\n // _updateItemSize() {\n // // Keep integer values.\n // this._itemSize[this._sizeDim] = this._metricsCache.averageChildSize;\n // }\n _getPhysicalItem(idx) {\n return this._newPhysicalItems.get(idx) ?? this._physicalItems.get(idx);\n }\n _getSize(idx) {\n const item = this._getPhysicalItem(idx);\n return item && this._metricsCache.getChildSize(idx);\n }\n _getAverageSize() {\n return this._metricsCache.averageChildSize || this._itemSize[this._sizeDim];\n }\n _estimatePosition(idx) {\n const c = this._metricsCache;\n if (this._first === -1 || this._last === -1) {\n return (c.averageMarginSize +\n idx * (c.averageMarginSize + this._getAverageSize()));\n }\n else {\n if (idx < this._first) {\n const delta = this._first - idx;\n const refItem = this._getPhysicalItem(this._first);\n return (refItem.pos -\n (c.getMarginSize(this._first - 1) || c.averageMarginSize) -\n (delta * c.averageChildSize + (delta - 1) * c.averageMarginSize));\n }\n else {\n const delta = idx - this._last;\n const refItem = this._getPhysicalItem(this._last);\n return (refItem.pos +\n (c.getChildSize(this._last) || c.averageChildSize) +\n (c.getMarginSize(this._last) || c.averageMarginSize) +\n delta * (c.averageChildSize + c.averageMarginSize));\n }\n }\n }\n /**\n * Returns the position in the scrolling direction of the item at idx.\n * Estimates it if the item at idx is not in the DOM.\n */\n _getPosition(idx) {\n const item = this._getPhysicalItem(idx);\n const { averageMarginSize } = this._metricsCache;\n return idx === 0\n ? this._metricsCache.getMarginSize(0) ?? averageMarginSize\n : item\n ? item.pos\n : this._estimatePosition(idx);\n }\n _calculateAnchor(lower, upper) {\n if (lower <= 0) {\n return 0;\n }\n if (upper > this._scrollSize - this._viewDim1) {\n return this.items.length - 1;\n }\n return Math.max(0, Math.min(this.items.length - 1, Math.floor((lower + upper) / 2 / this._delta)));\n }\n _getAnchor(lower, upper) {\n if (this._physicalItems.size === 0) {\n return this._calculateAnchor(lower, upper);\n }\n if (this._first < 0) {\n return this._calculateAnchor(lower, upper);\n }\n if (this._last < 0) {\n return this._calculateAnchor(lower, upper);\n }\n const firstItem = this._getPhysicalItem(this._first), lastItem = this._getPhysicalItem(this._last), firstMin = firstItem.pos, lastMin = lastItem.pos, lastMax = lastMin + this._metricsCache.getChildSize(this._last);\n if (lastMax < lower) {\n // Window is entirely past physical items, calculate new anchor\n return this._calculateAnchor(lower, upper);\n }\n if (firstMin > upper) {\n // Window is entirely before physical items, calculate new anchor\n return this._calculateAnchor(lower, upper);\n }\n // Window contains a physical item\n // Find one, starting with the one that was previously first visible\n let candidateIdx = this._firstVisible - 1;\n let cMax = -Infinity;\n while (cMax < lower) {\n const candidate = this._getPhysicalItem(++candidateIdx);\n cMax = candidate.pos + this._metricsCache.getChildSize(candidateIdx);\n }\n return candidateIdx;\n }\n /**\n * Updates _first and _last based on items that should be in the current\n * viewed range.\n */\n _getActiveItems() {\n if (this._viewDim1 === 0 || this.items.length === 0) {\n this._clearItems();\n }\n else {\n this._getItems();\n }\n }\n /**\n * Sets the range to empty.\n */\n _clearItems() {\n this._first = -1;\n this._last = -1;\n this._physicalMin = 0;\n this._physicalMax = 0;\n const items = this._newPhysicalItems;\n this._newPhysicalItems = this._physicalItems;\n this._newPhysicalItems.clear();\n this._physicalItems = items;\n this._stable = true;\n }\n /*\n * Updates _first and _last based on items that should be in the given range.\n */\n _getItems() {\n const items = this._newPhysicalItems;\n this._stable = true;\n let lower, upper;\n // The anchorIdx is the anchor around which we reflow. It is designed to\n // allow jumping to any point of the scroll size. We choose it once and\n // stick with it until stable. first and last are deduced around it.\n // If we have a pinned item, we anchor on it\n if (this.pin !== null) {\n const { index } = this.pin;\n this._anchorIdx = index;\n this._anchorPos = this._getPosition(index);\n }\n // Determine the lower and upper bounds of the region to be\n // rendered, relative to the viewport\n lower = this._scrollPosition - this._overhang; //leadingOverhang;\n upper = this._scrollPosition + this._viewDim1 + this._overhang; // trailingOverhang;\n if (upper < 0 || lower > this._scrollSize) {\n this._clearItems();\n return;\n }\n // If we are scrolling to a specific index or if we are doing another\n // pass to stabilize a previously started reflow, we will already\n // have an anchor. If not, establish an anchor now.\n if (this._anchorIdx === null || this._anchorPos === null) {\n this._anchorIdx = this._getAnchor(lower, upper);\n this._anchorPos = this._getPosition(this._anchorIdx);\n }\n let anchorSize = this._getSize(this._anchorIdx);\n if (anchorSize === undefined) {\n this._stable = false;\n anchorSize = this._getAverageSize();\n }\n const anchorLeadingMargin = this._metricsCache.getMarginSize(this._anchorIdx) ??\n this._metricsCache.averageMarginSize;\n const anchorTrailingMargin = this._metricsCache.getMarginSize(this._anchorIdx + 1) ??\n this._metricsCache.averageMarginSize;\n if (this._anchorIdx === 0) {\n this._anchorPos = anchorLeadingMargin;\n }\n if (this._anchorIdx === this.items.length - 1) {\n this._anchorPos = this._scrollSize - anchorTrailingMargin - anchorSize;\n }\n // Anchor might be outside bounds, so prefer correcting the error and keep\n // that anchorIdx.\n let anchorErr = 0;\n if (this._anchorPos + anchorSize + anchorTrailingMargin < lower) {\n anchorErr = lower - (this._anchorPos + anchorSize + anchorTrailingMargin);\n }\n if (this._anchorPos - anchorLeadingMargin > upper) {\n anchorErr = upper - (this._anchorPos - anchorLeadingMargin);\n }\n if (anchorErr) {\n this._scrollPosition -= anchorErr;\n lower -= anchorErr;\n upper -= anchorErr;\n this._scrollError += anchorErr;\n }\n items.set(this._anchorIdx, { pos: this._anchorPos, size: anchorSize });\n this._first = this._last = this._anchorIdx;\n this._physicalMin = this._anchorPos - anchorLeadingMargin;\n this._physicalMax = this._anchorPos + anchorSize + anchorTrailingMargin;\n while (this._physicalMin > lower && this._first > 0) {\n let size = this._getSize(--this._first);\n if (size === undefined) {\n this._stable = false;\n size = this._getAverageSize();\n }\n let margin = this._metricsCache.getMarginSize(this._first);\n if (margin === undefined) {\n this._stable = false;\n margin = this._metricsCache.averageMarginSize;\n }\n this._physicalMin -= size;\n const pos = this._physicalMin;\n items.set(this._first, { pos, size });\n this._physicalMin -= margin;\n if (this._stable === false && this._estimate === false) {\n break;\n }\n }\n while (this._physicalMax < upper && this._last < this.items.length - 1) {\n let size = this._getSize(++this._last);\n if (size === undefined) {\n this._stable = false;\n size = this._getAverageSize();\n }\n let margin = this._metricsCache.getMarginSize(this._last);\n if (margin === undefined) {\n this._stable = false;\n margin = this._metricsCache.averageMarginSize;\n }\n const pos = this._physicalMax;\n items.set(this._last, { pos, size });\n this._physicalMax += size + margin;\n if (!this._stable && !this._estimate) {\n break;\n }\n }\n // This handles the cases where we were relying on estimated sizes.\n const extentErr = this._calculateError();\n if (extentErr) {\n this._physicalMin -= extentErr;\n this._physicalMax -= extentErr;\n this._anchorPos -= extentErr;\n this._scrollPosition -= extentErr;\n items.forEach((item) => (item.pos -= extentErr));\n this._scrollError += extentErr;\n }\n if (this._stable) {\n this._newPhysicalItems = this._physicalItems;\n this._newPhysicalItems.clear();\n this._physicalItems = items;\n }\n }\n _calculateError() {\n if (this._first === 0) {\n return this._physicalMin;\n }\n else if (this._physicalMin <= 0) {\n return this._physicalMin - this._first * this._delta;\n }\n else if (this._last === this.items.length - 1) {\n return this._physicalMax - this._scrollSize;\n }\n else if (this._physicalMax >= this._scrollSize) {\n return (this._physicalMax -\n this._scrollSize +\n (this.items.length - 1 - this._last) * this._delta);\n }\n return 0;\n }\n _reflow() {\n const { _first, _last } = this;\n super._reflow();\n if ((this._first === -1 && this._last == -1) ||\n (this._first === _first && this._last === _last)) {\n this._resetReflowState();\n }\n }\n _resetReflowState() {\n this._anchorIdx = null;\n this._anchorPos = null;\n this._stable = true;\n }\n _updateScrollSize() {\n const { averageMarginSize } = this._metricsCache;\n this._scrollSize = Math.max(1, this.items.length * (averageMarginSize + this._getAverageSize()) +\n averageMarginSize);\n }\n /**\n * Returns the average size (precise or estimated) of an item in the scrolling direction,\n * including any surrounding space.\n */\n get _delta() {\n const { averageMarginSize } = this._metricsCache;\n return this._getAverageSize() + averageMarginSize;\n }\n /**\n * Returns the top and left positioning of the item at idx.\n */\n _getItemPosition(idx) {\n return {\n [this._positionDim]: this._getPosition(idx),\n [this._secondaryPositionDim]: 0,\n [offset(this.direction)]: -(this._metricsCache.getLeadingMarginValue(idx, this.direction) ??\n this._metricsCache.averageMarginSize),\n };\n }\n /**\n * Returns the height and width of the item at idx.\n */\n _getItemSize(idx) {\n return {\n [this._sizeDim]: this._getSize(idx) || this._getAverageSize(),\n [this._secondarySizeDim]: this._itemSize[this._secondarySizeDim],\n };\n }\n _viewDim2Changed() {\n this._metricsCache.clear();\n this._scheduleReflow();\n }\n}\n//# sourceMappingURL=flow.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nexport class SizeCache {\n constructor(config) {\n this._map = new Map();\n this._roundAverageSize = false;\n this.totalSize = 0;\n if (config?.roundAverageSize === true) {\n this._roundAverageSize = true;\n }\n }\n set(index, value) {\n const prev = this._map.get(index) || 0;\n this._map.set(index, value);\n this.totalSize += value - prev;\n }\n get averageSize() {\n if (this._map.size > 0) {\n const average = this.totalSize / this._map.size;\n return this._roundAverageSize ? Math.round(average) : average;\n }\n return 0;\n }\n getSize(index) {\n return this._map.get(index);\n }\n clear() {\n this._map.clear();\n this.totalSize = 0;\n }\n}\n//# sourceMappingURL=SizeCache.js.map"],"names":["dim1","direction","leadingMargin","trailingMargin","collapseMargins","a","b","m","sort","Math","min","max","setters","execute","SizeCache","constructor","config","this","_map","Map","_roundAverageSize","totalSize","roundAverageSize","set","index","value","prev","get","averageSize","size","average","round","getSize","clear","MetricsCache","_childSizeCache","_marginSizeCache","_metricsCache","update","metrics","_this","marginsToUpdate","Set","Object","keys","forEach","key","k","Number","add","_iterator","_createForOfIteratorHelper","s","_step","n","done","_this$_metricsCache$g","_this$_metricsCache$g2","err","e","f","averageChildSize","totalChildSize","averageMarginSize","totalMarginSize","getLeadingMarginValue","getChildSize","getMarginSize","_export","FlowLayout","_ref","super","arguments","_itemSize","width","height","_physicalItems","_newPhysicalItems","_anchorIdx","_anchorPos","_stable","_measureChildren","_estimate","_this2","measureChildren","updateItemSizes","sizes","_scheduleReflow","_getPhysicalItem","idx","_this$_newPhysicalIte","_getSize","_getAverageSize","_sizeDim","_estimatePosition","c","_first","_last","delta","pos","_getPosition","_this$_metricsCache$g4","item","_calculateAnchor","lower","upper","_scrollSize","_viewDim1","items","length","floor","_delta","_getAnchor","firstItem","lastItem","firstMin","candidateIdx","_firstVisible","cMax","Infinity","_getActiveItems","_clearItems","_getItems","_physicalMin","_physicalMax","_this$_metricsCache$g5","_this$_metricsCache$g6","pin","_scrollPosition","_overhang","anchorSize","undefined","anchorLeadingMargin","anchorTrailingMargin","anchorErr","_scrollError","margin","extentErr","_calculateError","_reflow","_resetReflowState","_updateScrollSize","_getItemPosition","_defineProperty","_positionDim","_secondaryPositionDim","_getItemSize","_secondarySizeDim","_viewDim2Changed","hostSink","_latestCoords","left","top","_direction","_viewportSize","totalScrollSize","offsetWithinScroller","_pendingReflow","_pendingLayoutUpdate","_pin","_lastVisible","_items","_hostSink","Promise","resolve","then","_getDefaultConfig","assign","_setItems","dir","_triggerReflow","viewportSize","dims","_viewDim2","_scheduleLayoutUpdate","_checkThresholds","viewportScroll","coords","oldPos","abs","reflowIfNeeded","force","_this$_pin","block","_clampScrollPosition","options","val","unpin","_sendUnpinnedMessage","_updateLayout","_setPositionFromPin","_updateVisibleIndices","_sendStateChangedMessage","lastScrollPosition","_calculateScrollIntoViewPosition","itemStartPosition","scrollPosition","itemSize","itemEndPosition","currentScrollPosition","getScrollIntoViewCoordinates","type","_sendVisibilityChangedMessage","firstVisible","lastVisible","childPositions","message","scrollSize","range","first","last","scrollError","_num","emit"],"mappings":";;;;AAKO,GAAA,QAASA,CAAAA,EAAKC,CACjB,CAAA,CAAA,MAAqB,YAAdA,GAAAA,CAAAA,CAA6B,QAAU,QAClD;;;;GCGA,QAASC,CAAAA,CAAAA,CAAcD,CACnB,CAAA,CAAA,MAAqB,YAAdA,GAAAA,CAAAA,CAA6B,aAAe,WACvD,EACA,QAASE,CAAAA,CAAAA,CAAeF,CACpB,CAAA,CAAA,MAAqB,eAAdA,CAA6B,CAAA,aAAA,CAAgB,cACxD,EAIA,QAASG,CAAAA,CAAAA,CAAgBC,EAAGC,CACxB,CAAA,CAAA,GAAMC,CAAAA,CAAI,CAAA,CAACF,CAAGC,CAAAA,CAAAA,CAAAA,CAAGE,OACjB,MAAOD,CAAAA,CAAAA,CAAE,CAAM,CAAA,EAAA,CAAA,CAAIE,IAAKC,CAAAA,GAAAA,CAAAA,KAAAA,CAALD,IAAKC,CAAAA,kBAAAA,CAAOH,IAAKA,CAAE,CAAA,CAAA,CAAA,EAAM,CAAIE,CAAAA,IAAAA,CAAKE,GAAOJ,CAAAA,KAAAA,CAAZE,IAAAA,CAAAA,kBAAAA,CAAYF,CAAAA,EAAAA,CAAKA,EAAE,CAAKA,CAA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AAc3L,CAAAA,IAAAA,CAAKgF,KACvB,CAAA,KAAO2G,CAAc3L,CAAAA,IAAAA,CAAK+E,QACtBvF,IAAKsB,CAAAA,KAAAA,CAAMd,IAAK6H,CAAAA,gBAAAA,CAAiB8D,CAAa3L,CAAAA,CAAAA,IAAAA,CAAK+H,gBAC/CvI,IAAKsB,CAAAA,KAAAA,CAAMd,IAAK+G,CAAAA,eAAAA,CAAkB/G,IAAK0F,CAAAA,SAAAA,CAAAA,EAC3CiG,IAEAD,CAAiB1L,GAAAA,IAAAA,CAAKoG,aACtBuF,EAAAA,CAAAA,GAAgB3L,IAAK+I,CAAAA,YAAAA,GACrB/I,KAAKoG,aAAgBsF,CAAAA,CAAAA,CACrB1L,IAAK+I,CAAAA,YAAAA,CAAe4C,CAChBnB,CAAAA,CAAAA,EAAWA,EAAQ4B,IACnBpM,EAAAA,IAAAA,CAAKyL,6BAGhB,CAAA,CAAA,CAAA,EAAA","x_google_ignoreList":[0,1,2]}
|
package/dist/index.js
CHANGED
|
@@ -6021,7 +6021,7 @@ class CM{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
|
6021
6021
|
nile-auto-complete::part(base)::before {
|
|
6022
6022
|
box-shadow: none;
|
|
6023
6023
|
}
|
|
6024
|
-
`;let zn=class extends Re{constructor(){super(...arguments),this.hasSlotController=new Ye(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=(e,t)=>e.toLowerCase().includes(t.toLowerCase()),this.renderItemFunction=e=>e,this.enableVisibilityEffect=!1,this.enableTabClose=!1,this.showTooltip=!1,this.enableTagDelete=!1,this.handleDocumentClick=e=>{e.composedPath().includes(this)||(this.addOnBlur&&this.acceptUserInput&&this.inputValue&&this.addChipFromInputValue(),this.isDropdownOpen=!1)}}static get styles(){return[In]}updated(e){if(super.updated(e),e.has("autoCompleteOptions")){let e=this.autoCompleteOptions;if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=[]}this.filteredAutoCompleteOptions=Array.isArray(e)?[...e]:[],this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter((e=>!this.value.includes(e))))}e.has("value")&&(this.tags=[...this.value],this.onTagsChanged()),e.has("tags")&&this.onTagsChanged()}async firstUpdated(e){await this.updateComplete;const t=this.noAutoComplete?this.renderRoot.querySelector("nile-input")?.input:this.autoComplete?.inputElement?.input||this.autoComplete?.inputElement;this.visibilityManager=new tM({host:this,target:t,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:(e,t)=>this.emit(`nile-${e}`,t)})}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleDocumentClick),this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter((e=>!this.value.includes(e)))),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.visibilityManager?.cleanup(),document.removeEventListener("click",this.handleDocumentClick),this.emit("nile-destroy")}render(){const e=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const t=!!this.label||!!e,i=!!this.helpText,M=!!this.errorMessage;return R`
|
|
6024
|
+
`;let zn=class extends Re{constructor(){super(...arguments),this.hasSlotController=new Ye(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=(e,t)=>e.toLowerCase().includes(t.toLowerCase()),this.renderItemFunction=e=>e,this.enableVisibilityEffect=!1,this.enableTabClose=!1,this.showTooltip=!1,this.enableTagDelete=!1,this.isSelectingFromDropdown=!1,this.handleDocumentClick=e=>{const t=e.composedPath();this.isSelectingFromDropdown?this.resetDropdownState():t.includes(this)||(this.addOnBlur&&this.acceptUserInput&&this.inputValue&&this.addChipFromInputValue(),this.isDropdownOpen=!1)}}static get styles(){return[In]}resetDropdownState(){this.isSelectingFromDropdown=!1}updated(e){if(super.updated(e),e.has("autoCompleteOptions")){let e=this.autoCompleteOptions;if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=[]}this.filteredAutoCompleteOptions=Array.isArray(e)?[...e]:[],this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter((e=>!this.value.includes(e))))}e.has("value")&&(this.tags=[...this.value],this.onTagsChanged()),e.has("tags")&&this.onTagsChanged()}async firstUpdated(e){await this.updateComplete;const t=this.noAutoComplete?this.renderRoot.querySelector("nile-input")?.input:this.autoComplete?.inputElement?.input||this.autoComplete?.inputElement;this.visibilityManager=new tM({host:this,target:t,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:(e,t)=>this.emit(`nile-${e}`,t)})}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleDocumentClick),this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter((e=>!this.value.includes(e)))),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.visibilityManager?.cleanup(),document.removeEventListener("click",this.handleDocumentClick),this.emit("nile-destroy")}markDropdownSelectStart(e){this.isSelectingFromDropdown=!0}render(){const e=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const t=!!this.label||!!e,i=!!this.helpText,M=!!this.errorMessage;return R`
|
|
6025
6025
|
<div
|
|
6026
6026
|
part="form-control"
|
|
6027
6027
|
class=${pe({"form-control":!0,"form-control--medium":!0,"form-control--has-label":t,"form-control--has-help-text":i,"nile-chip--disabled":this.disabled})}
|
|
@@ -6096,6 +6096,8 @@ box-shadow: none;
|
|
|
6096
6096
|
@nile-focus=${this.handleFocus}
|
|
6097
6097
|
@nile-blur=${this.handleBlur}
|
|
6098
6098
|
@nile-complete=${this.handleSelect}
|
|
6099
|
+
@mousedown=${this.markDropdownSelectStart}
|
|
6100
|
+
|
|
6099
6101
|
></nile-auto-complete>
|
|
6100
6102
|
`}
|
|
6101
6103
|
</div>
|
|
@@ -6107,7 +6109,7 @@ box-shadow: none;
|
|
|
6107
6109
|
>
|
|
6108
6110
|
`:""}
|
|
6109
6111
|
</div>
|
|
6110
|
-
`}handleSelect(e){const t=e.detail.value,i=this.autoCompleteOptions.find((e=>e.name===t||e.id===t));let M=null;if(this.showTooltip)if(i?.tooltip?.content){const{content:e,for:t}=i.tooltip;if(!t||"tag"===t)if(e instanceof Promise){this.tooltips=[...this.tooltips,"Loading..."];const t=this.tooltips.length-1;e.then((e=>{this.tooltips[t]=e,this.requestUpdate()}))}else M=e}else M=i?.name||t;this.noDuplicates&&this.tags.includes(t)||(this.tags=[...this.tags,t],i?.tooltip?.content instanceof Promise||(this.tooltips=[...this.tooltips,M]),this.emit("nile-chip-change",{value:this.tags}),this.resetInput())}handleRemove(e){this.tags=this.tags.filter((t=>t!==e)),this.noDuplicates&&this.autoCompleteOptions.includes(e)&&(this.filteredAutoCompleteOptions=[...this.filteredAutoCompleteOptions,e]),this.emit("nile-chip-change",{value:this.tags})}handleInputChange(e){this.inputValue=e.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(e){if(this.enableTagDelete&&("Backspace"===e.key||"Delete"===e.key)&&!this.inputValue&&!this.readonly&&!this.disabled){if(0===this.tags.length)return void(this.chipFocusIndex=null);if(e.preventDefault(),null===this.chipFocusIndex)return this.chipFocusIndex=this.tags.length-1,void this.requestUpdate();const t=this.chipFocusIndex;return this.tags[t],this.tags=this.tags.filter(((e,i)=>i!==t)),this.tooltips=this.tooltips.filter(((e,i)=>i!==t)),this.emit("nile-chip-change",{value:this.tags}),void(this.tags.length>0?this.chipFocusIndex=Math.max(0,t-1):this.chipFocusIndex=null)}if(this.readonly){if(!["ArrowUp","ArrowDown","Enter","Tab"].includes(e.key))return void e.preventDefault()}this.acceptUserInput&&("Tab"===e.key&&e.preventDefault(),"Enter"!==e.key&&"Tab"!==e.key||!this.inputValue||this.noDuplicates&&this.tags.includes(this.inputValue)||(e.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"!==e.key&&"Tab"!==e.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.addOnBlur&&this.acceptUserInput&&this.inputValue&&this.addChipFromInputValue()}onTagsChanged(){this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter((e=>!this.tags.includes(e))))}resetInput(){this.inputValue="",this.isDropdownOpen=!1,this.visibilityManager?.cleanup(),!this.noAutoComplete&&this.autoComplete&&(this.autoComplete.value="",this.autoComplete.handleFocus())}};e([De()],zn.prototype,"tags",void 0),e([De()],zn.prototype,"inputValue",void 0),e([De()],zn.prototype,"isDropdownOpen",void 0),e([De()],zn.prototype,"tooltips",void 0),e([De()],zn.prototype,"chipFocusIndex",void 0),e([Ie("nile-auto-complete")],zn.prototype,"autoComplete",void 0),e([ce({type:Boolean})],zn.prototype,"warning",void 0),e([ce({type:Boolean})],zn.prototype,"noAutoComplete",void 0),e([ce({type:Boolean})],zn.prototype,"error",void 0),e([ce({type:Boolean})],zn.prototype,"success",void 0),e([ce({type:Boolean})],zn.prototype,"noDuplicates",void 0),e([ce()],zn.prototype,"label",void 0),e([ce({type:String})],zn.prototype,"tagVariant",void 0),e([ce({type:Boolean})],zn.prototype,"acceptUserInput",void 0),e([ce({type:Boolean})],zn.prototype,"addOnBlur",void 0),e([ce({type:Boolean})],zn.prototype,"clearable",void 0),e([ce()],zn.prototype,"placeholder",void 0),e([ce({type:Boolean,reflect:!0})],zn.prototype,"readonly",void 0),e([ce({type:Boolean,reflect:!0})],zn.prototype,"disabled",void 0),e([ce({type:Boolean,reflect:!0})],zn.prototype,"portal",void 0),e([ce({type:Boolean})],zn.prototype,"enableVirtualScroll",void 0),e([ce({type:Array})],zn.prototype,"autoCompleteOptions",void 0),e([ce({type:Array})],zn.prototype,"filteredAutoCompleteOptions",void 0),e([ce({type:Array})],zn.prototype,"value",void 0),e([ce({type:Boolean})],zn.prototype,"noWrap",void 0),e([ce({type:Boolean})],zn.prototype,"loading",void 0),e([ce({type:Array})],zn.prototype,"errorIndexes",void 0),e([ce({attribute:"help-text",reflect:!0})],zn.prototype,"helpText",void 0),e([ce({attribute:"error-message",reflect:!0})],zn.prototype,"errorMessage",void 0),e([ce({attribute:!1})],zn.prototype,"filterFunction",void 0),e([ce({attribute:!1})],zn.prototype,"renderItemFunction",void 0),e([ce({type:Boolean,reflect:!0})],zn.prototype,"enableVisibilityEffect",void 0),e([ce({type:Boolean,reflect:!0})],zn.prototype,"enableTabClose",void 0),e([ce({type:Boolean})],zn.prototype,"showTooltip",void 0),e([ce({type:Boolean})],zn.prototype,"enableTagDelete",void 0),zn=e([Ne("nile-chip")],zn);const dn=r`
|
|
6112
|
+
`}handleSelect(e){this.isSelectingFromDropdown=!1,this.resetDropdownState();const t=e.detail.value,i=this.autoCompleteOptions.find((e=>e.name===t||e.id===t));let M=null;if(this.showTooltip)if(i?.tooltip?.content){const{content:e,for:t}=i.tooltip;if(!t||"tag"===t)if(e instanceof Promise){this.tooltips=[...this.tooltips,"Loading..."];const t=this.tooltips.length-1;e.then((e=>{this.tooltips[t]=e,this.requestUpdate()}))}else M=e}else M=i?.name||t;this.noDuplicates&&this.tags.includes(t)||(this.tags=[...this.tags,t],i?.tooltip?.content instanceof Promise||(this.tooltips=[...this.tooltips,M]),this.emit("nile-chip-change",{value:this.tags}),this.resetInput())}handleRemove(e){this.tags=this.tags.filter((t=>t!==e)),this.noDuplicates&&this.autoCompleteOptions.includes(e)&&(this.filteredAutoCompleteOptions=[...this.filteredAutoCompleteOptions,e]),this.emit("nile-chip-change",{value:this.tags})}handleInputChange(e){this.inputValue=e.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(e){if(this.enableTagDelete&&("Backspace"===e.key||"Delete"===e.key)&&!this.inputValue&&!this.readonly&&!this.disabled){if(0===this.tags.length)return void(this.chipFocusIndex=null);if(e.preventDefault(),null===this.chipFocusIndex)return this.chipFocusIndex=this.tags.length-1,void this.requestUpdate();const t=this.chipFocusIndex;return this.tags[t],this.tags=this.tags.filter(((e,i)=>i!==t)),this.tooltips=this.tooltips.filter(((e,i)=>i!==t)),this.emit("nile-chip-change",{value:this.tags}),void(this.tags.length>0?this.chipFocusIndex=Math.max(0,t-1):this.chipFocusIndex=null)}if(this.readonly){if(!["ArrowUp","ArrowDown","Enter","Tab"].includes(e.key))return void e.preventDefault()}this.acceptUserInput&&("Tab"===e.key&&e.preventDefault(),"Enter"!==e.key&&"Tab"!==e.key||!this.inputValue||this.noDuplicates&&this.tags.includes(this.inputValue)||(e.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"!==e.key&&"Tab"!==e.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((e=>!this.tags.includes(e))))}resetInput(){this.inputValue="",this.isDropdownOpen=!1,this.visibilityManager?.cleanup(),!this.noAutoComplete&&this.autoComplete&&(this.autoComplete.value="",this.autoComplete.handleFocus())}};e([De()],zn.prototype,"tags",void 0),e([De()],zn.prototype,"inputValue",void 0),e([De()],zn.prototype,"isDropdownOpen",void 0),e([De()],zn.prototype,"tooltips",void 0),e([De()],zn.prototype,"chipFocusIndex",void 0),e([Ie("nile-auto-complete")],zn.prototype,"autoComplete",void 0),e([ce({type:Boolean})],zn.prototype,"warning",void 0),e([ce({type:Boolean})],zn.prototype,"noAutoComplete",void 0),e([ce({type:Boolean})],zn.prototype,"error",void 0),e([ce({type:Boolean})],zn.prototype,"success",void 0),e([ce({type:Boolean})],zn.prototype,"noDuplicates",void 0),e([ce()],zn.prototype,"label",void 0),e([ce({type:String})],zn.prototype,"tagVariant",void 0),e([ce({type:Boolean})],zn.prototype,"acceptUserInput",void 0),e([ce({type:Boolean})],zn.prototype,"addOnBlur",void 0),e([ce({type:Boolean})],zn.prototype,"clearable",void 0),e([ce()],zn.prototype,"placeholder",void 0),e([ce({type:Boolean,reflect:!0})],zn.prototype,"readonly",void 0),e([ce({type:Boolean,reflect:!0})],zn.prototype,"disabled",void 0),e([ce({type:Boolean,reflect:!0})],zn.prototype,"portal",void 0),e([ce({type:Boolean})],zn.prototype,"enableVirtualScroll",void 0),e([ce({type:Array})],zn.prototype,"autoCompleteOptions",void 0),e([ce({type:Array})],zn.prototype,"filteredAutoCompleteOptions",void 0),e([ce({type:Array})],zn.prototype,"value",void 0),e([ce({type:Boolean})],zn.prototype,"noWrap",void 0),e([ce({type:Boolean})],zn.prototype,"loading",void 0),e([ce({type:Array})],zn.prototype,"errorIndexes",void 0),e([ce({attribute:"help-text",reflect:!0})],zn.prototype,"helpText",void 0),e([ce({attribute:"error-message",reflect:!0})],zn.prototype,"errorMessage",void 0),e([ce({attribute:!1})],zn.prototype,"filterFunction",void 0),e([ce({attribute:!1})],zn.prototype,"renderItemFunction",void 0),e([ce({type:Boolean,reflect:!0})],zn.prototype,"enableVisibilityEffect",void 0),e([ce({type:Boolean,reflect:!0})],zn.prototype,"enableTabClose",void 0),e([ce({type:Boolean})],zn.prototype,"showTooltip",void 0),e([ce({type:Boolean})],zn.prototype,"enableTagDelete",void 0),zn=e([Ne("nile-chip")],zn);const dn=r`
|
|
6111
6113
|
.form-control .form-control__label {
|
|
6112
6114
|
display: none;
|
|
6113
6115
|
}
|
|
@@ -15076,7 +15078,7 @@ nile-rte-toolbar-item nile-button[data-active]::part(base):hover {
|
|
|
15076
15078
|
|
|
15077
15079
|
|
|
15078
15080
|
|
|
15079
|
-
`,XS={bold:"format_bold",italic:"format_italic",underline:"format_underline",link:"link_2",left:"format_align_left",center:"format_align_middle",right:"format_align_right",justify:"format_align_justify",ul:"format_list_bulleted",ol:"format_list_numbered",clear:"format_clear"};let qS=class extends ae{constructor(){super(...arguments),this.value="",this.noStyles=!1,this.singleLineEditor=!1,this.placeholder="",this.mentions={},this.content="",this.previewEl=null,this.toolbarEl=null,this.lastRange=null,this.buttonMap=new Map,this.headingSelect=null,this.fontSelect=null,this.colorInput=null,this.bgColorInput=null,this.colorSwatchEl=null,this.bgSwatchEl=null,this.containerEl=null,this.mentionsEl=null,this.onEditorKeydown=e=>{if(this.singleLineEditor&&"Enter"===e.key&&e.shiftKey)return void e.preventDefault();if(e.ctrlKey&&"i"===e.key.toLowerCase()&&(e.preventDefault(),PS(this.editorEl,"em"),this.updateContent(),this.updateToolbarState()),this.singleLineEditor&&"Enter"===e.key)return void e.preventDefault();if("Tab"!==e.key)return;e.preventDefault(),this.focusAndRestore();const t=window.getSelection();if(!t||0===t.rangeCount)return;const i=t.getRangeAt(0);if(e.shiftKey){if(i.collapsed&&i.startContainer.nodeType===Node.TEXT_NODE){const e=i.startContainer,M=i.startOffset,n=e.data.slice(0,M),o=n.replace(/(\t|[ \u00a0]{2})$/,"");if(o.length!==n.length){e.data=o+e.data.slice(M);const i=document.createRange();i.setStart(e,o.length),i.collapse(!0),t.removeAllRanges(),t.addRange(i),this.updateContent(),this.updateToolbarState()}}return}i.deleteContents();const M=document.createTextNode("\t");i.insertNode(M);const n=document.createRange();n.setStartAfter(M),n.collapse(!0),t.removeAllRanges(),t.addRange(n),this.updateContent(),this.updateToolbarState()},this.onSelectionChange=()=>{if(!this.editorEl)return;const e=document.getSelection();if(!e||0===e.rangeCount)return;const t=e.getRangeAt(0);this.editorEl.contains(t.commonAncestorContainer)&&(this.lastRange=t.cloneRange(),this.updateToolbarState())}}createRenderRoot(){return this}injectCss(e){if(this.querySelector("style[data-rte-style]"))return;const t=document.createElement("style");t.setAttribute("data-rte-style","true"),t.textContent=e,this.insertBefore(t,this.firstChild)}connectedCallback(){super.connectedCallback(),this.injectCss($S.cssText),this.ensureStructure(),this.placeholder&&this.editorEl&&(this.editorEl.dataset.placeholder=this.placeholder),this.value&&!this.editorEl.innerHTML.trim()&&(this.editorEl.innerHTML=this.value),this.content=this.editorEl.innerHTML,this.toolbarEl&&this.wireAuthoredToolbar(this.toolbarEl),this.mentionsEl=this.querySelector("nile-rte-mentions"),this.mentionsEl&&(this.mentionsEl.attach?.(this.editorEl,this),this.mentionsEl.setExternalConfig?.(this.mentions)),this.wireEditor(),document.addEventListener("selectionchange",this.onSelectionChange,{passive:!0}),this.updateToolbarState(),this.syncPreview()}ensureStructure(){this.toolbarEl=this.querySelector("nile-rte-toolbar"),this.previewEl=this.querySelector("nile-rte-preview"),this.containerEl=this.querySelector(".rte-container"),this.containerEl||(this.containerEl=document.createElement("div"),this.containerEl.className="rte-container",this.appendChild(this.containerEl)),this.ensureEditor(),this.toolbarEl&&this.toolbarEl.parentElement!==this.containerEl&&this.containerEl.appendChild(this.toolbarEl),this.editorEl.parentElement!==this.containerEl&&this.containerEl.appendChild(this.editorEl),this.previewEl&&(this.previewEl.parentElement!==this&&this.appendChild(this.previewEl),this.previewEl.previousElementSibling!==this.containerEl&&this.insertBefore(this.previewEl,this.containerEl.nextSibling))}updateContentWithMention(e){this.updateContent(),this.dispatchEvent(new CustomEvent("nile-change",{detail:{content:this.content,mention:e},bubbles:!0,composed:!0}))}disconnectedCallback(){document.removeEventListener("selectionchange",this.onSelectionChange),this.mentionsEl&&this.mentionsEl.detach&&this.mentionsEl.detach(),super.disconnectedCallback()}updated(e){e.has("value")&&this.editorEl&&this.value!==this.editorEl.innerHTML&&(this.editorEl.innerHTML=this.value||"<p><br></p>",this.content=this.editorEl.innerHTML,this.syncPreview()),e.has("singleLineEditor")&&(this.editorEl&&this.editorEl.classList.toggle("single-line",this.singleLineEditor),this.previewEl&&this.previewEl.classList.toggle("single-line",this.singleLineEditor))}ensureEditor(){if(this.editorEl=this.querySelector(".editor"),!this.editorEl){const e=document.createElement("article");e.className="editor",e.setAttribute("contenteditable","true"),this.editorEl=e}this.placeholder&&(this.editorEl.dataset.placeholder=this.placeholder),this.editorEl.innerHTML.trim()||(this.editorEl.innerHTML="<p><br></p>")}unwrapMention(e,t=!0){const i=e.parentNode;if(!i)return;const M=t?(e.textContent??"").replace(/\u200B/g,""):"",n=document.createTextNode(M);i.insertBefore(n,e),i.removeChild(e);const o=document.createRange();o.setStartAfter(n),o.collapse(!0);const r=window.getSelection();r?.removeAllRanges(),r?.addRange(o)}scrubBrokenMentions(){if(!this.editorEl)return;this.editorEl.querySelectorAll("span.mention").forEach((e=>{const t=e,i=t.getAttribute("data-mention-key"),M=t.getAttribute("data-mention-label"),n=t.getAttribute("data-mention-trigger")||"",o=(t.textContent??"").replace(/\u200B/g,"").trim(),r=!!i&&!!M&&o.length>0&&o.startsWith(n)&&o.includes(M);o&&r||this.unwrapMention(t,!0)}))}wireEditor(){this.editorEl.addEventListener("input",(()=>{this.ensureAtLeastOneParagraph(),this.scrubBrokenMentions(),this.updateContent(),this.updateToolbarState()})),this.editorEl.addEventListener("mouseup",(()=>{this.saveSelection(),this.updateToolbarState()})),this.editorEl.addEventListener("keyup",(e=>{this.saveSelection(),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key)&&this.updateToolbarState()})),this.editorEl.addEventListener("keydown",this.onEditorKeydown)}wireAuthoredToolbar(e){this.buttonMap.clear(),this.headingSelect=null,this.fontSelect=null,this.colorInput=null,Array.from(e.children).forEach((e=>{const t=e.tagName.toLowerCase();if("nile-rte-select"!==t||"align"!==e.getAttribute("type")){if("nile-rte-link"===t)return e.editorEl=this.editorEl,void e.addEventListener("link-changed",(()=>{this.updateContent(),this.updateToolbarState()}));if("nile-rte-toolbar-item"===t){let t=e.querySelector(":scope > nile-button");const i=e.getAttribute("name")||"",M=e.getAttribute("label")||i,n=e.getAttribute("icon"),o=e.innerHTML.trim().length>0;if(t||(t=document.createElement("nile-button"),t.variant="tertiary",t.size="small"),n)t.innerHTML=`<nile-icon name="${n}" aria-label="${M}"></nile-icon>`,e.innerHTML="";else if(o)t.innerHTML=e.innerHTML,e.innerHTML="";else{const n=XS[i];n?t.innerHTML=`<nile-icon name="${n}" size="20" color="black" aria-label="${M}"></nile-icon>`:t.textContent=M||i,e.innerHTML=""}if(!t.isConnected){const i=document.createElement("nile-tooltip");i.setAttribute("content",M),i.appendChild(t),e.appendChild(i)}t.setAttribute("aria-label",M),t.addEventListener("mousedown",(e=>e.preventDefault())),t.addEventListener("click",(()=>this.onToolbarCommand(i)));const r=this.buttonMap.get(i)??[];return r.push(t),void this.buttonMap.set(i,r)}if("nile-rte-select"!==t)"nile-rte-color"!==t||e.addEventListener("change",(e=>{this.focusAndRestore();const{mode:t,value:i}=e.detail;"backColor"===t?_S(this.editorEl,"backgroundColor",i,"data-rte-bg"):function(e,t){_S(e,"color",t,"data-rte-color")}(this.editorEl,i),this.updateContent(),this.updateToolbarState()}));else{const t=e.getAttribute("type")||"";e.addEventListener("change",(e=>{this.focusAndRestore();const i=e.detail;"heading"===t?function(e,t){const i=document.getSelection();if(!i||0===i.rangeCount)return;const M=VS(i.getRangeAt(0).startContainer,e);if(!M)return;if(M.tagName.toLowerCase()===t)return;const n=document.createElement(t);for(;M.firstChild;)n.appendChild(M.firstChild);M.replaceWith(n);const o=document.createRange();o.selectNodeContents(n),o.collapse(!0),i.removeAllRanges(),i.addRange(o)}(this.editorEl,i):"font"===t&&BS(this.editorEl,i),this.updateContent(),this.updateToolbarState()}))}}else e.addEventListener("change",(e=>{this.focusAndRestore();const t=e.detail;WS(this.editorEl,t),this.updateContent(),this.updateToolbarState()}))}))}saveSelection(){const e=window.getSelection();e&&e.rangeCount&&(this.lastRange=e.getRangeAt(0).cloneRange())}restoreSelection(){if(!this.lastRange)return;const e=document.getSelection();e&&(e.removeAllRanges(),e.addRange(this.lastRange))}focusAndRestore(){this.editorEl?.focus(),this.restoreSelection()}getCleanContent(){const e=this.editorEl.cloneNode(!0);return e.querySelectorAll("*").forEach((e=>{e.removeAttribute("style")})),e.innerHTML}insertList(e){if(this.restoreSelection(),!this.lastRange)return;const t=document.createElement(e),i=this.lastRange.extractContents(),M=document.createElement("div");M.appendChild(i),Array.from(M.childNodes).forEach((e=>{if(e.nodeType===Node.TEXT_NODE&&!e.textContent?.trim())return;const i=document.createElement("li");i.appendChild(e),t.appendChild(i)})),this.lastRange.insertNode(t),this.afterListEdit(t)}afterListEdit(e){const t=document.createRange();t.setStartAfter(e),t.collapse(!0);const i=window.getSelection();i?.removeAllRanges(),i?.addRange(t),this.saveSelection(),this.updateContent(),this.updateToolbarState()}ensureAtLeastOneParagraph(){const e=this.editorEl;if(!e)return;const t=""===(e.textContent??"").replace(/\u200B/g,"").trim();if(0===e.childNodes.length||t)return void(e.innerHTML="<p><br></p>");if(!e.querySelector("p,h1,h2,h3,h4,h5,h6,ul,ol,table,blockquote,pre")){const t=document.createElement("p");for(;e.firstChild;)t.appendChild(e.firstChild);return t.hasChildNodes()||t.appendChild(document.createElement("br")),void e.appendChild(t)}e.querySelectorAll("p").forEach((e=>{""===(e.textContent??"").replace(/\u200B/g,"")&&(e.innerHTML.toLowerCase().includes("<br")||(e.innerHTML="<br>"))}))}onToolbarCommand(e){switch(this.focusAndRestore(),e){case"bold":PS(this.editorEl,"strong");break;case"italic":PS(this.editorEl,"em");break;case"underline":PS(this.editorEl,"u");break;case"left":WS(this.editorEl,"left");break;case"center":WS(this.editorEl,"center");break;case"right":WS(this.editorEl,"right");break;case"justify":WS(this.editorEl,"justify");break;case"ul":JS(this.editorEl,"ul"),this.updateContent(),this.updateToolbarState();break;case"ol":JS(this.editorEl,"ol"),this.updateContent(),this.updateToolbarState();break;case"link":break;case"clear":const e=document.createTreeWalker(this.editorEl,NodeFilter.SHOW_ELEMENT),t=[];for(;e.nextNode();){const i=e.currentNode;i.removeAttribute("style"),["B","STRONG","I","EM","U","SPAN","FONT"].includes(i.tagName)&&t.push(i)}for(const e of t){for(;e.firstChild;)e.parentNode?.insertBefore(e.firstChild,e);e.remove()}this.ensureAtLeastOneParagraph()}this.updateContent(),this.updateToolbarState()}setBtnActive(e,t){const i=this.buttonMap.get(e);if(i)for(const e of i)e.toggleAttribute("data-active",!!t)}updateToolbarState(){if(!this.editorEl)return;const e=document.getSelection();if(!e||0===e.rangeCount)return;const t=e.getRangeAt(0);if(!this.editorEl.contains(t.commonAncestorContainer))return;const i=function(e){for(;e&&!(e instanceof HTMLElement);)e=e.parentNode;return e}(t.startContainer)||this.editorEl,M=getComputedStyle(i),n=VS(t.startContainer,this.editorEl)||this.editorEl,o=(()=>{let e=i;for(;e&&e!==this.editorEl;){if(e instanceof HTMLElement){const t=e.tagName.toLowerCase();if("strong"===t||"b"===t)return!0;const i=getComputedStyle(e).fontWeight;if(parseInt(i,10)>=600)return!0}e=e.parentNode}return!1})(),r=(()=>{let e=i;for(;e&&e!==this.editorEl;){if(e instanceof HTMLElement){const t=e.tagName.toLowerCase();if("em"===t||"i"===t)return!0;if("italic"===getComputedStyle(e).fontStyle)return!0}e=e.parentNode}return!1})(),s=(()=>{let e=i;for(;e&&e!==this.editorEl;){if(e instanceof HTMLElement){const t=getComputedStyle(e).textDecorationLine;if(t&&t.includes("underline"))return!0;if("u"===e.tagName.toLowerCase())return!0}e=e.parentNode}return!1})(),a=!!i.closest("a"),l=n.style.textAlign||getComputedStyle(n).textAlign||"start",N="start"===l?"left":l,g=!!i.closest("li")&&i.closest("ul,ol")?.tagName.toLowerCase()||"";if(this.setBtnActive("bold",o),this.setBtnActive("italic",r),this.setBtnActive("underline",s),this.setBtnActive("link",a),this.setBtnActive("left","left"===N&&!["center","right","justify"].includes(N)),this.setBtnActive("center","center"===N),this.setBtnActive("right","right"===N),this.setBtnActive("justify","justify"===N),this.setBtnActive("ul","ul"===g),this.setBtnActive("ol","ol"===g),this.headingSelect){const e=n.tagName.toLowerCase(),t=["h1","h2","h3"].includes(e)?e:"p";this.headingSelect.value!==t&&(this.headingSelect.value=t)}if(this.fontSelect){const e=(M.fontFamily||"").replace(/["']/g,"").split(",")[0].trim().toLowerCase();if(e)for(const t of Array.from(this.fontSelect.options))if(t.value.toLowerCase()===e){this.fontSelect.value=t.value;break}}if(this.colorInput){const e=RS(M.color);e&&this.colorInput.value.toLowerCase()!==e.toLowerCase()&&(this.colorInput.value=e),this.colorSwatchEl&&(this.colorSwatchEl.style.backgroundColor=this.colorInput.value)}if(this.bgColorInput){const e=getComputedStyle(i).backgroundColor;if(e&&!/transparent|rgba\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(e)){const t=RS(e);t&&this.bgColorInput.value.toLowerCase()!==t.toLowerCase()&&(this.bgColorInput.value=t)}this.bgSwatchEl&&(this.bgSwatchEl.style.backgroundColor=this.bgColorInput.value)}}syncPreview(){this.updateContent()}updateContent(){if(!this.editorEl)return;this.ensureAtLeastOneParagraph();const e=""===(this.editorEl.textContent??"").trim();this.editorEl.classList.toggle("empty",e);const t=this.editorEl.cloneNode(!0);if(this.noStyles)t.querySelectorAll("[style]").forEach((e=>e.removeAttribute("style")));else{const e=document.createTreeWalker(this.editorEl,NodeFilter.SHOW_ELEMENT),i=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT),M=["font-weight","font-style","text-decoration","color","background-color","font-size","font-family","text-align","line-height","letter-spacing","white-space","vertical-align","list-style-position","padding-inline-start"];for(;e.nextNode()&&i.nextNode();){const t=e.currentNode,n=i.currentNode,o=window.getComputedStyle(t),r=M.map((e=>`${e}:${o.getPropertyValue(e)}`)).join(";");r.trim()&&n.setAttribute("style",r)}}this.content=t.innerHTML,this.previewEl&&(this.previewEl.innerHTML=this.content),this.dispatchEvent(new CustomEvent("nile-change",{detail:{content:this.content},bubbles:!0,composed:!0}))}};e([ce({type:String,attribute:!0,reflect:!0})],qS.prototype,"value",void 0),e([ce({type:Boolean,attribute:!0,reflect:!0})],qS.prototype,"noStyles",void 0),e([ce({type:Boolean,attribute:"singlelineeditor",reflect:!0})],qS.prototype,"singleLineEditor",void 0),e([ce({type:String})],qS.prototype,"placeholder",void 0),e([ce({attribute:"mentions",reflect:!0,converter:{fromAttribute:e=>{try{const t=JSON.parse(e),i={};for(const e of Object.keys(t)){const M=t[e];Array.isArray(M)&&(i[e]=M.filter((e=>e&&"string"==typeof e.key&&"string"==typeof e.label)).map((e=>({key:e.key,label:e.label}))))}return i}catch{return{}}},toAttribute:e=>JSON.stringify(e)}})],qS.prototype,"mentions",void 0),e([De()],qS.prototype,"content",void 0),qS=e([Ne("nile-rich-text-editor")],qS);"undefined"!=typeof window&&(window.nileElementsVersion='"1.4.4-beta-1.0"',window.nileVersion="__NILE_VERSION__",window.process=window.process||{env:{NODE_ENV:"production"}});const KS=r`
|
|
15081
|
+
`,XS={bold:"format_bold",italic:"format_italic",underline:"format_underline",link:"link_2",left:"format_align_left",center:"format_align_middle",right:"format_align_right",justify:"format_align_justify",ul:"format_list_bulleted",ol:"format_list_numbered",clear:"format_clear"};let qS=class extends ae{constructor(){super(...arguments),this.value="",this.noStyles=!1,this.singleLineEditor=!1,this.placeholder="",this.mentions={},this.content="",this.previewEl=null,this.toolbarEl=null,this.lastRange=null,this.buttonMap=new Map,this.headingSelect=null,this.fontSelect=null,this.colorInput=null,this.bgColorInput=null,this.colorSwatchEl=null,this.bgSwatchEl=null,this.containerEl=null,this.mentionsEl=null,this.onEditorKeydown=e=>{if(this.singleLineEditor&&"Enter"===e.key&&e.shiftKey)return void e.preventDefault();if(e.ctrlKey&&"i"===e.key.toLowerCase()&&(e.preventDefault(),PS(this.editorEl,"em"),this.updateContent(),this.updateToolbarState()),this.singleLineEditor&&"Enter"===e.key)return void e.preventDefault();if("Tab"!==e.key)return;e.preventDefault(),this.focusAndRestore();const t=window.getSelection();if(!t||0===t.rangeCount)return;const i=t.getRangeAt(0);if(e.shiftKey){if(i.collapsed&&i.startContainer.nodeType===Node.TEXT_NODE){const e=i.startContainer,M=i.startOffset,n=e.data.slice(0,M),o=n.replace(/(\t|[ \u00a0]{2})$/,"");if(o.length!==n.length){e.data=o+e.data.slice(M);const i=document.createRange();i.setStart(e,o.length),i.collapse(!0),t.removeAllRanges(),t.addRange(i),this.updateContent(),this.updateToolbarState()}}return}i.deleteContents();const M=document.createTextNode("\t");i.insertNode(M);const n=document.createRange();n.setStartAfter(M),n.collapse(!0),t.removeAllRanges(),t.addRange(n),this.updateContent(),this.updateToolbarState()},this.onSelectionChange=()=>{if(!this.editorEl)return;const e=document.getSelection();if(!e||0===e.rangeCount)return;const t=e.getRangeAt(0);this.editorEl.contains(t.commonAncestorContainer)&&(this.lastRange=t.cloneRange(),this.updateToolbarState())}}createRenderRoot(){return this}injectCss(e){if(this.querySelector("style[data-rte-style]"))return;const t=document.createElement("style");t.setAttribute("data-rte-style","true"),t.textContent=e,this.insertBefore(t,this.firstChild)}connectedCallback(){super.connectedCallback(),this.injectCss($S.cssText),this.ensureStructure(),this.placeholder&&this.editorEl&&(this.editorEl.dataset.placeholder=this.placeholder),this.value&&!this.editorEl.innerHTML.trim()&&(this.editorEl.innerHTML=this.value),this.content=this.editorEl.innerHTML,this.toolbarEl&&this.wireAuthoredToolbar(this.toolbarEl),this.mentionsEl=this.querySelector("nile-rte-mentions"),this.mentionsEl&&(this.mentionsEl.attach?.(this.editorEl,this),this.mentionsEl.setExternalConfig?.(this.mentions)),this.wireEditor(),document.addEventListener("selectionchange",this.onSelectionChange,{passive:!0}),this.updateToolbarState(),this.syncPreview()}ensureStructure(){this.toolbarEl=this.querySelector("nile-rte-toolbar"),this.previewEl=this.querySelector("nile-rte-preview"),this.containerEl=this.querySelector(".rte-container"),this.containerEl||(this.containerEl=document.createElement("div"),this.containerEl.className="rte-container",this.appendChild(this.containerEl)),this.ensureEditor(),this.toolbarEl&&this.toolbarEl.parentElement!==this.containerEl&&this.containerEl.appendChild(this.toolbarEl),this.editorEl.parentElement!==this.containerEl&&this.containerEl.appendChild(this.editorEl),this.previewEl&&(this.previewEl.parentElement!==this&&this.appendChild(this.previewEl),this.previewEl.previousElementSibling!==this.containerEl&&this.insertBefore(this.previewEl,this.containerEl.nextSibling))}updateContentWithMention(e){this.updateContent(),this.dispatchEvent(new CustomEvent("nile-change",{detail:{content:this.content,mention:e},bubbles:!0,composed:!0}))}disconnectedCallback(){document.removeEventListener("selectionchange",this.onSelectionChange),this.mentionsEl&&this.mentionsEl.detach&&this.mentionsEl.detach(),super.disconnectedCallback()}updated(e){e.has("value")&&this.editorEl&&this.value!==this.editorEl.innerHTML&&(this.editorEl.innerHTML=this.value||"<p><br></p>",this.content=this.editorEl.innerHTML,this.syncPreview()),e.has("singleLineEditor")&&(this.editorEl&&this.editorEl.classList.toggle("single-line",this.singleLineEditor),this.previewEl&&this.previewEl.classList.toggle("single-line",this.singleLineEditor))}ensureEditor(){if(this.editorEl=this.querySelector(".editor"),!this.editorEl){const e=document.createElement("article");e.className="editor",e.setAttribute("contenteditable","true"),this.editorEl=e}this.placeholder&&(this.editorEl.dataset.placeholder=this.placeholder),this.editorEl.innerHTML.trim()||(this.editorEl.innerHTML="<p><br></p>")}unwrapMention(e,t=!0){const i=e.parentNode;if(!i)return;const M=t?(e.textContent??"").replace(/\u200B/g,""):"",n=document.createTextNode(M);i.insertBefore(n,e),i.removeChild(e);const o=document.createRange();o.setStartAfter(n),o.collapse(!0);const r=window.getSelection();r?.removeAllRanges(),r?.addRange(o)}scrubBrokenMentions(){if(!this.editorEl)return;this.editorEl.querySelectorAll("span.mention").forEach((e=>{const t=e,i=t.getAttribute("data-mention-key"),M=t.getAttribute("data-mention-label"),n=t.getAttribute("data-mention-trigger")||"",o=(t.textContent??"").replace(/\u200B/g,"").trim(),r=!!i&&!!M&&o.length>0&&o.startsWith(n)&&o.includes(M);o&&r||this.unwrapMention(t,!0)}))}wireEditor(){this.editorEl.addEventListener("input",(()=>{this.ensureAtLeastOneParagraph(),this.scrubBrokenMentions(),this.updateContent(),this.updateToolbarState()})),this.editorEl.addEventListener("mouseup",(()=>{this.saveSelection(),this.updateToolbarState()})),this.editorEl.addEventListener("keyup",(e=>{this.saveSelection(),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key)&&this.updateToolbarState()})),this.editorEl.addEventListener("keydown",this.onEditorKeydown)}wireAuthoredToolbar(e){this.buttonMap.clear(),this.headingSelect=null,this.fontSelect=null,this.colorInput=null,Array.from(e.children).forEach((e=>{const t=e.tagName.toLowerCase();if("nile-rte-select"!==t||"align"!==e.getAttribute("type")){if("nile-rte-link"===t)return e.editorEl=this.editorEl,void e.addEventListener("link-changed",(()=>{this.updateContent(),this.updateToolbarState()}));if("nile-rte-toolbar-item"===t){let t=e.querySelector(":scope > nile-button");const i=e.getAttribute("name")||"",M=e.getAttribute("label")||i,n=e.getAttribute("icon"),o=e.innerHTML.trim().length>0;if(t||(t=document.createElement("nile-button"),t.variant="tertiary",t.size="small"),n)t.innerHTML=`<nile-icon name="${n}" aria-label="${M}"></nile-icon>`,e.innerHTML="";else if(o)t.innerHTML=e.innerHTML,e.innerHTML="";else{const n=XS[i];n?t.innerHTML=`<nile-icon name="${n}" size="20" color="black" aria-label="${M}"></nile-icon>`:t.textContent=M||i,e.innerHTML=""}if(!t.isConnected){const i=document.createElement("nile-tooltip");i.setAttribute("content",M),i.appendChild(t),e.appendChild(i)}t.setAttribute("aria-label",M),t.addEventListener("mousedown",(e=>e.preventDefault())),t.addEventListener("click",(()=>this.onToolbarCommand(i)));const r=this.buttonMap.get(i)??[];return r.push(t),void this.buttonMap.set(i,r)}if("nile-rte-select"!==t)"nile-rte-color"!==t||e.addEventListener("change",(e=>{this.focusAndRestore();const{mode:t,value:i}=e.detail;"backColor"===t?_S(this.editorEl,"backgroundColor",i,"data-rte-bg"):function(e,t){_S(e,"color",t,"data-rte-color")}(this.editorEl,i),this.updateContent(),this.updateToolbarState()}));else{const t=e.getAttribute("type")||"";e.addEventListener("change",(e=>{this.focusAndRestore();const i=e.detail;"heading"===t?function(e,t){const i=document.getSelection();if(!i||0===i.rangeCount)return;const M=VS(i.getRangeAt(0).startContainer,e);if(!M)return;if(M.tagName.toLowerCase()===t)return;const n=document.createElement(t);for(;M.firstChild;)n.appendChild(M.firstChild);M.replaceWith(n);const o=document.createRange();o.selectNodeContents(n),o.collapse(!0),i.removeAllRanges(),i.addRange(o)}(this.editorEl,i):"font"===t&&BS(this.editorEl,i),this.updateContent(),this.updateToolbarState()}))}}else e.addEventListener("change",(e=>{this.focusAndRestore();const t=e.detail;WS(this.editorEl,t),this.updateContent(),this.updateToolbarState()}))}))}saveSelection(){const e=window.getSelection();e&&e.rangeCount&&(this.lastRange=e.getRangeAt(0).cloneRange())}restoreSelection(){if(!this.lastRange)return;const e=document.getSelection();e&&(e.removeAllRanges(),e.addRange(this.lastRange))}focusAndRestore(){this.editorEl?.focus(),this.restoreSelection()}getCleanContent(){const e=this.editorEl.cloneNode(!0);return e.querySelectorAll("*").forEach((e=>{e.removeAttribute("style")})),e.innerHTML}insertList(e){if(this.restoreSelection(),!this.lastRange)return;const t=document.createElement(e),i=this.lastRange.extractContents(),M=document.createElement("div");M.appendChild(i),Array.from(M.childNodes).forEach((e=>{if(e.nodeType===Node.TEXT_NODE&&!e.textContent?.trim())return;const i=document.createElement("li");i.appendChild(e),t.appendChild(i)})),this.lastRange.insertNode(t),this.afterListEdit(t)}afterListEdit(e){const t=document.createRange();t.setStartAfter(e),t.collapse(!0);const i=window.getSelection();i?.removeAllRanges(),i?.addRange(t),this.saveSelection(),this.updateContent(),this.updateToolbarState()}ensureAtLeastOneParagraph(){const e=this.editorEl;if(!e)return;const t=""===(e.textContent??"").replace(/\u200B/g,"").trim();if(0===e.childNodes.length||t)return void(e.innerHTML="<p><br></p>");if(!e.querySelector("p,h1,h2,h3,h4,h5,h6,ul,ol,table,blockquote,pre")){const t=document.createElement("p");for(;e.firstChild;)t.appendChild(e.firstChild);return t.hasChildNodes()||t.appendChild(document.createElement("br")),void e.appendChild(t)}e.querySelectorAll("p").forEach((e=>{""===(e.textContent??"").replace(/\u200B/g,"")&&(e.innerHTML.toLowerCase().includes("<br")||(e.innerHTML="<br>"))}))}onToolbarCommand(e){switch(this.focusAndRestore(),e){case"bold":PS(this.editorEl,"strong");break;case"italic":PS(this.editorEl,"em");break;case"underline":PS(this.editorEl,"u");break;case"left":WS(this.editorEl,"left");break;case"center":WS(this.editorEl,"center");break;case"right":WS(this.editorEl,"right");break;case"justify":WS(this.editorEl,"justify");break;case"ul":JS(this.editorEl,"ul"),this.updateContent(),this.updateToolbarState();break;case"ol":JS(this.editorEl,"ol"),this.updateContent(),this.updateToolbarState();break;case"link":break;case"clear":const e=document.createTreeWalker(this.editorEl,NodeFilter.SHOW_ELEMENT),t=[];for(;e.nextNode();){const i=e.currentNode;i.removeAttribute("style"),["B","STRONG","I","EM","U","SPAN","FONT"].includes(i.tagName)&&t.push(i)}for(const e of t){for(;e.firstChild;)e.parentNode?.insertBefore(e.firstChild,e);e.remove()}this.ensureAtLeastOneParagraph()}this.updateContent(),this.updateToolbarState()}setBtnActive(e,t){const i=this.buttonMap.get(e);if(i)for(const e of i)e.toggleAttribute("data-active",!!t)}updateToolbarState(){if(!this.editorEl)return;const e=document.getSelection();if(!e||0===e.rangeCount)return;const t=e.getRangeAt(0);if(!this.editorEl.contains(t.commonAncestorContainer))return;const i=function(e){for(;e&&!(e instanceof HTMLElement);)e=e.parentNode;return e}(t.startContainer)||this.editorEl,M=getComputedStyle(i),n=VS(t.startContainer,this.editorEl)||this.editorEl,o=(()=>{let e=i;for(;e&&e!==this.editorEl;){if(e instanceof HTMLElement){const t=e.tagName.toLowerCase();if("strong"===t||"b"===t)return!0;const i=getComputedStyle(e).fontWeight;if(parseInt(i,10)>=600)return!0}e=e.parentNode}return!1})(),r=(()=>{let e=i;for(;e&&e!==this.editorEl;){if(e instanceof HTMLElement){const t=e.tagName.toLowerCase();if("em"===t||"i"===t)return!0;if("italic"===getComputedStyle(e).fontStyle)return!0}e=e.parentNode}return!1})(),s=(()=>{let e=i;for(;e&&e!==this.editorEl;){if(e instanceof HTMLElement){const t=getComputedStyle(e).textDecorationLine;if(t&&t.includes("underline"))return!0;if("u"===e.tagName.toLowerCase())return!0}e=e.parentNode}return!1})(),a=!!i.closest("a"),l=n.style.textAlign||getComputedStyle(n).textAlign||"start",N="start"===l?"left":l,g=!!i.closest("li")&&i.closest("ul,ol")?.tagName.toLowerCase()||"";if(this.setBtnActive("bold",o),this.setBtnActive("italic",r),this.setBtnActive("underline",s),this.setBtnActive("link",a),this.setBtnActive("left","left"===N&&!["center","right","justify"].includes(N)),this.setBtnActive("center","center"===N),this.setBtnActive("right","right"===N),this.setBtnActive("justify","justify"===N),this.setBtnActive("ul","ul"===g),this.setBtnActive("ol","ol"===g),this.headingSelect){const e=n.tagName.toLowerCase(),t=["h1","h2","h3"].includes(e)?e:"p";this.headingSelect.value!==t&&(this.headingSelect.value=t)}if(this.fontSelect){const e=(M.fontFamily||"").replace(/["']/g,"").split(",")[0].trim().toLowerCase();if(e)for(const t of Array.from(this.fontSelect.options))if(t.value.toLowerCase()===e){this.fontSelect.value=t.value;break}}if(this.colorInput){const e=RS(M.color);e&&this.colorInput.value.toLowerCase()!==e.toLowerCase()&&(this.colorInput.value=e),this.colorSwatchEl&&(this.colorSwatchEl.style.backgroundColor=this.colorInput.value)}if(this.bgColorInput){const e=getComputedStyle(i).backgroundColor;if(e&&!/transparent|rgba\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(e)){const t=RS(e);t&&this.bgColorInput.value.toLowerCase()!==t.toLowerCase()&&(this.bgColorInput.value=t)}this.bgSwatchEl&&(this.bgSwatchEl.style.backgroundColor=this.bgColorInput.value)}}syncPreview(){this.updateContent()}updateContent(){if(!this.editorEl)return;this.ensureAtLeastOneParagraph();const e=""===(this.editorEl.textContent??"").trim();this.editorEl.classList.toggle("empty",e);const t=this.editorEl.cloneNode(!0);if(this.noStyles)t.querySelectorAll("[style]").forEach((e=>e.removeAttribute("style")));else{const e=document.createTreeWalker(this.editorEl,NodeFilter.SHOW_ELEMENT),i=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT),M=["font-weight","font-style","text-decoration","color","background-color","font-size","font-family","text-align","line-height","letter-spacing","white-space","vertical-align","list-style-position","padding-inline-start"];for(;e.nextNode()&&i.nextNode();){const t=e.currentNode,n=i.currentNode,o=window.getComputedStyle(t),r=M.map((e=>`${e}:${o.getPropertyValue(e)}`)).join(";");r.trim()&&n.setAttribute("style",r)}}this.content=t.innerHTML,this.previewEl&&(this.previewEl.innerHTML=this.content),this.dispatchEvent(new CustomEvent("nile-change",{detail:{content:this.content},bubbles:!0,composed:!0}))}};e([ce({type:String,attribute:!0,reflect:!0})],qS.prototype,"value",void 0),e([ce({type:Boolean,attribute:!0,reflect:!0})],qS.prototype,"noStyles",void 0),e([ce({type:Boolean,attribute:"singlelineeditor",reflect:!0})],qS.prototype,"singleLineEditor",void 0),e([ce({type:String})],qS.prototype,"placeholder",void 0),e([ce({attribute:"mentions",reflect:!0,converter:{fromAttribute:e=>{try{const t=JSON.parse(e),i={};for(const e of Object.keys(t)){const M=t[e];Array.isArray(M)&&(i[e]=M.filter((e=>e&&"string"==typeof e.key&&"string"==typeof e.label)).map((e=>({key:e.key,label:e.label}))))}return i}catch{return{}}},toAttribute:e=>JSON.stringify(e)}})],qS.prototype,"mentions",void 0),e([De()],qS.prototype,"content",void 0),qS=e([Ne("nile-rich-text-editor")],qS);"undefined"!=typeof window&&(window.nileElementsVersion='"1.4.4-beta-1.2"',window.nileVersion="__NILE_VERSION__",window.process=window.process||{env:{NODE_ENV:"production"}});const KS=r`
|
|
15080
15082
|
:host {
|
|
15081
15083
|
|
|
15082
15084
|
top: 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(["../fixture-54600b35.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-accordion.cjs.js","../sinon-esm-97570c13.cjs.js","tslib","./nile-accordion.css.cjs.js","../internal/nile-element.cjs.js","../internal/animate.cjs.js","lit/directives/class-map.js","lit/decorators.js","../utilities/animation-registry.cjs.js","../internal/event.cjs.js","../internal/watch.cjs.js"],function(_export,_context){"use strict";var a,e,i,n,o,r,t,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12;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 _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}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);});};}return{setters:[function(_fixture005CjsJs){a=_fixture005CjsJs.f;e=_fixture005CjsJs.a;i=_fixture005CjsJs.e;n=_fixture005CjsJs.o;},function(_litStaticHtmlJs){o=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileAccordionCjsJs){r=_nileAccordionCjsJs.N;},function(_sinonEsm006CjsJs){t=_sinonEsm006CjsJs.s;},function(_tslib){},function(_nileAccordionCssCjsJs){},function(_internalNileElementCjsJs){},function(_internalAnimateCjsJs){},function(_litDirectivesClassMapJs){},function(_litDecoratorsJs){},function(_utilitiesAnimationRegistryCjsJs){},function(_internalEventCjsJs){},function(_internalWatchCjsJs){}],execute:function execute(){describe("NileAccordion",function(){it("should render correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var i;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return a(o(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:i=_context2.sent;e(i).to.be.instanceOf(r),e(i.shadowRoot).not.to.be["null"],e(i.summary).to.equal("Test Summary");case 4:case"end":return _context2.stop();}},_callee);}))),it("should initialize closed by default",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _i$shadowRoot;var i,n;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return a(o(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:i=_context3.sent;e(i.open).to.be["false"];n=(_i$shadowRoot=i.shadowRoot)===null||_i$shadowRoot===void 0?void 0:_i$shadowRoot.querySelector(".accordian__body");e(n===null||n===void 0?void 0:n.hidden).to.be["true"];case 6:case"end":return _context3.stop();}},_callee2);}))),it("should open when clicked",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _n$shadowRoot,_n$shadowRoot2;var n,r,t;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return a(o(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:n=_context4.sent;r=(_n$shadowRoot=n.shadowRoot)===null||_n$shadowRoot===void 0?void 0:_n$shadowRoot.querySelector(".accordian__header");r.click();_context4.next=7;return i(n);case 7:e(n.open).to.be["true"];t=(_n$shadowRoot2=n.shadowRoot)===null||_n$shadowRoot2===void 0?void 0:_n$shadowRoot2.querySelector(".accordian__body");e(t===null||t===void 0?void 0:t.hidden).to.be["false"];case 10:case"end":return _context4.stop();}},_callee3);}))),it('should emit "nile-show" and "nile-after-show" when opened',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _i$shadowRoot2;var i,r,c;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return a(o(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:i=_context5.sent;r=t.spy(i,"emit");c=(_i$shadowRoot2=i.shadowRoot)===null||_i$shadowRoot2===void 0?void 0:_i$shadowRoot2.querySelector(".accordian__header");setTimeout(function(){return c.click();});_context5.next=8;return n(i,"nile-after-show");case 8:e(r.calledWith("nile-show")).to.be["true"];e(r.calledWith("nile-after-show")).to.be["true"];case 10:case"end":return _context5.stop();}},_callee4);}))),it('should emit "nile-hide" and "nile-after-hide" when closed',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _i$shadowRoot3;var i,r,c;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return a(o(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\" open></nile-accordion>"]))));case 2:i=_context6.sent;r=t.spy(i,"emit");c=(_i$shadowRoot3=i.shadowRoot)===null||_i$shadowRoot3===void 0?void 0:_i$shadowRoot3.querySelector(".accordian__header");setTimeout(function(){return c.click();});_context6.next=8;return n(i,"nile-after-hide");case 8:e(r.calledWith("nile-hide")).to.be["true"];e(r.calledWith("nile-after-hide")).to.be["true"];case 10:case"end":return _context6.stop();}},_callee5);}))),it('should be disabled when the "disabled" property is set',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var _n$shadowRoot3;var n,r;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return a(o(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\" disabled></nile-accordion>"]))));case 2:n=_context7.sent;r=(_n$shadowRoot3=n.shadowRoot)===null||_n$shadowRoot3===void 0?void 0:_n$shadowRoot3.querySelector(".accordian__header");r.click();_context7.next=7;return i(n);case 7:e(n.open).to.be["false"];case 8:case"end":return _context7.stop();}},_callee6);}))),it("should handle keyboard interaction (Enter and Space)",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _n$shadowRoot4;var n,r,t,c;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return a(o(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:n=_context8.sent;r=(_n$shadowRoot4=n.shadowRoot)===null||_n$shadowRoot4===void 0?void 0:_n$shadowRoot4.querySelector(".accordian__header");t=new KeyboardEvent("keydown",{key:"Enter"});r.dispatchEvent(t);_context8.next=8;return i(n);case 8:e(n.open).to.be["true"];c=new KeyboardEvent("keydown",{key:" "});r.dispatchEvent(c);_context8.next=13;return i(n);case 13:e(n.open).to.be["false"];case 14:case"end":return _context8.stop();}},_callee7);}))),it("should handle ArrowUp/ArrowLeft to close and ArrowDown/ArrowRight to open",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var _n$shadowRoot5;var n,r,t,c;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return a(o(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:n=_context9.sent;r=(_n$shadowRoot5=n.shadowRoot)===null||_n$shadowRoot5===void 0?void 0:_n$shadowRoot5.querySelector(".accordian__header");t=new KeyboardEvent("keydown",{key:"ArrowDown"});r.dispatchEvent(t);_context9.next=8;return i(n);case 8:e(n.open).to.be["true"];c=new KeyboardEvent("keydown",{key:"ArrowUp"});r.dispatchEvent(c);_context9.next=13;return i(n);case 13:e(n.open).to.be["false"];case 14:case"end":return _context9.stop();}},_callee8);}))),it('should apply the "variant" class based on the variant property',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var _i$shadowRoot4;var i,n;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return a(o(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\" variant=\"dark\"></nile-accordion>"]))));case 2:i=_context10.sent;n=(_i$shadowRoot4=i.shadowRoot)===null||_i$shadowRoot4===void 0?void 0:_i$shadowRoot4.querySelector(".accordian__header");e(n).to.have["class"]("accordian__header--dark");case 5:case"end":return _context10.stop();}},_callee9);}))),it("should apply the correct size class based on the size property",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var _i$shadowRoot5;var i,n;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return a(o(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\" size=\"lg\"></nile-accordion>"]))));case 2:i=_context11.sent;n=(_i$shadowRoot5=i.shadowRoot)===null||_i$shadowRoot5===void 0?void 0:_i$shadowRoot5.querySelector(".accordian");e(n).to.have["class"]("accordian--lg");case 5:case"end":return _context11.stop();}},_callee10);}))),it("should apply the correct expand icon placement class based on the expandIconPlacement property",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(){var _i$shadowRoot6;var i,n;return _regeneratorRuntime().wrap(function _callee11$(_context12){while(1)switch(_context12.prev=_context12.next){case 0:_context12.next=2;return a(o(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\" expandIconPlacement=\"left\"></nile-accordion>"]))));case 2:i=_context12.sent;n=(_i$shadowRoot6=i.shadowRoot)===null||_i$shadowRoot6===void 0?void 0:_i$shadowRoot6.querySelector(".accordian__header");e(n).to.have["class"]("accordian__header--arrow-left");case 5:case"end":return _context12.stop();}},_callee11);}))),it("should animate when opening and closing",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(){var _n$shadowRoot6;var n,r,c;return _regeneratorRuntime().wrap(function _callee12$(_context13){while(1)switch(_context13.prev=_context13.next){case 0:_context13.next=2;return a(o(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:n=_context13.sent;r=t.spy(n,"handleOpenChange");c=(_n$shadowRoot6=n.shadowRoot)===null||_n$shadowRoot6===void 0?void 0:_n$shadowRoot6.querySelector(".accordian__header");c.click();_context13.next=8;return i(n);case 8:e(r.called).to.be["true"];c.click();_context13.next=12;return i(n);case 12:e(r.calledTwice).to.be["true"];case 13:case"end":return _context13.stop();}},_callee12);})));});}};});
|
|
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(["../fixture-1c49c014.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-accordion.cjs.js","../sinon-esm-97570c13.cjs.js","tslib","./nile-accordion.css.cjs.js","../internal/nile-element.cjs.js","../internal/animate.cjs.js","lit/directives/class-map.js","lit/decorators.js","../utilities/animation-registry.cjs.js","../internal/event.cjs.js","../internal/watch.cjs.js"],function(_export,_context){"use strict";var a,e,i,n,o,r,t,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12;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 _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}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);});};}return{setters:[function(_fixture005CjsJs){a=_fixture005CjsJs.f;e=_fixture005CjsJs.a;i=_fixture005CjsJs.e;n=_fixture005CjsJs.o;},function(_litStaticHtmlJs){o=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileAccordionCjsJs){r=_nileAccordionCjsJs.N;},function(_sinonEsm006CjsJs){t=_sinonEsm006CjsJs.s;},function(_tslib){},function(_nileAccordionCssCjsJs){},function(_internalNileElementCjsJs){},function(_internalAnimateCjsJs){},function(_litDirectivesClassMapJs){},function(_litDecoratorsJs){},function(_utilitiesAnimationRegistryCjsJs){},function(_internalEventCjsJs){},function(_internalWatchCjsJs){}],execute:function execute(){describe("NileAccordion",function(){it("should render correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var i;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return a(o(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:i=_context2.sent;e(i).to.be.instanceOf(r),e(i.shadowRoot).not.to.be["null"],e(i.summary).to.equal("Test Summary");case 4:case"end":return _context2.stop();}},_callee);}))),it("should initialize closed by default",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _i$shadowRoot;var i,n;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return a(o(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:i=_context3.sent;e(i.open).to.be["false"];n=(_i$shadowRoot=i.shadowRoot)===null||_i$shadowRoot===void 0?void 0:_i$shadowRoot.querySelector(".accordian__body");e(n===null||n===void 0?void 0:n.hidden).to.be["true"];case 6:case"end":return _context3.stop();}},_callee2);}))),it("should open when clicked",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _n$shadowRoot,_n$shadowRoot2;var n,r,t;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return a(o(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:n=_context4.sent;r=(_n$shadowRoot=n.shadowRoot)===null||_n$shadowRoot===void 0?void 0:_n$shadowRoot.querySelector(".accordian__header");r.click();_context4.next=7;return i(n);case 7:e(n.open).to.be["true"];t=(_n$shadowRoot2=n.shadowRoot)===null||_n$shadowRoot2===void 0?void 0:_n$shadowRoot2.querySelector(".accordian__body");e(t===null||t===void 0?void 0:t.hidden).to.be["false"];case 10:case"end":return _context4.stop();}},_callee3);}))),it('should emit "nile-show" and "nile-after-show" when opened',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _i$shadowRoot2;var i,r,c;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return a(o(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:i=_context5.sent;r=t.spy(i,"emit");c=(_i$shadowRoot2=i.shadowRoot)===null||_i$shadowRoot2===void 0?void 0:_i$shadowRoot2.querySelector(".accordian__header");setTimeout(function(){return c.click();});_context5.next=8;return n(i,"nile-after-show");case 8:e(r.calledWith("nile-show")).to.be["true"];e(r.calledWith("nile-after-show")).to.be["true"];case 10:case"end":return _context5.stop();}},_callee4);}))),it('should emit "nile-hide" and "nile-after-hide" when closed',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _i$shadowRoot3;var i,r,c;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return a(o(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\" open></nile-accordion>"]))));case 2:i=_context6.sent;r=t.spy(i,"emit");c=(_i$shadowRoot3=i.shadowRoot)===null||_i$shadowRoot3===void 0?void 0:_i$shadowRoot3.querySelector(".accordian__header");setTimeout(function(){return c.click();});_context6.next=8;return n(i,"nile-after-hide");case 8:e(r.calledWith("nile-hide")).to.be["true"];e(r.calledWith("nile-after-hide")).to.be["true"];case 10:case"end":return _context6.stop();}},_callee5);}))),it('should be disabled when the "disabled" property is set',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var _n$shadowRoot3;var n,r;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return a(o(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\" disabled></nile-accordion>"]))));case 2:n=_context7.sent;r=(_n$shadowRoot3=n.shadowRoot)===null||_n$shadowRoot3===void 0?void 0:_n$shadowRoot3.querySelector(".accordian__header");r.click();_context7.next=7;return i(n);case 7:e(n.open).to.be["false"];case 8:case"end":return _context7.stop();}},_callee6);}))),it("should handle keyboard interaction (Enter and Space)",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _n$shadowRoot4;var n,r,t,c;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return a(o(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:n=_context8.sent;r=(_n$shadowRoot4=n.shadowRoot)===null||_n$shadowRoot4===void 0?void 0:_n$shadowRoot4.querySelector(".accordian__header");t=new KeyboardEvent("keydown",{key:"Enter"});r.dispatchEvent(t);_context8.next=8;return i(n);case 8:e(n.open).to.be["true"];c=new KeyboardEvent("keydown",{key:" "});r.dispatchEvent(c);_context8.next=13;return i(n);case 13:e(n.open).to.be["false"];case 14:case"end":return _context8.stop();}},_callee7);}))),it("should handle ArrowUp/ArrowLeft to close and ArrowDown/ArrowRight to open",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var _n$shadowRoot5;var n,r,t,c;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return a(o(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:n=_context9.sent;r=(_n$shadowRoot5=n.shadowRoot)===null||_n$shadowRoot5===void 0?void 0:_n$shadowRoot5.querySelector(".accordian__header");t=new KeyboardEvent("keydown",{key:"ArrowDown"});r.dispatchEvent(t);_context9.next=8;return i(n);case 8:e(n.open).to.be["true"];c=new KeyboardEvent("keydown",{key:"ArrowUp"});r.dispatchEvent(c);_context9.next=13;return i(n);case 13:e(n.open).to.be["false"];case 14:case"end":return _context9.stop();}},_callee8);}))),it('should apply the "variant" class based on the variant property',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var _i$shadowRoot4;var i,n;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return a(o(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\" variant=\"dark\"></nile-accordion>"]))));case 2:i=_context10.sent;n=(_i$shadowRoot4=i.shadowRoot)===null||_i$shadowRoot4===void 0?void 0:_i$shadowRoot4.querySelector(".accordian__header");e(n).to.have["class"]("accordian__header--dark");case 5:case"end":return _context10.stop();}},_callee9);}))),it("should apply the correct size class based on the size property",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var _i$shadowRoot5;var i,n;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return a(o(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\" size=\"lg\"></nile-accordion>"]))));case 2:i=_context11.sent;n=(_i$shadowRoot5=i.shadowRoot)===null||_i$shadowRoot5===void 0?void 0:_i$shadowRoot5.querySelector(".accordian");e(n).to.have["class"]("accordian--lg");case 5:case"end":return _context11.stop();}},_callee10);}))),it("should apply the correct expand icon placement class based on the expandIconPlacement property",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(){var _i$shadowRoot6;var i,n;return _regeneratorRuntime().wrap(function _callee11$(_context12){while(1)switch(_context12.prev=_context12.next){case 0:_context12.next=2;return a(o(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\" expandIconPlacement=\"left\"></nile-accordion>"]))));case 2:i=_context12.sent;n=(_i$shadowRoot6=i.shadowRoot)===null||_i$shadowRoot6===void 0?void 0:_i$shadowRoot6.querySelector(".accordian__header");e(n).to.have["class"]("accordian__header--arrow-left");case 5:case"end":return _context12.stop();}},_callee11);}))),it("should animate when opening and closing",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(){var _n$shadowRoot6;var n,r,c;return _regeneratorRuntime().wrap(function _callee12$(_context13){while(1)switch(_context13.prev=_context13.next){case 0:_context13.next=2;return a(o(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:n=_context13.sent;r=t.spy(n,"handleOpenChange");c=(_n$shadowRoot6=n.shadowRoot)===null||_n$shadowRoot6===void 0?void 0:_n$shadowRoot6.querySelector(".accordian__header");c.click();_context13.next=8;return i(n);case 8:e(r.called).to.be["true"];c.click();_context13.next=12;return i(n);case 12:e(r.calledTwice).to.be["true"];case 13:case"end":return _context13.stop();}},_callee12);})));});}};});
|
|
2
2
|
//# sourceMappingURL=nile-accordian.test.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as a,a as e,e as i,o as n}from"../fixture-
|
|
1
|
+
import{f as a,a as e,e as i,o as n}from"../fixture-985bba12.esm.js";import{html as o}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import{N as r}from"./nile-accordion.esm.js";import{s as t}from"../sinon-esm-68c8e378.esm.js";import"tslib";import"./nile-accordion.css.esm.js";import"../internal/nile-element.esm.js";import"../internal/animate.esm.js";import"lit/directives/class-map.js";import"lit/decorators.js";import"../utilities/animation-registry.esm.js";import"../internal/event.esm.js";import"../internal/watch.esm.js";describe("NileAccordion",(()=>{it("should render correctly",(async()=>{const i=await a(o`<nile-accordion summary="Test Summary"></nile-accordion>`);e(i).to.be.instanceOf(r),e(i.shadowRoot).not.to.be.null,e(i.summary).to.equal("Test Summary")})),it("should initialize closed by default",(async()=>{const i=await a(o`<nile-accordion summary="Test Summary"></nile-accordion>`);e(i.open).to.be.false;const n=i.shadowRoot?.querySelector(".accordian__body");e(n?.hidden).to.be.true})),it("should open when clicked",(async()=>{const n=await a(o`<nile-accordion summary="Test Summary"></nile-accordion>`),r=n.shadowRoot?.querySelector(".accordian__header");r.click(),await i(n),e(n.open).to.be.true;const t=n.shadowRoot?.querySelector(".accordian__body");e(t?.hidden).to.be.false})),it('should emit "nile-show" and "nile-after-show" when opened',(async()=>{const i=await a(o`<nile-accordion summary="Test Summary"></nile-accordion>`),r=t.spy(i,"emit"),c=i.shadowRoot?.querySelector(".accordian__header");setTimeout((()=>c.click())),await n(i,"nile-after-show"),e(r.calledWith("nile-show")).to.be.true,e(r.calledWith("nile-after-show")).to.be.true})),it('should emit "nile-hide" and "nile-after-hide" when closed',(async()=>{const i=await a(o`<nile-accordion summary="Test Summary" open></nile-accordion>`),r=t.spy(i,"emit"),c=i.shadowRoot?.querySelector(".accordian__header");setTimeout((()=>c.click())),await n(i,"nile-after-hide"),e(r.calledWith("nile-hide")).to.be.true,e(r.calledWith("nile-after-hide")).to.be.true})),it('should be disabled when the "disabled" property is set',(async()=>{const n=await a(o`<nile-accordion summary="Test Summary" disabled></nile-accordion>`),r=n.shadowRoot?.querySelector(".accordian__header");r.click(),await i(n),e(n.open).to.be.false})),it("should handle keyboard interaction (Enter and Space)",(async()=>{const n=await a(o`<nile-accordion summary="Test Summary"></nile-accordion>`),r=n.shadowRoot?.querySelector(".accordian__header"),t=new KeyboardEvent("keydown",{key:"Enter"});r.dispatchEvent(t),await i(n),e(n.open).to.be.true;const c=new KeyboardEvent("keydown",{key:" "});r.dispatchEvent(c),await i(n),e(n.open).to.be.false})),it("should handle ArrowUp/ArrowLeft to close and ArrowDown/ArrowRight to open",(async()=>{const n=await a(o`<nile-accordion summary="Test Summary"></nile-accordion>`),r=n.shadowRoot?.querySelector(".accordian__header"),t=new KeyboardEvent("keydown",{key:"ArrowDown"});r.dispatchEvent(t),await i(n),e(n.open).to.be.true;const c=new KeyboardEvent("keydown",{key:"ArrowUp"});r.dispatchEvent(c),await i(n),e(n.open).to.be.false})),it('should apply the "variant" class based on the variant property',(async()=>{const i=await a(o`<nile-accordion summary="Test Summary" variant="dark"></nile-accordion>`),n=i.shadowRoot?.querySelector(".accordian__header");e(n).to.have.class("accordian__header--dark")})),it("should apply the correct size class based on the size property",(async()=>{const i=await a(o`<nile-accordion summary="Test Summary" size="lg"></nile-accordion>`),n=i.shadowRoot?.querySelector(".accordian");e(n).to.have.class("accordian--lg")})),it("should apply the correct expand icon placement class based on the expandIconPlacement property",(async()=>{const i=await a(o`<nile-accordion summary="Test Summary" expandIconPlacement="left"></nile-accordion>`),n=i.shadowRoot?.querySelector(".accordian__header");e(n).to.have.class("accordian__header--arrow-left")})),it("should animate when opening and closing",(async()=>{const n=await a(o`<nile-accordion summary="Test Summary"></nile-accordion>`),r=t.spy(n,"handleOpenChange"),c=n.shadowRoot?.querySelector(".accordian__header");c.click(),await i(n),e(r.called).to.be.true,c.click(),await i(n),e(r.calledTwice).to.be.true}))}));
|