@actabldesign/bellhop-core 0.0.3 → 0.0.4
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 +1 -1
- package/dist/bellhop-core/bellhop-core.esm.js +2 -0
- package/dist/bellhop-core/bellhop-core.esm.js.map +1 -0
- package/dist/bellhop-core/bh-accordion-item.entry.esm.js.map +1 -0
- package/dist/bellhop-core/bh-button.bh-loader-spinner.entry.esm.js.map +1 -0
- package/dist/bellhop-core/bh-checkbox.bh-radio-button.entry.esm.js.map +1 -0
- package/dist/bellhop-core/bh-data-grid.entry.esm.js.map +1 -0
- package/dist/bellhop-core/bh-date-picker-content.entry.esm.js.map +1 -0
- package/dist/bellhop-core/bh-date-picker.entry.esm.js.map +1 -0
- package/dist/bellhop-core/bh-dropdown.bh-logo-box.bh-nav-item.entry.esm.js.map +1 -0
- package/dist/bellhop-core/bh-empty-state.bh-pagination.bh-skeleton-loader.entry.esm.js.map +1 -0
- package/dist/bellhop-core/bh-input-text.bh-picker-menu.entry.esm.js.map +1 -0
- package/dist/bellhop-core/index.esm.js +2 -0
- package/dist/bellhop-core/index.esm.js.map +1 -0
- package/dist/bellhop-core/p-03e93cd8.entry.js +2 -0
- package/dist/bellhop-core/p-0438e0a9.entry.js +2 -0
- package/dist/bellhop-core/p-086e8c86.entry.js +2 -0
- package/dist/bellhop-core/p-09f3464e.entry.js +2 -0
- package/dist/bellhop-core/p-10967cab.entry.js +2 -0
- package/dist/bellhop-core/p-10967cab.entry.js.map +1 -0
- package/dist/bellhop-core/p-20d680ce.entry.js +2 -0
- package/dist/bellhop-core/p-2310cb6e.entry.js +13 -0
- package/dist/bellhop-core/p-2310cb6e.entry.js.map +1 -0
- package/dist/bellhop-core/p-239c7e6b.entry.js +2 -0
- package/dist/bellhop-core/p-23b74b40.entry.js +2 -0
- package/dist/bellhop-core/p-2c796978.entry.js +2 -0
- package/dist/bellhop-core/p-356a2ed7.entry.js +2 -0
- package/dist/bellhop-core/p-363dce47.entry.js +2 -0
- package/dist/bellhop-core/p-3719852a.entry.js +2 -0
- package/dist/bellhop-core/p-44241bad.entry.js +2 -0
- package/dist/bellhop-core/p-496fca9b.entry.js +2 -0
- package/dist/bellhop-core/p-496fca9b.entry.js.map +1 -0
- package/dist/bellhop-core/p-4a14cbb5.entry.js +2 -0
- package/dist/bellhop-core/p-52e877e0.entry.js +2 -0
- package/dist/bellhop-core/p-56b857f5.entry.js +2 -0
- package/dist/bellhop-core/p-5760ce66.entry.js +2 -0
- package/dist/bellhop-core/p-57ac382d.entry.js +2 -0
- package/dist/bellhop-core/p-58879213.entry.js +2 -0
- package/dist/bellhop-core/p-5ab50add.entry.js +2 -0
- package/dist/bellhop-core/p-6433b0a7.entry.js +2 -0
- package/dist/bellhop-core/p-67452ed0.entry.js +2 -0
- package/dist/bellhop-core/p-686dea4a.entry.js +2 -0
- package/dist/bellhop-core/p-69f85850.entry.js +2 -0
- package/dist/bellhop-core/p-70ee270c.entry.js +2 -0
- package/dist/bellhop-core/p-859f45da.entry.js +2 -0
- package/dist/bellhop-core/p-860be0be.entry.js +2 -0
- package/dist/bellhop-core/p-870fc023.entry.js +2 -0
- package/dist/bellhop-core/p-87fb26a0.entry.js +2 -0
- package/dist/bellhop-core/p-8981025c.entry.js +2 -0
- package/dist/bellhop-core/p-8981025c.entry.js.map +1 -0
- package/dist/bellhop-core/p-90b9047d.entry.js +2 -0
- package/dist/bellhop-core/p-94d2d599.entry.js +2 -0
- package/dist/bellhop-core/p-9a585c1a.entry.js +2 -0
- package/dist/bellhop-core/p-CIj6YHfo.js +2 -0
- package/dist/bellhop-core/p-CIj6YHfo.js.map +1 -0
- package/dist/bellhop-core/p-DXAL-jSE.js +3 -0
- package/dist/bellhop-core/p-DXAL-jSE.js.map +1 -0
- package/dist/bellhop-core/p-DshiN5nT.js +2 -0
- package/dist/bellhop-core/p-DshiN5nT.js.map +1 -0
- package/dist/bellhop-core/p-I9CPXdBF.js +2 -0
- package/dist/bellhop-core/p-I9CPXdBF.js.map +1 -0
- package/dist/bellhop-core/p-ab2b037c.entry.js +2 -0
- package/dist/bellhop-core/p-ab9c5351.entry.js +2 -0
- package/dist/bellhop-core/p-abe24947.entry.js +2 -0
- package/dist/bellhop-core/p-adcd2e15.entry.js +2 -0
- package/dist/bellhop-core/p-afd0e309.entry.js +2 -0
- package/dist/bellhop-core/p-b1cb34e9.entry.js +2 -0
- package/dist/bellhop-core/p-b546cd23.entry.js +2 -0
- package/dist/bellhop-core/p-b546cd23.entry.js.map +1 -0
- package/dist/bellhop-core/p-b7801d25.entry.js +2 -0
- package/dist/bellhop-core/p-b7801d25.entry.js.map +1 -0
- package/dist/bellhop-core/p-c8fb7f34.entry.js +2 -0
- package/dist/bellhop-core/p-c8fb7f34.entry.js.map +1 -0
- package/dist/bellhop-core/p-cdd593fb.entry.js +2 -0
- package/dist/bellhop-core/p-d4bfd30d.entry.js +2 -0
- package/dist/bellhop-core/p-dcaa20e2.entry.js +2 -0
- package/dist/bellhop-core/p-dd43d560.entry.js +2 -0
- package/dist/bellhop-core/p-e190ac50.entry.js +2 -0
- package/dist/bellhop-core/p-e86780b6.entry.js +2 -0
- package/dist/bellhop-core/p-e99bc91a.entry.js +2 -0
- package/dist/bellhop-core/p-e9ed7c17.entry.js +2 -0
- package/dist/bellhop-core/p-ef47dcd1.entry.js +2 -0
- package/dist/bellhop-core/p-f5468da0.entry.js +2 -0
- package/dist/bellhop-core/p-f5468da0.entry.js.map +1 -0
- package/dist/bellhop-core/p-f6e1b47c.entry.js +2 -0
- package/dist/bellhop-core/p-f7c7416d.entry.js +2 -0
- package/dist/cjs/bellhop-core.cjs.js +25 -0
- package/dist/cjs/bellhop-core.cjs.js.map +1 -0
- package/dist/cjs/bh-accordion-item.cjs.entry.js +82 -0
- package/dist/cjs/bh-accordion-item.entry.cjs.js.map +1 -0
- package/dist/cjs/bh-accordion.cjs.entry.js +119 -0
- package/dist/cjs/bh-appbar.cjs.entry.js +83 -0
- package/dist/cjs/bh-autocomplete-menu_2.cjs.entry.js +177 -0
- package/dist/cjs/bh-avatar-add.cjs.entry.js +75 -0
- package/dist/cjs/bh-avatar-stacked.cjs.entry.js +94 -0
- package/dist/cjs/bh-avatar.cjs.entry.js +93 -0
- package/dist/cjs/bh-badge-dot_2.cjs.entry.js +134 -0
- package/dist/cjs/bh-badge.cjs.entry.js +71 -0
- package/dist/cjs/bh-bar-chart.cjs.entry.js +164 -0
- package/dist/cjs/bh-button-CKYE8jYL.js +117 -0
- package/dist/cjs/bh-button-CKYE8jYL.js.map +1 -0
- package/dist/cjs/bh-button-icon.cjs.entry.js +74 -0
- package/dist/cjs/bh-button.bh-loader-spinner.entry.cjs.js.map +1 -0
- package/dist/cjs/bh-button_2.cjs.entry.js +47 -0
- package/dist/cjs/bh-card-footer.cjs.entry.js +30 -0
- package/dist/cjs/bh-card-header.cjs.entry.js +74 -0
- package/dist/cjs/bh-card.cjs.entry.js +48 -0
- package/dist/cjs/bh-chart-tooltip.cjs.entry.js +57 -0
- package/dist/cjs/bh-checkbox-group-item.cjs.entry.js +142 -0
- package/dist/cjs/bh-checkbox-group.cjs.entry.js +100 -0
- package/dist/cjs/bh-checkbox.bh-radio-button.entry.cjs.js.map +1 -0
- package/dist/cjs/bh-checkbox_2.cjs.entry.js +267 -0
- package/dist/cjs/bh-container-footer.cjs.entry.js +38 -0
- package/dist/cjs/bh-container.cjs.entry.js +26 -0
- package/dist/cjs/bh-data-grid.cjs.entry.js +4230 -0
- package/dist/cjs/bh-data-grid.entry.cjs.js.map +1 -0
- package/dist/cjs/bh-date-picker-content.cjs.entry.js +370 -0
- package/dist/cjs/bh-date-picker-content.entry.cjs.js.map +1 -0
- package/dist/cjs/bh-date-picker.cjs.entry.js +173 -0
- package/dist/cjs/bh-date-picker.entry.cjs.js.map +1 -0
- package/dist/cjs/bh-date-range-picker-content.cjs.entry.js +151 -0
- package/dist/cjs/bh-date-range-picker.cjs.entry.js +167 -0
- package/dist/cjs/bh-dropdown-menu.cjs.entry.js +114 -0
- package/dist/cjs/bh-dropdown.bh-logo-box.bh-nav-item.entry.cjs.js.map +1 -0
- package/dist/cjs/bh-dropdown_3.cjs.entry.js +1887 -0
- package/dist/cjs/bh-empty-state.bh-pagination.bh-skeleton-loader.entry.cjs.js.map +1 -0
- package/dist/cjs/bh-empty-state_3.cjs.entry.js +115 -0
- package/dist/cjs/bh-featured-icon.cjs.entry.js +41 -0
- package/dist/cjs/bh-illustrations.cjs.entry.js +65 -0
- package/dist/cjs/bh-input-autocomplete.cjs.entry.js +342 -0
- package/dist/cjs/bh-input-number.cjs.entry.js +307 -0
- package/dist/cjs/bh-input-password.cjs.entry.js +182 -0
- package/dist/cjs/bh-input-text.bh-picker-menu.entry.cjs.js.map +1 -0
- package/dist/cjs/bh-input-text_2.cjs.entry.js +347 -0
- package/dist/cjs/bh-input-verification.cjs.entry.js +203 -0
- package/dist/cjs/bh-label-DRC8k-B9.js +110 -0
- package/dist/cjs/bh-label-DRC8k-B9.js.map +1 -0
- package/dist/cjs/bh-label_2.cjs.entry.js +48 -0
- package/dist/cjs/bh-modal-actions.cjs.entry.js +66 -0
- package/dist/cjs/bh-modal-header.cjs.entry.js +76 -0
- package/dist/cjs/bh-modal.cjs.entry.js +56 -0
- package/dist/cjs/bh-month-picker-content.cjs.entry.js +189 -0
- package/dist/cjs/bh-month-picker.cjs.entry.js +152 -0
- package/dist/cjs/bh-notification.cjs.entry.js +128 -0
- package/dist/cjs/bh-page-navigation-child.cjs.entry.js +48 -0
- package/dist/cjs/bh-page-navigation-multi-level_2.cjs.entry.js +146 -0
- package/dist/cjs/bh-page-navigation.cjs.entry.js +72 -0
- package/dist/cjs/bh-pagination-BJ1azyCc.js +152 -0
- package/dist/cjs/bh-pagination-BJ1azyCc.js.map +1 -0
- package/dist/cjs/bh-pie-chart.cjs.entry.js +157 -0
- package/dist/cjs/bh-popover.cjs.entry.js +100 -0
- package/dist/cjs/bh-product-switcher.cjs.entry.js +102 -0
- package/dist/cjs/bh-property-switcher.cjs.entry.js +231 -0
- package/dist/cjs/bh-sidebar.cjs.entry.js +110 -0
- package/dist/cjs/bh-tab-item.cjs.entry.js +54 -0
- package/dist/cjs/bh-tabs.cjs.entry.js +52 -0
- package/dist/cjs/bh-textarea.cjs.entry.js +161 -0
- package/dist/cjs/bh-toggle.cjs.entry.js +141 -0
- package/dist/cjs/bh-trend-chart.cjs.entry.js +121 -0
- package/dist/cjs/index-BVJ_Kket.js +1959 -0
- package/dist/cjs/index-BVJ_Kket.js.map +1 -0
- package/dist/cjs/index.cjs.js +34 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/collection/collection-manifest.json +78 -0
- package/dist/collection/components/bh-accordion/bh-accordion.js +227 -0
- package/dist/collection/components/bh-accordion-item/bh-accordion-item.css +119 -0
- package/dist/collection/components/bh-accordion-item/bh-accordion-item.js +207 -0
- package/dist/collection/components/bh-appbar/bh-appbar.js +270 -0
- package/dist/collection/components/bh-autocomplete-menu/bh-autocomplete-menu.js +301 -0
- package/dist/collection/components/bh-avatar/bh-avatar.js +266 -0
- package/dist/collection/components/bh-avatar-add/bh-avatar-add.js +194 -0
- package/dist/collection/components/bh-avatar-stacked/bh-avatar-stacked.js +211 -0
- package/dist/collection/components/bh-badge/bh-badge.js +250 -0
- package/dist/collection/components/bh-badge-dot/bh-badge-dot.js +113 -0
- package/dist/collection/components/bh-bar-chart/bh-bar-chart.css +363 -0
- package/dist/collection/components/bh-bar-chart/bh-bar-chart.js +316 -0
- package/dist/collection/components/bh-breadcrumbs/bh-breadcrumbs.js +231 -0
- package/dist/collection/components/bh-button/bh-button.js +350 -0
- package/dist/collection/components/bh-button-icon/bh-button-icon.js +259 -0
- package/dist/collection/components/bh-card/bh-card.js +139 -0
- package/dist/collection/components/bh-card-footer/bh-card-footer.js +81 -0
- package/dist/collection/components/bh-card-header/bh-card-header.js +348 -0
- package/dist/collection/components/bh-chart-tooltip/bh-chart-tooltip.css +301 -0
- package/dist/collection/components/bh-chart-tooltip/bh-chart-tooltip.js +226 -0
- package/dist/collection/components/bh-checkbox/bh-checkbox.js +383 -0
- package/dist/collection/components/bh-checkbox/bh-checkbox.js.map +1 -0
- package/dist/collection/components/bh-checkbox-group/bh-checkbox-group.js +218 -0
- package/dist/collection/components/bh-checkbox-group-item/bh-checkbox-group-item.js +402 -0
- package/dist/collection/components/bh-container/bh-container.js +51 -0
- package/dist/collection/components/bh-container-footer/bh-container-footer.js +106 -0
- package/dist/collection/components/bh-data-grid/bh-data-grid.css +610 -0
- package/dist/collection/components/bh-data-grid/bh-data-grid.js +1933 -0
- package/dist/collection/components/bh-data-grid/bh-data-grid.js.map +1 -0
- package/dist/collection/components/bh-data-grid/bh-data-grid.types.js +2 -0
- package/dist/collection/components/bh-data-grid/bh-data-grid.types.js.map +1 -0
- package/dist/collection/components/bh-date-picker/bh-date-picker.css +251 -0
- package/dist/collection/components/bh-date-picker/bh-date-picker.js +485 -0
- package/dist/collection/components/bh-date-picker-content/bh-date-picker-content.css +541 -0
- package/dist/collection/components/bh-date-picker-content/bh-date-picker-content.js +711 -0
- package/dist/collection/components/bh-date-range-picker/bh-date-range-picker.css +247 -0
- package/dist/collection/components/bh-date-range-picker/bh-date-range-picker.js +528 -0
- package/dist/collection/components/bh-date-range-picker-content/bh-date-range-picker-content.css +275 -0
- package/dist/collection/components/bh-date-range-picker-content/bh-date-range-picker-content.js +338 -0
- package/dist/collection/components/bh-dropdown/bh-dropdown.css +51 -0
- package/dist/collection/components/bh-dropdown/bh-dropdown.js +569 -0
- package/dist/collection/components/bh-dropdown/bh-dropdown.js.map +1 -0
- package/dist/collection/components/bh-dropdown-menu/bh-dropdown-menu.js +262 -0
- package/dist/collection/components/bh-empty-state/bh-empty-state.js +306 -0
- package/dist/collection/components/bh-featured-icon/bh-featured-icon.js +144 -0
- package/dist/collection/components/bh-illustrations/bh-illustrations.css +328 -0
- package/dist/collection/components/bh-illustrations/bh-illustrations.js +174 -0
- package/dist/collection/components/bh-input-autocomplete/bh-input-autocomplete.css +301 -0
- package/dist/collection/components/bh-input-autocomplete/bh-input-autocomplete.js +872 -0
- package/dist/collection/components/bh-input-number/bh-input-number.js +818 -0
- package/dist/collection/components/bh-input-password/bh-input-password.js +581 -0
- package/dist/collection/components/bh-input-text/bh-input-text.js +696 -0
- package/dist/collection/components/bh-input-verification/bh-input-verification.js +523 -0
- package/dist/collection/components/bh-label/bh-label.js +302 -0
- package/dist/collection/components/bh-loader-spinner/bh-loader-spinner.css +153 -0
- package/dist/collection/components/bh-loader-spinner/bh-loader-spinner.js +182 -0
- package/dist/collection/components/bh-logo-box/bh-logo-box.js +229 -0
- package/dist/collection/components/bh-logo-box/bh-logo-box.js.map +1 -0
- package/dist/collection/components/bh-modal/bh-modal.js +144 -0
- package/dist/collection/components/bh-modal-actions/bh-modal-actions.js +208 -0
- package/dist/collection/components/bh-modal-header/bh-modal-header.js +275 -0
- package/dist/collection/components/bh-month-picker/bh-month-picker.css +251 -0
- package/dist/collection/components/bh-month-picker/bh-month-picker.js +444 -0
- package/dist/collection/components/bh-month-picker-content/bh-month-picker-content.css +406 -0
- package/dist/collection/components/bh-month-picker-content/bh-month-picker-content.js +437 -0
- package/dist/collection/components/bh-notification/bh-notification.js +324 -0
- package/dist/collection/components/bh-page-navigation/bh-page-navigation.css +253 -0
- package/dist/collection/components/bh-page-navigation/bh-page-navigation.js +146 -0
- package/dist/collection/components/bh-page-navigation-child/bh-page-navigation-child.css +281 -0
- package/dist/collection/components/bh-page-navigation-child/bh-page-navigation-child.js +148 -0
- package/dist/collection/components/bh-page-navigation-multi-level/bh-page-navigation-multi-level.css +372 -0
- package/dist/collection/components/bh-page-navigation-multi-level/bh-page-navigation-multi-level.js +268 -0
- package/dist/collection/components/bh-page-navigation-single-level/bh-page-navigation-single-level.js +126 -0
- package/dist/collection/components/bh-pagination/bh-pagination.css +244 -0
- package/dist/collection/components/bh-pagination/bh-pagination.js +448 -0
- package/dist/collection/components/bh-pagination/bh-pagination.js.map +1 -0
- package/dist/collection/components/bh-picker-menu/bh-picker-menu.css +284 -0
- package/dist/collection/components/bh-pie-chart/bh-pie-chart.css +292 -0
- package/dist/collection/components/bh-pie-chart/bh-pie-chart.js +280 -0
- package/dist/collection/components/bh-popover/bh-popover.js +326 -0
- package/dist/collection/components/bh-product-switcher/bh-product-switcher.js +226 -0
- package/dist/collection/components/bh-property-switcher/bh-property-switcher.js +360 -0
- package/dist/collection/components/bh-radio-button/bh-radio-button.js +292 -0
- package/dist/collection/components/bh-sidebar/bh-nav-item.js +157 -0
- package/dist/collection/components/bh-sidebar/bh-sidebar.js +344 -0
- package/dist/collection/components/bh-skeleton-loader/bh-skeleton-loader.js +99 -0
- package/dist/collection/components/bh-tab-item/bh-tab-item.js +158 -0
- package/dist/collection/components/bh-tabs/bh-tabs.js +178 -0
- package/dist/collection/components/bh-tag/bh-tag.js +238 -0
- package/dist/collection/components/bh-textarea/bh-textarea.js +569 -0
- package/dist/collection/components/bh-toggle/bh-toggle.js +369 -0
- package/dist/collection/components/bh-tooltip/bh-tooltip.js +162 -0
- package/dist/collection/components/bh-trend-chart/bh-trend-chart.css +299 -0
- package/dist/collection/components/bh-trend-chart/bh-trend-chart.js +256 -0
- package/dist/collection/index.js +24 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/components/bh-accordion-item.js +111 -0
- package/dist/components/bh-accordion-item.js.map +1 -0
- package/dist/components/bh-accordion.js +147 -0
- package/dist/components/bh-appbar.js +128 -0
- package/dist/components/bh-autocomplete-menu.js +9 -0
- package/dist/components/bh-avatar-add.js +9 -0
- package/dist/components/bh-avatar-stacked.js +141 -0
- package/dist/components/bh-avatar.js +9 -0
- package/dist/components/bh-badge-dot.js +9 -0
- package/dist/components/bh-badge.js +9 -0
- package/dist/components/bh-bar-chart.js +205 -0
- package/dist/components/bh-breadcrumbs.js +9 -0
- package/dist/components/bh-button-icon.js +9 -0
- package/dist/components/bh-button.js +9 -0
- package/dist/components/bh-card-footer.js +9 -0
- package/dist/components/bh-card-header.js +9 -0
- package/dist/components/bh-card.js +9 -0
- package/dist/components/bh-chart-tooltip.js +9 -0
- package/dist/components/bh-checkbox-group-item.js +9 -0
- package/dist/components/bh-checkbox-group.js +9 -0
- package/dist/components/bh-checkbox.js +9 -0
- package/dist/components/bh-container-footer.js +74 -0
- package/dist/components/bh-container.js +49 -0
- package/dist/components/bh-data-grid.js +9 -0
- package/dist/components/bh-date-picker-content.js +9 -0
- package/dist/components/bh-date-picker.js +267 -0
- package/dist/components/bh-date-picker.js.map +1 -0
- package/dist/components/bh-date-range-picker-content.js +9 -0
- package/dist/components/bh-date-range-picker.js +269 -0
- package/dist/components/bh-dropdown-menu.js +9 -0
- package/dist/components/bh-dropdown.js +9 -0
- package/dist/components/bh-empty-state.js +9 -0
- package/dist/components/bh-featured-icon.js +9 -0
- package/dist/components/bh-illustrations.js +92 -0
- package/dist/components/bh-input-autocomplete.js +433 -0
- package/dist/components/bh-input-number.js +370 -0
- package/dist/components/bh-input-password.js +229 -0
- package/dist/components/bh-input-text.js +9 -0
- package/dist/components/bh-input-verification.js +255 -0
- package/dist/components/bh-label.js +9 -0
- package/dist/components/bh-loader-spinner.js +9 -0
- package/dist/components/bh-logo-box.js +9 -0
- package/dist/components/bh-modal-actions.js +105 -0
- package/dist/components/bh-modal-header.js +119 -0
- package/dist/components/bh-modal.js +9 -0
- package/dist/components/bh-month-picker-content.js +9 -0
- package/dist/components/bh-month-picker.js +233 -0
- package/dist/components/bh-nav-item.js +9 -0
- package/dist/components/bh-notification.js +175 -0
- package/dist/components/bh-page-navigation-child.js +9 -0
- package/dist/components/bh-page-navigation-multi-level.js +9 -0
- package/dist/components/bh-page-navigation-single-level.js +9 -0
- package/dist/components/bh-page-navigation.js +129 -0
- package/dist/components/bh-pagination.d.ts +11 -0
- package/dist/components/bh-pagination.js +9 -0
- package/dist/components/bh-pagination.js.map +1 -0
- package/dist/components/bh-picker-menu.js +9 -0
- package/dist/components/bh-pie-chart.js +194 -0
- package/dist/components/bh-popover.js +131 -0
- package/dist/components/bh-product-switcher.js +9 -0
- package/dist/components/bh-property-switcher.js +261 -0
- package/dist/components/bh-radio-button.js +9 -0
- package/dist/components/bh-sidebar.js +195 -0
- package/dist/components/bh-skeleton-loader.js +9 -0
- package/dist/components/bh-skeleton-loader.js.map +1 -0
- package/dist/components/bh-tab-item.js +80 -0
- package/dist/components/bh-tabs.js +78 -0
- package/dist/components/bh-tag.js +9 -0
- package/dist/components/bh-textarea.js +207 -0
- package/dist/components/bh-toggle.js +9 -0
- package/dist/components/bh-tooltip.js +9 -0
- package/dist/components/bh-trend-chart.js +149 -0
- package/dist/components/index.js +17 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/p-5LJWVh2v.js +70 -0
- package/dist/components/p-5LJWVh2v.js.map +1 -0
- package/dist/components/p-B2edfvL2.js +71 -0
- package/dist/components/p-B2edfvL2.js.map +1 -0
- package/dist/components/p-B7eVYv2t.js +100 -0
- package/dist/components/p-B7eVYv2t.js.map +1 -0
- package/dist/components/p-B8MWhPHT.js +153 -0
- package/dist/components/p-B8MWhPHT.js.map +1 -0
- package/dist/components/p-BFhwq3_y.js +149 -0
- package/dist/components/p-BFhwq3_y.js.map +1 -0
- package/dist/components/p-BNeBcvHu.js +123 -0
- package/dist/components/p-BNeBcvHu.js.map +1 -0
- package/dist/components/p-BOk69MBi.js +123 -0
- package/dist/components/p-BOk69MBi.js.map +1 -0
- package/dist/components/p-BZELvMID.js +158 -0
- package/dist/components/p-BZELvMID.js.map +1 -0
- package/dist/components/p-BaLh9-zk.js +56 -0
- package/dist/components/p-BaLh9-zk.js.map +1 -0
- package/dist/components/p-BpXkE6y8.js +97 -0
- package/dist/components/p-BpXkE6y8.js.map +1 -0
- package/dist/components/p-Bs2Z3XIQ.js +241 -0
- package/dist/components/p-Bs2Z3XIQ.js.map +1 -0
- package/dist/components/p-C69LfZib.js +189 -0
- package/dist/components/p-C69LfZib.js.map +1 -0
- package/dist/components/p-C97e5uAI.js +132 -0
- package/dist/components/p-C97e5uAI.js.map +1 -0
- package/dist/components/p-CK89kJIU.js +125 -0
- package/dist/components/p-CK89kJIU.js.map +1 -0
- package/dist/components/p-CMomxDPL.js +118 -0
- package/dist/components/p-CMomxDPL.js.map +1 -0
- package/dist/components/p-CWGpUs1b.js +84 -0
- package/dist/components/p-CWGpUs1b.js.map +1 -0
- package/dist/components/p-CbeeTFys.js +183 -0
- package/dist/components/p-CbeeTFys.js.map +1 -0
- package/dist/components/p-Ccq-Rk5W.js +204 -0
- package/dist/components/p-Ccq-Rk5W.js.map +1 -0
- package/dist/components/p-CePuvH9t.js +1797 -0
- package/dist/components/p-CePuvH9t.js.map +1 -0
- package/dist/components/p-ChfLhYiJ.js +1474 -0
- package/dist/components/p-ChfLhYiJ.js.map +1 -0
- package/dist/components/p-Cu6Uuaq7.js +92 -0
- package/dist/components/p-Cu6Uuaq7.js.map +1 -0
- package/dist/components/p-D-RHfFhc.js +4357 -0
- package/dist/components/p-D-RHfFhc.js.map +1 -0
- package/dist/components/p-D6w8lxZi.js +67 -0
- package/dist/components/p-D6w8lxZi.js.map +1 -0
- package/dist/components/p-DAp7fLS-.js +124 -0
- package/dist/components/p-DAp7fLS-.js.map +1 -0
- package/dist/components/p-DIeMf4U9.js +213 -0
- package/dist/components/p-DIeMf4U9.js.map +1 -0
- package/dist/components/p-DK92X9HV.js +51 -0
- package/dist/components/p-DK92X9HV.js.map +1 -0
- package/dist/components/p-DOaC_o63.js +434 -0
- package/dist/components/p-DOaC_o63.js.map +1 -0
- package/dist/components/p-DQUicoqi.js +64 -0
- package/dist/components/p-DQUicoqi.js.map +1 -0
- package/dist/components/p-DURWm67o.js +78 -0
- package/dist/components/p-DURWm67o.js.map +1 -0
- package/dist/components/p-DW54267I.js +214 -0
- package/dist/components/p-DW54267I.js.map +1 -0
- package/dist/components/p-DcoR-p0a.js +58 -0
- package/dist/components/p-DcoR-p0a.js.map +1 -0
- package/dist/components/p-Df5drD7C.js +78 -0
- package/dist/components/p-Df5drD7C.js.map +1 -0
- package/dist/components/p-DkGh2r0W.js +70 -0
- package/dist/components/p-DkGh2r0W.js.map +1 -0
- package/dist/components/p-Dm3E-tB8.js +154 -0
- package/dist/components/p-Dm3E-tB8.js.map +1 -0
- package/dist/components/p-DsCDXclM.js +106 -0
- package/dist/components/p-DsCDXclM.js.map +1 -0
- package/dist/components/p-DtbXB8r4.js +72 -0
- package/dist/components/p-DtbXB8r4.js.map +1 -0
- package/dist/components/p-DufL1yr4.js +142 -0
- package/dist/components/p-DufL1yr4.js.map +1 -0
- package/dist/components/p-SkkbcLa0.js +224 -0
- package/dist/components/p-SkkbcLa0.js.map +1 -0
- package/dist/components/p-dlKpBGSA.js +166 -0
- package/dist/components/p-dlKpBGSA.js.map +1 -0
- package/dist/components/p-kd43PSY6.js +148 -0
- package/dist/components/p-kd43PSY6.js.map +1 -0
- package/dist/components/p-uG5vRdFz.js +137 -0
- package/dist/components/p-uG5vRdFz.js.map +1 -0
- package/dist/esm/bellhop-core.js +21 -0
- package/dist/esm/bellhop-core.js.map +1 -0
- package/dist/esm/bh-accordion-item.entry.js +80 -0
- package/dist/esm/bh-accordion-item.entry.js.map +1 -0
- package/dist/esm/bh-accordion.entry.js +117 -0
- package/dist/esm/bh-appbar.entry.js +81 -0
- package/dist/esm/bh-autocomplete-menu_2.entry.js +174 -0
- package/dist/esm/bh-avatar-add.entry.js +73 -0
- package/dist/esm/bh-avatar-stacked.entry.js +92 -0
- package/dist/esm/bh-avatar.entry.js +91 -0
- package/dist/esm/bh-badge-dot_2.entry.js +131 -0
- package/dist/esm/bh-badge.entry.js +69 -0
- package/dist/esm/bh-bar-chart.entry.js +162 -0
- package/dist/esm/bh-button-icon.entry.js +72 -0
- package/dist/esm/bh-button-n5gkWRSP.js +115 -0
- package/dist/esm/bh-button-n5gkWRSP.js.map +1 -0
- package/dist/esm/bh-button.bh-loader-spinner.entry.js.map +1 -0
- package/dist/esm/bh-button_2.entry.js +44 -0
- package/dist/esm/bh-card-footer.entry.js +28 -0
- package/dist/esm/bh-card-header.entry.js +72 -0
- package/dist/esm/bh-card.entry.js +46 -0
- package/dist/esm/bh-chart-tooltip.entry.js +55 -0
- package/dist/esm/bh-checkbox-group-item.entry.js +140 -0
- package/dist/esm/bh-checkbox-group.entry.js +98 -0
- package/dist/esm/bh-checkbox.bh-radio-button.entry.js.map +1 -0
- package/dist/esm/bh-checkbox_2.entry.js +264 -0
- package/dist/esm/bh-container-footer.entry.js +36 -0
- package/dist/esm/bh-container.entry.js +24 -0
- package/dist/esm/bh-data-grid.entry.js +4228 -0
- package/dist/esm/bh-data-grid.entry.js.map +1 -0
- package/dist/esm/bh-date-picker-content.entry.js +368 -0
- package/dist/esm/bh-date-picker-content.entry.js.map +1 -0
- package/dist/esm/bh-date-picker.entry.js +171 -0
- package/dist/esm/bh-date-picker.entry.js.map +1 -0
- package/dist/esm/bh-date-range-picker-content.entry.js +149 -0
- package/dist/esm/bh-date-range-picker.entry.js +165 -0
- package/dist/esm/bh-dropdown-menu.entry.js +112 -0
- package/dist/esm/bh-dropdown.bh-logo-box.bh-nav-item.entry.js.map +1 -0
- package/dist/esm/bh-dropdown_3.entry.js +1883 -0
- package/dist/esm/bh-empty-state.bh-pagination.bh-skeleton-loader.entry.js.map +1 -0
- package/dist/esm/bh-empty-state_3.entry.js +111 -0
- package/dist/esm/bh-featured-icon.entry.js +39 -0
- package/dist/esm/bh-illustrations.entry.js +63 -0
- package/dist/esm/bh-input-autocomplete.entry.js +340 -0
- package/dist/esm/bh-input-number.entry.js +305 -0
- package/dist/esm/bh-input-password.entry.js +180 -0
- package/dist/esm/bh-input-text.bh-picker-menu.entry.js.map +1 -0
- package/dist/esm/bh-input-text_2.entry.js +344 -0
- package/dist/esm/bh-input-verification.entry.js +201 -0
- package/dist/esm/bh-label-fV57YpXm.js +108 -0
- package/dist/esm/bh-label-fV57YpXm.js.map +1 -0
- package/dist/esm/bh-label_2.entry.js +45 -0
- package/dist/esm/bh-modal-actions.entry.js +64 -0
- package/dist/esm/bh-modal-header.entry.js +74 -0
- package/dist/esm/bh-modal.entry.js +54 -0
- package/dist/esm/bh-month-picker-content.entry.js +187 -0
- package/dist/esm/bh-month-picker.entry.js +150 -0
- package/dist/esm/bh-notification.entry.js +126 -0
- package/dist/esm/bh-page-navigation-child.entry.js +46 -0
- package/dist/esm/bh-page-navigation-multi-level_2.entry.js +143 -0
- package/dist/esm/bh-page-navigation.entry.js +70 -0
- package/dist/esm/bh-pagination-BtbbslVs.js +150 -0
- package/dist/esm/bh-pagination-BtbbslVs.js.map +1 -0
- package/dist/esm/bh-pie-chart.entry.js +155 -0
- package/dist/esm/bh-popover.entry.js +98 -0
- package/dist/esm/bh-product-switcher.entry.js +100 -0
- package/dist/esm/bh-property-switcher.entry.js +229 -0
- package/dist/esm/bh-sidebar.entry.js +108 -0
- package/dist/esm/bh-tab-item.entry.js +52 -0
- package/dist/esm/bh-tabs.entry.js +50 -0
- package/dist/esm/bh-textarea.entry.js +159 -0
- package/dist/esm/bh-toggle.entry.js +139 -0
- package/dist/esm/bh-trend-chart.entry.js +119 -0
- package/dist/esm/index-DXAL-jSE.js +1929 -0
- package/dist/esm/index-DXAL-jSE.js.map +1 -0
- package/dist/esm/index.js +16 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/types/components/bh-checkbox/bh-checkbox.d.ts +46 -0
- package/dist/types/components/bh-data-grid/bh-data-grid.d.ts +155 -0
- package/dist/types/components/bh-data-grid/bh-data-grid.types.d.ts +93 -0
- package/dist/types/components/bh-dropdown/bh-dropdown.d.ts +89 -0
- package/dist/types/components/bh-logo-box/bh-logo-box.d.ts +36 -0
- package/dist/types/components/bh-pagination/bh-pagination.d.ts +80 -0
- package/dist/types/components.d.ts +7496 -0
- package/dist/types/index.d.ts +13 -0
- package/package.json +53 -16
- package/bellhop-core/bellhop-core.esm.js +0 -2
- package/bellhop-core/bellhop-core.esm.js.map +0 -1
- package/bellhop-core/bh-accordion-item.entry.esm.js.map +0 -1
- package/bellhop-core/bh-button.bh-loader-spinner.entry.esm.js.map +0 -1
- package/bellhop-core/bh-checkbox.entry.esm.js.map +0 -1
- package/bellhop-core/bh-data-grid.entry.esm.js.map +0 -1
- package/bellhop-core/bh-date-picker-content.bh-picker-menu.entry.esm.js.map +0 -1
- package/bellhop-core/bh-date-picker.bh-empty-state.entry.esm.js.map +0 -1
- package/bellhop-core/bh-dropdown.bh-logo-box.bh-nav-item.entry.esm.js.map +0 -1
- package/bellhop-core/bh-input-text.entry.esm.js.map +0 -1
- package/bellhop-core/bh-radio-button.entry.esm.js.map +0 -1
- package/bellhop-core/bh-skeleton-loader.entry.esm.js.map +0 -1
- package/bellhop-core/index.esm.js +0 -2
- package/bellhop-core/index.esm.js.map +0 -1
- package/bellhop-core/p-051a25aa.entry.js +0 -2
- package/bellhop-core/p-0579ce8d.entry.js +0 -2
- package/bellhop-core/p-05c13d72.entry.js +0 -2
- package/bellhop-core/p-0e013732.entry.js +0 -2
- package/bellhop-core/p-1960c2d0.entry.js +0 -2
- package/bellhop-core/p-2735c901.entry.js +0 -2
- package/bellhop-core/p-2735c901.entry.js.map +0 -1
- package/bellhop-core/p-2c80bc07.entry.js +0 -2
- package/bellhop-core/p-2cc0c4cf.entry.js +0 -2
- package/bellhop-core/p-3038cc1a.entry.js +0 -2
- package/bellhop-core/p-324cad08.entry.js +0 -2
- package/bellhop-core/p-324cad08.entry.js.map +0 -1
- package/bellhop-core/p-3bf098fd.entry.js +0 -2
- package/bellhop-core/p-3c739eea.entry.js +0 -2
- package/bellhop-core/p-4c71a0b6.entry.js +0 -2
- package/bellhop-core/p-5a220f12.entry.js +0 -2
- package/bellhop-core/p-5d844699.entry.js +0 -2
- package/bellhop-core/p-5e8d2fc0.entry.js +0 -2
- package/bellhop-core/p-71391701.entry.js +0 -2
- package/bellhop-core/p-7e67af77.entry.js +0 -2
- package/bellhop-core/p-7e908d03.entry.js +0 -2
- package/bellhop-core/p-7e908d03.entry.js.map +0 -1
- package/bellhop-core/p-8053e945.entry.js +0 -2
- package/bellhop-core/p-852564d6.entry.js +0 -2
- package/bellhop-core/p-86bbff38.entry.js +0 -2
- package/bellhop-core/p-87d1ed92.entry.js +0 -2
- package/bellhop-core/p-94156013.entry.js +0 -2
- package/bellhop-core/p-954b9c38.entry.js +0 -2
- package/bellhop-core/p-9693180e.entry.js +0 -2
- package/bellhop-core/p-98a336f7.entry.js +0 -2
- package/bellhop-core/p-98cc729f.entry.js +0 -2
- package/bellhop-core/p-9e7e64dc.entry.js +0 -2
- package/bellhop-core/p-9fe1fd2e.entry.js +0 -2
- package/bellhop-core/p-DANVSPII.js +0 -2
- package/bellhop-core/p-DANVSPII.js.map +0 -1
- package/bellhop-core/p-DKeuA-TM.js +0 -2
- package/bellhop-core/p-DKeuA-TM.js.map +0 -1
- package/bellhop-core/p-DtVghh5W.js +0 -3
- package/bellhop-core/p-DtVghh5W.js.map +0 -1
- package/bellhop-core/p-a901ae33.entry.js +0 -2
- package/bellhop-core/p-a901ae33.entry.js.map +0 -1
- package/bellhop-core/p-abd6ade0.entry.js +0 -2
- package/bellhop-core/p-abd6ade0.entry.js.map +0 -1
- package/bellhop-core/p-abf68de4.entry.js +0 -2
- package/bellhop-core/p-ad15a4b9.entry.js +0 -2
- package/bellhop-core/p-b1affa8d.entry.js +0 -2
- package/bellhop-core/p-b1affa8d.entry.js.map +0 -1
- package/bellhop-core/p-b4104ae5.entry.js +0 -2
- package/bellhop-core/p-c194883a.entry.js +0 -2
- package/bellhop-core/p-c48ca590.entry.js +0 -2
- package/bellhop-core/p-c82e73aa.entry.js +0 -2
- package/bellhop-core/p-d14192df.entry.js +0 -2
- package/bellhop-core/p-d5fb8d0f.entry.js +0 -2
- package/bellhop-core/p-d9106838.entry.js +0 -2
- package/bellhop-core/p-d941cdba.entry.js +0 -2
- package/bellhop-core/p-d94b296e.entry.js +0 -2
- package/bellhop-core/p-df2728a1.entry.js +0 -2
- package/bellhop-core/p-df45027c.entry.js +0 -2
- package/bellhop-core/p-df45027c.entry.js.map +0 -1
- package/bellhop-core/p-dfe0574c.entry.js +0 -2
- package/bellhop-core/p-e3c5d1e3.entry.js +0 -2
- package/bellhop-core/p-e3d79592.entry.js +0 -2
- package/bellhop-core/p-e44539e9.entry.js +0 -2
- package/bellhop-core/p-e5b9a3de.entry.js +0 -2
- package/bellhop-core/p-e8e0739d.entry.js +0 -2
- package/bellhop-core/p-ebb2492c.entry.js +0 -2
- package/bellhop-core/p-ec894e11.entry.js +0 -2
- package/bellhop-core/p-f0cfc744.entry.js +0 -2
- package/bellhop-core/p-f0cfc744.entry.js.map +0 -1
- package/bellhop-core/p-f261bdae.entry.js +0 -2
- package/bellhop-core/p-f261bdae.entry.js.map +0 -1
- package/bellhop-core/p-f4c4c70d.entry.js +0 -2
- package/cjs/bellhop-core.cjs.js +0 -25
- package/cjs/bellhop-core.cjs.js.map +0 -1
- package/cjs/bh-accordion-item.cjs.entry.js +0 -82
- package/cjs/bh-accordion-item.entry.cjs.js.map +0 -1
- package/cjs/bh-accordion.cjs.entry.js +0 -119
- package/cjs/bh-appbar.cjs.entry.js +0 -83
- package/cjs/bh-autocomplete-menu_2.cjs.entry.js +0 -177
- package/cjs/bh-avatar-add.cjs.entry.js +0 -75
- package/cjs/bh-avatar-stacked.cjs.entry.js +0 -94
- package/cjs/bh-avatar.cjs.entry.js +0 -93
- package/cjs/bh-badge-dot_2.cjs.entry.js +0 -134
- package/cjs/bh-badge.cjs.entry.js +0 -71
- package/cjs/bh-bar-chart.cjs.entry.js +0 -164
- package/cjs/bh-button-BKVcf-nK.js +0 -117
- package/cjs/bh-button-BKVcf-nK.js.map +0 -1
- package/cjs/bh-button-icon.cjs.entry.js +0 -74
- package/cjs/bh-button.bh-loader-spinner.entry.cjs.js.map +0 -1
- package/cjs/bh-button_2.cjs.entry.js +0 -47
- package/cjs/bh-card-footer.cjs.entry.js +0 -30
- package/cjs/bh-card-header.cjs.entry.js +0 -74
- package/cjs/bh-card.cjs.entry.js +0 -48
- package/cjs/bh-chart-tooltip.cjs.entry.js +0 -57
- package/cjs/bh-checkbox-group-item.cjs.entry.js +0 -142
- package/cjs/bh-checkbox-group.cjs.entry.js +0 -100
- package/cjs/bh-checkbox.cjs.entry.js +0 -144
- package/cjs/bh-checkbox.entry.cjs.js.map +0 -1
- package/cjs/bh-container-footer.cjs.entry.js +0 -38
- package/cjs/bh-container.cjs.entry.js +0 -26
- package/cjs/bh-data-grid.cjs.entry.js +0 -812
- package/cjs/bh-data-grid.entry.cjs.js.map +0 -1
- package/cjs/bh-date-picker-content.bh-picker-menu.entry.cjs.js.map +0 -1
- package/cjs/bh-date-picker-content_2.cjs.entry.js +0 -525
- package/cjs/bh-date-picker.bh-empty-state.entry.cjs.js.map +0 -1
- package/cjs/bh-date-picker_2.cjs.entry.js +0 -252
- package/cjs/bh-date-range-picker-content.cjs.entry.js +0 -151
- package/cjs/bh-date-range-picker.cjs.entry.js +0 -167
- package/cjs/bh-dropdown-menu.cjs.entry.js +0 -114
- package/cjs/bh-dropdown.bh-logo-box.bh-nav-item.entry.cjs.js.map +0 -1
- package/cjs/bh-dropdown_3.cjs.entry.js +0 -307
- package/cjs/bh-featured-icon.cjs.entry.js +0 -41
- package/cjs/bh-illustrations.cjs.entry.js +0 -65
- package/cjs/bh-input-autocomplete.cjs.entry.js +0 -342
- package/cjs/bh-input-number.cjs.entry.js +0 -307
- package/cjs/bh-input-password.cjs.entry.js +0 -182
- package/cjs/bh-input-text.cjs.entry.js +0 -192
- package/cjs/bh-input-text.entry.cjs.js.map +0 -1
- package/cjs/bh-input-verification.cjs.entry.js +0 -203
- package/cjs/bh-label-DBqucnaO.js +0 -110
- package/cjs/bh-label-DBqucnaO.js.map +0 -1
- package/cjs/bh-label_2.cjs.entry.js +0 -48
- package/cjs/bh-modal-actions.cjs.entry.js +0 -66
- package/cjs/bh-modal-header.cjs.entry.js +0 -76
- package/cjs/bh-modal.cjs.entry.js +0 -56
- package/cjs/bh-month-picker-content.cjs.entry.js +0 -189
- package/cjs/bh-month-picker.cjs.entry.js +0 -152
- package/cjs/bh-notification.cjs.entry.js +0 -128
- package/cjs/bh-page-navigation-child.cjs.entry.js +0 -48
- package/cjs/bh-page-navigation-multi-level_2.cjs.entry.js +0 -146
- package/cjs/bh-page-navigation.cjs.entry.js +0 -72
- package/cjs/bh-pie-chart.cjs.entry.js +0 -157
- package/cjs/bh-popover.cjs.entry.js +0 -100
- package/cjs/bh-product-switcher.cjs.entry.js +0 -102
- package/cjs/bh-property-switcher.cjs.entry.js +0 -231
- package/cjs/bh-radio-button.cjs.entry.js +0 -124
- package/cjs/bh-radio-button.entry.cjs.js.map +0 -1
- package/cjs/bh-sidebar.cjs.entry.js +0 -110
- package/cjs/bh-skeleton-loader.cjs.entry.js +0 -34
- package/cjs/bh-skeleton-loader.entry.cjs.js.map +0 -1
- package/cjs/bh-tab-item.cjs.entry.js +0 -54
- package/cjs/bh-tabs.cjs.entry.js +0 -52
- package/cjs/bh-textarea.cjs.entry.js +0 -161
- package/cjs/bh-toggle.cjs.entry.js +0 -141
- package/cjs/bh-trend-chart.cjs.entry.js +0 -121
- package/cjs/index-tZqSQc8E.js +0 -1951
- package/cjs/index-tZqSQc8E.js.map +0 -1
- package/cjs/index.cjs.js +0 -32
- package/cjs/index.cjs.js.map +0 -1
- package/cjs/loader.cjs.js +0 -13
- package/collection/collection-manifest.json +0 -77
- package/collection/components/bh-accordion/bh-accordion.js +0 -227
- package/collection/components/bh-accordion-item/bh-accordion-item.css +0 -119
- package/collection/components/bh-accordion-item/bh-accordion-item.js +0 -207
- package/collection/components/bh-appbar/bh-appbar.js +0 -270
- package/collection/components/bh-autocomplete-menu/bh-autocomplete-menu.js +0 -301
- package/collection/components/bh-avatar/bh-avatar.js +0 -266
- package/collection/components/bh-avatar-add/bh-avatar-add.js +0 -194
- package/collection/components/bh-avatar-stacked/bh-avatar-stacked.js +0 -211
- package/collection/components/bh-badge/bh-badge.js +0 -250
- package/collection/components/bh-badge-dot/bh-badge-dot.js +0 -113
- package/collection/components/bh-bar-chart/bh-bar-chart.css +0 -363
- package/collection/components/bh-bar-chart/bh-bar-chart.js +0 -316
- package/collection/components/bh-breadcrumbs/bh-breadcrumbs.js +0 -231
- package/collection/components/bh-button/bh-button.js +0 -350
- package/collection/components/bh-button-icon/bh-button-icon.js +0 -259
- package/collection/components/bh-card/bh-card.js +0 -139
- package/collection/components/bh-card-footer/bh-card-footer.js +0 -81
- package/collection/components/bh-card-header/bh-card-header.js +0 -348
- package/collection/components/bh-chart-tooltip/bh-chart-tooltip.css +0 -301
- package/collection/components/bh-chart-tooltip/bh-chart-tooltip.js +0 -226
- package/collection/components/bh-checkbox/bh-checkbox.js +0 -378
- package/collection/components/bh-checkbox/bh-checkbox.js.map +0 -1
- package/collection/components/bh-checkbox-group/bh-checkbox-group.js +0 -218
- package/collection/components/bh-checkbox-group-item/bh-checkbox-group-item.js +0 -402
- package/collection/components/bh-container/bh-container.js +0 -51
- package/collection/components/bh-container-footer/bh-container-footer.js +0 -106
- package/collection/components/bh-data-grid/bh-data-grid.css +0 -602
- package/collection/components/bh-data-grid/bh-data-grid.js +0 -1488
- package/collection/components/bh-data-grid/bh-data-grid.js.map +0 -1
- package/collection/components/bh-date-picker/bh-date-picker.css +0 -251
- package/collection/components/bh-date-picker/bh-date-picker.js +0 -485
- package/collection/components/bh-date-picker-content/bh-date-picker-content.css +0 -541
- package/collection/components/bh-date-picker-content/bh-date-picker-content.js +0 -711
- package/collection/components/bh-date-range-picker/bh-date-range-picker.css +0 -247
- package/collection/components/bh-date-range-picker/bh-date-range-picker.js +0 -528
- package/collection/components/bh-date-range-picker-content/bh-date-range-picker-content.css +0 -275
- package/collection/components/bh-date-range-picker-content/bh-date-range-picker-content.js +0 -338
- package/collection/components/bh-dropdown/bh-dropdown.css +0 -64
- package/collection/components/bh-dropdown/bh-dropdown.js +0 -512
- package/collection/components/bh-dropdown/bh-dropdown.js.map +0 -1
- package/collection/components/bh-dropdown-menu/bh-dropdown-menu.js +0 -262
- package/collection/components/bh-empty-state/bh-empty-state.js +0 -306
- package/collection/components/bh-featured-icon/bh-featured-icon.js +0 -144
- package/collection/components/bh-illustrations/bh-illustrations.css +0 -328
- package/collection/components/bh-illustrations/bh-illustrations.js +0 -174
- package/collection/components/bh-input-autocomplete/bh-input-autocomplete.css +0 -301
- package/collection/components/bh-input-autocomplete/bh-input-autocomplete.js +0 -872
- package/collection/components/bh-input-number/bh-input-number.js +0 -818
- package/collection/components/bh-input-password/bh-input-password.js +0 -581
- package/collection/components/bh-input-text/bh-input-text.js +0 -696
- package/collection/components/bh-input-verification/bh-input-verification.js +0 -523
- package/collection/components/bh-label/bh-label.js +0 -302
- package/collection/components/bh-loader-spinner/bh-loader-spinner.css +0 -153
- package/collection/components/bh-loader-spinner/bh-loader-spinner.js +0 -182
- package/collection/components/bh-logo-box/bh-logo-box.js +0 -184
- package/collection/components/bh-logo-box/bh-logo-box.js.map +0 -1
- package/collection/components/bh-modal/bh-modal.js +0 -144
- package/collection/components/bh-modal-actions/bh-modal-actions.js +0 -208
- package/collection/components/bh-modal-header/bh-modal-header.js +0 -275
- package/collection/components/bh-month-picker/bh-month-picker.css +0 -251
- package/collection/components/bh-month-picker/bh-month-picker.js +0 -444
- package/collection/components/bh-month-picker-content/bh-month-picker-content.css +0 -406
- package/collection/components/bh-month-picker-content/bh-month-picker-content.js +0 -437
- package/collection/components/bh-notification/bh-notification.js +0 -324
- package/collection/components/bh-page-navigation/bh-page-navigation.css +0 -253
- package/collection/components/bh-page-navigation/bh-page-navigation.js +0 -146
- package/collection/components/bh-page-navigation-child/bh-page-navigation-child.css +0 -281
- package/collection/components/bh-page-navigation-child/bh-page-navigation-child.js +0 -148
- package/collection/components/bh-page-navigation-multi-level/bh-page-navigation-multi-level.css +0 -372
- package/collection/components/bh-page-navigation-multi-level/bh-page-navigation-multi-level.js +0 -268
- package/collection/components/bh-page-navigation-single-level/bh-page-navigation-single-level.js +0 -126
- package/collection/components/bh-picker-menu/bh-picker-menu.css +0 -284
- package/collection/components/bh-pie-chart/bh-pie-chart.css +0 -292
- package/collection/components/bh-pie-chart/bh-pie-chart.js +0 -280
- package/collection/components/bh-popover/bh-popover.js +0 -326
- package/collection/components/bh-product-switcher/bh-product-switcher.js +0 -226
- package/collection/components/bh-property-switcher/bh-property-switcher.js +0 -360
- package/collection/components/bh-radio-button/bh-radio-button.js +0 -292
- package/collection/components/bh-sidebar/bh-nav-item.js +0 -157
- package/collection/components/bh-sidebar/bh-sidebar.js +0 -344
- package/collection/components/bh-skeleton-loader/bh-skeleton-loader.js +0 -99
- package/collection/components/bh-tab-item/bh-tab-item.js +0 -158
- package/collection/components/bh-tabs/bh-tabs.js +0 -178
- package/collection/components/bh-tag/bh-tag.js +0 -238
- package/collection/components/bh-textarea/bh-textarea.js +0 -569
- package/collection/components/bh-toggle/bh-toggle.js +0 -369
- package/collection/components/bh-tooltip/bh-tooltip.js +0 -162
- package/collection/components/bh-trend-chart/bh-trend-chart.css +0 -299
- package/collection/components/bh-trend-chart/bh-trend-chart.js +0 -256
- package/collection/index.js +0 -22
- package/collection/index.js.map +0 -1
- package/components/bh-accordion-item.js +0 -111
- package/components/bh-accordion-item.js.map +0 -1
- package/components/bh-accordion.js +0 -147
- package/components/bh-appbar.js +0 -128
- package/components/bh-autocomplete-menu.js +0 -9
- package/components/bh-avatar-add.js +0 -9
- package/components/bh-avatar-stacked.js +0 -141
- package/components/bh-avatar.js +0 -9
- package/components/bh-badge-dot.js +0 -9
- package/components/bh-badge.js +0 -9
- package/components/bh-bar-chart.js +0 -205
- package/components/bh-breadcrumbs.js +0 -9
- package/components/bh-button-icon.js +0 -9
- package/components/bh-button.js +0 -9
- package/components/bh-card-footer.js +0 -9
- package/components/bh-card-header.js +0 -9
- package/components/bh-card.js +0 -9
- package/components/bh-chart-tooltip.js +0 -9
- package/components/bh-checkbox-group-item.js +0 -9
- package/components/bh-checkbox-group.js +0 -9
- package/components/bh-checkbox.js +0 -9
- package/components/bh-container-footer.js +0 -74
- package/components/bh-container.js +0 -49
- package/components/bh-data-grid.js +0 -9
- package/components/bh-date-picker-content.js +0 -9
- package/components/bh-date-picker.js +0 -9
- package/components/bh-date-picker.js.map +0 -1
- package/components/bh-date-range-picker-content.js +0 -9
- package/components/bh-date-range-picker.js +0 -269
- package/components/bh-dropdown-menu.js +0 -9
- package/components/bh-dropdown.js +0 -9
- package/components/bh-empty-state.js +0 -9
- package/components/bh-featured-icon.js +0 -9
- package/components/bh-illustrations.js +0 -92
- package/components/bh-input-autocomplete.js +0 -433
- package/components/bh-input-number.js +0 -370
- package/components/bh-input-password.js +0 -229
- package/components/bh-input-text.js +0 -9
- package/components/bh-input-verification.js +0 -255
- package/components/bh-label.js +0 -9
- package/components/bh-loader-spinner.js +0 -9
- package/components/bh-logo-box.js +0 -9
- package/components/bh-modal-actions.js +0 -105
- package/components/bh-modal-header.js +0 -119
- package/components/bh-modal.js +0 -9
- package/components/bh-month-picker-content.js +0 -9
- package/components/bh-month-picker.js +0 -233
- package/components/bh-nav-item.js +0 -9
- package/components/bh-notification.js +0 -175
- package/components/bh-page-navigation-child.js +0 -9
- package/components/bh-page-navigation-multi-level.js +0 -9
- package/components/bh-page-navigation-single-level.js +0 -9
- package/components/bh-page-navigation.js +0 -129
- package/components/bh-picker-menu.js +0 -9
- package/components/bh-pie-chart.js +0 -194
- package/components/bh-popover.js +0 -131
- package/components/bh-product-switcher.js +0 -9
- package/components/bh-property-switcher.js +0 -261
- package/components/bh-radio-button.js +0 -9
- package/components/bh-sidebar.js +0 -195
- package/components/bh-skeleton-loader.js +0 -59
- package/components/bh-skeleton-loader.js.map +0 -1
- package/components/bh-tab-item.js +0 -80
- package/components/bh-tabs.js +0 -78
- package/components/bh-tag.js +0 -9
- package/components/bh-textarea.js +0 -207
- package/components/bh-toggle.js +0 -9
- package/components/bh-tooltip.js +0 -9
- package/components/bh-trend-chart.js +0 -149
- package/components/index.js +0 -16
- package/components/index.js.map +0 -1
- package/components/p-54wXxbeh.js +0 -213
- package/components/p-54wXxbeh.js.map +0 -1
- package/components/p-9a7sQzad.js +0 -1463
- package/components/p-9a7sQzad.js.map +0 -1
- package/components/p-B3doeS-4.js +0 -158
- package/components/p-B3doeS-4.js.map +0 -1
- package/components/p-B4TBDBoW.js +0 -71
- package/components/p-B4TBDBoW.js.map +0 -1
- package/components/p-BBenNW93.js +0 -184
- package/components/p-BBenNW93.js.map +0 -1
- package/components/p-BLRNfy0t.js +0 -84
- package/components/p-BLRNfy0t.js.map +0 -1
- package/components/p-BYhYSIIs.js +0 -941
- package/components/p-BYhYSIIs.js.map +0 -1
- package/components/p-Bbo_Dwmk.js +0 -70
- package/components/p-Bbo_Dwmk.js.map +0 -1
- package/components/p-BdcGkck5.js +0 -72
- package/components/p-BdcGkck5.js.map +0 -1
- package/components/p-Bk8GbEQp.js +0 -132
- package/components/p-Bk8GbEQp.js.map +0 -1
- package/components/p-CDPKBnfQ.js +0 -92
- package/components/p-CDPKBnfQ.js.map +0 -1
- package/components/p-CDgBIIbC.js +0 -224
- package/components/p-CDgBIIbC.js.map +0 -1
- package/components/p-CErNA5c8.js +0 -204
- package/components/p-CErNA5c8.js.map +0 -1
- package/components/p-CQBqn1IO.js +0 -67
- package/components/p-CQBqn1IO.js.map +0 -1
- package/components/p-CTjPiCcp.js +0 -51
- package/components/p-CTjPiCcp.js.map +0 -1
- package/components/p-CciWcvHP.js +0 -123
- package/components/p-CciWcvHP.js.map +0 -1
- package/components/p-CiQqgc-m.js +0 -434
- package/components/p-CiQqgc-m.js.map +0 -1
- package/components/p-CsRNKalM.js +0 -166
- package/components/p-CsRNKalM.js.map +0 -1
- package/components/p-CuVsQ9St.js +0 -123
- package/components/p-CuVsQ9St.js.map +0 -1
- package/components/p-D3OkBDd3.js +0 -100
- package/components/p-D3OkBDd3.js.map +0 -1
- package/components/p-D6cM-mvE.js +0 -64
- package/components/p-D6cM-mvE.js.map +0 -1
- package/components/p-D6kh9oF2.js +0 -70
- package/components/p-D6kh9oF2.js.map +0 -1
- package/components/p-DHSWIF-h.js +0 -214
- package/components/p-DHSWIF-h.js.map +0 -1
- package/components/p-DNhCX5eS.js +0 -153
- package/components/p-DNhCX5eS.js.map +0 -1
- package/components/p-DRGkYX1u.js +0 -78
- package/components/p-DRGkYX1u.js.map +0 -1
- package/components/p-DRJW4zBc.js +0 -58
- package/components/p-DRJW4zBc.js.map +0 -1
- package/components/p-DTgHvmlL.js +0 -149
- package/components/p-DTgHvmlL.js.map +0 -1
- package/components/p-DVhHZCku.js +0 -220
- package/components/p-DVhHZCku.js.map +0 -1
- package/components/p-DWpdUpK5.js +0 -264
- package/components/p-DWpdUpK5.js.map +0 -1
- package/components/p-D_DKZMpk.js +0 -78
- package/components/p-D_DKZMpk.js.map +0 -1
- package/components/p-Dbl0HXBJ.js +0 -241
- package/components/p-Dbl0HXBJ.js.map +0 -1
- package/components/p-DecYIvq4.js +0 -124
- package/components/p-DecYIvq4.js.map +0 -1
- package/components/p-DfXkVfrE.js +0 -129
- package/components/p-DfXkVfrE.js.map +0 -1
- package/components/p-HEcFS8Jc.js +0 -125
- package/components/p-HEcFS8Jc.js.map +0 -1
- package/components/p-MIbEYjCv.js +0 -142
- package/components/p-MIbEYjCv.js.map +0 -1
- package/components/p-NXL0pYS_.js +0 -97
- package/components/p-NXL0pYS_.js.map +0 -1
- package/components/p-X9MH3dtg.js +0 -154
- package/components/p-X9MH3dtg.js.map +0 -1
- package/components/p-YJm8-pxX.js +0 -118
- package/components/p-YJm8-pxX.js.map +0 -1
- package/components/p-ghuDbZwh.js +0 -148
- package/components/p-ghuDbZwh.js.map +0 -1
- package/components/p-p8W0xKpn.js +0 -106
- package/components/p-p8W0xKpn.js.map +0 -1
- package/esm/bellhop-core.js +0 -21
- package/esm/bellhop-core.js.map +0 -1
- package/esm/bh-accordion-item.entry.js +0 -80
- package/esm/bh-accordion-item.entry.js.map +0 -1
- package/esm/bh-accordion.entry.js +0 -117
- package/esm/bh-appbar.entry.js +0 -81
- package/esm/bh-autocomplete-menu_2.entry.js +0 -174
- package/esm/bh-avatar-add.entry.js +0 -73
- package/esm/bh-avatar-stacked.entry.js +0 -92
- package/esm/bh-avatar.entry.js +0 -91
- package/esm/bh-badge-dot_2.entry.js +0 -131
- package/esm/bh-badge.entry.js +0 -69
- package/esm/bh-bar-chart.entry.js +0 -162
- package/esm/bh-button-CBZGiLVh.js +0 -115
- package/esm/bh-button-CBZGiLVh.js.map +0 -1
- package/esm/bh-button-icon.entry.js +0 -72
- package/esm/bh-button.bh-loader-spinner.entry.js.map +0 -1
- package/esm/bh-button_2.entry.js +0 -44
- package/esm/bh-card-footer.entry.js +0 -28
- package/esm/bh-card-header.entry.js +0 -72
- package/esm/bh-card.entry.js +0 -46
- package/esm/bh-chart-tooltip.entry.js +0 -55
- package/esm/bh-checkbox-group-item.entry.js +0 -140
- package/esm/bh-checkbox-group.entry.js +0 -98
- package/esm/bh-checkbox.entry.js +0 -142
- package/esm/bh-checkbox.entry.js.map +0 -1
- package/esm/bh-container-footer.entry.js +0 -36
- package/esm/bh-container.entry.js +0 -24
- package/esm/bh-data-grid.entry.js +0 -810
- package/esm/bh-data-grid.entry.js.map +0 -1
- package/esm/bh-date-picker-content.bh-picker-menu.entry.js.map +0 -1
- package/esm/bh-date-picker-content_2.entry.js +0 -522
- package/esm/bh-date-picker.bh-empty-state.entry.js.map +0 -1
- package/esm/bh-date-picker_2.entry.js +0 -249
- package/esm/bh-date-range-picker-content.entry.js +0 -149
- package/esm/bh-date-range-picker.entry.js +0 -165
- package/esm/bh-dropdown-menu.entry.js +0 -112
- package/esm/bh-dropdown.bh-logo-box.bh-nav-item.entry.js.map +0 -1
- package/esm/bh-dropdown_3.entry.js +0 -303
- package/esm/bh-featured-icon.entry.js +0 -39
- package/esm/bh-illustrations.entry.js +0 -63
- package/esm/bh-input-autocomplete.entry.js +0 -340
- package/esm/bh-input-number.entry.js +0 -305
- package/esm/bh-input-password.entry.js +0 -180
- package/esm/bh-input-text.entry.js +0 -190
- package/esm/bh-input-text.entry.js.map +0 -1
- package/esm/bh-input-verification.entry.js +0 -201
- package/esm/bh-label-DqsVrCg_.js +0 -108
- package/esm/bh-label-DqsVrCg_.js.map +0 -1
- package/esm/bh-label_2.entry.js +0 -45
- package/esm/bh-modal-actions.entry.js +0 -64
- package/esm/bh-modal-header.entry.js +0 -74
- package/esm/bh-modal.entry.js +0 -54
- package/esm/bh-month-picker-content.entry.js +0 -187
- package/esm/bh-month-picker.entry.js +0 -150
- package/esm/bh-notification.entry.js +0 -126
- package/esm/bh-page-navigation-child.entry.js +0 -46
- package/esm/bh-page-navigation-multi-level_2.entry.js +0 -143
- package/esm/bh-page-navigation.entry.js +0 -70
- package/esm/bh-pie-chart.entry.js +0 -155
- package/esm/bh-popover.entry.js +0 -98
- package/esm/bh-product-switcher.entry.js +0 -100
- package/esm/bh-property-switcher.entry.js +0 -229
- package/esm/bh-radio-button.entry.js +0 -122
- package/esm/bh-radio-button.entry.js.map +0 -1
- package/esm/bh-sidebar.entry.js +0 -108
- package/esm/bh-skeleton-loader.entry.js +0 -32
- package/esm/bh-skeleton-loader.entry.js.map +0 -1
- package/esm/bh-tab-item.entry.js +0 -52
- package/esm/bh-tabs.entry.js +0 -50
- package/esm/bh-textarea.entry.js +0 -159
- package/esm/bh-toggle.entry.js +0 -139
- package/esm/bh-trend-chart.entry.js +0 -119
- package/esm/index-DtVghh5W.js +0 -1922
- package/esm/index-DtVghh5W.js.map +0 -1
- package/esm/index.js +0 -15
- package/esm/index.js.map +0 -1
- package/esm/loader.js +0 -11
- package/types/components/bh-checkbox/bh-checkbox.d.ts +0 -45
- package/types/components/bh-data-grid/bh-data-grid.d.ts +0 -235
- package/types/components/bh-dropdown/bh-dropdown.d.ts +0 -78
- package/types/components/bh-logo-box/bh-logo-box.d.ts +0 -28
- package/types/components.d.ts +0 -7199
- package/types/index.d.ts +0 -12
- /package/{bellhop-core → dist/bellhop-core}/bellhop-core.css +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-accordion.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-appbar.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-autocomplete-menu.bh-tag.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-avatar-add.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-avatar-stacked.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-avatar.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-badge-dot.bh-breadcrumbs.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-badge.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-bar-chart.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-button-icon.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-card-footer.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-card-header.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-card.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-chart-tooltip.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-checkbox-group-item.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-checkbox-group.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-container-footer.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-container.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-date-range-picker-content.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-date-range-picker.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-dropdown-menu.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-featured-icon.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-illustrations.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-input-autocomplete.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-input-number.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-input-password.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-input-verification.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-label.bh-tooltip.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-modal-actions.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-modal-header.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-modal.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-month-picker-content.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-month-picker.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-notification.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-page-navigation-child.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-page-navigation-multi-level.bh-page-navigation-single-level.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-page-navigation.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-pie-chart.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-popover.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-product-switcher.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-property-switcher.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-sidebar.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-tab-item.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-tabs.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-textarea.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-toggle.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/bh-trend-chart.entry.esm.js.map +0 -0
- /package/{bellhop-core → dist/bellhop-core}/loader.esm.js.map +0 -0
- /package/{bellhop-core/p-c48ca590.entry.js.map → dist/bellhop-core/p-03e93cd8.entry.js.map} +0 -0
- /package/{bellhop-core/p-86bbff38.entry.js.map → dist/bellhop-core/p-0438e0a9.entry.js.map} +0 -0
- /package/{bellhop-core/p-b4104ae5.entry.js.map → dist/bellhop-core/p-086e8c86.entry.js.map} +0 -0
- /package/{bellhop-core/p-852564d6.entry.js.map → dist/bellhop-core/p-09f3464e.entry.js.map} +0 -0
- /package/{bellhop-core/p-3c739eea.entry.js.map → dist/bellhop-core/p-20d680ce.entry.js.map} +0 -0
- /package/{bellhop-core/p-d5fb8d0f.entry.js.map → dist/bellhop-core/p-239c7e6b.entry.js.map} +0 -0
- /package/{bellhop-core/p-abf68de4.entry.js.map → dist/bellhop-core/p-23b74b40.entry.js.map} +0 -0
- /package/{bellhop-core/p-e44539e9.entry.js.map → dist/bellhop-core/p-2c796978.entry.js.map} +0 -0
- /package/{bellhop-core/p-98cc729f.entry.js.map → dist/bellhop-core/p-356a2ed7.entry.js.map} +0 -0
- /package/{bellhop-core/p-9e7e64dc.entry.js.map → dist/bellhop-core/p-363dce47.entry.js.map} +0 -0
- /package/{bellhop-core/p-9fe1fd2e.entry.js.map → dist/bellhop-core/p-3719852a.entry.js.map} +0 -0
- /package/{bellhop-core/p-05c13d72.entry.js.map → dist/bellhop-core/p-44241bad.entry.js.map} +0 -0
- /package/{bellhop-core/p-c194883a.entry.js.map → dist/bellhop-core/p-4a14cbb5.entry.js.map} +0 -0
- /package/{bellhop-core/p-df2728a1.entry.js.map → dist/bellhop-core/p-52e877e0.entry.js.map} +0 -0
- /package/{bellhop-core/p-98a336f7.entry.js.map → dist/bellhop-core/p-56b857f5.entry.js.map} +0 -0
- /package/{bellhop-core/p-8053e945.entry.js.map → dist/bellhop-core/p-5760ce66.entry.js.map} +0 -0
- /package/{bellhop-core/p-e5b9a3de.entry.js.map → dist/bellhop-core/p-57ac382d.entry.js.map} +0 -0
- /package/{bellhop-core/p-dfe0574c.entry.js.map → dist/bellhop-core/p-58879213.entry.js.map} +0 -0
- /package/{bellhop-core/p-d9106838.entry.js.map → dist/bellhop-core/p-5ab50add.entry.js.map} +0 -0
- /package/{bellhop-core/p-ebb2492c.entry.js.map → dist/bellhop-core/p-6433b0a7.entry.js.map} +0 -0
- /package/{bellhop-core/p-5d844699.entry.js.map → dist/bellhop-core/p-67452ed0.entry.js.map} +0 -0
- /package/{bellhop-core/p-e3c5d1e3.entry.js.map → dist/bellhop-core/p-686dea4a.entry.js.map} +0 -0
- /package/{bellhop-core/p-e3d79592.entry.js.map → dist/bellhop-core/p-69f85850.entry.js.map} +0 -0
- /package/{bellhop-core/p-5e8d2fc0.entry.js.map → dist/bellhop-core/p-70ee270c.entry.js.map} +0 -0
- /package/{bellhop-core/p-2c80bc07.entry.js.map → dist/bellhop-core/p-859f45da.entry.js.map} +0 -0
- /package/{bellhop-core/p-0e013732.entry.js.map → dist/bellhop-core/p-860be0be.entry.js.map} +0 -0
- /package/{bellhop-core/p-d941cdba.entry.js.map → dist/bellhop-core/p-870fc023.entry.js.map} +0 -0
- /package/{bellhop-core/p-1960c2d0.entry.js.map → dist/bellhop-core/p-87fb26a0.entry.js.map} +0 -0
- /package/{bellhop-core/p-9693180e.entry.js.map → dist/bellhop-core/p-90b9047d.entry.js.map} +0 -0
- /package/{bellhop-core/p-3bf098fd.entry.js.map → dist/bellhop-core/p-94d2d599.entry.js.map} +0 -0
- /package/{bellhop-core/p-d14192df.entry.js.map → dist/bellhop-core/p-9a585c1a.entry.js.map} +0 -0
- /package/{bellhop-core → dist/bellhop-core}/p-CPgx0iFq.js +0 -0
- /package/{bellhop-core → dist/bellhop-core}/p-CPgx0iFq.js.map +0 -0
- /package/{bellhop-core/p-87d1ed92.entry.js.map → dist/bellhop-core/p-ab2b037c.entry.js.map} +0 -0
- /package/{bellhop-core/p-051a25aa.entry.js.map → dist/bellhop-core/p-ab9c5351.entry.js.map} +0 -0
- /package/{bellhop-core/p-5a220f12.entry.js.map → dist/bellhop-core/p-abe24947.entry.js.map} +0 -0
- /package/{bellhop-core/p-c82e73aa.entry.js.map → dist/bellhop-core/p-adcd2e15.entry.js.map} +0 -0
- /package/{bellhop-core/p-e8e0739d.entry.js.map → dist/bellhop-core/p-afd0e309.entry.js.map} +0 -0
- /package/{bellhop-core/p-ad15a4b9.entry.js.map → dist/bellhop-core/p-b1cb34e9.entry.js.map} +0 -0
- /package/{bellhop-core/p-3038cc1a.entry.js.map → dist/bellhop-core/p-cdd593fb.entry.js.map} +0 -0
- /package/{bellhop-core/p-94156013.entry.js.map → dist/bellhop-core/p-d4bfd30d.entry.js.map} +0 -0
- /package/{bellhop-core/p-954b9c38.entry.js.map → dist/bellhop-core/p-dcaa20e2.entry.js.map} +0 -0
- /package/{bellhop-core/p-ec894e11.entry.js.map → dist/bellhop-core/p-dd43d560.entry.js.map} +0 -0
- /package/{bellhop-core/p-4c71a0b6.entry.js.map → dist/bellhop-core/p-e190ac50.entry.js.map} +0 -0
- /package/{bellhop-core/p-f4c4c70d.entry.js.map → dist/bellhop-core/p-e86780b6.entry.js.map} +0 -0
- /package/{bellhop-core/p-71391701.entry.js.map → dist/bellhop-core/p-e99bc91a.entry.js.map} +0 -0
- /package/{bellhop-core/p-0579ce8d.entry.js.map → dist/bellhop-core/p-e9ed7c17.entry.js.map} +0 -0
- /package/{bellhop-core/p-d94b296e.entry.js.map → dist/bellhop-core/p-ef47dcd1.entry.js.map} +0 -0
- /package/{bellhop-core/p-2cc0c4cf.entry.js.map → dist/bellhop-core/p-f6e1b47c.entry.js.map} +0 -0
- /package/{bellhop-core/p-7e67af77.entry.js.map → dist/bellhop-core/p-f7c7416d.entry.js.map} +0 -0
- /package/{cjs → dist/cjs}/bh-accordion.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-appbar.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-autocomplete-menu.bh-tag.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-avatar-add.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-avatar-stacked.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-avatar.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-badge-dot.bh-breadcrumbs.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-badge.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-bar-chart.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-button-icon.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-card-footer.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-card-header.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-card.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-chart-tooltip.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-checkbox-group-item.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-checkbox-group.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-container-footer.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-container.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-date-range-picker-content.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-date-range-picker.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-dropdown-menu.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-featured-icon.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-illustrations.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-input-autocomplete.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-input-number.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-input-password.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-input-verification.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-label.bh-tooltip.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-modal-actions.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-modal-header.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-modal.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-month-picker-content.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-month-picker.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-notification.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-page-navigation-child.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-page-navigation-multi-level.bh-page-navigation-single-level.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-page-navigation.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-pie-chart.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-popover.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-product-switcher.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-property-switcher.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-sidebar.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-tab-item.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-tabs.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-textarea.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-toggle.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/bh-trend-chart.entry.cjs.js.map +0 -0
- /package/{cjs → dist/cjs}/form-9mbajZ3y.js +0 -0
- /package/{cjs → dist/cjs}/form-9mbajZ3y.js.map +0 -0
- /package/{cjs → dist/cjs}/loader.cjs.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-accordion/bh-accordion.css +0 -0
- /package/{collection → dist/collection}/components/bh-accordion/bh-accordion.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-accordion-item/bh-accordion-item.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-appbar/bh-appbar.css +0 -0
- /package/{collection → dist/collection}/components/bh-appbar/bh-appbar.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-autocomplete-menu/bh-autocomplete-menu.css +0 -0
- /package/{collection → dist/collection}/components/bh-autocomplete-menu/bh-autocomplete-menu.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-avatar/bh-avatar.css +0 -0
- /package/{collection → dist/collection}/components/bh-avatar/bh-avatar.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-avatar-add/bh-avatar-add.css +0 -0
- /package/{collection → dist/collection}/components/bh-avatar-add/bh-avatar-add.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-avatar-stacked/bh-avatar-stacked.css +0 -0
- /package/{collection → dist/collection}/components/bh-avatar-stacked/bh-avatar-stacked.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-badge/bh-badge.css +0 -0
- /package/{collection → dist/collection}/components/bh-badge/bh-badge.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-badge-dot/bh-badge-dot.css +0 -0
- /package/{collection → dist/collection}/components/bh-badge-dot/bh-badge-dot.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-bar-chart/bh-bar-chart.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-breadcrumbs/bh-breadcrumbs.css +0 -0
- /package/{collection → dist/collection}/components/bh-breadcrumbs/bh-breadcrumbs.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-button/bh-button.css +0 -0
- /package/{collection → dist/collection}/components/bh-button/bh-button.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-button-icon/bh-button-icon.css +0 -0
- /package/{collection → dist/collection}/components/bh-button-icon/bh-button-icon.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-card/bh-card.css +0 -0
- /package/{collection → dist/collection}/components/bh-card/bh-card.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-card-footer/bh-card-footer.css +0 -0
- /package/{collection → dist/collection}/components/bh-card-footer/bh-card-footer.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-card-header/bh-card-header.css +0 -0
- /package/{collection → dist/collection}/components/bh-card-header/bh-card-header.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-chart-tooltip/bh-chart-tooltip.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-checkbox/bh-checkbox.css +0 -0
- /package/{collection → dist/collection}/components/bh-checkbox-group/bh-checkbox-group.css +0 -0
- /package/{collection → dist/collection}/components/bh-checkbox-group/bh-checkbox-group.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-checkbox-group-item/bh-checkbox-group-item.css +0 -0
- /package/{collection → dist/collection}/components/bh-checkbox-group-item/bh-checkbox-group-item.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-container/bh-container.css +0 -0
- /package/{collection → dist/collection}/components/bh-container/bh-container.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-container-footer/bh-container-footer.css +0 -0
- /package/{collection → dist/collection}/components/bh-container-footer/bh-container-footer.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-date-picker/bh-date-picker.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-date-picker-content/bh-date-picker-content.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-date-range-picker/bh-date-range-picker.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-date-range-picker-content/bh-date-range-picker-content.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-dropdown-menu/bh-dropdown-menu.css +0 -0
- /package/{collection → dist/collection}/components/bh-dropdown-menu/bh-dropdown-menu.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-empty-state/bh-empty-state.css +0 -0
- /package/{collection → dist/collection}/components/bh-empty-state/bh-empty-state.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-featured-icon/bh-featured-icon.css +0 -0
- /package/{collection → dist/collection}/components/bh-featured-icon/bh-featured-icon.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-illustrations/bh-illustrations.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-input-autocomplete/bh-input-autocomplete.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-input-number/bh-input-number.css +0 -0
- /package/{collection → dist/collection}/components/bh-input-number/bh-input-number.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-input-password/bh-input-password.css +0 -0
- /package/{collection → dist/collection}/components/bh-input-password/bh-input-password.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-input-text/bh-input-text.css +0 -0
- /package/{collection → dist/collection}/components/bh-input-text/bh-input-text.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-input-verification/bh-input-verification.css +0 -0
- /package/{collection → dist/collection}/components/bh-input-verification/bh-input-verification.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-label/bh-label.css +0 -0
- /package/{collection → dist/collection}/components/bh-label/bh-label.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-loader-spinner/bh-loader-spinner.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-logo-box/bh-logo-box.css +0 -0
- /package/{collection → dist/collection}/components/bh-modal/bh-modal.css +0 -0
- /package/{collection → dist/collection}/components/bh-modal/bh-modal.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-modal-actions/bh-modal-actions.css +0 -0
- /package/{collection → dist/collection}/components/bh-modal-actions/bh-modal-actions.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-modal-header/bh-modal-header.css +0 -0
- /package/{collection → dist/collection}/components/bh-modal-header/bh-modal-header.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-month-picker/bh-month-picker.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-month-picker-content/bh-month-picker-content.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-notification/bh-notification.css +0 -0
- /package/{collection → dist/collection}/components/bh-notification/bh-notification.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-page-navigation/bh-page-navigation.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-page-navigation-child/bh-page-navigation-child.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-page-navigation-multi-level/bh-page-navigation-multi-level.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-page-navigation-single-level/bh-page-navigation-single-level.css +0 -0
- /package/{collection → dist/collection}/components/bh-page-navigation-single-level/bh-page-navigation-single-level.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-picker-menu/bh-picker-menu.js +0 -0
- /package/{collection → dist/collection}/components/bh-picker-menu/bh-picker-menu.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-pie-chart/bh-pie-chart.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-popover/bh-popover.css +0 -0
- /package/{collection → dist/collection}/components/bh-popover/bh-popover.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-product-switcher/bh-product-switcher.css +0 -0
- /package/{collection → dist/collection}/components/bh-product-switcher/bh-product-switcher.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-property-switcher/bh-property-switcher.css +0 -0
- /package/{collection → dist/collection}/components/bh-property-switcher/bh-property-switcher.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-radio-button/bh-radio-button.css +0 -0
- /package/{collection → dist/collection}/components/bh-radio-button/bh-radio-button.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-sidebar/bh-nav-item.css +0 -0
- /package/{collection → dist/collection}/components/bh-sidebar/bh-nav-item.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-sidebar/bh-sidebar.css +0 -0
- /package/{collection → dist/collection}/components/bh-sidebar/bh-sidebar.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-skeleton-loader/bh-skeleton-loader.css +0 -0
- /package/{collection → dist/collection}/components/bh-skeleton-loader/bh-skeleton-loader.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-tab-item/bh-tab-item.css +0 -0
- /package/{collection → dist/collection}/components/bh-tab-item/bh-tab-item.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-tabs/bh-tabs.css +0 -0
- /package/{collection → dist/collection}/components/bh-tabs/bh-tabs.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-tag/bh-tag.css +0 -0
- /package/{collection → dist/collection}/components/bh-tag/bh-tag.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-textarea/bh-textarea.css +0 -0
- /package/{collection → dist/collection}/components/bh-textarea/bh-textarea.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-toggle/bh-toggle.css +0 -0
- /package/{collection → dist/collection}/components/bh-toggle/bh-toggle.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-tooltip/bh-tooltip.css +0 -0
- /package/{collection → dist/collection}/components/bh-tooltip/bh-tooltip.js.map +0 -0
- /package/{collection → dist/collection}/components/bh-trend-chart/bh-trend-chart.js.map +0 -0
- /package/{collection → dist/collection}/utils/form.js +0 -0
- /package/{collection → dist/collection}/utils/form.js.map +0 -0
- /package/{components → dist/components}/bh-accordion-item.d.ts +0 -0
- /package/{components → dist/components}/bh-accordion.d.ts +0 -0
- /package/{components → dist/components}/bh-accordion.js.map +0 -0
- /package/{components → dist/components}/bh-appbar.d.ts +0 -0
- /package/{components → dist/components}/bh-appbar.js.map +0 -0
- /package/{components → dist/components}/bh-autocomplete-menu.d.ts +0 -0
- /package/{components → dist/components}/bh-autocomplete-menu.js.map +0 -0
- /package/{components → dist/components}/bh-avatar-add.d.ts +0 -0
- /package/{components → dist/components}/bh-avatar-add.js.map +0 -0
- /package/{components → dist/components}/bh-avatar-stacked.d.ts +0 -0
- /package/{components → dist/components}/bh-avatar-stacked.js.map +0 -0
- /package/{components → dist/components}/bh-avatar.d.ts +0 -0
- /package/{components → dist/components}/bh-avatar.js.map +0 -0
- /package/{components → dist/components}/bh-badge-dot.d.ts +0 -0
- /package/{components → dist/components}/bh-badge-dot.js.map +0 -0
- /package/{components → dist/components}/bh-badge.d.ts +0 -0
- /package/{components → dist/components}/bh-badge.js.map +0 -0
- /package/{components → dist/components}/bh-bar-chart.d.ts +0 -0
- /package/{components → dist/components}/bh-bar-chart.js.map +0 -0
- /package/{components → dist/components}/bh-breadcrumbs.d.ts +0 -0
- /package/{components → dist/components}/bh-breadcrumbs.js.map +0 -0
- /package/{components → dist/components}/bh-button-icon.d.ts +0 -0
- /package/{components → dist/components}/bh-button-icon.js.map +0 -0
- /package/{components → dist/components}/bh-button.d.ts +0 -0
- /package/{components → dist/components}/bh-button.js.map +0 -0
- /package/{components → dist/components}/bh-card-footer.d.ts +0 -0
- /package/{components → dist/components}/bh-card-footer.js.map +0 -0
- /package/{components → dist/components}/bh-card-header.d.ts +0 -0
- /package/{components → dist/components}/bh-card-header.js.map +0 -0
- /package/{components → dist/components}/bh-card.d.ts +0 -0
- /package/{components → dist/components}/bh-card.js.map +0 -0
- /package/{components → dist/components}/bh-chart-tooltip.d.ts +0 -0
- /package/{components → dist/components}/bh-chart-tooltip.js.map +0 -0
- /package/{components → dist/components}/bh-checkbox-group-item.d.ts +0 -0
- /package/{components → dist/components}/bh-checkbox-group-item.js.map +0 -0
- /package/{components → dist/components}/bh-checkbox-group.d.ts +0 -0
- /package/{components → dist/components}/bh-checkbox-group.js.map +0 -0
- /package/{components → dist/components}/bh-checkbox.d.ts +0 -0
- /package/{components → dist/components}/bh-checkbox.js.map +0 -0
- /package/{components → dist/components}/bh-container-footer.d.ts +0 -0
- /package/{components → dist/components}/bh-container-footer.js.map +0 -0
- /package/{components → dist/components}/bh-container.d.ts +0 -0
- /package/{components → dist/components}/bh-container.js.map +0 -0
- /package/{components → dist/components}/bh-data-grid.d.ts +0 -0
- /package/{components → dist/components}/bh-data-grid.js.map +0 -0
- /package/{components → dist/components}/bh-date-picker-content.d.ts +0 -0
- /package/{components → dist/components}/bh-date-picker-content.js.map +0 -0
- /package/{components → dist/components}/bh-date-picker.d.ts +0 -0
- /package/{components → dist/components}/bh-date-range-picker-content.d.ts +0 -0
- /package/{components → dist/components}/bh-date-range-picker-content.js.map +0 -0
- /package/{components → dist/components}/bh-date-range-picker.d.ts +0 -0
- /package/{components → dist/components}/bh-date-range-picker.js.map +0 -0
- /package/{components → dist/components}/bh-dropdown-menu.d.ts +0 -0
- /package/{components → dist/components}/bh-dropdown-menu.js.map +0 -0
- /package/{components → dist/components}/bh-dropdown.d.ts +0 -0
- /package/{components → dist/components}/bh-dropdown.js.map +0 -0
- /package/{components → dist/components}/bh-empty-state.d.ts +0 -0
- /package/{components → dist/components}/bh-empty-state.js.map +0 -0
- /package/{components → dist/components}/bh-featured-icon.d.ts +0 -0
- /package/{components → dist/components}/bh-featured-icon.js.map +0 -0
- /package/{components → dist/components}/bh-illustrations.d.ts +0 -0
- /package/{components → dist/components}/bh-illustrations.js.map +0 -0
- /package/{components → dist/components}/bh-input-autocomplete.d.ts +0 -0
- /package/{components → dist/components}/bh-input-autocomplete.js.map +0 -0
- /package/{components → dist/components}/bh-input-number.d.ts +0 -0
- /package/{components → dist/components}/bh-input-number.js.map +0 -0
- /package/{components → dist/components}/bh-input-password.d.ts +0 -0
- /package/{components → dist/components}/bh-input-password.js.map +0 -0
- /package/{components → dist/components}/bh-input-text.d.ts +0 -0
- /package/{components → dist/components}/bh-input-text.js.map +0 -0
- /package/{components → dist/components}/bh-input-verification.d.ts +0 -0
- /package/{components → dist/components}/bh-input-verification.js.map +0 -0
- /package/{components → dist/components}/bh-label.d.ts +0 -0
- /package/{components → dist/components}/bh-label.js.map +0 -0
- /package/{components → dist/components}/bh-loader-spinner.d.ts +0 -0
- /package/{components → dist/components}/bh-loader-spinner.js.map +0 -0
- /package/{components → dist/components}/bh-logo-box.d.ts +0 -0
- /package/{components → dist/components}/bh-logo-box.js.map +0 -0
- /package/{components → dist/components}/bh-modal-actions.d.ts +0 -0
- /package/{components → dist/components}/bh-modal-actions.js.map +0 -0
- /package/{components → dist/components}/bh-modal-header.d.ts +0 -0
- /package/{components → dist/components}/bh-modal-header.js.map +0 -0
- /package/{components → dist/components}/bh-modal.d.ts +0 -0
- /package/{components → dist/components}/bh-modal.js.map +0 -0
- /package/{components → dist/components}/bh-month-picker-content.d.ts +0 -0
- /package/{components → dist/components}/bh-month-picker-content.js.map +0 -0
- /package/{components → dist/components}/bh-month-picker.d.ts +0 -0
- /package/{components → dist/components}/bh-month-picker.js.map +0 -0
- /package/{components → dist/components}/bh-nav-item.d.ts +0 -0
- /package/{components → dist/components}/bh-nav-item.js.map +0 -0
- /package/{components → dist/components}/bh-notification.d.ts +0 -0
- /package/{components → dist/components}/bh-notification.js.map +0 -0
- /package/{components → dist/components}/bh-page-navigation-child.d.ts +0 -0
- /package/{components → dist/components}/bh-page-navigation-child.js.map +0 -0
- /package/{components → dist/components}/bh-page-navigation-multi-level.d.ts +0 -0
- /package/{components → dist/components}/bh-page-navigation-multi-level.js.map +0 -0
- /package/{components → dist/components}/bh-page-navigation-single-level.d.ts +0 -0
- /package/{components → dist/components}/bh-page-navigation-single-level.js.map +0 -0
- /package/{components → dist/components}/bh-page-navigation.d.ts +0 -0
- /package/{components → dist/components}/bh-page-navigation.js.map +0 -0
- /package/{components → dist/components}/bh-picker-menu.d.ts +0 -0
- /package/{components → dist/components}/bh-picker-menu.js.map +0 -0
- /package/{components → dist/components}/bh-pie-chart.d.ts +0 -0
- /package/{components → dist/components}/bh-pie-chart.js.map +0 -0
- /package/{components → dist/components}/bh-popover.d.ts +0 -0
- /package/{components → dist/components}/bh-popover.js.map +0 -0
- /package/{components → dist/components}/bh-product-switcher.d.ts +0 -0
- /package/{components → dist/components}/bh-product-switcher.js.map +0 -0
- /package/{components → dist/components}/bh-property-switcher.d.ts +0 -0
- /package/{components → dist/components}/bh-property-switcher.js.map +0 -0
- /package/{components → dist/components}/bh-radio-button.d.ts +0 -0
- /package/{components → dist/components}/bh-radio-button.js.map +0 -0
- /package/{components → dist/components}/bh-sidebar.d.ts +0 -0
- /package/{components → dist/components}/bh-sidebar.js.map +0 -0
- /package/{components → dist/components}/bh-skeleton-loader.d.ts +0 -0
- /package/{components → dist/components}/bh-tab-item.d.ts +0 -0
- /package/{components → dist/components}/bh-tab-item.js.map +0 -0
- /package/{components → dist/components}/bh-tabs.d.ts +0 -0
- /package/{components → dist/components}/bh-tabs.js.map +0 -0
- /package/{components → dist/components}/bh-tag.d.ts +0 -0
- /package/{components → dist/components}/bh-tag.js.map +0 -0
- /package/{components → dist/components}/bh-textarea.d.ts +0 -0
- /package/{components → dist/components}/bh-textarea.js.map +0 -0
- /package/{components → dist/components}/bh-toggle.d.ts +0 -0
- /package/{components → dist/components}/bh-toggle.js.map +0 -0
- /package/{components → dist/components}/bh-tooltip.d.ts +0 -0
- /package/{components → dist/components}/bh-tooltip.js.map +0 -0
- /package/{components → dist/components}/bh-trend-chart.d.ts +0 -0
- /package/{components → dist/components}/bh-trend-chart.js.map +0 -0
- /package/{components → dist/components}/index.d.ts +0 -0
- /package/{components → dist/components}/p-2KjdCYlS.js +0 -0
- /package/{components → dist/components}/p-2KjdCYlS.js.map +0 -0
- /package/{esm → dist/esm}/bh-accordion.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-appbar.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-autocomplete-menu.bh-tag.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-avatar-add.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-avatar-stacked.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-avatar.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-badge-dot.bh-breadcrumbs.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-badge.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-bar-chart.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-button-icon.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-card-footer.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-card-header.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-card.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-chart-tooltip.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-checkbox-group-item.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-checkbox-group.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-container-footer.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-container.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-date-range-picker-content.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-date-range-picker.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-dropdown-menu.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-featured-icon.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-illustrations.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-input-autocomplete.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-input-number.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-input-password.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-input-verification.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-label.bh-tooltip.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-modal-actions.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-modal-header.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-modal.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-month-picker-content.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-month-picker.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-notification.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-page-navigation-child.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-page-navigation-multi-level.bh-page-navigation-single-level.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-page-navigation.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-pie-chart.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-popover.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-product-switcher.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-property-switcher.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-sidebar.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-tab-item.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-tabs.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-textarea.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-toggle.entry.js.map +0 -0
- /package/{esm → dist/esm}/bh-trend-chart.entry.js.map +0 -0
- /package/{esm → dist/esm}/form-CPgx0iFq.js +0 -0
- /package/{esm → dist/esm}/form-CPgx0iFq.js.map +0 -0
- /package/{esm → dist/esm}/loader.js.map +0 -0
- /package/{index.cjs.js → dist/index.cjs.js} +0 -0
- /package/{index.js → dist/index.js} +0 -0
- /package/{types → dist/types}/components/bh-accordion/bh-accordion.d.ts +0 -0
- /package/{types → dist/types}/components/bh-accordion-item/bh-accordion-item.d.ts +0 -0
- /package/{types → dist/types}/components/bh-appbar/bh-appbar.d.ts +0 -0
- /package/{types → dist/types}/components/bh-autocomplete-menu/bh-autocomplete-menu.d.ts +0 -0
- /package/{types → dist/types}/components/bh-avatar/bh-avatar.d.ts +0 -0
- /package/{types → dist/types}/components/bh-avatar-add/bh-avatar-add.d.ts +0 -0
- /package/{types → dist/types}/components/bh-avatar-stacked/bh-avatar-stacked.d.ts +0 -0
- /package/{types → dist/types}/components/bh-badge/bh-badge.d.ts +0 -0
- /package/{types → dist/types}/components/bh-badge-dot/bh-badge-dot.d.ts +0 -0
- /package/{types → dist/types}/components/bh-bar-chart/bh-bar-chart.d.ts +0 -0
- /package/{types → dist/types}/components/bh-breadcrumbs/bh-breadcrumbs.d.ts +0 -0
- /package/{types → dist/types}/components/bh-button/bh-button.d.ts +0 -0
- /package/{types → dist/types}/components/bh-button-icon/bh-button-icon.d.ts +0 -0
- /package/{types → dist/types}/components/bh-card/bh-card.d.ts +0 -0
- /package/{types → dist/types}/components/bh-card-footer/bh-card-footer.d.ts +0 -0
- /package/{types → dist/types}/components/bh-card-header/bh-card-header.d.ts +0 -0
- /package/{types → dist/types}/components/bh-chart-tooltip/bh-chart-tooltip.d.ts +0 -0
- /package/{types → dist/types}/components/bh-checkbox-group/bh-checkbox-group.d.ts +0 -0
- /package/{types → dist/types}/components/bh-checkbox-group-item/bh-checkbox-group-item.d.ts +0 -0
- /package/{types → dist/types}/components/bh-container/bh-container.d.ts +0 -0
- /package/{types → dist/types}/components/bh-container-footer/bh-container-footer.d.ts +0 -0
- /package/{types → dist/types}/components/bh-date-picker/bh-date-picker.d.ts +0 -0
- /package/{types → dist/types}/components/bh-date-picker-content/bh-date-picker-content.d.ts +0 -0
- /package/{types → dist/types}/components/bh-date-range-picker/bh-date-range-picker.d.ts +0 -0
- /package/{types → dist/types}/components/bh-date-range-picker-content/bh-date-range-picker-content.d.ts +0 -0
- /package/{types → dist/types}/components/bh-dropdown-menu/bh-dropdown-menu.d.ts +0 -0
- /package/{types → dist/types}/components/bh-empty-state/bh-empty-state.d.ts +0 -0
- /package/{types → dist/types}/components/bh-featured-icon/bh-featured-icon.d.ts +0 -0
- /package/{types → dist/types}/components/bh-illustrations/bh-illustrations.d.ts +0 -0
- /package/{types → dist/types}/components/bh-input-autocomplete/bh-input-autocomplete.d.ts +0 -0
- /package/{types → dist/types}/components/bh-input-number/bh-input-number.d.ts +0 -0
- /package/{types → dist/types}/components/bh-input-password/bh-input-password.d.ts +0 -0
- /package/{types → dist/types}/components/bh-input-text/bh-input-text.d.ts +0 -0
- /package/{types → dist/types}/components/bh-input-verification/bh-input-verification.d.ts +0 -0
- /package/{types → dist/types}/components/bh-label/bh-label.d.ts +0 -0
- /package/{types → dist/types}/components/bh-loader-spinner/bh-loader-spinner.d.ts +0 -0
- /package/{types → dist/types}/components/bh-modal/bh-modal.d.ts +0 -0
- /package/{types → dist/types}/components/bh-modal-actions/bh-modal-actions.d.ts +0 -0
- /package/{types → dist/types}/components/bh-modal-header/bh-modal-header.d.ts +0 -0
- /package/{types → dist/types}/components/bh-month-picker/bh-month-picker.d.ts +0 -0
- /package/{types → dist/types}/components/bh-month-picker-content/bh-month-picker-content.d.ts +0 -0
- /package/{types → dist/types}/components/bh-notification/bh-notification.d.ts +0 -0
- /package/{types → dist/types}/components/bh-page-navigation/bh-page-navigation.d.ts +0 -0
- /package/{types → dist/types}/components/bh-page-navigation-child/bh-page-navigation-child.d.ts +0 -0
- /package/{types → dist/types}/components/bh-page-navigation-multi-level/bh-page-navigation-multi-level.d.ts +0 -0
- /package/{types → dist/types}/components/bh-page-navigation-single-level/bh-page-navigation-single-level.d.ts +0 -0
- /package/{types → dist/types}/components/bh-picker-menu/bh-picker-menu.d.ts +0 -0
- /package/{types → dist/types}/components/bh-pie-chart/bh-pie-chart.d.ts +0 -0
- /package/{types → dist/types}/components/bh-popover/bh-popover.d.ts +0 -0
- /package/{types → dist/types}/components/bh-product-switcher/bh-product-switcher.d.ts +0 -0
- /package/{types → dist/types}/components/bh-property-switcher/bh-property-switcher.d.ts +0 -0
- /package/{types → dist/types}/components/bh-radio-button/bh-radio-button.d.ts +0 -0
- /package/{types → dist/types}/components/bh-sidebar/bh-nav-item.d.ts +0 -0
- /package/{types → dist/types}/components/bh-sidebar/bh-sidebar.d.ts +0 -0
- /package/{types → dist/types}/components/bh-skeleton-loader/bh-skeleton-loader.d.ts +0 -0
- /package/{types → dist/types}/components/bh-tab-item/bh-tab-item.d.ts +0 -0
- /package/{types → dist/types}/components/bh-tabs/bh-tabs.d.ts +0 -0
- /package/{types → dist/types}/components/bh-tag/bh-tag.d.ts +0 -0
- /package/{types → dist/types}/components/bh-textarea/bh-textarea.d.ts +0 -0
- /package/{types → dist/types}/components/bh-toggle/bh-toggle.d.ts +0 -0
- /package/{types → dist/types}/components/bh-tooltip/bh-tooltip.d.ts +0 -0
- /package/{types → dist/types}/components/bh-trend-chart/bh-trend-chart.d.ts +0 -0
- /package/{types → dist/types}/stencil-public-runtime.d.ts +0 -0
- /package/{types → dist/types}/utils/form.d.ts +0 -0
|
@@ -0,0 +1,4357 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, c as createEvent, f as forceUpdate, h } from './p-ChfLhYiJ.js';
|
|
2
|
+
import { d as defineCustomElement$9 } from './p-BFhwq3_y.js';
|
|
3
|
+
import { d as defineCustomElement$8 } from './p-C69LfZib.js';
|
|
4
|
+
import { d as defineCustomElement$7 } from './p-DAp7fLS-.js';
|
|
5
|
+
import { d as defineCustomElement$6 } from './p-DufL1yr4.js';
|
|
6
|
+
import { d as defineCustomElement$5 } from './p-DkGh2r0W.js';
|
|
7
|
+
import { d as defineCustomElement$4 } from './p-CbeeTFys.js';
|
|
8
|
+
import { d as defineCustomElement$3 } from './p-BZELvMID.js';
|
|
9
|
+
import { d as defineCustomElement$2 } from './p-BaLh9-zk.js';
|
|
10
|
+
import { d as defineCustomElement$1 } from './p-5LJWVh2v.js';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* table-core
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) TanStack
|
|
16
|
+
*
|
|
17
|
+
* This source code is licensed under the MIT license found in the
|
|
18
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
19
|
+
*
|
|
20
|
+
* @license MIT
|
|
21
|
+
*/
|
|
22
|
+
// type Person = {
|
|
23
|
+
// firstName: string
|
|
24
|
+
// lastName: string
|
|
25
|
+
// age: number
|
|
26
|
+
// visits: number
|
|
27
|
+
// status: string
|
|
28
|
+
// progress: number
|
|
29
|
+
// createdAt: Date
|
|
30
|
+
// nested: {
|
|
31
|
+
// foo: [
|
|
32
|
+
// {
|
|
33
|
+
// bar: 'bar'
|
|
34
|
+
// }
|
|
35
|
+
// ]
|
|
36
|
+
// bar: { subBar: boolean }[]
|
|
37
|
+
// baz: {
|
|
38
|
+
// foo: 'foo'
|
|
39
|
+
// bar: {
|
|
40
|
+
// baz: 'baz'
|
|
41
|
+
// }
|
|
42
|
+
// }
|
|
43
|
+
// }
|
|
44
|
+
// }
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
// Is this type a tuple?
|
|
48
|
+
|
|
49
|
+
// If this type is a tuple, what indices are allowed?
|
|
50
|
+
|
|
51
|
+
///
|
|
52
|
+
|
|
53
|
+
function functionalUpdate(updater, input) {
|
|
54
|
+
return typeof updater === 'function' ? updater(input) : updater;
|
|
55
|
+
}
|
|
56
|
+
function makeStateUpdater(key, instance) {
|
|
57
|
+
return updater => {
|
|
58
|
+
instance.setState(old => {
|
|
59
|
+
return {
|
|
60
|
+
...old,
|
|
61
|
+
[key]: functionalUpdate(updater, old[key])
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function isFunction(d) {
|
|
67
|
+
return d instanceof Function;
|
|
68
|
+
}
|
|
69
|
+
function isNumberArray(d) {
|
|
70
|
+
return Array.isArray(d) && d.every(val => typeof val === 'number');
|
|
71
|
+
}
|
|
72
|
+
function flattenBy(arr, getChildren) {
|
|
73
|
+
const flat = [];
|
|
74
|
+
const recurse = subArr => {
|
|
75
|
+
subArr.forEach(item => {
|
|
76
|
+
flat.push(item);
|
|
77
|
+
const children = getChildren(item);
|
|
78
|
+
if (children != null && children.length) {
|
|
79
|
+
recurse(children);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
recurse(arr);
|
|
84
|
+
return flat;
|
|
85
|
+
}
|
|
86
|
+
function memo(getDeps, fn, opts) {
|
|
87
|
+
let deps = [];
|
|
88
|
+
let result;
|
|
89
|
+
return depArgs => {
|
|
90
|
+
let depTime;
|
|
91
|
+
if (opts.key && opts.debug) depTime = Date.now();
|
|
92
|
+
const newDeps = getDeps(depArgs);
|
|
93
|
+
const depsChanged = newDeps.length !== deps.length || newDeps.some((dep, index) => deps[index] !== dep);
|
|
94
|
+
if (!depsChanged) {
|
|
95
|
+
return result;
|
|
96
|
+
}
|
|
97
|
+
deps = newDeps;
|
|
98
|
+
let resultTime;
|
|
99
|
+
if (opts.key && opts.debug) resultTime = Date.now();
|
|
100
|
+
result = fn(...newDeps);
|
|
101
|
+
opts == null || opts.onChange == null || opts.onChange(result);
|
|
102
|
+
if (opts.key && opts.debug) {
|
|
103
|
+
if (opts != null && opts.debug()) {
|
|
104
|
+
const depEndTime = Math.round((Date.now() - depTime) * 100) / 100;
|
|
105
|
+
const resultEndTime = Math.round((Date.now() - resultTime) * 100) / 100;
|
|
106
|
+
const resultFpsPercentage = resultEndTime / 16;
|
|
107
|
+
const pad = (str, num) => {
|
|
108
|
+
str = String(str);
|
|
109
|
+
while (str.length < num) {
|
|
110
|
+
str = ' ' + str;
|
|
111
|
+
}
|
|
112
|
+
return str;
|
|
113
|
+
};
|
|
114
|
+
console.info(`%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`, `
|
|
115
|
+
font-size: .6rem;
|
|
116
|
+
font-weight: bold;
|
|
117
|
+
color: hsl(${Math.max(0, Math.min(120 - 120 * resultFpsPercentage, 120))}deg 100% 31%);`, opts == null ? void 0 : opts.key);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return result;
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
function getMemoOptions(tableOptions, debugLevel, key, onChange) {
|
|
124
|
+
return {
|
|
125
|
+
debug: () => {
|
|
126
|
+
var _tableOptions$debugAl;
|
|
127
|
+
return (_tableOptions$debugAl = tableOptions == null ? void 0 : tableOptions.debugAll) != null ? _tableOptions$debugAl : tableOptions[debugLevel];
|
|
128
|
+
},
|
|
129
|
+
key: "production" === 'development',
|
|
130
|
+
onChange
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function createCell(table, row, column, columnId) {
|
|
135
|
+
const getRenderValue = () => {
|
|
136
|
+
var _cell$getValue;
|
|
137
|
+
return (_cell$getValue = cell.getValue()) != null ? _cell$getValue : table.options.renderFallbackValue;
|
|
138
|
+
};
|
|
139
|
+
const cell = {
|
|
140
|
+
id: `${row.id}_${column.id}`,
|
|
141
|
+
row,
|
|
142
|
+
column,
|
|
143
|
+
getValue: () => row.getValue(columnId),
|
|
144
|
+
renderValue: getRenderValue,
|
|
145
|
+
getContext: memo(() => [table, column, row, cell], (table, column, row, cell) => ({
|
|
146
|
+
table,
|
|
147
|
+
column,
|
|
148
|
+
row,
|
|
149
|
+
cell: cell,
|
|
150
|
+
getValue: cell.getValue,
|
|
151
|
+
renderValue: cell.renderValue
|
|
152
|
+
}), getMemoOptions(table.options, 'debugCells'))
|
|
153
|
+
};
|
|
154
|
+
table._features.forEach(feature => {
|
|
155
|
+
feature.createCell == null || feature.createCell(cell, column, row, table);
|
|
156
|
+
}, {});
|
|
157
|
+
return cell;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function createColumn(table, columnDef, depth, parent) {
|
|
161
|
+
var _ref, _resolvedColumnDef$id;
|
|
162
|
+
const defaultColumn = table._getDefaultColumnDef();
|
|
163
|
+
const resolvedColumnDef = {
|
|
164
|
+
...defaultColumn,
|
|
165
|
+
...columnDef
|
|
166
|
+
};
|
|
167
|
+
const accessorKey = resolvedColumnDef.accessorKey;
|
|
168
|
+
let id = (_ref = (_resolvedColumnDef$id = resolvedColumnDef.id) != null ? _resolvedColumnDef$id : accessorKey ? typeof String.prototype.replaceAll === 'function' ? accessorKey.replaceAll('.', '_') : accessorKey.replace(/\./g, '_') : undefined) != null ? _ref : typeof resolvedColumnDef.header === 'string' ? resolvedColumnDef.header : undefined;
|
|
169
|
+
let accessorFn;
|
|
170
|
+
if (resolvedColumnDef.accessorFn) {
|
|
171
|
+
accessorFn = resolvedColumnDef.accessorFn;
|
|
172
|
+
} else if (accessorKey) {
|
|
173
|
+
// Support deep accessor keys
|
|
174
|
+
if (accessorKey.includes('.')) {
|
|
175
|
+
accessorFn = originalRow => {
|
|
176
|
+
let result = originalRow;
|
|
177
|
+
for (const key of accessorKey.split('.')) {
|
|
178
|
+
var _result;
|
|
179
|
+
result = (_result = result) == null ? void 0 : _result[key];
|
|
180
|
+
}
|
|
181
|
+
return result;
|
|
182
|
+
};
|
|
183
|
+
} else {
|
|
184
|
+
accessorFn = originalRow => originalRow[resolvedColumnDef.accessorKey];
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
if (!id) {
|
|
188
|
+
throw new Error();
|
|
189
|
+
}
|
|
190
|
+
let column = {
|
|
191
|
+
id: `${String(id)}`,
|
|
192
|
+
accessorFn,
|
|
193
|
+
parent: parent,
|
|
194
|
+
depth,
|
|
195
|
+
columnDef: resolvedColumnDef,
|
|
196
|
+
columns: [],
|
|
197
|
+
getFlatColumns: memo(() => [true], () => {
|
|
198
|
+
var _column$columns;
|
|
199
|
+
return [column, ...((_column$columns = column.columns) == null ? void 0 : _column$columns.flatMap(d => d.getFlatColumns()))];
|
|
200
|
+
}, getMemoOptions(table.options, 'debugColumns')),
|
|
201
|
+
getLeafColumns: memo(() => [table._getOrderColumnsFn()], orderColumns => {
|
|
202
|
+
var _column$columns2;
|
|
203
|
+
if ((_column$columns2 = column.columns) != null && _column$columns2.length) {
|
|
204
|
+
let leafColumns = column.columns.flatMap(column => column.getLeafColumns());
|
|
205
|
+
return orderColumns(leafColumns);
|
|
206
|
+
}
|
|
207
|
+
return [column];
|
|
208
|
+
}, getMemoOptions(table.options, 'debugColumns'))
|
|
209
|
+
};
|
|
210
|
+
for (const feature of table._features) {
|
|
211
|
+
feature.createColumn == null || feature.createColumn(column, table);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Yes, we have to convert table to unknown, because we know more than the compiler here.
|
|
215
|
+
return column;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
const debug = 'debugHeaders';
|
|
219
|
+
//
|
|
220
|
+
|
|
221
|
+
function createHeader(table, column, options) {
|
|
222
|
+
var _options$id;
|
|
223
|
+
const id = (_options$id = options.id) != null ? _options$id : column.id;
|
|
224
|
+
let header = {
|
|
225
|
+
id,
|
|
226
|
+
column,
|
|
227
|
+
index: options.index,
|
|
228
|
+
isPlaceholder: !!options.isPlaceholder,
|
|
229
|
+
placeholderId: options.placeholderId,
|
|
230
|
+
depth: options.depth,
|
|
231
|
+
subHeaders: [],
|
|
232
|
+
colSpan: 0,
|
|
233
|
+
rowSpan: 0,
|
|
234
|
+
headerGroup: null,
|
|
235
|
+
getLeafHeaders: () => {
|
|
236
|
+
const leafHeaders = [];
|
|
237
|
+
const recurseHeader = h => {
|
|
238
|
+
if (h.subHeaders && h.subHeaders.length) {
|
|
239
|
+
h.subHeaders.map(recurseHeader);
|
|
240
|
+
}
|
|
241
|
+
leafHeaders.push(h);
|
|
242
|
+
};
|
|
243
|
+
recurseHeader(header);
|
|
244
|
+
return leafHeaders;
|
|
245
|
+
},
|
|
246
|
+
getContext: () => ({
|
|
247
|
+
table,
|
|
248
|
+
header: header,
|
|
249
|
+
column
|
|
250
|
+
})
|
|
251
|
+
};
|
|
252
|
+
table._features.forEach(feature => {
|
|
253
|
+
feature.createHeader == null || feature.createHeader(header, table);
|
|
254
|
+
});
|
|
255
|
+
return header;
|
|
256
|
+
}
|
|
257
|
+
const Headers = {
|
|
258
|
+
createTable: table => {
|
|
259
|
+
// Header Groups
|
|
260
|
+
|
|
261
|
+
table.getHeaderGroups = memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allColumns, leafColumns, left, right) => {
|
|
262
|
+
var _left$map$filter, _right$map$filter;
|
|
263
|
+
const leftColumns = (_left$map$filter = left == null ? void 0 : left.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _left$map$filter : [];
|
|
264
|
+
const rightColumns = (_right$map$filter = right == null ? void 0 : right.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _right$map$filter : [];
|
|
265
|
+
const centerColumns = leafColumns.filter(column => !(left != null && left.includes(column.id)) && !(right != null && right.includes(column.id)));
|
|
266
|
+
const headerGroups = buildHeaderGroups(allColumns, [...leftColumns, ...centerColumns, ...rightColumns], table);
|
|
267
|
+
return headerGroups;
|
|
268
|
+
}, getMemoOptions(table.options, debug));
|
|
269
|
+
table.getCenterHeaderGroups = memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allColumns, leafColumns, left, right) => {
|
|
270
|
+
leafColumns = leafColumns.filter(column => !(left != null && left.includes(column.id)) && !(right != null && right.includes(column.id)));
|
|
271
|
+
return buildHeaderGroups(allColumns, leafColumns, table, 'center');
|
|
272
|
+
}, getMemoOptions(table.options, debug));
|
|
273
|
+
table.getLeftHeaderGroups = memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.left], (allColumns, leafColumns, left) => {
|
|
274
|
+
var _left$map$filter2;
|
|
275
|
+
const orderedLeafColumns = (_left$map$filter2 = left == null ? void 0 : left.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _left$map$filter2 : [];
|
|
276
|
+
return buildHeaderGroups(allColumns, orderedLeafColumns, table, 'left');
|
|
277
|
+
}, getMemoOptions(table.options, debug));
|
|
278
|
+
table.getRightHeaderGroups = memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.right], (allColumns, leafColumns, right) => {
|
|
279
|
+
var _right$map$filter2;
|
|
280
|
+
const orderedLeafColumns = (_right$map$filter2 = right == null ? void 0 : right.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _right$map$filter2 : [];
|
|
281
|
+
return buildHeaderGroups(allColumns, orderedLeafColumns, table, 'right');
|
|
282
|
+
}, getMemoOptions(table.options, debug));
|
|
283
|
+
|
|
284
|
+
// Footer Groups
|
|
285
|
+
|
|
286
|
+
table.getFooterGroups = memo(() => [table.getHeaderGroups()], headerGroups => {
|
|
287
|
+
return [...headerGroups].reverse();
|
|
288
|
+
}, getMemoOptions(table.options, debug));
|
|
289
|
+
table.getLeftFooterGroups = memo(() => [table.getLeftHeaderGroups()], headerGroups => {
|
|
290
|
+
return [...headerGroups].reverse();
|
|
291
|
+
}, getMemoOptions(table.options, debug));
|
|
292
|
+
table.getCenterFooterGroups = memo(() => [table.getCenterHeaderGroups()], headerGroups => {
|
|
293
|
+
return [...headerGroups].reverse();
|
|
294
|
+
}, getMemoOptions(table.options, debug));
|
|
295
|
+
table.getRightFooterGroups = memo(() => [table.getRightHeaderGroups()], headerGroups => {
|
|
296
|
+
return [...headerGroups].reverse();
|
|
297
|
+
}, getMemoOptions(table.options, debug));
|
|
298
|
+
|
|
299
|
+
// Flat Headers
|
|
300
|
+
|
|
301
|
+
table.getFlatHeaders = memo(() => [table.getHeaderGroups()], headerGroups => {
|
|
302
|
+
return headerGroups.map(headerGroup => {
|
|
303
|
+
return headerGroup.headers;
|
|
304
|
+
}).flat();
|
|
305
|
+
}, getMemoOptions(table.options, debug));
|
|
306
|
+
table.getLeftFlatHeaders = memo(() => [table.getLeftHeaderGroups()], left => {
|
|
307
|
+
return left.map(headerGroup => {
|
|
308
|
+
return headerGroup.headers;
|
|
309
|
+
}).flat();
|
|
310
|
+
}, getMemoOptions(table.options, debug));
|
|
311
|
+
table.getCenterFlatHeaders = memo(() => [table.getCenterHeaderGroups()], left => {
|
|
312
|
+
return left.map(headerGroup => {
|
|
313
|
+
return headerGroup.headers;
|
|
314
|
+
}).flat();
|
|
315
|
+
}, getMemoOptions(table.options, debug));
|
|
316
|
+
table.getRightFlatHeaders = memo(() => [table.getRightHeaderGroups()], left => {
|
|
317
|
+
return left.map(headerGroup => {
|
|
318
|
+
return headerGroup.headers;
|
|
319
|
+
}).flat();
|
|
320
|
+
}, getMemoOptions(table.options, debug));
|
|
321
|
+
|
|
322
|
+
// Leaf Headers
|
|
323
|
+
|
|
324
|
+
table.getCenterLeafHeaders = memo(() => [table.getCenterFlatHeaders()], flatHeaders => {
|
|
325
|
+
return flatHeaders.filter(header => {
|
|
326
|
+
var _header$subHeaders;
|
|
327
|
+
return !((_header$subHeaders = header.subHeaders) != null && _header$subHeaders.length);
|
|
328
|
+
});
|
|
329
|
+
}, getMemoOptions(table.options, debug));
|
|
330
|
+
table.getLeftLeafHeaders = memo(() => [table.getLeftFlatHeaders()], flatHeaders => {
|
|
331
|
+
return flatHeaders.filter(header => {
|
|
332
|
+
var _header$subHeaders2;
|
|
333
|
+
return !((_header$subHeaders2 = header.subHeaders) != null && _header$subHeaders2.length);
|
|
334
|
+
});
|
|
335
|
+
}, getMemoOptions(table.options, debug));
|
|
336
|
+
table.getRightLeafHeaders = memo(() => [table.getRightFlatHeaders()], flatHeaders => {
|
|
337
|
+
return flatHeaders.filter(header => {
|
|
338
|
+
var _header$subHeaders3;
|
|
339
|
+
return !((_header$subHeaders3 = header.subHeaders) != null && _header$subHeaders3.length);
|
|
340
|
+
});
|
|
341
|
+
}, getMemoOptions(table.options, debug));
|
|
342
|
+
table.getLeafHeaders = memo(() => [table.getLeftHeaderGroups(), table.getCenterHeaderGroups(), table.getRightHeaderGroups()], (left, center, right) => {
|
|
343
|
+
var _left$0$headers, _left$, _center$0$headers, _center$, _right$0$headers, _right$;
|
|
344
|
+
return [...((_left$0$headers = (_left$ = left[0]) == null ? void 0 : _left$.headers) != null ? _left$0$headers : []), ...((_center$0$headers = (_center$ = center[0]) == null ? void 0 : _center$.headers) != null ? _center$0$headers : []), ...((_right$0$headers = (_right$ = right[0]) == null ? void 0 : _right$.headers) != null ? _right$0$headers : [])].map(header => {
|
|
345
|
+
return header.getLeafHeaders();
|
|
346
|
+
}).flat();
|
|
347
|
+
}, getMemoOptions(table.options, debug));
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
function buildHeaderGroups(allColumns, columnsToGroup, table, headerFamily) {
|
|
351
|
+
var _headerGroups$0$heade, _headerGroups$;
|
|
352
|
+
// Find the max depth of the columns:
|
|
353
|
+
// build the leaf column row
|
|
354
|
+
// build each buffer row going up
|
|
355
|
+
// placeholder for non-existent level
|
|
356
|
+
// real column for existing level
|
|
357
|
+
|
|
358
|
+
let maxDepth = 0;
|
|
359
|
+
const findMaxDepth = function (columns, depth) {
|
|
360
|
+
if (depth === void 0) {
|
|
361
|
+
depth = 1;
|
|
362
|
+
}
|
|
363
|
+
maxDepth = Math.max(maxDepth, depth);
|
|
364
|
+
columns.filter(column => column.getIsVisible()).forEach(column => {
|
|
365
|
+
var _column$columns;
|
|
366
|
+
if ((_column$columns = column.columns) != null && _column$columns.length) {
|
|
367
|
+
findMaxDepth(column.columns, depth + 1);
|
|
368
|
+
}
|
|
369
|
+
}, 0);
|
|
370
|
+
};
|
|
371
|
+
findMaxDepth(allColumns);
|
|
372
|
+
let headerGroups = [];
|
|
373
|
+
const createHeaderGroup = (headersToGroup, depth) => {
|
|
374
|
+
// The header group we are creating
|
|
375
|
+
const headerGroup = {
|
|
376
|
+
depth,
|
|
377
|
+
id: [headerFamily, `${depth}`].filter(Boolean).join('_'),
|
|
378
|
+
headers: []
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
// The parent columns we're going to scan next
|
|
382
|
+
const pendingParentHeaders = [];
|
|
383
|
+
|
|
384
|
+
// Scan each column for parents
|
|
385
|
+
headersToGroup.forEach(headerToGroup => {
|
|
386
|
+
// What is the latest (last) parent column?
|
|
387
|
+
|
|
388
|
+
const latestPendingParentHeader = [...pendingParentHeaders].reverse()[0];
|
|
389
|
+
const isLeafHeader = headerToGroup.column.depth === headerGroup.depth;
|
|
390
|
+
let column;
|
|
391
|
+
let isPlaceholder = false;
|
|
392
|
+
if (isLeafHeader && headerToGroup.column.parent) {
|
|
393
|
+
// The parent header is new
|
|
394
|
+
column = headerToGroup.column.parent;
|
|
395
|
+
} else {
|
|
396
|
+
// The parent header is repeated
|
|
397
|
+
column = headerToGroup.column;
|
|
398
|
+
isPlaceholder = true;
|
|
399
|
+
}
|
|
400
|
+
if (latestPendingParentHeader && (latestPendingParentHeader == null ? void 0 : latestPendingParentHeader.column) === column) {
|
|
401
|
+
// This column is repeated. Add it as a sub header to the next batch
|
|
402
|
+
latestPendingParentHeader.subHeaders.push(headerToGroup);
|
|
403
|
+
} else {
|
|
404
|
+
// This is a new header. Let's create it
|
|
405
|
+
const header = createHeader(table, column, {
|
|
406
|
+
id: [headerFamily, depth, column.id, headerToGroup == null ? void 0 : headerToGroup.id].filter(Boolean).join('_'),
|
|
407
|
+
isPlaceholder,
|
|
408
|
+
placeholderId: isPlaceholder ? `${pendingParentHeaders.filter(d => d.column === column).length}` : undefined,
|
|
409
|
+
depth,
|
|
410
|
+
index: pendingParentHeaders.length
|
|
411
|
+
});
|
|
412
|
+
|
|
413
|
+
// Add the headerToGroup as a subHeader of the new header
|
|
414
|
+
header.subHeaders.push(headerToGroup);
|
|
415
|
+
// Add the new header to the pendingParentHeaders to get grouped
|
|
416
|
+
// in the next batch
|
|
417
|
+
pendingParentHeaders.push(header);
|
|
418
|
+
}
|
|
419
|
+
headerGroup.headers.push(headerToGroup);
|
|
420
|
+
headerToGroup.headerGroup = headerGroup;
|
|
421
|
+
});
|
|
422
|
+
headerGroups.push(headerGroup);
|
|
423
|
+
if (depth > 0) {
|
|
424
|
+
createHeaderGroup(pendingParentHeaders, depth - 1);
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
const bottomHeaders = columnsToGroup.map((column, index) => createHeader(table, column, {
|
|
428
|
+
depth: maxDepth,
|
|
429
|
+
index
|
|
430
|
+
}));
|
|
431
|
+
createHeaderGroup(bottomHeaders, maxDepth - 1);
|
|
432
|
+
headerGroups.reverse();
|
|
433
|
+
|
|
434
|
+
// headerGroups = headerGroups.filter(headerGroup => {
|
|
435
|
+
// return !headerGroup.headers.every(header => header.isPlaceholder)
|
|
436
|
+
// })
|
|
437
|
+
|
|
438
|
+
const recurseHeadersForSpans = headers => {
|
|
439
|
+
const filteredHeaders = headers.filter(header => header.column.getIsVisible());
|
|
440
|
+
return filteredHeaders.map(header => {
|
|
441
|
+
let colSpan = 0;
|
|
442
|
+
let rowSpan = 0;
|
|
443
|
+
let childRowSpans = [0];
|
|
444
|
+
if (header.subHeaders && header.subHeaders.length) {
|
|
445
|
+
childRowSpans = [];
|
|
446
|
+
recurseHeadersForSpans(header.subHeaders).forEach(_ref => {
|
|
447
|
+
let {
|
|
448
|
+
colSpan: childColSpan,
|
|
449
|
+
rowSpan: childRowSpan
|
|
450
|
+
} = _ref;
|
|
451
|
+
colSpan += childColSpan;
|
|
452
|
+
childRowSpans.push(childRowSpan);
|
|
453
|
+
});
|
|
454
|
+
} else {
|
|
455
|
+
colSpan = 1;
|
|
456
|
+
}
|
|
457
|
+
const minChildRowSpan = Math.min(...childRowSpans);
|
|
458
|
+
rowSpan = rowSpan + minChildRowSpan;
|
|
459
|
+
header.colSpan = colSpan;
|
|
460
|
+
header.rowSpan = rowSpan;
|
|
461
|
+
return {
|
|
462
|
+
colSpan,
|
|
463
|
+
rowSpan
|
|
464
|
+
};
|
|
465
|
+
});
|
|
466
|
+
};
|
|
467
|
+
recurseHeadersForSpans((_headerGroups$0$heade = (_headerGroups$ = headerGroups[0]) == null ? void 0 : _headerGroups$.headers) != null ? _headerGroups$0$heade : []);
|
|
468
|
+
return headerGroups;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
const createRow = (table, id, original, rowIndex, depth, subRows, parentId) => {
|
|
472
|
+
let row = {
|
|
473
|
+
id,
|
|
474
|
+
index: rowIndex,
|
|
475
|
+
original,
|
|
476
|
+
depth,
|
|
477
|
+
parentId,
|
|
478
|
+
_valuesCache: {},
|
|
479
|
+
_uniqueValuesCache: {},
|
|
480
|
+
getValue: columnId => {
|
|
481
|
+
if (row._valuesCache.hasOwnProperty(columnId)) {
|
|
482
|
+
return row._valuesCache[columnId];
|
|
483
|
+
}
|
|
484
|
+
const column = table.getColumn(columnId);
|
|
485
|
+
if (!(column != null && column.accessorFn)) {
|
|
486
|
+
return undefined;
|
|
487
|
+
}
|
|
488
|
+
row._valuesCache[columnId] = column.accessorFn(row.original, rowIndex);
|
|
489
|
+
return row._valuesCache[columnId];
|
|
490
|
+
},
|
|
491
|
+
getUniqueValues: columnId => {
|
|
492
|
+
if (row._uniqueValuesCache.hasOwnProperty(columnId)) {
|
|
493
|
+
return row._uniqueValuesCache[columnId];
|
|
494
|
+
}
|
|
495
|
+
const column = table.getColumn(columnId);
|
|
496
|
+
if (!(column != null && column.accessorFn)) {
|
|
497
|
+
return undefined;
|
|
498
|
+
}
|
|
499
|
+
if (!column.columnDef.getUniqueValues) {
|
|
500
|
+
row._uniqueValuesCache[columnId] = [row.getValue(columnId)];
|
|
501
|
+
return row._uniqueValuesCache[columnId];
|
|
502
|
+
}
|
|
503
|
+
row._uniqueValuesCache[columnId] = column.columnDef.getUniqueValues(row.original, rowIndex);
|
|
504
|
+
return row._uniqueValuesCache[columnId];
|
|
505
|
+
},
|
|
506
|
+
renderValue: columnId => {
|
|
507
|
+
var _row$getValue;
|
|
508
|
+
return (_row$getValue = row.getValue(columnId)) != null ? _row$getValue : table.options.renderFallbackValue;
|
|
509
|
+
},
|
|
510
|
+
subRows: subRows != null ? subRows : [],
|
|
511
|
+
getLeafRows: () => flattenBy(row.subRows, d => d.subRows),
|
|
512
|
+
getParentRow: () => row.parentId ? table.getRow(row.parentId, true) : undefined,
|
|
513
|
+
getParentRows: () => {
|
|
514
|
+
let parentRows = [];
|
|
515
|
+
let currentRow = row;
|
|
516
|
+
while (true) {
|
|
517
|
+
const parentRow = currentRow.getParentRow();
|
|
518
|
+
if (!parentRow) break;
|
|
519
|
+
parentRows.push(parentRow);
|
|
520
|
+
currentRow = parentRow;
|
|
521
|
+
}
|
|
522
|
+
return parentRows.reverse();
|
|
523
|
+
},
|
|
524
|
+
getAllCells: memo(() => [table.getAllLeafColumns()], leafColumns => {
|
|
525
|
+
return leafColumns.map(column => {
|
|
526
|
+
return createCell(table, row, column, column.id);
|
|
527
|
+
});
|
|
528
|
+
}, getMemoOptions(table.options, 'debugRows')),
|
|
529
|
+
_getAllCellsByColumnId: memo(() => [row.getAllCells()], allCells => {
|
|
530
|
+
return allCells.reduce((acc, cell) => {
|
|
531
|
+
acc[cell.column.id] = cell;
|
|
532
|
+
return acc;
|
|
533
|
+
}, {});
|
|
534
|
+
}, getMemoOptions(table.options, 'debugRows'))
|
|
535
|
+
};
|
|
536
|
+
for (let i = 0; i < table._features.length; i++) {
|
|
537
|
+
const feature = table._features[i];
|
|
538
|
+
feature == null || feature.createRow == null || feature.createRow(row, table);
|
|
539
|
+
}
|
|
540
|
+
return row;
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
//
|
|
544
|
+
|
|
545
|
+
const ColumnFaceting = {
|
|
546
|
+
createColumn: (column, table) => {
|
|
547
|
+
column._getFacetedRowModel = table.options.getFacetedRowModel && table.options.getFacetedRowModel(table, column.id);
|
|
548
|
+
column.getFacetedRowModel = () => {
|
|
549
|
+
if (!column._getFacetedRowModel) {
|
|
550
|
+
return table.getPreFilteredRowModel();
|
|
551
|
+
}
|
|
552
|
+
return column._getFacetedRowModel();
|
|
553
|
+
};
|
|
554
|
+
column._getFacetedUniqueValues = table.options.getFacetedUniqueValues && table.options.getFacetedUniqueValues(table, column.id);
|
|
555
|
+
column.getFacetedUniqueValues = () => {
|
|
556
|
+
if (!column._getFacetedUniqueValues) {
|
|
557
|
+
return new Map();
|
|
558
|
+
}
|
|
559
|
+
return column._getFacetedUniqueValues();
|
|
560
|
+
};
|
|
561
|
+
column._getFacetedMinMaxValues = table.options.getFacetedMinMaxValues && table.options.getFacetedMinMaxValues(table, column.id);
|
|
562
|
+
column.getFacetedMinMaxValues = () => {
|
|
563
|
+
if (!column._getFacetedMinMaxValues) {
|
|
564
|
+
return undefined;
|
|
565
|
+
}
|
|
566
|
+
return column._getFacetedMinMaxValues();
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
};
|
|
570
|
+
|
|
571
|
+
const includesString = (row, columnId, filterValue) => {
|
|
572
|
+
var _filterValue$toString, _row$getValue;
|
|
573
|
+
const search = filterValue == null || (_filterValue$toString = filterValue.toString()) == null ? void 0 : _filterValue$toString.toLowerCase();
|
|
574
|
+
return Boolean((_row$getValue = row.getValue(columnId)) == null || (_row$getValue = _row$getValue.toString()) == null || (_row$getValue = _row$getValue.toLowerCase()) == null ? void 0 : _row$getValue.includes(search));
|
|
575
|
+
};
|
|
576
|
+
includesString.autoRemove = val => testFalsey(val);
|
|
577
|
+
const includesStringSensitive = (row, columnId, filterValue) => {
|
|
578
|
+
var _row$getValue2;
|
|
579
|
+
return Boolean((_row$getValue2 = row.getValue(columnId)) == null || (_row$getValue2 = _row$getValue2.toString()) == null ? void 0 : _row$getValue2.includes(filterValue));
|
|
580
|
+
};
|
|
581
|
+
includesStringSensitive.autoRemove = val => testFalsey(val);
|
|
582
|
+
const equalsString = (row, columnId, filterValue) => {
|
|
583
|
+
var _row$getValue3;
|
|
584
|
+
return ((_row$getValue3 = row.getValue(columnId)) == null || (_row$getValue3 = _row$getValue3.toString()) == null ? void 0 : _row$getValue3.toLowerCase()) === (filterValue == null ? void 0 : filterValue.toLowerCase());
|
|
585
|
+
};
|
|
586
|
+
equalsString.autoRemove = val => testFalsey(val);
|
|
587
|
+
const arrIncludes = (row, columnId, filterValue) => {
|
|
588
|
+
var _row$getValue4;
|
|
589
|
+
return (_row$getValue4 = row.getValue(columnId)) == null ? void 0 : _row$getValue4.includes(filterValue);
|
|
590
|
+
};
|
|
591
|
+
arrIncludes.autoRemove = val => testFalsey(val);
|
|
592
|
+
const arrIncludesAll = (row, columnId, filterValue) => {
|
|
593
|
+
return !filterValue.some(val => {
|
|
594
|
+
var _row$getValue5;
|
|
595
|
+
return !((_row$getValue5 = row.getValue(columnId)) != null && _row$getValue5.includes(val));
|
|
596
|
+
});
|
|
597
|
+
};
|
|
598
|
+
arrIncludesAll.autoRemove = val => testFalsey(val) || !(val != null && val.length);
|
|
599
|
+
const arrIncludesSome = (row, columnId, filterValue) => {
|
|
600
|
+
return filterValue.some(val => {
|
|
601
|
+
var _row$getValue6;
|
|
602
|
+
return (_row$getValue6 = row.getValue(columnId)) == null ? void 0 : _row$getValue6.includes(val);
|
|
603
|
+
});
|
|
604
|
+
};
|
|
605
|
+
arrIncludesSome.autoRemove = val => testFalsey(val) || !(val != null && val.length);
|
|
606
|
+
const equals = (row, columnId, filterValue) => {
|
|
607
|
+
return row.getValue(columnId) === filterValue;
|
|
608
|
+
};
|
|
609
|
+
equals.autoRemove = val => testFalsey(val);
|
|
610
|
+
const weakEquals = (row, columnId, filterValue) => {
|
|
611
|
+
return row.getValue(columnId) == filterValue;
|
|
612
|
+
};
|
|
613
|
+
weakEquals.autoRemove = val => testFalsey(val);
|
|
614
|
+
const inNumberRange = (row, columnId, filterValue) => {
|
|
615
|
+
let [min, max] = filterValue;
|
|
616
|
+
const rowValue = row.getValue(columnId);
|
|
617
|
+
return rowValue >= min && rowValue <= max;
|
|
618
|
+
};
|
|
619
|
+
inNumberRange.resolveFilterValue = val => {
|
|
620
|
+
let [unsafeMin, unsafeMax] = val;
|
|
621
|
+
let parsedMin = typeof unsafeMin !== 'number' ? parseFloat(unsafeMin) : unsafeMin;
|
|
622
|
+
let parsedMax = typeof unsafeMax !== 'number' ? parseFloat(unsafeMax) : unsafeMax;
|
|
623
|
+
let min = unsafeMin === null || Number.isNaN(parsedMin) ? -Infinity : parsedMin;
|
|
624
|
+
let max = unsafeMax === null || Number.isNaN(parsedMax) ? Infinity : parsedMax;
|
|
625
|
+
if (min > max) {
|
|
626
|
+
const temp = min;
|
|
627
|
+
min = max;
|
|
628
|
+
max = temp;
|
|
629
|
+
}
|
|
630
|
+
return [min, max];
|
|
631
|
+
};
|
|
632
|
+
inNumberRange.autoRemove = val => testFalsey(val) || testFalsey(val[0]) && testFalsey(val[1]);
|
|
633
|
+
|
|
634
|
+
// Export
|
|
635
|
+
|
|
636
|
+
const filterFns = {
|
|
637
|
+
includesString,
|
|
638
|
+
includesStringSensitive,
|
|
639
|
+
equalsString,
|
|
640
|
+
arrIncludes,
|
|
641
|
+
arrIncludesAll,
|
|
642
|
+
arrIncludesSome,
|
|
643
|
+
equals,
|
|
644
|
+
weakEquals,
|
|
645
|
+
inNumberRange
|
|
646
|
+
};
|
|
647
|
+
// Utils
|
|
648
|
+
|
|
649
|
+
function testFalsey(val) {
|
|
650
|
+
return val === undefined || val === null || val === '';
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
//
|
|
654
|
+
|
|
655
|
+
const ColumnFiltering = {
|
|
656
|
+
getDefaultColumnDef: () => {
|
|
657
|
+
return {
|
|
658
|
+
filterFn: 'auto'
|
|
659
|
+
};
|
|
660
|
+
},
|
|
661
|
+
getInitialState: state => {
|
|
662
|
+
return {
|
|
663
|
+
columnFilters: [],
|
|
664
|
+
...state
|
|
665
|
+
};
|
|
666
|
+
},
|
|
667
|
+
getDefaultOptions: table => {
|
|
668
|
+
return {
|
|
669
|
+
onColumnFiltersChange: makeStateUpdater('columnFilters', table),
|
|
670
|
+
filterFromLeafRows: false,
|
|
671
|
+
maxLeafRowFilterDepth: 100
|
|
672
|
+
};
|
|
673
|
+
},
|
|
674
|
+
createColumn: (column, table) => {
|
|
675
|
+
column.getAutoFilterFn = () => {
|
|
676
|
+
const firstRow = table.getCoreRowModel().flatRows[0];
|
|
677
|
+
const value = firstRow == null ? void 0 : firstRow.getValue(column.id);
|
|
678
|
+
if (typeof value === 'string') {
|
|
679
|
+
return filterFns.includesString;
|
|
680
|
+
}
|
|
681
|
+
if (typeof value === 'number') {
|
|
682
|
+
return filterFns.inNumberRange;
|
|
683
|
+
}
|
|
684
|
+
if (typeof value === 'boolean') {
|
|
685
|
+
return filterFns.equals;
|
|
686
|
+
}
|
|
687
|
+
if (value !== null && typeof value === 'object') {
|
|
688
|
+
return filterFns.equals;
|
|
689
|
+
}
|
|
690
|
+
if (Array.isArray(value)) {
|
|
691
|
+
return filterFns.arrIncludes;
|
|
692
|
+
}
|
|
693
|
+
return filterFns.weakEquals;
|
|
694
|
+
};
|
|
695
|
+
column.getFilterFn = () => {
|
|
696
|
+
var _table$options$filter, _table$options$filter2;
|
|
697
|
+
return isFunction(column.columnDef.filterFn) ? column.columnDef.filterFn : column.columnDef.filterFn === 'auto' ? column.getAutoFilterFn() : // @ts-ignore
|
|
698
|
+
(_table$options$filter = (_table$options$filter2 = table.options.filterFns) == null ? void 0 : _table$options$filter2[column.columnDef.filterFn]) != null ? _table$options$filter : filterFns[column.columnDef.filterFn];
|
|
699
|
+
};
|
|
700
|
+
column.getCanFilter = () => {
|
|
701
|
+
var _column$columnDef$ena, _table$options$enable, _table$options$enable2;
|
|
702
|
+
return ((_column$columnDef$ena = column.columnDef.enableColumnFilter) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableColumnFilters) != null ? _table$options$enable : true) && ((_table$options$enable2 = table.options.enableFilters) != null ? _table$options$enable2 : true) && !!column.accessorFn;
|
|
703
|
+
};
|
|
704
|
+
column.getIsFiltered = () => column.getFilterIndex() > -1;
|
|
705
|
+
column.getFilterValue = () => {
|
|
706
|
+
var _table$getState$colum;
|
|
707
|
+
return (_table$getState$colum = table.getState().columnFilters) == null || (_table$getState$colum = _table$getState$colum.find(d => d.id === column.id)) == null ? void 0 : _table$getState$colum.value;
|
|
708
|
+
};
|
|
709
|
+
column.getFilterIndex = () => {
|
|
710
|
+
var _table$getState$colum2, _table$getState$colum3;
|
|
711
|
+
return (_table$getState$colum2 = (_table$getState$colum3 = table.getState().columnFilters) == null ? void 0 : _table$getState$colum3.findIndex(d => d.id === column.id)) != null ? _table$getState$colum2 : -1;
|
|
712
|
+
};
|
|
713
|
+
column.setFilterValue = value => {
|
|
714
|
+
table.setColumnFilters(old => {
|
|
715
|
+
const filterFn = column.getFilterFn();
|
|
716
|
+
const previousFilter = old == null ? void 0 : old.find(d => d.id === column.id);
|
|
717
|
+
const newFilter = functionalUpdate(value, previousFilter ? previousFilter.value : undefined);
|
|
718
|
+
|
|
719
|
+
//
|
|
720
|
+
if (shouldAutoRemoveFilter(filterFn, newFilter, column)) {
|
|
721
|
+
var _old$filter;
|
|
722
|
+
return (_old$filter = old == null ? void 0 : old.filter(d => d.id !== column.id)) != null ? _old$filter : [];
|
|
723
|
+
}
|
|
724
|
+
const newFilterObj = {
|
|
725
|
+
id: column.id,
|
|
726
|
+
value: newFilter
|
|
727
|
+
};
|
|
728
|
+
if (previousFilter) {
|
|
729
|
+
var _old$map;
|
|
730
|
+
return (_old$map = old == null ? void 0 : old.map(d => {
|
|
731
|
+
if (d.id === column.id) {
|
|
732
|
+
return newFilterObj;
|
|
733
|
+
}
|
|
734
|
+
return d;
|
|
735
|
+
})) != null ? _old$map : [];
|
|
736
|
+
}
|
|
737
|
+
if (old != null && old.length) {
|
|
738
|
+
return [...old, newFilterObj];
|
|
739
|
+
}
|
|
740
|
+
return [newFilterObj];
|
|
741
|
+
});
|
|
742
|
+
};
|
|
743
|
+
},
|
|
744
|
+
createRow: (row, _table) => {
|
|
745
|
+
row.columnFilters = {};
|
|
746
|
+
row.columnFiltersMeta = {};
|
|
747
|
+
},
|
|
748
|
+
createTable: table => {
|
|
749
|
+
table.setColumnFilters = updater => {
|
|
750
|
+
const leafColumns = table.getAllLeafColumns();
|
|
751
|
+
const updateFn = old => {
|
|
752
|
+
var _functionalUpdate;
|
|
753
|
+
return (_functionalUpdate = functionalUpdate(updater, old)) == null ? void 0 : _functionalUpdate.filter(filter => {
|
|
754
|
+
const column = leafColumns.find(d => d.id === filter.id);
|
|
755
|
+
if (column) {
|
|
756
|
+
const filterFn = column.getFilterFn();
|
|
757
|
+
if (shouldAutoRemoveFilter(filterFn, filter.value, column)) {
|
|
758
|
+
return false;
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
return true;
|
|
762
|
+
});
|
|
763
|
+
};
|
|
764
|
+
table.options.onColumnFiltersChange == null || table.options.onColumnFiltersChange(updateFn);
|
|
765
|
+
};
|
|
766
|
+
table.resetColumnFilters = defaultState => {
|
|
767
|
+
var _table$initialState$c, _table$initialState;
|
|
768
|
+
table.setColumnFilters(defaultState ? [] : (_table$initialState$c = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnFilters) != null ? _table$initialState$c : []);
|
|
769
|
+
};
|
|
770
|
+
table.getPreFilteredRowModel = () => table.getCoreRowModel();
|
|
771
|
+
table.getFilteredRowModel = () => {
|
|
772
|
+
if (!table._getFilteredRowModel && table.options.getFilteredRowModel) {
|
|
773
|
+
table._getFilteredRowModel = table.options.getFilteredRowModel(table);
|
|
774
|
+
}
|
|
775
|
+
if (table.options.manualFiltering || !table._getFilteredRowModel) {
|
|
776
|
+
return table.getPreFilteredRowModel();
|
|
777
|
+
}
|
|
778
|
+
return table._getFilteredRowModel();
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
};
|
|
782
|
+
function shouldAutoRemoveFilter(filterFn, value, column) {
|
|
783
|
+
return (filterFn && filterFn.autoRemove ? filterFn.autoRemove(value, column) : false) || typeof value === 'undefined' || typeof value === 'string' && !value;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
const sum = (columnId, _leafRows, childRows) => {
|
|
787
|
+
// It's faster to just add the aggregations together instead of
|
|
788
|
+
// process leaf nodes individually
|
|
789
|
+
return childRows.reduce((sum, next) => {
|
|
790
|
+
const nextValue = next.getValue(columnId);
|
|
791
|
+
return sum + (typeof nextValue === 'number' ? nextValue : 0);
|
|
792
|
+
}, 0);
|
|
793
|
+
};
|
|
794
|
+
const min = (columnId, _leafRows, childRows) => {
|
|
795
|
+
let min;
|
|
796
|
+
childRows.forEach(row => {
|
|
797
|
+
const value = row.getValue(columnId);
|
|
798
|
+
if (value != null && (min > value || min === undefined && value >= value)) {
|
|
799
|
+
min = value;
|
|
800
|
+
}
|
|
801
|
+
});
|
|
802
|
+
return min;
|
|
803
|
+
};
|
|
804
|
+
const max = (columnId, _leafRows, childRows) => {
|
|
805
|
+
let max;
|
|
806
|
+
childRows.forEach(row => {
|
|
807
|
+
const value = row.getValue(columnId);
|
|
808
|
+
if (value != null && (max < value || max === undefined && value >= value)) {
|
|
809
|
+
max = value;
|
|
810
|
+
}
|
|
811
|
+
});
|
|
812
|
+
return max;
|
|
813
|
+
};
|
|
814
|
+
const extent = (columnId, _leafRows, childRows) => {
|
|
815
|
+
let min;
|
|
816
|
+
let max;
|
|
817
|
+
childRows.forEach(row => {
|
|
818
|
+
const value = row.getValue(columnId);
|
|
819
|
+
if (value != null) {
|
|
820
|
+
if (min === undefined) {
|
|
821
|
+
if (value >= value) min = max = value;
|
|
822
|
+
} else {
|
|
823
|
+
if (min > value) min = value;
|
|
824
|
+
if (max < value) max = value;
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
});
|
|
828
|
+
return [min, max];
|
|
829
|
+
};
|
|
830
|
+
const mean = (columnId, leafRows) => {
|
|
831
|
+
let count = 0;
|
|
832
|
+
let sum = 0;
|
|
833
|
+
leafRows.forEach(row => {
|
|
834
|
+
let value = row.getValue(columnId);
|
|
835
|
+
if (value != null && (value = +value) >= value) {
|
|
836
|
+
++count, sum += value;
|
|
837
|
+
}
|
|
838
|
+
});
|
|
839
|
+
if (count) return sum / count;
|
|
840
|
+
return;
|
|
841
|
+
};
|
|
842
|
+
const median = (columnId, leafRows) => {
|
|
843
|
+
if (!leafRows.length) {
|
|
844
|
+
return;
|
|
845
|
+
}
|
|
846
|
+
const values = leafRows.map(row => row.getValue(columnId));
|
|
847
|
+
if (!isNumberArray(values)) {
|
|
848
|
+
return;
|
|
849
|
+
}
|
|
850
|
+
if (values.length === 1) {
|
|
851
|
+
return values[0];
|
|
852
|
+
}
|
|
853
|
+
const mid = Math.floor(values.length / 2);
|
|
854
|
+
const nums = values.sort((a, b) => a - b);
|
|
855
|
+
return values.length % 2 !== 0 ? nums[mid] : (nums[mid - 1] + nums[mid]) / 2;
|
|
856
|
+
};
|
|
857
|
+
const unique = (columnId, leafRows) => {
|
|
858
|
+
return Array.from(new Set(leafRows.map(d => d.getValue(columnId))).values());
|
|
859
|
+
};
|
|
860
|
+
const uniqueCount = (columnId, leafRows) => {
|
|
861
|
+
return new Set(leafRows.map(d => d.getValue(columnId))).size;
|
|
862
|
+
};
|
|
863
|
+
const count = (_columnId, leafRows) => {
|
|
864
|
+
return leafRows.length;
|
|
865
|
+
};
|
|
866
|
+
const aggregationFns = {
|
|
867
|
+
sum,
|
|
868
|
+
min,
|
|
869
|
+
max,
|
|
870
|
+
extent,
|
|
871
|
+
mean,
|
|
872
|
+
median,
|
|
873
|
+
unique,
|
|
874
|
+
uniqueCount,
|
|
875
|
+
count
|
|
876
|
+
};
|
|
877
|
+
|
|
878
|
+
//
|
|
879
|
+
|
|
880
|
+
const ColumnGrouping = {
|
|
881
|
+
getDefaultColumnDef: () => {
|
|
882
|
+
return {
|
|
883
|
+
aggregatedCell: props => {
|
|
884
|
+
var _toString, _props$getValue;
|
|
885
|
+
return (_toString = (_props$getValue = props.getValue()) == null || _props$getValue.toString == null ? void 0 : _props$getValue.toString()) != null ? _toString : null;
|
|
886
|
+
},
|
|
887
|
+
aggregationFn: 'auto'
|
|
888
|
+
};
|
|
889
|
+
},
|
|
890
|
+
getInitialState: state => {
|
|
891
|
+
return {
|
|
892
|
+
grouping: [],
|
|
893
|
+
...state
|
|
894
|
+
};
|
|
895
|
+
},
|
|
896
|
+
getDefaultOptions: table => {
|
|
897
|
+
return {
|
|
898
|
+
onGroupingChange: makeStateUpdater('grouping', table),
|
|
899
|
+
groupedColumnMode: 'reorder'
|
|
900
|
+
};
|
|
901
|
+
},
|
|
902
|
+
createColumn: (column, table) => {
|
|
903
|
+
column.toggleGrouping = () => {
|
|
904
|
+
table.setGrouping(old => {
|
|
905
|
+
// Find any existing grouping for this column
|
|
906
|
+
if (old != null && old.includes(column.id)) {
|
|
907
|
+
return old.filter(d => d !== column.id);
|
|
908
|
+
}
|
|
909
|
+
return [...(old != null ? old : []), column.id];
|
|
910
|
+
});
|
|
911
|
+
};
|
|
912
|
+
column.getCanGroup = () => {
|
|
913
|
+
var _column$columnDef$ena, _table$options$enable;
|
|
914
|
+
return ((_column$columnDef$ena = column.columnDef.enableGrouping) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableGrouping) != null ? _table$options$enable : true) && (!!column.accessorFn || !!column.columnDef.getGroupingValue);
|
|
915
|
+
};
|
|
916
|
+
column.getIsGrouped = () => {
|
|
917
|
+
var _table$getState$group;
|
|
918
|
+
return (_table$getState$group = table.getState().grouping) == null ? void 0 : _table$getState$group.includes(column.id);
|
|
919
|
+
};
|
|
920
|
+
column.getGroupedIndex = () => {
|
|
921
|
+
var _table$getState$group2;
|
|
922
|
+
return (_table$getState$group2 = table.getState().grouping) == null ? void 0 : _table$getState$group2.indexOf(column.id);
|
|
923
|
+
};
|
|
924
|
+
column.getToggleGroupingHandler = () => {
|
|
925
|
+
const canGroup = column.getCanGroup();
|
|
926
|
+
return () => {
|
|
927
|
+
if (!canGroup) return;
|
|
928
|
+
column.toggleGrouping();
|
|
929
|
+
};
|
|
930
|
+
};
|
|
931
|
+
column.getAutoAggregationFn = () => {
|
|
932
|
+
const firstRow = table.getCoreRowModel().flatRows[0];
|
|
933
|
+
const value = firstRow == null ? void 0 : firstRow.getValue(column.id);
|
|
934
|
+
if (typeof value === 'number') {
|
|
935
|
+
return aggregationFns.sum;
|
|
936
|
+
}
|
|
937
|
+
if (Object.prototype.toString.call(value) === '[object Date]') {
|
|
938
|
+
return aggregationFns.extent;
|
|
939
|
+
}
|
|
940
|
+
};
|
|
941
|
+
column.getAggregationFn = () => {
|
|
942
|
+
var _table$options$aggreg, _table$options$aggreg2;
|
|
943
|
+
if (!column) {
|
|
944
|
+
throw new Error();
|
|
945
|
+
}
|
|
946
|
+
return isFunction(column.columnDef.aggregationFn) ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === 'auto' ? column.getAutoAggregationFn() : (_table$options$aggreg = (_table$options$aggreg2 = table.options.aggregationFns) == null ? void 0 : _table$options$aggreg2[column.columnDef.aggregationFn]) != null ? _table$options$aggreg : aggregationFns[column.columnDef.aggregationFn];
|
|
947
|
+
};
|
|
948
|
+
},
|
|
949
|
+
createTable: table => {
|
|
950
|
+
table.setGrouping = updater => table.options.onGroupingChange == null ? void 0 : table.options.onGroupingChange(updater);
|
|
951
|
+
table.resetGrouping = defaultState => {
|
|
952
|
+
var _table$initialState$g, _table$initialState;
|
|
953
|
+
table.setGrouping(defaultState ? [] : (_table$initialState$g = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.grouping) != null ? _table$initialState$g : []);
|
|
954
|
+
};
|
|
955
|
+
table.getPreGroupedRowModel = () => table.getFilteredRowModel();
|
|
956
|
+
table.getGroupedRowModel = () => {
|
|
957
|
+
if (!table._getGroupedRowModel && table.options.getGroupedRowModel) {
|
|
958
|
+
table._getGroupedRowModel = table.options.getGroupedRowModel(table);
|
|
959
|
+
}
|
|
960
|
+
if (table.options.manualGrouping || !table._getGroupedRowModel) {
|
|
961
|
+
return table.getPreGroupedRowModel();
|
|
962
|
+
}
|
|
963
|
+
return table._getGroupedRowModel();
|
|
964
|
+
};
|
|
965
|
+
},
|
|
966
|
+
createRow: (row, table) => {
|
|
967
|
+
row.getIsGrouped = () => !!row.groupingColumnId;
|
|
968
|
+
row.getGroupingValue = columnId => {
|
|
969
|
+
if (row._groupingValuesCache.hasOwnProperty(columnId)) {
|
|
970
|
+
return row._groupingValuesCache[columnId];
|
|
971
|
+
}
|
|
972
|
+
const column = table.getColumn(columnId);
|
|
973
|
+
if (!(column != null && column.columnDef.getGroupingValue)) {
|
|
974
|
+
return row.getValue(columnId);
|
|
975
|
+
}
|
|
976
|
+
row._groupingValuesCache[columnId] = column.columnDef.getGroupingValue(row.original);
|
|
977
|
+
return row._groupingValuesCache[columnId];
|
|
978
|
+
};
|
|
979
|
+
row._groupingValuesCache = {};
|
|
980
|
+
},
|
|
981
|
+
createCell: (cell, column, row, table) => {
|
|
982
|
+
cell.getIsGrouped = () => column.getIsGrouped() && column.id === row.groupingColumnId;
|
|
983
|
+
cell.getIsPlaceholder = () => !cell.getIsGrouped() && column.getIsGrouped();
|
|
984
|
+
cell.getIsAggregated = () => {
|
|
985
|
+
var _row$subRows;
|
|
986
|
+
return !cell.getIsGrouped() && !cell.getIsPlaceholder() && !!((_row$subRows = row.subRows) != null && _row$subRows.length);
|
|
987
|
+
};
|
|
988
|
+
}
|
|
989
|
+
};
|
|
990
|
+
function orderColumns(leafColumns, grouping, groupedColumnMode) {
|
|
991
|
+
if (!(grouping != null && grouping.length) || !groupedColumnMode) {
|
|
992
|
+
return leafColumns;
|
|
993
|
+
}
|
|
994
|
+
const nonGroupingColumns = leafColumns.filter(col => !grouping.includes(col.id));
|
|
995
|
+
if (groupedColumnMode === 'remove') {
|
|
996
|
+
return nonGroupingColumns;
|
|
997
|
+
}
|
|
998
|
+
const groupingColumns = grouping.map(g => leafColumns.find(col => col.id === g)).filter(Boolean);
|
|
999
|
+
return [...groupingColumns, ...nonGroupingColumns];
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
//
|
|
1003
|
+
|
|
1004
|
+
const ColumnOrdering = {
|
|
1005
|
+
getInitialState: state => {
|
|
1006
|
+
return {
|
|
1007
|
+
columnOrder: [],
|
|
1008
|
+
...state
|
|
1009
|
+
};
|
|
1010
|
+
},
|
|
1011
|
+
getDefaultOptions: table => {
|
|
1012
|
+
return {
|
|
1013
|
+
onColumnOrderChange: makeStateUpdater('columnOrder', table)
|
|
1014
|
+
};
|
|
1015
|
+
},
|
|
1016
|
+
createColumn: (column, table) => {
|
|
1017
|
+
column.getIndex = memo(position => [_getVisibleLeafColumns(table, position)], columns => columns.findIndex(d => d.id === column.id), getMemoOptions(table.options, 'debugColumns'));
|
|
1018
|
+
column.getIsFirstColumn = position => {
|
|
1019
|
+
var _columns$;
|
|
1020
|
+
const columns = _getVisibleLeafColumns(table, position);
|
|
1021
|
+
return ((_columns$ = columns[0]) == null ? void 0 : _columns$.id) === column.id;
|
|
1022
|
+
};
|
|
1023
|
+
column.getIsLastColumn = position => {
|
|
1024
|
+
var _columns;
|
|
1025
|
+
const columns = _getVisibleLeafColumns(table, position);
|
|
1026
|
+
return ((_columns = columns[columns.length - 1]) == null ? void 0 : _columns.id) === column.id;
|
|
1027
|
+
};
|
|
1028
|
+
},
|
|
1029
|
+
createTable: table => {
|
|
1030
|
+
table.setColumnOrder = updater => table.options.onColumnOrderChange == null ? void 0 : table.options.onColumnOrderChange(updater);
|
|
1031
|
+
table.resetColumnOrder = defaultState => {
|
|
1032
|
+
var _table$initialState$c;
|
|
1033
|
+
table.setColumnOrder(defaultState ? [] : (_table$initialState$c = table.initialState.columnOrder) != null ? _table$initialState$c : []);
|
|
1034
|
+
};
|
|
1035
|
+
table._getOrderColumnsFn = memo(() => [table.getState().columnOrder, table.getState().grouping, table.options.groupedColumnMode], (columnOrder, grouping, groupedColumnMode) => columns => {
|
|
1036
|
+
// Sort grouped columns to the start of the column list
|
|
1037
|
+
// before the headers are built
|
|
1038
|
+
let orderedColumns = [];
|
|
1039
|
+
|
|
1040
|
+
// If there is no order, return the normal columns
|
|
1041
|
+
if (!(columnOrder != null && columnOrder.length)) {
|
|
1042
|
+
orderedColumns = columns;
|
|
1043
|
+
} else {
|
|
1044
|
+
const columnOrderCopy = [...columnOrder];
|
|
1045
|
+
|
|
1046
|
+
// If there is an order, make a copy of the columns
|
|
1047
|
+
const columnsCopy = [...columns];
|
|
1048
|
+
|
|
1049
|
+
// And make a new ordered array of the columns
|
|
1050
|
+
|
|
1051
|
+
// Loop over the columns and place them in order into the new array
|
|
1052
|
+
while (columnsCopy.length && columnOrderCopy.length) {
|
|
1053
|
+
const targetColumnId = columnOrderCopy.shift();
|
|
1054
|
+
const foundIndex = columnsCopy.findIndex(d => d.id === targetColumnId);
|
|
1055
|
+
if (foundIndex > -1) {
|
|
1056
|
+
orderedColumns.push(columnsCopy.splice(foundIndex, 1)[0]);
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
// If there are any columns left, add them to the end
|
|
1061
|
+
orderedColumns = [...orderedColumns, ...columnsCopy];
|
|
1062
|
+
}
|
|
1063
|
+
return orderColumns(orderedColumns, grouping, groupedColumnMode);
|
|
1064
|
+
}, getMemoOptions(table.options, 'debugTable'));
|
|
1065
|
+
}
|
|
1066
|
+
};
|
|
1067
|
+
|
|
1068
|
+
//
|
|
1069
|
+
|
|
1070
|
+
const getDefaultColumnPinningState = () => ({
|
|
1071
|
+
left: [],
|
|
1072
|
+
right: []
|
|
1073
|
+
});
|
|
1074
|
+
const ColumnPinning = {
|
|
1075
|
+
getInitialState: state => {
|
|
1076
|
+
return {
|
|
1077
|
+
columnPinning: getDefaultColumnPinningState(),
|
|
1078
|
+
...state
|
|
1079
|
+
};
|
|
1080
|
+
},
|
|
1081
|
+
getDefaultOptions: table => {
|
|
1082
|
+
return {
|
|
1083
|
+
onColumnPinningChange: makeStateUpdater('columnPinning', table)
|
|
1084
|
+
};
|
|
1085
|
+
},
|
|
1086
|
+
createColumn: (column, table) => {
|
|
1087
|
+
column.pin = position => {
|
|
1088
|
+
const columnIds = column.getLeafColumns().map(d => d.id).filter(Boolean);
|
|
1089
|
+
table.setColumnPinning(old => {
|
|
1090
|
+
var _old$left3, _old$right3;
|
|
1091
|
+
if (position === 'right') {
|
|
1092
|
+
var _old$left, _old$right;
|
|
1093
|
+
return {
|
|
1094
|
+
left: ((_old$left = old == null ? void 0 : old.left) != null ? _old$left : []).filter(d => !(columnIds != null && columnIds.includes(d))),
|
|
1095
|
+
right: [...((_old$right = old == null ? void 0 : old.right) != null ? _old$right : []).filter(d => !(columnIds != null && columnIds.includes(d))), ...columnIds]
|
|
1096
|
+
};
|
|
1097
|
+
}
|
|
1098
|
+
if (position === 'left') {
|
|
1099
|
+
var _old$left2, _old$right2;
|
|
1100
|
+
return {
|
|
1101
|
+
left: [...((_old$left2 = old == null ? void 0 : old.left) != null ? _old$left2 : []).filter(d => !(columnIds != null && columnIds.includes(d))), ...columnIds],
|
|
1102
|
+
right: ((_old$right2 = old == null ? void 0 : old.right) != null ? _old$right2 : []).filter(d => !(columnIds != null && columnIds.includes(d)))
|
|
1103
|
+
};
|
|
1104
|
+
}
|
|
1105
|
+
return {
|
|
1106
|
+
left: ((_old$left3 = old == null ? void 0 : old.left) != null ? _old$left3 : []).filter(d => !(columnIds != null && columnIds.includes(d))),
|
|
1107
|
+
right: ((_old$right3 = old == null ? void 0 : old.right) != null ? _old$right3 : []).filter(d => !(columnIds != null && columnIds.includes(d)))
|
|
1108
|
+
};
|
|
1109
|
+
});
|
|
1110
|
+
};
|
|
1111
|
+
column.getCanPin = () => {
|
|
1112
|
+
const leafColumns = column.getLeafColumns();
|
|
1113
|
+
return leafColumns.some(d => {
|
|
1114
|
+
var _d$columnDef$enablePi, _ref, _table$options$enable;
|
|
1115
|
+
return ((_d$columnDef$enablePi = d.columnDef.enablePinning) != null ? _d$columnDef$enablePi : true) && ((_ref = (_table$options$enable = table.options.enableColumnPinning) != null ? _table$options$enable : table.options.enablePinning) != null ? _ref : true);
|
|
1116
|
+
});
|
|
1117
|
+
};
|
|
1118
|
+
column.getIsPinned = () => {
|
|
1119
|
+
const leafColumnIds = column.getLeafColumns().map(d => d.id);
|
|
1120
|
+
const {
|
|
1121
|
+
left,
|
|
1122
|
+
right
|
|
1123
|
+
} = table.getState().columnPinning;
|
|
1124
|
+
const isLeft = leafColumnIds.some(d => left == null ? void 0 : left.includes(d));
|
|
1125
|
+
const isRight = leafColumnIds.some(d => right == null ? void 0 : right.includes(d));
|
|
1126
|
+
return isLeft ? 'left' : isRight ? 'right' : false;
|
|
1127
|
+
};
|
|
1128
|
+
column.getPinnedIndex = () => {
|
|
1129
|
+
var _table$getState$colum, _table$getState$colum2;
|
|
1130
|
+
const position = column.getIsPinned();
|
|
1131
|
+
return position ? (_table$getState$colum = (_table$getState$colum2 = table.getState().columnPinning) == null || (_table$getState$colum2 = _table$getState$colum2[position]) == null ? void 0 : _table$getState$colum2.indexOf(column.id)) != null ? _table$getState$colum : -1 : 0;
|
|
1132
|
+
};
|
|
1133
|
+
},
|
|
1134
|
+
createRow: (row, table) => {
|
|
1135
|
+
row.getCenterVisibleCells = memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allCells, left, right) => {
|
|
1136
|
+
const leftAndRight = [...(left != null ? left : []), ...(right != null ? right : [])];
|
|
1137
|
+
return allCells.filter(d => !leftAndRight.includes(d.column.id));
|
|
1138
|
+
}, getMemoOptions(table.options, 'debugRows'));
|
|
1139
|
+
row.getLeftVisibleCells = memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.left], (allCells, left) => {
|
|
1140
|
+
const cells = (left != null ? left : []).map(columnId => allCells.find(cell => cell.column.id === columnId)).filter(Boolean).map(d => ({
|
|
1141
|
+
...d,
|
|
1142
|
+
position: 'left'
|
|
1143
|
+
}));
|
|
1144
|
+
return cells;
|
|
1145
|
+
}, getMemoOptions(table.options, 'debugRows'));
|
|
1146
|
+
row.getRightVisibleCells = memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.right], (allCells, right) => {
|
|
1147
|
+
const cells = (right != null ? right : []).map(columnId => allCells.find(cell => cell.column.id === columnId)).filter(Boolean).map(d => ({
|
|
1148
|
+
...d,
|
|
1149
|
+
position: 'right'
|
|
1150
|
+
}));
|
|
1151
|
+
return cells;
|
|
1152
|
+
}, getMemoOptions(table.options, 'debugRows'));
|
|
1153
|
+
},
|
|
1154
|
+
createTable: table => {
|
|
1155
|
+
table.setColumnPinning = updater => table.options.onColumnPinningChange == null ? void 0 : table.options.onColumnPinningChange(updater);
|
|
1156
|
+
table.resetColumnPinning = defaultState => {
|
|
1157
|
+
var _table$initialState$c, _table$initialState;
|
|
1158
|
+
return table.setColumnPinning(defaultState ? getDefaultColumnPinningState() : (_table$initialState$c = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnPinning) != null ? _table$initialState$c : getDefaultColumnPinningState());
|
|
1159
|
+
};
|
|
1160
|
+
table.getIsSomeColumnsPinned = position => {
|
|
1161
|
+
var _pinningState$positio;
|
|
1162
|
+
const pinningState = table.getState().columnPinning;
|
|
1163
|
+
if (!position) {
|
|
1164
|
+
var _pinningState$left, _pinningState$right;
|
|
1165
|
+
return Boolean(((_pinningState$left = pinningState.left) == null ? void 0 : _pinningState$left.length) || ((_pinningState$right = pinningState.right) == null ? void 0 : _pinningState$right.length));
|
|
1166
|
+
}
|
|
1167
|
+
return Boolean((_pinningState$positio = pinningState[position]) == null ? void 0 : _pinningState$positio.length);
|
|
1168
|
+
};
|
|
1169
|
+
table.getLeftLeafColumns = memo(() => [table.getAllLeafColumns(), table.getState().columnPinning.left], (allColumns, left) => {
|
|
1170
|
+
return (left != null ? left : []).map(columnId => allColumns.find(column => column.id === columnId)).filter(Boolean);
|
|
1171
|
+
}, getMemoOptions(table.options, 'debugColumns'));
|
|
1172
|
+
table.getRightLeafColumns = memo(() => [table.getAllLeafColumns(), table.getState().columnPinning.right], (allColumns, right) => {
|
|
1173
|
+
return (right != null ? right : []).map(columnId => allColumns.find(column => column.id === columnId)).filter(Boolean);
|
|
1174
|
+
}, getMemoOptions(table.options, 'debugColumns'));
|
|
1175
|
+
table.getCenterLeafColumns = memo(() => [table.getAllLeafColumns(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allColumns, left, right) => {
|
|
1176
|
+
const leftAndRight = [...(left != null ? left : []), ...(right != null ? right : [])];
|
|
1177
|
+
return allColumns.filter(d => !leftAndRight.includes(d.id));
|
|
1178
|
+
}, getMemoOptions(table.options, 'debugColumns'));
|
|
1179
|
+
}
|
|
1180
|
+
};
|
|
1181
|
+
|
|
1182
|
+
function safelyAccessDocument(_document) {
|
|
1183
|
+
return _document || (typeof document !== 'undefined' ? document : null);
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
//
|
|
1187
|
+
|
|
1188
|
+
//
|
|
1189
|
+
|
|
1190
|
+
const defaultColumnSizing = {
|
|
1191
|
+
size: 150,
|
|
1192
|
+
minSize: 20,
|
|
1193
|
+
maxSize: Number.MAX_SAFE_INTEGER
|
|
1194
|
+
};
|
|
1195
|
+
const getDefaultColumnSizingInfoState = () => ({
|
|
1196
|
+
startOffset: null,
|
|
1197
|
+
startSize: null,
|
|
1198
|
+
deltaOffset: null,
|
|
1199
|
+
deltaPercentage: null,
|
|
1200
|
+
isResizingColumn: false,
|
|
1201
|
+
columnSizingStart: []
|
|
1202
|
+
});
|
|
1203
|
+
const ColumnSizing = {
|
|
1204
|
+
getDefaultColumnDef: () => {
|
|
1205
|
+
return defaultColumnSizing;
|
|
1206
|
+
},
|
|
1207
|
+
getInitialState: state => {
|
|
1208
|
+
return {
|
|
1209
|
+
columnSizing: {},
|
|
1210
|
+
columnSizingInfo: getDefaultColumnSizingInfoState(),
|
|
1211
|
+
...state
|
|
1212
|
+
};
|
|
1213
|
+
},
|
|
1214
|
+
getDefaultOptions: table => {
|
|
1215
|
+
return {
|
|
1216
|
+
columnResizeMode: 'onEnd',
|
|
1217
|
+
columnResizeDirection: 'ltr',
|
|
1218
|
+
onColumnSizingChange: makeStateUpdater('columnSizing', table),
|
|
1219
|
+
onColumnSizingInfoChange: makeStateUpdater('columnSizingInfo', table)
|
|
1220
|
+
};
|
|
1221
|
+
},
|
|
1222
|
+
createColumn: (column, table) => {
|
|
1223
|
+
column.getSize = () => {
|
|
1224
|
+
var _column$columnDef$min, _ref, _column$columnDef$max;
|
|
1225
|
+
const columnSize = table.getState().columnSizing[column.id];
|
|
1226
|
+
return Math.min(Math.max((_column$columnDef$min = column.columnDef.minSize) != null ? _column$columnDef$min : defaultColumnSizing.minSize, (_ref = columnSize != null ? columnSize : column.columnDef.size) != null ? _ref : defaultColumnSizing.size), (_column$columnDef$max = column.columnDef.maxSize) != null ? _column$columnDef$max : defaultColumnSizing.maxSize);
|
|
1227
|
+
};
|
|
1228
|
+
column.getStart = memo(position => [position, _getVisibleLeafColumns(table, position), table.getState().columnSizing], (position, columns) => columns.slice(0, column.getIndex(position)).reduce((sum, column) => sum + column.getSize(), 0), getMemoOptions(table.options, 'debugColumns'));
|
|
1229
|
+
column.getAfter = memo(position => [position, _getVisibleLeafColumns(table, position), table.getState().columnSizing], (position, columns) => columns.slice(column.getIndex(position) + 1).reduce((sum, column) => sum + column.getSize(), 0), getMemoOptions(table.options, 'debugColumns'));
|
|
1230
|
+
column.resetSize = () => {
|
|
1231
|
+
table.setColumnSizing(_ref2 => {
|
|
1232
|
+
let {
|
|
1233
|
+
[column.id]: _,
|
|
1234
|
+
...rest
|
|
1235
|
+
} = _ref2;
|
|
1236
|
+
return rest;
|
|
1237
|
+
});
|
|
1238
|
+
};
|
|
1239
|
+
column.getCanResize = () => {
|
|
1240
|
+
var _column$columnDef$ena, _table$options$enable;
|
|
1241
|
+
return ((_column$columnDef$ena = column.columnDef.enableResizing) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableColumnResizing) != null ? _table$options$enable : true);
|
|
1242
|
+
};
|
|
1243
|
+
column.getIsResizing = () => {
|
|
1244
|
+
return table.getState().columnSizingInfo.isResizingColumn === column.id;
|
|
1245
|
+
};
|
|
1246
|
+
},
|
|
1247
|
+
createHeader: (header, table) => {
|
|
1248
|
+
header.getSize = () => {
|
|
1249
|
+
let sum = 0;
|
|
1250
|
+
const recurse = header => {
|
|
1251
|
+
if (header.subHeaders.length) {
|
|
1252
|
+
header.subHeaders.forEach(recurse);
|
|
1253
|
+
} else {
|
|
1254
|
+
var _header$column$getSiz;
|
|
1255
|
+
sum += (_header$column$getSiz = header.column.getSize()) != null ? _header$column$getSiz : 0;
|
|
1256
|
+
}
|
|
1257
|
+
};
|
|
1258
|
+
recurse(header);
|
|
1259
|
+
return sum;
|
|
1260
|
+
};
|
|
1261
|
+
header.getStart = () => {
|
|
1262
|
+
if (header.index > 0) {
|
|
1263
|
+
const prevSiblingHeader = header.headerGroup.headers[header.index - 1];
|
|
1264
|
+
return prevSiblingHeader.getStart() + prevSiblingHeader.getSize();
|
|
1265
|
+
}
|
|
1266
|
+
return 0;
|
|
1267
|
+
};
|
|
1268
|
+
header.getResizeHandler = _contextDocument => {
|
|
1269
|
+
const column = table.getColumn(header.column.id);
|
|
1270
|
+
const canResize = column == null ? void 0 : column.getCanResize();
|
|
1271
|
+
return e => {
|
|
1272
|
+
if (!column || !canResize) {
|
|
1273
|
+
return;
|
|
1274
|
+
}
|
|
1275
|
+
e.persist == null || e.persist();
|
|
1276
|
+
if (isTouchStartEvent(e)) {
|
|
1277
|
+
// lets not respond to multiple touches (e.g. 2 or 3 fingers)
|
|
1278
|
+
if (e.touches && e.touches.length > 1) {
|
|
1279
|
+
return;
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
const startSize = header.getSize();
|
|
1283
|
+
const columnSizingStart = header ? header.getLeafHeaders().map(d => [d.column.id, d.column.getSize()]) : [[column.id, column.getSize()]];
|
|
1284
|
+
const clientX = isTouchStartEvent(e) ? Math.round(e.touches[0].clientX) : e.clientX;
|
|
1285
|
+
const newColumnSizing = {};
|
|
1286
|
+
const updateOffset = (eventType, clientXPos) => {
|
|
1287
|
+
if (typeof clientXPos !== 'number') {
|
|
1288
|
+
return;
|
|
1289
|
+
}
|
|
1290
|
+
table.setColumnSizingInfo(old => {
|
|
1291
|
+
var _old$startOffset, _old$startSize;
|
|
1292
|
+
const deltaDirection = table.options.columnResizeDirection === 'rtl' ? -1 : 1;
|
|
1293
|
+
const deltaOffset = (clientXPos - ((_old$startOffset = old == null ? void 0 : old.startOffset) != null ? _old$startOffset : 0)) * deltaDirection;
|
|
1294
|
+
const deltaPercentage = Math.max(deltaOffset / ((_old$startSize = old == null ? void 0 : old.startSize) != null ? _old$startSize : 0), -0.999999);
|
|
1295
|
+
old.columnSizingStart.forEach(_ref3 => {
|
|
1296
|
+
let [columnId, headerSize] = _ref3;
|
|
1297
|
+
newColumnSizing[columnId] = Math.round(Math.max(headerSize + headerSize * deltaPercentage, 0) * 100) / 100;
|
|
1298
|
+
});
|
|
1299
|
+
return {
|
|
1300
|
+
...old,
|
|
1301
|
+
deltaOffset,
|
|
1302
|
+
deltaPercentage
|
|
1303
|
+
};
|
|
1304
|
+
});
|
|
1305
|
+
if (table.options.columnResizeMode === 'onChange' || eventType === 'end') {
|
|
1306
|
+
table.setColumnSizing(old => ({
|
|
1307
|
+
...old,
|
|
1308
|
+
...newColumnSizing
|
|
1309
|
+
}));
|
|
1310
|
+
}
|
|
1311
|
+
};
|
|
1312
|
+
const onMove = clientXPos => updateOffset('move', clientXPos);
|
|
1313
|
+
const onEnd = clientXPos => {
|
|
1314
|
+
updateOffset('end', clientXPos);
|
|
1315
|
+
table.setColumnSizingInfo(old => ({
|
|
1316
|
+
...old,
|
|
1317
|
+
isResizingColumn: false,
|
|
1318
|
+
startOffset: null,
|
|
1319
|
+
startSize: null,
|
|
1320
|
+
deltaOffset: null,
|
|
1321
|
+
deltaPercentage: null,
|
|
1322
|
+
columnSizingStart: []
|
|
1323
|
+
}));
|
|
1324
|
+
};
|
|
1325
|
+
const contextDocument = safelyAccessDocument(_contextDocument);
|
|
1326
|
+
const mouseEvents = {
|
|
1327
|
+
moveHandler: e => onMove(e.clientX),
|
|
1328
|
+
upHandler: e => {
|
|
1329
|
+
contextDocument == null || contextDocument.removeEventListener('mousemove', mouseEvents.moveHandler);
|
|
1330
|
+
contextDocument == null || contextDocument.removeEventListener('mouseup', mouseEvents.upHandler);
|
|
1331
|
+
onEnd(e.clientX);
|
|
1332
|
+
}
|
|
1333
|
+
};
|
|
1334
|
+
const touchEvents = {
|
|
1335
|
+
moveHandler: e => {
|
|
1336
|
+
if (e.cancelable) {
|
|
1337
|
+
e.preventDefault();
|
|
1338
|
+
e.stopPropagation();
|
|
1339
|
+
}
|
|
1340
|
+
onMove(e.touches[0].clientX);
|
|
1341
|
+
return false;
|
|
1342
|
+
},
|
|
1343
|
+
upHandler: e => {
|
|
1344
|
+
var _e$touches$;
|
|
1345
|
+
contextDocument == null || contextDocument.removeEventListener('touchmove', touchEvents.moveHandler);
|
|
1346
|
+
contextDocument == null || contextDocument.removeEventListener('touchend', touchEvents.upHandler);
|
|
1347
|
+
if (e.cancelable) {
|
|
1348
|
+
e.preventDefault();
|
|
1349
|
+
e.stopPropagation();
|
|
1350
|
+
}
|
|
1351
|
+
onEnd((_e$touches$ = e.touches[0]) == null ? void 0 : _e$touches$.clientX);
|
|
1352
|
+
}
|
|
1353
|
+
};
|
|
1354
|
+
const passiveIfSupported = passiveEventSupported() ? {
|
|
1355
|
+
passive: false
|
|
1356
|
+
} : false;
|
|
1357
|
+
if (isTouchStartEvent(e)) {
|
|
1358
|
+
contextDocument == null || contextDocument.addEventListener('touchmove', touchEvents.moveHandler, passiveIfSupported);
|
|
1359
|
+
contextDocument == null || contextDocument.addEventListener('touchend', touchEvents.upHandler, passiveIfSupported);
|
|
1360
|
+
} else {
|
|
1361
|
+
contextDocument == null || contextDocument.addEventListener('mousemove', mouseEvents.moveHandler, passiveIfSupported);
|
|
1362
|
+
contextDocument == null || contextDocument.addEventListener('mouseup', mouseEvents.upHandler, passiveIfSupported);
|
|
1363
|
+
}
|
|
1364
|
+
table.setColumnSizingInfo(old => ({
|
|
1365
|
+
...old,
|
|
1366
|
+
startOffset: clientX,
|
|
1367
|
+
startSize,
|
|
1368
|
+
deltaOffset: 0,
|
|
1369
|
+
deltaPercentage: 0,
|
|
1370
|
+
columnSizingStart,
|
|
1371
|
+
isResizingColumn: column.id
|
|
1372
|
+
}));
|
|
1373
|
+
};
|
|
1374
|
+
};
|
|
1375
|
+
},
|
|
1376
|
+
createTable: table => {
|
|
1377
|
+
table.setColumnSizing = updater => table.options.onColumnSizingChange == null ? void 0 : table.options.onColumnSizingChange(updater);
|
|
1378
|
+
table.setColumnSizingInfo = updater => table.options.onColumnSizingInfoChange == null ? void 0 : table.options.onColumnSizingInfoChange(updater);
|
|
1379
|
+
table.resetColumnSizing = defaultState => {
|
|
1380
|
+
var _table$initialState$c;
|
|
1381
|
+
table.setColumnSizing(defaultState ? {} : (_table$initialState$c = table.initialState.columnSizing) != null ? _table$initialState$c : {});
|
|
1382
|
+
};
|
|
1383
|
+
table.resetHeaderSizeInfo = defaultState => {
|
|
1384
|
+
var _table$initialState$c2;
|
|
1385
|
+
table.setColumnSizingInfo(defaultState ? getDefaultColumnSizingInfoState() : (_table$initialState$c2 = table.initialState.columnSizingInfo) != null ? _table$initialState$c2 : getDefaultColumnSizingInfoState());
|
|
1386
|
+
};
|
|
1387
|
+
table.getTotalSize = () => {
|
|
1388
|
+
var _table$getHeaderGroup, _table$getHeaderGroup2;
|
|
1389
|
+
return (_table$getHeaderGroup = (_table$getHeaderGroup2 = table.getHeaderGroups()[0]) == null ? void 0 : _table$getHeaderGroup2.headers.reduce((sum, header) => {
|
|
1390
|
+
return sum + header.getSize();
|
|
1391
|
+
}, 0)) != null ? _table$getHeaderGroup : 0;
|
|
1392
|
+
};
|
|
1393
|
+
table.getLeftTotalSize = () => {
|
|
1394
|
+
var _table$getLeftHeaderG, _table$getLeftHeaderG2;
|
|
1395
|
+
return (_table$getLeftHeaderG = (_table$getLeftHeaderG2 = table.getLeftHeaderGroups()[0]) == null ? void 0 : _table$getLeftHeaderG2.headers.reduce((sum, header) => {
|
|
1396
|
+
return sum + header.getSize();
|
|
1397
|
+
}, 0)) != null ? _table$getLeftHeaderG : 0;
|
|
1398
|
+
};
|
|
1399
|
+
table.getCenterTotalSize = () => {
|
|
1400
|
+
var _table$getCenterHeade, _table$getCenterHeade2;
|
|
1401
|
+
return (_table$getCenterHeade = (_table$getCenterHeade2 = table.getCenterHeaderGroups()[0]) == null ? void 0 : _table$getCenterHeade2.headers.reduce((sum, header) => {
|
|
1402
|
+
return sum + header.getSize();
|
|
1403
|
+
}, 0)) != null ? _table$getCenterHeade : 0;
|
|
1404
|
+
};
|
|
1405
|
+
table.getRightTotalSize = () => {
|
|
1406
|
+
var _table$getRightHeader, _table$getRightHeader2;
|
|
1407
|
+
return (_table$getRightHeader = (_table$getRightHeader2 = table.getRightHeaderGroups()[0]) == null ? void 0 : _table$getRightHeader2.headers.reduce((sum, header) => {
|
|
1408
|
+
return sum + header.getSize();
|
|
1409
|
+
}, 0)) != null ? _table$getRightHeader : 0;
|
|
1410
|
+
};
|
|
1411
|
+
}
|
|
1412
|
+
};
|
|
1413
|
+
let passiveSupported = null;
|
|
1414
|
+
function passiveEventSupported() {
|
|
1415
|
+
if (typeof passiveSupported === 'boolean') return passiveSupported;
|
|
1416
|
+
let supported = false;
|
|
1417
|
+
try {
|
|
1418
|
+
const options = {
|
|
1419
|
+
get passive() {
|
|
1420
|
+
supported = true;
|
|
1421
|
+
return false;
|
|
1422
|
+
}
|
|
1423
|
+
};
|
|
1424
|
+
const noop = () => {};
|
|
1425
|
+
window.addEventListener('test', noop, options);
|
|
1426
|
+
window.removeEventListener('test', noop);
|
|
1427
|
+
} catch (err) {
|
|
1428
|
+
supported = false;
|
|
1429
|
+
}
|
|
1430
|
+
passiveSupported = supported;
|
|
1431
|
+
return passiveSupported;
|
|
1432
|
+
}
|
|
1433
|
+
function isTouchStartEvent(e) {
|
|
1434
|
+
return e.type === 'touchstart';
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
//
|
|
1438
|
+
|
|
1439
|
+
const ColumnVisibility = {
|
|
1440
|
+
getInitialState: state => {
|
|
1441
|
+
return {
|
|
1442
|
+
columnVisibility: {},
|
|
1443
|
+
...state
|
|
1444
|
+
};
|
|
1445
|
+
},
|
|
1446
|
+
getDefaultOptions: table => {
|
|
1447
|
+
return {
|
|
1448
|
+
onColumnVisibilityChange: makeStateUpdater('columnVisibility', table)
|
|
1449
|
+
};
|
|
1450
|
+
},
|
|
1451
|
+
createColumn: (column, table) => {
|
|
1452
|
+
column.toggleVisibility = value => {
|
|
1453
|
+
if (column.getCanHide()) {
|
|
1454
|
+
table.setColumnVisibility(old => ({
|
|
1455
|
+
...old,
|
|
1456
|
+
[column.id]: value != null ? value : !column.getIsVisible()
|
|
1457
|
+
}));
|
|
1458
|
+
}
|
|
1459
|
+
};
|
|
1460
|
+
column.getIsVisible = () => {
|
|
1461
|
+
var _ref, _table$getState$colum;
|
|
1462
|
+
const childColumns = column.columns;
|
|
1463
|
+
return (_ref = childColumns.length ? childColumns.some(c => c.getIsVisible()) : (_table$getState$colum = table.getState().columnVisibility) == null ? void 0 : _table$getState$colum[column.id]) != null ? _ref : true;
|
|
1464
|
+
};
|
|
1465
|
+
column.getCanHide = () => {
|
|
1466
|
+
var _column$columnDef$ena, _table$options$enable;
|
|
1467
|
+
return ((_column$columnDef$ena = column.columnDef.enableHiding) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableHiding) != null ? _table$options$enable : true);
|
|
1468
|
+
};
|
|
1469
|
+
column.getToggleVisibilityHandler = () => {
|
|
1470
|
+
return e => {
|
|
1471
|
+
column.toggleVisibility == null || column.toggleVisibility(e.target.checked);
|
|
1472
|
+
};
|
|
1473
|
+
};
|
|
1474
|
+
},
|
|
1475
|
+
createRow: (row, table) => {
|
|
1476
|
+
row._getAllVisibleCells = memo(() => [row.getAllCells(), table.getState().columnVisibility], cells => {
|
|
1477
|
+
return cells.filter(cell => cell.column.getIsVisible());
|
|
1478
|
+
}, getMemoOptions(table.options, 'debugRows'));
|
|
1479
|
+
row.getVisibleCells = memo(() => [row.getLeftVisibleCells(), row.getCenterVisibleCells(), row.getRightVisibleCells()], (left, center, right) => [...left, ...center, ...right], getMemoOptions(table.options, 'debugRows'));
|
|
1480
|
+
},
|
|
1481
|
+
createTable: table => {
|
|
1482
|
+
const makeVisibleColumnsMethod = (key, getColumns) => {
|
|
1483
|
+
return memo(() => [getColumns(), getColumns().filter(d => d.getIsVisible()).map(d => d.id).join('_')], columns => {
|
|
1484
|
+
return columns.filter(d => d.getIsVisible == null ? void 0 : d.getIsVisible());
|
|
1485
|
+
}, getMemoOptions(table.options, 'debugColumns'));
|
|
1486
|
+
};
|
|
1487
|
+
table.getVisibleFlatColumns = makeVisibleColumnsMethod('getVisibleFlatColumns', () => table.getAllFlatColumns());
|
|
1488
|
+
table.getVisibleLeafColumns = makeVisibleColumnsMethod('getVisibleLeafColumns', () => table.getAllLeafColumns());
|
|
1489
|
+
table.getLeftVisibleLeafColumns = makeVisibleColumnsMethod('getLeftVisibleLeafColumns', () => table.getLeftLeafColumns());
|
|
1490
|
+
table.getRightVisibleLeafColumns = makeVisibleColumnsMethod('getRightVisibleLeafColumns', () => table.getRightLeafColumns());
|
|
1491
|
+
table.getCenterVisibleLeafColumns = makeVisibleColumnsMethod('getCenterVisibleLeafColumns', () => table.getCenterLeafColumns());
|
|
1492
|
+
table.setColumnVisibility = updater => table.options.onColumnVisibilityChange == null ? void 0 : table.options.onColumnVisibilityChange(updater);
|
|
1493
|
+
table.resetColumnVisibility = defaultState => {
|
|
1494
|
+
var _table$initialState$c;
|
|
1495
|
+
table.setColumnVisibility(defaultState ? {} : (_table$initialState$c = table.initialState.columnVisibility) != null ? _table$initialState$c : {});
|
|
1496
|
+
};
|
|
1497
|
+
table.toggleAllColumnsVisible = value => {
|
|
1498
|
+
var _value;
|
|
1499
|
+
value = (_value = value) != null ? _value : !table.getIsAllColumnsVisible();
|
|
1500
|
+
table.setColumnVisibility(table.getAllLeafColumns().reduce((obj, column) => ({
|
|
1501
|
+
...obj,
|
|
1502
|
+
[column.id]: !value ? !(column.getCanHide != null && column.getCanHide()) : value
|
|
1503
|
+
}), {}));
|
|
1504
|
+
};
|
|
1505
|
+
table.getIsAllColumnsVisible = () => !table.getAllLeafColumns().some(column => !(column.getIsVisible != null && column.getIsVisible()));
|
|
1506
|
+
table.getIsSomeColumnsVisible = () => table.getAllLeafColumns().some(column => column.getIsVisible == null ? void 0 : column.getIsVisible());
|
|
1507
|
+
table.getToggleAllColumnsVisibilityHandler = () => {
|
|
1508
|
+
return e => {
|
|
1509
|
+
var _target;
|
|
1510
|
+
table.toggleAllColumnsVisible((_target = e.target) == null ? void 0 : _target.checked);
|
|
1511
|
+
};
|
|
1512
|
+
};
|
|
1513
|
+
}
|
|
1514
|
+
};
|
|
1515
|
+
function _getVisibleLeafColumns(table, position) {
|
|
1516
|
+
return !position ? table.getVisibleLeafColumns() : position === 'center' ? table.getCenterVisibleLeafColumns() : position === 'left' ? table.getLeftVisibleLeafColumns() : table.getRightVisibleLeafColumns();
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
//
|
|
1520
|
+
|
|
1521
|
+
const GlobalFaceting = {
|
|
1522
|
+
createTable: table => {
|
|
1523
|
+
table._getGlobalFacetedRowModel = table.options.getFacetedRowModel && table.options.getFacetedRowModel(table, '__global__');
|
|
1524
|
+
table.getGlobalFacetedRowModel = () => {
|
|
1525
|
+
if (table.options.manualFiltering || !table._getGlobalFacetedRowModel) {
|
|
1526
|
+
return table.getPreFilteredRowModel();
|
|
1527
|
+
}
|
|
1528
|
+
return table._getGlobalFacetedRowModel();
|
|
1529
|
+
};
|
|
1530
|
+
table._getGlobalFacetedUniqueValues = table.options.getFacetedUniqueValues && table.options.getFacetedUniqueValues(table, '__global__');
|
|
1531
|
+
table.getGlobalFacetedUniqueValues = () => {
|
|
1532
|
+
if (!table._getGlobalFacetedUniqueValues) {
|
|
1533
|
+
return new Map();
|
|
1534
|
+
}
|
|
1535
|
+
return table._getGlobalFacetedUniqueValues();
|
|
1536
|
+
};
|
|
1537
|
+
table._getGlobalFacetedMinMaxValues = table.options.getFacetedMinMaxValues && table.options.getFacetedMinMaxValues(table, '__global__');
|
|
1538
|
+
table.getGlobalFacetedMinMaxValues = () => {
|
|
1539
|
+
if (!table._getGlobalFacetedMinMaxValues) {
|
|
1540
|
+
return;
|
|
1541
|
+
}
|
|
1542
|
+
return table._getGlobalFacetedMinMaxValues();
|
|
1543
|
+
};
|
|
1544
|
+
}
|
|
1545
|
+
};
|
|
1546
|
+
|
|
1547
|
+
//
|
|
1548
|
+
|
|
1549
|
+
const GlobalFiltering = {
|
|
1550
|
+
getInitialState: state => {
|
|
1551
|
+
return {
|
|
1552
|
+
globalFilter: undefined,
|
|
1553
|
+
...state
|
|
1554
|
+
};
|
|
1555
|
+
},
|
|
1556
|
+
getDefaultOptions: table => {
|
|
1557
|
+
return {
|
|
1558
|
+
onGlobalFilterChange: makeStateUpdater('globalFilter', table),
|
|
1559
|
+
globalFilterFn: 'auto',
|
|
1560
|
+
getColumnCanGlobalFilter: column => {
|
|
1561
|
+
var _table$getCoreRowMode;
|
|
1562
|
+
const value = (_table$getCoreRowMode = table.getCoreRowModel().flatRows[0]) == null || (_table$getCoreRowMode = _table$getCoreRowMode._getAllCellsByColumnId()[column.id]) == null ? void 0 : _table$getCoreRowMode.getValue();
|
|
1563
|
+
return typeof value === 'string' || typeof value === 'number';
|
|
1564
|
+
}
|
|
1565
|
+
};
|
|
1566
|
+
},
|
|
1567
|
+
createColumn: (column, table) => {
|
|
1568
|
+
column.getCanGlobalFilter = () => {
|
|
1569
|
+
var _column$columnDef$ena, _table$options$enable, _table$options$enable2, _table$options$getCol;
|
|
1570
|
+
return ((_column$columnDef$ena = column.columnDef.enableGlobalFilter) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableGlobalFilter) != null ? _table$options$enable : true) && ((_table$options$enable2 = table.options.enableFilters) != null ? _table$options$enable2 : true) && ((_table$options$getCol = table.options.getColumnCanGlobalFilter == null ? void 0 : table.options.getColumnCanGlobalFilter(column)) != null ? _table$options$getCol : true) && !!column.accessorFn;
|
|
1571
|
+
};
|
|
1572
|
+
},
|
|
1573
|
+
createTable: table => {
|
|
1574
|
+
table.getGlobalAutoFilterFn = () => {
|
|
1575
|
+
return filterFns.includesString;
|
|
1576
|
+
};
|
|
1577
|
+
table.getGlobalFilterFn = () => {
|
|
1578
|
+
var _table$options$filter, _table$options$filter2;
|
|
1579
|
+
const {
|
|
1580
|
+
globalFilterFn: globalFilterFn
|
|
1581
|
+
} = table.options;
|
|
1582
|
+
return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === 'auto' ? table.getGlobalAutoFilterFn() : (_table$options$filter = (_table$options$filter2 = table.options.filterFns) == null ? void 0 : _table$options$filter2[globalFilterFn]) != null ? _table$options$filter : filterFns[globalFilterFn];
|
|
1583
|
+
};
|
|
1584
|
+
table.setGlobalFilter = updater => {
|
|
1585
|
+
table.options.onGlobalFilterChange == null || table.options.onGlobalFilterChange(updater);
|
|
1586
|
+
};
|
|
1587
|
+
table.resetGlobalFilter = defaultState => {
|
|
1588
|
+
table.setGlobalFilter(defaultState ? undefined : table.initialState.globalFilter);
|
|
1589
|
+
};
|
|
1590
|
+
}
|
|
1591
|
+
};
|
|
1592
|
+
|
|
1593
|
+
//
|
|
1594
|
+
|
|
1595
|
+
const RowExpanding = {
|
|
1596
|
+
getInitialState: state => {
|
|
1597
|
+
return {
|
|
1598
|
+
expanded: {},
|
|
1599
|
+
...state
|
|
1600
|
+
};
|
|
1601
|
+
},
|
|
1602
|
+
getDefaultOptions: table => {
|
|
1603
|
+
return {
|
|
1604
|
+
onExpandedChange: makeStateUpdater('expanded', table),
|
|
1605
|
+
paginateExpandedRows: true
|
|
1606
|
+
};
|
|
1607
|
+
},
|
|
1608
|
+
createTable: table => {
|
|
1609
|
+
let registered = false;
|
|
1610
|
+
let queued = false;
|
|
1611
|
+
table._autoResetExpanded = () => {
|
|
1612
|
+
var _ref, _table$options$autoRe;
|
|
1613
|
+
if (!registered) {
|
|
1614
|
+
table._queue(() => {
|
|
1615
|
+
registered = true;
|
|
1616
|
+
});
|
|
1617
|
+
return;
|
|
1618
|
+
}
|
|
1619
|
+
if ((_ref = (_table$options$autoRe = table.options.autoResetAll) != null ? _table$options$autoRe : table.options.autoResetExpanded) != null ? _ref : !table.options.manualExpanding) {
|
|
1620
|
+
if (queued) return;
|
|
1621
|
+
queued = true;
|
|
1622
|
+
table._queue(() => {
|
|
1623
|
+
table.resetExpanded();
|
|
1624
|
+
queued = false;
|
|
1625
|
+
});
|
|
1626
|
+
}
|
|
1627
|
+
};
|
|
1628
|
+
table.setExpanded = updater => table.options.onExpandedChange == null ? void 0 : table.options.onExpandedChange(updater);
|
|
1629
|
+
table.toggleAllRowsExpanded = expanded => {
|
|
1630
|
+
if (expanded != null ? expanded : !table.getIsAllRowsExpanded()) {
|
|
1631
|
+
table.setExpanded(true);
|
|
1632
|
+
} else {
|
|
1633
|
+
table.setExpanded({});
|
|
1634
|
+
}
|
|
1635
|
+
};
|
|
1636
|
+
table.resetExpanded = defaultState => {
|
|
1637
|
+
var _table$initialState$e, _table$initialState;
|
|
1638
|
+
table.setExpanded(defaultState ? {} : (_table$initialState$e = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.expanded) != null ? _table$initialState$e : {});
|
|
1639
|
+
};
|
|
1640
|
+
table.getCanSomeRowsExpand = () => {
|
|
1641
|
+
return table.getPrePaginationRowModel().flatRows.some(row => row.getCanExpand());
|
|
1642
|
+
};
|
|
1643
|
+
table.getToggleAllRowsExpandedHandler = () => {
|
|
1644
|
+
return e => {
|
|
1645
|
+
e.persist == null || e.persist();
|
|
1646
|
+
table.toggleAllRowsExpanded();
|
|
1647
|
+
};
|
|
1648
|
+
};
|
|
1649
|
+
table.getIsSomeRowsExpanded = () => {
|
|
1650
|
+
const expanded = table.getState().expanded;
|
|
1651
|
+
return expanded === true || Object.values(expanded).some(Boolean);
|
|
1652
|
+
};
|
|
1653
|
+
table.getIsAllRowsExpanded = () => {
|
|
1654
|
+
const expanded = table.getState().expanded;
|
|
1655
|
+
|
|
1656
|
+
// If expanded is true, save some cycles and return true
|
|
1657
|
+
if (typeof expanded === 'boolean') {
|
|
1658
|
+
return expanded === true;
|
|
1659
|
+
}
|
|
1660
|
+
if (!Object.keys(expanded).length) {
|
|
1661
|
+
return false;
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
// If any row is not expanded, return false
|
|
1665
|
+
if (table.getRowModel().flatRows.some(row => !row.getIsExpanded())) {
|
|
1666
|
+
return false;
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
// They must all be expanded :shrug:
|
|
1670
|
+
return true;
|
|
1671
|
+
};
|
|
1672
|
+
table.getExpandedDepth = () => {
|
|
1673
|
+
let maxDepth = 0;
|
|
1674
|
+
const rowIds = table.getState().expanded === true ? Object.keys(table.getRowModel().rowsById) : Object.keys(table.getState().expanded);
|
|
1675
|
+
rowIds.forEach(id => {
|
|
1676
|
+
const splitId = id.split('.');
|
|
1677
|
+
maxDepth = Math.max(maxDepth, splitId.length);
|
|
1678
|
+
});
|
|
1679
|
+
return maxDepth;
|
|
1680
|
+
};
|
|
1681
|
+
table.getPreExpandedRowModel = () => table.getSortedRowModel();
|
|
1682
|
+
table.getExpandedRowModel = () => {
|
|
1683
|
+
if (!table._getExpandedRowModel && table.options.getExpandedRowModel) {
|
|
1684
|
+
table._getExpandedRowModel = table.options.getExpandedRowModel(table);
|
|
1685
|
+
}
|
|
1686
|
+
if (table.options.manualExpanding || !table._getExpandedRowModel) {
|
|
1687
|
+
return table.getPreExpandedRowModel();
|
|
1688
|
+
}
|
|
1689
|
+
return table._getExpandedRowModel();
|
|
1690
|
+
};
|
|
1691
|
+
},
|
|
1692
|
+
createRow: (row, table) => {
|
|
1693
|
+
row.toggleExpanded = expanded => {
|
|
1694
|
+
table.setExpanded(old => {
|
|
1695
|
+
var _expanded;
|
|
1696
|
+
const exists = old === true ? true : !!(old != null && old[row.id]);
|
|
1697
|
+
let oldExpanded = {};
|
|
1698
|
+
if (old === true) {
|
|
1699
|
+
Object.keys(table.getRowModel().rowsById).forEach(rowId => {
|
|
1700
|
+
oldExpanded[rowId] = true;
|
|
1701
|
+
});
|
|
1702
|
+
} else {
|
|
1703
|
+
oldExpanded = old;
|
|
1704
|
+
}
|
|
1705
|
+
expanded = (_expanded = expanded) != null ? _expanded : !exists;
|
|
1706
|
+
if (!exists && expanded) {
|
|
1707
|
+
return {
|
|
1708
|
+
...oldExpanded,
|
|
1709
|
+
[row.id]: true
|
|
1710
|
+
};
|
|
1711
|
+
}
|
|
1712
|
+
if (exists && !expanded) {
|
|
1713
|
+
const {
|
|
1714
|
+
[row.id]: _,
|
|
1715
|
+
...rest
|
|
1716
|
+
} = oldExpanded;
|
|
1717
|
+
return rest;
|
|
1718
|
+
}
|
|
1719
|
+
return old;
|
|
1720
|
+
});
|
|
1721
|
+
};
|
|
1722
|
+
row.getIsExpanded = () => {
|
|
1723
|
+
var _table$options$getIsR;
|
|
1724
|
+
const expanded = table.getState().expanded;
|
|
1725
|
+
return !!((_table$options$getIsR = table.options.getIsRowExpanded == null ? void 0 : table.options.getIsRowExpanded(row)) != null ? _table$options$getIsR : expanded === true || (expanded == null ? void 0 : expanded[row.id]));
|
|
1726
|
+
};
|
|
1727
|
+
row.getCanExpand = () => {
|
|
1728
|
+
var _table$options$getRow, _table$options$enable, _row$subRows;
|
|
1729
|
+
return (_table$options$getRow = table.options.getRowCanExpand == null ? void 0 : table.options.getRowCanExpand(row)) != null ? _table$options$getRow : ((_table$options$enable = table.options.enableExpanding) != null ? _table$options$enable : true) && !!((_row$subRows = row.subRows) != null && _row$subRows.length);
|
|
1730
|
+
};
|
|
1731
|
+
row.getIsAllParentsExpanded = () => {
|
|
1732
|
+
let isFullyExpanded = true;
|
|
1733
|
+
let currentRow = row;
|
|
1734
|
+
while (isFullyExpanded && currentRow.parentId) {
|
|
1735
|
+
currentRow = table.getRow(currentRow.parentId, true);
|
|
1736
|
+
isFullyExpanded = currentRow.getIsExpanded();
|
|
1737
|
+
}
|
|
1738
|
+
return isFullyExpanded;
|
|
1739
|
+
};
|
|
1740
|
+
row.getToggleExpandedHandler = () => {
|
|
1741
|
+
const canExpand = row.getCanExpand();
|
|
1742
|
+
return () => {
|
|
1743
|
+
if (!canExpand) return;
|
|
1744
|
+
row.toggleExpanded();
|
|
1745
|
+
};
|
|
1746
|
+
};
|
|
1747
|
+
}
|
|
1748
|
+
};
|
|
1749
|
+
|
|
1750
|
+
//
|
|
1751
|
+
|
|
1752
|
+
const defaultPageIndex = 0;
|
|
1753
|
+
const defaultPageSize = 10;
|
|
1754
|
+
const getDefaultPaginationState = () => ({
|
|
1755
|
+
pageIndex: defaultPageIndex,
|
|
1756
|
+
pageSize: defaultPageSize
|
|
1757
|
+
});
|
|
1758
|
+
const RowPagination = {
|
|
1759
|
+
getInitialState: state => {
|
|
1760
|
+
return {
|
|
1761
|
+
...state,
|
|
1762
|
+
pagination: {
|
|
1763
|
+
...getDefaultPaginationState(),
|
|
1764
|
+
...(state == null ? void 0 : state.pagination)
|
|
1765
|
+
}
|
|
1766
|
+
};
|
|
1767
|
+
},
|
|
1768
|
+
getDefaultOptions: table => {
|
|
1769
|
+
return {
|
|
1770
|
+
onPaginationChange: makeStateUpdater('pagination', table)
|
|
1771
|
+
};
|
|
1772
|
+
},
|
|
1773
|
+
createTable: table => {
|
|
1774
|
+
let registered = false;
|
|
1775
|
+
let queued = false;
|
|
1776
|
+
table._autoResetPageIndex = () => {
|
|
1777
|
+
var _ref, _table$options$autoRe;
|
|
1778
|
+
if (!registered) {
|
|
1779
|
+
table._queue(() => {
|
|
1780
|
+
registered = true;
|
|
1781
|
+
});
|
|
1782
|
+
return;
|
|
1783
|
+
}
|
|
1784
|
+
if ((_ref = (_table$options$autoRe = table.options.autoResetAll) != null ? _table$options$autoRe : table.options.autoResetPageIndex) != null ? _ref : !table.options.manualPagination) {
|
|
1785
|
+
if (queued) return;
|
|
1786
|
+
queued = true;
|
|
1787
|
+
table._queue(() => {
|
|
1788
|
+
table.resetPageIndex();
|
|
1789
|
+
queued = false;
|
|
1790
|
+
});
|
|
1791
|
+
}
|
|
1792
|
+
};
|
|
1793
|
+
table.setPagination = updater => {
|
|
1794
|
+
const safeUpdater = old => {
|
|
1795
|
+
let newState = functionalUpdate(updater, old);
|
|
1796
|
+
return newState;
|
|
1797
|
+
};
|
|
1798
|
+
return table.options.onPaginationChange == null ? void 0 : table.options.onPaginationChange(safeUpdater);
|
|
1799
|
+
};
|
|
1800
|
+
table.resetPagination = defaultState => {
|
|
1801
|
+
var _table$initialState$p;
|
|
1802
|
+
table.setPagination(defaultState ? getDefaultPaginationState() : (_table$initialState$p = table.initialState.pagination) != null ? _table$initialState$p : getDefaultPaginationState());
|
|
1803
|
+
};
|
|
1804
|
+
table.setPageIndex = updater => {
|
|
1805
|
+
table.setPagination(old => {
|
|
1806
|
+
let pageIndex = functionalUpdate(updater, old.pageIndex);
|
|
1807
|
+
const maxPageIndex = typeof table.options.pageCount === 'undefined' || table.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : table.options.pageCount - 1;
|
|
1808
|
+
pageIndex = Math.max(0, Math.min(pageIndex, maxPageIndex));
|
|
1809
|
+
return {
|
|
1810
|
+
...old,
|
|
1811
|
+
pageIndex
|
|
1812
|
+
};
|
|
1813
|
+
});
|
|
1814
|
+
};
|
|
1815
|
+
table.resetPageIndex = defaultState => {
|
|
1816
|
+
var _table$initialState$p2, _table$initialState;
|
|
1817
|
+
table.setPageIndex(defaultState ? defaultPageIndex : (_table$initialState$p2 = (_table$initialState = table.initialState) == null || (_table$initialState = _table$initialState.pagination) == null ? void 0 : _table$initialState.pageIndex) != null ? _table$initialState$p2 : defaultPageIndex);
|
|
1818
|
+
};
|
|
1819
|
+
table.resetPageSize = defaultState => {
|
|
1820
|
+
var _table$initialState$p3, _table$initialState2;
|
|
1821
|
+
table.setPageSize(defaultState ? defaultPageSize : (_table$initialState$p3 = (_table$initialState2 = table.initialState) == null || (_table$initialState2 = _table$initialState2.pagination) == null ? void 0 : _table$initialState2.pageSize) != null ? _table$initialState$p3 : defaultPageSize);
|
|
1822
|
+
};
|
|
1823
|
+
table.setPageSize = updater => {
|
|
1824
|
+
table.setPagination(old => {
|
|
1825
|
+
const pageSize = Math.max(1, functionalUpdate(updater, old.pageSize));
|
|
1826
|
+
const topRowIndex = old.pageSize * old.pageIndex;
|
|
1827
|
+
const pageIndex = Math.floor(topRowIndex / pageSize);
|
|
1828
|
+
return {
|
|
1829
|
+
...old,
|
|
1830
|
+
pageIndex,
|
|
1831
|
+
pageSize
|
|
1832
|
+
};
|
|
1833
|
+
});
|
|
1834
|
+
};
|
|
1835
|
+
//deprecated
|
|
1836
|
+
table.setPageCount = updater => table.setPagination(old => {
|
|
1837
|
+
var _table$options$pageCo;
|
|
1838
|
+
let newPageCount = functionalUpdate(updater, (_table$options$pageCo = table.options.pageCount) != null ? _table$options$pageCo : -1);
|
|
1839
|
+
if (typeof newPageCount === 'number') {
|
|
1840
|
+
newPageCount = Math.max(-1, newPageCount);
|
|
1841
|
+
}
|
|
1842
|
+
return {
|
|
1843
|
+
...old,
|
|
1844
|
+
pageCount: newPageCount
|
|
1845
|
+
};
|
|
1846
|
+
});
|
|
1847
|
+
table.getPageOptions = memo(() => [table.getPageCount()], pageCount => {
|
|
1848
|
+
let pageOptions = [];
|
|
1849
|
+
if (pageCount && pageCount > 0) {
|
|
1850
|
+
pageOptions = [...new Array(pageCount)].fill(null).map((_, i) => i);
|
|
1851
|
+
}
|
|
1852
|
+
return pageOptions;
|
|
1853
|
+
}, getMemoOptions(table.options, 'debugTable'));
|
|
1854
|
+
table.getCanPreviousPage = () => table.getState().pagination.pageIndex > 0;
|
|
1855
|
+
table.getCanNextPage = () => {
|
|
1856
|
+
const {
|
|
1857
|
+
pageIndex
|
|
1858
|
+
} = table.getState().pagination;
|
|
1859
|
+
const pageCount = table.getPageCount();
|
|
1860
|
+
if (pageCount === -1) {
|
|
1861
|
+
return true;
|
|
1862
|
+
}
|
|
1863
|
+
if (pageCount === 0) {
|
|
1864
|
+
return false;
|
|
1865
|
+
}
|
|
1866
|
+
return pageIndex < pageCount - 1;
|
|
1867
|
+
};
|
|
1868
|
+
table.previousPage = () => {
|
|
1869
|
+
return table.setPageIndex(old => old - 1);
|
|
1870
|
+
};
|
|
1871
|
+
table.nextPage = () => {
|
|
1872
|
+
return table.setPageIndex(old => {
|
|
1873
|
+
return old + 1;
|
|
1874
|
+
});
|
|
1875
|
+
};
|
|
1876
|
+
table.firstPage = () => {
|
|
1877
|
+
return table.setPageIndex(0);
|
|
1878
|
+
};
|
|
1879
|
+
table.lastPage = () => {
|
|
1880
|
+
return table.setPageIndex(table.getPageCount() - 1);
|
|
1881
|
+
};
|
|
1882
|
+
table.getPrePaginationRowModel = () => table.getExpandedRowModel();
|
|
1883
|
+
table.getPaginationRowModel = () => {
|
|
1884
|
+
if (!table._getPaginationRowModel && table.options.getPaginationRowModel) {
|
|
1885
|
+
table._getPaginationRowModel = table.options.getPaginationRowModel(table);
|
|
1886
|
+
}
|
|
1887
|
+
if (table.options.manualPagination || !table._getPaginationRowModel) {
|
|
1888
|
+
return table.getPrePaginationRowModel();
|
|
1889
|
+
}
|
|
1890
|
+
return table._getPaginationRowModel();
|
|
1891
|
+
};
|
|
1892
|
+
table.getPageCount = () => {
|
|
1893
|
+
var _table$options$pageCo2;
|
|
1894
|
+
return (_table$options$pageCo2 = table.options.pageCount) != null ? _table$options$pageCo2 : Math.ceil(table.getRowCount() / table.getState().pagination.pageSize);
|
|
1895
|
+
};
|
|
1896
|
+
table.getRowCount = () => {
|
|
1897
|
+
var _table$options$rowCou;
|
|
1898
|
+
return (_table$options$rowCou = table.options.rowCount) != null ? _table$options$rowCou : table.getPrePaginationRowModel().rows.length;
|
|
1899
|
+
};
|
|
1900
|
+
}
|
|
1901
|
+
};
|
|
1902
|
+
|
|
1903
|
+
//
|
|
1904
|
+
|
|
1905
|
+
const getDefaultRowPinningState = () => ({
|
|
1906
|
+
top: [],
|
|
1907
|
+
bottom: []
|
|
1908
|
+
});
|
|
1909
|
+
const RowPinning = {
|
|
1910
|
+
getInitialState: state => {
|
|
1911
|
+
return {
|
|
1912
|
+
rowPinning: getDefaultRowPinningState(),
|
|
1913
|
+
...state
|
|
1914
|
+
};
|
|
1915
|
+
},
|
|
1916
|
+
getDefaultOptions: table => {
|
|
1917
|
+
return {
|
|
1918
|
+
onRowPinningChange: makeStateUpdater('rowPinning', table)
|
|
1919
|
+
};
|
|
1920
|
+
},
|
|
1921
|
+
createRow: (row, table) => {
|
|
1922
|
+
row.pin = (position, includeLeafRows, includeParentRows) => {
|
|
1923
|
+
const leafRowIds = includeLeafRows ? row.getLeafRows().map(_ref => {
|
|
1924
|
+
let {
|
|
1925
|
+
id
|
|
1926
|
+
} = _ref;
|
|
1927
|
+
return id;
|
|
1928
|
+
}) : [];
|
|
1929
|
+
const parentRowIds = includeParentRows ? row.getParentRows().map(_ref2 => {
|
|
1930
|
+
let {
|
|
1931
|
+
id
|
|
1932
|
+
} = _ref2;
|
|
1933
|
+
return id;
|
|
1934
|
+
}) : [];
|
|
1935
|
+
const rowIds = new Set([...parentRowIds, row.id, ...leafRowIds]);
|
|
1936
|
+
table.setRowPinning(old => {
|
|
1937
|
+
var _old$top3, _old$bottom3;
|
|
1938
|
+
if (position === 'bottom') {
|
|
1939
|
+
var _old$top, _old$bottom;
|
|
1940
|
+
return {
|
|
1941
|
+
top: ((_old$top = old == null ? void 0 : old.top) != null ? _old$top : []).filter(d => !(rowIds != null && rowIds.has(d))),
|
|
1942
|
+
bottom: [...((_old$bottom = old == null ? void 0 : old.bottom) != null ? _old$bottom : []).filter(d => !(rowIds != null && rowIds.has(d))), ...Array.from(rowIds)]
|
|
1943
|
+
};
|
|
1944
|
+
}
|
|
1945
|
+
if (position === 'top') {
|
|
1946
|
+
var _old$top2, _old$bottom2;
|
|
1947
|
+
return {
|
|
1948
|
+
top: [...((_old$top2 = old == null ? void 0 : old.top) != null ? _old$top2 : []).filter(d => !(rowIds != null && rowIds.has(d))), ...Array.from(rowIds)],
|
|
1949
|
+
bottom: ((_old$bottom2 = old == null ? void 0 : old.bottom) != null ? _old$bottom2 : []).filter(d => !(rowIds != null && rowIds.has(d)))
|
|
1950
|
+
};
|
|
1951
|
+
}
|
|
1952
|
+
return {
|
|
1953
|
+
top: ((_old$top3 = old == null ? void 0 : old.top) != null ? _old$top3 : []).filter(d => !(rowIds != null && rowIds.has(d))),
|
|
1954
|
+
bottom: ((_old$bottom3 = old == null ? void 0 : old.bottom) != null ? _old$bottom3 : []).filter(d => !(rowIds != null && rowIds.has(d)))
|
|
1955
|
+
};
|
|
1956
|
+
});
|
|
1957
|
+
};
|
|
1958
|
+
row.getCanPin = () => {
|
|
1959
|
+
var _ref3;
|
|
1960
|
+
const {
|
|
1961
|
+
enableRowPinning,
|
|
1962
|
+
enablePinning
|
|
1963
|
+
} = table.options;
|
|
1964
|
+
if (typeof enableRowPinning === 'function') {
|
|
1965
|
+
return enableRowPinning(row);
|
|
1966
|
+
}
|
|
1967
|
+
return (_ref3 = enableRowPinning != null ? enableRowPinning : enablePinning) != null ? _ref3 : true;
|
|
1968
|
+
};
|
|
1969
|
+
row.getIsPinned = () => {
|
|
1970
|
+
const rowIds = [row.id];
|
|
1971
|
+
const {
|
|
1972
|
+
top,
|
|
1973
|
+
bottom
|
|
1974
|
+
} = table.getState().rowPinning;
|
|
1975
|
+
const isTop = rowIds.some(d => top == null ? void 0 : top.includes(d));
|
|
1976
|
+
const isBottom = rowIds.some(d => bottom == null ? void 0 : bottom.includes(d));
|
|
1977
|
+
return isTop ? 'top' : isBottom ? 'bottom' : false;
|
|
1978
|
+
};
|
|
1979
|
+
row.getPinnedIndex = () => {
|
|
1980
|
+
var _ref4, _visiblePinnedRowIds$;
|
|
1981
|
+
const position = row.getIsPinned();
|
|
1982
|
+
if (!position) return -1;
|
|
1983
|
+
const visiblePinnedRowIds = (_ref4 = position === 'top' ? table.getTopRows() : table.getBottomRows()) == null ? void 0 : _ref4.map(_ref5 => {
|
|
1984
|
+
let {
|
|
1985
|
+
id
|
|
1986
|
+
} = _ref5;
|
|
1987
|
+
return id;
|
|
1988
|
+
});
|
|
1989
|
+
return (_visiblePinnedRowIds$ = visiblePinnedRowIds == null ? void 0 : visiblePinnedRowIds.indexOf(row.id)) != null ? _visiblePinnedRowIds$ : -1;
|
|
1990
|
+
};
|
|
1991
|
+
},
|
|
1992
|
+
createTable: table => {
|
|
1993
|
+
table.setRowPinning = updater => table.options.onRowPinningChange == null ? void 0 : table.options.onRowPinningChange(updater);
|
|
1994
|
+
table.resetRowPinning = defaultState => {
|
|
1995
|
+
var _table$initialState$r, _table$initialState;
|
|
1996
|
+
return table.setRowPinning(defaultState ? getDefaultRowPinningState() : (_table$initialState$r = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.rowPinning) != null ? _table$initialState$r : getDefaultRowPinningState());
|
|
1997
|
+
};
|
|
1998
|
+
table.getIsSomeRowsPinned = position => {
|
|
1999
|
+
var _pinningState$positio;
|
|
2000
|
+
const pinningState = table.getState().rowPinning;
|
|
2001
|
+
if (!position) {
|
|
2002
|
+
var _pinningState$top, _pinningState$bottom;
|
|
2003
|
+
return Boolean(((_pinningState$top = pinningState.top) == null ? void 0 : _pinningState$top.length) || ((_pinningState$bottom = pinningState.bottom) == null ? void 0 : _pinningState$bottom.length));
|
|
2004
|
+
}
|
|
2005
|
+
return Boolean((_pinningState$positio = pinningState[position]) == null ? void 0 : _pinningState$positio.length);
|
|
2006
|
+
};
|
|
2007
|
+
table._getPinnedRows = (visibleRows, pinnedRowIds, position) => {
|
|
2008
|
+
var _table$options$keepPi;
|
|
2009
|
+
const rows = ((_table$options$keepPi = table.options.keepPinnedRows) != null ? _table$options$keepPi : true) ?
|
|
2010
|
+
//get all rows that are pinned even if they would not be otherwise visible
|
|
2011
|
+
//account for expanded parent rows, but not pagination or filtering
|
|
2012
|
+
(pinnedRowIds != null ? pinnedRowIds : []).map(rowId => {
|
|
2013
|
+
const row = table.getRow(rowId, true);
|
|
2014
|
+
return row.getIsAllParentsExpanded() ? row : null;
|
|
2015
|
+
}) :
|
|
2016
|
+
//else get only visible rows that are pinned
|
|
2017
|
+
(pinnedRowIds != null ? pinnedRowIds : []).map(rowId => visibleRows.find(row => row.id === rowId));
|
|
2018
|
+
return rows.filter(Boolean).map(d => ({
|
|
2019
|
+
...d,
|
|
2020
|
+
position
|
|
2021
|
+
}));
|
|
2022
|
+
};
|
|
2023
|
+
table.getTopRows = memo(() => [table.getRowModel().rows, table.getState().rowPinning.top], (allRows, topPinnedRowIds) => table._getPinnedRows(allRows, topPinnedRowIds, 'top'), getMemoOptions(table.options, 'debugRows'));
|
|
2024
|
+
table.getBottomRows = memo(() => [table.getRowModel().rows, table.getState().rowPinning.bottom], (allRows, bottomPinnedRowIds) => table._getPinnedRows(allRows, bottomPinnedRowIds, 'bottom'), getMemoOptions(table.options, 'debugRows'));
|
|
2025
|
+
table.getCenterRows = memo(() => [table.getRowModel().rows, table.getState().rowPinning.top, table.getState().rowPinning.bottom], (allRows, top, bottom) => {
|
|
2026
|
+
const topAndBottom = new Set([...(top != null ? top : []), ...(bottom != null ? bottom : [])]);
|
|
2027
|
+
return allRows.filter(d => !topAndBottom.has(d.id));
|
|
2028
|
+
}, getMemoOptions(table.options, 'debugRows'));
|
|
2029
|
+
}
|
|
2030
|
+
};
|
|
2031
|
+
|
|
2032
|
+
//
|
|
2033
|
+
|
|
2034
|
+
const RowSelection = {
|
|
2035
|
+
getInitialState: state => {
|
|
2036
|
+
return {
|
|
2037
|
+
rowSelection: {},
|
|
2038
|
+
...state
|
|
2039
|
+
};
|
|
2040
|
+
},
|
|
2041
|
+
getDefaultOptions: table => {
|
|
2042
|
+
return {
|
|
2043
|
+
onRowSelectionChange: makeStateUpdater('rowSelection', table),
|
|
2044
|
+
enableRowSelection: true,
|
|
2045
|
+
enableMultiRowSelection: true,
|
|
2046
|
+
enableSubRowSelection: true
|
|
2047
|
+
// enableGroupingRowSelection: false,
|
|
2048
|
+
// isAdditiveSelectEvent: (e: unknown) => !!e.metaKey,
|
|
2049
|
+
// isInclusiveSelectEvent: (e: unknown) => !!e.shiftKey,
|
|
2050
|
+
};
|
|
2051
|
+
},
|
|
2052
|
+
createTable: table => {
|
|
2053
|
+
table.setRowSelection = updater => table.options.onRowSelectionChange == null ? void 0 : table.options.onRowSelectionChange(updater);
|
|
2054
|
+
table.resetRowSelection = defaultState => {
|
|
2055
|
+
var _table$initialState$r;
|
|
2056
|
+
return table.setRowSelection(defaultState ? {} : (_table$initialState$r = table.initialState.rowSelection) != null ? _table$initialState$r : {});
|
|
2057
|
+
};
|
|
2058
|
+
table.toggleAllRowsSelected = value => {
|
|
2059
|
+
table.setRowSelection(old => {
|
|
2060
|
+
value = typeof value !== 'undefined' ? value : !table.getIsAllRowsSelected();
|
|
2061
|
+
const rowSelection = {
|
|
2062
|
+
...old
|
|
2063
|
+
};
|
|
2064
|
+
const preGroupedFlatRows = table.getPreGroupedRowModel().flatRows;
|
|
2065
|
+
|
|
2066
|
+
// We don't use `mutateRowIsSelected` here for performance reasons.
|
|
2067
|
+
// All of the rows are flat already, so it wouldn't be worth it
|
|
2068
|
+
if (value) {
|
|
2069
|
+
preGroupedFlatRows.forEach(row => {
|
|
2070
|
+
if (!row.getCanSelect()) {
|
|
2071
|
+
return;
|
|
2072
|
+
}
|
|
2073
|
+
rowSelection[row.id] = true;
|
|
2074
|
+
});
|
|
2075
|
+
} else {
|
|
2076
|
+
preGroupedFlatRows.forEach(row => {
|
|
2077
|
+
delete rowSelection[row.id];
|
|
2078
|
+
});
|
|
2079
|
+
}
|
|
2080
|
+
return rowSelection;
|
|
2081
|
+
});
|
|
2082
|
+
};
|
|
2083
|
+
table.toggleAllPageRowsSelected = value => table.setRowSelection(old => {
|
|
2084
|
+
const resolvedValue = typeof value !== 'undefined' ? value : !table.getIsAllPageRowsSelected();
|
|
2085
|
+
const rowSelection = {
|
|
2086
|
+
...old
|
|
2087
|
+
};
|
|
2088
|
+
table.getRowModel().rows.forEach(row => {
|
|
2089
|
+
mutateRowIsSelected(rowSelection, row.id, resolvedValue, true, table);
|
|
2090
|
+
});
|
|
2091
|
+
return rowSelection;
|
|
2092
|
+
});
|
|
2093
|
+
|
|
2094
|
+
// addRowSelectionRange: rowId => {
|
|
2095
|
+
// const {
|
|
2096
|
+
// rows,
|
|
2097
|
+
// rowsById,
|
|
2098
|
+
// options: { selectGroupingRows, selectSubRows },
|
|
2099
|
+
// } = table
|
|
2100
|
+
|
|
2101
|
+
// const findSelectedRow = (rows: Row[]) => {
|
|
2102
|
+
// let found
|
|
2103
|
+
// rows.find(d => {
|
|
2104
|
+
// if (d.getIsSelected()) {
|
|
2105
|
+
// found = d
|
|
2106
|
+
// return true
|
|
2107
|
+
// }
|
|
2108
|
+
// const subFound = findSelectedRow(d.subRows || [])
|
|
2109
|
+
// if (subFound) {
|
|
2110
|
+
// found = subFound
|
|
2111
|
+
// return true
|
|
2112
|
+
// }
|
|
2113
|
+
// return false
|
|
2114
|
+
// })
|
|
2115
|
+
// return found
|
|
2116
|
+
// }
|
|
2117
|
+
|
|
2118
|
+
// const firstRow = findSelectedRow(rows) || rows[0]
|
|
2119
|
+
// const lastRow = rowsById[rowId]
|
|
2120
|
+
|
|
2121
|
+
// let include = false
|
|
2122
|
+
// const selectedRowIds = {}
|
|
2123
|
+
|
|
2124
|
+
// const addRow = (row: Row) => {
|
|
2125
|
+
// mutateRowIsSelected(selectedRowIds, row.id, true, {
|
|
2126
|
+
// rowsById,
|
|
2127
|
+
// selectGroupingRows: selectGroupingRows!,
|
|
2128
|
+
// selectSubRows: selectSubRows!,
|
|
2129
|
+
// })
|
|
2130
|
+
// }
|
|
2131
|
+
|
|
2132
|
+
// table.rows.forEach(row => {
|
|
2133
|
+
// const isFirstRow = row.id === firstRow.id
|
|
2134
|
+
// const isLastRow = row.id === lastRow.id
|
|
2135
|
+
|
|
2136
|
+
// if (isFirstRow || isLastRow) {
|
|
2137
|
+
// if (!include) {
|
|
2138
|
+
// include = true
|
|
2139
|
+
// } else if (include) {
|
|
2140
|
+
// addRow(row)
|
|
2141
|
+
// include = false
|
|
2142
|
+
// }
|
|
2143
|
+
// }
|
|
2144
|
+
|
|
2145
|
+
// if (include) {
|
|
2146
|
+
// addRow(row)
|
|
2147
|
+
// }
|
|
2148
|
+
// })
|
|
2149
|
+
|
|
2150
|
+
// table.setRowSelection(selectedRowIds)
|
|
2151
|
+
// },
|
|
2152
|
+
table.getPreSelectedRowModel = () => table.getCoreRowModel();
|
|
2153
|
+
table.getSelectedRowModel = memo(() => [table.getState().rowSelection, table.getCoreRowModel()], (rowSelection, rowModel) => {
|
|
2154
|
+
if (!Object.keys(rowSelection).length) {
|
|
2155
|
+
return {
|
|
2156
|
+
rows: [],
|
|
2157
|
+
flatRows: [],
|
|
2158
|
+
rowsById: {}
|
|
2159
|
+
};
|
|
2160
|
+
}
|
|
2161
|
+
return selectRowsFn(table, rowModel);
|
|
2162
|
+
}, getMemoOptions(table.options, 'debugTable'));
|
|
2163
|
+
table.getFilteredSelectedRowModel = memo(() => [table.getState().rowSelection, table.getFilteredRowModel()], (rowSelection, rowModel) => {
|
|
2164
|
+
if (!Object.keys(rowSelection).length) {
|
|
2165
|
+
return {
|
|
2166
|
+
rows: [],
|
|
2167
|
+
flatRows: [],
|
|
2168
|
+
rowsById: {}
|
|
2169
|
+
};
|
|
2170
|
+
}
|
|
2171
|
+
return selectRowsFn(table, rowModel);
|
|
2172
|
+
}, getMemoOptions(table.options, 'debugTable'));
|
|
2173
|
+
table.getGroupedSelectedRowModel = memo(() => [table.getState().rowSelection, table.getSortedRowModel()], (rowSelection, rowModel) => {
|
|
2174
|
+
if (!Object.keys(rowSelection).length) {
|
|
2175
|
+
return {
|
|
2176
|
+
rows: [],
|
|
2177
|
+
flatRows: [],
|
|
2178
|
+
rowsById: {}
|
|
2179
|
+
};
|
|
2180
|
+
}
|
|
2181
|
+
return selectRowsFn(table, rowModel);
|
|
2182
|
+
}, getMemoOptions(table.options, 'debugTable'));
|
|
2183
|
+
|
|
2184
|
+
///
|
|
2185
|
+
|
|
2186
|
+
// getGroupingRowCanSelect: rowId => {
|
|
2187
|
+
// const row = table.getRow(rowId)
|
|
2188
|
+
|
|
2189
|
+
// if (!row) {
|
|
2190
|
+
// throw new Error()
|
|
2191
|
+
// }
|
|
2192
|
+
|
|
2193
|
+
// if (typeof table.options.enableGroupingRowSelection === 'function') {
|
|
2194
|
+
// return table.options.enableGroupingRowSelection(row)
|
|
2195
|
+
// }
|
|
2196
|
+
|
|
2197
|
+
// return table.options.enableGroupingRowSelection ?? false
|
|
2198
|
+
// },
|
|
2199
|
+
|
|
2200
|
+
table.getIsAllRowsSelected = () => {
|
|
2201
|
+
const preGroupedFlatRows = table.getFilteredRowModel().flatRows;
|
|
2202
|
+
const {
|
|
2203
|
+
rowSelection
|
|
2204
|
+
} = table.getState();
|
|
2205
|
+
let isAllRowsSelected = Boolean(preGroupedFlatRows.length && Object.keys(rowSelection).length);
|
|
2206
|
+
if (isAllRowsSelected) {
|
|
2207
|
+
if (preGroupedFlatRows.some(row => row.getCanSelect() && !rowSelection[row.id])) {
|
|
2208
|
+
isAllRowsSelected = false;
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
return isAllRowsSelected;
|
|
2212
|
+
};
|
|
2213
|
+
table.getIsAllPageRowsSelected = () => {
|
|
2214
|
+
const paginationFlatRows = table.getPaginationRowModel().flatRows.filter(row => row.getCanSelect());
|
|
2215
|
+
const {
|
|
2216
|
+
rowSelection
|
|
2217
|
+
} = table.getState();
|
|
2218
|
+
let isAllPageRowsSelected = !!paginationFlatRows.length;
|
|
2219
|
+
if (isAllPageRowsSelected && paginationFlatRows.some(row => !rowSelection[row.id])) {
|
|
2220
|
+
isAllPageRowsSelected = false;
|
|
2221
|
+
}
|
|
2222
|
+
return isAllPageRowsSelected;
|
|
2223
|
+
};
|
|
2224
|
+
table.getIsSomeRowsSelected = () => {
|
|
2225
|
+
var _table$getState$rowSe;
|
|
2226
|
+
const totalSelected = Object.keys((_table$getState$rowSe = table.getState().rowSelection) != null ? _table$getState$rowSe : {}).length;
|
|
2227
|
+
return totalSelected > 0 && totalSelected < table.getFilteredRowModel().flatRows.length;
|
|
2228
|
+
};
|
|
2229
|
+
table.getIsSomePageRowsSelected = () => {
|
|
2230
|
+
const paginationFlatRows = table.getPaginationRowModel().flatRows;
|
|
2231
|
+
return table.getIsAllPageRowsSelected() ? false : paginationFlatRows.filter(row => row.getCanSelect()).some(d => d.getIsSelected() || d.getIsSomeSelected());
|
|
2232
|
+
};
|
|
2233
|
+
table.getToggleAllRowsSelectedHandler = () => {
|
|
2234
|
+
return e => {
|
|
2235
|
+
table.toggleAllRowsSelected(e.target.checked);
|
|
2236
|
+
};
|
|
2237
|
+
};
|
|
2238
|
+
table.getToggleAllPageRowsSelectedHandler = () => {
|
|
2239
|
+
return e => {
|
|
2240
|
+
table.toggleAllPageRowsSelected(e.target.checked);
|
|
2241
|
+
};
|
|
2242
|
+
};
|
|
2243
|
+
},
|
|
2244
|
+
createRow: (row, table) => {
|
|
2245
|
+
row.toggleSelected = (value, opts) => {
|
|
2246
|
+
const isSelected = row.getIsSelected();
|
|
2247
|
+
table.setRowSelection(old => {
|
|
2248
|
+
var _opts$selectChildren;
|
|
2249
|
+
value = typeof value !== 'undefined' ? value : !isSelected;
|
|
2250
|
+
if (row.getCanSelect() && isSelected === value) {
|
|
2251
|
+
return old;
|
|
2252
|
+
}
|
|
2253
|
+
const selectedRowIds = {
|
|
2254
|
+
...old
|
|
2255
|
+
};
|
|
2256
|
+
mutateRowIsSelected(selectedRowIds, row.id, value, (_opts$selectChildren = opts == null ? void 0 : opts.selectChildren) != null ? _opts$selectChildren : true, table);
|
|
2257
|
+
return selectedRowIds;
|
|
2258
|
+
});
|
|
2259
|
+
};
|
|
2260
|
+
row.getIsSelected = () => {
|
|
2261
|
+
const {
|
|
2262
|
+
rowSelection
|
|
2263
|
+
} = table.getState();
|
|
2264
|
+
return isRowSelected(row, rowSelection);
|
|
2265
|
+
};
|
|
2266
|
+
row.getIsSomeSelected = () => {
|
|
2267
|
+
const {
|
|
2268
|
+
rowSelection
|
|
2269
|
+
} = table.getState();
|
|
2270
|
+
return isSubRowSelected(row, rowSelection) === 'some';
|
|
2271
|
+
};
|
|
2272
|
+
row.getIsAllSubRowsSelected = () => {
|
|
2273
|
+
const {
|
|
2274
|
+
rowSelection
|
|
2275
|
+
} = table.getState();
|
|
2276
|
+
return isSubRowSelected(row, rowSelection) === 'all';
|
|
2277
|
+
};
|
|
2278
|
+
row.getCanSelect = () => {
|
|
2279
|
+
var _table$options$enable;
|
|
2280
|
+
if (typeof table.options.enableRowSelection === 'function') {
|
|
2281
|
+
return table.options.enableRowSelection(row);
|
|
2282
|
+
}
|
|
2283
|
+
return (_table$options$enable = table.options.enableRowSelection) != null ? _table$options$enable : true;
|
|
2284
|
+
};
|
|
2285
|
+
row.getCanSelectSubRows = () => {
|
|
2286
|
+
var _table$options$enable2;
|
|
2287
|
+
if (typeof table.options.enableSubRowSelection === 'function') {
|
|
2288
|
+
return table.options.enableSubRowSelection(row);
|
|
2289
|
+
}
|
|
2290
|
+
return (_table$options$enable2 = table.options.enableSubRowSelection) != null ? _table$options$enable2 : true;
|
|
2291
|
+
};
|
|
2292
|
+
row.getCanMultiSelect = () => {
|
|
2293
|
+
var _table$options$enable3;
|
|
2294
|
+
if (typeof table.options.enableMultiRowSelection === 'function') {
|
|
2295
|
+
return table.options.enableMultiRowSelection(row);
|
|
2296
|
+
}
|
|
2297
|
+
return (_table$options$enable3 = table.options.enableMultiRowSelection) != null ? _table$options$enable3 : true;
|
|
2298
|
+
};
|
|
2299
|
+
row.getToggleSelectedHandler = () => {
|
|
2300
|
+
const canSelect = row.getCanSelect();
|
|
2301
|
+
return e => {
|
|
2302
|
+
var _target;
|
|
2303
|
+
if (!canSelect) return;
|
|
2304
|
+
row.toggleSelected((_target = e.target) == null ? void 0 : _target.checked);
|
|
2305
|
+
};
|
|
2306
|
+
};
|
|
2307
|
+
}
|
|
2308
|
+
};
|
|
2309
|
+
const mutateRowIsSelected = (selectedRowIds, id, value, includeChildren, table) => {
|
|
2310
|
+
var _row$subRows;
|
|
2311
|
+
const row = table.getRow(id, true);
|
|
2312
|
+
|
|
2313
|
+
// const isGrouped = row.getIsGrouped()
|
|
2314
|
+
|
|
2315
|
+
// if ( // TODO: enforce grouping row selection rules
|
|
2316
|
+
// !isGrouped ||
|
|
2317
|
+
// (isGrouped && table.options.enableGroupingRowSelection)
|
|
2318
|
+
// ) {
|
|
2319
|
+
if (value) {
|
|
2320
|
+
if (!row.getCanMultiSelect()) {
|
|
2321
|
+
Object.keys(selectedRowIds).forEach(key => delete selectedRowIds[key]);
|
|
2322
|
+
}
|
|
2323
|
+
if (row.getCanSelect()) {
|
|
2324
|
+
selectedRowIds[id] = true;
|
|
2325
|
+
}
|
|
2326
|
+
} else {
|
|
2327
|
+
delete selectedRowIds[id];
|
|
2328
|
+
}
|
|
2329
|
+
// }
|
|
2330
|
+
|
|
2331
|
+
if (includeChildren && (_row$subRows = row.subRows) != null && _row$subRows.length && row.getCanSelectSubRows()) {
|
|
2332
|
+
row.subRows.forEach(row => mutateRowIsSelected(selectedRowIds, row.id, value, includeChildren, table));
|
|
2333
|
+
}
|
|
2334
|
+
};
|
|
2335
|
+
function selectRowsFn(table, rowModel) {
|
|
2336
|
+
const rowSelection = table.getState().rowSelection;
|
|
2337
|
+
const newSelectedFlatRows = [];
|
|
2338
|
+
const newSelectedRowsById = {};
|
|
2339
|
+
|
|
2340
|
+
// Filters top level and nested rows
|
|
2341
|
+
const recurseRows = function (rows, depth) {
|
|
2342
|
+
return rows.map(row => {
|
|
2343
|
+
var _row$subRows2;
|
|
2344
|
+
const isSelected = isRowSelected(row, rowSelection);
|
|
2345
|
+
if (isSelected) {
|
|
2346
|
+
newSelectedFlatRows.push(row);
|
|
2347
|
+
newSelectedRowsById[row.id] = row;
|
|
2348
|
+
}
|
|
2349
|
+
if ((_row$subRows2 = row.subRows) != null && _row$subRows2.length) {
|
|
2350
|
+
row = {
|
|
2351
|
+
...row,
|
|
2352
|
+
subRows: recurseRows(row.subRows)
|
|
2353
|
+
};
|
|
2354
|
+
}
|
|
2355
|
+
if (isSelected) {
|
|
2356
|
+
return row;
|
|
2357
|
+
}
|
|
2358
|
+
}).filter(Boolean);
|
|
2359
|
+
};
|
|
2360
|
+
return {
|
|
2361
|
+
rows: recurseRows(rowModel.rows),
|
|
2362
|
+
flatRows: newSelectedFlatRows,
|
|
2363
|
+
rowsById: newSelectedRowsById
|
|
2364
|
+
};
|
|
2365
|
+
}
|
|
2366
|
+
function isRowSelected(row, selection) {
|
|
2367
|
+
var _selection$row$id;
|
|
2368
|
+
return (_selection$row$id = selection[row.id]) != null ? _selection$row$id : false;
|
|
2369
|
+
}
|
|
2370
|
+
function isSubRowSelected(row, selection, table) {
|
|
2371
|
+
var _row$subRows3;
|
|
2372
|
+
if (!((_row$subRows3 = row.subRows) != null && _row$subRows3.length)) return false;
|
|
2373
|
+
let allChildrenSelected = true;
|
|
2374
|
+
let someSelected = false;
|
|
2375
|
+
row.subRows.forEach(subRow => {
|
|
2376
|
+
// Bail out early if we know both of these
|
|
2377
|
+
if (someSelected && !allChildrenSelected) {
|
|
2378
|
+
return;
|
|
2379
|
+
}
|
|
2380
|
+
if (subRow.getCanSelect()) {
|
|
2381
|
+
if (isRowSelected(subRow, selection)) {
|
|
2382
|
+
someSelected = true;
|
|
2383
|
+
} else {
|
|
2384
|
+
allChildrenSelected = false;
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2388
|
+
// Check row selection of nested subrows
|
|
2389
|
+
if (subRow.subRows && subRow.subRows.length) {
|
|
2390
|
+
const subRowChildrenSelected = isSubRowSelected(subRow, selection);
|
|
2391
|
+
if (subRowChildrenSelected === 'all') {
|
|
2392
|
+
someSelected = true;
|
|
2393
|
+
} else if (subRowChildrenSelected === 'some') {
|
|
2394
|
+
someSelected = true;
|
|
2395
|
+
allChildrenSelected = false;
|
|
2396
|
+
} else {
|
|
2397
|
+
allChildrenSelected = false;
|
|
2398
|
+
}
|
|
2399
|
+
}
|
|
2400
|
+
});
|
|
2401
|
+
return allChildrenSelected ? 'all' : someSelected ? 'some' : false;
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
const reSplitAlphaNumeric = /([0-9]+)/gm;
|
|
2405
|
+
const alphanumeric = (rowA, rowB, columnId) => {
|
|
2406
|
+
return compareAlphanumeric(toString(rowA.getValue(columnId)).toLowerCase(), toString(rowB.getValue(columnId)).toLowerCase());
|
|
2407
|
+
};
|
|
2408
|
+
const alphanumericCaseSensitive = (rowA, rowB, columnId) => {
|
|
2409
|
+
return compareAlphanumeric(toString(rowA.getValue(columnId)), toString(rowB.getValue(columnId)));
|
|
2410
|
+
};
|
|
2411
|
+
|
|
2412
|
+
// The text filter is more basic (less numeric support)
|
|
2413
|
+
// but is much faster
|
|
2414
|
+
const text = (rowA, rowB, columnId) => {
|
|
2415
|
+
return compareBasic(toString(rowA.getValue(columnId)).toLowerCase(), toString(rowB.getValue(columnId)).toLowerCase());
|
|
2416
|
+
};
|
|
2417
|
+
|
|
2418
|
+
// The text filter is more basic (less numeric support)
|
|
2419
|
+
// but is much faster
|
|
2420
|
+
const textCaseSensitive = (rowA, rowB, columnId) => {
|
|
2421
|
+
return compareBasic(toString(rowA.getValue(columnId)), toString(rowB.getValue(columnId)));
|
|
2422
|
+
};
|
|
2423
|
+
const datetime = (rowA, rowB, columnId) => {
|
|
2424
|
+
const a = rowA.getValue(columnId);
|
|
2425
|
+
const b = rowB.getValue(columnId);
|
|
2426
|
+
|
|
2427
|
+
// Can handle nullish values
|
|
2428
|
+
// Use > and < because == (and ===) doesn't work with
|
|
2429
|
+
// Date objects (would require calling getTime()).
|
|
2430
|
+
return a > b ? 1 : a < b ? -1 : 0;
|
|
2431
|
+
};
|
|
2432
|
+
const basic = (rowA, rowB, columnId) => {
|
|
2433
|
+
return compareBasic(rowA.getValue(columnId), rowB.getValue(columnId));
|
|
2434
|
+
};
|
|
2435
|
+
|
|
2436
|
+
// Utils
|
|
2437
|
+
|
|
2438
|
+
function compareBasic(a, b) {
|
|
2439
|
+
return a === b ? 0 : a > b ? 1 : -1;
|
|
2440
|
+
}
|
|
2441
|
+
function toString(a) {
|
|
2442
|
+
if (typeof a === 'number') {
|
|
2443
|
+
if (isNaN(a) || a === Infinity || a === -Infinity) {
|
|
2444
|
+
return '';
|
|
2445
|
+
}
|
|
2446
|
+
return String(a);
|
|
2447
|
+
}
|
|
2448
|
+
if (typeof a === 'string') {
|
|
2449
|
+
return a;
|
|
2450
|
+
}
|
|
2451
|
+
return '';
|
|
2452
|
+
}
|
|
2453
|
+
|
|
2454
|
+
// Mixed sorting is slow, but very inclusive of many edge cases.
|
|
2455
|
+
// It handles numbers, mixed alphanumeric combinations, and even
|
|
2456
|
+
// null, undefined, and Infinity
|
|
2457
|
+
function compareAlphanumeric(aStr, bStr) {
|
|
2458
|
+
// Split on number groups, but keep the delimiter
|
|
2459
|
+
// Then remove falsey split values
|
|
2460
|
+
const a = aStr.split(reSplitAlphaNumeric).filter(Boolean);
|
|
2461
|
+
const b = bStr.split(reSplitAlphaNumeric).filter(Boolean);
|
|
2462
|
+
|
|
2463
|
+
// While
|
|
2464
|
+
while (a.length && b.length) {
|
|
2465
|
+
const aa = a.shift();
|
|
2466
|
+
const bb = b.shift();
|
|
2467
|
+
const an = parseInt(aa, 10);
|
|
2468
|
+
const bn = parseInt(bb, 10);
|
|
2469
|
+
const combo = [an, bn].sort();
|
|
2470
|
+
|
|
2471
|
+
// Both are string
|
|
2472
|
+
if (isNaN(combo[0])) {
|
|
2473
|
+
if (aa > bb) {
|
|
2474
|
+
return 1;
|
|
2475
|
+
}
|
|
2476
|
+
if (bb > aa) {
|
|
2477
|
+
return -1;
|
|
2478
|
+
}
|
|
2479
|
+
continue;
|
|
2480
|
+
}
|
|
2481
|
+
|
|
2482
|
+
// One is a string, one is a number
|
|
2483
|
+
if (isNaN(combo[1])) {
|
|
2484
|
+
return isNaN(an) ? -1 : 1;
|
|
2485
|
+
}
|
|
2486
|
+
|
|
2487
|
+
// Both are numbers
|
|
2488
|
+
if (an > bn) {
|
|
2489
|
+
return 1;
|
|
2490
|
+
}
|
|
2491
|
+
if (bn > an) {
|
|
2492
|
+
return -1;
|
|
2493
|
+
}
|
|
2494
|
+
}
|
|
2495
|
+
return a.length - b.length;
|
|
2496
|
+
}
|
|
2497
|
+
|
|
2498
|
+
// Exports
|
|
2499
|
+
|
|
2500
|
+
const sortingFns = {
|
|
2501
|
+
alphanumeric,
|
|
2502
|
+
alphanumericCaseSensitive,
|
|
2503
|
+
text,
|
|
2504
|
+
textCaseSensitive,
|
|
2505
|
+
datetime,
|
|
2506
|
+
basic
|
|
2507
|
+
};
|
|
2508
|
+
|
|
2509
|
+
//
|
|
2510
|
+
|
|
2511
|
+
const RowSorting = {
|
|
2512
|
+
getInitialState: state => {
|
|
2513
|
+
return {
|
|
2514
|
+
sorting: [],
|
|
2515
|
+
...state
|
|
2516
|
+
};
|
|
2517
|
+
},
|
|
2518
|
+
getDefaultColumnDef: () => {
|
|
2519
|
+
return {
|
|
2520
|
+
sortingFn: 'auto',
|
|
2521
|
+
sortUndefined: 1
|
|
2522
|
+
};
|
|
2523
|
+
},
|
|
2524
|
+
getDefaultOptions: table => {
|
|
2525
|
+
return {
|
|
2526
|
+
onSortingChange: makeStateUpdater('sorting', table),
|
|
2527
|
+
isMultiSortEvent: e => {
|
|
2528
|
+
return e.shiftKey;
|
|
2529
|
+
}
|
|
2530
|
+
};
|
|
2531
|
+
},
|
|
2532
|
+
createColumn: (column, table) => {
|
|
2533
|
+
column.getAutoSortingFn = () => {
|
|
2534
|
+
const firstRows = table.getFilteredRowModel().flatRows.slice(10);
|
|
2535
|
+
let isString = false;
|
|
2536
|
+
for (const row of firstRows) {
|
|
2537
|
+
const value = row == null ? void 0 : row.getValue(column.id);
|
|
2538
|
+
if (Object.prototype.toString.call(value) === '[object Date]') {
|
|
2539
|
+
return sortingFns.datetime;
|
|
2540
|
+
}
|
|
2541
|
+
if (typeof value === 'string') {
|
|
2542
|
+
isString = true;
|
|
2543
|
+
if (value.split(reSplitAlphaNumeric).length > 1) {
|
|
2544
|
+
return sortingFns.alphanumeric;
|
|
2545
|
+
}
|
|
2546
|
+
}
|
|
2547
|
+
}
|
|
2548
|
+
if (isString) {
|
|
2549
|
+
return sortingFns.text;
|
|
2550
|
+
}
|
|
2551
|
+
return sortingFns.basic;
|
|
2552
|
+
};
|
|
2553
|
+
column.getAutoSortDir = () => {
|
|
2554
|
+
const firstRow = table.getFilteredRowModel().flatRows[0];
|
|
2555
|
+
const value = firstRow == null ? void 0 : firstRow.getValue(column.id);
|
|
2556
|
+
if (typeof value === 'string') {
|
|
2557
|
+
return 'asc';
|
|
2558
|
+
}
|
|
2559
|
+
return 'desc';
|
|
2560
|
+
};
|
|
2561
|
+
column.getSortingFn = () => {
|
|
2562
|
+
var _table$options$sortin, _table$options$sortin2;
|
|
2563
|
+
if (!column) {
|
|
2564
|
+
throw new Error();
|
|
2565
|
+
}
|
|
2566
|
+
return isFunction(column.columnDef.sortingFn) ? column.columnDef.sortingFn : column.columnDef.sortingFn === 'auto' ? column.getAutoSortingFn() : (_table$options$sortin = (_table$options$sortin2 = table.options.sortingFns) == null ? void 0 : _table$options$sortin2[column.columnDef.sortingFn]) != null ? _table$options$sortin : sortingFns[column.columnDef.sortingFn];
|
|
2567
|
+
};
|
|
2568
|
+
column.toggleSorting = (desc, multi) => {
|
|
2569
|
+
// if (column.columns.length) {
|
|
2570
|
+
// column.columns.forEach((c, i) => {
|
|
2571
|
+
// if (c.id) {
|
|
2572
|
+
// table.toggleColumnSorting(c.id, undefined, multi || !!i)
|
|
2573
|
+
// }
|
|
2574
|
+
// })
|
|
2575
|
+
// return
|
|
2576
|
+
// }
|
|
2577
|
+
|
|
2578
|
+
// this needs to be outside of table.setSorting to be in sync with rerender
|
|
2579
|
+
const nextSortingOrder = column.getNextSortingOrder();
|
|
2580
|
+
const hasManualValue = typeof desc !== 'undefined' && desc !== null;
|
|
2581
|
+
table.setSorting(old => {
|
|
2582
|
+
// Find any existing sorting for this column
|
|
2583
|
+
const existingSorting = old == null ? void 0 : old.find(d => d.id === column.id);
|
|
2584
|
+
const existingIndex = old == null ? void 0 : old.findIndex(d => d.id === column.id);
|
|
2585
|
+
let newSorting = [];
|
|
2586
|
+
|
|
2587
|
+
// What should we do with this sort action?
|
|
2588
|
+
let sortAction;
|
|
2589
|
+
let nextDesc = hasManualValue ? desc : nextSortingOrder === 'desc';
|
|
2590
|
+
|
|
2591
|
+
// Multi-mode
|
|
2592
|
+
if (old != null && old.length && column.getCanMultiSort() && multi) {
|
|
2593
|
+
if (existingSorting) {
|
|
2594
|
+
sortAction = 'toggle';
|
|
2595
|
+
} else {
|
|
2596
|
+
sortAction = 'add';
|
|
2597
|
+
}
|
|
2598
|
+
} else {
|
|
2599
|
+
// Normal mode
|
|
2600
|
+
if (old != null && old.length && existingIndex !== old.length - 1) {
|
|
2601
|
+
sortAction = 'replace';
|
|
2602
|
+
} else if (existingSorting) {
|
|
2603
|
+
sortAction = 'toggle';
|
|
2604
|
+
} else {
|
|
2605
|
+
sortAction = 'replace';
|
|
2606
|
+
}
|
|
2607
|
+
}
|
|
2608
|
+
|
|
2609
|
+
// Handle toggle states that will remove the sorting
|
|
2610
|
+
if (sortAction === 'toggle') {
|
|
2611
|
+
// If we are "actually" toggling (not a manual set value), should we remove the sorting?
|
|
2612
|
+
if (!hasManualValue) {
|
|
2613
|
+
// Is our intention to remove?
|
|
2614
|
+
if (!nextSortingOrder) {
|
|
2615
|
+
sortAction = 'remove';
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
if (sortAction === 'add') {
|
|
2620
|
+
var _table$options$maxMul;
|
|
2621
|
+
newSorting = [...old, {
|
|
2622
|
+
id: column.id,
|
|
2623
|
+
desc: nextDesc
|
|
2624
|
+
}];
|
|
2625
|
+
// Take latest n columns
|
|
2626
|
+
newSorting.splice(0, newSorting.length - ((_table$options$maxMul = table.options.maxMultiSortColCount) != null ? _table$options$maxMul : Number.MAX_SAFE_INTEGER));
|
|
2627
|
+
} else if (sortAction === 'toggle') {
|
|
2628
|
+
// This flips (or sets) the
|
|
2629
|
+
newSorting = old.map(d => {
|
|
2630
|
+
if (d.id === column.id) {
|
|
2631
|
+
return {
|
|
2632
|
+
...d,
|
|
2633
|
+
desc: nextDesc
|
|
2634
|
+
};
|
|
2635
|
+
}
|
|
2636
|
+
return d;
|
|
2637
|
+
});
|
|
2638
|
+
} else if (sortAction === 'remove') {
|
|
2639
|
+
newSorting = old.filter(d => d.id !== column.id);
|
|
2640
|
+
} else {
|
|
2641
|
+
newSorting = [{
|
|
2642
|
+
id: column.id,
|
|
2643
|
+
desc: nextDesc
|
|
2644
|
+
}];
|
|
2645
|
+
}
|
|
2646
|
+
return newSorting;
|
|
2647
|
+
});
|
|
2648
|
+
};
|
|
2649
|
+
column.getFirstSortDir = () => {
|
|
2650
|
+
var _ref, _column$columnDef$sor;
|
|
2651
|
+
const sortDescFirst = (_ref = (_column$columnDef$sor = column.columnDef.sortDescFirst) != null ? _column$columnDef$sor : table.options.sortDescFirst) != null ? _ref : column.getAutoSortDir() === 'desc';
|
|
2652
|
+
return sortDescFirst ? 'desc' : 'asc';
|
|
2653
|
+
};
|
|
2654
|
+
column.getNextSortingOrder = multi => {
|
|
2655
|
+
var _table$options$enable, _table$options$enable2;
|
|
2656
|
+
const firstSortDirection = column.getFirstSortDir();
|
|
2657
|
+
const isSorted = column.getIsSorted();
|
|
2658
|
+
if (!isSorted) {
|
|
2659
|
+
return firstSortDirection;
|
|
2660
|
+
}
|
|
2661
|
+
if (isSorted !== firstSortDirection && ((_table$options$enable = table.options.enableSortingRemoval) != null ? _table$options$enable : true) && (
|
|
2662
|
+
// If enableSortRemove, enable in general
|
|
2663
|
+
multi ? (_table$options$enable2 = table.options.enableMultiRemove) != null ? _table$options$enable2 : true : true) // If multi, don't allow if enableMultiRemove))
|
|
2664
|
+
) {
|
|
2665
|
+
return false;
|
|
2666
|
+
}
|
|
2667
|
+
return isSorted === 'desc' ? 'asc' : 'desc';
|
|
2668
|
+
};
|
|
2669
|
+
column.getCanSort = () => {
|
|
2670
|
+
var _column$columnDef$ena, _table$options$enable3;
|
|
2671
|
+
return ((_column$columnDef$ena = column.columnDef.enableSorting) != null ? _column$columnDef$ena : true) && ((_table$options$enable3 = table.options.enableSorting) != null ? _table$options$enable3 : true) && !!column.accessorFn;
|
|
2672
|
+
};
|
|
2673
|
+
column.getCanMultiSort = () => {
|
|
2674
|
+
var _ref2, _column$columnDef$ena2;
|
|
2675
|
+
return (_ref2 = (_column$columnDef$ena2 = column.columnDef.enableMultiSort) != null ? _column$columnDef$ena2 : table.options.enableMultiSort) != null ? _ref2 : !!column.accessorFn;
|
|
2676
|
+
};
|
|
2677
|
+
column.getIsSorted = () => {
|
|
2678
|
+
var _table$getState$sorti;
|
|
2679
|
+
const columnSort = (_table$getState$sorti = table.getState().sorting) == null ? void 0 : _table$getState$sorti.find(d => d.id === column.id);
|
|
2680
|
+
return !columnSort ? false : columnSort.desc ? 'desc' : 'asc';
|
|
2681
|
+
};
|
|
2682
|
+
column.getSortIndex = () => {
|
|
2683
|
+
var _table$getState$sorti2, _table$getState$sorti3;
|
|
2684
|
+
return (_table$getState$sorti2 = (_table$getState$sorti3 = table.getState().sorting) == null ? void 0 : _table$getState$sorti3.findIndex(d => d.id === column.id)) != null ? _table$getState$sorti2 : -1;
|
|
2685
|
+
};
|
|
2686
|
+
column.clearSorting = () => {
|
|
2687
|
+
//clear sorting for just 1 column
|
|
2688
|
+
table.setSorting(old => old != null && old.length ? old.filter(d => d.id !== column.id) : []);
|
|
2689
|
+
};
|
|
2690
|
+
column.getToggleSortingHandler = () => {
|
|
2691
|
+
const canSort = column.getCanSort();
|
|
2692
|
+
return e => {
|
|
2693
|
+
if (!canSort) return;
|
|
2694
|
+
e.persist == null || e.persist();
|
|
2695
|
+
column.toggleSorting == null || column.toggleSorting(undefined, column.getCanMultiSort() ? table.options.isMultiSortEvent == null ? void 0 : table.options.isMultiSortEvent(e) : false);
|
|
2696
|
+
};
|
|
2697
|
+
};
|
|
2698
|
+
},
|
|
2699
|
+
createTable: table => {
|
|
2700
|
+
table.setSorting = updater => table.options.onSortingChange == null ? void 0 : table.options.onSortingChange(updater);
|
|
2701
|
+
table.resetSorting = defaultState => {
|
|
2702
|
+
var _table$initialState$s, _table$initialState;
|
|
2703
|
+
table.setSorting(defaultState ? [] : (_table$initialState$s = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.sorting) != null ? _table$initialState$s : []);
|
|
2704
|
+
};
|
|
2705
|
+
table.getPreSortedRowModel = () => table.getGroupedRowModel();
|
|
2706
|
+
table.getSortedRowModel = () => {
|
|
2707
|
+
if (!table._getSortedRowModel && table.options.getSortedRowModel) {
|
|
2708
|
+
table._getSortedRowModel = table.options.getSortedRowModel(table);
|
|
2709
|
+
}
|
|
2710
|
+
if (table.options.manualSorting || !table._getSortedRowModel) {
|
|
2711
|
+
return table.getPreSortedRowModel();
|
|
2712
|
+
}
|
|
2713
|
+
return table._getSortedRowModel();
|
|
2714
|
+
};
|
|
2715
|
+
}
|
|
2716
|
+
};
|
|
2717
|
+
|
|
2718
|
+
const builtInFeatures = [Headers, ColumnVisibility, ColumnOrdering, ColumnPinning, ColumnFaceting, ColumnFiltering, GlobalFaceting,
|
|
2719
|
+
//depends on ColumnFaceting
|
|
2720
|
+
GlobalFiltering,
|
|
2721
|
+
//depends on ColumnFiltering
|
|
2722
|
+
RowSorting, ColumnGrouping,
|
|
2723
|
+
//depends on RowSorting
|
|
2724
|
+
RowExpanding, RowPagination, RowPinning, RowSelection, ColumnSizing];
|
|
2725
|
+
|
|
2726
|
+
//
|
|
2727
|
+
|
|
2728
|
+
function createTable(options) {
|
|
2729
|
+
var _options$_features, _options$initialState;
|
|
2730
|
+
const _features = [...builtInFeatures, ...((_options$_features = options._features) != null ? _options$_features : [])];
|
|
2731
|
+
let table = {
|
|
2732
|
+
_features
|
|
2733
|
+
};
|
|
2734
|
+
const defaultOptions = table._features.reduce((obj, feature) => {
|
|
2735
|
+
return Object.assign(obj, feature.getDefaultOptions == null ? void 0 : feature.getDefaultOptions(table));
|
|
2736
|
+
}, {});
|
|
2737
|
+
const mergeOptions = options => {
|
|
2738
|
+
if (table.options.mergeOptions) {
|
|
2739
|
+
return table.options.mergeOptions(defaultOptions, options);
|
|
2740
|
+
}
|
|
2741
|
+
return {
|
|
2742
|
+
...defaultOptions,
|
|
2743
|
+
...options
|
|
2744
|
+
};
|
|
2745
|
+
};
|
|
2746
|
+
const coreInitialState = {};
|
|
2747
|
+
let initialState = {
|
|
2748
|
+
...coreInitialState,
|
|
2749
|
+
...((_options$initialState = options.initialState) != null ? _options$initialState : {})
|
|
2750
|
+
};
|
|
2751
|
+
table._features.forEach(feature => {
|
|
2752
|
+
var _feature$getInitialSt;
|
|
2753
|
+
initialState = (_feature$getInitialSt = feature.getInitialState == null ? void 0 : feature.getInitialState(initialState)) != null ? _feature$getInitialSt : initialState;
|
|
2754
|
+
});
|
|
2755
|
+
const queued = [];
|
|
2756
|
+
let queuedTimeout = false;
|
|
2757
|
+
const coreInstance = {
|
|
2758
|
+
_features,
|
|
2759
|
+
options: {
|
|
2760
|
+
...defaultOptions,
|
|
2761
|
+
...options
|
|
2762
|
+
},
|
|
2763
|
+
initialState,
|
|
2764
|
+
_queue: cb => {
|
|
2765
|
+
queued.push(cb);
|
|
2766
|
+
if (!queuedTimeout) {
|
|
2767
|
+
queuedTimeout = true;
|
|
2768
|
+
|
|
2769
|
+
// Schedule a microtask to run the queued callbacks after
|
|
2770
|
+
// the current call stack (render, etc) has finished.
|
|
2771
|
+
Promise.resolve().then(() => {
|
|
2772
|
+
while (queued.length) {
|
|
2773
|
+
queued.shift()();
|
|
2774
|
+
}
|
|
2775
|
+
queuedTimeout = false;
|
|
2776
|
+
}).catch(error => setTimeout(() => {
|
|
2777
|
+
throw error;
|
|
2778
|
+
}));
|
|
2779
|
+
}
|
|
2780
|
+
},
|
|
2781
|
+
reset: () => {
|
|
2782
|
+
table.setState(table.initialState);
|
|
2783
|
+
},
|
|
2784
|
+
setOptions: updater => {
|
|
2785
|
+
const newOptions = functionalUpdate(updater, table.options);
|
|
2786
|
+
table.options = mergeOptions(newOptions);
|
|
2787
|
+
},
|
|
2788
|
+
getState: () => {
|
|
2789
|
+
return table.options.state;
|
|
2790
|
+
},
|
|
2791
|
+
setState: updater => {
|
|
2792
|
+
table.options.onStateChange == null || table.options.onStateChange(updater);
|
|
2793
|
+
},
|
|
2794
|
+
_getRowId: (row, index, parent) => {
|
|
2795
|
+
var _table$options$getRow;
|
|
2796
|
+
return (_table$options$getRow = table.options.getRowId == null ? void 0 : table.options.getRowId(row, index, parent)) != null ? _table$options$getRow : `${parent ? [parent.id, index].join('.') : index}`;
|
|
2797
|
+
},
|
|
2798
|
+
getCoreRowModel: () => {
|
|
2799
|
+
if (!table._getCoreRowModel) {
|
|
2800
|
+
table._getCoreRowModel = table.options.getCoreRowModel(table);
|
|
2801
|
+
}
|
|
2802
|
+
return table._getCoreRowModel();
|
|
2803
|
+
},
|
|
2804
|
+
// The final calls start at the bottom of the model,
|
|
2805
|
+
// expanded rows, which then work their way up
|
|
2806
|
+
|
|
2807
|
+
getRowModel: () => {
|
|
2808
|
+
return table.getPaginationRowModel();
|
|
2809
|
+
},
|
|
2810
|
+
//in next version, we should just pass in the row model as the optional 2nd arg
|
|
2811
|
+
getRow: (id, searchAll) => {
|
|
2812
|
+
let row = (searchAll ? table.getPrePaginationRowModel() : table.getRowModel()).rowsById[id];
|
|
2813
|
+
if (!row) {
|
|
2814
|
+
row = table.getCoreRowModel().rowsById[id];
|
|
2815
|
+
if (!row) {
|
|
2816
|
+
throw new Error();
|
|
2817
|
+
}
|
|
2818
|
+
}
|
|
2819
|
+
return row;
|
|
2820
|
+
},
|
|
2821
|
+
_getDefaultColumnDef: memo(() => [table.options.defaultColumn], defaultColumn => {
|
|
2822
|
+
var _defaultColumn;
|
|
2823
|
+
defaultColumn = (_defaultColumn = defaultColumn) != null ? _defaultColumn : {};
|
|
2824
|
+
return {
|
|
2825
|
+
header: props => {
|
|
2826
|
+
const resolvedColumnDef = props.header.column.columnDef;
|
|
2827
|
+
if (resolvedColumnDef.accessorKey) {
|
|
2828
|
+
return resolvedColumnDef.accessorKey;
|
|
2829
|
+
}
|
|
2830
|
+
if (resolvedColumnDef.accessorFn) {
|
|
2831
|
+
return resolvedColumnDef.id;
|
|
2832
|
+
}
|
|
2833
|
+
return null;
|
|
2834
|
+
},
|
|
2835
|
+
// footer: props => props.header.column.id,
|
|
2836
|
+
cell: props => {
|
|
2837
|
+
var _props$renderValue$to, _props$renderValue;
|
|
2838
|
+
return (_props$renderValue$to = (_props$renderValue = props.renderValue()) == null || _props$renderValue.toString == null ? void 0 : _props$renderValue.toString()) != null ? _props$renderValue$to : null;
|
|
2839
|
+
},
|
|
2840
|
+
...table._features.reduce((obj, feature) => {
|
|
2841
|
+
return Object.assign(obj, feature.getDefaultColumnDef == null ? void 0 : feature.getDefaultColumnDef());
|
|
2842
|
+
}, {}),
|
|
2843
|
+
...defaultColumn
|
|
2844
|
+
};
|
|
2845
|
+
}, getMemoOptions(options, 'debugColumns')),
|
|
2846
|
+
_getColumnDefs: () => table.options.columns,
|
|
2847
|
+
getAllColumns: memo(() => [table._getColumnDefs()], columnDefs => {
|
|
2848
|
+
const recurseColumns = function (columnDefs, parent, depth) {
|
|
2849
|
+
if (depth === void 0) {
|
|
2850
|
+
depth = 0;
|
|
2851
|
+
}
|
|
2852
|
+
return columnDefs.map(columnDef => {
|
|
2853
|
+
const column = createColumn(table, columnDef, depth, parent);
|
|
2854
|
+
const groupingColumnDef = columnDef;
|
|
2855
|
+
column.columns = groupingColumnDef.columns ? recurseColumns(groupingColumnDef.columns, column, depth + 1) : [];
|
|
2856
|
+
return column;
|
|
2857
|
+
});
|
|
2858
|
+
};
|
|
2859
|
+
return recurseColumns(columnDefs);
|
|
2860
|
+
}, getMemoOptions(options, 'debugColumns')),
|
|
2861
|
+
getAllFlatColumns: memo(() => [table.getAllColumns()], allColumns => {
|
|
2862
|
+
return allColumns.flatMap(column => {
|
|
2863
|
+
return column.getFlatColumns();
|
|
2864
|
+
});
|
|
2865
|
+
}, getMemoOptions(options, 'debugColumns')),
|
|
2866
|
+
_getAllFlatColumnsById: memo(() => [table.getAllFlatColumns()], flatColumns => {
|
|
2867
|
+
return flatColumns.reduce((acc, column) => {
|
|
2868
|
+
acc[column.id] = column;
|
|
2869
|
+
return acc;
|
|
2870
|
+
}, {});
|
|
2871
|
+
}, getMemoOptions(options, 'debugColumns')),
|
|
2872
|
+
getAllLeafColumns: memo(() => [table.getAllColumns(), table._getOrderColumnsFn()], (allColumns, orderColumns) => {
|
|
2873
|
+
let leafColumns = allColumns.flatMap(column => column.getLeafColumns());
|
|
2874
|
+
return orderColumns(leafColumns);
|
|
2875
|
+
}, getMemoOptions(options, 'debugColumns')),
|
|
2876
|
+
getColumn: columnId => {
|
|
2877
|
+
const column = table._getAllFlatColumnsById()[columnId];
|
|
2878
|
+
return column;
|
|
2879
|
+
}
|
|
2880
|
+
};
|
|
2881
|
+
Object.assign(table, coreInstance);
|
|
2882
|
+
for (let index = 0; index < table._features.length; index++) {
|
|
2883
|
+
const feature = table._features[index];
|
|
2884
|
+
feature == null || feature.createTable == null || feature.createTable(table);
|
|
2885
|
+
}
|
|
2886
|
+
return table;
|
|
2887
|
+
}
|
|
2888
|
+
|
|
2889
|
+
function getCoreRowModel() {
|
|
2890
|
+
return table => memo(() => [table.options.data], data => {
|
|
2891
|
+
const rowModel = {
|
|
2892
|
+
rows: [],
|
|
2893
|
+
flatRows: [],
|
|
2894
|
+
rowsById: {}
|
|
2895
|
+
};
|
|
2896
|
+
const accessRows = function (originalRows, depth, parentRow) {
|
|
2897
|
+
if (depth === void 0) {
|
|
2898
|
+
depth = 0;
|
|
2899
|
+
}
|
|
2900
|
+
const rows = [];
|
|
2901
|
+
for (let i = 0; i < originalRows.length; i++) {
|
|
2902
|
+
// This could be an expensive check at scale, so we should move it somewhere else, but where?
|
|
2903
|
+
// if (!id) {
|
|
2904
|
+
// if ("production" !== 'production') {
|
|
2905
|
+
// throw new Error(`getRowId expected an ID, but got ${id}`)
|
|
2906
|
+
// }
|
|
2907
|
+
// }
|
|
2908
|
+
|
|
2909
|
+
// Make the row
|
|
2910
|
+
const row = createRow(table, table._getRowId(originalRows[i], i, parentRow), originalRows[i], i, depth, undefined, parentRow == null ? void 0 : parentRow.id);
|
|
2911
|
+
|
|
2912
|
+
// Keep track of every row in a flat array
|
|
2913
|
+
rowModel.flatRows.push(row);
|
|
2914
|
+
// Also keep track of every row by its ID
|
|
2915
|
+
rowModel.rowsById[row.id] = row;
|
|
2916
|
+
// Push table row into parent
|
|
2917
|
+
rows.push(row);
|
|
2918
|
+
|
|
2919
|
+
// Get the original subrows
|
|
2920
|
+
if (table.options.getSubRows) {
|
|
2921
|
+
var _row$originalSubRows;
|
|
2922
|
+
row.originalSubRows = table.options.getSubRows(originalRows[i], i);
|
|
2923
|
+
|
|
2924
|
+
// Then recursively access them
|
|
2925
|
+
if ((_row$originalSubRows = row.originalSubRows) != null && _row$originalSubRows.length) {
|
|
2926
|
+
row.subRows = accessRows(row.originalSubRows, depth + 1, row);
|
|
2927
|
+
}
|
|
2928
|
+
}
|
|
2929
|
+
}
|
|
2930
|
+
return rows;
|
|
2931
|
+
};
|
|
2932
|
+
rowModel.rows = accessRows(data);
|
|
2933
|
+
return rowModel;
|
|
2934
|
+
}, getMemoOptions(table.options, 'debugTable', 'getRowModel', () => table._autoResetPageIndex()));
|
|
2935
|
+
}
|
|
2936
|
+
|
|
2937
|
+
function getExpandedRowModel() {
|
|
2938
|
+
return table => memo(() => [table.getState().expanded, table.getPreExpandedRowModel(), table.options.paginateExpandedRows], (expanded, rowModel, paginateExpandedRows) => {
|
|
2939
|
+
if (!rowModel.rows.length || expanded !== true && !Object.keys(expanded != null ? expanded : {}).length) {
|
|
2940
|
+
return rowModel;
|
|
2941
|
+
}
|
|
2942
|
+
if (!paginateExpandedRows) {
|
|
2943
|
+
// Only expand rows at this point if they are being paginated
|
|
2944
|
+
return rowModel;
|
|
2945
|
+
}
|
|
2946
|
+
return expandRows(rowModel);
|
|
2947
|
+
}, getMemoOptions(table.options, 'debugTable'));
|
|
2948
|
+
}
|
|
2949
|
+
function expandRows(rowModel) {
|
|
2950
|
+
const expandedRows = [];
|
|
2951
|
+
const handleRow = row => {
|
|
2952
|
+
var _row$subRows;
|
|
2953
|
+
expandedRows.push(row);
|
|
2954
|
+
if ((_row$subRows = row.subRows) != null && _row$subRows.length && row.getIsExpanded()) {
|
|
2955
|
+
row.subRows.forEach(handleRow);
|
|
2956
|
+
}
|
|
2957
|
+
};
|
|
2958
|
+
rowModel.rows.forEach(handleRow);
|
|
2959
|
+
return {
|
|
2960
|
+
rows: expandedRows,
|
|
2961
|
+
flatRows: rowModel.flatRows,
|
|
2962
|
+
rowsById: rowModel.rowsById
|
|
2963
|
+
};
|
|
2964
|
+
}
|
|
2965
|
+
|
|
2966
|
+
function filterRows(rows, filterRowImpl, table) {
|
|
2967
|
+
if (table.options.filterFromLeafRows) {
|
|
2968
|
+
return filterRowModelFromLeafs(rows, filterRowImpl, table);
|
|
2969
|
+
}
|
|
2970
|
+
return filterRowModelFromRoot(rows, filterRowImpl, table);
|
|
2971
|
+
}
|
|
2972
|
+
function filterRowModelFromLeafs(rowsToFilter, filterRow, table) {
|
|
2973
|
+
var _table$options$maxLea;
|
|
2974
|
+
const newFilteredFlatRows = [];
|
|
2975
|
+
const newFilteredRowsById = {};
|
|
2976
|
+
const maxDepth = (_table$options$maxLea = table.options.maxLeafRowFilterDepth) != null ? _table$options$maxLea : 100;
|
|
2977
|
+
const recurseFilterRows = function (rowsToFilter, depth) {
|
|
2978
|
+
if (depth === void 0) {
|
|
2979
|
+
depth = 0;
|
|
2980
|
+
}
|
|
2981
|
+
const rows = [];
|
|
2982
|
+
|
|
2983
|
+
// Filter from children up first
|
|
2984
|
+
for (let i = 0; i < rowsToFilter.length; i++) {
|
|
2985
|
+
var _row$subRows;
|
|
2986
|
+
let row = rowsToFilter[i];
|
|
2987
|
+
const newRow = createRow(table, row.id, row.original, row.index, row.depth, undefined, row.parentId);
|
|
2988
|
+
newRow.columnFilters = row.columnFilters;
|
|
2989
|
+
if ((_row$subRows = row.subRows) != null && _row$subRows.length && depth < maxDepth) {
|
|
2990
|
+
newRow.subRows = recurseFilterRows(row.subRows, depth + 1);
|
|
2991
|
+
row = newRow;
|
|
2992
|
+
if (filterRow(row) && !newRow.subRows.length) {
|
|
2993
|
+
rows.push(row);
|
|
2994
|
+
newFilteredRowsById[row.id] = row;
|
|
2995
|
+
newFilteredFlatRows.push(row);
|
|
2996
|
+
continue;
|
|
2997
|
+
}
|
|
2998
|
+
if (filterRow(row) || newRow.subRows.length) {
|
|
2999
|
+
rows.push(row);
|
|
3000
|
+
newFilteredRowsById[row.id] = row;
|
|
3001
|
+
newFilteredFlatRows.push(row);
|
|
3002
|
+
continue;
|
|
3003
|
+
}
|
|
3004
|
+
} else {
|
|
3005
|
+
row = newRow;
|
|
3006
|
+
if (filterRow(row)) {
|
|
3007
|
+
rows.push(row);
|
|
3008
|
+
newFilteredRowsById[row.id] = row;
|
|
3009
|
+
newFilteredFlatRows.push(row);
|
|
3010
|
+
}
|
|
3011
|
+
}
|
|
3012
|
+
}
|
|
3013
|
+
return rows;
|
|
3014
|
+
};
|
|
3015
|
+
return {
|
|
3016
|
+
rows: recurseFilterRows(rowsToFilter),
|
|
3017
|
+
flatRows: newFilteredFlatRows,
|
|
3018
|
+
rowsById: newFilteredRowsById
|
|
3019
|
+
};
|
|
3020
|
+
}
|
|
3021
|
+
function filterRowModelFromRoot(rowsToFilter, filterRow, table) {
|
|
3022
|
+
var _table$options$maxLea2;
|
|
3023
|
+
const newFilteredFlatRows = [];
|
|
3024
|
+
const newFilteredRowsById = {};
|
|
3025
|
+
const maxDepth = (_table$options$maxLea2 = table.options.maxLeafRowFilterDepth) != null ? _table$options$maxLea2 : 100;
|
|
3026
|
+
|
|
3027
|
+
// Filters top level and nested rows
|
|
3028
|
+
const recurseFilterRows = function (rowsToFilter, depth) {
|
|
3029
|
+
if (depth === void 0) {
|
|
3030
|
+
depth = 0;
|
|
3031
|
+
}
|
|
3032
|
+
// Filter from parents downward first
|
|
3033
|
+
|
|
3034
|
+
const rows = [];
|
|
3035
|
+
|
|
3036
|
+
// Apply the filter to any subRows
|
|
3037
|
+
for (let i = 0; i < rowsToFilter.length; i++) {
|
|
3038
|
+
let row = rowsToFilter[i];
|
|
3039
|
+
const pass = filterRow(row);
|
|
3040
|
+
if (pass) {
|
|
3041
|
+
var _row$subRows2;
|
|
3042
|
+
if ((_row$subRows2 = row.subRows) != null && _row$subRows2.length && depth < maxDepth) {
|
|
3043
|
+
const newRow = createRow(table, row.id, row.original, row.index, row.depth, undefined, row.parentId);
|
|
3044
|
+
newRow.subRows = recurseFilterRows(row.subRows, depth + 1);
|
|
3045
|
+
row = newRow;
|
|
3046
|
+
}
|
|
3047
|
+
rows.push(row);
|
|
3048
|
+
newFilteredFlatRows.push(row);
|
|
3049
|
+
newFilteredRowsById[row.id] = row;
|
|
3050
|
+
}
|
|
3051
|
+
}
|
|
3052
|
+
return rows;
|
|
3053
|
+
};
|
|
3054
|
+
return {
|
|
3055
|
+
rows: recurseFilterRows(rowsToFilter),
|
|
3056
|
+
flatRows: newFilteredFlatRows,
|
|
3057
|
+
rowsById: newFilteredRowsById
|
|
3058
|
+
};
|
|
3059
|
+
}
|
|
3060
|
+
|
|
3061
|
+
function getFilteredRowModel() {
|
|
3062
|
+
return table => memo(() => [table.getPreFilteredRowModel(), table.getState().columnFilters, table.getState().globalFilter], (rowModel, columnFilters, globalFilter) => {
|
|
3063
|
+
if (!rowModel.rows.length || !(columnFilters != null && columnFilters.length) && !globalFilter) {
|
|
3064
|
+
for (let i = 0; i < rowModel.flatRows.length; i++) {
|
|
3065
|
+
rowModel.flatRows[i].columnFilters = {};
|
|
3066
|
+
rowModel.flatRows[i].columnFiltersMeta = {};
|
|
3067
|
+
}
|
|
3068
|
+
return rowModel;
|
|
3069
|
+
}
|
|
3070
|
+
const resolvedColumnFilters = [];
|
|
3071
|
+
const resolvedGlobalFilters = [];
|
|
3072
|
+
(columnFilters != null ? columnFilters : []).forEach(d => {
|
|
3073
|
+
var _filterFn$resolveFilt;
|
|
3074
|
+
const column = table.getColumn(d.id);
|
|
3075
|
+
if (!column) {
|
|
3076
|
+
return;
|
|
3077
|
+
}
|
|
3078
|
+
const filterFn = column.getFilterFn();
|
|
3079
|
+
if (!filterFn) {
|
|
3080
|
+
return;
|
|
3081
|
+
}
|
|
3082
|
+
resolvedColumnFilters.push({
|
|
3083
|
+
id: d.id,
|
|
3084
|
+
filterFn,
|
|
3085
|
+
resolvedValue: (_filterFn$resolveFilt = filterFn.resolveFilterValue == null ? void 0 : filterFn.resolveFilterValue(d.value)) != null ? _filterFn$resolveFilt : d.value
|
|
3086
|
+
});
|
|
3087
|
+
});
|
|
3088
|
+
const filterableIds = (columnFilters != null ? columnFilters : []).map(d => d.id);
|
|
3089
|
+
const globalFilterFn = table.getGlobalFilterFn();
|
|
3090
|
+
const globallyFilterableColumns = table.getAllLeafColumns().filter(column => column.getCanGlobalFilter());
|
|
3091
|
+
if (globalFilter && globalFilterFn && globallyFilterableColumns.length) {
|
|
3092
|
+
filterableIds.push('__global__');
|
|
3093
|
+
globallyFilterableColumns.forEach(column => {
|
|
3094
|
+
var _globalFilterFn$resol;
|
|
3095
|
+
resolvedGlobalFilters.push({
|
|
3096
|
+
id: column.id,
|
|
3097
|
+
filterFn: globalFilterFn,
|
|
3098
|
+
resolvedValue: (_globalFilterFn$resol = globalFilterFn.resolveFilterValue == null ? void 0 : globalFilterFn.resolveFilterValue(globalFilter)) != null ? _globalFilterFn$resol : globalFilter
|
|
3099
|
+
});
|
|
3100
|
+
});
|
|
3101
|
+
}
|
|
3102
|
+
let currentColumnFilter;
|
|
3103
|
+
let currentGlobalFilter;
|
|
3104
|
+
|
|
3105
|
+
// Flag the prefiltered row model with each filter state
|
|
3106
|
+
for (let j = 0; j < rowModel.flatRows.length; j++) {
|
|
3107
|
+
const row = rowModel.flatRows[j];
|
|
3108
|
+
row.columnFilters = {};
|
|
3109
|
+
if (resolvedColumnFilters.length) {
|
|
3110
|
+
for (let i = 0; i < resolvedColumnFilters.length; i++) {
|
|
3111
|
+
currentColumnFilter = resolvedColumnFilters[i];
|
|
3112
|
+
const id = currentColumnFilter.id;
|
|
3113
|
+
|
|
3114
|
+
// Tag the row with the column filter state
|
|
3115
|
+
row.columnFilters[id] = currentColumnFilter.filterFn(row, id, currentColumnFilter.resolvedValue, filterMeta => {
|
|
3116
|
+
row.columnFiltersMeta[id] = filterMeta;
|
|
3117
|
+
});
|
|
3118
|
+
}
|
|
3119
|
+
}
|
|
3120
|
+
if (resolvedGlobalFilters.length) {
|
|
3121
|
+
for (let i = 0; i < resolvedGlobalFilters.length; i++) {
|
|
3122
|
+
currentGlobalFilter = resolvedGlobalFilters[i];
|
|
3123
|
+
const id = currentGlobalFilter.id;
|
|
3124
|
+
// Tag the row with the first truthy global filter state
|
|
3125
|
+
if (currentGlobalFilter.filterFn(row, id, currentGlobalFilter.resolvedValue, filterMeta => {
|
|
3126
|
+
row.columnFiltersMeta[id] = filterMeta;
|
|
3127
|
+
})) {
|
|
3128
|
+
row.columnFilters.__global__ = true;
|
|
3129
|
+
break;
|
|
3130
|
+
}
|
|
3131
|
+
}
|
|
3132
|
+
if (row.columnFilters.__global__ !== true) {
|
|
3133
|
+
row.columnFilters.__global__ = false;
|
|
3134
|
+
}
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
const filterRowsImpl = row => {
|
|
3138
|
+
// Horizontally filter rows through each column
|
|
3139
|
+
for (let i = 0; i < filterableIds.length; i++) {
|
|
3140
|
+
if (row.columnFilters[filterableIds[i]] === false) {
|
|
3141
|
+
return false;
|
|
3142
|
+
}
|
|
3143
|
+
}
|
|
3144
|
+
return true;
|
|
3145
|
+
};
|
|
3146
|
+
|
|
3147
|
+
// Filter final rows using all of the active filters
|
|
3148
|
+
return filterRows(rowModel.rows, filterRowsImpl, table);
|
|
3149
|
+
}, getMemoOptions(table.options, 'debugTable', 'getFilteredRowModel', () => table._autoResetPageIndex()));
|
|
3150
|
+
}
|
|
3151
|
+
|
|
3152
|
+
function getGroupedRowModel() {
|
|
3153
|
+
return table => memo(() => [table.getState().grouping, table.getPreGroupedRowModel()], (grouping, rowModel) => {
|
|
3154
|
+
if (!rowModel.rows.length || !grouping.length) {
|
|
3155
|
+
rowModel.rows.forEach(row => {
|
|
3156
|
+
row.depth = 0;
|
|
3157
|
+
row.parentId = undefined;
|
|
3158
|
+
});
|
|
3159
|
+
return rowModel;
|
|
3160
|
+
}
|
|
3161
|
+
|
|
3162
|
+
// Filter the grouping list down to columns that exist
|
|
3163
|
+
const existingGrouping = grouping.filter(columnId => table.getColumn(columnId));
|
|
3164
|
+
const groupedFlatRows = [];
|
|
3165
|
+
const groupedRowsById = {};
|
|
3166
|
+
// const onlyGroupedFlatRows: Row[] = [];
|
|
3167
|
+
// const onlyGroupedRowsById: Record<RowId, Row> = {};
|
|
3168
|
+
// const nonGroupedFlatRows: Row[] = [];
|
|
3169
|
+
// const nonGroupedRowsById: Record<RowId, Row> = {};
|
|
3170
|
+
|
|
3171
|
+
// Recursively group the data
|
|
3172
|
+
const groupUpRecursively = function (rows, depth, parentId) {
|
|
3173
|
+
if (depth === void 0) {
|
|
3174
|
+
depth = 0;
|
|
3175
|
+
}
|
|
3176
|
+
// Grouping depth has been been met
|
|
3177
|
+
// Stop grouping and simply rewrite thd depth and row relationships
|
|
3178
|
+
if (depth >= existingGrouping.length) {
|
|
3179
|
+
return rows.map(row => {
|
|
3180
|
+
row.depth = depth;
|
|
3181
|
+
groupedFlatRows.push(row);
|
|
3182
|
+
groupedRowsById[row.id] = row;
|
|
3183
|
+
if (row.subRows) {
|
|
3184
|
+
row.subRows = groupUpRecursively(row.subRows, depth + 1, row.id);
|
|
3185
|
+
}
|
|
3186
|
+
return row;
|
|
3187
|
+
});
|
|
3188
|
+
}
|
|
3189
|
+
const columnId = existingGrouping[depth];
|
|
3190
|
+
|
|
3191
|
+
// Group the rows together for this level
|
|
3192
|
+
const rowGroupsMap = groupBy(rows, columnId);
|
|
3193
|
+
|
|
3194
|
+
// Perform aggregations for each group
|
|
3195
|
+
const aggregatedGroupedRows = Array.from(rowGroupsMap.entries()).map((_ref, index) => {
|
|
3196
|
+
let [groupingValue, groupedRows] = _ref;
|
|
3197
|
+
let id = `${columnId}:${groupingValue}`;
|
|
3198
|
+
id = parentId ? `${parentId}>${id}` : id;
|
|
3199
|
+
|
|
3200
|
+
// First, Recurse to group sub rows before aggregation
|
|
3201
|
+
const subRows = groupUpRecursively(groupedRows, depth + 1, id);
|
|
3202
|
+
subRows.forEach(subRow => {
|
|
3203
|
+
subRow.parentId = id;
|
|
3204
|
+
});
|
|
3205
|
+
|
|
3206
|
+
// Flatten the leaf rows of the rows in this group
|
|
3207
|
+
const leafRows = depth ? flattenBy(groupedRows, row => row.subRows) : groupedRows;
|
|
3208
|
+
const row = createRow(table, id, leafRows[0].original, index, depth, undefined, parentId);
|
|
3209
|
+
Object.assign(row, {
|
|
3210
|
+
groupingColumnId: columnId,
|
|
3211
|
+
groupingValue,
|
|
3212
|
+
subRows,
|
|
3213
|
+
leafRows,
|
|
3214
|
+
getValue: columnId => {
|
|
3215
|
+
// Don't aggregate columns that are in the grouping
|
|
3216
|
+
if (existingGrouping.includes(columnId)) {
|
|
3217
|
+
if (row._valuesCache.hasOwnProperty(columnId)) {
|
|
3218
|
+
return row._valuesCache[columnId];
|
|
3219
|
+
}
|
|
3220
|
+
if (groupedRows[0]) {
|
|
3221
|
+
var _groupedRows$0$getVal;
|
|
3222
|
+
row._valuesCache[columnId] = (_groupedRows$0$getVal = groupedRows[0].getValue(columnId)) != null ? _groupedRows$0$getVal : undefined;
|
|
3223
|
+
}
|
|
3224
|
+
return row._valuesCache[columnId];
|
|
3225
|
+
}
|
|
3226
|
+
if (row._groupingValuesCache.hasOwnProperty(columnId)) {
|
|
3227
|
+
return row._groupingValuesCache[columnId];
|
|
3228
|
+
}
|
|
3229
|
+
|
|
3230
|
+
// Aggregate the values
|
|
3231
|
+
const column = table.getColumn(columnId);
|
|
3232
|
+
const aggregateFn = column == null ? void 0 : column.getAggregationFn();
|
|
3233
|
+
if (aggregateFn) {
|
|
3234
|
+
row._groupingValuesCache[columnId] = aggregateFn(columnId, leafRows, groupedRows);
|
|
3235
|
+
return row._groupingValuesCache[columnId];
|
|
3236
|
+
}
|
|
3237
|
+
}
|
|
3238
|
+
});
|
|
3239
|
+
subRows.forEach(subRow => {
|
|
3240
|
+
groupedFlatRows.push(subRow);
|
|
3241
|
+
groupedRowsById[subRow.id] = subRow;
|
|
3242
|
+
// if (subRow.getIsGrouped?.()) {
|
|
3243
|
+
// onlyGroupedFlatRows.push(subRow);
|
|
3244
|
+
// onlyGroupedRowsById[subRow.id] = subRow;
|
|
3245
|
+
// } else {
|
|
3246
|
+
// nonGroupedFlatRows.push(subRow);
|
|
3247
|
+
// nonGroupedRowsById[subRow.id] = subRow;
|
|
3248
|
+
// }
|
|
3249
|
+
});
|
|
3250
|
+
return row;
|
|
3251
|
+
});
|
|
3252
|
+
return aggregatedGroupedRows;
|
|
3253
|
+
};
|
|
3254
|
+
const groupedRows = groupUpRecursively(rowModel.rows, 0);
|
|
3255
|
+
groupedRows.forEach(subRow => {
|
|
3256
|
+
groupedFlatRows.push(subRow);
|
|
3257
|
+
groupedRowsById[subRow.id] = subRow;
|
|
3258
|
+
// if (subRow.getIsGrouped?.()) {
|
|
3259
|
+
// onlyGroupedFlatRows.push(subRow);
|
|
3260
|
+
// onlyGroupedRowsById[subRow.id] = subRow;
|
|
3261
|
+
// } else {
|
|
3262
|
+
// nonGroupedFlatRows.push(subRow);
|
|
3263
|
+
// nonGroupedRowsById[subRow.id] = subRow;
|
|
3264
|
+
// }
|
|
3265
|
+
});
|
|
3266
|
+
return {
|
|
3267
|
+
rows: groupedRows,
|
|
3268
|
+
flatRows: groupedFlatRows,
|
|
3269
|
+
rowsById: groupedRowsById
|
|
3270
|
+
};
|
|
3271
|
+
}, getMemoOptions(table.options, 'debugTable', 'getGroupedRowModel', () => {
|
|
3272
|
+
table._queue(() => {
|
|
3273
|
+
table._autoResetExpanded();
|
|
3274
|
+
table._autoResetPageIndex();
|
|
3275
|
+
});
|
|
3276
|
+
}));
|
|
3277
|
+
}
|
|
3278
|
+
function groupBy(rows, columnId) {
|
|
3279
|
+
const groupMap = new Map();
|
|
3280
|
+
return rows.reduce((map, row) => {
|
|
3281
|
+
const resKey = `${row.getGroupingValue(columnId)}`;
|
|
3282
|
+
const previous = map.get(resKey);
|
|
3283
|
+
if (!previous) {
|
|
3284
|
+
map.set(resKey, [row]);
|
|
3285
|
+
} else {
|
|
3286
|
+
previous.push(row);
|
|
3287
|
+
}
|
|
3288
|
+
return map;
|
|
3289
|
+
}, groupMap);
|
|
3290
|
+
}
|
|
3291
|
+
|
|
3292
|
+
function getPaginationRowModel(opts) {
|
|
3293
|
+
return table => memo(() => [table.getState().pagination, table.getPrePaginationRowModel(), table.options.paginateExpandedRows ? undefined : table.getState().expanded], (pagination, rowModel) => {
|
|
3294
|
+
if (!rowModel.rows.length) {
|
|
3295
|
+
return rowModel;
|
|
3296
|
+
}
|
|
3297
|
+
const {
|
|
3298
|
+
pageSize,
|
|
3299
|
+
pageIndex
|
|
3300
|
+
} = pagination;
|
|
3301
|
+
let {
|
|
3302
|
+
rows,
|
|
3303
|
+
flatRows,
|
|
3304
|
+
rowsById
|
|
3305
|
+
} = rowModel;
|
|
3306
|
+
const pageStart = pageSize * pageIndex;
|
|
3307
|
+
const pageEnd = pageStart + pageSize;
|
|
3308
|
+
rows = rows.slice(pageStart, pageEnd);
|
|
3309
|
+
let paginatedRowModel;
|
|
3310
|
+
if (!table.options.paginateExpandedRows) {
|
|
3311
|
+
paginatedRowModel = expandRows({
|
|
3312
|
+
rows,
|
|
3313
|
+
flatRows,
|
|
3314
|
+
rowsById
|
|
3315
|
+
});
|
|
3316
|
+
} else {
|
|
3317
|
+
paginatedRowModel = {
|
|
3318
|
+
rows,
|
|
3319
|
+
flatRows,
|
|
3320
|
+
rowsById
|
|
3321
|
+
};
|
|
3322
|
+
}
|
|
3323
|
+
paginatedRowModel.flatRows = [];
|
|
3324
|
+
const handleRow = row => {
|
|
3325
|
+
paginatedRowModel.flatRows.push(row);
|
|
3326
|
+
if (row.subRows.length) {
|
|
3327
|
+
row.subRows.forEach(handleRow);
|
|
3328
|
+
}
|
|
3329
|
+
};
|
|
3330
|
+
paginatedRowModel.rows.forEach(handleRow);
|
|
3331
|
+
return paginatedRowModel;
|
|
3332
|
+
}, getMemoOptions(table.options, 'debugTable'));
|
|
3333
|
+
}
|
|
3334
|
+
|
|
3335
|
+
function getSortedRowModel() {
|
|
3336
|
+
return table => memo(() => [table.getState().sorting, table.getPreSortedRowModel()], (sorting, rowModel) => {
|
|
3337
|
+
if (!rowModel.rows.length || !(sorting != null && sorting.length)) {
|
|
3338
|
+
return rowModel;
|
|
3339
|
+
}
|
|
3340
|
+
const sortingState = table.getState().sorting;
|
|
3341
|
+
const sortedFlatRows = [];
|
|
3342
|
+
|
|
3343
|
+
// Filter out sortings that correspond to non existing columns
|
|
3344
|
+
const availableSorting = sortingState.filter(sort => {
|
|
3345
|
+
var _table$getColumn;
|
|
3346
|
+
return (_table$getColumn = table.getColumn(sort.id)) == null ? void 0 : _table$getColumn.getCanSort();
|
|
3347
|
+
});
|
|
3348
|
+
const columnInfoById = {};
|
|
3349
|
+
availableSorting.forEach(sortEntry => {
|
|
3350
|
+
const column = table.getColumn(sortEntry.id);
|
|
3351
|
+
if (!column) return;
|
|
3352
|
+
columnInfoById[sortEntry.id] = {
|
|
3353
|
+
sortUndefined: column.columnDef.sortUndefined,
|
|
3354
|
+
invertSorting: column.columnDef.invertSorting,
|
|
3355
|
+
sortingFn: column.getSortingFn()
|
|
3356
|
+
};
|
|
3357
|
+
});
|
|
3358
|
+
const sortData = rows => {
|
|
3359
|
+
// This will also perform a stable sorting using the row index
|
|
3360
|
+
// if needed.
|
|
3361
|
+
const sortedData = rows.map(row => ({
|
|
3362
|
+
...row
|
|
3363
|
+
}));
|
|
3364
|
+
sortedData.sort((rowA, rowB) => {
|
|
3365
|
+
for (let i = 0; i < availableSorting.length; i += 1) {
|
|
3366
|
+
var _sortEntry$desc;
|
|
3367
|
+
const sortEntry = availableSorting[i];
|
|
3368
|
+
const columnInfo = columnInfoById[sortEntry.id];
|
|
3369
|
+
const sortUndefined = columnInfo.sortUndefined;
|
|
3370
|
+
const isDesc = (_sortEntry$desc = sortEntry == null ? void 0 : sortEntry.desc) != null ? _sortEntry$desc : false;
|
|
3371
|
+
let sortInt = 0;
|
|
3372
|
+
|
|
3373
|
+
// All sorting ints should always return in ascending order
|
|
3374
|
+
if (sortUndefined) {
|
|
3375
|
+
const aValue = rowA.getValue(sortEntry.id);
|
|
3376
|
+
const bValue = rowB.getValue(sortEntry.id);
|
|
3377
|
+
const aUndefined = aValue === undefined;
|
|
3378
|
+
const bUndefined = bValue === undefined;
|
|
3379
|
+
if (aUndefined || bUndefined) {
|
|
3380
|
+
if (sortUndefined === 'first') return aUndefined ? -1 : 1;
|
|
3381
|
+
if (sortUndefined === 'last') return aUndefined ? 1 : -1;
|
|
3382
|
+
sortInt = aUndefined && bUndefined ? 0 : aUndefined ? sortUndefined : -sortUndefined;
|
|
3383
|
+
}
|
|
3384
|
+
}
|
|
3385
|
+
if (sortInt === 0) {
|
|
3386
|
+
sortInt = columnInfo.sortingFn(rowA, rowB, sortEntry.id);
|
|
3387
|
+
}
|
|
3388
|
+
|
|
3389
|
+
// If sorting is non-zero, take care of desc and inversion
|
|
3390
|
+
if (sortInt !== 0) {
|
|
3391
|
+
if (isDesc) {
|
|
3392
|
+
sortInt *= -1;
|
|
3393
|
+
}
|
|
3394
|
+
if (columnInfo.invertSorting) {
|
|
3395
|
+
sortInt *= -1;
|
|
3396
|
+
}
|
|
3397
|
+
return sortInt;
|
|
3398
|
+
}
|
|
3399
|
+
}
|
|
3400
|
+
return rowA.index - rowB.index;
|
|
3401
|
+
});
|
|
3402
|
+
|
|
3403
|
+
// If there are sub-rows, sort them
|
|
3404
|
+
sortedData.forEach(row => {
|
|
3405
|
+
var _row$subRows;
|
|
3406
|
+
sortedFlatRows.push(row);
|
|
3407
|
+
if ((_row$subRows = row.subRows) != null && _row$subRows.length) {
|
|
3408
|
+
row.subRows = sortData(row.subRows);
|
|
3409
|
+
}
|
|
3410
|
+
});
|
|
3411
|
+
return sortedData;
|
|
3412
|
+
};
|
|
3413
|
+
return {
|
|
3414
|
+
rows: sortData(rowModel.rows),
|
|
3415
|
+
flatRows: sortedFlatRows,
|
|
3416
|
+
rowsById: rowModel.rowsById
|
|
3417
|
+
};
|
|
3418
|
+
}, getMemoOptions(table.options, 'debugTable', 'getSortedRowModel', () => table._autoResetPageIndex()));
|
|
3419
|
+
}
|
|
3420
|
+
|
|
3421
|
+
const bhDataGridCss = ":host{display:block;font-family:var(--font-family-body, 'Inter', sans-serif)}.data-grid{display:flex;flex-direction:column;background-color:var(--color-white, #fff);border:1px solid var(--color-neutral-200, #e2e4eb);border-radius:var(--radius-lg, 8px);overflow:hidden}.data-grid-container{position:relative;overflow:auto}.data-grid-table{display:table;width:100%;border-collapse:collapse}.data-grid-compact .data-grid-header-cell,.data-grid-compact .data-grid-cell,.data-grid-compact .data-grid-filter-cell{padding:var(--sp-1-5, 6px) var(--sp-2, 8px);font-size:0.75rem}.data-grid-compact .data-grid-row{height:32px}.data-grid-default .data-grid-header-cell,.data-grid-default .data-grid-cell,.data-grid-default .data-grid-filter-cell{padding:var(--sp-2, 8px) var(--sp-3, 12px);font-size:0.875rem}.data-grid-default .data-grid-row{height:44px}.data-grid-relaxed .data-grid-header-cell,.data-grid-relaxed .data-grid-cell,.data-grid-relaxed .data-grid-filter-cell{padding:var(--sp-3, 12px) var(--sp-4, 16px);font-size:0.875rem}.data-grid-relaxed .data-grid-row{height:56px}.data-grid-bordered .data-grid-cell,.data-grid-bordered .data-grid-header-cell,.data-grid-bordered .data-grid-filter-cell{border:1px solid var(--color-neutral-200, #e2e4eb)}.data-grid-bordered .data-grid-header-cell{border-bottom-width:2px}.data-grid-striped .data-grid-row-striped{background-color:var(--color-neutral-50, #fafafc)}.data-grid-caption{padding:var(--sp-3, 12px) var(--sp-4, 16px);font-size:0.875rem;font-weight:500;color:var(--color-neutral-700, #4d5266)}.data-grid-caption-top{border-bottom:1px solid var(--color-neutral-200, #e2e4eb)}.data-grid-caption-bottom{border-top:1px solid var(--color-neutral-200, #e2e4eb)}.data-grid-global-filter{display:flex;align-items:center;gap:var(--sp-2, 8px);padding:var(--sp-3, 12px) var(--sp-4, 16px);border-bottom:1px solid var(--color-neutral-200, #e2e4eb)}.data-grid-search-icon{font-size:20px;color:var(--color-neutral-400, #939ab4)}.data-grid-global-filter-input{flex:1;padding:var(--sp-2, 8px) var(--sp-3, 12px);border:1px solid var(--color-neutral-300, #c0c4d4);border-radius:var(--radius-md, 6px);font-size:0.875rem;color:var(--color-neutral-900, #141624);background-color:var(--color-white, #fff);transition:border-color 0.15s ease, box-shadow 0.15s ease}.data-grid-global-filter-input:focus{outline:none;border-color:var(--color-brand-500, #6366f1);box-shadow:0 0 0 3px var(--color-brand-100, #e0e1fc)}.data-grid-global-filter-input::placeholder{color:var(--color-neutral-400, #939ab4)}.data-grid-header{display:table-header-group;background-color:var(--color-neutral-50, #fafafc)}.data-grid-header-sticky{position:sticky;top:0;z-index:10}.data-grid-header-row{display:table-row}.data-grid-header-cell{display:table-cell;vertical-align:middle;text-align:left;font-weight:600;color:var(--color-neutral-700, #4d5266);border-bottom:1px solid var(--color-neutral-200, #e2e4eb);white-space:nowrap;user-select:none}.data-grid-header-cell-sortable{cursor:pointer;transition:background-color 0.15s ease}.data-grid-header-cell-sortable:hover{background-color:var(--color-neutral-100, #f0f1f5)}.data-grid-header-cell-sorted{color:var(--color-brand-600, #4f46e5)}.data-grid-header-text{display:inline-flex;align-items:center;gap:var(--sp-1, 4px)}.data-grid-sort-icon{font-size:16px;color:var(--color-brand-600, #4f46e5)}.data-grid-filter-row{display:table-row;background-color:var(--color-neutral-25, #fcfcfe)}.data-grid-filter-cell{display:table-cell;vertical-align:middle;border-bottom:1px solid var(--color-neutral-200, #e2e4eb)}.data-grid-filter-input{width:100%;padding:var(--sp-1-5, 6px) var(--sp-2, 8px);border:1px solid var(--color-neutral-300, #c0c4d4);border-radius:var(--radius-sm, 4px);font-size:0.75rem;color:var(--color-neutral-900, #141624);background-color:var(--color-white, #fff);transition:border-color 0.15s ease}.data-grid-filter-input:focus{outline:none;border-color:var(--color-brand-500, #6366f1)}.data-grid-filter-input::placeholder{color:var(--color-neutral-400, #939ab4)}.data-grid-body{display:table-row-group}.data-grid-row{display:table-row;transition:background-color 0.1s ease}.data-grid-row-hover,.data-grid-row:hover{background-color:var(--color-neutral-50, #fafafc)}.data-grid-row-selected{background-color:var(--color-brand-50, #eef2ff) !important}.data-grid-row-selected:hover{background-color:var(--color-brand-100, #e0e7ff) !important}.data-grid-row-clickable{cursor:pointer}.data-grid-row-editing{background-color:var(--color-warning-50, #fffbeb) !important}.data-grid-cell{display:table-cell;vertical-align:middle;color:var(--color-neutral-900, #141624);border-bottom:1px solid var(--color-neutral-100, #f0f1f5)}.data-grid-cell-align-left{text-align:left}.data-grid-cell-align-center{text-align:center}.data-grid-cell-align-right{text-align:right}.data-grid-cell-type-number{font-variant-numeric:tabular-nums}.data-grid-cell-editable{cursor:cell}.data-grid-cell-editable:hover{background-color:var(--color-brand-25, #f5f8ff)}.data-grid-cell-editing{padding:var(--sp-1, 4px) !important}.data-grid-cell-error{position:relative}.data-grid-cell-error-text{position:absolute;bottom:2px;left:4px;font-size:0.625rem;color:var(--color-error-600, #dc2626)}.data-grid-cell-select{width:40px;min-width:40px;max-width:40px;text-align:center}.data-grid-cell-expand{width:40px;min-width:40px;max-width:40px;text-align:center}.data-grid-cell-actions{width:80px;min-width:80px;max-width:80px;text-align:center}.data-grid-expand-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:var(--radius-md, 6px);background-color:transparent;color:var(--color-neutral-500, #6b7280);cursor:pointer;transition:background-color 0.15s ease, color 0.15s ease}.data-grid-expand-btn:hover{background-color:var(--color-neutral-100, #f0f1f5);color:var(--color-neutral-700, #4d5266)}.data-grid-expand-btn .material-symbols-outlined{font-size:20px;transition:transform 0.15s ease}.data-grid-row-expanded .data-grid-expand-btn .material-symbols-outlined{transform:rotate(90deg)}.data-grid-row-expansion{display:table-row;background-color:var(--color-neutral-50, #fafafc)}.data-grid-row-expansion>*{display:table-cell;padding:var(--sp-4, 16px);border-bottom:1px solid var(--color-neutral-200, #e2e4eb)}.data-grid-row-group{background-color:var(--color-neutral-100, #f0f1f5);cursor:pointer}.data-grid-row-group:hover{background-color:var(--color-neutral-200, #e2e4eb)}.data-grid-cell-group-label{display:flex;align-items:center;gap:var(--sp-2, 8px);font-weight:500}.data-grid-group-toggle{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;color:var(--color-neutral-600, #5c627a);cursor:pointer}.data-grid-group-toggle .material-symbols-outlined{font-size:20px;transition:transform 0.15s ease}.data-grid-row-group-expanded .data-grid-group-toggle .material-symbols-outlined{transform:rotate(90deg)}.data-grid-group-label{display:inline-flex;align-items:center;gap:var(--sp-1, 4px)}.data-grid-group-column{color:var(--color-neutral-500, #6b7280)}.data-grid-group-value{color:var(--color-neutral-900, #141624);font-weight:600}.data-grid-group-count{color:var(--color-neutral-400, #939ab4);font-size:0.75rem;font-weight:400}.data-grid-edit-input{width:100%;padding:var(--sp-1-5, 6px) var(--sp-2, 8px);border:1px solid var(--color-brand-400, #818cf8);border-radius:var(--radius-sm, 4px);font-size:inherit;color:var(--color-neutral-900, #141624);background-color:var(--color-white, #fff);box-shadow:0 0 0 3px var(--color-brand-100, #e0e1fc)}.data-grid-edit-input:focus{outline:none;border-color:var(--color-brand-500, #6366f1)}.data-grid-edit-actions{display:flex;align-items:center;justify-content:center;gap:var(--sp-1, 4px)}.data-grid-action-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:var(--radius-md, 6px);background-color:transparent;color:var(--color-neutral-600, #5c627a);cursor:pointer;transition:background-color 0.15s ease, color 0.15s ease}.data-grid-action-btn:hover{background-color:var(--color-neutral-100, #f0f1f5);color:var(--color-neutral-900, #141624)}.data-grid-action-btn .material-symbols-outlined{font-size:18px}.data-grid-empty{display:flex;align-items:center;justify-content:center;padding:var(--sp-12, 48px) var(--sp-4, 16px)}.data-grid-loading{position:relative}.data-grid-loading-overlay{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background-color:rgba(255, 255, 255, 0.8);z-index:20}.data-grid-skeleton .data-grid-cell{padding:var(--sp-2, 8px) var(--sp-3, 12px)}.data-grid-row-skeleton{animation:skeleton-pulse 1.5s ease-in-out infinite}@keyframes skeleton-pulse{0%,100%{opacity:1}50%{opacity:0.5}}.material-symbols-outlined{font-family:'Material Symbols Outlined';font-weight:normal;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:'liga';font-variation-settings:'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24}@media (max-width: 640px){.data-grid-global-filter{padding:var(--sp-2, 8px)}.data-grid-header-cell,.data-grid-cell,.data-grid-filter-cell{padding:var(--sp-2, 8px) !important;font-size:0.75rem !important}.data-grid-cell-select,.data-grid-cell-expand{width:32px;min-width:32px;max-width:32px}.data-grid-cell-actions{width:60px;min-width:60px;max-width:60px}}";
|
|
3422
|
+
|
|
3423
|
+
const BhDataGrid = /*@__PURE__*/ proxyCustomElement(class BhDataGrid extends H {
|
|
3424
|
+
constructor(registerHost) {
|
|
3425
|
+
super();
|
|
3426
|
+
if (registerHost !== false) {
|
|
3427
|
+
this.__registerHost();
|
|
3428
|
+
}
|
|
3429
|
+
this.__attachShadow();
|
|
3430
|
+
this.bhSortChange = createEvent(this, "bhSortChange");
|
|
3431
|
+
this.bhFilterChange = createEvent(this, "bhFilterChange");
|
|
3432
|
+
this.bhSelectionChange = createEvent(this, "bhSelectionChange");
|
|
3433
|
+
this.bhPageChange = createEvent(this, "bhPageChange");
|
|
3434
|
+
this.bhRowClick = createEvent(this, "bhRowClick");
|
|
3435
|
+
this.bhCellClick = createEvent(this, "bhCellClick");
|
|
3436
|
+
this.bhExpandChange = createEvent(this, "bhExpandChange");
|
|
3437
|
+
this.bhGroupToggle = createEvent(this, "bhGroupToggle");
|
|
3438
|
+
this.bhEditStart = createEvent(this, "bhEditStart");
|
|
3439
|
+
this.bhEditCancel = createEvent(this, "bhEditCancel");
|
|
3440
|
+
this.bhEditSave = createEvent(this, "bhEditSave");
|
|
3441
|
+
this.bhCellChange = createEvent(this, "bhCellChange");
|
|
3442
|
+
this.bhValidationError = createEvent(this, "bhValidationError");
|
|
3443
|
+
}
|
|
3444
|
+
get el() { return this; }
|
|
3445
|
+
// ===========================================================================
|
|
3446
|
+
// Props - Data
|
|
3447
|
+
// ===========================================================================
|
|
3448
|
+
/** Array of data objects to display */
|
|
3449
|
+
data = [];
|
|
3450
|
+
/** Column definitions (TanStack ColumnDef format) */
|
|
3451
|
+
columns = [];
|
|
3452
|
+
/** Function to get unique row ID */
|
|
3453
|
+
getRowId;
|
|
3454
|
+
/** Function to get sub-rows for expansion */
|
|
3455
|
+
getSubRows;
|
|
3456
|
+
// ===========================================================================
|
|
3457
|
+
// Props - Display
|
|
3458
|
+
// ===========================================================================
|
|
3459
|
+
/** Size variant */
|
|
3460
|
+
size = 'default';
|
|
3461
|
+
/** Show striped rows */
|
|
3462
|
+
striped = false;
|
|
3463
|
+
/** Show borders */
|
|
3464
|
+
bordered = false;
|
|
3465
|
+
/** Sticky header */
|
|
3466
|
+
stickyHeader = false;
|
|
3467
|
+
/** Max height for scrollable container (enables sticky header) */
|
|
3468
|
+
maxHeight;
|
|
3469
|
+
/** Caption text */
|
|
3470
|
+
caption;
|
|
3471
|
+
/** Caption position */
|
|
3472
|
+
captionPosition = 'top';
|
|
3473
|
+
/** Empty state title */
|
|
3474
|
+
emptyTitle = 'No data';
|
|
3475
|
+
/** Empty state description */
|
|
3476
|
+
emptyDescription = 'There are no records to display.';
|
|
3477
|
+
// ===========================================================================
|
|
3478
|
+
// Props - Loading
|
|
3479
|
+
// ===========================================================================
|
|
3480
|
+
/** Loading state */
|
|
3481
|
+
loading = false;
|
|
3482
|
+
/** Loading type */
|
|
3483
|
+
loadingType = 'spinner';
|
|
3484
|
+
/** Number of skeleton rows to show */
|
|
3485
|
+
skeletonRowCount = 5;
|
|
3486
|
+
// ===========================================================================
|
|
3487
|
+
// Props - Sorting
|
|
3488
|
+
// ===========================================================================
|
|
3489
|
+
/** Enable sorting */
|
|
3490
|
+
enableSorting = true;
|
|
3491
|
+
/** Enable multi-column sorting */
|
|
3492
|
+
enableMultiSort = false;
|
|
3493
|
+
/** Initial/controlled sort state */
|
|
3494
|
+
sortState = [];
|
|
3495
|
+
// ===========================================================================
|
|
3496
|
+
// Props - Filtering
|
|
3497
|
+
// ===========================================================================
|
|
3498
|
+
/** Enable column filtering */
|
|
3499
|
+
enableFiltering = false;
|
|
3500
|
+
/** Enable global filter (search) */
|
|
3501
|
+
enableGlobalFilter = false;
|
|
3502
|
+
/** Show filter row below header */
|
|
3503
|
+
showFilterRow = false;
|
|
3504
|
+
/** Global filter placeholder text */
|
|
3505
|
+
globalFilterPlaceholder = 'Search...';
|
|
3506
|
+
/** Initial/controlled filter state */
|
|
3507
|
+
filterState = [];
|
|
3508
|
+
/** Initial/controlled global filter */
|
|
3509
|
+
globalFilter = '';
|
|
3510
|
+
// ===========================================================================
|
|
3511
|
+
// Props - Selection
|
|
3512
|
+
// ===========================================================================
|
|
3513
|
+
/** Selection mode */
|
|
3514
|
+
selectionMode = 'none';
|
|
3515
|
+
/** Initial/controlled selected row IDs */
|
|
3516
|
+
selectedRowIds = [];
|
|
3517
|
+
// ===========================================================================
|
|
3518
|
+
// Props - Pagination
|
|
3519
|
+
// ===========================================================================
|
|
3520
|
+
/** Enable pagination */
|
|
3521
|
+
enablePagination = false;
|
|
3522
|
+
/** Current page (1-indexed) */
|
|
3523
|
+
page = 1;
|
|
3524
|
+
/** Page size */
|
|
3525
|
+
pageSize = 10;
|
|
3526
|
+
/** Page size options */
|
|
3527
|
+
pageSizeOptions = [10, 25, 50, 100];
|
|
3528
|
+
// ===========================================================================
|
|
3529
|
+
// Props - Expansion
|
|
3530
|
+
// ===========================================================================
|
|
3531
|
+
/** Enable row expansion */
|
|
3532
|
+
enableExpansion = false;
|
|
3533
|
+
/** Initial/controlled expanded row IDs */
|
|
3534
|
+
expandedRowIds = [];
|
|
3535
|
+
// ===========================================================================
|
|
3536
|
+
// Props - Grouping
|
|
3537
|
+
// ===========================================================================
|
|
3538
|
+
/** Enable grouping */
|
|
3539
|
+
enableGrouping = false;
|
|
3540
|
+
/** Column IDs to group by */
|
|
3541
|
+
groupBy = [];
|
|
3542
|
+
// ===========================================================================
|
|
3543
|
+
// Props - Editing
|
|
3544
|
+
// ===========================================================================
|
|
3545
|
+
/** Enable editing */
|
|
3546
|
+
enableEditing = false;
|
|
3547
|
+
/** Edit mode */
|
|
3548
|
+
editMode = 'cell';
|
|
3549
|
+
/** Show edit action buttons */
|
|
3550
|
+
showEditActions = true;
|
|
3551
|
+
// ===========================================================================
|
|
3552
|
+
// Internal State
|
|
3553
|
+
// ===========================================================================
|
|
3554
|
+
tableState = {};
|
|
3555
|
+
editingRowId = null;
|
|
3556
|
+
editingColumnId = null;
|
|
3557
|
+
editingValues = {};
|
|
3558
|
+
validationErrors = {};
|
|
3559
|
+
hoveredRowId = null;
|
|
3560
|
+
table = null;
|
|
3561
|
+
// ===========================================================================
|
|
3562
|
+
// Events
|
|
3563
|
+
// ===========================================================================
|
|
3564
|
+
bhSortChange;
|
|
3565
|
+
bhFilterChange;
|
|
3566
|
+
bhSelectionChange;
|
|
3567
|
+
bhPageChange;
|
|
3568
|
+
bhRowClick;
|
|
3569
|
+
bhCellClick;
|
|
3570
|
+
bhExpandChange;
|
|
3571
|
+
bhGroupToggle;
|
|
3572
|
+
bhEditStart;
|
|
3573
|
+
bhEditCancel;
|
|
3574
|
+
bhEditSave;
|
|
3575
|
+
bhCellChange;
|
|
3576
|
+
bhValidationError;
|
|
3577
|
+
// ===========================================================================
|
|
3578
|
+
// Watchers
|
|
3579
|
+
// ===========================================================================
|
|
3580
|
+
handleDataChange() {
|
|
3581
|
+
this.initializeTable();
|
|
3582
|
+
}
|
|
3583
|
+
handleSortStateChange(newValue) {
|
|
3584
|
+
if (this.table) {
|
|
3585
|
+
this.table.setSorting(newValue);
|
|
3586
|
+
}
|
|
3587
|
+
}
|
|
3588
|
+
handleFilterStateChange(newValue) {
|
|
3589
|
+
if (this.table) {
|
|
3590
|
+
this.table.setColumnFilters(newValue);
|
|
3591
|
+
}
|
|
3592
|
+
}
|
|
3593
|
+
handleSelectedRowIdsChange(newValue) {
|
|
3594
|
+
if (this.table) {
|
|
3595
|
+
const selection = {};
|
|
3596
|
+
newValue.forEach(id => { selection[id] = true; });
|
|
3597
|
+
this.table.setRowSelection(selection);
|
|
3598
|
+
}
|
|
3599
|
+
}
|
|
3600
|
+
handlePaginationPropChange() {
|
|
3601
|
+
if (this.table) {
|
|
3602
|
+
this.table.setPagination({
|
|
3603
|
+
pageIndex: this.page - 1,
|
|
3604
|
+
pageSize: this.pageSize,
|
|
3605
|
+
});
|
|
3606
|
+
}
|
|
3607
|
+
}
|
|
3608
|
+
handleExpandedRowIdsChange(newValue) {
|
|
3609
|
+
if (this.table) {
|
|
3610
|
+
const expanded = {};
|
|
3611
|
+
newValue.forEach(id => { expanded[id] = true; });
|
|
3612
|
+
this.table.setExpanded(expanded);
|
|
3613
|
+
}
|
|
3614
|
+
}
|
|
3615
|
+
handleGroupByChange(newValue) {
|
|
3616
|
+
if (this.table) {
|
|
3617
|
+
this.table.setGrouping(newValue);
|
|
3618
|
+
}
|
|
3619
|
+
}
|
|
3620
|
+
// ===========================================================================
|
|
3621
|
+
// Lifecycle
|
|
3622
|
+
// ===========================================================================
|
|
3623
|
+
componentWillLoad() {
|
|
3624
|
+
this.initializeTable();
|
|
3625
|
+
}
|
|
3626
|
+
// ===========================================================================
|
|
3627
|
+
// Table Initialization
|
|
3628
|
+
// ===========================================================================
|
|
3629
|
+
initializeTable() {
|
|
3630
|
+
// Build initial state
|
|
3631
|
+
const initialState = {
|
|
3632
|
+
sorting: this.sortState,
|
|
3633
|
+
columnFilters: this.filterState,
|
|
3634
|
+
globalFilter: this.globalFilter,
|
|
3635
|
+
rowSelection: this.buildRowSelection(),
|
|
3636
|
+
expanded: this.buildExpanded(),
|
|
3637
|
+
pagination: {
|
|
3638
|
+
pageIndex: this.page - 1,
|
|
3639
|
+
pageSize: this.pageSize,
|
|
3640
|
+
},
|
|
3641
|
+
grouping: this.groupBy,
|
|
3642
|
+
columnVisibility: this.buildColumnVisibility(),
|
|
3643
|
+
columnPinning: { left: [], right: [] },
|
|
3644
|
+
columnSizing: {},
|
|
3645
|
+
};
|
|
3646
|
+
this.tableState = initialState;
|
|
3647
|
+
// Create table instance
|
|
3648
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3649
|
+
this.table = createTable({
|
|
3650
|
+
data: this.data,
|
|
3651
|
+
columns: this.columns,
|
|
3652
|
+
state: this.tableState,
|
|
3653
|
+
onStateChange: (updater) => {
|
|
3654
|
+
const newState = typeof updater === 'function'
|
|
3655
|
+
? updater(this.tableState)
|
|
3656
|
+
: updater;
|
|
3657
|
+
this.handleStateChange(newState);
|
|
3658
|
+
},
|
|
3659
|
+
getCoreRowModel: getCoreRowModel(),
|
|
3660
|
+
getSortedRowModel: this.enableSorting ? getSortedRowModel() : undefined,
|
|
3661
|
+
getFilteredRowModel: this.enableFiltering || this.enableGlobalFilter ? getFilteredRowModel() : undefined,
|
|
3662
|
+
getPaginationRowModel: this.enablePagination ? getPaginationRowModel() : undefined,
|
|
3663
|
+
getExpandedRowModel: this.enableExpansion || this.enableGrouping ? getExpandedRowModel() : undefined,
|
|
3664
|
+
getGroupedRowModel: this.enableGrouping ? getGroupedRowModel() : undefined,
|
|
3665
|
+
getRowId: this.getRowId || ((row, index) => String(row.id ?? index)),
|
|
3666
|
+
getSubRows: this.getSubRows,
|
|
3667
|
+
enableRowSelection: this.selectionMode !== 'none',
|
|
3668
|
+
enableMultiRowSelection: this.selectionMode === 'multiple-click' || this.selectionMode === 'multiple-checkbox',
|
|
3669
|
+
enableSorting: this.enableSorting,
|
|
3670
|
+
enableFilters: this.enableFiltering || this.enableGlobalFilter,
|
|
3671
|
+
enableExpanding: this.enableExpansion || this.enableGrouping,
|
|
3672
|
+
enableGrouping: this.enableGrouping,
|
|
3673
|
+
manualPagination: false,
|
|
3674
|
+
autoResetExpanded: false,
|
|
3675
|
+
renderFallbackValue: null,
|
|
3676
|
+
});
|
|
3677
|
+
// Force update after table creation
|
|
3678
|
+
forceUpdate(this.el);
|
|
3679
|
+
}
|
|
3680
|
+
handleStateChange(newState) {
|
|
3681
|
+
const oldState = this.tableState;
|
|
3682
|
+
this.tableState = newState;
|
|
3683
|
+
// Update table options with new state
|
|
3684
|
+
if (this.table) {
|
|
3685
|
+
this.table.setOptions(prev => ({
|
|
3686
|
+
...prev,
|
|
3687
|
+
state: newState,
|
|
3688
|
+
}));
|
|
3689
|
+
}
|
|
3690
|
+
// Emit events for state changes
|
|
3691
|
+
if (JSON.stringify(oldState.sorting) !== JSON.stringify(newState.sorting)) {
|
|
3692
|
+
this.sortState = newState.sorting;
|
|
3693
|
+
this.bhSortChange.emit({ sorting: newState.sorting });
|
|
3694
|
+
}
|
|
3695
|
+
if (JSON.stringify(oldState.columnFilters) !== JSON.stringify(newState.columnFilters) ||
|
|
3696
|
+
oldState.globalFilter !== newState.globalFilter) {
|
|
3697
|
+
this.filterState = newState.columnFilters;
|
|
3698
|
+
this.globalFilter = newState.globalFilter;
|
|
3699
|
+
this.bhFilterChange.emit({
|
|
3700
|
+
columnFilters: newState.columnFilters,
|
|
3701
|
+
globalFilter: newState.globalFilter,
|
|
3702
|
+
});
|
|
3703
|
+
}
|
|
3704
|
+
if (JSON.stringify(oldState.rowSelection) !== JSON.stringify(newState.rowSelection)) {
|
|
3705
|
+
const selectedIds = Object.keys(newState.rowSelection).filter(id => newState.rowSelection[id]);
|
|
3706
|
+
this.selectedRowIds = selectedIds;
|
|
3707
|
+
const selectedRows = this.table?.getSelectedRowModel().rows.map(r => r.original) ?? [];
|
|
3708
|
+
this.bhSelectionChange.emit({
|
|
3709
|
+
selectedRowIds: selectedIds,
|
|
3710
|
+
selectedRows,
|
|
3711
|
+
});
|
|
3712
|
+
}
|
|
3713
|
+
if (oldState.pagination?.pageIndex !== newState.pagination?.pageIndex ||
|
|
3714
|
+
oldState.pagination?.pageSize !== newState.pagination?.pageSize) {
|
|
3715
|
+
this.page = newState.pagination.pageIndex + 1;
|
|
3716
|
+
this.pageSize = newState.pagination.pageSize;
|
|
3717
|
+
this.bhPageChange.emit({
|
|
3718
|
+
page: this.page,
|
|
3719
|
+
pageSize: this.pageSize,
|
|
3720
|
+
});
|
|
3721
|
+
}
|
|
3722
|
+
// Force re-render
|
|
3723
|
+
forceUpdate(this.el);
|
|
3724
|
+
}
|
|
3725
|
+
buildRowSelection() {
|
|
3726
|
+
const selection = {};
|
|
3727
|
+
this.selectedRowIds.forEach(id => { selection[id] = true; });
|
|
3728
|
+
return selection;
|
|
3729
|
+
}
|
|
3730
|
+
buildExpanded() {
|
|
3731
|
+
const expanded = {};
|
|
3732
|
+
this.expandedRowIds.forEach(id => { expanded[id] = true; });
|
|
3733
|
+
return expanded;
|
|
3734
|
+
}
|
|
3735
|
+
buildColumnVisibility() {
|
|
3736
|
+
// Hide grouped columns
|
|
3737
|
+
const visibility = {};
|
|
3738
|
+
if (this.enableGrouping) {
|
|
3739
|
+
this.groupBy.forEach(colId => { visibility[colId] = false; });
|
|
3740
|
+
}
|
|
3741
|
+
return visibility;
|
|
3742
|
+
}
|
|
3743
|
+
// ===========================================================================
|
|
3744
|
+
// Event Handlers
|
|
3745
|
+
// ===========================================================================
|
|
3746
|
+
handleRowClick = (row) => {
|
|
3747
|
+
const rowId = row.id;
|
|
3748
|
+
// Handle click-based selection
|
|
3749
|
+
if (this.selectionMode === 'single-click') {
|
|
3750
|
+
const isSelected = row.getIsSelected();
|
|
3751
|
+
this.table?.resetRowSelection();
|
|
3752
|
+
if (!isSelected) {
|
|
3753
|
+
row.toggleSelected(true);
|
|
3754
|
+
}
|
|
3755
|
+
}
|
|
3756
|
+
else if (this.selectionMode === 'multiple-click') {
|
|
3757
|
+
row.toggleSelected();
|
|
3758
|
+
}
|
|
3759
|
+
this.bhRowClick.emit({
|
|
3760
|
+
row: row.original,
|
|
3761
|
+
rowId,
|
|
3762
|
+
rowIndex: row.index,
|
|
3763
|
+
});
|
|
3764
|
+
};
|
|
3765
|
+
handleCellClick = (row, cell) => {
|
|
3766
|
+
this.bhCellClick.emit({
|
|
3767
|
+
row: row.original,
|
|
3768
|
+
rowId: row.id,
|
|
3769
|
+
rowIndex: row.index,
|
|
3770
|
+
columnId: cell.column.id,
|
|
3771
|
+
value: cell.getValue(),
|
|
3772
|
+
});
|
|
3773
|
+
};
|
|
3774
|
+
handleHeaderClick = (header) => {
|
|
3775
|
+
if (this.enableSorting && header.column.getCanSort()) {
|
|
3776
|
+
header.column.toggleSorting(undefined, this.enableMultiSort);
|
|
3777
|
+
}
|
|
3778
|
+
};
|
|
3779
|
+
handleRowExpand = (row) => {
|
|
3780
|
+
const wasExpanded = row.getIsExpanded();
|
|
3781
|
+
row.toggleExpanded();
|
|
3782
|
+
this.bhExpandChange.emit({
|
|
3783
|
+
rowId: row.id,
|
|
3784
|
+
expanded: !wasExpanded,
|
|
3785
|
+
});
|
|
3786
|
+
};
|
|
3787
|
+
handleGroupToggle = (row) => {
|
|
3788
|
+
const wasExpanded = row.getIsExpanded();
|
|
3789
|
+
row.toggleExpanded();
|
|
3790
|
+
this.bhGroupToggle.emit({
|
|
3791
|
+
groupId: row.id,
|
|
3792
|
+
expanded: !wasExpanded,
|
|
3793
|
+
});
|
|
3794
|
+
};
|
|
3795
|
+
handleGlobalFilterChange = (event) => {
|
|
3796
|
+
const input = event.target;
|
|
3797
|
+
this.table?.setGlobalFilter(input.value);
|
|
3798
|
+
};
|
|
3799
|
+
handleColumnFilterChange = (columnId, value) => {
|
|
3800
|
+
const column = this.table?.getColumn(columnId);
|
|
3801
|
+
if (column) {
|
|
3802
|
+
column.setFilterValue(value || undefined);
|
|
3803
|
+
}
|
|
3804
|
+
};
|
|
3805
|
+
handlePaginationChange = (event) => {
|
|
3806
|
+
const { page, pageSize } = event.detail;
|
|
3807
|
+
this.table?.setPagination({
|
|
3808
|
+
pageIndex: page - 1,
|
|
3809
|
+
pageSize,
|
|
3810
|
+
});
|
|
3811
|
+
};
|
|
3812
|
+
// ===========================================================================
|
|
3813
|
+
// Editing Handlers
|
|
3814
|
+
// ===========================================================================
|
|
3815
|
+
startEditing = (row, columnId) => {
|
|
3816
|
+
if (!this.enableEditing)
|
|
3817
|
+
return;
|
|
3818
|
+
this.editingRowId = row.id;
|
|
3819
|
+
this.editingColumnId = this.editMode === 'cell' ? (columnId || null) : null;
|
|
3820
|
+
// Initialize editing values from current row
|
|
3821
|
+
const values = {};
|
|
3822
|
+
this.columns.forEach(col => {
|
|
3823
|
+
const colId = col.accessorKey || col.id;
|
|
3824
|
+
if (colId) {
|
|
3825
|
+
values[colId] = row.original[colId];
|
|
3826
|
+
}
|
|
3827
|
+
});
|
|
3828
|
+
this.editingValues = values;
|
|
3829
|
+
this.validationErrors = {};
|
|
3830
|
+
this.bhEditStart.emit({
|
|
3831
|
+
rowId: row.id,
|
|
3832
|
+
row: row.original,
|
|
3833
|
+
columnId,
|
|
3834
|
+
});
|
|
3835
|
+
};
|
|
3836
|
+
cancelEditing = () => {
|
|
3837
|
+
if (!this.editingRowId)
|
|
3838
|
+
return;
|
|
3839
|
+
const row = this.table?.getRow(this.editingRowId);
|
|
3840
|
+
if (row) {
|
|
3841
|
+
this.bhEditCancel.emit({
|
|
3842
|
+
rowId: this.editingRowId,
|
|
3843
|
+
row: row.original,
|
|
3844
|
+
});
|
|
3845
|
+
}
|
|
3846
|
+
this.editingRowId = null;
|
|
3847
|
+
this.editingColumnId = null;
|
|
3848
|
+
this.editingValues = {};
|
|
3849
|
+
this.validationErrors = {};
|
|
3850
|
+
};
|
|
3851
|
+
saveEditing = () => {
|
|
3852
|
+
if (!this.editingRowId || !this.table)
|
|
3853
|
+
return;
|
|
3854
|
+
const row = this.table.getRow(this.editingRowId);
|
|
3855
|
+
if (!row)
|
|
3856
|
+
return;
|
|
3857
|
+
// Validate all edited values
|
|
3858
|
+
const errors = {};
|
|
3859
|
+
for (const [columnId, value] of Object.entries(this.editingValues)) {
|
|
3860
|
+
const column = this.table.getColumn(columnId);
|
|
3861
|
+
const validate = column?.columnDef.meta?.validate;
|
|
3862
|
+
if (validate) {
|
|
3863
|
+
const error = validate(value, row.original);
|
|
3864
|
+
if (error) {
|
|
3865
|
+
errors[columnId] = error;
|
|
3866
|
+
this.bhValidationError.emit({
|
|
3867
|
+
rowId: this.editingRowId,
|
|
3868
|
+
columnId,
|
|
3869
|
+
value,
|
|
3870
|
+
error,
|
|
3871
|
+
});
|
|
3872
|
+
}
|
|
3873
|
+
}
|
|
3874
|
+
}
|
|
3875
|
+
if (Object.keys(errors).length > 0) {
|
|
3876
|
+
this.validationErrors = errors;
|
|
3877
|
+
return;
|
|
3878
|
+
}
|
|
3879
|
+
// Determine changes
|
|
3880
|
+
const changes = {};
|
|
3881
|
+
for (const [columnId, newValue] of Object.entries(this.editingValues)) {
|
|
3882
|
+
const originalValue = row.original[columnId];
|
|
3883
|
+
if (originalValue !== newValue) {
|
|
3884
|
+
changes[columnId] = newValue;
|
|
3885
|
+
}
|
|
3886
|
+
}
|
|
3887
|
+
// Build new row
|
|
3888
|
+
const newRow = { ...row.original, ...changes };
|
|
3889
|
+
this.bhEditSave.emit({
|
|
3890
|
+
rowId: this.editingRowId,
|
|
3891
|
+
rowIndex: row.index,
|
|
3892
|
+
originalRow: row.original,
|
|
3893
|
+
changes,
|
|
3894
|
+
newRow,
|
|
3895
|
+
});
|
|
3896
|
+
this.editingRowId = null;
|
|
3897
|
+
this.editingColumnId = null;
|
|
3898
|
+
this.editingValues = {};
|
|
3899
|
+
this.validationErrors = {};
|
|
3900
|
+
};
|
|
3901
|
+
handleEditValueChange = (columnId, newValue) => {
|
|
3902
|
+
const oldValue = this.editingValues[columnId];
|
|
3903
|
+
this.editingValues = { ...this.editingValues, [columnId]: newValue };
|
|
3904
|
+
// Clear validation error for this column
|
|
3905
|
+
if (this.validationErrors[columnId]) {
|
|
3906
|
+
const { [columnId]: _, ...rest } = this.validationErrors;
|
|
3907
|
+
this.validationErrors = rest;
|
|
3908
|
+
}
|
|
3909
|
+
if (this.editingRowId) {
|
|
3910
|
+
this.bhCellChange.emit({
|
|
3911
|
+
rowId: this.editingRowId,
|
|
3912
|
+
columnId,
|
|
3913
|
+
oldValue,
|
|
3914
|
+
newValue,
|
|
3915
|
+
});
|
|
3916
|
+
}
|
|
3917
|
+
};
|
|
3918
|
+
handleEditKeyDown = (event, columnId) => {
|
|
3919
|
+
if (event.key === 'Enter') {
|
|
3920
|
+
event.preventDefault();
|
|
3921
|
+
this.saveEditing();
|
|
3922
|
+
}
|
|
3923
|
+
else if (event.key === 'Escape') {
|
|
3924
|
+
event.preventDefault();
|
|
3925
|
+
this.cancelEditing();
|
|
3926
|
+
}
|
|
3927
|
+
else if (event.key === 'Tab' && this.editMode === 'cell') {
|
|
3928
|
+
event.preventDefault();
|
|
3929
|
+
this.moveToNextEditableCell(columnId, event.shiftKey);
|
|
3930
|
+
}
|
|
3931
|
+
};
|
|
3932
|
+
moveToNextEditableCell = (currentColumnId, reverse) => {
|
|
3933
|
+
const editableColumns = this.columns.filter(col => col.meta?.editable !== false);
|
|
3934
|
+
const currentIndex = editableColumns.findIndex(col => {
|
|
3935
|
+
const colId = col.accessorKey || col.id;
|
|
3936
|
+
return colId === currentColumnId;
|
|
3937
|
+
});
|
|
3938
|
+
if (currentIndex === -1)
|
|
3939
|
+
return;
|
|
3940
|
+
const nextIndex = reverse ? currentIndex - 1 : currentIndex + 1;
|
|
3941
|
+
if (nextIndex >= 0 && nextIndex < editableColumns.length) {
|
|
3942
|
+
const nextCol = editableColumns[nextIndex];
|
|
3943
|
+
const nextColId = nextCol.accessorKey || nextCol.id;
|
|
3944
|
+
this.editingColumnId = nextColId || null;
|
|
3945
|
+
}
|
|
3946
|
+
else {
|
|
3947
|
+
this.saveEditing();
|
|
3948
|
+
}
|
|
3949
|
+
};
|
|
3950
|
+
isEditing(rowId, columnId) {
|
|
3951
|
+
if (this.editingRowId !== rowId)
|
|
3952
|
+
return false;
|
|
3953
|
+
if (this.editMode === 'cell') {
|
|
3954
|
+
return columnId ? this.editingColumnId === columnId : false;
|
|
3955
|
+
}
|
|
3956
|
+
return true;
|
|
3957
|
+
}
|
|
3958
|
+
handleCellDoubleClick = (row, cell) => {
|
|
3959
|
+
if (!this.enableEditing || cell.column.columnDef.meta?.editable === false)
|
|
3960
|
+
return;
|
|
3961
|
+
if (this.editMode === 'cell') {
|
|
3962
|
+
this.startEditing(row, cell.column.id);
|
|
3963
|
+
}
|
|
3964
|
+
};
|
|
3965
|
+
// ===========================================================================
|
|
3966
|
+
// Render Helpers
|
|
3967
|
+
// ===========================================================================
|
|
3968
|
+
flexRender(renderer, context) {
|
|
3969
|
+
if (typeof renderer === 'function') {
|
|
3970
|
+
return renderer(context);
|
|
3971
|
+
}
|
|
3972
|
+
return renderer;
|
|
3973
|
+
}
|
|
3974
|
+
formatCellValue(value, meta) {
|
|
3975
|
+
if (value === null || value === undefined)
|
|
3976
|
+
return '';
|
|
3977
|
+
switch (meta?.type) {
|
|
3978
|
+
case 'number':
|
|
3979
|
+
return typeof value === 'number'
|
|
3980
|
+
? value.toLocaleString(undefined, meta.numberFormat)
|
|
3981
|
+
: String(value);
|
|
3982
|
+
case 'date':
|
|
3983
|
+
return value instanceof Date
|
|
3984
|
+
? value.toLocaleDateString(undefined, meta.dateFormat)
|
|
3985
|
+
: new Date(value).toLocaleDateString(undefined, meta.dateFormat);
|
|
3986
|
+
case 'boolean':
|
|
3987
|
+
return value ? 'Yes' : 'No';
|
|
3988
|
+
default:
|
|
3989
|
+
return String(value);
|
|
3990
|
+
}
|
|
3991
|
+
}
|
|
3992
|
+
// ===========================================================================
|
|
3993
|
+
// Render Methods
|
|
3994
|
+
// ===========================================================================
|
|
3995
|
+
renderCaption() {
|
|
3996
|
+
if (!this.caption)
|
|
3997
|
+
return null;
|
|
3998
|
+
const captionClasses = {
|
|
3999
|
+
'data-grid-caption': true,
|
|
4000
|
+
[`data-grid-caption-${this.captionPosition}`]: true,
|
|
4001
|
+
};
|
|
4002
|
+
return (h("div", { class: captionClasses }, h("slot", { name: "caption" }, this.caption)));
|
|
4003
|
+
}
|
|
4004
|
+
renderGlobalFilter() {
|
|
4005
|
+
if (!this.enableGlobalFilter)
|
|
4006
|
+
return null;
|
|
4007
|
+
return (h("div", { class: "data-grid-global-filter" }, h("span", { class: "data-grid-search-icon material-symbols-outlined" }, "search"), h("input", { type: "text", class: "data-grid-global-filter-input", placeholder: this.globalFilterPlaceholder, value: this.globalFilter, onInput: this.handleGlobalFilterChange })));
|
|
4008
|
+
}
|
|
4009
|
+
renderHeader() {
|
|
4010
|
+
if (!this.table)
|
|
4011
|
+
return null;
|
|
4012
|
+
const headerGroups = this.table.getHeaderGroups();
|
|
4013
|
+
return (h("div", { class: { 'data-grid-header': true, 'data-grid-header-sticky': this.stickyHeader } }, headerGroups.map(headerGroup => (h("div", { class: "data-grid-header-row", role: "row", key: headerGroup.id }, this.renderSelectionHeader(), this.enableExpansion && !this.enableGrouping && (h("div", { class: "data-grid-header-cell data-grid-cell-expand", role: "columnheader" })), headerGroup.headers.map(header => this.renderHeaderCell(header)), this.enableEditing && this.showEditActions && this.editMode === 'row' && (h("div", { class: "data-grid-header-cell data-grid-cell-actions", role: "columnheader" }))))), this.showFilterRow && this.renderFilterRow()));
|
|
4014
|
+
}
|
|
4015
|
+
renderSelectionHeader() {
|
|
4016
|
+
if (this.selectionMode === 'none' || this.selectionMode === 'single-click' || this.selectionMode === 'multiple-click') {
|
|
4017
|
+
return null;
|
|
4018
|
+
}
|
|
4019
|
+
if (this.selectionMode === 'single-radio') {
|
|
4020
|
+
return h("div", { class: "data-grid-header-cell data-grid-cell-select", role: "columnheader" });
|
|
4021
|
+
}
|
|
4022
|
+
// Multiple checkbox - show select all
|
|
4023
|
+
const isAllSelected = this.table?.getIsAllRowsSelected();
|
|
4024
|
+
const isSomeSelected = this.table?.getIsSomeRowsSelected();
|
|
4025
|
+
return (h("div", { class: "data-grid-header-cell data-grid-cell-select", role: "columnheader" }, h("bh-checkbox", { size: "sm", checked: isAllSelected, indeterminate: isSomeSelected && !isAllSelected, onBhChange: () => this.table?.toggleAllRowsSelected() })));
|
|
4026
|
+
}
|
|
4027
|
+
renderHeaderCell(header) {
|
|
4028
|
+
if (header.isPlaceholder) {
|
|
4029
|
+
return h("div", { class: "data-grid-header-cell", role: "columnheader", key: header.id });
|
|
4030
|
+
}
|
|
4031
|
+
const canSort = header.column.getCanSort();
|
|
4032
|
+
const sortDirection = header.column.getIsSorted();
|
|
4033
|
+
const meta = header.column.columnDef.meta;
|
|
4034
|
+
const cellClasses = {
|
|
4035
|
+
'data-grid-header-cell': true,
|
|
4036
|
+
'data-grid-header-cell-sortable': canSort,
|
|
4037
|
+
'data-grid-header-cell-sorted': !!sortDirection,
|
|
4038
|
+
[`data-grid-cell-align-${meta?.align || 'left'}`]: true,
|
|
4039
|
+
};
|
|
4040
|
+
const style = header.column.getSize()
|
|
4041
|
+
? { width: `${header.column.getSize()}px` }
|
|
4042
|
+
: {};
|
|
4043
|
+
return (h("div", { class: cellClasses, style: style, role: "columnheader", "aria-sort": sortDirection === 'asc' ? 'ascending' : sortDirection === 'desc' ? 'descending' : 'none', onClick: () => canSort && this.handleHeaderClick(header), key: header.id }, h("span", { class: "data-grid-header-text" }, this.flexRender(header.column.columnDef.header, header.getContext())), canSort && sortDirection && (h("span", { class: "data-grid-sort-icon material-symbols-outlined" }, sortDirection === 'asc' ? 'arrow_upward' : 'arrow_downward'))));
|
|
4044
|
+
}
|
|
4045
|
+
renderFilterRow() {
|
|
4046
|
+
if (!this.table)
|
|
4047
|
+
return null;
|
|
4048
|
+
const headers = this.table.getHeaderGroups()[0]?.headers || [];
|
|
4049
|
+
return (h("div", { class: "data-grid-filter-row", role: "row" }, (this.selectionMode === 'single-radio' || this.selectionMode === 'multiple-checkbox') && (h("div", { class: "data-grid-filter-cell data-grid-cell-select", role: "cell" })), this.enableExpansion && !this.enableGrouping && (h("div", { class: "data-grid-filter-cell data-grid-cell-expand", role: "cell" })), headers.map(header => {
|
|
4050
|
+
const canFilter = header.column.getCanFilter();
|
|
4051
|
+
const meta = header.column.columnDef.meta;
|
|
4052
|
+
if (!canFilter || meta?.filterable === false) {
|
|
4053
|
+
return h("div", { class: "data-grid-filter-cell", role: "cell", key: header.id });
|
|
4054
|
+
}
|
|
4055
|
+
const filterValue = header.column.getFilterValue() ?? '';
|
|
4056
|
+
return (h("div", { class: "data-grid-filter-cell", role: "cell", key: header.id }, h("input", { type: meta?.type === 'number' ? 'number' : meta?.type === 'date' ? 'date' : 'text', class: "data-grid-filter-input", placeholder: `Filter...`, value: filterValue, onInput: (e) => this.handleColumnFilterChange(header.column.id, e.target.value) })));
|
|
4057
|
+
}), this.enableEditing && this.showEditActions && this.editMode === 'row' && (h("div", { class: "data-grid-filter-cell data-grid-cell-actions", role: "cell" }))));
|
|
4058
|
+
}
|
|
4059
|
+
renderBody() {
|
|
4060
|
+
if (!this.table)
|
|
4061
|
+
return null;
|
|
4062
|
+
// Loading skeleton
|
|
4063
|
+
if (this.loading && this.loadingType === 'skeleton') {
|
|
4064
|
+
return this.renderSkeleton();
|
|
4065
|
+
}
|
|
4066
|
+
const rows = this.table.getRowModel().rows;
|
|
4067
|
+
// Empty state
|
|
4068
|
+
if (rows.length === 0) {
|
|
4069
|
+
return this.renderEmptyState();
|
|
4070
|
+
}
|
|
4071
|
+
return (h("div", { class: "data-grid-body", role: "rowgroup" }, rows.map(row => {
|
|
4072
|
+
if (row.getIsGrouped()) {
|
|
4073
|
+
return this.renderGroupRow(row);
|
|
4074
|
+
}
|
|
4075
|
+
return this.renderDataRow(row);
|
|
4076
|
+
})));
|
|
4077
|
+
}
|
|
4078
|
+
renderDataRow(row) {
|
|
4079
|
+
const isSelected = row.getIsSelected();
|
|
4080
|
+
const isExpanded = row.getIsExpanded();
|
|
4081
|
+
const isRowEditing = this.editingRowId === row.id;
|
|
4082
|
+
const rowClasses = {
|
|
4083
|
+
'data-grid-row': true,
|
|
4084
|
+
'data-grid-row-selected': isSelected,
|
|
4085
|
+
'data-grid-row-expanded': isExpanded,
|
|
4086
|
+
'data-grid-row-editing': isRowEditing,
|
|
4087
|
+
'data-grid-row-hover': this.hoveredRowId === row.id,
|
|
4088
|
+
'data-grid-row-striped': this.striped && row.index % 2 === 1,
|
|
4089
|
+
'data-grid-row-clickable': this.selectionMode === 'single-click' || this.selectionMode === 'multiple-click',
|
|
4090
|
+
};
|
|
4091
|
+
return [
|
|
4092
|
+
h("div", { class: rowClasses, role: "row", "aria-selected": isSelected ? 'true' : 'false', key: row.id, onClick: () => this.handleRowClick(row), onMouseEnter: () => { this.hoveredRowId = row.id; }, onMouseLeave: () => { this.hoveredRowId = null; } }, this.renderSelectionCell(row), this.enableExpansion && !this.enableGrouping && (h("div", { class: "data-grid-cell data-grid-cell-expand", role: "cell", onClick: (e) => { e.stopPropagation(); } }, row.getCanExpand() && (h("button", { class: "data-grid-expand-btn", onClick: () => this.handleRowExpand(row), "aria-label": isExpanded ? 'Collapse row' : 'Expand row' }, h("span", { class: "material-symbols-outlined" }, isExpanded ? 'expand_more' : 'chevron_right'))))), row.getVisibleCells().map(cell => this.renderCell(row, cell)), this.enableEditing && this.showEditActions && this.editMode === 'row' && (h("div", { class: "data-grid-cell data-grid-cell-actions", role: "cell", onClick: (e) => e.stopPropagation() }, isRowEditing ? (h("div", { class: "data-grid-edit-actions" }, h("button", { class: "data-grid-action-btn", onClick: () => this.saveEditing(), title: "Save" }, h("span", { class: "material-symbols-outlined" }, "check")), h("button", { class: "data-grid-action-btn", onClick: () => this.cancelEditing(), title: "Cancel" }, h("span", { class: "material-symbols-outlined" }, "close")))) : (h("button", { class: "data-grid-action-btn", onClick: () => this.startEditing(row), title: "Edit" }, h("span", { class: "material-symbols-outlined" }, "edit")))))),
|
|
4093
|
+
// Expanded content
|
|
4094
|
+
isExpanded && this.enableExpansion && !this.enableGrouping && (h("div", { class: "data-grid-row-expansion", key: `${row.id}-expansion` }, h("slot", { name: "expanded-row" }))),
|
|
4095
|
+
];
|
|
4096
|
+
}
|
|
4097
|
+
renderSelectionCell(row) {
|
|
4098
|
+
if (this.selectionMode === 'none' || this.selectionMode === 'single-click' || this.selectionMode === 'multiple-click') {
|
|
4099
|
+
return null;
|
|
4100
|
+
}
|
|
4101
|
+
const isSelected = row.getIsSelected();
|
|
4102
|
+
if (this.selectionMode === 'single-radio') {
|
|
4103
|
+
return (h("div", { class: "data-grid-cell data-grid-cell-select", role: "cell", onClick: (e) => e.stopPropagation() }, h("bh-radio-button", { selected: isSelected, onBhChange: () => {
|
|
4104
|
+
this.table?.resetRowSelection();
|
|
4105
|
+
row.toggleSelected(true);
|
|
4106
|
+
} })));
|
|
4107
|
+
}
|
|
4108
|
+
// Multiple checkbox
|
|
4109
|
+
return (h("div", { class: "data-grid-cell data-grid-cell-select", role: "cell", onClick: (e) => e.stopPropagation() }, h("bh-checkbox", { size: "sm", checked: isSelected, onBhChange: () => row.toggleSelected() })));
|
|
4110
|
+
}
|
|
4111
|
+
renderCell(row, cell) {
|
|
4112
|
+
const meta = cell.column.columnDef.meta;
|
|
4113
|
+
const columnId = cell.column.id;
|
|
4114
|
+
const isCellEditing = this.isEditing(row.id, columnId);
|
|
4115
|
+
const canEdit = this.enableEditing && meta?.editable !== false;
|
|
4116
|
+
const hasError = !!this.validationErrors[columnId];
|
|
4117
|
+
const cellClasses = {
|
|
4118
|
+
'data-grid-cell': true,
|
|
4119
|
+
[`data-grid-cell-align-${meta?.align || (meta?.type === 'number' ? 'right' : 'left')}`]: true,
|
|
4120
|
+
[`data-grid-cell-type-${meta?.type || 'text'}`]: true,
|
|
4121
|
+
'data-grid-cell-editing': isCellEditing,
|
|
4122
|
+
'data-grid-cell-editable': canEdit && !isCellEditing,
|
|
4123
|
+
'data-grid-cell-error': hasError,
|
|
4124
|
+
};
|
|
4125
|
+
const style = cell.column.getSize()
|
|
4126
|
+
? { width: `${cell.column.getSize()}px` }
|
|
4127
|
+
: {};
|
|
4128
|
+
return (h("div", { class: cellClasses, style: style, role: "cell", key: cell.id, onClick: (e) => {
|
|
4129
|
+
e.stopPropagation();
|
|
4130
|
+
this.handleCellClick(row, cell);
|
|
4131
|
+
}, onDblClick: (e) => {
|
|
4132
|
+
e.stopPropagation();
|
|
4133
|
+
this.handleCellDoubleClick(row, cell);
|
|
4134
|
+
} }, isCellEditing ? this.renderEditInput(cell) : this.renderCellContent(cell), hasError && (h("span", { class: "data-grid-cell-error-text" }, this.validationErrors[columnId]))));
|
|
4135
|
+
}
|
|
4136
|
+
renderCellContent(cell) {
|
|
4137
|
+
const rendered = this.flexRender(cell.column.columnDef.cell, cell.getContext());
|
|
4138
|
+
// If custom cell renderer returns something, use it
|
|
4139
|
+
if (rendered !== undefined && rendered !== null && rendered !== cell.getValue()) {
|
|
4140
|
+
return rendered;
|
|
4141
|
+
}
|
|
4142
|
+
// Default formatting
|
|
4143
|
+
return this.formatCellValue(cell.getValue(), cell.column.columnDef.meta);
|
|
4144
|
+
}
|
|
4145
|
+
renderEditInput(cell) {
|
|
4146
|
+
const columnId = cell.column.id;
|
|
4147
|
+
const meta = cell.column.columnDef.meta;
|
|
4148
|
+
const currentValue = this.editingValues[columnId] ?? cell.getValue();
|
|
4149
|
+
const inputType = meta?.type === 'number' ? 'number'
|
|
4150
|
+
: meta?.type === 'date' ? 'date'
|
|
4151
|
+
: meta?.type === 'boolean' ? 'checkbox'
|
|
4152
|
+
: 'text';
|
|
4153
|
+
if (meta?.type === 'boolean') {
|
|
4154
|
+
return (h("bh-checkbox", { size: "sm", checked: Boolean(currentValue), onBhChange: (e) => this.handleEditValueChange(columnId, e.detail.checked) }));
|
|
4155
|
+
}
|
|
4156
|
+
return (h("input", { type: inputType, class: "data-grid-edit-input", value: currentValue != null ? String(currentValue) : '', onInput: (e) => {
|
|
4157
|
+
const input = e.target;
|
|
4158
|
+
const newValue = meta?.type === 'number' ? Number(input.value) : input.value;
|
|
4159
|
+
this.handleEditValueChange(columnId, newValue);
|
|
4160
|
+
}, onKeyDown: (e) => this.handleEditKeyDown(e, columnId), ref: (el) => el && requestAnimationFrame(() => el.focus()) }));
|
|
4161
|
+
}
|
|
4162
|
+
renderGroupRow(row) {
|
|
4163
|
+
const isExpanded = row.getIsExpanded();
|
|
4164
|
+
const groupingColumnId = row.groupingColumnId;
|
|
4165
|
+
const groupValue = row.groupingValue;
|
|
4166
|
+
const leafRows = row.getLeafRows();
|
|
4167
|
+
// Check if all leaf rows are selected for group selection
|
|
4168
|
+
const allSelected = leafRows.every(r => r.getIsSelected());
|
|
4169
|
+
const someSelected = leafRows.some(r => r.getIsSelected());
|
|
4170
|
+
const rowClasses = {
|
|
4171
|
+
'data-grid-row': true,
|
|
4172
|
+
'data-grid-row-group': true,
|
|
4173
|
+
'data-grid-row-group-expanded': isExpanded,
|
|
4174
|
+
};
|
|
4175
|
+
return [
|
|
4176
|
+
h("div", { class: rowClasses, role: "row", "aria-expanded": isExpanded ? 'true' : 'false', key: row.id, onClick: () => this.handleGroupToggle(row) }, this.selectionMode === 'multiple-checkbox' && (h("div", { class: "data-grid-cell data-grid-cell-select", role: "cell", onClick: (e) => e.stopPropagation() }, h("bh-checkbox", { size: "sm", checked: allSelected, indeterminate: someSelected && !allSelected, onBhChange: () => {
|
|
4177
|
+
leafRows.forEach(r => r.toggleSelected(!allSelected));
|
|
4178
|
+
} }))), h("div", { class: "data-grid-cell data-grid-cell-group-label", role: "cell" }, h("button", { class: "data-grid-group-toggle", "aria-label": isExpanded ? 'Collapse group' : 'Expand group' }, h("span", { class: "material-symbols-outlined" }, isExpanded ? 'expand_more' : 'chevron_right')), h("span", { class: "data-grid-group-label" }, h("span", { class: "data-grid-group-column" }, groupingColumnId, ": "), h("span", { class: "data-grid-group-value" }, String(groupValue))), h("span", { class: "data-grid-group-count" }, "(", leafRows.length, " ", leafRows.length === 1 ? 'item' : 'items', ")"))),
|
|
4179
|
+
// Render child rows if expanded
|
|
4180
|
+
isExpanded && row.subRows.map(subRow => {
|
|
4181
|
+
if (subRow.getIsGrouped()) {
|
|
4182
|
+
return this.renderGroupRow(subRow);
|
|
4183
|
+
}
|
|
4184
|
+
return this.renderDataRow(subRow);
|
|
4185
|
+
}),
|
|
4186
|
+
];
|
|
4187
|
+
}
|
|
4188
|
+
renderEmptyState() {
|
|
4189
|
+
return (h("div", { class: "data-grid-empty" }, h("bh-empty-state", { emptyTitle: this.emptyTitle, description: this.emptyDescription })));
|
|
4190
|
+
}
|
|
4191
|
+
renderSkeleton() {
|
|
4192
|
+
const skeletonRows = Array.from({ length: this.skeletonRowCount }, (_, i) => i);
|
|
4193
|
+
const columnCount = this.columns.length +
|
|
4194
|
+
(this.selectionMode === 'single-radio' || this.selectionMode === 'multiple-checkbox' ? 1 : 0) +
|
|
4195
|
+
(this.enableExpansion && !this.enableGrouping ? 1 : 0) +
|
|
4196
|
+
(this.enableEditing && this.showEditActions && this.editMode === 'row' ? 1 : 0);
|
|
4197
|
+
return (h("div", { class: "data-grid-body data-grid-skeleton", role: "rowgroup" }, skeletonRows.map(i => (h("div", { class: "data-grid-row data-grid-row-skeleton", role: "row", key: i }, Array.from({ length: columnCount }, (_, j) => (h("div", { class: "data-grid-cell", role: "cell", key: j }, h("bh-skeleton-loader", { width: "80%", height: "16px" })))))))));
|
|
4198
|
+
}
|
|
4199
|
+
renderLoadingOverlay() {
|
|
4200
|
+
if (!this.loading || this.loadingType !== 'spinner')
|
|
4201
|
+
return null;
|
|
4202
|
+
return (h("div", { class: "data-grid-loading-overlay" }, h("bh-loader-spinner", { size: "lg" })));
|
|
4203
|
+
}
|
|
4204
|
+
renderPagination() {
|
|
4205
|
+
if (!this.enablePagination || !this.table)
|
|
4206
|
+
return null;
|
|
4207
|
+
const rowCount = this.table.getFilteredRowModel().rows.length;
|
|
4208
|
+
return (h("bh-pagination", { page: this.page, totalItems: rowCount, pageSize: this.pageSize, pageSizeOptions: this.pageSizeOptions, onBhPageChange: this.handlePaginationChange, onBhPageSizeChange: this.handlePaginationChange }));
|
|
4209
|
+
}
|
|
4210
|
+
// ===========================================================================
|
|
4211
|
+
// Main Render
|
|
4212
|
+
// ===========================================================================
|
|
4213
|
+
render() {
|
|
4214
|
+
const gridClasses = {
|
|
4215
|
+
'data-grid': true,
|
|
4216
|
+
[`data-grid-${this.size}`]: true,
|
|
4217
|
+
'data-grid-bordered': this.bordered,
|
|
4218
|
+
'data-grid-striped': this.striped,
|
|
4219
|
+
'data-grid-loading': this.loading,
|
|
4220
|
+
};
|
|
4221
|
+
const containerStyle = this.maxHeight
|
|
4222
|
+
? { maxHeight: this.maxHeight, overflowY: 'auto' }
|
|
4223
|
+
: {};
|
|
4224
|
+
return (h("div", { key: 'aa7f1e09699fb99be7625f90b3b94fa9e6927498', class: gridClasses, role: "grid", "aria-busy": this.loading ? 'true' : 'false' }, this.captionPosition === 'top' && this.renderCaption(), this.renderGlobalFilter(), h("div", { key: '2929257ae04c88f8d225edac899fe7ec5f195fb2', class: "data-grid-container", style: containerStyle }, h("div", { key: '66bfba27da2199fbb1735229ea07e522b0f83dd1', class: "data-grid-table" }, this.renderHeader(), this.renderBody()), this.renderLoadingOverlay()), this.captionPosition === 'bottom' && this.renderCaption(), this.renderPagination()));
|
|
4225
|
+
}
|
|
4226
|
+
static get watchers() { return {
|
|
4227
|
+
"data": ["handleDataChange"],
|
|
4228
|
+
"columns": ["handleDataChange"],
|
|
4229
|
+
"sortState": ["handleSortStateChange"],
|
|
4230
|
+
"filterState": ["handleFilterStateChange"],
|
|
4231
|
+
"selectedRowIds": ["handleSelectedRowIdsChange"],
|
|
4232
|
+
"page": ["handlePaginationPropChange"],
|
|
4233
|
+
"pageSize": ["handlePaginationPropChange"],
|
|
4234
|
+
"expandedRowIds": ["handleExpandedRowIdsChange"],
|
|
4235
|
+
"groupBy": ["handleGroupByChange"]
|
|
4236
|
+
}; }
|
|
4237
|
+
static get style() { return bhDataGridCss; }
|
|
4238
|
+
}, [769, "bh-data-grid", {
|
|
4239
|
+
"data": [16],
|
|
4240
|
+
"columns": [16],
|
|
4241
|
+
"getRowId": [16],
|
|
4242
|
+
"getSubRows": [16],
|
|
4243
|
+
"size": [1],
|
|
4244
|
+
"striped": [4],
|
|
4245
|
+
"bordered": [4],
|
|
4246
|
+
"stickyHeader": [4, "sticky-header"],
|
|
4247
|
+
"maxHeight": [1, "max-height"],
|
|
4248
|
+
"caption": [1],
|
|
4249
|
+
"captionPosition": [1, "caption-position"],
|
|
4250
|
+
"emptyTitle": [1, "empty-title"],
|
|
4251
|
+
"emptyDescription": [1, "empty-description"],
|
|
4252
|
+
"loading": [4],
|
|
4253
|
+
"loadingType": [1, "loading-type"],
|
|
4254
|
+
"skeletonRowCount": [2, "skeleton-row-count"],
|
|
4255
|
+
"enableSorting": [4, "enable-sorting"],
|
|
4256
|
+
"enableMultiSort": [4, "enable-multi-sort"],
|
|
4257
|
+
"sortState": [1040],
|
|
4258
|
+
"enableFiltering": [4, "enable-filtering"],
|
|
4259
|
+
"enableGlobalFilter": [4, "enable-global-filter"],
|
|
4260
|
+
"showFilterRow": [4, "show-filter-row"],
|
|
4261
|
+
"globalFilterPlaceholder": [1, "global-filter-placeholder"],
|
|
4262
|
+
"filterState": [1040],
|
|
4263
|
+
"globalFilter": [1025, "global-filter"],
|
|
4264
|
+
"selectionMode": [1, "selection-mode"],
|
|
4265
|
+
"selectedRowIds": [1040],
|
|
4266
|
+
"enablePagination": [4, "enable-pagination"],
|
|
4267
|
+
"page": [1026],
|
|
4268
|
+
"pageSize": [1026, "page-size"],
|
|
4269
|
+
"pageSizeOptions": [16],
|
|
4270
|
+
"enableExpansion": [4, "enable-expansion"],
|
|
4271
|
+
"expandedRowIds": [1040],
|
|
4272
|
+
"enableGrouping": [4, "enable-grouping"],
|
|
4273
|
+
"groupBy": [16],
|
|
4274
|
+
"enableEditing": [4, "enable-editing"],
|
|
4275
|
+
"editMode": [1, "edit-mode"],
|
|
4276
|
+
"showEditActions": [4, "show-edit-actions"],
|
|
4277
|
+
"tableState": [32],
|
|
4278
|
+
"editingRowId": [32],
|
|
4279
|
+
"editingColumnId": [32],
|
|
4280
|
+
"editingValues": [32],
|
|
4281
|
+
"validationErrors": [32],
|
|
4282
|
+
"hoveredRowId": [32]
|
|
4283
|
+
}, undefined, {
|
|
4284
|
+
"data": ["handleDataChange"],
|
|
4285
|
+
"columns": ["handleDataChange"],
|
|
4286
|
+
"sortState": ["handleSortStateChange"],
|
|
4287
|
+
"filterState": ["handleFilterStateChange"],
|
|
4288
|
+
"selectedRowIds": ["handleSelectedRowIdsChange"],
|
|
4289
|
+
"page": ["handlePaginationPropChange"],
|
|
4290
|
+
"pageSize": ["handlePaginationPropChange"],
|
|
4291
|
+
"expandedRowIds": ["handleExpandedRowIdsChange"],
|
|
4292
|
+
"groupBy": ["handleGroupByChange"]
|
|
4293
|
+
}]);
|
|
4294
|
+
function defineCustomElement() {
|
|
4295
|
+
if (typeof customElements === "undefined") {
|
|
4296
|
+
return;
|
|
4297
|
+
}
|
|
4298
|
+
const components = ["bh-data-grid", "bh-button", "bh-checkbox", "bh-empty-state", "bh-label", "bh-loader-spinner", "bh-pagination", "bh-radio-button", "bh-skeleton-loader", "bh-tooltip"];
|
|
4299
|
+
components.forEach(tagName => { switch (tagName) {
|
|
4300
|
+
case "bh-data-grid":
|
|
4301
|
+
if (!customElements.get(tagName)) {
|
|
4302
|
+
customElements.define(tagName, BhDataGrid);
|
|
4303
|
+
}
|
|
4304
|
+
break;
|
|
4305
|
+
case "bh-button":
|
|
4306
|
+
if (!customElements.get(tagName)) {
|
|
4307
|
+
defineCustomElement$9();
|
|
4308
|
+
}
|
|
4309
|
+
break;
|
|
4310
|
+
case "bh-checkbox":
|
|
4311
|
+
if (!customElements.get(tagName)) {
|
|
4312
|
+
defineCustomElement$8();
|
|
4313
|
+
}
|
|
4314
|
+
break;
|
|
4315
|
+
case "bh-empty-state":
|
|
4316
|
+
if (!customElements.get(tagName)) {
|
|
4317
|
+
defineCustomElement$7();
|
|
4318
|
+
}
|
|
4319
|
+
break;
|
|
4320
|
+
case "bh-label":
|
|
4321
|
+
if (!customElements.get(tagName)) {
|
|
4322
|
+
defineCustomElement$6();
|
|
4323
|
+
}
|
|
4324
|
+
break;
|
|
4325
|
+
case "bh-loader-spinner":
|
|
4326
|
+
if (!customElements.get(tagName)) {
|
|
4327
|
+
defineCustomElement$5();
|
|
4328
|
+
}
|
|
4329
|
+
break;
|
|
4330
|
+
case "bh-pagination":
|
|
4331
|
+
if (!customElements.get(tagName)) {
|
|
4332
|
+
defineCustomElement$4();
|
|
4333
|
+
}
|
|
4334
|
+
break;
|
|
4335
|
+
case "bh-radio-button":
|
|
4336
|
+
if (!customElements.get(tagName)) {
|
|
4337
|
+
defineCustomElement$3();
|
|
4338
|
+
}
|
|
4339
|
+
break;
|
|
4340
|
+
case "bh-skeleton-loader":
|
|
4341
|
+
if (!customElements.get(tagName)) {
|
|
4342
|
+
defineCustomElement$2();
|
|
4343
|
+
}
|
|
4344
|
+
break;
|
|
4345
|
+
case "bh-tooltip":
|
|
4346
|
+
if (!customElements.get(tagName)) {
|
|
4347
|
+
defineCustomElement$1();
|
|
4348
|
+
}
|
|
4349
|
+
break;
|
|
4350
|
+
} });
|
|
4351
|
+
}
|
|
4352
|
+
defineCustomElement();
|
|
4353
|
+
|
|
4354
|
+
export { BhDataGrid as B, defineCustomElement as d };
|
|
4355
|
+
//# sourceMappingURL=p-D-RHfFhc.js.map
|
|
4356
|
+
|
|
4357
|
+
//# sourceMappingURL=p-D-RHfFhc.js.map
|