@aquera/nile-elements 0.1.74 → 0.1.75-beta-1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/demo/index.html +95 -9
- package/dist/{fixture-3bfb4490.cjs.js → fixture-5b79f853.cjs.js} +2 -2
- package/dist/{fixture-3bfb4490.cjs.js.map → fixture-5b79f853.cjs.js.map} +1 -1
- package/dist/fixture-90b199c4.esm.js +569 -0
- package/dist/{fixture-8edec91c.esm.js → fixture-cf7bfcf5.esm.js} +1 -1
- package/dist/fixture-dbd66009.cjs.js +395 -0
- package/dist/fixture-dbd66009.cjs.js.map +1 -0
- package/dist/index.js +41 -17
- 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.cjs.js.map +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-dialog/nile-dialog.test.cjs.js +1 -1
- package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.test.esm.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
- package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
- package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.test.cjs.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.test.esm.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.test.cjs.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.test.esm.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +1 -1
- package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
- package/dist/nile-form-group/nile-form-group.test.esm.js +1 -1
- package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
- package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -1
- package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
- package/dist/nile-hero/nile-hero.test.esm.js +1 -1
- package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
- package/dist/nile-icon/nile-icon.test.esm.js +1 -1
- package/dist/nile-input/nile-input.test.cjs.js +1 -1
- package/dist/nile-input/nile-input.test.esm.js +1 -1
- package/dist/nile-link/nile-link.test.cjs.js +1 -1
- package/dist/nile-link/nile-link.test.esm.js +1 -1
- package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
- package/dist/nile-loader/nile-loader.test.esm.js +1 -1
- package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.test.esm.js +1 -1
- package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
- package/dist/nile-popup/nile-popup.test.esm.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
- package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
- package/dist/nile-radio/nile-radio.test.esm.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
- package/dist/nile-select/index.cjs.js +1 -1
- package/dist/nile-select/index.esm.js +1 -1
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.esm.js +2 -2
- package/dist/nile-select/nile-select.test.cjs.js +1 -1
- package/dist/nile-select/nile-select.test.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.test.esm.js +1 -1
- package/dist/nile-select/virtual-scroll-helper.cjs.js +1 -1
- package/dist/nile-select/virtual-scroll-helper.cjs.js.map +1 -1
- package/dist/nile-select/virtual-scroll-helper.esm.js +1 -0
- package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
- package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
- package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
- package/dist/nile-virtual-select/index.cjs.js +1 -1
- package/dist/nile-virtual-select/index.esm.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js.map +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js.map +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.esm.js +18 -0
- package/dist/nile-virtual-select/nile-virtual-select.esm.js +15 -11
- package/dist/nile-virtual-select/nile-virtual-select.test.cjs.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.test.esm.js +1 -1
- package/dist/nile-virtual-select/renderer.cjs.js +1 -1
- package/dist/nile-virtual-select/renderer.cjs.js.map +1 -1
- package/dist/nile-virtual-select/renderer.esm.js +11 -10
- package/dist/nile-virtual-select/selection-manager.cjs.js +1 -1
- package/dist/nile-virtual-select/selection-manager.cjs.js.map +1 -1
- package/dist/nile-virtual-select/selection-manager.esm.js +1 -1
- package/dist/nile-virtual-select/temp_nile-virtual-select copy.cjs.js +2 -0
- package/dist/nile-virtual-select/temp_nile-virtual-select copy.cjs.js.map +1 -0
- package/dist/nile-virtual-select/temp_nile-virtual-select copy.esm.js +231 -0
- package/dist/src/internal/resizable-helper.d.ts +59 -0
- package/dist/src/internal/resizable-helper.js +115 -0
- package/dist/src/internal/resizable-helper.js.map +1 -0
- package/dist/src/internal/resizable-styles.d.ts +16 -0
- package/dist/src/internal/resizable-styles.js +144 -0
- package/dist/src/internal/resizable-styles.js.map +1 -0
- package/dist/src/internal/virtualizer-error-handler.d.ts +30 -0
- package/dist/src/internal/virtualizer-error-handler.js +82 -0
- package/dist/src/internal/virtualizer-error-handler.js.map +1 -0
- package/dist/src/lib/index.d.ts +7 -0
- package/dist/src/lib/index.js +8 -0
- package/dist/src/lib/index.js.map +1 -0
- package/dist/src/lib/virtualize.d.ts +32 -0
- package/dist/src/lib/virtualize.js +105 -0
- package/dist/src/lib/virtualize.js.map +1 -0
- package/dist/src/lib/virtualize.test.d.ts +7 -0
- package/dist/src/lib/virtualize.test.js +57 -0
- package/dist/src/lib/virtualize.test.js.map +1 -0
- package/dist/src/nile-badge/__snapshots__/nile-badge.test.snap.js +17 -0
- package/dist/src/nile-calendar/__snapshots__/nile-calendar.test.snap.js +310 -0
- package/dist/src/nile-card/__snapshots__/nile-card.test.snap.js +34 -0
- package/dist/src/nile-checkbox/__snapshots__/nile-checkbox.test.snap.js +31 -0
- package/dist/src/nile-grid/data-processor.d.ts +37 -0
- package/dist/src/nile-grid/data-processor.js +122 -0
- package/dist/src/nile-grid/data-processor.js.map +1 -0
- package/dist/src/nile-grid/event-handlers.d.ts +35 -0
- package/dist/src/nile-grid/event-handlers.js +158 -0
- package/dist/src/nile-grid/event-handlers.js.map +1 -0
- package/dist/src/nile-grid/index.d.ts +5 -0
- package/dist/src/nile-grid/index.js +6 -0
- package/dist/src/nile-grid/index.js.map +1 -0
- package/dist/src/nile-grid/nile-grid.css.d.ts +1 -0
- package/dist/src/nile-grid/nile-grid.css.js +120 -0
- package/dist/src/nile-grid/nile-grid.css.js.map +1 -0
- package/dist/src/nile-grid/nile-grid.d.ts +39 -0
- package/dist/src/nile-grid/nile-grid.js +182 -0
- package/dist/src/nile-grid/nile-grid.js.map +1 -0
- package/dist/src/nile-grid/renderer.d.ts +8 -0
- package/dist/src/nile-grid/renderer.js +78 -0
- package/dist/src/nile-grid/renderer.js.map +1 -0
- package/dist/src/nile-grid/resize-handler.d.ts +4 -0
- package/dist/src/nile-grid/resize-handler.js +36 -0
- package/dist/src/nile-grid/resize-handler.js.map +1 -0
- package/dist/src/nile-grid/types.d.ts +32 -0
- package/dist/src/nile-grid/types.js +2 -0
- package/dist/src/nile-grid/types.js.map +1 -0
- package/dist/src/nile-grid/utils.d.ts +4 -0
- package/dist/src/nile-grid/utils.js +32 -0
- package/dist/src/nile-grid/utils.js.map +1 -0
- package/dist/src/nile-hero/__snapshots__/nile-hero.test.snap.js +47 -0
- package/dist/src/nile-icon/__snapshots__/nile-icon.test.snap.js +16 -0
- package/dist/src/nile-icon/icons/svg/ng-action.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-action.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-action.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-activity.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-activity.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-activity.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-alert-circle.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-alert-circle.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-alert-circle.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-align-center.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-align-center.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-align-center.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-annotation-x.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-annotation-x.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-annotation-x.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-down.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-down.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-down.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-down.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-down.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-down.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-left.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-left.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-left.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-right.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-right.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-right.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-up.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-up.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-up.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-bar-chart-12.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-bar-chart-12.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-bar-chart-12.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-bell-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-bell-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-bell-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-bell-ringing-04.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-bell-ringing-04.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-bell-ringing-04.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-bold-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-bold-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-bold-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-building-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-building-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-building-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-building-05.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-building-05.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-building-05.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue-animated.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue-animated.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue-animated.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-calendar-plus-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-calendar-plus-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-calendar-plus-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-calendar.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-calendar.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-calendar.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-check-circle-broken.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-check-circle-broken.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-check-circle-broken.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-check-circle.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-check-circle.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-check-circle.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-check-square-broken.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-check-square-broken.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-check-square-broken.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-check.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-check.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-check.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-down.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-down.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-down.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-left.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-left.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-left.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-right.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-right.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-right.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-selector-vertical.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-selector-vertical.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-selector-vertical.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-up-double.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-up-double.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-up-double.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-up.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-up.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-up.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-copy-03.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-copy-03.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-copy-03.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-dataflow-04.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-dataflow-04.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-dataflow-04.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-dots-grid.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-dots-grid.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-dots-grid.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-dots-vertical.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-dots-vertical.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-dots-vertical.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-download-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-download-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-download-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-dropdown.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-dropdown.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-dropdown.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-edit-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-edit-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-edit-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-edit-05.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-edit-05.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-edit-05.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-expand-06.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-expand-06.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-expand-06.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-eye-off.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-eye-off.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-eye-off.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-eye.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-eye.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-eye.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-file-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-file-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-file-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-file-06.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-file-06.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-file-06.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-file-check-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-file-check-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-file-check-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-file-question-03.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-file-question-03.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-file-question-03.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-filter-lines.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-filter-lines.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-filter-lines.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-grid-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-grid-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-grid-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-help-circle.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-help-circle.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-help-circle.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-image-03.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-image-03.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-image-03.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-image-user-left.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-image-user-left.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-image-user-left.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-info-circle.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-info-circle.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-info-circle.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-italic-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-italic-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-italic-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-layers-three-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-layers-three-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-layers-three-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-list.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-list.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-list.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-lock-03.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-lock-03.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-lock-03.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-log-out-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-log-out-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-log-out-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-mail-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-mail-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-mail-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-mail-04.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-mail-04.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-mail-04.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-marker-pin-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-marker-pin-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-marker-pin-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-menu-05.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-menu-05.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-menu-05.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-message-text-square-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-message-text-square-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-message-text-square-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-minimize-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-minimize-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-minimize-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-minus.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-minus.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-minus.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-plus.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-plus.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-plus.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-refresh-cw-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-refresh-cw-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-refresh-cw-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-rocket-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-rocket-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-rocket-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-search-lg.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-search-lg.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-search-lg.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-send-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-send-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-send-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-settings-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-settings-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-settings-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-share-04.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-share-04.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-share-04.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-share-06.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-share-06.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-share-06.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-stars-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-stars-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-stars-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-trash-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-trash-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-trash-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-trash-03.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-trash-03.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-trash-03.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-trend-up-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-trend-up-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-trend-up-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-underline-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-underline-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-underline-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-upload-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-upload-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-upload-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-upload-cloud-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-upload-cloud-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-upload-cloud-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-user-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-user-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-user-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-user-check-02-1.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-user-check-02-1.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-user-check-02-1.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-user-check-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-user-check-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-user-check-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-user-plus-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-user-plus-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-user-plus-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-user-right-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-user-right-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-user-right-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-users-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-users-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-users-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-x-circle.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-x-circle.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-x-circle.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-x-close.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-x-close.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-x-close.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-x-square.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-x-square.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-x-square.js.map +1 -0
- package/dist/src/nile-input/__snapshots__/nile-input.test.snap.js +75 -0
- package/dist/src/nile-popover/__snapshots__/nile-popover.test.snap.js +22 -0
- package/dist/src/nile-select/nile-select.d.ts +2 -0
- package/dist/src/nile-select/nile-select.js +8 -2
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-select/virtual-scroll-helper.js +1 -0
- package/dist/src/nile-select/virtual-scroll-helper.js.map +1 -1
- package/dist/src/nile-table-body/virtual-scroll-helper.d.ts +9 -0
- package/dist/src/nile-table-body/virtual-scroll-helper.js +24 -0
- package/dist/src/nile-table-body/virtual-scroll-helper.js.map +1 -0
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js +18 -0
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js.map +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.d.ts +18 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.js +106 -21
- package/dist/src/nile-virtual-select/nile-virtual-select.js.map +1 -1
- package/dist/src/nile-virtual-select/renderer.d.ts +2 -2
- package/dist/src/nile-virtual-select/renderer.js +9 -8
- package/dist/src/nile-virtual-select/renderer.js.map +1 -1
- package/dist/src/nile-virtual-select/selection-manager.js +1 -1
- package/dist/src/nile-virtual-select/selection-manager.js.map +1 -1
- package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.d.ts +273 -0
- package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.js +1305 -0
- package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.js.map +1 -0
- package/dist/src/nile-virtual-select/virtualizer-error-handler.d.ts +21 -0
- package/dist/src/nile-virtual-select/virtualizer-error-handler.js +56 -0
- package/dist/src/nile-virtual-select/virtualizer-error-handler.js.map +1 -0
- package/dist/src/nile-virtual-table-body/index.d.ts +2 -0
- package/dist/src/nile-virtual-table-body/index.js +3 -0
- package/dist/src/nile-virtual-table-body/index.js.map +1 -0
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.d.ts +1 -0
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.js +44 -0
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.js.map +1 -0
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.d.ts +50 -0
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.js +135 -0
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.js.map +1 -0
- package/dist/src/nile-virtual-table-body/renderer.d.ts +16 -0
- package/dist/src/nile-virtual-table-body/renderer.js +49 -0
- package/dist/src/nile-virtual-table-body/renderer.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-select/nile-select.ts +6 -2
- package/src/nile-select/virtual-scroll-helper.ts +1 -0
- package/src/nile-virtual-select/nile-virtual-select.css.ts +18 -0
- package/src/nile-virtual-select/nile-virtual-select.ts +121 -25
- package/src/nile-virtual-select/renderer.ts +10 -8
- package/src/nile-virtual-select/selection-manager.ts +1 -1
- package/vscode-html-custom-data.json +28 -2
@@ -0,0 +1,59 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
/**
|
8
|
+
* Resizable Helper Utility
|
9
|
+
* Provides common functionality for resizable table columns
|
10
|
+
*/
|
11
|
+
export interface ResizeOptions {
|
12
|
+
minWidth?: number;
|
13
|
+
startX: number;
|
14
|
+
startWidth: number;
|
15
|
+
element: HTMLElement;
|
16
|
+
}
|
17
|
+
export interface ColumnResizeData {
|
18
|
+
columnIndex: number;
|
19
|
+
newWidth: number;
|
20
|
+
}
|
21
|
+
/**
|
22
|
+
* Handles the start of a resize operation
|
23
|
+
* @param e Mouse event
|
24
|
+
* @param options Resize configuration options
|
25
|
+
* @returns Cleanup function to remove event listeners
|
26
|
+
*/
|
27
|
+
export declare function handleResizeStart(e: MouseEvent, options: ResizeOptions): () => void;
|
28
|
+
/**
|
29
|
+
* Gets the column index of an element within its table row
|
30
|
+
* @param element The table cell or header element
|
31
|
+
* @param selector The CSS selector for the column elements
|
32
|
+
* @returns Column index (0-based)
|
33
|
+
*/
|
34
|
+
export declare function getColumnIndex(element: HTMLElement, selector: string): number;
|
35
|
+
/**
|
36
|
+
* Synchronizes the width of all cells in the same column
|
37
|
+
* @param sourceElement The element that was resized
|
38
|
+
* @param newWidth The new width to apply
|
39
|
+
*/
|
40
|
+
export declare function synchronizeColumnWidth(sourceElement: HTMLElement, newWidth: number): void;
|
41
|
+
/**
|
42
|
+
* Checks if an element has the resizable attribute
|
43
|
+
* @param element The element to check
|
44
|
+
* @returns True if the element is resizable
|
45
|
+
*/
|
46
|
+
export declare function isResizable(element: HTMLElement): boolean;
|
47
|
+
/**
|
48
|
+
* Creates a resize handler function for use in component event listeners
|
49
|
+
* @param element The element to make resizable
|
50
|
+
* @param minWidth Minimum width constraint
|
51
|
+
* @returns Event handler function
|
52
|
+
*/
|
53
|
+
export declare function createResizeHandler(element: HTMLElement, minWidth?: number): (e: MouseEvent) => void;
|
54
|
+
/**
|
55
|
+
* Detects if any columns in a table are resizable
|
56
|
+
* @param tableBody The table body element
|
57
|
+
* @returns True if any columns have resizable attribute
|
58
|
+
*/
|
59
|
+
export declare function hasResizableColumns(tableBody: HTMLElement): boolean;
|
@@ -0,0 +1,115 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
/**
|
8
|
+
* Handles the start of a resize operation
|
9
|
+
* @param e Mouse event
|
10
|
+
* @param options Resize configuration options
|
11
|
+
* @returns Cleanup function to remove event listeners
|
12
|
+
*/
|
13
|
+
export function handleResizeStart(e, options) {
|
14
|
+
e.preventDefault();
|
15
|
+
e.stopPropagation();
|
16
|
+
const { minWidth = 50, startX, startWidth, element } = options;
|
17
|
+
const resizer = e.target;
|
18
|
+
// Add resizing class for visual feedback
|
19
|
+
resizer.classList.add('resizing');
|
20
|
+
const onMouseMove = (e) => {
|
21
|
+
e.preventDefault();
|
22
|
+
e.stopPropagation();
|
23
|
+
const delta = e.pageX - startX;
|
24
|
+
const newWidth = Math.max(minWidth, startWidth + delta);
|
25
|
+
// Apply width to the current element
|
26
|
+
element.style.width = newWidth + 'px';
|
27
|
+
// Synchronize width across all cells in the same column
|
28
|
+
synchronizeColumnWidth(element, newWidth);
|
29
|
+
};
|
30
|
+
const onMouseUp = () => {
|
31
|
+
resizer.classList.remove('resizing');
|
32
|
+
document.removeEventListener('mousemove', onMouseMove);
|
33
|
+
document.removeEventListener('mouseup', onMouseUp);
|
34
|
+
};
|
35
|
+
document.addEventListener('mousemove', onMouseMove);
|
36
|
+
document.addEventListener('mouseup', onMouseUp);
|
37
|
+
// Return cleanup function
|
38
|
+
return () => {
|
39
|
+
document.removeEventListener('mousemove', onMouseMove);
|
40
|
+
document.removeEventListener('mouseup', onMouseUp);
|
41
|
+
};
|
42
|
+
}
|
43
|
+
/**
|
44
|
+
* Gets the column index of an element within its table row
|
45
|
+
* @param element The table cell or header element
|
46
|
+
* @param selector The CSS selector for the column elements
|
47
|
+
* @returns Column index (0-based)
|
48
|
+
*/
|
49
|
+
export function getColumnIndex(element, selector) {
|
50
|
+
const tableRow = element.closest('nile-table-row');
|
51
|
+
if (tableRow) {
|
52
|
+
const columns = tableRow.querySelectorAll(selector);
|
53
|
+
return Array.from(columns).indexOf(element);
|
54
|
+
}
|
55
|
+
return 0;
|
56
|
+
}
|
57
|
+
/**
|
58
|
+
* Synchronizes the width of all cells in the same column
|
59
|
+
* @param sourceElement The element that was resized
|
60
|
+
* @param newWidth The new width to apply
|
61
|
+
*/
|
62
|
+
export function synchronizeColumnWidth(sourceElement, newWidth) {
|
63
|
+
const tableBody = sourceElement.closest('nile-table-body');
|
64
|
+
if (!tableBody)
|
65
|
+
return;
|
66
|
+
const isHeader = sourceElement.tagName.toLowerCase() === 'nile-table-header-item';
|
67
|
+
const selector = isHeader ? 'nile-table-header-item' : 'nile-table-cell-item';
|
68
|
+
const targetSelector = isHeader ? 'nile-table-cell-item' : 'nile-table-cell-item';
|
69
|
+
const columnIndex = getColumnIndex(sourceElement, selector);
|
70
|
+
const rows = tableBody.querySelectorAll('nile-table-row');
|
71
|
+
rows.forEach(row => {
|
72
|
+
const cells = row.querySelectorAll(targetSelector);
|
73
|
+
if (cells[columnIndex]) {
|
74
|
+
cells[columnIndex].style.width = newWidth + 'px';
|
75
|
+
}
|
76
|
+
});
|
77
|
+
}
|
78
|
+
/**
|
79
|
+
* Checks if an element has the resizable attribute
|
80
|
+
* @param element The element to check
|
81
|
+
* @returns True if the element is resizable
|
82
|
+
*/
|
83
|
+
export function isResizable(element) {
|
84
|
+
return element.hasAttribute('resizable');
|
85
|
+
}
|
86
|
+
/**
|
87
|
+
* Creates a resize handler function for use in component event listeners
|
88
|
+
* @param element The element to make resizable
|
89
|
+
* @param minWidth Minimum width constraint
|
90
|
+
* @returns Event handler function
|
91
|
+
*/
|
92
|
+
export function createResizeHandler(element, minWidth = 50) {
|
93
|
+
return (e) => {
|
94
|
+
const options = {
|
95
|
+
minWidth,
|
96
|
+
startX: e.pageX,
|
97
|
+
startWidth: element.offsetWidth,
|
98
|
+
element
|
99
|
+
};
|
100
|
+
handleResizeStart(e, options);
|
101
|
+
};
|
102
|
+
}
|
103
|
+
/**
|
104
|
+
* Detects if any columns in a table are resizable
|
105
|
+
* @param tableBody The table body element
|
106
|
+
* @returns True if any columns have resizable attribute
|
107
|
+
*/
|
108
|
+
export function hasResizableColumns(tableBody) {
|
109
|
+
const headerItems = tableBody.querySelectorAll('nile-table-header-item');
|
110
|
+
const cellItems = tableBody.querySelectorAll('nile-table-cell-item');
|
111
|
+
const hasResizableHeaders = Array.from(headerItems).some(item => isResizable(item));
|
112
|
+
const hasResizableCells = Array.from(cellItems).some(item => isResizable(item));
|
113
|
+
return hasResizableHeaders || hasResizableCells;
|
114
|
+
}
|
115
|
+
//# sourceMappingURL=resizable-helper.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"resizable-helper.js","sourceRoot":"","sources":["../../../src/internal/resizable-helper.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAmBH;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,CAAa,EAAE,OAAsB;IACrE,CAAC,CAAC,cAAc,EAAE,CAAC;IACnB,CAAC,CAAC,eAAe,EAAE,CAAC;IAEpB,MAAM,EAAE,QAAQ,GAAG,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAC/D,MAAM,OAAO,GAAG,CAAC,CAAC,MAAqB,CAAC;IAExC,yCAAyC;IACzC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAElC,MAAM,WAAW,GAAG,CAAC,CAAa,EAAE,EAAE;QACpC,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,CAAC,CAAC,eAAe,EAAE,CAAC;QAEpB,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,GAAG,MAAM,CAAC;QAC/B,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,GAAG,KAAK,CAAC,CAAC;QAExD,qCAAqC;QACrC,OAAO,CAAC,KAAK,CAAC,KAAK,GAAG,QAAQ,GAAG,IAAI,CAAC;QAEtC,wDAAwD;QACxD,sBAAsB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC5C,CAAC,CAAC;IAEF,MAAM,SAAS,GAAG,GAAG,EAAE;QACrB,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACrC,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;QACvD,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC,CAAC;IAEF,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACpD,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAEhD,0BAA0B;IAC1B,OAAO,GAAG,EAAE;QACV,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;QACvD,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,OAAoB,EAAE,QAAgB;IACnE,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACnD,IAAI,QAAQ,EAAE,CAAC;QACb,MAAM,OAAO,GAAG,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QACpD,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,aAA0B,EAAE,QAAgB;IACjF,MAAM,SAAS,GAAG,aAAa,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC3D,IAAI,CAAC,SAAS;QAAE,OAAO;IAEvB,MAAM,QAAQ,GAAG,aAAa,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,wBAAwB,CAAC;IAClF,MAAM,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,sBAAsB,CAAC;IAC9E,MAAM,cAAc,GAAG,QAAQ,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,sBAAsB,CAAC;IAElF,MAAM,WAAW,GAAG,cAAc,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IAC5D,MAAM,IAAI,GAAG,SAAS,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAE1D,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACjB,MAAM,KAAK,GAAG,GAAG,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;QACnD,IAAI,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC;YACvB,KAAK,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,KAAK,GAAG,QAAQ,GAAG,IAAI,CAAC;QACnD,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,OAAoB;IAC9C,OAAO,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAoB,EAAE,WAAmB,EAAE;IAC7E,OAAO,CAAC,CAAa,EAAE,EAAE;QACvB,MAAM,OAAO,GAAkB;YAC7B,QAAQ;YACR,MAAM,EAAE,CAAC,CAAC,KAAK;YACf,UAAU,EAAE,OAAO,CAAC,WAAW;YAC/B,OAAO;SACR,CAAC;QAEF,iBAAiB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAChC,CAAC,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,SAAsB;IACxD,MAAM,WAAW,GAAG,SAAS,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;IACzE,MAAM,SAAS,GAAG,SAAS,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;IAErE,MAAM,mBAAmB,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC9D,WAAW,CAAC,IAAI,CAAC,CAClB,CAAC;IACF,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC1D,WAAW,CAAC,IAAI,CAAC,CAClB,CAAC;IAEF,OAAO,mBAAmB,IAAI,iBAAiB,CAAC;AAClD,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/**\n * Resizable Helper Utility\n * Provides common functionality for resizable table columns\n */\n\nexport interface ResizeOptions {\n minWidth?: number;\n startX: number;\n startWidth: number;\n element: HTMLElement;\n}\n\nexport interface ColumnResizeData {\n columnIndex: number;\n newWidth: number;\n}\n\n/**\n * Handles the start of a resize operation\n * @param e Mouse event\n * @param options Resize configuration options\n * @returns Cleanup function to remove event listeners\n */\nexport function handleResizeStart(e: MouseEvent, options: ResizeOptions): () => void {\n e.preventDefault();\n e.stopPropagation();\n \n const { minWidth = 50, startX, startWidth, element } = options;\n const resizer = e.target as HTMLElement;\n \n // Add resizing class for visual feedback\n resizer.classList.add('resizing');\n\n const onMouseMove = (e: MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n \n const delta = e.pageX - startX;\n const newWidth = Math.max(minWidth, startWidth + delta);\n\n // Apply width to the current element\n element.style.width = newWidth + 'px';\n\n // Synchronize width across all cells in the same column\n synchronizeColumnWidth(element, newWidth);\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 // Return cleanup function\n return () => {\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n}\n\n/**\n * Gets the column index of an element within its table row\n * @param element The table cell or header element\n * @param selector The CSS selector for the column elements\n * @returns Column index (0-based)\n */\nexport function getColumnIndex(element: HTMLElement, selector: string): number {\n const tableRow = element.closest('nile-table-row');\n if (tableRow) {\n const columns = tableRow.querySelectorAll(selector);\n return Array.from(columns).indexOf(element);\n }\n return 0;\n}\n\n/**\n * Synchronizes the width of all cells in the same column\n * @param sourceElement The element that was resized\n * @param newWidth The new width to apply\n */\nexport function synchronizeColumnWidth(sourceElement: HTMLElement, newWidth: number): void {\n const tableBody = sourceElement.closest('nile-table-body');\n if (!tableBody) return;\n\n const isHeader = sourceElement.tagName.toLowerCase() === 'nile-table-header-item';\n const selector = isHeader ? 'nile-table-header-item' : 'nile-table-cell-item';\n const targetSelector = isHeader ? 'nile-table-cell-item' : 'nile-table-cell-item';\n \n const columnIndex = getColumnIndex(sourceElement, selector);\n const rows = tableBody.querySelectorAll('nile-table-row');\n \n rows.forEach(row => {\n const cells = row.querySelectorAll(targetSelector);\n if (cells[columnIndex]) {\n cells[columnIndex].style.width = newWidth + 'px';\n }\n });\n}\n\n/**\n * Checks if an element has the resizable attribute\n * @param element The element to check\n * @returns True if the element is resizable\n */\nexport function isResizable(element: HTMLElement): boolean {\n return element.hasAttribute('resizable');\n}\n\n/**\n * Creates a resize handler function for use in component event listeners\n * @param element The element to make resizable\n * @param minWidth Minimum width constraint\n * @returns Event handler function\n */\nexport function createResizeHandler(element: HTMLElement, minWidth: number = 50): (e: MouseEvent) => void {\n return (e: MouseEvent) => {\n const options: ResizeOptions = {\n minWidth,\n startX: e.pageX,\n startWidth: element.offsetWidth,\n element\n };\n \n handleResizeStart(e, options);\n };\n}\n\n/**\n * Detects if any columns in a table are resizable\n * @param tableBody The table body element\n * @returns True if any columns have resizable attribute\n */\nexport function hasResizableColumns(tableBody: HTMLElement): boolean {\n const headerItems = tableBody.querySelectorAll('nile-table-header-item');\n const cellItems = tableBody.querySelectorAll('nile-table-cell-item');\n \n const hasResizableHeaders = Array.from(headerItems).some(item => \n isResizable(item)\n );\n const hasResizableCells = Array.from(cellItems).some(item => \n isResizable(item)\n );\n \n return hasResizableHeaders || hasResizableCells;\n} \n"]}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
/**
|
8
|
+
* Resizable Styles Utility
|
9
|
+
* Centralized styles for resizable table functionality
|
10
|
+
*/
|
11
|
+
export declare const resizableHostStyles: import("lit").CSSResult;
|
12
|
+
export declare const resizableHeaderStyles: import("lit").CSSResult;
|
13
|
+
export declare const resizerStyles: import("lit").CSSResult;
|
14
|
+
export declare const headerResizerStyles: import("lit").CSSResult;
|
15
|
+
export declare const resizableSlotStyles: import("lit").CSSResult;
|
16
|
+
export declare const tableLayoutStyles: import("lit").CSSResult;
|
@@ -0,0 +1,144 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
import { css } from 'lit';
|
8
|
+
/**
|
9
|
+
* Resizable Styles Utility
|
10
|
+
* Centralized styles for resizable table functionality
|
11
|
+
*/
|
12
|
+
export const resizableHostStyles = css `
|
13
|
+
/* Resizable-specific host styles */
|
14
|
+
:host([resizable]) {
|
15
|
+
position: relative;
|
16
|
+
overflow: hidden;
|
17
|
+
table-layout: fixed;
|
18
|
+
}
|
19
|
+
`;
|
20
|
+
export const resizableHeaderStyles = css `
|
21
|
+
/* Resizable-specific header styles */
|
22
|
+
:host([resizable]) {
|
23
|
+
position: relative;
|
24
|
+
border-right: 1px solid var(--nile-colors-neutral-400);
|
25
|
+
}
|
26
|
+
|
27
|
+
/* Resizable-specific wrapper styles */
|
28
|
+
:host([resizable]) .header__item__wrapper {
|
29
|
+
position: relative;
|
30
|
+
}
|
31
|
+
`;
|
32
|
+
export const resizerStyles = css `
|
33
|
+
/* Resizer styles - only apply when resizable */
|
34
|
+
.resizer {
|
35
|
+
position: absolute;
|
36
|
+
right: 0;
|
37
|
+
top: -1000px;
|
38
|
+
bottom: -1000px;
|
39
|
+
width: 8px;
|
40
|
+
cursor: col-resize;
|
41
|
+
user-select: none;
|
42
|
+
background-color: var(--nile-colors-neutral-100);
|
43
|
+
transition: background-color 0.2s;
|
44
|
+
z-index: 10;
|
45
|
+
opacity: 0;
|
46
|
+
transition: opacity 0.2s ease;
|
47
|
+
pointer-events: none;
|
48
|
+
}
|
49
|
+
|
50
|
+
:host([resizable]):hover .resizer {
|
51
|
+
opacity: 1;
|
52
|
+
pointer-events: auto;
|
53
|
+
}
|
54
|
+
|
55
|
+
.resizer::before {
|
56
|
+
content: '';
|
57
|
+
position: absolute;
|
58
|
+
right: 3px;
|
59
|
+
top: 0;
|
60
|
+
width: 2px;
|
61
|
+
height: 100%;
|
62
|
+
background-color: var(--nile-colors-neutral-500);
|
63
|
+
opacity: 0.8;
|
64
|
+
}
|
65
|
+
|
66
|
+
.resizer:hover {
|
67
|
+
background-color: var(--nile-colors-neutral-400);
|
68
|
+
}
|
69
|
+
|
70
|
+
.resizer:hover::before {
|
71
|
+
background-color: var(--nile-colors-neutral-700);
|
72
|
+
opacity: 1;
|
73
|
+
}
|
74
|
+
|
75
|
+
.resizer.resizing {
|
76
|
+
background-color: var(--nile-colors-neutral-400);
|
77
|
+
opacity: 1;
|
78
|
+
pointer-events: auto;
|
79
|
+
}
|
80
|
+
|
81
|
+
.resizer.resizing::before {
|
82
|
+
background-color: var(--nile-colors-neutral-700);
|
83
|
+
opacity: 1;
|
84
|
+
width: 3px;
|
85
|
+
}
|
86
|
+
`;
|
87
|
+
export const headerResizerStyles = css `
|
88
|
+
/* Header resizer styles */
|
89
|
+
.resizer {
|
90
|
+
position: absolute;
|
91
|
+
right: -2px;
|
92
|
+
top: -1000px;
|
93
|
+
bottom: -1000px;
|
94
|
+
width: 8px;
|
95
|
+
cursor: ew-resize;
|
96
|
+
user-select: none;
|
97
|
+
transition: background-color 0.2s;
|
98
|
+
z-index: 10;
|
99
|
+
opacity: 0;
|
100
|
+
transition: opacity 0.2s ease;
|
101
|
+
}
|
102
|
+
|
103
|
+
:host([resizable]):hover .resizer {
|
104
|
+
opacity: 1;
|
105
|
+
}
|
106
|
+
|
107
|
+
.resizer::before {
|
108
|
+
content: '';
|
109
|
+
position: absolute;
|
110
|
+
height: 100%;
|
111
|
+
opacity: 0.8;
|
112
|
+
}
|
113
|
+
|
114
|
+
.resizer.resizing {
|
115
|
+
border-right: 4px double var(--nile-colors-neutral-400);
|
116
|
+
background-color: transparent;
|
117
|
+
opacity: 1;
|
118
|
+
}
|
119
|
+
`;
|
120
|
+
export const resizableSlotStyles = css `
|
121
|
+
/* Slot styles for resizable mode */
|
122
|
+
:host([resizable]) ::slotted(*) {
|
123
|
+
overflow: hidden;
|
124
|
+
text-overflow: ellipsis;
|
125
|
+
white-space: nowrap;
|
126
|
+
display: block;
|
127
|
+
}
|
128
|
+
|
129
|
+
:host([resizable]) ::slotted(span),
|
130
|
+
:host([resizable]) ::slotted(div),
|
131
|
+
:host([resizable]) ::slotted(p) {
|
132
|
+
overflow: hidden;
|
133
|
+
text-overflow: ellipsis;
|
134
|
+
white-space: nowrap;
|
135
|
+
display: block;
|
136
|
+
}
|
137
|
+
`;
|
138
|
+
export const tableLayoutStyles = css `
|
139
|
+
/* Apply fixed table layout only when resizable columns are present */
|
140
|
+
.nile__table__body[resizable] {
|
141
|
+
table-layout: fixed;
|
142
|
+
}
|
143
|
+
`;
|
144
|
+
//# sourceMappingURL=resizable-styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"resizable-styles.js","sourceRoot":"","sources":["../../../src/internal/resizable-styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;;GAGG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAA;;;;;;;CAOrC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAA;;;;;;;;;;;CAWvC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsD/B,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCrC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;CAiBrC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;CAKnC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * Resizable Styles Utility\n * Centralized styles for resizable table functionality\n */\n\nexport const resizableHostStyles = css`\n /* Resizable-specific host styles */\n :host([resizable]) {\n position: relative;\n overflow: hidden;\n table-layout: fixed;\n }\n`;\n\nexport const resizableHeaderStyles = css`\n /* Resizable-specific header styles */\n :host([resizable]) {\n position: relative;\n border-right: 1px solid var(--nile-colors-neutral-400);\n }\n\n /* Resizable-specific wrapper styles */\n :host([resizable]) .header__item__wrapper {\n position: relative;\n }\n`;\n\nexport const resizerStyles = css`\n /* Resizer styles - only apply when resizable */\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([resizable]):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\nexport const headerResizerStyles = css`\n /* Header resizer styles */\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([resizable]):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\nexport const resizableSlotStyles = css`\n /* Slot styles for resizable mode */\n :host([resizable]) ::slotted(*) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: block;\n }\n\n :host([resizable]) ::slotted(span),\n :host([resizable]) ::slotted(div),\n :host([resizable]) ::slotted(p) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: block;\n }\n`;\n\nexport const tableLayoutStyles = css`\n /* Apply fixed table layout only when resizable columns are present */\n .nile__table__body[resizable] {\n table-layout: fixed;\n }\n`; \n"]}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2025
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
/**
|
8
|
+
* Error handler specifically for virtualizer DOM manipulation errors
|
9
|
+
* Catches and ignores common virtualizer errors that occur during rapid updates
|
10
|
+
*/
|
11
|
+
export declare class VirtualizerErrorHandler {
|
12
|
+
private static isSetup;
|
13
|
+
private static originalConsoleError;
|
14
|
+
/**
|
15
|
+
* Sets up global error handling for virtualizer errors
|
16
|
+
* This should be called once during application initialization
|
17
|
+
*/
|
18
|
+
static setup(): void;
|
19
|
+
/**
|
20
|
+
* Restores original error handling
|
21
|
+
*/
|
22
|
+
static teardown(): void;
|
23
|
+
/**
|
24
|
+
* Checks if an error is a virtualizer DOM manipulation error that should be ignored
|
25
|
+
*/
|
26
|
+
static isVirtualizerError(error: any): boolean;
|
27
|
+
private static setupConsoleErrorHandler;
|
28
|
+
private static setupUnhandledErrorHandler;
|
29
|
+
private static setupUnhandledRejectionHandler;
|
30
|
+
}
|
@@ -0,0 +1,82 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2025
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
/**
|
8
|
+
* Error handler specifically for virtualizer DOM manipulation errors
|
9
|
+
* Catches and ignores common virtualizer errors that occur during rapid updates
|
10
|
+
*/
|
11
|
+
export class VirtualizerErrorHandler {
|
12
|
+
/**
|
13
|
+
* Sets up global error handling for virtualizer errors
|
14
|
+
* This should be called once during application initialization
|
15
|
+
*/
|
16
|
+
static setup() {
|
17
|
+
if (this.isSetup) {
|
18
|
+
return;
|
19
|
+
}
|
20
|
+
this.originalConsoleError = console.error;
|
21
|
+
this.setupConsoleErrorHandler();
|
22
|
+
this.setupUnhandledErrorHandler();
|
23
|
+
this.setupUnhandledRejectionHandler();
|
24
|
+
this.isSetup = true;
|
25
|
+
}
|
26
|
+
/**
|
27
|
+
* Restores original error handling
|
28
|
+
*/
|
29
|
+
static teardown() {
|
30
|
+
if (!this.isSetup) {
|
31
|
+
return;
|
32
|
+
}
|
33
|
+
if (this.originalConsoleError) {
|
34
|
+
console.error = this.originalConsoleError;
|
35
|
+
}
|
36
|
+
this.isSetup = false;
|
37
|
+
}
|
38
|
+
/**
|
39
|
+
* Checks if an error is a virtualizer DOM manipulation error that should be ignored
|
40
|
+
*/
|
41
|
+
static isVirtualizerError(error) {
|
42
|
+
const errorMessage = error?.message || error?.toString() || '';
|
43
|
+
return (errorMessage.includes('Cannot read properties of null (reading \'insertBefore\')') ||
|
44
|
+
errorMessage.includes('directive-helpers.ts:132') ||
|
45
|
+
errorMessage.includes('repeat.ts:416') ||
|
46
|
+
errorMessage.includes('virtualize.ts:139') ||
|
47
|
+
errorMessage.includes('Virtualizer.ts:816') ||
|
48
|
+
errorMessage.includes('Virtualizer.ts:546') ||
|
49
|
+
errorMessage.includes('Virtualizer.ts:617'));
|
50
|
+
}
|
51
|
+
static setupConsoleErrorHandler() {
|
52
|
+
console.error = (...args) => {
|
53
|
+
const errorMessage = args[0]?.toString() || '';
|
54
|
+
if (this.isVirtualizerError(errorMessage)) {
|
55
|
+
console.warn('Virtualizer DOM error caught and ignored:', ...args);
|
56
|
+
return;
|
57
|
+
}
|
58
|
+
// For all other errors, use the original console.error
|
59
|
+
this.originalConsoleError.apply(console, args);
|
60
|
+
};
|
61
|
+
}
|
62
|
+
static setupUnhandledErrorHandler() {
|
63
|
+
window.addEventListener('error', (event) => {
|
64
|
+
if (this.isVirtualizerError(event.error)) {
|
65
|
+
console.warn('Unhandled virtualizer error caught and ignored:', event.error);
|
66
|
+
event.preventDefault();
|
67
|
+
return false;
|
68
|
+
}
|
69
|
+
});
|
70
|
+
}
|
71
|
+
static setupUnhandledRejectionHandler() {
|
72
|
+
window.addEventListener('unhandledrejection', (event) => {
|
73
|
+
if (this.isVirtualizerError(event.reason)) {
|
74
|
+
console.warn('Unhandled virtualizer promise rejection caught and ignored:', event.reason);
|
75
|
+
event.preventDefault();
|
76
|
+
return false;
|
77
|
+
}
|
78
|
+
});
|
79
|
+
}
|
80
|
+
}
|
81
|
+
VirtualizerErrorHandler.isSetup = false;
|
82
|
+
//# sourceMappingURL=virtualizer-error-handler.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"virtualizer-error-handler.js","sourceRoot":"","sources":["../../../src/internal/virtualizer-error-handler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,OAAO,uBAAuB;IAIlC;;;OAGG;IACH,MAAM,CAAC,KAAK;QACV,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,OAAO;QACT,CAAC;QAED,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC,KAAK,CAAC;QAC1C,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAChC,IAAI,CAAC,0BAA0B,EAAE,CAAC;QAClC,IAAI,CAAC,8BAA8B,EAAE,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,QAAQ;QACb,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,OAAO;QACT,CAAC;QAED,IAAI,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC9B,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,oBAAoB,CAAC;QAC5C,CAAC;QACD,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,KAAU;QAClC,MAAM,YAAY,GAAG,KAAK,EAAE,OAAO,IAAI,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAC/D,OAAO,CACL,YAAY,CAAC,QAAQ,CAAC,2DAA2D,CAAC;YAClF,YAAY,CAAC,QAAQ,CAAC,0BAA0B,CAAC;YACjD,YAAY,CAAC,QAAQ,CAAC,eAAe,CAAC;YACtC,YAAY,CAAC,QAAQ,CAAC,mBAAmB,CAAC;YAC1C,YAAY,CAAC,QAAQ,CAAC,oBAAoB,CAAC;YAC3C,YAAY,CAAC,QAAQ,CAAC,oBAAoB,CAAC;YAC3C,YAAY,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAC5C,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,wBAAwB;QACrC,OAAO,CAAC,KAAK,GAAG,CAAC,GAAG,IAAW,EAAE,EAAE;YACjC,MAAM,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAE/C,IAAI,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,EAAE,CAAC;gBAC1C,OAAO,CAAC,IAAI,CAAC,2CAA2C,EAAE,GAAG,IAAI,CAAC,CAAC;gBACnE,OAAO;YACT,CAAC;YAED,uDAAuD;YACvD,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACjD,CAAC,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,0BAA0B;QACvC,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YACzC,IAAI,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;gBACzC,OAAO,CAAC,IAAI,CAAC,iDAAiD,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;gBAC7E,KAAK,CAAC,cAAc,EAAE,CAAC;gBACvB,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,MAAM,CAAC,8BAA8B;QAC3C,MAAM,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,CAAC,KAAK,EAAE,EAAE;YACtD,IAAI,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC1C,OAAO,CAAC,IAAI,CAAC,6DAA6D,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;gBAC1F,KAAK,CAAC,cAAc,EAAE,CAAC;gBACvB,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;;AAjFc,+BAAO,GAAG,KAAK,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\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\n/**\n * Error handler specifically for virtualizer DOM manipulation errors\n * Catches and ignores common virtualizer errors that occur during rapid updates\n */\nexport class VirtualizerErrorHandler {\n private static isSetup = false;\n private static originalConsoleError: typeof console.error;\n\n /**\n * Sets up global error handling for virtualizer errors\n * This should be called once during application initialization\n */\n static setup(): void {\n if (this.isSetup) {\n return;\n }\n\n this.originalConsoleError = console.error;\n this.setupConsoleErrorHandler();\n this.setupUnhandledErrorHandler();\n this.setupUnhandledRejectionHandler();\n this.isSetup = true;\n }\n\n /**\n * Restores original error handling\n */\n static teardown(): void {\n if (!this.isSetup) {\n return;\n }\n\n if (this.originalConsoleError) {\n console.error = this.originalConsoleError;\n }\n this.isSetup = false;\n }\n\n /**\n * Checks if an error is a virtualizer DOM manipulation error that should be ignored\n */\n static isVirtualizerError(error: any): boolean {\n const errorMessage = error?.message || error?.toString() || '';\n return (\n errorMessage.includes('Cannot read properties of null (reading \\'insertBefore\\')') ||\n errorMessage.includes('directive-helpers.ts:132') ||\n errorMessage.includes('repeat.ts:416') ||\n errorMessage.includes('virtualize.ts:139') ||\n errorMessage.includes('Virtualizer.ts:816') ||\n errorMessage.includes('Virtualizer.ts:546') ||\n errorMessage.includes('Virtualizer.ts:617')\n );\n }\n\n private static setupConsoleErrorHandler(): void {\n console.error = (...args: any[]) => {\n const errorMessage = args[0]?.toString() || '';\n \n if (this.isVirtualizerError(errorMessage)) {\n console.warn('Virtualizer DOM error caught and ignored:', ...args);\n return;\n }\n \n // For all other errors, use the original console.error\n this.originalConsoleError.apply(console, args);\n };\n }\n\n private static setupUnhandledErrorHandler(): void {\n window.addEventListener('error', (event) => {\n if (this.isVirtualizerError(event.error)) {\n console.warn('Unhandled virtualizer error caught and ignored:', event.error);\n event.preventDefault();\n return false;\n }\n });\n }\n\n private static setupUnhandledRejectionHandler(): void {\n window.addEventListener('unhandledrejection', (event) => {\n if (this.isVirtualizerError(event.reason)) {\n console.warn('Unhandled virtualizer promise rejection caught and ignored:', event.reason);\n event.preventDefault();\n return false;\n }\n });\n }\n}\n"]}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2025
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
export { virtualize, createVirtualizer, type VirtualizeOptions } from './virtualize.js';
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2025
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
export { virtualize, createVirtualizer } from './virtualize.js';
|
8
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAA0B,MAAM,iBAAiB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\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\nexport { virtualize, createVirtualizer, type VirtualizeOptions } from './virtualize.js';\n"]}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2025
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
import { type TemplateResult } from 'lit';
|
8
|
+
export interface VirtualizeOptions {
|
9
|
+
items: any[];
|
10
|
+
renderItem: (item: any, index: number) => TemplateResult;
|
11
|
+
scroller?: boolean;
|
12
|
+
itemHeight?: number;
|
13
|
+
containerHeight?: number;
|
14
|
+
overscan?: number;
|
15
|
+
}
|
16
|
+
/**
|
17
|
+
* Custom virtualize function that mimics the @lit-labs/virtualizer API
|
18
|
+
* but uses our own implementation for better control and customization
|
19
|
+
*/
|
20
|
+
export declare function virtualize(options: VirtualizeOptions): TemplateResult;
|
21
|
+
/**
|
22
|
+
* Enhanced virtualize function with better performance and scroll handling
|
23
|
+
*/
|
24
|
+
export declare function createVirtualizer(options: VirtualizeOptions): {
|
25
|
+
handleScroll: (e: Event) => void;
|
26
|
+
getVisibleRange: () => {
|
27
|
+
start: number;
|
28
|
+
end: number;
|
29
|
+
};
|
30
|
+
getTotalHeight: () => number;
|
31
|
+
scrollToItem: (index: number, container: HTMLElement) => void;
|
32
|
+
};
|
@@ -0,0 +1,105 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2025
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
import { html } from 'lit';
|
8
|
+
/**
|
9
|
+
* Custom virtualize function that mimics the @lit-labs/virtualizer API
|
10
|
+
* but uses our own implementation for better control and customization
|
11
|
+
*/
|
12
|
+
export function virtualize(options) {
|
13
|
+
const { items = [], renderItem, scroller = true, itemHeight = 40, containerHeight = 300, overscan = 5 } = options;
|
14
|
+
// If no items, return empty template
|
15
|
+
if (!items.length) {
|
16
|
+
return html ``;
|
17
|
+
}
|
18
|
+
// For small datasets, render all items without virtualization
|
19
|
+
if (items.length < 10) {
|
20
|
+
return html `
|
21
|
+
${items.map((item, index) => renderItem(item, index))}
|
22
|
+
`;
|
23
|
+
}
|
24
|
+
// Create a unique ID for this virtualizer instance
|
25
|
+
const virtualizerId = `virtualizer-${Math.random().toString(36).substr(2, 9)}`;
|
26
|
+
return html `
|
27
|
+
<div
|
28
|
+
id="${virtualizerId}"
|
29
|
+
class="custom-virtualizer"
|
30
|
+
style="
|
31
|
+
height: ${containerHeight}px;
|
32
|
+
overflow-y: auto;
|
33
|
+
position: relative;
|
34
|
+
contain: layout style paint;
|
35
|
+
"
|
36
|
+
@scroll=${(e) => {
|
37
|
+
const container = e.target;
|
38
|
+
const scrollTop = container.scrollTop;
|
39
|
+
// Calculate visible range
|
40
|
+
const start = Math.max(0, Math.floor(scrollTop / itemHeight) - overscan);
|
41
|
+
const end = Math.min(start + Math.ceil(containerHeight / itemHeight) + (overscan * 2), items.length);
|
42
|
+
// Update the virtualized content
|
43
|
+
updateVirtualizedContent(container, items, renderItem, start, end, itemHeight);
|
44
|
+
}}
|
45
|
+
>
|
46
|
+
${(() => {
|
47
|
+
// Initial render - show first visible items
|
48
|
+
const start = 0;
|
49
|
+
const end = Math.min(Math.ceil(containerHeight / itemHeight) + (overscan * 2), items.length);
|
50
|
+
return html `
|
51
|
+
${updateVirtualizedContent(null, items, renderItem, start, end, itemHeight)}
|
52
|
+
`;
|
53
|
+
})()}
|
54
|
+
</div>
|
55
|
+
`;
|
56
|
+
}
|
57
|
+
/**
|
58
|
+
* Update the virtualized content based on scroll position
|
59
|
+
*/
|
60
|
+
function updateVirtualizedContent(container, items, renderItem, start, end, itemHeight) {
|
61
|
+
const visibleItems = items.slice(start, end);
|
62
|
+
const spacerBefore = start * itemHeight;
|
63
|
+
const spacerAfter = (items.length - end) * itemHeight;
|
64
|
+
return html `
|
65
|
+
${spacerBefore > 0 ? html `<div style="height: ${spacerBefore}px; flex-shrink: 0;"></div>` : ''}
|
66
|
+
${visibleItems.map((item, index) => html `<div style="height: ${itemHeight}px; flex-shrink: 0;">${renderItem(item, start + index)}</div>`)}
|
67
|
+
${spacerAfter > 0 ? html `<div style="height: ${spacerAfter}px; flex-shrink: 0;"></div>` : ''}
|
68
|
+
`;
|
69
|
+
}
|
70
|
+
/**
|
71
|
+
* Enhanced virtualize function with better performance and scroll handling
|
72
|
+
*/
|
73
|
+
export function createVirtualizer(options) {
|
74
|
+
const { items = [], renderItem, scroller = true, itemHeight = 40, containerHeight = 300, overscan = 5 } = options;
|
75
|
+
let scrollTop = 0;
|
76
|
+
let isScrolling = false;
|
77
|
+
let scrollTimeout;
|
78
|
+
const handleScroll = (e) => {
|
79
|
+
const container = e.target;
|
80
|
+
scrollTop = container.scrollTop;
|
81
|
+
isScrolling = true;
|
82
|
+
// Debounce scroll end detection
|
83
|
+
if (scrollTimeout) {
|
84
|
+
clearTimeout(scrollTimeout);
|
85
|
+
}
|
86
|
+
scrollTimeout = setTimeout(() => {
|
87
|
+
isScrolling = false;
|
88
|
+
}, 150);
|
89
|
+
};
|
90
|
+
return {
|
91
|
+
handleScroll,
|
92
|
+
getVisibleRange: () => {
|
93
|
+
const start = Math.max(0, Math.floor(scrollTop / itemHeight) - overscan);
|
94
|
+
const end = Math.min(start + Math.ceil(containerHeight / itemHeight) + (overscan * 2), items.length);
|
95
|
+
return { start, end };
|
96
|
+
},
|
97
|
+
getTotalHeight: () => items.length * itemHeight,
|
98
|
+
scrollToItem: (index, container) => {
|
99
|
+
const scrollPosition = index * itemHeight;
|
100
|
+
container.scrollTop = scrollPosition;
|
101
|
+
scrollTop = scrollPosition;
|
102
|
+
}
|
103
|
+
};
|
104
|
+
}
|
105
|
+
//# sourceMappingURL=virtualize.js.map
|