@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
|
@@ -0,0 +1,797 @@
|
|
|
1
|
+
import { Popup as bt, popupClasses as It, TextXS as Ct, TextS as Dt, TextM as Pt, TextL as Nt, H5 as Rt, H4 as Mt, H3 as Ht, H2 as Wt, H1 as zt, DsplS as Ot, DsplM as Ft, DsplL as kt, BodyXXS as Gt, BodyXS as Bt, BodyS as $t, BodyM as Xt, BodyL as Kt, Tooltip as gt, IconButton as at, Divider as Ut } from "@salutejs/sdds-finai";
|
|
2
|
+
import { jsxs as U, jsx as p, Fragment as Yt } from "react/jsx-runtime";
|
|
3
|
+
import { surfaceSolidCard as Vt, outlineAccentGradient as Zt, inverseTextPrimary as jt, bodyXS as Jt, shadowGradientDark as qt, shadowGradientLight as Qt } from "@salutejs/sdds-themes/tokens/sdds_finai";
|
|
4
|
+
import T, { css as mt } from "styled-components";
|
|
5
|
+
import { a as te, t as ee, d as ne } from "./utils-Hu77fGGe.mjs";
|
|
6
|
+
import { useState as O, useEffect as X, forwardRef as ct, useRef as W, useCallback as P, useMemo as B, useLayoutEffect as oe } from "react";
|
|
7
|
+
import { TextArea as ie } from "../components/TextArea/index.mjs";
|
|
8
|
+
import { br as re } from "../constants/index.mjs";
|
|
9
|
+
import { buildPopupResizableConfig as se } from "../shared/utils/resizable/index.mjs";
|
|
10
|
+
import { IconClose as ce } from "@salutejs/plasma-icons";
|
|
11
|
+
const ut = 5, le = 4, de = 12, ae = 360, ue = 360, pe = 16, he = {
|
|
12
|
+
width: 400,
|
|
13
|
+
height: 540
|
|
14
|
+
}, pt = 56, fe = 100, ge = "ai-agent-popup-state", me = 300, yt = "ai-agent-popup-dragging", ht = 'button, a, input, textarea, select, [contenteditable="true"], [data-no-drag]', ye = 0.93, ve = 79, we = 220, xe = 23, vt = 48, wt = 300, Ae = 8, Se = 12, _e = 1, Te = 2, st = 40, Ee = 2, V = 800, Le = 615, k = {
|
|
15
|
+
bg: () => Vt,
|
|
16
|
+
outline: () => Zt,
|
|
17
|
+
radius: () => re.m,
|
|
18
|
+
padding: () => `${pe}px`
|
|
19
|
+
}, be = T(bt).withConfig({
|
|
20
|
+
displayName: "AiAgentPopupstyled__StyledPopup"
|
|
21
|
+
})(["&& .", "{padding:0;}&.", "{cursor:grabbing;user-select:none;}"], It.root, yt), Ie = T.div.withConfig({
|
|
22
|
+
displayName: "AiAgentPopupstyled__StyledSurfaceFloating"
|
|
23
|
+
})(["position:relative;width:100%;height:100%;min-width:0;min-height:0;border-radius:", ";touch-action:none;&::after{content:'';position:absolute;inset:-4px;border-radius:calc(", " + 4px);box-shadow:", ";pointer-events:none;}&::before{content:'';position:absolute;inset:-4px;border-radius:calc(", " + 4px);background:", ";pointer-events:none;}"], k.radius, k.radius, ({
|
|
24
|
+
$shadow: t
|
|
25
|
+
}) => t, k.radius, k.outline), Ce = T.div.withConfig({
|
|
26
|
+
displayName: "AiAgentPopupstyled__StyledSurfaceEmbedded"
|
|
27
|
+
})(["position:relative;min-width:0;min-height:0;display:flex;flex-direction:column;padding:4px;border-radius:calc(", " + 4px);background:", ";box-shadow:", ";"], k.radius, k.outline, ({
|
|
28
|
+
$shadow: t
|
|
29
|
+
}) => t), De = T.div.withConfig({
|
|
30
|
+
displayName: "AiAgentPopupstyled__StyledCard"
|
|
31
|
+
})(["position:relative;display:flex;flex-direction:row;width:100%;height:100%;min-width:0;min-height:0;padding:", ";border-radius:", ";background:", ";overflow:hidden;"], k.padding, k.radius, k.bg), Pe = T.div.withConfig({
|
|
32
|
+
displayName: "AiAgentPopupstyled__StyledCardContent"
|
|
33
|
+
})(["position:relative;z-index:1;flex:1 1 auto;min-width:0;min-height:0;display:flex;flex-direction:column;"]), Ne = T.div.withConfig({
|
|
34
|
+
displayName: "AiAgentPopupstyled__StyledInputRoot"
|
|
35
|
+
})(["position:relative;"]), Re = `linear-gradient(
|
|
36
|
+
268.89deg,
|
|
37
|
+
rgba(157, 179, 255, 1) 6.881%,
|
|
38
|
+
rgba(0, 224, 255, 1) 50.076%,
|
|
39
|
+
rgba(157, 179, 255, 1) 99.883%
|
|
40
|
+
)`, Me = `linear-gradient(
|
|
41
|
+
268.89deg,
|
|
42
|
+
rgba(111, 144, 255, 0.7) 6.881%,
|
|
43
|
+
rgba(11, 226, 255, 0.8) 50.076%,
|
|
44
|
+
rgba(111, 144, 255, 0.7) 99.883%
|
|
45
|
+
)`, He = T.div.withConfig({
|
|
46
|
+
displayName: "AiAgentPopupstyled__StyledInputGlow"
|
|
47
|
+
})(["position:absolute;top:", "px;height:", "px;left:50%;transform:translateX(-50%);width:", "%;z-index:1;border-radius:50%;background:", ";filter:blur(40px);opacity:", ";transition:opacity 0.3s ease;pointer-events:none;"], -25, ve, ye * 100, ({
|
|
48
|
+
$isDark: t
|
|
49
|
+
}) => t ? Me : Re, ({
|
|
50
|
+
$visible: t,
|
|
51
|
+
$isDark: e
|
|
52
|
+
}) => t ? e ? 1 : 0.56 : 0), We = T.div.withConfig({
|
|
53
|
+
displayName: "AiAgentPopupstyled__StyledInputBackplate"
|
|
54
|
+
})(["background:", ";border-radius:0.625rem;position:relative;z-index:2;textarea{max-height:", "px;}"], k.bg, ({
|
|
55
|
+
$maxHeight: t
|
|
56
|
+
}) => t - xe), ze = T.div.withConfig({
|
|
57
|
+
displayName: "AiAgentPopupstyled__StyledLeftPanel"
|
|
58
|
+
})(["display:flex;align-items:stretch;flex:none;height:100%;"]), Oe = T.div.withConfig({
|
|
59
|
+
displayName: "AiAgentPopupstyled__StyledLeftPanelZone"
|
|
60
|
+
})(["position:relative;flex:none;height:100%;overflow:hidden;width:", "px;transition:width 0.3s ease;"], ({
|
|
61
|
+
$open: t
|
|
62
|
+
}) => t ? wt : vt), xt = mt(["position:absolute;top:0;left:0;box-sizing:border-box;height:100%;padding-right:", "px;opacity:", ";pointer-events:", ";transition:opacity 0.3s ease;"], Ae, ({
|
|
63
|
+
$active: t
|
|
64
|
+
}) => t ? 1 : 0, ({
|
|
65
|
+
$active: t
|
|
66
|
+
}) => t ? "auto" : "none"), Fe = T.div.withConfig({
|
|
67
|
+
displayName: "AiAgentPopupstyled__StyledRail"
|
|
68
|
+
})(["", ";width:", "px;display:flex;flex-direction:column;align-items:flex-start;gap:4px;"], xt, vt), ke = T.div.withConfig({
|
|
69
|
+
displayName: "AiAgentPopupstyled__StyledSection"
|
|
70
|
+
})(["", ";width:", "px;display:flex;flex-direction:column;"], xt, wt), Ge = T.div.withConfig({
|
|
71
|
+
displayName: "AiAgentPopupstyled__StyledSectionHeader"
|
|
72
|
+
})(["flex:none;height:", "px;display:flex;align-items:center;gap:", "px;"], st, Ee), Be = T.div.withConfig({
|
|
73
|
+
displayName: "AiAgentPopupstyled__StyledSectionTitleIcon"
|
|
74
|
+
})(["flex:none;display:flex;align-items:center;justify-content:center;width:", "px;height:", "px;"], st, st), $e = T.div.withConfig({
|
|
75
|
+
displayName: "AiAgentPopupstyled__StyledSectionTitle"
|
|
76
|
+
})(["flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]), Xe = T.div.withConfig({
|
|
77
|
+
displayName: "AiAgentPopupstyled__StyledSectionContent"
|
|
78
|
+
})(["flex:1 1 auto;min-height:0;"]), Ke = T.div.withConfig({
|
|
79
|
+
displayName: "AiAgentPopupstyled__StyledLeftPanelDivider"
|
|
80
|
+
})(["flex:none;display:flex;width:", "px;margin-right:", "px;& > *{width:100%;height:100%;}& > *::before{border-radius:", "px;}"], _e, Se, Te), rt = () => {
|
|
81
|
+
var t;
|
|
82
|
+
return !!((t = document.documentElement.getAttribute("data-theme")) != null && t.toLowerCase().includes("dark"));
|
|
83
|
+
}, At = () => {
|
|
84
|
+
const [t, e] = O(rt);
|
|
85
|
+
return X(() => {
|
|
86
|
+
e(rt());
|
|
87
|
+
const c = new MutationObserver(() => e(rt()));
|
|
88
|
+
return c.observe(document.documentElement, {
|
|
89
|
+
attributes: !0,
|
|
90
|
+
attributeFilter: ["data-theme"]
|
|
91
|
+
}), () => c.disconnect();
|
|
92
|
+
}, []), t;
|
|
93
|
+
}, Ue = ct(({
|
|
94
|
+
glow: t = !1,
|
|
95
|
+
rightSlot: e,
|
|
96
|
+
maxHeight: c = we,
|
|
97
|
+
className: n,
|
|
98
|
+
style: s,
|
|
99
|
+
...r
|
|
100
|
+
}, o) => {
|
|
101
|
+
const d = At(), f = {
|
|
102
|
+
size: "s",
|
|
103
|
+
rows: 1,
|
|
104
|
+
autoResize: !0,
|
|
105
|
+
...r,
|
|
106
|
+
contentRight: e
|
|
107
|
+
};
|
|
108
|
+
return /* @__PURE__ */ U(Ne, { ref: o, className: n, style: s, children: [
|
|
109
|
+
/* @__PURE__ */ p(He, { $visible: t, $isDark: d, "aria-hidden": !0 }),
|
|
110
|
+
/* @__PURE__ */ p(We, { $maxHeight: c, children: /* @__PURE__ */ p(ie, { ...f }) })
|
|
111
|
+
] });
|
|
112
|
+
});
|
|
113
|
+
Ue.displayName = "AiAgentInput";
|
|
114
|
+
const St = (t) => !t || t === "document" ? null : typeof t == "string" ? document.getElementById(t) : t.current ?? null, Z = (t) => {
|
|
115
|
+
const e = St(t);
|
|
116
|
+
if (!e)
|
|
117
|
+
return {
|
|
118
|
+
left: 0,
|
|
119
|
+
top: 0,
|
|
120
|
+
width: window.innerWidth,
|
|
121
|
+
height: window.innerHeight
|
|
122
|
+
};
|
|
123
|
+
const c = e.getBoundingClientRect();
|
|
124
|
+
return {
|
|
125
|
+
left: c.left + e.clientLeft - e.scrollLeft,
|
|
126
|
+
top: c.top + e.clientTop - e.scrollTop,
|
|
127
|
+
width: e.scrollWidth,
|
|
128
|
+
height: e.scrollHeight
|
|
129
|
+
};
|
|
130
|
+
}, _t = () => ({
|
|
131
|
+
left: 0,
|
|
132
|
+
top: 0,
|
|
133
|
+
width: window.innerWidth,
|
|
134
|
+
height: window.innerHeight
|
|
135
|
+
}), ft = (t, e = {
|
|
136
|
+
width: 0,
|
|
137
|
+
height: 0
|
|
138
|
+
}, c = {}, n) => {
|
|
139
|
+
const {
|
|
140
|
+
width: s,
|
|
141
|
+
height: r
|
|
142
|
+
} = n ?? _t(), {
|
|
143
|
+
top: o = 0,
|
|
144
|
+
right: d = 0,
|
|
145
|
+
bottom: f = 0,
|
|
146
|
+
left: y = 0
|
|
147
|
+
} = c;
|
|
148
|
+
return {
|
|
149
|
+
x: Math.max(y, Math.min(t.x, s - e.width - d)),
|
|
150
|
+
y: Math.max(o, Math.min(t.y, r - e.height - f))
|
|
151
|
+
};
|
|
152
|
+
}, Ye = (t, e) => ({
|
|
153
|
+
top: ((t == null ? void 0 : t.top) ?? 0) + e,
|
|
154
|
+
right: ((t == null ? void 0 : t.right) ?? 0) + e,
|
|
155
|
+
bottom: ((t == null ? void 0 : t.bottom) ?? 0) + e,
|
|
156
|
+
left: ((t == null ? void 0 : t.left) ?? 0) + e
|
|
157
|
+
}), Ve = (t, e, c) => {
|
|
158
|
+
const n = t.getBoundingClientRect(), {
|
|
159
|
+
left: s,
|
|
160
|
+
top: r
|
|
161
|
+
} = c ?? _t(), o = typeof e == "number" ? e : e.x ?? 0, d = typeof e == "number" ? 0 : e.y ?? 0;
|
|
162
|
+
return {
|
|
163
|
+
x: n.right + o - s,
|
|
164
|
+
y: n.top + d - r
|
|
165
|
+
};
|
|
166
|
+
}, Ze = () => ({
|
|
167
|
+
x: pt,
|
|
168
|
+
y: pt
|
|
169
|
+
}), je = (t, e, c = {}, n) => {
|
|
170
|
+
const {
|
|
171
|
+
width: s,
|
|
172
|
+
height: r
|
|
173
|
+
} = n ?? {
|
|
174
|
+
width: window.innerWidth,
|
|
175
|
+
height: window.innerHeight
|
|
176
|
+
}, {
|
|
177
|
+
left: o = 0,
|
|
178
|
+
right: d = 0,
|
|
179
|
+
top: f = 0,
|
|
180
|
+
bottom: y = 0
|
|
181
|
+
} = c, v = (s - o - d) / 3, E = (r - f - y) / 2, g = t.x - o, h = t.y - f;
|
|
182
|
+
let w = 1, A = -1;
|
|
183
|
+
for (let C = 1; C <= 6; C += 1) {
|
|
184
|
+
const a = (C - 1) % 3 * v, S = C <= 3 ? 0 : E, m = Math.max(0, Math.min(g + e.width, a + v) - Math.max(g, a)), l = Math.max(0, Math.min(h + e.height, S + E) - Math.max(h, S)), u = m * l;
|
|
185
|
+
u > A && (A = u, w = C);
|
|
186
|
+
}
|
|
187
|
+
return w;
|
|
188
|
+
}, Je = (t) => {
|
|
189
|
+
switch (t) {
|
|
190
|
+
case 1:
|
|
191
|
+
case 2:
|
|
192
|
+
return "bottom-right";
|
|
193
|
+
case 3:
|
|
194
|
+
return "bottom-left";
|
|
195
|
+
case 4:
|
|
196
|
+
case 5:
|
|
197
|
+
return "top-right";
|
|
198
|
+
case 6:
|
|
199
|
+
return "top-left";
|
|
200
|
+
default:
|
|
201
|
+
return "bottom-right";
|
|
202
|
+
}
|
|
203
|
+
}, qe = (t, e = "bottom-right") => se(t, {
|
|
204
|
+
corner: e,
|
|
205
|
+
minWidth: ae,
|
|
206
|
+
minHeight: ue
|
|
207
|
+
}), Qe = {
|
|
208
|
+
BodyL: Kt,
|
|
209
|
+
BodyM: Xt,
|
|
210
|
+
BodyS: $t,
|
|
211
|
+
BodyXS: Bt,
|
|
212
|
+
BodyXXS: Gt,
|
|
213
|
+
DsplL: kt,
|
|
214
|
+
DsplM: Ft,
|
|
215
|
+
DsplS: Ot,
|
|
216
|
+
H1: zt,
|
|
217
|
+
H2: Wt,
|
|
218
|
+
H3: Ht,
|
|
219
|
+
H4: Mt,
|
|
220
|
+
H5: Rt,
|
|
221
|
+
TextL: Nt,
|
|
222
|
+
TextM: Pt,
|
|
223
|
+
TextS: Dt,
|
|
224
|
+
TextXS: Ct
|
|
225
|
+
};
|
|
226
|
+
function lt({
|
|
227
|
+
variant: t,
|
|
228
|
+
children: e,
|
|
229
|
+
refTypography: c,
|
|
230
|
+
...n
|
|
231
|
+
}) {
|
|
232
|
+
const s = Qe[t];
|
|
233
|
+
return /* @__PURE__ */ p(s, { ...n, ref: c, children: e });
|
|
234
|
+
}
|
|
235
|
+
lt.displayName = "Typography";
|
|
236
|
+
const nt = "typography-with-auto-tooltip-root";
|
|
237
|
+
let q = !1, $ = null, et = 0;
|
|
238
|
+
function Tt() {
|
|
239
|
+
if (typeof document > "u")
|
|
240
|
+
return;
|
|
241
|
+
const t = document.getElementById(nt);
|
|
242
|
+
t && t.querySelectorAll("[id^='plasma-popover-root']:empty").forEach((e) => e.remove());
|
|
243
|
+
}
|
|
244
|
+
function tn() {
|
|
245
|
+
q || (q = !0, $ = setTimeout(() => {
|
|
246
|
+
q = !1, $ = null, Tt();
|
|
247
|
+
}, 0));
|
|
248
|
+
}
|
|
249
|
+
function en() {
|
|
250
|
+
$ && (clearTimeout($), $ = null), q = !1;
|
|
251
|
+
}
|
|
252
|
+
function nn() {
|
|
253
|
+
$ && (clearTimeout($), $ = null), q = !1, Tt();
|
|
254
|
+
}
|
|
255
|
+
function on() {
|
|
256
|
+
if (!(typeof document > "u")) {
|
|
257
|
+
if (et += 1, et === 1) {
|
|
258
|
+
const t = document.createElement("div");
|
|
259
|
+
t.id = nt, document.body.appendChild(t);
|
|
260
|
+
}
|
|
261
|
+
return () => {
|
|
262
|
+
if (et -= 1, et === 0) {
|
|
263
|
+
const t = document.getElementById(nt);
|
|
264
|
+
t && (t.querySelectorAll("[id^='plasma-popover-root']").length > 0 || t.remove());
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
function rn() {
|
|
270
|
+
return {
|
|
271
|
+
schedule: tn,
|
|
272
|
+
flush: nn,
|
|
273
|
+
cancel: en,
|
|
274
|
+
getContainerId: () => nt,
|
|
275
|
+
createContainer: on
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
const sn = T.div.withConfig({
|
|
279
|
+
displayName: "TooltipList__StyledTooltipContent"
|
|
280
|
+
})(["color:", ";", ";max-height:130px;overflow-y:auto;padding-block:2px;padding-right:2px;& > ul{padding-top:1px;display:flex;flex-direction:column;gap:1px;margin:0;padding:0;list-style:none;}& li{padding-left:12px;position:relative;&::before{content:'•';position:absolute;left:2px;}}"], () => jt, () => mt(Jt)), cn = ({
|
|
281
|
+
groupLabel: t,
|
|
282
|
+
items: e
|
|
283
|
+
}) => /* @__PURE__ */ U(sn, { children: [
|
|
284
|
+
/* @__PURE__ */ p("span", { children: t }),
|
|
285
|
+
/* @__PURE__ */ p("ul", { children: e.map((c, n) => (
|
|
286
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
287
|
+
/* @__PURE__ */ p("li", { children: c }, `${c}-${n}`)
|
|
288
|
+
)) })
|
|
289
|
+
] }), ln = T.div.withConfig({
|
|
290
|
+
displayName: "TooltipList__FullWidthWrapper"
|
|
291
|
+
})(["width:100%;& .popover-target,& .popover-wrapper{width:100%;}"]), Cn = ({
|
|
292
|
+
groupLabel: t,
|
|
293
|
+
items: e,
|
|
294
|
+
children: c,
|
|
295
|
+
fullWidth: n,
|
|
296
|
+
...s
|
|
297
|
+
}) => {
|
|
298
|
+
const r = e.length > 0, o = /* @__PURE__ */ p(
|
|
299
|
+
gt,
|
|
300
|
+
{
|
|
301
|
+
usePortal: !0,
|
|
302
|
+
size: "s",
|
|
303
|
+
mouseEnterDelay: 500,
|
|
304
|
+
...s,
|
|
305
|
+
trigger: r ? s.trigger ?? "hover" : "none",
|
|
306
|
+
text: r ? /* @__PURE__ */ p(cn, { groupLabel: t, items: e }) : null,
|
|
307
|
+
opened: r ? s.opened : !1,
|
|
308
|
+
children: c
|
|
309
|
+
}
|
|
310
|
+
);
|
|
311
|
+
return n ? /* @__PURE__ */ p(ln, { children: o }) : o;
|
|
312
|
+
}, dn = T(gt).withConfig({
|
|
313
|
+
displayName: "TypographyWithAutoTooltipstyled__StyledTooltip"
|
|
314
|
+
})(["&.popover-target{width:100%;}"]), an = T.div.withConfig({
|
|
315
|
+
displayName: "TypographyWithAutoTooltipstyled__StyleTooltipWrapper"
|
|
316
|
+
})(["display:flex;align-items:center;min-width:0;& .popover-target{width:100%;}& .popover-wrapper{overflow:hidden;width:100%;display:flex;}"]), un = 1, Dn = ({
|
|
317
|
+
tooltipText: t,
|
|
318
|
+
tooltipProps: e,
|
|
319
|
+
lines: c = 1,
|
|
320
|
+
className: n,
|
|
321
|
+
children: s,
|
|
322
|
+
...r
|
|
323
|
+
}) => {
|
|
324
|
+
const {
|
|
325
|
+
mouseEnterDelay: o = 500,
|
|
326
|
+
mouseLeaveDelay: d = 0,
|
|
327
|
+
...f
|
|
328
|
+
} = e || {}, y = W(null), [v, E] = O(!1), g = W(), {
|
|
329
|
+
schedule: h,
|
|
330
|
+
getContainerId: w,
|
|
331
|
+
createContainer: A
|
|
332
|
+
} = rn(), C = P(() => {
|
|
333
|
+
if (!y.current)
|
|
334
|
+
return !1;
|
|
335
|
+
const L = y.current;
|
|
336
|
+
if (c > 1)
|
|
337
|
+
return L.scrollHeight > L.clientHeight || L.scrollWidth > L.clientWidth;
|
|
338
|
+
try {
|
|
339
|
+
const D = document.createRange();
|
|
340
|
+
D.selectNodeContents(L);
|
|
341
|
+
const H = D.getBoundingClientRect().width, b = L.getBoundingClientRect().width;
|
|
342
|
+
D.detach();
|
|
343
|
+
const z = window.devicePixelRatio || 1;
|
|
344
|
+
return (H - b) * z > un;
|
|
345
|
+
} catch {
|
|
346
|
+
return !1;
|
|
347
|
+
}
|
|
348
|
+
}, [c]), a = P(() => {
|
|
349
|
+
C() && (g.current = setTimeout(() => {
|
|
350
|
+
E(!0);
|
|
351
|
+
}, o));
|
|
352
|
+
}, [C, o]), S = P(() => {
|
|
353
|
+
clearTimeout(g.current), setTimeout(() => {
|
|
354
|
+
E(!1), h();
|
|
355
|
+
}, d);
|
|
356
|
+
}, [d, h]), {
|
|
357
|
+
variant: m,
|
|
358
|
+
bold: l,
|
|
359
|
+
size: u,
|
|
360
|
+
...i
|
|
361
|
+
} = r, x = {
|
|
362
|
+
variant: m,
|
|
363
|
+
...l !== void 0 && {
|
|
364
|
+
bold: l
|
|
365
|
+
},
|
|
366
|
+
...u !== void 0 && {
|
|
367
|
+
size: u
|
|
368
|
+
},
|
|
369
|
+
...i,
|
|
370
|
+
refTypography: y,
|
|
371
|
+
onMouseEnter: (L) => {
|
|
372
|
+
var D;
|
|
373
|
+
(D = i.onMouseEnter) == null || D.call(i, L);
|
|
374
|
+
},
|
|
375
|
+
onMouseLeave: (L) => {
|
|
376
|
+
var D;
|
|
377
|
+
(D = i.onMouseLeave) == null || D.call(i, L);
|
|
378
|
+
},
|
|
379
|
+
style: {
|
|
380
|
+
...te({
|
|
381
|
+
lines: c
|
|
382
|
+
}),
|
|
383
|
+
...i.style || {}
|
|
384
|
+
},
|
|
385
|
+
children: s
|
|
386
|
+
}, M = /* @__PURE__ */ p(lt, { ...x, children: s });
|
|
387
|
+
return X(() => A(), [A]), X(() => () => {
|
|
388
|
+
clearTimeout(g.current), h();
|
|
389
|
+
}, [h]), /* @__PURE__ */ p(an, { className: n, onMouseEnter: a, onMouseLeave: S, children: v ? /* @__PURE__ */ p(dn, { opened: v, text: t ?? "", target: M, frame: w(), ...f }) : M });
|
|
390
|
+
}, Et = ({
|
|
391
|
+
items: t,
|
|
392
|
+
activeKey: e,
|
|
393
|
+
defaultActiveKey: c = null,
|
|
394
|
+
onActiveKeyChange: n
|
|
395
|
+
}) => {
|
|
396
|
+
const s = e !== void 0, [r, o] = O(c), d = s ? e : r, f = (h) => {
|
|
397
|
+
s || o(h), n == null || n(h);
|
|
398
|
+
}, y = t.find((h) => h.key === d) ?? null, v = !!y, E = W(y);
|
|
399
|
+
y && (E.current = y);
|
|
400
|
+
const g = E.current;
|
|
401
|
+
return /* @__PURE__ */ U(ze, { children: [
|
|
402
|
+
/* @__PURE__ */ U(Oe, { $open: v, children: [
|
|
403
|
+
/* @__PURE__ */ p(Fe, { $active: !v, "aria-hidden": v, children: t.map((h) => /* @__PURE__ */ p(at, { size: "s", view: "clear", onClick: () => f(h.key), children: h.icon }, h.key)) }),
|
|
404
|
+
/* @__PURE__ */ p(ke, { $active: v, "aria-hidden": !v, children: g && /* @__PURE__ */ U(Yt, { children: [
|
|
405
|
+
/* @__PURE__ */ U(Ge, { children: [
|
|
406
|
+
/* @__PURE__ */ p(Be, { children: g.titleIcon ?? g.icon }),
|
|
407
|
+
/* @__PURE__ */ p($e, { children: /* @__PURE__ */ p(lt, { variant: "BodyM", bold: !0, children: g.title }) }),
|
|
408
|
+
/* @__PURE__ */ p(at, { size: "s", view: "clear", onClick: () => f(null), children: /* @__PURE__ */ p(ce, { size: "s" }) })
|
|
409
|
+
] }),
|
|
410
|
+
/* @__PURE__ */ p(Xe, { children: g.content })
|
|
411
|
+
] }) })
|
|
412
|
+
] }),
|
|
413
|
+
/* @__PURE__ */ p(Ke, { children: /* @__PURE__ */ p(Ut, { orientation: "vertical" }) })
|
|
414
|
+
] });
|
|
415
|
+
};
|
|
416
|
+
Et.displayName = "AiAgentLeftPanel";
|
|
417
|
+
const Lt = ct(({
|
|
418
|
+
variant: t = "embedded",
|
|
419
|
+
leftPanel: e,
|
|
420
|
+
children: c,
|
|
421
|
+
...n
|
|
422
|
+
}, s) => {
|
|
423
|
+
const o = At() ? qt : Qt;
|
|
424
|
+
return /* @__PURE__ */ p(t === "floating" ? Ie : Ce, { ...n, ref: s, $shadow: o, children: /* @__PURE__ */ U(De, { children: [
|
|
425
|
+
e && /* @__PURE__ */ p(Et, { ...e }),
|
|
426
|
+
/* @__PURE__ */ p(Pe, { children: c })
|
|
427
|
+
] }) });
|
|
428
|
+
});
|
|
429
|
+
Lt.displayName = "AiAgentSurface";
|
|
430
|
+
const pn = ({
|
|
431
|
+
elementRef: t,
|
|
432
|
+
setPosition: e,
|
|
433
|
+
dragBoundary: c,
|
|
434
|
+
onPositionChange: n,
|
|
435
|
+
ignoreSelector: s,
|
|
436
|
+
frame: r
|
|
437
|
+
}) => {
|
|
438
|
+
const [o, d] = O(!1), [f, y] = O(!1), v = W({
|
|
439
|
+
x: 0,
|
|
440
|
+
y: 0
|
|
441
|
+
}), E = W({
|
|
442
|
+
x: 0,
|
|
443
|
+
y: 0
|
|
444
|
+
}), g = W(!1), h = W(null), w = B(() => s ? `${ht}, ${s}` : ht, [s]), A = P((i, x) => {
|
|
445
|
+
if (!t.current)
|
|
446
|
+
return;
|
|
447
|
+
g.current = !1, E.current = {
|
|
448
|
+
x: i,
|
|
449
|
+
y: x
|
|
450
|
+
}, h.current = Z(r);
|
|
451
|
+
const M = t.current.getBoundingClientRect();
|
|
452
|
+
v.current = {
|
|
453
|
+
x: i - M.left,
|
|
454
|
+
y: x - M.top
|
|
455
|
+
}, d(!0);
|
|
456
|
+
}, [t, r]), C = P((i) => {
|
|
457
|
+
i.button === 0 && (i.target.closest(w) || A(i.clientX, i.clientY));
|
|
458
|
+
}, [A, w]), a = P((i) => {
|
|
459
|
+
if (i.target.closest(w))
|
|
460
|
+
return;
|
|
461
|
+
const x = i.touches[0];
|
|
462
|
+
x && A(x.clientX, x.clientY);
|
|
463
|
+
}, [A, w]), S = P((i, x) => {
|
|
464
|
+
var Y;
|
|
465
|
+
if (!o || !t.current)
|
|
466
|
+
return;
|
|
467
|
+
const M = Math.abs(i - E.current.x), L = Math.abs(x - E.current.y);
|
|
468
|
+
if (!g.current && M < ut && L < ut)
|
|
469
|
+
return;
|
|
470
|
+
g.current || (g.current = !0, y(!0), (Y = window.getSelection()) == null || Y.removeAllRanges());
|
|
471
|
+
const {
|
|
472
|
+
offsetWidth: D,
|
|
473
|
+
offsetHeight: H
|
|
474
|
+
} = t.current, b = h.current ?? Z(r), {
|
|
475
|
+
top: z = 0,
|
|
476
|
+
right: F = 0,
|
|
477
|
+
bottom: N = 0,
|
|
478
|
+
left: I = 0
|
|
479
|
+
} = c || {}, _ = Math.max(I, Math.min(i - v.current.x - b.left, b.width - D - F)), R = Math.max(z, Math.min(x - v.current.y - b.top, b.height - H - N)), K = {
|
|
480
|
+
x: _,
|
|
481
|
+
y: R
|
|
482
|
+
};
|
|
483
|
+
e(K), n == null || n(K);
|
|
484
|
+
}, [o, t, c, e, n, r]), m = P((i) => {
|
|
485
|
+
S(i.clientX, i.clientY);
|
|
486
|
+
}, [S]), l = P((i) => {
|
|
487
|
+
const x = i.touches[0];
|
|
488
|
+
x && S(x.clientX, x.clientY);
|
|
489
|
+
}, [S]), u = P(() => {
|
|
490
|
+
d(!1), y(!1);
|
|
491
|
+
}, []);
|
|
492
|
+
return X(() => (o && (document.addEventListener("mousemove", m), document.addEventListener("mouseup", u), document.addEventListener("touchmove", l), document.addEventListener("touchend", u), document.addEventListener("touchcancel", u)), () => {
|
|
493
|
+
document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", u), document.removeEventListener("touchmove", l), document.removeEventListener("touchend", u), document.removeEventListener("touchcancel", u);
|
|
494
|
+
}), [o, m, l, u]), {
|
|
495
|
+
/** Порог пройден, окно перемещается: стили grabbing и запрет выделения */
|
|
496
|
+
dragActive: f,
|
|
497
|
+
/** Готовый набор обработчиков для контейнера окна */
|
|
498
|
+
dragHandlers: {
|
|
499
|
+
onMouseDown: C,
|
|
500
|
+
onTouchStart: a
|
|
501
|
+
}
|
|
502
|
+
};
|
|
503
|
+
}, hn = ({
|
|
504
|
+
opened: t,
|
|
505
|
+
targetRef: e,
|
|
506
|
+
targetGap: c,
|
|
507
|
+
defaultPosition: n,
|
|
508
|
+
savedPosition: s,
|
|
509
|
+
externalPositionState: r,
|
|
510
|
+
dragBoundary: o,
|
|
511
|
+
frame: d
|
|
512
|
+
}) => {
|
|
513
|
+
const f = W(null), [y, v] = O(null), E = P((a) => {
|
|
514
|
+
f.current = a, v(a);
|
|
515
|
+
}, []), [g, h] = O(() => s ?? n ?? null), w = r ? r[0] : g, A = P(
|
|
516
|
+
(a) => {
|
|
517
|
+
r ? r[1](a) : h(a);
|
|
518
|
+
},
|
|
519
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
520
|
+
[r == null ? void 0 : r[1]]
|
|
521
|
+
);
|
|
522
|
+
oe(() => {
|
|
523
|
+
if (!t)
|
|
524
|
+
return;
|
|
525
|
+
const a = y;
|
|
526
|
+
if (!a)
|
|
527
|
+
return;
|
|
528
|
+
const S = {
|
|
529
|
+
width: a.offsetWidth,
|
|
530
|
+
height: a.offsetHeight
|
|
531
|
+
}, m = Z(d), l = w ?? (e != null && e.current ? Ve(e.current, c, m) : Ze()), u = ft(l, S, o, m);
|
|
532
|
+
(!w || u.x !== w.x || u.y !== w.y) && A(u);
|
|
533
|
+
}, [t, y, w, e, c, o, d, A]);
|
|
534
|
+
const C = W(w);
|
|
535
|
+
return X(() => {
|
|
536
|
+
C.current = w;
|
|
537
|
+
}, [w]), X(() => {
|
|
538
|
+
if (!t)
|
|
539
|
+
return;
|
|
540
|
+
const a = ee(() => {
|
|
541
|
+
const l = f.current, u = C.current;
|
|
542
|
+
if (!l || !u)
|
|
543
|
+
return;
|
|
544
|
+
const i = ft(u, {
|
|
545
|
+
width: l.offsetWidth,
|
|
546
|
+
height: l.offsetHeight
|
|
547
|
+
}, o, Z(d));
|
|
548
|
+
(i.x !== u.x || i.y !== u.y) && A(i);
|
|
549
|
+
}, fe);
|
|
550
|
+
window.addEventListener("resize", a);
|
|
551
|
+
const S = St(d);
|
|
552
|
+
let m;
|
|
553
|
+
return S && (m = new ResizeObserver(a), m.observe(S)), () => {
|
|
554
|
+
window.removeEventListener("resize", a), m == null || m.disconnect(), a.cancel();
|
|
555
|
+
};
|
|
556
|
+
}, [t, o, d, A]), {
|
|
557
|
+
/** Текущая позиция окна, null пока не вычислена */
|
|
558
|
+
popupPosition: w,
|
|
559
|
+
setPopupPosition: A,
|
|
560
|
+
/**
|
|
561
|
+
* Позиция для записи в хранилище: при внешнем управлении позицией
|
|
562
|
+
* не сохраняем ничего, за неё отвечает потребитель
|
|
563
|
+
*/
|
|
564
|
+
positionForStorage: r ? void 0 : g ?? void 0,
|
|
565
|
+
containerRef: f,
|
|
566
|
+
setContainerRef: E
|
|
567
|
+
};
|
|
568
|
+
}, fn = ({
|
|
569
|
+
resizable: t,
|
|
570
|
+
defaultSize: e,
|
|
571
|
+
savedSize: c,
|
|
572
|
+
dragBoundary: n,
|
|
573
|
+
containerRef: s,
|
|
574
|
+
onSizeChange: r,
|
|
575
|
+
popupPosition: o,
|
|
576
|
+
setPopupPosition: d,
|
|
577
|
+
frame: f,
|
|
578
|
+
isSectionOpen: y = !1
|
|
579
|
+
}) => {
|
|
580
|
+
const [v, E] = O(() => c ?? e), [g, h] = O({}), [w, A] = O(null), C = B(() => {
|
|
581
|
+
if (!o)
|
|
582
|
+
return "bottom-right";
|
|
583
|
+
const i = s.current, x = {
|
|
584
|
+
width: (i == null ? void 0 : i.offsetWidth) ?? 0,
|
|
585
|
+
height: (i == null ? void 0 : i.offsetHeight) ?? 0
|
|
586
|
+
};
|
|
587
|
+
return Je(je(o, x, n, Z(f)));
|
|
588
|
+
}, [o, n, s, f]), a = w ?? C, S = W(null), m = W(null);
|
|
589
|
+
X(() => () => {
|
|
590
|
+
var i;
|
|
591
|
+
(i = m.current) == null || i.disconnect();
|
|
592
|
+
}, []);
|
|
593
|
+
const l = B(() => qe(t, a), [t, a]), u = B(() => {
|
|
594
|
+
if (!l)
|
|
595
|
+
return;
|
|
596
|
+
const i = (H) => {
|
|
597
|
+
var z, F;
|
|
598
|
+
const b = s.current;
|
|
599
|
+
if (b) {
|
|
600
|
+
const N = Z(f), I = b.getBoundingClientRect(), _ = {
|
|
601
|
+
left: I.left - N.left,
|
|
602
|
+
top: I.top - N.top,
|
|
603
|
+
right: I.right - N.left,
|
|
604
|
+
bottom: I.bottom - N.top
|
|
605
|
+
}, R = a;
|
|
606
|
+
A(R);
|
|
607
|
+
const {
|
|
608
|
+
top: K = 0,
|
|
609
|
+
right: Y = 0,
|
|
610
|
+
bottom: ot = 0,
|
|
611
|
+
left: it = 0
|
|
612
|
+
} = n ?? {}, j = Math.min(V, R.includes("left") ? _.right - it : N.width - _.left - Y), Q = Math.min(V, R.includes("top") ? _.bottom - K : N.height - _.top - ot);
|
|
613
|
+
if (h({
|
|
614
|
+
maxWidth: l.maxWidth ? Math.min(l.maxWidth, j) : j,
|
|
615
|
+
maxHeight: l.maxHeight ? Math.min(l.maxHeight, Q) : Q
|
|
616
|
+
}), R.includes("top") || R.includes("left")) {
|
|
617
|
+
const G = {
|
|
618
|
+
left: _.left,
|
|
619
|
+
top: _.top,
|
|
620
|
+
right: _.right,
|
|
621
|
+
bottom: _.bottom,
|
|
622
|
+
corner: R
|
|
623
|
+
};
|
|
624
|
+
S.current = G, (z = m.current) == null || z.disconnect(), m.current = new ResizeObserver(() => {
|
|
625
|
+
const J = s.current;
|
|
626
|
+
J && d({
|
|
627
|
+
x: R.includes("left") ? G.right - J.offsetWidth : G.left,
|
|
628
|
+
y: R.includes("top") ? G.bottom - J.offsetHeight : G.top
|
|
629
|
+
});
|
|
630
|
+
}), m.current.observe(b);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
(F = l.onResizeStart) == null || F.call(l, H);
|
|
634
|
+
}, x = (H) => {
|
|
635
|
+
var z, F, N;
|
|
636
|
+
(z = m.current) == null || z.disconnect(), m.current = null, A(null);
|
|
637
|
+
const b = ((F = H == null ? void 0 : H.current) == null ? void 0 : F.resizable) ?? s.current;
|
|
638
|
+
if (b) {
|
|
639
|
+
const I = {
|
|
640
|
+
width: b.offsetWidth,
|
|
641
|
+
height: b.offsetHeight
|
|
642
|
+
}, _ = S.current;
|
|
643
|
+
_ && d({
|
|
644
|
+
x: _.corner.includes("left") ? _.right - I.width : _.left,
|
|
645
|
+
y: _.corner.includes("top") ? _.bottom - I.height : _.top
|
|
646
|
+
}), E(I), r == null || r(I);
|
|
647
|
+
}
|
|
648
|
+
S.current = null, (N = l.onResizeEnd) == null || N.call(l, H);
|
|
649
|
+
}, M = y ? Le : l.minWidth, L = Math.min(V, g.maxWidth ?? V), D = Math.min(V, g.maxHeight ?? V);
|
|
650
|
+
return {
|
|
651
|
+
...l,
|
|
652
|
+
defaultSize: v ?? l.defaultSize,
|
|
653
|
+
minWidth: M,
|
|
654
|
+
maxWidth: L,
|
|
655
|
+
maxHeight: D,
|
|
656
|
+
onResizeStart: i,
|
|
657
|
+
onResizeEnd: x
|
|
658
|
+
};
|
|
659
|
+
}, [l, a, n, v, g, r, s, d, f, y]);
|
|
660
|
+
return {
|
|
661
|
+
/** Текущий размер окна (после ресайза), undefined если не менялся */
|
|
662
|
+
popupSize: v,
|
|
663
|
+
/** Готовая конфигурация resizable для атомарного Popup */
|
|
664
|
+
resizableConfig: u
|
|
665
|
+
};
|
|
666
|
+
}, gn = (t) => !!t && typeof t.x == "number" && typeof t.y == "number", mn = (t) => !!t && typeof t.width == "number" && typeof t.height == "number", yn = (t) => {
|
|
667
|
+
const e = typeof t == "string" ? t : ge, c = P(() => {
|
|
668
|
+
if (!t)
|
|
669
|
+
return null;
|
|
670
|
+
try {
|
|
671
|
+
const r = localStorage.getItem(e);
|
|
672
|
+
if (!r)
|
|
673
|
+
return null;
|
|
674
|
+
const o = JSON.parse(r);
|
|
675
|
+
return !o || typeof o != "object" ? null : {
|
|
676
|
+
position: gn(o.position) ? o.position : void 0,
|
|
677
|
+
size: mn(o.size) ? o.size : void 0
|
|
678
|
+
};
|
|
679
|
+
} catch (r) {
|
|
680
|
+
return console.error("AiAgentPopup: failed to load state:", r), null;
|
|
681
|
+
}
|
|
682
|
+
}, [t, e]), n = P((r) => {
|
|
683
|
+
if (t)
|
|
684
|
+
try {
|
|
685
|
+
const o = localStorage.getItem(e), d = o ? JSON.parse(o) : {}, f = {
|
|
686
|
+
position: r.position ?? d.position,
|
|
687
|
+
size: r.size ?? d.size
|
|
688
|
+
};
|
|
689
|
+
localStorage.setItem(e, JSON.stringify(f));
|
|
690
|
+
} catch (o) {
|
|
691
|
+
console.error("AiAgentPopup: failed to save state:", o);
|
|
692
|
+
}
|
|
693
|
+
}, [t, e]), s = W(void 0);
|
|
694
|
+
return s.current === void 0 && (s.current = c()), {
|
|
695
|
+
savedState: s.current,
|
|
696
|
+
saveState: n
|
|
697
|
+
};
|
|
698
|
+
}, vn = ct((t, e) => {
|
|
699
|
+
const {
|
|
700
|
+
children: c,
|
|
701
|
+
leftPanel: n,
|
|
702
|
+
opened: s,
|
|
703
|
+
targetRef: r,
|
|
704
|
+
targetGap: o = de,
|
|
705
|
+
defaultPosition: d,
|
|
706
|
+
positionState: f,
|
|
707
|
+
onPositionChange: y,
|
|
708
|
+
draggable: v = !0,
|
|
709
|
+
dragBoundary: E,
|
|
710
|
+
dragIgnoreSelector: g,
|
|
711
|
+
useStorage: h = !1,
|
|
712
|
+
resizable: w = !0,
|
|
713
|
+
defaultSize: A = he,
|
|
714
|
+
onSizeChange: C,
|
|
715
|
+
frame: a = "document",
|
|
716
|
+
style: S,
|
|
717
|
+
className: m,
|
|
718
|
+
...l
|
|
719
|
+
} = t, {
|
|
720
|
+
savedState: u,
|
|
721
|
+
saveState: i
|
|
722
|
+
} = yn(h), x = B(() => Ye(E, le), [E]), M = n == null ? void 0 : n.activeKey, L = M !== void 0, [D, H] = O((n == null ? void 0 : n.defaultActiveKey) ?? null), b = L ? M : D, z = !!(n && b != null && n.items.some((tt) => tt.key === b)), F = P(
|
|
723
|
+
(tt) => {
|
|
724
|
+
var dt;
|
|
725
|
+
L || H(tt), (dt = n == null ? void 0 : n.onActiveKeyChange) == null || dt.call(n, tt);
|
|
726
|
+
},
|
|
727
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
728
|
+
[L, n == null ? void 0 : n.onActiveKeyChange]
|
|
729
|
+
), N = B(() => n ? {
|
|
730
|
+
...n,
|
|
731
|
+
activeKey: b,
|
|
732
|
+
onActiveKeyChange: F
|
|
733
|
+
} : void 0, [n, b, F]), {
|
|
734
|
+
popupPosition: I,
|
|
735
|
+
setPopupPosition: _,
|
|
736
|
+
positionForStorage: R,
|
|
737
|
+
containerRef: K,
|
|
738
|
+
setContainerRef: Y
|
|
739
|
+
} = hn({
|
|
740
|
+
opened: s,
|
|
741
|
+
targetRef: r,
|
|
742
|
+
targetGap: o,
|
|
743
|
+
defaultPosition: d,
|
|
744
|
+
savedPosition: u == null ? void 0 : u.position,
|
|
745
|
+
externalPositionState: f,
|
|
746
|
+
dragBoundary: x,
|
|
747
|
+
frame: a
|
|
748
|
+
}), {
|
|
749
|
+
dragActive: ot,
|
|
750
|
+
dragHandlers: it
|
|
751
|
+
} = pn({
|
|
752
|
+
elementRef: K,
|
|
753
|
+
setPosition: _,
|
|
754
|
+
dragBoundary: x,
|
|
755
|
+
onPositionChange: y,
|
|
756
|
+
ignoreSelector: g,
|
|
757
|
+
frame: a
|
|
758
|
+
}), {
|
|
759
|
+
popupSize: j,
|
|
760
|
+
resizableConfig: Q
|
|
761
|
+
} = fn({
|
|
762
|
+
resizable: w,
|
|
763
|
+
defaultSize: A,
|
|
764
|
+
savedSize: u == null ? void 0 : u.size,
|
|
765
|
+
dragBoundary: x,
|
|
766
|
+
containerRef: K,
|
|
767
|
+
onSizeChange: C,
|
|
768
|
+
popupPosition: I,
|
|
769
|
+
setPopupPosition: _,
|
|
770
|
+
frame: a,
|
|
771
|
+
isSectionOpen: z
|
|
772
|
+
}), G = B(() => ne(i, me), [i]);
|
|
773
|
+
X(() => {
|
|
774
|
+
h && G({
|
|
775
|
+
position: R,
|
|
776
|
+
size: j
|
|
777
|
+
});
|
|
778
|
+
}, [h, R, j, G]);
|
|
779
|
+
const J = B(() => ({
|
|
780
|
+
left: I ? `${I.x}px` : 0,
|
|
781
|
+
top: I ? `${I.y}px` : 0,
|
|
782
|
+
// Пока позиция не вычислена, прячем окно, чтобы оно не мигало в углу
|
|
783
|
+
...I ? null : {
|
|
784
|
+
visibility: "hidden"
|
|
785
|
+
},
|
|
786
|
+
...S
|
|
787
|
+
}), [I, S]);
|
|
788
|
+
return /* @__PURE__ */ p(be, { ...l, ref: e, opened: s, frame: a, placement: "top-left", resizable: Q, style: J, className: ot ? `${m ?? ""} ${yt}`.trim() : m, children: /* @__PURE__ */ p(Lt, { variant: "floating", leftPanel: N, ref: Y, ...v ? it : null, children: c }) });
|
|
789
|
+
});
|
|
790
|
+
vn.displayName = "AiAgentPopup";
|
|
791
|
+
export {
|
|
792
|
+
Ue as A,
|
|
793
|
+
Dn as T,
|
|
794
|
+
lt as a,
|
|
795
|
+
Cn as b,
|
|
796
|
+
vn as c
|
|
797
|
+
};
|