@aquera/nile-elements 0.1.70-beta-1.2 → 0.1.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/demo/index.html +9 -263
- package/dist/{fixture-5b79f853.cjs.js → fixture-3bfb4490.cjs.js} +2 -2
- package/dist/{fixture-5b79f853.cjs.js.map → fixture-3bfb4490.cjs.js.map} +1 -1
- package/dist/{fixture-cf7bfcf5.esm.js → fixture-8edec91c.esm.js} +1 -1
- package/dist/index.js +1 -1
- 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.test.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.test.esm.js +1 -1
- package/dist/nile-code-editor/extensionSetup.cjs.js +2 -2
- package/dist/nile-code-editor/extensionSetup.esm.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
- package/dist/nile-code-editor/nile-code-editor.esm.js +2 -2
- package/dist/nile-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-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/src/nile-code-editor/nile-code-editor.d.ts +1 -0
- package/dist/src/nile-code-editor/nile-code-editor.js +5 -0
- package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-code-editor/nile-code-editor.ts +6 -0
- package/dist/fixture-90b199c4.esm.js +0 -569
- package/dist/fixture-dbd66009.cjs.js +0 -395
- package/dist/fixture-dbd66009.cjs.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/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-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/index.d.ts +0 -5
- package/dist/src/nile-grid/index.js +0 -6
- package/dist/src/nile-grid/index.js.map +0 -1
- package/dist/src/nile-grid/nile-grid.css.d.ts +0 -1
- package/dist/src/nile-grid/nile-grid.css.js +0 -120
- package/dist/src/nile-grid/nile-grid.css.js.map +0 -1
- package/dist/src/nile-grid/nile-grid.d.ts +0 -39
- package/dist/src/nile-grid/nile-grid.js +0 -182
- package/dist/src/nile-grid/nile-grid.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-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-icon/icons/svg/ng-action.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-action.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-action.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-activity.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-activity.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-activity.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-alert-circle.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-alert-circle.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-alert-circle.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-align-center.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-align-center.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-align-center.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-annotation-x.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-annotation-x.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-annotation-x.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-arrow-down.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-arrow-down.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-arrow-down.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-down.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-down.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-down.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-left.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-left.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-left.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-right.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-right.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-right.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-arrow-up.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-arrow-up.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-arrow-up.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-bar-chart-12.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-bar-chart-12.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-bar-chart-12.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-bell-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-bell-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-bell-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-bell-ringing-04.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-bell-ringing-04.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-bell-ringing-04.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-bold-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-bold-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-bold-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-building-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-building-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-building-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-building-05.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-building-05.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-building-05.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue-animated.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue-animated.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue-animated.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-calendar-plus-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-calendar-plus-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-calendar-plus-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-calendar.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-calendar.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-calendar.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-check-circle-broken.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-check-circle-broken.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-check-circle-broken.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-check-circle.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-check-circle.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-check-circle.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-check-square-broken.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-check-square-broken.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-check-square-broken.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-check.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-check.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-check.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-chevron-down.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-down.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-down.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-chevron-left.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-left.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-left.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-chevron-right.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-right.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-right.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-chevron-selector-vertical.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-selector-vertical.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-selector-vertical.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-chevron-up-double.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-up-double.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-up-double.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-chevron-up.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-up.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-up.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-copy-03.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-copy-03.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-copy-03.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-dataflow-04.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-dataflow-04.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-dataflow-04.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-dots-grid.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-dots-grid.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-dots-grid.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-dots-vertical.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-dots-vertical.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-dots-vertical.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-download-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-download-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-download-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-dropdown.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-dropdown.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-dropdown.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-edit-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-edit-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-edit-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-edit-05.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-edit-05.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-edit-05.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-expand-06.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-expand-06.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-expand-06.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-eye-off.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-eye-off.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-eye-off.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-eye.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-eye.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-eye.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-file-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-file-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-file-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-file-06.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-file-06.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-file-06.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-file-check-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-file-check-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-file-check-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-file-question-03.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-file-question-03.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-file-question-03.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-filter-lines.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-filter-lines.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-filter-lines.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-grid-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-grid-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-grid-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-help-circle.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-help-circle.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-help-circle.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-image-03.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-image-03.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-image-03.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-image-user-left.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-image-user-left.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-image-user-left.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-info-circle.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-info-circle.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-info-circle.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-italic-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-italic-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-italic-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-layers-three-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-layers-three-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-layers-three-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-list.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-list.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-list.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-log-out-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-log-out-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-log-out-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-mail-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-mail-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-mail-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-mail-04.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-mail-04.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-mail-04.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-marker-pin-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-marker-pin-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-marker-pin-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-menu-05.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-menu-05.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-menu-05.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-message-text-square-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-message-text-square-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-message-text-square-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-minimize-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-minimize-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-minimize-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-minus.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-minus.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-minus.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-plus.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-plus.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-plus.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-refresh-cw-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-refresh-cw-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-refresh-cw-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-rocket-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-rocket-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-rocket-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-search-lg.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-search-lg.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-search-lg.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-send-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-send-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-send-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-settings-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-settings-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-settings-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-share-04.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-share-04.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-share-04.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-share-06.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-share-06.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-share-06.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-stars-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-stars-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-stars-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-trash-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-trash-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-trash-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-trash-03.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-trash-03.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-trash-03.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-trend-up-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-trend-up-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-trend-up-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-underline-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-underline-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-underline-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-upload-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-upload-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-upload-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-upload-cloud-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-upload-cloud-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-upload-cloud-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-user-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-user-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-user-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-user-check-02-1.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-user-check-02-1.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-user-check-02-1.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-user-check-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-user-check-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-user-check-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-user-plus-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-user-plus-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-user-plus-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-user-right-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-user-right-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-user-right-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-users-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-users-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-users-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-x-circle.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-x-circle.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-x-circle.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-x-close.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-x-close.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-x-close.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-x-square.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-x-square.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-x-square.js.map +0 -1
- package/dist/src/nile-input/__snapshots__/nile-input.test.snap.js +0 -75
- package/dist/src/nile-popover/__snapshots__/nile-popover.test.snap.js +0 -22
- 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-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
@@ -566,4 +566,4 @@ function d(t){if(function(t){return"undefined"!=typeof Symbol&&"object"==typeof
|
|
566
566
|
*
|
567
567
|
* @param {Object} target
|
568
568
|
* @returns {Array} an array of own and inherited enumerable keys from the target.
|
569
|
-
*/function w(t){var e=[];for(var n in t)e.push(n);return e}function b(t){return null===t||"object"!=typeof t}e.exports=c,e.exports.MemoizeMap=r},{"type-detect":39}],37:[function(t,e,n){var i=Function.prototype.toString,o=/\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/;e.exports=function(t){if("function"!=typeof t)return null;var e="";if(void 0===Function.prototype.name&&void 0===t.name){var n=i.call(t).match(o);n&&(e=n[1])}else e=t.name;return e}},{}],38:[function(t,e,n){function i(t,e){return null!=t&&e in Object(t)}function o(t){return t.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map((function(t){if("constructor"===t||"__proto__"===t||"prototype"===t)return{};var e=/^\[(\d+)\]$/.exec(t);return e?{i:parseFloat(e[1])}:{p:t.replace(/\\([.[\]])/g,"$1")}}))}function r(t,e,n){var i=t,o=null;n=void 0===n?e.length:n;for(var r=0;r<n;r++){var a=e[r];i&&(i=void 0===a.p?i[a.i]:i[a.p],r===n-1&&(o=i))}return o}function a(t,e){var n=o(e),a=n[n.length-1],s={parent:n.length>1?r(t,n,n.length-1):t,name:a.p||a.i,value:r(t,n)};return s.exists=i(s.parent,s.name),s}e.exports={hasProperty:i,getPathInfo:a,getPathValue:function(t,e){return a(t,e).value},setPathValue:function(t,e,n){return function(t,e,n){for(var i=t,o=n.length,r=null,a=0;a<o;a++){var s=null,c=null;if(r=n[a],a===o-1)i[s=void 0===r.p?r.i:r.p]=e;else if(void 0!==r.p&&i[r.p])i=i[r.p];else if(void 0!==r.i&&i[r.i])i=i[r.i];else{var u=n[a+1];s=void 0===r.p?r.i:r.p,c=void 0===u.p?[]:{},i[s]=c,i=i[s]}}}(t,n,o(e)),t}}},{}],39:[function(t,e,n){!function(t,i){"object"==typeof n&&void 0!==e?e.exports=i():t.typeDetect=i()}(this,(function(){var t="function"==typeof Promise,e="object"==typeof self?self:o,n="undefined"!=typeof Symbol,i="undefined"!=typeof Map,r="undefined"!=typeof Set,a="undefined"!=typeof WeakMap,s="undefined"!=typeof WeakSet,c="undefined"!=typeof DataView,u=n&&void 0!==Symbol.iterator,f=n&&void 0!==Symbol.toStringTag,h=r&&"function"==typeof Set.prototype.entries,l=i&&"function"==typeof Map.prototype.entries,d=h&&Object.getPrototypeOf((new Set).entries()),p=l&&Object.getPrototypeOf((new Map).entries()),w=u&&"function"==typeof Array.prototype[Symbol.iterator],b=w&&Object.getPrototypeOf([][Symbol.iterator]()),v=u&&"function"==typeof String.prototype[Symbol.iterator],m=v&&Object.getPrototypeOf(""[Symbol.iterator]());return function(n){var o=typeof n;if("object"!==o)return o;if(null===n)return"null";if(n===e)return"global";if(Array.isArray(n)&&(!1===f||!(Symbol.toStringTag in n)))return"Array";if("object"==typeof window&&null!==window){if("object"==typeof window.location&&n===window.location)return"Location";if("object"==typeof window.document&&n===window.document)return"Document";if("object"==typeof window.navigator){if("object"==typeof window.navigator.mimeTypes&&n===window.navigator.mimeTypes)return"MimeTypeArray";if("object"==typeof window.navigator.plugins&&n===window.navigator.plugins)return"PluginArray"}if(("function"==typeof window.HTMLElement||"object"==typeof window.HTMLElement)&&n instanceof window.HTMLElement){if("BLOCKQUOTE"===n.tagName)return"HTMLQuoteElement";if("TD"===n.tagName)return"HTMLTableDataCellElement";if("TH"===n.tagName)return"HTMLTableHeaderCellElement"}}var u=f&&n[Symbol.toStringTag];if("string"==typeof u)return u;var h=Object.getPrototypeOf(n);return h===RegExp.prototype?"RegExp":h===Date.prototype?"Date":t&&h===Promise.prototype?"Promise":r&&h===Set.prototype?"Set":i&&h===Map.prototype?"Map":s&&h===WeakSet.prototype?"WeakSet":a&&h===WeakMap.prototype?"WeakMap":c&&h===DataView.prototype?"DataView":i&&h===p?"Map Iterator":r&&h===d?"Set Iterator":w&&h===b?"Array Iterator":v&&h===m?"String Iterator":null===h?"Object":Object.prototype.toString.call(n).slice(8,-1)}}))},{}]},{},[1])(1);a.version,a.AssertionError,a.use,a.util,a.config,a.Assertion;var s=a.expect;a.should,a.Should;var c=a.assert;const u=["script","style","svg"],f=["class","id"],h=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function l(t,e={}){const n=e.ignoreAttributes?e.ignoreAttributes.filter((t=>"string"==typeof t)):[],i=e.ignoreAttributes?e.ignoreAttributes.filter((t=>"string"!=typeof t)):[],o=[...e.ignoreTags||[],...u],r=e.ignoreChildren||[],a=e.stripEmptyAttributes||f,s=/(&|")/g,c=t=>"&"===t?"&":""";let l="",d=-1;const p=new Set,w=new Set;function b(){return" ".repeat(d)}function v(t){return t instanceof Element?t.getAttribute("data-tag-name")||t.localName:t.nodeName.toLowerCase()}function m(t){const e=v(t);return!o.includes(e)&&!r.includes(e)&&!p.has(t)}function g({name:t,value:e}){return a.includes(t)&&""===e.trim()}function y(t,{name:e,value:n}){return g({name:e,value:n})?"":"class"===e?` class="${function(t){return[...t.classList.values()].sort().join(" ")}(t)}"`:` ${e}="${n.replace(s,c)}"`}const x=(t,e)=>t.name.localeCompare(e.name);function j(t){let e="";const o=Array.from(t.attributes).filter((r=function(t){return function(e){return!(!n.includes(e.name)&&!g(e)&&!i.find((n=>{if(!n.tags||!n.attributes)throw new Error("An object entry to ignoreAttributes should contain a 'tags' and an 'attributes' property.");return n.tags.includes(v(t))&&n.attributes.includes(e.name)})))}}(t),(...t)=>!r(...t))).sort(x);var r;if(1===o.length)e=y(t,o[0]);else if(o.length>1){for(let n=0;n<o.length;n+=1)e+=`\n${b()} ${y(t,o[n])}`;e+=`\n${b()}`}return e}function E(t,e){var n;if("diff-container"!==v(t)&&!o.includes(v(t))&&!w.has(t))if(w.add(t),t instanceof Text)!function(t,e){let n="",i=t;for(;i&&i instanceof Text;)n+=i.nodeValue,i=e.nextSibling();i&&e.previousSibling(),n=n.trim(),""!==n&&(l+=`${b()}${n}\n`)}(t,e);else{if(!(t instanceof Element))throw new Error(`Unknown node type: ${t}`);n=t,l+=`${b()}<${v(n)}${j(n)}>\n`}}function O(t){var e;o.includes(v(t))||t instanceof Element&&("diff-container"===v(e=t)||h.includes(v(e))||(l+=`${b()}</${v(e)}>\n`))}let S;if("string"==typeof t)S=document.createElement("diff-container"),S.innerHTML=t,d=-1;else{if(!(t instanceof Node))throw new Error(`Cannot create diffable HTML from: ${t}`);S=t,d=0}const k=document.createTreeWalker(S,NodeFilter.SHOW_TEXT+NodeFilter.SHOW_ELEMENT,null,!1);for(;k.currentNode;){const t=k.currentNode;if(E(t,k),m(t)&&k.firstChild())d+=1;else{O(t);if(!k.nextSibling()){d-=1;const t=k.parentNode();if(!t)break;p.add(t)}}}return l}const d=new URL(window.location.href).searchParams.get("wtr-session-id");function p(t){return null!=t&&"object"==typeof t}async function w(t,e,n){if("string"!=typeof d)throw new Error("Unable to execute server commands in a browser not controlled by the test runner. Use the debug option from the watch menu to debug in a controlled browser.");let i;try{const t=await import("../../../../../../../../../__web-dev-server__web-socket.js");({sendMessageWaitForResponse:i}=t)}catch(t){throw new Error("Could not setup web socket connection. Are you executing this test through Web Test Runner?")}try{const o=await i({type:"wtr-command",sessionId:d,command:t,payload:e});if(!o.executed){let e;throw e=n?`Unknown command ${t}. Add the ${n} to your config.`:`Unknown command ${t}. Did you install a plugin to handle this command?`,new Error(e)}return o.result}catch(n){throw new Error(`Error while executing command ${t}${e?` with payload ${JSON.stringify(e)}`:""}: ${n.message}`)}}let b,v;const m=/snapshots\[[^\]]+] = (\n)?(?<content>`[^`]*`)/gm;async function g({cache:t=!0}={}){if(t&&v)return v;const e=await w("get-snapshots",void 0,"snapshotPlugin from @web/test-runner-commands");if("string"!=typeof e?.content)throw new Error("Expected a result as string");const n=`${(t=>([...t.matchAll(m)].forEach((({groups:{content:e}})=>{t=t.replaceAll(e,encodeURIComponent(e))})),t))(e.content)}/* ${Math.random()} */`,i=await import(`data:text/javascript;charset=utf-8,${n}`);if(!i||!p(i.snapshots))throw new Error("Expected snapshot result to be a module that exports an object.");return v=i.snapshots,v}function y(t){const e=[];let n;for(n="hook"===t.type?t.ctx.currentTest:t;n&&n.parent;)n.title&&e.push(n.title),n=n.parent;return e.reverse()}function x(...t){switch(t.length){case 2:{const[e,n]=t;return{message:e,options:n}}case 1:{const[n]=t;return(e=n)&&null!==e&&"object"==typeof e&&("ignoreAttributes"in e||"ignoreTags"in e||"ignoreChildren"in e||"stripEmptyAttributes"in e)?{options:n}:{message:n}}default:return{}}var e}let j;async function E(t,e){return j||await async function(){if(window.axe)j=window.axe;else if("function"!=typeof require){if(await import("./axe.min-2720cd56.esm.js").then((function(t){return t.a})),!window.axe)throw new Error("Error importing axe-core/axe.min.js, are you using a bundler or build tool that doesnt handle es modules?");j=window.axe}else j=require("axe-core/axe.min.js")}(),new Promise(((n,i)=>{j.run(t,e,((t,e)=>{t?i(new Error(t)):n(e)}))}))}var O,S={};O={get exports(){return S},set exports(t){S=t}},function(t){O.exports=t}((function(t,e){var n=e.flag,i=function(t){var e;return a(t)?0===t.length?"empty NodeList":(e=Array.prototype.slice.call(t,0,5).map(i).join(", "),t.length>5?e+"... (+"+(t.length-5)+" more)":e):r(t)?(e=t.tagName.toLowerCase(),t.id&&(e+="#"+t.id),t.className&&(e+="."+String(t.className).replace(/\s+/g,".")),Array.prototype.forEach.call(t.attributes,(function(t){"class"!==t.name&&"id"!==t.name&&(e+="["+t.name+(t.value?'="'+t.value+'"]':"]"))})),e):String(t)},o=function(t,o){var r=n(this,"object"),a=r.getAttribute(t);n(this,"negate")&&void 0!==o||this.assert(!!r.attributes[t],"expected "+i(r)+" to have an attribute #{exp}","expected "+i(r)+" not to have an attribute #{exp}",t),void 0!==o&&this.assert(o===a,"expected "+i(r)+" to have an attribute "+e.inspect(t)+" with the value #{exp}, but the value was #{act}","expected "+i(r)+" not to have an attribute "+e.inspect(t)+" with the value #{act}",o,a),n(this,"object",a)},r=function(t){return 1===t.nodeType},a=function(t){return"[object NodeList]"===Object.prototype.toString.call(t)};e.elToString=i,t.Assertion.addMethod("attr",o),t.Assertion.addMethod("attribute",o),t.Assertion.addMethod("class",(function(t){var e=n(this,"object");if(t instanceof RegExp)return this.assert(Array.from(e.classList).some((function(e){return t.test(e)})),"expected "+i(e)+" to have class matching #{exp}","expected "+i(e)+" not to have class matching #{exp}",t);this.assert(e.classList.contains(t),"expected "+i(e)+" to have class #{exp}","expected "+i(e)+" not to have class #{exp}",t)})),t.Assertion.addMethod("id",(function(t){var e=n(this,"object");this.assert(e.id==t,"expected "+i(e)+" to have id #{exp}","expected "+i(e)+" not to have id #{exp}",t)})),t.Assertion.addMethod("html",(function(t){var e=n(this,"object"),o=n(this,"object").innerHTML;n(this,"contains")?this.assert(o.indexOf(t)>=0,"expected #{act} to contain HTML #{exp}","expected #{act} not to contain HTML #{exp}",t,o):this.assert(o===t,"expected "+i(e)+" to have HTML #{exp}, but the HTML was #{act}","expected "+i(e)+" not to have HTML #{exp}",t,o)})),t.Assertion.addChainableMethod("trimmed",null,(function(){n(this,"trim-text",!0)})),t.Assertion.addProperty("rendered",(function(){n(this,"rendered-text",!0)})),t.Assertion.addMethod("text",(function(t){var o,r,s=n(this,"object"),c=n(this,"contains"),u=n(this,"trim-text"),f=n(this,"rendered-text")?"innerText":"textContent";a(s)?(o=Array.prototype.map.call(s,(function(t){return u?t[f].trim():t[f]})),Array.isArray(t)?(r=c?t[n(this,"negate")?"some":"every"]((function(t){return Array.prototype.some.call(s,(function(e){return(u?e[f].trim():e[f])===t}))})):e.eql(o,t),o=o.join(),t=t.join()):(o=o.join(""),r=c?o.indexOf(t)>=0:o===t)):(o=u?s[f].trim():s[f],r=c?o.indexOf(t)>=0:o===t);var h=i(s),l="";u&&(l+="trimmed "),n(this,"rendered-text")&&(l+="rendered "),l+="text",c?this.assert(r,"expected "+h+" to contain #{exp}, but the "+l+" was #{act}","expected "+h+" not to contain #{exp}, but the "+l+" was #{act}",t,o):this.assert(r,"expected "+h+" to have "+l+" #{exp}, but the "+l+" was #{act}","expected "+h+" not to have "+l+" #{exp}",t,o)})),t.Assertion.addMethod("value",(function(t){var e=n(this,"object"),o=n(this,"object").value;this.assert(n(this,"object").value===t,"expected "+i(e)+" to have value #{exp}, but the value was #{act}","expected "+i(e)+" not to have value #{exp}",t,o)})),t.Assertion.overwriteProperty("exist",(function(t){return function(){var e=n(this,"object");a(e)?this.assert(e.length>0,"expected an empty NodeList to have nodes","expected "+i(e)+" to not exist"):t.apply(this,arguments)}})),t.Assertion.overwriteProperty("empty",(function(t){return function(){var e=n(this,"object");r(e)?this.assert(0===e.children.length,"expected "+i(e)+" to be empty","expected "+i(e)+" to not be empty"):a(e)?this.assert(0===e.length,"expected "+i(e)+" to be empty","expected "+i(e)+" to not be empty"):t.apply(this,arguments)}})),t.Assertion.overwriteChainableMethod("length",(function(t){return function(e){var o=n(this,"object");if(a(o)||r(o)){var s=o.children?o.children.length:o.length;this.assert(s===e,"expected "+i(o)+" to have #{exp} children but it had #{act} children","expected "+i(o)+" to not have #{exp} children",e,s)}else t.apply(this,arguments)}}),(function(t){return function(){t.call(this)}})),t.Assertion.overwriteMethod("match",(function(t){return function(e){var o=n(this,"object");r(o)?this.assert(o.matches(e),"expected "+i(o)+" to match #{exp}","expected "+i(o)+" to not match #{exp}",e):a(o)?this.assert(!!o.length&&Array.prototype.every.call(o,(function(t){return t.matches(e)})),"expected "+i(o)+" to match #{exp}","expected "+i(o)+" to not match #{exp}",e):t.apply(this,arguments)}})),t.Assertion.overwriteChainableMethod("contain",(function(t){return function(e){var o=n(this,"object");r(o)?"string"==typeof e?this.assert(!!o.querySelector(e),"expected "+i(o)+" to contain #{exp}","expected "+i(o)+" to not contain #{exp}",e):this.assert(o.contains(e),"expected "+i(o)+" to contain "+i(e),"expected "+i(o)+" to not contain "+i(e)):t.apply(this,arguments)}}),(function(t){return function(){t.call(this)}})),t.Assertion.addMethod("descendant",(function(t){var e=n(this,"object"),o=t;"string"==typeof t?(o=e.querySelector(t),this.assert(!!o,"expected "+i(e)+" to have descendant #{exp}","expected "+i(e)+" to not have descendant #{exp}",t)):this.assert(e.contains(t),"expected "+i(e)+" to contain "+i(t),"expected "+i(e)+" to not contain "+i(t)),n(this,"object",o)})),t.Assertion.addMethod("descendants",(function(t){var e=n(this,"object"),o=e.querySelectorAll(t);this.assert(!!o.length,"expected "+i(e)+" to have descendants #{exp}","expected "+i(e)+" to not have descendants #{exp}",t),n(this,"object",o)})),t.Assertion.addProperty("displayed",(function(){var t=n(this,"object"),e=document.body.contains(t)?window.getComputedStyle(t).display:t.style.display;this.assert("none"!==e,"expected "+i(t)+" to be displayed, but it was not","expected "+i(t)+" to not be displayed, but it was as "+e,e)})),t.Assertion.addProperty("visible",(function(){var t=n(this,"object"),e=document.body.contains(t)?window.getComputedStyle(t).visibility:t.style.visibility;this.assert("hidden"!==e&&"collapse"!==e,"expected "+i(t)+" to be visible, but it was "+("hidden"===e?"hidden":"collapsed"),"expected "+i(t)+" to not be visible, but it was",e)})),t.Assertion.addMethod("tagName",(function(t){var e=n(this,"object"),o=e.tagName;this.assert(o.toUpperCase()===t.toUpperCase(),"expected "+i(e)+" to have tagName "+t+", but it was "+o,"expected "+i(e)+" to not have tagName "+t+", but it was "+o,o)})),t.Assertion.addMethod("style",(function(t,e){var o=n(this,"object"),r=window.getComputedStyle(o).getPropertyValue(t).trim();this.assert(r===e,"expected "+i(o)+" to have style property "+t+" equal to "+e+", but it was equal to "+r,"expected "+i(o)+" to not have style property "+t+" equal to "+e+", but it was equal to "+r,r)})),t.Assertion.overwriteProperty("focus",(function(){return function(){var t=n(this,"object"),e=t.ownerDocument.activeElement;this.assert(t===t.ownerDocument.activeElement,"expected #{this} to have focus","expected #{this} not to have focus",t,e)}})),t.Assertion.overwriteProperty("checked",(function(){return function(){var t=n(this,"object");if(!(t instanceof HTMLInputElement)||"checkbox"!==t.type&&"radio"!==t.type)throw new TypeError(i(t)+" is not a checkbox or radio input");this.assert(t.checked,"expected "+i(t)+" to be checked","expected "+i(t)+" to not be checked")}}))}));var k=S;var A={};!function(t){!function(e){t.exports=e}((function(t,e){var n,i,o,r=Array.prototype.slice;function a(t){return"function"==typeof t&&"function"==typeof t.getCall&&"function"==typeof t.calledWithExactly}function s(t){switch(t){case 1:return"once";case 2:return"twice";case 3:return"thrice";default:return(t||0)+" times"}}function c(t){if(!a(t._obj)&&(!(n=t._obj)||!a(n.proxy)))throw new TypeError(e.inspect(t._obj)+" is not a spy or a call to a spy!");var n}function u(t,e,n,i,o){var r=i?"always have ":"have ";function s(e){return t.printf.apply(t,e)}return n=n||"",a(t.proxy)&&(t=t.proxy),{affirmative:function(){return s(["expected %n to "+r+e+n].concat(o))},negative:function(){return s(["expected %n to not "+r+e].concat(o))}}}function f(n,i,o){e.addProperty(t.Assertion.prototype,n,(function(){c(this);var t=u(this._obj,i,o,!1);this.assert(this._obj[n],t.affirmative,t.negative)}))}function h(t,n,i){return function(){c(this);var o="always"+t[0].toUpperCase()+t.substring(1),a=e.flag(this,"always")&&"function"==typeof this._obj[o],s=a?o:t,f=u(this._obj,n,i,a,r.call(arguments));this.assert(this._obj[s].apply(this._obj,arguments),f.affirmative,f.negative)}}function l(n,i,o,r){var a=h(i,o,r);e.addMethod(t.Assertion.prototype,n,a)}function d(t,e,n){l(t,t,e,n)}e.addProperty(t.Assertion.prototype,"always",(function(){e.flag(this,"always",!0)})),f("called","been called"," at least once, but it was never called"),n="callCount",i="been called exactly %1",o=", but it was called %c%C",e.addMethod(t.Assertion.prototype,n,(function(t){c(this);var e=u(this._obj,i,o,!1,[s(t)]);this.assert(this._obj[n]===t,e.affirmative,e.negative)})),f("calledOnce","been called exactly once",", but it was called %c%C"),f("calledTwice","been called exactly twice",", but it was called %c%C"),f("calledThrice","been called exactly thrice",", but it was called %c%C"),function(n,i,o){var r=h(n,i,o);e.addProperty(t.Assertion.prototype,n,r)}("calledWithNew","been called with new"),d("calledBefore","been called before %1"),d("calledAfter","been called after %1"),d("calledImmediatelyBefore","been called immediately before %1"),d("calledImmediatelyAfter","been called immediately after %1"),d("calledOn","been called with %1 as this",", but it was called with %t instead"),d("calledWith","been called with arguments %*","%D"),d("calledOnceWith","been called exactly once with arguments %*","%D"),d("calledWithExactly","been called with exact arguments %*","%D"),d("calledOnceWithExactly","been called exactly once with exact arguments %*","%D"),d("calledWithMatch","been called with arguments matching %*","%D"),d("returned","returned %1"),l("thrown","threw","thrown %1")}))}({get exports(){return A},set exports(t){A=t}});var D=A;function T(t){return new Promise((e=>{setTimeout(e,t)}))}function M(t,e){return new Promise((n=>{t.addEventListener(e,(function i(o){n(o),t.removeEventListener(e,i)}))}))}function q(t,e,n={}){const{interval:i=50,timeout:o=1e3}=n,{stack:r}=new Error;return new Promise(((n,a)=>{let s;setTimeout((()=>{clearTimeout(s);const t=new Error(e?`Timeout: ${e}`:`waitUntil timed out after ${o}ms`);t.stack=r,a(t)}),o),async function e(){try{await t()?n():s=setTimeout((()=>{e()}),i)}catch(t){a(t)}}()}))}a.use(((t,e)=>{t.Assertion.addProperty("lightDom",(function(){new t.Assertion(this._obj.nodeType).to.equal(1),e.flag(this,"lightDom",!0)})),t.Assertion.addProperty("shadowDom",(function(){new t.Assertion(this._obj.nodeType).to.equal(1),e.flag(this,"shadowDom",!0)})),t.Assertion.addProperty("dom",(function(){new t.Assertion(this._obj.nodeType).to.equal(1),e.flag(this,"dom",!0)}));const n=t=>(t=>{if(window.ShadyCSS&&!1===window.ShadyCSS.nativeShadow){const e=t.tagName.toLowerCase();let n=" ";return Array.prototype.slice.call(t.attributes).forEach((t=>{n+=`${t.name}="${t.value}" `})),n=n.slice(0,-1),`<${e}${n}>${t.innerHTML}</${e}>`}return t.outerHTML})(t),i=t=>t.innerHTML,o=t=>(t=>{if(window.ShadyCSS&&!1===window.ShadyCSS.nativeShadow){const e=t.tagName.toLowerCase(),n=new RegExp(e,"g");let i=t.shadowRoot.innerHTML;return i=i.replace(/style-scope/g,""),i=i.replace(n,""),i=i.replace(/(class=".*?)(\s)*"/g,'$1"'),i=i.replace(/ class="\w?"/g,""),i}return t.shadowRoot.innerHTML})(t),r=(e,n,i,...o)=>{const{message:r,options:a}=x(...o),s=new t.Assertion(l(e,a),r),c=l(n,a);i?s.not.equal(c,r):s.equal(c,r)},a=t=>function(a,...s){if(e.flag(this,"lightDom")||e.flag(this,"shadowDom")||e.flag(this,"dom")){let t;t=e.flag(this,"lightDom")?i(this._obj):e.flag(this,"shadowDom")?o(this._obj):n(this._obj),r(t,a,e.flag(this,"negate"),s[0])}else t.apply(this,[a,...s])};function s(e,n,...i){const o=window.__mocha_context__,r=window.__snapshot__,{message:a,options:s}=x(...i),{index:c}=o;o.index+=1;const u=y(o.runnable),f=l(e,s);if(r.update)r.set(u,c,f,"html");else{const e=r.get(u,c);if(e){const i=r.match(f,l(e.code,s));if(i&&n||!i&&!n)throw new t.AssertionError(a||`Received value does not match stored snapshot ${c}`,{actual:f,expected:e.code,showDiff:!0},t.util.flag(this,"ssfi"))}else r.set(u,c,f,"html")}}async function c(e,n,...i){const{message:o,options:r}=x(...i),a=y(window.__WTR_MOCHA_RUNNER__.test).join(" "),s=l(e,r),c=await async function(t){if(!p(t))throw new Error("You must provide a payload object");if("string"!=typeof t.name)throw new Error("You must provide a snapshot name");return(await g(t))[t.name]}({name:a}),u=await async function(){return b||(b=await w("get-snapshot-config",void 0,"snapshotPlugin from @web/test-runner-commands")),b}();if(c&&!u.updateSnapshots){if(n?c===s:c!==s)throw new t.AssertionError(o||`Snapshot ${a} does not match the saved snapshot on disk`,{actual:s,expected:c,showDiff:!0},t.util.flag(this,"ssfi"))}else c!==s&&await async function(t){if(!p(t))throw new Error("You must provide a payload object");if("string"!=typeof t.name)throw new Error("You must provide a snapshot name");if(void 0!==t.content&&"string"!=typeof t.content)throw new Error("You must provide a snapshot content");return(await g())[t.name]=t.content,w("save-snapshot",t,"snapshotPlugin from @web/test-runner-commands")}({name:a,content:s})}function u(t,e,...n){if(window.__mocha_context__&&window.__snapshot__)return s.call(this,t,e,...n);if(window.__WTR_MOCHA_RUNNER__)return c.call(this,t,e,...n);throw new Error("Could not detect test runner environment. Snapshots require either Web Test Runner with mocha, or Karma with mocha and karma mocha snapshot")}function f(n){const r=t.util.flag(this,"object");let a;return a=e.flag(this,"shadowDom")?o(r):e.flag(this,"lightDom")?i(r):r,u.call(this,a,e.flag(this,"negate"),n)}t.Assertion.overwriteMethod("equals",a),t.Assertion.overwriteMethod("equal",a),t.Assertion.overwriteMethod("eq",a),e.addMethod(t.Assertion.prototype,"equalSnapshot",f),e.addMethod(t.Assertion.prototype,"notEqualSnapshot",f),e.addMethod(t.assert,"equalSnapshot",u),e.addMethod(t.assert,"notEqualSnapshot",u),t.assert.dom={equal(t,e,...i){return r.call(this,n(t),e,!1,...i)},notEqual(t,e,...i){return r.call(this,n(t),e,!0,...i)},equalSnapshot(t,...e){return u.call(this,t,!1,...e)},notEqualSnapshot(t,...e){return u.call(this,t,!0,...e)}},t.assert.lightDom={equal(t,e,...n){return r.call(this,i(t),e,!1,...n)},notEqual(t,e,...n){return r.call(this,i(t),e,!0,...n)},equalSnapshot(t,...e){return u.call(this,i(t),!1,...e)},notEqualSnapshot(t,...e){return u.call(this,i(t),!0,...e)}},t.assert.shadowDom={equal(t,e,...n){return r.call(this,o(t),e,!1,...n)},notEqual(t,e,...n){return r.call(this,o(t),e,!0,...n)},equalSnapshot(t,...e){return u.call(this,o(t),!1,...e)},notEqualSnapshot(t,...e){return u.call(this,o(t),!0,...e)}}})),a.use(((t,e)=>{const{assert:n}=t;e.addMethod(t.Assertion.prototype,"accessible",(function(t){const n=this._obj,i=t||{},o=function(t){if(!t||!t.length)return;const e={};return t.forEach((t=>{e[t]={enabled:!1}})),e}(i.ignoredRules),r={resultTypes:["violations"]};o&&(r.rules=o);let a=i.done?i.done:void 0;if(a||(a=()=>{}),i.ignoredTags){n.parentNode.querySelectorAll(i.ignoredTags.toString()).forEach((t=>t.setAttribute("aria-hidden",!0)))}const s=E(n,r).then((t=>function(t,e,n){const{violations:i}=e;if(i.length&&t)return void n();if(!i.length&&!t)return void n();const o=[];i.length&&(o[o.length]="Accessibility Violations",o[o.length]="---",i.forEach((t=>{o[o.length]=`Rule: ${t.id}`,o[o.length]=`Impact: ${t.impact}`,o[o.length]=`${t.help} (${t.helpUrl})`,t.nodes.forEach((t=>{o[o.length]="",t.target&&(o[o.length]=`Issue target: ${t.target}`),o[o.length]=`Context: ${t.html}`,t.failureSummary&&(o[o.length]=`${t.failureSummary}`)})),o[o.length]="---"})));const r=new Error(o.join("\n"));throw n(r),r}(e.flag(this,"negate"),t,a)));return this.then=s.then.bind(s),this})),n.isAccessible=function(e,n){return new t.Assertion(e).to.be.accessible(n)},n.isNotAccessible=function(e,n){return new t.Assertion(e).not.to.be.accessible(n)}})),a.use(k),a.use(D);const $=t=>"object"==typeof t&&Promise.resolve(t)===t;async function P(t){let e=!1,n=t&&t.updateComplete;return $(n)&&(await n,e=!0),n=!(!t||!t.componentOnReady)&&t.componentOnReady(),$(n)&&(await n,e=!0),e||await new Promise((t=>{requestAnimationFrame((()=>t()))})),window.ShadyDOM&&"function"==typeof window.ShadyDOM.flush&&window.ShadyDOM.flush(),t}const N=[];function F(t=document.createElement("div")){return document.body.appendChild(t),N.push(t),t}function L(){N&&N.forEach((t=>{document.body.removeChild(t)})),N.length=0}function C(t){return i(t)||t instanceof Node||"number"==typeof t||"boolean"==typeof t||"string"==typeof t}function R(t){return null!=(e=t)&&"function"==typeof e[Symbol.iterator]?[...t].every(C):C(t);var e}const I=Object.freeze({ELEMENT_NODE:1,TEXT_NODE:3,COMMENT_NODE:8,DOCUMENT_FRAGMENT_NODE:11}),_=({nodeType:t,textContent:e})=>{switch(t){case I.COMMENT_NODE:return!1;case I.TEXT_NODE:return e.trim();default:return!0}};async function U(t,e={}){const o=function(t,e={},o){const r=F(e.parentNode);if((e.render??n)(e.scopedElements?o(t,e.scopedElements):t,r),i(t))return r.firstElementChild;const[a]=Array.from(r.childNodes).filter(_);return a}(t,e,e.scopedElements?await import("./scopedElementsWrapper-4c29be11.esm.js").then((t=>t.getScopedElementsTemplate)):void 0);if(await P(o),e.scopedElements){const[t]=Array.from(o.shadowRoot.childNodes).filter(_);return await P(t),t}return o}async function W(n,i={}){if(i.scopedElements)return U(t`${e(n)}`,i);const o=function(t,e={}){const n=F(e.parentNode);return n.innerHTML=t,n.children[0]}(n,i);return await P(o),o}async function z(t,e){if("string"==typeof t)return W(t,e);if(e?.render||R(t))return U(t,e);throw new Error("Invalid template provided - string or lit-html TemplateResult is supported")}try{"afterEach"in window&&afterEach((()=>{L()})),"teardown"in window&&teardown((()=>{L()}))}catch(t){}export{s as a,T as b,P as e,z as f,c as h,M as o,q as w};
|
569
|
+
*/function w(t){var e=[];for(var n in t)e.push(n);return e}function b(t){return null===t||"object"!=typeof t}e.exports=c,e.exports.MemoizeMap=r},{"type-detect":39}],37:[function(t,e,n){var i=Function.prototype.toString,o=/\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/;e.exports=function(t){if("function"!=typeof t)return null;var e="";if(void 0===Function.prototype.name&&void 0===t.name){var n=i.call(t).match(o);n&&(e=n[1])}else e=t.name;return e}},{}],38:[function(t,e,n){function i(t,e){return null!=t&&e in Object(t)}function o(t){return t.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map((function(t){if("constructor"===t||"__proto__"===t||"prototype"===t)return{};var e=/^\[(\d+)\]$/.exec(t);return e?{i:parseFloat(e[1])}:{p:t.replace(/\\([.[\]])/g,"$1")}}))}function r(t,e,n){var i=t,o=null;n=void 0===n?e.length:n;for(var r=0;r<n;r++){var a=e[r];i&&(i=void 0===a.p?i[a.i]:i[a.p],r===n-1&&(o=i))}return o}function a(t,e){var n=o(e),a=n[n.length-1],s={parent:n.length>1?r(t,n,n.length-1):t,name:a.p||a.i,value:r(t,n)};return s.exists=i(s.parent,s.name),s}e.exports={hasProperty:i,getPathInfo:a,getPathValue:function(t,e){return a(t,e).value},setPathValue:function(t,e,n){return function(t,e,n){for(var i=t,o=n.length,r=null,a=0;a<o;a++){var s=null,c=null;if(r=n[a],a===o-1)i[s=void 0===r.p?r.i:r.p]=e;else if(void 0!==r.p&&i[r.p])i=i[r.p];else if(void 0!==r.i&&i[r.i])i=i[r.i];else{var u=n[a+1];s=void 0===r.p?r.i:r.p,c=void 0===u.p?[]:{},i[s]=c,i=i[s]}}}(t,n,o(e)),t}}},{}],39:[function(t,e,n){!function(t,i){"object"==typeof n&&void 0!==e?e.exports=i():t.typeDetect=i()}(this,(function(){var t="function"==typeof Promise,e="object"==typeof self?self:o,n="undefined"!=typeof Symbol,i="undefined"!=typeof Map,r="undefined"!=typeof Set,a="undefined"!=typeof WeakMap,s="undefined"!=typeof WeakSet,c="undefined"!=typeof DataView,u=n&&void 0!==Symbol.iterator,f=n&&void 0!==Symbol.toStringTag,h=r&&"function"==typeof Set.prototype.entries,l=i&&"function"==typeof Map.prototype.entries,d=h&&Object.getPrototypeOf((new Set).entries()),p=l&&Object.getPrototypeOf((new Map).entries()),w=u&&"function"==typeof Array.prototype[Symbol.iterator],b=w&&Object.getPrototypeOf([][Symbol.iterator]()),v=u&&"function"==typeof String.prototype[Symbol.iterator],m=v&&Object.getPrototypeOf(""[Symbol.iterator]());return function(n){var o=typeof n;if("object"!==o)return o;if(null===n)return"null";if(n===e)return"global";if(Array.isArray(n)&&(!1===f||!(Symbol.toStringTag in n)))return"Array";if("object"==typeof window&&null!==window){if("object"==typeof window.location&&n===window.location)return"Location";if("object"==typeof window.document&&n===window.document)return"Document";if("object"==typeof window.navigator){if("object"==typeof window.navigator.mimeTypes&&n===window.navigator.mimeTypes)return"MimeTypeArray";if("object"==typeof window.navigator.plugins&&n===window.navigator.plugins)return"PluginArray"}if(("function"==typeof window.HTMLElement||"object"==typeof window.HTMLElement)&&n instanceof window.HTMLElement){if("BLOCKQUOTE"===n.tagName)return"HTMLQuoteElement";if("TD"===n.tagName)return"HTMLTableDataCellElement";if("TH"===n.tagName)return"HTMLTableHeaderCellElement"}}var u=f&&n[Symbol.toStringTag];if("string"==typeof u)return u;var h=Object.getPrototypeOf(n);return h===RegExp.prototype?"RegExp":h===Date.prototype?"Date":t&&h===Promise.prototype?"Promise":r&&h===Set.prototype?"Set":i&&h===Map.prototype?"Map":s&&h===WeakSet.prototype?"WeakSet":a&&h===WeakMap.prototype?"WeakMap":c&&h===DataView.prototype?"DataView":i&&h===p?"Map Iterator":r&&h===d?"Set Iterator":w&&h===b?"Array Iterator":v&&h===m?"String Iterator":null===h?"Object":Object.prototype.toString.call(n).slice(8,-1)}}))},{}]},{},[1])(1);a.version,a.AssertionError,a.use,a.util,a.config,a.Assertion;var s=a.expect;a.should,a.Should;var c=a.assert;const u=["script","style","svg"],f=["class","id"],h=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function l(t,e={}){const n=e.ignoreAttributes?e.ignoreAttributes.filter((t=>"string"==typeof t)):[],i=e.ignoreAttributes?e.ignoreAttributes.filter((t=>"string"!=typeof t)):[],o=[...e.ignoreTags||[],...u],r=e.ignoreChildren||[],a=e.stripEmptyAttributes||f,s=/(&|")/g,c=t=>"&"===t?"&":""";let l="",d=-1;const p=new Set,w=new Set;function b(){return" ".repeat(d)}function v(t){return t instanceof Element?t.getAttribute("data-tag-name")||t.localName:t.nodeName.toLowerCase()}function m(t){const e=v(t);return!o.includes(e)&&!r.includes(e)&&!p.has(t)}function g({name:t,value:e}){return a.includes(t)&&""===e.trim()}function y(t,{name:e,value:n}){return g({name:e,value:n})?"":"class"===e?` class="${function(t){return[...t.classList.values()].sort().join(" ")}(t)}"`:` ${e}="${n.replace(s,c)}"`}const x=(t,e)=>t.name.localeCompare(e.name);function j(t){let e="";const o=Array.from(t.attributes).filter((r=function(t){return function(e){return!(!n.includes(e.name)&&!g(e)&&!i.find((n=>{if(!n.tags||!n.attributes)throw new Error("An object entry to ignoreAttributes should contain a 'tags' and an 'attributes' property.");return n.tags.includes(v(t))&&n.attributes.includes(e.name)})))}}(t),(...t)=>!r(...t))).sort(x);var r;if(1===o.length)e=y(t,o[0]);else if(o.length>1){for(let n=0;n<o.length;n+=1)e+=`\n${b()} ${y(t,o[n])}`;e+=`\n${b()}`}return e}function E(t,e){var n;if("diff-container"!==v(t)&&!o.includes(v(t))&&!w.has(t))if(w.add(t),t instanceof Text)!function(t,e){let n="",i=t;for(;i&&i instanceof Text;)n+=i.nodeValue,i=e.nextSibling();i&&e.previousSibling(),n=n.trim(),""!==n&&(l+=`${b()}${n}\n`)}(t,e);else{if(!(t instanceof Element))throw new Error(`Unknown node type: ${t}`);n=t,l+=`${b()}<${v(n)}${j(n)}>\n`}}function O(t){var e;o.includes(v(t))||t instanceof Element&&("diff-container"===v(e=t)||h.includes(v(e))||(l+=`${b()}</${v(e)}>\n`))}let S;if("string"==typeof t)S=document.createElement("diff-container"),S.innerHTML=t,d=-1;else{if(!(t instanceof Node))throw new Error(`Cannot create diffable HTML from: ${t}`);S=t,d=0}const k=document.createTreeWalker(S,NodeFilter.SHOW_TEXT+NodeFilter.SHOW_ELEMENT,null,!1);for(;k.currentNode;){const t=k.currentNode;if(E(t,k),m(t)&&k.firstChild())d+=1;else{O(t);if(!k.nextSibling()){d-=1;const t=k.parentNode();if(!t)break;p.add(t)}}}return l}const d=new URL(window.location.href).searchParams.get("wtr-session-id");function p(t){return null!=t&&"object"==typeof t}async function w(t,e,n){if("string"!=typeof d)throw new Error("Unable to execute server commands in a browser not controlled by the test runner. Use the debug option from the watch menu to debug in a controlled browser.");let i;try{const t=await import("../../../../../../../../__web-dev-server__web-socket.js");({sendMessageWaitForResponse:i}=t)}catch(t){throw new Error("Could not setup web socket connection. Are you executing this test through Web Test Runner?")}try{const o=await i({type:"wtr-command",sessionId:d,command:t,payload:e});if(!o.executed){let e;throw e=n?`Unknown command ${t}. Add the ${n} to your config.`:`Unknown command ${t}. Did you install a plugin to handle this command?`,new Error(e)}return o.result}catch(n){throw new Error(`Error while executing command ${t}${e?` with payload ${JSON.stringify(e)}`:""}: ${n.message}`)}}let b,v;const m=/snapshots\[[^\]]+] = (\n)?(?<content>`[^`]*`)/gm;async function g({cache:t=!0}={}){if(t&&v)return v;const e=await w("get-snapshots",void 0,"snapshotPlugin from @web/test-runner-commands");if("string"!=typeof e?.content)throw new Error("Expected a result as string");const n=`${(t=>([...t.matchAll(m)].forEach((({groups:{content:e}})=>{t=t.replaceAll(e,encodeURIComponent(e))})),t))(e.content)}/* ${Math.random()} */`,i=await import(`data:text/javascript;charset=utf-8,${n}`);if(!i||!p(i.snapshots))throw new Error("Expected snapshot result to be a module that exports an object.");return v=i.snapshots,v}function y(t){const e=[];let n;for(n="hook"===t.type?t.ctx.currentTest:t;n&&n.parent;)n.title&&e.push(n.title),n=n.parent;return e.reverse()}function x(...t){switch(t.length){case 2:{const[e,n]=t;return{message:e,options:n}}case 1:{const[n]=t;return(e=n)&&null!==e&&"object"==typeof e&&("ignoreAttributes"in e||"ignoreTags"in e||"ignoreChildren"in e||"stripEmptyAttributes"in e)?{options:n}:{message:n}}default:return{}}var e}let j;async function E(t,e){return j||await async function(){if(window.axe)j=window.axe;else if("function"!=typeof require){if(await import("./axe.min-2720cd56.esm.js").then((function(t){return t.a})),!window.axe)throw new Error("Error importing axe-core/axe.min.js, are you using a bundler or build tool that doesnt handle es modules?");j=window.axe}else j=require("axe-core/axe.min.js")}(),new Promise(((n,i)=>{j.run(t,e,((t,e)=>{t?i(new Error(t)):n(e)}))}))}var O,S={};O={get exports(){return S},set exports(t){S=t}},function(t){O.exports=t}((function(t,e){var n=e.flag,i=function(t){var e;return a(t)?0===t.length?"empty NodeList":(e=Array.prototype.slice.call(t,0,5).map(i).join(", "),t.length>5?e+"... (+"+(t.length-5)+" more)":e):r(t)?(e=t.tagName.toLowerCase(),t.id&&(e+="#"+t.id),t.className&&(e+="."+String(t.className).replace(/\s+/g,".")),Array.prototype.forEach.call(t.attributes,(function(t){"class"!==t.name&&"id"!==t.name&&(e+="["+t.name+(t.value?'="'+t.value+'"]':"]"))})),e):String(t)},o=function(t,o){var r=n(this,"object"),a=r.getAttribute(t);n(this,"negate")&&void 0!==o||this.assert(!!r.attributes[t],"expected "+i(r)+" to have an attribute #{exp}","expected "+i(r)+" not to have an attribute #{exp}",t),void 0!==o&&this.assert(o===a,"expected "+i(r)+" to have an attribute "+e.inspect(t)+" with the value #{exp}, but the value was #{act}","expected "+i(r)+" not to have an attribute "+e.inspect(t)+" with the value #{act}",o,a),n(this,"object",a)},r=function(t){return 1===t.nodeType},a=function(t){return"[object NodeList]"===Object.prototype.toString.call(t)};e.elToString=i,t.Assertion.addMethod("attr",o),t.Assertion.addMethod("attribute",o),t.Assertion.addMethod("class",(function(t){var e=n(this,"object");if(t instanceof RegExp)return this.assert(Array.from(e.classList).some((function(e){return t.test(e)})),"expected "+i(e)+" to have class matching #{exp}","expected "+i(e)+" not to have class matching #{exp}",t);this.assert(e.classList.contains(t),"expected "+i(e)+" to have class #{exp}","expected "+i(e)+" not to have class #{exp}",t)})),t.Assertion.addMethod("id",(function(t){var e=n(this,"object");this.assert(e.id==t,"expected "+i(e)+" to have id #{exp}","expected "+i(e)+" not to have id #{exp}",t)})),t.Assertion.addMethod("html",(function(t){var e=n(this,"object"),o=n(this,"object").innerHTML;n(this,"contains")?this.assert(o.indexOf(t)>=0,"expected #{act} to contain HTML #{exp}","expected #{act} not to contain HTML #{exp}",t,o):this.assert(o===t,"expected "+i(e)+" to have HTML #{exp}, but the HTML was #{act}","expected "+i(e)+" not to have HTML #{exp}",t,o)})),t.Assertion.addChainableMethod("trimmed",null,(function(){n(this,"trim-text",!0)})),t.Assertion.addProperty("rendered",(function(){n(this,"rendered-text",!0)})),t.Assertion.addMethod("text",(function(t){var o,r,s=n(this,"object"),c=n(this,"contains"),u=n(this,"trim-text"),f=n(this,"rendered-text")?"innerText":"textContent";a(s)?(o=Array.prototype.map.call(s,(function(t){return u?t[f].trim():t[f]})),Array.isArray(t)?(r=c?t[n(this,"negate")?"some":"every"]((function(t){return Array.prototype.some.call(s,(function(e){return(u?e[f].trim():e[f])===t}))})):e.eql(o,t),o=o.join(),t=t.join()):(o=o.join(""),r=c?o.indexOf(t)>=0:o===t)):(o=u?s[f].trim():s[f],r=c?o.indexOf(t)>=0:o===t);var h=i(s),l="";u&&(l+="trimmed "),n(this,"rendered-text")&&(l+="rendered "),l+="text",c?this.assert(r,"expected "+h+" to contain #{exp}, but the "+l+" was #{act}","expected "+h+" not to contain #{exp}, but the "+l+" was #{act}",t,o):this.assert(r,"expected "+h+" to have "+l+" #{exp}, but the "+l+" was #{act}","expected "+h+" not to have "+l+" #{exp}",t,o)})),t.Assertion.addMethod("value",(function(t){var e=n(this,"object"),o=n(this,"object").value;this.assert(n(this,"object").value===t,"expected "+i(e)+" to have value #{exp}, but the value was #{act}","expected "+i(e)+" not to have value #{exp}",t,o)})),t.Assertion.overwriteProperty("exist",(function(t){return function(){var e=n(this,"object");a(e)?this.assert(e.length>0,"expected an empty NodeList to have nodes","expected "+i(e)+" to not exist"):t.apply(this,arguments)}})),t.Assertion.overwriteProperty("empty",(function(t){return function(){var e=n(this,"object");r(e)?this.assert(0===e.children.length,"expected "+i(e)+" to be empty","expected "+i(e)+" to not be empty"):a(e)?this.assert(0===e.length,"expected "+i(e)+" to be empty","expected "+i(e)+" to not be empty"):t.apply(this,arguments)}})),t.Assertion.overwriteChainableMethod("length",(function(t){return function(e){var o=n(this,"object");if(a(o)||r(o)){var s=o.children?o.children.length:o.length;this.assert(s===e,"expected "+i(o)+" to have #{exp} children but it had #{act} children","expected "+i(o)+" to not have #{exp} children",e,s)}else t.apply(this,arguments)}}),(function(t){return function(){t.call(this)}})),t.Assertion.overwriteMethod("match",(function(t){return function(e){var o=n(this,"object");r(o)?this.assert(o.matches(e),"expected "+i(o)+" to match #{exp}","expected "+i(o)+" to not match #{exp}",e):a(o)?this.assert(!!o.length&&Array.prototype.every.call(o,(function(t){return t.matches(e)})),"expected "+i(o)+" to match #{exp}","expected "+i(o)+" to not match #{exp}",e):t.apply(this,arguments)}})),t.Assertion.overwriteChainableMethod("contain",(function(t){return function(e){var o=n(this,"object");r(o)?"string"==typeof e?this.assert(!!o.querySelector(e),"expected "+i(o)+" to contain #{exp}","expected "+i(o)+" to not contain #{exp}",e):this.assert(o.contains(e),"expected "+i(o)+" to contain "+i(e),"expected "+i(o)+" to not contain "+i(e)):t.apply(this,arguments)}}),(function(t){return function(){t.call(this)}})),t.Assertion.addMethod("descendant",(function(t){var e=n(this,"object"),o=t;"string"==typeof t?(o=e.querySelector(t),this.assert(!!o,"expected "+i(e)+" to have descendant #{exp}","expected "+i(e)+" to not have descendant #{exp}",t)):this.assert(e.contains(t),"expected "+i(e)+" to contain "+i(t),"expected "+i(e)+" to not contain "+i(t)),n(this,"object",o)})),t.Assertion.addMethod("descendants",(function(t){var e=n(this,"object"),o=e.querySelectorAll(t);this.assert(!!o.length,"expected "+i(e)+" to have descendants #{exp}","expected "+i(e)+" to not have descendants #{exp}",t),n(this,"object",o)})),t.Assertion.addProperty("displayed",(function(){var t=n(this,"object"),e=document.body.contains(t)?window.getComputedStyle(t).display:t.style.display;this.assert("none"!==e,"expected "+i(t)+" to be displayed, but it was not","expected "+i(t)+" to not be displayed, but it was as "+e,e)})),t.Assertion.addProperty("visible",(function(){var t=n(this,"object"),e=document.body.contains(t)?window.getComputedStyle(t).visibility:t.style.visibility;this.assert("hidden"!==e&&"collapse"!==e,"expected "+i(t)+" to be visible, but it was "+("hidden"===e?"hidden":"collapsed"),"expected "+i(t)+" to not be visible, but it was",e)})),t.Assertion.addMethod("tagName",(function(t){var e=n(this,"object"),o=e.tagName;this.assert(o.toUpperCase()===t.toUpperCase(),"expected "+i(e)+" to have tagName "+t+", but it was "+o,"expected "+i(e)+" to not have tagName "+t+", but it was "+o,o)})),t.Assertion.addMethod("style",(function(t,e){var o=n(this,"object"),r=window.getComputedStyle(o).getPropertyValue(t).trim();this.assert(r===e,"expected "+i(o)+" to have style property "+t+" equal to "+e+", but it was equal to "+r,"expected "+i(o)+" to not have style property "+t+" equal to "+e+", but it was equal to "+r,r)})),t.Assertion.overwriteProperty("focus",(function(){return function(){var t=n(this,"object"),e=t.ownerDocument.activeElement;this.assert(t===t.ownerDocument.activeElement,"expected #{this} to have focus","expected #{this} not to have focus",t,e)}})),t.Assertion.overwriteProperty("checked",(function(){return function(){var t=n(this,"object");if(!(t instanceof HTMLInputElement)||"checkbox"!==t.type&&"radio"!==t.type)throw new TypeError(i(t)+" is not a checkbox or radio input");this.assert(t.checked,"expected "+i(t)+" to be checked","expected "+i(t)+" to not be checked")}}))}));var k=S;var A={};!function(t){!function(e){t.exports=e}((function(t,e){var n,i,o,r=Array.prototype.slice;function a(t){return"function"==typeof t&&"function"==typeof t.getCall&&"function"==typeof t.calledWithExactly}function s(t){switch(t){case 1:return"once";case 2:return"twice";case 3:return"thrice";default:return(t||0)+" times"}}function c(t){if(!a(t._obj)&&(!(n=t._obj)||!a(n.proxy)))throw new TypeError(e.inspect(t._obj)+" is not a spy or a call to a spy!");var n}function u(t,e,n,i,o){var r=i?"always have ":"have ";function s(e){return t.printf.apply(t,e)}return n=n||"",a(t.proxy)&&(t=t.proxy),{affirmative:function(){return s(["expected %n to "+r+e+n].concat(o))},negative:function(){return s(["expected %n to not "+r+e].concat(o))}}}function f(n,i,o){e.addProperty(t.Assertion.prototype,n,(function(){c(this);var t=u(this._obj,i,o,!1);this.assert(this._obj[n],t.affirmative,t.negative)}))}function h(t,n,i){return function(){c(this);var o="always"+t[0].toUpperCase()+t.substring(1),a=e.flag(this,"always")&&"function"==typeof this._obj[o],s=a?o:t,f=u(this._obj,n,i,a,r.call(arguments));this.assert(this._obj[s].apply(this._obj,arguments),f.affirmative,f.negative)}}function l(n,i,o,r){var a=h(i,o,r);e.addMethod(t.Assertion.prototype,n,a)}function d(t,e,n){l(t,t,e,n)}e.addProperty(t.Assertion.prototype,"always",(function(){e.flag(this,"always",!0)})),f("called","been called"," at least once, but it was never called"),n="callCount",i="been called exactly %1",o=", but it was called %c%C",e.addMethod(t.Assertion.prototype,n,(function(t){c(this);var e=u(this._obj,i,o,!1,[s(t)]);this.assert(this._obj[n]===t,e.affirmative,e.negative)})),f("calledOnce","been called exactly once",", but it was called %c%C"),f("calledTwice","been called exactly twice",", but it was called %c%C"),f("calledThrice","been called exactly thrice",", but it was called %c%C"),function(n,i,o){var r=h(n,i,o);e.addProperty(t.Assertion.prototype,n,r)}("calledWithNew","been called with new"),d("calledBefore","been called before %1"),d("calledAfter","been called after %1"),d("calledImmediatelyBefore","been called immediately before %1"),d("calledImmediatelyAfter","been called immediately after %1"),d("calledOn","been called with %1 as this",", but it was called with %t instead"),d("calledWith","been called with arguments %*","%D"),d("calledOnceWith","been called exactly once with arguments %*","%D"),d("calledWithExactly","been called with exact arguments %*","%D"),d("calledOnceWithExactly","been called exactly once with exact arguments %*","%D"),d("calledWithMatch","been called with arguments matching %*","%D"),d("returned","returned %1"),l("thrown","threw","thrown %1")}))}({get exports(){return A},set exports(t){A=t}});var D=A;function T(t){return new Promise((e=>{setTimeout(e,t)}))}function M(t,e){return new Promise((n=>{t.addEventListener(e,(function i(o){n(o),t.removeEventListener(e,i)}))}))}function q(t,e,n={}){const{interval:i=50,timeout:o=1e3}=n,{stack:r}=new Error;return new Promise(((n,a)=>{let s;setTimeout((()=>{clearTimeout(s);const t=new Error(e?`Timeout: ${e}`:`waitUntil timed out after ${o}ms`);t.stack=r,a(t)}),o),async function e(){try{await t()?n():s=setTimeout((()=>{e()}),i)}catch(t){a(t)}}()}))}a.use(((t,e)=>{t.Assertion.addProperty("lightDom",(function(){new t.Assertion(this._obj.nodeType).to.equal(1),e.flag(this,"lightDom",!0)})),t.Assertion.addProperty("shadowDom",(function(){new t.Assertion(this._obj.nodeType).to.equal(1),e.flag(this,"shadowDom",!0)})),t.Assertion.addProperty("dom",(function(){new t.Assertion(this._obj.nodeType).to.equal(1),e.flag(this,"dom",!0)}));const n=t=>(t=>{if(window.ShadyCSS&&!1===window.ShadyCSS.nativeShadow){const e=t.tagName.toLowerCase();let n=" ";return Array.prototype.slice.call(t.attributes).forEach((t=>{n+=`${t.name}="${t.value}" `})),n=n.slice(0,-1),`<${e}${n}>${t.innerHTML}</${e}>`}return t.outerHTML})(t),i=t=>t.innerHTML,o=t=>(t=>{if(window.ShadyCSS&&!1===window.ShadyCSS.nativeShadow){const e=t.tagName.toLowerCase(),n=new RegExp(e,"g");let i=t.shadowRoot.innerHTML;return i=i.replace(/style-scope/g,""),i=i.replace(n,""),i=i.replace(/(class=".*?)(\s)*"/g,'$1"'),i=i.replace(/ class="\w?"/g,""),i}return t.shadowRoot.innerHTML})(t),r=(e,n,i,...o)=>{const{message:r,options:a}=x(...o),s=new t.Assertion(l(e,a),r),c=l(n,a);i?s.not.equal(c,r):s.equal(c,r)},a=t=>function(a,...s){if(e.flag(this,"lightDom")||e.flag(this,"shadowDom")||e.flag(this,"dom")){let t;t=e.flag(this,"lightDom")?i(this._obj):e.flag(this,"shadowDom")?o(this._obj):n(this._obj),r(t,a,e.flag(this,"negate"),s[0])}else t.apply(this,[a,...s])};function s(e,n,...i){const o=window.__mocha_context__,r=window.__snapshot__,{message:a,options:s}=x(...i),{index:c}=o;o.index+=1;const u=y(o.runnable),f=l(e,s);if(r.update)r.set(u,c,f,"html");else{const e=r.get(u,c);if(e){const i=r.match(f,l(e.code,s));if(i&&n||!i&&!n)throw new t.AssertionError(a||`Received value does not match stored snapshot ${c}`,{actual:f,expected:e.code,showDiff:!0},t.util.flag(this,"ssfi"))}else r.set(u,c,f,"html")}}async function c(e,n,...i){const{message:o,options:r}=x(...i),a=y(window.__WTR_MOCHA_RUNNER__.test).join(" "),s=l(e,r),c=await async function(t){if(!p(t))throw new Error("You must provide a payload object");if("string"!=typeof t.name)throw new Error("You must provide a snapshot name");return(await g(t))[t.name]}({name:a}),u=await async function(){return b||(b=await w("get-snapshot-config",void 0,"snapshotPlugin from @web/test-runner-commands")),b}();if(c&&!u.updateSnapshots){if(n?c===s:c!==s)throw new t.AssertionError(o||`Snapshot ${a} does not match the saved snapshot on disk`,{actual:s,expected:c,showDiff:!0},t.util.flag(this,"ssfi"))}else c!==s&&await async function(t){if(!p(t))throw new Error("You must provide a payload object");if("string"!=typeof t.name)throw new Error("You must provide a snapshot name");if(void 0!==t.content&&"string"!=typeof t.content)throw new Error("You must provide a snapshot content");return(await g())[t.name]=t.content,w("save-snapshot",t,"snapshotPlugin from @web/test-runner-commands")}({name:a,content:s})}function u(t,e,...n){if(window.__mocha_context__&&window.__snapshot__)return s.call(this,t,e,...n);if(window.__WTR_MOCHA_RUNNER__)return c.call(this,t,e,...n);throw new Error("Could not detect test runner environment. Snapshots require either Web Test Runner with mocha, or Karma with mocha and karma mocha snapshot")}function f(n){const r=t.util.flag(this,"object");let a;return a=e.flag(this,"shadowDom")?o(r):e.flag(this,"lightDom")?i(r):r,u.call(this,a,e.flag(this,"negate"),n)}t.Assertion.overwriteMethod("equals",a),t.Assertion.overwriteMethod("equal",a),t.Assertion.overwriteMethod("eq",a),e.addMethod(t.Assertion.prototype,"equalSnapshot",f),e.addMethod(t.Assertion.prototype,"notEqualSnapshot",f),e.addMethod(t.assert,"equalSnapshot",u),e.addMethod(t.assert,"notEqualSnapshot",u),t.assert.dom={equal(t,e,...i){return r.call(this,n(t),e,!1,...i)},notEqual(t,e,...i){return r.call(this,n(t),e,!0,...i)},equalSnapshot(t,...e){return u.call(this,t,!1,...e)},notEqualSnapshot(t,...e){return u.call(this,t,!0,...e)}},t.assert.lightDom={equal(t,e,...n){return r.call(this,i(t),e,!1,...n)},notEqual(t,e,...n){return r.call(this,i(t),e,!0,...n)},equalSnapshot(t,...e){return u.call(this,i(t),!1,...e)},notEqualSnapshot(t,...e){return u.call(this,i(t),!0,...e)}},t.assert.shadowDom={equal(t,e,...n){return r.call(this,o(t),e,!1,...n)},notEqual(t,e,...n){return r.call(this,o(t),e,!0,...n)},equalSnapshot(t,...e){return u.call(this,o(t),!1,...e)},notEqualSnapshot(t,...e){return u.call(this,o(t),!0,...e)}}})),a.use(((t,e)=>{const{assert:n}=t;e.addMethod(t.Assertion.prototype,"accessible",(function(t){const n=this._obj,i=t||{},o=function(t){if(!t||!t.length)return;const e={};return t.forEach((t=>{e[t]={enabled:!1}})),e}(i.ignoredRules),r={resultTypes:["violations"]};o&&(r.rules=o);let a=i.done?i.done:void 0;if(a||(a=()=>{}),i.ignoredTags){n.parentNode.querySelectorAll(i.ignoredTags.toString()).forEach((t=>t.setAttribute("aria-hidden",!0)))}const s=E(n,r).then((t=>function(t,e,n){const{violations:i}=e;if(i.length&&t)return void n();if(!i.length&&!t)return void n();const o=[];i.length&&(o[o.length]="Accessibility Violations",o[o.length]="---",i.forEach((t=>{o[o.length]=`Rule: ${t.id}`,o[o.length]=`Impact: ${t.impact}`,o[o.length]=`${t.help} (${t.helpUrl})`,t.nodes.forEach((t=>{o[o.length]="",t.target&&(o[o.length]=`Issue target: ${t.target}`),o[o.length]=`Context: ${t.html}`,t.failureSummary&&(o[o.length]=`${t.failureSummary}`)})),o[o.length]="---"})));const r=new Error(o.join("\n"));throw n(r),r}(e.flag(this,"negate"),t,a)));return this.then=s.then.bind(s),this})),n.isAccessible=function(e,n){return new t.Assertion(e).to.be.accessible(n)},n.isNotAccessible=function(e,n){return new t.Assertion(e).not.to.be.accessible(n)}})),a.use(k),a.use(D);const $=t=>"object"==typeof t&&Promise.resolve(t)===t;async function P(t){let e=!1,n=t&&t.updateComplete;return $(n)&&(await n,e=!0),n=!(!t||!t.componentOnReady)&&t.componentOnReady(),$(n)&&(await n,e=!0),e||await new Promise((t=>{requestAnimationFrame((()=>t()))})),window.ShadyDOM&&"function"==typeof window.ShadyDOM.flush&&window.ShadyDOM.flush(),t}const N=[];function F(t=document.createElement("div")){return document.body.appendChild(t),N.push(t),t}function L(){N&&N.forEach((t=>{document.body.removeChild(t)})),N.length=0}function C(t){return i(t)||t instanceof Node||"number"==typeof t||"boolean"==typeof t||"string"==typeof t}function R(t){return null!=(e=t)&&"function"==typeof e[Symbol.iterator]?[...t].every(C):C(t);var e}const I=Object.freeze({ELEMENT_NODE:1,TEXT_NODE:3,COMMENT_NODE:8,DOCUMENT_FRAGMENT_NODE:11}),_=({nodeType:t,textContent:e})=>{switch(t){case I.COMMENT_NODE:return!1;case I.TEXT_NODE:return e.trim();default:return!0}};async function U(t,e={}){const o=function(t,e={},o){const r=F(e.parentNode);if((e.render??n)(e.scopedElements?o(t,e.scopedElements):t,r),i(t))return r.firstElementChild;const[a]=Array.from(r.childNodes).filter(_);return a}(t,e,e.scopedElements?await import("./scopedElementsWrapper-4c29be11.esm.js").then((t=>t.getScopedElementsTemplate)):void 0);if(await P(o),e.scopedElements){const[t]=Array.from(o.shadowRoot.childNodes).filter(_);return await P(t),t}return o}async function W(n,i={}){if(i.scopedElements)return U(t`${e(n)}`,i);const o=function(t,e={}){const n=F(e.parentNode);return n.innerHTML=t,n.children[0]}(n,i);return await P(o),o}async function z(t,e){if("string"==typeof t)return W(t,e);if(e?.render||R(t))return U(t,e);throw new Error("Invalid template provided - string or lit-html TemplateResult is supported")}try{"afterEach"in window&&afterEach((()=>{L()})),"teardown"in window&&teardown((()=>{L()}))}catch(t){}export{s as a,T as b,P as e,z as f,c as h,M as o,q as w};
|
package/dist/index.js
CHANGED
@@ -7699,7 +7699,7 @@ class Hi{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
7699
7699
|
<nile-form-error-message
|
7700
7700
|
>${this.errorMessage}</nile-form-error-message
|
7701
7701
|
>
|
7702
|
-
`:""}`}createNewView(e=!0){this.view&&this.view.destroy(),this.createState(),this.view=new uD({state:this.viewState,parent:this.codeEditor}),this.view.dom.addEventListener("keydown",(e=>{this.checkForSpaceKey(e),this.handleEscapeKey(e)}),!0),e&&this.emit("nile-after-update",{createNewView:this.createNewView,codeMirrorInstance:this.view},!1)}checkForSpaceKey(e){"Space"!==e.code||e.ctrlKey?this.isSpacePressed=!1:this.isSpacePressed=!0}handleEscapeKey(e){"Escape"===e.key&&this.view&&null!==function(e){let t=e.field(od,!1);return t&&t.active.some((e=>e.isPending))?"pending":t&&t.active.some((e=>0!=e.state))?"active":null}(this.view.state)&&(e.stopPropagation(),e.preventDefault(),Dd(this.view))}createState(){const e=this.lineNumbersComp.of(this.getLineNumbersExension()),t=this.readOnlyComp.of(this.getReadOnlyExtension()),M=this.restrictSingleLineComp.of(this.getSingleLineExtension()),i=this.placeholderComp.of(this.getPlaceholderExtension()),N=this.themeComp.of(this.getCustomThemeExtension()),o=this.defaultSyntaxHighlightingComp.of(this.getDefaultSyntaxHighlightingExtension()),s=this.getLanguageExtension(),n=this.customCompletionComp.of(Oy.data.of({autocomplete:this.customAutocomplete}));return this.viewState=Ys.create({doc:this.multiline?this.value:lL(this.value),extensions:[sL({highlightActiveLine:!1,foldGutter:this.enableFoldGutters,enableSearch:this.enableSearch}),e,t,M,n,i,o,this.autoCompletionComp.of(Hd({aboveCursor:this.aboveCursor})),s,N,this.getTabCompletionKeymap(),uD.updateListener.of((e=>{e.docChanged&&(this.debounce?this.emitAfterTimeout({value:this.view.state.doc.toString()}):this.emit("nile-change",{value:this.view.state.doc.toString()}))})),uD.domEventHandlers({focus:()=>this.dispatchEvent(new Event("nile-focus")),blur:()=>this.dispatchEvent(new Event("nile-blur"))})]}),this.viewState}getNestedSuggestions(e,t,M){if(!function(e){return/^([a-zA-Z_$][\w$]*)(\.[a-zA-Z_$][\w$]*|\[\s*(['"]?[a-zA-Z0-9_$]*['"]?)\s*\])*([\.\[])?$/.test(e)}(t)||![".","["].includes(t.at(-1)))return null;const i=function(e){const t=/([a-zA-Z_$][\w$]*)(\[(?:[^\]]+)\]|\.[a-zA-Z_$][\w$]*)*/g,M=[...e.matchAll(t)];if(M.length>0){const t=[M[0][1]],i=e.match(/\[(.*?)\]|\.(\w+)/g)||[];for(const e of i)e.startsWith("[")?t.push(e.slice(1,-1).replace(/['"]/g,"")):e.startsWith(".")&&t.push(e.slice(1));return t}return null}(t);if(!i)return null;const N=M.replace(/["'\[]/g,""),o=N!==M,s="["===t.at(-1);if("."===t.at(-1)&&o)return null;let n=function(e,t){return t.reduce(((e,t)=>e&&"object"==typeof e?e[t]:null),e)}(this.customAutoCompletions,i);return n&&"object"==typeof n?(N&&(n=Object.fromEntries(Object.entries(n).filter((([e])=>e.toLowerCase().startsWith(N.toLowerCase()))))),{from:e.pos-N.length,options:Object.keys(n).map((e=>({label:e,type:"property",info:`Key of ${i[i.length-1]}`,apply:this.allowVariableInCustomSuggestion||!s||o?e:`'${e}'`,boost:999})))}):null}getTopLevelSuggestions(e,t){const M=t.match(/([a-zA-Z_$][\w$]*)$/);if(!M){if(""===t.trim()&&!this.isSpacePressed){const t=Object.keys(this.customAutoCompletions).filter((e=>Object.keys(this.customAutoCompletions[e]).length)).map((e=>({label:e,type:"property",apply:e,boost:999})));return this.customCompletionsPaths.length&&this.customCompletionsPaths.forEach((e=>{t.push({label:""+e,type:"property",apply:""+e,boost:998})})),{from:e.pos,options:t}}return null}const i=Object.keys(this.customAutoCompletions).filter((e=>Object.keys(this.customAutoCompletions[e]).length&&e.toLowerCase().startsWith(t.toLowerCase()))).map((e=>({label:e,type:"property",apply:e,boost:999})));return this.customCompletionsPaths.length&&this.customCompletionsPaths.filter((e=>e.toLocaleLowerCase().includes(t.toLocaleLowerCase()))).forEach((e=>{i.push({label:""+e,type:"property",apply:""+e,boost:998})})),{from:e.pos-M[1].length,options:i}}emitAfterTimeout(e){this.timeOut&&clearTimeout(this.timeOut),this.timeOut=setTimeout((()=>this.emit("nile-change",e,!1)),this.debounceTimeout)}focusAtPosition(e=this.view.state.doc.toString().length){this.view&&(this.view.dispatch({selection:{anchor:e}}),this.view.focus())}singleLineMultiLineToggle(){this.view.dispatch({changes:{from:0,to:this.view.state.doc.length,insert:this.multiline?this.value:lL(this.value)}})}getLineNumbersExension(){return!this.multiline&&this.lineNumbers||this.multiline&&this.lineNumbersMultiline?function(e={}){return[$u.of(e),Zu(),Hu]}():[]}getLanguageExtension(){switch(this.language){case"sql":return function(e={}){let t=e.dialect||rh;return new bj(t.language,[nh(e),oh(t,!!e.upperCaseKeywords)])}();case"json":return new bj(Dh);case"html":return function(e={}){let t,M="";!1===e.matchClosingTags&&(M="noMatch"),!0===e.selfClosingTags&&(M=(M?M+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(t=Yh((e.nestedLanguages||[]).concat(KA),(e.nestedAttributes||[]).concat(eL)));let i=t?tL.configure({wrap:t,dialect:M}):M?ML.configure({dialect:M}):ML;return new bj(i,[ML.data.of({autocomplete:HA(e)}),!1!==e.autoCloseTags?NL:[],EA().support,new bj(aA,aA.data.of({autocomplete:rA})).support])}();default:return function(e={}){let t=e.jsx?e.typescript?Ly:Ay:e.typescript?hy:Oy,M=e.typescript?ly.concat(Sy):ay.concat(py);return new bj(t,[Oy.data.of({autocomplete:wT(Ty,ET(M))}),Oy.data.of({autocomplete:dy}),e.jsx?wy:[]])}()}}getReadOnlyExtension(){return this.readonly?Ys.readOnly.of(!0):[]}getSingleLineExtension(){return this.multiline?[]:Ys.transactionFilter.of((e=>e.newDoc.lines>1?[]:e))}getPlaceholderExtension(){return this.placeholder?function(e){return ga.fromClass(class{constructor(t){this.view=t,this.placeholder=e?Ir.set([Ir.widget({widget:new Mu(e),side:1}).range(0)]):Ir.none}get decorations(){return this.view.state.doc.length?Ir.none:this.placeholder}},{decorations:e=>e.decorations})}(this.placeholder):[]}getDefaultSyntaxHighlightingExtension(){return this.disableSyntaxHighlighting?[]:function(e,t){let M,i=[Qc];return e instanceof Ac&&(e.module&&i.push(uD.styleModule.of(e.module)),M=e.themeType),(null==t?void 0:t.fallback)?i.push(xc.of(e)):M?i.push(Lc.computeN([uD.darkTheme],(t=>t.facet(uD.darkTheme)==("dark"==M)?[e]:[]))):i.push(Lc.of(e)),i}(Ec,{fallback:!0})}getCustomThemeExtension(){return this.customThemeCSS?this.defaultFont?[uD.theme(this.customThemeCSS),uD.theme(rL),uD.theme(nL)]:[uD.theme(this.customThemeCSS),uD.theme(rL)]:this.defaultFont?[uD.theme(rL),uD.theme(nL)]:[uD.theme(rL)]}restrictSingleLine(){return Ys.transactionFilter.of((e=>e.newDoc.lines>1?[]:e))}};function lL(e){return e?e.replace(/\s+/g," ").trim():""}e([ze(".code__editor__container")],aL.prototype,"codeEditor",void 0),e([ge({type:String,reflect:!0,attribute:!0})],aL.prototype,"value",void 0),e([ge({type:String,reflect:!0,attribute:!0})],aL.prototype,"expandIcon",void 0),e([ge({type:String,reflect:!0,attribute:!0})],aL.prototype,"placeholder",void 0),e([ge({type:Object,reflect:!0,attribute:!0})],aL.prototype,"customAutoCompletions",void 0),e([ge({type:Array,reflect:!0,attribute:!0})],aL.prototype,"customCompletionsPaths",void 0),e([ge({type:String,reflect:!0,attribute:!0})],aL.prototype,"language",void 0),e([ge({type:String,reflect:!0,attribute:"error-message"})],aL.prototype,"errorMessage",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"error",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"enableSearch",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"noborder",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"multiline",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"enableFoldGutters",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"allowVariableInCustomSuggestion",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"lineNumbers",void 0),e([ge({type:Boolean,reflect:!0,attribute:!1})],aL.prototype,"disableSyntaxHighlighting",void 0),e([ge({type:Object,attribute:!1})],aL.prototype,"customThemeCSS",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"lineNumbersMultiline",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"hasScroller",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"expandable",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"readonly",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"debounce",void 0),e([ge({type:Number,reflect:!0,attribute:!0})],aL.prototype,"debounceTimeout",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"aboveCursor",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"tabCompletion",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"defaultFont",void 0),aL=e([le("nile-code-editor")],aL);const DL=s`
|
7702
|
+
`:""}`}createNewView(e=!0){this.view&&this.view.destroy(),this.createState(),this.view=new uD({state:this.viewState,parent:this.codeEditor}),this.view.dom.addEventListener("keydown",(e=>{this.checkForSpaceKey(e),this.handleEscapeKey(e)}),!0),e&&this.emit("nile-after-update",{createNewView:this.createNewView,codeMirrorInstance:this.view},!1)}checkForSpaceKey(e){"Space"!==e.code||e.ctrlKey?this.isSpacePressed=!1:this.isSpacePressed=!0}closeCompletion(){this.view&&Dd(this.view)}handleEscapeKey(e){"Escape"===e.key&&this.view&&null!==function(e){let t=e.field(od,!1);return t&&t.active.some((e=>e.isPending))?"pending":t&&t.active.some((e=>0!=e.state))?"active":null}(this.view.state)&&(e.stopPropagation(),e.preventDefault(),Dd(this.view))}createState(){const e=this.lineNumbersComp.of(this.getLineNumbersExension()),t=this.readOnlyComp.of(this.getReadOnlyExtension()),M=this.restrictSingleLineComp.of(this.getSingleLineExtension()),i=this.placeholderComp.of(this.getPlaceholderExtension()),N=this.themeComp.of(this.getCustomThemeExtension()),o=this.defaultSyntaxHighlightingComp.of(this.getDefaultSyntaxHighlightingExtension()),s=this.getLanguageExtension(),n=this.customCompletionComp.of(Oy.data.of({autocomplete:this.customAutocomplete}));return this.viewState=Ys.create({doc:this.multiline?this.value:lL(this.value),extensions:[sL({highlightActiveLine:!1,foldGutter:this.enableFoldGutters,enableSearch:this.enableSearch}),e,t,M,n,i,o,this.autoCompletionComp.of(Hd({aboveCursor:this.aboveCursor})),s,N,this.getTabCompletionKeymap(),uD.updateListener.of((e=>{e.docChanged&&(this.debounce?this.emitAfterTimeout({value:this.view.state.doc.toString()}):this.emit("nile-change",{value:this.view.state.doc.toString()}))})),uD.domEventHandlers({focus:()=>this.dispatchEvent(new Event("nile-focus")),blur:()=>this.dispatchEvent(new Event("nile-blur"))})]}),this.viewState}getNestedSuggestions(e,t,M){if(!function(e){return/^([a-zA-Z_$][\w$]*)(\.[a-zA-Z_$][\w$]*|\[\s*(['"]?[a-zA-Z0-9_$]*['"]?)\s*\])*([\.\[])?$/.test(e)}(t)||![".","["].includes(t.at(-1)))return null;const i=function(e){const t=/([a-zA-Z_$][\w$]*)(\[(?:[^\]]+)\]|\.[a-zA-Z_$][\w$]*)*/g,M=[...e.matchAll(t)];if(M.length>0){const t=[M[0][1]],i=e.match(/\[(.*?)\]|\.(\w+)/g)||[];for(const e of i)e.startsWith("[")?t.push(e.slice(1,-1).replace(/['"]/g,"")):e.startsWith(".")&&t.push(e.slice(1));return t}return null}(t);if(!i)return null;const N=M.replace(/["'\[]/g,""),o=N!==M,s="["===t.at(-1);if("."===t.at(-1)&&o)return null;let n=function(e,t){return t.reduce(((e,t)=>e&&"object"==typeof e?e[t]:null),e)}(this.customAutoCompletions,i);return n&&"object"==typeof n?(N&&(n=Object.fromEntries(Object.entries(n).filter((([e])=>e.toLowerCase().startsWith(N.toLowerCase()))))),{from:e.pos-N.length,options:Object.keys(n).map((e=>({label:e,type:"property",info:`Key of ${i[i.length-1]}`,apply:this.allowVariableInCustomSuggestion||!s||o?e:`'${e}'`,boost:999})))}):null}getTopLevelSuggestions(e,t){const M=t.match(/([a-zA-Z_$][\w$]*)$/);if(!M){if(""===t.trim()&&!this.isSpacePressed){const t=Object.keys(this.customAutoCompletions).filter((e=>Object.keys(this.customAutoCompletions[e]).length)).map((e=>({label:e,type:"property",apply:e,boost:999})));return this.customCompletionsPaths.length&&this.customCompletionsPaths.forEach((e=>{t.push({label:""+e,type:"property",apply:""+e,boost:998})})),{from:e.pos,options:t}}return null}const i=Object.keys(this.customAutoCompletions).filter((e=>Object.keys(this.customAutoCompletions[e]).length&&e.toLowerCase().startsWith(t.toLowerCase()))).map((e=>({label:e,type:"property",apply:e,boost:999})));return this.customCompletionsPaths.length&&this.customCompletionsPaths.filter((e=>e.toLocaleLowerCase().includes(t.toLocaleLowerCase()))).forEach((e=>{i.push({label:""+e,type:"property",apply:""+e,boost:998})})),{from:e.pos-M[1].length,options:i}}emitAfterTimeout(e){this.timeOut&&clearTimeout(this.timeOut),this.timeOut=setTimeout((()=>this.emit("nile-change",e,!1)),this.debounceTimeout)}focusAtPosition(e=this.view.state.doc.toString().length){this.view&&(this.view.dispatch({selection:{anchor:e}}),this.view.focus())}singleLineMultiLineToggle(){this.view.dispatch({changes:{from:0,to:this.view.state.doc.length,insert:this.multiline?this.value:lL(this.value)}})}getLineNumbersExension(){return!this.multiline&&this.lineNumbers||this.multiline&&this.lineNumbersMultiline?function(e={}){return[$u.of(e),Zu(),Hu]}():[]}getLanguageExtension(){switch(this.language){case"sql":return function(e={}){let t=e.dialect||rh;return new bj(t.language,[nh(e),oh(t,!!e.upperCaseKeywords)])}();case"json":return new bj(Dh);case"html":return function(e={}){let t,M="";!1===e.matchClosingTags&&(M="noMatch"),!0===e.selfClosingTags&&(M=(M?M+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(t=Yh((e.nestedLanguages||[]).concat(KA),(e.nestedAttributes||[]).concat(eL)));let i=t?tL.configure({wrap:t,dialect:M}):M?ML.configure({dialect:M}):ML;return new bj(i,[ML.data.of({autocomplete:HA(e)}),!1!==e.autoCloseTags?NL:[],EA().support,new bj(aA,aA.data.of({autocomplete:rA})).support])}();default:return function(e={}){let t=e.jsx?e.typescript?Ly:Ay:e.typescript?hy:Oy,M=e.typescript?ly.concat(Sy):ay.concat(py);return new bj(t,[Oy.data.of({autocomplete:wT(Ty,ET(M))}),Oy.data.of({autocomplete:dy}),e.jsx?wy:[]])}()}}getReadOnlyExtension(){return this.readonly?Ys.readOnly.of(!0):[]}getSingleLineExtension(){return this.multiline?[]:Ys.transactionFilter.of((e=>e.newDoc.lines>1?[]:e))}getPlaceholderExtension(){return this.placeholder?function(e){return ga.fromClass(class{constructor(t){this.view=t,this.placeholder=e?Ir.set([Ir.widget({widget:new Mu(e),side:1}).range(0)]):Ir.none}get decorations(){return this.view.state.doc.length?Ir.none:this.placeholder}},{decorations:e=>e.decorations})}(this.placeholder):[]}getDefaultSyntaxHighlightingExtension(){return this.disableSyntaxHighlighting?[]:function(e,t){let M,i=[Qc];return e instanceof Ac&&(e.module&&i.push(uD.styleModule.of(e.module)),M=e.themeType),(null==t?void 0:t.fallback)?i.push(xc.of(e)):M?i.push(Lc.computeN([uD.darkTheme],(t=>t.facet(uD.darkTheme)==("dark"==M)?[e]:[]))):i.push(Lc.of(e)),i}(Ec,{fallback:!0})}getCustomThemeExtension(){return this.customThemeCSS?this.defaultFont?[uD.theme(this.customThemeCSS),uD.theme(rL),uD.theme(nL)]:[uD.theme(this.customThemeCSS),uD.theme(rL)]:this.defaultFont?[uD.theme(rL),uD.theme(nL)]:[uD.theme(rL)]}restrictSingleLine(){return Ys.transactionFilter.of((e=>e.newDoc.lines>1?[]:e))}};function lL(e){return e?e.replace(/\s+/g," ").trim():""}e([ze(".code__editor__container")],aL.prototype,"codeEditor",void 0),e([ge({type:String,reflect:!0,attribute:!0})],aL.prototype,"value",void 0),e([ge({type:String,reflect:!0,attribute:!0})],aL.prototype,"expandIcon",void 0),e([ge({type:String,reflect:!0,attribute:!0})],aL.prototype,"placeholder",void 0),e([ge({type:Object,reflect:!0,attribute:!0})],aL.prototype,"customAutoCompletions",void 0),e([ge({type:Array,reflect:!0,attribute:!0})],aL.prototype,"customCompletionsPaths",void 0),e([ge({type:String,reflect:!0,attribute:!0})],aL.prototype,"language",void 0),e([ge({type:String,reflect:!0,attribute:"error-message"})],aL.prototype,"errorMessage",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"error",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"enableSearch",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"noborder",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"multiline",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"enableFoldGutters",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"allowVariableInCustomSuggestion",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"lineNumbers",void 0),e([ge({type:Boolean,reflect:!0,attribute:!1})],aL.prototype,"disableSyntaxHighlighting",void 0),e([ge({type:Object,attribute:!1})],aL.prototype,"customThemeCSS",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"lineNumbersMultiline",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"hasScroller",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"expandable",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"readonly",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"debounce",void 0),e([ge({type:Number,reflect:!0,attribute:!0})],aL.prototype,"debounceTimeout",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"aboveCursor",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"tabCompletion",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"defaultFont",void 0),aL=e([le("nile-code-editor")],aL);const DL=s`
|
7703
7703
|
:host {
|
7704
7704
|
display: contents;
|
7705
7705
|
|
@@ -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-5b79f853.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(_fixture003CjsJs){a=_fixture003CjsJs.f;e=_fixture003CjsJs.a;i=_fixture003CjsJs.e;n=_fixture003CjsJs.o;},function(_litStaticHtmlJs){o=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileAccordionCjsJs){r=_nileAccordionCjsJs.N;},function(_sinonEsm004CjsJs){t=_sinonEsm004CjsJs.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-3bfb4490.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(_fixture003CjsJs){a=_fixture003CjsJs.f;e=_fixture003CjsJs.a;i=_fixture003CjsJs.e;n=_fixture003CjsJs.o;},function(_litStaticHtmlJs){o=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileAccordionCjsJs){r=_nileAccordionCjsJs.N;},function(_sinonEsm004CjsJs){t=_sinonEsm004CjsJs.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-8edec91c.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}))}));
|
@@ -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-5b79f853.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-auto-complete.cjs.js","tslib","lit/decorators.js","./nile-auto-complete.css.cjs.js","../internal/nile-element.cjs.js","../virtualize-b6a2fbe0.cjs.js","lit/directive.js","lit/async-directive.js","lit/directives/repeat.js"],function(_export,_context){"use strict";var e,t,i,o,l,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7;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(_fixture003CjsJs){e=_fixture003CjsJs.f;t=_fixture003CjsJs.a;i=_fixture003CjsJs.e;},function(_litStaticHtmlJs){o=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileAutoCompleteCjsJs){l=_nileAutoCompleteCjsJs.N;},function(_tslib){},function(_litDecoratorsJs){},function(_nileAutoCompleteCssCjsJs){},function(_internalNileElementCjsJs){},function(_virtualize001CjsJs){},function(_litDirectiveJs){},function(_litAsyncDirectiveJs){},function(_litDirectivesRepeatJs){}],execute:function execute(){describe("NileAutoComplete",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 e(o(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-auto-complete></nile-auto-complete>"]))));case 2:i=_context2.sent;t(i).to.be.instanceOf(l),t(i.shadowRoot).not.to.be["null"];case 4:case"end":return _context2.stop();}},_callee);}))),it("should have an empty value and dropdown closed by default",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var i;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(o(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-auto-complete></nile-auto-complete>"]))));case 2:i=_context3.sent;t(i.value).to.equal(""),t(i.isDropdownOpen).to.be["false"];case 4:case"end":return _context3.stop();}},_callee2);}))),it("should close the dropdown if no items match the search",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _l$shadowRoot;var l,a;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return e(o(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-auto-complete .allMenuItems=","></nile-auto-complete>\n "])),["Apple","Banana","Cherry"]));case 2:l=_context4.sent;a=(_l$shadowRoot=l.shadowRoot)===null||_l$shadowRoot===void 0?void 0:_l$shadowRoot.querySelector("nile-input");a!==null&&a!==void 0&&a.dispatchEvent(new CustomEvent("nile-input",{detail:{value:"Orange"}}));_context4.next=7;return i(l);case 7:t(l.menuItems).to.deep.equal([]);t(l.isDropdownOpen).to.be["false"];case 9:case"end":return _context4.stop();}},_callee3);}))),it("should apply the placeholder text to the input",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _i$shadowRoot;var i,l;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return e(o(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-auto-complete placeholder=\"Search items...\"></nile-auto-complete>\n "]))));case 2:i=_context5.sent;l=(_i$shadowRoot=i.shadowRoot)===null||_i$shadowRoot===void 0?void 0:_i$shadowRoot.querySelector("nile-input");t(l===null||l===void 0?void 0:l.getAttribute("placeholder")).to.equal("Search items...");case 5:case"end":return _context5.stop();}},_callee4);}))),it("should toggle border visibility based on the noBorder property",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _l$shadowRoot2;var l,a;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return e(o(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-auto-complete noBorder></nile-auto-complete>\n "]))));case 2:l=_context6.sent;a=(_l$shadowRoot2=l.shadowRoot)===null||_l$shadowRoot2===void 0?void 0:_l$shadowRoot2.querySelector("nile-input");t(a===null||a===void 0?void 0:a.hasAttribute("no-border")).to.be["true"];l.noBorder=!1;_context6.next=8;return i(l);case 8:t(a===null||a===void 0?void 0:a.hasAttribute("no-border")).to.be["false"];case 9:case"end":return _context6.stop();}},_callee5);}))),it("should handle an empty list of menu items",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var _l$shadowRoot3;var l,a;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return e(o(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-auto-complete .allMenuItems=","></nile-auto-complete>"])),[]));case 2:l=_context7.sent;a=(_l$shadowRoot3=l.shadowRoot)===null||_l$shadowRoot3===void 0?void 0:_l$shadowRoot3.querySelector("nile-input");a!==null&&a!==void 0&&a.dispatchEvent(new CustomEvent("nile-input",{detail:{value:"test"}}));_context7.next=7;return i(l);case 7:t(l.menuItems.length).to.equal(0);t(l.isDropdownOpen).to.be["false"];case 9:case"end":return _context7.stop();}},_callee6);}))),it("should hide the dropdown when no results are found",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _l$shadowRoot4;var l,a;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return e(o(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <nile-auto-complete .allMenuItems=","></nile-auto-complete>\n "])),["Apple","Banana","Cherry"]));case 2:l=_context8.sent;a=(_l$shadowRoot4=l.shadowRoot)===null||_l$shadowRoot4===void 0?void 0:_l$shadowRoot4.querySelector("nile-input");a!==null&&a!==void 0&&a.dispatchEvent(new CustomEvent("nile-input",{detail:{value:"NonMatchingValue"}}));_context8.next=7;return i(l);case 7:t(l.isDropdownOpen).to.be["false"];t(l.menuItems.length).to.equal(0);case 9:case"end":return _context8.stop();}},_callee7);})));});}};});
|
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-3bfb4490.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-auto-complete.cjs.js","tslib","lit/decorators.js","./nile-auto-complete.css.cjs.js","../internal/nile-element.cjs.js","../virtualize-b6a2fbe0.cjs.js","lit/directive.js","lit/async-directive.js","lit/directives/repeat.js"],function(_export,_context){"use strict";var e,t,i,o,l,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7;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(_fixture003CjsJs){e=_fixture003CjsJs.f;t=_fixture003CjsJs.a;i=_fixture003CjsJs.e;},function(_litStaticHtmlJs){o=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileAutoCompleteCjsJs){l=_nileAutoCompleteCjsJs.N;},function(_tslib){},function(_litDecoratorsJs){},function(_nileAutoCompleteCssCjsJs){},function(_internalNileElementCjsJs){},function(_virtualize001CjsJs){},function(_litDirectiveJs){},function(_litAsyncDirectiveJs){},function(_litDirectivesRepeatJs){}],execute:function execute(){describe("NileAutoComplete",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 e(o(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-auto-complete></nile-auto-complete>"]))));case 2:i=_context2.sent;t(i).to.be.instanceOf(l),t(i.shadowRoot).not.to.be["null"];case 4:case"end":return _context2.stop();}},_callee);}))),it("should have an empty value and dropdown closed by default",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var i;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(o(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-auto-complete></nile-auto-complete>"]))));case 2:i=_context3.sent;t(i.value).to.equal(""),t(i.isDropdownOpen).to.be["false"];case 4:case"end":return _context3.stop();}},_callee2);}))),it("should close the dropdown if no items match the search",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _l$shadowRoot;var l,a;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return e(o(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-auto-complete .allMenuItems=","></nile-auto-complete>\n "])),["Apple","Banana","Cherry"]));case 2:l=_context4.sent;a=(_l$shadowRoot=l.shadowRoot)===null||_l$shadowRoot===void 0?void 0:_l$shadowRoot.querySelector("nile-input");a!==null&&a!==void 0&&a.dispatchEvent(new CustomEvent("nile-input",{detail:{value:"Orange"}}));_context4.next=7;return i(l);case 7:t(l.menuItems).to.deep.equal([]);t(l.isDropdownOpen).to.be["false"];case 9:case"end":return _context4.stop();}},_callee3);}))),it("should apply the placeholder text to the input",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _i$shadowRoot;var i,l;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return e(o(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-auto-complete placeholder=\"Search items...\"></nile-auto-complete>\n "]))));case 2:i=_context5.sent;l=(_i$shadowRoot=i.shadowRoot)===null||_i$shadowRoot===void 0?void 0:_i$shadowRoot.querySelector("nile-input");t(l===null||l===void 0?void 0:l.getAttribute("placeholder")).to.equal("Search items...");case 5:case"end":return _context5.stop();}},_callee4);}))),it("should toggle border visibility based on the noBorder property",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _l$shadowRoot2;var l,a;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return e(o(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-auto-complete noBorder></nile-auto-complete>\n "]))));case 2:l=_context6.sent;a=(_l$shadowRoot2=l.shadowRoot)===null||_l$shadowRoot2===void 0?void 0:_l$shadowRoot2.querySelector("nile-input");t(a===null||a===void 0?void 0:a.hasAttribute("no-border")).to.be["true"];l.noBorder=!1;_context6.next=8;return i(l);case 8:t(a===null||a===void 0?void 0:a.hasAttribute("no-border")).to.be["false"];case 9:case"end":return _context6.stop();}},_callee5);}))),it("should handle an empty list of menu items",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var _l$shadowRoot3;var l,a;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return e(o(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-auto-complete .allMenuItems=","></nile-auto-complete>"])),[]));case 2:l=_context7.sent;a=(_l$shadowRoot3=l.shadowRoot)===null||_l$shadowRoot3===void 0?void 0:_l$shadowRoot3.querySelector("nile-input");a!==null&&a!==void 0&&a.dispatchEvent(new CustomEvent("nile-input",{detail:{value:"test"}}));_context7.next=7;return i(l);case 7:t(l.menuItems.length).to.equal(0);t(l.isDropdownOpen).to.be["false"];case 9:case"end":return _context7.stop();}},_callee6);}))),it("should hide the dropdown when no results are found",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _l$shadowRoot4;var l,a;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return e(o(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <nile-auto-complete .allMenuItems=","></nile-auto-complete>\n "])),["Apple","Banana","Cherry"]));case 2:l=_context8.sent;a=(_l$shadowRoot4=l.shadowRoot)===null||_l$shadowRoot4===void 0?void 0:_l$shadowRoot4.querySelector("nile-input");a!==null&&a!==void 0&&a.dispatchEvent(new CustomEvent("nile-input",{detail:{value:"NonMatchingValue"}}));_context8.next=7;return i(l);case 7:t(l.isDropdownOpen).to.be["false"];t(l.menuItems.length).to.equal(0);case 9:case"end":return _context8.stop();}},_callee7);})));});}};});
|
2
2
|
//# sourceMappingURL=nile-auto-complete.test.cjs.js.map
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{f as e,a as t,e as i}from"../fixture-
|
1
|
+
import{f as e,a as t,e as i}from"../fixture-8edec91c.esm.js";import{html as o}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import{N as l}from"./nile-auto-complete.esm.js";import"tslib";import"lit/decorators.js";import"./nile-auto-complete.css.esm.js";import"../internal/nile-element.esm.js";import"../virtualize-a4a40d96.esm.js";import"lit/directive.js";import"lit/async-directive.js";import"lit/directives/repeat.js";describe("NileAutoComplete",(()=>{it("should render correctly",(async()=>{const i=await e(o`<nile-auto-complete></nile-auto-complete>`);t(i).to.be.instanceOf(l),t(i.shadowRoot).not.to.be.null})),it("should have an empty value and dropdown closed by default",(async()=>{const i=await e(o`<nile-auto-complete></nile-auto-complete>`);t(i.value).to.equal(""),t(i.isDropdownOpen).to.be.false})),it("should close the dropdown if no items match the search",(async()=>{const l=await e(o`
|
2
2
|
<nile-auto-complete .allMenuItems=${["Apple","Banana","Cherry"]}></nile-auto-complete>
|
3
3
|
`),a=l.shadowRoot?.querySelector("nile-input");a?.dispatchEvent(new CustomEvent("nile-input",{detail:{value:"Orange"}})),await i(l),t(l.menuItems).to.deep.equal([]),t(l.isDropdownOpen).to.be.false})),it("should apply the placeholder text to the input",(async()=>{const i=await e(o`
|
4
4
|
<nile-auto-complete placeholder="Search items..."></nile-auto-complete>
|