@daisforge/ui 1.19.0 → 1.21.0
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-Cdo6_s1Y.mjs → AnalyticalWidget-BtyWKJuu.mjs} +34 -34
- package/chunks/AnalyticalWidget-YytE3Rlw.cjs +43 -0
- package/chunks/{ApprovalCenter-DxcvzR8q.mjs → ApprovalCenter-DLKZP2AO.mjs} +2 -2
- package/chunks/{ApprovalCenter-CAcC43zn.cjs → ApprovalCenter-DdsLEipZ.cjs} +1 -1
- package/chunks/BlockTitle-DC1McGof.cjs +1 -0
- package/chunks/BlockTitle-DsXxImR6.mjs +86 -0
- package/chunks/{Container-CrB1jwqH.cjs → Container-DHnX1sHY.cjs} +1 -1
- package/chunks/{Container-Cy8w2JOq.mjs → Container-DbZwlfIM.mjs} +1 -1
- package/chunks/{EmptyState-B205JfZA.mjs → EmptyState-CUCseg9M.mjs} +1 -1
- package/chunks/{EmptyState-CcxlsZm0.cjs → EmptyState-DH1xawxg.cjs} +1 -1
- package/chunks/{FiltersActions-CFStLRsU.mjs → FiltersActions-CDZSO0MM.mjs} +4 -4
- package/chunks/{FiltersActions-BKJJH6Mu.cjs → FiltersActions-CVtgAJnC.cjs} +1 -1
- package/chunks/{FormSegmentGroup-CCCqRgCG.cjs → FormSegmentGroup-BYQ6yMK1.cjs} +1 -1
- package/chunks/{FormSegmentGroup-E1JurEt7.mjs → FormSegmentGroup-C9qYxYT9.mjs} +1 -1
- package/chunks/{GridDND-UMUi8M_Q.mjs → GridDND-CqvpXgCY.mjs} +2 -2
- package/chunks/{GridDND-DV-1g1sI.cjs → GridDND-DK6SAO8q.cjs} +1 -1
- package/chunks/LeftPanel-AyuV7bGS.cjs +1 -0
- package/chunks/{LeftPanel-HZu3ECqD.mjs → LeftPanel-C5SsoRJS.mjs} +47 -45
- package/chunks/{ListOfFilters-DJvnT9kw.cjs → ListOfFilters-BAPz0OY9.cjs} +1 -1
- package/chunks/{ListOfFilters-DTAZ3wfQ.mjs → ListOfFilters-Bd8CZHDq.mjs} +3 -3
- package/chunks/{MassActions-Z-48g81T.cjs → MassActions-C08IgW4a.cjs} +1 -1
- package/chunks/{MassActions-DSAaO1-u.mjs → MassActions-D5UwHcNG.mjs} +3 -3
- package/chunks/PageTitle-CrBeieoq.cjs +9 -0
- package/chunks/PageTitle-DkfAiZM4.mjs +133 -0
- package/chunks/{SplitView-DYHeCnl9.mjs → SplitView-BqS1Jbo4.mjs} +1 -1
- package/chunks/{SplitView-UKIBuvTi.cjs → SplitView-DNmd4sJe.cjs} +1 -1
- package/chunks/{Stories-Dlwle-SM.mjs → Stories-BnHxMCEZ.mjs} +3 -3
- package/chunks/{Stories-CZXv_Ves.cjs → Stories-UYVANawW.cjs} +1 -1
- package/chunks/Table-CdaMPDkg.cjs +31 -0
- package/chunks/{Table-B9OAyWAW.mjs → Table-DYSssxRS.mjs} +2761 -2679
- package/chunks/{TableCanvas-DkZAx-r9.mjs → TableCanvas-DDNRdQjN.mjs} +7074 -6977
- package/chunks/TableCanvas-DPHSYfH3.cjs +30 -0
- package/chunks/{TableGlide-CkorJrl9.mjs → TableGlide-DAnTJtye.mjs} +2295 -2231
- package/chunks/TableGlide-am_w97mF.cjs +1 -0
- package/chunks/{styles-C-1Srtr7.mjs → styles-CJ5y9FKW.mjs} +1 -1
- package/chunks/{styles-AUqEaroI.cjs → styles-kUWPuNSD.cjs} +1 -1
- package/chunks/utils-ChDQGRjv.cjs +25 -0
- package/chunks/{utils-YKicAHp0.mjs → utils-u1KJ37g3.mjs} +120 -108
- package/components/AiAgentPopover/index.cjs +1 -1
- package/components/AiAgentPopover/index.mjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.cjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.mjs +1 -1
- 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/AutocompleteSearch/index.cjs +1 -1
- package/components/AutocompleteSearch/index.mjs +2 -2
- package/components/BlockGradientScroll/index.cjs +1 -1
- package/components/BlockGradientScroll/index.mjs +1 -1
- package/components/BlockTitle/BlockTitle.d.ts +1 -1
- package/components/BlockTitle/BlockTitle.types.d.ts +2 -1
- 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/Collapse/index.cjs +1 -1
- package/components/Collapse/index.mjs +1 -1
- package/components/Combobox/index.cjs +1 -1
- package/components/Combobox/index.mjs +1 -1
- 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 +1 -1
- 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/styled.d.ts +1 -0
- 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/ModalDF/index.cjs +1 -1
- package/components/ModalDF/index.mjs +1 -1
- package/components/Notification/index.cjs +1 -1
- package/components/Notification/index.mjs +2 -2
- package/components/PageTitle/PageTitle.styled.d.ts +3 -1
- 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 +1 -1
- package/components/PopupDF/index.cjs +1 -1
- package/components/PopupDF/index.mjs +1 -1
- 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 +2 -2
- package/components/Table/feature-column-control/ColumnsList/index.cjs +1 -1
- package/components/Table/feature-column-control/ColumnsList/index.mjs +2 -2
- package/components/Table/feature-column-control/index.cjs +1 -1
- package/components/Table/feature-column-control/index.mjs +3 -3
- 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/combobox.d.ts +3 -2
- package/components/Table/feature-filtering/combobox/index.cjs +1 -1
- package/components/Table/feature-filtering/combobox/index.d.ts +4 -2
- package/components/Table/feature-filtering/combobox/index.mjs +7 -3
- 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/filter-component-in-popover.d.ts +1 -2
- 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.d.ts +1 -1
- package/components/Table/feature-filtering/index.mjs +13 -9
- package/components/Table/feature-filtering/render-slot.d.ts +5 -0
- package/components/Table/feature-filtering/sidebar-filter-block/index.cjs +1 -1
- package/components/Table/feature-filtering/sidebar-filter-block/index.mjs +2 -2
- package/components/Table/feature-filtering/use-focus-search-input.d.ts +2 -0
- 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 +3 -3
- package/components/Table/feature-pagination/index.cjs +1 -1
- package/components/Table/feature-pagination/index.mjs +3 -3
- package/components/Table/feature-reorder-columns/handlers.d.ts +4 -0
- 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 +5 -5
- package/components/Table/feature-row-size/index.cjs +1 -1
- package/components/Table/feature-row-size/index.mjs +2 -2
- 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 +2 -2
- package/components/Table/index.cjs +1 -1
- package/components/Table/index.d.ts +1 -1
- package/components/Table/index.mjs +43 -39
- package/components/Table/renders/formatCell/index.cjs +1 -1
- package/components/Table/renders/formatCell/index.mjs +3 -3
- package/components/Table/styles/index.cjs +1 -1
- package/components/Table/styles/index.mjs +9 -9
- package/components/Table/table-hooks/index.cjs +1 -1
- package/components/Table/table-hooks/index.mjs +3 -3
- package/components/Table/types/column-config.type.d.ts +1 -0
- package/components/Table/types/index.cjs +1 -1
- package/components/Table/types/index.mjs +1 -1
- package/components/Table/types/table-config.type.d.ts +1 -0
- package/components/Table/utils/index.cjs +1 -1
- package/components/Table/utils/index.mjs +4 -4
- 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-borders/buildBorderCallbacks.d.ts +16 -0
- package/components/TableCanvas/feature-borders/useBorders.d.ts +14 -0
- 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-columns-grouping/useLastLvlColumnConfig.d.ts +1 -0
- 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/combobox.d.ts +3 -2
- package/components/TableCanvas/feature-filtering/combobox/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/combobox/index.d.ts +4 -2
- package/components/TableCanvas/feature-filtering/combobox/index.mjs +7 -3
- package/components/TableCanvas/feature-filtering/filter-list-block/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/filter-list-block/index.mjs +2 -2
- package/components/TableCanvas/feature-filtering/header-filter-button/filter-component-in-popover.d.ts +1 -2
- package/components/TableCanvas/feature-filtering/header-filter-button/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/header-filter-button/index.mjs +2 -2
- package/components/TableCanvas/feature-filtering/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/index.d.ts +1 -1
- package/components/TableCanvas/feature-filtering/index.mjs +12 -8
- package/components/TableCanvas/feature-filtering/render-slot.d.ts +5 -0
- 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 +3 -3
- 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 +2 -2
- 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 +6 -6
- 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-reorder-columns/handlers.d.ts +4 -0
- 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 +3 -3
- 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 +2 -2
- package/components/TableCanvas/feature-tooltip/utils/index.cjs +1 -1
- package/components/TableCanvas/feature-tooltip/utils/index.mjs +6 -6
- package/components/TableCanvas/feature-tree/handlers.d.ts +1 -0
- 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.d.ts +1 -1
- package/components/TableCanvas/index.mjs +63 -59
- 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 +12 -12
- package/components/TableCanvas/types/column-config.type.d.ts +1 -0
- package/components/TableCanvas/types/index.cjs +1 -1
- package/components/TableCanvas/types/index.mjs +2 -2
- package/components/TableCanvas/types/table-config.type.d.ts +28 -0
- 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 +2 -2
- package/components/TableCanvas/widgets/control-block/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/index.mjs +3 -3
- 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 +5 -5
- package/components/TableCanvas/widgets/mass-actions/hooks/index.cjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/index.mjs +8 -8
- 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 +1 -1
- package/components/TableContract/index.mjs +2 -2
- package/components/TableGlide/hooks/selection/index.cjs +1 -1
- package/components/TableGlide/hooks/selection/index.d.ts +1 -2
- package/components/TableGlide/hooks/selection/index.mjs +6 -7
- package/components/TableGlide/hooks/selection/useColoringLayers.d.ts +25 -0
- package/components/TableGlide/hooks/useHoverState.d.ts +18 -0
- package/components/TableGlide/index.cjs +1 -1
- package/components/TableGlide/index.mjs +9 -9
- 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/custom-colors.d.ts +1 -1
- package/components/TableGlide/theming/index.cjs +1 -1
- package/components/TableGlide/theming/index.mjs +3 -3
- package/components/TableGlide/types.d.ts +1 -3
- package/components/TableTabs/index.cjs +1 -1
- package/components/TableTabs/index.mjs +1 -1
- package/components/Tooltip/index.cjs +1 -1
- package/components/Tooltip/index.mjs +1 -1
- package/components/TourWidget/index.cjs +1 -1
- package/components/TourWidget/index.mjs +2 -2
- 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 +2 -2
- package/formComponents/FormCombobox/index.cjs +1 -1
- package/formComponents/FormCombobox/index.mjs +1 -1
- package/formComponents/FormRadioGroupBox/index.cjs +1 -1
- package/formComponents/FormRadioGroupBox/index.mjs +1 -1
- package/formComponents/FormSegments/index.cjs +1 -1
- package/formComponents/FormSegments/index.mjs +1 -1
- package/formComponents/FormSwitch/index.cjs +1 -1
- package/formComponents/FormSwitch/index.mjs +1 -1
- package/index.cjs +1 -1
- package/index.mjs +1778 -1773
- 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 +1 -1
- 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 +1 -1
- package/layouts/Layout/index.mjs +1 -1
- package/layouts/PageLayout/index.cjs +1 -1
- package/layouts/PageLayout/index.mjs +1 -1
- package/mcp-data/component-index.json +1208 -523
- package/mixins/index.cjs +1 -1
- package/mixins/index.mjs +1 -1
- package/package.json +6 -6
- package/styles/index.cjs +1 -1
- package/styles/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.d.ts +1 -0
- package/utils/index.mjs +30 -29
- package/utils/react/getMFReactDOMClient.d.ts +7 -0
- package/utils/react/index.cjs +1 -0
- package/utils/react/index.d.ts +1 -0
- package/utils/react/index.mjs +4 -0
- package/utils/styles/index.cjs +1 -1
- package/utils/styles/index.mjs +1 -1
- package/chunks/AnalyticalWidget-wke3Jm3X.cjs +0 -43
- package/chunks/BlockTitle-BEIxiECX.cjs +0 -1
- package/chunks/BlockTitle-BZxOEdTc.mjs +0 -85
- package/chunks/LeftPanel-B3-ySDMW.cjs +0 -1
- package/chunks/PageTitle-Bh3g6FUT.cjs +0 -1
- package/chunks/PageTitle-CaqXfrrQ.mjs +0 -123
- package/chunks/Table-BwhzcFX1.cjs +0 -31
- package/chunks/TableCanvas-QmXGAjPk.cjs +0 -30
- package/chunks/TableGlide-Bngn5_5l.cjs +0 -1
- package/chunks/utils-CUW5bd8S.cjs +0 -25
|
@@ -2,22 +2,24 @@ import { jsx as S, jsxs as _ } from "react/jsx-runtime";
|
|
|
2
2
|
import { IconArrowBarDown as R } from "@salutejs/plasma-icons";
|
|
3
3
|
import { Box as tt } from "../components/Box/index.mjs";
|
|
4
4
|
import { EmbedIconButton as et } from "@salutejs/sdds-finai";
|
|
5
|
-
import { spacing8x as v, surfaceSolidCard as nt,
|
|
6
|
-
import p, { css as
|
|
7
|
-
import { t as
|
|
8
|
-
import { useCallback as O, useEffect as M, useMemo as B, useState as
|
|
5
|
+
import { spacing8x as v, surfaceSolidCard as nt, spacing12x as ot, shadowDownSoftS as it, spacing6x as st, surfaceSolidSecondary as rt, spacing16x as j, outlineSolidSecondary as at, outlineSolidSecondaryHover as lt } from "@salutejs/sdds-themes/tokens/sdds_finai";
|
|
6
|
+
import p, { css as ct } from "styled-components";
|
|
7
|
+
import { t as dt, e as ut, d as pt } from "./utils-u1KJ37g3.mjs";
|
|
8
|
+
import { useCallback as O, useEffect as M, useMemo as B, useState as A, useRef as k } from "react";
|
|
9
9
|
const W = {
|
|
10
10
|
icon: "left-panel__toggle-button",
|
|
11
11
|
leftBlockIsResizing: "left-panel__is-resizing"
|
|
12
|
-
},
|
|
12
|
+
}, ft = 72, mt = 56, K = 240, ht = 540, z = 0.2, gt = p(tt).withConfig({
|
|
13
13
|
displayName: "styled__PanelContainer"
|
|
14
14
|
})(["width:100%;height:100%;min-width:", "px;display:flex;background-color:", ";margin-right:", ";border-radius:", ";box-shadow:", ";transition:", ";max-width:", ";position:relative;overflow:hidden;padding-right:", ";"], ({
|
|
15
15
|
minWidth: t
|
|
16
|
-
}) => t, () => nt,
|
|
16
|
+
}) => t, () => nt, ({
|
|
17
|
+
$isAdaptive1280: t
|
|
18
|
+
}) => t ? v : ot, v, () => it, (t) => t.$resizing ? "none" : `max-width ${z}s ease-in-out, opacity ${z}s ease-in-out`, (t) => t.width !== void 0 ? `${Math.min(t.width, t.maxWidth)}px` : `${t.minWidth}px`, ({
|
|
17
19
|
showResizeable: t
|
|
18
|
-
}) => t ?
|
|
20
|
+
}) => t ? st : 0), wt = p.div.withConfig({
|
|
19
21
|
displayName: "styled__PanelCrossfade"
|
|
20
|
-
})(["flex:1 1 auto;min-width:0;height:100%;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);overflow:hidden;"]), V =
|
|
22
|
+
})(["flex:1 1 auto;min-width:0;height:100%;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);overflow:hidden;"]), V = ct(["grid-area:1 / 1;min-width:0;min-height:0;opacity:", ";visibility:", ";pointer-events:", ";transition:opacity ", "s ease-in-out,visibility 0s ", ";"], ({
|
|
21
23
|
$active: t
|
|
22
24
|
}) => t ? 1 : 0, ({
|
|
23
25
|
$active: t
|
|
@@ -25,34 +27,34 @@ const W = {
|
|
|
25
27
|
$active: t
|
|
26
28
|
}) => t ? "auto" : "none", z, ({
|
|
27
29
|
$active: t
|
|
28
|
-
}) => t ? "0s" : `${z}s`),
|
|
30
|
+
}) => t ? "0s" : `${z}s`), yt = p.div.withConfig({
|
|
29
31
|
displayName: "styled__PanelContent"
|
|
30
|
-
})(["", ";width:100%;height:100%;margin-top:0;position:relative;"], V),
|
|
32
|
+
})(["", ";width:100%;height:100%;margin-top:0;position:relative;"], V), vt = p.div.withConfig({
|
|
31
33
|
displayName: "styled__PanelCollapsedContent"
|
|
32
34
|
})(["", ";height:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:", ";width:100%;"], V, ({
|
|
33
35
|
$isAdaptive1280: t,
|
|
34
36
|
showResizeable: e
|
|
35
|
-
}) => e ? t ? "6px" : "10px" : v),
|
|
37
|
+
}) => e ? t ? "6px" : "10px" : v), xt = p.div.withConfig({
|
|
36
38
|
displayName: "styled__PanelCollapsedBody"
|
|
37
|
-
})(["gap:", ";display:flex;flex-direction:column;"], v),
|
|
39
|
+
})(["gap:", ";display:flex;flex-direction:column;"], v), bt = p(et).withConfig({
|
|
38
40
|
displayName: "styled__PanelIconButton"
|
|
39
41
|
})(["z-index:1;position:", ";top:", ";right:", ";width:", "px !important;height:", "px !important;.left-panel__toggle-button{transform:", ";}"], (t) => t.isAbsolute ? "absolute" : "static", v, v, ({
|
|
40
42
|
$isAdaptive1280: t
|
|
41
43
|
}) => t ? 32 : 40, ({
|
|
42
44
|
$isAdaptive1280: t
|
|
43
|
-
}) => t ? 32 : 40, (t) => t.collapsed ? "rotate(270deg)" : "rotate(90deg)"),
|
|
45
|
+
}) => t ? 32 : 40, (t) => t.collapsed ? "rotate(270deg)" : "rotate(90deg)"), _t = p.div.withConfig({
|
|
44
46
|
displayName: "styled__PanelSeparator"
|
|
45
|
-
})(["position:absolute;top:0;right:0px;width:12px;height:100%;cursor:col-resize;z-index:10;&::before{content:'';position:absolute;top:0;left:50%;transform:translateX(-50%);width:12px;height:100%;background-color:", ";}&::after{content:'';position:absolute;top:", ";left:50%;transform:translateX(-50%);border-radius:95px;width:4px;height:", ";background-color:", ";}&:hover{&::after{background-color:", ";}}"], () =>
|
|
47
|
+
})(["position:absolute;top:0;right:0px;width:12px;height:100%;cursor:col-resize;z-index:10;&::before{content:'';position:absolute;top:0;left:50%;transform:translateX(-50%);width:12px;height:100%;background-color:", ";}&::after{content:'';position:absolute;top:", ";left:50%;transform:translateX(-50%);border-radius:95px;width:4px;height:", ";background-color:", ";}&:hover{&::after{background-color:", ";}}"], () => rt, `calc(50% - ${j} / 2)`, j, () => at, () => lt), X = ({
|
|
46
48
|
onClick: t,
|
|
47
49
|
collapsed: e = !1,
|
|
48
50
|
isAbsolute: o = !1,
|
|
49
|
-
isAdaptive1280:
|
|
51
|
+
isAdaptive1280: s = !1,
|
|
50
52
|
...l
|
|
51
|
-
}) => /* @__PURE__ */ S(
|
|
53
|
+
}) => /* @__PURE__ */ S(bt, { onClick: t, $isAdaptive1280: s, collapsed: e, isAbsolute: o, view: "secondary", size: s ? "s" : "l", ...l, children: /* @__PURE__ */ S(R, { className: W.icon }) }), St = ({
|
|
52
54
|
setWidth: t,
|
|
53
55
|
isResizingRef: e,
|
|
54
56
|
setIsResizing: o,
|
|
55
|
-
panelRef:
|
|
57
|
+
panelRef: s,
|
|
56
58
|
minWidth: l,
|
|
57
59
|
maxWidth: C,
|
|
58
60
|
parentRef: x,
|
|
@@ -61,34 +63,34 @@ const W = {
|
|
|
61
63
|
}) => {
|
|
62
64
|
const I = O(() => {
|
|
63
65
|
var c;
|
|
64
|
-
document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", e.current = !0, o(!0), (c =
|
|
65
|
-
}, [
|
|
66
|
+
document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", e.current = !0, o(!0), (c = s.current) == null || c.classList.add(W.leftBlockIsResizing);
|
|
67
|
+
}, [s, e, o]);
|
|
66
68
|
return M(() => {
|
|
67
69
|
const c = () => {
|
|
68
|
-
var b,
|
|
69
|
-
document.body.style.cursor = "auto", document.body.style.userSelect = "", e.current = !1, o(!1), (b =
|
|
70
|
-
const u = ((
|
|
70
|
+
var b, i;
|
|
71
|
+
document.body.style.cursor = "auto", document.body.style.userSelect = "", e.current = !1, o(!1), (b = s.current) == null || b.classList.remove(W.leftBlockIsResizing);
|
|
72
|
+
const u = ((i = s.current) == null ? void 0 : i.clientWidth) ?? 0;
|
|
71
73
|
u > l && u < K && t(l);
|
|
72
|
-
}, m =
|
|
73
|
-
if (!e.current || !
|
|
74
|
+
}, m = dt((u) => {
|
|
75
|
+
if (!e.current || !s.current || !x.current)
|
|
74
76
|
return;
|
|
75
77
|
u.preventDefault();
|
|
76
|
-
const a = x.current.getBoundingClientRect(),
|
|
78
|
+
const a = x.current.getBoundingClientRect(), i = u.clientX - a.left, r = ut(l, i, C);
|
|
77
79
|
t(r), !P && f && f(r);
|
|
78
80
|
}, 16);
|
|
79
81
|
return window.addEventListener("mousemove", m), window.addEventListener("mouseup", c), () => {
|
|
80
82
|
window.removeEventListener("mousemove", m), window.removeEventListener("mouseup", c);
|
|
81
83
|
};
|
|
82
|
-
}, [t, e, o,
|
|
84
|
+
}, [t, e, o, s, l, C, x, P, f]), {
|
|
83
85
|
startResizing: I
|
|
84
86
|
};
|
|
85
|
-
},
|
|
87
|
+
}, Ct = (t) => ({
|
|
86
88
|
buttonSize: t ? "xs" : "s"
|
|
87
|
-
}),
|
|
89
|
+
}), Pt = (t, e) => e ?? (t ? mt : ft), D = (t, e) => typeof t == "function" ? t(e) : t, It = ({
|
|
88
90
|
widthState: t,
|
|
89
91
|
minWidth: e,
|
|
90
|
-
maxWidth: o =
|
|
91
|
-
disableMediaAdaptive:
|
|
92
|
+
maxWidth: o = ht,
|
|
93
|
+
disableMediaAdaptive: s = !1,
|
|
92
94
|
collapseState: l,
|
|
93
95
|
containerProps: C,
|
|
94
96
|
contentProps: x,
|
|
@@ -103,9 +105,9 @@ const W = {
|
|
|
103
105
|
}) => {
|
|
104
106
|
const {
|
|
105
107
|
down: b
|
|
106
|
-
} =
|
|
108
|
+
} = pt(), i = !s && b("xl"), r = Pt(i, e), h = B(() => Ct(i), [i]), q = B(() => D(f, h), [f, h]), F = B(() => D(I, h), [I, h]), G = B(() => D(c, h), [c, h]), J = A(!1), [n, L] = l ?? J, Q = A(Number(n ? r : o)), [g, w] = t ?? Q, N = k(null), H = k(null), $ = k(!1), [U, Y] = A(!1), {
|
|
107
109
|
startResizing: Z
|
|
108
|
-
} =
|
|
110
|
+
} = St({
|
|
109
111
|
setWidth: w,
|
|
110
112
|
isResizingRef: $,
|
|
111
113
|
setIsResizing: Y,
|
|
@@ -130,33 +132,33 @@ const W = {
|
|
|
130
132
|
return a && a(y), w(y ? r : o), y;
|
|
131
133
|
});
|
|
132
134
|
}, [a, L, w, r, o]);
|
|
133
|
-
return /* @__PURE__ */ _(
|
|
134
|
-
/* @__PURE__ */ _(
|
|
135
|
-
/* @__PURE__ */ _(
|
|
136
|
-
E && /* @__PURE__ */ S(X, { onClick: T, collapsed: n, isAdaptive1280:
|
|
135
|
+
return /* @__PURE__ */ _(gt, { ref: N, collapsed: n, maxWidth: o, minWidth: r, width: g, $resizing: U, $isAdaptive1280: i, showResizeable: m, ...C, children: [
|
|
136
|
+
/* @__PURE__ */ _(wt, { children: [
|
|
137
|
+
/* @__PURE__ */ _(yt, { $active: !n, "aria-hidden": n, ...x, children: [
|
|
138
|
+
E && /* @__PURE__ */ S(X, { onClick: T, collapsed: n, isAdaptive1280: i, isAbsolute: !0 }),
|
|
137
139
|
q
|
|
138
140
|
] }),
|
|
139
|
-
/* @__PURE__ */ _(
|
|
140
|
-
/* @__PURE__ */ _(
|
|
141
|
-
E && /* @__PURE__ */ S(X, { onClick: T, collapsed: n, isAdaptive1280:
|
|
141
|
+
/* @__PURE__ */ _(vt, { $active: n, "aria-hidden": !n, $isAdaptive1280: i, showResizeable: m, ...P, children: [
|
|
142
|
+
/* @__PURE__ */ _(xt, { children: [
|
|
143
|
+
E && /* @__PURE__ */ S(X, { onClick: T, collapsed: n, isAdaptive1280: i }),
|
|
142
144
|
F
|
|
143
145
|
] }),
|
|
144
146
|
G
|
|
145
147
|
] })
|
|
146
148
|
] }),
|
|
147
|
-
m && /* @__PURE__ */ S(
|
|
149
|
+
m && /* @__PURE__ */ S(_t, { onMouseDown: (d) => {
|
|
148
150
|
var y;
|
|
149
151
|
d.preventDefault(), (y = N.current) != null && y.parentElement && (H.current = N.current.parentElement), Z();
|
|
150
152
|
} })
|
|
151
153
|
] });
|
|
152
154
|
};
|
|
153
|
-
|
|
155
|
+
It.LeftPanelToggleButton = X;
|
|
154
156
|
export {
|
|
155
|
-
|
|
157
|
+
It as L,
|
|
156
158
|
X as a,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
+
Ct as b,
|
|
160
|
+
Pt as g,
|
|
159
161
|
D as r,
|
|
160
162
|
W as t,
|
|
161
|
-
|
|
163
|
+
St as u
|
|
162
164
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const y=require("react"),g=require("react/jsx-runtime"),O=require("../components/Box/index.cjs"),w=require("@salutejs/sdds-finai"),T=require("../components/Collapse/index.cjs"),A=require("./Table-
|
|
1
|
+
"use strict";const y=require("react"),g=require("react/jsx-runtime"),O=require("../components/Box/index.cjs"),w=require("@salutejs/sdds-finai"),T=require("../components/Collapse/index.cjs"),A=require("./Table-CdaMPDkg.cjs"),$=require("@salutejs/plasma-icons"),q=require("./utils-ChDQGRjv.cjs"),B=require("styled-components"),k=require("@salutejs/sdds-themes/tokens/sdds_finai"),I=require("./FiltersActions-CVtgAJnC.cjs"),_="list-of-filters",f={chipsGroup:`${_}__chip-group`,chipsGroupLabel:`${_}__chip-group__label`,chipsGroupCount:`${_}__chip-group__count`,chip:`${_}__chip`,clearButtonBlock:`${_}__clear-button-block`,chipsContainer:`${_}__chips-container`,container:`${_}__container`},N=e=>"groupId"in e,W=()=>B.css(k.bodyS),G=250,M=B(w.ChipGroup).withConfig({displayName:"ChipOrGroup__StyledChipGroup"})(["&{border-radius:",";padding:4px 2px;"," align-items:center;&.","{gap:4px;& .",":first-child,& ."," + .","{margin-left:4px;}& .","{display:inline-block;min-width:0;max-width:","px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}& .","{color:",";margin-left:4px;}& ."," svg{color:"," !important;}}}"],()=>k.borderRadiusS,()=>W(),f.chipsGroup,f.chip,f.chipsGroupLabel,f.chip,f.chipsGroupLabel,G,f.chipsGroupCount,()=>k.textPrimary,f.chip,()=>k.onLightTextSecondary),V=({itemOrGroup:e,maxLengthInGroup:i=2,ellipsisLabel:h=!1,chipStyle:n,renderGroupLabel:u,renderChipLabel:r})=>{if(N(e)){const p=e,b=p.items.slice(0,i),d=p.items.length-b.length,l=u?u(p):p.groupLabel;return g.jsxs(M,{className:f.chipsGroup,size:"xs",gap:"wide",view:"default",isCommonChipStyles:!1,children:[h?g.jsx("span",{className:f.chipsGroupLabel,title:l,children:l}):l,b.map(t=>g.jsx(w.Chip,{className:f.chip,title:"Удалить фильтр",view:"default",text:r?r(p,t):t.label.toString(),size:"xs",pilled:!0,onClick:t.onClick,style:{maxWidth:180,...A.overflowDotsStyle,...n&&n(p,t)},appearance:"transparent"},t.id)),d>0&&g.jsx(I.FiltersActionsTooltip,{groupLabel:l,items:p.items.map(t=>r?r(p,t):t.label.toString()),children:g.jsxs("span",{className:f.chipsGroupCount,children:["+",d]})})]})}return g.jsx(w.Chip,{className:f.chip,title:"Удалить фильтр",view:"default",text:r?r(null,e):e.label.toString(),size:"xs",pilled:!0,onClick:e.onClick,style:{maxWidth:150,...A.overflowDotsStyle,...n&&n(e,void 0)},appearance:"transparent"})},H=(e,i)=>{y.useEffect(()=>{var p;if(!i)return;const h=(p=e.current)==null?void 0:p.querySelector(".tabs-clip-scroll"),n=h==null?void 0:h.firstElementChild;if(!h)return;const u=()=>{h.dispatchEvent(new Event("scroll",{bubbles:!0}))},r=q.createSafeResizeObserver(u);return r.observe(h),n&&r.observe(n),()=>{r.disconnect()}},[e,i])},P=(e,i,h)=>{var c,s;const n=y.useRef(null),u=!!n.current,[r,p]=y.useState(0),b=n.current,d=(c=n.current)==null?void 0:c.firstChild,l=(s=n.current)==null?void 0:s.lastChild,t=(b&&d&&l&&b.offsetWidth-d.offsetWidth-l.offsetWidth-i*2-h*2)??void 0;return y.useEffect(()=>{const o=n.current;let m=0;function j(){m=(o==null?void 0:o.offsetWidth)??0,p(m)}j();const S=q.createSafeResizeObserver(j);return e&&o&&S.observe(o),()=>{S.disconnect()}},[e,u]),{refForContainer:n,maxWidthForCenterElement:t}},K={xs:{height:32,paddingInline:0}},D=1,F=`${D}px solid ${()=>A.COLORS.border}`,U=B(w.Tabs).withConfig({displayName:"ListOfFilters__StyledTabs"})({"&":{"& .tabs-clip-scroll":{overflowY:"hidden"},"& button.tab-item-animated":{marginLeft:"8px","&:first-of-type":{marginLeft:"0px"}}}}),Z=({opened:e,items:i,clearAll:h,size:n="xs",paddingTop:u=0,maxLengthInGroup:r=2,ellipsisLabel:p=!1,sizeOnOpen:b,leftSlot:d,paddingInline:l,maxHeight:t,chipStyle:c,renderGroupLabel:s,renderChipLabel:o,showResetAllFiltersButton:m=!0,extraCss:j={}})=>{const S=K[n],z=l??S.paddingInline,C=t??S.height,{refForContainer:L}=P(e,z,D);return q.useDebouncedValue(e,200),H(L,e),g.jsx(T.Collapse,{isOpen:e,sizeOnOpen:b??C+u,unMountOnClose:!0,children:g.jsxs(O.Box,{ref:L,className:f.container,$css:{display:"flex",borderInline:F,borderTop:F,paddingInline:z,maxHeight:C,marginTop:u,flexDirection:"row-reverse",...j},children:[g.jsx(O.Box,{$css:"display: inline;",children:d??null}),g.jsx(U,{className:f.chipsContainer,view:"clear",size:"xs",style:{height:C-D,flex:1,minWidth:0,overflow:"hidden"},children:!!i.length&&i.map((a,x)=>{let v;return"groupId"in a&&(v=a.groupId??x),"id"in a&&(v=a.id??x),g.jsx(w.TabItem,{view:"clear",onClick:E=>E.preventDefault(),children:g.jsx(V,{maxLengthInGroup:r,ellipsisLabel:p,itemOrGroup:a,chipStyle:c,renderGroupLabel:s,renderChipLabel:o})},v)})}),g.jsx(O.Box,{className:f.clearButtonBlock,$css:"display: inline-flex; margin-left: auto;",children:m&&g.jsx(w.Button,{view:"clear",size:"xs",text:"Сбросить все",disabled:!i.length,contentLeft:g.jsx($.IconClose,{size:"xs",color:"inherit"}),onClick:h})})]})})},R=y.memo(Z),X=e=>e==null?"":e instanceof Date?e.toLocaleDateString():Array.isArray(e)?e.map(i=>i instanceof Date?i.toLocaleDateString():String(i??"")).join(", "):String(e),Y=({filters:e,filtersInfo:i,options:h,updateFilters:n,order:u})=>{const{labelFromValueMaps:r}=y.useMemo(()=>{const d={};for(const l of Object.entries(h)){const[t,c]=l;d[t]=new Map(c.map(s=>[String(s.value),s.label]))}return{labelFromValueMaps:d}},[h]),p=y.useCallback(()=>{for(const d of Object.entries(i)){const[l,t]=d;n(l,t.clearedValue)}},[i,n]);return{...y.useMemo(()=>{const d=Object.entries(e).reduce((t,c)=>{var L;const s=c[0],o=c[1],m=Array.isArray(o);if(!(m&&o.length||!m&&o&&o!==!1)||o===i[s].clearedValue)return t;if(typeof o=="boolean"){const a={id:s,label:i[s].label,onClick:()=>{n(s,i[s].clearedValue)}};return t.push(a),t}const C={groupId:s,groupLabel:i[s].label,items:[]};if(m)C.items=o.map(a=>{var x,v;return{id:a,label:((v=(x=r==null?void 0:r[s])==null?void 0:x.get)==null?void 0:v.call(x,a))??a.toString(),onClick:()=>{n(s,o.filter(E=>E!==a))}}});else{const a=r==null?void 0:r[s],x=((L=a==null?void 0:a.get)==null?void 0:L.call(a,o))??X(o);C.items=[{id:o.toString(),label:x,onClick:()=>{n(s,"clearedValue"in i[s]?i[s].clearedValue:"")}}]}return t.push(C),t},[]);let l=d;if(u&&u!=="default"){if(typeof u=="function")l=u(d);else if(Array.isArray(u)){const t=new Map;d.forEach(c=>{const s="groupId"in c?c.groupId:String(c.id);t.set(s,c)}),l=[],u.forEach(c=>{const s=t.get(c);s&&(l.push(s),t.delete(c))}),t.size>0&&Array.from(t.keys()).sort().forEach(s=>{const o=t.get(s);o&&l.push(o)})}}return{filterListOpened:d.length>0,filterList:l}},[e,i,r,n,u]),clearAll:p,labelFromValueMaps:r}},J=Object.freeze(Object.defineProperty({__proto__:null,default:R},Symbol.toStringTag,{value:"Module"}));exports.ListOfFilters=R;exports.ListOfFilters_lazy=J;exports.isGroup=N;exports.listOfFiltersClassNames=f;exports.useFiltersList=Y;
|
|
@@ -3,12 +3,12 @@ import { jsxs as E, jsx as g } from "react/jsx-runtime";
|
|
|
3
3
|
import { Box as A } from "../components/Box/index.mjs";
|
|
4
4
|
import { Chip as O, ChipGroup as F, TabItem as G, Button as M, Tabs as H } from "@salutejs/sdds-finai";
|
|
5
5
|
import { Collapse as P } from "../components/Collapse/index.mjs";
|
|
6
|
-
import { o as N, C as q } from "./Table-
|
|
6
|
+
import { o as N, C as q } from "./Table-DYSssxRS.mjs";
|
|
7
7
|
import { IconClose as K } from "@salutejs/plasma-icons";
|
|
8
|
-
import { c as T, u as U } from "./utils-
|
|
8
|
+
import { c as T, u as U } from "./utils-u1KJ37g3.mjs";
|
|
9
9
|
import W, { css as Z } from "styled-components";
|
|
10
10
|
import { borderRadiusS as X, textPrimary as Y, onLightTextSecondary as J, bodyS as Q } from "@salutejs/sdds-themes/tokens/sdds_finai";
|
|
11
|
-
import { F as tt } from "./FiltersActions-
|
|
11
|
+
import { F as tt } from "./FiltersActions-CDZSO0MM.mjs";
|
|
12
12
|
const x = "list-of-filters", h = {
|
|
13
13
|
chipsGroup: `${x}__chip-group`,
|
|
14
14
|
chipsGroupLabel: `${x}__chip-group__label`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const g=require("react/jsx-runtime"),b=require("@salutejs/sdds-finai"),Rt=require("@salutejs/plasma-icons"),xt=require("./utils-CUW5bd8S.cjs"),p=require("react"),Wt=require("./Table-BwhzcFX1.cjs"),Vt=require("../constants/index.cjs"),Ct=require("@salutejs/sdds-themes/tokens/sdds_finai"),M=require("styled-components"),jt=require("../components/Box/index.cjs"),se=require("../components/Collapse/index.cjs"),Pt=require("./AnalyticalWidget-wke3Jm3X.cjs"),ht=24,L=4,wt=44,Nt=40,Et=24,Q={top:12,right:8,bottom:12,left:24},Bt={top:0,right:10,bottom:0,left:24},ie=Q.left+Q.right,vt=90,qt=110,gt=100,oe=300,Tt=550,Ut=350,Gt=50,Ht=100,Xt=({buttons:t,visibleButtonsCount:i})=>{const{visibleButtons:o,buttonsInDropdown:n}=p.useMemo(()=>{const e=t??[],c=new Set,h=[];e.forEach((f,u)=>{f.view==="accent"?c.add(u):h.push(u)});const l=c.size,a=Math.max(0,i-l),s=new Set(h.slice(0,a)),r=[],w=[];return e.forEach((f,u)=>{c.has(u)||s.has(u)?r.push(f):w.push(f)}),{visibleButtons:r,buttonsInDropdown:w}},[t,i]);return{visibleButtons:o,buttonsInDropdown:n,allButtons:t??[]}},Yt=({isCollapsed:t,setIsCollapsed:i,isSidebarOpen:o,calculatePositionForState:n,calculatePosition:e,setTranslateX:c,shouldApplySidebarOffsetRef:h,wasAutoCollapsedRef:l})=>({handleToggleCollapse:p.useCallback(()=>{const s=!t,r=n(s);r!==void 0&&c(r),o&&(s?h.current=!0:(h.current=!1,l.current=!1)),i(s),setTimeout(()=>{e()},Tt)},[t,o,n,e,c,h,l,i])}),Jt=({isCollapsed:t,containerRef:i,contentRef:o,middleSectionRef:n,buttonRefs:e,moreButtonRef:c,collapseButtonRef:h,leftSectionRef:l,dividerRef:a,buttons:s,isHaveSomeFeatureInSidebar:r,getContainerWidth:w,setVisibleButtonsCount:f,minPadding:u=Et,leftPadding:C=Q.left,rightPadding:A=Q.right,moreButtonWidthEstimate:I=Nt,enableDebugLogs:B=!1})=>{const N=p.useRef([]),z=p.useCallback(()=>{var dt,X,pt,rt,ut,W;const y=w();if(!y||y===0||!s||s.length===0)return B&&console.debug("❌ calculateInitialCompression: нет tableWidth или buttons"),!1;if(!s.every((x,E)=>e.current[E]!==null&&e.current[E]!==void 0))return B&&console.debug("❌ calculateInitialCompression: ref'ы еще не установлены",{buttonsCount:s.length,refsCount:e.current.filter(Boolean).length,refs:e.current.map((x,E)=>({index:E,hasRef:!!x}))}),!1;const S=y-(r?wt:0),q=((dt=l==null?void 0:l.current)==null?void 0:dt.getBoundingClientRect().width)??0,k=((X=n.current)==null?void 0:X.getBoundingClientRect().width)??0,$=s.length>0,R=$?((pt=a==null?void 0:a.current)==null?void 0:pt.getBoundingClientRect().width)??0:0,U=$?L:0,tt=$&&k>0?L:0,ot=R+tt+U,at=L*2,ct=q+k+ot+(((rt=h.current)==null?void 0:rt.getBoundingClientRect().width)??ht)+(C+A)+at,T=[];let P=!0;for(let x=0;x<s.length;x+=1){const E=e.current[x];if(!E){P=!1;break}const F=E.querySelector("button, a")||E;if(!F||!F.isConnected){P=!1;break}const ft=F.getBoundingClientRect(),lt=ft.width||F.offsetWidth||F.scrollWidth||F.clientWidth;if(lt>0)T.push(lt),N.current[x]=lt;else{console.debug("❌ calculateInitialCompression: кнопка не отрендерилась",{index:x,text:(ut=s[x])==null?void 0:ut.text,width:lt,isConnected:F.isConnected,rect:ft}),P=!1;break}}if(!P||T.length!==s.length)return B&&console.debug("❌ calculateInitialCompression: не все кнопки измерены",{allButtonsMeasured:P,buttonWidthsLength:T.length,buttonsLength:s.length}),!1;const et=((W=c.current)==null?void 0:W.getBoundingClientRect().width)??I,v=S-u*2,O=[],j=[];s.forEach((x,E)=>{if(T[E]===void 0)return;(x==null?void 0:x.view)==="accent"?O.push(E):j.push(E)});let V=0;O.forEach(x=>{const E=T[x];E!==void 0&&(V+=E)});const G=new Set(O);let nt=V,st=0;for(let x=0;x<j.length;x+=1){const E=j[x],D=typeof E<"u"?T[E]:0;if(D===void 0)continue;const ft=x<j.length-1?et+L:0,mt=(G.size+1-1)*L,At=nt+D+mt+ft;if(ct+At<=v)nt+=D,st+=1,typeof E<"u"&&G.add(E);else break}const H=G.size;return f(H),console.debug("✅ calculateInitialCompression: успешно выполнено",{buttonWidths:T,visibleCount:H,accentCount:O.length,regularVisibleCount:st}),!0},[s,w,r,f,e,l,n,c,h,a,B,u,C,A,I]);return{calculateCompression:p.useCallback(()=>{t||!i.current||!o.current||requestAnimationFrame(()=>{setTimeout(()=>{var lt,mt,At,It,Mt,St,Dt;const y=w();if(!y||y===0)return;const _=y-(r?wt:0);B&&(console.group("🔧 MassActions Compression"),console.debug("📏 Размеры контейнера:",JSON.stringify({tableWidth:y,isHaveSomeFeatureInSidebar:r,togglePanelWidth:r?wt:0,availableWidth:_,minPaddingRequired:u*2,maxPanelWidthAllowed:_-u*2},null,2)));const S=((lt=l==null?void 0:l.current)==null?void 0:lt.getBoundingClientRect().width)??0,q=((mt=n.current)==null?void 0:mt.getBoundingClientRect().width)??0,k=((s==null?void 0:s.length)??0)>0,$=k?((At=a==null?void 0:a.current)==null?void 0:At.getBoundingClientRect().width)??0:0,R=k?L:0,U=k&&q>0?L:0,tt=$+U+R;let ot=null;if(l!=null&&l.current){const d=l.current.getBoundingClientRect(),{children:m}=l.current,K=[];for(let Y=0;Y<m.length;Y+=1){const Z=m[Y];if(Z){const it=Z.getBoundingClientRect();K.push({tagName:Z.tagName,className:Z.className,width:it.width,height:it.height})}}ot={width:d.width,height:d.height,children:K,childrenTotalWidth:K.reduce((Y,Z)=>Y+Z.width,0)}}const at=L*2,ct=S+q+tt+(((It=h.current)==null?void 0:It.getBoundingClientRect().width)??ht)+(C+A)+at;B&&console.debug("🔲 Фиксированные элементы:",JSON.stringify({leftSectionWidth:S,leftSectionDetails:ot,middleSectionWidth:q,divider:{shouldShow:k,wrapperWidth:$,gapLeft:U,gapRight:R,totalWidth:tt},collapseButtonWidth:((Mt=h.current)==null?void 0:Mt.getBoundingClientRect().width)??ht,containerPadding:C+A,gapsBetweenFixedElements:at,fixedElementsTotal:ct},null,2));const T=[];let P=!0;for(let d=0;d<((s==null?void 0:s.length)??0);d+=1){const m=e.current[d];if(m){const Y=m.querySelector("button, a")||m,it=Y.getBoundingClientRect().width||Y.offsetWidth||Y.scrollWidth||Y.clientWidth;it>0?(T.push(it),N.current[d]=it):N.current[d]!==void 0?T.push(N.current[d]??gt):(P=!1,T.push(gt))}else N.current[d]!==void 0?T.push(N.current[d]??gt):(P=!1,T.push(gt))}if(!P&&T.length===0&&((s==null?void 0:s.length)??0)>0)return;const et=((St=c.current)==null?void 0:St.getBoundingClientRect().width)??I,v=_-u*2,O=i.current?i.current.getBoundingClientRect().width:0;B&&(console.debug("🎯 Ограничения и текущее состояние:",JSON.stringify({targetContainer:{tableWidth:y,availableWidth:_,minPaddingEach:u,minPaddingTotal:u*2,maxPanelWidth:v},currentPanel:{width:O,exceedsMax:O>v,exceedsAvailable:O>_,leftPadding:u,rightPadding:u},moreButtonWidth:et},null,2)),console.debug("🔘 Ширины кнопок:",JSON.stringify({buttons:s==null?void 0:s.map((d,m)=>({index:m,text:d.text,view:d.view,isAccent:d.view==="accent",width:T[m]})),totalButtonsWidth:T.reduce((d,m)=>d+m,0),averageButtonWidth:T.length>0?T.reduce((d,m)=>d+m,0)/T.length:0},null,2)));const j=s??[],V=[],G=[];j.forEach((d,m)=>{if(T[m]===void 0)return;(d==null?void 0:d.view)==="accent"?V.push(m):G.push(m)}),B&&console.debug("🎨 Распределение:",{accentCount:V.length,regularCount:G.length,accentButtons:V.map(d=>{var m;return{index:d,text:(m=j[d])==null?void 0:m.text,width:T[d]}})});let nt=0;V.forEach(d=>{const m=T[d];m!==void 0&&(nt+=m)});const st=new Set(V);let H=nt,dt=0;for(let d=0;d<G.length;d+=1){const m=G[d],K=typeof m<"u"?T[m]:0;if(K===void 0)continue;const Z=d<G.length-1?et+L:0,it=st.size+1,Lt=(it-1)*L,kt=H+K+Lt+Z,_t=ct+kt,yt=_t+3;if(B&&console.debug(` 🔍 Проверка кнопки ${d}:`,{text:typeof m<"u"?(Dt=j[m])==null?void 0:Dt.text:"",width:K,totalButtonsWidthBefore:H,visibleCountAfter:it,gapsBetweenButtons:Lt,moreButtonSpace:Z,requiredWidth:kt,testPanelWidth:_t,testWithBuffer:yt,maxPanelWidth:v,fits:_t<=v,fitsWithBuffer:yt<=v}),yt<=v)H+=K,dt+=1,typeof m<"u"&&st.add(m);else break}const X=st.size,rt=j.length-X>0,ut=X>0?(X-1)*L:0,W=H+ut+(rt?et+L:0),x=ct+W,E=[],D=[];j.forEach((d,m)=>{st.has(m)?E.push(d):D.push(d)});const F=X,ft={fixedElements:{leftSection:S,middleSection:q,divider:tt,collapseButton:ht,containerPadding:C+A,gapsBetweenFixedElements:at,total:ct},buttons:{accentButtonsWidth:nt,visibleRegularButtonsWidth:H-nt,totalButtonsWidth:H,gapsBetweenVisibleButtons:ut,buttonsAreaWidth:W,visibleButtonsCount:X,hiddenButtonsCount:D.length},moreButton:rt?{width:et,gap:L,total:et+L}:null,final:{calculatedWidth:x,actualPanelWidth:O,widthDifference:O-x,maxAllowedWidth:v,availableWidth:_,fits:x<=v,actualFits:O<=v,exceedsBy:x>v?x-v:0,actualExceedsBy:O>v?O-v:0,leftPaddingRequired:u,rightPaddingRequired:u,totalPaddingRequired:u*2}};B&&(console.debug("✅ Результат компрессии:",JSON.stringify({summary:{totalButtons:j.length,accentCount:V.length,visibleRegularCount:dt,visibleCount:F,hiddenCount:D.length,finalPanelWidth:x,maxPanelWidth:v,fits:x<=v,hasMoreButton:rt},breakdown:ft},null,2)),console.debug("👁️ Видимые кнопки:",{buttons:E.map(d=>({text:d.text,view:d.view,isAccent:d.view==="accent"}))}),console.debug("📦 Кнопки в dropdown:",{buttons:D.map(d=>({text:d.text,view:d.view}))}),console.groupEnd()),f(X)},Gt)})},[t,i,o,w,r,B,l,n,s,a,c,h,u,C,A,I,f,e]),calculateInitialCompression:z,measuredButtonWidthsRef:N}},Ft=t=>{const[i,o]=p.useState(0),n=p.useCallback(()=>typeof t=="function"?t():t.current,[t]),e=p.useCallback(()=>{const c=n();return c?c.getBoundingClientRect().width:0},[n]);return p.useEffect(()=>{const c=n();if(!c)return;o(c.getBoundingClientRect().width);const h=xt.createSafeResizeObserver(l=>{for(const a of l){const{width:s}=a.contentRect;o(s)}});return h.observe(c),()=>{h.disconnect()}},[n]),{containerWidth:i,getContainerWidth:e,getContainer:n}},Kt=({containerRef:t,buttonRefs:i,buttons:o,isVisible:n,isCollapsed:e,visibleButtonsCount:c,selectedCount:h,setIsCollapsed:l,setVisibleButtonsCount:a,calculatePosition:s,calculateCompression:r,measuredButtonWidthsRef:w,containerWidth:f})=>{p.useEffect(()=>{f>0&&(s(),r())},[f,s,r]),p.useLayoutEffect(()=>{if(!t.current)return;const u=xt.createSafeResizeObserver(()=>{s()});return u.observe(t.current),()=>{u.disconnect()}},[s,t]),p.useEffect(()=>{i.current=Array((o==null?void 0:o.length)??0).fill(null),a((o==null?void 0:o.length)??0),w.current=[]},[o==null?void 0:o.length,i,a,w]),p.useEffect(()=>{if(n&&!e){const u=setTimeout(()=>{r(),s()},Ht);return()=>{clearTimeout(u)}}},[n,e,r,s]),p.useEffect(()=>{if(e){s();return}s()},[e,c,s]),p.useEffect(()=>()=>{(!n||h===0)&&l(!1)},[n,h,l])},Zt=({containerRef:t,collapseButtonRef:i,leftSectionRef:o,getContainerWidth:n,isHaveSomeFeatureInSidebar:e,sidebarConfig:c,visibleButtonsCount:h,setTranslateX:l,minPadding:a=Et,enableDebugLogs:s=!1})=>{const r=(c==null?void 0:c.isOpen)??!1,w=(c==null?void 0:c.width)??0,f=(c==null?void 0:c.togglePanelWidth)??wt,u=p.useRef(!1),C=p.useCallback(I=>{var k,$;const B=n();if(!B||B===0)return;const N=w+f,z=r?N/2:0,J=e?f/2:0;let y=-(z+J),_;if(I){const R=((k=o==null?void 0:o.current)==null?void 0:k.getBoundingClientRect().width)??vt,U=(($=i.current)==null?void 0:$.getBoundingClientRect().width)??ht,tt=Bt.top+Bt.right+Bt.left;_=R+U+tt}else if(t.current)_=t.current.getBoundingClientRect().width;else{const R=h*gt,U=Q.top+Q.right+Q.left;_=vt+qt+ht+R+U}const S=B/2;return S-_/2+y<a&&(y=a-(S-_/2)),y},[n,t,i,o,e,r,w,f,h,a]);return{calculatePosition:p.useCallback(()=>{const I=n();if(!I||I===0||!t.current)return;s&&console.group("📍 MassActions Position");const B=w+f,N=r?B/2:0,z=e?f/2:0;let J=-(N+z);const y=t.current.getBoundingClientRect().width,_=I/2,S=_-y/2+J;S<a&&(J=a-(_-y/2)),s&&(console.log("🎯 Позиционирование:",JSON.stringify({tableWidth:I,panelWidth:y,tableCenter:_,sidebarWidth:w,toggleSidebarPanelWidth:f,isSidebarOpen:r,isHaveSomeFeatureInSidebar:e,totalSidebarWidth:B,sidebarOffset:N,togglePanelOffset:z,idealTranslateX:-(N+z),leftEdgePosition:S,minPadding:a,finalTranslateX:J,adjusted:S<Et},null,2)),console.groupEnd()),l(J),r?u.current=!0:u.current=!1},[n,t,s,w,f,e,r,l,a]),calculatePositionForState:C,shouldApplySidebarOffsetRef:u}},Qt=({isCollapsed:t,setIsCollapsed:i,calculatePositionForState:o,calculatePosition:n,setTranslateX:e,shouldApplySidebarOffsetRef:c,sidebarConfig:h,getContainerWidth:l})=>{const a=(h==null?void 0:h.isOpen)??!1,s=(h==null?void 0:h.width)??0,r=p.useRef(!1),w=p.useRef(a);return p.useEffect(()=>{if(!h)return;const u=w.current!==a;if(w.current=a,!u){n();return}if(a)if(t)n();else{r.current=!0;const C=o(!0);C!==void 0&&(e(C),c.current=!0),i(!0),setTimeout(()=>{n()},Tt)}else if(t){r.current=!1,c.current=!1;const C=o(!1);C!==void 0&&e(C),i(!1),setTimeout(()=>{n()},Tt)}else c.current=!1,n()},[a,s,l]),{isSidebarOpen:a,sidebarWidth:s,wasAutoCollapsedRef:r}},bt=t=>{const i=p.useRef(t),[o,n]=p.useState(t>0);return p.useEffect(()=>{var l;const e=i.current,c=e===0&&t>0,h=e>0&&t===0;if(c||h){const a=()=>{n(t>0)};document.startViewTransition?(l=document.startViewTransition)==null||l.call(document,a):a()}else n(t>0);i.current=t},[t]),o},ce="mass-actions-panel",zt={surfaceSolidCard:()=>Ct.surfaceSolidCard,outlineSolidPrimary:()=>Ct.outlineSolidPrimary},re=M(b.LinkButton).withConfig({displayName:"styled__StyledLinkButton"})({paddingInline:Vt.s.x8}),te=t=>M(t).withConfig({displayName:"styled__getButtonWithDropdown"})([""," ",""],({$hasDropdown:i})=>i&&M.css(["& > div > span:last-child{max-width:fit-content;min-width:unset;}"]),({$buttonStyles:i})=>i&&M.css(["",""],i)),le=te(b.Button),ae=te(re),de=M.div.withConfig({displayName:"styled__MassActionsContainer"})(["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:",";"],({$bottom:t=24})=>t,({$translateX:t})=>t!==void 0?`translateX(calc(-50% + ${t}px))`:"translateX(-50%)",zt.surfaceSolidCard,zt.outlineSolidPrimary,({$isCollapsed:t,$size:i})=>{const o=i==="xs";return t?o?"0px 2px 0px 12px":"0px 10px 0px 24px":o?"4px 2px 4px 12px":"12px 8px 12px 24px"},({$isCollapsed:t})=>t?"350":"2000px",ce,({$isInitialCalculationComplete:t})=>t?1:0,Ct.shadowDownHardS),ue=M.div.withConfig({displayName:"styled__MassActionsContent"})(["display:flex;align-items:center;gap:",";"],({$isCollapsed:t,$isCompact:i})=>t?i?"4px":"8px":"0px"),he=M.div.withConfig({displayName:"styled__ActionsWrapper"})(["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);",""],({$isCollapsed:t})=>t?"0":"40px",({$isCollapsed:t})=>t?M.css(["opacity:0;max-width:0;margin:0;gap:0;"]):M.css(["opacity:1;max-width:2000px;"])),pe=M.div.withConfig({displayName:"styled__HiddenButtonsMeasurementContainer"})(["position:absolute;left:-9999px;top:0;display:flex;gap:4px;align-items:center;z-index:-1;pointer-events:none;width:auto;height:auto;"]),fe=M.div.withConfig({displayName:"styled__ButtonMeasurementWrapper"})(["display:inline-flex;width:auto;height:auto;"]),ge=M.div.withConfig({displayName:"styled__VisibleButtonWrapper"})(["margin-left:0;"]),xe=M(Rt.IconDoubleDisclosureUp).withConfig({displayName:"styled__CollapseIcon"})(["transition:all 0.3s;transform:",";"],({$isCollapsed:t})=>t?"scaleY(1)":"scaleY(-1)"),we=M(b.EmbedIconButton).withConfig({displayName:"styled__CollapseButton"})(["padding:",";"],({$isCompact:t})=>t?Vt.s.x8:Ct.spacing10x);M(b.Button).withConfig({displayName:"styled__MoreButton"})(["margin-left:0;"]);const me=M(b.Divider).withConfig({displayName:"styled__StyledDivider"})(["padding-left:1px;margin-left:12px;margin-right:8px;"]),Ae=t=>{if(typeof t=="string"&&t.startsWith("link")){const i=t.slice(4);return i.charAt(0).toLowerCase()+i.slice(1)}return t??"default"},Be={size:"s",view:"linkDefault"},Ot=({type:t,view:i,showLabel:o,text:n,buttonStyles:e,dropdown:c,useTableDropdown:h=!1,...l})=>{const a=t??"linkButton",{view:s,...r}=Be,w=i??s,f=o?n:void 0,u=!!c;let C;if(a==="button"){const A=l,I=A.text??f;C=g.jsx(le,{...r,...A,view:w,text:I,$hasDropdown:u,$showLabel:o,$buttonStyles:e})}else{const A=String(w??"linkDefault"),B=A.startsWith("link")?Ae(A):A;C=g.jsx(ae,{...r,...l,view:B,text:f,$hasDropdown:u,$showLabel:o,$buttonStyles:e})}if(c&&c.items&&c.items.length>0)if(h)C=g.jsx(Wt.TableDropdown,{...c,children:C});else{const{$css:A,...I}=c;C=g.jsx(b.Dropdown,{...I,children:C})}return C},ee=({selectedCount:t,label:i="Выбрано",showCheckbox:o=!1,checked:n=!1,onCheckboxChange:e,className:c,indeterminate:h})=>{const{down:l}=xt.useBreakpoint(),a=l("xl"),s=t>0,r=a?"BodyXS":"BodyS",w=(()=>{if(t===0)return"0px";const u=t.toString().length;return`${Math.max(16,7.1+u*6.1)+4}px`})(),f=o?g.jsxs(jt.Box,{$css:{display:"flex",alignItems:"center",gap:"4px"},children:[g.jsx(b.Checkbox,{checked:n,indeterminate:h,onChange:e,size:"m"}),g.jsx(Pt.Typography,{variant:r,children:i})]}):g.jsx(Pt.Typography,{variant:r,children:i});return g.jsxs(jt.Box,{className:c,$css:{display:"flex",alignItems:"center"},children:[f,g.jsx(se.Collapse,{duration:.3,orientation:"horizontal",isOpen:s,unMountOnClose:!0,sizeOnOpen:w,extContainerCss:{overflow:"visible",display:"flex",justifyContent:"flex-end"},intContainerCss:{always:{opacity:"0",transition:".3s ease"},onOpen:{opacity:1}},children:s&&g.jsx(Wt.AnimatedCounter,{className:"counter",count:t,size:"xs",view:"accent",style:{marginBottom:"3px"}},t)})]})},Ce=(t=[])=>p.useMemo(()=>{const i=[],o={},n=new Map;return t.forEach(e=>{var c,h;if(e.dropdown){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;s&&n.set(l.toString(),s);const[r,w]=xt.processDropdownItems(a,s);w.forEach((f,u)=>n.set(u,f)),(c=e.dropdown)!=null&&c.$css&&Object.assign(o,(h=e.dropdown)==null?void 0:h.$css),i.push({label:e.text??"",value:l,contentLeft:e.contentLeft,items:r,className:e.className,disabled:e.disabled})}else{const l=e.key||e.text||`btn-${Date.now()}`,a={label:e.text||"Кнопка",value:l.toString(),disabled:e.disabled,contentLeft:e.contentLeft};e.onClick&&n.set(l.toString(),(s,r)=>{var f;const w={...r,nativeEvent:r.nativeEvent,preventDefault:r.preventDefault,stopPropagation:r.stopPropagation,target:r.target,currentTarget:r.currentTarget};(f=e.onClick)==null||f.call(e,w)}),i.push(a)}}),{dropdownItems:i,handlerMap:n,$summaryCSS:o}},[t]),Ee=({buttons:t=[],dividerIndexes:i=[],triggerSlot:o,dropdownProps:n,useTableDropdown:e=!1})=>{const{dropdownItems:c,handlerMap:h,$summaryCSS:l}=Ce(t),a=xt.useDropdownItemClickHandler(h),[s,r]=p.useState(!1),w=c.map((A,I)=>(i.includes(I)&&(A.dividerAfter=!0),A)),f={closeOnSelect:!0,...n,onItemSelect:a,items:w,onToggle:A=>r(A),portal:"document",view:(n==null?void 0:n.view)||"default"},{portal:u,...C}=f;return e?g.jsx(Wt.TableDropdown,{$css:l,...C,children:o}):g.jsx(b.Dropdown,{...f,children:o})},Te=({button:t,isCompact:i,compactSize:o="xs",useTableDropdown:n=!1})=>{const e=t.size??(i?o:"s");return g.jsx(Ot,{...t,size:e,showLabel:!0,useTableDropdown:n})},Ie=({button:t,isCompact:i,compactSize:o="xs",useTableDropdown:n=!1})=>{const e=t.size??(i?o:"s");return g.jsx(Ot,{...t,size:e,showLabel:!0,useTableDropdown:n})},$t=(t,i,o=!1,n="xs")=>t.type==="button"?g.jsx(Te,{button:t,isCompact:i,compactSize:n,useTableDropdown:o}):g.jsx(Ie,{button:t,isCompact:i,compactSize:n,useTableDropdown:o}),ne=({containerRef:t,leftSection:i,middleSection:o,buttons:n,sidebarConfig:e,isHaveSomeFeatureInSidebar:c=!1,collapsedDropdownProps:h,selectedCount:l,show:a,useTableDropdown:s=!1,enableDebugLogs:r=!1,bottom:w=16,minPadding:f=16,size:u})=>{const{down:C}=xt.useBreakpoint(),A=u?u==="xs":C("xl"),I=u?"xxs":"xs",[B,N]=p.useState(!1),z=p.useRef(null),J=p.useRef(null),y=p.useRef(null),_=p.useRef([]),S=p.useRef(null),q=p.useRef(null),k=p.useRef(null),$=p.useRef(null),[R,U]=p.useState((n==null?void 0:n.length)??0),[tt,ot]=p.useState(void 0),[at,ct]=p.useState(!1),{containerWidth:T,getContainerWidth:P}=Ft(t),et=bt(l),v=a!==void 0?a:et,{calculatePosition:O,calculatePositionForState:j,shouldApplySidebarOffsetRef:V}=Zt({containerRef:z,collapseButtonRef:q,leftSectionRef:k,getContainerWidth:P,isHaveSomeFeatureInSidebar:c,sidebarConfig:e,visibleButtonsCount:R,setTranslateX:ot,minPadding:f}),{calculateCompression:G,measuredButtonWidthsRef:nt}=Jt({isCollapsed:B,containerRef:z,contentRef:J,middleSectionRef:y,buttonRefs:_,moreButtonRef:S,collapseButtonRef:q,leftSectionRef:k,dividerRef:$,buttons:n,isHaveSomeFeatureInSidebar:c,getContainerWidth:P,setVisibleButtonsCount:U,enableDebugLogs:r,minPadding:f,leftPadding:Q.left,rightPadding:Q.right,moreButtonWidthEstimate:A?32:Nt}),{isSidebarOpen:st,wasAutoCollapsedRef:H}=Qt({isCollapsed:B,setIsCollapsed:N,calculatePositionForState:j,calculatePosition:O,setTranslateX:ot,shouldApplySidebarOffsetRef:V,sidebarConfig:e,getContainerWidth:P}),{handleToggleCollapse:dt}=Yt({isCollapsed:B,setIsCollapsed:N,isSidebarOpen:st,calculatePositionForState:j,calculatePosition:O,setTranslateX:ot,shouldApplySidebarOffsetRef:V,wasAutoCollapsedRef:H}),{visibleButtons:X,buttonsInDropdown:pt,allButtons:rt}=Xt({buttons:n,visibleButtonsCount:R});if(p.useEffect(()=>{const W=setTimeout(()=>ct(!0),Ut);return()=>clearTimeout(W)},[]),Kt({containerRef:z,buttonRefs:_,buttons:n,isVisible:v,isCollapsed:B,visibleButtonsCount:R,selectedCount:l,setIsCollapsed:N,setVisibleButtonsCount:U,calculatePosition:O,calculateCompression:G,measuredButtonWidthsRef:nt,containerWidth:T}),!v)return null;const ut=!B&&((n==null?void 0:n.length)??0)>0;return g.jsx(de,{ref:z,$isCollapsed:B,$size:u,$translateX:tt,$isInitialCalculationComplete:at,$bottom:w,children:g.jsxs(ue,{ref:J,$isCollapsed:B,$isCompact:A,children:[g.jsx(pe,{children:rt.map((W,x)=>{const E=W.key??`${W.text}${x}`;return g.jsx(fe,{ref:D=>{_.current[x]=D},children:$t(W,A,s,I)},`measure-${E}`)})}),g.jsx("div",{ref:k,children:i}),g.jsxs(he,{$isCollapsed:B,children:[o&&g.jsx("div",{ref:y,children:o}),ut&&g.jsx("div",{ref:$,children:g.jsx(me,{orientation:"vertical",length:"16px"})}),pt.length>0&&g.jsx("div",{ref:W=>{S.current=W},children:g.jsx(Ee,{buttons:pt,useTableDropdown:s,dropdownProps:{placement:"top",...h},triggerSlot:g.jsx(b.IconButton,{view:"secondary",size:A?I:"s",contentLeft:g.jsx(Rt.IconDotsVerticalCenteredOutline,{size:A?"xs":"s"})})})}),X.map((W,x)=>{const E=W.key??`${W.text}${x}`,D=g.jsx(ge,{children:$t(W,A,s,I)},E);return W.disabled&&W.disabledTooltipProps?g.jsx(b.Tooltip,{trigger:"hover",...W.disabledTooltipProps,children:D},E):D})]}),g.jsx("div",{ref:q,children:g.jsx(we,{size:A?"s":"m",$isCollapsed:B,$isCompact:A,onClick:dt,children:g.jsx(xe,{size:A?"xs":"s",$isCollapsed:B})})})]})})};ne.Counter=ee;exports.ACTION_BUTTON_WIDTH_ESTIMATE=gt;exports.ANIMATION_COMPLETE_DELAY=Tt;exports.ANIMATION_DURATION=oe;exports.COLLAPSE_BUTTON_WIDTH=ht;exports.COMPRESSION_CALCULATION_DELAY=Gt;exports.CONTAINER_PADDING_HORIZONTAL=ie;exports.COUNTER_WIDTH_ESTIMATE=vt;exports.DELAY_BEFORE_SHOW_PANEL=Ut;exports.ELEMENTS_GAP=L;exports.INITIAL_POSITION_CALCULATION_DELAY=Ht;exports.MIN_PANEL_PADDING=Et;exports.MORE_BUTTON_WIDTH_ESTIMATE=Nt;exports.MassActions=ne;exports.MassActionsButton=Ot;exports.MassActionsCounter=ee;exports.PANEL_PADDING_COLLAPSED=Bt;exports.PANEL_PADDING_EXPANDED=Q;exports.RESET_BUTTON_WIDTH_ESTIMATE=qt;exports.TOGGLE_SIDEBAR_PANEL_WIDTH=wt;exports.useMassActionsButtons=Xt;exports.useMassActionsCollapse=Yt;exports.useMassActionsCompression=Jt;exports.useMassActionsContainer=Ft;exports.useMassActionsEffects=Kt;exports.useMassActionsPosition=Zt;exports.useMassActionsSidebar=Qt;exports.useMassActionsVisibility=bt;
|
|
1
|
+
"use strict";const g=require("react/jsx-runtime"),b=require("@salutejs/sdds-finai"),Rt=require("@salutejs/plasma-icons"),xt=require("./utils-ChDQGRjv.cjs"),p=require("react"),Wt=require("./Table-CdaMPDkg.cjs"),Vt=require("../constants/index.cjs"),Ct=require("@salutejs/sdds-themes/tokens/sdds_finai"),M=require("styled-components"),jt=require("../components/Box/index.cjs"),se=require("../components/Collapse/index.cjs"),Pt=require("./AnalyticalWidget-YytE3Rlw.cjs"),ht=24,L=4,wt=44,Nt=40,Et=24,Q={top:12,right:8,bottom:12,left:24},Bt={top:0,right:10,bottom:0,left:24},ie=Q.left+Q.right,vt=90,qt=110,gt=100,oe=300,Tt=550,Ut=350,Gt=50,Ht=100,Xt=({buttons:t,visibleButtonsCount:i})=>{const{visibleButtons:o,buttonsInDropdown:n}=p.useMemo(()=>{const e=t??[],c=new Set,h=[];e.forEach((f,u)=>{f.view==="accent"?c.add(u):h.push(u)});const l=c.size,a=Math.max(0,i-l),s=new Set(h.slice(0,a)),r=[],w=[];return e.forEach((f,u)=>{c.has(u)||s.has(u)?r.push(f):w.push(f)}),{visibleButtons:r,buttonsInDropdown:w}},[t,i]);return{visibleButtons:o,buttonsInDropdown:n,allButtons:t??[]}},Yt=({isCollapsed:t,setIsCollapsed:i,isSidebarOpen:o,calculatePositionForState:n,calculatePosition:e,setTranslateX:c,shouldApplySidebarOffsetRef:h,wasAutoCollapsedRef:l})=>({handleToggleCollapse:p.useCallback(()=>{const s=!t,r=n(s);r!==void 0&&c(r),o&&(s?h.current=!0:(h.current=!1,l.current=!1)),i(s),setTimeout(()=>{e()},Tt)},[t,o,n,e,c,h,l,i])}),Jt=({isCollapsed:t,containerRef:i,contentRef:o,middleSectionRef:n,buttonRefs:e,moreButtonRef:c,collapseButtonRef:h,leftSectionRef:l,dividerRef:a,buttons:s,isHaveSomeFeatureInSidebar:r,getContainerWidth:w,setVisibleButtonsCount:f,minPadding:u=Et,leftPadding:C=Q.left,rightPadding:A=Q.right,moreButtonWidthEstimate:I=Nt,enableDebugLogs:B=!1})=>{const N=p.useRef([]),z=p.useCallback(()=>{var dt,X,pt,rt,ut,W;const y=w();if(!y||y===0||!s||s.length===0)return B&&console.debug("❌ calculateInitialCompression: нет tableWidth или buttons"),!1;if(!s.every((x,E)=>e.current[E]!==null&&e.current[E]!==void 0))return B&&console.debug("❌ calculateInitialCompression: ref'ы еще не установлены",{buttonsCount:s.length,refsCount:e.current.filter(Boolean).length,refs:e.current.map((x,E)=>({index:E,hasRef:!!x}))}),!1;const S=y-(r?wt:0),q=((dt=l==null?void 0:l.current)==null?void 0:dt.getBoundingClientRect().width)??0,k=((X=n.current)==null?void 0:X.getBoundingClientRect().width)??0,$=s.length>0,R=$?((pt=a==null?void 0:a.current)==null?void 0:pt.getBoundingClientRect().width)??0:0,U=$?L:0,tt=$&&k>0?L:0,ot=R+tt+U,at=L*2,ct=q+k+ot+(((rt=h.current)==null?void 0:rt.getBoundingClientRect().width)??ht)+(C+A)+at,T=[];let P=!0;for(let x=0;x<s.length;x+=1){const E=e.current[x];if(!E){P=!1;break}const F=E.querySelector("button, a")||E;if(!F||!F.isConnected){P=!1;break}const ft=F.getBoundingClientRect(),lt=ft.width||F.offsetWidth||F.scrollWidth||F.clientWidth;if(lt>0)T.push(lt),N.current[x]=lt;else{console.debug("❌ calculateInitialCompression: кнопка не отрендерилась",{index:x,text:(ut=s[x])==null?void 0:ut.text,width:lt,isConnected:F.isConnected,rect:ft}),P=!1;break}}if(!P||T.length!==s.length)return B&&console.debug("❌ calculateInitialCompression: не все кнопки измерены",{allButtonsMeasured:P,buttonWidthsLength:T.length,buttonsLength:s.length}),!1;const et=((W=c.current)==null?void 0:W.getBoundingClientRect().width)??I,v=S-u*2,O=[],j=[];s.forEach((x,E)=>{if(T[E]===void 0)return;(x==null?void 0:x.view)==="accent"?O.push(E):j.push(E)});let V=0;O.forEach(x=>{const E=T[x];E!==void 0&&(V+=E)});const G=new Set(O);let nt=V,st=0;for(let x=0;x<j.length;x+=1){const E=j[x],D=typeof E<"u"?T[E]:0;if(D===void 0)continue;const ft=x<j.length-1?et+L:0,mt=(G.size+1-1)*L,At=nt+D+mt+ft;if(ct+At<=v)nt+=D,st+=1,typeof E<"u"&&G.add(E);else break}const H=G.size;return f(H),console.debug("✅ calculateInitialCompression: успешно выполнено",{buttonWidths:T,visibleCount:H,accentCount:O.length,regularVisibleCount:st}),!0},[s,w,r,f,e,l,n,c,h,a,B,u,C,A,I]);return{calculateCompression:p.useCallback(()=>{t||!i.current||!o.current||requestAnimationFrame(()=>{setTimeout(()=>{var lt,mt,At,It,Mt,St,Dt;const y=w();if(!y||y===0)return;const _=y-(r?wt:0);B&&(console.group("🔧 MassActions Compression"),console.debug("📏 Размеры контейнера:",JSON.stringify({tableWidth:y,isHaveSomeFeatureInSidebar:r,togglePanelWidth:r?wt:0,availableWidth:_,minPaddingRequired:u*2,maxPanelWidthAllowed:_-u*2},null,2)));const S=((lt=l==null?void 0:l.current)==null?void 0:lt.getBoundingClientRect().width)??0,q=((mt=n.current)==null?void 0:mt.getBoundingClientRect().width)??0,k=((s==null?void 0:s.length)??0)>0,$=k?((At=a==null?void 0:a.current)==null?void 0:At.getBoundingClientRect().width)??0:0,R=k?L:0,U=k&&q>0?L:0,tt=$+U+R;let ot=null;if(l!=null&&l.current){const d=l.current.getBoundingClientRect(),{children:m}=l.current,K=[];for(let Y=0;Y<m.length;Y+=1){const Z=m[Y];if(Z){const it=Z.getBoundingClientRect();K.push({tagName:Z.tagName,className:Z.className,width:it.width,height:it.height})}}ot={width:d.width,height:d.height,children:K,childrenTotalWidth:K.reduce((Y,Z)=>Y+Z.width,0)}}const at=L*2,ct=S+q+tt+(((It=h.current)==null?void 0:It.getBoundingClientRect().width)??ht)+(C+A)+at;B&&console.debug("🔲 Фиксированные элементы:",JSON.stringify({leftSectionWidth:S,leftSectionDetails:ot,middleSectionWidth:q,divider:{shouldShow:k,wrapperWidth:$,gapLeft:U,gapRight:R,totalWidth:tt},collapseButtonWidth:((Mt=h.current)==null?void 0:Mt.getBoundingClientRect().width)??ht,containerPadding:C+A,gapsBetweenFixedElements:at,fixedElementsTotal:ct},null,2));const T=[];let P=!0;for(let d=0;d<((s==null?void 0:s.length)??0);d+=1){const m=e.current[d];if(m){const Y=m.querySelector("button, a")||m,it=Y.getBoundingClientRect().width||Y.offsetWidth||Y.scrollWidth||Y.clientWidth;it>0?(T.push(it),N.current[d]=it):N.current[d]!==void 0?T.push(N.current[d]??gt):(P=!1,T.push(gt))}else N.current[d]!==void 0?T.push(N.current[d]??gt):(P=!1,T.push(gt))}if(!P&&T.length===0&&((s==null?void 0:s.length)??0)>0)return;const et=((St=c.current)==null?void 0:St.getBoundingClientRect().width)??I,v=_-u*2,O=i.current?i.current.getBoundingClientRect().width:0;B&&(console.debug("🎯 Ограничения и текущее состояние:",JSON.stringify({targetContainer:{tableWidth:y,availableWidth:_,minPaddingEach:u,minPaddingTotal:u*2,maxPanelWidth:v},currentPanel:{width:O,exceedsMax:O>v,exceedsAvailable:O>_,leftPadding:u,rightPadding:u},moreButtonWidth:et},null,2)),console.debug("🔘 Ширины кнопок:",JSON.stringify({buttons:s==null?void 0:s.map((d,m)=>({index:m,text:d.text,view:d.view,isAccent:d.view==="accent",width:T[m]})),totalButtonsWidth:T.reduce((d,m)=>d+m,0),averageButtonWidth:T.length>0?T.reduce((d,m)=>d+m,0)/T.length:0},null,2)));const j=s??[],V=[],G=[];j.forEach((d,m)=>{if(T[m]===void 0)return;(d==null?void 0:d.view)==="accent"?V.push(m):G.push(m)}),B&&console.debug("🎨 Распределение:",{accentCount:V.length,regularCount:G.length,accentButtons:V.map(d=>{var m;return{index:d,text:(m=j[d])==null?void 0:m.text,width:T[d]}})});let nt=0;V.forEach(d=>{const m=T[d];m!==void 0&&(nt+=m)});const st=new Set(V);let H=nt,dt=0;for(let d=0;d<G.length;d+=1){const m=G[d],K=typeof m<"u"?T[m]:0;if(K===void 0)continue;const Z=d<G.length-1?et+L:0,it=st.size+1,Lt=(it-1)*L,kt=H+K+Lt+Z,_t=ct+kt,yt=_t+3;if(B&&console.debug(` 🔍 Проверка кнопки ${d}:`,{text:typeof m<"u"?(Dt=j[m])==null?void 0:Dt.text:"",width:K,totalButtonsWidthBefore:H,visibleCountAfter:it,gapsBetweenButtons:Lt,moreButtonSpace:Z,requiredWidth:kt,testPanelWidth:_t,testWithBuffer:yt,maxPanelWidth:v,fits:_t<=v,fitsWithBuffer:yt<=v}),yt<=v)H+=K,dt+=1,typeof m<"u"&&st.add(m);else break}const X=st.size,rt=j.length-X>0,ut=X>0?(X-1)*L:0,W=H+ut+(rt?et+L:0),x=ct+W,E=[],D=[];j.forEach((d,m)=>{st.has(m)?E.push(d):D.push(d)});const F=X,ft={fixedElements:{leftSection:S,middleSection:q,divider:tt,collapseButton:ht,containerPadding:C+A,gapsBetweenFixedElements:at,total:ct},buttons:{accentButtonsWidth:nt,visibleRegularButtonsWidth:H-nt,totalButtonsWidth:H,gapsBetweenVisibleButtons:ut,buttonsAreaWidth:W,visibleButtonsCount:X,hiddenButtonsCount:D.length},moreButton:rt?{width:et,gap:L,total:et+L}:null,final:{calculatedWidth:x,actualPanelWidth:O,widthDifference:O-x,maxAllowedWidth:v,availableWidth:_,fits:x<=v,actualFits:O<=v,exceedsBy:x>v?x-v:0,actualExceedsBy:O>v?O-v:0,leftPaddingRequired:u,rightPaddingRequired:u,totalPaddingRequired:u*2}};B&&(console.debug("✅ Результат компрессии:",JSON.stringify({summary:{totalButtons:j.length,accentCount:V.length,visibleRegularCount:dt,visibleCount:F,hiddenCount:D.length,finalPanelWidth:x,maxPanelWidth:v,fits:x<=v,hasMoreButton:rt},breakdown:ft},null,2)),console.debug("👁️ Видимые кнопки:",{buttons:E.map(d=>({text:d.text,view:d.view,isAccent:d.view==="accent"}))}),console.debug("📦 Кнопки в dropdown:",{buttons:D.map(d=>({text:d.text,view:d.view}))}),console.groupEnd()),f(X)},Gt)})},[t,i,o,w,r,B,l,n,s,a,c,h,u,C,A,I,f,e]),calculateInitialCompression:z,measuredButtonWidthsRef:N}},Ft=t=>{const[i,o]=p.useState(0),n=p.useCallback(()=>typeof t=="function"?t():t.current,[t]),e=p.useCallback(()=>{const c=n();return c?c.getBoundingClientRect().width:0},[n]);return p.useEffect(()=>{const c=n();if(!c)return;o(c.getBoundingClientRect().width);const h=xt.createSafeResizeObserver(l=>{for(const a of l){const{width:s}=a.contentRect;o(s)}});return h.observe(c),()=>{h.disconnect()}},[n]),{containerWidth:i,getContainerWidth:e,getContainer:n}},Kt=({containerRef:t,buttonRefs:i,buttons:o,isVisible:n,isCollapsed:e,visibleButtonsCount:c,selectedCount:h,setIsCollapsed:l,setVisibleButtonsCount:a,calculatePosition:s,calculateCompression:r,measuredButtonWidthsRef:w,containerWidth:f})=>{p.useEffect(()=>{f>0&&(s(),r())},[f,s,r]),p.useLayoutEffect(()=>{if(!t.current)return;const u=xt.createSafeResizeObserver(()=>{s()});return u.observe(t.current),()=>{u.disconnect()}},[s,t]),p.useEffect(()=>{i.current=Array((o==null?void 0:o.length)??0).fill(null),a((o==null?void 0:o.length)??0),w.current=[]},[o==null?void 0:o.length,i,a,w]),p.useEffect(()=>{if(n&&!e){const u=setTimeout(()=>{r(),s()},Ht);return()=>{clearTimeout(u)}}},[n,e,r,s]),p.useEffect(()=>{if(e){s();return}s()},[e,c,s]),p.useEffect(()=>()=>{(!n||h===0)&&l(!1)},[n,h,l])},Zt=({containerRef:t,collapseButtonRef:i,leftSectionRef:o,getContainerWidth:n,isHaveSomeFeatureInSidebar:e,sidebarConfig:c,visibleButtonsCount:h,setTranslateX:l,minPadding:a=Et,enableDebugLogs:s=!1})=>{const r=(c==null?void 0:c.isOpen)??!1,w=(c==null?void 0:c.width)??0,f=(c==null?void 0:c.togglePanelWidth)??wt,u=p.useRef(!1),C=p.useCallback(I=>{var k,$;const B=n();if(!B||B===0)return;const N=w+f,z=r?N/2:0,J=e?f/2:0;let y=-(z+J),_;if(I){const R=((k=o==null?void 0:o.current)==null?void 0:k.getBoundingClientRect().width)??vt,U=(($=i.current)==null?void 0:$.getBoundingClientRect().width)??ht,tt=Bt.top+Bt.right+Bt.left;_=R+U+tt}else if(t.current)_=t.current.getBoundingClientRect().width;else{const R=h*gt,U=Q.top+Q.right+Q.left;_=vt+qt+ht+R+U}const S=B/2;return S-_/2+y<a&&(y=a-(S-_/2)),y},[n,t,i,o,e,r,w,f,h,a]);return{calculatePosition:p.useCallback(()=>{const I=n();if(!I||I===0||!t.current)return;s&&console.group("📍 MassActions Position");const B=w+f,N=r?B/2:0,z=e?f/2:0;let J=-(N+z);const y=t.current.getBoundingClientRect().width,_=I/2,S=_-y/2+J;S<a&&(J=a-(_-y/2)),s&&(console.log("🎯 Позиционирование:",JSON.stringify({tableWidth:I,panelWidth:y,tableCenter:_,sidebarWidth:w,toggleSidebarPanelWidth:f,isSidebarOpen:r,isHaveSomeFeatureInSidebar:e,totalSidebarWidth:B,sidebarOffset:N,togglePanelOffset:z,idealTranslateX:-(N+z),leftEdgePosition:S,minPadding:a,finalTranslateX:J,adjusted:S<Et},null,2)),console.groupEnd()),l(J),r?u.current=!0:u.current=!1},[n,t,s,w,f,e,r,l,a]),calculatePositionForState:C,shouldApplySidebarOffsetRef:u}},Qt=({isCollapsed:t,setIsCollapsed:i,calculatePositionForState:o,calculatePosition:n,setTranslateX:e,shouldApplySidebarOffsetRef:c,sidebarConfig:h,getContainerWidth:l})=>{const a=(h==null?void 0:h.isOpen)??!1,s=(h==null?void 0:h.width)??0,r=p.useRef(!1),w=p.useRef(a);return p.useEffect(()=>{if(!h)return;const u=w.current!==a;if(w.current=a,!u){n();return}if(a)if(t)n();else{r.current=!0;const C=o(!0);C!==void 0&&(e(C),c.current=!0),i(!0),setTimeout(()=>{n()},Tt)}else if(t){r.current=!1,c.current=!1;const C=o(!1);C!==void 0&&e(C),i(!1),setTimeout(()=>{n()},Tt)}else c.current=!1,n()},[a,s,l]),{isSidebarOpen:a,sidebarWidth:s,wasAutoCollapsedRef:r}},bt=t=>{const i=p.useRef(t),[o,n]=p.useState(t>0);return p.useEffect(()=>{var l;const e=i.current,c=e===0&&t>0,h=e>0&&t===0;if(c||h){const a=()=>{n(t>0)};document.startViewTransition?(l=document.startViewTransition)==null||l.call(document,a):a()}else n(t>0);i.current=t},[t]),o},ce="mass-actions-panel",zt={surfaceSolidCard:()=>Ct.surfaceSolidCard,outlineSolidPrimary:()=>Ct.outlineSolidPrimary},re=M(b.LinkButton).withConfig({displayName:"styled__StyledLinkButton"})({paddingInline:Vt.s.x8}),te=t=>M(t).withConfig({displayName:"styled__getButtonWithDropdown"})([""," ",""],({$hasDropdown:i})=>i&&M.css(["& > div > span:last-child{max-width:fit-content;min-width:unset;}"]),({$buttonStyles:i})=>i&&M.css(["",""],i)),le=te(b.Button),ae=te(re),de=M.div.withConfig({displayName:"styled__MassActionsContainer"})(["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:",";"],({$bottom:t=24})=>t,({$translateX:t})=>t!==void 0?`translateX(calc(-50% + ${t}px))`:"translateX(-50%)",zt.surfaceSolidCard,zt.outlineSolidPrimary,({$isCollapsed:t,$size:i})=>{const o=i==="xs";return t?o?"0px 2px 0px 12px":"0px 10px 0px 24px":o?"4px 2px 4px 12px":"12px 8px 12px 24px"},({$isCollapsed:t})=>t?"350":"2000px",ce,({$isInitialCalculationComplete:t})=>t?1:0,Ct.shadowDownHardS),ue=M.div.withConfig({displayName:"styled__MassActionsContent"})(["display:flex;align-items:center;gap:",";"],({$isCollapsed:t,$isCompact:i})=>t?i?"4px":"8px":"0px"),he=M.div.withConfig({displayName:"styled__ActionsWrapper"})(["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);",""],({$isCollapsed:t})=>t?"0":"40px",({$isCollapsed:t})=>t?M.css(["opacity:0;max-width:0;margin:0;gap:0;"]):M.css(["opacity:1;max-width:2000px;"])),pe=M.div.withConfig({displayName:"styled__HiddenButtonsMeasurementContainer"})(["position:absolute;left:-9999px;top:0;display:flex;gap:4px;align-items:center;z-index:-1;pointer-events:none;width:auto;height:auto;"]),fe=M.div.withConfig({displayName:"styled__ButtonMeasurementWrapper"})(["display:inline-flex;width:auto;height:auto;"]),ge=M.div.withConfig({displayName:"styled__VisibleButtonWrapper"})(["margin-left:0;"]),xe=M(Rt.IconDoubleDisclosureUp).withConfig({displayName:"styled__CollapseIcon"})(["transition:all 0.3s;transform:",";"],({$isCollapsed:t})=>t?"scaleY(1)":"scaleY(-1)"),we=M(b.EmbedIconButton).withConfig({displayName:"styled__CollapseButton"})(["padding:",";"],({$isCompact:t})=>t?Vt.s.x8:Ct.spacing10x);M(b.Button).withConfig({displayName:"styled__MoreButton"})(["margin-left:0;"]);const me=M(b.Divider).withConfig({displayName:"styled__StyledDivider"})(["padding-left:1px;margin-left:12px;margin-right:8px;"]),Ae=t=>{if(typeof t=="string"&&t.startsWith("link")){const i=t.slice(4);return i.charAt(0).toLowerCase()+i.slice(1)}return t??"default"},Be={size:"s",view:"linkDefault"},Ot=({type:t,view:i,showLabel:o,text:n,buttonStyles:e,dropdown:c,useTableDropdown:h=!1,...l})=>{const a=t??"linkButton",{view:s,...r}=Be,w=i??s,f=o?n:void 0,u=!!c;let C;if(a==="button"){const A=l,I=A.text??f;C=g.jsx(le,{...r,...A,view:w,text:I,$hasDropdown:u,$showLabel:o,$buttonStyles:e})}else{const A=String(w??"linkDefault"),B=A.startsWith("link")?Ae(A):A;C=g.jsx(ae,{...r,...l,view:B,text:f,$hasDropdown:u,$showLabel:o,$buttonStyles:e})}if(c&&c.items&&c.items.length>0)if(h)C=g.jsx(Wt.TableDropdown,{...c,children:C});else{const{$css:A,...I}=c;C=g.jsx(b.Dropdown,{...I,children:C})}return C},ee=({selectedCount:t,label:i="Выбрано",showCheckbox:o=!1,checked:n=!1,onCheckboxChange:e,className:c,indeterminate:h})=>{const{down:l}=xt.useBreakpoint(),a=l("xl"),s=t>0,r=a?"BodyXS":"BodyS",w=(()=>{if(t===0)return"0px";const u=t.toString().length;return`${Math.max(16,7.1+u*6.1)+4}px`})(),f=o?g.jsxs(jt.Box,{$css:{display:"flex",alignItems:"center",gap:"4px"},children:[g.jsx(b.Checkbox,{checked:n,indeterminate:h,onChange:e,size:"m"}),g.jsx(Pt.Typography,{variant:r,children:i})]}):g.jsx(Pt.Typography,{variant:r,children:i});return g.jsxs(jt.Box,{className:c,$css:{display:"flex",alignItems:"center"},children:[f,g.jsx(se.Collapse,{duration:.3,orientation:"horizontal",isOpen:s,unMountOnClose:!0,sizeOnOpen:w,extContainerCss:{overflow:"visible",display:"flex",justifyContent:"flex-end"},intContainerCss:{always:{opacity:"0",transition:".3s ease"},onOpen:{opacity:1}},children:s&&g.jsx(Wt.AnimatedCounter,{className:"counter",count:t,size:"xs",view:"accent",style:{marginBottom:"3px"}},t)})]})},Ce=(t=[])=>p.useMemo(()=>{const i=[],o={},n=new Map;return t.forEach(e=>{var c,h;if(e.dropdown){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;s&&n.set(l.toString(),s);const[r,w]=xt.processDropdownItems(a,s);w.forEach((f,u)=>n.set(u,f)),(c=e.dropdown)!=null&&c.$css&&Object.assign(o,(h=e.dropdown)==null?void 0:h.$css),i.push({label:e.text??"",value:l,contentLeft:e.contentLeft,items:r,className:e.className,disabled:e.disabled})}else{const l=e.key||e.text||`btn-${Date.now()}`,a={label:e.text||"Кнопка",value:l.toString(),disabled:e.disabled,contentLeft:e.contentLeft};e.onClick&&n.set(l.toString(),(s,r)=>{var f;const w={...r,nativeEvent:r.nativeEvent,preventDefault:r.preventDefault,stopPropagation:r.stopPropagation,target:r.target,currentTarget:r.currentTarget};(f=e.onClick)==null||f.call(e,w)}),i.push(a)}}),{dropdownItems:i,handlerMap:n,$summaryCSS:o}},[t]),Ee=({buttons:t=[],dividerIndexes:i=[],triggerSlot:o,dropdownProps:n,useTableDropdown:e=!1})=>{const{dropdownItems:c,handlerMap:h,$summaryCSS:l}=Ce(t),a=xt.useDropdownItemClickHandler(h),[s,r]=p.useState(!1),w=c.map((A,I)=>(i.includes(I)&&(A.dividerAfter=!0),A)),f={closeOnSelect:!0,...n,onItemSelect:a,items:w,onToggle:A=>r(A),portal:"document",view:(n==null?void 0:n.view)||"default"},{portal:u,...C}=f;return e?g.jsx(Wt.TableDropdown,{$css:l,...C,children:o}):g.jsx(b.Dropdown,{...f,children:o})},Te=({button:t,isCompact:i,compactSize:o="xs",useTableDropdown:n=!1})=>{const e=t.size??(i?o:"s");return g.jsx(Ot,{...t,size:e,showLabel:!0,useTableDropdown:n})},Ie=({button:t,isCompact:i,compactSize:o="xs",useTableDropdown:n=!1})=>{const e=t.size??(i?o:"s");return g.jsx(Ot,{...t,size:e,showLabel:!0,useTableDropdown:n})},$t=(t,i,o=!1,n="xs")=>t.type==="button"?g.jsx(Te,{button:t,isCompact:i,compactSize:n,useTableDropdown:o}):g.jsx(Ie,{button:t,isCompact:i,compactSize:n,useTableDropdown:o}),ne=({containerRef:t,leftSection:i,middleSection:o,buttons:n,sidebarConfig:e,isHaveSomeFeatureInSidebar:c=!1,collapsedDropdownProps:h,selectedCount:l,show:a,useTableDropdown:s=!1,enableDebugLogs:r=!1,bottom:w=16,minPadding:f=16,size:u})=>{const{down:C}=xt.useBreakpoint(),A=u?u==="xs":C("xl"),I=u?"xxs":"xs",[B,N]=p.useState(!1),z=p.useRef(null),J=p.useRef(null),y=p.useRef(null),_=p.useRef([]),S=p.useRef(null),q=p.useRef(null),k=p.useRef(null),$=p.useRef(null),[R,U]=p.useState((n==null?void 0:n.length)??0),[tt,ot]=p.useState(void 0),[at,ct]=p.useState(!1),{containerWidth:T,getContainerWidth:P}=Ft(t),et=bt(l),v=a!==void 0?a:et,{calculatePosition:O,calculatePositionForState:j,shouldApplySidebarOffsetRef:V}=Zt({containerRef:z,collapseButtonRef:q,leftSectionRef:k,getContainerWidth:P,isHaveSomeFeatureInSidebar:c,sidebarConfig:e,visibleButtonsCount:R,setTranslateX:ot,minPadding:f}),{calculateCompression:G,measuredButtonWidthsRef:nt}=Jt({isCollapsed:B,containerRef:z,contentRef:J,middleSectionRef:y,buttonRefs:_,moreButtonRef:S,collapseButtonRef:q,leftSectionRef:k,dividerRef:$,buttons:n,isHaveSomeFeatureInSidebar:c,getContainerWidth:P,setVisibleButtonsCount:U,enableDebugLogs:r,minPadding:f,leftPadding:Q.left,rightPadding:Q.right,moreButtonWidthEstimate:A?32:Nt}),{isSidebarOpen:st,wasAutoCollapsedRef:H}=Qt({isCollapsed:B,setIsCollapsed:N,calculatePositionForState:j,calculatePosition:O,setTranslateX:ot,shouldApplySidebarOffsetRef:V,sidebarConfig:e,getContainerWidth:P}),{handleToggleCollapse:dt}=Yt({isCollapsed:B,setIsCollapsed:N,isSidebarOpen:st,calculatePositionForState:j,calculatePosition:O,setTranslateX:ot,shouldApplySidebarOffsetRef:V,wasAutoCollapsedRef:H}),{visibleButtons:X,buttonsInDropdown:pt,allButtons:rt}=Xt({buttons:n,visibleButtonsCount:R});if(p.useEffect(()=>{const W=setTimeout(()=>ct(!0),Ut);return()=>clearTimeout(W)},[]),Kt({containerRef:z,buttonRefs:_,buttons:n,isVisible:v,isCollapsed:B,visibleButtonsCount:R,selectedCount:l,setIsCollapsed:N,setVisibleButtonsCount:U,calculatePosition:O,calculateCompression:G,measuredButtonWidthsRef:nt,containerWidth:T}),!v)return null;const ut=!B&&((n==null?void 0:n.length)??0)>0;return g.jsx(de,{ref:z,$isCollapsed:B,$size:u,$translateX:tt,$isInitialCalculationComplete:at,$bottom:w,children:g.jsxs(ue,{ref:J,$isCollapsed:B,$isCompact:A,children:[g.jsx(pe,{children:rt.map((W,x)=>{const E=W.key??`${W.text}${x}`;return g.jsx(fe,{ref:D=>{_.current[x]=D},children:$t(W,A,s,I)},`measure-${E}`)})}),g.jsx("div",{ref:k,children:i}),g.jsxs(he,{$isCollapsed:B,children:[o&&g.jsx("div",{ref:y,children:o}),ut&&g.jsx("div",{ref:$,children:g.jsx(me,{orientation:"vertical",length:"16px"})}),pt.length>0&&g.jsx("div",{ref:W=>{S.current=W},children:g.jsx(Ee,{buttons:pt,useTableDropdown:s,dropdownProps:{placement:"top",...h},triggerSlot:g.jsx(b.IconButton,{view:"secondary",size:A?I:"s",contentLeft:g.jsx(Rt.IconDotsVerticalCenteredOutline,{size:A?"xs":"s"})})})}),X.map((W,x)=>{const E=W.key??`${W.text}${x}`,D=g.jsx(ge,{children:$t(W,A,s,I)},E);return W.disabled&&W.disabledTooltipProps?g.jsx(b.Tooltip,{trigger:"hover",...W.disabledTooltipProps,children:D},E):D})]}),g.jsx("div",{ref:q,children:g.jsx(we,{size:A?"s":"m",$isCollapsed:B,$isCompact:A,onClick:dt,children:g.jsx(xe,{size:A?"xs":"s",$isCollapsed:B})})})]})})};ne.Counter=ee;exports.ACTION_BUTTON_WIDTH_ESTIMATE=gt;exports.ANIMATION_COMPLETE_DELAY=Tt;exports.ANIMATION_DURATION=oe;exports.COLLAPSE_BUTTON_WIDTH=ht;exports.COMPRESSION_CALCULATION_DELAY=Gt;exports.CONTAINER_PADDING_HORIZONTAL=ie;exports.COUNTER_WIDTH_ESTIMATE=vt;exports.DELAY_BEFORE_SHOW_PANEL=Ut;exports.ELEMENTS_GAP=L;exports.INITIAL_POSITION_CALCULATION_DELAY=Ht;exports.MIN_PANEL_PADDING=Et;exports.MORE_BUTTON_WIDTH_ESTIMATE=Nt;exports.MassActions=ne;exports.MassActionsButton=Ot;exports.MassActionsCounter=ee;exports.PANEL_PADDING_COLLAPSED=Bt;exports.PANEL_PADDING_EXPANDED=Q;exports.RESET_BUTTON_WIDTH_ESTIMATE=qt;exports.TOGGLE_SIDEBAR_PANEL_WIDTH=wt;exports.useMassActionsButtons=Xt;exports.useMassActionsCollapse=Yt;exports.useMassActionsCompression=Jt;exports.useMassActionsContainer=Ft;exports.useMassActionsEffects=Kt;exports.useMassActionsPosition=Zt;exports.useMassActionsSidebar=Qt;exports.useMassActionsVisibility=bt;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as B, jsxs as vt } from "react/jsx-runtime";
|
|
2
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
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-
|
|
4
|
+
import { c as Ut, d as qt, i as se, p as ie } from "./utils-u1KJ37g3.mjs";
|
|
5
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-
|
|
6
|
+
import { T as jt, A as ce } from "./Table-DYSssxRS.mjs";
|
|
7
7
|
import { s as Jt } from "../constants/index.mjs";
|
|
8
8
|
import { surfaceSolidCard as re, outlineSolidPrimary as le, shadowDownHardS as ae, spacing10x as de } from "@salutejs/sdds-themes/tokens/sdds_finai";
|
|
9
9
|
import U, { css as yt } from "styled-components";
|
|
10
10
|
import { Box as kt } from "../components/Box/index.mjs";
|
|
11
11
|
import { Collapse as ue } from "../components/Collapse/index.mjs";
|
|
12
|
-
import { T as zt } from "./AnalyticalWidget-
|
|
12
|
+
import { T as zt } from "./AnalyticalWidget-BtyWKJuu.mjs";
|
|
13
13
|
const mt = 24, k = 4, Ct = 44, Yt = 40, Tt = 24, it = {
|
|
14
14
|
top: 12,
|
|
15
15
|
right: 8,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";const u=require("@salutejs/sdds-finai"),e=require("react/jsx-runtime"),f=require("./AnalyticalWidget-YytE3Rlw.cjs"),w=require("@salutejs/plasma-icons"),$=require("@salutejs/sdds-themes/tokens/sdds_finai"),n=require("./utils-ChDQGRjv.cjs"),q=require("react"),o=require("../constants/index.cjs"),s=require("styled-components"),a="PageTitle__",l={root:`${a}root`,breadcrumbs:`${a}breadcrumbs`,content:`${a}content`,leftBlock:`${a}left-block`,titleBlock:`${a}title-block`,title:`${a}title`,subtitle:`${a}subtitle`,titleSlot:`${a}title-slot`,rightBlock:`${a}right-block`,backIconButton:`${a}back-icon-block`},R=s.div.attrs({className:l.root}).withConfig({displayName:"PageTitlestyled__StyledRoot"})(["width:100%;display:flex;flex-direction:column;gap:",";"],()=>o.s.x8),z=s.div.attrs({className:l.breadcrumbs}).withConfig({displayName:"PageTitlestyled__StyledBreadcrumbs"})([""]),I=s.div.attrs({className:l.content}).withConfig({displayName:"PageTitlestyled__StyledContent"})(["display:flex;justify-content:space-between;align-items:flex-start;gap:",";"],()=>o.s.x12),A=s.div.attrs({className:l.leftBlock}).withConfig({displayName:"PageTitlestyled__StyledLeftBlock"})(["display:flex;align-items:flex-start;gap:",";flex:1;min-width:0;"],()=>o.s.x8),L=s.div.attrs({className:l.titleBlock}).withConfig({displayName:"PageTitlestyled__StyledTitleBlock"})(["display:flex;flex-direction:column;gap:",";flex-shrink:1;min-width:0;"],()=>o.s.x2),W=s.div.attrs({className:l.backIconButton}).withConfig({displayName:"PageTitlestyled__StyledBackButtonContainer"})(["margin-top:4px;",""],({$isAdaptive1280:t})=>t&&s.css([""," ",""],n.media.exact(960,1280)`
|
|
2
|
+
margin-top: 2px;
|
|
3
|
+
`,n.media.exact(0,959)`
|
|
4
|
+
margin-top: 0;
|
|
5
|
+
`)),H=s.div.attrs({className:l.title}).withConfig({displayName:"PageTitlestyled__StyledTitle"})([""]),E=s.div.attrs({className:l.subtitle}).withConfig({displayName:"PageTitlestyled__StyledSubtitle"})([""]),F=s.div.attrs({className:l.titleSlot}).withConfig({displayName:"PageTitlestyled__StyledTitleSlot"})(["margin-top:4px;",""],({$isAdaptive1280:t})=>t&&s.css([""," ",""],n.media.exact(960,1280)`
|
|
6
|
+
margin-top: 3px;
|
|
7
|
+
`,n.media.exact(0,959)`
|
|
8
|
+
margin-top: 2px;
|
|
9
|
+
`)),D=s.div.attrs({className:l.rightBlock}).withConfig({displayName:"PageTitlestyled__StyledRightBlock"})(["display:flex;align-items:flex-end;flex-shrink:0;align-self:flex-end;"]),S=t=>({buttonSize:t?"xs":"s"}),d=(t,i)=>typeof t=="function"?t(i):t,G=({isAdaptive1280:t,...i})=>e.jsx(W,{$isAdaptive1280:t,children:e.jsx(u.IconButton,{size:"xs",view:"secondary",className:l.backIconButton,pin:"circle-circle",...i,children:e.jsx(w.IconChevronLeft,{size:"xs",color:"inherit"})})}),J=({breadcrumbs:t})=>{if(!t)return null;const i={size:"m",...t};return e.jsx(z,{children:e.jsx(u.Breadcrumbs,{...i})})},K=({title:t,titleTypographyProps:i})=>t?e.jsx(H,{children:e.jsx(f.TypographyWithAutoTooltip,{variant:"H2",bold:!0,tooltipText:(i&&"tooltipText"in i?i.tooltipText:void 0)??t,...i,children:t})}):null,M=({subtitle:t,subtitleTypographyProps:i})=>t?e.jsx(E,{children:e.jsx(f.TypographyWithAutoTooltip,{variant:"BodyS",color:$.textSecondary,tooltipText:(i&&"tooltipText"in i?i.tooltipText:void 0)??t,...i,children:t})}):null,p=q.forwardRef(({title:t,titleTypographyProps:i,subtitle:r,subtitleTypographyProps:T,titleSlot:h,rightSlot:B,disableMediaAdaptive:k=!1,breadcrumbs:x,$css:N,className:_,showBackButton:j,onBackClick:b,...v},C)=>{const{down:P}=n.useBreakpoint(),c=!k&&P("xl"),g=S(c),m=d(h,g),y=d(B,g);return e.jsxs(R,{ref:C,$css:N,className:n.mCls(l.root,_),...v,children:[x&&e.jsx(J,{breadcrumbs:x}),e.jsxs(I,{children:[e.jsxs(A,{children:[j&&e.jsx(G,{isAdaptive1280:c,onClick:b}),(t||r)&&e.jsxs(L,{children:[e.jsx(K,{title:t,titleTypographyProps:i}),e.jsx(M,{subtitle:r,subtitleTypographyProps:T})]}),m&&e.jsx(F,{$isAdaptive1280:c,children:m})]}),y&&e.jsx(D,{children:y})]})]})});p.displayName="PageTitle";exports.PageTitle=p;exports.getPageTitleSlotSizes=S;exports.pageTitleClassNames=l;exports.renderPageTitleSlot=d;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { Breadcrumbs as P, IconButton as $ } from "@salutejs/sdds-finai";
|
|
2
|
+
import { jsxs as n, jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import { a as x } from "./AnalyticalWidget-BtyWKJuu.mjs";
|
|
4
|
+
import { IconChevronLeft as R } from "@salutejs/plasma-icons";
|
|
5
|
+
import { textSecondary as z } from "@salutejs/sdds-themes/tokens/sdds_finai";
|
|
6
|
+
import { b as s, d as I, s as A } from "./utils-u1KJ37g3.mjs";
|
|
7
|
+
import { forwardRef as j } from "react";
|
|
8
|
+
import { s as c } from "../constants/index.mjs";
|
|
9
|
+
import a, { css as S } from "styled-components";
|
|
10
|
+
const o = "PageTitle__", i = {
|
|
11
|
+
root: `${o}root`,
|
|
12
|
+
breadcrumbs: `${o}breadcrumbs`,
|
|
13
|
+
content: `${o}content`,
|
|
14
|
+
leftBlock: `${o}left-block`,
|
|
15
|
+
titleBlock: `${o}title-block`,
|
|
16
|
+
title: `${o}title`,
|
|
17
|
+
subtitle: `${o}subtitle`,
|
|
18
|
+
titleSlot: `${o}title-slot`,
|
|
19
|
+
rightBlock: `${o}right-block`,
|
|
20
|
+
backIconButton: `${o}back-icon-block`
|
|
21
|
+
}, L = a.div.attrs({
|
|
22
|
+
className: i.root
|
|
23
|
+
}).withConfig({
|
|
24
|
+
displayName: "PageTitlestyled__StyledRoot"
|
|
25
|
+
})(["width:100%;display:flex;flex-direction:column;gap:", ";"], () => c.x8), H = a.div.attrs({
|
|
26
|
+
className: i.breadcrumbs
|
|
27
|
+
}).withConfig({
|
|
28
|
+
displayName: "PageTitlestyled__StyledBreadcrumbs"
|
|
29
|
+
})([""]), E = a.div.attrs({
|
|
30
|
+
className: i.content
|
|
31
|
+
}).withConfig({
|
|
32
|
+
displayName: "PageTitlestyled__StyledContent"
|
|
33
|
+
})(["display:flex;justify-content:space-between;align-items:flex-start;gap:", ";"], () => c.x12), W = a.div.attrs({
|
|
34
|
+
className: i.leftBlock
|
|
35
|
+
}).withConfig({
|
|
36
|
+
displayName: "PageTitlestyled__StyledLeftBlock"
|
|
37
|
+
})(["display:flex;align-items:flex-start;gap:", ";flex:1;min-width:0;"], () => c.x8), q = a.div.attrs({
|
|
38
|
+
className: i.titleBlock
|
|
39
|
+
}).withConfig({
|
|
40
|
+
displayName: "PageTitlestyled__StyledTitleBlock"
|
|
41
|
+
})(["display:flex;flex-direction:column;gap:", ";flex-shrink:1;min-width:0;"], () => c.x2), D = a.div.attrs({
|
|
42
|
+
className: i.backIconButton
|
|
43
|
+
}).withConfig({
|
|
44
|
+
displayName: "PageTitlestyled__StyledBackButtonContainer"
|
|
45
|
+
})(["margin-top:4px;", ""], ({
|
|
46
|
+
$isAdaptive1280: t
|
|
47
|
+
}) => t && S(["", " ", ""], s.exact(960, 1280)`
|
|
48
|
+
margin-top: 2px;
|
|
49
|
+
`, s.exact(0, 959)`
|
|
50
|
+
margin-top: 0;
|
|
51
|
+
`)), F = a.div.attrs({
|
|
52
|
+
className: i.title
|
|
53
|
+
}).withConfig({
|
|
54
|
+
displayName: "PageTitlestyled__StyledTitle"
|
|
55
|
+
})([""]), G = a.div.attrs({
|
|
56
|
+
className: i.subtitle
|
|
57
|
+
}).withConfig({
|
|
58
|
+
displayName: "PageTitlestyled__StyledSubtitle"
|
|
59
|
+
})([""]), J = a.div.attrs({
|
|
60
|
+
className: i.titleSlot
|
|
61
|
+
}).withConfig({
|
|
62
|
+
displayName: "PageTitlestyled__StyledTitleSlot"
|
|
63
|
+
})(["margin-top:4px;", ""], ({
|
|
64
|
+
$isAdaptive1280: t
|
|
65
|
+
}) => t && S(["", " ", ""], s.exact(960, 1280)`
|
|
66
|
+
margin-top: 3px;
|
|
67
|
+
`, s.exact(0, 959)`
|
|
68
|
+
margin-top: 2px;
|
|
69
|
+
`)), K = a.div.attrs({
|
|
70
|
+
className: i.rightBlock
|
|
71
|
+
}).withConfig({
|
|
72
|
+
displayName: "PageTitlestyled__StyledRightBlock"
|
|
73
|
+
})(["display:flex;align-items:flex-end;flex-shrink:0;align-self:flex-end;"]), M = (t) => ({
|
|
74
|
+
buttonSize: t ? "xs" : "s"
|
|
75
|
+
}), y = (t, e) => typeof t == "function" ? t(e) : t, O = ({
|
|
76
|
+
isAdaptive1280: t,
|
|
77
|
+
...e
|
|
78
|
+
}) => /* @__PURE__ */ l(D, { $isAdaptive1280: t, children: /* @__PURE__ */ l($, { size: "xs", view: "secondary", className: i.backIconButton, pin: "circle-circle", ...e, children: /* @__PURE__ */ l(R, { size: "xs", color: "inherit" }) }) }), Q = ({
|
|
79
|
+
breadcrumbs: t
|
|
80
|
+
}) => {
|
|
81
|
+
if (!t)
|
|
82
|
+
return null;
|
|
83
|
+
const e = {
|
|
84
|
+
size: "m",
|
|
85
|
+
...t
|
|
86
|
+
};
|
|
87
|
+
return /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(P, { ...e }) });
|
|
88
|
+
}, U = ({
|
|
89
|
+
title: t,
|
|
90
|
+
titleTypographyProps: e
|
|
91
|
+
}) => t ? /* @__PURE__ */ l(F, { children: /* @__PURE__ */ l(x, { variant: "H2", bold: !0, tooltipText: (e && "tooltipText" in e ? e.tooltipText : void 0) ?? t, ...e, children: t }) }) : null, V = ({
|
|
92
|
+
subtitle: t,
|
|
93
|
+
subtitleTypographyProps: e
|
|
94
|
+
}) => t ? /* @__PURE__ */ l(G, { children: /* @__PURE__ */ l(x, { variant: "BodyS", color: z, tooltipText: (e && "tooltipText" in e ? e.tooltipText : void 0) ?? t, ...e, children: t }) }) : null, X = j(({
|
|
95
|
+
title: t,
|
|
96
|
+
titleTypographyProps: e,
|
|
97
|
+
subtitle: r,
|
|
98
|
+
subtitleTypographyProps: h,
|
|
99
|
+
titleSlot: u,
|
|
100
|
+
rightSlot: T,
|
|
101
|
+
disableMediaAdaptive: B = !1,
|
|
102
|
+
breadcrumbs: m,
|
|
103
|
+
$css: k,
|
|
104
|
+
className: N,
|
|
105
|
+
showBackButton: _,
|
|
106
|
+
onBackClick: b,
|
|
107
|
+
...v
|
|
108
|
+
}, C) => {
|
|
109
|
+
const {
|
|
110
|
+
down: w
|
|
111
|
+
} = I(), d = !B && w("xl"), f = M(d), g = y(u, f), p = y(T, f);
|
|
112
|
+
return /* @__PURE__ */ n(L, { ref: C, $css: k, className: A(i.root, N), ...v, children: [
|
|
113
|
+
m && /* @__PURE__ */ l(Q, { breadcrumbs: m }),
|
|
114
|
+
/* @__PURE__ */ n(E, { children: [
|
|
115
|
+
/* @__PURE__ */ n(W, { children: [
|
|
116
|
+
_ && /* @__PURE__ */ l(O, { isAdaptive1280: d, onClick: b }),
|
|
117
|
+
(t || r) && /* @__PURE__ */ n(q, { children: [
|
|
118
|
+
/* @__PURE__ */ l(U, { title: t, titleTypographyProps: e }),
|
|
119
|
+
/* @__PURE__ */ l(V, { subtitle: r, subtitleTypographyProps: h })
|
|
120
|
+
] }),
|
|
121
|
+
g && /* @__PURE__ */ l(J, { $isAdaptive1280: d, children: g })
|
|
122
|
+
] }),
|
|
123
|
+
p && /* @__PURE__ */ l(K, { children: p })
|
|
124
|
+
] })
|
|
125
|
+
] });
|
|
126
|
+
});
|
|
127
|
+
X.displayName = "PageTitle";
|
|
128
|
+
export {
|
|
129
|
+
X as P,
|
|
130
|
+
M as g,
|
|
131
|
+
i as p,
|
|
132
|
+
y as r
|
|
133
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as W, jsxs as H } from "react/jsx-runtime";
|
|
2
|
-
import { t as G, e as V, w as J, b as y, d as K, s as Q, q as Y } from "./utils-
|
|
2
|
+
import { t as G, e as V, w as J, b as y, d as K, s as Q, q as Y } from "./utils-u1KJ37g3.mjs";
|
|
3
3
|
import { useState as F, useEffect as $, useCallback as T, useRef as L, useMemo as X } from "react";
|
|
4
4
|
import { ModalDF as Z } from "../components/ModalDF/index.mjs";
|
|
5
5
|
import { s as E } from "../constants/index.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const W=require("react/jsx-runtime"),u=require("./utils-
|
|
1
|
+
"use strict";const W=require("react/jsx-runtime"),u=require("./utils-ChDQGRjv.cjs"),l=require("react"),H=require("../components/ModalDF/index.cjs"),L=require("../constants/index.cjs"),S=require("@salutejs/sdds-themes/tokens/sdds_finai"),U=require("styled-components"),A=({children:e,isFullScreened:t,fullScreenedModalDFProps:i})=>{if(!t)return e;const s=typeof(i==null?void 0:i.fullScreen)=="object"?i.fullScreen:void 0;return W.jsx(H.ModalDF,{opened:!0,closeOnOverlayClick:!1,...i,fullScreen:{...s,defaultEnabled:!0},children:e})},G=({sidebarIsClosed:e,isResizingRef:t,onTransitionEndExt:i})=>{const[s,o]=l.useState(()=>e);l.useEffect(()=>{e&&o(!0)},[e]);const d=l.useCallback(c=>{i&&i(c),!e&&!t.current&&s&&o(!1)},[s,t,i,e]);return{isClosingOrClosedOrOpening:s,onTransitionEnd:d}},m="SplitView__",r={container:`${m}container`,separator:`${m}separator`,separatorButton:`${m}separator-button`,mainBlock:`${m}main-block`,sidebarBlock:`${m}sidebar-block`,sidebarBlockIsResizing:`${m}sidebar-block-is-resizing`,sidebarIsClosingOrClosedOrOpening:`${m}sidebar-is-closing-closed-opening`,sidebarBlockFullScreenContentContainer:`${m}sidebar-block__full-screen-content-container`,sidebarBlockInModal:`${m}sidebar-block-in-modal`},j=32,E=12,n={mainWidthVar:"--main-width",separatorWidthVar:"--separator-width",sidebarWidthVar:"--sidebar-width",sidebarWidthInPxVar:"--sidebar-width-in-px",gapBetweenBlocksDefaultWidth:j,separatorButtonDefaultWidth:E,separatorDefaultWidth:j+E,sidebarWidths:{minWidthPx:600,adaptive1280MinWidthPx:440,maxWidthPercent:70,defaultWidthPercent:30}},M=(e,t)=>e/100*t,J=(e,t)=>e/t*100,K=({setSizes:e,isResizingRef:t,containerRef:i,sidebarMinWidthPx:s,sidebarMaxWidthPercent:o,onResize:d})=>{const c=l.useCallback(()=>{var a;document.body.style.cursor="col-resize",t.current=!0,(a=i.current)==null||a.classList.toggle(r.sidebarBlockIsResizing,!0)},[i,t]);return l.useEffect(()=>{const a=()=>{var p;document.body.style.cursor="auto",t.current=!1,(p=i.current)==null||p.classList.toggle(r.sidebarBlockIsResizing,!1)},g=p=>{if(!t.current||!i.current)return;p.preventDefault();const x=p.clientX,b=i.current.getBoundingClientRect(),h=b.width-n.separatorDefaultWidth,f=(b.right-x-n.separatorButtonDefaultWidth/2)/h*100,k=J(s,h),y=o,w=u.clamp(k,f,y),v=100-w,B=w*h/100,$=v*h/100,O={main:v,mainPx:$,sidebar:w,sidebarPx:B};e(O),d==null||d(O)},C=u.throttleWithLastCall(g,150);return window.addEventListener("mousemove",C),window.addEventListener("mouseup",a),()=>{window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",a)}},[i,t,d,e,o,s]),{startResizing:c}},Q=({setSizes:e,containerRef:t,sidebarMinWidthPx:i,sidebarMaxWidthPercent:s,onResize:o})=>{l.useEffect(()=>{const d=g=>{const p=g.contentRect.width-n.separatorDefaultWidth;e(x=>{const b=M(x.sidebar,p),V=M(s,p),h=u.clamp(i,b,V),f={...x,sidebarPx:h};return o==null||o(f),f})},c=u.debounce(d,1e3),a=new ResizeObserver(g=>{g.forEach(c)});return t.current&&a.observe(t.current),()=>{a.disconnect()}},[t,e,s,i])},P={spaceX4:()=>L.s.x4,spaceX16:()=>L.s.x16},Y=(e,t,i,s=n.sidebarWidths.minWidthPx)=>{const o=t?{...e,main:100,separator:`${i??0}px`,sidebar:0}:{...e,separator:`${n.separatorDefaultWidth}px`},{main:d,sidebar:c,sidebarPx:a,separator:g}=o;return{[n.mainWidthVar]:`${d}fr`,[n.sidebarWidthVar]:c===0?"minmax(0px, 0fr)":`minmax(${s}px, ${c}fr)`,[n.separatorWidthVar]:g,...a!==void 0&&{[n.sidebarWidthInPxVar]:`${a}px`}}},Z=`
|
|
2
2
|
border-top-right-radius: ${P.spaceX4};
|
|
3
3
|
border-bottom-right-radius: ${P.spaceX4};
|
|
4
4
|
`,R=U.div.attrs({className:r.container}).withConfig({displayName:"SplitViewstyled__StyledDiv"})(["*{box-sizing:border-box;}display:grid;position:relative;z-index:0;grid-template-columns:var(",") var(",") var(",");transition:grid-template-columns 0.2s ease-in-out,margin-right 0.2s ease-in-out;flex-grow:1;& .","{overflow-x:hidden;}& .",",& .","{--split-view-header-height:",";--split-view-bottom-gap:var(--page-layout-padding-bottom,32px);"," position:sticky;top:var(--split-view-header-height);height:calc( 100vh - var(--split-view-header-height) - var(--split-view-bottom-gap) );overflow-x:hidden;}& .","{align-self:start;z-index:1;& .","{margin-left:","px;position:relative;border:none;padding:0;width:","px;height:100%;background-color:",";border-radius:"," 0 0 ",";&::before{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:4px;height:",";border-radius:95px;background-color:",";}&:hover{&::before{background-color:",";}}cursor:col-resize;text-indent:100%;white-space:nowrap;overflow:hidden;}}&.","{& .",":before{background-color:",";}}.","{z-index:0;align-self:start;background-color:",";box-shadow:",";",";}."," > *{width:var(",");}"," ",""],n.mainWidthVar,n.separatorWidthVar,n.sidebarWidthVar,r.mainBlock,r.separator,r.sidebarBlock,({$headerHeight:e})=>e!==void 0?`${e}px`:"var(--global-header-height, 72px)",u.media.down("l")`
|
|
@@ -3,11 +3,11 @@ import { Spinner as ke, IconButton as ne } from "@salutejs/sdds-finai";
|
|
|
3
3
|
import { IconDisclosureLeftOutline as Te, IconDisclosureRightOutline as Oe, IconClose as Ee } from "@salutejs/plasma-icons";
|
|
4
4
|
import { useRef as k, useEffect as A, useContext as Re, createContext as Ae, useSyncExternalStore as ze, useState as fe, useCallback as ye, lazy as De, forwardRef as $e, useImperativeHandle as Be, Children as me, isValidElement as ie, cloneElement as ce, Suspense as Ge } from "react";
|
|
5
5
|
import { createPortal as Ve, flushSync as Le } from "react-dom";
|
|
6
|
-
import { E as je } from "./EmptyState-
|
|
7
|
-
import { n as Fe, x as He, y as oe } from "./utils-
|
|
6
|
+
import { E as je } from "./EmptyState-CUCseg9M.mjs";
|
|
7
|
+
import { n as Fe, x as He, y as oe } from "./utils-u1KJ37g3.mjs";
|
|
8
8
|
import { surfaceSolidCard as Me, onLightSurfaceTransparentDeep as We, onDarkSurfaceTransparentDeep as Xe, onLightSurfaceTransparentTertiary as Ye, onDarkSurfaceTransparentTertiary as Ze, textAccent as Ke, shadowDownSoftL as qe, textPrimary as Ue } from "@salutejs/sdds-themes/tokens/sdds_finai";
|
|
9
9
|
import f, { keyframes as L, css as Se, createGlobalStyle as Je } from "styled-components";
|
|
10
|
-
import { a as Qe } from "./AnalyticalWidget-
|
|
10
|
+
import { a as Qe } from "./AnalyticalWidget-BtyWKJuu.mjs";
|
|
11
11
|
const et = ({
|
|
12
12
|
controller: e,
|
|
13
13
|
pauseHoldDelay: t,
|