@daisforge/ui 1.21.0 → 1.23.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/AiAgentPopup-CLGSjg5L.cjs +11 -0
- package/chunks/AiAgentPopup-CtMhai1X.mjs +797 -0
- package/chunks/AnalyticalWidget-Bvcm1qpU.cjs +43 -0
- package/chunks/AnalyticalWidget-CRfihris.mjs +352 -0
- package/chunks/ApprovalCenter-D7K7J-QB.cjs +1 -0
- package/chunks/{ApprovalCenter-DLKZP2AO.mjs → ApprovalCenter-dJpI91uN.mjs} +10 -10
- package/chunks/BlockTitle-CcYYHiOo.cjs +1 -0
- package/chunks/{BlockTitle-DsXxImR6.mjs → BlockTitle-DCmM-9AN.mjs} +2 -2
- package/chunks/{Container-DbZwlfIM.mjs → Container-C7PzvUwd.mjs} +1 -1
- package/chunks/{Container-DHnX1sHY.cjs → Container-bVqI3en9.cjs} +1 -1
- package/chunks/{EmptyState-DH1xawxg.cjs → EmptyState-D-bmtvmy.cjs} +1 -1
- package/chunks/{EmptyState-CUCseg9M.mjs → EmptyState-ZsOlvU4d.mjs} +1 -1
- package/chunks/{FiltersActions-CDZSO0MM.mjs → FiltersActions-CS27WxA6.mjs} +38 -36
- package/chunks/FiltersActions-Cie245Po.cjs +1 -0
- package/chunks/{FormSegmentGroup-BYQ6yMK1.cjs → FormSegmentGroup-CNIqOYfm.cjs} +1 -1
- package/chunks/{FormSegmentGroup-C9qYxYT9.mjs → FormSegmentGroup-DwTRM58f.mjs} +1 -1
- package/chunks/{GridDND-DK6SAO8q.cjs → GridDND-Bwmr7gla.cjs} +1 -1
- package/chunks/{GridDND-CqvpXgCY.mjs → GridDND-DC5VoxEY.mjs} +83 -83
- package/chunks/{LeftPanel-C5SsoRJS.mjs → LeftPanel-C10BLKIn.mjs} +1 -1
- package/chunks/{LeftPanel-AyuV7bGS.cjs → LeftPanel-upGFk7jM.cjs} +1 -1
- package/chunks/{ListOfFilters-Bd8CZHDq.mjs → ListOfFilters-CEWrWotU.mjs} +3 -3
- package/chunks/{ListOfFilters-BAPz0OY9.cjs → ListOfFilters-DNi-z1cn.cjs} +1 -1
- package/chunks/MassActions-DJiKcC6r.cjs +1 -0
- package/chunks/{MassActions-D5UwHcNG.mjs → MassActions-NLCRjIHw.mjs} +187 -186
- package/chunks/PageTitle-Bg4PNEXS.cjs +9 -0
- package/chunks/{PageTitle-DkfAiZM4.mjs → PageTitle-CXtNgH-b.mjs} +7 -7
- package/chunks/{SplitView-BqS1Jbo4.mjs → SplitView-BzamJzNc.mjs} +17 -17
- package/chunks/{SplitView-DNmd4sJe.cjs → SplitView-DeJ3V-kq.cjs} +1 -1
- package/chunks/Stories-CNlL0Bcb.cjs +1 -0
- package/chunks/{Stories-BnHxMCEZ.mjs → Stories-UUV0GNEV.mjs} +33 -33
- package/chunks/Table-CZludfzU.cjs +31 -0
- package/chunks/{Table-DYSssxRS.mjs → Table-FrYs56BB.mjs} +2341 -2329
- package/chunks/{TableCanvas-DDNRdQjN.mjs → TableCanvas-CasYPFSm.mjs} +6016 -5720
- package/chunks/TableCanvas-DFne0YHS.cjs +30 -0
- package/chunks/TableGlide-BKSjSgBn.mjs +9131 -0
- package/chunks/TableGlide-C2_HrWEA.cjs +1 -0
- package/chunks/{styles-CJ5y9FKW.mjs → styles-CJPkBVWK.mjs} +6 -6
- package/chunks/{styles-kUWPuNSD.cjs → styles-CpC_FuBg.cjs} +1 -1
- package/chunks/{utils-u1KJ37g3.mjs → utils-Hu77fGGe.mjs} +102 -102
- package/chunks/{utils-ChDQGRjv.cjs → utils-OQNruMpn.cjs} +5 -5
- package/components/AiAgentPopover/index.cjs +1 -1
- package/components/AiAgentPopover/index.mjs +1 -1
- package/components/AiAgentPopup/AiAgentInput.d.ts +3 -0
- package/components/AiAgentPopup/AiAgentLeftPanel.d.ts +6 -0
- package/components/AiAgentPopup/AiAgentPopup.constants.d.ts +32 -0
- package/components/AiAgentPopup/AiAgentPopup.d.ts +3 -0
- package/components/AiAgentPopup/AiAgentPopup.styled.d.ts +33 -0
- package/components/AiAgentPopup/AiAgentPopup.types.d.ts +83 -0
- package/components/AiAgentPopup/AiAgentPopup.utils.d.ts +12 -0
- package/components/AiAgentPopup/AiAgentSurface.d.ts +6 -0
- package/components/AiAgentPopup/hooks/useDrag.d.ts +18 -0
- package/components/AiAgentPopup/hooks/useIsDarkTheme.d.ts +1 -0
- package/components/AiAgentPopup/hooks/usePopupPosition.d.ts +20 -0
- package/components/AiAgentPopup/hooks/usePopupResize.d.ts +40 -0
- package/components/AiAgentPopup/hooks/useStateStorage.d.ts +6 -0
- package/components/AiAgentPopup/index.cjs +1 -0
- package/components/AiAgentPopup/index.d.ts +3 -0
- package/components/AiAgentPopup/index.mjs +5 -0
- package/components/AnalyticalWidget/AnalyticalWidget.d.ts +8 -24
- package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/AnalyticalWidgetIconButtonDots.d.ts +8 -24
- 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 +2 -2
- package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.cjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.mjs +2 -2
- package/components/AnalyticalWidget/index.cjs +1 -1
- package/components/AnalyticalWidget/index.mjs +1 -1
- package/components/ApprovalCenter/components/index.cjs +1 -1
- package/components/ApprovalCenter/components/index.mjs +1 -1
- package/components/ApprovalCenter/index.cjs +1 -1
- package/components/ApprovalCenter/index.mjs +1 -1
- package/components/Autocomplete/Autocomplete.d.ts +128 -128
- 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/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/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/MassActions/types.d.ts +1 -0
- 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 +6 -6
- 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 +9 -9
- package/components/PopoverDF/styled.d.ts +1 -23
- package/components/PopupDF/index.cjs +1 -1
- package/components/PopupDF/index.mjs +118 -143
- package/components/SplitView/index.cjs +1 -1
- package/components/SplitView/index.mjs +1 -1
- package/components/SplitView/utils/index.cjs +1 -1
- package/components/SplitView/utils/index.mjs +1 -1
- package/components/Stories/components/StoriesBanner/index.cjs +1 -1
- package/components/Stories/components/StoriesBanner/index.mjs +1 -1
- package/components/Stories/components/StoriesContent/index.cjs +1 -1
- package/components/Stories/components/StoriesContent/index.mjs +1 -1
- package/components/Stories/components/StoriesPreview/index.cjs +1 -1
- package/components/Stories/components/StoriesPreview/index.mjs +1 -1
- package/components/Stories/components/StoriesProgress/index.cjs +1 -1
- package/components/Stories/components/StoriesProgress/index.mjs +1 -1
- package/components/Stories/components/StoriesViewer/index.cjs +1 -1
- package/components/Stories/components/StoriesViewer/index.mjs +1 -1
- package/components/Stories/index.cjs +1 -1
- package/components/Stories/index.mjs +1 -1
- package/components/Table/components/TableDropdown/index.cjs +1 -1
- package/components/Table/components/TableDropdown/index.mjs +1 -1
- package/components/Table/feature-collapse-table/index.cjs +1 -1
- package/components/Table/feature-collapse-table/index.mjs +1 -1
- package/components/Table/feature-column-control/ColumnsList/index.cjs +1 -1
- package/components/Table/feature-column-control/ColumnsList/index.mjs +1 -1
- package/components/Table/feature-column-control/index.cjs +1 -1
- package/components/Table/feature-column-control/index.mjs +1 -1
- package/components/Table/feature-columns-grouping/index.cjs +1 -1
- package/components/Table/feature-columns-grouping/index.mjs +1 -1
- package/components/Table/feature-context-menu/index.cjs +1 -1
- package/components/Table/feature-context-menu/index.mjs +1 -1
- package/components/Table/feature-edit/index.cjs +1 -1
- package/components/Table/feature-edit/index.mjs +1 -1
- package/components/Table/feature-filtering/combobox/index.cjs +1 -1
- package/components/Table/feature-filtering/combobox/index.mjs +1 -1
- package/components/Table/feature-filtering/filter-list-block/index.cjs +1 -1
- package/components/Table/feature-filtering/filter-list-block/index.mjs +1 -1
- package/components/Table/feature-filtering/header-filter-button/index.cjs +1 -1
- package/components/Table/feature-filtering/header-filter-button/index.mjs +1 -1
- package/components/Table/feature-filtering/index.cjs +1 -1
- package/components/Table/feature-filtering/index.mjs +1 -1
- package/components/Table/feature-filtering/popover.d.ts +1 -23
- package/components/Table/feature-filtering/sidebar-filter-block/index.cjs +1 -1
- package/components/Table/feature-filtering/sidebar-filter-block/index.mjs +1 -1
- package/components/Table/feature-infinity-scroll/index.cjs +1 -1
- package/components/Table/feature-infinity-scroll/index.mjs +1 -1
- package/components/Table/feature-key-text/index.cjs +1 -1
- package/components/Table/feature-key-text/index.mjs +1 -1
- package/components/Table/feature-pagination/index.cjs +1 -1
- package/components/Table/feature-pagination/index.mjs +1 -1
- package/components/Table/feature-right-sidebar/index.cjs +1 -1
- package/components/Table/feature-right-sidebar/index.mjs +1 -1
- package/components/Table/feature-row-detail/index.cjs +1 -1
- package/components/Table/feature-row-detail/index.mjs +1 -1
- package/components/Table/feature-row-instruments/index.cjs +1 -1
- package/components/Table/feature-row-instruments/index.mjs +1 -1
- package/components/Table/feature-row-size/index.cjs +1 -1
- package/components/Table/feature-row-size/index.mjs +1 -1
- package/components/Table/feature-rows-grouping/index.cjs +1 -1
- package/components/Table/feature-rows-grouping/index.mjs +1 -1
- package/components/Table/feature-searching/index.cjs +1 -1
- package/components/Table/feature-searching/index.mjs +1 -1
- package/components/Table/feature-searching/styled.d.ts +128 -128
- package/components/Table/feature-select-row/index.cjs +1 -1
- package/components/Table/feature-select-row/index.mjs +1 -1
- package/components/Table/feature-sorting/index.cjs +1 -1
- package/components/Table/feature-sorting/index.mjs +1 -1
- package/components/Table/feature-table-settings/index.cjs +1 -1
- package/components/Table/feature-table-settings/index.mjs +1 -1
- package/components/Table/feature-tree/index.cjs +1 -1
- package/components/Table/feature-tree/index.mjs +1 -1
- package/components/Table/index.cjs +1 -1
- package/components/Table/index.mjs +1 -1
- package/components/Table/renders/formatCell/index.cjs +1 -1
- package/components/Table/renders/formatCell/index.mjs +1 -1
- package/components/Table/styles/index.cjs +1 -1
- package/components/Table/styles/index.mjs +1 -1
- package/components/Table/table-hooks/index.cjs +1 -1
- package/components/Table/table-hooks/index.mjs +1 -1
- package/components/Table/types/index.cjs +1 -1
- package/components/Table/types/index.mjs +1 -1
- package/components/Table/types/table-config.type.d.ts +1 -0
- package/components/Table/types/utils.type.d.ts +1 -1
- package/components/Table/utils/index.cjs +1 -1
- package/components/Table/utils/index.mjs +1 -1
- package/components/Table/widgets/control-block/index.cjs +1 -1
- package/components/Table/widgets/control-block/index.mjs +1 -1
- package/components/Table/widgets/control-block/right-side/index.cjs +1 -1
- package/components/Table/widgets/control-block/right-side/index.mjs +1 -1
- package/components/Table/widgets/index.cjs +1 -1
- package/components/Table/widgets/index.mjs +1 -1
- package/components/Table/widgets/mass-actions/index.cjs +1 -1
- package/components/Table/widgets/mass-actions/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/TableGlideInstance.d.ts +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 +6 -6
- package/components/TableCanvas/TableGlideInstance/reexports-for-external.d.ts +4 -1
- package/components/TableCanvas/TableGlideInstance/type.d.ts +4 -1
- package/components/TableCanvas/TableGlideInstance/utils/column/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/column/index.mjs +2 -2
- 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/contexts.d.ts +8 -2
- package/components/TableCanvas/feature-cell-transfer/index.cjs +1 -1
- package/components/TableCanvas/feature-cell-transfer/index.mjs +13 -13
- package/components/TableCanvas/feature-collapse-table/index.cjs +1 -1
- package/components/TableCanvas/feature-collapse-table/index.mjs +2 -2
- package/components/TableCanvas/feature-column-control/ColumnsList/index.cjs +1 -1
- package/components/TableCanvas/feature-column-control/ColumnsList/index.mjs +2 -2
- package/components/TableCanvas/feature-column-control/index.cjs +1 -1
- package/components/TableCanvas/feature-column-control/index.mjs +4 -4
- package/components/TableCanvas/feature-columns-grouping/index.cjs +1 -1
- package/components/TableCanvas/feature-columns-grouping/index.mjs +3 -3
- 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 +6 -6
- package/components/TableCanvas/feature-edit/types.d.ts +1 -1
- package/components/TableCanvas/feature-filtering/combobox/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/combobox/index.mjs +4 -4
- package/components/TableCanvas/feature-filtering/filter-list-block/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/filter-list-block/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/header-filter-button/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/header-filter-button/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/index.mjs +3 -3
- 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 +4 -4
- package/components/TableCanvas/feature-key-text/index.cjs +1 -1
- package/components/TableCanvas/feature-key-text/index.mjs +6 -6
- package/components/TableCanvas/feature-notifications/index.cjs +1 -1
- package/components/TableCanvas/feature-notifications/index.mjs +2 -2
- package/components/TableCanvas/feature-pagination/TablePagination.d.ts +2 -0
- package/components/TableCanvas/feature-pagination/index.cjs +1 -1
- package/components/TableCanvas/feature-pagination/index.mjs +3 -3
- package/components/TableCanvas/feature-popover-table/components/styled.d.ts +1 -23
- 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 +3 -3
- package/components/TableCanvas/feature-popover-table/utils/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/utils/index.mjs +1 -1
- package/components/TableCanvas/feature-right-sidebar/compatibility.d.ts +8 -0
- package/components/TableCanvas/feature-right-sidebar/index.cjs +1 -1
- package/components/TableCanvas/feature-right-sidebar/index.d.ts +2 -3
- package/components/TableCanvas/feature-right-sidebar/index.mjs +3 -3
- 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 +7 -7
- 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 +4 -4
- package/components/TableCanvas/feature-rows-grouping/index.cjs +1 -1
- package/components/TableCanvas/feature-rows-grouping/index.mjs +10 -10
- package/components/TableCanvas/feature-searching/index.cjs +1 -1
- package/components/TableCanvas/feature-searching/index.mjs +1 -1
- package/components/TableCanvas/feature-searching/styled.d.ts +128 -128
- package/components/TableCanvas/feature-select-row/index.cjs +1 -1
- package/components/TableCanvas/feature-select-row/index.mjs +1 -1
- package/components/TableCanvas/feature-select-row/types.d.ts +1 -0
- package/components/TableCanvas/feature-select-row/useSelectRow.d.ts +1 -0
- package/components/TableCanvas/feature-sidebar/constants.d.ts +7 -0
- package/components/TableCanvas/feature-sidebar/getCustomSidebarTabs.d.ts +4 -0
- package/components/TableCanvas/feature-sidebar/index.cjs +1 -0
- package/components/TableCanvas/feature-sidebar/index.d.ts +1 -0
- package/components/TableCanvas/feature-sidebar/index.mjs +4 -0
- package/components/TableCanvas/feature-sidebar/ui/BottomSheet.d.ts +6 -0
- package/components/TableCanvas/feature-sidebar/ui/BottomSheet.styled.d.ts +6 -0
- package/components/TableCanvas/{feature-right-sidebar → feature-sidebar}/ui/SidebarContentLayout.d.ts +1 -0
- package/components/TableCanvas/{feature-right-sidebar → feature-sidebar}/ui/SidebarTabs.d.ts +2 -1
- package/components/TableCanvas/feature-sidebar/ui/TableSidebar.d.ts +16 -0
- package/components/TableCanvas/{feature-right-sidebar → feature-sidebar}/ui/styled.d.ts +5 -2
- package/components/TableCanvas/feature-sidebar/useSidebarTabsState.d.ts +14 -0
- package/components/TableCanvas/feature-sorting/index.cjs +1 -1
- package/components/TableCanvas/feature-sorting/index.mjs +1 -1
- package/components/TableCanvas/feature-sticky/index.cjs +1 -0
- package/components/TableCanvas/feature-sticky/index.d.ts +3 -0
- package/components/TableCanvas/feature-sticky/index.mjs +5 -0
- package/components/TableCanvas/feature-sticky/types.d.ts +2 -0
- package/components/TableCanvas/feature-sticky/useStickyColumnIndexes.d.ts +8 -0
- package/components/TableCanvas/feature-sticky/useStickyRowIndexes.d.ts +3 -0
- 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 +4 -4
- 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 +2 -1
- package/components/TableCanvas/index.mjs +43 -41
- package/components/TableCanvas/renders/formatCell/index.cjs +1 -1
- package/components/TableCanvas/renders/formatCell/index.mjs +1 -1
- package/components/TableCanvas/renders/renderEditCell.d.ts +1 -1
- package/components/TableCanvas/styles/classNames.d.ts +1 -0
- package/components/TableCanvas/styles/getReservedTableHeight.d.ts +18 -0
- package/components/TableCanvas/styles/index.cjs +1 -1
- package/components/TableCanvas/styles/index.mjs +10 -10
- package/components/TableCanvas/styles/styles.constants.d.ts +1 -1
- package/components/TableCanvas/styles/styles.d.ts +2 -5
- package/components/TableCanvas/table-hooks/index.cjs +1 -1
- package/components/TableCanvas/table-hooks/index.mjs +4 -4
- package/components/TableCanvas/table-hooks/useInlineStyle.d.ts +2 -1
- package/components/TableCanvas/table-hooks/useLeftSidebarValues.d.ts +7 -0
- package/components/TableCanvas/table-hooks/useSidebarOpenState.d.ts +11 -0
- package/components/TableCanvas/table-hooks/useSidebarValues.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 +20 -1
- package/components/TableCanvas/utils/index.cjs +1 -1
- package/components/TableCanvas/utils/index.mjs +2 -2
- package/components/TableCanvas/widgets/control-block/compression/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/compression/index.mjs +1 -1
- package/components/TableCanvas/widgets/control-block/control-block.constants.d.ts +6 -0
- package/components/TableCanvas/widgets/control-block/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/index.mjs +5 -5
- 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/control-block/types.d.ts +1 -0
- package/components/TableCanvas/widgets/index.cjs +1 -1
- package/components/TableCanvas/widgets/index.mjs +5 -5
- package/components/TableCanvas/widgets/mass-actions/MassActions.d.ts +2 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/index.cjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/index.mjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/useMassActionsCanvasWidth.d.ts +1 -0
- package/components/TableCanvas/widgets/mass-actions/hooks/useMassActionsCompression.d.ts +1 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/useMassActionsSidebar.d.ts +4 -1
- package/components/TableCanvas/widgets/mass-actions/index.cjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/index.mjs +1 -1
- package/components/TableCanvas/widgets/table-or-card-UI.d.ts +6 -3
- package/components/TableContract/index.cjs +1 -1
- package/components/TableContract/index.mjs +2 -2
- package/components/TableGlide/TableGlide.d.ts +1 -1
- package/components/TableGlide/cellRenderer.d.ts +2 -1
- package/components/TableGlide/constants.d.ts +3 -3
- package/components/TableGlide/content-tokens.generated.d.ts +612 -0
- package/components/TableGlide/hooks/selection/index.cjs +1 -1
- package/components/TableGlide/hooks/selection/index.mjs +1 -1
- package/components/TableGlide/hooks/selection/useBaseHighlightRegions.d.ts +2 -1
- package/components/TableGlide/hooks/selection/useColoringLayers.d.ts +2 -3
- package/components/TableGlide/hooks/selection/useColumnRowHighlightRegions.d.ts +1 -4
- package/components/TableGlide/hooks/selection/useSelectionGeometry.d.ts +3 -1
- package/components/TableGlide/hooks/useErrorCellRanges.d.ts +1 -2
- package/components/TableGlide/index.cjs +1 -1
- package/components/TableGlide/index.mjs +93 -90
- package/components/TableGlide/lib/canvas/cells/CellCanvasRoot.d.ts +2 -1
- package/components/TableGlide/lib/canvas/cells/buttons/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/cells/buttons/index.mjs +4 -4
- 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 +16 -16
- package/components/TableGlide/lib/canvas/cells/renderer/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/cells/renderer/index.mjs +4 -4
- package/components/TableGlide/lib/canvas/cells/renderer/types.d.ts +4 -2
- package/components/TableGlide/lib/canvas/cells/types.d.ts +3 -1
- package/components/TableGlide/lib/canvas/components/index.d.ts +31 -4
- package/components/TableGlide/lib/canvas/core/CanvasImageResources.d.ts +7 -0
- package/components/TableGlide/lib/canvas/core/CanvasImageTransitions.d.ts +11 -0
- package/components/TableGlide/lib/canvas/core/DrawBatcher.d.ts +5 -0
- 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 +4 -4
- package/components/TableGlide/lib/canvas/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/index.d.ts +7 -7
- package/components/TableGlide/lib/canvas/index.mjs +75 -72
- 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/CanvasAvatar.d.ts +58 -0
- package/components/TableGlide/lib/canvas/primitives/CanvasAvatarGroup.d.ts +45 -0
- package/components/TableGlide/lib/canvas/primitives/CanvasImage.d.ts +17 -0
- package/components/TableGlide/lib/canvas/primitives/CanvasLink.d.ts +2 -2
- package/components/TableGlide/lib/canvas/primitives/CanvasText.d.ts +3 -1
- package/components/TableGlide/lib/canvas/primitives/avatar/geometry.d.ts +6 -0
- package/components/TableGlide/lib/canvas/primitives/image/image.d.ts +20 -0
- package/components/TableGlide/lib/canvas/primitives/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/primitives/index.d.ts +11 -4
- package/components/TableGlide/lib/canvas/primitives/index.mjs +14 -11
- package/components/TableGlide/lib/canvas/utils/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/utils/index.mjs +2 -2
- package/components/TableGlide/theming/activeTheme.type.d.ts +3 -1
- package/components/TableGlide/theming/cell-fill-override.d.ts +31 -0
- package/components/TableGlide/theming/custom-colors.d.ts +46 -11
- package/components/TableGlide/theming/fill-states.d.ts +19 -0
- package/components/TableGlide/theming/glide-colors.d.ts +14 -14
- package/components/TableGlide/theming/index.cjs +1 -1
- package/components/TableGlide/theming/index.mjs +1 -1
- package/components/TableGlide/theming/size-tokens.d.ts +1 -1
- package/components/TableGlide/theming/table-colors.generated.d.ts +529 -0
- package/components/TableGlide/tokens.d.ts +3 -103
- package/components/TableGlide/types.d.ts +3 -5
- 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/TourWidget.palette.d.ts +36 -0
- package/components/TourWidget/TourWidget.styled.d.ts +4 -0
- package/components/TourWidget/TourWidget.tokens.d.ts +52 -0
- package/components/TourWidget/hooks/useIsDarkTheme.d.ts +1 -0
- package/components/TourWidget/index.cjs +22 -22
- package/components/TourWidget/index.d.ts +1 -0
- package/components/TourWidget/index.mjs +269 -179
- 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.d.ts +3 -1
- package/index.mjs +1864 -1858
- 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 +1912 -366
- package/mixins/index.cjs +4 -4
- package/mixins/index.mjs +61 -54
- package/package.json +7 -7
- package/shared/utils/resizable/index.cjs +1 -0
- package/shared/utils/resizable/index.d.ts +2 -0
- package/shared/utils/resizable/index.mjs +39 -0
- package/shared/utils/resizable/resizableConfig.d.ts +16 -0
- package/styles/index.cjs +1 -1
- package/styles/index.mjs +1 -1
- package/types/index.d.ts +1 -0
- package/types/utility.d.ts +1 -0
- package/utils/breakpoint/index.cjs +1 -1
- package/utils/breakpoint/index.mjs +2 -2
- 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/getActiveTheme.d.ts +1 -1
- package/utils/hooks/index.cjs +1 -1
- package/utils/hooks/index.mjs +1 -1
- package/utils/index.cjs +1 -1
- package/utils/index.mjs +8 -8
- package/utils/react/index.cjs +1 -1
- package/utils/react/index.mjs +1 -1
- package/utils/styles/index.cjs +1 -1
- package/utils/styles/index.mjs +1 -1
- package/chunks/AnalyticalWidget-BtyWKJuu.mjs +0 -537
- package/chunks/AnalyticalWidget-YytE3Rlw.cjs +0 -43
- package/chunks/ApprovalCenter-DdsLEipZ.cjs +0 -1
- package/chunks/BlockTitle-DC1McGof.cjs +0 -1
- package/chunks/FiltersActions-CVtgAJnC.cjs +0 -1
- package/chunks/MassActions-C08IgW4a.cjs +0 -1
- package/chunks/PageTitle-CrBeieoq.cjs +0 -9
- package/chunks/Stories-UYVANawW.cjs +0 -1
- package/chunks/Table-CdaMPDkg.cjs +0 -31
- package/chunks/TableCanvas-DPHSYfH3.cjs +0 -30
- package/chunks/TableGlide-DAnTJtye.mjs +0 -7811
- package/chunks/TableGlide-am_w97mF.cjs +0 -1
- package/components/TableCanvas/feature-right-sidebar/constants.d.ts +0 -1
- package/components/TableCanvas/feature-right-sidebar/ui/TableSidebar.d.ts +0 -16
- /package/components/TableCanvas/{feature-right-sidebar → feature-sidebar}/ui/TableSidebar.classnames.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),a=require("@salutejs/sdds-finai"),R=require("../formComponents/utils/index.cjs"),M=require("react-hook-form"),D=require("./utils-
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),a=require("@salutejs/sdds-finai"),R=require("../formComponents/utils/index.cjs"),M=require("react-hook-form"),D=require("./utils-OQNruMpn.cjs"),O=require("lodash.isequal"),X=require("react"),J=require("../components/TextField/index.cjs"),$=require("styled-components"),b={hiddenInput:"form-segment__hidden-input"},K=$.div.withConfig({displayName:"styled__SegmentGroupContainer"})(["width:100%;display:flex;flex-direction:column;gap:8px;"]),L=$(J.TextField).withConfig({displayName:"styled__HiddenTextField"})(["&&.","{.input-wrapper,.input-wrapper *{pointer-events:none;max-height:0;overflow:hidden;padding:0;margin:0;}}& > div{margin-bottom:0;}"],b.hiddenInput);function Q(e,t){return e==null||e===""?[]:Array.isArray(e)?e.map(String):t?[String(e)]:[String(e)]}function W(e,t){return t?e:e.length>0?[e[0]??""]:[]}function Y(e){const t={};return e.forEach(n=>{t[n]=(t[n]||0)+1}),e.filter(n=>t[n]<=1)}function Z(e){return e==null||e===""?[]:Array.isArray(e)?e.map(String):[String(e)]}function U({value:e,onRHFChange:t,onUserChange:n,selectionMode:i="single",label:u,titleCaption:m,hintText:y,hintTrigger:q="hover",hintHasArrow:F=!0,optionsRequired:j,groupProps:w,errorMessage:c,items:A,singleSelectedRequired:p,showError:C=!0}){const g=i==="multiple",{selectedSegmentItems:o}=a.useSegment();X.useEffect(()=>{const d=Q(e,g);if(!O([...d].sort(),[...o].sort())){const l=p?o:Y(o),s=W(l,g);t(s),n==null||n(s)}},[o,p]);const{$mode:I,className:G,style:N,ref:T,name:f,disabled:E,onBlur:V,...S}=w,_=Array.isArray(e)?e.join(", "):String(e??""),h=S.size??"s";return r.jsxs(K,{$mode:I,className:G,style:N,children:[(u||m)&&r.jsx(L,{required:R.getIsRequired(j),label:u,value:_,hintHasArrow:F,hintText:y??"",hintTrigger:q,className:b.hiddenInput,titleCaption:m,size:h}),r.jsx("input",{type:"hidden",name:f,value:String(e),ref:T,disabled:E,onBlur:V}),r.jsx(a.SegmentGroup,{...S,selectionMode:i,children:A.map(d=>{const{value:x,...l}=d,s=String(x);return r.jsx(a.SegmentItem,{value:s,type:"button",...l},s)})}),C&&c&&r.jsx(a.BodyXS,{color:D.getViewColor("negative"),children:c})]})}const B=e=>{const{name:t,options:n,onChange:i,singleSelectedRequired:u,selectionMode:m="single",view:y,size:q="s",pilled:F,hasBackground:j,stretch:w,orientation:c,className:A,style:p,items:C,label:g,titleCaption:o,hintText:I,hintTrigger:G,hintHasArrow:N,showError:T=!0}=e,f=R.useChangedFormContext(n),{control:E,rules:V,remOptions:S}=f;return r.jsx(M.Controller,{control:E,name:t,rules:V,...S,render:({field:{onChange:_,value:h,ref:d,onBlur:x,disabled:l,name:s,...z},fieldState:{error:H}})=>{const k={...z,name:t,className:A,style:p,disabled:l,size:q,view:y,pilled:F,hasBackground:j,stretch:w,orientation:c==="vertical"?"vertical":void 0,$mode:c==="vertical"?"column":"row",ref:d,onBlur:x},P=Z(h);return r.jsx(a.SegmentProvider,{defaultSelected:P,singleSelectedRequired:u,...z,children:r.jsx(U,{value:h,onRHFChange:v=>_(v),onUserChange:v=>{i==null||i(v,f)},label:g,titleCaption:o,hintText:I,hintTrigger:G,hintHasArrow:N,optionsRequired:n,errorMessage:H==null?void 0:H.message,groupProps:k,selectionMode:m,items:C,singleSelectedRequired:u,showError:T})},`segment-${t}-${P.join("|")}`)}})};B.displayName="FormSegmentGroup";exports.FormSegmentGroup=B;
|
|
@@ -2,7 +2,7 @@ import { jsxs as B, jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import { useSegment as M, SegmentGroup as R, SegmentItem as k, BodyXS as D, SegmentProvider as O } from "@salutejs/sdds-finai";
|
|
3
3
|
import { getIsRequired as X, useChangedFormContext as J } from "../formComponents/utils/index.mjs";
|
|
4
4
|
import { Controller as K } from "react-hook-form";
|
|
5
|
-
import { A as L } from "./utils-
|
|
5
|
+
import { A as L } from "./utils-Hu77fGGe.mjs";
|
|
6
6
|
import Q from "lodash.isequal";
|
|
7
7
|
import { useEffect as W } from "react";
|
|
8
8
|
import { TextField as Y } from "../components/TextField/index.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const Q=require("react/jsx-runtime");require("react-grid-layout/css/styles.css");const ht=require("../components/IconButton/index.cjs"),l=require("react"),ze=require("./AnalyticalWidget-YytE3Rlw.cjs"),bt=require("react-grid-layout"),gt=require("./utils-ChDQGRjv.cjs"),L=require("@salutejs/sdds-themes/tokens/sdds_finai"),ye=require("styled-components"),K={gridItemWrapper:"grid-dnd__item-wrapper",gridItem:"grid-dnd__item",dragHandle:"grid-dnd__drag-handle",noDrag:"grid-dnd__no-drag"},Ge=248,I=6,kt=({item:t,actionsSlot:n,children:r})=>Q.jsxs("div",{style:{height:"100%",position:"relative"},id:t.id,className:K.gridItemWrapper,children:[n,r]});function Dt(){const t=l.useRef(null),[n,r]=l.useState(0);return l.useLayoutEffect(()=>{const d=t.current;if(!d)return;let u=0;const c=gt.createSafeResizeObserver(i=>{var h;const m=((h=i[0])==null?void 0:h.contentRect.width)??0;cancelAnimationFrame(u),u=requestAnimationFrame(()=>r(m))});return c.observe(d),()=>{cancelAnimationFrame(u),c.disconnect()}},[]),{ref:t,width:n}}function vt(t){const{onWidthChange:n,margin:r,cols:d,containerPadding:u}=t,{ref:c,width:i}=Dt(),m=l.useRef(0);return l.useEffect(()=>{i>0&&i!==m.current&&(n==null||n(i,r,d,u),m.current=i)},[i,n,r,d,u]),Q.jsx("div",{ref:c,style:{width:"100%"},children:i>0&&Q.jsx(bt.Responsive,{...t,width:i})})}const Pe=ye.css(["background-color:",";border-radius:16px;outline:1px solid ",";"],()=>L.surfaceTransparentAccent,()=>L.outlineAccent),Rt=ye.div.withConfig({displayName:"GridDNDstyled__GridDNDContainer"})(["width:100%;min-height:400px;max-width:1890px;&:has(.react-grid-placeholder){& .react-grid-item.react-grid-placeholder{"," opacity:1;}}"],Pe),Nt=ye.div.attrs(()=>({className:K.gridItem})).withConfig({displayName:"GridDNDstyled__GridItem"})(["&.react-draggable-dragging{outline:2px solid ",";box-shadow:",";cursor:grabbing;}& .","{cursor:default;}height:100%;width:100%;cursor:",";background-color:white;border-radius:16px;outline:",";box-shadow:",";overflow:hidden;"],()=>L.outlineAccentMinor,()=>L.shadowDownHardS,ze.analyticalWidgetClassNames.topSlot,t=>t.$isDraggable?"grab":"default",t=>t.$isDraggable?`2px solid ${L.outlineTransparentAccent}`:"none",()=>L.shadowDownSoftS),Ot=ye.div.withConfig({displayName:"GridDNDstyled__GridItemContent"})(["height:100%;width:100%;"]),Ke=t=>!t||t==="."||t==="-"||t===" ";function Mt(t,n,r,d){var m,h;const u=[],c=r[n],i=new Set;for(let O=0;O<t.length;O++){const M=t[O];if(!M)return u;for(let s=0;s<M.length;s++){const p=M[s];if(!p||Ke(p)||i.has(`${p}`))continue;let w=0;for(let f=s;f<M.length&&M[f]===p;f++)w++;let y=0;for(let f=O;f<t.length;f++){let k=!0;for(let v=s;v<s+w;v++)if(!((m=t[f])!=null&&m[v])||((h=t[f])==null?void 0:h[v])!==p){k=!1;break}if(!k)break;y++}for(let f=O;f<O+y;f++)for(let k=s;k<s+w;k++)i.add(`${p}`);u.push({i:p,x:s,y:O,w,h:y,minW:1,maxW:c,minH:1,isResizable:d,static:!1})}}return u}function At(t){return Object.keys(t).sort((n,r)=>(t[r]||0)-(t[n]||0))}function Gt(t,n){const r=Object.keys(t).sort((d,u)=>{const c=t[d]||0;return(t[u]||0)-c});for(const d of r){const u=t[d];if(u!==void 0&&n>=u)return d}return r[r.length-1]}function St(t,n,r){var u,c;const d=r.indexOf(t);if(d===-1)return null;for(let i=d-1;i>=0;i--){const m=r[i];if(m&&((u=n[m])!=null&&u.length))return m}for(let i=d+1;i<r.length;i++){const m=r[i];if(m&&((c=n[m])!=null&&c.length))return m}return null}function Et(t,n){const r=[...t].map(s=>({...s,w:Math.max(1,Math.min(s.w,n))})).sort((s,p)=>s.y-p.y||s.x-p.x),d=[],u=s=>{for(;d.length<s;)d.push(Array(n).fill(!1))},c=(s,p,w,y)=>{u(p+y);for(let f=p;f<p+y;f++){const k=d[f];if(!k)return!1;for(let v=s;v<s+w;v++)if(v>=n||k[v])return!1}return!0},i=(s,p,w,y)=>{u(p+y);for(let f=p;f<p+y;f++){const k=d[f];if(k)for(let v=s;v<s+w;v++)v<k.length&&(k[v]=!0)}},m=s=>{let p=s;for(;;){u(p+1);const w=d[p];if(w&&w.some(y=>!y))return p;p++}};let h=0,O=0;const M=[];for(const s of r){let p=!1;for(let y=O;y<=n-s.w;y++)if(c(y,h,s.w,s.h)){i(y,h,s.w,s.h),M.push({...s,x:y,y:h}),O=y+s.w,O>n-1&&(h=m(h),O=0),p=!0;break}if(p)continue;h=m(h),O=0;let w=h;for(;;){let y=!1;for(let f=0;f<=n-s.w;f++)if(c(f,w,s.w,s.h)){i(f,w,s.w,s.h),M.push({...s,x:f,y:w}),w===h&&(O=f+s.w,O>n-1&&(h=m(h),O=0)),y=!0;break}if(y)break;w++}}return M}const Z=t=>t==="l"?{w:2,h:2}:t==="m"?{w:2,h:1}:{w:1,h:1};function xe(t,n){if(!t||!n||t.length!==n.length)return!1;const r=[...t].sort((u,c)=>u.i>c.i?1:-1),d=[...n].sort((u,c)=>u.i>c.i?1:-1);for(let u=0;u<r.length;u+=1){const c=r[u],i=d[u];if(!c||!i||c.i!==i.i||c.x!==i.x||c.y!==i.y||c.w!==i.w||c.h!==i.h)return!1}return!0}function he(t,n,r){for(;t.length<n;)t.push(Array(r).fill(!1))}function Ft(t,n,r){he(t,n+1,r);const d=t[n];return d?d.some(u=>!u):!1}function we(t,n,r,d=0){he(t,n+1,r);const u=t[n];if(!u)return-1;for(let c=Math.max(0,d);c<r;c++){if(c>=u.length)return-1;if(!u[c])return c}return-1}function $e(t,n,r,d,u,c){he(t,r+u,c);for(let i=r;i<r+u;i++){const m=t[i];if(!m)return!1;for(let h=n;h<n+d;h++)if(h>=c||m[h])return!1}return!0}function Wt(t,n,r,d,u,c){he(t,r+u,c);for(let i=r;i<r+u;i++){const m=t[i];if(m)for(let h=n;h<n+d;h++)h<c&&(m[h]=!0)}}function Xe(t,n,r){let d=Math.max(0,n);for(;;){if(Ft(t,d,r))return d;d++}}function Qe(t,n,r,d){const u=[],c=[];let i=0,m=0;for(const h of t){const O=n[h];if(!O)continue;const M=O,s=Math.max(1,Math.min(M.w,r)),p=Math.max(1,M.h);let w=null;for(let k=m;k<=r-s;k++)if($e(c,k,i,s,p,r)){w={x:k,y:i};break}if(!w){let k=i+1;for(;;){for(let v=0;v<=r-s;v++)if($e(c,v,k,s,p,r)){w={x:v,y:k};break}if(w)break;k++}}const{x:y,y:f}=w;if(Wt(c,y,f,s,p,r),u.push({i:h,x:y,y:f,w:s,h:p,minW:1,maxW:r,minH:1,isResizable:d,static:!1}),f>i)i=f,m=Math.max(0,we(c,i,r,0)),m===-1&&(i=Xe(c,i,r),m=we(c,i,r,0));else{const k=we(c,i,r,y+s);k===-1?(i=Xe(c,i,r),m=we(c,i,r,0)):m=k}}return u}function Se(t){return[...t].sort((n,r)=>n.y-r.y||n.x-r.x).map(n=>n.i)}const qt=t=>Object.keys(t).sort((n,r)=>(t[r]||0)-(t[n]||0))[0]??"lg";function Ue(t,n,r,d,u=0,c=0){const i=t.reduce((s,p)=>Math.max(s,p.y+p.h),0),m=Array.from({length:Math.max(i,c)+d+1},()=>Array(n).fill(!1));for(const{x:s,y:p,w,h:y}of t)for(let f=p;f<p+y;f++){m[f]||(m[f]=Array(n).fill(!1));const k=m[f];for(let v=s;v<s+w;v++)f>=0&&v>=0&&v<n&&k&&(k[v]=!0)}const h=(s,p)=>{for(let w=p;w<p+d;w++){m[w]||(m[w]=Array(n).fill(!1));const y=m[w];for(let f=s;f<s+r;f++)if(f>=n||y&&y[f])return!1}return!0},O=(s,p)=>{for(let w=p;w<p+d;w++){m[w]||(m[w]=Array(n).fill(!1));const y=m[w];for(let f=s;f<s+r;f++)f<n&&y&&(y[f]=!0)}};let M=c;for(;;){m[M]||(m[M]=Array(n).fill(!1));for(let s=M===c?u:0;s<=n-r;s++)if(h(s,M))return O(s,M),{x:s,y:M};M++}}const Tt=t=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>t(!1)):setTimeout(()=>t(!1),0)},Ht=({children:t,className:n})=>Q.jsx(Ot,{className:n,children:t}),Ye=(...t)=>console.log("%c[GridDND]","color:#6b5b95;font-weight:600",...t),Bt=l.forwardRef(({items:t,breakpoints:n={lg:1375,md:1143,sm:911,xs:679,xxs:0},cols:r={lg:6,md:5,sm:4,xs:3,xxs:2},rowHeights:d={lg:248,md:248,sm:248,xs:248,xxs:248},isDraggable:u=!0,isResizable:c=!1,margin:i=[16,16],containerPadding:m=[0,0],preventCollision:h=!1,allowOverlap:O=!1,isBounded:M=!0,autoSize:s=!0,useCSSTransforms:p=!0,compactType:w="horizontal",smartCompact:y=!0,resizeHandles:f=["se","sw","ne","nw","s","w","e","n"],draggableHandle:k=`.${K.dragHandle}`,draggableCancel:v=`button, input, select, textarea, .${K.noDrag}, .${ze.analyticalWidgetClassNames.topSlot}, .${ht.iconButtonFilterClassNames.root}`,maxRows:Je,transformScale:Ze,onLayoutChange:A,onBreakpointChange:ee,onItemsChange:S,onWidthChange:te,onDrag:re,onDragStart:ne,onDragStop:se,children:be,dragActivationDelay:ge=0,gridItemComponent:Ee,containerStyle:Le,gridStyle:Ce,enableLogs:Fe=!1},et)=>{const[G,ie]=l.useState(()=>t.map(e=>e.id)),U=l.useRef(Object.fromEntries(t.map(e=>[e.id,Z(e.type)]))),ke=l.useRef(!1),V=l.useRef({lg:[],md:[],sm:[],xs:[],xxs:[]}),z=l.useRef("lg"),P=l.useRef([]),$=ge>0,[De,We]=l.useState(!1),[tt,ve]=l.useState(null),ce=l.useRef(null),Re=l.useRef(!1),Ne=l.useRef(null),oe=l.useRef(null),C=l.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=null)},[]),le=l.useCallback(()=>{We(!1),ve(null),Re.current=!1},[]),rt=64;l.useEffect(()=>{if(!$||!Ne.current)return;const e=Ne.current;let a=null;const o=(g,R)=>{const E=W=>{const q=W.clientX-g,X=W.clientY-R;q*q+X*X>rt&&(C(),ve(null),oe.current=null,x())};document.addEventListener("pointermove",E),a=()=>{document.removeEventListener("pointermove",E),a=null}},x=()=>{a==null||a()},b=g=>{const R=g.target;return g.offsetX>R.clientWidth||g.offsetY>R.clientHeight},D=g=>{if(g._synthetic||g.button!==0||b(g))return;C(),x();const E=g.target.closest(`.${K.gridItem}`),W=E==null?void 0:E.querySelector(`.${K.gridItemWrapper}`),q=(W==null?void 0:W.id)??null,X=E==null?void 0:E.querySelector(`.${K.dragHandle}`);ve(q),oe.current={clientX:g.clientX,clientY:g.clientY,handleEl:X},o(g.clientX,g.clientY),ce.current=setTimeout(()=>{x(),We(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{const Y=oe.current;if(!(Y!=null&&Y.handleEl))return;const me=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,clientX:Y.clientX,clientY:Y.clientY,button:0,buttons:1});me._synthetic=!0,Y.handleEl.dispatchEvent(me)})})},ge)},N=()=>{C(),x(),oe.current=null,Re.current||requestAnimationFrame(()=>{le()})};return e.addEventListener("pointerdown",D),document.addEventListener("pointerup",N),()=>{e.removeEventListener("pointerdown",D),document.removeEventListener("pointerup",N),C(),x()}},[$,ge,C,le]);const qe=$?u&&De:u,[_,Te]=l.useState({lg:[],md:[],sm:[],xs:[],xxs:[]}),[He,nt]=l.useState("lg"),[T,st]=l.useState(d.lg??Ge),[it,ue]=l.useState(w),[ct,Be]=l.useState(!1),ot=l.useMemo(()=>k.split(".").join(" "),[k]),lt=l.useMemo(()=>Ee??Ht,[Ee]),ae=l.useMemo(()=>new Map(t.map(e=>[e.id,e.type])),[t]),J=l.useRef(new Map),fe=l.useCallback(e=>J.current.get(e)??ae.get(e)??"s",[ae]),j=l.useCallback(e=>e.map(a=>({id:a,type:fe(a)})),[fe]),Oe=l.useCallback(e=>d[e]??d.md??Ge,[d]),F=l.useCallback((e,a,o)=>{const x=o??G,b=a[e]??[],D=V.current[e]??[],N=new Map(b.map(R=>[R.i,R])),g=new Map(D.map(R=>[R.i,R]));return x.map(R=>{const E=fe(R),W=N.get(R)??g.get(R)??null,q=U.current[R]??Z(E),X=W?{x:W.x,y:W.y,w:W.w,h:W.h}:{x:0,y:0,w:q.w,h:q.h};return{id:R,type:E,position:X}})},[G,fe]),_e=l.useCallback(e=>{const a=V.current[e]??[];return a.length?a:_[e]??[]},[_]),H=l.useCallback((...e)=>{Fe&&Ye(...e)},[Fe]),de=l.useCallback(e=>{V.current=e,ke.current=!0,Be(!0),Te(e),requestAnimationFrame(()=>{requestAnimationFrame(()=>{ke.current=!1,Be(!1),Ye("[GridDND] reflow window closed")})})},[]),B=l.useCallback(e=>{const a={};for(const o of Object.keys(r)){const x=r[o]??I;a[o]=Qe(e,U.current,x,c)}return H("reflowAllByOrder",{order:e,out:a}),de(a),a},[r,c,de,H]),je=l.useCallback((e,a)=>{if(!y)return;const o=Date.now();if(P.current.push({x:e,y:a,timestamp:o}),P.current=P.current.filter(D=>o-D.timestamp<=300),P.current.length<2)return;let x=0,b=0;for(let D=1;D<P.current.length;D+=1){const N=P.current[D-1],g=P.current[D];!N||!g||(x+=Math.abs(g.x-N.x),b+=Math.abs(g.y-N.y))}x+b<10||(x>b*1.5?ue("horizontal"):b>x*1.5&&ue("vertical"))},[y]),Ie=l.useCallback(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{const e=V.current,a={};for(const[o,x]of Object.entries(e))a[o]=x.map(b=>({...b}));H("[GridDND] forceSyncWithRgl → re-push target layouts"),de(a)})})},[de,H]);l.useEffect(()=>{B(t.map(e=>e.id))},[]),l.useEffect(()=>{const e=new Set([...ae.keys(),...G]);J.current.forEach((a,o)=>{e.has(o)||J.current.delete(o)})},[ae,G]),l.useEffect(()=>{t.forEach(e=>{U.current[e.id]||(U.current[e.id]=Z(e.type))})},[t]);const ut=l.useCallback((e,a,o,x,b,D)=>{P.current=[],ue(w),$&&(Re.current=!0),ne==null||ne(e,a,o,x,b,D)},[w,ne,$]),at=l.useCallback((e,a,o,x,b,D)=>{je(b.clientX,b.clientY),re==null||re(e,a,o,x,b,D)},[je,re]),ft=l.useCallback((e,a,o,x,b,D)=>{se==null||se(e,a,o,x,b,D),$&&le();const N=Se(e);H("[GridDND] dragStop: nextOrder(readingOrder)",N),ie(N);const g=B(N),R=z.current,E=F(R,g,N);S==null||S(E),A==null||A({breakpoint:R,cols:r[R]??I,rowHeight:T,items:E},g,{itemsOrder:N,itemsOrderTyped:j(N)}),ue(w);const W=e,q=g[R];xe(W,q)?H("[GridDND] dragStop: live layout == target (OK)"):(H("[GridDND] dragStop: live layout != target → forceSyncWithRgl()"),Ie())},[se,$,le,B,F,S,A,r,T,w,Ie,H,j]),dt=l.useCallback((e,a)=>{H("RGL onLayoutChange",{cur:e,all:a});const o=z.current,x=(V.current[o]??[]).length;if(e.length===x&&xe(e,V.current[o])){H("[GridDND] onLayoutChange[IGNORED: equals-target]",{bp:o});return}if(ke.current){H("[GridDND] onLayoutChange[IGNORED: reflow-window]",{bp:o,cur:e});return}const b=r[o]??I;if(e.some(g=>typeof g.maxW=="number"&&g.maxW!==b))return;if(xe(e,V.current[o])){H("[GridDND] onLayoutChange[IGNORED: equals-target]",{bp:o});return}Te(g=>({...g,[o]:e.map(R=>({...R}))}));const N=F(o,{..._,[o]:e});A==null||A({breakpoint:o,cols:b,rowHeight:T,items:N},{..._,[o]:e},{itemsOrder:G})},[A,F,_,r,T,G,H]),mt=l.useCallback(e=>{z.current=e,nt(e),st(Oe(e));const a=B(G),o=F(e,a,G);ee==null||ee(e,{breakpoint:e,cols:r[e]??I,rowHeight:Oe(e),items:o})},[Oe,B,G,F,ee,r]),pt=l.useCallback((e,a,o,x)=>{te==null||te(e,a,o,x)},[te]),Me=l.useCallback(e=>{J.current.delete(e),delete U.current[e],ie(a=>{const o=a.filter(N=>N!==e),x=B(o),b=z.current,D=F(b,x,o);return S==null||S(D),A==null||A({breakpoint:b,cols:r[b]??I,rowHeight:T,items:D},x,{itemsOrder:o,itemsOrderTyped:j(o)}),o})},[B,F,S,A,r,T,j]),Ae=l.useCallback((e,a)=>{if(!G.includes(e))return;J.current.set(e,a);const o=z.current,x=r[o]??I,b=Z(a);U.current[e]={w:Math.max(1,Math.min(b.w,x)),h:Math.max(1,b.h)};const D=B(G),N=F(o,D,G);S==null||S(N),A==null||A({breakpoint:o,cols:x,rowHeight:T,items:N},D,{itemsOrder:G,itemsOrderTyped:j(G)})},[G,r,B,F,S,A,T,j]);l.useImperativeHandle(et,()=>({api:{getOrder:()=>G,getOrderDetailed:()=>j(G),setOrder:e=>{ie(e);const a=B(e),o=z.current,x=F(o,a,e);S==null||S(x),A==null||A({breakpoint:o,cols:r[o]??I,rowHeight:T,items:x},a,{itemsOrder:e,itemsOrderTyped:j(e)})},addItem:(e,a)=>{J.current.set(e.id,e.type);const o=Z(e.type),x=z.current,b=r[x]??I,D={w:Math.max(1,Math.min(o.w,b)),h:Math.max(1,o.h)};U.current[e.id]=D;const N=_e(x);let g=0,R=0;if(a!=null){const me=Math.max(0,Math.min(a-1,G.length-1)),xt=G[me],pe=N.find(yt=>yt.i===xt);pe&&(R=pe.y,g=pe.x+pe.w)}const E=Ue(N,b,D.w,D.h,g,R),W=N.concat([{i:e.id,x:E.x,y:E.y,w:D.w,h:D.h}]),q=Se(W);ie(q);const X=B(q),Y=F(x,X,q);S==null||S(Y),A==null||A({breakpoint:x,cols:b,rowHeight:T,items:Y},X,{itemsOrder:q,itemsOrderTyped:j(q)})},removeItem:Me,setItemType:Ae,getAllLayouts:()=>_,getCurrentLayout:()=>{const e=z.current,a=F(e,_,G);return{breakpoint:e,cols:r[e]??I,rowHeight:T,items:a}}}}),[Me,Ae,G,j,B,F,S,A,r,T,_e,_]);const wt=l.useMemo(()=>F(He,_,G),[He,_,G,F]);return Q.jsx(Rt,{ref:Ne,style:{...Le,...$&&De?{userSelect:"none",touchAction:"none"}:{}},children:Q.jsx(vt,{className:"layout",layouts:_,breakpoints:n,cols:r,rowHeight:T,margin:i,containerPadding:m,isDraggable:qe,isResizable:c,onLayoutChange:dt,onBreakpointChange:mt,autoSize:s,useCSSTransforms:p,preventCollision:h,compactType:ct?null:y?it:w,allowOverlap:O,isBounded:M,draggableHandle:k,draggableCancel:v,resizeHandles:c?f:[],maxRows:Je,transformScale:Ze,onWidthChange:pt,onDrag:at,onDragStart:ut,onDragStop:ft,style:{background:"transparent",...Ce},children:wt.map(e=>Q.jsx(Nt,{$isDraggable:$?De&&tt===e.id:u,children:Q.jsx(lt,{isDraggable:qe,className:ot,children:typeof be=="function"?be(e,()=>Me(e.id),a=>Ae(e.id,a)):be})},e.id))})})}),Ve=Object.assign(Bt,{ItemWrapper:kt});Ve.displayName="GridDND";exports.GridDND=Ve;exports.GridDNDClassNames=K;exports.convertAreaToLayoutsInit=Mt;exports.fallbackCols=I;exports.fallbackRowHeight=Ge;exports.findNearestSourceBp=St;exports.getBreakpointFromWidth=Gt;exports.gridItemPlaceholderMixin=Pe;exports.gridWrapWordLike=Et;exports.initSizeByType=Z;exports.isEmptyCell=Ke;exports.layoutsShallowEqual=xe;exports.orderBreakpointsDesc=At;exports.packByItemsOrder=Qe;exports.pickWidestBreakpoint=qt;exports.placeRectFirstFit=Ue;exports.readingOrder=Se;exports.unlockAfterFrame=Tt;
|
|
1
|
+
"use strict";const Q=require("react/jsx-runtime");require("react-grid-layout/css/styles.css");const ht=require("../components/IconButton/index.cjs"),l=require("react"),ze=require("./AnalyticalWidget-Bvcm1qpU.cjs"),bt=require("react-grid-layout"),gt=require("./utils-OQNruMpn.cjs"),L=require("@salutejs/sdds-themes/tokens/sdds_finai"),ye=require("styled-components"),K={gridItemWrapper:"grid-dnd__item-wrapper",gridItem:"grid-dnd__item",dragHandle:"grid-dnd__drag-handle",noDrag:"grid-dnd__no-drag"},Ge=248,I=6,kt=({item:t,actionsSlot:n,children:r})=>Q.jsxs("div",{style:{height:"100%",position:"relative"},id:t.id,className:K.gridItemWrapper,children:[n,r]});function Dt(){const t=l.useRef(null),[n,r]=l.useState(0);return l.useLayoutEffect(()=>{const d=t.current;if(!d)return;let u=0;const c=gt.createSafeResizeObserver(i=>{var h;const m=((h=i[0])==null?void 0:h.contentRect.width)??0;cancelAnimationFrame(u),u=requestAnimationFrame(()=>r(m))});return c.observe(d),()=>{cancelAnimationFrame(u),c.disconnect()}},[]),{ref:t,width:n}}function vt(t){const{onWidthChange:n,margin:r,cols:d,containerPadding:u}=t,{ref:c,width:i}=Dt(),m=l.useRef(0);return l.useEffect(()=>{i>0&&i!==m.current&&(n==null||n(i,r,d,u),m.current=i)},[i,n,r,d,u]),Q.jsx("div",{ref:c,style:{width:"100%"},children:i>0&&Q.jsx(bt.Responsive,{...t,width:i})})}const Pe=ye.css(["background-color:",";border-radius:16px;outline:1px solid ",";"],()=>L.surfaceTransparentAccent,()=>L.outlineAccent),Rt=ye.div.withConfig({displayName:"GridDNDstyled__GridDNDContainer"})(["width:100%;min-height:400px;max-width:1890px;&:has(.react-grid-placeholder){& .react-grid-item.react-grid-placeholder{"," opacity:1;}}"],Pe),Nt=ye.div.attrs(()=>({className:K.gridItem})).withConfig({displayName:"GridDNDstyled__GridItem"})(["&.react-draggable-dragging{outline:2px solid ",";box-shadow:",";cursor:grabbing;}& .","{cursor:default;}height:100%;width:100%;cursor:",";background-color:white;border-radius:16px;outline:",";box-shadow:",";overflow:hidden;"],()=>L.outlineAccentMinor,()=>L.shadowDownHardS,ze.analyticalWidgetClassNames.topSlot,t=>t.$isDraggable?"grab":"default",t=>t.$isDraggable?`2px solid ${L.outlineTransparentAccent}`:"none",()=>L.shadowDownSoftS),Ot=ye.div.withConfig({displayName:"GridDNDstyled__GridItemContent"})(["height:100%;width:100%;"]),Ke=t=>!t||t==="."||t==="-"||t===" ";function Mt(t,n,r,d){var m,h;const u=[],c=r[n],i=new Set;for(let O=0;O<t.length;O++){const M=t[O];if(!M)return u;for(let s=0;s<M.length;s++){const p=M[s];if(!p||Ke(p)||i.has(`${p}`))continue;let w=0;for(let f=s;f<M.length&&M[f]===p;f++)w++;let y=0;for(let f=O;f<t.length;f++){let k=!0;for(let v=s;v<s+w;v++)if(!((m=t[f])!=null&&m[v])||((h=t[f])==null?void 0:h[v])!==p){k=!1;break}if(!k)break;y++}for(let f=O;f<O+y;f++)for(let k=s;k<s+w;k++)i.add(`${p}`);u.push({i:p,x:s,y:O,w,h:y,minW:1,maxW:c,minH:1,isResizable:d,static:!1})}}return u}function At(t){return Object.keys(t).sort((n,r)=>(t[r]||0)-(t[n]||0))}function Gt(t,n){const r=Object.keys(t).sort((d,u)=>{const c=t[d]||0;return(t[u]||0)-c});for(const d of r){const u=t[d];if(u!==void 0&&n>=u)return d}return r[r.length-1]}function St(t,n,r){var u,c;const d=r.indexOf(t);if(d===-1)return null;for(let i=d-1;i>=0;i--){const m=r[i];if(m&&((u=n[m])!=null&&u.length))return m}for(let i=d+1;i<r.length;i++){const m=r[i];if(m&&((c=n[m])!=null&&c.length))return m}return null}function Et(t,n){const r=[...t].map(s=>({...s,w:Math.max(1,Math.min(s.w,n))})).sort((s,p)=>s.y-p.y||s.x-p.x),d=[],u=s=>{for(;d.length<s;)d.push(Array(n).fill(!1))},c=(s,p,w,y)=>{u(p+y);for(let f=p;f<p+y;f++){const k=d[f];if(!k)return!1;for(let v=s;v<s+w;v++)if(v>=n||k[v])return!1}return!0},i=(s,p,w,y)=>{u(p+y);for(let f=p;f<p+y;f++){const k=d[f];if(k)for(let v=s;v<s+w;v++)v<k.length&&(k[v]=!0)}},m=s=>{let p=s;for(;;){u(p+1);const w=d[p];if(w&&w.some(y=>!y))return p;p++}};let h=0,O=0;const M=[];for(const s of r){let p=!1;for(let y=O;y<=n-s.w;y++)if(c(y,h,s.w,s.h)){i(y,h,s.w,s.h),M.push({...s,x:y,y:h}),O=y+s.w,O>n-1&&(h=m(h),O=0),p=!0;break}if(p)continue;h=m(h),O=0;let w=h;for(;;){let y=!1;for(let f=0;f<=n-s.w;f++)if(c(f,w,s.w,s.h)){i(f,w,s.w,s.h),M.push({...s,x:f,y:w}),w===h&&(O=f+s.w,O>n-1&&(h=m(h),O=0)),y=!0;break}if(y)break;w++}}return M}const Z=t=>t==="l"?{w:2,h:2}:t==="m"?{w:2,h:1}:{w:1,h:1};function xe(t,n){if(!t||!n||t.length!==n.length)return!1;const r=[...t].sort((u,c)=>u.i>c.i?1:-1),d=[...n].sort((u,c)=>u.i>c.i?1:-1);for(let u=0;u<r.length;u+=1){const c=r[u],i=d[u];if(!c||!i||c.i!==i.i||c.x!==i.x||c.y!==i.y||c.w!==i.w||c.h!==i.h)return!1}return!0}function he(t,n,r){for(;t.length<n;)t.push(Array(r).fill(!1))}function Ft(t,n,r){he(t,n+1,r);const d=t[n];return d?d.some(u=>!u):!1}function we(t,n,r,d=0){he(t,n+1,r);const u=t[n];if(!u)return-1;for(let c=Math.max(0,d);c<r;c++){if(c>=u.length)return-1;if(!u[c])return c}return-1}function $e(t,n,r,d,u,c){he(t,r+u,c);for(let i=r;i<r+u;i++){const m=t[i];if(!m)return!1;for(let h=n;h<n+d;h++)if(h>=c||m[h])return!1}return!0}function Wt(t,n,r,d,u,c){he(t,r+u,c);for(let i=r;i<r+u;i++){const m=t[i];if(m)for(let h=n;h<n+d;h++)h<c&&(m[h]=!0)}}function Xe(t,n,r){let d=Math.max(0,n);for(;;){if(Ft(t,d,r))return d;d++}}function Qe(t,n,r,d){const u=[],c=[];let i=0,m=0;for(const h of t){const O=n[h];if(!O)continue;const M=O,s=Math.max(1,Math.min(M.w,r)),p=Math.max(1,M.h);let w=null;for(let k=m;k<=r-s;k++)if($e(c,k,i,s,p,r)){w={x:k,y:i};break}if(!w){let k=i+1;for(;;){for(let v=0;v<=r-s;v++)if($e(c,v,k,s,p,r)){w={x:v,y:k};break}if(w)break;k++}}const{x:y,y:f}=w;if(Wt(c,y,f,s,p,r),u.push({i:h,x:y,y:f,w:s,h:p,minW:1,maxW:r,minH:1,isResizable:d,static:!1}),f>i)i=f,m=Math.max(0,we(c,i,r,0)),m===-1&&(i=Xe(c,i,r),m=we(c,i,r,0));else{const k=we(c,i,r,y+s);k===-1?(i=Xe(c,i,r),m=we(c,i,r,0)):m=k}}return u}function Se(t){return[...t].sort((n,r)=>n.y-r.y||n.x-r.x).map(n=>n.i)}const qt=t=>Object.keys(t).sort((n,r)=>(t[r]||0)-(t[n]||0))[0]??"lg";function Ue(t,n,r,d,u=0,c=0){const i=t.reduce((s,p)=>Math.max(s,p.y+p.h),0),m=Array.from({length:Math.max(i,c)+d+1},()=>Array(n).fill(!1));for(const{x:s,y:p,w,h:y}of t)for(let f=p;f<p+y;f++){m[f]||(m[f]=Array(n).fill(!1));const k=m[f];for(let v=s;v<s+w;v++)f>=0&&v>=0&&v<n&&k&&(k[v]=!0)}const h=(s,p)=>{for(let w=p;w<p+d;w++){m[w]||(m[w]=Array(n).fill(!1));const y=m[w];for(let f=s;f<s+r;f++)if(f>=n||y&&y[f])return!1}return!0},O=(s,p)=>{for(let w=p;w<p+d;w++){m[w]||(m[w]=Array(n).fill(!1));const y=m[w];for(let f=s;f<s+r;f++)f<n&&y&&(y[f]=!0)}};let M=c;for(;;){m[M]||(m[M]=Array(n).fill(!1));for(let s=M===c?u:0;s<=n-r;s++)if(h(s,M))return O(s,M),{x:s,y:M};M++}}const Tt=t=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>t(!1)):setTimeout(()=>t(!1),0)},Ht=({children:t,className:n})=>Q.jsx(Ot,{className:n,children:t}),Ye=(...t)=>console.log("%c[GridDND]","color:#6b5b95;font-weight:600",...t),Bt=l.forwardRef(({items:t,breakpoints:n={lg:1375,md:1143,sm:911,xs:679,xxs:0},cols:r={lg:6,md:5,sm:4,xs:3,xxs:2},rowHeights:d={lg:248,md:248,sm:248,xs:248,xxs:248},isDraggable:u=!0,isResizable:c=!1,margin:i=[16,16],containerPadding:m=[0,0],preventCollision:h=!1,allowOverlap:O=!1,isBounded:M=!0,autoSize:s=!0,useCSSTransforms:p=!0,compactType:w="horizontal",smartCompact:y=!0,resizeHandles:f=["se","sw","ne","nw","s","w","e","n"],draggableHandle:k=`.${K.dragHandle}`,draggableCancel:v=`button, input, select, textarea, .${K.noDrag}, .${ze.analyticalWidgetClassNames.topSlot}, .${ht.iconButtonFilterClassNames.root}`,maxRows:Je,transformScale:Ze,onLayoutChange:A,onBreakpointChange:ee,onItemsChange:S,onWidthChange:te,onDrag:re,onDragStart:ne,onDragStop:se,children:be,dragActivationDelay:ge=0,gridItemComponent:Ee,containerStyle:Le,gridStyle:Ce,enableLogs:Fe=!1},et)=>{const[G,ie]=l.useState(()=>t.map(e=>e.id)),U=l.useRef(Object.fromEntries(t.map(e=>[e.id,Z(e.type)]))),ke=l.useRef(!1),V=l.useRef({lg:[],md:[],sm:[],xs:[],xxs:[]}),z=l.useRef("lg"),P=l.useRef([]),$=ge>0,[De,We]=l.useState(!1),[tt,ve]=l.useState(null),ce=l.useRef(null),Re=l.useRef(!1),Ne=l.useRef(null),oe=l.useRef(null),C=l.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=null)},[]),le=l.useCallback(()=>{We(!1),ve(null),Re.current=!1},[]),rt=64;l.useEffect(()=>{if(!$||!Ne.current)return;const e=Ne.current;let a=null;const o=(g,R)=>{const E=W=>{const q=W.clientX-g,X=W.clientY-R;q*q+X*X>rt&&(C(),ve(null),oe.current=null,x())};document.addEventListener("pointermove",E),a=()=>{document.removeEventListener("pointermove",E),a=null}},x=()=>{a==null||a()},b=g=>{const R=g.target;return g.offsetX>R.clientWidth||g.offsetY>R.clientHeight},D=g=>{if(g._synthetic||g.button!==0||b(g))return;C(),x();const E=g.target.closest(`.${K.gridItem}`),W=E==null?void 0:E.querySelector(`.${K.gridItemWrapper}`),q=(W==null?void 0:W.id)??null,X=E==null?void 0:E.querySelector(`.${K.dragHandle}`);ve(q),oe.current={clientX:g.clientX,clientY:g.clientY,handleEl:X},o(g.clientX,g.clientY),ce.current=setTimeout(()=>{x(),We(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{const Y=oe.current;if(!(Y!=null&&Y.handleEl))return;const me=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,clientX:Y.clientX,clientY:Y.clientY,button:0,buttons:1});me._synthetic=!0,Y.handleEl.dispatchEvent(me)})})},ge)},N=()=>{C(),x(),oe.current=null,Re.current||requestAnimationFrame(()=>{le()})};return e.addEventListener("pointerdown",D),document.addEventListener("pointerup",N),()=>{e.removeEventListener("pointerdown",D),document.removeEventListener("pointerup",N),C(),x()}},[$,ge,C,le]);const qe=$?u&&De:u,[_,Te]=l.useState({lg:[],md:[],sm:[],xs:[],xxs:[]}),[He,nt]=l.useState("lg"),[T,st]=l.useState(d.lg??Ge),[it,ue]=l.useState(w),[ct,Be]=l.useState(!1),ot=l.useMemo(()=>k.split(".").join(" "),[k]),lt=l.useMemo(()=>Ee??Ht,[Ee]),ae=l.useMemo(()=>new Map(t.map(e=>[e.id,e.type])),[t]),J=l.useRef(new Map),fe=l.useCallback(e=>J.current.get(e)??ae.get(e)??"s",[ae]),j=l.useCallback(e=>e.map(a=>({id:a,type:fe(a)})),[fe]),Oe=l.useCallback(e=>d[e]??d.md??Ge,[d]),F=l.useCallback((e,a,o)=>{const x=o??G,b=a[e]??[],D=V.current[e]??[],N=new Map(b.map(R=>[R.i,R])),g=new Map(D.map(R=>[R.i,R]));return x.map(R=>{const E=fe(R),W=N.get(R)??g.get(R)??null,q=U.current[R]??Z(E),X=W?{x:W.x,y:W.y,w:W.w,h:W.h}:{x:0,y:0,w:q.w,h:q.h};return{id:R,type:E,position:X}})},[G,fe]),_e=l.useCallback(e=>{const a=V.current[e]??[];return a.length?a:_[e]??[]},[_]),H=l.useCallback((...e)=>{Fe&&Ye(...e)},[Fe]),de=l.useCallback(e=>{V.current=e,ke.current=!0,Be(!0),Te(e),requestAnimationFrame(()=>{requestAnimationFrame(()=>{ke.current=!1,Be(!1),Ye("[GridDND] reflow window closed")})})},[]),B=l.useCallback(e=>{const a={};for(const o of Object.keys(r)){const x=r[o]??I;a[o]=Qe(e,U.current,x,c)}return H("reflowAllByOrder",{order:e,out:a}),de(a),a},[r,c,de,H]),je=l.useCallback((e,a)=>{if(!y)return;const o=Date.now();if(P.current.push({x:e,y:a,timestamp:o}),P.current=P.current.filter(D=>o-D.timestamp<=300),P.current.length<2)return;let x=0,b=0;for(let D=1;D<P.current.length;D+=1){const N=P.current[D-1],g=P.current[D];!N||!g||(x+=Math.abs(g.x-N.x),b+=Math.abs(g.y-N.y))}x+b<10||(x>b*1.5?ue("horizontal"):b>x*1.5&&ue("vertical"))},[y]),Ie=l.useCallback(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{const e=V.current,a={};for(const[o,x]of Object.entries(e))a[o]=x.map(b=>({...b}));H("[GridDND] forceSyncWithRgl → re-push target layouts"),de(a)})})},[de,H]);l.useEffect(()=>{B(t.map(e=>e.id))},[]),l.useEffect(()=>{const e=new Set([...ae.keys(),...G]);J.current.forEach((a,o)=>{e.has(o)||J.current.delete(o)})},[ae,G]),l.useEffect(()=>{t.forEach(e=>{U.current[e.id]||(U.current[e.id]=Z(e.type))})},[t]);const ut=l.useCallback((e,a,o,x,b,D)=>{P.current=[],ue(w),$&&(Re.current=!0),ne==null||ne(e,a,o,x,b,D)},[w,ne,$]),at=l.useCallback((e,a,o,x,b,D)=>{je(b.clientX,b.clientY),re==null||re(e,a,o,x,b,D)},[je,re]),ft=l.useCallback((e,a,o,x,b,D)=>{se==null||se(e,a,o,x,b,D),$&&le();const N=Se(e);H("[GridDND] dragStop: nextOrder(readingOrder)",N),ie(N);const g=B(N),R=z.current,E=F(R,g,N);S==null||S(E),A==null||A({breakpoint:R,cols:r[R]??I,rowHeight:T,items:E},g,{itemsOrder:N,itemsOrderTyped:j(N)}),ue(w);const W=e,q=g[R];xe(W,q)?H("[GridDND] dragStop: live layout == target (OK)"):(H("[GridDND] dragStop: live layout != target → forceSyncWithRgl()"),Ie())},[se,$,le,B,F,S,A,r,T,w,Ie,H,j]),dt=l.useCallback((e,a)=>{H("RGL onLayoutChange",{cur:e,all:a});const o=z.current,x=(V.current[o]??[]).length;if(e.length===x&&xe(e,V.current[o])){H("[GridDND] onLayoutChange[IGNORED: equals-target]",{bp:o});return}if(ke.current){H("[GridDND] onLayoutChange[IGNORED: reflow-window]",{bp:o,cur:e});return}const b=r[o]??I;if(e.some(g=>typeof g.maxW=="number"&&g.maxW!==b))return;if(xe(e,V.current[o])){H("[GridDND] onLayoutChange[IGNORED: equals-target]",{bp:o});return}Te(g=>({...g,[o]:e.map(R=>({...R}))}));const N=F(o,{..._,[o]:e});A==null||A({breakpoint:o,cols:b,rowHeight:T,items:N},{..._,[o]:e},{itemsOrder:G})},[A,F,_,r,T,G,H]),mt=l.useCallback(e=>{z.current=e,nt(e),st(Oe(e));const a=B(G),o=F(e,a,G);ee==null||ee(e,{breakpoint:e,cols:r[e]??I,rowHeight:Oe(e),items:o})},[Oe,B,G,F,ee,r]),pt=l.useCallback((e,a,o,x)=>{te==null||te(e,a,o,x)},[te]),Me=l.useCallback(e=>{J.current.delete(e),delete U.current[e],ie(a=>{const o=a.filter(N=>N!==e),x=B(o),b=z.current,D=F(b,x,o);return S==null||S(D),A==null||A({breakpoint:b,cols:r[b]??I,rowHeight:T,items:D},x,{itemsOrder:o,itemsOrderTyped:j(o)}),o})},[B,F,S,A,r,T,j]),Ae=l.useCallback((e,a)=>{if(!G.includes(e))return;J.current.set(e,a);const o=z.current,x=r[o]??I,b=Z(a);U.current[e]={w:Math.max(1,Math.min(b.w,x)),h:Math.max(1,b.h)};const D=B(G),N=F(o,D,G);S==null||S(N),A==null||A({breakpoint:o,cols:x,rowHeight:T,items:N},D,{itemsOrder:G,itemsOrderTyped:j(G)})},[G,r,B,F,S,A,T,j]);l.useImperativeHandle(et,()=>({api:{getOrder:()=>G,getOrderDetailed:()=>j(G),setOrder:e=>{ie(e);const a=B(e),o=z.current,x=F(o,a,e);S==null||S(x),A==null||A({breakpoint:o,cols:r[o]??I,rowHeight:T,items:x},a,{itemsOrder:e,itemsOrderTyped:j(e)})},addItem:(e,a)=>{J.current.set(e.id,e.type);const o=Z(e.type),x=z.current,b=r[x]??I,D={w:Math.max(1,Math.min(o.w,b)),h:Math.max(1,o.h)};U.current[e.id]=D;const N=_e(x);let g=0,R=0;if(a!=null){const me=Math.max(0,Math.min(a-1,G.length-1)),xt=G[me],pe=N.find(yt=>yt.i===xt);pe&&(R=pe.y,g=pe.x+pe.w)}const E=Ue(N,b,D.w,D.h,g,R),W=N.concat([{i:e.id,x:E.x,y:E.y,w:D.w,h:D.h}]),q=Se(W);ie(q);const X=B(q),Y=F(x,X,q);S==null||S(Y),A==null||A({breakpoint:x,cols:b,rowHeight:T,items:Y},X,{itemsOrder:q,itemsOrderTyped:j(q)})},removeItem:Me,setItemType:Ae,getAllLayouts:()=>_,getCurrentLayout:()=>{const e=z.current,a=F(e,_,G);return{breakpoint:e,cols:r[e]??I,rowHeight:T,items:a}}}}),[Me,Ae,G,j,B,F,S,A,r,T,_e,_]);const wt=l.useMemo(()=>F(He,_,G),[He,_,G,F]);return Q.jsx(Rt,{ref:Ne,style:{...Le,...$&&De?{userSelect:"none",touchAction:"none"}:{}},children:Q.jsx(vt,{className:"layout",layouts:_,breakpoints:n,cols:r,rowHeight:T,margin:i,containerPadding:m,isDraggable:qe,isResizable:c,onLayoutChange:dt,onBreakpointChange:mt,autoSize:s,useCSSTransforms:p,preventCollision:h,compactType:ct?null:y?it:w,allowOverlap:O,isBounded:M,draggableHandle:k,draggableCancel:v,resizeHandles:c?f:[],maxRows:Je,transformScale:Ze,onWidthChange:pt,onDrag:at,onDragStart:ut,onDragStop:ft,style:{background:"transparent",...Ce},children:wt.map(e=>Q.jsx(Nt,{$isDraggable:$?De&&tt===e.id:u,children:Q.jsx(lt,{isDraggable:qe,className:ot,children:typeof be=="function"?be(e,()=>Me(e.id),a=>Ae(e.id,a)):be})},e.id))})})}),Ve=Object.assign(Bt,{ItemWrapper:kt});Ve.displayName="GridDND";exports.GridDND=Ve;exports.GridDNDClassNames=K;exports.convertAreaToLayoutsInit=Mt;exports.fallbackCols=I;exports.fallbackRowHeight=Ge;exports.findNearestSourceBp=St;exports.getBreakpointFromWidth=Gt;exports.gridItemPlaceholderMixin=Pe;exports.gridWrapWordLike=Et;exports.initSizeByType=Z;exports.isEmptyCell=Ke;exports.layoutsShallowEqual=xe;exports.orderBreakpointsDesc=At;exports.packByItemsOrder=Qe;exports.pickWidestBreakpoint=qt;exports.placeRectFirstFit=Ue;exports.readingOrder=Se;exports.unlockAfterFrame=Tt;
|
|
@@ -2,9 +2,9 @@ import { jsxs as xe, jsx as Z } from "react/jsx-runtime";
|
|
|
2
2
|
import "react-grid-layout/css/styles.css";
|
|
3
3
|
import { iconButtonFilterClassNames as ye } from "../components/IconButton/index.mjs";
|
|
4
4
|
import { useRef as B, useState as P, useLayoutEffect as he, useEffect as et, forwardRef as ge, useCallback as G, useMemo as yt, useImperativeHandle as be } from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { a as Qt } from "./AnalyticalWidget-CRfihris.mjs";
|
|
6
6
|
import { Responsive as De } from "react-grid-layout";
|
|
7
|
-
import { c as ve } from "./utils-
|
|
7
|
+
import { c as ve } from "./utils-Hu77fGGe.mjs";
|
|
8
8
|
import { surfaceTransparentAccent as ke, outlineAccent as Oe, outlineAccentMinor as Ne, shadowDownHardS as Ae, outlineTransparentAccent as Me, shadowDownSoftS as Re } from "@salutejs/sdds-themes/tokens/sdds_finai";
|
|
9
9
|
import Et, { css as Ge } from "styled-components";
|
|
10
10
|
const J = {
|
|
@@ -26,8 +26,8 @@ const J = {
|
|
|
26
26
|
function Ee() {
|
|
27
27
|
const e = B(null), [n, r] = P(0);
|
|
28
28
|
return he(() => {
|
|
29
|
-
const
|
|
30
|
-
if (!
|
|
29
|
+
const u = e.current;
|
|
30
|
+
if (!u)
|
|
31
31
|
return;
|
|
32
32
|
let l = 0;
|
|
33
33
|
const o = ve((s) => {
|
|
@@ -35,7 +35,7 @@ function Ee() {
|
|
|
35
35
|
const d = ((y = s[0]) == null ? void 0 : y.contentRect.width) ?? 0;
|
|
36
36
|
cancelAnimationFrame(l), l = requestAnimationFrame(() => r(d));
|
|
37
37
|
});
|
|
38
|
-
return o.observe(
|
|
38
|
+
return o.observe(u), () => {
|
|
39
39
|
cancelAnimationFrame(l), o.disconnect();
|
|
40
40
|
};
|
|
41
41
|
}, []), {
|
|
@@ -47,15 +47,15 @@ function He(e) {
|
|
|
47
47
|
const {
|
|
48
48
|
onWidthChange: n,
|
|
49
49
|
margin: r,
|
|
50
|
-
cols:
|
|
50
|
+
cols: u,
|
|
51
51
|
containerPadding: l
|
|
52
52
|
} = e, {
|
|
53
53
|
ref: o,
|
|
54
54
|
width: s
|
|
55
55
|
} = Ee(), d = B(0);
|
|
56
56
|
return et(() => {
|
|
57
|
-
s > 0 && s !== d.current && (n == null || n(s, r,
|
|
58
|
-
}, [s, n, r,
|
|
57
|
+
s > 0 && s !== d.current && (n == null || n(s, r, u, l), d.current = s);
|
|
58
|
+
}, [s, n, r, u, l]), /* @__PURE__ */ Z("div", { ref: o, style: {
|
|
59
59
|
width: "100%"
|
|
60
60
|
}, children: s > 0 && /* @__PURE__ */ Z(De, { ...e, width: s }) });
|
|
61
61
|
}
|
|
@@ -68,7 +68,7 @@ const Te = Ge(["background-color:", ";border-radius:16px;outline:1px solid ", ";
|
|
|
68
68
|
})(["&.react-draggable-dragging{outline:2px solid ", ";box-shadow:", ";cursor:grabbing;}& .", "{cursor:default;}height:100%;width:100%;cursor:", ";background-color:white;border-radius:16px;outline:", ";box-shadow:", ";overflow:hidden;"], () => Ne, () => Ae, Qt.topSlot, (e) => e.$isDraggable ? "grab" : "default", (e) => e.$isDraggable ? `2px solid ${Me}` : "none", () => Re), _e = Et.div.withConfig({
|
|
69
69
|
displayName: "GridDNDstyled__GridItemContent"
|
|
70
70
|
})(["height:100%;width:100%;"]), qe = (e) => !e || e === "." || e === "-" || e === " ";
|
|
71
|
-
function tr(e, n, r,
|
|
71
|
+
function tr(e, n, r, u) {
|
|
72
72
|
var d, y;
|
|
73
73
|
const l = [], o = r[n], s = /* @__PURE__ */ new Set();
|
|
74
74
|
for (let N = 0; N < e.length; N++) {
|
|
@@ -80,13 +80,13 @@ function tr(e, n, r, a) {
|
|
|
80
80
|
if (!m || qe(m) || s.has(`${m}`))
|
|
81
81
|
continue;
|
|
82
82
|
let p = 0;
|
|
83
|
-
for (let
|
|
83
|
+
for (let a = i; a < A.length && A[a] === m; a++)
|
|
84
84
|
p++;
|
|
85
85
|
let x = 0;
|
|
86
|
-
for (let
|
|
86
|
+
for (let a = N; a < e.length; a++) {
|
|
87
87
|
let b = !0;
|
|
88
88
|
for (let v = i; v < i + p; v++)
|
|
89
|
-
if (!((d = e[
|
|
89
|
+
if (!((d = e[a]) != null && d[v]) || ((y = e[a]) == null ? void 0 : y[v]) !== m) {
|
|
90
90
|
b = !1;
|
|
91
91
|
break;
|
|
92
92
|
}
|
|
@@ -94,7 +94,7 @@ function tr(e, n, r, a) {
|
|
|
94
94
|
break;
|
|
95
95
|
x++;
|
|
96
96
|
}
|
|
97
|
-
for (let
|
|
97
|
+
for (let a = N; a < N + x; a++)
|
|
98
98
|
for (let b = i; b < i + p; b++)
|
|
99
99
|
s.add(`${m}`);
|
|
100
100
|
l.push({
|
|
@@ -114,7 +114,7 @@ function tr(e, n, r, a) {
|
|
|
114
114
|
// Максимальная ширина (ограничена количеством колонок)
|
|
115
115
|
minH: 1,
|
|
116
116
|
// Минимальная высота
|
|
117
|
-
isResizable:
|
|
117
|
+
isResizable: u,
|
|
118
118
|
// Можно ли изменять размер
|
|
119
119
|
static: !1
|
|
120
120
|
// Элемент не статичный (можно перемещать)
|
|
@@ -127,28 +127,28 @@ function er(e) {
|
|
|
127
127
|
return Object.keys(e).sort((n, r) => (e[r] || 0) - (e[n] || 0));
|
|
128
128
|
}
|
|
129
129
|
function rr(e, n) {
|
|
130
|
-
const r = Object.keys(e).sort((
|
|
131
|
-
const o = e[
|
|
130
|
+
const r = Object.keys(e).sort((u, l) => {
|
|
131
|
+
const o = e[u] || 0;
|
|
132
132
|
return (e[l] || 0) - o;
|
|
133
133
|
});
|
|
134
|
-
for (const
|
|
135
|
-
const l = e[
|
|
134
|
+
for (const u of r) {
|
|
135
|
+
const l = e[u];
|
|
136
136
|
if (l !== void 0 && n >= l)
|
|
137
|
-
return
|
|
137
|
+
return u;
|
|
138
138
|
}
|
|
139
139
|
return r[r.length - 1];
|
|
140
140
|
}
|
|
141
141
|
function nr(e, n, r) {
|
|
142
142
|
var l, o;
|
|
143
|
-
const
|
|
144
|
-
if (
|
|
143
|
+
const u = r.indexOf(e);
|
|
144
|
+
if (u === -1)
|
|
145
145
|
return null;
|
|
146
|
-
for (let s =
|
|
146
|
+
for (let s = u - 1; s >= 0; s--) {
|
|
147
147
|
const d = r[s];
|
|
148
148
|
if (d && ((l = n[d]) != null && l.length))
|
|
149
149
|
return d;
|
|
150
150
|
}
|
|
151
|
-
for (let s =
|
|
151
|
+
for (let s = u + 1; s < r.length; s++) {
|
|
152
152
|
const d = r[s];
|
|
153
153
|
if (d && ((o = n[d]) != null && o.length))
|
|
154
154
|
return d;
|
|
@@ -161,13 +161,13 @@ function ir(e, n) {
|
|
|
161
161
|
// Ограничиваем ширину элемента количеством колонок
|
|
162
162
|
w: Math.max(1, Math.min(i.w, n))
|
|
163
163
|
// Старые координаты не важны - будем раскладывать заново
|
|
164
|
-
})).sort((i, m) => i.y - m.y || i.x - m.x),
|
|
165
|
-
for (;
|
|
166
|
-
|
|
164
|
+
})).sort((i, m) => i.y - m.y || i.x - m.x), u = [], l = (i) => {
|
|
165
|
+
for (; u.length < i; )
|
|
166
|
+
u.push(Array(n).fill(!1));
|
|
167
167
|
}, o = (i, m, p, x) => {
|
|
168
168
|
l(m + x);
|
|
169
|
-
for (let
|
|
170
|
-
const b = a
|
|
169
|
+
for (let a = m; a < m + x; a++) {
|
|
170
|
+
const b = u[a];
|
|
171
171
|
if (!b)
|
|
172
172
|
return !1;
|
|
173
173
|
for (let v = i; v < i + p; v++)
|
|
@@ -177,8 +177,8 @@ function ir(e, n) {
|
|
|
177
177
|
return !0;
|
|
178
178
|
}, s = (i, m, p, x) => {
|
|
179
179
|
l(m + x);
|
|
180
|
-
for (let
|
|
181
|
-
const b = a
|
|
180
|
+
for (let a = m; a < m + x; a++) {
|
|
181
|
+
const b = u[a];
|
|
182
182
|
if (b)
|
|
183
183
|
for (let v = i; v < i + p; v++)
|
|
184
184
|
v < b.length && (b[v] = !0);
|
|
@@ -187,7 +187,7 @@ function ir(e, n) {
|
|
|
187
187
|
let m = i;
|
|
188
188
|
for (; ; ) {
|
|
189
189
|
l(m + 1);
|
|
190
|
-
const p =
|
|
190
|
+
const p = u[m];
|
|
191
191
|
if (p && p.some((x) => !x))
|
|
192
192
|
return m;
|
|
193
193
|
m++;
|
|
@@ -212,13 +212,13 @@ function ir(e, n) {
|
|
|
212
212
|
let p = y;
|
|
213
213
|
for (; ; ) {
|
|
214
214
|
let x = !1;
|
|
215
|
-
for (let
|
|
216
|
-
if (o(
|
|
217
|
-
s(
|
|
215
|
+
for (let a = 0; a <= n - i.w; a++)
|
|
216
|
+
if (o(a, p, i.w, i.h)) {
|
|
217
|
+
s(a, p, i.w, i.h), A.push({
|
|
218
218
|
...i,
|
|
219
|
-
x:
|
|
219
|
+
x: a,
|
|
220
220
|
y: p
|
|
221
|
-
}), p === y && (N =
|
|
221
|
+
}), p === y && (N = a + i.w, N > n - 1 && (y = d(y), N = 0)), x = !0;
|
|
222
222
|
break;
|
|
223
223
|
}
|
|
224
224
|
if (x)
|
|
@@ -241,9 +241,9 @@ const tt = (e) => e === "l" ? {
|
|
|
241
241
|
function Ft(e, n) {
|
|
242
242
|
if (!e || !n || e.length !== n.length)
|
|
243
243
|
return !1;
|
|
244
|
-
const r = [...e].sort((l, o) => l.i > o.i ? 1 : -1),
|
|
244
|
+
const r = [...e].sort((l, o) => l.i > o.i ? 1 : -1), u = [...n].sort((l, o) => l.i > o.i ? 1 : -1);
|
|
245
245
|
for (let l = 0; l < r.length; l += 1) {
|
|
246
|
-
const o = r[l], s =
|
|
246
|
+
const o = r[l], s = u[l];
|
|
247
247
|
if (!o || !s || o.i !== s.i || o.x !== s.x || o.y !== s.y || o.w !== s.w || o.h !== s.h)
|
|
248
248
|
return !1;
|
|
249
249
|
}
|
|
@@ -255,15 +255,15 @@ function gt(e, n, r) {
|
|
|
255
255
|
}
|
|
256
256
|
function Be(e, n, r) {
|
|
257
257
|
gt(e, n + 1, r);
|
|
258
|
-
const
|
|
259
|
-
return
|
|
258
|
+
const u = e[n];
|
|
259
|
+
return u ? u.some((l) => !l) : !1;
|
|
260
260
|
}
|
|
261
|
-
function ht(e, n, r,
|
|
261
|
+
function ht(e, n, r, u = 0) {
|
|
262
262
|
gt(e, n + 1, r);
|
|
263
263
|
const l = e[n];
|
|
264
264
|
if (!l)
|
|
265
265
|
return -1;
|
|
266
|
-
for (let o = Math.max(0,
|
|
266
|
+
for (let o = Math.max(0, u); o < r; o++) {
|
|
267
267
|
if (o >= l.length)
|
|
268
268
|
return -1;
|
|
269
269
|
if (!l[o])
|
|
@@ -271,36 +271,36 @@ function ht(e, n, r, a = 0) {
|
|
|
271
271
|
}
|
|
272
272
|
return -1;
|
|
273
273
|
}
|
|
274
|
-
function Yt(e, n, r,
|
|
274
|
+
function Yt(e, n, r, u, l, o) {
|
|
275
275
|
gt(e, r + l, o);
|
|
276
276
|
for (let s = r; s < r + l; s++) {
|
|
277
277
|
const d = e[s];
|
|
278
278
|
if (!d)
|
|
279
279
|
return !1;
|
|
280
|
-
for (let y = n; y < n +
|
|
280
|
+
for (let y = n; y < n + u; y++)
|
|
281
281
|
if (y >= o || d[y])
|
|
282
282
|
return !1;
|
|
283
283
|
}
|
|
284
284
|
return !0;
|
|
285
285
|
}
|
|
286
|
-
function Ie(e, n, r,
|
|
286
|
+
function Ie(e, n, r, u, l, o) {
|
|
287
287
|
gt(e, r + l, o);
|
|
288
288
|
for (let s = r; s < r + l; s++) {
|
|
289
289
|
const d = e[s];
|
|
290
290
|
if (d)
|
|
291
|
-
for (let y = n; y < n +
|
|
291
|
+
for (let y = n; y < n + u; y++)
|
|
292
292
|
y < o && (d[y] = !0);
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
function zt(e, n, r) {
|
|
296
|
-
let
|
|
296
|
+
let u = Math.max(0, n);
|
|
297
297
|
for (; ; ) {
|
|
298
|
-
if (Be(e,
|
|
299
|
-
return
|
|
300
|
-
|
|
298
|
+
if (Be(e, u, r))
|
|
299
|
+
return u;
|
|
300
|
+
u++;
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
|
-
function $e(e, n, r,
|
|
303
|
+
function $e(e, n, r, u) {
|
|
304
304
|
const l = [], o = [];
|
|
305
305
|
let s = 0, d = 0;
|
|
306
306
|
for (const y of e) {
|
|
@@ -335,21 +335,21 @@ function $e(e, n, r, a) {
|
|
|
335
335
|
}
|
|
336
336
|
const {
|
|
337
337
|
x,
|
|
338
|
-
y:
|
|
338
|
+
y: a
|
|
339
339
|
} = p;
|
|
340
|
-
if (Ie(o, x,
|
|
340
|
+
if (Ie(o, x, a, i, m, r), l.push({
|
|
341
341
|
i: y,
|
|
342
342
|
x,
|
|
343
|
-
y:
|
|
343
|
+
y: a,
|
|
344
344
|
w: i,
|
|
345
345
|
h: m,
|
|
346
346
|
minW: 1,
|
|
347
347
|
maxW: r,
|
|
348
348
|
minH: 1,
|
|
349
|
-
isResizable:
|
|
349
|
+
isResizable: u,
|
|
350
350
|
static: !1
|
|
351
|
-
}),
|
|
352
|
-
s =
|
|
351
|
+
}), a > s)
|
|
352
|
+
s = a, d = Math.max(0, ht(o, s, r, 0)), d === -1 && (s = zt(o, s, r), d = ht(o, s, r, 0));
|
|
353
353
|
else {
|
|
354
354
|
const b = ht(o, s, r, x + i);
|
|
355
355
|
b === -1 ? (s = zt(o, s, r), d = ht(o, s, r, 0)) : d = b;
|
|
@@ -361,9 +361,9 @@ function Pt(e) {
|
|
|
361
361
|
return [...e].sort((n, r) => n.y - r.y || n.x - r.x).map((n) => n.i);
|
|
362
362
|
}
|
|
363
363
|
const sr = (e) => Object.keys(e).sort((n, r) => (e[r] || 0) - (e[n] || 0))[0] ?? "lg";
|
|
364
|
-
function je(e, n, r,
|
|
364
|
+
function je(e, n, r, u, l = 0, o = 0) {
|
|
365
365
|
const s = e.reduce((i, m) => Math.max(i, m.y + m.h), 0), d = Array.from({
|
|
366
|
-
length: Math.max(s, o) +
|
|
366
|
+
length: Math.max(s, o) + u + 1
|
|
367
367
|
}, () => Array(n).fill(!1));
|
|
368
368
|
for (const {
|
|
369
369
|
x: i,
|
|
@@ -371,27 +371,27 @@ function je(e, n, r, a, l = 0, o = 0) {
|
|
|
371
371
|
w: p,
|
|
372
372
|
h: x
|
|
373
373
|
} of e)
|
|
374
|
-
for (let
|
|
375
|
-
d[
|
|
376
|
-
const b = d[
|
|
374
|
+
for (let a = m; a < m + x; a++) {
|
|
375
|
+
d[a] || (d[a] = Array(n).fill(!1));
|
|
376
|
+
const b = d[a];
|
|
377
377
|
for (let v = i; v < i + p; v++)
|
|
378
|
-
|
|
378
|
+
a >= 0 && v >= 0 && v < n && b && (b[v] = !0);
|
|
379
379
|
}
|
|
380
380
|
const y = (i, m) => {
|
|
381
|
-
for (let p = m; p < m +
|
|
381
|
+
for (let p = m; p < m + u; p++) {
|
|
382
382
|
d[p] || (d[p] = Array(n).fill(!1));
|
|
383
383
|
const x = d[p];
|
|
384
|
-
for (let
|
|
385
|
-
if (
|
|
384
|
+
for (let a = i; a < i + r; a++)
|
|
385
|
+
if (a >= n || x && x[a])
|
|
386
386
|
return !1;
|
|
387
387
|
}
|
|
388
388
|
return !0;
|
|
389
389
|
}, N = (i, m) => {
|
|
390
|
-
for (let p = m; p < m +
|
|
390
|
+
for (let p = m; p < m + u; p++) {
|
|
391
391
|
d[p] || (d[p] = Array(n).fill(!1));
|
|
392
392
|
const x = d[p];
|
|
393
|
-
for (let
|
|
394
|
-
|
|
393
|
+
for (let a = i; a < i + r; a++)
|
|
394
|
+
a < n && x && (x[a] = !0);
|
|
395
395
|
}
|
|
396
396
|
};
|
|
397
397
|
let A = o;
|
|
@@ -432,7 +432,7 @@ const or = (e) => {
|
|
|
432
432
|
xs: 3,
|
|
433
433
|
xxs: 2
|
|
434
434
|
},
|
|
435
|
-
rowHeights:
|
|
435
|
+
rowHeights: u = {
|
|
436
436
|
lg: 248,
|
|
437
437
|
md: 248,
|
|
438
438
|
sm: 248,
|
|
@@ -451,7 +451,7 @@ const or = (e) => {
|
|
|
451
451
|
useCSSTransforms: m = !0,
|
|
452
452
|
compactType: p = "horizontal",
|
|
453
453
|
smartCompact: x = !0,
|
|
454
|
-
resizeHandles:
|
|
454
|
+
resizeHandles: a = ["se", "sw", "ne", "nw", "s", "w", "e", "n"],
|
|
455
455
|
draggableHandle: b = `.${J.dragHandle}`,
|
|
456
456
|
draggableCancel: v = `button, input, select, textarea, .${J.noDrag}, .${Qt.topSlot}, .${ye.root}`,
|
|
457
457
|
maxRows: Ut,
|
|
@@ -482,7 +482,7 @@ const or = (e) => {
|
|
|
482
482
|
xxs: []
|
|
483
483
|
}), K = B("lg"), Q = B([]), j = Dt > 0, [kt, Wt] = P(!1), [Ct, Ot] = P(null), lt = B(null), Nt = B(!1), At = B(null), ft = B(null), C = G(() => {
|
|
484
484
|
lt.current && (clearTimeout(lt.current), lt.current = null);
|
|
485
|
-
}, []),
|
|
485
|
+
}, []), at = G(() => {
|
|
486
486
|
Wt(!1), Ot(null), Nt.current = !1;
|
|
487
487
|
}, []), te = 64;
|
|
488
488
|
et(() => {
|
|
@@ -532,23 +532,23 @@ const or = (e) => {
|
|
|
532
532
|
}, Dt);
|
|
533
533
|
}, O = () => {
|
|
534
534
|
C(), w(), ft.current = null, Nt.current || requestAnimationFrame(() => {
|
|
535
|
-
|
|
535
|
+
at();
|
|
536
536
|
});
|
|
537
537
|
};
|
|
538
538
|
return t.addEventListener("pointerdown", D), document.addEventListener("pointerup", O), () => {
|
|
539
539
|
t.removeEventListener("pointerdown", D), document.removeEventListener("pointerup", O), C(), w();
|
|
540
540
|
};
|
|
541
|
-
}, [j, Dt, C,
|
|
541
|
+
}, [j, Dt, C, at]);
|
|
542
542
|
const St = j ? l && kt : l, [I, _t] = P({
|
|
543
543
|
lg: [],
|
|
544
544
|
md: [],
|
|
545
545
|
sm: [],
|
|
546
546
|
xs: [],
|
|
547
547
|
xxs: []
|
|
548
|
-
}), [qt, ee] = P("lg"), [S, re] = P(
|
|
548
|
+
}), [qt, ee] = P("lg"), [S, re] = P(u.lg ?? Xt), [ne, ut] = P(p), [ie, Bt] = P(!1), se = yt(() => b.split(".").join(" "), [b]), oe = yt(() => Ht ?? Xe, [Ht]), dt = yt(() => new Map(e.map((t) => [t.id, t.type])), [e]), L = B(/* @__PURE__ */ new Map()), mt = G((t) => L.current.get(t) ?? dt.get(t) ?? "s", [dt]), $ = G((t) => t.map((f) => ({
|
|
549
549
|
id: f,
|
|
550
550
|
type: mt(f)
|
|
551
|
-
})), [mt]), Mt = G((t) =>
|
|
551
|
+
})), [mt]), Mt = G((t) => u[t] ?? u.md ?? Xt, [u]), H = G((t, f, c) => {
|
|
552
552
|
const w = c ?? R, h = f[t] ?? [], D = V.current[t] ?? [], O = new Map(h.map((k) => [k.i, k])), g = new Map(D.map((k) => [k.i, k]));
|
|
553
553
|
return w.map((k) => {
|
|
554
554
|
const E = mt(k), T = O.get(k) ?? g.get(k) ?? null, W = U.current[k] ?? tt(E), X = T ? {
|
|
@@ -608,7 +608,7 @@ const or = (e) => {
|
|
|
608
608
|
const O = Q.current[D - 1], g = Q.current[D];
|
|
609
609
|
!O || !g || (w += Math.abs(g.x - O.x), h += Math.abs(g.y - O.y));
|
|
610
610
|
}
|
|
611
|
-
w + h < 10 || (w > h * 1.5 ?
|
|
611
|
+
w + h < 10 || (w > h * 1.5 ? ut("horizontal") : h > w * 1.5 && ut("vertical"));
|
|
612
612
|
}, [x]), jt = G(() => {
|
|
613
613
|
requestAnimationFrame(() => {
|
|
614
614
|
requestAnimationFrame(() => {
|
|
@@ -634,11 +634,11 @@ const or = (e) => {
|
|
|
634
634
|
});
|
|
635
635
|
}, [e]);
|
|
636
636
|
const ce = G((t, f, c, w, h, D) => {
|
|
637
|
-
Q.current = [],
|
|
637
|
+
Q.current = [], ut(p), j && (Nt.current = !0), st == null || st(t, f, c, w, h, D);
|
|
638
638
|
}, [p, st, j]), le = G((t, f, c, w, h, D) => {
|
|
639
639
|
$t(h.clientX, h.clientY), it == null || it(t, f, c, w, h, D);
|
|
640
640
|
}, [$t, it]), fe = G((t, f, c, w, h, D) => {
|
|
641
|
-
ot == null || ot(t, f, c, w, h, D), j &&
|
|
641
|
+
ot == null || ot(t, f, c, w, h, D), j && at();
|
|
642
642
|
const O = Pt(t);
|
|
643
643
|
_("[GridDND] dragStop: nextOrder(readingOrder)", O), ct(O);
|
|
644
644
|
const g = q(O), k = K.current, E = H(k, g, O);
|
|
@@ -650,10 +650,10 @@ const or = (e) => {
|
|
|
650
650
|
}, g, {
|
|
651
651
|
itemsOrder: O,
|
|
652
652
|
itemsOrderTyped: $(O)
|
|
653
|
-
}),
|
|
653
|
+
}), ut(p);
|
|
654
654
|
const T = t, W = g[k];
|
|
655
655
|
Ft(T, W) ? _("[GridDND] dragStop: live layout == target (OK)") : (_("[GridDND] dragStop: live layout != target → forceSyncWithRgl()"), jt());
|
|
656
|
-
}, [ot, j,
|
|
656
|
+
}, [ot, j, at, q, H, F, M, r, S, p, jt, _, $]), ae = G((t, f) => {
|
|
657
657
|
_("RGL onLayoutChange", {
|
|
658
658
|
cur: t,
|
|
659
659
|
all: f
|
|
@@ -702,7 +702,7 @@ const or = (e) => {
|
|
|
702
702
|
}, {
|
|
703
703
|
itemsOrder: R
|
|
704
704
|
});
|
|
705
|
-
}, [M, H, I, r, S, R, _]),
|
|
705
|
+
}, [M, H, I, r, S, R, _]), ue = G((t) => {
|
|
706
706
|
K.current = t, ee(t), re(Mt(t));
|
|
707
707
|
const f = q(R), c = H(t, f, R);
|
|
708
708
|
rt == null || rt(t, {
|
|
@@ -816,7 +816,7 @@ const or = (e) => {
|
|
|
816
816
|
userSelect: "none",
|
|
817
817
|
touchAction: "none"
|
|
818
818
|
} : {}
|
|
819
|
-
}, children: /* @__PURE__ */ Z(He, { className: "layout", layouts: I, breakpoints: n, cols: r, rowHeight: S, margin: s, containerPadding: d, isDraggable: St, isResizable: o, onLayoutChange:
|
|
819
|
+
}, children: /* @__PURE__ */ Z(He, { className: "layout", layouts: I, breakpoints: n, cols: r, rowHeight: S, margin: s, containerPadding: d, isDraggable: St, isResizable: o, onLayoutChange: ae, onBreakpointChange: ue, autoSize: i, useCSSTransforms: m, preventCollision: y, compactType: ie ? null : x ? ne : p, allowOverlap: N, isBounded: A, draggableHandle: b, draggableCancel: v, resizeHandles: o ? a : [], maxRows: Ut, transformScale: Vt, onWidthChange: de, onDrag: le, onDragStart: ce, onDragStop: fe, style: {
|
|
820
820
|
background: "transparent",
|
|
821
821
|
...Zt
|
|
822
822
|
}, children: me.map((t) => /* @__PURE__ */ Z(Se, { $isDraggable: j ? kt && Ct === t.id : l, children: /* @__PURE__ */ Z(oe, { isDraggable: St, className: se, children: typeof bt == "function" ? bt(t, () => Rt(t.id), (f) => Gt(t.id, f)) : bt }) }, t.id)) }) });
|
|
@@ -4,7 +4,7 @@ import { Box as tt } from "../components/Box/index.mjs";
|
|
|
4
4
|
import { EmbedIconButton as et } from "@salutejs/sdds-finai";
|
|
5
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
6
|
import p, { css as ct } from "styled-components";
|
|
7
|
-
import { t as dt,
|
|
7
|
+
import { t as dt, f as ut, e as pt } from "./utils-Hu77fGGe.mjs";
|
|
8
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",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const c=require("react/jsx-runtime"),Y=require("@salutejs/plasma-icons"),Z=require("../components/Box/index.cjs"),ee=require("@salutejs/sdds-finai"),s=require("@salutejs/sdds-themes/tokens/sdds_finai"),h=require("styled-components"),A=require("./utils-
|
|
1
|
+
"use strict";const c=require("react/jsx-runtime"),Y=require("@salutejs/plasma-icons"),Z=require("../components/Box/index.cjs"),ee=require("@salutejs/sdds-finai"),s=require("@salutejs/sdds-themes/tokens/sdds_finai"),h=require("styled-components"),A=require("./utils-OQNruMpn.cjs"),n=require("react"),z={icon:"left-panel__toggle-button",leftBlockIsResizing:"left-panel__is-resizing"},te=72,ne=56,q=240,se=540,$=.2,ie=h(Z.Box).withConfig({displayName:"styled__PanelContainer"})(["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:",";"],({minWidth:e})=>e,()=>s.surfaceSolidCard,({$isAdaptive1280:e})=>e?s.spacing8x:s.spacing12x,s.spacing8x,()=>s.shadowDownSoftS,e=>e.$resizing?"none":`max-width ${$}s ease-in-out, opacity ${$}s ease-in-out`,e=>e.width!==void 0?`${Math.min(e.width,e.maxWidth)}px`:`${e.minWidth}px`,({showResizeable:e})=>e?s.spacing6x:0),oe=h.div.withConfig({displayName:"styled__PanelCrossfade"})(["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;"]),W=h.css(["grid-area:1 / 1;min-width:0;min-height:0;opacity:",";visibility:",";pointer-events:",";transition:opacity ","s ease-in-out,visibility 0s ",";"],({$active:e})=>e?1:0,({$active:e})=>e?"visible":"hidden",({$active:e})=>e?"auto":"none",$,({$active:e})=>e?"0s":`${$}s`),re=h.div.withConfig({displayName:"styled__PanelContent"})(["",";width:100%;height:100%;margin-top:0;position:relative;"],W),ae=h.div.withConfig({displayName:"styled__PanelCollapsedContent"})(["",";height:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:",";width:100%;"],W,({$isAdaptive1280:e,showResizeable:t})=>t?e?"6px":"10px":s.spacing8x),le=h.div.withConfig({displayName:"styled__PanelCollapsedBody"})(["gap:",";display:flex;flex-direction:column;"],s.spacing8x),ce=h(ee.EmbedIconButton).withConfig({displayName:"styled__PanelIconButton"})(["z-index:1;position:",";top:",";right:",";width:","px !important;height:","px !important;.left-panel__toggle-button{transform:",";}"],e=>e.isAbsolute?"absolute":"static",s.spacing8x,s.spacing8x,({$isAdaptive1280:e})=>e?32:40,({$isAdaptive1280:e})=>e?32:40,e=>e.collapsed?"rotate(270deg)":"rotate(90deg)"),de=h.div.withConfig({displayName:"styled__PanelSeparator"})(["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:",";}}"],()=>s.surfaceSolidSecondary,`calc(50% - ${s.spacing16x} / 2)`,s.spacing16x,()=>s.outlineSolidSecondary,()=>s.outlineSolidSecondaryHover),j=({onClick:e,collapsed:t=!1,isAbsolute:o=!1,isAdaptive1280:a=!1,...u})=>c.jsx(ce,{onClick:e,$isAdaptive1280:a,collapsed:t,isAbsolute:o,view:"secondary",size:a?"s":"l",...u,children:c.jsx(Y.IconArrowBarDown,{className:z.icon})}),T=({setWidth:e,isResizingRef:t,setIsResizing:o,panelRef:a,minWidth:u,maxWidth:b,parentRef:P,isCollapsed:C,onResize:m})=>{const L=n.useCallback(()=>{var f;document.body.style.cursor="col-resize",document.body.style.userSelect="none",t.current=!0,o(!0),(f=a.current)==null||f.classList.add(z.leftBlockIsResizing)},[a,t,o]);return n.useEffect(()=>{const f=()=>{var _,r;document.body.style.cursor="auto",document.body.style.userSelect="",t.current=!1,o(!1),(_=a.current)==null||_.classList.remove(z.leftBlockIsResizing);const g=((r=a.current)==null?void 0:r.clientWidth)??0;g>u&&g<q&&e(u)},B=g=>{if(!t.current||!a.current||!P.current)return;g.preventDefault();const d=P.current.getBoundingClientRect(),r=g.clientX-d.left,l=A.clamp(u,r,b);e(l),!C&&m&&m(l)},x=A.throttleWithLastCall(B,16);return window.addEventListener("mousemove",x),window.addEventListener("mouseup",f),()=>{window.removeEventListener("mousemove",x),window.removeEventListener("mouseup",f)}},[e,t,o,a,u,b,P,C,m]),{startResizing:L}},X=e=>({buttonSize:e?"xs":"s"}),H=(e,t)=>t??(e?ne:te),E=(e,t)=>typeof e=="function"?e(t):e,O=({widthState:e,minWidth:t,maxWidth:o=se,disableMediaAdaptive:a=!1,collapseState:u,containerProps:b,contentProps:P,collapsedContentProps:C,expandedContent:m,collapsedContent:L,collapsedFooterContent:f,showToggleButton:B=!0,showResizeable:x=!0,onResize:g,onToggleCollapse:d})=>{const{down:_}=A.useBreakpoint(),r=!a&&_("xl"),l=H(r,t),w=n.useMemo(()=>X(r),[r]),R=n.useMemo(()=>E(m,w),[m,w]),F=n.useMemo(()=>E(L,w),[L,w]),K=n.useMemo(()=>E(f,w),[f,w]),V=n.useState(!1),[i,I]=u??V,G=n.useState(Number(i?l:o)),[y,v]=e??G,N=n.useRef(null),M=n.useRef(null),k=n.useRef(!1),[J,Q]=n.useState(!1),{startResizing:U}=T({setWidth:v,isResizingRef:k,setIsResizing:Q,panelRef:N,minWidth:l,maxWidth:o,parentRef:M,isCollapsed:i,onResize:g});n.useEffect(()=>{if(y!==void 0){const p=y<q;p!==i&&(I(p),d&&!k.current&&d(p))}},[y,i,d,I]),n.useEffect(()=>{!k.current&&i&&y!==l&&v(l)},[i,l,v,y]);const D=n.useCallback(()=>{I(p=>{const S=!p;return d&&d(S),v(S?l:o),S})},[d,I,v,l,o]);return c.jsxs(ie,{ref:N,collapsed:i,maxWidth:o,minWidth:l,width:y,$resizing:J,$isAdaptive1280:r,showResizeable:x,...b,children:[c.jsxs(oe,{children:[c.jsxs(re,{$active:!i,"aria-hidden":i,...P,children:[B&&c.jsx(j,{onClick:D,collapsed:i,isAdaptive1280:r,isAbsolute:!0}),R]}),c.jsxs(ae,{$active:i,"aria-hidden":!i,$isAdaptive1280:r,showResizeable:x,...C,children:[c.jsxs(le,{children:[B&&c.jsx(j,{onClick:D,collapsed:i,isAdaptive1280:r}),F]}),K]})]}),x&&c.jsx(de,{onMouseDown:p=>{var S;p.preventDefault(),(S=N.current)!=null&&S.parentElement&&(M.current=N.current.parentElement),U()}})]})};O.LeftPanelToggleButton=j;exports.LeftPanel=O;exports.LeftPanelToggleButton=j;exports.getLeftPanelMinWidth=H;exports.getLeftPanelSlotSizes=X;exports.renderLeftPanelSlot=E;exports.toggleButtonClassNames=z;exports.useResize=T;
|
|
@@ -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-FrYs56BB.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-Hu77fGGe.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-CS27WxA6.mjs";
|
|
12
12
|
const x = "list-of-filters", h = {
|
|
13
13
|
chipsGroup: `${x}__chip-group`,
|
|
14
14
|
chipsGroupLabel: `${x}__chip-group__label`,
|