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