@slotted/react 0.1.0-beta.10 → 0.1.0-beta.12
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/dist/action-bar-z2DPc1Wy.js +285 -0
- package/dist/action-bar.js +1 -1
- package/dist/action-sheet-BnedGewu.js +360 -0
- package/dist/action-sheet.js +1 -1
- package/dist/{alert-BTcqbG8w.js → alert-BTAXJ69M.js} +5 -5
- package/dist/alert.js +1 -1
- package/dist/{app-shell-BlkqQrOx.js → app-shell-Cb_kDBeV.js} +232 -173
- package/dist/app-shell.js +1 -1
- package/dist/{attachment-zlOPJvIm.js → attachment-D1O4qS8H.js} +28 -28
- package/dist/attachment.js +1 -1
- package/dist/{breadcrumb-DCGynpkb.js → breadcrumb-CnFjxxI2.js} +10 -10
- package/dist/breadcrumb.js +1 -1
- package/dist/{button-BCVjdzkn.js → button-D31perSu.js} +2 -2
- package/dist/button.js +2 -2
- package/dist/{calendar-qGUJ-kAy.js → calendar-DZyC1gAT.js} +8 -8
- package/dist/calendar.js +1 -1
- package/dist/{carousel-CjRTu8m7.js → carousel-Dso3gcYd.js} +14 -14
- package/dist/carousel.js +1 -1
- package/dist/cascader-BbajBwsX.js +1157 -0
- package/dist/cascader.js +1 -1
- package/dist/{chart-CPFq3jIE.js → chart-Bb6ctahn.js} +9 -9
- package/dist/chart.js +1 -1
- package/dist/{checkbox-CMY2KIih.js → checkbox-C_8GVtjD.js} +3 -3
- package/dist/{checkbox-group-DzMtLF7f.js → checkbox-group-DXCcusol.js} +2 -2
- package/dist/checkbox-group.js +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{code-block-Bh_2Eg3M.js → code-block-C4mtsROE.js} +8 -8
- package/dist/code-block.js +1 -1
- package/dist/{color-picker-DlepH5co.js → color-picker-JZPnPb7s.js} +49 -49
- package/dist/color-picker.js +1 -1
- package/dist/{column-manager-CV9tCnKa.js → column-manager-BDUj-WIs.js} +31 -31
- package/dist/column-manager.js +1 -1
- package/dist/combobox-Dn69QwGX.js +904 -0
- package/dist/combobox.js +1 -1
- package/dist/command-palette-Dh1HKz_F.js +744 -0
- package/dist/command-palette.js +1 -1
- package/dist/{context-menu-Dbc0KkFp.js → context-menu-uJjEmAN3.js} +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/{currency-field--wIfgVAx.js → currency-field-lHcrNJ7X.js} +13 -13
- package/dist/currency-field.js +1 -1
- package/dist/{dashboard-grid-D_LbWfdZ.js → dashboard-grid-z-SOm9H0.js} +65 -65
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-XH5fGoGj.js → data-grid-Kj1b9RD-.js} +1316 -1272
- package/dist/data-grid.js +1 -1
- package/dist/data-list-BgdkA3bD.js +587 -0
- package/dist/data-list.js +1 -1
- package/dist/{date-field-BrNyJBiJ.js → date-field-B2lQzE3p.js} +5 -5
- package/dist/date-field.js +1 -1
- package/dist/{date-picker-Nl55so0C.js → date-picker-DpTRb-Y1.js} +16 -16
- package/dist/date-picker.js +1 -1
- package/dist/{date-range-picker-DLkvfUJD.js → date-range-picker-CBUPJep5.js} +17 -17
- package/dist/date-range-picker.js +1 -1
- package/dist/{datetime-field-CZRhRDPb.js → datetime-field-BZ44uJ_B.js} +7 -7
- package/dist/datetime-field.js +1 -1
- package/dist/{datetime-picker-_GHra2WL.js → datetime-picker-BK_bV3Yr.js} +21 -21
- package/dist/datetime-picker.js +1 -1
- package/dist/{datetime-range-picker-Dy1A0Wqy.js → datetime-range-picker-ChdbRgzQ.js} +21 -21
- package/dist/datetime-range-picker.js +1 -1
- package/dist/{description-list-Cc4JYZ-3.js → description-list-CYlfHDwx.js} +11 -11
- package/dist/description-list.js +1 -1
- package/dist/{detail-panel-BI_wHSoz.js → detail-panel-DimjnPI8.js} +91 -91
- package/dist/detail-panel.js +1 -1
- package/dist/{dialog-B6MP7GYI.js → dialog-BB5MdJex.js} +108 -108
- package/dist/dialog.js +1 -1
- package/dist/docs/action-bar.json +4 -4
- package/dist/docs/action-bar.md +3 -3
- package/dist/docs/calendar.md +2 -2
- package/dist/docs/command-palette.json +1 -0
- package/dist/docs/command-palette.md +1 -1
- package/dist/docs/data-grid.examples.md +8 -2
- package/dist/docs/data-grid.json +12 -2
- package/dist/docs/data-grid.md +3 -1
- package/dist/docs/detail-panel.json +4 -2
- package/dist/docs/detail-panel.md +15 -5
- package/dist/docs/dialog.json +1 -0
- package/dist/docs/dialog.md +1 -1
- package/dist/docs/drawer.json +6 -4
- package/dist/docs/drawer.md +3 -3
- package/dist/docs/event-calendar.md +2 -2
- package/dist/docs/guidelines/index.md +4 -3
- package/dist/docs/guidelines/layout-alignment.md +17 -7
- package/dist/docs/guidelines/list-pages.md +3 -3
- package/dist/docs/page-header.json +18 -2
- package/dist/docs/page-header.md +5 -3
- package/dist/docs/page.json +1 -0
- package/dist/docs/page.md +1 -1
- package/dist/docs/rating.md +1 -1
- package/dist/docs/section.json +1 -1
- package/dist/docs/section.md +1 -1
- package/dist/docs/skills/compose-screen/SKILL.md +12 -4
- package/dist/docs/skills/review-screen/SKILL.md +20 -18
- package/dist/docs/skills/theme-app/SKILL.md +12 -1
- package/dist/docs/toast.json +1 -0
- package/dist/docs/toast.md +1 -1
- package/dist/docs/tokens.md +1 -1
- package/dist/docs/toolbar.json +1 -1
- package/dist/docs/toolbar.md +1 -1
- package/dist/docs/typography.md +1 -1
- package/dist/{drawer-CkpFlKYa.js → drawer-fyPyxnYQ.js} +216 -206
- package/dist/drawer.js +1 -1
- package/dist/entity-picker-ClyhBTyK.js +1283 -0
- package/dist/entity-picker.js +1 -1
- package/dist/{event-calendar-BDjI5T44.js → event-calendar-COgC24UG.js} +23 -23
- package/dist/event-calendar.js +1 -1
- package/dist/{field-group-CCM2vPKL.js → field-group-Bj-EbPIU.js} +2 -2
- package/dist/field-group.js +1 -1
- package/dist/{field-CzSGs7wo.js → field-tnEZiRLg.js} +19 -19
- package/dist/field.js +1 -1
- package/dist/filter-bar-BRuCz79-.js +1342 -0
- package/dist/filter-bar.js +1 -1
- package/dist/{form-CDq04WDY.js → form-DEcJ7tHf.js} +1 -1
- package/dist/form.js +1 -1
- package/dist/{fullscreen-6GW4naDP.js → fullscreen-BwweNj3-.js} +13 -13
- package/dist/fullscreen.js +1 -1
- package/dist/{hover-card-aadyPXzF.js → hover-card-BWcU37Yp.js} +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/{i18n-DpW8lqJ1.js → i18n-D7xXDd8-.js} +11 -4
- package/dist/i18n.js +1 -1
- package/dist/{icon-button-CRB218_z.js → icon-button-DbSZKGT4.js} +73 -71
- package/dist/{import-export-center-DUrNwRKP.js → import-export-center-CYf0Qxl_.js} +291 -289
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +100 -100
- package/dist/{kbd-Z4YmSPRy.js → kbd-dNz8QHfL.js} +1 -1
- package/dist/kbd.js +1 -1
- package/dist/{link-BsSlZ1ts.js → link-DLPyg54C.js} +5 -5
- package/dist/link.js +1 -1
- package/dist/{listbox-VFcfZT70.js → listbox-BSqx_ARf.js} +1 -1
- package/dist/listbox.js +1 -1
- package/dist/{loading-overlay-BZPBDK4w.js → loading-overlay-BLIrcaoj.js} +9 -9
- package/dist/loading-overlay.js +1 -1
- package/dist/{markdown-BmCU_sOv.js → markdown-DccRb1xf.js} +17 -17
- package/dist/markdown.js +1 -1
- package/dist/{menu-parts-DS9JEUCt.js → menu-parts-CNNHRduK.js} +42 -42
- package/dist/menu.js +1 -1
- package/dist/{menubar-BV43BKep.js → menubar-Bdr6zigi.js} +1 -1
- package/dist/menubar.js +1 -1
- package/dist/message-BkTiWsUp.js +436 -0
- package/dist/message-scroller-akQEtQLn.js +218 -0
- package/dist/message-scroller.js +1 -1
- package/dist/message.js +1 -1
- package/dist/{multi-select-YaxhhH9y.js → multi-select-BvlJIEtz.js} +445 -443
- package/dist/multi-select.js +1 -1
- package/dist/{navigation-menu-parts-B64gKl8B.js → navigation-menu-parts-CEW4fgCo.js} +12 -12
- package/dist/navigation-menu.js +1 -1
- package/dist/{notification-center-Ci-OLWTO.js → notification-center-BQO0Ey3h.js} +40 -40
- package/dist/notification-center.js +1 -1
- package/dist/{number-field-BYQmPyM-.js → number-field-D1MqT8_A.js} +13 -13
- package/dist/number-field.js +1 -1
- package/dist/{otp-input-BKO0WPZc.js → otp-input-Cub9H9Di.js} +1 -1
- package/dist/otp-input.js +1 -1
- package/dist/{page-CfjGviUA.js → page-CwYmBoZQ.js} +1 -1
- package/dist/{page-header-w_PFLnLG.js → page-header-CMxCQqu_.js} +117 -114
- package/dist/page-header.js +1 -1
- package/dist/page.js +1 -1
- package/dist/{pagination-Cm9665gb.js → pagination-IEuos7H1.js} +12 -12
- package/dist/pagination.js +1 -1
- package/dist/{popover-D1krYeP-.js → popover-C7NpEzq6.js} +22 -22
- package/dist/popover.js +1 -1
- package/dist/prompt-composer-Cu8bj1Vb.js +276 -0
- package/dist/prompt-composer.js +1 -1
- package/dist/{prose-Bl5OjXTb.js → prose-CQN4Bqqh.js} +1 -1
- package/dist/prose.js +1 -1
- package/dist/{radio-group-D9VTBLUB.js → radio-group-BHlDgCLk.js} +2 -2
- package/dist/radio-group.js +1 -1
- package/dist/{rating-BRqsV5OF.js → rating-Cr0lXaAV.js} +15 -15
- package/dist/rating.js +1 -1
- package/dist/{saved-views-C_76obIv.js → saved-views-CyLSn8a2.js} +151 -151
- package/dist/saved-views.js +1 -1
- package/dist/{scroll-area-vrm2bbtZ.js → scroll-area-Fr0PmnRS.js} +1 -1
- package/dist/scroll-area.js +1 -1
- package/dist/{segmented-control-5DTOKO3g.js → segmented-control-uPnQYklX.js} +2 -2
- package/dist/segmented-control.js +1 -1
- package/dist/select-C0JYHwBy.js +1020 -0
- package/dist/select.js +1 -1
- package/dist/{side-navigation-MNMSkj9b.js → side-navigation-D8lRpHwj.js} +64 -64
- package/dist/side-navigation.js +1 -1
- package/dist/{skeleton-DyOwgYmF.js → skeleton-DeEOmm1y.js} +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/{slider-OMe1DAC-.js → slider-BSI1xvjw.js} +2 -2
- package/dist/slider.js +1 -1
- package/dist/{sparkline-ChkaLVdY.js → sparkline-CYU4_lCD.js} +1 -1
- package/dist/sparkline.js +1 -1
- package/dist/spinner-ring-DyfaYloA.js +19 -0
- package/dist/{split-button-DbmRwfMC.js → split-button-CkbylOMN.js} +2 -2
- package/dist/split-button.js +1 -1
- package/dist/{stat-card-BSnsTmsq.js → stat-card-CAh4SdeY.js} +16 -16
- package/dist/stat-card.js +1 -1
- package/dist/{status-indicator-CyKhBdvN.js → status-indicator-BVMnpcm8.js} +4 -4
- package/dist/status-indicator.js +1 -1
- package/dist/{stepper-Cw1Auv3n.js → stepper-BLfvMz04.js} +16 -16
- package/dist/stepper.js +1 -1
- package/dist/styles/action-bar.css +1 -1
- package/dist/styles/action-sheet.css +2 -2
- package/dist/styles/button.css +2 -2
- package/dist/styles/cascader.css +2 -2
- package/dist/styles/chart.css +1 -1
- package/dist/styles/column-manager.css +3 -3
- package/dist/styles/command-palette.css +3 -3
- package/dist/styles/dashboard-grid.css +2 -2
- package/dist/styles/data-grid.css +3 -3
- package/dist/styles/data-list.css +2 -2
- package/dist/styles/detail-panel.css +4 -4
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/entity-picker.css +1 -1
- package/dist/styles/event-calendar.css +1 -1
- package/dist/styles/filter-bar.css +3 -3
- package/dist/styles/import-export-center.css +4 -4
- package/dist/styles/index.css +12 -12
- package/dist/styles/markdown.css +2 -2
- package/dist/styles/multi-select.css +1 -1
- package/dist/styles/notification-center.css +3 -3
- package/dist/styles/page-header.css +2 -2
- package/dist/styles/page.css +1 -1
- package/dist/styles/prompt-composer.css +1 -1
- package/dist/styles/saved-views.css +2 -2
- package/dist/styles/split-button.css +2 -2
- package/dist/styles/table.css +2 -2
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/timeline.css +1 -1
- package/dist/styles/toast.css +1 -1
- package/dist/styles/tour.css +2 -2
- package/dist/styles/transfer.css +2 -2
- package/dist/styles/upload.css +1 -1
- package/dist/styles/wizard.css +2 -2
- package/dist/styles.css +1 -1
- package/dist/{switch-CQ1rpuKa.js → switch-BHyKHqeI.js} +5 -5
- package/dist/switch.js +1 -1
- package/dist/{table-DpGTPtnb.js → table-C8zOHDcY.js} +30 -30
- package/dist/{table-of-contents-BFVERMZy.js → table-of-contents-BAIuPCdy.js} +8 -8
- package/dist/table-of-contents.js +1 -1
- package/dist/table.js +1 -1
- package/dist/{tag-aX7uyAN0.js → tag-XYGEPUHR.js} +14 -14
- package/dist/tag.js +1 -1
- package/dist/{tags-input-BgpS22sf.js → tags-input-ClYSd-No.js} +40 -40
- package/dist/tags-input.js +1 -1
- package/dist/text-field-Cguj75tn.js +205 -0
- package/dist/text-field.js +1 -1
- package/dist/{textarea-DNCjsQYd.js → textarea-BKsh_jAo.js} +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{time-field-Cm6iBjwH.js → time-field-BIE4WMpS.js} +7 -7
- package/dist/time-field.js +1 -1
- package/dist/{time-picker-Ce18FSO2.js → time-picker-CNfafRDF.js} +18 -18
- package/dist/time-picker.js +1 -1
- package/dist/{time-range-picker-kDnw4PQ3.js → time-range-picker-D7gM_Wno.js} +20 -20
- package/dist/time-range-picker.js +1 -1
- package/dist/timeline-BLadNUkS.js +449 -0
- package/dist/timeline.js +1 -1
- package/dist/{toast-58ex8PDK.js → toast-CjbiXiza.js} +16 -16
- package/dist/toast.js +1 -1
- package/dist/{toggle-group-YxVJlCnI.js → toggle-group-BZmghKac.js} +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/toolbar-BI4ZepBs.js +243 -0
- package/dist/toolbar.js +1 -1
- package/dist/{top-navigation-DorkYBnR.js → top-navigation-BTZpx5VA.js} +13 -13
- package/dist/top-navigation.js +1 -1
- package/dist/{tour-CwK_m_Jp.js → tour-_CQ1kYov.js} +23 -23
- package/dist/tour.js +1 -1
- package/dist/{transfer-DxGDWIEt.js → transfer-BVhBdIGp.js} +59 -59
- package/dist/transfer.js +1 -1
- package/dist/tree-DfI9UWLA.js +794 -0
- package/dist/tree.js +1 -1
- package/dist/types/action-bar/action-bar-overflow.d.ts.map +1 -1
- package/dist/types/action-bar/action-bar.types.d.ts +2 -2
- package/dist/types/action-sheet/action-sheet-parts.d.ts.map +1 -1
- package/dist/types/app-shell/app-shell-parts.d.ts.map +1 -1
- package/dist/types/app-shell/app-shell.d.ts.map +1 -1
- package/dist/types/app-shell/app-shell.types.d.ts +21 -14
- package/dist/types/app-shell/app-shell.types.d.ts.map +1 -1
- package/dist/types/app-shell/index.d.ts +1 -1
- package/dist/types/app-shell/index.d.ts.map +1 -1
- package/dist/types/button/button-indicator.d.ts.map +1 -1
- package/dist/types/button/spinner-ring.d.ts +8 -0
- package/dist/types/button/spinner-ring.d.ts.map +1 -0
- package/dist/types/cascader/cascader-surface.d.ts.map +1 -1
- package/dist/types/cascader/cascader.d.ts.map +1 -1
- package/dist/types/combobox/combobox-parts.d.ts.map +1 -1
- package/dist/types/command-palette/command-palette.d.ts.map +1 -1
- package/dist/types/data-grid/data-grid-body.d.ts +7 -2
- package/dist/types/data-grid/data-grid-body.d.ts.map +1 -1
- package/dist/types/data-grid/data-grid-header.d.ts.map +1 -1
- package/dist/types/data-grid/data-grid.d.ts +1 -1
- package/dist/types/data-grid/data-grid.d.ts.map +1 -1
- package/dist/types/detail-panel/detail-panel-parts.d.ts +2 -1
- package/dist/types/detail-panel/detail-panel-parts.d.ts.map +1 -1
- package/dist/types/drawer/drawer-parts.d.ts.map +1 -1
- package/dist/types/entity-picker/entity-picker-control.d.ts.map +1 -1
- package/dist/types/filter-bar/filter-bar.d.ts.map +1 -1
- package/dist/types/i18n/slotted-provider.d.ts +6 -0
- package/dist/types/i18n/slotted-provider.d.ts.map +1 -1
- package/dist/types/import-export-center/import-export-center.d.ts.map +1 -1
- package/dist/types/message/message-parts.d.ts.map +1 -1
- package/dist/types/message-scroller/message-scroller.d.ts.map +1 -1
- package/dist/types/multi-select/multi-select-parts.d.ts.map +1 -1
- package/dist/types/page-header/page-header-defaults.d.ts +1 -1
- package/dist/types/page-header/page-header-defaults.d.ts.map +1 -1
- package/dist/types/page-header/page-header.d.ts +1 -1
- package/dist/types/page-header/page-header.d.ts.map +1 -1
- package/dist/types/page-header/page-header.types.d.ts +9 -0
- package/dist/types/page-header/page-header.types.d.ts.map +1 -1
- package/dist/types/prompt-composer/prompt-composer.d.ts.map +1 -1
- package/dist/types/select/select-parts.d.ts.map +1 -1
- package/dist/types/text-field/text-field.d.ts.map +1 -1
- package/dist/types/timeline/timeline-parts.d.ts.map +1 -1
- package/dist/types/timeline/timeline.d.ts.map +1 -1
- package/dist/types/toolbar/toolbar-overflow.d.ts.map +1 -1
- package/dist/types/toolbar/toolbar.types.d.ts +2 -2
- package/dist/types/tree/tree-parts.d.ts.map +1 -1
- package/dist/{upload-CEDsfMWz.js → upload-N2-nyO8x.js} +65 -65
- package/dist/upload.js +1 -1
- package/dist/{wizard-B3p7zCSj.js → wizard-CK1x2fs3.js} +16 -16
- package/dist/wizard.js +1 -1
- package/package.json +6 -6
- package/dist/action-bar-CJgBierN.js +0 -283
- package/dist/action-sheet-tRrjm7WQ.js +0 -358
- package/dist/cascader-DqlC1z5b.js +0 -1154
- package/dist/combobox-YWFkxaQ3.js +0 -902
- package/dist/command-palette-DXNq-zKN.js +0 -741
- package/dist/data-list-DZCN_uW1.js +0 -587
- package/dist/entity-picker-CFwLGQeU.js +0 -1281
- package/dist/filter-bar-G50WdRac.js +0 -1340
- package/dist/message-Dtck9RJy.js +0 -434
- package/dist/message-scroller-niUJ8RoL.js +0 -216
- package/dist/prompt-composer-sh_TXKYZ.js +0 -273
- package/dist/select-BFx5EgAa.js +0 -1018
- package/dist/text-field-DL_uhNXV.js +0 -203
- package/dist/timeline-pEL30Jp8.js +0 -446
- package/dist/toolbar-BtIyVbs4.js +0 -241
- package/dist/tree-DbLRyItM.js +0 -792
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { n as e, t } from "./
|
|
2
|
-
import {
|
|
3
|
-
import { n as s,
|
|
4
|
-
import { n as l } from "./icon-button-
|
|
1
|
+
import { n as e, r as t } from "./i18n-D7xXDd8-.js";
|
|
2
|
+
import { n, t as r } from "./icon-DjqSEQ-o.js";
|
|
3
|
+
import { _ as i, c as a, g as o, n as s, t as c } from "./menu-parts-CNNHRduK.js";
|
|
4
|
+
import { n as l } from "./icon-button-DbSZKGT4.js";
|
|
5
5
|
import { a as u, i as d, n as f, r as p } from "./tooltip-DrFiRlH8.js";
|
|
6
|
-
import { t as m } from "./checkbox-
|
|
7
|
-
import { i as h } from "./skeleton-
|
|
8
|
-
import { t as g } from "./text-field-
|
|
9
|
-
import { a as _, d as ee, f as te, l as ne, r as re, t as ie } from "./popover-
|
|
6
|
+
import { t as m } from "./checkbox-C_8GVtjD.js";
|
|
7
|
+
import { i as h } from "./skeleton-DeEOmm1y.js";
|
|
8
|
+
import { t as g } from "./text-field-Cguj75tn.js";
|
|
9
|
+
import { a as _, d as ee, f as te, l as ne, r as re, t as ie } from "./popover-C7NpEzq6.js";
|
|
10
10
|
import { t as v } from "./visually-hidden-BUSrFZ1_.js";
|
|
11
11
|
import { i as ae, n as oe, o as se, r as ce, t as le } from "./result-state-BMYhelu1.js";
|
|
12
|
-
import { t as ue } from "./date-picker-
|
|
13
|
-
import { t as de } from "./date-field-
|
|
14
|
-
import { t as fe } from "./date-range-picker-
|
|
15
|
-
import { t as pe } from "./datetime-picker-
|
|
16
|
-
import { t as me } from "./datetime-field-
|
|
17
|
-
import { t as he } from "./datetime-range-picker-
|
|
18
|
-
import { a as ge, i as _e, n as ve, s as ye } from "./multi-select-
|
|
19
|
-
import { t as be } from "./number-field-
|
|
20
|
-
import { a as xe, t as Se } from "./segmented-control-
|
|
21
|
-
import { c as Ce, i as we, n as Te, o as Ee, s as De } from "./select-
|
|
22
|
-
import { t as Oe } from "./time-picker-
|
|
23
|
-
import { t as ke } from "./time-field-
|
|
24
|
-
import { t as Ae } from "./time-range-picker-
|
|
12
|
+
import { t as ue } from "./date-picker-DpTRb-Y1.js";
|
|
13
|
+
import { t as de } from "./date-field-B2lQzE3p.js";
|
|
14
|
+
import { t as fe } from "./date-range-picker-CBUPJep5.js";
|
|
15
|
+
import { t as pe } from "./datetime-picker-BK_bV3Yr.js";
|
|
16
|
+
import { t as me } from "./datetime-field-BZ44uJ_B.js";
|
|
17
|
+
import { t as he } from "./datetime-range-picker-ChdbRgzQ.js";
|
|
18
|
+
import { a as ge, i as _e, n as ve, s as ye } from "./multi-select-BvlJIEtz.js";
|
|
19
|
+
import { t as be } from "./number-field-D1MqT8_A.js";
|
|
20
|
+
import { a as xe, t as Se } from "./segmented-control-uPnQYklX.js";
|
|
21
|
+
import { c as Ce, i as we, n as Te, o as Ee, s as De } from "./select-C0JYHwBy.js";
|
|
22
|
+
import { t as Oe } from "./time-picker-CNfafRDF.js";
|
|
23
|
+
import { t as ke } from "./time-field-BIE4WMpS.js";
|
|
24
|
+
import { t as Ae } from "./time-range-picker-D7gM_Wno.js";
|
|
25
25
|
import { selectorKeyProps as je, withSelectorKey as Me } from "@slotted/core/selector-key";
|
|
26
26
|
import { createControllable as Ne } from "@slotted/core/state";
|
|
27
27
|
import { createContext as Pe, createElement as Fe, memo as Ie, useCallback as y, useContext as Le, useEffect as b, useId as Re, useImperativeHandle as ze, useLayoutEffect as Be, useMemo as x, useRef as S, useState as C, useSyncExternalStore as Ve } from "react";
|
|
@@ -34,15 +34,15 @@ import { isPlainDate as Je, isPlainDateTime as Ye, isPlainTime as Xe, parseISODa
|
|
|
34
34
|
import { createRowMetrics as rt, nextSelection as it, virtualWindow as at } from "@slotted/core/collection";
|
|
35
35
|
import { writeToClipboard as ot } from "@slotted/core/clipboard";
|
|
36
36
|
import { createDragController as st } from "@slotted/core/drag";
|
|
37
|
-
import { FILTER_ROW as ct, GROUP_ROW_PREFIX as lt, HEADER_ROW as ut, POPIN_COLUMN_ID as dt, RESIZE_STEP as ft, SUMMARY_ROW as pt, applyQuery as mt, cellText as ht, cellValue as gt,
|
|
38
|
-
import { createFilterGroupPredicate as
|
|
37
|
+
import { FILTER_ROW as ct, GROUP_ROW_PREFIX as lt, HEADER_ROW as ut, POPIN_COLUMN_ID as dt, RESIZE_STEP as ft, SUMMARY_ROW as pt, applyQuery as mt, cellText as ht, cellValue as gt, clampWidth as _t, columnRange as vt, columnTemplate as yt, columnsOutOfSpace as bt, emptyGridView as xt, emptyQuery as St, groupInOrder as Ct, isGroupCursorRow as wt, moveCursor as Tt, normalizeColumnState as Et, parseGridView as Dt, rangeBounds as Ot, rangeCells as kt, rangeEdges as At, rangeToText as jt, resolveColumnOverflow as Mt, resolveColumns as Nt, rowRange as Pt, sameCell as E, serializeGridView as Ft, serializeQuery as It, settleCursor as Lt, toCsv as Rt, wholeRange as zt, withColumnFilter as Bt, withColumnHidden as Vt, withColumnMoved as Ht, withColumnPinned as Ut, withColumnWidth as Wt, withSort as Gt, withSortPress as Kt, withoutFilters as qt, zoneOf as Jt } from "@slotted/core/grid";
|
|
38
|
+
import { createFilterGroupPredicate as Yt, defaultOperator as Xt, describeFilter as Zt, emptyFilter as Qt, isConditionActive as $t, isFilterActive as en, normalizeFilter as tn, operandCount as nn, operatorsFor as rn, ruleFor as an, serializeFilter as on, withCondition as sn, withJoin as cn, withoutRuleFor as ln } from "@slotted/core/filter";
|
|
39
39
|
//#region src/data-grid/data-grid-constants.ts
|
|
40
|
-
var
|
|
41
|
-
function
|
|
40
|
+
var un = "__selection", dn = "__expander", fn = "__drag", pn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"]), [contenteditable=\"true\"]";
|
|
41
|
+
function mn(e, t) {
|
|
42
42
|
let n = { "--slotted-data-grid-column": String(t) };
|
|
43
43
|
return e.pinned && (n["--slotted-data-grid-pin-offset"] = `${e.pinOffset}px`), n;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function hn(e) {
|
|
46
46
|
return {
|
|
47
47
|
...e.align ? { "data-align": e.align } : {},
|
|
48
48
|
...e.numeric ? { "data-numeric": "" } : {},
|
|
@@ -51,19 +51,19 @@ function mn(e) {
|
|
|
51
51
|
"data-column": e.id
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function gn(e) {
|
|
55
55
|
let t = e.currentTarget, n = e.target;
|
|
56
56
|
if (!n || !t.contains(n)) return !0;
|
|
57
|
-
let r = n.closest(
|
|
57
|
+
let r = n.closest(pn);
|
|
58
58
|
return r !== null && r !== t && t.contains(r);
|
|
59
59
|
}
|
|
60
|
-
var
|
|
60
|
+
var _n = 1200, vn = Pe(void 0);
|
|
61
61
|
function D() {
|
|
62
|
-
let e = Le(
|
|
62
|
+
let e = Le(vn);
|
|
63
63
|
if (e === void 0) throw Error("Every DataGrid part must be rendered inside DataGrid.");
|
|
64
64
|
return e;
|
|
65
65
|
}
|
|
66
|
-
var
|
|
66
|
+
var yn = /* @__PURE__ */ new Set([
|
|
67
67
|
"changedOf",
|
|
68
68
|
"current",
|
|
69
69
|
"detailId",
|
|
@@ -77,8 +77,8 @@ var vn = /* @__PURE__ */ new Set([
|
|
|
77
77
|
"rangeBounds",
|
|
78
78
|
"rangeInfo",
|
|
79
79
|
"rowLabelOf"
|
|
80
|
-
]),
|
|
81
|
-
function
|
|
80
|
+
]), bn = /* @__PURE__ */ new Set(/* @__PURE__ */ "activate.allState.announce.anchorToButton.attachDraggable.attachRowDraggable.autofit.beginRange.cancelEdit.commitEdit.extendRange.focused.hide.moveColumn.onCellBlur.onCellClick.onCellDoubleClick.onCellFocus.onCellKeyDown.onCellPointerDown.onCellPointerEnter.onHeaderContextMenu.onManageColumns.pin.pressSort.rangeDragging.rangeSummary.resizeBy.resizeTo.selectableCount.selectedCount.setCurrent.setDraft.setFilter.setFilterOpen.setMenuOpen.setResizing.setSort.startEdit.tabStop.toggleAll.toggleBranch.toggleExpanded.toggleGroup.toggleSelected".split("."));
|
|
81
|
+
function xn(e) {
|
|
82
82
|
let t = e, n = 0, r = /* @__PURE__ */ new Set();
|
|
83
83
|
return {
|
|
84
84
|
grid: new Proxy({}, {
|
|
@@ -89,7 +89,7 @@ function bn(e) {
|
|
|
89
89
|
set: (e) => {
|
|
90
90
|
if (e === t) return;
|
|
91
91
|
let r = t, i = e;
|
|
92
|
-
for (let e of Object.keys(i)) if (!(
|
|
92
|
+
for (let e of Object.keys(i)) if (!(yn.has(e) || bn.has(e)) && r[e] !== i[e]) {
|
|
93
93
|
n += 1;
|
|
94
94
|
break;
|
|
95
95
|
}
|
|
@@ -116,7 +116,7 @@ function bn(e) {
|
|
|
116
116
|
+!!t.hasPopinCell(e),
|
|
117
117
|
+(t.draggingRow === e),
|
|
118
118
|
r !== null && r.row === e ? r.column : "",
|
|
119
|
-
i !== null && i.cell.row === e ?
|
|
119
|
+
i !== null && i.cell.row === e ? wn(i) : "",
|
|
120
120
|
t.detailId(e),
|
|
121
121
|
t.rowLabelOf(e),
|
|
122
122
|
a
|
|
@@ -124,48 +124,57 @@ function bn(e) {
|
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
var
|
|
128
|
-
function O(e) {
|
|
129
|
-
let t = xn.get(e);
|
|
130
|
-
return t === void 0 && (Sn += 1, t = Sn, xn.set(e, t)), t;
|
|
131
|
-
}
|
|
132
|
-
var Cn = Pe(void 0);
|
|
127
|
+
var Sn = /* @__PURE__ */ new WeakMap(), Cn = 0;
|
|
133
128
|
function wn(e) {
|
|
134
|
-
let t =
|
|
129
|
+
let t = Sn.get(e);
|
|
130
|
+
return t === void 0 && (Cn += 1, t = Cn, Sn.set(e, t)), t;
|
|
131
|
+
}
|
|
132
|
+
var Tn = Pe(void 0);
|
|
133
|
+
function En(e) {
|
|
134
|
+
let t = Le(Tn);
|
|
135
135
|
if (t === void 0) throw Error("Every DataGrid part must be rendered inside DataGrid.");
|
|
136
136
|
let n = () => t.signature(e);
|
|
137
137
|
return Ve(t.subscribe, n, n), t;
|
|
138
138
|
}
|
|
139
139
|
//#endregion
|
|
140
140
|
//#region src/data-grid/data-grid-body.tsx
|
|
141
|
-
function
|
|
142
|
-
let
|
|
143
|
-
return /* @__PURE__ */
|
|
141
|
+
function Dn({ allNodes: e, bodyStyle: t, firstIndex: n, headerRowCount: r, measureRow: i, nodes: a, heldRows: o, loadMore: s }) {
|
|
142
|
+
let c = o.map((t) => e.find((e) => e.key === t)).filter((e) => e !== void 0 && !a.includes(e));
|
|
143
|
+
return /* @__PURE__ */ T("div", {
|
|
144
144
|
"data-part": "body",
|
|
145
145
|
"data-part-body": "",
|
|
146
146
|
role: "rowgroup",
|
|
147
147
|
style: t,
|
|
148
|
-
children: [...a, ...
|
|
148
|
+
children: [[...a, ...c].map((e, t) => {
|
|
149
149
|
let a = n + t, o = r + 1 + (e.kind === "row" ? e.index : a);
|
|
150
|
-
return e.kind === "group" ? /* @__PURE__ */ w(
|
|
150
|
+
return e.kind === "group" ? /* @__PURE__ */ w(Fn, {
|
|
151
151
|
node: e,
|
|
152
152
|
rowIndex: o
|
|
153
|
-
}, `group:${e.key}`) : /* @__PURE__ */ w(
|
|
153
|
+
}, `group:${e.key}`) : /* @__PURE__ */ w(jn, {
|
|
154
154
|
index: a,
|
|
155
155
|
measure: i,
|
|
156
156
|
node: e,
|
|
157
157
|
rowIndex: o
|
|
158
158
|
}, e.key);
|
|
159
|
-
})
|
|
159
|
+
}), s ? /* @__PURE__ */ w("div", {
|
|
160
|
+
"aria-hidden": "true",
|
|
161
|
+
ref: s.ref,
|
|
162
|
+
style: {
|
|
163
|
+
bottom: 0,
|
|
164
|
+
inlineSize: 1,
|
|
165
|
+
position: "absolute",
|
|
166
|
+
top: s.top
|
|
167
|
+
}
|
|
168
|
+
}) : null]
|
|
160
169
|
});
|
|
161
170
|
}
|
|
162
|
-
function
|
|
171
|
+
function On({ edge: e, firstRowIndex: t, nodes: n }) {
|
|
163
172
|
return /* @__PURE__ */ w("div", {
|
|
164
173
|
"data-edge": e,
|
|
165
174
|
"data-part": "pinned-rows",
|
|
166
175
|
"data-part-pinned-rows": "",
|
|
167
176
|
role: "rowgroup",
|
|
168
|
-
children: n.map((e, n) => /* @__PURE__ */ w(
|
|
177
|
+
children: n.map((e, n) => /* @__PURE__ */ w(jn, {
|
|
169
178
|
index: -1,
|
|
170
179
|
measure: void 0,
|
|
171
180
|
node: e,
|
|
@@ -173,15 +182,15 @@ function En({ edge: e, firstRowIndex: t, nodes: n }) {
|
|
|
173
182
|
}, e.key))
|
|
174
183
|
});
|
|
175
184
|
}
|
|
176
|
-
function
|
|
185
|
+
function kn({ children: e }) {
|
|
177
186
|
return /* @__PURE__ */ w("div", {
|
|
178
187
|
"data-part": "empty",
|
|
179
188
|
"data-part-empty": "",
|
|
180
189
|
children: e
|
|
181
190
|
});
|
|
182
191
|
}
|
|
183
|
-
function
|
|
184
|
-
let i = n.key, a =
|
|
192
|
+
function An({ index: e, measure: t, node: n, rowIndex: r }) {
|
|
193
|
+
let i = n.key, a = En(i), o = a.latest(), s = o.isSelected(i), c = o.isDisabled(i), l = o.current !== null && o.current.row === i, u = o.isExpanded(i) && (o.treeColumn === null || n.childCount === 0), d = o.isLoadingChildren(i), f = o.edit !== null && o.edit.cell.row === i, p = y((n) => {
|
|
185
194
|
t?.(e, n), a.grid.attachRowDraggable(n, i);
|
|
186
195
|
}, [
|
|
187
196
|
t,
|
|
@@ -207,14 +216,14 @@ function On({ index: e, measure: t, node: n, rowIndex: r }) {
|
|
|
207
216
|
...c ? { "data-disabled": "" } : {},
|
|
208
217
|
...f ? { "data-editing": "" } : {},
|
|
209
218
|
children: [
|
|
210
|
-
o.columnIds.includes("__selection") ? /* @__PURE__ */ w(
|
|
211
|
-
o.columnIds.includes("__drag") ? /* @__PURE__ */ w(
|
|
212
|
-
o.columnIds.includes("__expander") ? /* @__PURE__ */ w(
|
|
213
|
-
o.mountedColumns.map((e) => /* @__PURE__ */ w(
|
|
219
|
+
o.columnIds.includes("__selection") ? /* @__PURE__ */ w(O, { rowKey: i }) : null,
|
|
220
|
+
o.columnIds.includes("__drag") ? /* @__PURE__ */ w(Mn, { node: n }) : null,
|
|
221
|
+
o.columnIds.includes("__expander") ? /* @__PURE__ */ w(k, { node: n }) : null,
|
|
222
|
+
o.mountedColumns.map((e) => /* @__PURE__ */ w(Nn, {
|
|
214
223
|
column: e,
|
|
215
224
|
node: n
|
|
216
225
|
}, e.id)),
|
|
217
|
-
o.popinColumns.length > 0 ? /* @__PURE__ */ w(
|
|
226
|
+
o.popinColumns.length > 0 ? /* @__PURE__ */ w(Pn, { node: n }) : null
|
|
218
227
|
]
|
|
219
228
|
}), u && o.renderDetail ? /* @__PURE__ */ w("div", {
|
|
220
229
|
"aria-rowindex": r + 1,
|
|
@@ -233,15 +242,15 @@ function On({ index: e, measure: t, node: n, rowIndex: r }) {
|
|
|
233
242
|
})
|
|
234
243
|
}) : null] });
|
|
235
244
|
}
|
|
236
|
-
var
|
|
237
|
-
function
|
|
245
|
+
var jn = Ie(An);
|
|
246
|
+
function O({ rowKey: e }) {
|
|
238
247
|
let t = D(), n = {
|
|
239
248
|
row: e,
|
|
240
|
-
column:
|
|
249
|
+
column: un
|
|
241
250
|
}, r = t.current !== null && t.current.row === e && t.current.column === "__selection", i = t.isDisabled(e);
|
|
242
251
|
return /* @__PURE__ */ w("div", {
|
|
243
252
|
"aria-colindex": 1,
|
|
244
|
-
"data-column":
|
|
253
|
+
"data-column": un,
|
|
245
254
|
"data-part": "selection",
|
|
246
255
|
"data-part-selection": "",
|
|
247
256
|
role: "gridcell",
|
|
@@ -271,14 +280,14 @@ function An({ rowKey: e }) {
|
|
|
271
280
|
})
|
|
272
281
|
});
|
|
273
282
|
}
|
|
274
|
-
function
|
|
275
|
-
let
|
|
276
|
-
row:
|
|
277
|
-
column:
|
|
278
|
-
}, a =
|
|
283
|
+
function Mn({ node: e }) {
|
|
284
|
+
let t = D(), i = {
|
|
285
|
+
row: e.key,
|
|
286
|
+
column: fn
|
|
287
|
+
}, a = t.columnIds.indexOf(fn) + 1, o = t.current !== null && t.current.row === e.key && t.current.column === "__drag";
|
|
279
288
|
return /* @__PURE__ */ w("div", {
|
|
280
289
|
"aria-colindex": a,
|
|
281
|
-
"data-column":
|
|
290
|
+
"data-column": fn,
|
|
282
291
|
"data-kind": "drag",
|
|
283
292
|
"data-part": "cell",
|
|
284
293
|
"data-part-cell": "",
|
|
@@ -286,31 +295,31 @@ function k({ node: n }) {
|
|
|
286
295
|
style: { "--slotted-data-grid-column": String(a) },
|
|
287
296
|
tabIndex: o ? 0 : -1,
|
|
288
297
|
onFocus: (e) => {
|
|
289
|
-
e.target === e.currentTarget &&
|
|
298
|
+
e.target === e.currentTarget && t.onCellFocus(i);
|
|
290
299
|
},
|
|
291
|
-
onKeyDown: (e) =>
|
|
292
|
-
onPointerDown: (e) =>
|
|
300
|
+
onKeyDown: (e) => t.onCellKeyDown(e, i),
|
|
301
|
+
onPointerDown: (e) => t.onCellPointerDown(e, i),
|
|
293
302
|
...o ? { "data-current": "" } : {},
|
|
294
303
|
children: /* @__PURE__ */ w("button", {
|
|
295
|
-
"aria-disabled": !
|
|
296
|
-
"aria-label":
|
|
304
|
+
"aria-disabled": !t.rowsReorderable || void 0,
|
|
305
|
+
"aria-label": t.t("reorderRow", { row: t.rowLabelOf(e.key) }),
|
|
297
306
|
"data-part": "row-handle",
|
|
298
307
|
"data-part-row-handle": "",
|
|
299
|
-
...
|
|
308
|
+
...t.rowsReorderable ? {} : { "data-disabled": "" },
|
|
300
309
|
tabIndex: o ? 0 : -1,
|
|
301
310
|
type: "button",
|
|
302
|
-
children: /* @__PURE__ */ w(
|
|
311
|
+
children: /* @__PURE__ */ w(r, { children: /* @__PURE__ */ w(n, { name: "grip-vertical" }) })
|
|
303
312
|
})
|
|
304
313
|
});
|
|
305
314
|
}
|
|
306
|
-
function
|
|
307
|
-
let
|
|
308
|
-
row:
|
|
309
|
-
column:
|
|
310
|
-
}, a =
|
|
315
|
+
function k({ node: e }) {
|
|
316
|
+
let t = D(), i = {
|
|
317
|
+
row: e.key,
|
|
318
|
+
column: dn
|
|
319
|
+
}, a = t.columnIds.indexOf(dn) + 1, o = t.current !== null && t.current.row === e.key && t.current.column === "__expander", s = t.isExpandable(e.row), c = t.isExpanded(e.key);
|
|
311
320
|
return /* @__PURE__ */ w("div", {
|
|
312
321
|
"aria-colindex": a,
|
|
313
|
-
"data-column":
|
|
322
|
+
"data-column": dn,
|
|
314
323
|
"data-kind": "expander",
|
|
315
324
|
"data-part": "cell",
|
|
316
325
|
"data-part-cell": "",
|
|
@@ -318,43 +327,43 @@ function jn({ node: n }) {
|
|
|
318
327
|
style: { "--slotted-data-grid-column": String(a) },
|
|
319
328
|
tabIndex: o ? 0 : -1,
|
|
320
329
|
onFocus: (e) => {
|
|
321
|
-
e.target === e.currentTarget &&
|
|
330
|
+
e.target === e.currentTarget && t.onCellFocus(i);
|
|
322
331
|
},
|
|
323
|
-
onKeyDown: (e) =>
|
|
324
|
-
onPointerDown: (e) =>
|
|
332
|
+
onKeyDown: (e) => t.onCellKeyDown(e, i),
|
|
333
|
+
onPointerDown: (e) => t.onCellPointerDown(e, i),
|
|
325
334
|
...o ? { "data-current": "" } : {},
|
|
326
335
|
children: s ? /* @__PURE__ */ w("button", {
|
|
327
|
-
"aria-controls": c ?
|
|
336
|
+
"aria-controls": c ? t.detailId(e.key) : void 0,
|
|
328
337
|
"aria-expanded": c,
|
|
329
|
-
"aria-label":
|
|
338
|
+
"aria-label": t.t(c ? "collapse" : "expand"),
|
|
330
339
|
"data-part": "expander",
|
|
331
340
|
"data-part-expander": "",
|
|
332
|
-
onClick: (
|
|
341
|
+
onClick: (n) => t.toggleExpanded(e.key, n),
|
|
333
342
|
tabIndex: o ? 0 : -1,
|
|
334
343
|
type: "button",
|
|
335
|
-
children: /* @__PURE__ */ w(
|
|
344
|
+
children: /* @__PURE__ */ w(r, { children: /* @__PURE__ */ w(n, { name: "chevron-right" }) })
|
|
336
345
|
}) : null
|
|
337
346
|
});
|
|
338
347
|
}
|
|
339
|
-
function
|
|
340
|
-
let i = D(), a =
|
|
348
|
+
function Nn({ column: e, node: t }) {
|
|
349
|
+
let i = D(), a = t.key, o = {
|
|
341
350
|
row: a,
|
|
342
|
-
column:
|
|
343
|
-
}, s = i.columnIds.indexOf(
|
|
351
|
+
column: e.id
|
|
352
|
+
}, s = i.columnIds.indexOf(e.id) + 1, c = i.current !== null && i.current.row === a && i.current.column === e.id, l = i.isSelected(a), u = i.edit, d = u !== null && u.cell.row === a && u.columns.includes(e.id), f = i.valueOf(e.column, t.row), p = i.textOf(e.column, t.row), m = i.isEditable(e.column, t.row), h = i.rangeInfo(o), g = d ? u.messages[e.id] ?? null : null, _ = d && u.status === "invalid" && g !== null, ee = d && u.status === "pending", te = e.column.rowHeader ? "row-header" : "cell", ne = i.changedOf(o), re = i.treeColumn === e.id, ie = re && (t.childCount > 0 || t.open || i.isLoadingChildren(a) || i.hasChildren(t.row));
|
|
344
353
|
return /* @__PURE__ */ T("div", {
|
|
345
|
-
...
|
|
354
|
+
...hn(e),
|
|
346
355
|
"aria-colindex": s,
|
|
347
|
-
"aria-readonly": i.anyEditable && !m &&
|
|
356
|
+
"aria-readonly": i.anyEditable && !m && e.kind !== "actions" ? !0 : void 0,
|
|
348
357
|
"aria-selected": i.selectionMode === "range" && h.inside ? !0 : void 0,
|
|
349
358
|
"aria-invalid": _ ? !0 : void 0,
|
|
350
359
|
"data-part": te,
|
|
351
360
|
...je("part", te),
|
|
352
|
-
"data-text":
|
|
361
|
+
"data-text": e.text,
|
|
353
362
|
role: te === "row-header" ? "rowheader" : "gridcell",
|
|
354
363
|
style: re ? {
|
|
355
|
-
...
|
|
356
|
-
"--slotted-data-grid-level": String(
|
|
357
|
-
} :
|
|
364
|
+
...mn(e, s),
|
|
365
|
+
"--slotted-data-grid-level": String(t.level)
|
|
366
|
+
} : mn(e, s),
|
|
358
367
|
tabIndex: c ? 0 : -1,
|
|
359
368
|
title: _ && g ? g : void 0,
|
|
360
369
|
onClick: (e) => i.onCellClick(e, o),
|
|
@@ -372,11 +381,11 @@ function A({ column: n, node: r }) {
|
|
|
372
381
|
..._ ? { "data-invalid": "" } : {},
|
|
373
382
|
...ee ? { "data-loading": "" } : {},
|
|
374
383
|
...ne ? { "data-changed": ne } : {},
|
|
375
|
-
...i.anyEditable && !m &&
|
|
384
|
+
...i.anyEditable && !m && e.kind !== "actions" ? { "data-readonly": "" } : {},
|
|
376
385
|
...re ? { "data-tree": ie ? "branch" : "leaf" } : {},
|
|
377
386
|
children: [re ? ie ? /* @__PURE__ */ w("button", {
|
|
378
|
-
"aria-expanded":
|
|
379
|
-
"aria-label": i.t(
|
|
387
|
+
"aria-expanded": t.open,
|
|
388
|
+
"aria-label": i.t(t.open ? "collapse" : "expand"),
|
|
380
389
|
"data-part": "tree-toggle",
|
|
381
390
|
"data-part-tree-toggle": "",
|
|
382
391
|
onClick: (e) => {
|
|
@@ -386,7 +395,7 @@ function A({ column: n, node: r }) {
|
|
|
386
395
|
tabIndex: -1,
|
|
387
396
|
type: "button",
|
|
388
397
|
...i.isLoadingChildren(a) ? { "data-loading": "" } : {},
|
|
389
|
-
children: /* @__PURE__ */ w(
|
|
398
|
+
children: /* @__PURE__ */ w(r, { children: /* @__PURE__ */ w(n, { name: i.isLoadingChildren(a) ? "loader-circle" : "chevron-right" }) })
|
|
390
399
|
}) : /* @__PURE__ */ w("span", {
|
|
391
400
|
"aria-hidden": !0,
|
|
392
401
|
"data-part": "tree-toggle",
|
|
@@ -396,24 +405,24 @@ function A({ column: n, node: r }) {
|
|
|
396
405
|
"data-part": "editor",
|
|
397
406
|
"data-part-editor": "",
|
|
398
407
|
children: i.renderEditorContent({
|
|
399
|
-
row:
|
|
408
|
+
row: t.row,
|
|
400
409
|
rowKey: a,
|
|
401
|
-
column:
|
|
410
|
+
column: e.column,
|
|
402
411
|
value: f,
|
|
403
412
|
text: p,
|
|
404
413
|
current: c,
|
|
405
414
|
selected: l,
|
|
406
|
-
draft: u.drafts[
|
|
407
|
-
setDraft: (
|
|
415
|
+
draft: u.drafts[e.id],
|
|
416
|
+
setDraft: (t) => i.setDraft(e.id, t),
|
|
408
417
|
commit: () => i.commitEdit("programmatic"),
|
|
409
418
|
cancel: () => i.cancelEdit(),
|
|
410
419
|
invalid: _,
|
|
411
420
|
message: g
|
|
412
421
|
})
|
|
413
422
|
}) : i.renderCellContent({
|
|
414
|
-
row:
|
|
423
|
+
row: t.row,
|
|
415
424
|
rowKey: a,
|
|
416
|
-
column:
|
|
425
|
+
column: e.column,
|
|
417
426
|
value: f,
|
|
418
427
|
text: p,
|
|
419
428
|
current: c,
|
|
@@ -421,7 +430,7 @@ function A({ column: n, node: r }) {
|
|
|
421
430
|
})]
|
|
422
431
|
});
|
|
423
432
|
}
|
|
424
|
-
function
|
|
433
|
+
function Pn({ node: e }) {
|
|
425
434
|
let t = D(), n = e.key, r = {
|
|
426
435
|
row: n,
|
|
427
436
|
column: dt
|
|
@@ -467,20 +476,20 @@ function Mn({ node: e }) {
|
|
|
467
476
|
}, r.id))
|
|
468
477
|
});
|
|
469
478
|
}
|
|
470
|
-
function
|
|
471
|
-
let i = D(), a = `${lt}${
|
|
479
|
+
function Fn({ node: e, rowIndex: t }) {
|
|
480
|
+
let i = D(), a = `${lt}${e.key}`, o = i.columns.find((t) => t.id === e.column), s = i.resolved.filter((e) => e.column.aggregate !== void 0), c = s.length > 0 ? Math.min(...s.map((e) => i.columnIds.indexOf(e.id) + 1)) : i.columnIds.length + 1, l = (e) => ({
|
|
472
481
|
row: a,
|
|
473
482
|
column: e
|
|
474
|
-
}), u = i.columnIds[0], d = i.current !== null && i.current.row === a, f = i.t("groupCount", { count:
|
|
483
|
+
}), u = i.columnIds[0], d = i.current !== null && i.current.row === a, f = i.t("groupCount", { count: e.count });
|
|
475
484
|
return /* @__PURE__ */ T("div", {
|
|
476
|
-
"aria-expanded":
|
|
477
|
-
"aria-level":
|
|
478
|
-
"aria-rowindex":
|
|
485
|
+
"aria-expanded": e.expanded,
|
|
486
|
+
"aria-level": e.level,
|
|
487
|
+
"aria-rowindex": t,
|
|
479
488
|
"data-part": "group-row",
|
|
480
489
|
"data-part-group-row": "",
|
|
481
490
|
"data-row": a,
|
|
482
491
|
role: "row",
|
|
483
|
-
style: { "--slotted-data-grid-level": String(
|
|
492
|
+
style: { "--slotted-data-grid-level": String(e.level) },
|
|
484
493
|
...d ? { "data-current": "" } : {},
|
|
485
494
|
children: [/* @__PURE__ */ T("div", {
|
|
486
495
|
"aria-colindex": 1,
|
|
@@ -497,38 +506,38 @@ function j({ node: n, rowIndex: r }) {
|
|
|
497
506
|
onPointerDown: (e) => i.onCellPointerDown(e, l(u)),
|
|
498
507
|
...d && i.current?.column === u ? { "data-current": "" } : {},
|
|
499
508
|
children: [/* @__PURE__ */ w("button", {
|
|
500
|
-
"aria-expanded":
|
|
501
|
-
"aria-label": i.t(
|
|
509
|
+
"aria-expanded": e.expanded,
|
|
510
|
+
"aria-label": i.t(e.expanded ? "collapseGroup" : "expandGroup", { group: e.text }),
|
|
502
511
|
"data-part": "group-toggle",
|
|
503
512
|
"data-part-group-toggle": "",
|
|
504
|
-
onClick: (
|
|
505
|
-
|
|
513
|
+
onClick: (t) => {
|
|
514
|
+
t.stopPropagation(), i.toggleGroup(e.key, t);
|
|
506
515
|
},
|
|
507
516
|
tabIndex: -1,
|
|
508
517
|
type: "button",
|
|
509
|
-
children: /* @__PURE__ */ w(
|
|
518
|
+
children: /* @__PURE__ */ w(r, { children: /* @__PURE__ */ w(n, { name: "chevron-right" }) })
|
|
510
519
|
}), i.renderGroup && o ? i.renderGroup({
|
|
511
|
-
node:
|
|
520
|
+
node: e,
|
|
512
521
|
column: o,
|
|
513
|
-
toggle: () => i.toggleGroup(
|
|
514
|
-
}) : /* @__PURE__ */ T(He, { children: [/* @__PURE__ */ w("span", { children:
|
|
522
|
+
toggle: () => i.toggleGroup(e.key)
|
|
523
|
+
}) : /* @__PURE__ */ T(He, { children: [/* @__PURE__ */ w("span", { children: e.text }), /* @__PURE__ */ w("span", {
|
|
515
524
|
"data-count": "",
|
|
516
525
|
children: f
|
|
517
526
|
})] })]
|
|
518
|
-
}), s.map((
|
|
519
|
-
let
|
|
520
|
-
...
|
|
527
|
+
}), s.map((t) => {
|
|
528
|
+
let n = i.columnIds.indexOf(t.id) + 1, r = e.aggregates[t.id], a = r == null ? "" : ht({
|
|
529
|
+
...t.column,
|
|
521
530
|
accessor: () => r
|
|
522
|
-
},
|
|
531
|
+
}, e.rows[0], {
|
|
523
532
|
locale: i.locale,
|
|
524
533
|
booleans: i.booleans
|
|
525
|
-
}), o = l(
|
|
534
|
+
}), o = l(t.id), s = d && i.current?.column === t.id;
|
|
526
535
|
return /* @__PURE__ */ Fe("div", {
|
|
527
|
-
...
|
|
528
|
-
"aria-colindex":
|
|
529
|
-
key:
|
|
536
|
+
...hn(t),
|
|
537
|
+
"aria-colindex": n,
|
|
538
|
+
key: t.id,
|
|
530
539
|
role: "gridcell",
|
|
531
|
-
style:
|
|
540
|
+
style: mn(t, n),
|
|
532
541
|
tabIndex: s ? 0 : -1,
|
|
533
542
|
onFocus: (e) => {
|
|
534
543
|
e.target === e.currentTarget && i.onCellFocus(o);
|
|
@@ -543,7 +552,7 @@ function j({ node: n, rowIndex: r }) {
|
|
|
543
552
|
})]
|
|
544
553
|
});
|
|
545
554
|
}
|
|
546
|
-
function
|
|
555
|
+
function In({ rows: e, rowSize: t }) {
|
|
547
556
|
let n = D(), r = n.columnIds.length - n.resolved.length;
|
|
548
557
|
return /* @__PURE__ */ w("div", {
|
|
549
558
|
"aria-hidden": !0,
|
|
@@ -572,7 +581,7 @@ function Nn({ rows: e, rowSize: t }) {
|
|
|
572
581
|
}, t))
|
|
573
582
|
});
|
|
574
583
|
}
|
|
575
|
-
function
|
|
584
|
+
function Ln({ aggregates: e, rowIndex: t }) {
|
|
576
585
|
let n = D(), r = n.current !== null && n.current.row === pt, i = n.columnIds.length - n.resolved.length, a = (t) => {
|
|
577
586
|
let r = e[t.id];
|
|
578
587
|
return r == null ? "" : ht({
|
|
@@ -610,13 +619,13 @@ function Pn({ aggregates: e, rowIndex: t }) {
|
|
|
610
619
|
column: e.id
|
|
611
620
|
}, o = r && n.current?.column === e.id, s = a(e);
|
|
612
621
|
return /* @__PURE__ */ Fe("div", {
|
|
613
|
-
...
|
|
622
|
+
...hn(e),
|
|
614
623
|
"aria-colindex": t,
|
|
615
624
|
"data-part": "summary-cell",
|
|
616
625
|
"data-part-summary-cell": "",
|
|
617
626
|
key: e.id,
|
|
618
627
|
role: "gridcell",
|
|
619
|
-
style:
|
|
628
|
+
style: mn(e, t),
|
|
620
629
|
tabIndex: o ? 0 : -1,
|
|
621
630
|
onFocus: (e) => {
|
|
622
631
|
e.target === e.currentTarget && n.onCellFocus(i);
|
|
@@ -661,29 +670,29 @@ function Pn({ aggregates: e, rowIndex: t }) {
|
|
|
661
670
|
}
|
|
662
671
|
//#endregion
|
|
663
672
|
//#region src/data-grid/data-grid-defaults.tsx
|
|
664
|
-
var
|
|
665
|
-
function
|
|
666
|
-
let n = { ...Le(
|
|
673
|
+
var Rn = Pe({});
|
|
674
|
+
function zn({ children: e, ...t }) {
|
|
675
|
+
let n = { ...Le(Rn) };
|
|
667
676
|
for (let [e, r] of Object.entries(t)) r !== void 0 && (n[e] = r);
|
|
668
677
|
let r = x(() => n, [JSON.stringify(n)]);
|
|
669
|
-
return /* @__PURE__ */ w(
|
|
678
|
+
return /* @__PURE__ */ w(Rn.Provider, {
|
|
670
679
|
value: r,
|
|
671
680
|
children: e
|
|
672
681
|
});
|
|
673
682
|
}
|
|
674
|
-
function
|
|
675
|
-
return Le(
|
|
683
|
+
function Bn() {
|
|
684
|
+
return Le(Rn);
|
|
676
685
|
}
|
|
677
686
|
//#endregion
|
|
678
687
|
//#region src/data-grid/use-data-source.ts
|
|
679
|
-
var
|
|
680
|
-
function
|
|
688
|
+
var Vn = 20, Hn = [];
|
|
689
|
+
function Un(e, t) {
|
|
681
690
|
let [n, r] = C({
|
|
682
691
|
key: null,
|
|
683
692
|
result: null,
|
|
684
693
|
loading: e !== void 0,
|
|
685
694
|
error: null
|
|
686
|
-
}), i = S(/* @__PURE__ */ new Map()), a = S(null), [o, s] = C(0), c = e ?
|
|
695
|
+
}), i = S(/* @__PURE__ */ new Map()), a = S(null), [o, s] = C(0), c = e ? It(t) : null;
|
|
687
696
|
b(() => {
|
|
688
697
|
if (!e || c === null) return;
|
|
689
698
|
let n = i.current.get(c);
|
|
@@ -704,7 +713,7 @@ function Bn(e, t) {
|
|
|
704
713
|
error: null
|
|
705
714
|
})), e.getRows(t, { signal: o.signal }).then((t) => {
|
|
706
715
|
if (o.signal.aborted) return;
|
|
707
|
-
let n = e.cacheSize ??
|
|
716
|
+
let n = e.cacheSize ?? Vn;
|
|
708
717
|
if (n > 0) for (i.current.set(c, t); i.current.size > n;) {
|
|
709
718
|
let e = i.current.keys().next().value;
|
|
710
719
|
if (e === void 0) break;
|
|
@@ -734,7 +743,7 @@ function Bn(e, t) {
|
|
|
734
743
|
i.current.clear(), s((e) => e + 1);
|
|
735
744
|
}, []);
|
|
736
745
|
return {
|
|
737
|
-
rows: n.result?.rows ??
|
|
746
|
+
rows: n.result?.rows ?? Hn,
|
|
738
747
|
total: n.result?.total,
|
|
739
748
|
hasMore: n.result?.hasMore,
|
|
740
749
|
loading: n.loading,
|
|
@@ -745,26 +754,26 @@ function Bn(e, t) {
|
|
|
745
754
|
}
|
|
746
755
|
//#endregion
|
|
747
756
|
//#region src/data-grid/data-grid-editors.tsx
|
|
748
|
-
function
|
|
757
|
+
function Wn(e) {
|
|
749
758
|
return /* @__PURE__ */ w("span", {
|
|
750
759
|
title: e.text,
|
|
751
760
|
children: e.text
|
|
752
761
|
});
|
|
753
762
|
}
|
|
754
|
-
function
|
|
763
|
+
function Gn(e) {
|
|
755
764
|
if (!e) return null;
|
|
756
765
|
let t = String(e);
|
|
757
766
|
return $e(/^\d{2}$/.test(t) ? `${t}:00` : t);
|
|
758
767
|
}
|
|
759
|
-
function
|
|
768
|
+
function Kn(e) {
|
|
760
769
|
if (!e) return null;
|
|
761
770
|
let t = String(e);
|
|
762
771
|
return /^\d{4}-\d{2}-\d{2}$/.test(t) ? Qe(`${t}T00:00`) : /^\d{4}-\d{2}-\d{2}T\d{2}$/.test(t) ? Qe(`${t}:00`) : Qe(t);
|
|
763
772
|
}
|
|
764
|
-
function
|
|
773
|
+
function qn(e) {
|
|
765
774
|
return e ? Ze(String(e)) : null;
|
|
766
775
|
}
|
|
767
|
-
function
|
|
776
|
+
function Jn(e, t, n) {
|
|
768
777
|
let { column: r, draft: i, setDraft: a, invalid: o, message: s } = e, c = r.kind ?? "text", l = r.label, u = {
|
|
769
778
|
"aria-label": l,
|
|
770
779
|
autoFocus: !0,
|
|
@@ -792,19 +801,19 @@ function Wn(e, t, n) {
|
|
|
792
801
|
case "date": return /* @__PURE__ */ w(de, {
|
|
793
802
|
...u,
|
|
794
803
|
onValueChange: (e) => a(Je(e) ? et(e) : null),
|
|
795
|
-
value:
|
|
804
|
+
value: qn(i),
|
|
796
805
|
...n === void 0 ? {} : { locale: n }
|
|
797
806
|
});
|
|
798
807
|
case "time": return /* @__PURE__ */ w(ke, {
|
|
799
808
|
...u,
|
|
800
809
|
onValueChange: (e) => a(Xe(e) ? nt(e, "minute") : null),
|
|
801
|
-
value:
|
|
810
|
+
value: Gn(i),
|
|
802
811
|
...n === void 0 ? {} : { locale: n }
|
|
803
812
|
});
|
|
804
813
|
case "datetime": return /* @__PURE__ */ w(me, {
|
|
805
814
|
...u,
|
|
806
815
|
onValueChange: (e) => a(Ye(e) ? tt(e) : null),
|
|
807
|
-
value:
|
|
816
|
+
value: Kn(i),
|
|
808
817
|
...n === void 0 ? {} : { locale: n }
|
|
809
818
|
});
|
|
810
819
|
case "set": {
|
|
@@ -839,7 +848,7 @@ function Wn(e, t, n) {
|
|
|
839
848
|
}
|
|
840
849
|
//#endregion
|
|
841
850
|
//#region src/data-grid/data-grid-filter.tsx
|
|
842
|
-
var
|
|
851
|
+
var Yn = [
|
|
843
852
|
"text",
|
|
844
853
|
"number",
|
|
845
854
|
"date",
|
|
@@ -848,21 +857,21 @@ var Gn = [
|
|
|
848
857
|
"boolean",
|
|
849
858
|
"set"
|
|
850
859
|
];
|
|
851
|
-
function
|
|
852
|
-
return
|
|
860
|
+
function A(e) {
|
|
861
|
+
return Yn.includes(e.kind) ? e.kind : null;
|
|
853
862
|
}
|
|
854
|
-
function
|
|
855
|
-
return
|
|
863
|
+
function j(e, t) {
|
|
864
|
+
return on(e) === on(t);
|
|
856
865
|
}
|
|
857
|
-
var
|
|
866
|
+
var Xn = [
|
|
858
867
|
"date",
|
|
859
868
|
"time",
|
|
860
869
|
"datetime"
|
|
861
870
|
];
|
|
862
|
-
function
|
|
863
|
-
return
|
|
871
|
+
function Zn(e, t) {
|
|
872
|
+
return nn(t) === 2 && Xn.includes(e);
|
|
864
873
|
}
|
|
865
|
-
function
|
|
874
|
+
function Qn({ kind: e, start: t, end: n, onChange: r, t: i, locale: a, variant: o, autoFocus: s }) {
|
|
866
875
|
let c = {
|
|
867
876
|
size: "sm",
|
|
868
877
|
variant: o,
|
|
@@ -877,16 +886,16 @@ function Xn({ kind: e, start: t, end: n, onChange: r, t: i, locale: a, variant:
|
|
|
877
886
|
...l,
|
|
878
887
|
onValueChange: (e) => r(Xe(e?.start) ? nt(e.start, "minute") : null, Xe(e?.end) ? nt(e.end, "minute") : null),
|
|
879
888
|
value: {
|
|
880
|
-
start:
|
|
881
|
-
end:
|
|
889
|
+
start: Gn(t),
|
|
890
|
+
end: Gn(n)
|
|
882
891
|
}
|
|
883
892
|
}) : e === "datetime" ? /* @__PURE__ */ w(he, {
|
|
884
893
|
...c,
|
|
885
894
|
...l,
|
|
886
895
|
onValueChange: (e) => r(Ye(e?.start) ? tt(e.start) : null, Ye(e?.end) ? tt(e.end) : null),
|
|
887
896
|
value: {
|
|
888
|
-
start:
|
|
889
|
-
end:
|
|
897
|
+
start: Kn(t),
|
|
898
|
+
end: Kn(n)
|
|
890
899
|
}
|
|
891
900
|
}) : /* @__PURE__ */ w(fe, {
|
|
892
901
|
...c,
|
|
@@ -896,12 +905,12 @@ function Xn({ kind: e, start: t, end: n, onChange: r, t: i, locale: a, variant:
|
|
|
896
905
|
},
|
|
897
906
|
onValueChange: (e) => r(Je(e?.start) ? et(e.start) : null, Je(e?.end) ? et(e.end) : null),
|
|
898
907
|
value: {
|
|
899
|
-
start:
|
|
900
|
-
end:
|
|
908
|
+
start: qn(t),
|
|
909
|
+
end: qn(n)
|
|
901
910
|
}
|
|
902
911
|
});
|
|
903
912
|
}
|
|
904
|
-
function
|
|
913
|
+
function $n({ autoFocus: e, column: t, counts: n, kind: r, label: i, t: a, locale: o, onChange: s, onKeyDown: c, placeholder: l, value: u, variant: d }) {
|
|
905
914
|
let f = {
|
|
906
915
|
"aria-label": i,
|
|
907
916
|
size: "sm",
|
|
@@ -921,17 +930,17 @@ function Zn({ autoFocus: e, column: t, counts: n, kind: r, label: i, t: a, local
|
|
|
921
930
|
case "date": return /* @__PURE__ */ w(ue, {
|
|
922
931
|
...f,
|
|
923
932
|
onValueChange: (e) => s(Je(e) ? et(e) : null),
|
|
924
|
-
value:
|
|
933
|
+
value: qn(u)
|
|
925
934
|
});
|
|
926
935
|
case "time": return /* @__PURE__ */ w(Oe, {
|
|
927
936
|
...f,
|
|
928
937
|
onValueChange: (e) => s(Xe(e) ? nt(e, "minute") : null),
|
|
929
|
-
value:
|
|
938
|
+
value: Gn(u)
|
|
930
939
|
});
|
|
931
940
|
case "datetime": return /* @__PURE__ */ w(pe, {
|
|
932
941
|
...f,
|
|
933
942
|
onValueChange: (e) => s(Ye(e) ? tt(e) : null),
|
|
934
|
-
value:
|
|
943
|
+
value: Kn(u)
|
|
935
944
|
});
|
|
936
945
|
case "boolean": return /* @__PURE__ */ T(Ce, {
|
|
937
946
|
fullWidth: !0,
|
|
@@ -999,10 +1008,10 @@ function Zn({ autoFocus: e, column: t, counts: n, kind: r, label: i, t: a, local
|
|
|
999
1008
|
});
|
|
1000
1009
|
}
|
|
1001
1010
|
}
|
|
1002
|
-
function
|
|
1003
|
-
let n = D(), r =
|
|
1011
|
+
function er({ column: e, children: t }) {
|
|
1012
|
+
let n = D(), r = A(e), i = n.filterOpen === e.id && r !== null, a = n.filterOf(e.id), o = n.t, s = S(null), c = y((e) => {
|
|
1004
1013
|
s.current = e;
|
|
1005
|
-
}, []), u = y(() => r ?
|
|
1014
|
+
}, []), u = y(() => r ? Qt(r) : null, [r]), [d, f] = C(a ?? u()), p = S(!1);
|
|
1006
1015
|
if (b(() => {
|
|
1007
1016
|
i && !p.current && f(a ?? u()), p.current = i;
|
|
1008
1017
|
}, [
|
|
@@ -1013,27 +1022,27 @@ function Qn({ column: e, children: t }) {
|
|
|
1013
1022
|
let m = r, h = e.column.label, g = {
|
|
1014
1023
|
join: (e) => o(`filterJoins.${e}`),
|
|
1015
1024
|
operator: (e) => o(`filterOperators.${e}`)
|
|
1016
|
-
}, ee =
|
|
1025
|
+
}, ee = rn(r), re = r === "set" ? 1 : 2, v = d ?? u(), ae = (e) => v.conditions[e] ?? { operator: Xt(r) }, oe = re === 2 && $t(r, ae(0));
|
|
1017
1026
|
function se() {
|
|
1018
1027
|
n.setFilterOpen(null);
|
|
1019
1028
|
}
|
|
1020
1029
|
function ce(t, r) {
|
|
1021
|
-
let i =
|
|
1022
|
-
|
|
1030
|
+
let i = tn(v);
|
|
1031
|
+
j(i, a) || n.setFilter(e.id, i, r, t), n.announce(i ? o("filterApplied", {
|
|
1023
1032
|
column: h,
|
|
1024
|
-
filter:
|
|
1033
|
+
filter: Zt(i, g)
|
|
1025
1034
|
}) : o("filterCleared", { column: h })), se();
|
|
1026
1035
|
}
|
|
1027
1036
|
function le(t) {
|
|
1028
1037
|
f(u()), a && n.setFilter(e.id, null, "clear", t), n.announce(o("filterCleared", { column: h })), se();
|
|
1029
1038
|
}
|
|
1030
1039
|
function ue(e, t) {
|
|
1031
|
-
let n = ae(e), r =
|
|
1040
|
+
let n = ae(e), r = nn(n.operator), i = nn(t), a = {
|
|
1032
1041
|
operator: t,
|
|
1033
1042
|
...i >= 1 && r >= 1 ? { value: n.value } : {},
|
|
1034
1043
|
...i === 2 && r === 2 ? { end: n.end } : {}
|
|
1035
1044
|
};
|
|
1036
|
-
f(
|
|
1045
|
+
f(sn(v, e, a));
|
|
1037
1046
|
}
|
|
1038
1047
|
function de(e, t, n) {
|
|
1039
1048
|
let r = ae(e), i = t === 0 ? {
|
|
@@ -1043,13 +1052,13 @@ function Qn({ column: e, children: t }) {
|
|
|
1043
1052
|
...r,
|
|
1044
1053
|
end: n
|
|
1045
1054
|
};
|
|
1046
|
-
f(
|
|
1055
|
+
f(sn(v, e, i));
|
|
1047
1056
|
}
|
|
1048
1057
|
let fe = (e) => {
|
|
1049
1058
|
e.key === "Enter" && !e.defaultPrevented && (e.preventDefault(), ce(e, "keyboard"));
|
|
1050
1059
|
};
|
|
1051
1060
|
function pe(t) {
|
|
1052
|
-
let r = ae(t), i =
|
|
1061
|
+
let r = ae(t), i = nn(r.operator), a = n.renderFilterOperand;
|
|
1053
1062
|
return /* @__PURE__ */ T("div", {
|
|
1054
1063
|
"data-operands": i,
|
|
1055
1064
|
"data-part": "filter-condition",
|
|
@@ -1060,7 +1069,7 @@ function Qn({ column: e, children: t }) {
|
|
|
1060
1069
|
"data-part-filter-join": "",
|
|
1061
1070
|
children: /* @__PURE__ */ T(Se, {
|
|
1062
1071
|
"aria-label": o("filterJoin"),
|
|
1063
|
-
onValueChange: (e) => f(
|
|
1072
|
+
onValueChange: (e) => f(cn(v, e)),
|
|
1064
1073
|
size: "sm",
|
|
1065
1074
|
value: v.join,
|
|
1066
1075
|
children: [/* @__PURE__ */ w(xe, {
|
|
@@ -1099,13 +1108,13 @@ function Qn({ column: e, children: t }) {
|
|
|
1099
1108
|
"data-kind": m,
|
|
1100
1109
|
"data-part": "filter-operand",
|
|
1101
1110
|
"data-part-filter-operand": "",
|
|
1102
|
-
...i === 2 && !
|
|
1103
|
-
children: i === 0 ? null : !a &&
|
|
1111
|
+
...i === 2 && !Zn(m, r.operator) ? { "data-range": "" } : {},
|
|
1112
|
+
children: i === 0 ? null : !a && Zn(m, r.operator) ? /* @__PURE__ */ w(Qn, {
|
|
1104
1113
|
end: r.end ?? null,
|
|
1105
1114
|
kind: m,
|
|
1106
1115
|
t: o,
|
|
1107
1116
|
locale: n.locale,
|
|
1108
|
-
onChange: (e, n) => f(
|
|
1117
|
+
onChange: (e, n) => f(sn(v, t, {
|
|
1109
1118
|
...r,
|
|
1110
1119
|
value: e,
|
|
1111
1120
|
end: n
|
|
@@ -1121,7 +1130,7 @@ function Qn({ column: e, children: t }) {
|
|
|
1121
1130
|
setValue: (e) => de(t, s, e),
|
|
1122
1131
|
apply: () => ce(null, "keyboard"),
|
|
1123
1132
|
label: c
|
|
1124
|
-
}) }, s) : /* @__PURE__ */ w(
|
|
1133
|
+
}) }, s) : /* @__PURE__ */ w($n, {
|
|
1125
1134
|
column: e,
|
|
1126
1135
|
counts: m === "set" ? n.countsFor(e.id) : void 0,
|
|
1127
1136
|
kind: m,
|
|
@@ -1165,7 +1174,7 @@ function Qn({ column: e, children: t }) {
|
|
|
1165
1174
|
"data-part": "filter-actions",
|
|
1166
1175
|
"data-part-filter-actions": "",
|
|
1167
1176
|
children: [/* @__PURE__ */ w(l, {
|
|
1168
|
-
disabled:
|
|
1177
|
+
disabled: !en(v) && a === null,
|
|
1169
1178
|
onClick: (e) => le(e),
|
|
1170
1179
|
size: "sm",
|
|
1171
1180
|
tone: "secondary",
|
|
@@ -1182,14 +1191,14 @@ function Qn({ column: e, children: t }) {
|
|
|
1182
1191
|
}) }) : null]
|
|
1183
1192
|
});
|
|
1184
1193
|
}
|
|
1185
|
-
function
|
|
1186
|
-
let t = D(),
|
|
1194
|
+
function tr({ column: e }) {
|
|
1195
|
+
let t = D(), n = A(e), r = t.columnIds.indexOf(e.id) + 1, o = {
|
|
1187
1196
|
row: ct,
|
|
1188
1197
|
column: e.id
|
|
1189
|
-
}, l = t.current !== null && t.current.row === ct && t.current.column === e.id, u = t.filterOf(e.id), d = t.t, f = u?.conditions[0] ?? null, [p, m] = C(f?.operator ?? (
|
|
1198
|
+
}, l = t.current !== null && t.current.row === ct && t.current.column === e.id, u = t.filterOf(e.id), d = t.t, f = u?.conditions[0] ?? null, [p, m] = C(f?.operator ?? (n ? Xt(n) : "contains")), [h, g] = C({
|
|
1190
1199
|
value: f?.value ?? null,
|
|
1191
1200
|
end: f?.end ?? null
|
|
1192
|
-
}), _ = S(void 0), ee =
|
|
1201
|
+
}), _ = S(void 0), ee = on(u), te = S(ee);
|
|
1193
1202
|
if (b(() => {
|
|
1194
1203
|
if (te.current === ee) return;
|
|
1195
1204
|
te.current = ee;
|
|
@@ -1201,24 +1210,24 @@ function $n({ column: e }) {
|
|
|
1201
1210
|
value: null,
|
|
1202
1211
|
end: null
|
|
1203
1212
|
});
|
|
1204
|
-
}, [ee, u]), b(() => () => clearTimeout(_.current), []), !
|
|
1205
|
-
...
|
|
1206
|
-
"aria-colindex":
|
|
1213
|
+
}, [ee, u]), b(() => () => clearTimeout(_.current), []), !n || !e.filterable) return /* @__PURE__ */ w("div", {
|
|
1214
|
+
...hn(e),
|
|
1215
|
+
"aria-colindex": r,
|
|
1207
1216
|
"data-part": "filter-cell",
|
|
1208
1217
|
"data-part-filter-cell": "",
|
|
1209
1218
|
role: "gridcell",
|
|
1210
|
-
style:
|
|
1219
|
+
style: mn(e, r),
|
|
1211
1220
|
tabIndex: l ? 0 : -1,
|
|
1212
1221
|
onFocus: (e) => {
|
|
1213
|
-
e.target === e.currentTarget && t.onCellFocus(
|
|
1222
|
+
e.target === e.currentTarget && t.onCellFocus(o);
|
|
1214
1223
|
},
|
|
1215
|
-
onKeyDown: (e) => t.onCellKeyDown(e,
|
|
1216
|
-
onPointerDown: (e) => t.onCellPointerDown(e,
|
|
1224
|
+
onKeyDown: (e) => t.onCellKeyDown(e, o),
|
|
1225
|
+
onPointerDown: (e) => t.onCellPointerDown(e, o),
|
|
1217
1226
|
...l ? { "data-current": "" } : {}
|
|
1218
1227
|
});
|
|
1219
|
-
let ne =
|
|
1228
|
+
let ne = n, re = rn(n), ie = nn(p);
|
|
1220
1229
|
function v(n, r) {
|
|
1221
|
-
let i =
|
|
1230
|
+
let i = tn({
|
|
1222
1231
|
kind: ne,
|
|
1223
1232
|
join: "and",
|
|
1224
1233
|
conditions: [{
|
|
@@ -1227,19 +1236,19 @@ function $n({ column: e }) {
|
|
|
1227
1236
|
end: n.end
|
|
1228
1237
|
}]
|
|
1229
1238
|
});
|
|
1230
|
-
|
|
1239
|
+
j(i, u) || t.setFilter(e.id, i, r, void 0);
|
|
1231
1240
|
}
|
|
1232
|
-
function ae(e,
|
|
1241
|
+
function ae(e, r) {
|
|
1233
1242
|
g(e), clearTimeout(_.current);
|
|
1234
|
-
let
|
|
1243
|
+
let i = () => v({
|
|
1235
1244
|
operator: p,
|
|
1236
1245
|
...e
|
|
1237
1246
|
}, "keyboard");
|
|
1238
|
-
|
|
1247
|
+
r || n !== "text" && n !== "number" ? i() : _.current = setTimeout(i, t.filterDebounce);
|
|
1239
1248
|
}
|
|
1240
1249
|
function oe(e) {
|
|
1241
1250
|
m(e);
|
|
1242
|
-
let t =
|
|
1251
|
+
let t = nn(e), n = {
|
|
1243
1252
|
value: t >= 1 ? h.value : null,
|
|
1244
1253
|
end: t === 2 ? h.end : null
|
|
1245
1254
|
};
|
|
@@ -1255,45 +1264,45 @@ function $n({ column: e }) {
|
|
|
1255
1264
|
}, "keyboard"));
|
|
1256
1265
|
}, ce = d(`filterSymbols.${p}`), le = t.renderFilterOperand;
|
|
1257
1266
|
return /* @__PURE__ */ w("div", {
|
|
1258
|
-
...
|
|
1259
|
-
"aria-colindex":
|
|
1267
|
+
...hn(e),
|
|
1268
|
+
"aria-colindex": r,
|
|
1260
1269
|
"data-part": "filter-cell",
|
|
1261
1270
|
"data-part-filter-cell": "",
|
|
1262
1271
|
role: "gridcell",
|
|
1263
|
-
style:
|
|
1272
|
+
style: mn(e, r),
|
|
1264
1273
|
tabIndex: l ? 0 : -1,
|
|
1265
1274
|
onFocus: (e) => {
|
|
1266
|
-
e.target === e.currentTarget && t.onCellFocus(
|
|
1275
|
+
e.target === e.currentTarget && t.onCellFocus(o);
|
|
1267
1276
|
},
|
|
1268
|
-
onKeyDown: (e) => t.onCellKeyDown(e,
|
|
1269
|
-
onPointerDown: (e) => t.onCellPointerDown(e,
|
|
1277
|
+
onKeyDown: (e) => t.onCellKeyDown(e, o),
|
|
1278
|
+
onPointerDown: (e) => t.onCellPointerDown(e, o),
|
|
1270
1279
|
...u ? { "data-filtered": "" } : {},
|
|
1271
1280
|
...l ? { "data-current": "" } : {},
|
|
1272
1281
|
children: /* @__PURE__ */ T("div", {
|
|
1273
|
-
"data-kind":
|
|
1282
|
+
"data-kind": n,
|
|
1274
1283
|
"data-part": "filter-operand",
|
|
1275
1284
|
"data-part-filter-operand": "",
|
|
1276
|
-
...ie === 2 && !
|
|
1285
|
+
...ie === 2 && !Zn(n, p) ? { "data-range": "" } : {},
|
|
1277
1286
|
children: [/* @__PURE__ */ w("div", {
|
|
1278
1287
|
"data-part": "filter-operator",
|
|
1279
1288
|
"data-part-filter-operator": "",
|
|
1280
|
-
children: /* @__PURE__ */ T(
|
|
1289
|
+
children: /* @__PURE__ */ T(i, {
|
|
1281
1290
|
size: "sm",
|
|
1282
|
-
children: [/* @__PURE__ */ w(
|
|
1291
|
+
children: [/* @__PURE__ */ w(s, { render: (e) => /* @__PURE__ */ w("button", {
|
|
1283
1292
|
...e,
|
|
1284
1293
|
"aria-label": d("filterOperatorChosen", { operator: d(`filterOperators.${p}`) }),
|
|
1285
1294
|
title: d(`filterOperators.${p}`),
|
|
1286
1295
|
tabIndex: -1,
|
|
1287
1296
|
type: "button",
|
|
1288
1297
|
children: ce
|
|
1289
|
-
}) }), /* @__PURE__ */ w(
|
|
1298
|
+
}) }), /* @__PURE__ */ w(c, { children: re.map((e) => /* @__PURE__ */ w(a, {
|
|
1290
1299
|
onSelect: () => oe(e),
|
|
1291
1300
|
children: d(`filterOperators.${e}`)
|
|
1292
1301
|
}, e)) })]
|
|
1293
1302
|
})
|
|
1294
|
-
}), ie === 0 ? null : !le &&
|
|
1303
|
+
}), ie === 0 ? null : !le && Zn(n, p) ? /* @__PURE__ */ w(Qn, {
|
|
1295
1304
|
end: h.end,
|
|
1296
|
-
kind:
|
|
1305
|
+
kind: n,
|
|
1297
1306
|
t: d,
|
|
1298
1307
|
locale: t.locale,
|
|
1299
1308
|
onChange: (e, t) => ae({
|
|
@@ -1302,11 +1311,11 @@ function $n({ column: e }) {
|
|
|
1302
1311
|
}, !0),
|
|
1303
1312
|
start: h.value,
|
|
1304
1313
|
variant: "plain"
|
|
1305
|
-
}) : [0, 1].slice(0, ie).map((
|
|
1306
|
-
let
|
|
1307
|
-
bound:
|
|
1314
|
+
}) : [0, 1].slice(0, ie).map((r) => {
|
|
1315
|
+
let i = ie === 2 ? d("filterRange", {
|
|
1316
|
+
bound: r === 0 ? "from" : "to",
|
|
1308
1317
|
column: e.column.label
|
|
1309
|
-
}) : d("filterColumn", { column: e.column.label }), a =
|
|
1318
|
+
}) : d("filterColumn", { column: e.column.label }), a = r === 0 ? h.value : h.end, o = (e, t = !1) => ae(r === 0 ? {
|
|
1310
1319
|
...h,
|
|
1311
1320
|
value: e
|
|
1312
1321
|
} : {
|
|
@@ -1322,29 +1331,29 @@ function $n({ column: e }) {
|
|
|
1322
1331
|
operator: p,
|
|
1323
1332
|
...h
|
|
1324
1333
|
}, "keyboard"),
|
|
1325
|
-
label:
|
|
1326
|
-
}) },
|
|
1334
|
+
label: i
|
|
1335
|
+
}) }, r) : /* @__PURE__ */ w($n, {
|
|
1327
1336
|
column: e,
|
|
1328
|
-
counts:
|
|
1329
|
-
kind:
|
|
1330
|
-
label:
|
|
1337
|
+
counts: n === "set" ? t.countsFor(e.id) : void 0,
|
|
1338
|
+
kind: n,
|
|
1339
|
+
label: i,
|
|
1331
1340
|
t: d,
|
|
1332
1341
|
locale: t.locale,
|
|
1333
|
-
onChange: (e) => o(e,
|
|
1342
|
+
onChange: (e) => o(e, n !== "text" && n !== "number"),
|
|
1334
1343
|
onKeyDown: se,
|
|
1335
1344
|
operator: p,
|
|
1336
|
-
placeholder: d(ie === 2 ?
|
|
1345
|
+
placeholder: d(ie === 2 ? r === 0 ? "filterFrom" : "filterTo" : "filter"),
|
|
1337
1346
|
value: a,
|
|
1338
1347
|
variant: "plain"
|
|
1339
|
-
},
|
|
1348
|
+
}, r);
|
|
1340
1349
|
})]
|
|
1341
1350
|
})
|
|
1342
1351
|
});
|
|
1343
1352
|
}
|
|
1344
1353
|
//#endregion
|
|
1345
1354
|
//#region src/data-grid/data-grid-header.tsx
|
|
1346
|
-
var
|
|
1347
|
-
function
|
|
1355
|
+
var M = 4;
|
|
1356
|
+
function nr({ columnGroups: e, headerRowCount: t }) {
|
|
1348
1357
|
let n = D(), r = n.columnIds.length - n.resolved.length, i = e !== void 0 && e.length > 0;
|
|
1349
1358
|
return /* @__PURE__ */ T("div", {
|
|
1350
1359
|
"data-part": "head",
|
|
@@ -1356,7 +1365,7 @@ function tr({ columnGroups: e, headerRowCount: t }) {
|
|
|
1356
1365
|
"data-part": "header-row",
|
|
1357
1366
|
"data-part-header-row": "",
|
|
1358
1367
|
role: "row",
|
|
1359
|
-
children:
|
|
1368
|
+
children: rr(n.mountedColumns, e, r)
|
|
1360
1369
|
}) : null,
|
|
1361
1370
|
/* @__PURE__ */ T("div", {
|
|
1362
1371
|
"aria-rowindex": i ? 2 : 1,
|
|
@@ -1365,28 +1374,28 @@ function tr({ columnGroups: e, headerRowCount: t }) {
|
|
|
1365
1374
|
"data-row": ut,
|
|
1366
1375
|
role: "row",
|
|
1367
1376
|
children: [
|
|
1368
|
-
n.columnIds.includes("__selection") ? /* @__PURE__ */ w(
|
|
1377
|
+
n.columnIds.includes("__selection") ? /* @__PURE__ */ w(ir, {}) : null,
|
|
1369
1378
|
n.columnIds.includes("__drag") ? /* @__PURE__ */ w("div", {
|
|
1370
|
-
"aria-colindex": n.columnIds.indexOf(
|
|
1371
|
-
"data-column":
|
|
1379
|
+
"aria-colindex": n.columnIds.indexOf(fn) + 1,
|
|
1380
|
+
"data-column": fn,
|
|
1372
1381
|
"data-part": "column-header",
|
|
1373
1382
|
"data-part-column-header": "",
|
|
1374
1383
|
role: "columnheader",
|
|
1375
|
-
style: { "--slotted-data-grid-column": String(n.columnIds.indexOf(
|
|
1384
|
+
style: { "--slotted-data-grid-column": String(n.columnIds.indexOf(fn) + 1) },
|
|
1376
1385
|
tabIndex: -1,
|
|
1377
1386
|
children: /* @__PURE__ */ w("span", {})
|
|
1378
1387
|
}) : null,
|
|
1379
1388
|
n.columnIds.includes("__expander") ? /* @__PURE__ */ w("div", {
|
|
1380
|
-
"aria-colindex": n.columnIds.indexOf(
|
|
1381
|
-
"data-column":
|
|
1389
|
+
"aria-colindex": n.columnIds.indexOf(dn) + 1,
|
|
1390
|
+
"data-column": dn,
|
|
1382
1391
|
"data-part": "column-header",
|
|
1383
1392
|
"data-part-column-header": "",
|
|
1384
1393
|
role: "columnheader",
|
|
1385
|
-
style: { "--slotted-data-grid-column": String(n.columnIds.indexOf(
|
|
1394
|
+
style: { "--slotted-data-grid-column": String(n.columnIds.indexOf(dn) + 1) },
|
|
1386
1395
|
tabIndex: -1,
|
|
1387
1396
|
children: /* @__PURE__ */ w("span", {})
|
|
1388
1397
|
}) : null,
|
|
1389
|
-
n.mountedColumns.map((e) => /* @__PURE__ */ w(
|
|
1398
|
+
n.mountedColumns.map((e) => /* @__PURE__ */ w(ar, { column: e }, e.id)),
|
|
1390
1399
|
n.popinColumns.length > 0 ? /* @__PURE__ */ w("div", {
|
|
1391
1400
|
"aria-colindex": n.popinIndex,
|
|
1392
1401
|
"data-column": dt,
|
|
@@ -1406,35 +1415,35 @@ function tr({ columnGroups: e, headerRowCount: t }) {
|
|
|
1406
1415
|
children: [
|
|
1407
1416
|
n.columnIds.includes("__selection") ? /* @__PURE__ */ w("div", {
|
|
1408
1417
|
"aria-colindex": 1,
|
|
1409
|
-
"data-column":
|
|
1418
|
+
"data-column": un,
|
|
1410
1419
|
"data-part": "filter-cell",
|
|
1411
1420
|
"data-part-filter-cell": "",
|
|
1412
1421
|
role: "gridcell",
|
|
1413
1422
|
tabIndex: -1
|
|
1414
1423
|
}) : null,
|
|
1415
1424
|
n.columnIds.includes("__drag") ? /* @__PURE__ */ w("div", {
|
|
1416
|
-
"aria-colindex": n.columnIds.indexOf(
|
|
1417
|
-
"data-column":
|
|
1425
|
+
"aria-colindex": n.columnIds.indexOf(fn) + 1,
|
|
1426
|
+
"data-column": fn,
|
|
1418
1427
|
"data-part": "filter-cell",
|
|
1419
1428
|
"data-part-filter-cell": "",
|
|
1420
1429
|
role: "gridcell",
|
|
1421
1430
|
tabIndex: -1
|
|
1422
1431
|
}) : null,
|
|
1423
1432
|
n.columnIds.includes("__expander") ? /* @__PURE__ */ w("div", {
|
|
1424
|
-
"aria-colindex": n.columnIds.indexOf(
|
|
1425
|
-
"data-column":
|
|
1433
|
+
"aria-colindex": n.columnIds.indexOf(dn) + 1,
|
|
1434
|
+
"data-column": dn,
|
|
1426
1435
|
"data-part": "filter-cell",
|
|
1427
1436
|
"data-part-filter-cell": "",
|
|
1428
1437
|
role: "gridcell",
|
|
1429
1438
|
tabIndex: -1
|
|
1430
1439
|
}) : null,
|
|
1431
|
-
n.mountedColumns.map((e) => /* @__PURE__ */ w(
|
|
1440
|
+
n.mountedColumns.map((e) => /* @__PURE__ */ w(tr, { column: e }, e.id))
|
|
1432
1441
|
]
|
|
1433
1442
|
}) : null
|
|
1434
1443
|
]
|
|
1435
1444
|
});
|
|
1436
1445
|
}
|
|
1437
|
-
function
|
|
1446
|
+
function rr(e, t, n) {
|
|
1438
1447
|
let r = [], i = 0;
|
|
1439
1448
|
for (; i < e.length;) {
|
|
1440
1449
|
let a = e[i], o = t.find((e) => e.columns.includes(a.id)), s = 1;
|
|
@@ -1454,14 +1463,14 @@ function N(e, t, n) {
|
|
|
1454
1463
|
}
|
|
1455
1464
|
return r;
|
|
1456
1465
|
}
|
|
1457
|
-
function
|
|
1466
|
+
function ir() {
|
|
1458
1467
|
let e = D(), t = {
|
|
1459
1468
|
row: ut,
|
|
1460
|
-
column:
|
|
1469
|
+
column: un
|
|
1461
1470
|
}, n = e.current !== null && e.current.row === ut && e.current.column === "__selection", r = e.t(e.total !== null && e.total > e.selectableCount ? "selectAllPage" : "selectAllFiltered", { count: e.selectableCount });
|
|
1462
1471
|
return /* @__PURE__ */ w("div", {
|
|
1463
1472
|
"aria-colindex": 1,
|
|
1464
|
-
"data-column":
|
|
1473
|
+
"data-column": un,
|
|
1465
1474
|
"data-part": "selection",
|
|
1466
1475
|
"data-part-selection": "",
|
|
1467
1476
|
role: "gridcell",
|
|
@@ -1480,51 +1489,51 @@ function nr() {
|
|
|
1480
1489
|
}) : null
|
|
1481
1490
|
});
|
|
1482
1491
|
}
|
|
1483
|
-
function
|
|
1484
|
-
let
|
|
1492
|
+
function ar({ column: e }) {
|
|
1493
|
+
let t = D(), i = {
|
|
1485
1494
|
row: ut,
|
|
1486
|
-
column:
|
|
1487
|
-
}, a =
|
|
1495
|
+
column: e.id
|
|
1496
|
+
}, a = t.columnIds.indexOf(e.id) + 1, o = t.current !== null && t.current.row === ut && t.current.column === e.id, s = t.sortOf(e.id), c = t.filterOf(e.id) !== null, l = t.query.sort.length > 1, u = t.menuOpen === e.id, d = t.attachDraggable, f = S(() => void 0), p = S(null), m = y((e) => {
|
|
1488
1497
|
p.current = e, f.current(e);
|
|
1489
1498
|
}, []);
|
|
1490
|
-
b(() => (d(p.current,
|
|
1491
|
-
let h =
|
|
1492
|
-
column:
|
|
1493
|
-
resolved:
|
|
1499
|
+
b(() => (d(p.current, e.id), () => d(null, e.id)), [d, e.id]);
|
|
1500
|
+
let h = e.column.description, g = `${t.id}-description-${e.id}`, _ = e.column.help, ee = t.renderHeaderContent ? t.renderHeaderContent({
|
|
1501
|
+
column: e.column,
|
|
1502
|
+
resolved: e,
|
|
1494
1503
|
sorted: s?.direction ?? null,
|
|
1495
1504
|
sortIndex: s?.index ?? null,
|
|
1496
1505
|
filtered: c
|
|
1497
|
-
}) :
|
|
1498
|
-
return /* @__PURE__ */ w(
|
|
1499
|
-
column:
|
|
1506
|
+
}) : e.column.label;
|
|
1507
|
+
return /* @__PURE__ */ w(er, {
|
|
1508
|
+
column: e,
|
|
1500
1509
|
children: (d) => (f.current = d, /* @__PURE__ */ T("div", {
|
|
1501
|
-
...
|
|
1510
|
+
...hn(e),
|
|
1502
1511
|
"aria-colindex": a,
|
|
1503
1512
|
"aria-describedby": h ? g : void 0,
|
|
1504
1513
|
"aria-sort": s && s.index === 1 ? s.direction : void 0,
|
|
1505
1514
|
"data-part": "column-header",
|
|
1506
1515
|
"data-part-column-header": "",
|
|
1507
1516
|
role: "columnheader",
|
|
1508
|
-
style:
|
|
1509
|
-
tabIndex: o || E(i,
|
|
1510
|
-
onClick: (e) =>
|
|
1511
|
-
onContextMenu: (
|
|
1517
|
+
style: mn(e, a),
|
|
1518
|
+
tabIndex: o || E(i, t.tabStop) ? 0 : -1,
|
|
1519
|
+
onClick: (e) => t.onCellClick(e, i),
|
|
1520
|
+
onContextMenu: (n) => t.onHeaderContextMenu(n, e.id),
|
|
1512
1521
|
onFocus: (e) => {
|
|
1513
|
-
e.target === e.currentTarget &&
|
|
1522
|
+
e.target === e.currentTarget && t.onCellFocus(i);
|
|
1514
1523
|
},
|
|
1515
|
-
onKeyDown: (e) =>
|
|
1516
|
-
onPointerDown: (e) =>
|
|
1524
|
+
onKeyDown: (e) => t.onCellKeyDown(e, i),
|
|
1525
|
+
onPointerDown: (e) => t.onCellPointerDown(e, i),
|
|
1517
1526
|
ref: m,
|
|
1518
|
-
...
|
|
1527
|
+
...e.sortable ? { "data-sortable": "" } : {},
|
|
1519
1528
|
...s ? { "data-sorted": s.direction } : {},
|
|
1520
1529
|
...c ? { "data-filtered": "" } : {},
|
|
1521
1530
|
...o ? { "data-current": "" } : {},
|
|
1522
|
-
...
|
|
1523
|
-
...
|
|
1524
|
-
...
|
|
1531
|
+
...t.dragging === e.id ? { "data-dragging": "" } : {},
|
|
1532
|
+
...t.dropTarget === e.id ? { "data-drop-target": "" } : {},
|
|
1533
|
+
...t.resizing === e.id ? { "data-resizing": "" } : {},
|
|
1525
1534
|
children: [
|
|
1526
|
-
/* @__PURE__ */ w(
|
|
1527
|
-
label:
|
|
1535
|
+
/* @__PURE__ */ w(or, {
|
|
1536
|
+
label: e.column.label,
|
|
1528
1537
|
children: ee
|
|
1529
1538
|
}),
|
|
1530
1539
|
s ? /* @__PURE__ */ w("span", {
|
|
@@ -1532,7 +1541,7 @@ function P({ column: n }) {
|
|
|
1532
1541
|
"data-part": "sort",
|
|
1533
1542
|
"data-part-sort": "",
|
|
1534
1543
|
...l ? { "data-index": String(s.index) } : {},
|
|
1535
|
-
children: /* @__PURE__ */ w(
|
|
1544
|
+
children: /* @__PURE__ */ w(r, { children: /* @__PURE__ */ w(n, { name: "chevron-down" }) })
|
|
1536
1545
|
}) : null,
|
|
1537
1546
|
h ? /* @__PURE__ */ w("span", {
|
|
1538
1547
|
"aria-hidden": "true",
|
|
@@ -1545,28 +1554,28 @@ function P({ column: n }) {
|
|
|
1545
1554
|
"data-part": "column-actions",
|
|
1546
1555
|
"data-part-column-actions": "",
|
|
1547
1556
|
children: [
|
|
1548
|
-
h || _ !== void 0 ? /* @__PURE__ */ w(
|
|
1549
|
-
column:
|
|
1557
|
+
h || _ !== void 0 ? /* @__PURE__ */ w(sr, {
|
|
1558
|
+
column: e,
|
|
1550
1559
|
description: h,
|
|
1551
1560
|
help: _
|
|
1552
1561
|
}) : null,
|
|
1553
|
-
|
|
1554
|
-
column:
|
|
1562
|
+
e.filterable ? /* @__PURE__ */ w(cr, {
|
|
1563
|
+
column: e,
|
|
1555
1564
|
filtered: c
|
|
1556
1565
|
}) : null,
|
|
1557
|
-
/* @__PURE__ */ w(
|
|
1558
|
-
column:
|
|
1566
|
+
/* @__PURE__ */ w(lr, {
|
|
1567
|
+
column: e,
|
|
1559
1568
|
descriptionId: h ? g : void 0,
|
|
1560
1569
|
open: u
|
|
1561
1570
|
})
|
|
1562
1571
|
]
|
|
1563
1572
|
}),
|
|
1564
|
-
|
|
1573
|
+
e.resizable ? /* @__PURE__ */ w(ur, { column: e }) : null
|
|
1565
1574
|
]
|
|
1566
1575
|
}))
|
|
1567
1576
|
});
|
|
1568
1577
|
}
|
|
1569
|
-
function
|
|
1578
|
+
function or({ children: e, label: t }) {
|
|
1570
1579
|
return /* @__PURE__ */ T(u, {
|
|
1571
1580
|
describes: "none",
|
|
1572
1581
|
openOn: "hover",
|
|
@@ -1578,127 +1587,127 @@ function rr({ children: e, label: t }) {
|
|
|
1578
1587
|
}), /* @__PURE__ */ w(p, { children: /* @__PURE__ */ w(f, { children: t }) })]
|
|
1579
1588
|
});
|
|
1580
1589
|
}
|
|
1581
|
-
function
|
|
1582
|
-
let a = D().t("columnHelp", { column:
|
|
1590
|
+
function sr({ column: e, description: t, help: i }) {
|
|
1591
|
+
let a = D().t("columnHelp", { column: e.column.label });
|
|
1583
1592
|
return /* @__PURE__ */ T(te, {
|
|
1584
1593
|
align: "start",
|
|
1585
1594
|
side: "bottom",
|
|
1586
1595
|
size: "sm",
|
|
1587
|
-
children: [/* @__PURE__ */ w(ee, { render: (
|
|
1588
|
-
...Me(
|
|
1596
|
+
children: [/* @__PURE__ */ w(ee, { render: (e) => /* @__PURE__ */ w("button", {
|
|
1597
|
+
...Me(e, "part", "column-help"),
|
|
1589
1598
|
"aria-label": a,
|
|
1590
|
-
onClick: (
|
|
1591
|
-
|
|
1599
|
+
onClick: (t) => {
|
|
1600
|
+
t.stopPropagation(), e.onClick?.(t);
|
|
1592
1601
|
},
|
|
1593
1602
|
onPointerDown: (e) => e.stopPropagation(),
|
|
1594
1603
|
tabIndex: -1,
|
|
1595
1604
|
type: "button",
|
|
1596
|
-
children: /* @__PURE__ */ w(
|
|
1605
|
+
children: /* @__PURE__ */ w(r, { children: /* @__PURE__ */ w(n, { name: "circle-question" }) })
|
|
1597
1606
|
}) }), /* @__PURE__ */ w(ne, { children: /* @__PURE__ */ w(_, {
|
|
1598
1607
|
"aria-label": a,
|
|
1599
|
-
children: /* @__PURE__ */ T(re, { children: [
|
|
1608
|
+
children: /* @__PURE__ */ T(re, { children: [t ? /* @__PURE__ */ w("div", { children: t }) : null, i] })
|
|
1600
1609
|
}) })]
|
|
1601
1610
|
});
|
|
1602
1611
|
}
|
|
1603
|
-
function
|
|
1604
|
-
let i = D(), a = i.filterOpen ===
|
|
1605
|
-
return !
|
|
1612
|
+
function cr({ column: e, filtered: t }) {
|
|
1613
|
+
let i = D(), a = i.filterOpen === e.id;
|
|
1614
|
+
return !t && !a ? null : /* @__PURE__ */ w("button", {
|
|
1606
1615
|
"aria-expanded": a,
|
|
1607
1616
|
"aria-haspopup": "dialog",
|
|
1608
|
-
"aria-label": i.t("filterColumn", { column:
|
|
1617
|
+
"aria-label": i.t("filterColumn", { column: e.column.label }),
|
|
1609
1618
|
"data-part": "filter",
|
|
1610
1619
|
"data-part-filter": "",
|
|
1611
|
-
onClick: (
|
|
1612
|
-
|
|
1620
|
+
onClick: (t) => {
|
|
1621
|
+
t.stopPropagation(), i.setFilterOpen(a ? null : e.id);
|
|
1613
1622
|
},
|
|
1614
1623
|
onPointerDown: (e) => e.stopPropagation(),
|
|
1615
1624
|
tabIndex: -1,
|
|
1616
1625
|
type: "button",
|
|
1617
|
-
...
|
|
1626
|
+
...t ? { "data-filtered": "" } : {},
|
|
1618
1627
|
...a ? { "data-open": "" } : {},
|
|
1619
|
-
children: /* @__PURE__ */ w(
|
|
1628
|
+
children: /* @__PURE__ */ w(r, { children: /* @__PURE__ */ w(n, { name: "funnel" }) })
|
|
1620
1629
|
});
|
|
1621
1630
|
}
|
|
1622
|
-
function
|
|
1623
|
-
let u = D(), d = u.t, f = u.sortOf(
|
|
1624
|
-
return /* @__PURE__ */ T(
|
|
1631
|
+
function lr({ column: e, descriptionId: t, open: l }) {
|
|
1632
|
+
let u = D(), d = u.t, f = u.sortOf(e.id), p = e.column.label, m = u.menuAnchor !== null && u.menuAnchor.column === e.id;
|
|
1633
|
+
return /* @__PURE__ */ T(i, {
|
|
1625
1634
|
anchor: m ? u.menuAnchor.anchor : null,
|
|
1626
1635
|
finalFocus: m ? u.menuAnchor.returnTo : void 0,
|
|
1627
|
-
onOpenChange: (
|
|
1636
|
+
onOpenChange: (t) => u.setMenuOpen(t ? e.id : null),
|
|
1628
1637
|
open: l,
|
|
1629
|
-
sideOffset:
|
|
1638
|
+
sideOffset: M,
|
|
1630
1639
|
size: "sm",
|
|
1631
|
-
children: [/* @__PURE__ */ w(
|
|
1632
|
-
...Me(
|
|
1640
|
+
children: [/* @__PURE__ */ w(s, { render: (e) => /* @__PURE__ */ w("button", {
|
|
1641
|
+
...Me(e, "part", "column-menu"),
|
|
1633
1642
|
"aria-label": d("columnMenu", { column: p }),
|
|
1634
|
-
onPointerDown: (
|
|
1635
|
-
|
|
1643
|
+
onPointerDown: (t) => {
|
|
1644
|
+
t.stopPropagation(), e.onPointerDown?.(t);
|
|
1636
1645
|
},
|
|
1637
|
-
onClick: (
|
|
1638
|
-
|
|
1646
|
+
onClick: (t) => {
|
|
1647
|
+
t.stopPropagation(), u.anchorToButton(), e.onClick?.(t);
|
|
1639
1648
|
},
|
|
1640
1649
|
tabIndex: -1,
|
|
1641
1650
|
type: "button",
|
|
1642
1651
|
...l ? { "data-open": "" } : {},
|
|
1643
|
-
children: /* @__PURE__ */ w(
|
|
1644
|
-
}) }), /* @__PURE__ */ T(
|
|
1645
|
-
"aria-describedby":
|
|
1652
|
+
children: /* @__PURE__ */ w(r, { children: /* @__PURE__ */ w(n, { name: "ellipsis" }) })
|
|
1653
|
+
}) }), /* @__PURE__ */ T(c, {
|
|
1654
|
+
"aria-describedby": t,
|
|
1646
1655
|
children: [
|
|
1647
|
-
|
|
1656
|
+
e.column.description ? /* @__PURE__ */ w("div", {
|
|
1648
1657
|
"aria-hidden": !0,
|
|
1649
1658
|
"data-part": "column-menu-description",
|
|
1650
1659
|
"data-part-column-menu-description": "",
|
|
1651
|
-
children:
|
|
1660
|
+
children: e.column.description
|
|
1652
1661
|
}) : null,
|
|
1653
|
-
|
|
1654
|
-
/* @__PURE__ */ w(
|
|
1662
|
+
e.sortable ? /* @__PURE__ */ T(He, { children: [
|
|
1663
|
+
/* @__PURE__ */ w(a, {
|
|
1655
1664
|
disabled: f?.direction === "ascending" && f.index === 1 && u.query.sort.length === 1,
|
|
1656
|
-
onSelect: (
|
|
1665
|
+
onSelect: (t) => u.setSort(e.id, "ascending", t),
|
|
1657
1666
|
children: d("sortAscendingAction")
|
|
1658
1667
|
}),
|
|
1659
|
-
/* @__PURE__ */ w(
|
|
1668
|
+
/* @__PURE__ */ w(a, {
|
|
1660
1669
|
disabled: f?.direction === "descending" && f.index === 1 && u.query.sort.length === 1,
|
|
1661
|
-
onSelect: (
|
|
1670
|
+
onSelect: (t) => u.setSort(e.id, "descending", t),
|
|
1662
1671
|
children: d("sortDescendingAction")
|
|
1663
1672
|
}),
|
|
1664
|
-
/* @__PURE__ */ w(
|
|
1673
|
+
/* @__PURE__ */ w(a, {
|
|
1665
1674
|
disabled: f === null,
|
|
1666
|
-
onSelect: (
|
|
1675
|
+
onSelect: (t) => u.setSort(e.id, null, t),
|
|
1667
1676
|
children: d("sortClearAction")
|
|
1668
1677
|
}),
|
|
1669
|
-
/* @__PURE__ */ w(
|
|
1678
|
+
/* @__PURE__ */ w(o, {})
|
|
1670
1679
|
] }) : null,
|
|
1671
|
-
|
|
1672
|
-
onSelect: () => u.setFilterOpen(
|
|
1680
|
+
e.filterable ? /* @__PURE__ */ w(a, {
|
|
1681
|
+
onSelect: () => u.setFilterOpen(e.id),
|
|
1673
1682
|
children: d("filterMenu")
|
|
1674
1683
|
}) : null,
|
|
1675
|
-
/* @__PURE__ */ w(
|
|
1676
|
-
disabled:
|
|
1677
|
-
onSelect: (
|
|
1684
|
+
/* @__PURE__ */ w(a, {
|
|
1685
|
+
disabled: e.pinned === "start",
|
|
1686
|
+
onSelect: (t) => u.pin(e.id, "start", t),
|
|
1678
1687
|
children: d("pinStart")
|
|
1679
1688
|
}),
|
|
1680
|
-
/* @__PURE__ */ w(
|
|
1681
|
-
disabled:
|
|
1682
|
-
onSelect: (
|
|
1689
|
+
/* @__PURE__ */ w(a, {
|
|
1690
|
+
disabled: e.pinned === "end",
|
|
1691
|
+
onSelect: (t) => u.pin(e.id, "end", t),
|
|
1683
1692
|
children: d("pinEnd")
|
|
1684
1693
|
}),
|
|
1685
|
-
|
|
1686
|
-
onSelect: (
|
|
1694
|
+
e.pinned ? /* @__PURE__ */ w(a, {
|
|
1695
|
+
onSelect: (t) => u.pin(e.id, null, t),
|
|
1687
1696
|
children: d("unpin")
|
|
1688
1697
|
}) : null,
|
|
1689
|
-
/* @__PURE__ */ w(
|
|
1690
|
-
|
|
1691
|
-
onSelect: (
|
|
1698
|
+
/* @__PURE__ */ w(o, {}),
|
|
1699
|
+
e.resizable ? /* @__PURE__ */ T(He, { children: [/* @__PURE__ */ w(a, {
|
|
1700
|
+
onSelect: (t) => u.autofit(e.id, t.reason, t),
|
|
1692
1701
|
children: d("autofit")
|
|
1693
|
-
}), /* @__PURE__ */ w(
|
|
1702
|
+
}), /* @__PURE__ */ w(a, {
|
|
1694
1703
|
onSelect: (e) => u.autofit(null, e.reason, e),
|
|
1695
1704
|
children: d("autofitAll")
|
|
1696
1705
|
})] }) : null,
|
|
1697
|
-
|
|
1698
|
-
onSelect: (
|
|
1706
|
+
e.hideable ? /* @__PURE__ */ w(a, {
|
|
1707
|
+
onSelect: (t) => u.hide(e.id, t, t.reason),
|
|
1699
1708
|
children: d("hide")
|
|
1700
1709
|
}) : null,
|
|
1701
|
-
u.onManageColumns ? /* @__PURE__ */ w(
|
|
1710
|
+
u.onManageColumns ? /* @__PURE__ */ w(a, {
|
|
1702
1711
|
onSelect: () => u.onManageColumns?.(),
|
|
1703
1712
|
children: d("manageColumns")
|
|
1704
1713
|
}) : null
|
|
@@ -1706,35 +1715,41 @@ function or({ column: s, descriptionId: c, open: l }) {
|
|
|
1706
1715
|
})]
|
|
1707
1716
|
});
|
|
1708
1717
|
}
|
|
1709
|
-
function
|
|
1718
|
+
function ur({ column: e }) {
|
|
1710
1719
|
let t = D(), [n, r] = C(null), i = S(n);
|
|
1711
|
-
i.current = n
|
|
1720
|
+
i.current = n;
|
|
1721
|
+
let a = S(null), o = S(null);
|
|
1722
|
+
b(() => {
|
|
1712
1723
|
if (!n) return;
|
|
1713
|
-
let
|
|
1714
|
-
|
|
1724
|
+
let e = (e) => {
|
|
1725
|
+
e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), o.current = null, r(null), t.setResizing(null));
|
|
1715
1726
|
};
|
|
1716
|
-
return document.addEventListener("keydown",
|
|
1727
|
+
return document.addEventListener("keydown", e, !0), () => document.removeEventListener("keydown", e, !0);
|
|
1717
1728
|
}, [
|
|
1718
1729
|
n,
|
|
1719
1730
|
t,
|
|
1720
1731
|
e.id
|
|
1721
1732
|
]);
|
|
1722
|
-
let
|
|
1733
|
+
let s = (n) => {
|
|
1723
1734
|
if (n.button !== 0) return;
|
|
1724
1735
|
n.preventDefault(), n.stopPropagation(), n.currentTarget.setPointerCapture(n.pointerId);
|
|
1725
|
-
let i = getComputedStyle(n.currentTarget).direction === "rtl", a = n.currentTarget.closest("[data-part=\"column-header\"]");
|
|
1726
|
-
r({
|
|
1736
|
+
let i = getComputedStyle(n.currentTarget).direction === "rtl", a = n.currentTarget.closest("[data-part=\"column-header\"]"), s = n.currentTarget.closest("[data-part=\"scroll\"]");
|
|
1737
|
+
o.current = null, r({
|
|
1727
1738
|
startX: n.clientX,
|
|
1728
1739
|
startWidth: a ? Math.round(a.getBoundingClientRect().width) : e.width,
|
|
1729
|
-
rtl: i
|
|
1740
|
+
rtl: i,
|
|
1741
|
+
span: s?.clientHeight ?? 0
|
|
1730
1742
|
}), t.setResizing(e.id);
|
|
1731
|
-
},
|
|
1732
|
-
let
|
|
1733
|
-
if (!
|
|
1734
|
-
let
|
|
1735
|
-
|
|
1736
|
-
},
|
|
1737
|
-
i.current
|
|
1743
|
+
}, c = (t) => {
|
|
1744
|
+
let n = i.current;
|
|
1745
|
+
if (!n) return;
|
|
1746
|
+
let r = (t.clientX - n.startX) * (n.rtl ? -1 : 1), s = _t(e.column, n.startWidth + r);
|
|
1747
|
+
o.current = s, a.current?.style.setProperty("translate", `${String((s - n.startWidth) * (n.rtl ? -1 : 1))}px 0`);
|
|
1748
|
+
}, l = (n) => {
|
|
1749
|
+
if (!i.current) return;
|
|
1750
|
+
n.currentTarget.releasePointerCapture(n.pointerId);
|
|
1751
|
+
let a = o.current;
|
|
1752
|
+
o.current = null, r(null), t.setResizing(null), a !== null && n.type === "pointerup" && t.resizeTo(e.id, a, "pointer", n);
|
|
1738
1753
|
};
|
|
1739
1754
|
return /* @__PURE__ */ w("div", {
|
|
1740
1755
|
"aria-hidden": !0,
|
|
@@ -1744,17 +1759,24 @@ function sr({ column: e }) {
|
|
|
1744
1759
|
onDoubleClick: (n) => {
|
|
1745
1760
|
n.stopPropagation(), t.autofit(n.shiftKey ? null : e.id, "pointer", n);
|
|
1746
1761
|
},
|
|
1747
|
-
onPointerCancel:
|
|
1748
|
-
onPointerDown:
|
|
1749
|
-
onPointerMove:
|
|
1750
|
-
onPointerUp:
|
|
1762
|
+
onPointerCancel: l,
|
|
1763
|
+
onPointerDown: s,
|
|
1764
|
+
onPointerMove: c,
|
|
1765
|
+
onPointerUp: l,
|
|
1751
1766
|
title: t.t("resize"),
|
|
1752
|
-
...n ? { "data-resizing": "" } : {}
|
|
1767
|
+
...n ? { "data-resizing": "" } : {},
|
|
1768
|
+
children: n ? /* @__PURE__ */ w("div", {
|
|
1769
|
+
"aria-hidden": !0,
|
|
1770
|
+
"data-part": "resize-guide",
|
|
1771
|
+
"data-part-resize-guide": "",
|
|
1772
|
+
ref: a,
|
|
1773
|
+
style: { blockSize: n.span }
|
|
1774
|
+
}) : null
|
|
1753
1775
|
});
|
|
1754
1776
|
}
|
|
1755
1777
|
//#endregion
|
|
1756
1778
|
//#region src/data-grid/use-model.ts
|
|
1757
|
-
function
|
|
1779
|
+
function dr(e, t, n, r = Object.is) {
|
|
1758
1780
|
let [i, a] = C(t), o = e === void 0 ? i : e, s = S({
|
|
1759
1781
|
controlled: e,
|
|
1760
1782
|
value: o,
|
|
@@ -1778,31 +1800,37 @@ function cr(e, t, n, r = Object.is) {
|
|
|
1778
1800
|
}
|
|
1779
1801
|
//#endregion
|
|
1780
1802
|
//#region src/data-grid/data-grid.tsx
|
|
1781
|
-
var
|
|
1803
|
+
var fr = 34, pr = 100, mr = 20, hr = 600, gr = 400, _r = {
|
|
1782
1804
|
popin: [],
|
|
1783
1805
|
hidden: []
|
|
1784
|
-
},
|
|
1785
|
-
function
|
|
1806
|
+
}, vr = "input, textarea, select, [contenteditable]:not([contenteditable=\"false\"])", yr = 300, br = 500;
|
|
1807
|
+
function xr(e) {
|
|
1808
|
+
let t = S(e);
|
|
1809
|
+
t.current = e;
|
|
1810
|
+
let n = e !== void 0;
|
|
1811
|
+
return x(() => n ? (...e) => t.current(...e) : void 0, [n]);
|
|
1812
|
+
}
|
|
1813
|
+
function Sr(e, t) {
|
|
1786
1814
|
let n = new DOMRect(e, t, 0, 0);
|
|
1787
1815
|
return { getBoundingClientRect: () => n };
|
|
1788
1816
|
}
|
|
1789
|
-
function
|
|
1817
|
+
function Cr(e, t) {
|
|
1790
1818
|
return JSON.stringify(e) === JSON.stringify(t);
|
|
1791
1819
|
}
|
|
1792
|
-
function
|
|
1820
|
+
function wr(e, t) {
|
|
1793
1821
|
return JSON.stringify(e) === JSON.stringify(t);
|
|
1794
1822
|
}
|
|
1795
|
-
function
|
|
1823
|
+
function Tr(e, t) {
|
|
1796
1824
|
return e === "all" || t === "all" ? e === t : e.length === t.length && e.every((e, n) => e === t[n]);
|
|
1797
1825
|
}
|
|
1798
|
-
function
|
|
1826
|
+
function Er(e, t) {
|
|
1799
1827
|
return !e || !t ? e === t : E(e.anchor, t.anchor) && E(e.focus, t.focus);
|
|
1800
1828
|
}
|
|
1801
|
-
function
|
|
1802
|
-
return Array.isArray(e) && Array.isArray(t) ?
|
|
1829
|
+
function Dr(e, t) {
|
|
1830
|
+
return Array.isArray(e) && Array.isArray(t) ? Tr(e, t) : e === t;
|
|
1803
1831
|
}
|
|
1804
|
-
var
|
|
1805
|
-
function
|
|
1832
|
+
var Or = [];
|
|
1833
|
+
function kr(e) {
|
|
1806
1834
|
let t = getComputedStyle(e), n = e.offsetWidth - e.clientWidth + parseFloat(t.paddingInlineStart) + parseFloat(t.paddingInlineEnd), r = parseFloat(t.columnGap) || 0, i = 0, a = 0;
|
|
1807
1835
|
for (let t of e.children) if (t instanceof HTMLElement && getComputedStyle(t).display !== "none" && t.dataset.part !== "column-description") {
|
|
1808
1836
|
if (a += 1, a === 1 && t.dataset.ui === void 0) {
|
|
@@ -1812,69 +1840,87 @@ function Tr(e) {
|
|
|
1812
1840
|
}
|
|
1813
1841
|
return i + Math.max(0, a - 1) * r + n;
|
|
1814
1842
|
}
|
|
1815
|
-
function
|
|
1816
|
-
let
|
|
1843
|
+
function Ar({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow: a, dataSource: o, columnState: s, columns: c, current: u, density: d, defaultColumnState: f, defaultCurrent: p, defaultExpanded: m, defaultExpandedGroups: h, defaultQuery: g, defaultRange: _, defaultValue: ee, disabledKeys: te, editMode: ne, editorRenderers: re, error: ie, expandable: v, expanded: ue, expandedGroups: de, filterDebounce: fe, filterRow: pe, footer: me, handle: he, hasMore: ge, height: _e, highlightChanges: ve, labelledBy: ye, loadMoreThreshold: be, loadMoreTrigger: xe, loadMoreFailed: Se, loading: Ce, locale: we, messages: Te, mode: Ee, onActivate: De, onColumnStateChange: Oe, onCurrentChange: ke, onEditCancel: Ae, onEditCommit: je, onEditStart: Me, onExpandedChange: Ne, onExpandedGroupsChange: Pe, onLoadChildren: Fe, onRowsReorder: Ie, onKeyDown: Le, onLoadMore: Ve, onManageColumns: He, onOutOfSpaceChange: Je, onQueryChange: Ye, onRangeChange: Xe, onRetry: Ze, onValueChange: Qe, overscan: $e, pinnedRows: et, pageSizes: tt, query: nt, range: _t, ref: xt, renderCell: Dt, renderDetail: Ft, renderEditor: It, renderEmpty: Xt, renderFilterOperand: Zt, renderGroup: Qt, renderHeader: $t, rowHeight: en, rowKey: tn, rowsReorderable: nn, rows: rn, selectionMode: on, showRange: sn, skeletonRows: cn, stickyHeader: mn, stickyTo: hn, striped: D, style: yn, timeZone: bn, totalCount: Sn, tree: Cn, value: wn, variant: En, virtualize: An, ...jn }) {
|
|
1844
|
+
let O = Bn(), Mn = Re(), k = S(null), Nn = S(null), Pn = S({
|
|
1845
|
+
cellRenderers: r,
|
|
1846
|
+
editorRenderers: re,
|
|
1847
|
+
tree: Cn
|
|
1848
|
+
});
|
|
1849
|
+
Pn.current = {
|
|
1850
|
+
cellRenderers: r,
|
|
1851
|
+
editorRenderers: re,
|
|
1852
|
+
tree: Cn
|
|
1853
|
+
};
|
|
1854
|
+
let Fn = xr(Dt), Rn = xr(Ft), zn = xr(It), Vn = xr(Qt), Hn = xr($t), Gn = r ? Object.keys(r).join() : null, Kn = re ? Object.keys(re).join() : null, qn = Cn?.column, Yn = Cn?.hasChildren !== void 0, A = x(() => Cn === void 0 ? void 0 : {
|
|
1855
|
+
column: qn,
|
|
1856
|
+
parentKey: (e) => Pn.current.tree.parentKey(e),
|
|
1857
|
+
hasChildren: Yn ? (e) => Pn.current.tree.hasChildren?.(e) === !0 : void 0
|
|
1858
|
+
}, [
|
|
1859
|
+
Cn === void 0,
|
|
1860
|
+
qn,
|
|
1861
|
+
Yn
|
|
1862
|
+
]), j = t(We, Te), Xn = t(Ge), Zn = e(), Qn = En ?? O.variant ?? "ruled", $n = D ?? O.striped ?? !1, er = mn ?? O.stickyHeader ?? !0, tr = hn ?? O.stickyTo ?? "scroll", M = on ?? O.selectionMode ?? "none", rr = ne ?? O.editMode ?? "cell", ir = pe ?? O.filterRow ?? !1, ar = An ?? O.virtualize ?? "auto", or = en ?? O.rowHeight, sr = a ?? O.columnOverflow ?? "auto", cr = $e ?? O.overscan ?? 6, lr = fe ?? O.filterDebounce ?? 300, ur = be ?? O.loadMoreThreshold ?? 20, Ar = xe ?? O.loadMoreTrigger ?? "scroll", Nr = cn ?? O.skeletonRows ?? 8, N = we ?? Zn, Pr = n ?? !1, P = y((e) => typeof tn == "function" ? tn(e) : String(e[tn]), [tn]), Fr = j("filterYes"), Ir = j("filterNo"), Lr = x(() => ({
|
|
1817
1863
|
locale: N,
|
|
1818
|
-
timeZone:
|
|
1864
|
+
timeZone: bn,
|
|
1819
1865
|
booleans: {
|
|
1820
|
-
true:
|
|
1821
|
-
false:
|
|
1866
|
+
true: Fr,
|
|
1867
|
+
false: Ir
|
|
1822
1868
|
}
|
|
1823
1869
|
}), [
|
|
1824
1870
|
N,
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
]),
|
|
1829
|
-
if (
|
|
1871
|
+
bn,
|
|
1872
|
+
Fr,
|
|
1873
|
+
Ir
|
|
1874
|
+
]), Rr = y((e, t) => ht(e, t, Lr), [Lr]), zr = x(() => new Set(te ?? []), [te]), Br = y((e) => zr.has(e), [zr]), F = y((e, t) => {
|
|
1875
|
+
if (zr.has(P(t))) return !1;
|
|
1830
1876
|
let n = e.editable;
|
|
1831
1877
|
return typeof n == "function" ? n(t) : n === !0;
|
|
1832
|
-
}, [
|
|
1878
|
+
}, [zr, P]), Vr = x(() => c.some((e) => e.editable), [c]), Hr = y((e) => Rn ? v === void 0 ? !0 : typeof v == "function" ? v(e) : v : !1, [v, Rn]), [I, Ur] = dr(nt, g ?? St(), Ye, Cr), Wr = Un(o, I), L = o ? Wr.rows : rn ?? Or, Gr = o ? Wr.total : Sn, Kr = o ? Wr.hasMore : ge, qr = o ? Wr.loading : Ce, Jr = qr !== void 0 && qr !== !1, Yr = o ? Wr.error : ie, Xr = o ? Wr.retry : Ze, Zr = Ee ?? (o || Gr !== void 0 || Kr !== void 0 ? "server" : "client"), Qr = x(() => Et(s ?? f, c), [s, c]), [$r, ei] = dr(s === void 0 ? void 0 : Qr, Qr, Oe, wr), R = x(() => Et($r, c), [$r, c]), [ti, ni] = dr(wn, ee ?? (M === "multiple" ? [] : null), Qe, Dr), [ri, ii] = dr(_t, _ ?? null, Xe, Er), [z, ai] = dr(u, p ?? null, ke, E), [oi, si] = dr(ue, m ?? [], Ne, Tr), [ci, li] = dr(de, h ?? "all", Pe, Tr), ui = M === "single" || M === "multiple", di = nn === !0, fi = Rn !== void 0, pi = x(() => {
|
|
1833
1879
|
let e = [];
|
|
1834
|
-
return
|
|
1880
|
+
return ui && e.push(48), di && e.push(40), fi && e.push(40), e;
|
|
1835
1881
|
}, [
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
]),
|
|
1840
|
-
|
|
1882
|
+
ui,
|
|
1883
|
+
di,
|
|
1884
|
+
fi
|
|
1885
|
+
]), mi = pi.reduce((e, t) => e + t, 0), hi = x(() => Nt(c, R, { leading: mi }), [
|
|
1886
|
+
c,
|
|
1841
1887
|
R,
|
|
1842
|
-
|
|
1843
|
-
]), [
|
|
1888
|
+
mi
|
|
1889
|
+
]), [gi, _i] = C(0), [vi, yi] = C(!1);
|
|
1844
1890
|
b(() => {
|
|
1845
1891
|
if (typeof window > "u" || typeof window.matchMedia != "function") return;
|
|
1846
|
-
let e = window.matchMedia("(pointer: coarse)"), t = () =>
|
|
1892
|
+
let e = window.matchMedia("(pointer: coarse)"), t = () => yi(e.matches);
|
|
1847
1893
|
return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
1848
1894
|
}, []);
|
|
1849
|
-
let
|
|
1895
|
+
let bi = gi <= 0 || Mt(sr, gi, vi) === "scroll" ? _r : bt(hi, gi, { leading: mi }), xi = `${bi.popin.join("\0")}\u0001${bi.hidden.join("\0")}`, B = x(() => bi, [xi]), V = x(() => B.popin.length === 0 && B.hidden.length === 0 ? hi : Nt(c, {
|
|
1850
1896
|
...R,
|
|
1851
1897
|
hidden: [
|
|
1852
1898
|
...R.hidden,
|
|
1853
1899
|
...B.popin,
|
|
1854
1900
|
...B.hidden
|
|
1855
1901
|
]
|
|
1856
|
-
}, { leading:
|
|
1857
|
-
|
|
1902
|
+
}, { leading: mi }), [
|
|
1903
|
+
hi,
|
|
1858
1904
|
B,
|
|
1859
|
-
|
|
1905
|
+
c,
|
|
1860
1906
|
R,
|
|
1861
|
-
|
|
1862
|
-
]),
|
|
1907
|
+
mi
|
|
1908
|
+
]), Si = x(() => B.popin.length === 0 ? [] : hi.filter((e) => B.popin.includes(e.id)), [hi, B]), Ci = Si.length > 0, wi = S(_r);
|
|
1863
1909
|
b(() => {
|
|
1864
|
-
let e =
|
|
1865
|
-
|
|
1910
|
+
let e = wi.current;
|
|
1911
|
+
Tr(B.popin, e.popin) && Tr(B.hidden, e.hidden) || (wi.current = B, Je?.(B));
|
|
1866
1912
|
}, [B, Je]);
|
|
1867
1913
|
let H = x(() => new Map(V.map((e) => [e.id, e])), [V]), U = x(() => [
|
|
1868
|
-
...
|
|
1869
|
-
|
|
1870
|
-
...
|
|
1914
|
+
...ui ? [un] : [],
|
|
1915
|
+
...di ? [fn] : [],
|
|
1916
|
+
...fi ? [dn] : [],
|
|
1871
1917
|
...V.map((e) => e.id)
|
|
1872
1918
|
], [
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1919
|
+
ui,
|
|
1920
|
+
di,
|
|
1921
|
+
fi,
|
|
1876
1922
|
V
|
|
1877
|
-
]),
|
|
1923
|
+
]), Ti = U.length + +!!Ci, Ei = U.length + 1, Di = x(() => Ci ? [...U, dt] : U, [Ci, U]), Oi = x(() => yt(V, pi), [V, pi]), W = x(() => {
|
|
1878
1924
|
let e = et?.top ?? [], t = et?.bottom ?? [];
|
|
1879
1925
|
if (e.length === 0 && t.length === 0) return {
|
|
1880
1926
|
top: [],
|
|
@@ -1906,80 +1952,80 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
1906
1952
|
et,
|
|
1907
1953
|
L,
|
|
1908
1954
|
P
|
|
1909
|
-
]),
|
|
1955
|
+
]), ki = x(() => W.keys ? L.filter((e) => !W.keys.has(P(e))) : L, [
|
|
1910
1956
|
L,
|
|
1911
1957
|
W.keys,
|
|
1912
1958
|
P
|
|
1913
|
-
]),
|
|
1914
|
-
let e =
|
|
1915
|
-
if (
|
|
1916
|
-
nodes:
|
|
1959
|
+
]), Ai = x(() => {
|
|
1960
|
+
let e = ki;
|
|
1961
|
+
if (Zr === "server") return {
|
|
1962
|
+
nodes: Ct(e, c, I.group, {
|
|
1917
1963
|
rowKey: P,
|
|
1918
|
-
expandedGroups:
|
|
1964
|
+
expandedGroups: ci,
|
|
1919
1965
|
offset: I.page && "index" in I.page ? I.page.index * I.page.size : 0,
|
|
1920
1966
|
locale: N,
|
|
1921
|
-
timeZone:
|
|
1922
|
-
booleans:
|
|
1967
|
+
timeZone: bn,
|
|
1968
|
+
booleans: Lr.booleans
|
|
1923
1969
|
}),
|
|
1924
1970
|
rows: e,
|
|
1925
|
-
total:
|
|
1926
|
-
hasMore:
|
|
1971
|
+
total: Gr ?? null,
|
|
1972
|
+
hasMore: Kr ?? !1,
|
|
1927
1973
|
aggregates: {}
|
|
1928
1974
|
};
|
|
1929
|
-
let t = mt(e,
|
|
1975
|
+
let t = mt(e, c, I, {
|
|
1930
1976
|
rowKey: P,
|
|
1931
|
-
expandedGroups:
|
|
1932
|
-
tree:
|
|
1933
|
-
expanded:
|
|
1977
|
+
expandedGroups: ci,
|
|
1978
|
+
tree: A,
|
|
1979
|
+
expanded: A ? oi : void 0,
|
|
1934
1980
|
locale: N,
|
|
1935
|
-
timeZone:
|
|
1936
|
-
booleans:
|
|
1981
|
+
timeZone: bn,
|
|
1982
|
+
booleans: Lr.booleans
|
|
1937
1983
|
});
|
|
1938
1984
|
return {
|
|
1939
1985
|
...t,
|
|
1940
1986
|
total: t.total
|
|
1941
1987
|
};
|
|
1942
1988
|
}, [
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1989
|
+
Zr,
|
|
1990
|
+
ki,
|
|
1991
|
+
c,
|
|
1946
1992
|
I,
|
|
1947
1993
|
P,
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1994
|
+
ci,
|
|
1995
|
+
A,
|
|
1996
|
+
oi,
|
|
1951
1997
|
N,
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
]), G =
|
|
1998
|
+
bn,
|
|
1999
|
+
Lr.booleans,
|
|
2000
|
+
Gr,
|
|
2001
|
+
Kr
|
|
2002
|
+
]), G = Ai.nodes, ji = Ai.total, Mi = x(() => Si.filter((e) => e.column.aggregate !== void 0), [Si]), Ni = (V.some((e) => e.column.aggregate !== void 0) || Mi.length > 0) && Zr === "client", Pi = y((e) => Ci ? e === pt ? Mi.length > 0 : Mr(e) : !1, [Ci, Mi]), Fi = y((e) => e.column !== dt || Pi(e.row) ? e : {
|
|
1957
2003
|
row: e.row,
|
|
1958
2004
|
column: U[U.length - 1]
|
|
1959
|
-
}, [
|
|
2005
|
+
}, [Pi, U]), Ii = 1 + (i && i.length > 0 ? 1 : 0) + +!!ir, Li = x(() => {
|
|
1960
2006
|
let e = [ut];
|
|
1961
|
-
|
|
2007
|
+
ir && e.push(ct);
|
|
1962
2008
|
for (let t of W.top) e.push(t.key);
|
|
1963
2009
|
for (let t of G) e.push(t.kind === "group" ? `${lt}${t.key}` : t.key);
|
|
1964
2010
|
for (let t of W.bottom) e.push(t.key);
|
|
1965
|
-
return
|
|
2011
|
+
return Ni && e.push(pt), e;
|
|
1966
2012
|
}, [
|
|
1967
2013
|
G,
|
|
1968
2014
|
W,
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
]),
|
|
2015
|
+
ir,
|
|
2016
|
+
Ni
|
|
2017
|
+
]), Ri = 1 + +!!ir, zi = Ri + W.top.length + G.length + W.bottom.length, [Bi, Vi] = C(0), [Hi, Ui] = C(0), [K, Wi] = C({
|
|
1972
2018
|
width: 0,
|
|
1973
2019
|
height: 0
|
|
1974
|
-
}), [
|
|
1975
|
-
if (
|
|
2020
|
+
}), [Gi, Ki] = C(null), [qi, Ji] = C(/* @__PURE__ */ new Map()), Yi = or === "auto" || Ci, q = typeof or == "number" ? or : Gi ?? fr, Xi = ar === !0 || ar === "auto" && G.length > pr, Zi = x(() => {
|
|
2021
|
+
if (Yi) return rt(G.map((e, t) => qi.get(t) ?? q));
|
|
1976
2022
|
}, [
|
|
1977
|
-
|
|
2023
|
+
Yi,
|
|
1978
2024
|
G,
|
|
1979
|
-
|
|
2025
|
+
qi,
|
|
1980
2026
|
q
|
|
1981
|
-
]),
|
|
1982
|
-
if (!
|
|
2027
|
+
]), Qi = x(() => {
|
|
2028
|
+
if (!Xi) return {
|
|
1983
2029
|
startIndex: 0,
|
|
1984
2030
|
endIndex: G.length,
|
|
1985
2031
|
startOffset: 0,
|
|
@@ -1988,10 +2034,10 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
1988
2034
|
let e = at({
|
|
1989
2035
|
itemCount: G.length,
|
|
1990
2036
|
itemSize: q,
|
|
1991
|
-
metrics:
|
|
1992
|
-
overscan:
|
|
1993
|
-
scrollOffset: Math.max(0,
|
|
1994
|
-
viewportSize: K.height ||
|
|
2037
|
+
metrics: Zi,
|
|
2038
|
+
overscan: cr,
|
|
2039
|
+
scrollOffset: Math.max(0, Bi),
|
|
2040
|
+
viewportSize: K.height || hr
|
|
1995
2041
|
});
|
|
1996
2042
|
return {
|
|
1997
2043
|
startIndex: e.startIndex,
|
|
@@ -2000,224 +2046,224 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
2000
2046
|
totalSize: e.totalSize
|
|
2001
2047
|
};
|
|
2002
2048
|
}, [
|
|
2003
|
-
|
|
2049
|
+
Xi,
|
|
2004
2050
|
K.height,
|
|
2005
2051
|
G.length,
|
|
2006
2052
|
q,
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
]),
|
|
2011
|
-
|
|
2053
|
+
Zi,
|
|
2054
|
+
cr,
|
|
2055
|
+
Bi
|
|
2056
|
+
]), $i = x(() => Xi ? G.slice(Qi.startIndex, Qi.endIndex) : G, [
|
|
2057
|
+
Xi,
|
|
2012
2058
|
G,
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
]), [
|
|
2016
|
-
if (!
|
|
2017
|
-
let e =
|
|
2018
|
-
for (let e of
|
|
2059
|
+
Qi.startIndex,
|
|
2060
|
+
Qi.endIndex
|
|
2061
|
+
]), [ea, ta] = C([]), na = x(() => V.filter((e) => e.pinned === null), [V]), ra = ar === !0 || ar === "auto" && na.length > mr, ia = x(() => {
|
|
2062
|
+
if (!ra || K.width === 0) return V;
|
|
2063
|
+
let e = pi.reduce((e, t) => e + t, 0), t = V.filter((e) => e.pinned === "start").reduce((e, t) => e + t.width, 0), n = V.filter((e) => e.pinned === "end").reduce((e, t) => e + t.width, 0), r = Hi - gr, i = Hi + K.width - n + gr, a = e + t, o = /* @__PURE__ */ new Set();
|
|
2064
|
+
for (let e of na) {
|
|
2019
2065
|
let t = a + e.width;
|
|
2020
2066
|
t >= r && a <= i && o.add(e.id), a = t;
|
|
2021
2067
|
}
|
|
2022
2068
|
return V.filter((e) => e.pinned !== null || o.has(e.id) || z !== null && z.column === e.id);
|
|
2023
2069
|
}, [
|
|
2024
|
-
|
|
2070
|
+
ra,
|
|
2025
2071
|
K.width,
|
|
2026
2072
|
V,
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2073
|
+
pi,
|
|
2074
|
+
Hi,
|
|
2075
|
+
na,
|
|
2030
2076
|
z
|
|
2031
2077
|
]), J = x(() => {
|
|
2032
|
-
let e =
|
|
2078
|
+
let e = Zr === "client" ? Ai.rows : ki;
|
|
2033
2079
|
return [
|
|
2034
2080
|
...W.top.map((e) => e.key),
|
|
2035
2081
|
...e.map(P),
|
|
2036
2082
|
...W.bottom.map((e) => e.key)
|
|
2037
|
-
].filter((e) => !
|
|
2083
|
+
].filter((e) => !zr.has(e));
|
|
2038
2084
|
}, [
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2085
|
+
Zr,
|
|
2086
|
+
Ai.rows,
|
|
2087
|
+
ki,
|
|
2042
2088
|
W,
|
|
2043
2089
|
P,
|
|
2044
|
-
|
|
2045
|
-
]),
|
|
2090
|
+
zr
|
|
2091
|
+
]), aa = x(() => Array.isArray(ti) ? ti : ti == null ? [] : [ti], [ti]), oa = x(() => new Set(aa), [aa]), sa = S(void 0), ca = y((e) => oa.has(e), [oa]), la = x(() => new Set(J), [J]), ua = x(() => aa.filter((e) => la.has(e)).length, [aa, la]), da = ua === 0 ? "none" : ua >= J.length ? "all" : "some", fa = y((e, t, n) => {
|
|
2046
2092
|
let r = M === "multiple" ? e : e[0] ?? null;
|
|
2047
|
-
|
|
2048
|
-
}, [M,
|
|
2049
|
-
if (M === "none" || M === "range" ||
|
|
2093
|
+
ni(r, t, n);
|
|
2094
|
+
}, [M, ni]), pa = y((e, t) => {
|
|
2095
|
+
if (M === "none" || M === "range" || zr.has(e)) return;
|
|
2050
2096
|
let n = it({
|
|
2051
2097
|
action: t.range ? "range" : "toggle",
|
|
2052
2098
|
mode: M,
|
|
2053
|
-
selected:
|
|
2099
|
+
selected: aa,
|
|
2054
2100
|
keys: J,
|
|
2055
2101
|
key: e,
|
|
2056
|
-
anchor:
|
|
2057
|
-
disabled: (e) =>
|
|
2102
|
+
anchor: sa.current,
|
|
2103
|
+
disabled: (e) => zr.has(e)
|
|
2058
2104
|
});
|
|
2059
|
-
t.range || (
|
|
2105
|
+
t.range || (sa.current = e), n.changed && fa(n.selected, t.reason ?? "pointer", t.source);
|
|
2060
2106
|
}, [
|
|
2061
2107
|
M,
|
|
2062
|
-
|
|
2063
|
-
|
|
2108
|
+
zr,
|
|
2109
|
+
aa,
|
|
2064
2110
|
J,
|
|
2065
|
-
|
|
2066
|
-
]),
|
|
2111
|
+
fa
|
|
2112
|
+
]), ma = y((e) => {
|
|
2067
2113
|
if (M !== "multiple") return;
|
|
2068
2114
|
let t = it({
|
|
2069
2115
|
action: "all",
|
|
2070
2116
|
mode: "multiple",
|
|
2071
|
-
selected:
|
|
2117
|
+
selected: aa,
|
|
2072
2118
|
keys: J
|
|
2073
2119
|
});
|
|
2074
|
-
t.changed &&
|
|
2120
|
+
t.changed && fa(t.selected, "select", e);
|
|
2075
2121
|
}, [
|
|
2076
2122
|
M,
|
|
2077
|
-
|
|
2123
|
+
aa,
|
|
2078
2124
|
J,
|
|
2079
|
-
|
|
2080
|
-
]),
|
|
2081
|
-
rows:
|
|
2082
|
-
columns:
|
|
2083
|
-
pageSize:
|
|
2084
|
-
bodyStart:
|
|
2085
|
-
bodyEnd:
|
|
2125
|
+
fa
|
|
2126
|
+
]), ha = Math.max(1, Math.floor((K.height || 400) / q) - 1), Y = x(() => ({
|
|
2127
|
+
rows: Li,
|
|
2128
|
+
columns: Di,
|
|
2129
|
+
pageSize: ha,
|
|
2130
|
+
bodyStart: Ri,
|
|
2131
|
+
bodyEnd: zi
|
|
2086
2132
|
}), [
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
]), X = x(() => M === "range" ?
|
|
2133
|
+
Li,
|
|
2134
|
+
Di,
|
|
2135
|
+
ha,
|
|
2136
|
+
Ri,
|
|
2137
|
+
zi
|
|
2138
|
+
]), X = x(() => M === "range" ? Ot(Y, ri) : null, [
|
|
2093
2139
|
M,
|
|
2094
2140
|
Y,
|
|
2095
|
-
|
|
2096
|
-
]),
|
|
2097
|
-
if (M !== "range" || !
|
|
2098
|
-
let r = t &&
|
|
2099
|
-
|
|
2141
|
+
ri
|
|
2142
|
+
]), ga = y((e) => At(Y, X, e), [Y, X]), [_a, va] = C(!1), ya = S(null), ba = y((e, t, n) => {
|
|
2143
|
+
if (M !== "range" || !Mr(e.row)) return;
|
|
2144
|
+
let r = t && ri ? ri.anchor : e;
|
|
2145
|
+
ya.current = r, ii({
|
|
2100
2146
|
anchor: r,
|
|
2101
2147
|
focus: e
|
|
2102
2148
|
}, "pointer", n);
|
|
2103
2149
|
}, [
|
|
2104
2150
|
M,
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
]),
|
|
2108
|
-
if (M !== "range" || !
|
|
2109
|
-
let n =
|
|
2110
|
-
|
|
2151
|
+
ri,
|
|
2152
|
+
ii
|
|
2153
|
+
]), xa = y((e, t) => {
|
|
2154
|
+
if (M !== "range" || !Mr(e.row)) return;
|
|
2155
|
+
let n = ya.current ?? ri?.anchor ?? e;
|
|
2156
|
+
ii({
|
|
2111
2157
|
anchor: n,
|
|
2112
2158
|
focus: e
|
|
2113
2159
|
}, "pointer", t);
|
|
2114
2160
|
}, [
|
|
2115
2161
|
M,
|
|
2116
|
-
|
|
2117
|
-
|
|
2162
|
+
ri,
|
|
2163
|
+
ii
|
|
2118
2164
|
]), Z = y((e) => {
|
|
2119
|
-
qe(
|
|
2120
|
-
}, []), [
|
|
2121
|
-
let t =
|
|
2165
|
+
qe(k.current?.ownerDocument).announce(e);
|
|
2166
|
+
}, []), [Sa, Ca] = C(!1), wa = S(null), Ta = y((e) => {
|
|
2167
|
+
let t = k.current?.querySelector(`[data-row="${CSS.escape(e.row)}"] [data-column="${CSS.escape(e.column)}"]`);
|
|
2122
2168
|
if (!t) return !1;
|
|
2123
2169
|
let n = t.matches("[data-part=\"column-header\"], [data-part=\"filter-cell\"]") || t.querySelector("[data-part=\"group-toggle\"]") !== null, r = t.querySelector("[data-part=\"editor\"]");
|
|
2124
2170
|
if (r) return (r.querySelector("input:not([type=\"checkbox\"]):not([type=\"radio\"]):not([disabled]), textarea:not([disabled]), [role=\"combobox\"]:not([disabled]), [role=\"spinbutton\"]:not([disabled]), [role=\"checkbox\"], [role=\"switch\"]") ?? r.querySelector("a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"]), [contenteditable=\"true\"]") ?? t).focus({ preventScroll: !1 }), !0;
|
|
2125
|
-
let i = n ? [] : [...t.querySelectorAll(
|
|
2171
|
+
let i = n ? [] : [...t.querySelectorAll(pn)];
|
|
2126
2172
|
return ((i.length === 1 && i[0].matches("a[href], button, input[type=\"checkbox\"], input[type=\"radio\"], [role=\"switch\"], [role=\"button\"], [role=\"checkbox\"]") ? i[0] : null) ?? t).focus({ preventScroll: !1 }), !0;
|
|
2127
|
-
}, []),
|
|
2128
|
-
if (E(e, z) ||
|
|
2129
|
-
let r =
|
|
2130
|
-
if (
|
|
2131
|
-
|
|
2132
|
-
let t =
|
|
2133
|
-
|
|
2173
|
+
}, []), Ea = y((e, t, n) => {
|
|
2174
|
+
if (E(e, z) || ai(e, t, n), wa.current = e, Mr(e.row) && !Li.includes(e.row)) return;
|
|
2175
|
+
let r = Li.indexOf(e.row) - Ri;
|
|
2176
|
+
if (Xi && r >= 0 && (r < Qi.startIndex || r >= Qi.endIndex)) {
|
|
2177
|
+
ta([e.row]);
|
|
2178
|
+
let t = Zi ? Zi.offsetOf(r) : r * q;
|
|
2179
|
+
Nn.current?.scrollTo({ top: t - K.height / 2 + q });
|
|
2134
2180
|
}
|
|
2135
2181
|
}, [
|
|
2136
2182
|
z,
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
Ei,
|
|
2183
|
+
ai,
|
|
2184
|
+
Li,
|
|
2140
2185
|
Ri,
|
|
2141
|
-
|
|
2142
|
-
|
|
2186
|
+
Xi,
|
|
2187
|
+
Qi,
|
|
2188
|
+
Zi,
|
|
2143
2189
|
q,
|
|
2144
2190
|
K.height
|
|
2145
2191
|
]);
|
|
2146
2192
|
Be(() => {
|
|
2147
|
-
let e =
|
|
2148
|
-
e &&
|
|
2193
|
+
let e = wa.current;
|
|
2194
|
+
e && Ta(e) && (wa.current = null);
|
|
2149
2195
|
});
|
|
2150
|
-
let
|
|
2196
|
+
let Da = S(0);
|
|
2151
2197
|
b(() => {
|
|
2152
|
-
if (z &&
|
|
2153
|
-
let e =
|
|
2198
|
+
if (z && Li.includes(z.row) && (Da.current = Li.indexOf(z.row), Di.includes(z.column)) || !z) return;
|
|
2199
|
+
let e = Li.includes(z.row) && B.popin.includes(z.column) && Pi(z.row) ? {
|
|
2154
2200
|
row: z.row,
|
|
2155
2201
|
column: dt
|
|
2156
|
-
} :
|
|
2157
|
-
e && !E(e, z) ? (
|
|
2202
|
+
} : Lt(Y, z, Da.current);
|
|
2203
|
+
e && !E(e, z) ? (ai(e, "programmatic"), Sa && (wa.current = e)) : !e && Sa && k.current?.querySelector("[data-part=\"empty\"] [tabindex]")?.focus();
|
|
2158
2204
|
}, [
|
|
2159
2205
|
Y,
|
|
2160
|
-
|
|
2161
|
-
|
|
2206
|
+
Li,
|
|
2207
|
+
Di,
|
|
2162
2208
|
B,
|
|
2163
|
-
|
|
2209
|
+
Pi,
|
|
2164
2210
|
z,
|
|
2165
|
-
|
|
2166
|
-
|
|
2211
|
+
ai,
|
|
2212
|
+
Sa
|
|
2167
2213
|
]);
|
|
2168
|
-
let
|
|
2214
|
+
let Oa = y((e) => {
|
|
2169
2215
|
let t = I.sort.findIndex((t) => t.column === e);
|
|
2170
2216
|
return t === -1 ? null : {
|
|
2171
2217
|
direction: I.sort[t].direction,
|
|
2172
2218
|
index: t + 1
|
|
2173
2219
|
};
|
|
2174
|
-
}, [I.sort]),
|
|
2220
|
+
}, [I.sort]), ka = y((e) => H.get(e)?.column.label ?? e, [H]), Aa = y((e) => {
|
|
2175
2221
|
if (e.sort.length === 0) {
|
|
2176
2222
|
Z(j("sortCleared"));
|
|
2177
2223
|
return;
|
|
2178
2224
|
}
|
|
2179
|
-
let t = e.sort.map((e) => j(e.direction === "ascending" ? "sortAscending" : "sortDescending", { column:
|
|
2225
|
+
let t = e.sort.map((e) => j(e.direction === "ascending" ? "sortAscending" : "sortDescending", { column: ka(e.column) })).join(", ");
|
|
2180
2226
|
Z(j("sortedBy", { order: t }));
|
|
2181
2227
|
}, [
|
|
2182
2228
|
Z,
|
|
2183
2229
|
j,
|
|
2184
|
-
|
|
2185
|
-
]),
|
|
2230
|
+
ka
|
|
2231
|
+
]), ja = y((e, t, n, r = "pointer") => {
|
|
2186
2232
|
let i = H.get(e);
|
|
2187
2233
|
if (!i || !i.sortable) return;
|
|
2188
|
-
let a =
|
|
2189
|
-
|
|
2234
|
+
let a = Kt(I, e, t);
|
|
2235
|
+
Ur(a.query, r, n, { change: a.change }), Aa(a.query);
|
|
2190
2236
|
}, [
|
|
2191
2237
|
H,
|
|
2192
2238
|
I,
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
]),
|
|
2196
|
-
let r =
|
|
2197
|
-
|
|
2239
|
+
Ur,
|
|
2240
|
+
Aa
|
|
2241
|
+
]), Ma = y((e, t, n) => {
|
|
2242
|
+
let r = Gt(I, e, t);
|
|
2243
|
+
Ur(r.query, "pointer", n, { change: r.change }), Aa(r.query);
|
|
2198
2244
|
}, [
|
|
2199
2245
|
I,
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
]),
|
|
2203
|
-
let i =
|
|
2204
|
-
|
|
2205
|
-
}, [I,
|
|
2206
|
-
|
|
2246
|
+
Ur,
|
|
2247
|
+
Aa
|
|
2248
|
+
]), Na = y((e) => an(I.filter, e) ?? null, [I.filter]), Pa = y((e, t, n, r) => {
|
|
2249
|
+
let i = Bt(I, e, t);
|
|
2250
|
+
Ur(i.query, n, r, { change: i.change });
|
|
2251
|
+
}, [I, Ur]), [Fa, Ia] = C(null), [La, Ra] = C(null), [za, Ba] = C(null), Va = S(-Infinity), Ha = y((e, t, n) => {
|
|
2252
|
+
Ba({
|
|
2207
2253
|
column: e,
|
|
2208
2254
|
anchor: t,
|
|
2209
2255
|
returnTo: n
|
|
2210
|
-
}),
|
|
2211
|
-
}, []),
|
|
2256
|
+
}), Ra(e);
|
|
2257
|
+
}, []), Ua = y(() => Ba(null), []), Wa = y((e, t) => {
|
|
2212
2258
|
let n = e.target;
|
|
2213
|
-
n instanceof Element && e.currentTarget.contains(n) && (e.shiftKey || n.closest(
|
|
2214
|
-
}, [
|
|
2215
|
-
let t = `${e}|${JSON.stringify(I.filter)}|${I.search}|${L.length}`, n =
|
|
2259
|
+
n instanceof Element && e.currentTarget.contains(n) && (e.shiftKey || n.closest(vr) || (e.preventDefault(), !(Date.now() - Va.current < yr) && Ha(t, Sr(e.clientX, e.clientY), e.currentTarget)));
|
|
2260
|
+
}, [Ha]), Ga = S(/* @__PURE__ */ new Map()), Ka = y((e) => {
|
|
2261
|
+
let t = `${e}|${JSON.stringify(I.filter)}|${I.search}|${L.length}`, n = Ga.current.get(t);
|
|
2216
2262
|
if (n) return n;
|
|
2217
|
-
let r =
|
|
2263
|
+
let r = c.find((t) => t.id === e), i = /* @__PURE__ */ new Map();
|
|
2218
2264
|
if (r) {
|
|
2219
|
-
let t =
|
|
2220
|
-
let n =
|
|
2265
|
+
let t = ln(I.filter, e), n = Yt(t.rules.length ? t : null, (e, t) => {
|
|
2266
|
+
let n = c.find((e) => e.id === t);
|
|
2221
2267
|
return n ? gt(n, e) : void 0;
|
|
2222
2268
|
}, { locale: N });
|
|
2223
2269
|
for (let e of L) {
|
|
@@ -2230,107 +2276,107 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
2230
2276
|
}
|
|
2231
2277
|
}
|
|
2232
2278
|
}
|
|
2233
|
-
return
|
|
2279
|
+
return Ga.current = /* @__PURE__ */ new Map([[t, i]]), i;
|
|
2234
2280
|
}, [
|
|
2235
|
-
|
|
2281
|
+
c,
|
|
2236
2282
|
I.filter,
|
|
2237
2283
|
I.search,
|
|
2238
2284
|
L,
|
|
2239
2285
|
N
|
|
2240
|
-
]),
|
|
2241
|
-
|
|
2242
|
-
}, [
|
|
2243
|
-
|
|
2244
|
-
}, [R,
|
|
2245
|
-
let r =
|
|
2246
|
-
r && !R.hidden.includes(e) && (
|
|
2286
|
+
]), qa = y((e, t, n, r) => {
|
|
2287
|
+
ei(e, n, r, { change: t });
|
|
2288
|
+
}, [ei]), Ja = y((e, t, n) => {
|
|
2289
|
+
qa(Ut(R, e, t), "pinned", "pointer", n);
|
|
2290
|
+
}, [R, qa]), Ya = y((e, t, n = "programmatic") => {
|
|
2291
|
+
let r = c.find((t) => t.id === e);
|
|
2292
|
+
r && !R.hidden.includes(e) && (qa(Vt(R, e, !0), "hidden", n, t), Z(j("columnHidden", { column: r.label })));
|
|
2247
2293
|
}, [
|
|
2248
|
-
|
|
2294
|
+
c,
|
|
2249
2295
|
R,
|
|
2250
|
-
|
|
2296
|
+
qa,
|
|
2251
2297
|
Z,
|
|
2252
2298
|
j
|
|
2253
|
-
]),
|
|
2254
|
-
let i =
|
|
2299
|
+
]), Xa = y((e, t, n, r) => {
|
|
2300
|
+
let i = c.find((t) => t.id === e);
|
|
2255
2301
|
if (!i) return;
|
|
2256
|
-
let a =
|
|
2257
|
-
|
|
2302
|
+
let a = Wt(R, i, t);
|
|
2303
|
+
qa(a, "width", n, r), n === "keyboard" && Z(j("resized", {
|
|
2258
2304
|
column: i.label,
|
|
2259
2305
|
width: String(a.widths[e] ?? t)
|
|
2260
2306
|
}));
|
|
2261
2307
|
}, [
|
|
2262
|
-
|
|
2308
|
+
c,
|
|
2263
2309
|
R,
|
|
2264
|
-
|
|
2310
|
+
qa,
|
|
2265
2311
|
Z,
|
|
2266
2312
|
j
|
|
2267
|
-
]),
|
|
2313
|
+
]), Za = y((e, t, n) => {
|
|
2268
2314
|
let r = H.get(e);
|
|
2269
|
-
r && r.resizable &&
|
|
2270
|
-
}, [H,
|
|
2271
|
-
let t =
|
|
2315
|
+
r && r.resizable && Xa(e, r.width + t, "keyboard", n);
|
|
2316
|
+
}, [H, Xa]), Qa = y((e) => {
|
|
2317
|
+
let t = k.current;
|
|
2272
2318
|
if (!t) return null;
|
|
2273
2319
|
let n = 0;
|
|
2274
|
-
for (let r of t.querySelectorAll(`[data-column="${CSS.escape(e)}"]`)) n = Math.max(n,
|
|
2320
|
+
for (let r of t.querySelectorAll(`[data-column="${CSS.escape(e)}"]`)) n = Math.max(n, kr(r));
|
|
2275
2321
|
return n > 0 ? Math.ceil(n) : null;
|
|
2276
|
-
}, []),
|
|
2322
|
+
}, []), $a = y((e, t, n) => {
|
|
2277
2323
|
if (!H.has(e)) return;
|
|
2278
|
-
let r =
|
|
2279
|
-
r !== null &&
|
|
2324
|
+
let r = Qa(e);
|
|
2325
|
+
r !== null && Xa(e, r, t, n);
|
|
2280
2326
|
}, [
|
|
2281
2327
|
H,
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
]),
|
|
2328
|
+
Qa,
|
|
2329
|
+
Xa
|
|
2330
|
+
]), eo = y((e, t) => {
|
|
2285
2331
|
let n = R;
|
|
2286
2332
|
for (let e of V) {
|
|
2287
2333
|
if (!e.resizable) continue;
|
|
2288
|
-
let t =
|
|
2289
|
-
t !== null && (n =
|
|
2334
|
+
let t = Qa(e.id);
|
|
2335
|
+
t !== null && (n = Wt(n, e.column, t));
|
|
2290
2336
|
}
|
|
2291
|
-
n !== R &&
|
|
2337
|
+
n !== R && qa(n, "width", e, t);
|
|
2292
2338
|
}, [
|
|
2293
2339
|
R,
|
|
2294
2340
|
V,
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
]),
|
|
2341
|
+
Qa,
|
|
2342
|
+
qa
|
|
2343
|
+
]), to = y((e, t, n) => e === null ? eo(t, n) : $a(e, t, n), [eo, $a]), no = y((e, t, n) => {
|
|
2298
2344
|
let r = H.get(e);
|
|
2299
2345
|
if (!r || !r.reorderable) return;
|
|
2300
|
-
let i =
|
|
2301
|
-
a < 0 || a >= i.length ||
|
|
2346
|
+
let i = Jt(V, e), a = i.indexOf(e) + t;
|
|
2347
|
+
a < 0 || a >= i.length || qa(Ht(R, e, a, i), "order", "keyboard", n);
|
|
2302
2348
|
}, [
|
|
2303
2349
|
H,
|
|
2304
2350
|
V,
|
|
2305
2351
|
R,
|
|
2306
|
-
|
|
2307
|
-
]), [
|
|
2352
|
+
qa
|
|
2353
|
+
]), [ro, io] = C(null), [ao, oo] = C({
|
|
2308
2354
|
dragging: null,
|
|
2309
2355
|
target: null,
|
|
2310
2356
|
offset: null,
|
|
2311
2357
|
scrollTop: 0
|
|
2312
|
-
}),
|
|
2358
|
+
}), so = S(null), co = S({
|
|
2313
2359
|
resolved: V,
|
|
2314
2360
|
effectiveState: R,
|
|
2315
|
-
requestState:
|
|
2316
|
-
gutters:
|
|
2317
|
-
labelOf:
|
|
2361
|
+
requestState: qa,
|
|
2362
|
+
gutters: pi,
|
|
2363
|
+
labelOf: ka,
|
|
2318
2364
|
t: j,
|
|
2319
|
-
dragT:
|
|
2365
|
+
dragT: Xn
|
|
2320
2366
|
});
|
|
2321
|
-
|
|
2367
|
+
co.current = {
|
|
2322
2368
|
resolved: V,
|
|
2323
2369
|
effectiveState: R,
|
|
2324
|
-
requestState:
|
|
2325
|
-
gutters:
|
|
2326
|
-
labelOf:
|
|
2370
|
+
requestState: qa,
|
|
2371
|
+
gutters: pi,
|
|
2372
|
+
labelOf: ka,
|
|
2327
2373
|
t: j,
|
|
2328
|
-
dragT:
|
|
2374
|
+
dragT: Xn
|
|
2329
2375
|
};
|
|
2330
|
-
let
|
|
2331
|
-
let n =
|
|
2332
|
-
if (r && (r(),
|
|
2333
|
-
let i =
|
|
2376
|
+
let lo = S(/* @__PURE__ */ new Map()), uo = S(!1), fo = S(/* @__PURE__ */ new Map()), po = y((e, t) => {
|
|
2377
|
+
let n = so.current, r = lo.current.get(t);
|
|
2378
|
+
if (r && (r(), lo.current.delete(t)), !e || !n) return;
|
|
2379
|
+
let i = co.current.resolved.find((e) => e.id === t);
|
|
2334
2380
|
if (!i || !i.reorderable) return;
|
|
2335
2381
|
let a = n.attachDraggable(e, {
|
|
2336
2382
|
container: "columns",
|
|
@@ -2339,38 +2385,38 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
2339
2385
|
canDrag: (e) => !(e.target instanceof Element && e.target.closest("[data-part=\"resizer\"]")),
|
|
2340
2386
|
distance: 6
|
|
2341
2387
|
});
|
|
2342
|
-
|
|
2343
|
-
}, []),
|
|
2344
|
-
e ?
|
|
2345
|
-
}, [
|
|
2388
|
+
lo.current.set(t, a);
|
|
2389
|
+
}, []), mo = y((e, t) => {
|
|
2390
|
+
e ? fo.current.set(t, e) : fo.current.delete(t), po(e, t);
|
|
2391
|
+
}, [po]), ho = V.map((e) => e.id).join("\0");
|
|
2346
2392
|
b(() => {
|
|
2347
|
-
for (let [e, t] of
|
|
2348
|
-
}, [
|
|
2349
|
-
let e =
|
|
2393
|
+
for (let [e, t] of fo.current) po(t, e);
|
|
2394
|
+
}, [ho, po]), b(() => {
|
|
2395
|
+
let e = k.current;
|
|
2350
2396
|
if (!e) return;
|
|
2351
2397
|
let t = st({
|
|
2352
2398
|
document: e.ownerDocument,
|
|
2353
|
-
t: (e, t) =>
|
|
2399
|
+
t: (e, t) => co.current.dragT(e, t),
|
|
2354
2400
|
preview: !1,
|
|
2355
2401
|
autoScroll: { axis: "x" },
|
|
2356
2402
|
onDrop: ({ items: e, target: t, reason: n, event: r }) => {
|
|
2357
2403
|
if (t.kind !== "between") return;
|
|
2358
|
-
let { resolved: i, effectiveState: a, requestState: o } =
|
|
2359
|
-
l !== null && o(
|
|
2404
|
+
let { resolved: i, effectiveState: a, requestState: o } = co.current, s = e[0], c = Jt(i, s), l = jr(i, c, s, t.index);
|
|
2405
|
+
l !== null && o(Ht(a, s, l, c), "order", n === "keyboard" ? "keyboard" : "pointer", r);
|
|
2360
2406
|
}
|
|
2361
|
-
}), n = () =>
|
|
2407
|
+
}), n = () => co.current.resolved.map((e) => e.id), r = (t) => e.querySelector(`[data-part="column-header"][data-column="${CSS.escape(t)}"]`);
|
|
2362
2408
|
t.registerContainer({
|
|
2363
2409
|
key: "columns",
|
|
2364
2410
|
items: n,
|
|
2365
2411
|
orientation: "horizontal",
|
|
2366
2412
|
element: () => e.querySelector("[data-part=\"head\"] > [data-part=\"header-row\"]:last-of-type"),
|
|
2367
2413
|
itemElement: r,
|
|
2368
|
-
label: () =>
|
|
2369
|
-
itemLabel: (e) =>
|
|
2414
|
+
label: () => co.current.t("dragColumns"),
|
|
2415
|
+
itemLabel: (e) => co.current.labelOf(e)
|
|
2370
2416
|
});
|
|
2371
2417
|
let i = !1, a = t.subscribe((e) => {
|
|
2372
2418
|
if (e.status !== "dragging") {
|
|
2373
|
-
i && (
|
|
2419
|
+
i && (uo.current = !0), i = !1, oo({
|
|
2374
2420
|
dragging: null,
|
|
2375
2421
|
target: null,
|
|
2376
2422
|
offset: null,
|
|
@@ -2381,78 +2427,78 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
2381
2427
|
i = !0;
|
|
2382
2428
|
let t = e.items[0] ?? null, a = e.target && e.target.kind === "between" ? e.target : null, o = null, s = 0, c = null;
|
|
2383
2429
|
if (a && t) {
|
|
2384
|
-
let e =
|
|
2430
|
+
let e = co.current.resolved, i = Jt(e, t), l = e.find((e) => e.id === i[0]), u = e.find((e) => e.id === i[i.length - 1]), d = Math.max(l ? l.index - 1 : 0, Math.min(u ? u.index : e.length, a.index)), f = Nn.current, p = n(), m = d >= p.length, h = p[m ? p.length - 1 : d], g = h ? r(h) : null;
|
|
2385
2431
|
if (g && f) {
|
|
2386
2432
|
let e = g.getBoundingClientRect(), t = f.getBoundingClientRect(), n = getComputedStyle(f).direction === "rtl", r = m === n ? e.left : e.right;
|
|
2387
2433
|
o = n ? t.right - r - f.scrollLeft : r - t.left + f.scrollLeft, s = f.scrollTop, c = p[d] ?? null;
|
|
2388
2434
|
}
|
|
2389
2435
|
}
|
|
2390
|
-
|
|
2436
|
+
oo({
|
|
2391
2437
|
dragging: t,
|
|
2392
2438
|
target: c,
|
|
2393
2439
|
offset: o,
|
|
2394
2440
|
scrollTop: s
|
|
2395
2441
|
});
|
|
2396
2442
|
});
|
|
2397
|
-
|
|
2398
|
-
for (let [e, t] of
|
|
2399
|
-
let o =
|
|
2443
|
+
so.current = t;
|
|
2444
|
+
for (let [e, t] of fo.current) po(t, e);
|
|
2445
|
+
let o = lo.current;
|
|
2400
2446
|
return () => {
|
|
2401
2447
|
a();
|
|
2402
2448
|
for (let e of o.values()) e();
|
|
2403
|
-
o.clear(), t.destroy(),
|
|
2449
|
+
o.clear(), t.destroy(), so.current = null;
|
|
2404
2450
|
};
|
|
2405
2451
|
}, []);
|
|
2406
|
-
let
|
|
2452
|
+
let go = x(() => {
|
|
2407
2453
|
let e = /* @__PURE__ */ new Map();
|
|
2408
2454
|
for (let t of W.top) e.set(t.key, t);
|
|
2409
2455
|
for (let t of G) t.kind === "row" && e.set(t.key, t);
|
|
2410
2456
|
for (let t of W.bottom) e.set(t.key, t);
|
|
2411
2457
|
return e;
|
|
2412
|
-
}, [G, W]),
|
|
2458
|
+
}, [G, W]), _o = di && !A && Zr === "client" && I.sort.length === 0 && I.filter === null && I.search.trim() === "" && I.group.length === 0, [vo, yo] = C({
|
|
2413
2459
|
dragging: null,
|
|
2414
2460
|
offset: null,
|
|
2415
2461
|
scrollLeft: 0
|
|
2416
|
-
}),
|
|
2417
|
-
let t =
|
|
2418
|
-
return t && n ? ht(n, t.row,
|
|
2462
|
+
}), bo = S(null), xo = S(/* @__PURE__ */ new Map()), So = S(/* @__PURE__ */ new Map()), Co = y((e) => {
|
|
2463
|
+
let t = go.get(e), n = c.find((e) => e.rowHeader);
|
|
2464
|
+
return t && n ? ht(n, t.row, Lr) : e;
|
|
2419
2465
|
}, [
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
]),
|
|
2424
|
-
nodeByKey:
|
|
2425
|
-
mountedNodes:
|
|
2426
|
-
rowsReorderableNow:
|
|
2466
|
+
go,
|
|
2467
|
+
c,
|
|
2468
|
+
Lr
|
|
2469
|
+
]), wo = S({
|
|
2470
|
+
nodeByKey: go,
|
|
2471
|
+
mountedNodes: $i,
|
|
2472
|
+
rowsReorderableNow: _o,
|
|
2427
2473
|
onRowsReorder: Ie,
|
|
2428
|
-
labelOf:
|
|
2474
|
+
labelOf: Co,
|
|
2429
2475
|
t: j,
|
|
2430
|
-
dragT:
|
|
2476
|
+
dragT: Xn
|
|
2431
2477
|
});
|
|
2432
|
-
|
|
2433
|
-
nodeByKey:
|
|
2434
|
-
mountedNodes:
|
|
2435
|
-
rowsReorderableNow:
|
|
2478
|
+
wo.current = {
|
|
2479
|
+
nodeByKey: go,
|
|
2480
|
+
mountedNodes: $i,
|
|
2481
|
+
rowsReorderableNow: _o,
|
|
2436
2482
|
onRowsReorder: Ie,
|
|
2437
|
-
labelOf:
|
|
2483
|
+
labelOf: Co,
|
|
2438
2484
|
t: j,
|
|
2439
|
-
dragT:
|
|
2485
|
+
dragT: Xn
|
|
2440
2486
|
};
|
|
2441
|
-
let
|
|
2442
|
-
let n =
|
|
2443
|
-
if (
|
|
2487
|
+
let To = y((e, t) => {
|
|
2488
|
+
let n = bo.current;
|
|
2489
|
+
if (So.current.get(t)?.(), So.current.delete(t), !e || !n) return;
|
|
2444
2490
|
let r = n.attachDraggable(e, {
|
|
2445
2491
|
container: "rows",
|
|
2446
2492
|
key: t,
|
|
2447
2493
|
handle: () => e.querySelector("[data-part=\"row-handle\"]"),
|
|
2448
|
-
disabled: () => !
|
|
2494
|
+
disabled: () => !wo.current.rowsReorderableNow,
|
|
2449
2495
|
distance: 6
|
|
2450
2496
|
});
|
|
2451
|
-
|
|
2452
|
-
}, []),
|
|
2453
|
-
e ?
|
|
2454
|
-
}, [
|
|
2455
|
-
let { nodeByKey: n, mountedNodes: r } =
|
|
2497
|
+
So.current.set(t, r);
|
|
2498
|
+
}, []), Eo = y((e, t) => {
|
|
2499
|
+
e ? xo.current.set(t, e) : xo.current.delete(t), To(e, t);
|
|
2500
|
+
}, [To]), Do = y((e, t) => {
|
|
2501
|
+
let { nodeByKey: n, mountedNodes: r } = wo.current, i = n.get(e);
|
|
2456
2502
|
if (!i) return null;
|
|
2457
2503
|
let a = r.filter((e) => e.kind === "row"), o = a[a.length - 1], s = a[t], c = s && s.kind === "row" ? s.index : o && o.kind === "row" ? o.index + 1 : 0, l = i.index < c ? c - 1 : c;
|
|
2458
2504
|
return l === i.index ? null : {
|
|
@@ -2463,42 +2509,42 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
2463
2509
|
};
|
|
2464
2510
|
}, []);
|
|
2465
2511
|
b(() => {
|
|
2466
|
-
let e =
|
|
2467
|
-
if (!e ||
|
|
2512
|
+
let e = k.current;
|
|
2513
|
+
if (!e || !di) return;
|
|
2468
2514
|
let t = st({
|
|
2469
2515
|
document: e.ownerDocument,
|
|
2470
|
-
t: (e, t) =>
|
|
2516
|
+
t: (e, t) => wo.current.dragT(e, t),
|
|
2471
2517
|
preview: !1,
|
|
2472
2518
|
autoScroll: { axis: "y" },
|
|
2473
2519
|
onDrop: ({ items: e, target: t, reason: n, event: r }) => {
|
|
2474
2520
|
if (t.kind !== "between") return;
|
|
2475
|
-
let i =
|
|
2476
|
-
i &&
|
|
2521
|
+
let i = Do(e[0], t.index);
|
|
2522
|
+
i && wo.current.onRowsReorder?.({
|
|
2477
2523
|
...i,
|
|
2478
2524
|
reason: n === "keyboard" ? "keyboard" : "pointer",
|
|
2479
2525
|
event: r
|
|
2480
2526
|
});
|
|
2481
2527
|
}
|
|
2482
|
-
}), n = () =>
|
|
2528
|
+
}), n = () => wo.current.mountedNodes.flatMap((e) => e.kind === "row" ? [e.key] : []), r = (t) => e.querySelector(`[data-part="body"] > [data-part="row"][data-row="${CSS.escape(t)}"]`);
|
|
2483
2529
|
t.registerContainer({
|
|
2484
2530
|
key: "rows",
|
|
2485
2531
|
items: n,
|
|
2486
2532
|
orientation: "vertical",
|
|
2487
2533
|
element: () => e.querySelector("[data-part=\"body\"]"),
|
|
2488
2534
|
itemElement: r,
|
|
2489
|
-
label: () =>
|
|
2490
|
-
itemLabel: (e) =>
|
|
2535
|
+
label: () => wo.current.t("dragRows"),
|
|
2536
|
+
itemLabel: (e) => wo.current.labelOf(e)
|
|
2491
2537
|
});
|
|
2492
2538
|
let i = t.subscribe((e) => {
|
|
2493
2539
|
if (e.status !== "dragging") {
|
|
2494
|
-
|
|
2540
|
+
yo({
|
|
2495
2541
|
dragging: null,
|
|
2496
2542
|
offset: null,
|
|
2497
2543
|
scrollLeft: 0
|
|
2498
2544
|
});
|
|
2499
2545
|
return;
|
|
2500
2546
|
}
|
|
2501
|
-
let t = e.items[0] ?? null, i = e.target && e.target.kind === "between" ? e.target : null, a = null, o = 0, s =
|
|
2547
|
+
let t = e.items[0] ?? null, i = e.target && e.target.kind === "between" ? e.target : null, a = null, o = 0, s = Nn.current;
|
|
2502
2548
|
if (i && s) {
|
|
2503
2549
|
let e = n(), t = i.index >= e.length, c = e[t ? e.length - 1 : i.index], l = c ? r(c) : null;
|
|
2504
2550
|
if (l) {
|
|
@@ -2506,165 +2552,165 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
2506
2552
|
a = (t ? e.bottom : e.top) - n.top + s.scrollTop, o = Math.abs(s.scrollLeft);
|
|
2507
2553
|
}
|
|
2508
2554
|
}
|
|
2509
|
-
|
|
2555
|
+
yo({
|
|
2510
2556
|
dragging: t,
|
|
2511
2557
|
offset: a,
|
|
2512
2558
|
scrollLeft: o
|
|
2513
2559
|
});
|
|
2514
2560
|
});
|
|
2515
|
-
|
|
2516
|
-
for (let [e, t] of
|
|
2517
|
-
let a =
|
|
2561
|
+
bo.current = t;
|
|
2562
|
+
for (let [e, t] of xo.current) To(t, e);
|
|
2563
|
+
let a = So.current;
|
|
2518
2564
|
return () => {
|
|
2519
2565
|
i();
|
|
2520
2566
|
for (let e of a.values()) e();
|
|
2521
|
-
a.clear(), t.destroy(),
|
|
2567
|
+
a.clear(), t.destroy(), bo.current = null;
|
|
2522
2568
|
};
|
|
2523
2569
|
}, [
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2570
|
+
di,
|
|
2571
|
+
To,
|
|
2572
|
+
Do
|
|
2527
2573
|
]);
|
|
2528
|
-
let
|
|
2529
|
-
if (!
|
|
2530
|
-
let r =
|
|
2574
|
+
let Oo = y((e, t, n) => {
|
|
2575
|
+
if (!wo.current.rowsReorderableNow) return;
|
|
2576
|
+
let r = wo.current.mountedNodes.filter((e) => e.kind === "row").findIndex((t) => t.key === e);
|
|
2531
2577
|
if (r < 0) return;
|
|
2532
2578
|
let i = t > 0 ? r + 2 : r - 1;
|
|
2533
2579
|
if (i < 0) return;
|
|
2534
|
-
let a =
|
|
2580
|
+
let a = Do(e, i);
|
|
2535
2581
|
a && (Ie?.({
|
|
2536
2582
|
...a,
|
|
2537
2583
|
reason: "keyboard",
|
|
2538
2584
|
event: n
|
|
2539
2585
|
}), Z(j("rowMoved", {
|
|
2540
|
-
row:
|
|
2586
|
+
row: wo.current.labelOf(e),
|
|
2541
2587
|
position: a.to + 1
|
|
2542
2588
|
})));
|
|
2543
2589
|
}, [
|
|
2544
|
-
|
|
2590
|
+
Do,
|
|
2545
2591
|
Ie,
|
|
2546
2592
|
Z,
|
|
2547
2593
|
j
|
|
2548
|
-
]),
|
|
2594
|
+
]), ko = ve === !0 ? _n : ve || 0, Ao = S(/* @__PURE__ */ new Map()), jo = S(0), [Mo, No] = C(0), Po = S(null), Fo = S(null);
|
|
2549
2595
|
b(() => {
|
|
2550
|
-
if (
|
|
2551
|
-
|
|
2596
|
+
if (ko <= 0) {
|
|
2597
|
+
Fo.current = null;
|
|
2552
2598
|
return;
|
|
2553
2599
|
}
|
|
2554
|
-
let e =
|
|
2600
|
+
let e = Fo.current, t = /* @__PURE__ */ new Map();
|
|
2555
2601
|
for (let e of L) t.set(P(e), e);
|
|
2556
|
-
if (
|
|
2602
|
+
if (Fo.current = {
|
|
2557
2603
|
rows: L,
|
|
2558
2604
|
byKey: t
|
|
2559
2605
|
}, !e || e.rows === L) return;
|
|
2560
2606
|
let n = Date.now(), r = !1;
|
|
2561
2607
|
for (let t of [
|
|
2562
2608
|
...W.top,
|
|
2563
|
-
|
|
2609
|
+
...$i,
|
|
2564
2610
|
...W.bottom
|
|
2565
2611
|
]) {
|
|
2566
2612
|
if (t.kind !== "row") continue;
|
|
2567
2613
|
let i = e.byKey.get(t.key);
|
|
2568
|
-
if (i !== void 0 && i !== t.row) for (let e of V) Object.is(gt(e.column, i), gt(e.column, t.row)) || (
|
|
2569
|
-
until: n +
|
|
2570
|
-
generation:
|
|
2614
|
+
if (i !== void 0 && i !== t.row) for (let e of V) Object.is(gt(e.column, i), gt(e.column, t.row)) || (Ao.current.set(`${t.key}\u0000${e.id}`, {
|
|
2615
|
+
until: n + ko,
|
|
2616
|
+
generation: jo.current + 1
|
|
2571
2617
|
}), r = !0);
|
|
2572
2618
|
}
|
|
2573
|
-
if (r && (
|
|
2619
|
+
if (r && (jo.current += 1, No((e) => e + 1), Po.current === null)) {
|
|
2574
2620
|
let e = () => {
|
|
2575
|
-
|
|
2621
|
+
Po.current = null;
|
|
2576
2622
|
let t = Date.now(), n = Infinity;
|
|
2577
|
-
for (let [e, r] of
|
|
2578
|
-
|
|
2623
|
+
for (let [e, r] of Ao.current) r.until <= t ? Ao.current.delete(e) : n = Math.min(n, r.until);
|
|
2624
|
+
No((e) => e + 1), n !== Infinity && (Po.current = setTimeout(e, Math.max(16, n - t)));
|
|
2579
2625
|
};
|
|
2580
|
-
|
|
2626
|
+
Po.current = setTimeout(e, ko);
|
|
2581
2627
|
}
|
|
2582
2628
|
}, [
|
|
2583
2629
|
L,
|
|
2584
2630
|
P,
|
|
2585
|
-
|
|
2631
|
+
$i,
|
|
2586
2632
|
W,
|
|
2587
2633
|
V,
|
|
2588
|
-
|
|
2634
|
+
ko
|
|
2589
2635
|
]), b(() => () => {
|
|
2590
|
-
|
|
2636
|
+
Po.current !== null && clearTimeout(Po.current);
|
|
2591
2637
|
}, []);
|
|
2592
|
-
let
|
|
2593
|
-
let t =
|
|
2638
|
+
let Io = y((e) => {
|
|
2639
|
+
let t = Ao.current.get(`${e.row}\u0000${e.column}`);
|
|
2594
2640
|
return t ? t.generation % 2 == 0 ? "a" : "b" : null;
|
|
2595
|
-
}, [
|
|
2596
|
-
let r =
|
|
2597
|
-
|
|
2641
|
+
}, [Mo]), Lo = x(() => new Set(oi), [oi]), Ro = y((e) => Lo.has(e), [Lo]), zo = y((e, t, n = "pointer") => {
|
|
2642
|
+
let r = Lo.has(e) ? oi.filter((t) => t !== e) : [...oi, e];
|
|
2643
|
+
si(r, n, t);
|
|
2598
2644
|
}, [
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
]),
|
|
2603
|
-
|
|
2645
|
+
Lo,
|
|
2646
|
+
oi,
|
|
2647
|
+
si
|
|
2648
|
+
]), Bo = x(() => A ? A.column && H.has(A.column) ? A.column : V[0]?.id ?? null : null, [
|
|
2649
|
+
A,
|
|
2604
2650
|
H,
|
|
2605
2651
|
V
|
|
2606
|
-
]), [
|
|
2652
|
+
]), [Vo, Ho] = C(/* @__PURE__ */ new Set()), Uo = y((e) => Vo.has(e), [Vo]), Wo = y((e) => A?.hasChildren?.(e) === !0, [A]);
|
|
2607
2653
|
b(() => {
|
|
2608
|
-
if (
|
|
2609
|
-
let e = new Set(
|
|
2610
|
-
for (let t of
|
|
2611
|
-
let n =
|
|
2612
|
-
(!n || !
|
|
2654
|
+
if (Vo.size === 0) return;
|
|
2655
|
+
let e = new Set(Vo);
|
|
2656
|
+
for (let t of Vo) {
|
|
2657
|
+
let n = go.get(t);
|
|
2658
|
+
(!n || !Lo.has(t) || n.childCount > 0) && e.delete(t);
|
|
2613
2659
|
}
|
|
2614
|
-
e.size !==
|
|
2660
|
+
e.size !== Vo.size && Ho(e);
|
|
2615
2661
|
}, [
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2662
|
+
Vo,
|
|
2663
|
+
go,
|
|
2664
|
+
Lo
|
|
2619
2665
|
]);
|
|
2620
|
-
let
|
|
2621
|
-
let r =
|
|
2666
|
+
let Go = y((e, t, n = "pointer") => {
|
|
2667
|
+
let r = go.get(e);
|
|
2622
2668
|
if (!r) return;
|
|
2623
|
-
let i = !
|
|
2624
|
-
|
|
2669
|
+
let i = !Lo.has(e);
|
|
2670
|
+
zo(e, t, n), i && r.childCount === 0 && A?.hasChildren?.(r.row) && Fe && (Ho((t) => new Set(t).add(e)), Fe({
|
|
2625
2671
|
key: e,
|
|
2626
2672
|
row: r.row
|
|
2627
2673
|
}));
|
|
2628
2674
|
}, [
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2675
|
+
go,
|
|
2676
|
+
Lo,
|
|
2677
|
+
zo,
|
|
2678
|
+
A,
|
|
2633
2679
|
Fe
|
|
2634
|
-
]),
|
|
2635
|
-
let r =
|
|
2636
|
-
i =
|
|
2680
|
+
]), Ko = x(() => G.filter((e) => e.kind === "group").map((e) => e.key), [G]), qo = y((e, t, n = "pointer") => {
|
|
2681
|
+
let r = ci === "all" || ci.includes(e), i;
|
|
2682
|
+
i = ci === "all" ? Ko.filter((t) => t !== e && !t.startsWith(`${e}/`)) : r ? ci.filter((t) => t !== e) : [...ci, e], li(i, n, t);
|
|
2637
2683
|
}, [
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
]), [
|
|
2642
|
-
|
|
2643
|
-
let Q = y((e) =>
|
|
2644
|
-
let n = Q(e.row), r =
|
|
2684
|
+
ci,
|
|
2685
|
+
Ko,
|
|
2686
|
+
li
|
|
2687
|
+
]), [Jo, Yo] = C(null), Xo = S(Jo);
|
|
2688
|
+
Xo.current = Jo;
|
|
2689
|
+
let Q = y((e) => go.get(e)?.row, [go]), Zo = y((e, t = null) => {
|
|
2690
|
+
let n = Q(e.row), r = c.find((t) => t.id === e.column);
|
|
2645
2691
|
if (!n || !r || !F(r, n)) return;
|
|
2646
|
-
let i =
|
|
2692
|
+
let i = rr === "row" ? c.filter((e) => F(e, n)).map((e) => e.id) : [e.column], a = {};
|
|
2647
2693
|
for (let e of i) {
|
|
2648
|
-
let t =
|
|
2694
|
+
let t = c.find((t) => t.id === e);
|
|
2649
2695
|
a[e] = gt(t, n);
|
|
2650
2696
|
}
|
|
2651
|
-
let
|
|
2652
|
-
t !== null && (
|
|
2697
|
+
let o = { ...a };
|
|
2698
|
+
t !== null && (o[e.column] = r.kind === "number" ? Number(t) : t), Yo({
|
|
2653
2699
|
cell: e,
|
|
2654
2700
|
columns: i,
|
|
2655
|
-
drafts:
|
|
2701
|
+
drafts: o,
|
|
2656
2702
|
originals: a,
|
|
2657
2703
|
status: "editing",
|
|
2658
2704
|
messages: {},
|
|
2659
2705
|
seed: t
|
|
2660
|
-
}), Me?.(e),
|
|
2706
|
+
}), Me?.(e), wa.current = e;
|
|
2661
2707
|
}, [
|
|
2662
2708
|
Q,
|
|
2663
|
-
|
|
2709
|
+
c,
|
|
2664
2710
|
F,
|
|
2665
|
-
|
|
2711
|
+
rr,
|
|
2666
2712
|
Me
|
|
2667
|
-
]),
|
|
2713
|
+
]), Qo = y((e, t) => {
|
|
2668
2714
|
let n = (n) => n && {
|
|
2669
2715
|
...n,
|
|
2670
2716
|
drafts: {
|
|
@@ -2673,19 +2719,19 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
2673
2719
|
},
|
|
2674
2720
|
status: "editing"
|
|
2675
2721
|
};
|
|
2676
|
-
|
|
2677
|
-
}, []),
|
|
2678
|
-
let e =
|
|
2679
|
-
e && (
|
|
2680
|
-
}, [Ae]),
|
|
2722
|
+
Xo.current = n(Xo.current), Yo(n);
|
|
2723
|
+
}, []), $o = y(() => {
|
|
2724
|
+
let e = Xo.current;
|
|
2725
|
+
e && (Yo(null), Ae?.(e.cell), wa.current = e.cell);
|
|
2726
|
+
}, [Ae]), es = y((e, t) => {
|
|
2681
2727
|
if (t === "down") {
|
|
2682
|
-
let t =
|
|
2683
|
-
return E(t, e) || !
|
|
2728
|
+
let t = Tt(Y, e, "down");
|
|
2729
|
+
return E(t, e) || !Mr(t.row) ? null : t;
|
|
2684
2730
|
}
|
|
2685
2731
|
let n = Q(e.row);
|
|
2686
2732
|
if (!n) return null;
|
|
2687
2733
|
let r = U.filter((e) => {
|
|
2688
|
-
let t =
|
|
2734
|
+
let t = c.find((t) => t.id === e);
|
|
2689
2735
|
return t !== void 0 && F(t, n);
|
|
2690
2736
|
}), i = r[r.indexOf(e.column) + (t === "next" ? 1 : -1)];
|
|
2691
2737
|
return i ? {
|
|
@@ -2696,91 +2742,91 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
2696
2742
|
Y,
|
|
2697
2743
|
Q,
|
|
2698
2744
|
U,
|
|
2699
|
-
|
|
2745
|
+
c,
|
|
2700
2746
|
F
|
|
2701
2747
|
]), $ = y((e, t = {}) => {
|
|
2702
|
-
let n =
|
|
2748
|
+
let n = Xo.current;
|
|
2703
2749
|
if (!n || n.status === "pending") return;
|
|
2704
2750
|
let r = Q(n.cell.row);
|
|
2705
2751
|
if (!r) {
|
|
2706
|
-
|
|
2752
|
+
Yo(null);
|
|
2707
2753
|
return;
|
|
2708
2754
|
}
|
|
2709
2755
|
let i = {};
|
|
2710
2756
|
for (let e of n.columns) Object.is(n.drafts[e], n.originals[e]) || (i[e] = n.drafts[e]);
|
|
2711
2757
|
let a = () => {
|
|
2712
|
-
let e = t.move ?? "stay", r = e === "stay" ? null :
|
|
2713
|
-
|
|
2758
|
+
let e = t.move ?? "stay", r = e === "stay" ? null : es(n.cell, e);
|
|
2759
|
+
Yo(null), r ? (Ea(r, "keyboard"), rr === "cell" && e !== "down" && Zo(r)) : wa.current = n.cell;
|
|
2714
2760
|
};
|
|
2715
2761
|
if (Object.keys(i).length === 0) {
|
|
2716
2762
|
a();
|
|
2717
2763
|
return;
|
|
2718
2764
|
}
|
|
2719
|
-
let
|
|
2765
|
+
let o = async () => {
|
|
2720
2766
|
let e = {};
|
|
2721
2767
|
for (let t of Object.keys(i)) {
|
|
2722
|
-
let n =
|
|
2768
|
+
let n = c.find((e) => e.id === t), a = n.parse ? n.parse(i[t], r) : i[t];
|
|
2723
2769
|
i[t] = a;
|
|
2724
|
-
let
|
|
2725
|
-
|
|
2770
|
+
let o = n.validate ? await n.validate(a, r) : null;
|
|
2771
|
+
o && (e[t] = o);
|
|
2726
2772
|
}
|
|
2727
2773
|
return e;
|
|
2728
2774
|
};
|
|
2729
2775
|
(async () => {
|
|
2730
|
-
|
|
2776
|
+
Yo((e) => e && {
|
|
2731
2777
|
...e,
|
|
2732
2778
|
status: "pending"
|
|
2733
2779
|
});
|
|
2734
|
-
let t = await
|
|
2780
|
+
let t = await o();
|
|
2735
2781
|
if (Object.keys(t).length > 0) {
|
|
2736
|
-
|
|
2782
|
+
Yo((e) => e && {
|
|
2737
2783
|
...e,
|
|
2738
2784
|
status: "invalid",
|
|
2739
2785
|
messages: t
|
|
2740
|
-
}),
|
|
2786
|
+
}), wa.current = n.cell;
|
|
2741
2787
|
return;
|
|
2742
2788
|
}
|
|
2743
|
-
let
|
|
2789
|
+
let s = n.cell.column in i ? n.cell.column : Object.keys(i)[0];
|
|
2744
2790
|
try {
|
|
2745
2791
|
await je?.({
|
|
2746
2792
|
key: n.cell.row,
|
|
2747
|
-
column:
|
|
2748
|
-
value: i[
|
|
2749
|
-
previous: n.originals[
|
|
2793
|
+
column: s,
|
|
2794
|
+
value: i[s],
|
|
2795
|
+
previous: n.originals[s],
|
|
2750
2796
|
row: r,
|
|
2751
2797
|
reason: e,
|
|
2752
2798
|
changes: i
|
|
2753
2799
|
}), a();
|
|
2754
2800
|
} catch (e) {
|
|
2755
2801
|
let t = e instanceof Error && e.message ? e.message : j("editFailed");
|
|
2756
|
-
|
|
2802
|
+
Yo((e) => e && {
|
|
2757
2803
|
...e,
|
|
2758
2804
|
status: "invalid",
|
|
2759
|
-
messages: { [
|
|
2760
|
-
}),
|
|
2805
|
+
messages: { [s]: t }
|
|
2806
|
+
}), wa.current = n.cell;
|
|
2761
2807
|
}
|
|
2762
2808
|
})();
|
|
2763
2809
|
}, [
|
|
2764
2810
|
Q,
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2811
|
+
es,
|
|
2812
|
+
Ea,
|
|
2813
|
+
rr,
|
|
2814
|
+
Zo,
|
|
2815
|
+
c,
|
|
2770
2816
|
je,
|
|
2771
2817
|
j
|
|
2772
|
-
]),
|
|
2818
|
+
]), ts = j("editConflict");
|
|
2773
2819
|
b(() => {
|
|
2774
|
-
let e =
|
|
2820
|
+
let e = Xo.current;
|
|
2775
2821
|
if (!e || e.status === "pending") return;
|
|
2776
2822
|
let t = Q(e.cell.row);
|
|
2777
2823
|
if (!t) return;
|
|
2778
2824
|
let n = {};
|
|
2779
2825
|
for (let r of e.columns) {
|
|
2780
|
-
let i =
|
|
2781
|
-
i && !Object.is(gt(i, t), e.originals[r]) && (n[r] =
|
|
2826
|
+
let i = c.find((e) => e.id === r);
|
|
2827
|
+
i && !Object.is(gt(i, t), e.originals[r]) && (n[r] = ts);
|
|
2782
2828
|
}
|
|
2783
|
-
Object.keys(n).length > 0 &&
|
|
2829
|
+
Object.keys(n).length > 0 && Yo({
|
|
2784
2830
|
...e,
|
|
2785
2831
|
status: "invalid",
|
|
2786
2832
|
messages: {
|
|
@@ -2791,10 +2837,10 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
2791
2837
|
}, [
|
|
2792
2838
|
L,
|
|
2793
2839
|
Q,
|
|
2794
|
-
|
|
2795
|
-
|
|
2840
|
+
c,
|
|
2841
|
+
ts
|
|
2796
2842
|
]);
|
|
2797
|
-
let
|
|
2843
|
+
let ns = y((e, t, n) => {
|
|
2798
2844
|
De?.({
|
|
2799
2845
|
key: e,
|
|
2800
2846
|
reason: t,
|
|
@@ -2802,10 +2848,10 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
2802
2848
|
});
|
|
2803
2849
|
}, [De]);
|
|
2804
2850
|
b(() => {
|
|
2805
|
-
let e =
|
|
2851
|
+
let e = Nn.current;
|
|
2806
2852
|
if (!e) return;
|
|
2807
2853
|
let t = 0, n = () => {
|
|
2808
|
-
t = 0,
|
|
2854
|
+
t = 0, Vi(e.scrollTop), Ui(Math.abs(e.scrollLeft));
|
|
2809
2855
|
}, r = () => {
|
|
2810
2856
|
t === 0 && (t = requestAnimationFrame(n));
|
|
2811
2857
|
};
|
|
@@ -2814,17 +2860,17 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
2814
2860
|
let t = e.querySelector(":scope > [data-part=\"head\"]"), n = e.querySelector(":scope > [data-part=\"summary\"]");
|
|
2815
2861
|
e.style.setProperty("--slotted-data-grid-pinned-top-offset", `${t?.offsetHeight ?? 0}px`), e.style.setProperty("--slotted-data-grid-pinned-bottom-offset", `${n?.offsetHeight ?? 0}px`);
|
|
2816
2862
|
}, a = typeof ResizeObserver > "u" ? null : new ResizeObserver(() => {
|
|
2817
|
-
|
|
2863
|
+
Wi({
|
|
2818
2864
|
width: e.clientWidth,
|
|
2819
2865
|
height: e.clientHeight
|
|
2820
|
-
}),
|
|
2866
|
+
}), _i(e.clientWidth), i();
|
|
2821
2867
|
});
|
|
2822
2868
|
a?.observe(e);
|
|
2823
2869
|
for (let t of e.querySelectorAll(":scope > [data-part=\"head\"], :scope > [data-part=\"summary\"]")) a?.observe(t);
|
|
2824
|
-
|
|
2870
|
+
Wi({
|
|
2825
2871
|
width: e.clientWidth,
|
|
2826
2872
|
height: e.clientHeight
|
|
2827
|
-
}), a &&
|
|
2873
|
+
}), a && _i(e.clientWidth), i();
|
|
2828
2874
|
let o = Ue(e, {
|
|
2829
2875
|
orientation: () => "horizontal",
|
|
2830
2876
|
onChange: (t) => {
|
|
@@ -2835,64 +2881,58 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
2835
2881
|
e.removeEventListener("scroll", r), t && cancelAnimationFrame(t), a?.disconnect(), o.destroy();
|
|
2836
2882
|
};
|
|
2837
2883
|
}, []);
|
|
2838
|
-
let
|
|
2884
|
+
let rs = Ci ? `${xi}\u0002${gi}` : xi, is = y((e, t) => {
|
|
2839
2885
|
if (!t) return;
|
|
2840
|
-
let n = typeof
|
|
2841
|
-
if (!n && !
|
|
2886
|
+
let n = typeof or != "number" && Gi === null;
|
|
2887
|
+
if (!n && !Yi) return;
|
|
2842
2888
|
let r = t.getBoundingClientRect().height;
|
|
2843
|
-
r !== 0 && (n &&
|
|
2889
|
+
r !== 0 && (n && Ki(Math.round(r)), Yi && Ji((t) => t.get(e) === r ? t : new Map(t).set(e, r)));
|
|
2844
2890
|
}, [
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
]);
|
|
2850
|
-
b(() => {
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2891
|
+
or,
|
|
2892
|
+
Gi,
|
|
2893
|
+
Yi,
|
|
2894
|
+
rs
|
|
2895
|
+
]), as = Ve !== void 0 && Kr === !0 && !Jr && Ar !== "button" && Se !== !0, os = Math.max(0, G.length - ur), ss = Zi ? Zi.offsetOf(os) : os * q, cs = S(null), ls = S(Ve);
|
|
2896
|
+
ls.current = Ve, b(() => {
|
|
2897
|
+
let e = cs.current;
|
|
2898
|
+
if (!as || e === null || typeof IntersectionObserver > "u") return;
|
|
2899
|
+
let t = new IntersectionObserver((e) => {
|
|
2900
|
+
e.some((e) => e.isIntersecting) && ls.current?.();
|
|
2901
|
+
});
|
|
2902
|
+
return t.observe(e), () => t.disconnect();
|
|
2854
2903
|
}, [
|
|
2855
|
-
|
|
2856
|
-
Pr,
|
|
2857
|
-
Ir,
|
|
2858
|
-
$n,
|
|
2859
|
-
Se,
|
|
2904
|
+
as,
|
|
2860
2905
|
G.length,
|
|
2861
|
-
|
|
2862
|
-
Ri,
|
|
2863
|
-
Qn,
|
|
2864
|
-
Oi,
|
|
2865
|
-
K.height,
|
|
2866
|
-
q
|
|
2906
|
+
ss
|
|
2867
2907
|
]);
|
|
2868
|
-
let
|
|
2869
|
-
let t = X ?
|
|
2870
|
-
let t = Q(e.row), n =
|
|
2871
|
-
return t && n ?
|
|
2908
|
+
let us = () => k.current ? getComputedStyle(k.current).direction === "rtl" : !1, ds = y(async (e) => {
|
|
2909
|
+
let t = X ? kt(Y, X) : [[e]], n = jt(t, (e) => {
|
|
2910
|
+
let t = Q(e.row), n = c.find((t) => t.id === e.column);
|
|
2911
|
+
return t && n ? Rr(n, t) : "";
|
|
2872
2912
|
});
|
|
2873
|
-
await ot(n,
|
|
2913
|
+
await ot(n, k.current?.ownerDocument) !== "refused" && Z(j("copied", { count: t.reduce((e, t) => e + t.length, 0) }));
|
|
2874
2914
|
}, [
|
|
2875
2915
|
X,
|
|
2876
2916
|
Y,
|
|
2877
2917
|
Q,
|
|
2878
|
-
|
|
2879
|
-
|
|
2918
|
+
c,
|
|
2919
|
+
Rr,
|
|
2880
2920
|
Z,
|
|
2881
2921
|
j
|
|
2882
|
-
]),
|
|
2922
|
+
]), fs = y((e, t) => {
|
|
2883
2923
|
if (e.defaultPrevented) return;
|
|
2884
|
-
let n =
|
|
2924
|
+
let n = Xo.current, r = e.target, i = e.currentTarget, a = r !== i, o = e.key, s = us();
|
|
2885
2925
|
if (n && E(n.cell, t)) {
|
|
2886
2926
|
if (o === "Escape") {
|
|
2887
|
-
e.preventDefault(), e.stopPropagation(),
|
|
2927
|
+
e.preventDefault(), e.stopPropagation(), $o();
|
|
2888
2928
|
return;
|
|
2889
2929
|
}
|
|
2890
2930
|
if (o === "Enter") {
|
|
2891
|
-
e.preventDefault(), $("keyboard", { move:
|
|
2931
|
+
e.preventDefault(), $("keyboard", { move: rr === "cell" ? "down" : "stay" });
|
|
2892
2932
|
return;
|
|
2893
2933
|
}
|
|
2894
2934
|
if (o === "Tab") {
|
|
2895
|
-
|
|
2935
|
+
es(t, e.shiftKey ? "previous" : "next") ? (e.preventDefault(), $("keyboard", { move: e.shiftKey ? "previous" : "next" })) : $("keyboard", { move: "stay" });
|
|
2896
2936
|
return;
|
|
2897
2937
|
}
|
|
2898
2938
|
if (o === "F2") {
|
|
@@ -2903,7 +2943,7 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
2903
2943
|
}
|
|
2904
2944
|
if (n && n.columns.includes(t.column) && n.cell.row === t.row) {
|
|
2905
2945
|
if (o === "Escape") {
|
|
2906
|
-
e.preventDefault(),
|
|
2946
|
+
e.preventDefault(), $o();
|
|
2907
2947
|
return;
|
|
2908
2948
|
}
|
|
2909
2949
|
if (o === "Enter") {
|
|
@@ -2926,7 +2966,7 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
2926
2966
|
if (a && !r.matches("a[href], button, input[type=\"checkbox\"], input[type=\"radio\"], [role=\"switch\"], [role=\"button\"], [role=\"checkbox\"]")) {
|
|
2927
2967
|
if (o === "Escape") e.preventDefault(), i.focus();
|
|
2928
2968
|
else if (o === "Tab") {
|
|
2929
|
-
let t = [...i.querySelectorAll(
|
|
2969
|
+
let t = [...i.querySelectorAll(pn)];
|
|
2930
2970
|
if (t.length > 1) {
|
|
2931
2971
|
let n = t[(t.indexOf(r) + (e.shiftKey ? -1 : 1) + t.length) % t.length];
|
|
2932
2972
|
e.preventDefault(), n?.focus();
|
|
@@ -2934,7 +2974,7 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
2934
2974
|
}
|
|
2935
2975
|
return;
|
|
2936
2976
|
}
|
|
2937
|
-
let c = t.row === ut, l = H.get(t.column), u =
|
|
2977
|
+
let c = t.row === ut, l = H.get(t.column), u = Mr(t.row) ? Q(t.row) : void 0, d = {
|
|
2938
2978
|
ArrowUp: "up",
|
|
2939
2979
|
ArrowDown: "down",
|
|
2940
2980
|
ArrowLeft: s ? "end" : "start",
|
|
@@ -2945,18 +2985,18 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
2945
2985
|
PageDown: "pageDown"
|
|
2946
2986
|
};
|
|
2947
2987
|
if (c && l) {
|
|
2948
|
-
if ((o === "ContextMenu" || o === "F10" && e.shiftKey) && !r.closest(
|
|
2949
|
-
e.preventDefault(),
|
|
2988
|
+
if ((o === "ContextMenu" || o === "F10" && e.shiftKey) && !r.closest(vr)) {
|
|
2989
|
+
e.preventDefault(), Va.current = Date.now(), Ha(t.column, i, i);
|
|
2950
2990
|
return;
|
|
2951
2991
|
}
|
|
2952
2992
|
if ((e.ctrlKey || e.metaKey) && e.shiftKey && (o === "ArrowLeft" || o === "ArrowRight")) {
|
|
2953
2993
|
e.preventDefault();
|
|
2954
2994
|
let n = o === "ArrowRight" !== s;
|
|
2955
|
-
|
|
2995
|
+
Za(t.column, n ? ft : -ft, e);
|
|
2956
2996
|
return;
|
|
2957
2997
|
}
|
|
2958
2998
|
if ((e.ctrlKey || e.metaKey) && e.shiftKey && o === "Enter") {
|
|
2959
|
-
e.preventDefault(),
|
|
2999
|
+
e.preventDefault(), to(t.column, "keyboard", e);
|
|
2960
3000
|
return;
|
|
2961
3001
|
}
|
|
2962
3002
|
if (o === "F2" && !a) {
|
|
@@ -2967,56 +3007,56 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
2967
3007
|
if (e.altKey && (o === "ArrowLeft" || o === "ArrowRight")) {
|
|
2968
3008
|
e.preventDefault();
|
|
2969
3009
|
let n = o === "ArrowRight" !== s;
|
|
2970
|
-
|
|
3010
|
+
no(t.column, n ? 1 : -1, e), wa.current = t;
|
|
2971
3011
|
return;
|
|
2972
3012
|
}
|
|
2973
3013
|
if ((e.ctrlKey || e.metaKey) && o === "Enter") {
|
|
2974
|
-
e.preventDefault(),
|
|
3014
|
+
e.preventDefault(), Ua(), Ra(t.column);
|
|
2975
3015
|
return;
|
|
2976
3016
|
}
|
|
2977
3017
|
if (o === "Enter" || o === " ") {
|
|
2978
3018
|
if (a) return;
|
|
2979
|
-
e.preventDefault(),
|
|
3019
|
+
e.preventDefault(), ja(t.column, e.shiftKey, e, "keyboard");
|
|
2980
3020
|
return;
|
|
2981
3021
|
}
|
|
2982
3022
|
}
|
|
2983
|
-
if (
|
|
2984
|
-
let n = t.row.slice(lt.length), r =
|
|
3023
|
+
if (wt(t.row) && (o === "ArrowRight" || o === "ArrowLeft") && !e.shiftKey) {
|
|
3024
|
+
let n = t.row.slice(lt.length), r = ci === "all" || ci.includes(n);
|
|
2985
3025
|
if (o === "ArrowRight" !== s !== r) {
|
|
2986
|
-
e.preventDefault(),
|
|
3026
|
+
e.preventDefault(), qo(n, e, "keyboard");
|
|
2987
3027
|
return;
|
|
2988
3028
|
}
|
|
2989
3029
|
}
|
|
2990
3030
|
if (u && e.altKey && (o === "ArrowUp" || o === "ArrowDown")) {
|
|
2991
|
-
e.preventDefault(),
|
|
3031
|
+
e.preventDefault(), Oo(t.row, o === "ArrowDown" ? 1 : -1, e), wa.current = t;
|
|
2992
3032
|
return;
|
|
2993
3033
|
}
|
|
2994
|
-
if (u &&
|
|
2995
|
-
let n =
|
|
3034
|
+
if (u && Bo !== null && t.column === Bo && (o === "ArrowRight" || o === "ArrowLeft") && !e.shiftKey) {
|
|
3035
|
+
let n = go.get(t.row), r = n !== void 0 && (n.childCount > 0 || A?.hasChildren?.(u) === !0), i = o === "ArrowRight" !== s;
|
|
2996
3036
|
if (n && r && i !== n.open) {
|
|
2997
|
-
e.preventDefault(),
|
|
3037
|
+
e.preventDefault(), Go(t.row, e, "keyboard");
|
|
2998
3038
|
return;
|
|
2999
3039
|
}
|
|
3000
3040
|
if (n && !i && n.parent !== null) {
|
|
3001
|
-
e.preventDefault(),
|
|
3041
|
+
e.preventDefault(), Ea({
|
|
3002
3042
|
row: n.parent,
|
|
3003
3043
|
column: t.column
|
|
3004
3044
|
}, "keyboard", e);
|
|
3005
3045
|
return;
|
|
3006
3046
|
}
|
|
3007
3047
|
}
|
|
3008
|
-
if (u && t.column === "__expander" && (o === "ArrowRight" || o === "ArrowLeft") && !e.shiftKey &&
|
|
3009
|
-
let n =
|
|
3048
|
+
if (u && t.column === "__expander" && (o === "ArrowRight" || o === "ArrowLeft") && !e.shiftKey && Hr(u)) {
|
|
3049
|
+
let n = Lo.has(t.row);
|
|
3010
3050
|
if (o === "ArrowRight" !== s !== n) {
|
|
3011
|
-
e.preventDefault(),
|
|
3051
|
+
e.preventDefault(), zo(t.row, e, "keyboard");
|
|
3012
3052
|
return;
|
|
3013
3053
|
}
|
|
3014
3054
|
}
|
|
3015
3055
|
if (o === " " && e.shiftKey && u) {
|
|
3016
3056
|
if (e.preventDefault(), M === "range") {
|
|
3017
|
-
let n =
|
|
3018
|
-
n &&
|
|
3019
|
-
} else
|
|
3057
|
+
let n = Pt(Y, t.row);
|
|
3058
|
+
n && ii(n, "keyboard", e);
|
|
3059
|
+
} else pa(t.row, {
|
|
3020
3060
|
range: !1,
|
|
3021
3061
|
source: e,
|
|
3022
3062
|
reason: "keyboard"
|
|
@@ -3025,8 +3065,8 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
3025
3065
|
}
|
|
3026
3066
|
if (o === " " && (e.ctrlKey || e.metaKey) && M === "range" && l) {
|
|
3027
3067
|
e.preventDefault();
|
|
3028
|
-
let n =
|
|
3029
|
-
n &&
|
|
3068
|
+
let n = vt(Y, t.column);
|
|
3069
|
+
n && ii(n, "keyboard", e);
|
|
3030
3070
|
return;
|
|
3031
3071
|
}
|
|
3032
3072
|
if ((o === "a" || o === "A") && (e.ctrlKey || e.metaKey) && !a) {
|
|
@@ -3034,198 +3074,198 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
3034
3074
|
e.preventDefault(), (it({
|
|
3035
3075
|
action: "all",
|
|
3036
3076
|
mode: "multiple",
|
|
3037
|
-
selected:
|
|
3077
|
+
selected: aa,
|
|
3038
3078
|
keys: J
|
|
3039
|
-
}).changed ||
|
|
3079
|
+
}).changed || ua < J.length) && fa(J, "select", e);
|
|
3040
3080
|
return;
|
|
3041
3081
|
}
|
|
3042
3082
|
if (M === "range") {
|
|
3043
3083
|
e.preventDefault();
|
|
3044
|
-
let t =
|
|
3045
|
-
t &&
|
|
3084
|
+
let t = zt(Y);
|
|
3085
|
+
t && ii(t, "keyboard", e);
|
|
3046
3086
|
return;
|
|
3047
3087
|
}
|
|
3048
3088
|
}
|
|
3049
3089
|
if ((o === "c" || o === "C") && (e.ctrlKey || e.metaKey) && !a) {
|
|
3050
3090
|
let n = i.ownerDocument.getSelection();
|
|
3051
3091
|
if (n && n.toString().length > 0) return;
|
|
3052
|
-
e.preventDefault(),
|
|
3092
|
+
e.preventDefault(), ds(t);
|
|
3053
3093
|
return;
|
|
3054
3094
|
}
|
|
3055
|
-
if (o === "Escape" && M === "range" &&
|
|
3056
|
-
e.preventDefault(),
|
|
3095
|
+
if (o === "Escape" && M === "range" && ri) {
|
|
3096
|
+
e.preventDefault(), ii(null, "clear", e);
|
|
3057
3097
|
return;
|
|
3058
3098
|
}
|
|
3059
3099
|
if (u && (l || t.column === dt) && (o === "Enter" || o === "F2")) {
|
|
3060
3100
|
if (l !== void 0 && F(l.column, u) && !a) {
|
|
3061
|
-
e.preventDefault(),
|
|
3101
|
+
e.preventDefault(), Zo(t);
|
|
3062
3102
|
return;
|
|
3063
3103
|
}
|
|
3064
|
-
let n = i.querySelectorAll(
|
|
3104
|
+
let n = i.querySelectorAll(pn);
|
|
3065
3105
|
if (!a && n.length > 0) {
|
|
3066
3106
|
e.preventDefault(), n[0].focus();
|
|
3067
3107
|
return;
|
|
3068
3108
|
}
|
|
3069
|
-
if (o === "Enter" &&
|
|
3070
|
-
e.preventDefault(),
|
|
3109
|
+
if (o === "Enter" && Pr && !a) {
|
|
3110
|
+
e.preventDefault(), ns(t.row, "keyboard", e);
|
|
3071
3111
|
return;
|
|
3072
3112
|
}
|
|
3073
3113
|
}
|
|
3074
3114
|
if (u && l && !a && o.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey && (l.kind === "text" || l.kind === "number") && F(l.column, u)) {
|
|
3075
3115
|
if (l.kind === "number" && !/[0-9.,-]/.test(o)) return;
|
|
3076
|
-
e.preventDefault(),
|
|
3116
|
+
e.preventDefault(), Zo(t, o);
|
|
3077
3117
|
return;
|
|
3078
3118
|
}
|
|
3079
3119
|
let f = d[o];
|
|
3080
3120
|
if (!f || a && (o === "ArrowLeft" || o === "ArrowRight" || o === "Home" || o === "End") && r.matches("input:not([type=\"checkbox\"]):not([type=\"radio\"]), textarea")) return;
|
|
3081
3121
|
e.preventDefault();
|
|
3082
|
-
let p =
|
|
3122
|
+
let p = Fi(Tt(Y, t, f));
|
|
3083
3123
|
if (e.shiftKey && o.startsWith("Arrow")) {
|
|
3084
|
-
if (M === "range" &&
|
|
3085
|
-
let n =
|
|
3086
|
-
|
|
3124
|
+
if (M === "range" && Mr(p.row)) {
|
|
3125
|
+
let n = ri?.anchor ?? t;
|
|
3126
|
+
ii({
|
|
3087
3127
|
anchor: n,
|
|
3088
3128
|
focus: p
|
|
3089
3129
|
}, "keyboard", e);
|
|
3090
|
-
} else M === "multiple" && (o === "ArrowUp" || o === "ArrowDown") &&
|
|
3130
|
+
} else M === "multiple" && (o === "ArrowUp" || o === "ArrowDown") && Mr(p.row) && pa(p.row, {
|
|
3091
3131
|
range: !0,
|
|
3092
3132
|
source: e,
|
|
3093
3133
|
reason: "keyboard"
|
|
3094
3134
|
});
|
|
3095
3135
|
}
|
|
3096
|
-
E(p, t) ||
|
|
3136
|
+
E(p, t) || Ea(p, "keyboard", e);
|
|
3097
3137
|
}, [
|
|
3098
|
-
|
|
3138
|
+
$o,
|
|
3099
3139
|
$,
|
|
3100
|
-
|
|
3101
|
-
|
|
3140
|
+
rr,
|
|
3141
|
+
es,
|
|
3102
3142
|
H,
|
|
3103
3143
|
Q,
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
ro,
|
|
3115
|
-
O,
|
|
3116
|
-
No,
|
|
3144
|
+
Za,
|
|
3145
|
+
to,
|
|
3146
|
+
no,
|
|
3147
|
+
ja,
|
|
3148
|
+
ci,
|
|
3149
|
+
qo,
|
|
3150
|
+
Hr,
|
|
3151
|
+
Lo,
|
|
3152
|
+
zo,
|
|
3153
|
+
Bo,
|
|
3117
3154
|
go,
|
|
3155
|
+
A,
|
|
3156
|
+
Go,
|
|
3157
|
+
Oo,
|
|
3118
3158
|
M,
|
|
3119
3159
|
Y,
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3160
|
+
ii,
|
|
3161
|
+
pa,
|
|
3162
|
+
aa,
|
|
3123
3163
|
J,
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3164
|
+
ua,
|
|
3165
|
+
fa,
|
|
3166
|
+
ds,
|
|
3167
|
+
ri,
|
|
3128
3168
|
F,
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
]),
|
|
3137
|
-
if (
|
|
3138
|
-
|
|
3139
|
-
let n =
|
|
3140
|
-
n && !E(n.cell, t) && !(n.cell.row === t.row && n.columns.includes(t.column)) && $("blur", { move: "stay" }), E(t, z) ||
|
|
3169
|
+
Zo,
|
|
3170
|
+
Pr,
|
|
3171
|
+
ns,
|
|
3172
|
+
Ea,
|
|
3173
|
+
Ha,
|
|
3174
|
+
Ua,
|
|
3175
|
+
Fi
|
|
3176
|
+
]), ps = S(""), ms = S(-Infinity), hs = y((e, t) => {
|
|
3177
|
+
if (ps.current = e.pointerType ?? "", e.button !== 0) return;
|
|
3178
|
+
uo.current = !1;
|
|
3179
|
+
let n = Xo.current;
|
|
3180
|
+
n && !E(n.cell, t) && !(n.cell.row === t.row && n.columns.includes(t.column)) && $("blur", { move: "stay" }), E(t, z) || ai(t, "pointer", e), M === "range" && Mr(t.row) && (gn(e) || (ba(t, e.shiftKey, e), va(!0)));
|
|
3141
3181
|
}, [
|
|
3142
3182
|
$,
|
|
3143
3183
|
z,
|
|
3144
|
-
|
|
3184
|
+
ai,
|
|
3145
3185
|
M,
|
|
3146
|
-
|
|
3147
|
-
]),
|
|
3148
|
-
|
|
3149
|
-
}, [
|
|
3186
|
+
ba
|
|
3187
|
+
]), gs = y((e, t) => {
|
|
3188
|
+
_a && e.buttons === 1 && xa(t, e);
|
|
3189
|
+
}, [_a, xa]);
|
|
3150
3190
|
b(() => {
|
|
3151
|
-
if (!
|
|
3152
|
-
let e = () =>
|
|
3191
|
+
if (!_a) return;
|
|
3192
|
+
let e = () => va(!1), t = k.current?.ownerDocument ?? document;
|
|
3153
3193
|
return t.addEventListener("pointerup", e), t.addEventListener("pointercancel", e), () => {
|
|
3154
3194
|
t.removeEventListener("pointerup", e), t.removeEventListener("pointercancel", e);
|
|
3155
3195
|
};
|
|
3156
|
-
}, [
|
|
3157
|
-
let
|
|
3158
|
-
let n =
|
|
3159
|
-
if (
|
|
3160
|
-
|
|
3196
|
+
}, [_a]);
|
|
3197
|
+
let _s = y((e, t) => {
|
|
3198
|
+
let n = ps.current;
|
|
3199
|
+
if (ps.current = "", uo.current) {
|
|
3200
|
+
uo.current = !1;
|
|
3161
3201
|
return;
|
|
3162
3202
|
}
|
|
3163
|
-
if (
|
|
3203
|
+
if (gn(e)) return;
|
|
3164
3204
|
if (t.row === ut && H.get(t.column)?.sortable) {
|
|
3165
|
-
|
|
3205
|
+
ja(t.column, e.shiftKey, e, "pointer");
|
|
3166
3206
|
return;
|
|
3167
3207
|
}
|
|
3168
|
-
if (
|
|
3169
|
-
|
|
3208
|
+
if (wt(t.row)) {
|
|
3209
|
+
qo(t.row.slice(lt.length), e);
|
|
3170
3210
|
return;
|
|
3171
3211
|
}
|
|
3172
|
-
if (!
|
|
3173
|
-
M === "single" && !
|
|
3212
|
+
if (!Mr(t.row)) return;
|
|
3213
|
+
M === "single" && !zr.has(t.row) && pa(t.row, {
|
|
3174
3214
|
range: !1,
|
|
3175
3215
|
source: e
|
|
3176
3216
|
});
|
|
3177
|
-
let r =
|
|
3178
|
-
|
|
3217
|
+
let r = Xo.current, i = r !== null && r.cell.row === t.row && r.columns.includes(t.column);
|
|
3218
|
+
Pr && (n === "touch" || n === "pen") && !i && (ms.current = Date.now(), ns(t.row, "pointer", e));
|
|
3179
3219
|
}, [
|
|
3180
3220
|
H,
|
|
3181
|
-
|
|
3182
|
-
|
|
3221
|
+
ja,
|
|
3222
|
+
qo,
|
|
3183
3223
|
M,
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
]),
|
|
3189
|
-
if (
|
|
3190
|
-
let n = Q(t.row), r =
|
|
3224
|
+
zr,
|
|
3225
|
+
pa,
|
|
3226
|
+
Pr,
|
|
3227
|
+
ns
|
|
3228
|
+
]), vs = y((e, t) => {
|
|
3229
|
+
if (gn(e) || Date.now() - ms.current < br) return;
|
|
3230
|
+
let n = Q(t.row), r = c.find((e) => e.id === t.column);
|
|
3191
3231
|
if (n) {
|
|
3192
|
-
if (r && F(r, n) && !
|
|
3193
|
-
|
|
3232
|
+
if (r && F(r, n) && !Pr) {
|
|
3233
|
+
Zo(t);
|
|
3194
3234
|
return;
|
|
3195
3235
|
}
|
|
3196
|
-
|
|
3236
|
+
Pr ? ns(t.row, "pointer", e) : r && F(r, n) && Zo(t);
|
|
3197
3237
|
}
|
|
3198
3238
|
}, [
|
|
3199
3239
|
Q,
|
|
3200
|
-
|
|
3240
|
+
c,
|
|
3201
3241
|
F,
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
]),
|
|
3206
|
-
|
|
3207
|
-
}, [z,
|
|
3242
|
+
Pr,
|
|
3243
|
+
Zo,
|
|
3244
|
+
ns
|
|
3245
|
+
]), ys = y((e) => {
|
|
3246
|
+
Ca(!0), E(e, z) || ai(e, "programmatic");
|
|
3247
|
+
}, [z, ai]), bs = y(() => {}, []), xs = y((e) => {
|
|
3208
3248
|
let t = e.relatedTarget;
|
|
3209
3249
|
if (!t || !e.currentTarget.contains(t)) {
|
|
3210
|
-
|
|
3211
|
-
let e =
|
|
3250
|
+
Ca(!1);
|
|
3251
|
+
let e = Xo.current;
|
|
3212
3252
|
e && e.status === "editing" && $("blur", { move: "stay" });
|
|
3213
3253
|
}
|
|
3214
|
-
}, [$]),
|
|
3215
|
-
let
|
|
3216
|
-
return
|
|
3217
|
-
}, [
|
|
3218
|
-
let t =
|
|
3219
|
-
return t ? t(e) :
|
|
3254
|
+
}, [$]), Ss = y((e) => {
|
|
3255
|
+
let t = Pn.current.cellRenderers?.[e.column.id];
|
|
3256
|
+
return t ? t(e) : Fn ? Fn(e) : Wn(e);
|
|
3257
|
+
}, [Gn, Fn]), Cs = y((e) => {
|
|
3258
|
+
let t = Pn.current.editorRenderers?.[e.column.id];
|
|
3259
|
+
return t ? t(e) : zn ? zn(e) : Jn(e, j, N);
|
|
3220
3260
|
}, [
|
|
3221
|
-
|
|
3222
|
-
|
|
3261
|
+
Kn,
|
|
3262
|
+
zn,
|
|
3223
3263
|
j,
|
|
3224
3264
|
N
|
|
3225
|
-
]),
|
|
3226
|
-
let n = G.findIndex((t) => t.key === e), r =
|
|
3265
|
+
]), ws = y((e, t = "nearest") => {
|
|
3266
|
+
let n = G.findIndex((t) => t.key === e), r = Nn.current;
|
|
3227
3267
|
if (n === -1 || !r) return;
|
|
3228
|
-
let i =
|
|
3268
|
+
let i = Zi ? Zi.offsetOf(n) : n * q, a = r.querySelector("[data-part=\"head\"]")?.offsetHeight ?? 0, o = i;
|
|
3229
3269
|
if (t === "center") o = i - K.height / 2 + q;
|
|
3230
3270
|
else if (t === "end") o = i - K.height + q + a;
|
|
3231
3271
|
else if (t === "nearest") {
|
|
@@ -3233,365 +3273,365 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
3233
3273
|
if (i >= e && i + q <= t) return;
|
|
3234
3274
|
o = i < e ? i : i - K.height + q + a;
|
|
3235
3275
|
}
|
|
3236
|
-
r.scrollTo({ top: Math.max(0, o) }),
|
|
3276
|
+
r.scrollTo({ top: Math.max(0, o) }), Xi && ta([e]);
|
|
3237
3277
|
}, [
|
|
3238
3278
|
G,
|
|
3239
|
-
|
|
3279
|
+
Zi,
|
|
3240
3280
|
q,
|
|
3241
3281
|
K.height,
|
|
3242
|
-
|
|
3243
|
-
]),
|
|
3244
|
-
let t =
|
|
3282
|
+
Xi
|
|
3283
|
+
]), Ts = y((e) => {
|
|
3284
|
+
let t = Nn.current, n = H.get(e);
|
|
3245
3285
|
if (!t || !n || n.pinned) return;
|
|
3246
|
-
let r =
|
|
3286
|
+
let r = pi.reduce((e, t) => e + t, 0);
|
|
3247
3287
|
for (let t of V) {
|
|
3248
3288
|
if (t.id === e) break;
|
|
3249
3289
|
(t.pinned === null || t.pinned === "start") && (r += t.width);
|
|
3250
3290
|
}
|
|
3251
|
-
let i = V.filter((e) => e.pinned === "start").reduce((e, t) => e + t.width, 0) +
|
|
3291
|
+
let i = V.filter((e) => e.pinned === "start").reduce((e, t) => e + t.width, 0) + pi.reduce((e, t) => e + t, 0), a = V.filter((e) => e.pinned === "end").reduce((e, t) => e + t.width, 0), o = Math.abs(t.scrollLeft);
|
|
3252
3292
|
r < o + i ? t.scrollTo({ left: r - i }) : r + n.width > o + K.width - a && t.scrollTo({ left: r + n.width - K.width + a });
|
|
3253
3293
|
}, [
|
|
3254
3294
|
H,
|
|
3255
|
-
|
|
3295
|
+
pi,
|
|
3256
3296
|
V,
|
|
3257
3297
|
K.width
|
|
3258
|
-
]),
|
|
3259
|
-
let { filename: t, rows: n, columns: r, ...i } = e, a =
|
|
3260
|
-
return
|
|
3298
|
+
]), Es = y((e = {}) => {
|
|
3299
|
+
let { filename: t, rows: n, columns: r, ...i } = e, a = Zr === "client" ? Ai.rows : L, o = n === "selected" ? a.filter((e) => oa.has(P(e))) : a, s = r === "all" ? c : V.map((e) => e.column);
|
|
3300
|
+
return Rt(o, s, {
|
|
3261
3301
|
locale: N,
|
|
3262
|
-
timeZone:
|
|
3302
|
+
timeZone: bn,
|
|
3263
3303
|
...i,
|
|
3264
|
-
booleans: i.booleans ??
|
|
3304
|
+
booleans: i.booleans ?? Lr.booleans
|
|
3265
3305
|
});
|
|
3266
3306
|
}, [
|
|
3267
|
-
|
|
3268
|
-
|
|
3307
|
+
Zr,
|
|
3308
|
+
Ai.rows,
|
|
3269
3309
|
L,
|
|
3270
|
-
|
|
3310
|
+
oa,
|
|
3271
3311
|
P,
|
|
3272
|
-
|
|
3312
|
+
c,
|
|
3273
3313
|
V,
|
|
3274
3314
|
N,
|
|
3275
|
-
|
|
3276
|
-
|
|
3315
|
+
bn,
|
|
3316
|
+
Lr.booleans
|
|
3277
3317
|
]);
|
|
3278
3318
|
ze(he, () => ({
|
|
3279
|
-
focusCell: (e) =>
|
|
3280
|
-
scrollToRow:
|
|
3281
|
-
scrollToColumn:
|
|
3319
|
+
focusCell: (e) => Ea(e, "programmatic"),
|
|
3320
|
+
scrollToRow: ws,
|
|
3321
|
+
scrollToColumn: Ts,
|
|
3282
3322
|
scrollToCell: (e) => {
|
|
3283
|
-
|
|
3323
|
+
ws(e.row), Ts(e.column);
|
|
3284
3324
|
},
|
|
3285
3325
|
startEdit: (e) => {
|
|
3286
|
-
|
|
3326
|
+
Ea(e, "programmatic"), Zo(e);
|
|
3287
3327
|
},
|
|
3288
|
-
stopEdit: (e) => e?.commit === !1 ?
|
|
3289
|
-
autofit: (e) =>
|
|
3328
|
+
stopEdit: (e) => e?.commit === !1 ? $o() : $("programmatic"),
|
|
3329
|
+
autofit: (e) => to(e ?? null, "programmatic"),
|
|
3290
3330
|
getOutOfSpace: () => B,
|
|
3291
|
-
getVisibleRows: () =>
|
|
3292
|
-
toCsv:
|
|
3293
|
-
reload:
|
|
3331
|
+
getVisibleRows: () => Zr === "client" ? Ai.rows : L,
|
|
3332
|
+
toCsv: Es,
|
|
3333
|
+
reload: Wr.reload,
|
|
3294
3334
|
exportCsv: (e = {}) => {
|
|
3295
|
-
let t =
|
|
3335
|
+
let t = Es(e), n = k.current?.ownerDocument ?? document, r = URL.createObjectURL(new Blob([t], { type: "text/csv;charset=utf-8" })), i = n.createElement("a");
|
|
3296
3336
|
i.href = r, i.download = e.filename ?? "export.csv", i.click(), URL.revokeObjectURL(r);
|
|
3297
3337
|
},
|
|
3298
|
-
selectAll: () =>
|
|
3299
|
-
clearSelection: () =>
|
|
3338
|
+
selectAll: () => fa(J, "programmatic", void 0),
|
|
3339
|
+
clearSelection: () => fa([], "programmatic", void 0),
|
|
3300
3340
|
get element() {
|
|
3301
|
-
return
|
|
3341
|
+
return k.current;
|
|
3302
3342
|
}
|
|
3303
3343
|
}), [
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3344
|
+
Ea,
|
|
3345
|
+
ws,
|
|
3346
|
+
Ts,
|
|
3347
|
+
Zo,
|
|
3348
|
+
$o,
|
|
3309
3349
|
$,
|
|
3310
|
-
|
|
3350
|
+
to,
|
|
3311
3351
|
B,
|
|
3312
|
-
|
|
3313
|
-
|
|
3352
|
+
Zr,
|
|
3353
|
+
Ai.rows,
|
|
3314
3354
|
L,
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3355
|
+
Es,
|
|
3356
|
+
Wr.reload,
|
|
3357
|
+
fa,
|
|
3318
3358
|
J
|
|
3319
3359
|
]);
|
|
3320
|
-
let
|
|
3321
|
-
|
|
3322
|
-
}, [
|
|
3323
|
-
!
|
|
3324
|
-
let
|
|
3360
|
+
let Ds = y((e) => {
|
|
3361
|
+
k.current = e, typeof xt == "function" ? xt(e) : xt && (xt.current = e);
|
|
3362
|
+
}, [xt]), Os = x(() => X ? `${X.rowEnd - X.rowStart + 1} × ${X.columnEnd - X.columnStart + 1}` : null, [X]), ks = S(null), As = qr === "initial" || qr === !0 && ks.current !== "empty";
|
|
3363
|
+
!Jr && !Yr && (ks.current = L.length > 0 ? "rows" : "empty");
|
|
3364
|
+
let js = Yr ? "error" : As && L.length === 0 ? "loading" : G.length > 0 ? "rows" : I.filter || I.search.trim() ? "no-results" : "empty", Ms = x(() => {
|
|
3325
3365
|
let e = I.page?.size;
|
|
3326
|
-
return K.height === 0 ?
|
|
3366
|
+
return K.height === 0 ? Nr : Math.max(1, Math.min(e ?? Infinity, Math.ceil(K.height / q)));
|
|
3327
3367
|
}, [
|
|
3328
3368
|
I.page?.size,
|
|
3329
3369
|
K.height,
|
|
3330
3370
|
q,
|
|
3331
|
-
|
|
3332
|
-
]),
|
|
3371
|
+
Nr
|
|
3372
|
+
]), Ns = x(() => z ?? {
|
|
3333
3373
|
row: ut,
|
|
3334
3374
|
column: U[0] ?? ""
|
|
3335
|
-
}, [z, U]),
|
|
3336
|
-
id:
|
|
3375
|
+
}, [z, U]), Ps = x(() => ({
|
|
3376
|
+
id: Mn,
|
|
3337
3377
|
t: j,
|
|
3338
3378
|
locale: N,
|
|
3339
|
-
booleans:
|
|
3340
|
-
timeZone:
|
|
3341
|
-
columns:
|
|
3379
|
+
booleans: Lr.booleans,
|
|
3380
|
+
timeZone: bn,
|
|
3381
|
+
columns: c,
|
|
3342
3382
|
resolved: V,
|
|
3343
3383
|
resolvedById: H,
|
|
3344
3384
|
columnIds: U,
|
|
3345
|
-
mountedColumns:
|
|
3346
|
-
columnsWindowed:
|
|
3347
|
-
popinColumns:
|
|
3348
|
-
popinAggregated:
|
|
3349
|
-
popinIndex:
|
|
3350
|
-
hasPopinCell:
|
|
3385
|
+
mountedColumns: ia,
|
|
3386
|
+
columnsWindowed: ra,
|
|
3387
|
+
popinColumns: Si,
|
|
3388
|
+
popinAggregated: Mi,
|
|
3389
|
+
popinIndex: Ei,
|
|
3390
|
+
hasPopinCell: Pi,
|
|
3351
3391
|
query: I,
|
|
3352
3392
|
nodes: G,
|
|
3353
|
-
total:
|
|
3393
|
+
total: ji,
|
|
3354
3394
|
selectionMode: M,
|
|
3355
|
-
editMode:
|
|
3356
|
-
filterRow:
|
|
3357
|
-
activatable:
|
|
3395
|
+
editMode: rr,
|
|
3396
|
+
filterRow: ir,
|
|
3397
|
+
activatable: Pr,
|
|
3358
3398
|
rowKeyOf: P,
|
|
3359
|
-
textOf:
|
|
3399
|
+
textOf: Rr,
|
|
3360
3400
|
valueOf: gt,
|
|
3361
3401
|
isEditable: F,
|
|
3362
|
-
anyEditable:
|
|
3363
|
-
isDisabled:
|
|
3364
|
-
isExpandable:
|
|
3402
|
+
anyEditable: Vr,
|
|
3403
|
+
isDisabled: Br,
|
|
3404
|
+
isExpandable: Hr,
|
|
3365
3405
|
current: z,
|
|
3366
|
-
tabStop:
|
|
3367
|
-
focused:
|
|
3368
|
-
setCurrent:
|
|
3369
|
-
isSelected:
|
|
3370
|
-
selectedCount:
|
|
3371
|
-
toggleSelected:
|
|
3372
|
-
toggleAll:
|
|
3373
|
-
allState:
|
|
3406
|
+
tabStop: Ns,
|
|
3407
|
+
focused: Sa,
|
|
3408
|
+
setCurrent: Ea,
|
|
3409
|
+
isSelected: ca,
|
|
3410
|
+
selectedCount: ua,
|
|
3411
|
+
toggleSelected: pa,
|
|
3412
|
+
toggleAll: ma,
|
|
3413
|
+
allState: da,
|
|
3374
3414
|
selectableCount: J.length,
|
|
3375
3415
|
rangeBounds: X,
|
|
3376
|
-
rangeInfo:
|
|
3377
|
-
changedOf:
|
|
3378
|
-
beginRange:
|
|
3379
|
-
extendRange:
|
|
3380
|
-
rangeDragging:
|
|
3381
|
-
isExpanded:
|
|
3382
|
-
toggleExpanded:
|
|
3383
|
-
toggleBranch:
|
|
3384
|
-
treeColumn:
|
|
3385
|
-
hasChildren:
|
|
3386
|
-
rowsReorderable:
|
|
3387
|
-
attachRowDraggable:
|
|
3388
|
-
rowLabelOf:
|
|
3389
|
-
isLoadingChildren:
|
|
3390
|
-
toggleGroup:
|
|
3391
|
-
sortOf:
|
|
3392
|
-
pressSort:
|
|
3393
|
-
setSort:
|
|
3394
|
-
filterOf:
|
|
3395
|
-
setFilter:
|
|
3396
|
-
filterOpen:
|
|
3397
|
-
setFilterOpen:
|
|
3398
|
-
menuOpen:
|
|
3399
|
-
setMenuOpen:
|
|
3400
|
-
menuAnchor:
|
|
3401
|
-
anchorToButton:
|
|
3402
|
-
onHeaderContextMenu:
|
|
3403
|
-
filterDebounce:
|
|
3404
|
-
countsFor:
|
|
3405
|
-
pin:
|
|
3406
|
-
hide:
|
|
3407
|
-
resizeBy:
|
|
3408
|
-
resizeTo:
|
|
3409
|
-
autofit:
|
|
3410
|
-
moveColumn:
|
|
3411
|
-
resizing:
|
|
3412
|
-
setResizing:
|
|
3413
|
-
dragging:
|
|
3414
|
-
dropTarget:
|
|
3415
|
-
draggingRow:
|
|
3416
|
-
dropOffset:
|
|
3417
|
-
attachDraggable:
|
|
3416
|
+
rangeInfo: ga,
|
|
3417
|
+
changedOf: Io,
|
|
3418
|
+
beginRange: ba,
|
|
3419
|
+
extendRange: xa,
|
|
3420
|
+
rangeDragging: _a,
|
|
3421
|
+
isExpanded: Ro,
|
|
3422
|
+
toggleExpanded: zo,
|
|
3423
|
+
toggleBranch: Go,
|
|
3424
|
+
treeColumn: Bo,
|
|
3425
|
+
hasChildren: Wo,
|
|
3426
|
+
rowsReorderable: _o,
|
|
3427
|
+
attachRowDraggable: Eo,
|
|
3428
|
+
rowLabelOf: Co,
|
|
3429
|
+
isLoadingChildren: Uo,
|
|
3430
|
+
toggleGroup: qo,
|
|
3431
|
+
sortOf: Oa,
|
|
3432
|
+
pressSort: ja,
|
|
3433
|
+
setSort: Ma,
|
|
3434
|
+
filterOf: Na,
|
|
3435
|
+
setFilter: Pa,
|
|
3436
|
+
filterOpen: Fa,
|
|
3437
|
+
setFilterOpen: Ia,
|
|
3438
|
+
menuOpen: La,
|
|
3439
|
+
setMenuOpen: Ra,
|
|
3440
|
+
menuAnchor: za,
|
|
3441
|
+
anchorToButton: Ua,
|
|
3442
|
+
onHeaderContextMenu: Wa,
|
|
3443
|
+
filterDebounce: lr,
|
|
3444
|
+
countsFor: Ka,
|
|
3445
|
+
pin: Ja,
|
|
3446
|
+
hide: Ya,
|
|
3447
|
+
resizeBy: Za,
|
|
3448
|
+
resizeTo: Xa,
|
|
3449
|
+
autofit: to,
|
|
3450
|
+
moveColumn: no,
|
|
3451
|
+
resizing: ro,
|
|
3452
|
+
setResizing: io,
|
|
3453
|
+
dragging: ao.dragging,
|
|
3454
|
+
dropTarget: ao.target,
|
|
3455
|
+
draggingRow: vo.dragging,
|
|
3456
|
+
dropOffset: ao.offset,
|
|
3457
|
+
attachDraggable: mo,
|
|
3418
3458
|
onManageColumns: He,
|
|
3419
|
-
edit:
|
|
3420
|
-
startEdit:
|
|
3421
|
-
setDraft:
|
|
3459
|
+
edit: Jo,
|
|
3460
|
+
startEdit: Zo,
|
|
3461
|
+
setDraft: Qo,
|
|
3422
3462
|
commitEdit: $,
|
|
3423
|
-
cancelEdit:
|
|
3424
|
-
activate:
|
|
3425
|
-
renderCellContent:
|
|
3426
|
-
renderEditorContent:
|
|
3427
|
-
renderHeaderContent:
|
|
3428
|
-
renderDetail:
|
|
3429
|
-
renderGroup:
|
|
3463
|
+
cancelEdit: $o,
|
|
3464
|
+
activate: ns,
|
|
3465
|
+
renderCellContent: Ss,
|
|
3466
|
+
renderEditorContent: Cs,
|
|
3467
|
+
renderHeaderContent: Hn,
|
|
3468
|
+
renderDetail: Rn,
|
|
3469
|
+
renderGroup: Vn,
|
|
3430
3470
|
renderFilterOperand: Zt,
|
|
3431
|
-
onCellPointerDown:
|
|
3432
|
-
onCellPointerEnter:
|
|
3433
|
-
onCellClick:
|
|
3434
|
-
onCellDoubleClick:
|
|
3435
|
-
onCellKeyDown:
|
|
3436
|
-
onCellFocus:
|
|
3437
|
-
onCellBlur:
|
|
3471
|
+
onCellPointerDown: hs,
|
|
3472
|
+
onCellPointerEnter: gs,
|
|
3473
|
+
onCellClick: _s,
|
|
3474
|
+
onCellDoubleClick: vs,
|
|
3475
|
+
onCellKeyDown: fs,
|
|
3476
|
+
onCellFocus: ys,
|
|
3477
|
+
onCellBlur: bs,
|
|
3438
3478
|
announce: Z,
|
|
3439
|
-
detailId: (e) => `${
|
|
3440
|
-
rangeSummary:
|
|
3479
|
+
detailId: (e) => `${Mn}detail-${e}`,
|
|
3480
|
+
rangeSummary: Os
|
|
3441
3481
|
}), [
|
|
3442
|
-
|
|
3482
|
+
Mn,
|
|
3443
3483
|
j,
|
|
3444
3484
|
N,
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3485
|
+
Lr.booleans,
|
|
3486
|
+
bn,
|
|
3487
|
+
c,
|
|
3448
3488
|
V,
|
|
3449
3489
|
H,
|
|
3450
3490
|
U,
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
ui,
|
|
3454
|
-
bi,
|
|
3455
|
-
mi,
|
|
3491
|
+
ia,
|
|
3492
|
+
ra,
|
|
3456
3493
|
Si,
|
|
3494
|
+
Mi,
|
|
3495
|
+
Ei,
|
|
3496
|
+
Pi,
|
|
3457
3497
|
I,
|
|
3458
3498
|
G,
|
|
3459
|
-
|
|
3499
|
+
ji,
|
|
3460
3500
|
M,
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3501
|
+
rr,
|
|
3502
|
+
ir,
|
|
3503
|
+
Pr,
|
|
3464
3504
|
P,
|
|
3465
|
-
|
|
3505
|
+
Rr,
|
|
3466
3506
|
F,
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3507
|
+
Vr,
|
|
3508
|
+
Br,
|
|
3509
|
+
Hr,
|
|
3470
3510
|
z,
|
|
3471
|
-
|
|
3511
|
+
Ns,
|
|
3512
|
+
Sa,
|
|
3513
|
+
Ea,
|
|
3514
|
+
ca,
|
|
3472
3515
|
ua,
|
|
3516
|
+
pa,
|
|
3473
3517
|
ma,
|
|
3474
|
-
|
|
3475
|
-
Qi,
|
|
3476
|
-
ta,
|
|
3477
|
-
na,
|
|
3478
|
-
$i,
|
|
3518
|
+
da,
|
|
3479
3519
|
J.length,
|
|
3480
3520
|
X,
|
|
3481
|
-
ia,
|
|
3482
|
-
wo,
|
|
3483
|
-
ca,
|
|
3484
|
-
la,
|
|
3485
|
-
aa,
|
|
3486
|
-
Eo,
|
|
3487
|
-
Do,
|
|
3488
|
-
No,
|
|
3489
|
-
Oo,
|
|
3490
|
-
Mo,
|
|
3491
|
-
io,
|
|
3492
|
-
mo,
|
|
3493
|
-
uo,
|
|
3494
|
-
jo,
|
|
3495
|
-
Fo,
|
|
3496
3521
|
ga,
|
|
3497
|
-
|
|
3522
|
+
Io,
|
|
3498
3523
|
ba,
|
|
3499
3524
|
xa,
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3525
|
+
_a,
|
|
3526
|
+
Ro,
|
|
3527
|
+
zo,
|
|
3528
|
+
Go,
|
|
3529
|
+
Bo,
|
|
3530
|
+
Wo,
|
|
3531
|
+
_o,
|
|
3532
|
+
Eo,
|
|
3533
|
+
Co,
|
|
3534
|
+
Uo,
|
|
3535
|
+
qo,
|
|
3536
|
+
Oa,
|
|
3504
3537
|
ja,
|
|
3505
3538
|
Ma,
|
|
3506
|
-
|
|
3539
|
+
Na,
|
|
3507
3540
|
Pa,
|
|
3508
|
-
|
|
3541
|
+
Fa,
|
|
3509
3542
|
La,
|
|
3510
3543
|
za,
|
|
3511
|
-
Ra,
|
|
3512
3544
|
Ua,
|
|
3513
3545
|
Wa,
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3546
|
+
lr,
|
|
3547
|
+
Ka,
|
|
3548
|
+
Ja,
|
|
3549
|
+
Ya,
|
|
3550
|
+
Za,
|
|
3551
|
+
Xa,
|
|
3517
3552
|
to,
|
|
3553
|
+
no,
|
|
3554
|
+
ro,
|
|
3555
|
+
ao,
|
|
3556
|
+
vo.dragging,
|
|
3557
|
+
mo,
|
|
3518
3558
|
He,
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
Bo,
|
|
3522
|
-
$,
|
|
3523
|
-
Vo,
|
|
3524
|
-
Wo,
|
|
3525
|
-
as,
|
|
3526
|
-
os,
|
|
3527
|
-
$t,
|
|
3528
|
-
Ft,
|
|
3529
|
-
Qt,
|
|
3530
|
-
Zt,
|
|
3559
|
+
Jo,
|
|
3560
|
+
Zo,
|
|
3531
3561
|
Qo,
|
|
3562
|
+
$,
|
|
3532
3563
|
$o,
|
|
3533
|
-
es,
|
|
3534
|
-
ts,
|
|
3535
|
-
Yo,
|
|
3536
3564
|
ns,
|
|
3537
|
-
|
|
3565
|
+
Ss,
|
|
3566
|
+
Cs,
|
|
3567
|
+
Hn,
|
|
3568
|
+
Rn,
|
|
3569
|
+
Vn,
|
|
3570
|
+
Zt,
|
|
3571
|
+
hs,
|
|
3572
|
+
gs,
|
|
3573
|
+
_s,
|
|
3574
|
+
vs,
|
|
3575
|
+
fs,
|
|
3576
|
+
ys,
|
|
3577
|
+
bs,
|
|
3538
3578
|
Z,
|
|
3539
|
-
|
|
3540
|
-
]), [
|
|
3541
|
-
|
|
3542
|
-
let
|
|
3579
|
+
Os
|
|
3580
|
+
]), [Fs] = C(() => xn(Ps));
|
|
3581
|
+
Fs.set(Ps), Be(() => Fs.publish(), [Ps, Fs]);
|
|
3582
|
+
let Is = {
|
|
3543
3583
|
...yn,
|
|
3544
|
-
"--slotted-data-grid-template":
|
|
3584
|
+
"--slotted-data-grid-template": Oi,
|
|
3545
3585
|
..._e === void 0 ? {} : { "--slotted-data-grid-block-size": typeof _e == "number" ? `${_e}px` : _e },
|
|
3546
|
-
...typeof
|
|
3547
|
-
...
|
|
3548
|
-
...
|
|
3586
|
+
...typeof or == "number" ? { "--slotted-data-grid-row-block-size": `${or}px` } : {},
|
|
3587
|
+
...ko > 0 ? { "--slotted-data-grid-changed-duration": `${ko}ms` } : {},
|
|
3588
|
+
...Ci ? { "--slotted-data-grid-leading": `${mi}px` } : {},
|
|
3549
3589
|
...K.width > 0 ? { "--slotted-data-grid-viewport": `${K.width}px` } : {}
|
|
3550
|
-
},
|
|
3551
|
-
"--slotted-data-grid-window-total": `${
|
|
3552
|
-
"--slotted-data-grid-window-start": `${
|
|
3553
|
-
} : void 0,
|
|
3590
|
+
}, Ls = Xi ? {
|
|
3591
|
+
"--slotted-data-grid-window-total": `${Qi.totalSize}px`,
|
|
3592
|
+
"--slotted-data-grid-window-start": `${Qi.startOffset}px`
|
|
3593
|
+
} : void 0, Rs = (() => {
|
|
3554
3594
|
if (sn === !1 || !I.page || G.length === 0) return null;
|
|
3555
|
-
let e = ("index" in I.page ? I.page.index * I.page.size : 0) + 1, t = e + (
|
|
3556
|
-
return
|
|
3595
|
+
let e = ("index" in I.page ? I.page.index * I.page.size : 0) + 1, t = e + (Zr === "client" ? G.filter((e) => e.kind === "row").length : L.length) - 1;
|
|
3596
|
+
return ji === null || ji < 0 ? j("rangeUnknown", {
|
|
3557
3597
|
start: e,
|
|
3558
3598
|
end: t
|
|
3559
3599
|
}) : j("range", {
|
|
3560
3600
|
start: e,
|
|
3561
3601
|
end: t,
|
|
3562
|
-
total:
|
|
3602
|
+
total: ji
|
|
3563
3603
|
});
|
|
3564
|
-
})(),
|
|
3604
|
+
})(), zs = !Kr || !Ve ? null : Ar === "scroll" && Se !== !0 ? Jr ? /* @__PURE__ */ w("span", {
|
|
3565
3605
|
"data-loading-more": "",
|
|
3566
3606
|
role: "status",
|
|
3567
3607
|
children: j("loadingMore")
|
|
3568
3608
|
}) : null : /* @__PURE__ */ w("div", { children: /* @__PURE__ */ w(l, {
|
|
3569
|
-
disabled:
|
|
3609
|
+
disabled: Jr,
|
|
3570
3610
|
onClick: () => Ve(),
|
|
3571
3611
|
size: "sm",
|
|
3572
3612
|
tone: "secondary",
|
|
3573
3613
|
variant: "outline",
|
|
3574
3614
|
children: j(Se === !0 ? "retry" : "loadMore")
|
|
3575
|
-
}) }),
|
|
3576
|
-
if (
|
|
3577
|
-
let e =
|
|
3615
|
+
}) }), Bs = (() => {
|
|
3616
|
+
if (js === "rows" || js === "loading") return null;
|
|
3617
|
+
let e = js;
|
|
3578
3618
|
if (Xt) return Xt(e);
|
|
3579
3619
|
let t = j(e === "error" ? "error" : e === "no-results" ? "noResults" : "empty");
|
|
3580
3620
|
return /* @__PURE__ */ T(le, {
|
|
3581
3621
|
reach: "section",
|
|
3582
3622
|
status: e,
|
|
3583
3623
|
tabIndex: -1,
|
|
3584
|
-
children: [/* @__PURE__ */ T(ce, { children: [/* @__PURE__ */ w(se, { children: t }), e === "error" &&
|
|
3624
|
+
children: [/* @__PURE__ */ T(ce, { children: [/* @__PURE__ */ w(se, { children: t }), e === "error" && Yr ? /* @__PURE__ */ w(ae, { children: Yr }) : null] }), e === "no-results" || e === "error" && Xr ? /* @__PURE__ */ w(oe, { children: e === "no-results" ? /* @__PURE__ */ w(l, {
|
|
3585
3625
|
onClick: (e) => {
|
|
3586
|
-
let t =
|
|
3587
|
-
|
|
3626
|
+
let t = qt(I);
|
|
3627
|
+
Ur(t.query, "clear", e, { change: t.change });
|
|
3588
3628
|
},
|
|
3589
3629
|
size: "sm",
|
|
3590
3630
|
tone: "secondary",
|
|
3591
3631
|
variant: "outline",
|
|
3592
3632
|
children: j("clearFilters")
|
|
3593
3633
|
}) : /* @__PURE__ */ w(l, {
|
|
3594
|
-
onClick: () =>
|
|
3634
|
+
onClick: () => Xr?.(),
|
|
3595
3635
|
size: "sm",
|
|
3596
3636
|
tone: "secondary",
|
|
3597
3637
|
variant: "outline",
|
|
@@ -3599,131 +3639,135 @@ function Er({ activatable: e, cellRenderers: t, columnGroups: n, columnOverflow:
|
|
|
3599
3639
|
}) }) : null]
|
|
3600
3640
|
});
|
|
3601
3641
|
})();
|
|
3602
|
-
return /* @__PURE__ */ w(
|
|
3603
|
-
value:
|
|
3604
|
-
children: /* @__PURE__ */ w(
|
|
3605
|
-
value:
|
|
3642
|
+
return /* @__PURE__ */ w(vn.Provider, {
|
|
3643
|
+
value: Fs.grid,
|
|
3644
|
+
children: /* @__PURE__ */ w(Tn.Provider, {
|
|
3645
|
+
value: Fs,
|
|
3606
3646
|
children: /* @__PURE__ */ T("div", {
|
|
3607
|
-
...
|
|
3608
|
-
"aria-busy":
|
|
3609
|
-
"aria-colcount":
|
|
3610
|
-
"aria-label":
|
|
3647
|
+
...jn,
|
|
3648
|
+
"aria-busy": Jr && js !== "loading" ? !0 : void 0,
|
|
3649
|
+
"aria-colcount": Ti,
|
|
3650
|
+
"aria-label": jn["aria-label"] ?? (ye ? void 0 : j("grid")),
|
|
3611
3651
|
"aria-labelledby": ye,
|
|
3612
3652
|
"aria-multiselectable": M === "multiple" || M === "range" || void 0,
|
|
3613
|
-
"aria-rowcount": (
|
|
3653
|
+
"aria-rowcount": (ji === null ? -1 : ji) + W.top.length + W.bottom.length + Ii + +!!Ni,
|
|
3614
3654
|
"data-part": "root",
|
|
3615
3655
|
"data-part-root": "",
|
|
3616
|
-
"data-popin":
|
|
3656
|
+
"data-popin": Ci ? B.popin.length : void 0,
|
|
3617
3657
|
"data-narrow": K.width > 0 && K.width < Ke ? "" : void 0,
|
|
3618
|
-
"data-rows":
|
|
3658
|
+
"data-rows": Yi ? "auto" : "fixed",
|
|
3619
3659
|
"data-slotted-density": d ?? void 0,
|
|
3620
3660
|
"data-ui": "data-grid",
|
|
3621
3661
|
"data-ui-data-grid": "",
|
|
3622
|
-
"data-variant":
|
|
3623
|
-
onBlur:
|
|
3662
|
+
"data-variant": Qn,
|
|
3663
|
+
onBlur: xs,
|
|
3624
3664
|
onKeyDown: (e) => {
|
|
3625
|
-
Le?.(e), !e.defaultPrevented && (
|
|
3665
|
+
Le?.(e), !e.defaultPrevented && (so.current?.handleKeydown(e.nativeEvent) || bo.current?.handleKeydown(e.nativeEvent));
|
|
3626
3666
|
},
|
|
3627
|
-
ref:
|
|
3628
|
-
role:
|
|
3629
|
-
style:
|
|
3630
|
-
|
|
3631
|
-
...
|
|
3632
|
-
...
|
|
3633
|
-
...
|
|
3667
|
+
ref: Ds,
|
|
3668
|
+
role: A ? "treegrid" : "grid",
|
|
3669
|
+
style: Is,
|
|
3670
|
+
...$n ? { "data-striped": "" } : {},
|
|
3671
|
+
...er ? { "data-sticky-header": "" } : {},
|
|
3672
|
+
...ir ? { "data-filter-row": "" } : {},
|
|
3673
|
+
...tr === "page" ? { "data-sticky-to": "page" } : {},
|
|
3634
3674
|
...M === "none" ? {} : { "data-selection": M },
|
|
3635
3675
|
children: [/* @__PURE__ */ T("div", {
|
|
3636
3676
|
"data-part": "scroll",
|
|
3637
3677
|
"data-part-scroll": "",
|
|
3638
|
-
ref:
|
|
3678
|
+
ref: Nn,
|
|
3639
3679
|
children: [
|
|
3640
|
-
/* @__PURE__ */ w(
|
|
3641
|
-
columnGroups:
|
|
3642
|
-
headerRowCount:
|
|
3680
|
+
/* @__PURE__ */ w(nr, {
|
|
3681
|
+
columnGroups: i,
|
|
3682
|
+
headerRowCount: Ii
|
|
3643
3683
|
}),
|
|
3644
|
-
W.top.length > 0 ? /* @__PURE__ */ w(
|
|
3684
|
+
W.top.length > 0 ? /* @__PURE__ */ w(On, {
|
|
3645
3685
|
edge: "top",
|
|
3646
|
-
firstRowIndex:
|
|
3686
|
+
firstRowIndex: Ii + 1,
|
|
3647
3687
|
nodes: W.top
|
|
3648
3688
|
}) : null,
|
|
3649
|
-
|
|
3689
|
+
js === "loading" ? /* @__PURE__ */ w(In, {
|
|
3650
3690
|
rowSize: q,
|
|
3651
|
-
rows:
|
|
3652
|
-
}) : /* @__PURE__ */ w(
|
|
3653
|
-
bodyStyle:
|
|
3654
|
-
firstIndex:
|
|
3655
|
-
headerRowCount:
|
|
3656
|
-
measureRow:
|
|
3657
|
-
|
|
3658
|
-
|
|
3691
|
+
rows: Ms
|
|
3692
|
+
}) : /* @__PURE__ */ w(Dn, {
|
|
3693
|
+
bodyStyle: Ls,
|
|
3694
|
+
firstIndex: Xi ? Qi.startIndex : 0,
|
|
3695
|
+
headerRowCount: Ii + W.top.length,
|
|
3696
|
+
measureRow: Yi || Gi === null ? is : void 0,
|
|
3697
|
+
loadMore: as ? {
|
|
3698
|
+
top: ss,
|
|
3699
|
+
ref: cs
|
|
3700
|
+
} : void 0,
|
|
3701
|
+
nodes: $i,
|
|
3702
|
+
heldRows: ea,
|
|
3659
3703
|
allNodes: G
|
|
3660
3704
|
}),
|
|
3661
|
-
|
|
3662
|
-
W.bottom.length > 0 ? /* @__PURE__ */ w(
|
|
3705
|
+
Bs !== null && js !== "loading" ? /* @__PURE__ */ w(kn, { children: Bs }) : null,
|
|
3706
|
+
W.bottom.length > 0 ? /* @__PURE__ */ w(On, {
|
|
3663
3707
|
edge: "bottom",
|
|
3664
|
-
firstRowIndex:
|
|
3708
|
+
firstRowIndex: Ii + W.top.length + (ji ?? G.length) + 1,
|
|
3665
3709
|
nodes: W.bottom
|
|
3666
3710
|
}) : null,
|
|
3667
|
-
|
|
3668
|
-
aggregates:
|
|
3669
|
-
rowIndex:
|
|
3711
|
+
Ni && js === "rows" ? /* @__PURE__ */ w(Ln, {
|
|
3712
|
+
aggregates: Ai.aggregates,
|
|
3713
|
+
rowIndex: Ii + W.top.length + (ji ?? G.length) + W.bottom.length + 1
|
|
3670
3714
|
}) : null,
|
|
3671
|
-
|
|
3715
|
+
ao.offset === null ? null : /* @__PURE__ */ w("div", {
|
|
3672
3716
|
"aria-hidden": !0,
|
|
3673
3717
|
"data-part": "drop-indicator",
|
|
3674
3718
|
"data-part-drop-indicator": "",
|
|
3675
3719
|
style: {
|
|
3676
|
-
"--slotted-data-grid-drop-offset": `${
|
|
3677
|
-
"--slotted-data-grid-drop-scroll": `${
|
|
3720
|
+
"--slotted-data-grid-drop-offset": `${ao.offset}px`,
|
|
3721
|
+
"--slotted-data-grid-drop-scroll": `${ao.scrollTop}px`
|
|
3678
3722
|
}
|
|
3679
3723
|
}),
|
|
3680
|
-
|
|
3724
|
+
vo.offset === null ? null : /* @__PURE__ */ w("div", {
|
|
3681
3725
|
"aria-hidden": !0,
|
|
3682
3726
|
"data-axis": "row",
|
|
3683
3727
|
"data-part": "drop-indicator",
|
|
3684
3728
|
"data-part-drop-indicator": "",
|
|
3685
3729
|
style: {
|
|
3686
|
-
"--slotted-data-grid-drop-offset": `${
|
|
3687
|
-
"--slotted-data-grid-drop-scroll": `${
|
|
3730
|
+
"--slotted-data-grid-drop-offset": `${vo.offset}px`,
|
|
3731
|
+
"--slotted-data-grid-drop-scroll": `${vo.scrollLeft}px`
|
|
3688
3732
|
}
|
|
3689
3733
|
})
|
|
3690
3734
|
]
|
|
3691
|
-
}), me !== void 0 ||
|
|
3735
|
+
}), me !== void 0 || Rs !== null || zs !== null ? /* @__PURE__ */ T("div", {
|
|
3692
3736
|
"data-part": "footer",
|
|
3693
3737
|
"data-part-footer": "",
|
|
3694
3738
|
children: [
|
|
3695
|
-
|
|
3739
|
+
Rs === null ? null : /* @__PURE__ */ w("span", {
|
|
3696
3740
|
"data-range": "",
|
|
3697
|
-
children:
|
|
3741
|
+
children: Rs
|
|
3698
3742
|
}),
|
|
3699
3743
|
me,
|
|
3700
|
-
me === void 0 ?
|
|
3744
|
+
me === void 0 ? zs : null
|
|
3701
3745
|
]
|
|
3702
3746
|
}) : null]
|
|
3703
3747
|
})
|
|
3704
3748
|
})
|
|
3705
3749
|
});
|
|
3706
3750
|
}
|
|
3707
|
-
function
|
|
3751
|
+
function jr(e, t, n, r) {
|
|
3708
3752
|
let i = e.findIndex((e) => e.id === t[0]), a = Math.max(i, Math.min(i + t.length, r)), o = t.indexOf(n), s = a - i, c = s > o ? s - 1 : s;
|
|
3709
3753
|
return c === o ? null : c;
|
|
3710
3754
|
}
|
|
3711
|
-
function
|
|
3712
|
-
return e !== ut && e !== ct && e !== pt && !
|
|
3755
|
+
function Mr(e) {
|
|
3756
|
+
return e !== ut && e !== ct && e !== pt && !wt(e);
|
|
3713
3757
|
}
|
|
3714
3758
|
//#endregion
|
|
3715
3759
|
//#region src/data-grid/use-persisted-grid-view.ts
|
|
3716
|
-
function
|
|
3760
|
+
function Nr() {
|
|
3717
3761
|
try {
|
|
3718
3762
|
return typeof window > "u" ? null : window.localStorage;
|
|
3719
3763
|
} catch {
|
|
3720
3764
|
return null;
|
|
3721
3765
|
}
|
|
3722
3766
|
}
|
|
3723
|
-
function
|
|
3724
|
-
let s = x(() => n === void 0 ?
|
|
3725
|
-
columns:
|
|
3726
|
-
query: r ??
|
|
3767
|
+
function N({ key: e, columns: t, storage: n, defaultQuery: r, defaultColumnState: i, defaultDensity: a, ...o }) {
|
|
3768
|
+
let s = x(() => n === void 0 ? Nr() : n, [n]), c = x(() => ({
|
|
3769
|
+
columns: Et(i ?? null, t),
|
|
3770
|
+
query: r ?? xt(o.defaultPageSize).query,
|
|
3727
3771
|
density: a ?? null
|
|
3728
3772
|
}), []), [l, u] = C(() => {
|
|
3729
3773
|
let n;
|
|
@@ -3733,7 +3777,7 @@ function kr({ key: e, columns: t, storage: n, defaultQuery: r, defaultColumnStat
|
|
|
3733
3777
|
n = null;
|
|
3734
3778
|
}
|
|
3735
3779
|
if (n === null || n === "") return c;
|
|
3736
|
-
let r =
|
|
3780
|
+
let r = Dt(n, t, o);
|
|
3737
3781
|
return {
|
|
3738
3782
|
columns: r.columns,
|
|
3739
3783
|
query: r.query.page === null ? {
|
|
@@ -3762,7 +3806,7 @@ function kr({ key: e, columns: t, storage: n, defaultQuery: r, defaultColumnStat
|
|
|
3762
3806
|
f.current = !1;
|
|
3763
3807
|
let { key: e, columns: t, options: n, store: r } = d.current;
|
|
3764
3808
|
if (r) try {
|
|
3765
|
-
let i =
|
|
3809
|
+
let i = Ft(l, t, n);
|
|
3766
3810
|
i === "" ? r.removeItem(e) : r.setItem(e, i);
|
|
3767
3811
|
} catch {}
|
|
3768
3812
|
}, [l]);
|
|
@@ -3801,4 +3845,4 @@ function kr({ key: e, columns: t, storage: n, defaultQuery: r, defaultColumnStat
|
|
|
3801
3845
|
};
|
|
3802
3846
|
}
|
|
3803
3847
|
//#endregion
|
|
3804
|
-
export {
|
|
3848
|
+
export { fn as a, Bn as i, Ar as n, dn as o, zn as r, un as s, N as t };
|