@aquera/nile-elements 0.1.55-beta-1.0 → 0.1.55-beta-2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -3
- package/demo/index.html +9 -25
- package/demo/index.js +83 -0
- package/dist/{fixture-588a3119.esm.js → fixture-e7023246.esm.js} +1 -1
- package/dist/{fixture-3330277d.cjs.js → fixture-fe6c932e.cjs.js} +2 -2
- package/dist/{fixture-3330277d.cjs.js.map → fixture-fe6c932e.cjs.js.map} +1 -1
- package/dist/index.js +173 -43
- 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/theme.cjs.js +1 -1
- package/dist/nile-code-editor/theme.cjs.js.map +1 -1
- package/dist/nile-code-editor/theme.esm.js +1 -1
- package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
- package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.test.esm.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
- package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
- package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
- package/dist/nile-error-notification/nile-error-notification.cjs.js +1 -1
- package/dist/nile-error-notification/nile-error-notification.cjs.js.map +1 -1
- package/dist/nile-error-notification/nile-error-notification.esm.js +2 -4
- 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.css.cjs.js +1 -1
- package/dist/nile-table-body/nile-table-body.css.cjs.js.map +1 -1
- package/dist/nile-table-body/nile-table-body.css.esm.js +1 -0
- package/dist/nile-table-cell-item/nile-table-cell-item.cjs.js +1 -1
- package/dist/nile-table-cell-item/nile-table-cell-item.cjs.js.map +1 -1
- package/dist/nile-table-cell-item/nile-table-cell-item.css.cjs.js +1 -1
- package/dist/nile-table-cell-item/nile-table-cell-item.css.cjs.js.map +1 -1
- package/dist/nile-table-cell-item/nile-table-cell-item.css.esm.js +95 -3
- package/dist/nile-table-cell-item/nile-table-cell-item.esm.js +6 -3
- package/dist/nile-table-header-item/nile-table-header-item.cjs.js +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.cjs.js.map +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.css.cjs.js +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.css.cjs.js.map +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.css.esm.js +35 -0
- package/dist/nile-table-header-item/nile-table-header-item.esm.js +3 -2
- package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
- package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
- package/dist/src/nile-code-editor/theme.d.ts +1 -17
- package/dist/src/nile-code-editor/theme.js +11 -27
- package/dist/src/nile-code-editor/theme.js.map +1 -1
- package/dist/src/nile-error-notification/nile-error-notification.js +2 -4
- package/dist/src/nile-error-notification/nile-error-notification.js.map +1 -1
- package/dist/src/nile-table-body/nile-table-body.css.js +1 -0
- package/dist/src/nile-table-body/nile-table-body.css.js.map +1 -1
- package/dist/src/nile-table-cell-item/nile-table-cell-item.css.js +93 -1
- package/dist/src/nile-table-cell-item/nile-table-cell-item.css.js.map +1 -1
- package/dist/src/nile-table-cell-item/nile-table-cell-item.d.ts +5 -0
- package/dist/src/nile-table-cell-item/nile-table-cell-item.js +56 -3
- package/dist/src/nile-table-cell-item/nile-table-cell-item.js.map +1 -1
- package/dist/src/nile-table-header-item/nile-table-header-item.css.js +35 -0
- package/dist/src/nile-table-header-item/nile-table-header-item.css.js.map +1 -1
- package/dist/src/nile-table-header-item/nile-table-header-item.d.ts +5 -0
- package/dist/src/nile-table-header-item/nile-table-header-item.js +60 -15
- package/dist/src/nile-table-header-item/nile-table-header-item.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-code-editor/theme.ts +11 -27
- package/src/nile-error-notification/nile-error-notification.ts +3 -4
- package/src/nile-table-body/nile-table-body.css.ts +1 -0
- package/src/nile-table-cell-item/nile-table-cell-item.css.ts +93 -1
- package/src/nile-table-cell-item/nile-table-cell-item.ts +64 -3
- package/src/nile-table-header-item/nile-table-header-item.css.ts +35 -0
- package/src/nile-table-header-item/nile-table-header-item.ts +58 -5
- package/vscode-html-custom-data.json +14 -3
- package/dist/src/nile-file-preview/index.d.ts +0 -1
- package/dist/src/nile-file-preview/index.js +0 -2
- package/dist/src/nile-file-preview/index.js.map +0 -1
- package/dist/src/nile-file-preview/nile-file-preview.css.d.ts +0 -12
- package/dist/src/nile-file-preview/nile-file-preview.css.js +0 -524
- package/dist/src/nile-file-preview/nile-file-preview.css.js.map +0 -1
- package/dist/src/nile-file-preview/nile-file-preview.d.ts +0 -50
- package/dist/src/nile-file-preview/nile-file-preview.js +0 -171
- package/dist/src/nile-file-preview/nile-file-preview.js.map +0 -1
- package/dist/src/nile-file-preview/nile-file-preview.template.d.ts +0 -13
- package/dist/src/nile-file-preview/nile-file-preview.template.js +0 -205
- package/dist/src/nile-file-preview/nile-file-preview.template.js.map +0 -1
- package/dist/src/nile-file-preview/nile-file-preview.test.d.ts +0 -7
- package/dist/src/nile-file-preview/nile-file-preview.test.js +0 -30
- package/dist/src/nile-file-preview/nile-file-preview.test.js.map +0 -1
- package/dist/src/nile-file-preview/types/index.d.ts +0 -2
- package/dist/src/nile-file-preview/types/index.js +0 -3
- package/dist/src/nile-file-preview/types/index.js.map +0 -1
- package/dist/src/nile-file-preview/types/nile-file-preview.enums.d.ts +0 -27
- package/dist/src/nile-file-preview/types/nile-file-preview.enums.js +0 -32
- package/dist/src/nile-file-preview/types/nile-file-preview.enums.js.map +0 -1
- package/dist/src/nile-file-preview/types/nile-file-preview.interface.d.ts +0 -4
- package/dist/src/nile-file-preview/types/nile-file-preview.interface.js +0 -2
- package/dist/src/nile-file-preview/types/nile-file-preview.interface.js.map +0 -1
- package/dist/src/nile-file-preview/utils/index.d.ts +0 -1
- package/dist/src/nile-file-preview/utils/index.js +0 -2
- package/dist/src/nile-file-preview/utils/index.js.map +0 -1
- package/dist/src/nile-file-preview/utils/nile-file-preview.util.d.ts +0 -5
- package/dist/src/nile-file-preview/utils/nile-file-preview.util.js +0 -50
- package/dist/src/nile-file-preview/utils/nile-file-preview.util.js.map +0 -1
- package/dist/src/nile-file-upload/index.d.ts +0 -1
- package/dist/src/nile-file-upload/index.js +0 -2
- package/dist/src/nile-file-upload/index.js.map +0 -1
- package/dist/src/nile-file-upload/nile-file-upload.css.d.ts +0 -12
- package/dist/src/nile-file-upload/nile-file-upload.css.js +0 -550
- package/dist/src/nile-file-upload/nile-file-upload.css.js.map +0 -1
- package/dist/src/nile-file-upload/nile-file-upload.d.ts +0 -48
- package/dist/src/nile-file-upload/nile-file-upload.js +0 -162
- package/dist/src/nile-file-upload/nile-file-upload.js.map +0 -1
- package/dist/src/nile-file-upload/nile-file-upload.template.d.ts +0 -10
- package/dist/src/nile-file-upload/nile-file-upload.template.js +0 -117
- package/dist/src/nile-file-upload/nile-file-upload.template.js.map +0 -1
- package/dist/src/nile-file-upload/nile-file-upload.test.d.ts +0 -7
- package/dist/src/nile-file-upload/nile-file-upload.test.js +0 -30
- package/dist/src/nile-file-upload/nile-file-upload.test.js.map +0 -1
- package/dist/src/nile-file-upload/types/file-upload.enums.d.ts +0 -36
- package/dist/src/nile-file-upload/types/file-upload.enums.js +0 -43
- package/dist/src/nile-file-upload/types/file-upload.enums.js.map +0 -1
- package/dist/src/nile-file-upload/types/file-upload.type.d.ts +0 -4
- package/dist/src/nile-file-upload/types/file-upload.type.js +0 -2
- package/dist/src/nile-file-upload/types/file-upload.type.js.map +0 -1
- package/dist/src/nile-file-upload/types/index.d.ts +0 -2
- package/dist/src/nile-file-upload/types/index.js +0 -3
- package/dist/src/nile-file-upload/types/index.js.map +0 -1
- package/dist/src/nile-file-upload/utils/drag-drop.util.d.ts +0 -21
- package/dist/src/nile-file-upload/utils/drag-drop.util.js +0 -82
- package/dist/src/nile-file-upload/utils/drag-drop.util.js.map +0 -1
- package/dist/src/nile-file-upload/utils/file-validation.util.d.ts +0 -13
- package/dist/src/nile-file-upload/utils/file-validation.util.js +0 -148
- package/dist/src/nile-file-upload/utils/file-validation.util.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-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-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-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.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-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-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-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-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-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-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-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-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-slider/index.d.ts +0 -1
- package/dist/src/nile-slider/index.js +0 -2
- package/dist/src/nile-slider/index.js.map +0 -1
- package/dist/src/nile-slider/nile-slider.css.d.ts +0 -12
- package/dist/src/nile-slider/nile-slider.css.js +0 -110
- package/dist/src/nile-slider/nile-slider.css.js.map +0 -1
- package/dist/src/nile-slider/nile-slider.d.ts +0 -47
- package/dist/src/nile-slider/nile-slider.js +0 -181
- package/dist/src/nile-slider/nile-slider.js.map +0 -1
- package/dist/src/nile-slider/nile-slider.template.d.ts +0 -5
- package/dist/src/nile-slider/nile-slider.template.js +0 -44
- package/dist/src/nile-slider/nile-slider.template.js.map +0 -1
- package/dist/src/nile-slider/types/nile-slider.enums.d.ts +0 -10
- package/dist/src/nile-slider/types/nile-slider.enums.js +0 -2
- package/dist/src/nile-slider/types/nile-slider.enums.js.map +0 -1
- package/dist/src/nile-slider/types/nile-slider.types.d.ts +0 -1
- package/dist/src/nile-slider/types/nile-slider.types.js +0 -2
- package/dist/src/nile-slider/types/nile-slider.types.js.map +0 -1
- package/dist/src/nile-slider/utils/nile-slider.utils.d.ts +0 -11
- package/dist/src/nile-slider/utils/nile-slider.utils.js +0 -86
- package/dist/src/nile-slider/utils/nile-slider.utils.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(["tslib","lit","lit/decorators.js","./nile-table-cell-item.css.cjs.js","../internal/nile-element.cjs.js","../internal/slot.cjs.js"],function(_export,_context){"use strict";var t,
|
1
|
+
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-table-cell-item.css.cjs.js","../internal/nile-element.cjs.js","../internal/slot.cjs.js"],function(_export,_context){"use strict";var e,t,s,l,i,o,n,_templateObject,_templateObject2,_templateObject3,r;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_lit){t=_lit.html;},function(_litDecoratorsJs){s=_litDecoratorsJs.property;l=_litDecoratorsJs.customElement;},function(_nileTableCellItemCssCjsJs){i=_nileTableCellItemCssCjsJs.s;},function(_internalNileElementCjsJs){o=_internalNileElementCjsJs.N;},function(_internalSlotCjsJs){n=_internalSlotCjsJs.H;}],execute:function execute(){_export("N",r=/*#__PURE__*/function(_o){function r(){var _this;_classCallCheck(this,r);_this=_callSuper(this,r,arguments),_this.hasSlotController=new n(_assertThisInitialized(_this),"[default]"),_this.resizable=!1;return _this;}_inherits(r,_o);return _createClass(r,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(r,"connectedCallback",this,3)([]),console.log("Table cell item connected, resizable:",this.resizable);}},{key:"handleResizeStart",value:function handleResizeStart(e){var _this2=this;e.preventDefault();var t=e.pageX,s=this.offsetWidth,l=e.target;l.classList.add("resizing");var i=function i(e){var l=e.pageX-t,i=Math.max(50,s+l);_this2.style.width=i+"px";var o=_this2.closest("nile-table-body");if(o){var _e=o.querySelectorAll("nile-table-row"),_t=_this2.getColumnIndex();_e.forEach(function(e){var s=e.querySelectorAll("nile-table-cell-item");s[_t]&&(s[_t].style.width=i+"px");});}},_o2=function o(){l.classList.remove("resizing"),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",_o2);};document.addEventListener("mousemove",i),document.addEventListener("mouseup",_o2);}},{key:"getColumnIndex",value:function getColumnIndex(){var e=this.closest("nile-table-row");if(e){var _t2=e.querySelectorAll("nile-table-cell-item");return Array.from(_t2).indexOf(this);}return 0;}},{key:"render",value:function render(){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"cell__wrapper\" part=\"nile__table-cell\">\n ","\n ","\n </div>\n "])),this.hasSlotController.test("[default]")?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral([" <div class=\"column\" part=\"nile__table-cell\"><slot></slot></div>"]))):"",this.resizable?t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<div class=\"resizer\" @mousedown=","></div>"])),this.handleResizeStart):null);}}],[{key:"styles",get:function get(){return[i];}}]);}(o));e([s({type:Boolean,reflect:!0})],r.prototype,"resizable",void 0),_export("N",r=e([l("nile-table-cell-item")],r));}};});
|
2
2
|
//# sourceMappingURL=nile-table-cell-item.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-table-cell-item.cjs.js","sources":["../../../src/nile-table-cell-item/nile-table-cell-item.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-table-cell-item.css';\nimport NileElement from '../internal/nile-element';\nimport { HasSlotController } from '../internal/slot';\n\n/**\n * Nile table Cell Item component.\n *\n * @tag nile-table-cell-item\n *\n */\n@customElement('nile-table-cell-item')\nexport class NileTableCellItem extends NileElement {\n private readonly hasSlotController = new HasSlotController(this, '[default]');\n /**\n * The styles for TableCellItem\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 /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n return html`\n ${this.hasSlotController.test('[default]')\n
|
1
|
+
{"version":3,"file":"nile-table-cell-item.cjs.js","sources":["../../../src/nile-table-cell-item/nile-table-cell-item.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-table-cell-item.css';\nimport NileElement from '../internal/nile-element';\nimport { HasSlotController } from '../internal/slot';\n\n/**\n * Nile table Cell Item component.\n *\n * @tag nile-table-cell-item\n *\n */\n@customElement('nile-table-cell-item')\nexport class NileTableCellItem extends NileElement {\n private readonly hasSlotController = new HasSlotController(this, '[default]');\n /**\n * The styles for TableCellItem\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 /** Enables the resize functionality. */\n @property({ type: Boolean, reflect: true }) resizable = false;\n\n /* #endregion */\n\n /* #region Methods */\n\n connectedCallback() {\n super.connectedCallback();\n console.log('Table cell item connected, resizable:', this.resizable);\n }\n\n private handleResizeStart(e: any) {\n e.preventDefault();\n const startX = e.pageX;\n const startWidth = this.offsetWidth;\n \n // Add resizing class for visual feedback\n const resizer = e.target;\n resizer.classList.add('resizing');\n\n const onMouseMove = (e: any) => {\n const delta = e.pageX - startX;\n const newWidth = Math.max(50, startWidth + delta);\n\n // Apply width to this cell\n this.style.width = newWidth + 'px';\n\n // Find all cells in the same column and apply width\n const tableBody = this.closest('nile-table-body');\n if (tableBody) {\n const rows = tableBody.querySelectorAll('nile-table-row');\n const cellIndex = this.getColumnIndex();\n \n rows.forEach(row => {\n const cells = row.querySelectorAll('nile-table-cell-item');\n if (cells[cellIndex]) {\n cells[cellIndex].style.width = newWidth + 'px';\n }\n });\n }\n };\n\n const onMouseUp = () => {\n resizer.classList.remove('resizing');\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n\n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n }\n\n private getColumnIndex(): number {\n const tableRow = this.closest('nile-table-row');\n if (tableRow) {\n const cells = tableRow.querySelectorAll('nile-table-cell-item');\n return Array.from(cells).indexOf(this);\n }\n return 0;\n }\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n return html`\n <div class=\"cell__wrapper\" part=\"nile__table-cell\">\n ${this.hasSlotController.test('[default]')\n ? html` <div class=\"column\" part=\"nile__table-cell\"><slot></slot></div>`\n : ''}\n ${this.resizable ? html`<div class=\"resizer\" @mousedown=${this.handleResizeStart}></div>` : null}\n </div>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileTableCellItem;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-table-cell-item': NileTableCellItem;\n }\n}\n"],"names":["NileTableCellItem","r","this","hasSlotController","HasSlotController","resizable","_this","_inherits","_o","_createClass","key","value","connectedCallback","super","console","log","handleResizeStart","e","preventDefault","startX","pageX","startWidth","offsetWidth","resizer","target","classList","add","onMouseMove","delta","newWidth","Math","max","style","width","tableBody","closest","rows","querySelectorAll","cellIndex","getColumnIndex","forEach","row","cells","onMouseUp","remove","document","removeEventListener","addEventListener","tableRow","Array","from","indexOf","render","html","_templateObject","_taggedTemplateLiteral","test","_templateObject2","_templateObject3","get","styles","NileElement","__decorate","property","type","Boolean","reflect","prototype","customElement"],"mappings":"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"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["lit"],function(_export,_context){"use strict";var
|
1
|
+
System.register(["lit"],function(_export,_context){"use strict";var e,_templateObject,i;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){e=_lit.css;}],execute:function execute(){_export("s",i=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n --min-cell-width:auto;\n --cell-width:auto;\n --min--height: 52px;\n --max--cell-width: auto;\n box-sizing: border-box;\n display: table-cell;\n vertical-align: middle;\n padding: 16px 24px;\n min-height: var(--min--height);\n position: relative;\n overflow: hidden;\n table-layout: fixed;\n }\n\n .cell__wrapper {\n min-width:var(--min-cell-width);\n width:var(--cell-width);\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n overflow: hidden;\n width: 100%;\n }\n\n .column {\n min-width:var(--min-cell-width);\n width:var(--cell-width);\n height: 100%;\n color: var(--nile-colors-gray-light-mode-600);\n font-family: var(--nile-font-family-serif);\n font-size: var(--nile-type-scale-3);\n font-style: normal;\n font-weight: var(--nile-font-weight-regular);\n /* line-height: var(--nile-type-scale-6); */\n line-height: normal;\n letter-spacing: 0.2px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: 1;\n min-width: 0;\n width: 100%;\n display: block;\n }\n\n .resizer {\n position: absolute;\n right: 0;\n top: -1000px;\n bottom: -1000px;\n width: 8px;\n cursor: col-resize;\n user-select: none;\n background-color: var(--nile-colors-neutral-100);\n transition: background-color 0.2s;\n z-index: 10;\n opacity: 0;\n transition: opacity 0.2s ease;\n pointer-events: none;\n }\n\n :host:hover .resizer {\n opacity: 1;\n pointer-events: auto;\n }\n\n .resizer::before {\n content: '';\n position: absolute;\n right: 3px;\n top: 0;\n width: 2px;\n height: 100%;\n background-color: var(--nile-colors-neutral-500);\n opacity: 0.8;\n }\n\n .resizer:hover {\n background-color: var(--nile-colors-neutral-400);\n }\n\n .resizer:hover::before {\n background-color: var(--nile-colors-neutral-700);\n opacity: 1;\n }\n\n .resizer.resizing {\n background-color: var(--nile-colors-neutral-400);\n opacity: 1;\n pointer-events: auto;\n }\n\n .resizer.resizing::before {\n background-color: var(--nile-colors-neutral-700);\n opacity: 1;\n width: 3px;\n }\n\n ::slotted(*) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 100%;\n display: block;\n width: 100%;\n }\n\n ::slotted(span),\n ::slotted(div),\n ::slotted(p) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: block;\n width: 100%;\n }\n"]))));}};});
|
2
2
|
//# sourceMappingURL=nile-table-cell-item.css.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-table-cell-item.css.cjs.js","sources":["../../../src/nile-table-cell-item/nile-table-cell-item.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * TableCellItem CSS\n */\nexport const styles = css`\n :host {\n --min-cell-width:auto;\n --cell-width:auto;\n --min--height: 52px;\n --max--cell-width: auto;\n box-sizing: border-box;\n display: table-cell;\n vertical-align: middle;\n
|
1
|
+
{"version":3,"file":"nile-table-cell-item.css.cjs.js","sources":["../../../src/nile-table-cell-item/nile-table-cell-item.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * TableCellItem CSS\n */\nexport const styles = css`\n :host {\n --min-cell-width:auto;\n --cell-width:auto;\n --min--height: 52px;\n --max--cell-width: auto;\n box-sizing: border-box;\n display: table-cell;\n vertical-align: middle;\n padding: 16px 24px;\n min-height: var(--min--height);\n position: relative;\n overflow: hidden;\n table-layout: fixed;\n }\n\n .cell__wrapper {\n min-width:var(--min-cell-width);\n width:var(--cell-width);\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n overflow: hidden;\n width: 100%;\n }\n\n .column {\n min-width:var(--min-cell-width);\n width:var(--cell-width);\n height: 100%;\n color: var(--nile-colors-gray-light-mode-600);\n font-family: var(--nile-font-family-serif);\n font-size: var(--nile-type-scale-3);\n font-style: normal;\n font-weight: var(--nile-font-weight-regular);\n /* line-height: var(--nile-type-scale-6); */\n line-height: normal;\n letter-spacing: 0.2px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: 1;\n min-width: 0;\n width: 100%;\n display: block;\n }\n\n .resizer {\n position: absolute;\n right: 0;\n top: -1000px;\n bottom: -1000px;\n width: 8px;\n cursor: col-resize;\n user-select: none;\n background-color: var(--nile-colors-neutral-100);\n transition: background-color 0.2s;\n z-index: 10;\n opacity: 0;\n transition: opacity 0.2s ease;\n pointer-events: none;\n }\n\n :host:hover .resizer {\n opacity: 1;\n pointer-events: auto;\n }\n\n .resizer::before {\n content: '';\n position: absolute;\n right: 3px;\n top: 0;\n width: 2px;\n height: 100%;\n background-color: var(--nile-colors-neutral-500);\n opacity: 0.8;\n }\n\n .resizer:hover {\n background-color: var(--nile-colors-neutral-400);\n }\n\n .resizer:hover::before {\n background-color: var(--nile-colors-neutral-700);\n opacity: 1;\n }\n\n .resizer.resizing {\n background-color: var(--nile-colors-neutral-400);\n opacity: 1;\n pointer-events: auto;\n }\n\n .resizer.resizing::before {\n background-color: var(--nile-colors-neutral-700);\n opacity: 1;\n width: 3px;\n }\n\n ::slotted(*) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 100%;\n display: block;\n width: 100%;\n }\n\n ::slotted(span),\n ::slotted(div),\n ::slotted(p) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: block;\n width: 100%;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{css as
|
1
|
+
import{css as e}from"lit";const i=e`
|
2
2
|
:host {
|
3
3
|
--min-cell-width:auto;
|
4
4
|
--cell-width:auto;
|
@@ -7,9 +7,22 @@ import{css as i}from"lit";const l=i`
|
|
7
7
|
box-sizing: border-box;
|
8
8
|
display: table-cell;
|
9
9
|
vertical-align: middle;
|
10
|
-
max-width: var(--max--cell-width);
|
11
10
|
padding: 16px 24px;
|
12
11
|
min-height: var(--min--height);
|
12
|
+
position: relative;
|
13
|
+
overflow: hidden;
|
14
|
+
table-layout: fixed;
|
15
|
+
}
|
16
|
+
|
17
|
+
.cell__wrapper {
|
18
|
+
min-width:var(--min-cell-width);
|
19
|
+
width:var(--cell-width);
|
20
|
+
height: 100%;
|
21
|
+
position: relative;
|
22
|
+
display: flex;
|
23
|
+
align-items: center;
|
24
|
+
overflow: hidden;
|
25
|
+
width: 100%;
|
13
26
|
}
|
14
27
|
|
15
28
|
.column {
|
@@ -24,5 +37,84 @@ import{css as i}from"lit";const l=i`
|
|
24
37
|
/* line-height: var(--nile-type-scale-6); */
|
25
38
|
line-height: normal;
|
26
39
|
letter-spacing: 0.2px;
|
40
|
+
overflow: hidden;
|
41
|
+
text-overflow: ellipsis;
|
42
|
+
white-space: nowrap;
|
43
|
+
flex: 1;
|
44
|
+
min-width: 0;
|
45
|
+
width: 100%;
|
46
|
+
display: block;
|
47
|
+
}
|
48
|
+
|
49
|
+
.resizer {
|
50
|
+
position: absolute;
|
51
|
+
right: 0;
|
52
|
+
top: -1000px;
|
53
|
+
bottom: -1000px;
|
54
|
+
width: 8px;
|
55
|
+
cursor: col-resize;
|
56
|
+
user-select: none;
|
57
|
+
background-color: var(--nile-colors-neutral-100);
|
58
|
+
transition: background-color 0.2s;
|
59
|
+
z-index: 10;
|
60
|
+
opacity: 0;
|
61
|
+
transition: opacity 0.2s ease;
|
62
|
+
pointer-events: none;
|
63
|
+
}
|
64
|
+
|
65
|
+
:host:hover .resizer {
|
66
|
+
opacity: 1;
|
67
|
+
pointer-events: auto;
|
68
|
+
}
|
69
|
+
|
70
|
+
.resizer::before {
|
71
|
+
content: '';
|
72
|
+
position: absolute;
|
73
|
+
right: 3px;
|
74
|
+
top: 0;
|
75
|
+
width: 2px;
|
76
|
+
height: 100%;
|
77
|
+
background-color: var(--nile-colors-neutral-500);
|
78
|
+
opacity: 0.8;
|
79
|
+
}
|
80
|
+
|
81
|
+
.resizer:hover {
|
82
|
+
background-color: var(--nile-colors-neutral-400);
|
83
|
+
}
|
84
|
+
|
85
|
+
.resizer:hover::before {
|
86
|
+
background-color: var(--nile-colors-neutral-700);
|
87
|
+
opacity: 1;
|
88
|
+
}
|
89
|
+
|
90
|
+
.resizer.resizing {
|
91
|
+
background-color: var(--nile-colors-neutral-400);
|
92
|
+
opacity: 1;
|
93
|
+
pointer-events: auto;
|
94
|
+
}
|
95
|
+
|
96
|
+
.resizer.resizing::before {
|
97
|
+
background-color: var(--nile-colors-neutral-700);
|
98
|
+
opacity: 1;
|
99
|
+
width: 3px;
|
100
|
+
}
|
101
|
+
|
102
|
+
::slotted(*) {
|
103
|
+
overflow: hidden;
|
104
|
+
text-overflow: ellipsis;
|
105
|
+
white-space: nowrap;
|
106
|
+
max-width: 100%;
|
107
|
+
display: block;
|
108
|
+
width: 100%;
|
109
|
+
}
|
110
|
+
|
111
|
+
::slotted(span),
|
112
|
+
::slotted(div),
|
113
|
+
::slotted(p) {
|
114
|
+
overflow: hidden;
|
115
|
+
text-overflow: ellipsis;
|
116
|
+
white-space: nowrap;
|
117
|
+
display: block;
|
118
|
+
width: 100%;
|
27
119
|
}
|
28
|
-
`;export{
|
120
|
+
`;export{i as s};
|
@@ -1,3 +1,6 @@
|
|
1
|
-
import{__decorate as
|
2
|
-
|
3
|
-
|
1
|
+
import{__decorate as e}from"tslib";import{html as t}from"lit";import{property as s,customElement as l}from"lit/decorators.js";import{s as i}from"./nile-table-cell-item.css.esm.js";import{N as o}from"../internal/nile-element.esm.js";import{H as n}from"../internal/slot.esm.js";let r=class extends o{constructor(){super(...arguments),this.hasSlotController=new n(this,"[default]"),this.resizable=!1}static get styles(){return[i]}connectedCallback(){super.connectedCallback(),console.log("Table cell item connected, resizable:",this.resizable)}handleResizeStart(e){e.preventDefault();const t=e.pageX,s=this.offsetWidth,l=e.target;l.classList.add("resizing");const i=e=>{const l=e.pageX-t,i=Math.max(50,s+l);this.style.width=i+"px";const o=this.closest("nile-table-body");if(o){const e=o.querySelectorAll("nile-table-row"),t=this.getColumnIndex();e.forEach((e=>{const s=e.querySelectorAll("nile-table-cell-item");s[t]&&(s[t].style.width=i+"px")}))}},o=()=>{l.classList.remove("resizing"),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",o)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",o)}getColumnIndex(){const e=this.closest("nile-table-row");if(e){const t=e.querySelectorAll("nile-table-cell-item");return Array.from(t).indexOf(this)}return 0}render(){return t`
|
2
|
+
<div class="cell__wrapper" part="nile__table-cell">
|
3
|
+
${this.hasSlotController.test("[default]")?t` <div class="column" part="nile__table-cell"><slot></slot></div>`:""}
|
4
|
+
${this.resizable?t`<div class="resizer" @mousedown=${this.handleResizeStart}></div>`:null}
|
5
|
+
</div>
|
6
|
+
`}};e([s({type:Boolean,reflect:!0})],r.prototype,"resizable",void 0),r=e([l("nile-table-cell-item")],r);export{r as N};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-table-header-item.css.cjs.js","../internal/nile-element.cjs.js","../internal/slot.cjs.js"],function(_export,_context){"use strict";var e,t,i,
|
1
|
+
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-table-header-item.css.cjs.js","../internal/nile-element.cjs.js","../internal/slot.cjs.js"],function(_export,_context){"use strict";var e,t,i,s,n,l,o,r,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,a;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_lit){t=_lit.html;},function(_litDecoratorsJs){i=_litDecoratorsJs.property;s=_litDecoratorsJs.state;n=_litDecoratorsJs.customElement;},function(_nileTableHeaderItemCssCjsJs){l=_nileTableHeaderItemCssCjsJs.s;},function(_internalNileElementCjsJs){o=_internalNileElementCjsJs.N;},function(_internalSlotCjsJs){r=_internalSlotCjsJs.H;}],execute:function execute(){_export("N",a=/*#__PURE__*/function(_o){function a(){var _this;_classCallCheck(this,a);_this=_callSuper(this,a,arguments),_this.hasSlotController=new r(_assertThisInitialized(_this),"[default]"),_this.havesort=!1,_this.havefilter=!1,_this.iconName="",_this.resizable=!1,_this.sorting_ct=0;return _this;}_inherits(a,_o);return _createClass(a,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(a,"connectedCallback",this,3)([]),console.log("Table header item connected, resizable:",this.resizable);}},{key:"handleSort",value:function handleSort(e){this.sorting_ct++;var t=this.hasSlotController.host.innerHTML;this.emit("nile-click-sort",{value:{curr_sort_string:t,order:["normal","asc","des"][this.sorting_ct%3]}});}},{key:"handleSearch",value:function handleSearch(e){this.emit("nile-search",{value:e.detail.value});}},{key:"handleResizeStart",value:function handleResizeStart(e){var _this2=this;e.preventDefault();var t=e.pageX,i=this.offsetWidth,s=e.target;s.classList.add("resizing");var n=function n(e){var s=e.pageX-t,n=Math.max(50,i+s);_this2.style.width=n+"px";var l=_this2.closest("nile-table-body");if(l){var _e=l.querySelectorAll("nile-table-row"),_t=_this2.getColumnIndex();_e.forEach(function(e){var i=e.querySelectorAll("nile-table-cell-item");i[_t]&&(i[_t].style.width=n+"px");});}},_l=function l(){s.classList.remove("resizing"),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",_l);};document.addEventListener("mousemove",n),document.addEventListener("mouseup",_l);}},{key:"getColumnIndex",value:function getColumnIndex(){var e=this.closest("nile-table-row");if(e){var _t2=e.querySelectorAll("nile-table-header-item");return Array.from(_t2).indexOf(this);}return 0;}},{key:"render",value:function render(){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"header__item__wrapper\" part=\"nile__table-header-cell\">\n <div class=\"headers\">\n <slot> </slot>\n ","\n ","\n ","\n ","\n ","\n </div>\n ","\n </div>"])),this.havesort&&this.sorting_ct%3==0?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-icon\n name=\"sortdown\"\n size=\"16\"\n @click=","\n class=\"hover__arrow\"\n ></nile-icon>"])),this.handleSort):null,this.havesort&&this.sorting_ct%3==1?t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-icon\n name=\"sortdown\"\n size=\"16\"\n @click=","\n ></nile-icon>"])),this.handleSort):null,this.havesort&&this.sorting_ct%3==2?t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-icon\n name=\"sortup\"\n size=\"16\"\n @click=","\n ></nile-icon>"])),this.handleSort):null,this.iconName?t(_templateObject5||(_templateObject5=_taggedTemplateLiteral([" <nile-icon name=\"","\" size=\"16\"></nile-icon>"])),this.iconName):t(_templateObject6||(_templateObject6=_taggedTemplateLiteral([""]))),this.havefilter?t(_templateObject7||(_templateObject7=_taggedTemplateLiteral([" <nile-popover title=\"Filter\" placement=\"bottom\">\n <nile-icon name=\"filter\" size=\"16\" slot=\"anchor\"></nile-icon>\n <nile-input\n placeholder=\"Search\"\n @nile-input=","\n part=\"filter__search\"\n ></nile-input>\n <slot name=\"filter__content\" part=\"filter__content\"></slot>\n </nile-popover>"])),this.handleSearch):t(_templateObject8||(_templateObject8=_taggedTemplateLiteral([""]))),this.resizable?t(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<div class=\"resizer\" @mousedown=","></div>"])),this.handleResizeStart):null);}}],[{key:"styles",get:function get(){return[l];}}]);}(o));e([i({type:Boolean,reflect:!0})],a.prototype,"havesort",void 0),e([i({type:Boolean,reflect:!0})],a.prototype,"havefilter",void 0),e([i({type:String,reflect:!0,attribute:"icon-name"})],a.prototype,"iconName",void 0),e([i({type:Boolean,reflect:!0})],a.prototype,"resizable",void 0),e([s()],a.prototype,"sorting_ct",void 0),_export("N",a=e([n("nile-table-header-item")],a));}};});
|
2
2
|
//# sourceMappingURL=nile-table-header-item.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-table-header-item.cjs.js","sources":["../../../src/nile-table-header-item/nile-table-header-item.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, state, property } from 'lit/decorators.js';\nimport { styles } from './nile-table-header-item.css';\nimport NileElement from '../internal/nile-element';\nimport { HasSlotController } from '../internal/slot';\n\n/**\n * Nile icon component.\n *\n * @tag nile-table-header-item\n *\n */\n@customElement('nile-table-header-item')\nexport class NileTableHeaderItem extends NileElement {\n private readonly hasSlotController = new HasSlotController(this, '[default]');\n /**\n * The styles for TableHeaderItem\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 /** Enables the sort functionality. */\n @property({ type: Boolean, reflect: true }) havesort = false;\n\n /** Enables the sort functionality. */\n @property({ type: Boolean, reflect: true }) havefilter = false;\n\n /** Places the icon . */\n @property({ type: String, reflect: true, attribute: 'icon-name' }) iconName =\n '';\n\n @state() sorting_ct = 0;\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n private handleSort(e: any) {\n this.sorting_ct++;\n let curr_sort_string = this.hasSlotController.host.innerHTML;\n const order = ['normal', 'asc', 'des'];\n this.emit('nile-click-sort', {\n value: { curr_sort_string, order: order[this.sorting_ct % 3] },\n });\n }\n\n private handleSearch(e: any) {\n this.emit('nile-search', { value: e.detail.value });\n }\n\n public render(): TemplateResult {\n return html` ${this.hasSlotController.test('[default]')\n ? html`\n <div class=\"header__item__wrapper\" part=\"nile__table-header-cell\">\n <div class=\"headers\">\n <slot> </slot>\n ${this.havesort && this.sorting_ct % 3 === 0\n ? html`<nile-icon\n name=\"sortdown\"\n size=\"16\"\n @click=${this.handleSort}\n class=\"hover__arrow\"\n ></nile-icon>`\n : null}\n ${this.havesort && this.sorting_ct % 3 === 1\n ? html`<nile-icon\n name=\"sortdown\"\n size=\"16\"\n @click=${this.handleSort}\n ></nile-icon>`\n : null}\n ${this.havesort && this.sorting_ct % 3 === 2\n ? html`<nile-icon\n name=\"sortup\"\n size=\"16\"\n @click=${this.handleSort}\n ></nile-icon>`\n : null}\n ${this.iconName\n ? html` <nile-icon name=\"${this.iconName}\" size=\"16\"></nile-icon>`\n : html``}\n ${this.havefilter\n ? html` <nile-popover title=\"Filter\" placement=\"bottom\">\n <nile-icon name=\"filter\" size=\"16\" slot=\"anchor\"></nile-icon>\n <nile-input\n placeholder=\"Search\"\n @nile-input=${this.handleSearch}\n part=\"filter__search\"\n ></nile-input>\n <slot name=\"filter__content\" part=\"filter__content\"></slot>\n </nile-popover>`\n : html``}\n </div>\n </div>`\n : null}`;\n }\n /* #endregion */\n}\n\nexport default NileTableHeaderItem;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-table-header-item': NileTableHeaderItem;\n }\n}\n"],"names":["NileTableHeaderItem","_r","a","constructor","this","hasSlotController","HasSlotController","havesort","havefilter","iconName","sorting_ct","_this","_inherits","_createClass","key","value","handleSort","e","curr_sort_string","host","innerHTML","emit","order","handleSearch","detail","render","html","_templateObject","_taggedTemplateLiteral","test","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","get","styles","NileElement","__decorate","property","type","Boolean","reflect","prototype","String","attribute","state","_export","customElement"],"mappings":"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"}
|
1
|
+
{"version":3,"file":"nile-table-header-item.cjs.js","sources":["../../../src/nile-table-header-item/nile-table-header-item.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, state, property } from 'lit/decorators.js';\nimport { styles } from './nile-table-header-item.css';\nimport NileElement from '../internal/nile-element';\nimport { HasSlotController } from '../internal/slot';\n\n/**\n * Nile icon component.\n *\n * @tag nile-table-header-item\n *\n */\n@customElement('nile-table-header-item')\nexport class NileTableHeaderItem extends NileElement {\n private readonly hasSlotController = new HasSlotController(this, '[default]');\n /**\n * The styles for TableHeaderItem\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 /** Enables the sort functionality. */\n @property({ type: Boolean, reflect: true }) havesort = false;\n\n /** Enables the sort functionality. */\n @property({ type: Boolean, reflect: true }) havefilter = false;\n\n /** Places the icon . */\n @property({ type: String, reflect: true, attribute: 'icon-name' }) iconName =\n '';\n\n /** Enables the resize functionality. */\n @property({ type: Boolean, reflect: true }) resizable = false;\n\n @state() sorting_ct = 0;\n\n /* #endregion */\n\n /* #region Methods */\n\n connectedCallback() {\n super.connectedCallback();\n console.log('Table header item connected, resizable:', this.resizable);\n }\n\n /**\n * Render method\n * @slot This is a slot test\n */\n private handleSort(e: any) {\n this.sorting_ct++;\n let curr_sort_string = this.hasSlotController.host.innerHTML;\n const order = ['normal', 'asc', 'des'];\n this.emit('nile-click-sort', {\n value: { curr_sort_string, order: order[this.sorting_ct % 3] },\n });\n }\n\n private handleSearch(e: any) {\n this.emit('nile-search', { value: e.detail.value });\n }\n\n private handleResizeStart(e: any) {\n e.preventDefault();\n const startX = e.pageX;\n const startWidth = this.offsetWidth;\n \n const resizer = e.target;\n resizer.classList.add('resizing');\n\n const onMouseMove = (e: any) => {\n const delta = e.pageX - startX;\n const newWidth = Math.max(50, startWidth + delta);\n\n this.style.width = newWidth + 'px';\n\n const tableBody = this.closest('nile-table-body');\n if (tableBody) {\n const rows = tableBody.querySelectorAll('nile-table-row');\n const headerIndex = this.getColumnIndex();\n \n rows.forEach(row => {\n const cells = row.querySelectorAll('nile-table-cell-item');\n if (cells[headerIndex]) {\n cells[headerIndex].style.width = newWidth + 'px';\n }\n });\n }\n };\n\n const onMouseUp = () => {\n resizer.classList.remove('resizing');\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n\n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n }\n\n private getColumnIndex(): number {\n const headerRow = this.closest('nile-table-row');\n if (headerRow) {\n const headers = headerRow.querySelectorAll('nile-table-header-item');\n return Array.from(headers).indexOf(this);\n }\n return 0;\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"header__item__wrapper\" part=\"nile__table-header-cell\">\n <div class=\"headers\">\n <slot> </slot>\n ${this.havesort && this.sorting_ct % 3 === 0\n ? html`<nile-icon\n name=\"sortdown\"\n size=\"16\"\n @click=${this.handleSort}\n class=\"hover__arrow\"\n ></nile-icon>`\n : null}\n ${this.havesort && this.sorting_ct % 3 === 1\n ? html`<nile-icon\n name=\"sortdown\"\n size=\"16\"\n @click=${this.handleSort}\n ></nile-icon>`\n : null}\n ${this.havesort && this.sorting_ct % 3 === 2\n ? html`<nile-icon\n name=\"sortup\"\n size=\"16\"\n @click=${this.handleSort}\n ></nile-icon>`\n : null}\n ${this.iconName\n ? html` <nile-icon name=\"${this.iconName}\" size=\"16\"></nile-icon>`\n : html``}\n ${this.havefilter\n ? html` <nile-popover title=\"Filter\" placement=\"bottom\">\n <nile-icon name=\"filter\" size=\"16\" slot=\"anchor\"></nile-icon>\n <nile-input\n placeholder=\"Search\"\n @nile-input=${this.handleSearch}\n part=\"filter__search\"\n ></nile-input>\n <slot name=\"filter__content\" part=\"filter__content\"></slot>\n </nile-popover>`\n : html``}\n </div>\n ${this.resizable ? html`<div class=\"resizer\" @mousedown=${this.handleResizeStart}></div>` : null}\n </div>`;\n }\n}\n\nexport default NileTableHeaderItem;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-table-header-item': NileTableHeaderItem;\n }\n}\n"],"names":["NileTableHeaderItem","a","constructor","this","hasSlotController","HasSlotController","havesort","havefilter","iconName","resizable","sorting_ct","_this","_inherits","_o","_createClass","key","value","connectedCallback","super","console","log","handleSort","e","curr_sort_string","host","innerHTML","emit","order","handleSearch","detail","handleResizeStart","preventDefault","startX","pageX","startWidth","offsetWidth","resizer","target","classList","add","onMouseMove","delta","newWidth","Math","max","style","width","tableBody","closest","rows","querySelectorAll","headerIndex","getColumnIndex","forEach","row","cells","onMouseUp","l","remove","document","removeEventListener","addEventListener","headerRow","headers","Array","from","indexOf","render","html","_templateObject","_taggedTemplateLiteral","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","get","styles","NileElement","__decorate","property","type","Boolean","reflect","prototype","String","attribute","state","_export","customElement"],"mappings":"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"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["lit"],function(_export,_context){"use strict";var i,_templateObject,e;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){i=_lit.css;}],execute:function execute(){_export("s",e=i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n --cell-min-width: auto;\n --cell-width: auto;\n display: table-cell;\n box-sizing: border-box;\n }\n \n .header__item__wrapper{\n min-width:var(--cell-min-width);\n width:var(--cell-width);\n display:flex;\n align-items:center;\n box-sizing: border-box;\n padding: var(--nile-spacing-spacing-lg) var(--nile-spacing-spacing-3xl);\n min-height: 44px;\n height: 44px;\n }\n\n .headers {\n overflow:hidden;\n display: flex;\n align-items: center;\n height: auto;\n width: 100%;\n gap: 8px;\n color: var(--nile-colors-gray-light-mode-600);\n font-family: var(--nile-font-family-serif);\n font-feature-settings: 'clig' off, 'liga' off;\n font-size: var(--nile-type-scale-2);\n font-weight: 500;\n font-style: normal;\n /* line-height: var(--nile-type-scale-5); */\n line-height: normal;\n }\n\n nile-icon {\n cursor: pointer;\n }\n\n .sorting__icons {\n display: flex;\n flex-direction: column;\n align-items: centre;\n }\n\n .sorting__icons nile-icon:hover {\n opacity: 0.4;\n }\n\n .hover__arrow {\n opacity: 0;\n }\n\n .headers:hover .hover__arrow {\n opacity: 0.3;\n }\n"]))));}};});
|
1
|
+
System.register(["lit"],function(_export,_context){"use strict";var i,_templateObject,e;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){i=_lit.css;}],execute:function execute(){_export("s",e=i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n --cell-min-width: auto;\n --cell-width: auto;\n display: table-cell;\n box-sizing: border-box;\n position: relative;\n border-right: 1px solid var(--nile-colors-gray-light-mode-200);\n }\n \n .header__item__wrapper{\n min-width:var(--cell-min-width);\n width:var(--cell-width);\n display:flex;\n align-items:center;\n box-sizing: border-box;\n padding: var(--nile-spacing-spacing-lg) var(--nile-spacing-spacing-3xl);\n min-height: 44px;\n height: 44px;\n position: relative;\n }\n\n .headers {\n overflow:hidden;\n display: flex;\n align-items: center;\n height: auto;\n width: 100%;\n gap: 8px;\n color: var(--nile-colors-gray-light-mode-600);\n font-family: var(--nile-font-family-serif);\n font-feature-settings: 'clig' off, 'liga' off;\n font-size: var(--nile-type-scale-2);\n font-weight: 500;\n font-style: normal;\n /* line-height: var(--nile-type-scale-5); */\n line-height: normal;\n }\n\n nile-icon {\n cursor: pointer;\n }\n\n .sorting__icons {\n display: flex;\n flex-direction: column;\n align-items: centre;\n }\n\n .sorting__icons nile-icon:hover {\n opacity: 0.4;\n }\n\n .hover__arrow {\n opacity: 0;\n }\n\n .headers:hover .hover__arrow {\n opacity: 0.3;\n }\n\n .resizer {\n position: absolute;\n right: -2px;\n top: -1000px;\n bottom: -1000px;\n width: 8px;\n cursor: ew-resize;\n user-select: none;\n transition: background-color 0.2s;\n z-index: 10;\n opacity: 0;\n transition: opacity 0.2s ease;\n }\n\n :host:hover .resizer {\n opacity: 1;\n }\n\n .resizer::before {\n content: '';\n position: absolute;\n height: 100%;\n opacity: 0.8;\n }\n\n .resizer.resizing {\n border-right: 4px double var(--nile-colors-neutral-400);\n background-color: transparent;\n opacity: 1;\n }\n\n"]))));}};});
|
2
2
|
//# sourceMappingURL=nile-table-header-item.css.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-table-header-item.css.cjs.js","sources":["../../../src/nile-table-header-item/nile-table-header-item.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * TableHeaderItem CSS\n */\nexport const styles = css`\n :host {\n --cell-min-width: auto;\n --cell-width: auto;\n display: table-cell;\n box-sizing: border-box;\n }\n \n .header__item__wrapper{\n min-width:var(--cell-min-width);\n width:var(--cell-width);\n display:flex;\n align-items:center;\n box-sizing: border-box;\n padding: var(--nile-spacing-spacing-lg) var(--nile-spacing-spacing-3xl);\n min-height: 44px;\n height: 44px;\n }\n\n .headers {\n overflow:hidden;\n display: flex;\n align-items: center;\n height: auto;\n width: 100%;\n gap: 8px;\n color: var(--nile-colors-gray-light-mode-600);\n font-family: var(--nile-font-family-serif);\n font-feature-settings: 'clig' off, 'liga' off;\n font-size: var(--nile-type-scale-2);\n font-weight: 500;\n font-style: normal;\n /* line-height: var(--nile-type-scale-5); */\n line-height: normal;\n }\n\n nile-icon {\n cursor: pointer;\n }\n\n .sorting__icons {\n display: flex;\n flex-direction: column;\n align-items: centre;\n }\n\n .sorting__icons nile-icon:hover {\n opacity: 0.4;\n }\n\n .hover__arrow {\n opacity: 0;\n }\n\n .headers:hover .hover__arrow {\n opacity: 0.3;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
1
|
+
{"version":3,"file":"nile-table-header-item.css.cjs.js","sources":["../../../src/nile-table-header-item/nile-table-header-item.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * TableHeaderItem CSS\n */\nexport const styles = css`\n :host {\n --cell-min-width: auto;\n --cell-width: auto;\n display: table-cell;\n box-sizing: border-box;\n position: relative;\n border-right: 1px solid var(--nile-colors-gray-light-mode-200);\n }\n \n .header__item__wrapper{\n min-width:var(--cell-min-width);\n width:var(--cell-width);\n display:flex;\n align-items:center;\n box-sizing: border-box;\n padding: var(--nile-spacing-spacing-lg) var(--nile-spacing-spacing-3xl);\n min-height: 44px;\n height: 44px;\n position: relative;\n }\n\n .headers {\n overflow:hidden;\n display: flex;\n align-items: center;\n height: auto;\n width: 100%;\n gap: 8px;\n color: var(--nile-colors-gray-light-mode-600);\n font-family: var(--nile-font-family-serif);\n font-feature-settings: 'clig' off, 'liga' off;\n font-size: var(--nile-type-scale-2);\n font-weight: 500;\n font-style: normal;\n /* line-height: var(--nile-type-scale-5); */\n line-height: normal;\n }\n\n nile-icon {\n cursor: pointer;\n }\n\n .sorting__icons {\n display: flex;\n flex-direction: column;\n align-items: centre;\n }\n\n .sorting__icons nile-icon:hover {\n opacity: 0.4;\n }\n\n .hover__arrow {\n opacity: 0;\n }\n\n .headers:hover .hover__arrow {\n opacity: 0.3;\n }\n\n .resizer {\n position: absolute;\n right: -2px;\n top: -1000px;\n bottom: -1000px;\n width: 8px;\n cursor: ew-resize;\n user-select: none;\n transition: background-color 0.2s;\n z-index: 10;\n opacity: 0;\n transition: opacity 0.2s ease;\n }\n\n :host:hover .resizer {\n opacity: 1;\n }\n\n .resizer::before {\n content: '';\n position: absolute;\n height: 100%;\n opacity: 0.8;\n }\n\n .resizer.resizing {\n border-right: 4px double var(--nile-colors-neutral-400);\n background-color: transparent;\n opacity: 1;\n }\n\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
@@ -4,6 +4,8 @@ import{css as i}from"lit";const e=i`
|
|
4
4
|
--cell-width: auto;
|
5
5
|
display: table-cell;
|
6
6
|
box-sizing: border-box;
|
7
|
+
position: relative;
|
8
|
+
border-right: 1px solid var(--nile-colors-gray-light-mode-200);
|
7
9
|
}
|
8
10
|
|
9
11
|
.header__item__wrapper{
|
@@ -15,6 +17,7 @@ import{css as i}from"lit";const e=i`
|
|
15
17
|
padding: var(--nile-spacing-spacing-lg) var(--nile-spacing-spacing-3xl);
|
16
18
|
min-height: 44px;
|
17
19
|
height: 44px;
|
20
|
+
position: relative;
|
18
21
|
}
|
19
22
|
|
20
23
|
.headers {
|
@@ -55,4 +58,36 @@ import{css as i}from"lit";const e=i`
|
|
55
58
|
.headers:hover .hover__arrow {
|
56
59
|
opacity: 0.3;
|
57
60
|
}
|
61
|
+
|
62
|
+
.resizer {
|
63
|
+
position: absolute;
|
64
|
+
right: -2px;
|
65
|
+
top: -1000px;
|
66
|
+
bottom: -1000px;
|
67
|
+
width: 8px;
|
68
|
+
cursor: ew-resize;
|
69
|
+
user-select: none;
|
70
|
+
transition: background-color 0.2s;
|
71
|
+
z-index: 10;
|
72
|
+
opacity: 0;
|
73
|
+
transition: opacity 0.2s ease;
|
74
|
+
}
|
75
|
+
|
76
|
+
:host:hover .resizer {
|
77
|
+
opacity: 1;
|
78
|
+
}
|
79
|
+
|
80
|
+
.resizer::before {
|
81
|
+
content: '';
|
82
|
+
position: absolute;
|
83
|
+
height: 100%;
|
84
|
+
opacity: 0.8;
|
85
|
+
}
|
86
|
+
|
87
|
+
.resizer.resizing {
|
88
|
+
border-right: 4px double var(--nile-colors-neutral-400);
|
89
|
+
background-color: transparent;
|
90
|
+
opacity: 1;
|
91
|
+
}
|
92
|
+
|
58
93
|
`;export{e as s};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{__decorate as e}from"tslib";import{html as t}from"lit";import{property as i,state as
|
1
|
+
import{__decorate as e}from"tslib";import{html as t}from"lit";import{property as i,state as s,customElement as n}from"lit/decorators.js";import{s as l}from"./nile-table-header-item.css.esm.js";import{N as o}from"../internal/nile-element.esm.js";import{H as r}from"../internal/slot.esm.js";let a=class extends o{constructor(){super(...arguments),this.hasSlotController=new r(this,"[default]"),this.havesort=!1,this.havefilter=!1,this.iconName="",this.resizable=!1,this.sorting_ct=0}static get styles(){return[l]}connectedCallback(){super.connectedCallback(),console.log("Table header item connected, resizable:",this.resizable)}handleSort(e){this.sorting_ct++;let t=this.hasSlotController.host.innerHTML;this.emit("nile-click-sort",{value:{curr_sort_string:t,order:["normal","asc","des"][this.sorting_ct%3]}})}handleSearch(e){this.emit("nile-search",{value:e.detail.value})}handleResizeStart(e){e.preventDefault();const t=e.pageX,i=this.offsetWidth,s=e.target;s.classList.add("resizing");const n=e=>{const s=e.pageX-t,n=Math.max(50,i+s);this.style.width=n+"px";const l=this.closest("nile-table-body");if(l){const e=l.querySelectorAll("nile-table-row"),t=this.getColumnIndex();e.forEach((e=>{const i=e.querySelectorAll("nile-table-cell-item");i[t]&&(i[t].style.width=n+"px")}))}},l=()=>{s.classList.remove("resizing"),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",l)}getColumnIndex(){const e=this.closest("nile-table-row");if(e){const t=e.querySelectorAll("nile-table-header-item");return Array.from(t).indexOf(this)}return 0}render(){return t`
|
2
2
|
<div class="header__item__wrapper" part="nile__table-header-cell">
|
3
3
|
<div class="headers">
|
4
4
|
<slot> </slot>
|
@@ -29,4 +29,5 @@ import{__decorate as e}from"tslib";import{html as t}from"lit";import{property as
|
|
29
29
|
<slot name="filter__content" part="filter__content"></slot>
|
30
30
|
</nile-popover>`:t``}
|
31
31
|
</div>
|
32
|
-
|
32
|
+
${this.resizable?t`<div class="resizer" @mousedown=${this.handleResizeStart}></div>`:null}
|
33
|
+
</div>`}};e([i({type:Boolean,reflect:!0})],a.prototype,"havesort",void 0),e([i({type:Boolean,reflect:!0})],a.prototype,"havefilter",void 0),e([i({type:String,reflect:!0,attribute:"icon-name"})],a.prototype,"iconName",void 0),e([i({type:Boolean,reflect:!0})],a.prototype,"resizable",void 0),e([s()],a.prototype,"sorting_ct",void 0),a=e([n("nile-table-header-item")],a);export{a as N};
|
@@ -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-3330277d.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(_fixture001CjsJs){e=_fixture001CjsJs.f;t=_fixture001CjsJs.a;a=_fixture001CjsJs.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-fe6c932e.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(_fixture001CjsJs){e=_fixture001CjsJs.f;t=_fixture001CjsJs.a;a=_fixture001CjsJs.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-e7023246.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")}))}));
|
@@ -74,8 +74,8 @@ export declare const customisedThemeCss: {
|
|
74
74
|
display: string;
|
75
75
|
content: string;
|
76
76
|
position: string;
|
77
|
-
left: string;
|
78
77
|
top: string;
|
78
|
+
left: string;
|
79
79
|
};
|
80
80
|
'.cm-completionMatchedText': {
|
81
81
|
textDecoration: string;
|
@@ -83,38 +83,22 @@ export declare const customisedThemeCss: {
|
|
83
83
|
'.cm-completionIcon.cm-completionIcon-property::after': {
|
84
84
|
content: string;
|
85
85
|
position: string;
|
86
|
-
left: string;
|
87
|
-
top: string;
|
88
86
|
};
|
89
87
|
'.cm-completionIcon.cm-completionIcon-keyword::after': {
|
90
88
|
content: string;
|
91
89
|
position: string;
|
92
|
-
left: string;
|
93
|
-
top: string;
|
94
90
|
};
|
95
91
|
'.cm-completionIcon.cm-completionIcon-variable::after': {
|
96
92
|
content: string;
|
97
93
|
position: string;
|
98
|
-
left: string;
|
99
|
-
top: string;
|
100
94
|
};
|
101
95
|
'.cm-completionIcon.cm-completionIcon-text::after': {
|
102
96
|
content: string;
|
103
97
|
position: string;
|
104
|
-
left: string;
|
105
|
-
top: string;
|
106
98
|
};
|
107
99
|
'.cm-completionIcon.cm-completionIcon-function::after': {
|
108
100
|
content: string;
|
109
101
|
position: string;
|
110
|
-
left: string;
|
111
|
-
top: string;
|
112
|
-
};
|
113
|
-
'.cm-completionIcon.cm-completionIcon-class::after': {
|
114
|
-
content: string;
|
115
|
-
position: string;
|
116
|
-
left: string;
|
117
|
-
top: string;
|
118
102
|
};
|
119
103
|
'.cm-completionLabel': {
|
120
104
|
marginLeft: string;
|