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