@aquera/nile-elements 0.1.67-beta-2.6 → 0.1.67-beta-2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/demo/index.html +27 -182
- package/dist/{fixture-28d63bc4.cjs.js → fixture-3bfb4490.cjs.js} +2 -2
- package/dist/{fixture-28d63bc4.cjs.js.map → fixture-3bfb4490.cjs.js.map} +1 -1
- package/dist/{fixture-78a015b8.esm.js → fixture-8edec91c.esm.js} +1 -1
- package/dist/index.js +36 -116
- 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 +3 -3
- package/dist/nile-code-editor/extensionSetup.cjs.js.map +1 -1
- package/dist/nile-code-editor/extensionSetup.esm.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js +2 -2
- 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-table-body/nile-table-body.cjs.js +1 -1
- package/dist/nile-table-body/nile-table-body.cjs.js.map +1 -1
- package/dist/nile-table-body/nile-table-body.esm.js +2 -2
- package/dist/nile-table-row/nile-table-row.cjs.js +1 -1
- package/dist/nile-table-row/nile-table-row.cjs.js.map +1 -1
- package/dist/nile-table-row/nile-table-row.css.cjs.js +1 -1
- package/dist/nile-table-row/nile-table-row.css.cjs.js.map +1 -1
- package/dist/nile-table-row/nile-table-row.css.esm.js +0 -52
- package/dist/nile-table-row/nile-table-row.esm.js +6 -34
- 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 +10 -1
- package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
- package/dist/src/nile-table-body/nile-table-body.d.ts +0 -1
- package/dist/src/nile-table-body/nile-table-body.js +0 -7
- package/dist/src/nile-table-body/nile-table-body.js.map +1 -1
- package/dist/src/nile-table-row/nile-table-row.css.js +0 -52
- package/dist/src/nile-table-row/nile-table-row.css.js.map +1 -1
- package/dist/src/nile-table-row/nile-table-row.d.ts +1 -10
- package/dist/src/nile-table-row/nile-table-row.js +9 -87
- package/dist/src/nile-table-row/nile-table-row.js.map +1 -1
- package/dist/src/nile-table-row-content/index.d.ts +1 -0
- package/dist/src/nile-table-row-content/index.js +2 -0
- package/dist/src/nile-table-row-content/index.js.map +1 -0
- package/dist/src/{nile-group-header/nile-option-header.css.d.ts → nile-table-row-content/nile-table-row-content.css.d.ts} +1 -1
- package/dist/src/nile-table-row-content/nile-table-row-content.css.js +30 -0
- package/dist/src/nile-table-row-content/nile-table-row-content.css.js.map +1 -0
- package/dist/src/{nile-option-header/nile-option-header.d.ts → nile-table-row-content/nile-table-row-content.d.ts} +6 -7
- package/dist/src/nile-table-row-content/nile-table-row-content.js +46 -0
- package/dist/src/nile-table-row-content/nile-table-row-content.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-code-editor/nile-code-editor.ts +16 -1
- package/src/nile-table-body/nile-table-body.ts +0 -4
- package/src/nile-table-row/nile-table-row.css.ts +0 -52
- package/src/nile-table-row/nile-table-row.ts +5 -84
- package/vscode-html-custom-data.json +4 -24
- package/dist/aquera-nile-elements-0.1.57-beta-2.0.tgz +0 -0
- package/dist/axe.min-2b379f29.cjs.js +0 -12
- package/dist/axe.min-2b379f29.cjs.js.map +0 -1
- package/dist/axe.min-c2cd8733.esm.js +0 -12
- package/dist/fixture-324a7ef9.cjs.js +0 -395
- package/dist/fixture-324a7ef9.cjs.js.map +0 -1
- package/dist/fixture-add72f26.esm.js +0 -569
- package/dist/fixture-ba65eb22.esm.js +0 -569
- package/dist/fixture-c1bd203f.cjs.js +0 -395
- package/dist/fixture-c1bd203f.cjs.js.map +0 -1
- package/dist/fixture-cb376a7f.cjs.js +0 -395
- package/dist/fixture-cb376a7f.cjs.js.map +0 -1
- package/dist/fixture-f2693d97.esm.js +0 -569
- package/dist/nile-option-group/index.cjs.js +0 -2
- package/dist/nile-option-group/index.cjs.js.map +0 -1
- package/dist/nile-option-group/index.esm.js +0 -1
- package/dist/nile-option-group/nile-option-group.cjs.js +0 -2
- package/dist/nile-option-group/nile-option-group.cjs.js.map +0 -1
- package/dist/nile-option-group/nile-option-group.css.cjs.js +0 -2
- package/dist/nile-option-group/nile-option-group.css.cjs.js.map +0 -1
- package/dist/nile-option-group/nile-option-group.css.esm.js +0 -46
- package/dist/nile-option-group/nile-option-group.esm.js +0 -14
- package/dist/nile-option-group/nile-option-group.interface.cjs.js +0 -2
- package/dist/nile-option-group/nile-option-group.interface.cjs.js.map +0 -1
- package/dist/nile-option-group/nile-option-group.interface.esm.js +0 -1
- package/dist/nile-select/nile-select.interface.cjs.js +0 -2
- package/dist/nile-select/nile-select.interface.cjs.js.map +0 -1
- package/dist/nile-select/nile-select.interface.esm.js +0 -1
- package/dist/src/internal/expandable-row-helper.d.ts +0 -13
- package/dist/src/internal/expandable-row-helper.js +0 -37
- package/dist/src/internal/expandable-row-helper.js.map +0 -1
- package/dist/src/internal/expandable-row-styles.d.ts +0 -11
- package/dist/src/internal/expandable-row-styles.js +0 -27
- package/dist/src/internal/expandable-row-styles.js.map +0 -1
- package/dist/src/internal/table-expandable-helper.d.ts +0 -0
- package/dist/src/internal/table-expandable-helper.js +0 -2
- package/dist/src/internal/table-expandable-helper.js.map +0 -1
- package/dist/src/internal/table-row-expandable-helper.d.ts +0 -12
- package/dist/src/internal/table-row-expandable-helper.js +0 -32
- package/dist/src/internal/table-row-expandable-helper.js.map +0 -1
- package/dist/src/internal/table-row-expandable-styles.d.ts +0 -11
- package/dist/src/internal/table-row-expandable-styles.js +0 -12
- package/dist/src/internal/table-row-expandable-styles.js.map +0 -1
- package/dist/src/nile-group-header/index.d.ts +0 -1
- package/dist/src/nile-group-header/index.js +0 -2
- package/dist/src/nile-group-header/index.js.map +0 -1
- package/dist/src/nile-group-header/nile-group-header.css.d.ts +0 -12
- package/dist/src/nile-group-header/nile-group-header.css.js +0 -30
- package/dist/src/nile-group-header/nile-group-header.css.js.map +0 -1
- package/dist/src/nile-group-header/nile-group-header.d.ts +0 -19
- package/dist/src/nile-group-header/nile-group-header.js +0 -36
- package/dist/src/nile-group-header/nile-group-header.js.map +0 -1
- package/dist/src/nile-group-header/nile-option-header.css.js +0 -30
- package/dist/src/nile-group-header/nile-option-header.css.js.map +0 -1
- package/dist/src/nile-group-header/nile-option-header.d.ts +0 -33
- package/dist/src/nile-group-header/nile-option-header.js +0 -51
- package/dist/src/nile-group-header/nile-option-header.js.map +0 -1
- 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-option-group/index.d.ts +0 -1
- package/dist/src/nile-option-group/index.js +0 -2
- package/dist/src/nile-option-group/index.js.map +0 -1
- package/dist/src/nile-option-group/nile-option-group.css.d.ts +0 -12
- package/dist/src/nile-option-group/nile-option-group.css.js +0 -58
- package/dist/src/nile-option-group/nile-option-group.css.js.map +0 -1
- package/dist/src/nile-option-group/nile-option-group.d.ts +0 -23
- package/dist/src/nile-option-group/nile-option-group.interface.d.ts +0 -22
- package/dist/src/nile-option-group/nile-option-group.interface.js +0 -2
- package/dist/src/nile-option-group/nile-option-group.interface.js.map +0 -1
- package/dist/src/nile-option-group/nile-option-group.js +0 -76
- package/dist/src/nile-option-group/nile-option-group.js.map +0 -1
- package/dist/src/nile-option-header/index.d.ts +0 -1
- package/dist/src/nile-option-header/index.js +0 -2
- package/dist/src/nile-option-header/index.js.map +0 -1
- package/dist/src/nile-option-header/nile-option-header.css.d.ts +0 -12
- package/dist/src/nile-option-header/nile-option-header.css.js +0 -30
- package/dist/src/nile-option-header/nile-option-header.css.js.map +0 -1
- package/dist/src/nile-option-header/nile-option-header.js +0 -51
- package/dist/src/nile-option-header/nile-option-header.js.map +0 -1
- package/dist/src/nile-select/nile-select.interface.d.ts +0 -5
- package/dist/src/nile-select/nile-select.interface.js +0 -2
- package/dist/src/nile-select/nile-select.interface.js.map +0 -1
- package/dist/src/nile-table-row/TableRowExpandableHelper.d.ts +0 -9
- package/dist/src/nile-table-row/TableRowExpandableHelper.js +0 -26
- package/dist/src/nile-table-row/TableRowExpandableHelper.js.map +0 -1
- package/dist/src/nile-table-row/helper.ts.d.ts +0 -37
- package/dist/src/nile-table-row/helper.ts.js +0 -105
- package/dist/src/nile-table-row/helper.ts.js.map +0 -1
- package/dist/src/nile-table-row/nile-table-row-expandable.d.ts +0 -37
- package/dist/src/nile-table-row/nile-table-row-expandable.js +0 -105
- package/dist/src/nile-table-row/nile-table-row-expandable.js.map +0 -1
- package/dist/src/nile-table-row-expandable/index.d.ts +0 -1
- package/dist/src/nile-table-row-expandable/index.js +0 -2
- package/dist/src/nile-table-row-expandable/index.js.map +0 -1
- package/dist/src/nile-table-row-expandable/nile-table-row-expandable.css.d.ts +0 -12
- package/dist/src/nile-table-row-expandable/nile-table-row-expandable.css.js +0 -17
- package/dist/src/nile-table-row-expandable/nile-table-row-expandable.css.js.map +0 -1
- package/dist/src/nile-table-row-expandable/nile-table-row-expandable.d.ts +0 -37
- package/dist/src/nile-table-row-expandable/nile-table-row-expandable.js +0 -103
- package/dist/src/nile-table-row-expandable/nile-table-row-expandable.js.map +0 -1
- package/dist/src/nile-tooltip/nile-tooltip-utils.d.ts +0 -18
- package/dist/src/nile-tooltip/nile-tooltip-utils.js +0 -216
- package/dist/src/nile-tooltip/nile-tooltip-utils.js.map +0 -1
- package/dist/src/nile-tooltip/nile-tooltip.test.d.ts +0 -1
- package/dist/src/nile-tooltip/nile-tooltip.test.js +0 -148
- package/dist/src/nile-tooltip/nile-tooltip.test.js.map +0 -1
@@ -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-28d63bc4.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-textarea.cjs.js","tslib","lit/decorators.js","./nile-textarea.css.cjs.js","lit/directives/class-map.js","../internal/default-value.cjs.js","../internal/slot.cjs.js","lit/directives/if-defined.js","lit/directives/live.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var e,t,a,i,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10;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;a=_fixture003CjsJs.o;},function(_litStaticHtmlJs){i=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileTextareaCjsJs){},function(_tslib){},function(_litDecoratorsJs){},function(_nileTextareaCssCjsJs){},function(_litDirectivesClassMapJs){},function(_internalDefaultValueCjsJs){},function(_internalSlotCjsJs){},function(_litDirectivesIfDefinedJs){},function(_litDirectivesLiveJs){},function(_internalWatchCjsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){describe("<nile-textarea>",function(){it("should render the default properties correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var a;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(i(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-textarea></nile-textarea>"]))));case 2:a=_context2.sent;t(a.value).to.equal(""),t(a.size).to.equal("medium"),t(a.filled).to.be["false"],t(a.disabled).to.be["false"],t(a.readonly).to.be["false"],t(a.required).to.be["false"];case 4:case"end":return _context2.stop();}},_callee);}))),it("should reflect properties to attributes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var a;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-textarea disabled readonly required></nile-textarea>"]))));case 2:a=_context3.sent;t(a.getAttribute("disabled")).to.equal(""),t(a.getAttribute("readonly")).to.equal(""),t(a.getAttribute("required")).to.equal("");case 4:case"end":return _context3.stop();}},_callee2);}))),it("should emit events correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _r$shadowRoot$querySe,_r$shadowRoot;var r,s,_yield$a,n,_yield$a2,l,_yield$a3,o,_yield$a4,c;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return e(i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-textarea></nile-textarea>"]))));case 2:r=_context4.sent;s=(_r$shadowRoot$querySe=(_r$shadowRoot=r.shadowRoot)===null||_r$shadowRoot===void 0?void 0:_r$shadowRoot.querySelector("textarea"))!==null&&_r$shadowRoot$querySe!==void 0?_r$shadowRoot$querySe:{};setTimeout(function(){return s.dispatchEvent(new Event("focus"));});_context4.next=7;return a(r,"nile-focus");case 7:_yield$a=_context4.sent;n=_yield$a.detail;t(n.value).to.equal(""),s.value="test",setTimeout(function(){return s.dispatchEvent(new Event("input"));});_context4.next=12;return a(r,"nile-input");case 12:_yield$a2=_context4.sent;l=_yield$a2.detail;t(l.value).to.equal("test"),setTimeout(function(){return s.dispatchEvent(new Event("change"));});_context4.next=17;return a(r,"nile-change");case 17:_yield$a3=_context4.sent;o=_yield$a3.detail;t(o.value).to.equal("test"),setTimeout(function(){return s.dispatchEvent(new Event("blur"));});_context4.next=22;return a(r,"nile-blur");case 22:_yield$a4=_context4.sent;c=_yield$a4.detail;t(c.value).to.equal("test");case 25:case"end":return _context4.stop();}},_callee3);}))),it("should update value property on input event",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _a$shadowRoot$querySe,_a$shadowRoot;var a,r;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return e(i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-textarea></nile-textarea>"]))));case 2:a=_context5.sent;r=(_a$shadowRoot$querySe=(_a$shadowRoot=a.shadowRoot)===null||_a$shadowRoot===void 0?void 0:_a$shadowRoot.querySelector("textarea"))!==null&&_a$shadowRoot$querySe!==void 0?_a$shadowRoot$querySe:{};r.value="new value",r.dispatchEvent(new Event("input")),t(a.value).to.equal("new value");case 5:case"end":return _context5.stop();}},_callee4);}))),it('should handle the "rows" property correctly',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _a$shadowRoot$querySe2,_a$shadowRoot2;var a,r;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return e(i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-textarea rows=\"10\"></nile-textarea>"]))));case 2:a=_context6.sent;r=(_a$shadowRoot$querySe2=(_a$shadowRoot2=a.shadowRoot)===null||_a$shadowRoot2===void 0?void 0:_a$shadowRoot2.querySelector("textarea"))!==null&&_a$shadowRoot$querySe2!==void 0?_a$shadowRoot$querySe2:{};t(r.rows).to.equal(10);case 5:case"end":return _context6.stop();}},_callee5);}))),it('should handle the "resize" property correctly',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var _a$shadowRoot$querySe3,_a$shadowRoot3;var a,r;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return e(i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-textarea resize=\"none\"></nile-textarea>"]))));case 2:a=_context7.sent;r=(_a$shadowRoot$querySe3=(_a$shadowRoot3=a.shadowRoot)===null||_a$shadowRoot3===void 0?void 0:_a$shadowRoot3.querySelector(".textarea"))!==null&&_a$shadowRoot$querySe3!==void 0?_a$shadowRoot$querySe3:{};t(r.classList.contains("textarea--resize-none")).to.be["true"];case 5:case"end":return _context7.stop();}},_callee6);}))),it("should select all text when select() is called",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _a$shadowRoot$querySe4,_a$shadowRoot4;var a,r;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return e(i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-textarea value=\"test value\"></nile-textarea>"]))));case 2:a=_context8.sent;a.select();r=(_a$shadowRoot$querySe4=(_a$shadowRoot4=a.shadowRoot)===null||_a$shadowRoot4===void 0?void 0:_a$shadowRoot4.querySelector("textarea"))!==null&&_a$shadowRoot$querySe4!==void 0?_a$shadowRoot$querySe4:{};t(r.selectionStart).to.equal(0),t(r.selectionEnd).to.equal(a.value.length);case 6:case"end":return _context8.stop();}},_callee7);}))),it("should set selection range correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var _a$shadowRoot$querySe5,_a$shadowRoot5;var a,r;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return e(i(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-textarea value=\"test value\"></nile-textarea>"]))));case 2:a=_context9.sent;a.setSelectionRange(0,4);r=(_a$shadowRoot$querySe5=(_a$shadowRoot5=a.shadowRoot)===null||_a$shadowRoot5===void 0?void 0:_a$shadowRoot5.querySelector("textarea"))!==null&&_a$shadowRoot$querySe5!==void 0?_a$shadowRoot$querySe5:{};t(r.selectionStart).to.equal(0),t(r.selectionEnd).to.equal(4);case 6:case"end":return _context9.stop();}},_callee8);}))),it("should handle non-printable characters",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var a,r;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return e(i(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<nile-textarea checkNonPrintableChar></nile-textarea>"]))));case 2:a=_context10.sent;a.value="test乇乂丅尺卂";a.handleValueChange();_context10.next=7;return a.updateComplete;case 7:t(a.hasPrintableCharacters).to.be["true"];r=String("乇乂丅尺卂").split("").some(function(e){return-1!=a.markedValue.indexOf(e);});t(r).to.be["true"];case 10:case"end":return _context10.stop();}},_callee9);}))),it("should remove non-printable characters correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var a;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return e(i(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<nile-textarea></nile-textarea>"]))));case 2:a=_context11.sent;a.value="test乇乂丅尺卂",a.removeAllNonPrintableCharacters(),t(a.value).to.equal("test");case 4:case"end":return _context11.stop();}},_callee10);})));});}};});
|
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-textarea.cjs.js","tslib","lit/decorators.js","./nile-textarea.css.cjs.js","lit/directives/class-map.js","../internal/default-value.cjs.js","../internal/slot.cjs.js","lit/directives/if-defined.js","lit/directives/live.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var e,t,a,i,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10;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;a=_fixture003CjsJs.o;},function(_litStaticHtmlJs){i=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileTextareaCjsJs){},function(_tslib){},function(_litDecoratorsJs){},function(_nileTextareaCssCjsJs){},function(_litDirectivesClassMapJs){},function(_internalDefaultValueCjsJs){},function(_internalSlotCjsJs){},function(_litDirectivesIfDefinedJs){},function(_litDirectivesLiveJs){},function(_internalWatchCjsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){describe("<nile-textarea>",function(){it("should render the default properties correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var a;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(i(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-textarea></nile-textarea>"]))));case 2:a=_context2.sent;t(a.value).to.equal(""),t(a.size).to.equal("medium"),t(a.filled).to.be["false"],t(a.disabled).to.be["false"],t(a.readonly).to.be["false"],t(a.required).to.be["false"];case 4:case"end":return _context2.stop();}},_callee);}))),it("should reflect properties to attributes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var a;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-textarea disabled readonly required></nile-textarea>"]))));case 2:a=_context3.sent;t(a.getAttribute("disabled")).to.equal(""),t(a.getAttribute("readonly")).to.equal(""),t(a.getAttribute("required")).to.equal("");case 4:case"end":return _context3.stop();}},_callee2);}))),it("should emit events correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _r$shadowRoot$querySe,_r$shadowRoot;var r,s,_yield$a,n,_yield$a2,l,_yield$a3,o,_yield$a4,c;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return e(i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-textarea></nile-textarea>"]))));case 2:r=_context4.sent;s=(_r$shadowRoot$querySe=(_r$shadowRoot=r.shadowRoot)===null||_r$shadowRoot===void 0?void 0:_r$shadowRoot.querySelector("textarea"))!==null&&_r$shadowRoot$querySe!==void 0?_r$shadowRoot$querySe:{};setTimeout(function(){return s.dispatchEvent(new Event("focus"));});_context4.next=7;return a(r,"nile-focus");case 7:_yield$a=_context4.sent;n=_yield$a.detail;t(n.value).to.equal(""),s.value="test",setTimeout(function(){return s.dispatchEvent(new Event("input"));});_context4.next=12;return a(r,"nile-input");case 12:_yield$a2=_context4.sent;l=_yield$a2.detail;t(l.value).to.equal("test"),setTimeout(function(){return s.dispatchEvent(new Event("change"));});_context4.next=17;return a(r,"nile-change");case 17:_yield$a3=_context4.sent;o=_yield$a3.detail;t(o.value).to.equal("test"),setTimeout(function(){return s.dispatchEvent(new Event("blur"));});_context4.next=22;return a(r,"nile-blur");case 22:_yield$a4=_context4.sent;c=_yield$a4.detail;t(c.value).to.equal("test");case 25:case"end":return _context4.stop();}},_callee3);}))),it("should update value property on input event",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _a$shadowRoot$querySe,_a$shadowRoot;var a,r;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return e(i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-textarea></nile-textarea>"]))));case 2:a=_context5.sent;r=(_a$shadowRoot$querySe=(_a$shadowRoot=a.shadowRoot)===null||_a$shadowRoot===void 0?void 0:_a$shadowRoot.querySelector("textarea"))!==null&&_a$shadowRoot$querySe!==void 0?_a$shadowRoot$querySe:{};r.value="new value",r.dispatchEvent(new Event("input")),t(a.value).to.equal("new value");case 5:case"end":return _context5.stop();}},_callee4);}))),it('should handle the "rows" property correctly',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _a$shadowRoot$querySe2,_a$shadowRoot2;var a,r;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return e(i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-textarea rows=\"10\"></nile-textarea>"]))));case 2:a=_context6.sent;r=(_a$shadowRoot$querySe2=(_a$shadowRoot2=a.shadowRoot)===null||_a$shadowRoot2===void 0?void 0:_a$shadowRoot2.querySelector("textarea"))!==null&&_a$shadowRoot$querySe2!==void 0?_a$shadowRoot$querySe2:{};t(r.rows).to.equal(10);case 5:case"end":return _context6.stop();}},_callee5);}))),it('should handle the "resize" property correctly',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var _a$shadowRoot$querySe3,_a$shadowRoot3;var a,r;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return e(i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-textarea resize=\"none\"></nile-textarea>"]))));case 2:a=_context7.sent;r=(_a$shadowRoot$querySe3=(_a$shadowRoot3=a.shadowRoot)===null||_a$shadowRoot3===void 0?void 0:_a$shadowRoot3.querySelector(".textarea"))!==null&&_a$shadowRoot$querySe3!==void 0?_a$shadowRoot$querySe3:{};t(r.classList.contains("textarea--resize-none")).to.be["true"];case 5:case"end":return _context7.stop();}},_callee6);}))),it("should select all text when select() is called",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _a$shadowRoot$querySe4,_a$shadowRoot4;var a,r;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return e(i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-textarea value=\"test value\"></nile-textarea>"]))));case 2:a=_context8.sent;a.select();r=(_a$shadowRoot$querySe4=(_a$shadowRoot4=a.shadowRoot)===null||_a$shadowRoot4===void 0?void 0:_a$shadowRoot4.querySelector("textarea"))!==null&&_a$shadowRoot$querySe4!==void 0?_a$shadowRoot$querySe4:{};t(r.selectionStart).to.equal(0),t(r.selectionEnd).to.equal(a.value.length);case 6:case"end":return _context8.stop();}},_callee7);}))),it("should set selection range correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var _a$shadowRoot$querySe5,_a$shadowRoot5;var a,r;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return e(i(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-textarea value=\"test value\"></nile-textarea>"]))));case 2:a=_context9.sent;a.setSelectionRange(0,4);r=(_a$shadowRoot$querySe5=(_a$shadowRoot5=a.shadowRoot)===null||_a$shadowRoot5===void 0?void 0:_a$shadowRoot5.querySelector("textarea"))!==null&&_a$shadowRoot$querySe5!==void 0?_a$shadowRoot$querySe5:{};t(r.selectionStart).to.equal(0),t(r.selectionEnd).to.equal(4);case 6:case"end":return _context9.stop();}},_callee8);}))),it("should handle non-printable characters",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var a,r;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return e(i(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<nile-textarea checkNonPrintableChar></nile-textarea>"]))));case 2:a=_context10.sent;a.value="test乇乂丅尺卂";a.handleValueChange();_context10.next=7;return a.updateComplete;case 7:t(a.hasPrintableCharacters).to.be["true"];r=String("乇乂丅尺卂").split("").some(function(e){return-1!=a.markedValue.indexOf(e);});t(r).to.be["true"];case 10:case"end":return _context10.stop();}},_callee9);}))),it("should remove non-printable characters correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var a;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return e(i(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<nile-textarea></nile-textarea>"]))));case 2:a=_context11.sent;a.value="test乇乂丅尺卂",a.removeAllNonPrintableCharacters(),t(a.value).to.equal("test");case 4:case"end":return _context11.stop();}},_callee10);})));});}};});
|
2
2
|
//# sourceMappingURL=nile-textarea.test.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
import{f as e,a as t,o as a}from"../fixture-
|
1
|
+
import{f as e,a as t,o as a}from"../fixture-8edec91c.esm.js";import{html as i}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-textarea.esm.js";import"tslib";import"lit/decorators.js";import"./nile-textarea.css.esm.js";import"lit/directives/class-map.js";import"../internal/default-value.esm.js";import"../internal/slot.esm.js";import"lit/directives/if-defined.js";import"lit/directives/live.js";import"../internal/watch.esm.js";import"../internal/nile-element.esm.js";describe("<nile-textarea>",(()=>{it("should render the default properties correctly",(async()=>{const a=await e(i`<nile-textarea></nile-textarea>`);t(a.value).to.equal(""),t(a.size).to.equal("medium"),t(a.filled).to.be.false,t(a.disabled).to.be.false,t(a.readonly).to.be.false,t(a.required).to.be.false})),it("should reflect properties to attributes",(async()=>{const a=await e(i`<nile-textarea disabled readonly required></nile-textarea>`);t(a.getAttribute("disabled")).to.equal(""),t(a.getAttribute("readonly")).to.equal(""),t(a.getAttribute("required")).to.equal("")})),it("should emit events correctly",(async()=>{const r=await e(i`<nile-textarea></nile-textarea>`),s=r.shadowRoot?.querySelector("textarea")??{};setTimeout((()=>s.dispatchEvent(new Event("focus"))));const{detail:n}=await a(r,"nile-focus");t(n.value).to.equal(""),s.value="test",setTimeout((()=>s.dispatchEvent(new Event("input"))));const{detail:l}=await a(r,"nile-input");t(l.value).to.equal("test"),setTimeout((()=>s.dispatchEvent(new Event("change"))));const{detail:o}=await a(r,"nile-change");t(o.value).to.equal("test"),setTimeout((()=>s.dispatchEvent(new Event("blur"))));const{detail:c}=await a(r,"nile-blur");t(c.value).to.equal("test")})),it("should update value property on input event",(async()=>{const a=await e(i`<nile-textarea></nile-textarea>`),r=a.shadowRoot?.querySelector("textarea")??{};r.value="new value",r.dispatchEvent(new Event("input")),t(a.value).to.equal("new value")})),it('should handle the "rows" property correctly',(async()=>{const a=await e(i`<nile-textarea rows="10"></nile-textarea>`),r=a.shadowRoot?.querySelector("textarea")??{};t(r.rows).to.equal(10)})),it('should handle the "resize" property correctly',(async()=>{const a=await e(i`<nile-textarea resize="none"></nile-textarea>`),r=a.shadowRoot?.querySelector(".textarea")??{};t(r.classList.contains("textarea--resize-none")).to.be.true})),it("should select all text when select() is called",(async()=>{const a=await e(i`<nile-textarea value="test value"></nile-textarea>`);a.select();const r=a.shadowRoot?.querySelector("textarea")??{};t(r.selectionStart).to.equal(0),t(r.selectionEnd).to.equal(a.value.length)})),it("should set selection range correctly",(async()=>{const a=await e(i`<nile-textarea value="test value"></nile-textarea>`);a.setSelectionRange(0,4);const r=a.shadowRoot?.querySelector("textarea")??{};t(r.selectionStart).to.equal(0),t(r.selectionEnd).to.equal(4)})),it("should handle non-printable characters",(async()=>{const a=await e(i`<nile-textarea checkNonPrintableChar></nile-textarea>`);a.value="test乇乂丅尺卂",a.handleValueChange(),await a.updateComplete,t(a.hasPrintableCharacters).to.be.true;const r=String("乇乂丅尺卂").split("").some((e=>-1!=a.markedValue.indexOf(e)));t(r).to.be.true})),it("should remove non-printable characters correctly",(async()=>{const a=await e(i`<nile-textarea></nile-textarea>`);a.value="test乇乂丅尺卂",a.removeAllNonPrintableCharacters(),t(a.value).to.equal("test")}))}));
|
@@ -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-28d63bc4.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js"],function(_export,_context){"use strict";var t,e,l,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,_templateObject13,_templateObject14,_templateObject15,_templateObject16,_templateObject17,_templateObject18,_templateObject19,_templateObject20,_templateObject21,_templateObject22,_templateObject23;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){t=_fixture003CjsJs.f;e=_fixture003CjsJs.a;},function(_litStaticHtmlJs){l=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){}],execute:function execute(){describe("<nile-virtual-select>",function(){describe("maxOptionsVisible functionality",function(){it('should show "+n More" when more options are selected than maxOptionsVisible',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _i$shadowRoot,_o$textContent;var i,o;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return t(l(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-virtual-select multiple max-options-visible=\"2\">\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context2.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"},{value:"option-4",label:"Option 4"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-2","option-3"];_context2.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot=i.shadowRoot)===null||_i$shadowRoot===void 0?void 0:_i$shadowRoot.querySelector(".select__tags-count");e(o).to.exist,e(o===null||o===void 0||(_o$textContent=o.textContent)===null||_o$textContent===void 0?void 0:_o$textContent.trim()).to.equal("+1 More");case 10:case"end":return _context2.stop();}},_callee);}))),it('should not show "+n More" when selected options are within maxOptionsVisible limit',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _i$shadowRoot2;var i,o;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return t(l(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-virtual-select multiple max-options-visible=\"3\">\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context3.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-2"];_context3.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot2=i.shadowRoot)===null||_i$shadowRoot2===void 0?void 0:_i$shadowRoot2.querySelector(".select__tags-count");e(o).to.not.exist;case 10:case"end":return _context3.stop();}},_callee2);}))),it("should show all tags when maxOptionsVisible is 0",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _i$shadowRoot3,_i$shadowRoot4;var i,o,a;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return t(l(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-virtual-select multiple max-options-visible=\"0\">\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context4.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"},{value:"option-4",label:"Option 4"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-2","option-3","option-4"];_context4.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot3=i.shadowRoot)===null||_i$shadowRoot3===void 0?void 0:_i$shadowRoot3.querySelector(".select__tags-count");e(o).to.not.exist;a=(_i$shadowRoot4=i.shadowRoot)===null||_i$shadowRoot4===void 0?void 0:_i$shadowRoot4.querySelectorAll("nile-tag");e(a===null||a===void 0?void 0:a.length).to.equal(4);case 12:case"end":return _context4.stop();}},_callee3);})));}),describe("option width functionality",function(){it("should render options with full width",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _i$shadowRoot5,_i$shadowRoot6,_i$shadowRoot7;var i,o,a,s;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return t(l(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context5.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context5.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot5=i.shadowRoot)===null||_i$shadowRoot5===void 0?void 0:_i$shadowRoot5.querySelector(".virtualized");e(o).to.exist;a=(_i$shadowRoot6=i.shadowRoot)===null||_i$shadowRoot6===void 0?void 0:_i$shadowRoot6.querySelector(".select__options");e(a).to.exist;s=(_i$shadowRoot7=i.shadowRoot)===null||_i$shadowRoot7===void 0?void 0:_i$shadowRoot7.querySelector(".select__listbox");e(s).to.exist,e(s===null||s===void 0?void 0:s.querySelector(".select__options")).to.exist;case 14:case"end":return _context5.stop();}},_callee4);}))),it("should render options with proper CSS classes for width",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _i$shadowRoot8,_i$shadowRoot9,_i$shadowRoot10;var i,o,a,s;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return t(l(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context6.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context6.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot8=i.shadowRoot)===null||_i$shadowRoot8===void 0?void 0:_i$shadowRoot8.querySelector(".virtualized");e(o).to.exist;a=(_i$shadowRoot9=i.shadowRoot)===null||_i$shadowRoot9===void 0?void 0:_i$shadowRoot9.querySelector(".select__options");e(a).to.exist;s=(_i$shadowRoot10=i.shadowRoot)===null||_i$shadowRoot10===void 0?void 0:_i$shadowRoot10.querySelector("lit-virtualizer");e(s).to.exist;case 14:case"end":return _context6.stop();}},_callee5);}))),it("should render virtualized options with full width structure",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var _i$shadowRoot11;var i,o,a,s;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return t(l(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context7.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context7.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot11=i.shadowRoot)===null||_i$shadowRoot11===void 0?void 0:_i$shadowRoot11.querySelector(".select__listbox");e(o).to.exist;a=o===null||o===void 0?void 0:o.querySelector(".select__options");e(a).to.exist;s=a===null||a===void 0?void 0:a.querySelector(".virtualized");e(s).to.exist,e(o===null||o===void 0?void 0:o.contains(a||null)).to.be["true"],e(a===null||a===void 0?void 0:a.contains(s||null)).to.be["true"];case 14:case"end":return _context7.stop();}},_callee6);})));}),describe("selected options highlighting",function(){it("should highlight selected options with red border in single select mode",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _i$shadowRoot12;var i,o;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return t(l(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context8.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value="option-2";i.open=!0;_context8.next=9;return i.updateComplete;case 9:o=(_i$shadowRoot12=i.shadowRoot)===null||_i$shadowRoot12===void 0?void 0:_i$shadowRoot12.querySelector("nile-option[selected]");e(o).to.exist,e(o===null||o===void 0?void 0:o.getAttribute("value")).to.equal("option-2");case 11:case"end":return _context8.stop();}},_callee7);}))),it("should highlight selected options with red border in multiple select mode",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var _i$shadowRoot13;var i,o,a;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return t(l(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <nile-virtual-select multiple>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context9.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-3"];i.open=!0;_context9.next=9;return i.updateComplete;case 9:o=(_i$shadowRoot13=i.shadowRoot)===null||_i$shadowRoot13===void 0?void 0:_i$shadowRoot13.querySelectorAll("nile-option[selected]");e(o===null||o===void 0?void 0:o.length).to.equal(2);a=Array.from(o||[]).map(function(t){return t.getAttribute("value");});e(a).to.include("option-1"),e(a).to.include("option-3");case 13:case"end":return _context9.stop();}},_callee8);}))),it("should not highlight unselected options",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var _i$shadowRoot14;var i,o;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return t(l(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context10.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value="option-2";i.open=!0;_context10.next=9;return i.updateComplete;case 9:o=(_i$shadowRoot14=i.shadowRoot)===null||_i$shadowRoot14===void 0?void 0:_i$shadowRoot14.querySelector('nile-option[value="option-1"]');e(o).to.exist,e(o===null||o===void 0?void 0:o.hasAttribute("selected")).to.be["false"];case 11:case"end":return _context10.stop();}},_callee9);}))),it("should show tags for pre-selected values when data is set after value",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var _i$shadowRoot15,_i$shadowRoot16;var i,o,a,s;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return t(l(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["\n <nile-virtual-select multiple>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context11.sent;i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-3"];_context11.next=7;return i.updateComplete;case 7:o=(_i$shadowRoot15=i.shadowRoot)===null||_i$shadowRoot15===void 0?void 0:_i$shadowRoot15.querySelectorAll("nile-tag");e(o===null||o===void 0?void 0:o.length).to.equal(0);i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];_context11.next=12;return i.updateComplete;case 12:a=(_i$shadowRoot16=i.shadowRoot)===null||_i$shadowRoot16===void 0?void 0:_i$shadowRoot16.querySelectorAll("nile-tag");e(a===null||a===void 0?void 0:a.length).to.equal(2);s=Array.from(a||[]).map(function(t){var _t$textContent;return(_t$textContent=t.textContent)===null||_t$textContent===void 0?void 0:_t$textContent.trim();});e(s).to.include("Option 1"),e(s).to.include("Option 3");case 16:case"end":return _context11.stop();}},_callee10);}))),it("should show tags immediately without opening dropdown",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(){var _i$shadowRoot17;var i,o,a;return _regeneratorRuntime().wrap(function _callee11$(_context12){while(1)switch(_context12.prev=_context12.next){case 0:_context12.next=2;return t(l(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["\n <nile-virtual-select multiple>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context12.sent;i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.value=["option-1","option-3"];_context12.next=8;return i.updateComplete;case 8:i.open=!1;_context12.next=11;return i.updateComplete;case 11:o=(_i$shadowRoot17=i.shadowRoot)===null||_i$shadowRoot17===void 0?void 0:_i$shadowRoot17.querySelectorAll("nile-tag");e(o===null||o===void 0?void 0:o.length).to.equal(2);a=Array.from(o||[]).map(function(t){var _t$textContent2;return(_t$textContent2=t.textContent)===null||_t$textContent2===void 0?void 0:_t$textContent2.trim();});e(a).to.include("Option 1"),e(a).to.include("Option 3");case 15:case"end":return _context12.stop();}},_callee11);}))),it("should show checkbox as checked for selected options in multiple mode",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(){var _i$shadowRoot18,_i$shadowRoot19,_a$shadowRoot;var i,o,a,s;return _regeneratorRuntime().wrap(function _callee12$(_context13){while(1)switch(_context13.prev=_context13.next){case 0:_context13.next=2;return t(l(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["\n <nile-virtual-select multiple>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context13.sent;i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.value=["option-1","option-3"];i.open=!0;_context13.next=9;return i.updateComplete;case 9:o=(_i$shadowRoot18=i.shadowRoot)===null||_i$shadowRoot18===void 0?void 0:_i$shadowRoot18.querySelectorAll("nile-option[selected]");e(o===null||o===void 0?void 0:o.length).to.equal(2),o===null||o===void 0?void 0:o.forEach(function(t){var _t$shadowRoot;var l=(_t$shadowRoot=t.shadowRoot)===null||_t$shadowRoot===void 0?void 0:_t$shadowRoot.querySelector("nile-checkbox");e(l).to.exist,e(l===null||l===void 0?void 0:l.checked).to.be["true"];});a=(_i$shadowRoot19=i.shadowRoot)===null||_i$shadowRoot19===void 0?void 0:_i$shadowRoot19.querySelector('nile-option[value="option-2"]');e(a).to.exist;s=a===null||a===void 0||(_a$shadowRoot=a.shadowRoot)===null||_a$shadowRoot===void 0?void 0:_a$shadowRoot.querySelector("nile-checkbox");e(s).to.exist,e(s===null||s===void 0?void 0:s.checked).to.be["false"];case 15:case"end":return _context13.stop();}},_callee12);})));}),describe("no results message functionality",function(){it("should show no results message when data is empty and not loading",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13(){var _i$shadowRoot20,_o$textContent2;var i,o;return _regeneratorRuntime().wrap(function _callee13$(_context14){while(1)switch(_context14.prev=_context14.next){case 0:_context14.next=2;return t(l(_templateObject13||(_templateObject13=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context14.sent;i.data=[];i.optionsLoading=!1;i.open=!0;_context14.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot20=i.shadowRoot)===null||_i$shadowRoot20===void 0?void 0:_i$shadowRoot20.querySelector(".select__no-results");e(o).to.exist,e(o===null||o===void 0||(_o$textContent2=o.textContent)===null||_o$textContent2===void 0?void 0:_o$textContent2.trim()).to.equal("No results found");case 10:case"end":return _context14.stop();}},_callee13);}))),it("should show custom no results message when provided",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14(){var _i$shadowRoot21,_o$textContent3;var i,o;return _regeneratorRuntime().wrap(function _callee14$(_context15){while(1)switch(_context15.prev=_context15.next){case 0:_context15.next=2;return t(l(_templateObject14||(_templateObject14=_taggedTemplateLiteral(["\n <nile-virtual-select no-results-message=\"No data available\">\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context15.sent;i.data=[];i.optionsLoading=!1;i.open=!0;_context15.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot21=i.shadowRoot)===null||_i$shadowRoot21===void 0?void 0:_i$shadowRoot21.querySelector(".select__no-results");e(o).to.exist,e(o===null||o===void 0||(_o$textContent3=o.textContent)===null||_o$textContent3===void 0?void 0:_o$textContent3.trim()).to.equal("No data available");case 10:case"end":return _context15.stop();}},_callee14);}))),it("should not show no results message when loading",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee15(){var _i$shadowRoot22;var i,o;return _regeneratorRuntime().wrap(function _callee15$(_context16){while(1)switch(_context16.prev=_context16.next){case 0:_context16.next=2;return t(l(_templateObject15||(_templateObject15=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context16.sent;i.data=[];i.optionsLoading=!0;i.open=!0;_context16.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot22=i.shadowRoot)===null||_i$shadowRoot22===void 0?void 0:_i$shadowRoot22.querySelector(".select__no-results");e(o).to.not.exist;case 10:case"end":return _context16.stop();}},_callee15);}))),it("should show no results message when search returns no results",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee16(){var _i$shadowRoot23,_o$textContent4;var i,o;return _regeneratorRuntime().wrap(function _callee16$(_context17){while(1)switch(_context17.prev=_context17.next){case 0:_context17.next=2;return t(l(_templateObject16||(_templateObject16=_taggedTemplateLiteral(["\n <nile-virtual-select search-enabled>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context17.sent;i.data=[{value:"option-1",label:"Apple"},{value:"option-2",label:"Banana"},{value:"option-3",label:"Cherry"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context17.next=8;return i.updateComplete;case 8:i.searchValue="Orange";i.filterVirtualOptions("Orange");_context17.next=12;return i.updateComplete;case 12:o=(_i$shadowRoot23=i.shadowRoot)===null||_i$shadowRoot23===void 0?void 0:_i$shadowRoot23.querySelector(".select__no-results");e(o).to.exist,e(o===null||o===void 0||(_o$textContent4=o.textContent)===null||_o$textContent4===void 0?void 0:_o$textContent4.trim()).to.equal("No results found");case 14:case"end":return _context17.stop();}},_callee16);}))),it("should hide no results message when data becomes available",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee17(){var _i$shadowRoot24,_i$shadowRoot25;var i,o;return _regeneratorRuntime().wrap(function _callee17$(_context18){while(1)switch(_context18.prev=_context18.next){case 0:_context18.next=2;return t(l(_templateObject17||(_templateObject17=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context18.sent;i.data=[];i.optionsLoading=!1;i.open=!0;_context18.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot24=i.shadowRoot)===null||_i$shadowRoot24===void 0?void 0:_i$shadowRoot24.querySelector(".select__no-results");e(o).to.exist;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"}];_context18.next=13;return i.updateComplete;case 13:o=(_i$shadowRoot25=i.shadowRoot)===null||_i$shadowRoot25===void 0?void 0:_i$shadowRoot25.querySelector(".select__no-results");e(o).to.not.exist;case 15:case"end":return _context18.stop();}},_callee17);})));}),describe("scroll position reset functionality",function(){it("should reset scroll position to top when dropdown opens",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee18(){var _i$shadowRoot26;var i,o;return _regeneratorRuntime().wrap(function _callee18$(_context19){while(1)switch(_context19.prev=_context19.next){case 0:_context19.next=2;return t(l(_templateObject18||(_templateObject18=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context19.sent;i.data=Array.from({length:100},function(t,e){return{value:"option-".concat(e),label:"Option ".concat(e)};});i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context19.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot26=i.shadowRoot)===null||_i$shadowRoot26===void 0?void 0:_i$shadowRoot26.querySelector(".virtualized");e(o).to.exist;o.scrollTop=1e3;e(o.scrollTop).to.equal(1e3);i.open=!1;_context19.next=15;return i.updateComplete;case 15:i.open=!0;_context19.next=18;return i.updateComplete;case 18:e(o.scrollTop).to.equal(0);case 19:case"end":return _context19.stop();}},_callee18);}))),it("should reset scroll position when search value changes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee19(){var _i$shadowRoot27;var i,o;return _regeneratorRuntime().wrap(function _callee19$(_context20){while(1)switch(_context20.prev=_context20.next){case 0:_context20.next=2;return t(l(_templateObject19||(_templateObject19=_taggedTemplateLiteral(["\n <nile-virtual-select search-enabled>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context20.sent;i.data=Array.from({length:100},function(t,e){return{value:"option-".concat(e),label:"Option ".concat(e)};});i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context20.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot27=i.shadowRoot)===null||_i$shadowRoot27===void 0?void 0:_i$shadowRoot27.querySelector(".virtualized");e(o).to.exist;o.scrollTop=1e3;e(o.scrollTop).to.equal(1e3);i.searchValue="test";i.filterVirtualOptions("test");_context20.next=16;return i.updateComplete;case 16:e(o.scrollTop).to.equal(0);case 17:case"end":return _context20.stop();}},_callee19);}))),it("should reset scroll position when show selected state changes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee20(){var _i$shadowRoot28,_i$shadowRoot29;var i,o,a;return _regeneratorRuntime().wrap(function _callee20$(_context21){while(1)switch(_context21.prev=_context21.next){case 0:_context21.next=2;return t(l(_templateObject20||(_templateObject20=_taggedTemplateLiteral(["\n <nile-virtual-select multiple>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context21.sent;i.data=Array.from({length:100},function(t,e){return{value:"option-".concat(e),label:"Option ".concat(e)};});i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-2","option-3"];i.open=!0;_context21.next=9;return i.updateComplete;case 9:o=(_i$shadowRoot28=i.shadowRoot)===null||_i$shadowRoot28===void 0?void 0:_i$shadowRoot28.querySelector(".virtualized");e(o).to.exist,o.scrollTop=1e3,e(o.scrollTop).to.equal(1e3);a=(_i$shadowRoot29=i.shadowRoot)===null||_i$shadowRoot29===void 0?void 0:_i$shadowRoot29.querySelector("nile-checkbox");a!==null&&a!==void 0&&a.click();_context21.next=15;return i.updateComplete;case 15:e(o.scrollTop).to.equal(0);case 16:case"end":return _context21.stop();}},_callee20);})));}),describe("small dataset handling",function(){it("should render small datasets without virtualizer for better sizing",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee21(){var _i$shadowRoot30;var i,o,a,s,n;return _regeneratorRuntime().wrap(function _callee21$(_context22){while(1)switch(_context22.prev=_context22.next){case 0:_context22.next=2;return t(l(_templateObject21||(_templateObject21=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context22.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context22.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot30=i.shadowRoot)===null||_i$shadowRoot30===void 0?void 0:_i$shadowRoot30.querySelector(".virtualized");e(o).to.exist;a=o.querySelector("lit-virtualizer");e(a).to.not.exist;s=o.querySelectorAll("nile-option");e(s.length).to.equal(3);n=Array.from(s).map(function(t){return t.getAttribute("value");});e(n).to.deep.equal(["option-1","option-2","option-3"]);case 16:case"end":return _context22.stop();}},_callee21);}))),it("should use virtualizer for large datasets",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee22(){var _i$shadowRoot31;var i,o,a;return _regeneratorRuntime().wrap(function _callee22$(_context23){while(1)switch(_context23.prev=_context23.next){case 0:_context23.next=2;return t(l(_templateObject22||(_templateObject22=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context23.sent;i.data=Array.from({length:100},function(t,e){return{value:"option-".concat(e+1),label:"Option ".concat(e+1)};});i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context23.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot31=i.shadowRoot)===null||_i$shadowRoot31===void 0?void 0:_i$shadowRoot31.querySelector(".virtualized");e(o).to.exist;a=o.querySelector("lit-virtualizer");e(a).to.exist;case 12:case"end":return _context23.stop();}},_callee22);}))),it("should fit snugly without extra space for small datasets",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee23(){var _i$shadowRoot32,_i$shadowRoot33;var i,o,a,s,n,c;return _regeneratorRuntime().wrap(function _callee23$(_context24){while(1)switch(_context24.prev=_context24.next){case 0:_context24.next=2;return t(l(_templateObject23||(_templateObject23=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context24.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context24.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot32=i.shadowRoot)===null||_i$shadowRoot32===void 0?void 0:_i$shadowRoot32.querySelector(".select__listbox");e(o).to.exist;a=(_i$shadowRoot33=i.shadowRoot)===null||_i$shadowRoot33===void 0?void 0:_i$shadowRoot33.querySelector(".virtualized");e(a).to.exist;s=a.offsetHeight,n=a.querySelectorAll("nile-option");e(n.length).to.equal(3),e(s).to.be.greaterThan(0);c=Array.from(n).reduce(function(t,e){return t+e.offsetHeight;},0);e(s).to.be.closeTo(c,20);case 16:case"end":return _context24.stop();}},_callee23);})));});});}};});
|
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"],function(_export,_context){"use strict";var t,e,l,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,_templateObject13,_templateObject14,_templateObject15,_templateObject16,_templateObject17,_templateObject18,_templateObject19,_templateObject20,_templateObject21,_templateObject22,_templateObject23;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){t=_fixture003CjsJs.f;e=_fixture003CjsJs.a;},function(_litStaticHtmlJs){l=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){}],execute:function execute(){describe("<nile-virtual-select>",function(){describe("maxOptionsVisible functionality",function(){it('should show "+n More" when more options are selected than maxOptionsVisible',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _i$shadowRoot,_o$textContent;var i,o;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return t(l(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-virtual-select multiple max-options-visible=\"2\">\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context2.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"},{value:"option-4",label:"Option 4"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-2","option-3"];_context2.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot=i.shadowRoot)===null||_i$shadowRoot===void 0?void 0:_i$shadowRoot.querySelector(".select__tags-count");e(o).to.exist,e(o===null||o===void 0||(_o$textContent=o.textContent)===null||_o$textContent===void 0?void 0:_o$textContent.trim()).to.equal("+1 More");case 10:case"end":return _context2.stop();}},_callee);}))),it('should not show "+n More" when selected options are within maxOptionsVisible limit',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _i$shadowRoot2;var i,o;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return t(l(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-virtual-select multiple max-options-visible=\"3\">\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context3.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-2"];_context3.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot2=i.shadowRoot)===null||_i$shadowRoot2===void 0?void 0:_i$shadowRoot2.querySelector(".select__tags-count");e(o).to.not.exist;case 10:case"end":return _context3.stop();}},_callee2);}))),it("should show all tags when maxOptionsVisible is 0",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _i$shadowRoot3,_i$shadowRoot4;var i,o,a;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return t(l(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-virtual-select multiple max-options-visible=\"0\">\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context4.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"},{value:"option-4",label:"Option 4"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-2","option-3","option-4"];_context4.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot3=i.shadowRoot)===null||_i$shadowRoot3===void 0?void 0:_i$shadowRoot3.querySelector(".select__tags-count");e(o).to.not.exist;a=(_i$shadowRoot4=i.shadowRoot)===null||_i$shadowRoot4===void 0?void 0:_i$shadowRoot4.querySelectorAll("nile-tag");e(a===null||a===void 0?void 0:a.length).to.equal(4);case 12:case"end":return _context4.stop();}},_callee3);})));}),describe("option width functionality",function(){it("should render options with full width",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _i$shadowRoot5,_i$shadowRoot6,_i$shadowRoot7;var i,o,a,s;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return t(l(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context5.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context5.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot5=i.shadowRoot)===null||_i$shadowRoot5===void 0?void 0:_i$shadowRoot5.querySelector(".virtualized");e(o).to.exist;a=(_i$shadowRoot6=i.shadowRoot)===null||_i$shadowRoot6===void 0?void 0:_i$shadowRoot6.querySelector(".select__options");e(a).to.exist;s=(_i$shadowRoot7=i.shadowRoot)===null||_i$shadowRoot7===void 0?void 0:_i$shadowRoot7.querySelector(".select__listbox");e(s).to.exist,e(s===null||s===void 0?void 0:s.querySelector(".select__options")).to.exist;case 14:case"end":return _context5.stop();}},_callee4);}))),it("should render options with proper CSS classes for width",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _i$shadowRoot8,_i$shadowRoot9,_i$shadowRoot10;var i,o,a,s;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return t(l(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context6.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context6.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot8=i.shadowRoot)===null||_i$shadowRoot8===void 0?void 0:_i$shadowRoot8.querySelector(".virtualized");e(o).to.exist;a=(_i$shadowRoot9=i.shadowRoot)===null||_i$shadowRoot9===void 0?void 0:_i$shadowRoot9.querySelector(".select__options");e(a).to.exist;s=(_i$shadowRoot10=i.shadowRoot)===null||_i$shadowRoot10===void 0?void 0:_i$shadowRoot10.querySelector("lit-virtualizer");e(s).to.exist;case 14:case"end":return _context6.stop();}},_callee5);}))),it("should render virtualized options with full width structure",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var _i$shadowRoot11;var i,o,a,s;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return t(l(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context7.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context7.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot11=i.shadowRoot)===null||_i$shadowRoot11===void 0?void 0:_i$shadowRoot11.querySelector(".select__listbox");e(o).to.exist;a=o===null||o===void 0?void 0:o.querySelector(".select__options");e(a).to.exist;s=a===null||a===void 0?void 0:a.querySelector(".virtualized");e(s).to.exist,e(o===null||o===void 0?void 0:o.contains(a||null)).to.be["true"],e(a===null||a===void 0?void 0:a.contains(s||null)).to.be["true"];case 14:case"end":return _context7.stop();}},_callee6);})));}),describe("selected options highlighting",function(){it("should highlight selected options with red border in single select mode",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _i$shadowRoot12;var i,o;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return t(l(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context8.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value="option-2";i.open=!0;_context8.next=9;return i.updateComplete;case 9:o=(_i$shadowRoot12=i.shadowRoot)===null||_i$shadowRoot12===void 0?void 0:_i$shadowRoot12.querySelector("nile-option[selected]");e(o).to.exist,e(o===null||o===void 0?void 0:o.getAttribute("value")).to.equal("option-2");case 11:case"end":return _context8.stop();}},_callee7);}))),it("should highlight selected options with red border in multiple select mode",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var _i$shadowRoot13;var i,o,a;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return t(l(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <nile-virtual-select multiple>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context9.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-3"];i.open=!0;_context9.next=9;return i.updateComplete;case 9:o=(_i$shadowRoot13=i.shadowRoot)===null||_i$shadowRoot13===void 0?void 0:_i$shadowRoot13.querySelectorAll("nile-option[selected]");e(o===null||o===void 0?void 0:o.length).to.equal(2);a=Array.from(o||[]).map(function(t){return t.getAttribute("value");});e(a).to.include("option-1"),e(a).to.include("option-3");case 13:case"end":return _context9.stop();}},_callee8);}))),it("should not highlight unselected options",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var _i$shadowRoot14;var i,o;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return t(l(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context10.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value="option-2";i.open=!0;_context10.next=9;return i.updateComplete;case 9:o=(_i$shadowRoot14=i.shadowRoot)===null||_i$shadowRoot14===void 0?void 0:_i$shadowRoot14.querySelector('nile-option[value="option-1"]');e(o).to.exist,e(o===null||o===void 0?void 0:o.hasAttribute("selected")).to.be["false"];case 11:case"end":return _context10.stop();}},_callee9);}))),it("should show tags for pre-selected values when data is set after value",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var _i$shadowRoot15,_i$shadowRoot16;var i,o,a,s;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return t(l(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["\n <nile-virtual-select multiple>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context11.sent;i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-3"];_context11.next=7;return i.updateComplete;case 7:o=(_i$shadowRoot15=i.shadowRoot)===null||_i$shadowRoot15===void 0?void 0:_i$shadowRoot15.querySelectorAll("nile-tag");e(o===null||o===void 0?void 0:o.length).to.equal(0);i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];_context11.next=12;return i.updateComplete;case 12:a=(_i$shadowRoot16=i.shadowRoot)===null||_i$shadowRoot16===void 0?void 0:_i$shadowRoot16.querySelectorAll("nile-tag");e(a===null||a===void 0?void 0:a.length).to.equal(2);s=Array.from(a||[]).map(function(t){var _t$textContent;return(_t$textContent=t.textContent)===null||_t$textContent===void 0?void 0:_t$textContent.trim();});e(s).to.include("Option 1"),e(s).to.include("Option 3");case 16:case"end":return _context11.stop();}},_callee10);}))),it("should show tags immediately without opening dropdown",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(){var _i$shadowRoot17;var i,o,a;return _regeneratorRuntime().wrap(function _callee11$(_context12){while(1)switch(_context12.prev=_context12.next){case 0:_context12.next=2;return t(l(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["\n <nile-virtual-select multiple>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context12.sent;i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.value=["option-1","option-3"];_context12.next=8;return i.updateComplete;case 8:i.open=!1;_context12.next=11;return i.updateComplete;case 11:o=(_i$shadowRoot17=i.shadowRoot)===null||_i$shadowRoot17===void 0?void 0:_i$shadowRoot17.querySelectorAll("nile-tag");e(o===null||o===void 0?void 0:o.length).to.equal(2);a=Array.from(o||[]).map(function(t){var _t$textContent2;return(_t$textContent2=t.textContent)===null||_t$textContent2===void 0?void 0:_t$textContent2.trim();});e(a).to.include("Option 1"),e(a).to.include("Option 3");case 15:case"end":return _context12.stop();}},_callee11);}))),it("should show checkbox as checked for selected options in multiple mode",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(){var _i$shadowRoot18,_i$shadowRoot19,_a$shadowRoot;var i,o,a,s;return _regeneratorRuntime().wrap(function _callee12$(_context13){while(1)switch(_context13.prev=_context13.next){case 0:_context13.next=2;return t(l(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["\n <nile-virtual-select multiple>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context13.sent;i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.value=["option-1","option-3"];i.open=!0;_context13.next=9;return i.updateComplete;case 9:o=(_i$shadowRoot18=i.shadowRoot)===null||_i$shadowRoot18===void 0?void 0:_i$shadowRoot18.querySelectorAll("nile-option[selected]");e(o===null||o===void 0?void 0:o.length).to.equal(2),o===null||o===void 0?void 0:o.forEach(function(t){var _t$shadowRoot;var l=(_t$shadowRoot=t.shadowRoot)===null||_t$shadowRoot===void 0?void 0:_t$shadowRoot.querySelector("nile-checkbox");e(l).to.exist,e(l===null||l===void 0?void 0:l.checked).to.be["true"];});a=(_i$shadowRoot19=i.shadowRoot)===null||_i$shadowRoot19===void 0?void 0:_i$shadowRoot19.querySelector('nile-option[value="option-2"]');e(a).to.exist;s=a===null||a===void 0||(_a$shadowRoot=a.shadowRoot)===null||_a$shadowRoot===void 0?void 0:_a$shadowRoot.querySelector("nile-checkbox");e(s).to.exist,e(s===null||s===void 0?void 0:s.checked).to.be["false"];case 15:case"end":return _context13.stop();}},_callee12);})));}),describe("no results message functionality",function(){it("should show no results message when data is empty and not loading",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13(){var _i$shadowRoot20,_o$textContent2;var i,o;return _regeneratorRuntime().wrap(function _callee13$(_context14){while(1)switch(_context14.prev=_context14.next){case 0:_context14.next=2;return t(l(_templateObject13||(_templateObject13=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context14.sent;i.data=[];i.optionsLoading=!1;i.open=!0;_context14.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot20=i.shadowRoot)===null||_i$shadowRoot20===void 0?void 0:_i$shadowRoot20.querySelector(".select__no-results");e(o).to.exist,e(o===null||o===void 0||(_o$textContent2=o.textContent)===null||_o$textContent2===void 0?void 0:_o$textContent2.trim()).to.equal("No results found");case 10:case"end":return _context14.stop();}},_callee13);}))),it("should show custom no results message when provided",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14(){var _i$shadowRoot21,_o$textContent3;var i,o;return _regeneratorRuntime().wrap(function _callee14$(_context15){while(1)switch(_context15.prev=_context15.next){case 0:_context15.next=2;return t(l(_templateObject14||(_templateObject14=_taggedTemplateLiteral(["\n <nile-virtual-select no-results-message=\"No data available\">\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context15.sent;i.data=[];i.optionsLoading=!1;i.open=!0;_context15.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot21=i.shadowRoot)===null||_i$shadowRoot21===void 0?void 0:_i$shadowRoot21.querySelector(".select__no-results");e(o).to.exist,e(o===null||o===void 0||(_o$textContent3=o.textContent)===null||_o$textContent3===void 0?void 0:_o$textContent3.trim()).to.equal("No data available");case 10:case"end":return _context15.stop();}},_callee14);}))),it("should not show no results message when loading",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee15(){var _i$shadowRoot22;var i,o;return _regeneratorRuntime().wrap(function _callee15$(_context16){while(1)switch(_context16.prev=_context16.next){case 0:_context16.next=2;return t(l(_templateObject15||(_templateObject15=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context16.sent;i.data=[];i.optionsLoading=!0;i.open=!0;_context16.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot22=i.shadowRoot)===null||_i$shadowRoot22===void 0?void 0:_i$shadowRoot22.querySelector(".select__no-results");e(o).to.not.exist;case 10:case"end":return _context16.stop();}},_callee15);}))),it("should show no results message when search returns no results",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee16(){var _i$shadowRoot23,_o$textContent4;var i,o;return _regeneratorRuntime().wrap(function _callee16$(_context17){while(1)switch(_context17.prev=_context17.next){case 0:_context17.next=2;return t(l(_templateObject16||(_templateObject16=_taggedTemplateLiteral(["\n <nile-virtual-select search-enabled>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context17.sent;i.data=[{value:"option-1",label:"Apple"},{value:"option-2",label:"Banana"},{value:"option-3",label:"Cherry"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context17.next=8;return i.updateComplete;case 8:i.searchValue="Orange";i.filterVirtualOptions("Orange");_context17.next=12;return i.updateComplete;case 12:o=(_i$shadowRoot23=i.shadowRoot)===null||_i$shadowRoot23===void 0?void 0:_i$shadowRoot23.querySelector(".select__no-results");e(o).to.exist,e(o===null||o===void 0||(_o$textContent4=o.textContent)===null||_o$textContent4===void 0?void 0:_o$textContent4.trim()).to.equal("No results found");case 14:case"end":return _context17.stop();}},_callee16);}))),it("should hide no results message when data becomes available",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee17(){var _i$shadowRoot24,_i$shadowRoot25;var i,o;return _regeneratorRuntime().wrap(function _callee17$(_context18){while(1)switch(_context18.prev=_context18.next){case 0:_context18.next=2;return t(l(_templateObject17||(_templateObject17=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context18.sent;i.data=[];i.optionsLoading=!1;i.open=!0;_context18.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot24=i.shadowRoot)===null||_i$shadowRoot24===void 0?void 0:_i$shadowRoot24.querySelector(".select__no-results");e(o).to.exist;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"}];_context18.next=13;return i.updateComplete;case 13:o=(_i$shadowRoot25=i.shadowRoot)===null||_i$shadowRoot25===void 0?void 0:_i$shadowRoot25.querySelector(".select__no-results");e(o).to.not.exist;case 15:case"end":return _context18.stop();}},_callee17);})));}),describe("scroll position reset functionality",function(){it("should reset scroll position to top when dropdown opens",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee18(){var _i$shadowRoot26;var i,o;return _regeneratorRuntime().wrap(function _callee18$(_context19){while(1)switch(_context19.prev=_context19.next){case 0:_context19.next=2;return t(l(_templateObject18||(_templateObject18=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context19.sent;i.data=Array.from({length:100},function(t,e){return{value:"option-".concat(e),label:"Option ".concat(e)};});i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context19.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot26=i.shadowRoot)===null||_i$shadowRoot26===void 0?void 0:_i$shadowRoot26.querySelector(".virtualized");e(o).to.exist;o.scrollTop=1e3;e(o.scrollTop).to.equal(1e3);i.open=!1;_context19.next=15;return i.updateComplete;case 15:i.open=!0;_context19.next=18;return i.updateComplete;case 18:e(o.scrollTop).to.equal(0);case 19:case"end":return _context19.stop();}},_callee18);}))),it("should reset scroll position when search value changes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee19(){var _i$shadowRoot27;var i,o;return _regeneratorRuntime().wrap(function _callee19$(_context20){while(1)switch(_context20.prev=_context20.next){case 0:_context20.next=2;return t(l(_templateObject19||(_templateObject19=_taggedTemplateLiteral(["\n <nile-virtual-select search-enabled>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context20.sent;i.data=Array.from({length:100},function(t,e){return{value:"option-".concat(e),label:"Option ".concat(e)};});i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context20.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot27=i.shadowRoot)===null||_i$shadowRoot27===void 0?void 0:_i$shadowRoot27.querySelector(".virtualized");e(o).to.exist;o.scrollTop=1e3;e(o.scrollTop).to.equal(1e3);i.searchValue="test";i.filterVirtualOptions("test");_context20.next=16;return i.updateComplete;case 16:e(o.scrollTop).to.equal(0);case 17:case"end":return _context20.stop();}},_callee19);}))),it("should reset scroll position when show selected state changes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee20(){var _i$shadowRoot28,_i$shadowRoot29;var i,o,a;return _regeneratorRuntime().wrap(function _callee20$(_context21){while(1)switch(_context21.prev=_context21.next){case 0:_context21.next=2;return t(l(_templateObject20||(_templateObject20=_taggedTemplateLiteral(["\n <nile-virtual-select multiple>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context21.sent;i.data=Array.from({length:100},function(t,e){return{value:"option-".concat(e),label:"Option ".concat(e)};});i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-2","option-3"];i.open=!0;_context21.next=9;return i.updateComplete;case 9:o=(_i$shadowRoot28=i.shadowRoot)===null||_i$shadowRoot28===void 0?void 0:_i$shadowRoot28.querySelector(".virtualized");e(o).to.exist,o.scrollTop=1e3,e(o.scrollTop).to.equal(1e3);a=(_i$shadowRoot29=i.shadowRoot)===null||_i$shadowRoot29===void 0?void 0:_i$shadowRoot29.querySelector("nile-checkbox");a!==null&&a!==void 0&&a.click();_context21.next=15;return i.updateComplete;case 15:e(o.scrollTop).to.equal(0);case 16:case"end":return _context21.stop();}},_callee20);})));}),describe("small dataset handling",function(){it("should render small datasets without virtualizer for better sizing",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee21(){var _i$shadowRoot30;var i,o,a,s,n;return _regeneratorRuntime().wrap(function _callee21$(_context22){while(1)switch(_context22.prev=_context22.next){case 0:_context22.next=2;return t(l(_templateObject21||(_templateObject21=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context22.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context22.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot30=i.shadowRoot)===null||_i$shadowRoot30===void 0?void 0:_i$shadowRoot30.querySelector(".virtualized");e(o).to.exist;a=o.querySelector("lit-virtualizer");e(a).to.not.exist;s=o.querySelectorAll("nile-option");e(s.length).to.equal(3);n=Array.from(s).map(function(t){return t.getAttribute("value");});e(n).to.deep.equal(["option-1","option-2","option-3"]);case 16:case"end":return _context22.stop();}},_callee21);}))),it("should use virtualizer for large datasets",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee22(){var _i$shadowRoot31;var i,o,a;return _regeneratorRuntime().wrap(function _callee22$(_context23){while(1)switch(_context23.prev=_context23.next){case 0:_context23.next=2;return t(l(_templateObject22||(_templateObject22=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context23.sent;i.data=Array.from({length:100},function(t,e){return{value:"option-".concat(e+1),label:"Option ".concat(e+1)};});i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context23.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot31=i.shadowRoot)===null||_i$shadowRoot31===void 0?void 0:_i$shadowRoot31.querySelector(".virtualized");e(o).to.exist;a=o.querySelector("lit-virtualizer");e(a).to.exist;case 12:case"end":return _context23.stop();}},_callee22);}))),it("should fit snugly without extra space for small datasets",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee23(){var _i$shadowRoot32,_i$shadowRoot33;var i,o,a,s,n,c;return _regeneratorRuntime().wrap(function _callee23$(_context24){while(1)switch(_context24.prev=_context24.next){case 0:_context24.next=2;return t(l(_templateObject23||(_templateObject23=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context24.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context24.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot32=i.shadowRoot)===null||_i$shadowRoot32===void 0?void 0:_i$shadowRoot32.querySelector(".select__listbox");e(o).to.exist;a=(_i$shadowRoot33=i.shadowRoot)===null||_i$shadowRoot33===void 0?void 0:_i$shadowRoot33.querySelector(".virtualized");e(a).to.exist;s=a.offsetHeight,n=a.querySelectorAll("nile-option");e(n.length).to.equal(3),e(s).to.be.greaterThan(0);c=Array.from(n).reduce(function(t,e){return t+e.offsetHeight;},0);e(s).to.be.closeTo(c,20);case 16:case"end":return _context24.stop();}},_callee23);})));});});}};});
|
2
2
|
//# sourceMappingURL=nile-virtual-select.test.cjs.js.map
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{f as t,a as e}from"../fixture-
|
1
|
+
import{f as t,a as e}from"../fixture-8edec91c.esm.js";import{html as l}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";describe("<nile-virtual-select>",(()=>{describe("maxOptionsVisible functionality",(()=>{it('should show "+n More" when more options are selected than maxOptionsVisible',(async()=>{const i=await t(l`
|
2
2
|
<nile-virtual-select multiple max-options-visible="2">
|
3
3
|
<div slot="label">Test Select</div>
|
4
4
|
</nile-virtual-select>
|
@@ -67,6 +67,7 @@ let NileCodeEditor = class NileCodeEditor extends NileElement {
|
|
67
67
|
this.placeholderComp = new Compartment();
|
68
68
|
this.defaultSyntaxHighlightingComp = new Compartment();
|
69
69
|
this.themeComp = new Compartment();
|
70
|
+
this.autoCompletionComp = new Compartment();
|
70
71
|
this.isSpacePressed = false;
|
71
72
|
/**
|
72
73
|
* Custom autocomplete handler for code editor suggestions
|
@@ -146,6 +147,14 @@ let NileCodeEditor = class NileCodeEditor extends NileElement {
|
|
146
147
|
]
|
147
148
|
});
|
148
149
|
}
|
150
|
+
if (changedProperties.has('aboveCursor')) {
|
151
|
+
console.log('aboveCursor changed:', this.aboveCursor);
|
152
|
+
this.view.dispatch({
|
153
|
+
effects: [
|
154
|
+
this.autoCompletionComp.reconfigure(autocompletion({ aboveCursor: this.aboveCursor }))
|
155
|
+
]
|
156
|
+
});
|
157
|
+
}
|
149
158
|
if (changedProperties.has('placeholder')) {
|
150
159
|
this.view.dispatch({
|
151
160
|
effects: [
|
@@ -273,7 +282,7 @@ let NileCodeEditor = class NileCodeEditor extends NileElement {
|
|
273
282
|
customAutoCompletions,
|
274
283
|
placeholderExtension,
|
275
284
|
defaultSyntaxHighlightingExtension,
|
276
|
-
autocompletion({ aboveCursor: this.aboveCursor }),
|
285
|
+
this.autoCompletionComp.of(autocompletion({ aboveCursor: this.aboveCursor })),
|
277
286
|
language,
|
278
287
|
customThemeExtension,
|
279
288
|
this.getTabCompletionKeymap(),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-code-editor.js","sourceRoot":"","sources":["../../../src/nile-code-editor/nile-code-editor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EACL,IAAI,GAIL,MAAM,KAAK,CAAC;AAEb,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAc,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EACL,WAAW,EACX,WAAW,EAEZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,UAAU,EACV,kBAAkB,GACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAC,eAAe,EAAqC,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC/H,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAA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E,KAAK,CAAC,KAAK,CAAC,kBAAkB,GAAG,CAAC,CAAC,CAAC,CAAC;AACvF,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,uBAAuB,CAAE,GAAO,EAAE,IAAU;IACnD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC9B,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;YACnC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;QAClB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC,EAAE,GAAG,CAAC,CAAC;AACV,CAAC;AAAA,CAAC;AAEF;;;;;;;GAOG;AACH,SAAS,WAAW,CAAC,IAAY;IAC/B,6CAA6C;IAC7C,MAAM,KAAK,GAAG,yFAAyF,CAAC;IACxG,oCAAoC;IACpC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;;GAMG;AACH,SAAS,mBAAmB,CAAC,IAAY;IACvC,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,gDAAgD;IAChD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAC1C,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n html,\n CSSResultArray,\n TemplateResult,\n PropertyValueMap,\n} from 'lit';\n\nimport { customElement, query, property } from 'lit/decorators.js';\nimport { styles } from './nile-code-editor.css';\nimport { EditorView } from 'codemirror';\nimport { ViewUpdate, placeholder } from '@codemirror/view';\nimport { \n Compartment,\n EditorState,\n Extension\n} from '@codemirror/state';\nimport { StyleSpec } from 'style-mod';\nimport {\n syntaxHighlighting,\n defaultHighlightStyle,\n} from '@codemirror/language';\n\nimport { lineNumbers } from '@codemirror/view';\nimport {\n javascript,\n javascriptLanguage,\n} from '@codemirror/lang-javascript';\nimport { sql } from '@codemirror/lang-sql';\nimport { json } from '@codemirror/lang-json';\nimport { html as htmlLang } from '@codemirror/lang-html';\nimport { autocompletion,closeCompletion,CompletionContext,CompletionResult, completionStatus } from '@codemirror/autocomplete';\nimport NileElement from '../internal/nile-element';\nimport { basicSetup } from './extensionSetup';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { Theme as DefaultTheme, customisedThemeCss } from './theme';\nimport { keymap } from '@codemirror/view';\nimport { acceptCompletion } from '@codemirror/autocomplete';\n\n// Choose the appropriate mode for your use case\n\n/**\n * Nile icon component.\n *\n * @tag nile-code-editor\n *\n */\n@customElement('nile-code-editor')\nexport class NileCodeEditor extends NileElement {\n \n @query('.code__editor__container') codeEditor: HTMLInputElement;\n\n @property({ type: String, reflect: true , attribute: true }) value = '';\n\n @property({ type: String, reflect: true , attribute: true }) expandIcon = \"expand-2\";\n\n @property({ type: String, reflect: true , attribute: true }) placeholder = \"\";\n\n @property({ type: Object, reflect: true , attribute: true }) customAutoCompletions: object | any = {};\n\n @property({ type: Array, reflect: true , attribute: true }) customCompletionsPaths: string[] = [];\n\n @property({ type: String, reflect: true , attribute: true}) language: 'javascript' | 'sql' | 'json' | 'html' = 'javascript';\n\n @property({ type: String, reflect: true , attribute: 'error-message' }) errorMessage: string = '';\n\n @property({ type: Boolean, reflect: true , attribute: true }) error: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: true }) enableSearch: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: true }) noborder: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: true }) multiline: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: true }) enableFoldGutters: boolean = false;\n \n @property({ type: Boolean, reflect: true , attribute: true }) allowVariableInCustomSuggestion: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: true }) lineNumbers: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: false }) disableSyntaxHighlighting: boolean = false;\n\n @property({ type: Object, attribute: false }) customThemeCSS: object | null = customisedThemeCss;\n\n @property({ type: Boolean, reflect: true , attribute: true }) lineNumbersMultiline: boolean = true;\n\n @property({ type: Boolean, reflect: true , attribute: true }) hasScroller: boolean = true;\n\n @property({ type: Boolean, reflect: true , attribute: true }) expandable: boolean = true;\n\n @property({ type: Boolean, reflect: true , attribute: true}) readonly: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: true}) debounce: boolean = false;\n\n @property({ type: Number, reflect: true , attribute: true}) debounceTimeout: number = 200;\n\n @property({ type: Boolean, reflect: true , attribute: true}) aboveCursor: boolean = false;\n\n @property({ type: Boolean, reflect: true, attribute: true }) tabCompletion: boolean = true;\n\n public view: EditorView;\n public viewState:EditorState;\n private timeOut: any = null;\n\n // Compartments for initialiazing and switching extensions\n private lineNumbersComp = new Compartment();\n private restrictSingleLineComp = new Compartment();\n private readOnlyComp = new Compartment();\n private customCompletionComp = new Compartment();\n private placeholderComp = new Compartment();\n private defaultSyntaxHighlightingComp = new Compartment();\n private themeComp = new Compartment();\n\n private isSpacePressed:boolean = false;\n /**\n * The styles for CodeEditor\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.emit('nile-init',undefined,false);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.view.destroy()\n this.emit('nile-destroy',undefined,false);\n }\n\n firstUpdated() {\n this.createNewView()\n this.emit('nile-after-init',{ \n codeMirrorInstance: this.view, \n createNewView: this.createNewView, \n insertAtCursor: this.insertBetweenCode \n }, false )\n }\n\n getTabCompletionKeymap() {\n return this.tabCompletion\n ? keymap.of([\n {\n key: 'Tab',\n run: acceptCompletion,\n }\n ])\n : [];\n }\n\n protected updated(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void{\n super.updated(changedProperties);\n if (changedProperties.has('value') && this.view.state.doc.toString()!=this.value) {\n // Editor has already been initialized, update its state\n this.singleLineMultiLineToggle();\n }\n if (changedProperties.has('multiline')) {\n this.view.dispatch({\n effects: [\n this.lineNumbersComp.reconfigure(this.getLineNumbersExension()),\n this.restrictSingleLineComp.reconfigure(this.getSingleLineExtension())\n ],\n })\n this.singleLineMultiLineToggle();\n }\n if (changedProperties.has('readonly')) {\n this.view.dispatch({ \n effects: [\n this.readOnlyComp.reconfigure(this.getReadOnlyExtension()),\n ]\n })\n }\n if (changedProperties.has('placeholder')) {\n this.view.dispatch({ \n effects: [\n this.placeholderComp.reconfigure(this.getPlaceholderExtension()),\n ]\n })\n }\n if (changedProperties.has('lineNumbers') || changedProperties.has('lineNumbersMultiline')) {\n this.view.dispatch({ \n effects: [\n this.lineNumbersComp.reconfigure(this.getLineNumbersExension()),\n ]\n })\n }\n if(changedProperties.has('customAutoCompletions') || changedProperties.has('customCompletionsPaths')){\n this.view.dispatch({ \n effects: [\n this.customCompletionComp.reconfigure(javascriptLanguage.data.of({\n autocomplete: this.customAutocomplete\n }))\n ]\n })\n }\n if(changedProperties.has('disableSyntaxHighlighting')){\n this.view.dispatch({ \n effects: [\n this.defaultSyntaxHighlightingComp.reconfigure(this.getDefaultSyntaxHighlightingExtension())\n ]\n })\n }\n if(changedProperties.has('customThemeCSS')){\n this.view.dispatch({ \n effects: [\n this.themeComp.reconfigure(this.getCustomThemeExtension())\n ]\n })\n }\n }\n\n public render(): TemplateResult {\n const hasErrorMessage = !!this.errorMessage;\n const hasError = !!this.error;\n const noborder = !!this.noborder;\n const noScrollbar = !this.hasScroller\n return html`<div\n part=\"code-editor-base\"\n class=${classMap({\n 'code__editor__container': true,\n 'noborder': noborder,\n 'error': hasError || hasErrorMessage,\n 'code__editor__singleline': !this.multiline,\n 'no-scroller': noScrollbar\n })}\n >\n ${this.expandable\n ? html` \n <div @click=\"${(e: CustomEvent) => this.emit('nile-expand')}\" class=\"expand__icon__container\">\n <nile-icon\n name=\"${this.expandIcon}\"\n size=\"16\"\n color=\"black\"\n ></nile-icon>\n </div>`\n : ''}\n </div>\n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}`;\n }\n\n createNewView(emitEvent=true){\n if(this.view) this.view.destroy();\n this.createState()\n this.view = new EditorView({\n state: this.viewState,\n parent: this.codeEditor\n });\n\n this.view.dom.addEventListener('keydown', (e: KeyboardEvent) => {\n this.checkForSpaceKey(e);\n this.handleEscapeKey(e);\n }, true);\n if (emitEvent) this.emit('nile-after-update', { createNewView: this.createNewView, codeMirrorInstance: this.view, }, false );\n }\n\n checkForSpaceKey(e: KeyboardEvent) {\n if (e.code === 'Space' && !e.ctrlKey) {\n this.isSpacePressed = true;\n } else {\n this.isSpacePressed = false;\n }\n }\n\n handleEscapeKey(e: KeyboardEvent) {\n if (e.key === 'Escape' && this.view && completionStatus(this.view.state) !== null) {\n e.stopPropagation(); \n e.preventDefault(); \n closeCompletion(this.view);\n }\n }\n\n createState(){\n const lineNumbersExtension = this.lineNumbersComp.of(this.getLineNumbersExension());\n const readOnlyExtension = this.readOnlyComp.of(this.getReadOnlyExtension());\n const restrictSingleLineExtension = this.restrictSingleLineComp.of(this.getSingleLineExtension())\n const placeholderExtension = this.placeholderComp.of(this.getPlaceholderExtension())\n const customThemeExtension=this.themeComp.of(this.getCustomThemeExtension());\n const defaultSyntaxHighlightingExtension = this.defaultSyntaxHighlightingComp.of(this.getDefaultSyntaxHighlightingExtension());\n const language = this.getLanguageExtension()\n const customAutoCompletions = this.customCompletionComp.of(javascriptLanguage.data.of({\n autocomplete: this.customAutocomplete\n }));\n\n this.viewState = EditorState.create({\n doc: !this.multiline ? convertToSingleLine(this.value) : this.value,\n extensions: [\n basicSetup({\n highlightActiveLine: false,\n foldGutter: this.enableFoldGutters,\n enableSearch:this.enableSearch\n }),\n lineNumbersExtension,\n readOnlyExtension,\n restrictSingleLineExtension,\n customAutoCompletions,\n placeholderExtension,\n defaultSyntaxHighlightingExtension,\n autocompletion({aboveCursor: this.aboveCursor}),\n language,\n customThemeExtension,\n this.getTabCompletionKeymap(),\n EditorView.updateListener.of((v: ViewUpdate) => {\n if (v.docChanged) {\n this.debounce ? this.emitAfterTimeout({ value: this.view.state.doc.toString() }) : this.emit('nile-change', { value: this.view.state.doc.toString() })\n }\n }),\n EditorView.domEventHandlers({\n focus: () => this.dispatchEvent(new Event('nile-focus')),\n blur: () => this.dispatchEvent(new Event('nile-blur')),\n }),\n ],\n });\n return this.viewState\n }\n /**\n * Custom autocomplete handler for code editor suggestions\n * @param context CompletionContext from CodeMirror\n * @returns CompletionResult with suggestions or null if no suggestions\n */\n customAutocomplete = (context: CompletionContext): CompletionResult | null => {\n // Getting the valid last line, last text from the code editor\n const text = context.state.doc.sliceString(0, context.pos);\n const lastWord = text.split('\\n').at(-1)?.split(' ').at(-1) || '';\n const [textBeforeCursor, baseTextAfterSeperation] = splitStringAtLastSeparator(lastWord);\n \n return this.getNestedSuggestions(context, textBeforeCursor, baseTextAfterSeperation) \n || this.getTopLevelSuggestions(context, textBeforeCursor);\n };\n\n /**\n * Gets nested property suggestions based on the current path\n * @param context CompletionContext from CodeMirror\n * @param textBeforeCursor Text before cursor position\n * @param baseTextAfterSeperation Text after the last separator (. or [)\n * @returns CompletionResult with nested suggestions or null\n */\n getNestedSuggestions(context: CompletionContext, textBeforeCursor: string, baseTextAfterSeperation: string) {\n // Return early if not a valid path or not ending with . or [\n if (!isValidPath(textBeforeCursor) || !['.', '['].includes(textBeforeCursor.at(-1)!)) {\n return null;\n }\n\n const path = parsePath(textBeforeCursor);\n if (!path) return null;\n\n const textAfterSeperation = baseTextAfterSeperation.replace(/[\"'\\[]/g, '');\n const isInString = textAfterSeperation !== baseTextAfterSeperation;\n const isBracket = textBeforeCursor.at(-1) === '[';\n\n // Return null if we're in a string after a dot\n if (textBeforeCursor.at(-1) === '.' && isInString) return null;\n\n // Get nested properties and filter by text after separation if it exists\n let resolved = resolveNestedProperties(this.customAutoCompletions, path);\n if (!resolved || typeof resolved !== 'object') return null;\n\n if (textAfterSeperation) {\n resolved = Object.fromEntries(\n Object.entries(resolved).filter(([key]) => \n key.toLowerCase().startsWith(textAfterSeperation.toLowerCase())\n )\n );\n }\n\n return {\n from: context.pos - textAfterSeperation.length,\n options: Object.keys(resolved).map(key => ({\n label: key,\n type: 'property',\n info: `Key of ${path[path.length - 1]}`,\n apply: !this.allowVariableInCustomSuggestion && (isBracket && !isInString) \n ? `'${key}'` \n : key,\n boost: 999\n }))\n };\n }\n\n /**\n * Gets top level suggestions based on custom completions and paths\n * @param context CompletionContext from CodeMirror\n * @param textBeforeCursor Text before cursor position\n * @returns CompletionResult with top level suggestions or null\n */\n getTopLevelSuggestions(context: CompletionContext,textBeforeCursor:string){\n const baseMatch: any = textBeforeCursor.match(/([a-zA-Z_$][\\w$]*)$/);\n \n if (!baseMatch) {\n const trimmedText = textBeforeCursor.trim();\n if (trimmedText === '' && !this.isSpacePressed) {\n const optionsList = Object.keys(this.customAutoCompletions).filter(key => \n Object.keys(this.customAutoCompletions[key]).length\n );\n \n const options = optionsList.map((key) => ({\n label: key,\n type: 'property',\n apply: key,\n boost: 999\n }));\n \n if(this.customCompletionsPaths.length){\n this.customCompletionsPaths.forEach(path => {\n options.push({\n label: ''+path,\n type: 'property',\n apply: ''+path,\n boost: 998\n });\n });\n }\n \n return {\n from: context.pos,\n options: options\n };\n }\n return null;\n }\n \n const optionsList = Object.keys(this.customAutoCompletions).filter(key => \n Object.keys(this.customAutoCompletions[key]).length && \n key.toLowerCase().startsWith(textBeforeCursor.toLowerCase())\n );\n \n const options=optionsList.map((key) => ({\n label: key,\n type: 'property',\n apply: key,\n boost: 999\n }))\n if(this.customCompletionsPaths.length){\n this.customCompletionsPaths\n .filter(path=>path.toLocaleLowerCase().includes(textBeforeCursor.toLocaleLowerCase()))\n .forEach(path=>{\n options.push({\n label: ''+path,\n type: 'property',\n apply: ''+path,\n boost: 998\n })\n })\n }\n return {\n from: context.pos - baseMatch[1].length,\n options: options\n }\n }\n\n emitAfterTimeout(value:any){\n if(this.timeOut) clearTimeout(this.timeOut);\n this.timeOut=setTimeout(()=> this.emit('nile-change', value, false), this.debounceTimeout)\n }\n \n public focusAtPosition(pos: number=this.view.state.doc.toString().length): void {\n if (this.view) {\n this.view.dispatch({\n selection: { anchor: pos },\n });\n this.view.focus();\n }\n }\n\n public insertBetweenCode=(text: string) => {\n const transaction = this.view.state.changeByRange(range => {\n const { from, to } = range;\n return { changes: { from:from, to, insert: text }, range };\n });\n this.view.dispatch(transaction);\n }\n\n singleLineMultiLineToggle() {\n this.view.dispatch({\n changes: {\n from: 0,\n to: this.view.state.doc.length,\n insert: !this.multiline\n ? convertToSingleLine(this.value)\n : this.value,\n },\n });\n }\n\n //EXTENSION CONFIGURATIONS\n getLineNumbersExension() {\n return (!this.multiline && this.lineNumbers) || (this.multiline && this.lineNumbersMultiline) ? lineNumbers() : [];\n }\n \n getLanguageExtension():Extension{\n switch(this.language){\n case 'sql':\n return sql();\n case 'json':\n return json();\n case 'html':\n return htmlLang();\n default:\n return javascript(); \n }\n }\n\n getReadOnlyExtension() {\n return this.readonly ? EditorState.readOnly.of(true) : [];\n }\n\n getSingleLineExtension() {\n return !this.multiline ? EditorState.transactionFilter.of(tr =>\n tr.newDoc.lines > 1 ? [] : tr\n ) : [];\n }\n\n getPlaceholderExtension(){\n return this.placeholder ? placeholder(this.placeholder) : [];\n }\n \n getDefaultSyntaxHighlightingExtension(){\n return !this.disableSyntaxHighlighting ? syntaxHighlighting(defaultHighlightStyle, { fallback: true }):[]\n }\n\n getCustomThemeExtension(): Extension {\n if (this.customThemeCSS) {\n return [EditorView.theme(this.customThemeCSS as { [selector: string]: StyleSpec }), EditorView.theme(customisedThemeCss)];\n }\n return [EditorView.theme(customisedThemeCss), EditorView.theme(DefaultTheme)];\n }\n\n restrictSingleLine() {\n return EditorState.transactionFilter.of(tr =>\n tr.newDoc.lines > 1 ? [] : tr\n );\n }\n /* #endregion */\n}\n\nexport default NileCodeEditor;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-code-editor': NileCodeEditor;\n }\n}\n\n/**\n * Parses a string path into an array of keys representing nested object access\n * @param text The path string to parse (e.g. \"foo.bar[0].baz\")\n * @returns Array of keys if valid path, null otherwise\n * @example\n * parsePath(\"foo.bar[0]\") // returns [\"foo\", \"bar\", \"0\"]\n * parsePath(\"invalid\") // returns null\n */\nfunction parsePath(text: string) {\n const regex = /([a-zA-Z_$][\\w$]*)(\\[(?:[^\\]]+)\\]|\\.[a-zA-Z_$][\\w$]*)*/g;\n const matches = [...text.matchAll(regex)];\n if (matches.length > 0) {\n const base = matches[0][1]; // The base object name\n const keys = [base];\n // Extract keys from dot or bracket notation\n const pathMatches = text.match(/\\[(.*?)\\]|\\.(\\w+)/g) || [];\n for (const match of pathMatches) {\n if (match.startsWith('[')) {\n keys.push(match.slice(1, -1).replace(/['\"]/g, '')); // Remove brackets and quotes\n } else if (match.startsWith('.')) {\n keys.push(match.slice(1));\n }\n }\n return keys;\n }\n return null;\n};\n\n/**\n * Splits a path string at the last separator (. or [)\n * @param input The path string to split\n * @returns Array containing [path up to last separator, remainder after separator]\n * @example\n * splitStringAtLastSeparator(\"foo.bar[0]\") // returns [\"foo.bar[\", \"0\"]\n */\nfunction splitStringAtLastSeparator(input:string) {\n const lastSeparatorIndex = Math.max(input.lastIndexOf('.'), input.lastIndexOf('['));\n if (lastSeparatorIndex === -1) return [input, ''];\n return [input.slice(0, lastSeparatorIndex + 1), input.slice(lastSeparatorIndex + 1)];\n}\n\n/**\n * Traverses an object using an array of keys to access nested properties\n * @param obj The object to traverse\n * @param keys Array of keys defining the path to the desired property\n * @returns The value at the specified path, or null if path is invalid\n * @example\n * resolveNestedProperties({foo: {bar: 123}}, [\"foo\", \"bar\"]) // returns 123\n */\nfunction resolveNestedProperties (obj:any, keys:any[]){\n return keys.reduce((acc, key) => {\n if (acc && typeof acc === 'object') {\n return acc[key];\n }\n return null;\n }, obj);\n};\n\n/**\n * Validates if a string represents a valid object path format\n * @param path The path string to validate\n * @returns Boolean indicating if path format is valid\n * @example\n * isValidPath(\"foo.bar[0]\") // returns true\n * isValidPath(\"foo..bar\") // returns false\n */\nfunction isValidPath(path: string) {\n // Regex to validate the format of the string\n const regex = /^([a-zA-Z_$][\\w$]*)(\\.[a-zA-Z_$][\\w$]*|\\[\\s*(['\"]?[a-zA-Z0-9_$]*['\"]?)\\s*\\])*([\\.\\[])?$/;\n // Test the string against the regex\n return regex.test(path);\n}\n\n/**\n * Converts multi-line code into a single line by removing line breaks and extra whitespace\n * @param code The code string to convert\n * @returns Single line version of the code\n * @example\n * convertToSingleLine(\"foo\\n bar\") // returns \"foo bar\"\n */\nfunction convertToSingleLine(code: string) {\n if (!code) return '';\n // Remove line breaks and unnecessary whitespace\n return code.replace(/\\s+/g, ' ').trim();\n}\n\n"]}
|
1
|
+
{"version":3,"file":"nile-code-editor.js","sourceRoot":"","sources":["../../../src/nile-code-editor/nile-code-editor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EACL,IAAI,GAIL,MAAM,KAAK,CAAC;AAEb,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAc,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EACL,WAAW,EACX,WAAW,EAEZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,UAAU,EACV,kBAAkB,GACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAA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C,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;;GAMG;AACH,SAAS,mBAAmB,CAAC,IAAY;IACvC,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,gDAAgD;IAChD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAC1C,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n html,\n CSSResultArray,\n TemplateResult,\n PropertyValueMap,\n} from 'lit';\n\nimport { customElement, query, property } from 'lit/decorators.js';\nimport { styles } from './nile-code-editor.css';\nimport { EditorView } from 'codemirror';\nimport { ViewUpdate, placeholder } from '@codemirror/view';\nimport { \n Compartment,\n EditorState,\n Extension\n} from '@codemirror/state';\nimport { StyleSpec } from 'style-mod';\nimport {\n syntaxHighlighting,\n defaultHighlightStyle,\n} from '@codemirror/language';\n\nimport { lineNumbers } from '@codemirror/view';\nimport {\n javascript,\n javascriptLanguage,\n} from '@codemirror/lang-javascript';\nimport { sql } from '@codemirror/lang-sql';\nimport { json } from '@codemirror/lang-json';\nimport { html as htmlLang } from '@codemirror/lang-html';\nimport { autocompletion,closeCompletion,CompletionContext,CompletionResult, completionStatus } from '@codemirror/autocomplete';\nimport NileElement from '../internal/nile-element';\nimport { basicSetup } from './extensionSetup';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { Theme as DefaultTheme, customisedThemeCss } from './theme';\nimport { keymap } from '@codemirror/view';\nimport { acceptCompletion } from '@codemirror/autocomplete';\n\n// Choose the appropriate mode for your use case\n\n/**\n * Nile icon component.\n *\n * @tag nile-code-editor\n *\n */\n@customElement('nile-code-editor')\nexport class NileCodeEditor extends NileElement {\n \n @query('.code__editor__container') codeEditor: HTMLInputElement;\n\n @property({ type: String, reflect: true , attribute: true }) value = '';\n\n @property({ type: String, reflect: true , attribute: true }) expandIcon = \"expand-2\";\n\n @property({ type: String, reflect: true , attribute: true }) placeholder = \"\";\n\n @property({ type: Object, reflect: true , attribute: true }) customAutoCompletions: object | any = {};\n\n @property({ type: Array, reflect: true , attribute: true }) customCompletionsPaths: string[] = [];\n\n @property({ type: String, reflect: true , attribute: true}) language: 'javascript' | 'sql' | 'json' | 'html' = 'javascript';\n\n @property({ type: String, reflect: true , attribute: 'error-message' }) errorMessage: string = '';\n\n @property({ type: Boolean, reflect: true , attribute: true }) error: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: true }) enableSearch: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: true }) noborder: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: true }) multiline: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: true }) enableFoldGutters: boolean = false;\n \n @property({ type: Boolean, reflect: true , attribute: true }) allowVariableInCustomSuggestion: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: true }) lineNumbers: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: false }) disableSyntaxHighlighting: boolean = false;\n\n @property({ type: Object, attribute: false }) customThemeCSS: object | null = customisedThemeCss;\n\n @property({ type: Boolean, reflect: true , attribute: true }) lineNumbersMultiline: boolean = true;\n\n @property({ type: Boolean, reflect: true , attribute: true }) hasScroller: boolean = true;\n\n @property({ type: Boolean, reflect: true , attribute: true }) expandable: boolean = true;\n\n @property({ type: Boolean, reflect: true , attribute: true}) readonly: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: true}) debounce: boolean = false;\n\n @property({ type: Number, reflect: true , attribute: true}) debounceTimeout: number = 200;\n\n @property({ type: Boolean, reflect: true , attribute: true}) aboveCursor: boolean = false;\n\n @property({ type: Boolean, reflect: true, attribute: true }) tabCompletion: boolean = true;\n\n public view: EditorView;\n public viewState:EditorState;\n private timeOut: any = null;\n\n // Compartments for initialiazing and switching extensions\n private lineNumbersComp = new Compartment();\n private restrictSingleLineComp = new Compartment();\n private readOnlyComp = new Compartment();\n private customCompletionComp = new Compartment();\n private placeholderComp = new Compartment();\n private defaultSyntaxHighlightingComp = new Compartment();\n private themeComp = new Compartment();\n private autoCompletionComp = new Compartment();\n\n\n private isSpacePressed:boolean = false;\n /**\n * The styles for CodeEditor\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.emit('nile-init',undefined,false);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.view.destroy()\n this.emit('nile-destroy',undefined,false);\n }\n\n firstUpdated() {\n this.createNewView()\n this.emit('nile-after-init',{ \n codeMirrorInstance: this.view, \n createNewView: this.createNewView, \n insertAtCursor: this.insertBetweenCode \n }, false )\n }\n\n getTabCompletionKeymap() {\n return this.tabCompletion\n ? keymap.of([\n {\n key: 'Tab',\n run: acceptCompletion,\n }\n ])\n : [];\n }\n\n \n protected updated(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void{\n super.updated(changedProperties);\n if (changedProperties.has('value') && this.view.state.doc.toString()!=this.value) {\n // Editor has already been initialized, update its state\n this.singleLineMultiLineToggle();\n }\n if (changedProperties.has('multiline')) {\n this.view.dispatch({\n effects: [\n this.lineNumbersComp.reconfigure(this.getLineNumbersExension()),\n this.restrictSingleLineComp.reconfigure(this.getSingleLineExtension())\n ],\n })\n this.singleLineMultiLineToggle();\n }\n if (changedProperties.has('readonly')) {\n this.view.dispatch({ \n effects: [\n this.readOnlyComp.reconfigure(this.getReadOnlyExtension()),\n ]\n })\n }\n if (changedProperties.has('aboveCursor')) {\n console.log('aboveCursor changed:', this.aboveCursor);\n this.view.dispatch({\n effects: [\n this.autoCompletionComp.reconfigure(\n autocompletion({ aboveCursor: this.aboveCursor })\n )\n ]\n });\n } \n if (changedProperties.has('placeholder')) {\n this.view.dispatch({ \n effects: [\n this.placeholderComp.reconfigure(this.getPlaceholderExtension()),\n ]\n })\n }\n if (changedProperties.has('lineNumbers') || changedProperties.has('lineNumbersMultiline')) {\n this.view.dispatch({ \n effects: [\n this.lineNumbersComp.reconfigure(this.getLineNumbersExension()),\n ]\n })\n }\n if(changedProperties.has('customAutoCompletions') || changedProperties.has('customCompletionsPaths')){\n this.view.dispatch({ \n effects: [\n this.customCompletionComp.reconfigure(javascriptLanguage.data.of({\n autocomplete: this.customAutocomplete\n }))\n ]\n })\n }\n if(changedProperties.has('disableSyntaxHighlighting')){\n this.view.dispatch({ \n effects: [\n this.defaultSyntaxHighlightingComp.reconfigure(this.getDefaultSyntaxHighlightingExtension())\n ]\n })\n }\n if(changedProperties.has('customThemeCSS')){\n this.view.dispatch({ \n effects: [\n this.themeComp.reconfigure(this.getCustomThemeExtension())\n ]\n })\n }\n }\n\n public render(): TemplateResult {\n const hasErrorMessage = !!this.errorMessage;\n const hasError = !!this.error;\n const noborder = !!this.noborder;\n const noScrollbar = !this.hasScroller\n return html`<div\n part=\"code-editor-base\"\n class=${classMap({\n 'code__editor__container': true,\n 'noborder': noborder,\n 'error': hasError || hasErrorMessage,\n 'code__editor__singleline': !this.multiline,\n 'no-scroller': noScrollbar\n })}\n >\n ${this.expandable\n ? html` \n <div @click=\"${(e: CustomEvent) => this.emit('nile-expand')}\" class=\"expand__icon__container\">\n <nile-icon\n name=\"${this.expandIcon}\"\n size=\"16\"\n color=\"black\"\n ></nile-icon>\n </div>`\n : ''}\n </div>\n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}`;\n }\n\n createNewView(emitEvent=true){\n if(this.view) this.view.destroy();\n this.createState()\n this.view = new EditorView({\n state: this.viewState,\n parent: this.codeEditor\n });\n\n this.view.dom.addEventListener('keydown', (e: KeyboardEvent) => {\n this.checkForSpaceKey(e);\n this.handleEscapeKey(e);\n }, true);\n if (emitEvent) this.emit('nile-after-update', { createNewView: this.createNewView, codeMirrorInstance: this.view, }, false );\n }\n\n checkForSpaceKey(e: KeyboardEvent) {\n if (e.code === 'Space' && !e.ctrlKey) {\n this.isSpacePressed = true;\n } else {\n this.isSpacePressed = false;\n }\n }\n\n handleEscapeKey(e: KeyboardEvent) {\n if (e.key === 'Escape' && this.view && completionStatus(this.view.state) !== null) {\n e.stopPropagation(); \n e.preventDefault(); \n closeCompletion(this.view);\n }\n }\n\n createState(){\n const lineNumbersExtension = this.lineNumbersComp.of(this.getLineNumbersExension());\n const readOnlyExtension = this.readOnlyComp.of(this.getReadOnlyExtension());\n const restrictSingleLineExtension = this.restrictSingleLineComp.of(this.getSingleLineExtension())\n const placeholderExtension = this.placeholderComp.of(this.getPlaceholderExtension())\n const customThemeExtension=this.themeComp.of(this.getCustomThemeExtension());\n const defaultSyntaxHighlightingExtension = this.defaultSyntaxHighlightingComp.of(this.getDefaultSyntaxHighlightingExtension());\n const language = this.getLanguageExtension()\n const customAutoCompletions = this.customCompletionComp.of(javascriptLanguage.data.of({\n autocomplete: this.customAutocomplete\n }));\n\n this.viewState = EditorState.create({\n doc: !this.multiline ? convertToSingleLine(this.value) : this.value,\n extensions: [\n basicSetup({\n highlightActiveLine: false,\n foldGutter: this.enableFoldGutters,\n enableSearch:this.enableSearch\n }),\n lineNumbersExtension,\n readOnlyExtension,\n restrictSingleLineExtension,\n customAutoCompletions,\n placeholderExtension,\n defaultSyntaxHighlightingExtension,\n this.autoCompletionComp.of(\n autocompletion({ aboveCursor: this.aboveCursor })\n ), \n language,\n customThemeExtension,\n this.getTabCompletionKeymap(),\n EditorView.updateListener.of((v: ViewUpdate) => {\n if (v.docChanged) {\n this.debounce ? this.emitAfterTimeout({ value: this.view.state.doc.toString() }) : this.emit('nile-change', { value: this.view.state.doc.toString() })\n }\n }),\n EditorView.domEventHandlers({\n focus: () => this.dispatchEvent(new Event('nile-focus')),\n blur: () => this.dispatchEvent(new Event('nile-blur')),\n }),\n ],\n });\n return this.viewState\n }\n /**\n * Custom autocomplete handler for code editor suggestions\n * @param context CompletionContext from CodeMirror\n * @returns CompletionResult with suggestions or null if no suggestions\n */\n customAutocomplete = (context: CompletionContext): CompletionResult | null => {\n // Getting the valid last line, last text from the code editor\n const text = context.state.doc.sliceString(0, context.pos);\n const lastWord = text.split('\\n').at(-1)?.split(' ').at(-1) || '';\n const [textBeforeCursor, baseTextAfterSeperation] = splitStringAtLastSeparator(lastWord);\n \n return this.getNestedSuggestions(context, textBeforeCursor, baseTextAfterSeperation) \n || this.getTopLevelSuggestions(context, textBeforeCursor);\n };\n\n /**\n * Gets nested property suggestions based on the current path\n * @param context CompletionContext from CodeMirror\n * @param textBeforeCursor Text before cursor position\n * @param baseTextAfterSeperation Text after the last separator (. or [)\n * @returns CompletionResult with nested suggestions or null\n */\n getNestedSuggestions(context: CompletionContext, textBeforeCursor: string, baseTextAfterSeperation: string) {\n // Return early if not a valid path or not ending with . or [\n if (!isValidPath(textBeforeCursor) || !['.', '['].includes(textBeforeCursor.at(-1)!)) {\n return null;\n }\n\n const path = parsePath(textBeforeCursor);\n if (!path) return null;\n\n const textAfterSeperation = baseTextAfterSeperation.replace(/[\"'\\[]/g, '');\n const isInString = textAfterSeperation !== baseTextAfterSeperation;\n const isBracket = textBeforeCursor.at(-1) === '[';\n\n // Return null if we're in a string after a dot\n if (textBeforeCursor.at(-1) === '.' && isInString) return null;\n\n // Get nested properties and filter by text after separation if it exists\n let resolved = resolveNestedProperties(this.customAutoCompletions, path);\n if (!resolved || typeof resolved !== 'object') return null;\n\n if (textAfterSeperation) {\n resolved = Object.fromEntries(\n Object.entries(resolved).filter(([key]) => \n key.toLowerCase().startsWith(textAfterSeperation.toLowerCase())\n )\n );\n }\n\n return {\n from: context.pos - textAfterSeperation.length,\n options: Object.keys(resolved).map(key => ({\n label: key,\n type: 'property',\n info: `Key of ${path[path.length - 1]}`,\n apply: !this.allowVariableInCustomSuggestion && (isBracket && !isInString) \n ? `'${key}'` \n : key,\n boost: 999\n }))\n };\n }\n\n /**\n * Gets top level suggestions based on custom completions and paths\n * @param context CompletionContext from CodeMirror\n * @param textBeforeCursor Text before cursor position\n * @returns CompletionResult with top level suggestions or null\n */\n getTopLevelSuggestions(context: CompletionContext,textBeforeCursor:string){\n const baseMatch: any = textBeforeCursor.match(/([a-zA-Z_$][\\w$]*)$/);\n \n if (!baseMatch) {\n const trimmedText = textBeforeCursor.trim();\n if (trimmedText === '' && !this.isSpacePressed) {\n const optionsList = Object.keys(this.customAutoCompletions).filter(key => \n Object.keys(this.customAutoCompletions[key]).length\n );\n \n const options = optionsList.map((key) => ({\n label: key,\n type: 'property',\n apply: key,\n boost: 999\n }));\n \n if(this.customCompletionsPaths.length){\n this.customCompletionsPaths.forEach(path => {\n options.push({\n label: ''+path,\n type: 'property',\n apply: ''+path,\n boost: 998\n });\n });\n }\n \n return {\n from: context.pos,\n options: options\n };\n }\n return null;\n }\n \n const optionsList = Object.keys(this.customAutoCompletions).filter(key => \n Object.keys(this.customAutoCompletions[key]).length && \n key.toLowerCase().startsWith(textBeforeCursor.toLowerCase())\n );\n \n const options=optionsList.map((key) => ({\n label: key,\n type: 'property',\n apply: key,\n boost: 999\n }))\n if(this.customCompletionsPaths.length){\n this.customCompletionsPaths\n .filter(path=>path.toLocaleLowerCase().includes(textBeforeCursor.toLocaleLowerCase()))\n .forEach(path=>{\n options.push({\n label: ''+path,\n type: 'property',\n apply: ''+path,\n boost: 998\n })\n })\n }\n return {\n from: context.pos - baseMatch[1].length,\n options: options\n }\n }\n\n emitAfterTimeout(value:any){\n if(this.timeOut) clearTimeout(this.timeOut);\n this.timeOut=setTimeout(()=> this.emit('nile-change', value, false), this.debounceTimeout)\n }\n \n public focusAtPosition(pos: number=this.view.state.doc.toString().length): void {\n if (this.view) {\n this.view.dispatch({\n selection: { anchor: pos },\n });\n this.view.focus();\n }\n }\n\n public insertBetweenCode=(text: string) => {\n const transaction = this.view.state.changeByRange(range => {\n const { from, to } = range;\n return { changes: { from:from, to, insert: text }, range };\n });\n this.view.dispatch(transaction);\n }\n\n singleLineMultiLineToggle() {\n this.view.dispatch({\n changes: {\n from: 0,\n to: this.view.state.doc.length,\n insert: !this.multiline\n ? convertToSingleLine(this.value)\n : this.value,\n },\n });\n }\n\n //EXTENSION CONFIGURATIONS\n getLineNumbersExension() {\n return (!this.multiline && this.lineNumbers) || (this.multiline && this.lineNumbersMultiline) ? lineNumbers() : [];\n }\n \n getLanguageExtension():Extension{\n switch(this.language){\n case 'sql':\n return sql();\n case 'json':\n return json();\n case 'html':\n return htmlLang();\n default:\n return javascript(); \n }\n }\n\n getReadOnlyExtension() {\n return this.readonly ? EditorState.readOnly.of(true) : [];\n }\n\n getSingleLineExtension() {\n return !this.multiline ? EditorState.transactionFilter.of(tr =>\n tr.newDoc.lines > 1 ? [] : tr\n ) : [];\n }\n\n getPlaceholderExtension(){\n return this.placeholder ? placeholder(this.placeholder) : [];\n }\n \n getDefaultSyntaxHighlightingExtension(){\n return !this.disableSyntaxHighlighting ? syntaxHighlighting(defaultHighlightStyle, { fallback: true }):[]\n }\n\n getCustomThemeExtension(): Extension {\n if (this.customThemeCSS) {\n return [EditorView.theme(this.customThemeCSS as { [selector: string]: StyleSpec }), EditorView.theme(customisedThemeCss)];\n }\n return [EditorView.theme(customisedThemeCss), EditorView.theme(DefaultTheme)];\n }\n\n restrictSingleLine() {\n return EditorState.transactionFilter.of(tr =>\n tr.newDoc.lines > 1 ? [] : tr\n );\n }\n /* #endregion */\n}\n\nexport default NileCodeEditor;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-code-editor': NileCodeEditor;\n }\n}\n\n/**\n * Parses a string path into an array of keys representing nested object access\n * @param text The path string to parse (e.g. \"foo.bar[0].baz\")\n * @returns Array of keys if valid path, null otherwise\n * @example\n * parsePath(\"foo.bar[0]\") // returns [\"foo\", \"bar\", \"0\"]\n * parsePath(\"invalid\") // returns null\n */\nfunction parsePath(text: string) {\n const regex = /([a-zA-Z_$][\\w$]*)(\\[(?:[^\\]]+)\\]|\\.[a-zA-Z_$][\\w$]*)*/g;\n const matches = [...text.matchAll(regex)];\n if (matches.length > 0) {\n const base = matches[0][1]; // The base object name\n const keys = [base];\n // Extract keys from dot or bracket notation\n const pathMatches = text.match(/\\[(.*?)\\]|\\.(\\w+)/g) || [];\n for (const match of pathMatches) {\n if (match.startsWith('[')) {\n keys.push(match.slice(1, -1).replace(/['\"]/g, '')); // Remove brackets and quotes\n } else if (match.startsWith('.')) {\n keys.push(match.slice(1));\n }\n }\n return keys;\n }\n return null;\n};\n\n/**\n * Splits a path string at the last separator (. or [)\n * @param input The path string to split\n * @returns Array containing [path up to last separator, remainder after separator]\n * @example\n * splitStringAtLastSeparator(\"foo.bar[0]\") // returns [\"foo.bar[\", \"0\"]\n */\nfunction splitStringAtLastSeparator(input:string) {\n const lastSeparatorIndex = Math.max(input.lastIndexOf('.'), input.lastIndexOf('['));\n if (lastSeparatorIndex === -1) return [input, ''];\n return [input.slice(0, lastSeparatorIndex + 1), input.slice(lastSeparatorIndex + 1)];\n}\n\n/**\n * Traverses an object using an array of keys to access nested properties\n * @param obj The object to traverse\n * @param keys Array of keys defining the path to the desired property\n * @returns The value at the specified path, or null if path is invalid\n * @example\n * resolveNestedProperties({foo: {bar: 123}}, [\"foo\", \"bar\"]) // returns 123\n */\nfunction resolveNestedProperties (obj:any, keys:any[]){\n return keys.reduce((acc, key) => {\n if (acc && typeof acc === 'object') {\n return acc[key];\n }\n return null;\n }, obj);\n};\n\n/**\n * Validates if a string represents a valid object path format\n * @param path The path string to validate\n * @returns Boolean indicating if path format is valid\n * @example\n * isValidPath(\"foo.bar[0]\") // returns true\n * isValidPath(\"foo..bar\") // returns false\n */\nfunction isValidPath(path: string) {\n // Regex to validate the format of the string\n const regex = /^([a-zA-Z_$][\\w$]*)(\\.[a-zA-Z_$][\\w$]*|\\[\\s*(['\"]?[a-zA-Z0-9_$]*['\"]?)\\s*\\])*([\\.\\[])?$/;\n // Test the string against the regex\n return regex.test(path);\n}\n\n/**\n * Converts multi-line code into a single line by removing line breaks and extra whitespace\n * @param code The code string to convert\n * @returns Single line version of the code\n * @example\n * convertToSingleLine(\"foo\\n bar\") // returns \"foo bar\"\n */\nfunction convertToSingleLine(code: string) {\n if (!code) return '';\n // Remove line breaks and unnecessary whitespace\n return code.replace(/\\s+/g, ' ').trim();\n}\n\n"]}
|
@@ -20,7 +20,6 @@ export declare class NileTableBody extends NileElement {
|
|
20
20
|
defaultSlot: HTMLSlotElement;
|
21
21
|
_childNodes: Array<HTMLElement>;
|
22
22
|
type: 'primary' | 'secondary';
|
23
|
-
expandableRows: boolean;
|
24
23
|
private rows_data;
|
25
24
|
private header_rows_data;
|
26
25
|
private sort__index;
|