@daisforge/ui 1.12.1 → 1.12.2
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/chunks/AnalyticalWidget-CBi-2MtJ.mjs +528 -0
- package/chunks/AnalyticalWidget-fBDe37Ur.cjs +43 -0
- package/chunks/ApprovalCenter-ClCoA3cr.mjs +176 -0
- package/chunks/ApprovalCenter-oACSjXxE.cjs +1 -0
- package/chunks/BlockTitle-CylSY2DM.cjs +1 -0
- package/chunks/BlockTitle-DTaIqiFF.mjs +85 -0
- package/chunks/Container-CV4sT-bB.mjs +117 -0
- package/chunks/Container-D8Bcg69e.cjs +17 -0
- package/chunks/EmptyState-BD6Ic-OX.cjs +1 -0
- package/chunks/EmptyState-Bct6Wrxv.mjs +459 -0
- package/chunks/FiltersActions-C3yWFtQT.mjs +429 -0
- package/chunks/FiltersActions-D1aQXh5d.cjs +1 -0
- package/chunks/FormDatePickers-BefllAQ_.cjs +1 -0
- package/chunks/FormDatePickers-_soI8Uaa.mjs +503 -0
- package/chunks/FormSegmentGroup-C8kROjlQ.mjs +168 -0
- package/chunks/FormSegmentGroup-DIaBZRWv.cjs +1 -0
- package/chunks/FormTextArea-BBYV56iU.mjs +107 -0
- package/chunks/FormTextArea-C7KG9PXC.cjs +1 -0
- package/chunks/GridDND-BP_H26We.cjs +1 -0
- package/chunks/GridDND-rVSi0xX1.mjs +852 -0
- package/chunks/LeftPanel-CgexykUg.cjs +1 -0
- package/chunks/LeftPanel-bKmeEOHx.mjs +162 -0
- package/chunks/ListOfFilters-DgInAZFi.cjs +1 -0
- package/chunks/ListOfFilters-IEPKSKxx.mjs +243 -0
- package/chunks/MassActions-BCgI08G9.cjs +1 -0
- package/chunks/MassActions-D4nb1_gx.mjs +966 -0
- package/chunks/PageTitle-B0tuR3fU.mjs +123 -0
- package/chunks/PageTitle-BC0PnHgQ.cjs +1 -0
- package/chunks/SplitView-C8de8YKV.mjs +236 -0
- package/chunks/SplitView-OUGciQ51.cjs +12 -0
- package/chunks/Stories--_pE4YtR.mjs +668 -0
- package/chunks/Stories-Dvh6rMeV.cjs +1 -0
- package/chunks/Table-Bj2se1hR.mjs +7757 -0
- package/chunks/Table-CnWVNNoW.cjs +31 -0
- package/chunks/TableCanvas-Y53zQ7M0.mjs +11857 -0
- package/chunks/TableCanvas-eYhmqTbp.cjs +30 -0
- package/chunks/{TableGlide-B61Yi-Hs.mjs → TableGlide-CuBMIM6Q.mjs} +1417 -1554
- package/chunks/TableGlide-CvMz7x7a.cjs +1 -0
- package/chunks/styles-Dd4uEa27.mjs +128 -0
- package/chunks/styles-kPI9R7DO.cjs +2 -0
- package/chunks/{utils-BNelzuI-.mjs → utils-C5SQhoON.mjs} +126 -151
- package/chunks/utils-DKi1rqLX.cjs +25 -0
- package/chunks/{vendor-D8Dozc4m.cjs → vendor-BauZZ2hr.mjs} +7 -33
- package/chunks/{vendor-BG4P-329.mjs → vendor-C47eH0xy.cjs} +2 -634
- package/components/AiAgentPopover/index.cjs +2 -2
- package/components/AiAgentPopover/index.mjs +248 -373
- package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.cjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.mjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.cjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.mjs +1 -1
- package/components/AnalyticalWidget/index.cjs +1 -1
- package/components/AnalyticalWidget/index.mjs +1 -1
- package/components/ApprovalCenter/components/index.cjs +1 -1
- package/components/ApprovalCenter/components/index.mjs +1 -1
- package/components/ApprovalCenter/index.cjs +1 -1
- package/components/ApprovalCenter/index.mjs +1 -1
- package/components/Autocomplete/index.cjs +1 -1
- package/components/Autocomplete/index.mjs +22 -35
- package/components/AutocompleteSearch/index.cjs +1 -1
- package/components/AutocompleteSearch/index.mjs +33 -83
- package/components/BlockGradientScroll/index.cjs +1 -1
- package/components/BlockGradientScroll/index.mjs +41 -53
- package/components/BlockTitle/index.cjs +1 -1
- package/components/BlockTitle/index.mjs +1 -1
- package/components/BlockTitle/utils/index.cjs +1 -1
- package/components/BlockTitle/utils/index.mjs +1 -1
- package/components/Box/index.mjs +17 -7
- package/components/Collapse/index.cjs +1 -1
- package/components/Collapse/index.mjs +41 -62
- package/components/Combobox/index.cjs +1 -1
- package/components/Combobox/index.mjs +1 -1
- package/components/DatePicker/index.cjs +1 -1
- package/components/DatePicker/index.mjs +21 -59
- package/components/DrawerDF/index.cjs +1 -1
- package/components/DrawerDF/index.mjs +144 -391
- package/components/EmptyState/components/index.cjs +1 -1
- package/components/EmptyState/components/index.mjs +1 -1
- package/components/EmptyState/index.cjs +1 -1
- package/components/EmptyState/index.mjs +1 -1
- package/components/GridDND/index.cjs +1 -1
- package/components/GridDND/index.mjs +1 -1
- package/components/GridDND/utils/index.cjs +1 -1
- package/components/GridDND/utils/index.mjs +1 -1
- package/components/IconButton/index.cjs +1 -1
- package/components/IconButton/index.mjs +49 -112
- package/components/IconSvgSprite/index.cjs +1 -1
- package/components/IconSvgSprite/index.mjs +13 -49
- package/components/LeftPanel/components/index.cjs +1 -1
- package/components/LeftPanel/components/index.mjs +1 -1
- package/components/LeftPanel/hooks/index.cjs +1 -1
- package/components/LeftPanel/hooks/index.mjs +1 -1
- package/components/LeftPanel/index.cjs +1 -1
- package/components/LeftPanel/index.mjs +1 -1
- package/components/LeftPanel/utils/index.cjs +1 -1
- package/components/LeftPanel/utils/index.mjs +1 -1
- package/components/ListOfFilters/index.cjs +1 -1
- package/components/ListOfFilters/index.mjs +1 -1
- package/components/MassActions/hooks/index.cjs +1 -1
- package/components/MassActions/hooks/index.mjs +1 -1
- package/components/MassActions/index.cjs +1 -1
- package/components/MassActions/index.mjs +1 -1
- package/components/MassActionsStatic/index.cjs +2 -2
- package/components/MassActionsStatic/index.mjs +13 -34
- package/components/ModalDF/index.cjs +1 -1
- package/components/ModalDF/index.mjs +169 -381
- package/components/ModalDFConfirmation/index.cjs +1 -1
- package/components/ModalDFConfirmation/index.mjs +66 -114
- package/components/Notification/index.cjs +1 -1
- package/components/Notification/index.mjs +16 -22
- package/components/NumberFormat/index.cjs +1 -1
- package/components/NumberFormat/index.mjs +24 -37
- package/components/NumberFormatAmount/index.cjs +1 -1
- package/components/NumberFormatAmount/index.mjs +12 -27
- package/components/PageTitle/index.cjs +1 -1
- package/components/PageTitle/index.mjs +1 -1
- package/components/PageTitle/utils/index.cjs +1 -1
- package/components/PageTitle/utils/index.mjs +1 -1
- package/components/PopoverDF/index.cjs +1 -1
- package/components/PopoverDF/index.mjs +125 -261
- package/components/PopupDF/index.cjs +1 -1
- package/components/PopupDF/index.mjs +141 -308
- package/components/SplitView/index.cjs +1 -1
- package/components/SplitView/index.mjs +1 -1
- package/components/SplitView/utils/index.cjs +1 -1
- package/components/SplitView/utils/index.mjs +1 -1
- package/components/Stories/components/StoriesBanner/index.cjs +1 -1
- package/components/Stories/components/StoriesBanner/index.mjs +1 -1
- package/components/Stories/components/StoriesContent/index.cjs +1 -1
- package/components/Stories/components/StoriesContent/index.mjs +1 -1
- package/components/Stories/components/StoriesPreview/index.cjs +1 -1
- package/components/Stories/components/StoriesPreview/index.mjs +1 -1
- package/components/Stories/components/StoriesProgress/index.cjs +1 -1
- package/components/Stories/components/StoriesProgress/index.mjs +1 -1
- package/components/Stories/components/StoriesViewer/index.cjs +1 -1
- package/components/Stories/components/StoriesViewer/index.mjs +1 -1
- package/components/Stories/index.cjs +1 -1
- package/components/Stories/index.mjs +1 -1
- package/components/Table/components/TableDropdown/index.cjs +1 -1
- package/components/Table/components/TableDropdown/index.mjs +1 -1
- package/components/Table/feature-collapse-table/index.cjs +1 -1
- package/components/Table/feature-collapse-table/index.mjs +1 -1
- package/components/Table/feature-column-control/ColumnsList/index.cjs +1 -1
- package/components/Table/feature-column-control/ColumnsList/index.mjs +1 -1
- package/components/Table/feature-column-control/index.cjs +1 -1
- package/components/Table/feature-column-control/index.mjs +1 -1
- package/components/Table/feature-columns-grouping/index.cjs +1 -1
- package/components/Table/feature-columns-grouping/index.mjs +1 -1
- package/components/Table/feature-context-menu/index.cjs +1 -1
- package/components/Table/feature-context-menu/index.mjs +1 -1
- package/components/Table/feature-edit/index.cjs +1 -1
- package/components/Table/feature-edit/index.mjs +1 -1
- package/components/Table/feature-filtering/combobox/index.cjs +1 -1
- package/components/Table/feature-filtering/combobox/index.mjs +1 -1
- package/components/Table/feature-filtering/filter-list-block/index.cjs +1 -1
- package/components/Table/feature-filtering/filter-list-block/index.mjs +1 -1
- package/components/Table/feature-filtering/header-filter-button/index.cjs +1 -1
- package/components/Table/feature-filtering/header-filter-button/index.mjs +1 -1
- package/components/Table/feature-filtering/index.cjs +1 -1
- package/components/Table/feature-filtering/index.mjs +1 -1
- package/components/Table/feature-filtering/sidebar-filter-block/index.cjs +1 -1
- package/components/Table/feature-filtering/sidebar-filter-block/index.mjs +1 -1
- package/components/Table/feature-infinity-scroll/index.cjs +1 -1
- package/components/Table/feature-infinity-scroll/index.mjs +1 -1
- package/components/Table/feature-key-text/index.cjs +1 -1
- package/components/Table/feature-key-text/index.mjs +1 -1
- package/components/Table/feature-pagination/index.cjs +1 -1
- package/components/Table/feature-pagination/index.mjs +1 -1
- package/components/Table/feature-right-sidebar/index.cjs +1 -1
- package/components/Table/feature-right-sidebar/index.mjs +1 -1
- package/components/Table/feature-row-detail/index.cjs +1 -1
- package/components/Table/feature-row-detail/index.mjs +1 -1
- package/components/Table/feature-row-instruments/index.cjs +1 -1
- package/components/Table/feature-row-instruments/index.mjs +1 -1
- package/components/Table/feature-row-size/index.cjs +1 -1
- package/components/Table/feature-row-size/index.mjs +1 -1
- package/components/Table/feature-rows-grouping/index.cjs +1 -1
- package/components/Table/feature-rows-grouping/index.mjs +1 -1
- package/components/Table/feature-searching/index.cjs +1 -1
- package/components/Table/feature-searching/index.mjs +1 -1
- package/components/Table/feature-select-row/index.cjs +1 -1
- package/components/Table/feature-select-row/index.mjs +1 -1
- package/components/Table/feature-sorting/index.cjs +1 -1
- package/components/Table/feature-sorting/index.mjs +1 -1
- package/components/Table/feature-table-settings/index.cjs +1 -1
- package/components/Table/feature-table-settings/index.mjs +1 -1
- package/components/Table/feature-tree/index.cjs +1 -1
- package/components/Table/feature-tree/index.mjs +1 -1
- package/components/Table/index.cjs +1 -1
- package/components/Table/index.mjs +1 -1
- package/components/Table/renders/formatCell/index.cjs +1 -1
- package/components/Table/renders/formatCell/index.mjs +1 -1
- package/components/Table/styles/index.cjs +1 -1
- package/components/Table/styles/index.mjs +1 -1
- package/components/Table/table-hooks/index.cjs +1 -1
- package/components/Table/table-hooks/index.mjs +1 -1
- package/components/Table/types/index.cjs +1 -1
- package/components/Table/types/index.mjs +1 -1
- package/components/Table/utils/index.cjs +1 -1
- package/components/Table/utils/index.mjs +1 -1
- package/components/Table/widgets/control-block/index.cjs +1 -1
- package/components/Table/widgets/control-block/index.mjs +1 -1
- package/components/Table/widgets/control-block/right-side/index.cjs +1 -1
- package/components/Table/widgets/control-block/right-side/index.mjs +1 -1
- package/components/Table/widgets/index.cjs +1 -1
- package/components/Table/widgets/index.mjs +1 -1
- package/components/Table/widgets/mass-actions/index.cjs +1 -1
- package/components/Table/widgets/mass-actions/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/column/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/column/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/index.mjs +2 -2
- package/components/TableCanvas/TableGlideInstance/utils/column/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/column/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/index.mjs +1 -1
- package/components/TableCanvas/components/SplitIconButton/index.cjs +1 -1
- package/components/TableCanvas/components/SplitIconButton/index.mjs +1 -1
- package/components/TableCanvas/components/TableDropdown/index.cjs +1 -1
- package/components/TableCanvas/components/TableDropdown/index.mjs +1 -1
- package/components/TableCanvas/feature-cell-transfer/index.cjs +1 -1
- package/components/TableCanvas/feature-cell-transfer/index.mjs +1 -1
- package/components/TableCanvas/feature-collapse-table/index.cjs +1 -1
- package/components/TableCanvas/feature-collapse-table/index.mjs +1 -1
- package/components/TableCanvas/feature-column-control/ColumnsList/index.cjs +1 -1
- package/components/TableCanvas/feature-column-control/ColumnsList/index.mjs +1 -1
- package/components/TableCanvas/feature-column-control/index.cjs +1 -1
- package/components/TableCanvas/feature-column-control/index.mjs +1 -1
- package/components/TableCanvas/feature-columns-grouping/index.cjs +1 -1
- package/components/TableCanvas/feature-columns-grouping/index.mjs +1 -1
- package/components/TableCanvas/feature-content-state/index.cjs +1 -1
- package/components/TableCanvas/feature-content-state/index.mjs +1 -1
- package/components/TableCanvas/feature-context-menu/index.cjs +1 -1
- package/components/TableCanvas/feature-context-menu/index.mjs +1 -1
- package/components/TableCanvas/feature-edit/index.cjs +1 -1
- package/components/TableCanvas/feature-edit/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/combobox/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/combobox/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/filter-list-block/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/filter-list-block/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/header-filter-button/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/header-filter-button/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.mjs +1 -1
- package/components/TableCanvas/feature-infinity-scroll/index.cjs +1 -1
- package/components/TableCanvas/feature-infinity-scroll/index.mjs +1 -1
- package/components/TableCanvas/feature-key-text/index.cjs +1 -1
- package/components/TableCanvas/feature-key-text/index.mjs +1 -1
- package/components/TableCanvas/feature-notifications/index.cjs +1 -1
- package/components/TableCanvas/feature-notifications/index.mjs +1 -1
- package/components/TableCanvas/feature-pagination/index.cjs +1 -1
- package/components/TableCanvas/feature-pagination/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/context/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/context/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/hooks/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/hooks/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/utils/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/utils/index.mjs +1 -1
- package/components/TableCanvas/feature-right-sidebar/index.cjs +1 -1
- package/components/TableCanvas/feature-right-sidebar/index.mjs +1 -1
- package/components/TableCanvas/feature-row-detail/index.cjs +1 -1
- package/components/TableCanvas/feature-row-detail/index.mjs +1 -1
- package/components/TableCanvas/feature-row-instruments/index.cjs +1 -1
- package/components/TableCanvas/feature-row-instruments/index.mjs +1 -1
- package/components/TableCanvas/feature-row-markers/index.cjs +1 -1
- package/components/TableCanvas/feature-row-markers/index.mjs +1 -1
- package/components/TableCanvas/feature-row-size/index.cjs +1 -1
- package/components/TableCanvas/feature-row-size/index.mjs +1 -1
- package/components/TableCanvas/feature-rows-grouping/index.cjs +1 -1
- package/components/TableCanvas/feature-rows-grouping/index.mjs +1 -1
- package/components/TableCanvas/feature-searching/index.cjs +1 -1
- package/components/TableCanvas/feature-searching/index.mjs +1 -1
- package/components/TableCanvas/feature-select-row/index.cjs +1 -1
- package/components/TableCanvas/feature-select-row/index.mjs +1 -1
- package/components/TableCanvas/feature-sorting/index.cjs +1 -1
- package/components/TableCanvas/feature-sorting/index.mjs +1 -1
- package/components/TableCanvas/feature-table-settings/index.cjs +1 -1
- package/components/TableCanvas/feature-table-settings/index.mjs +1 -1
- package/components/TableCanvas/feature-tooltip/index.cjs +1 -1
- package/components/TableCanvas/feature-tooltip/index.mjs +1 -1
- package/components/TableCanvas/feature-tooltip/utils/index.cjs +1 -1
- package/components/TableCanvas/feature-tooltip/utils/index.mjs +1 -1
- package/components/TableCanvas/feature-tree/index.cjs +1 -1
- package/components/TableCanvas/feature-tree/index.mjs +1 -1
- package/components/TableCanvas/index.cjs +1 -1
- package/components/TableCanvas/index.mjs +2 -2
- package/components/TableCanvas/renders/formatCell/index.cjs +1 -1
- package/components/TableCanvas/renders/formatCell/index.mjs +1 -1
- package/components/TableCanvas/styles/index.cjs +1 -1
- package/components/TableCanvas/styles/index.mjs +1 -1
- package/components/TableCanvas/table-hooks/index.cjs +1 -1
- package/components/TableCanvas/table-hooks/index.mjs +1 -1
- package/components/TableCanvas/types/index.cjs +1 -1
- package/components/TableCanvas/types/index.mjs +1 -1
- package/components/TableCanvas/utils/index.cjs +1 -1
- package/components/TableCanvas/utils/index.mjs +2 -2
- package/components/TableCanvas/widgets/control-block/compression/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/compression/index.mjs +1 -1
- package/components/TableCanvas/widgets/control-block/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/index.mjs +1 -1
- package/components/TableCanvas/widgets/control-block/right-side/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/right-side/index.mjs +1 -1
- package/components/TableCanvas/widgets/index.cjs +1 -1
- package/components/TableCanvas/widgets/index.mjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/index.cjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/index.mjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/index.cjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/index.mjs +1 -1
- package/components/TableContract/index.cjs +2 -2
- package/components/TableContract/index.mjs +540 -798
- package/components/TableGlide/hooks/selection/index.cjs +1 -1
- package/components/TableGlide/hooks/selection/index.mjs +1 -1
- package/components/TableGlide/index.cjs +1 -1
- package/components/TableGlide/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/cells/buttons/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/cells/buttons/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/cells/iconSprites/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/cells/iconSprites/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/cells/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/cells/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/cells/renderer/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/cells/renderer/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/core/helpers/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/core/helpers/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/core/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/core/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/hooks/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/hooks/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/miniflex/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/miniflex/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/primitives/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/primitives/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/utils/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/utils/index.mjs +1 -1
- package/components/TableGlide/theming/index.cjs +1 -1
- package/components/TableGlide/theming/index.mjs +1 -1
- package/components/TableTabs/index.cjs +1 -1
- package/components/TableTabs/index.mjs +136 -305
- package/components/TextArea/index.cjs +1 -1
- package/components/TextArea/index.mjs +26 -40
- package/components/TextField/index.cjs +1 -1
- package/components/TextField/index.mjs +38 -82
- package/components/Tooltip/index.cjs +1 -1
- package/components/Tooltip/index.mjs +1 -1
- package/components/TourWidget/index.cjs +15 -15
- package/components/TourWidget/index.mjs +176 -371
- package/components/Typography/index.cjs +1 -1
- package/components/Typography/index.mjs +1 -1
- package/components/Widget/index.cjs +1 -1
- package/components/Widget/index.mjs +151 -363
- package/formComponents/FormAutocomplete/index.cjs +1 -1
- package/formComponents/FormAutocomplete/index.mjs +63 -68
- package/formComponents/FormCheckbox/index.cjs +1 -1
- package/formComponents/FormCheckbox/index.mjs +27 -55
- package/formComponents/FormCombobox/index.cjs +1 -1
- package/formComponents/FormCombobox/index.mjs +61 -75
- package/formComponents/FormDatePickers/FormDatePicker/index.cjs +1 -1
- package/formComponents/FormDatePickers/FormDatePicker/index.mjs +1 -1
- package/formComponents/FormDatePickers/FormDatePickerRange/index.cjs +1 -1
- package/formComponents/FormDatePickers/FormDatePickerRange/index.mjs +1 -1
- package/formComponents/FormDatePickers/FormDatePickerRange/lib/utils/index.cjs +1 -1
- package/formComponents/FormDatePickers/FormDatePickerRange/lib/utils/index.mjs +1 -1
- package/formComponents/FormDatePickers/index.cjs +1 -1
- package/formComponents/FormDatePickers/index.mjs +1 -1
- package/formComponents/FormMask/index.cjs +1 -1
- package/formComponents/FormMask/index.mjs +61 -66
- package/formComponents/FormNumberFormat/index.cjs +1 -1
- package/formComponents/FormNumberFormat/index.mjs +56 -68
- package/formComponents/FormRadioGroupBox/index.cjs +1 -1
- package/formComponents/FormRadioGroupBox/index.mjs +71 -144
- package/formComponents/FormSegments/index.cjs +1 -1
- package/formComponents/FormSegments/index.mjs +1 -1
- package/formComponents/FormSelect/index.cjs +1 -1
- package/formComponents/FormSelect/index.mjs +62 -76
- package/formComponents/FormSwitch/index.cjs +1 -1
- package/formComponents/FormSwitch/index.mjs +25 -53
- package/formComponents/FormTextArea/index.cjs +1 -1
- package/formComponents/FormTextArea/index.mjs +1 -1
- package/formComponents/FormTextArea/ui/index.cjs +1 -1
- package/formComponents/FormTextArea/ui/index.mjs +1 -1
- package/formComponents/FormTextField/index.cjs +1 -1
- package/formComponents/FormTextField/index.mjs +70 -101
- package/index.cjs +1 -1
- package/index.mjs +21 -21
- package/layouts/Container/index.cjs +1 -1
- package/layouts/Container/index.mjs +1 -1
- package/layouts/Container/lib/utils/index.cjs +1 -1
- package/layouts/Container/lib/utils/index.mjs +1 -1
- package/layouts/ErrorPage/index.cjs +1 -1
- package/layouts/ErrorPage/index.mjs +81 -146
- package/layouts/FiltersActions/hooks/index.cjs +1 -1
- package/layouts/FiltersActions/hooks/index.mjs +1 -1
- package/layouts/FiltersActions/index.cjs +1 -1
- package/layouts/FiltersActions/index.mjs +1 -1
- package/layouts/Layout/index.cjs +5 -5
- package/layouts/Layout/index.mjs +78 -115
- package/layouts/PageLayout/index.cjs +2 -2
- package/layouts/PageLayout/index.mjs +15 -32
- package/mixins/index.cjs +1 -1
- package/mixins/index.mjs +1 -1
- package/package.json +1 -1
- package/shared/ui/Search/index.cjs +1 -1
- package/shared/ui/Search/index.mjs +30 -52
- package/shared/utils/inputs/index.cjs +1 -1
- package/shared/utils/inputs/index.mjs +33 -48
- package/styles/index.cjs +1 -1
- package/styles/index.mjs +1 -1
- package/themes/index.cjs +1 -1
- package/themes/index.mjs +1 -1
- package/utils/breakpoint/index.cjs +1 -1
- package/utils/breakpoint/index.mjs +1 -1
- package/utils/clickStream/index.cjs +1 -1
- package/utils/clickStream/index.mjs +1 -1
- package/utils/eventBus/index.cjs +1 -1
- package/utils/eventBus/index.mjs +1 -1
- package/utils/hooks/index.cjs +1 -1
- package/utils/hooks/index.mjs +1 -1
- package/utils/index.cjs +1 -1
- package/utils/index.mjs +1 -1
- package/utils/styles/index.cjs +1 -1
- package/utils/styles/index.mjs +1 -1
- package/chunks/AnalyticalWidget-Ca_EuSTO.mjs +0 -868
- package/chunks/AnalyticalWidget-xgvWcsXx.cjs +0 -43
- package/chunks/ApprovalCenter-4aJlJfei.mjs +0 -531
- package/chunks/ApprovalCenter-Ij5NMkY-.cjs +0 -1
- package/chunks/BlockTitle-CgXVHok6.mjs +0 -180
- package/chunks/BlockTitle-SaP9H2PI.cjs +0 -1
- package/chunks/Container-ChuCs63G.cjs +0 -17
- package/chunks/Container-D8RdjkGo.mjs +0 -180
- package/chunks/EmptyState-BxUh2dhY.cjs +0 -1
- package/chunks/EmptyState-C0aHgxrn.mjs +0 -615
- package/chunks/FiltersActions-BekNxF-h.cjs +0 -1
- package/chunks/FiltersActions-CSucE-Ql.mjs +0 -637
- package/chunks/FormDatePickers-BCyW24Pr.cjs +0 -1
- package/chunks/FormDatePickers-DfdGdbwP.mjs +0 -538
- package/chunks/FormSegmentGroup-BKuHtPEn.cjs +0 -1
- package/chunks/FormSegmentGroup-DqFMVBr0.mjs +0 -268
- package/chunks/FormTextArea-CCrYx4pL.mjs +0 -159
- package/chunks/FormTextArea-sly1mY7h.cjs +0 -1
- package/chunks/GridDND-Bycwiynh.mjs +0 -1086
- package/chunks/GridDND-MsZt1fXJ.cjs +0 -1
- package/chunks/LeftPanel-C72uosX_.mjs +0 -303
- package/chunks/LeftPanel-Di-IqpZ_.cjs +0 -1
- package/chunks/ListOfFilters-B3bM1n4w.cjs +0 -1
- package/chunks/ListOfFilters-CPJGgMMc.mjs +0 -462
- package/chunks/MassActions-BbAXi3z9.cjs +0 -1
- package/chunks/MassActions-CZm8vqj8.mjs +0 -1352
- package/chunks/PageTitle-DEsijnDg.cjs +0 -1
- package/chunks/PageTitle-TusD1S2c.mjs +0 -282
- package/chunks/SplitView-BHdftJ9A.cjs +0 -12
- package/chunks/SplitView-Cd-xkxCe.mjs +0 -339
- package/chunks/Stories-CR_EUNO7.mjs +0 -1018
- package/chunks/Stories-CxsYx2OE.cjs +0 -1
- package/chunks/Table--05ONCr1.cjs +0 -31
- package/chunks/Table-l-P3NNUN.mjs +0 -11944
- package/chunks/TableCanvas-BYKPeWME.mjs +0 -16941
- package/chunks/TableCanvas-ZmjSKk64.cjs +0 -30
- package/chunks/TableGlide-CbvaAM_H.cjs +0 -1
- package/chunks/styles-D8FDGdVz.mjs +0 -240
- package/chunks/styles-OR0WE1xm.cjs +0 -2
- package/chunks/utils-C93a2mD7.cjs +0 -25
|
@@ -0,0 +1,966 @@
|
|
|
1
|
+
import { jsx as B, jsxs as vt } from "react/jsx-runtime";
|
|
2
|
+
import { Divider as Ft, EmbedIconButton as Kt, LinkButton as Zt, Button as Pt, Dropdown as Gt, Checkbox as Qt, IconButton as bt, Tooltip as te } from "@salutejs/sdds-finai";
|
|
3
|
+
import { IconDoubleDisclosureUp as ee, IconDotsVerticalCenteredOutline as ne } from "@salutejs/plasma-icons";
|
|
4
|
+
import { c as Ut, d as qt, i as se, p as ie } from "./utils-C5SQhoON.mjs";
|
|
5
|
+
import { useMemo as Xt, useCallback as pt, useRef as $, useState as ht, useEffect as st, useLayoutEffect as oe } from "react";
|
|
6
|
+
import { T as jt, A as ce } from "./Table-Bj2se1hR.mjs";
|
|
7
|
+
import { s as Jt } from "../constants/index.mjs";
|
|
8
|
+
import { surfaceSolidCard as re, outlineSolidPrimary as le, shadowDownHardS as ae, spacing10x as de } from "@salutejs/sdds-themes/tokens/sdds_finai";
|
|
9
|
+
import U, { css as yt } from "styled-components";
|
|
10
|
+
import { Box as kt } from "../components/Box/index.mjs";
|
|
11
|
+
import { Collapse as ue } from "../components/Collapse/index.mjs";
|
|
12
|
+
import { T as zt } from "./AnalyticalWidget-CBi-2MtJ.mjs";
|
|
13
|
+
const mt = 24, k = 4, Ct = 44, Yt = 40, Tt = 24, it = {
|
|
14
|
+
top: 12,
|
|
15
|
+
right: 8,
|
|
16
|
+
bottom: 12,
|
|
17
|
+
left: 24
|
|
18
|
+
}, It = {
|
|
19
|
+
top: 0,
|
|
20
|
+
right: 10,
|
|
21
|
+
bottom: 0,
|
|
22
|
+
left: 24
|
|
23
|
+
}, on = it.left + it.right, $t = 90, he = 110, wt = 100, cn = 300, _t = 550, pe = 350, fe = 50, ge = 100, me = ({
|
|
24
|
+
buttons: t,
|
|
25
|
+
visibleButtonsCount: i
|
|
26
|
+
}) => {
|
|
27
|
+
const {
|
|
28
|
+
visibleButtons: o,
|
|
29
|
+
buttonsInDropdown: n
|
|
30
|
+
} = Xt(() => {
|
|
31
|
+
const e = t ?? [], c = /* @__PURE__ */ new Set(), h = [];
|
|
32
|
+
e.forEach((p, u) => {
|
|
33
|
+
p.view === "accent" ? c.add(u) : h.push(u);
|
|
34
|
+
});
|
|
35
|
+
const l = c.size, a = Math.max(0, i - l), s = new Set(h.slice(0, a)), r = [], g = [];
|
|
36
|
+
return e.forEach((p, u) => {
|
|
37
|
+
c.has(u) || s.has(u) ? r.push(p) : g.push(p);
|
|
38
|
+
}), {
|
|
39
|
+
visibleButtons: r,
|
|
40
|
+
buttonsInDropdown: g
|
|
41
|
+
};
|
|
42
|
+
}, [t, i]);
|
|
43
|
+
return {
|
|
44
|
+
visibleButtons: o,
|
|
45
|
+
buttonsInDropdown: n,
|
|
46
|
+
allButtons: t ?? []
|
|
47
|
+
};
|
|
48
|
+
}, we = ({
|
|
49
|
+
isCollapsed: t,
|
|
50
|
+
setIsCollapsed: i,
|
|
51
|
+
isSidebarOpen: o,
|
|
52
|
+
calculatePositionForState: n,
|
|
53
|
+
calculatePosition: e,
|
|
54
|
+
setTranslateX: c,
|
|
55
|
+
shouldApplySidebarOffsetRef: h,
|
|
56
|
+
wasAutoCollapsedRef: l
|
|
57
|
+
}) => ({
|
|
58
|
+
handleToggleCollapse: pt(() => {
|
|
59
|
+
const s = !t, r = n(s);
|
|
60
|
+
r !== void 0 && c(r), o && (s ? h.current = !0 : (h.current = !1, l.current = !1)), i(s), setTimeout(() => {
|
|
61
|
+
e();
|
|
62
|
+
}, _t);
|
|
63
|
+
}, [t, o, n, e, c, h, l, i])
|
|
64
|
+
}), xe = ({
|
|
65
|
+
isCollapsed: t,
|
|
66
|
+
containerRef: i,
|
|
67
|
+
contentRef: o,
|
|
68
|
+
middleSectionRef: n,
|
|
69
|
+
buttonRefs: e,
|
|
70
|
+
moreButtonRef: c,
|
|
71
|
+
collapseButtonRef: h,
|
|
72
|
+
leftSectionRef: l,
|
|
73
|
+
dividerRef: a,
|
|
74
|
+
buttons: s,
|
|
75
|
+
isHaveSomeFeatureInSidebar: r,
|
|
76
|
+
getContainerWidth: g,
|
|
77
|
+
setVisibleButtonsCount: p,
|
|
78
|
+
minPadding: u = Tt,
|
|
79
|
+
leftPadding: C = it.left,
|
|
80
|
+
rightPadding: w = it.right,
|
|
81
|
+
moreButtonWidthEstimate: A = Yt,
|
|
82
|
+
enableDebugLogs: x = !1
|
|
83
|
+
}) => {
|
|
84
|
+
const _ = $([]), L = pt(() => {
|
|
85
|
+
var dt, Y, ft, rt, ut, T;
|
|
86
|
+
const E = g();
|
|
87
|
+
if (!E || E === 0 || !s || s.length === 0)
|
|
88
|
+
return x && console.debug("❌ calculateInitialCompression: нет tableWidth или buttons"), !1;
|
|
89
|
+
if (!s.every((f, v) => e.current[v] !== null && e.current[v] !== void 0))
|
|
90
|
+
return x && console.debug("❌ calculateInitialCompression: ref'ы еще не установлены", {
|
|
91
|
+
buttonsCount: s.length,
|
|
92
|
+
refsCount: e.current.filter(Boolean).length,
|
|
93
|
+
refs: e.current.map((f, v) => ({
|
|
94
|
+
index: v,
|
|
95
|
+
hasRef: !!f
|
|
96
|
+
}))
|
|
97
|
+
}), !1;
|
|
98
|
+
const O = E - (r ? Ct : 0), q = ((dt = l == null ? void 0 : l.current) == null ? void 0 : dt.getBoundingClientRect().width) ?? 0, S = ((Y = n.current) == null ? void 0 : Y.getBoundingClientRect().width) ?? 0, V = s.length > 0, P = V ? ((ft = a == null ? void 0 : a.current) == null ? void 0 : ft.getBoundingClientRect().width) ?? 0 : 0, X = V ? k : 0, Q = V && S > 0 ? k : 0, ot = P + Q + X, at = k * 2, ct = q + S + ot + // Divider с учетом margins и gaps
|
|
99
|
+
(((rt = h.current) == null ? void 0 : rt.getBoundingClientRect().width) ?? mt) + (C + w) + // Динамический padding контейнера
|
|
100
|
+
at, y = [];
|
|
101
|
+
let z = !0;
|
|
102
|
+
for (let f = 0; f < s.length; f += 1) {
|
|
103
|
+
const v = e.current[f];
|
|
104
|
+
if (!v) {
|
|
105
|
+
z = !1;
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
const F = v.querySelector("button, a") || v;
|
|
109
|
+
if (!F || !F.isConnected) {
|
|
110
|
+
z = !1;
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
const gt = F.getBoundingClientRect(), lt = gt.width || F.offsetWidth || F.scrollWidth || F.clientWidth;
|
|
114
|
+
if (lt > 0)
|
|
115
|
+
y.push(lt), _.current[f] = lt;
|
|
116
|
+
else {
|
|
117
|
+
console.debug("❌ calculateInitialCompression: кнопка не отрендерилась", {
|
|
118
|
+
index: f,
|
|
119
|
+
text: (ut = s[f]) == null ? void 0 : ut.text,
|
|
120
|
+
width: lt,
|
|
121
|
+
isConnected: F.isConnected,
|
|
122
|
+
rect: gt
|
|
123
|
+
}), z = !1;
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
if (!z || y.length !== s.length)
|
|
128
|
+
return x && console.debug("❌ calculateInitialCompression: не все кнопки измерены", {
|
|
129
|
+
allButtonsMeasured: z,
|
|
130
|
+
buttonWidthsLength: y.length,
|
|
131
|
+
buttonsLength: s.length
|
|
132
|
+
}), !1;
|
|
133
|
+
const b = ((T = c.current) == null ? void 0 : T.getBoundingClientRect().width) ?? A, I = O - u * 2, N = [], D = [];
|
|
134
|
+
s.forEach((f, v) => {
|
|
135
|
+
if (y[v] === void 0)
|
|
136
|
+
return;
|
|
137
|
+
(f == null ? void 0 : f.view) === "accent" ? N.push(v) : D.push(v);
|
|
138
|
+
});
|
|
139
|
+
let G = 0;
|
|
140
|
+
N.forEach((f) => {
|
|
141
|
+
const v = y[f];
|
|
142
|
+
v !== void 0 && (G += v);
|
|
143
|
+
});
|
|
144
|
+
const j = new Set(N);
|
|
145
|
+
let tt = G, et = 0;
|
|
146
|
+
for (let f = 0; f < D.length; f += 1) {
|
|
147
|
+
const v = D[f], M = typeof v < "u" ? y[v] : 0;
|
|
148
|
+
if (M === void 0)
|
|
149
|
+
continue;
|
|
150
|
+
const gt = f < D.length - 1 ? b + k : 0, xt = (j.size + 1 - 1) * k, Bt = tt + M + xt + gt;
|
|
151
|
+
if (ct + Bt <= I)
|
|
152
|
+
tt += M, et += 1, typeof v < "u" && j.add(v);
|
|
153
|
+
else
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
const J = j.size;
|
|
157
|
+
return p(J), console.debug("✅ calculateInitialCompression: успешно выполнено", {
|
|
158
|
+
buttonWidths: y,
|
|
159
|
+
visibleCount: J,
|
|
160
|
+
accentCount: N.length,
|
|
161
|
+
regularVisibleCount: et
|
|
162
|
+
}), !0;
|
|
163
|
+
}, [s, g, r, p, e, l, n, c, h, a, x, u, C, w, A]);
|
|
164
|
+
return {
|
|
165
|
+
calculateCompression: pt(() => {
|
|
166
|
+
t || !i.current || !o.current || requestAnimationFrame(() => {
|
|
167
|
+
setTimeout(() => {
|
|
168
|
+
var lt, xt, Bt, At, Nt, Ot, Mt;
|
|
169
|
+
const E = g();
|
|
170
|
+
if (!E || E === 0)
|
|
171
|
+
return;
|
|
172
|
+
const W = E - (r ? Ct : 0);
|
|
173
|
+
x && (console.group("🔧 MassActions Compression"), console.debug("📏 Размеры контейнера:", JSON.stringify({
|
|
174
|
+
tableWidth: E,
|
|
175
|
+
isHaveSomeFeatureInSidebar: r,
|
|
176
|
+
togglePanelWidth: r ? Ct : 0,
|
|
177
|
+
availableWidth: W,
|
|
178
|
+
minPaddingRequired: u * 2,
|
|
179
|
+
maxPanelWidthAllowed: W - u * 2
|
|
180
|
+
}, null, 2)));
|
|
181
|
+
const O = ((lt = l == null ? void 0 : l.current) == null ? void 0 : lt.getBoundingClientRect().width) ?? 0, q = ((xt = n.current) == null ? void 0 : xt.getBoundingClientRect().width) ?? 0, S = ((s == null ? void 0 : s.length) ?? 0) > 0, V = S ? ((Bt = a == null ? void 0 : a.current) == null ? void 0 : Bt.getBoundingClientRect().width) ?? 0 : 0, P = S ? k : 0, X = S && q > 0 ? k : 0, Q = V + X + P;
|
|
182
|
+
let ot = null;
|
|
183
|
+
if (l != null && l.current) {
|
|
184
|
+
const d = l.current.getBoundingClientRect(), {
|
|
185
|
+
children: m
|
|
186
|
+
} = l.current, K = [];
|
|
187
|
+
for (let H = 0; H < m.length; H += 1) {
|
|
188
|
+
const Z = m[H];
|
|
189
|
+
if (Z) {
|
|
190
|
+
const nt = Z.getBoundingClientRect();
|
|
191
|
+
K.push({
|
|
192
|
+
tagName: Z.tagName,
|
|
193
|
+
className: Z.className,
|
|
194
|
+
width: nt.width,
|
|
195
|
+
height: nt.height
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
ot = {
|
|
200
|
+
width: d.width,
|
|
201
|
+
height: d.height,
|
|
202
|
+
children: K,
|
|
203
|
+
childrenTotalWidth: K.reduce((H, Z) => H + Z.width, 0)
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
const at = k * 2, ct = O + q + Q + // Divider с учетом margins и gaps
|
|
207
|
+
(((At = h.current) == null ? void 0 : At.getBoundingClientRect().width) ?? mt) + (C + w) + at;
|
|
208
|
+
x && console.debug("🔲 Фиксированные элементы:", JSON.stringify({
|
|
209
|
+
leftSectionWidth: O,
|
|
210
|
+
leftSectionDetails: ot,
|
|
211
|
+
middleSectionWidth: q,
|
|
212
|
+
divider: {
|
|
213
|
+
shouldShow: S,
|
|
214
|
+
wrapperWidth: V,
|
|
215
|
+
gapLeft: X,
|
|
216
|
+
gapRight: P,
|
|
217
|
+
totalWidth: Q
|
|
218
|
+
},
|
|
219
|
+
collapseButtonWidth: ((Nt = h.current) == null ? void 0 : Nt.getBoundingClientRect().width) ?? mt,
|
|
220
|
+
containerPadding: C + w,
|
|
221
|
+
gapsBetweenFixedElements: at,
|
|
222
|
+
fixedElementsTotal: ct
|
|
223
|
+
}, null, 2));
|
|
224
|
+
const y = [];
|
|
225
|
+
let z = !0;
|
|
226
|
+
for (let d = 0; d < ((s == null ? void 0 : s.length) ?? 0); d += 1) {
|
|
227
|
+
const m = e.current[d];
|
|
228
|
+
if (m) {
|
|
229
|
+
const H = m.querySelector("button, a") || m, nt = H.getBoundingClientRect().width || H.offsetWidth || H.scrollWidth || H.clientWidth;
|
|
230
|
+
nt > 0 ? (y.push(nt), _.current[d] = nt) : _.current[d] !== void 0 ? y.push(_.current[d] ?? wt) : (z = !1, y.push(wt));
|
|
231
|
+
} else
|
|
232
|
+
_.current[d] !== void 0 ? y.push(_.current[d] ?? wt) : (z = !1, y.push(wt));
|
|
233
|
+
}
|
|
234
|
+
if (!z && y.length === 0 && ((s == null ? void 0 : s.length) ?? 0) > 0)
|
|
235
|
+
return;
|
|
236
|
+
const b = ((Ot = c.current) == null ? void 0 : Ot.getBoundingClientRect().width) ?? A, I = W - u * 2, N = i.current ? i.current.getBoundingClientRect().width : 0;
|
|
237
|
+
x && (console.debug("🎯 Ограничения и текущее состояние:", JSON.stringify({
|
|
238
|
+
targetContainer: {
|
|
239
|
+
tableWidth: E,
|
|
240
|
+
availableWidth: W,
|
|
241
|
+
minPaddingEach: u,
|
|
242
|
+
minPaddingTotal: u * 2,
|
|
243
|
+
maxPanelWidth: I
|
|
244
|
+
},
|
|
245
|
+
currentPanel: {
|
|
246
|
+
width: N,
|
|
247
|
+
exceedsMax: N > I,
|
|
248
|
+
exceedsAvailable: N > W,
|
|
249
|
+
leftPadding: u,
|
|
250
|
+
rightPadding: u
|
|
251
|
+
},
|
|
252
|
+
moreButtonWidth: b
|
|
253
|
+
}, null, 2)), console.debug("🔘 Ширины кнопок:", JSON.stringify({
|
|
254
|
+
buttons: s == null ? void 0 : s.map((d, m) => ({
|
|
255
|
+
index: m,
|
|
256
|
+
text: d.text,
|
|
257
|
+
view: d.view,
|
|
258
|
+
isAccent: d.view === "accent",
|
|
259
|
+
width: y[m]
|
|
260
|
+
})),
|
|
261
|
+
totalButtonsWidth: y.reduce((d, m) => d + m, 0),
|
|
262
|
+
averageButtonWidth: y.length > 0 ? y.reduce((d, m) => d + m, 0) / y.length : 0
|
|
263
|
+
}, null, 2)));
|
|
264
|
+
const D = s ?? [], G = [], j = [];
|
|
265
|
+
D.forEach((d, m) => {
|
|
266
|
+
if (y[m] === void 0)
|
|
267
|
+
return;
|
|
268
|
+
(d == null ? void 0 : d.view) === "accent" ? G.push(m) : j.push(m);
|
|
269
|
+
}), x && console.debug("🎨 Распределение:", {
|
|
270
|
+
accentCount: G.length,
|
|
271
|
+
regularCount: j.length,
|
|
272
|
+
accentButtons: G.map((d) => {
|
|
273
|
+
var m;
|
|
274
|
+
return {
|
|
275
|
+
index: d,
|
|
276
|
+
text: (m = D[d]) == null ? void 0 : m.text,
|
|
277
|
+
width: y[d]
|
|
278
|
+
};
|
|
279
|
+
})
|
|
280
|
+
});
|
|
281
|
+
let tt = 0;
|
|
282
|
+
G.forEach((d) => {
|
|
283
|
+
const m = y[d];
|
|
284
|
+
m !== void 0 && (tt += m);
|
|
285
|
+
});
|
|
286
|
+
const et = new Set(G);
|
|
287
|
+
let J = tt, dt = 0;
|
|
288
|
+
for (let d = 0; d < j.length; d += 1) {
|
|
289
|
+
const m = j[d], K = typeof m < "u" ? y[m] : 0;
|
|
290
|
+
if (K === void 0)
|
|
291
|
+
continue;
|
|
292
|
+
const Z = d < j.length - 1 ? b + k : 0, nt = et.size + 1, St = (nt - 1) * k, Dt = J + K + St + Z, Wt = ct + Dt, Et = Wt + 3;
|
|
293
|
+
if (x && console.debug(` 🔍 Проверка кнопки ${d}:`, {
|
|
294
|
+
text: typeof m < "u" ? (Mt = D[m]) == null ? void 0 : Mt.text : "",
|
|
295
|
+
width: K,
|
|
296
|
+
totalButtonsWidthBefore: J,
|
|
297
|
+
visibleCountAfter: nt,
|
|
298
|
+
gapsBetweenButtons: St,
|
|
299
|
+
moreButtonSpace: Z,
|
|
300
|
+
requiredWidth: Dt,
|
|
301
|
+
testPanelWidth: Wt,
|
|
302
|
+
testWithBuffer: Et,
|
|
303
|
+
maxPanelWidth: I,
|
|
304
|
+
fits: Wt <= I,
|
|
305
|
+
fitsWithBuffer: Et <= I
|
|
306
|
+
}), Et <= I)
|
|
307
|
+
J += K, dt += 1, typeof m < "u" && et.add(m);
|
|
308
|
+
else
|
|
309
|
+
break;
|
|
310
|
+
}
|
|
311
|
+
const Y = et.size, rt = D.length - Y > 0, ut = Y > 0 ? (Y - 1) * k : 0, T = J + ut + (rt ? b + k : 0), f = ct + T, v = [], M = [];
|
|
312
|
+
D.forEach((d, m) => {
|
|
313
|
+
et.has(m) ? v.push(d) : M.push(d);
|
|
314
|
+
});
|
|
315
|
+
const F = Y, gt = {
|
|
316
|
+
fixedElements: {
|
|
317
|
+
leftSection: O,
|
|
318
|
+
middleSection: q,
|
|
319
|
+
divider: Q,
|
|
320
|
+
collapseButton: mt,
|
|
321
|
+
containerPadding: C + w,
|
|
322
|
+
gapsBetweenFixedElements: at,
|
|
323
|
+
total: ct
|
|
324
|
+
},
|
|
325
|
+
buttons: {
|
|
326
|
+
accentButtonsWidth: tt,
|
|
327
|
+
visibleRegularButtonsWidth: J - tt,
|
|
328
|
+
totalButtonsWidth: J,
|
|
329
|
+
// Сумма только ширин кнопок без gaps
|
|
330
|
+
gapsBetweenVisibleButtons: ut,
|
|
331
|
+
buttonsAreaWidth: T,
|
|
332
|
+
// С учетом gaps
|
|
333
|
+
visibleButtonsCount: Y,
|
|
334
|
+
hiddenButtonsCount: M.length
|
|
335
|
+
},
|
|
336
|
+
moreButton: rt ? {
|
|
337
|
+
width: b,
|
|
338
|
+
gap: k,
|
|
339
|
+
total: b + k
|
|
340
|
+
} : null,
|
|
341
|
+
final: {
|
|
342
|
+
calculatedWidth: f,
|
|
343
|
+
actualPanelWidth: N,
|
|
344
|
+
widthDifference: N - f,
|
|
345
|
+
maxAllowedWidth: I,
|
|
346
|
+
availableWidth: W,
|
|
347
|
+
fits: f <= I,
|
|
348
|
+
actualFits: N <= I,
|
|
349
|
+
exceedsBy: f > I ? f - I : 0,
|
|
350
|
+
actualExceedsBy: N > I ? N - I : 0,
|
|
351
|
+
leftPaddingRequired: u,
|
|
352
|
+
rightPaddingRequired: u,
|
|
353
|
+
totalPaddingRequired: u * 2
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
x && (console.debug("✅ Результат компрессии:", JSON.stringify({
|
|
357
|
+
summary: {
|
|
358
|
+
totalButtons: D.length,
|
|
359
|
+
accentCount: G.length,
|
|
360
|
+
visibleRegularCount: dt,
|
|
361
|
+
visibleCount: F,
|
|
362
|
+
hiddenCount: M.length,
|
|
363
|
+
finalPanelWidth: f,
|
|
364
|
+
maxPanelWidth: I,
|
|
365
|
+
fits: f <= I,
|
|
366
|
+
hasMoreButton: rt
|
|
367
|
+
},
|
|
368
|
+
breakdown: gt
|
|
369
|
+
}, null, 2)), console.debug("👁️ Видимые кнопки:", {
|
|
370
|
+
buttons: v.map((d) => ({
|
|
371
|
+
text: d.text,
|
|
372
|
+
view: d.view,
|
|
373
|
+
isAccent: d.view === "accent"
|
|
374
|
+
}))
|
|
375
|
+
}), console.debug("📦 Кнопки в dropdown:", {
|
|
376
|
+
buttons: M.map((d) => ({
|
|
377
|
+
text: d.text,
|
|
378
|
+
view: d.view
|
|
379
|
+
}))
|
|
380
|
+
}), console.groupEnd()), p(Y);
|
|
381
|
+
}, fe);
|
|
382
|
+
});
|
|
383
|
+
}, [t, i, o, g, r, x, l, n, s, a, c, h, u, C, w, A, p, e]),
|
|
384
|
+
calculateInitialCompression: L,
|
|
385
|
+
measuredButtonWidthsRef: _
|
|
386
|
+
};
|
|
387
|
+
}, Be = (t) => {
|
|
388
|
+
const [i, o] = ht(0), n = pt(() => typeof t == "function" ? t() : t.current, [t]), e = pt(() => {
|
|
389
|
+
const c = n();
|
|
390
|
+
return c ? c.getBoundingClientRect().width : 0;
|
|
391
|
+
}, [n]);
|
|
392
|
+
return st(() => {
|
|
393
|
+
const c = n();
|
|
394
|
+
if (!c)
|
|
395
|
+
return;
|
|
396
|
+
o(c.getBoundingClientRect().width);
|
|
397
|
+
const h = Ut((l) => {
|
|
398
|
+
for (const a of l) {
|
|
399
|
+
const {
|
|
400
|
+
width: s
|
|
401
|
+
} = a.contentRect;
|
|
402
|
+
o(s);
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
return h.observe(c), () => {
|
|
406
|
+
h.disconnect();
|
|
407
|
+
};
|
|
408
|
+
}, [n]), {
|
|
409
|
+
containerWidth: i,
|
|
410
|
+
getContainerWidth: e,
|
|
411
|
+
getContainer: n
|
|
412
|
+
};
|
|
413
|
+
}, Ce = ({
|
|
414
|
+
containerRef: t,
|
|
415
|
+
buttonRefs: i,
|
|
416
|
+
buttons: o,
|
|
417
|
+
isVisible: n,
|
|
418
|
+
isCollapsed: e,
|
|
419
|
+
visibleButtonsCount: c,
|
|
420
|
+
selectedCount: h,
|
|
421
|
+
setIsCollapsed: l,
|
|
422
|
+
setVisibleButtonsCount: a,
|
|
423
|
+
calculatePosition: s,
|
|
424
|
+
calculateCompression: r,
|
|
425
|
+
measuredButtonWidthsRef: g,
|
|
426
|
+
containerWidth: p
|
|
427
|
+
}) => {
|
|
428
|
+
st(() => {
|
|
429
|
+
p > 0 && (s(), r());
|
|
430
|
+
}, [p, s, r]), oe(() => {
|
|
431
|
+
if (!t.current)
|
|
432
|
+
return;
|
|
433
|
+
const u = Ut(() => {
|
|
434
|
+
s();
|
|
435
|
+
});
|
|
436
|
+
return u.observe(t.current), () => {
|
|
437
|
+
u.disconnect();
|
|
438
|
+
};
|
|
439
|
+
}, [s, t]), st(() => {
|
|
440
|
+
i.current = Array((o == null ? void 0 : o.length) ?? 0).fill(null), a((o == null ? void 0 : o.length) ?? 0), g.current = [];
|
|
441
|
+
}, [o == null ? void 0 : o.length, i, a, g]), st(() => {
|
|
442
|
+
if (n && !e) {
|
|
443
|
+
const u = setTimeout(() => {
|
|
444
|
+
r(), s();
|
|
445
|
+
}, ge);
|
|
446
|
+
return () => {
|
|
447
|
+
clearTimeout(u);
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
}, [n, e, r, s]), st(() => {
|
|
451
|
+
if (e) {
|
|
452
|
+
s();
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
s();
|
|
456
|
+
}, [e, c, s]), st(() => () => {
|
|
457
|
+
(!n || h === 0) && l(!1);
|
|
458
|
+
}, [n, h, l]);
|
|
459
|
+
}, ve = ({
|
|
460
|
+
containerRef: t,
|
|
461
|
+
collapseButtonRef: i,
|
|
462
|
+
leftSectionRef: o,
|
|
463
|
+
getContainerWidth: n,
|
|
464
|
+
isHaveSomeFeatureInSidebar: e,
|
|
465
|
+
sidebarConfig: c,
|
|
466
|
+
visibleButtonsCount: h,
|
|
467
|
+
setTranslateX: l,
|
|
468
|
+
minPadding: a = Tt,
|
|
469
|
+
enableDebugLogs: s = !1
|
|
470
|
+
}) => {
|
|
471
|
+
const r = (c == null ? void 0 : c.isOpen) ?? !1, g = (c == null ? void 0 : c.width) ?? 0, p = (c == null ? void 0 : c.togglePanelWidth) ?? Ct, u = $(!1), C = pt((A) => {
|
|
472
|
+
var S, V;
|
|
473
|
+
const x = n();
|
|
474
|
+
if (!x || x === 0)
|
|
475
|
+
return;
|
|
476
|
+
const _ = g + p, L = r ? _ / 2 : 0, R = e ? p / 2 : 0;
|
|
477
|
+
let E = -(L + R), W;
|
|
478
|
+
if (A) {
|
|
479
|
+
const P = ((S = o == null ? void 0 : o.current) == null ? void 0 : S.getBoundingClientRect().width) ?? $t, X = ((V = i.current) == null ? void 0 : V.getBoundingClientRect().width) ?? mt, Q = It.top + It.right + It.left;
|
|
480
|
+
W = P + X + Q;
|
|
481
|
+
} else if (t.current)
|
|
482
|
+
W = t.current.getBoundingClientRect().width;
|
|
483
|
+
else {
|
|
484
|
+
const P = h * wt, X = it.top + it.right + it.left;
|
|
485
|
+
W = $t + he + mt + P + X;
|
|
486
|
+
}
|
|
487
|
+
const O = x / 2;
|
|
488
|
+
return O - W / 2 + E < a && (E = a - (O - W / 2)), E;
|
|
489
|
+
}, [n, t, i, o, e, r, g, p, h, a]);
|
|
490
|
+
return {
|
|
491
|
+
calculatePosition: pt(() => {
|
|
492
|
+
const A = n();
|
|
493
|
+
if (!A || A === 0 || !t.current)
|
|
494
|
+
return;
|
|
495
|
+
s && console.group("📍 MassActions Position");
|
|
496
|
+
const x = g + p, _ = r ? x / 2 : 0, L = e ? p / 2 : 0;
|
|
497
|
+
let R = -(_ + L);
|
|
498
|
+
const E = t.current.getBoundingClientRect().width, W = A / 2, O = W - E / 2 + R;
|
|
499
|
+
O < a && (R = a - (W - E / 2)), s && (console.log("🎯 Позиционирование:", JSON.stringify({
|
|
500
|
+
tableWidth: A,
|
|
501
|
+
panelWidth: E,
|
|
502
|
+
tableCenter: W,
|
|
503
|
+
sidebarWidth: g,
|
|
504
|
+
toggleSidebarPanelWidth: p,
|
|
505
|
+
isSidebarOpen: r,
|
|
506
|
+
isHaveSomeFeatureInSidebar: e,
|
|
507
|
+
totalSidebarWidth: x,
|
|
508
|
+
sidebarOffset: _,
|
|
509
|
+
togglePanelOffset: L,
|
|
510
|
+
idealTranslateX: -(_ + L),
|
|
511
|
+
leftEdgePosition: O,
|
|
512
|
+
minPadding: a,
|
|
513
|
+
finalTranslateX: R,
|
|
514
|
+
adjusted: O < Tt
|
|
515
|
+
}, null, 2)), console.groupEnd()), l(R), r ? u.current = !0 : u.current = !1;
|
|
516
|
+
}, [n, t, s, g, p, e, r, l, a]),
|
|
517
|
+
calculatePositionForState: C,
|
|
518
|
+
shouldApplySidebarOffsetRef: u
|
|
519
|
+
};
|
|
520
|
+
}, ye = ({
|
|
521
|
+
isCollapsed: t,
|
|
522
|
+
setIsCollapsed: i,
|
|
523
|
+
calculatePositionForState: o,
|
|
524
|
+
calculatePosition: n,
|
|
525
|
+
setTranslateX: e,
|
|
526
|
+
shouldApplySidebarOffsetRef: c,
|
|
527
|
+
sidebarConfig: h,
|
|
528
|
+
getContainerWidth: l
|
|
529
|
+
}) => {
|
|
530
|
+
const a = (h == null ? void 0 : h.isOpen) ?? !1, s = (h == null ? void 0 : h.width) ?? 0, r = $(!1), g = $(a);
|
|
531
|
+
return st(() => {
|
|
532
|
+
if (!h)
|
|
533
|
+
return;
|
|
534
|
+
const u = g.current !== a;
|
|
535
|
+
if (g.current = a, !u) {
|
|
536
|
+
n();
|
|
537
|
+
return;
|
|
538
|
+
}
|
|
539
|
+
if (a)
|
|
540
|
+
if (t)
|
|
541
|
+
n();
|
|
542
|
+
else {
|
|
543
|
+
r.current = !0;
|
|
544
|
+
const C = o(!0);
|
|
545
|
+
C !== void 0 && (e(C), c.current = !0), i(!0), setTimeout(() => {
|
|
546
|
+
n();
|
|
547
|
+
}, _t);
|
|
548
|
+
}
|
|
549
|
+
else if (t) {
|
|
550
|
+
r.current = !1, c.current = !1;
|
|
551
|
+
const C = o(!1);
|
|
552
|
+
C !== void 0 && e(C), i(!1), setTimeout(() => {
|
|
553
|
+
n();
|
|
554
|
+
}, _t);
|
|
555
|
+
} else
|
|
556
|
+
c.current = !1, n();
|
|
557
|
+
}, [a, s, l]), {
|
|
558
|
+
isSidebarOpen: a,
|
|
559
|
+
sidebarWidth: s,
|
|
560
|
+
wasAutoCollapsedRef: r
|
|
561
|
+
};
|
|
562
|
+
}, Ae = (t) => {
|
|
563
|
+
const i = $(t), [o, n] = ht(t > 0);
|
|
564
|
+
return st(() => {
|
|
565
|
+
var l;
|
|
566
|
+
const e = i.current, c = e === 0 && t > 0, h = e > 0 && t === 0;
|
|
567
|
+
if (c || h) {
|
|
568
|
+
const a = () => {
|
|
569
|
+
n(t > 0);
|
|
570
|
+
};
|
|
571
|
+
document.startViewTransition ? (l = document.startViewTransition) == null || l.call(document, a) : a();
|
|
572
|
+
} else
|
|
573
|
+
n(t > 0);
|
|
574
|
+
i.current = t;
|
|
575
|
+
}, [t]), o;
|
|
576
|
+
}, We = "mass-actions-panel", Lt = {
|
|
577
|
+
surfaceSolidCard: () => re,
|
|
578
|
+
outlineSolidPrimary: () => le
|
|
579
|
+
}, Ee = U(Zt).withConfig({
|
|
580
|
+
displayName: "styled__StyledLinkButton"
|
|
581
|
+
})({
|
|
582
|
+
paddingInline: Jt.x8
|
|
583
|
+
}), Ht = (t) => U(t).withConfig({
|
|
584
|
+
displayName: "styled__getButtonWithDropdown"
|
|
585
|
+
})(["", " ", ""], ({
|
|
586
|
+
$hasDropdown: i
|
|
587
|
+
}) => i && yt(["& > div > span:last-child{max-width:fit-content;min-width:unset;}"]), ({
|
|
588
|
+
$buttonStyles: i
|
|
589
|
+
}) => i && yt(["", ""], i)), Ie = Ht(Pt), Te = Ht(Ee), _e = U.div.withConfig({
|
|
590
|
+
displayName: "styled__MassActionsContainer"
|
|
591
|
+
})(["position:absolute;bottom:", "px;left:50%;transform:", ";background:", ";border:2px solid ", ";padding:", ";border-radius:14px;display:block;width:fit-content;max-width:", ";view-transition-name:", ";opacity:", ";transition:padding 0.3s cubic-bezier(0.4,0,0.2,1),transform 0.3s cubic-bezier(0.4,0,0.2,1),max-width 0.2s cubic-bezier(0.4,0,0.2,1),opacity 0.2s ease-in-out;will-change:padding,transform,max-width;box-shadow:", ";"], ({
|
|
592
|
+
$bottom: t = 24
|
|
593
|
+
}) => t, ({
|
|
594
|
+
$translateX: t
|
|
595
|
+
}) => t !== void 0 ? `translateX(calc(-50% + ${t}px))` : "translateX(-50%)", Lt.surfaceSolidCard, Lt.outlineSolidPrimary, ({
|
|
596
|
+
$isCollapsed: t,
|
|
597
|
+
$size: i
|
|
598
|
+
}) => {
|
|
599
|
+
const o = i === "xs";
|
|
600
|
+
return t ? o ? "0px 2px 0px 12px" : "0px 10px 0px 24px" : o ? "4px 2px 4px 12px" : "12px 8px 12px 24px";
|
|
601
|
+
}, ({
|
|
602
|
+
$isCollapsed: t
|
|
603
|
+
}) => t ? "350" : "2000px", We, ({
|
|
604
|
+
$isInitialCalculationComplete: t
|
|
605
|
+
}) => t ? 1 : 0, ae), Ne = U.div.withConfig({
|
|
606
|
+
displayName: "styled__MassActionsContent"
|
|
607
|
+
})(["display:flex;align-items:center;gap:", ";"], ({
|
|
608
|
+
$isCollapsed: t,
|
|
609
|
+
$isCompact: i
|
|
610
|
+
}) => t ? i ? "4px" : "8px" : "0px"), Oe = U.div.withConfig({
|
|
611
|
+
displayName: "styled__ActionsWrapper"
|
|
612
|
+
})(["display:flex;max-height:", ";align-items:center;gap:4px;flex:1;justify-content:flex-end;overflow:hidden;min-width:0;transition:max-height 0.2s cubic-bezier(0.4,0,0.2,1),opacity 0.3s cubic-bezier(0.4,0,0.2,1),max-width 0.1s cubic-bezier(0.4,0,0.2,1),margin 0.3s cubic-bezier(0.4,0,0.2,1),gap 0.3s cubic-bezier(0.4,0,0.2,1);", ""], ({
|
|
613
|
+
$isCollapsed: t
|
|
614
|
+
}) => t ? "0" : "40px", ({
|
|
615
|
+
$isCollapsed: t
|
|
616
|
+
}) => t ? yt(["opacity:0;max-width:0;margin:0;gap:0;"]) : yt(["opacity:1;max-width:2000px;"])), Me = U.div.withConfig({
|
|
617
|
+
displayName: "styled__HiddenButtonsMeasurementContainer"
|
|
618
|
+
})(["position:absolute;left:-9999px;top:0;display:flex;gap:4px;align-items:center;z-index:-1;pointer-events:none;width:auto;height:auto;"]), Se = U.div.withConfig({
|
|
619
|
+
displayName: "styled__ButtonMeasurementWrapper"
|
|
620
|
+
})(["display:inline-flex;width:auto;height:auto;"]), De = U.div.withConfig({
|
|
621
|
+
displayName: "styled__VisibleButtonWrapper"
|
|
622
|
+
})(["margin-left:0;"]), ke = U(ee).withConfig({
|
|
623
|
+
displayName: "styled__CollapseIcon"
|
|
624
|
+
})(["transition:all 0.3s;transform:", ";"], ({
|
|
625
|
+
$isCollapsed: t
|
|
626
|
+
}) => t ? "scaleY(1)" : "scaleY(-1)"), ze = U(Kt).withConfig({
|
|
627
|
+
displayName: "styled__CollapseButton"
|
|
628
|
+
})(["padding:", ";"], ({
|
|
629
|
+
$isCompact: t
|
|
630
|
+
}) => t ? Jt.x8 : de);
|
|
631
|
+
U(Pt).withConfig({
|
|
632
|
+
displayName: "styled__MoreButton"
|
|
633
|
+
})(["margin-left:0;"]);
|
|
634
|
+
const $e = U(Ft).withConfig({
|
|
635
|
+
displayName: "styled__StyledDivider"
|
|
636
|
+
})(["padding-left:1px;margin-left:12px;margin-right:8px;"]), Le = (t) => {
|
|
637
|
+
if (typeof t == "string" && t.startsWith("link")) {
|
|
638
|
+
const i = t.slice(4);
|
|
639
|
+
return i.charAt(0).toLowerCase() + i.slice(1);
|
|
640
|
+
}
|
|
641
|
+
return t ?? "default";
|
|
642
|
+
}, Ve = {
|
|
643
|
+
size: "s",
|
|
644
|
+
view: "linkDefault"
|
|
645
|
+
}, Rt = ({
|
|
646
|
+
type: t,
|
|
647
|
+
view: i,
|
|
648
|
+
showLabel: o,
|
|
649
|
+
text: n,
|
|
650
|
+
buttonStyles: e,
|
|
651
|
+
dropdown: c,
|
|
652
|
+
useTableDropdown: h = !1,
|
|
653
|
+
...l
|
|
654
|
+
}) => {
|
|
655
|
+
const a = t ?? "linkButton", {
|
|
656
|
+
view: s,
|
|
657
|
+
...r
|
|
658
|
+
} = Ve, g = i ?? s, p = o ? n : void 0, u = !!c;
|
|
659
|
+
let C;
|
|
660
|
+
if (a === "button") {
|
|
661
|
+
const w = l, A = w.text ?? p;
|
|
662
|
+
C = /* @__PURE__ */ B(Ie, { ...r, ...w, view: g, text: A, $hasDropdown: u, $showLabel: o, $buttonStyles: e });
|
|
663
|
+
} else {
|
|
664
|
+
const w = String(g ?? "linkDefault"), x = w.startsWith("link") ? Le(w) : w;
|
|
665
|
+
C = /* @__PURE__ */ B(Te, { ...r, ...l, view: x, text: p, $hasDropdown: u, $showLabel: o, $buttonStyles: e });
|
|
666
|
+
}
|
|
667
|
+
if (c && c.items && c.items.length > 0)
|
|
668
|
+
if (h)
|
|
669
|
+
C = /* @__PURE__ */ B(jt, { ...c, children: C });
|
|
670
|
+
else {
|
|
671
|
+
const {
|
|
672
|
+
$css: w,
|
|
673
|
+
...A
|
|
674
|
+
} = c;
|
|
675
|
+
C = /* @__PURE__ */ B(Gt, { ...A, children: C });
|
|
676
|
+
}
|
|
677
|
+
return C;
|
|
678
|
+
}, Pe = ({
|
|
679
|
+
selectedCount: t,
|
|
680
|
+
label: i = "Выбрано",
|
|
681
|
+
showCheckbox: o = !1,
|
|
682
|
+
checked: n = !1,
|
|
683
|
+
onCheckboxChange: e,
|
|
684
|
+
className: c,
|
|
685
|
+
indeterminate: h
|
|
686
|
+
}) => {
|
|
687
|
+
const {
|
|
688
|
+
down: l
|
|
689
|
+
} = qt(), a = l("xl"), s = t > 0, r = a ? "BodyXS" : "BodyS", g = (() => {
|
|
690
|
+
if (t === 0)
|
|
691
|
+
return "0px";
|
|
692
|
+
const u = t.toString().length;
|
|
693
|
+
return `${Math.max(16, 7.1 + u * 6.1) + 4}px`;
|
|
694
|
+
})();
|
|
695
|
+
return /* @__PURE__ */ vt(kt, { className: c, $css: {
|
|
696
|
+
display: "flex",
|
|
697
|
+
alignItems: "center"
|
|
698
|
+
}, children: [
|
|
699
|
+
o ? /* @__PURE__ */ vt(kt, { $css: {
|
|
700
|
+
display: "flex",
|
|
701
|
+
alignItems: "center",
|
|
702
|
+
gap: "4px"
|
|
703
|
+
}, children: [
|
|
704
|
+
/* @__PURE__ */ B(Qt, { checked: n, indeterminate: h, onChange: e, size: "m" }),
|
|
705
|
+
/* @__PURE__ */ B(zt, { variant: r, children: i })
|
|
706
|
+
] }) : /* @__PURE__ */ B(zt, { variant: r, children: i }),
|
|
707
|
+
/* @__PURE__ */ B(ue, { duration: 0.3, orientation: "horizontal", isOpen: s, unMountOnClose: !0, sizeOnOpen: g, extContainerCss: {
|
|
708
|
+
overflow: "visible",
|
|
709
|
+
display: "flex",
|
|
710
|
+
justifyContent: "flex-end"
|
|
711
|
+
}, intContainerCss: {
|
|
712
|
+
always: {
|
|
713
|
+
opacity: "0",
|
|
714
|
+
transition: ".3s ease"
|
|
715
|
+
},
|
|
716
|
+
onOpen: {
|
|
717
|
+
opacity: 1
|
|
718
|
+
}
|
|
719
|
+
}, children: s && /* @__PURE__ */ B(ce, { className: "counter", count: t, size: "xs", view: "accent", style: {
|
|
720
|
+
marginBottom: "3px"
|
|
721
|
+
} }, t) })
|
|
722
|
+
] });
|
|
723
|
+
}, Ge = (t = []) => Xt(() => {
|
|
724
|
+
const i = [], o = {}, n = /* @__PURE__ */ new Map();
|
|
725
|
+
return t.forEach((e) => {
|
|
726
|
+
var c, h;
|
|
727
|
+
if (e.dropdown) {
|
|
728
|
+
const l = `group-${e.key || e.text || Date.now()}`, a = "items" in e.dropdown ? e.dropdown.items || [] : [], s = "onItemSelect" in e.dropdown ? e.dropdown.onItemSelect : void 0;
|
|
729
|
+
s && n.set(l.toString(), s);
|
|
730
|
+
const [r, g] = ie(a, s);
|
|
731
|
+
g.forEach((p, u) => n.set(u, p)), (c = e.dropdown) != null && c.$css && Object.assign(o, (h = e.dropdown) == null ? void 0 : h.$css), i.push({
|
|
732
|
+
label: e.text ?? "",
|
|
733
|
+
value: l,
|
|
734
|
+
contentLeft: e.contentLeft,
|
|
735
|
+
items: r,
|
|
736
|
+
className: e.className,
|
|
737
|
+
disabled: e.disabled
|
|
738
|
+
});
|
|
739
|
+
} else {
|
|
740
|
+
const l = e.key || e.text || `btn-${Date.now()}`, a = {
|
|
741
|
+
label: e.text || "Кнопка",
|
|
742
|
+
value: l.toString(),
|
|
743
|
+
disabled: e.disabled,
|
|
744
|
+
contentLeft: e.contentLeft
|
|
745
|
+
};
|
|
746
|
+
e.onClick && n.set(l.toString(), (s, r) => {
|
|
747
|
+
var p;
|
|
748
|
+
const g = {
|
|
749
|
+
...r,
|
|
750
|
+
nativeEvent: r.nativeEvent,
|
|
751
|
+
preventDefault: r.preventDefault,
|
|
752
|
+
stopPropagation: r.stopPropagation,
|
|
753
|
+
target: r.target,
|
|
754
|
+
currentTarget: r.currentTarget
|
|
755
|
+
};
|
|
756
|
+
(p = e.onClick) == null || p.call(e, g);
|
|
757
|
+
}), i.push(a);
|
|
758
|
+
}
|
|
759
|
+
}), {
|
|
760
|
+
dropdownItems: i,
|
|
761
|
+
handlerMap: n,
|
|
762
|
+
$summaryCSS: o
|
|
763
|
+
};
|
|
764
|
+
}, [t]), Ue = ({
|
|
765
|
+
buttons: t = [],
|
|
766
|
+
dividerIndexes: i = [],
|
|
767
|
+
triggerSlot: o,
|
|
768
|
+
dropdownProps: n,
|
|
769
|
+
useTableDropdown: e = !1
|
|
770
|
+
}) => {
|
|
771
|
+
const {
|
|
772
|
+
dropdownItems: c,
|
|
773
|
+
handlerMap: h,
|
|
774
|
+
$summaryCSS: l
|
|
775
|
+
} = Ge(t), a = se(h), [s, r] = ht(!1), g = c.map((w, A) => (i.includes(A) && (w.dividerAfter = !0), w)), p = {
|
|
776
|
+
closeOnSelect: !0,
|
|
777
|
+
...n,
|
|
778
|
+
onItemSelect: a,
|
|
779
|
+
items: g,
|
|
780
|
+
onToggle: (w) => r(w),
|
|
781
|
+
portal: "document",
|
|
782
|
+
view: (n == null ? void 0 : n.view) || "default"
|
|
783
|
+
}, {
|
|
784
|
+
portal: u,
|
|
785
|
+
...C
|
|
786
|
+
} = p;
|
|
787
|
+
return e ? /* @__PURE__ */ B(jt, { $css: l, ...C, children: o }) : /* @__PURE__ */ B(Gt, { ...p, children: o });
|
|
788
|
+
}, qe = ({
|
|
789
|
+
button: t,
|
|
790
|
+
isCompact: i,
|
|
791
|
+
compactSize: o = "xs",
|
|
792
|
+
useTableDropdown: n = !1
|
|
793
|
+
}) => {
|
|
794
|
+
const e = t.size ?? (i ? o : "s");
|
|
795
|
+
return /* @__PURE__ */ B(Rt, { ...t, size: e, showLabel: !0, useTableDropdown: n });
|
|
796
|
+
}, Xe = ({
|
|
797
|
+
button: t,
|
|
798
|
+
isCompact: i,
|
|
799
|
+
compactSize: o = "xs",
|
|
800
|
+
useTableDropdown: n = !1
|
|
801
|
+
}) => {
|
|
802
|
+
const e = t.size ?? (i ? o : "s");
|
|
803
|
+
return /* @__PURE__ */ B(Rt, { ...t, size: e, showLabel: !0, useTableDropdown: n });
|
|
804
|
+
}, Vt = (t, i, o = !1, n = "xs") => t.type === "button" ? /* @__PURE__ */ B(qe, { button: t, isCompact: i, compactSize: n, useTableDropdown: o }) : /* @__PURE__ */ B(Xe, { button: t, isCompact: i, compactSize: n, useTableDropdown: o }), je = ({
|
|
805
|
+
containerRef: t,
|
|
806
|
+
leftSection: i,
|
|
807
|
+
middleSection: o,
|
|
808
|
+
buttons: n,
|
|
809
|
+
sidebarConfig: e,
|
|
810
|
+
isHaveSomeFeatureInSidebar: c = !1,
|
|
811
|
+
collapsedDropdownProps: h,
|
|
812
|
+
selectedCount: l,
|
|
813
|
+
show: a,
|
|
814
|
+
useTableDropdown: s = !1,
|
|
815
|
+
enableDebugLogs: r = !1,
|
|
816
|
+
bottom: g = 16,
|
|
817
|
+
minPadding: p = 16,
|
|
818
|
+
size: u
|
|
819
|
+
}) => {
|
|
820
|
+
const {
|
|
821
|
+
down: C
|
|
822
|
+
} = qt(), w = u ? u === "xs" : C("xl"), A = u ? "xxs" : "xs", [x, _] = ht(!1), L = $(null), R = $(null), E = $(null), W = $([]), O = $(null), q = $(null), S = $(null), V = $(null), [P, X] = ht((n == null ? void 0 : n.length) ?? 0), [Q, ot] = ht(void 0), [at, ct] = ht(!1), {
|
|
823
|
+
containerWidth: y,
|
|
824
|
+
getContainerWidth: z
|
|
825
|
+
} = Be(t), b = Ae(l), I = a !== void 0 ? a : b, {
|
|
826
|
+
calculatePosition: N,
|
|
827
|
+
calculatePositionForState: D,
|
|
828
|
+
shouldApplySidebarOffsetRef: G
|
|
829
|
+
} = ve({
|
|
830
|
+
containerRef: L,
|
|
831
|
+
collapseButtonRef: q,
|
|
832
|
+
leftSectionRef: S,
|
|
833
|
+
getContainerWidth: z,
|
|
834
|
+
isHaveSomeFeatureInSidebar: c,
|
|
835
|
+
sidebarConfig: e,
|
|
836
|
+
visibleButtonsCount: P,
|
|
837
|
+
setTranslateX: ot,
|
|
838
|
+
minPadding: p
|
|
839
|
+
}), {
|
|
840
|
+
calculateCompression: j,
|
|
841
|
+
measuredButtonWidthsRef: tt
|
|
842
|
+
} = xe({
|
|
843
|
+
isCollapsed: x,
|
|
844
|
+
containerRef: L,
|
|
845
|
+
contentRef: R,
|
|
846
|
+
middleSectionRef: E,
|
|
847
|
+
buttonRefs: W,
|
|
848
|
+
moreButtonRef: O,
|
|
849
|
+
collapseButtonRef: q,
|
|
850
|
+
leftSectionRef: S,
|
|
851
|
+
dividerRef: V,
|
|
852
|
+
buttons: n,
|
|
853
|
+
isHaveSomeFeatureInSidebar: c,
|
|
854
|
+
getContainerWidth: z,
|
|
855
|
+
setVisibleButtonsCount: X,
|
|
856
|
+
enableDebugLogs: r,
|
|
857
|
+
minPadding: p,
|
|
858
|
+
leftPadding: it.left,
|
|
859
|
+
rightPadding: it.right,
|
|
860
|
+
moreButtonWidthEstimate: w ? 32 : Yt
|
|
861
|
+
}), {
|
|
862
|
+
isSidebarOpen: et,
|
|
863
|
+
wasAutoCollapsedRef: J
|
|
864
|
+
} = ye({
|
|
865
|
+
isCollapsed: x,
|
|
866
|
+
setIsCollapsed: _,
|
|
867
|
+
calculatePositionForState: D,
|
|
868
|
+
calculatePosition: N,
|
|
869
|
+
setTranslateX: ot,
|
|
870
|
+
shouldApplySidebarOffsetRef: G,
|
|
871
|
+
sidebarConfig: e,
|
|
872
|
+
getContainerWidth: z
|
|
873
|
+
}), {
|
|
874
|
+
handleToggleCollapse: dt
|
|
875
|
+
} = we({
|
|
876
|
+
isCollapsed: x,
|
|
877
|
+
setIsCollapsed: _,
|
|
878
|
+
isSidebarOpen: et,
|
|
879
|
+
calculatePositionForState: D,
|
|
880
|
+
calculatePosition: N,
|
|
881
|
+
setTranslateX: ot,
|
|
882
|
+
shouldApplySidebarOffsetRef: G,
|
|
883
|
+
wasAutoCollapsedRef: J
|
|
884
|
+
}), {
|
|
885
|
+
visibleButtons: Y,
|
|
886
|
+
buttonsInDropdown: ft,
|
|
887
|
+
allButtons: rt
|
|
888
|
+
} = me({
|
|
889
|
+
buttons: n,
|
|
890
|
+
visibleButtonsCount: P
|
|
891
|
+
});
|
|
892
|
+
if (st(() => {
|
|
893
|
+
const T = setTimeout(() => ct(!0), pe);
|
|
894
|
+
return () => clearTimeout(T);
|
|
895
|
+
}, []), Ce({
|
|
896
|
+
containerRef: L,
|
|
897
|
+
buttonRefs: W,
|
|
898
|
+
buttons: n,
|
|
899
|
+
isVisible: I,
|
|
900
|
+
isCollapsed: x,
|
|
901
|
+
visibleButtonsCount: P,
|
|
902
|
+
selectedCount: l,
|
|
903
|
+
setIsCollapsed: _,
|
|
904
|
+
setVisibleButtonsCount: X,
|
|
905
|
+
calculatePosition: N,
|
|
906
|
+
calculateCompression: j,
|
|
907
|
+
measuredButtonWidthsRef: tt,
|
|
908
|
+
containerWidth: y
|
|
909
|
+
}), !I)
|
|
910
|
+
return null;
|
|
911
|
+
const ut = !x && ((n == null ? void 0 : n.length) ?? 0) > 0;
|
|
912
|
+
return /* @__PURE__ */ B(_e, { ref: L, $isCollapsed: x, $size: u, $translateX: Q, $isInitialCalculationComplete: at, $bottom: g, children: /* @__PURE__ */ vt(Ne, { ref: R, $isCollapsed: x, $isCompact: w, children: [
|
|
913
|
+
/* @__PURE__ */ B(Me, { children: rt.map((T, f) => {
|
|
914
|
+
const v = T.key ?? `${T.text}${f}`;
|
|
915
|
+
return /* @__PURE__ */ B(Se, { ref: (M) => {
|
|
916
|
+
W.current[f] = M;
|
|
917
|
+
}, children: Vt(T, w, s, A) }, `measure-${v}`);
|
|
918
|
+
}) }),
|
|
919
|
+
/* @__PURE__ */ B("div", { ref: S, children: i }),
|
|
920
|
+
/* @__PURE__ */ vt(Oe, { $isCollapsed: x, children: [
|
|
921
|
+
o && /* @__PURE__ */ B("div", { ref: E, children: o }),
|
|
922
|
+
ut && /* @__PURE__ */ B("div", { ref: V, children: /* @__PURE__ */ B($e, { orientation: "vertical", length: "16px" }) }),
|
|
923
|
+
ft.length > 0 && /* @__PURE__ */ B("div", { ref: (T) => {
|
|
924
|
+
O.current = T;
|
|
925
|
+
}, children: /* @__PURE__ */ B(Ue, { buttons: ft, useTableDropdown: s, dropdownProps: {
|
|
926
|
+
placement: "top",
|
|
927
|
+
...h
|
|
928
|
+
}, triggerSlot: /* @__PURE__ */ B(bt, { view: "secondary", size: w ? A : "s", contentLeft: /* @__PURE__ */ B(ne, { size: w ? "xs" : "s" }) }) }) }),
|
|
929
|
+
Y.map((T, f) => {
|
|
930
|
+
const v = T.key ?? `${T.text}${f}`, M = /* @__PURE__ */ B(De, { children: Vt(T, w, s, A) }, v);
|
|
931
|
+
return T.disabled && T.disabledTooltipProps ? /* @__PURE__ */ B(te, { trigger: "hover", ...T.disabledTooltipProps, children: M }, v) : M;
|
|
932
|
+
})
|
|
933
|
+
] }),
|
|
934
|
+
/* @__PURE__ */ B("div", { ref: q, children: /* @__PURE__ */ B(ze, { size: w ? "s" : "m", $isCollapsed: x, $isCompact: w, onClick: dt, children: /* @__PURE__ */ B(ke, { size: w ? "xs" : "s", $isCollapsed: x }) }) })
|
|
935
|
+
] }) });
|
|
936
|
+
};
|
|
937
|
+
je.Counter = Pe;
|
|
938
|
+
export {
|
|
939
|
+
wt as A,
|
|
940
|
+
mt as C,
|
|
941
|
+
pe as D,
|
|
942
|
+
k as E,
|
|
943
|
+
ge as I,
|
|
944
|
+
je as M,
|
|
945
|
+
It as P,
|
|
946
|
+
he as R,
|
|
947
|
+
Ct as T,
|
|
948
|
+
_t as a,
|
|
949
|
+
cn as b,
|
|
950
|
+
fe as c,
|
|
951
|
+
on as d,
|
|
952
|
+
$t as e,
|
|
953
|
+
Tt as f,
|
|
954
|
+
Yt as g,
|
|
955
|
+
Rt as h,
|
|
956
|
+
Pe as i,
|
|
957
|
+
it as j,
|
|
958
|
+
we as k,
|
|
959
|
+
xe as l,
|
|
960
|
+
Be as m,
|
|
961
|
+
Ce as n,
|
|
962
|
+
ve as o,
|
|
963
|
+
ye as p,
|
|
964
|
+
Ae as q,
|
|
965
|
+
me as u
|
|
966
|
+
};
|