@daisforge/ui 1.14.1 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunks/AnalyticalWidget-BWcBjoNh.mjs +535 -0
- package/chunks/AnalyticalWidget-z2HzQ4aA.cjs +43 -0
- package/chunks/{ApprovalCenter-XCXGHaEP.mjs → ApprovalCenter-BqN8Zjol.mjs} +2 -2
- package/chunks/{ApprovalCenter-DG3YvEkY.cjs → ApprovalCenter-CGs7n-2C.cjs} +1 -1
- package/chunks/{BlockTitle-DDWF1ZeV.mjs → BlockTitle-BM2EE1b1.mjs} +2 -2
- package/chunks/{BlockTitle-3YmyxJHJ.cjs → BlockTitle-o2QTRA7D.cjs} +1 -1
- package/chunks/{Container-CJX4h6tb.cjs → Container-CrB1jwqH.cjs} +1 -1
- package/chunks/{Container-BlAaXm8V.mjs → Container-Cy8w2JOq.mjs} +1 -1
- package/chunks/{EmptyState-BB3duGQw.mjs → EmptyState-B205JfZA.mjs} +1 -1
- package/chunks/{EmptyState-Du-RIjie.cjs → EmptyState-CcxlsZm0.cjs} +1 -1
- package/chunks/{FiltersActions-C38x0y5T.mjs → FiltersActions-C5OGUDDx.mjs} +4 -4
- package/chunks/{FiltersActions-CvAwGV9F.cjs → FiltersActions-CKimtYsU.cjs} +1 -1
- package/chunks/{FormSegmentGroup-DcOPPn3M.cjs → FormSegmentGroup-CCCqRgCG.cjs} +1 -1
- package/chunks/{FormSegmentGroup-9b3w4_KU.mjs → FormSegmentGroup-E1JurEt7.mjs} +1 -1
- package/chunks/{GridDND-BnK1dEhJ.mjs → GridDND-D9T2wqLt.mjs} +126 -132
- package/chunks/GridDND-DkL6-TgS.cjs +1 -0
- package/chunks/{LeftPanel-Ciehaz28.cjs → LeftPanel-B3-ySDMW.cjs} +1 -1
- package/chunks/{LeftPanel-DuIinlBm.mjs → LeftPanel-HZu3ECqD.mjs} +1 -1
- package/chunks/{ListOfFilters-DNzfSG-p.cjs → ListOfFilters-B8XF6KiI.cjs} +1 -1
- package/chunks/{ListOfFilters-Cji5UH2J.mjs → ListOfFilters-BEDW_v5t.mjs} +3 -3
- package/chunks/{MassActions-DCk9APKP.cjs → MassActions-BHNmuh3s.cjs} +1 -1
- package/chunks/{MassActions-BOG04zip.mjs → MassActions-C66ulAuq.mjs} +3 -3
- package/chunks/{PageTitle-BIllremL.cjs → PageTitle-BEdQpyZh.cjs} +1 -1
- package/chunks/{PageTitle-CQ_6jZ0x.mjs → PageTitle-BVbWaV52.mjs} +2 -2
- package/chunks/{SplitView-Dm62AAZj.mjs → SplitView-DYHeCnl9.mjs} +1 -1
- package/chunks/{SplitView-DdLshcIk.cjs → SplitView-UKIBuvTi.cjs} +1 -1
- package/chunks/Stories-DVh7iByM.cjs +1 -0
- package/chunks/{Stories-dFpUqS5T.mjs → Stories-lNAuXVJN.mjs} +260 -245
- package/chunks/{Table-CrJFfavU.cjs → Table-C-lLZklk.cjs} +5 -5
- package/chunks/{Table-f0CmcIhI.mjs → Table-C_1QGsh8.mjs} +16 -11
- package/chunks/{TableCanvas-1bi1WWeP.mjs → TableCanvas--g37wjRi.mjs} +3537 -3474
- package/chunks/TableCanvas-uzBMXlx6.cjs +30 -0
- package/chunks/{TableGlide-DGKw3w0G.mjs → TableGlide-Cjcw7Wur.mjs} +912 -819
- package/chunks/TableGlide-DTBZ1jNA.cjs +1 -0
- package/chunks/styles-BBVEBDDw.mjs +132 -0
- package/chunks/styles-C-pJNMSQ.cjs +2 -0
- package/chunks/{utils-DvDFSlCG.cjs → utils-CUW5bd8S.cjs} +5 -5
- package/chunks/{utils-D4eJY8pa.mjs → utils-YKicAHp0.mjs} +38 -38
- package/chunks/vendor-BzEO8Fvp.cjs +6043 -0
- package/chunks/vendor-DBRfVjyT.mjs +6054 -0
- package/components/AiAgentPopover/index.cjs +1 -1
- package/components/AiAgentPopover/index.mjs +1 -1
- package/components/AnalyticalWidget/AnalyticalWidget.constants.d.ts +2 -0
- package/components/AnalyticalWidget/AnalyticalWidget.d.ts +13 -54
- package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/AnalyticalWidgetIconButtonDots.d.ts +14 -0
- package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/AnalyticalWidgetIconButtonDots.styled.d.ts +3 -0
- package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.cjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.d.ts +3 -2
- package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.mjs +4 -3
- package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.cjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.mjs +2 -2
- package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/AnalyticalWidgetHeader.d.ts +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/AnalyticalWidgetHeader.styled.d.ts +1 -75
- package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/AnalyticalWidgetHeader.types.d.ts +2 -2
- package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/AnalyticalWidgetTitle.types.d.ts +2 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.cjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.mjs +1 -1
- package/components/AnalyticalWidget/index.cjs +1 -1
- package/components/AnalyticalWidget/index.mjs +1 -1
- package/components/ApprovalCenter/components/index.cjs +1 -1
- package/components/ApprovalCenter/components/index.mjs +1 -1
- package/components/ApprovalCenter/index.cjs +1 -1
- package/components/ApprovalCenter/index.mjs +1 -1
- package/components/AutocompleteSearch/index.cjs +1 -1
- package/components/AutocompleteSearch/index.mjs +2 -2
- package/components/BlockGradientScroll/index.cjs +1 -1
- package/components/BlockGradientScroll/index.mjs +1 -1
- package/components/BlockTitle/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/GridDND.ItemWrapper.d.ts +1 -2
- package/components/GridDND/GridDND.d.ts +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/ModalDF/index.cjs +1 -1
- package/components/ModalDF/index.mjs +1 -1
- package/components/Notification/index.cjs +1 -1
- package/components/Notification/index.mjs +2 -2
- package/components/PageTitle/index.cjs +1 -1
- package/components/PageTitle/index.mjs +1 -1
- package/components/PageTitle/utils/index.cjs +1 -1
- package/components/PageTitle/utils/index.mjs +1 -1
- package/components/PopoverDF/index.cjs +1 -1
- package/components/PopoverDF/index.mjs +1 -1
- package/components/PopupDF/index.cjs +1 -1
- package/components/PopupDF/index.mjs +1 -1
- package/components/SplitView/index.cjs +1 -1
- package/components/SplitView/index.mjs +1 -1
- package/components/SplitView/utils/index.cjs +1 -1
- package/components/SplitView/utils/index.mjs +1 -1
- package/components/Stories/components/StoriesBanner/index.cjs +1 -1
- package/components/Stories/components/StoriesBanner/index.mjs +1 -1
- package/components/Stories/components/StoriesContent/index.cjs +1 -1
- package/components/Stories/components/StoriesContent/index.mjs +1 -1
- package/components/Stories/components/StoriesPreview/index.cjs +1 -1
- package/components/Stories/components/StoriesPreview/index.mjs +1 -1
- package/components/Stories/components/StoriesProgress/index.cjs +1 -1
- package/components/Stories/components/StoriesProgress/index.mjs +1 -1
- package/components/Stories/components/StoriesViewer/index.cjs +1 -1
- package/components/Stories/components/StoriesViewer/index.mjs +1 -1
- package/components/Stories/index.cjs +1 -1
- package/components/Stories/index.mjs +1 -1
- package/components/Table/components/AnimatedCounter.d.ts +1 -0
- package/components/Table/components/TableDropdown/index.cjs +1 -1
- package/components/Table/components/TableDropdown/index.mjs +1 -1
- package/components/Table/feature-collapse-table/index.cjs +1 -1
- package/components/Table/feature-collapse-table/index.mjs +1 -1
- package/components/Table/feature-column-control/ColumnsList/index.cjs +1 -1
- package/components/Table/feature-column-control/ColumnsList/index.mjs +1 -1
- package/components/Table/feature-column-control/index.cjs +1 -1
- package/components/Table/feature-column-control/index.mjs +1 -1
- package/components/Table/feature-columns-grouping/index.cjs +1 -1
- package/components/Table/feature-columns-grouping/index.mjs +1 -1
- package/components/Table/feature-context-menu/index.cjs +1 -1
- package/components/Table/feature-context-menu/index.mjs +1 -1
- package/components/Table/feature-edit/index.cjs +1 -1
- package/components/Table/feature-edit/index.mjs +1 -1
- package/components/Table/feature-filtering/combobox/index.cjs +1 -1
- package/components/Table/feature-filtering/combobox/index.mjs +1 -1
- package/components/Table/feature-filtering/filter-list-block/index.cjs +1 -1
- package/components/Table/feature-filtering/filter-list-block/index.mjs +1 -1
- package/components/Table/feature-filtering/header-filter-button/index.cjs +1 -1
- package/components/Table/feature-filtering/header-filter-button/index.mjs +1 -1
- package/components/Table/feature-filtering/index.cjs +1 -1
- package/components/Table/feature-filtering/index.mjs +1 -1
- package/components/Table/feature-filtering/sidebar-filter-block/index.cjs +1 -1
- package/components/Table/feature-filtering/sidebar-filter-block/index.mjs +1 -1
- package/components/Table/feature-infinity-scroll/index.cjs +1 -1
- package/components/Table/feature-infinity-scroll/index.mjs +1 -1
- package/components/Table/feature-key-text/index.cjs +1 -1
- package/components/Table/feature-key-text/index.mjs +1 -1
- package/components/Table/feature-pagination/index.cjs +1 -1
- package/components/Table/feature-pagination/index.mjs +1 -1
- package/components/Table/feature-right-sidebar/index.cjs +1 -1
- package/components/Table/feature-right-sidebar/index.mjs +1 -1
- package/components/Table/feature-row-detail/index.cjs +1 -1
- package/components/Table/feature-row-detail/index.mjs +1 -1
- package/components/Table/feature-row-instruments/index.cjs +1 -1
- package/components/Table/feature-row-instruments/index.mjs +1 -1
- package/components/Table/feature-row-size/index.cjs +1 -1
- package/components/Table/feature-row-size/index.mjs +1 -1
- package/components/Table/feature-rows-grouping/index.cjs +1 -1
- package/components/Table/feature-rows-grouping/index.mjs +1 -1
- package/components/Table/feature-searching/index.cjs +1 -1
- package/components/Table/feature-searching/index.mjs +1 -1
- package/components/Table/feature-select-row/index.cjs +1 -1
- package/components/Table/feature-select-row/index.mjs +1 -1
- package/components/Table/feature-sorting/index.cjs +1 -1
- package/components/Table/feature-sorting/index.mjs +1 -1
- package/components/Table/feature-table-settings/index.cjs +1 -1
- package/components/Table/feature-table-settings/index.mjs +1 -1
- package/components/Table/feature-tree/index.cjs +1 -1
- package/components/Table/feature-tree/index.mjs +1 -1
- package/components/Table/index.cjs +1 -1
- package/components/Table/index.mjs +1 -1
- package/components/Table/renders/formatCell/index.cjs +1 -1
- package/components/Table/renders/formatCell/index.mjs +1 -1
- package/components/Table/styles/index.cjs +1 -1
- package/components/Table/styles/index.mjs +1 -1
- package/components/Table/table-hooks/index.cjs +1 -1
- package/components/Table/table-hooks/index.mjs +1 -1
- package/components/Table/types/index.cjs +1 -1
- package/components/Table/types/index.mjs +1 -1
- package/components/Table/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/adapters/column/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/column/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/index.mjs +2 -2
- package/components/TableCanvas/TableGlideInstance/utils/column/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/column/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/index.mjs +1 -1
- package/components/TableCanvas/components/AnimatedCounter.d.ts +1 -0
- package/components/TableCanvas/components/SplitIconButton/index.cjs +1 -1
- package/components/TableCanvas/components/SplitIconButton/index.mjs +1 -1
- package/components/TableCanvas/components/TableDropdown/index.cjs +1 -1
- package/components/TableCanvas/components/TableDropdown/index.mjs +1 -1
- package/components/TableCanvas/feature-cell-transfer/index.cjs +1 -1
- package/components/TableCanvas/feature-cell-transfer/index.mjs +1 -1
- package/components/TableCanvas/feature-collapse-table/index.cjs +1 -1
- package/components/TableCanvas/feature-collapse-table/index.mjs +1 -1
- package/components/TableCanvas/feature-column-control/ColumnsList/index.cjs +1 -1
- package/components/TableCanvas/feature-column-control/ColumnsList/index.mjs +1 -1
- package/components/TableCanvas/feature-column-control/index.cjs +1 -1
- package/components/TableCanvas/feature-column-control/index.mjs +1 -1
- package/components/TableCanvas/feature-columns-grouping/index.cjs +1 -1
- package/components/TableCanvas/feature-columns-grouping/index.mjs +1 -1
- package/components/TableCanvas/feature-content-state/index.cjs +1 -1
- package/components/TableCanvas/feature-content-state/index.mjs +1 -1
- package/components/TableCanvas/feature-context-menu/index.cjs +1 -1
- package/components/TableCanvas/feature-context-menu/index.mjs +1 -1
- package/components/TableCanvas/feature-edit/index.cjs +1 -1
- package/components/TableCanvas/feature-edit/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/combobox/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/combobox/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/filter-list-block/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/filter-list-block/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/header-filter-button/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/header-filter-button/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/use-focus-search-input.d.ts +2 -0
- package/components/TableCanvas/feature-infinity-scroll/index.cjs +1 -1
- package/components/TableCanvas/feature-infinity-scroll/index.mjs +1 -1
- package/components/TableCanvas/feature-key-text/index.cjs +1 -1
- package/components/TableCanvas/feature-key-text/index.mjs +1 -1
- package/components/TableCanvas/feature-notifications/index.cjs +1 -1
- package/components/TableCanvas/feature-notifications/index.mjs +1 -1
- package/components/TableCanvas/feature-pagination/index.cjs +1 -1
- package/components/TableCanvas/feature-pagination/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/context/TablePopoverContext.d.ts +3 -1
- package/components/TableCanvas/feature-popover-table/context/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/context/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/hooks/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/hooks/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/utils/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/utils/index.mjs +1 -1
- package/components/TableCanvas/feature-right-sidebar/index.cjs +1 -1
- package/components/TableCanvas/feature-right-sidebar/index.mjs +1 -1
- package/components/TableCanvas/feature-row-detail/index.cjs +1 -1
- package/components/TableCanvas/feature-row-detail/index.mjs +1 -1
- package/components/TableCanvas/feature-row-instruments/index.cjs +1 -1
- package/components/TableCanvas/feature-row-instruments/index.mjs +1 -1
- package/components/TableCanvas/feature-row-markers/index.cjs +1 -1
- package/components/TableCanvas/feature-row-markers/index.mjs +1 -1
- package/components/TableCanvas/feature-row-size/index.cjs +1 -1
- package/components/TableCanvas/feature-row-size/index.mjs +1 -1
- package/components/TableCanvas/feature-rows-grouping/index.cjs +1 -1
- package/components/TableCanvas/feature-rows-grouping/index.mjs +1 -1
- package/components/TableCanvas/feature-rows-grouping/types.d.ts +2 -0
- package/components/TableCanvas/feature-searching/index.cjs +1 -1
- package/components/TableCanvas/feature-searching/index.mjs +1 -1
- package/components/TableCanvas/feature-select-row/index.cjs +1 -1
- package/components/TableCanvas/feature-select-row/index.mjs +1 -1
- package/components/TableCanvas/feature-sorting/index.cjs +1 -1
- package/components/TableCanvas/feature-sorting/index.mjs +1 -1
- package/components/TableCanvas/feature-table-settings/index.cjs +1 -1
- package/components/TableCanvas/feature-table-settings/index.mjs +1 -1
- package/components/TableCanvas/feature-tooltip/index.cjs +1 -1
- package/components/TableCanvas/feature-tooltip/index.mjs +1 -1
- package/components/TableCanvas/feature-tooltip/utils/index.cjs +1 -1
- package/components/TableCanvas/feature-tooltip/utils/index.mjs +1 -1
- package/components/TableCanvas/feature-tree/index.cjs +1 -1
- package/components/TableCanvas/feature-tree/index.mjs +1 -1
- package/components/TableCanvas/index.cjs +1 -1
- package/components/TableCanvas/index.mjs +2 -2
- package/components/TableCanvas/renders/formatCell/index.cjs +1 -1
- package/components/TableCanvas/renders/formatCell/index.mjs +1 -1
- package/components/TableCanvas/styles/index.cjs +1 -1
- package/components/TableCanvas/styles/index.mjs +1 -1
- package/components/TableCanvas/table-hooks/index.cjs +1 -1
- package/components/TableCanvas/table-hooks/index.mjs +1 -1
- package/components/TableCanvas/types/index.cjs +1 -1
- package/components/TableCanvas/types/index.mjs +1 -1
- package/components/TableCanvas/utils/index.cjs +1 -1
- package/components/TableCanvas/utils/index.mjs +2 -2
- package/components/TableCanvas/widgets/control-block/compression/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/compression/index.mjs +1 -1
- package/components/TableCanvas/widgets/control-block/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/index.mjs +1 -1
- package/components/TableCanvas/widgets/control-block/right-side/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/right-side/index.mjs +1 -1
- package/components/TableCanvas/widgets/index.cjs +1 -1
- package/components/TableCanvas/widgets/index.mjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/index.cjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/index.mjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/index.cjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/index.mjs +1 -1
- package/components/TableContract/index.cjs +1 -1
- package/components/TableContract/index.mjs +2 -2
- package/components/TableGlide/hooks/selection/index.cjs +1 -1
- package/components/TableGlide/hooks/selection/index.mjs +1 -1
- package/components/TableGlide/index.cjs +1 -1
- package/components/TableGlide/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/cells/buttons/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/cells/buttons/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/cells/iconSprites/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/cells/iconSprites/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/cells/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/cells/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/cells/renderer/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/cells/renderer/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/core/helpers/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/core/helpers/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/core/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/core/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/hooks/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/hooks/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/miniflex/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/miniflex/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/primitives/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/primitives/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/utils/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/utils/index.mjs +1 -1
- package/components/TableGlide/theming/activeTheme.type.d.ts +1 -1
- package/components/TableGlide/theming/custom-colors.d.ts +3 -3
- package/components/TableGlide/theming/glide-colors.d.ts +9 -9
- package/components/TableGlide/theming/index.cjs +1 -1
- package/components/TableGlide/theming/index.mjs +1 -1
- package/components/TableTabs/index.cjs +1 -1
- package/components/TableTabs/index.mjs +1 -1
- package/components/Tooltip/index.cjs +1 -1
- package/components/Tooltip/index.mjs +1 -1
- package/components/TourWidget/index.cjs +1 -1
- package/components/TourWidget/index.mjs +2 -2
- package/components/Typography/index.cjs +1 -1
- package/components/Typography/index.mjs +1 -1
- package/components/Widget/index.cjs +1 -1
- package/components/Widget/index.mjs +2 -2
- package/formComponents/FormCombobox/index.cjs +1 -1
- package/formComponents/FormCombobox/index.mjs +1 -1
- package/formComponents/FormDatePickers/FormDatePickerRange/ui/FormDatePickerRangeStyled.d.ts +2 -0
- package/formComponents/FormRadioGroupBox/index.cjs +1 -1
- package/formComponents/FormRadioGroupBox/index.mjs +1 -1
- package/formComponents/FormSegments/index.cjs +1 -1
- package/formComponents/FormSegments/index.mjs +1 -1
- package/formComponents/FormSwitch/index.cjs +1 -1
- package/formComponents/FormSwitch/index.mjs +1 -1
- package/index.cjs +1 -1
- package/index.mjs +1787 -1629
- 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/FiltersActions.d.ts +2 -2
- package/layouts/FiltersActions/components/Segments.d.ts +2 -2
- 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 +190 -158
- package/mixins/index.cjs +2 -2
- package/mixins/index.mjs +36 -36
- package/package.json +5 -5
- package/shared/utils/inputs/index.cjs +1 -1
- package/shared/utils/inputs/index.mjs +6 -6
- package/styles/DefaultGlobalStyle.d.ts +2 -0
- package/styles/index.cjs +1 -1
- package/styles/index.mjs +1 -1
- package/themes/index.cjs +1 -1
- package/themes/index.d.ts +2 -0
- package/themes/index.mjs +8 -6
- package/tokens/color/index.cjs +1 -1
- package/tokens/color/index.d.ts +1 -1
- package/tokens/color/index.mjs +1225 -1127
- package/tokens/gradient/index.cjs +1 -1
- package/tokens/gradient/index.d.ts +1 -1
- package/tokens/gradient/index.mjs +126 -70
- package/tokens/index.cjs +1 -1
- package/tokens/index.mjs +1433 -1277
- package/tokens/shadow/index.cjs +1 -1
- package/tokens/shadow/index.d.ts +1 -1
- package/tokens/shadow/index.mjs +9 -7
- package/utils/breakpoint/index.cjs +1 -1
- package/utils/breakpoint/index.mjs +1 -1
- package/utils/clickStream/index.cjs +1 -1
- package/utils/clickStream/index.mjs +1 -1
- package/utils/eventBus/index.cjs +1 -1
- package/utils/eventBus/index.mjs +1 -1
- package/utils/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 +1 -1
- package/utils/styles/index.cjs +1 -1
- package/utils/styles/index.mjs +1 -1
- package/chunks/AnalyticalWidget-B6czTLSw.cjs +0 -43
- package/chunks/AnalyticalWidget-BWggL9xa.mjs +0 -528
- package/chunks/GridDND-CVAlpElj.cjs +0 -1
- package/chunks/Stories-e_CX_1CS.cjs +0 -1
- package/chunks/TableCanvas-DqF5YxEY.cjs +0 -30
- package/chunks/TableGlide-CGAh5x3Q.cjs +0 -1
- package/chunks/styles-BMXAIiBk.mjs +0 -128
- package/chunks/styles-DwCVRGsC.cjs +0 -2
- package/chunks/vendor-BauZZ2hr.mjs +0 -1955
- package/chunks/vendor-C47eH0xy.cjs +0 -1950
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-08-
|
|
3
|
-
"libVersion": "1.
|
|
2
|
+
"generatedAt": "2026-08-28T16:43:41.020Z",
|
|
3
|
+
"libVersion": "1.16.0",
|
|
4
4
|
"components": {
|
|
5
5
|
"Accordion": {
|
|
6
6
|
"name": "Accordion",
|
|
@@ -570,12 +570,6 @@
|
|
|
570
570
|
"required": false,
|
|
571
571
|
"description": "Стили для метки (badge). Позволяет переопределить, например, text-transform"
|
|
572
572
|
},
|
|
573
|
-
{
|
|
574
|
-
"name": "hrefProps",
|
|
575
|
-
"type": "{ onClick?: React.MouseEventHandler<HTMLAnchorElement> | undefined; onKeyDown?: React.KeyboardEventHandler<HTMLAnchorElement> | undefined; } | undefined",
|
|
576
|
-
"required": false,
|
|
577
|
-
"description": "Дополнительные свойства для `href элемента`. Не будет работать, если не заполнено свойство `href`"
|
|
578
|
-
},
|
|
579
573
|
{
|
|
580
574
|
"name": "infoTooltipProps",
|
|
581
575
|
"type": "Omit<TooltipProps, \"text\" | \"target\"> | undefined",
|
|
@@ -596,9 +590,9 @@
|
|
|
596
590
|
},
|
|
597
591
|
{
|
|
598
592
|
"name": "subtitle",
|
|
599
|
-
"type": "
|
|
593
|
+
"type": "React.ReactNode",
|
|
600
594
|
"required": false,
|
|
601
|
-
"description": "Подзаголовок.
|
|
595
|
+
"description": "Подзаголовок. Строка обрезается троеточием (truncated text) с Tooltip при наведении\nна обрезанный текст. Можно передать произвольный ReactNode (например, Skeleton на\nвремя загрузки) — он рендерится как есть, без тултипа."
|
|
602
596
|
},
|
|
603
597
|
{
|
|
604
598
|
"name": "subtitleTooltipProps",
|
|
@@ -606,6 +600,12 @@
|
|
|
606
600
|
"required": false,
|
|
607
601
|
"description": "Пропсы для Tooltip подзаголовка"
|
|
608
602
|
},
|
|
603
|
+
{
|
|
604
|
+
"name": "title",
|
|
605
|
+
"type": "React.ReactNode",
|
|
606
|
+
"required": false,
|
|
607
|
+
"description": "Заголовок. Строка обрезается троеточием (truncated text) с Tooltip при наведении\nна обрезанный текст. Можно передать произвольный ReactNode (например, Skeleton на\nвремя загрузки данных с бэкенда) — он рендерится как есть, без тултипа."
|
|
608
|
+
},
|
|
609
609
|
{
|
|
610
610
|
"name": "titleLinkProps",
|
|
611
611
|
"type": "Omit<PropsType<{ view: { default: PolymorphicClassName; secondary: PolymorphicClassName; tertiary: PolymorphicClassName; paragraph: PolymorphicClassName; accent: PolymorphicClassName; positive: PolymorphicClassName; warning: PolymorphicClassName; negative: PolymorphicClassName; clear: PolymorphicClassName; }; disabled: { true: PolymorphicClassName; }; focused: { true: PolymorphicClassName; }; }> &…",
|
|
@@ -618,6 +618,13 @@
|
|
|
618
618
|
"type": "Omit<TooltipProps, \"text\" | \"target\"> | undefined",
|
|
619
619
|
"required": false,
|
|
620
620
|
"description": "Пропсы для Tooltip заголовка"
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
"name": "hrefProps",
|
|
624
|
+
"type": "{ onClick?: React.MouseEventHandler<HTMLAnchorElement> | undefined; onKeyDown?: React.KeyboardEventHandler<HTMLAnchorElement> | undefined; } | undefined",
|
|
625
|
+
"required": false,
|
|
626
|
+
"description": "",
|
|
627
|
+
"deprecated": true
|
|
621
628
|
}
|
|
622
629
|
]
|
|
623
630
|
},
|
|
@@ -779,8 +786,22 @@
|
|
|
779
786
|
},
|
|
780
787
|
{
|
|
781
788
|
"name": "DotsIconButton",
|
|
782
|
-
"typeName": "
|
|
789
|
+
"typeName": "AnalyticalWidgetIconButtonDotsProps",
|
|
783
790
|
"props": [
|
|
791
|
+
{
|
|
792
|
+
"name": "absolute",
|
|
793
|
+
"type": "boolean | undefined",
|
|
794
|
+
"required": false,
|
|
795
|
+
"description": "Позиционировать кнопку абсолютом в правом верхнем углу ближайшего\nrelative-контейнера. Для потребителей (напр. GridDND рабочих столов),\nу которых нет доступа к контенту виджета.",
|
|
796
|
+
"default": "false"
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
"name": "absoluteOffset",
|
|
800
|
+
"type": "number | undefined",
|
|
801
|
+
"required": false,
|
|
802
|
+
"description": "Отступ (top/right) при `absolute`.",
|
|
803
|
+
"default": "12"
|
|
804
|
+
},
|
|
784
805
|
{
|
|
785
806
|
"name": "as",
|
|
786
807
|
"type": "keyof JSX.IntrinsicElements | React.ComponentType<any> | undefined",
|
|
@@ -798,7 +819,7 @@
|
|
|
798
819
|
"type": "\"horizontal\" | \"vertical\" | undefined",
|
|
799
820
|
"required": false,
|
|
800
821
|
"description": "",
|
|
801
|
-
"default": "'
|
|
822
|
+
"default": "'vertical'"
|
|
802
823
|
},
|
|
803
824
|
{
|
|
804
825
|
"name": "iconSize",
|
|
@@ -806,48 +827,6 @@
|
|
|
806
827
|
"required": false,
|
|
807
828
|
"description": ""
|
|
808
829
|
},
|
|
809
|
-
{
|
|
810
|
-
"name": "additionalContent",
|
|
811
|
-
"type": "React.ReactNode",
|
|
812
|
-
"required": false,
|
|
813
|
-
"description": ""
|
|
814
|
-
},
|
|
815
|
-
{
|
|
816
|
-
"name": "appearance",
|
|
817
|
-
"type": "\"default\" | \"outline\" | undefined",
|
|
818
|
-
"required": false,
|
|
819
|
-
"description": ""
|
|
820
|
-
},
|
|
821
|
-
{
|
|
822
|
-
"name": "blur",
|
|
823
|
-
"type": "\"small\" | \"medium\" | \"large\" | undefined",
|
|
824
|
-
"required": false,
|
|
825
|
-
"description": ""
|
|
826
|
-
},
|
|
827
|
-
{
|
|
828
|
-
"name": "contentLeft",
|
|
829
|
-
"type": "React.ReactNode",
|
|
830
|
-
"required": false,
|
|
831
|
-
"description": ""
|
|
832
|
-
},
|
|
833
|
-
{
|
|
834
|
-
"name": "contentPlacing",
|
|
835
|
-
"type": "\"default\" | \"relaxed\" | undefined",
|
|
836
|
-
"required": false,
|
|
837
|
-
"description": ""
|
|
838
|
-
},
|
|
839
|
-
{
|
|
840
|
-
"name": "contentRight",
|
|
841
|
-
"type": "React.ReactNode",
|
|
842
|
-
"required": false,
|
|
843
|
-
"description": ""
|
|
844
|
-
},
|
|
845
|
-
{
|
|
846
|
-
"name": "focused",
|
|
847
|
-
"type": "boolean | undefined",
|
|
848
|
-
"required": false,
|
|
849
|
-
"description": ""
|
|
850
|
-
},
|
|
851
830
|
{
|
|
852
831
|
"name": "isLoading",
|
|
853
832
|
"type": "boolean | undefined",
|
|
@@ -861,58 +840,17 @@
|
|
|
861
840
|
"description": ""
|
|
862
841
|
},
|
|
863
842
|
{
|
|
864
|
-
"name": "
|
|
865
|
-
"type": "
|
|
866
|
-
"required": false,
|
|
867
|
-
"description": ""
|
|
868
|
-
},
|
|
869
|
-
{
|
|
870
|
-
"name": "pin",
|
|
871
|
-
"type": "\"square-square\" | \"square-clear\" | \"clear-square\" | \"clear-clear\" | \"clear-circle\" | \"circle-clear\" | \"circle-circle\" | undefined",
|
|
872
|
-
"required": false,
|
|
873
|
-
"description": ""
|
|
874
|
-
},
|
|
875
|
-
{
|
|
876
|
-
"name": "shiftLeft",
|
|
877
|
-
"type": "boolean | undefined",
|
|
878
|
-
"required": false,
|
|
879
|
-
"description": ""
|
|
880
|
-
},
|
|
881
|
-
{
|
|
882
|
-
"name": "shiftRight",
|
|
883
|
-
"type": "boolean | undefined",
|
|
843
|
+
"name": "position",
|
|
844
|
+
"type": "any",
|
|
884
845
|
"required": false,
|
|
885
846
|
"description": ""
|
|
886
847
|
},
|
|
887
848
|
{
|
|
888
849
|
"name": "size",
|
|
889
|
-
"type": "\"xs\" | \"s\" | \"
|
|
890
|
-
"required": false,
|
|
891
|
-
"description": ""
|
|
892
|
-
},
|
|
893
|
-
{
|
|
894
|
-
"name": "square",
|
|
895
|
-
"type": "boolean | undefined",
|
|
896
|
-
"required": false,
|
|
897
|
-
"description": ""
|
|
898
|
-
},
|
|
899
|
-
{
|
|
900
|
-
"name": "stretch",
|
|
901
|
-
"type": "boolean | undefined",
|
|
850
|
+
"type": "\"xs\" | \"s\" | \"m\" | \"l\" | undefined",
|
|
902
851
|
"required": false,
|
|
903
|
-
"description": ""
|
|
904
|
-
|
|
905
|
-
{
|
|
906
|
-
"name": "stretching",
|
|
907
|
-
"type": "\"auto\" | \"filled\" | \"fixed\" | undefined",
|
|
908
|
-
"required": false,
|
|
909
|
-
"description": ""
|
|
910
|
-
},
|
|
911
|
-
{
|
|
912
|
-
"name": "text",
|
|
913
|
-
"type": "string | undefined",
|
|
914
|
-
"required": false,
|
|
915
|
-
"description": ""
|
|
852
|
+
"description": "",
|
|
853
|
+
"default": "'m'"
|
|
916
854
|
},
|
|
917
855
|
{
|
|
918
856
|
"name": "type",
|
|
@@ -920,17 +858,12 @@
|
|
|
920
858
|
"required": false,
|
|
921
859
|
"description": ""
|
|
922
860
|
},
|
|
923
|
-
{
|
|
924
|
-
"name": "value",
|
|
925
|
-
"type": "string | number | undefined",
|
|
926
|
-
"required": false,
|
|
927
|
-
"description": ""
|
|
928
|
-
},
|
|
929
861
|
{
|
|
930
862
|
"name": "view",
|
|
931
|
-
"type": "\"
|
|
863
|
+
"type": "\"default\" | \"secondary\" | \"accent\" | \"positive\" | \"warning\" | \"negative\" | \"info\" | undefined",
|
|
932
864
|
"required": false,
|
|
933
|
-
"description": ""
|
|
865
|
+
"description": "",
|
|
866
|
+
"default": "'secondary'"
|
|
934
867
|
}
|
|
935
868
|
]
|
|
936
869
|
},
|
|
@@ -979,25 +912,37 @@
|
|
|
979
912
|
],
|
|
980
913
|
"scope": "internal",
|
|
981
914
|
"docs": "# AnalyticalWidget\n\nАналитический виджет с адаптивным поведением и слотами для контента.\n\n## Ключевые особенности\n\n- Три размера (`L`, `M`, `S`) с разными параметрами высоты, ширины, border-radius и padding\n- Слоты: `headerSlot`, `topSlot`, `middleSlot` (только для `L`), `contentSlot`\n- `middleSlot` видим только при размере `L`\n- Прокрутка контентной области (`scrollable`)\n- Кастомизация через `classes`, `$css` и CSS-переменные\n\n## Compound-компоненты\n\n```ts\nAnalyticalWidget.Header = AnalyticalWidgetHeader;\nAnalyticalWidget.FilterIconButton = IconButtonFilter;\nAnalyticalWidget.DotsIconButton = IconButtonDots;\nAnalyticalWidget.Chips = AnalyticalWidgetChipsGroup;\n```\n\n- `AnalyticalWidget.Header` — шапка виджета с заголовком и слотами для действий\n- `AnalyticalWidget.FilterIconButton` — кнопка-иконка для фильтров (с поддержкой Dropdown). Поддерживает красный индикатор применения фильтров\n- `AnalyticalWidget.DotsIconButton` — кнопка-иконка для дополнительных действий (с поддержкой Dropdown)\n- `AnalyticalWidget.Chips` — чипы для отображения применённых фильтров\n\n## CSS-переменные\n\n- `--analytical-widget-bg` — фон всего виджета\n- `--analytical-widget-padding` — внутренние отступы контейнера\n- `--analytical-widget-br` — радиус скругления углов\n- `--analytical-widget-min-height` — минимальная высота контентной области\n\n## Особенности\n\n- Все параметры можно переопределить через CSS-переменные, нативные/кастомные классы компонента или проп `$css` для основного контейнера. Объект `analyticalWidgetClassNames` доступен для импорта\n- Кнопка троеточия вставляется через микрофронт другой командой — место под неё зарезервировано. В stories показан пример через `position: absolute`\n- Высота, ширина, border-radius, padding зависят от размера и имеют фиксированные значения\n\n<AnalyticalWidgetInfoAboutAdaptive />\n\nОписание типов и compound-пропсов — в разделе [API](/docs/композиции-analyticalwidget-api--docs).",
|
|
982
|
-
"apiDocs": "# AnalyticalWidget API\n\n## AnalyticalWidgetProps\n\n```typescript\ntype AnalyticalWidgetProps = {\n /**\n * Размер виджета\n */\n size: AnalyticalWidgetSize;\n /**\n * Добавление или удаление скролла у contentSlot\n */\n scrollable?: boolean;\n /**\n * ReactNode для шапки\n */\n headerSlot?: ReactNode;\n /**\n * ReactNode (в основном для фильтров)\n */\n topSlot?: ReactNode;\n /**\n * ReactNode (в основном для табов. Отображается только в режиме l)\n */\n middleSlot?: ReactNode;\n /**\n * ReactNode с контентом\n */\n contentSlot: ReactNode;\n /**\n * Кастомные классы для слотов и самого компонента\n */\n classes?: AnalyticalWidgetClasses;\n /**\n * Кастомные стили styled-components для основного контейнера виджета\n */\n $css?: string | CSSObject | FlattenSimpleInterpolation;\n};\n```\n\n## AnalyticalWidgetSize\n\n```typescript\ntype AnalyticalWidgetSize = 'l' | 'm' | 's';\n```\n\n## AnalyticalWidgetClasses\n\n```typescript\ntype AnalyticalWidgetClasses = {\n /**\n * Кастомный класс для root элемента\n */\n root?: string;\n /**\n * Кастомный класс для topSlot элемента\n */\n topSlot?: string;\n /**\n * Кастомный класс для middleSlot элемента\n */\n middleSlot?: string;\n /**\n * Кастомный класс для contentSlot элемента\n */\n contentSlot?: string;\n};\n```\n\n## Compound types\n\n### AnalyticalWidget.Header\n\n```typescript\ninterface AnalyticalWidgetHeaderProps {\n /**\n * Заголовок.
|
|
915
|
+
"apiDocs": "# AnalyticalWidget API\n\n## AnalyticalWidgetProps\n\n```typescript\ntype AnalyticalWidgetProps = {\n /**\n * Размер виджета\n */\n size: AnalyticalWidgetSize;\n /**\n * Добавление или удаление скролла у contentSlot\n */\n scrollable?: boolean;\n /**\n * ReactNode для шапки\n */\n headerSlot?: ReactNode;\n /**\n * ReactNode (в основном для фильтров)\n */\n topSlot?: ReactNode;\n /**\n * ReactNode (в основном для табов. Отображается только в режиме l)\n */\n middleSlot?: ReactNode;\n /**\n * ReactNode с контентом\n */\n contentSlot: ReactNode;\n /**\n * Кастомные классы для слотов и самого компонента\n */\n classes?: AnalyticalWidgetClasses;\n /**\n * Кастомные стили styled-components для основного контейнера виджета\n */\n $css?: string | CSSObject | FlattenSimpleInterpolation;\n};\n```\n\n## AnalyticalWidgetSize\n\n```typescript\ntype AnalyticalWidgetSize = 'l' | 'm' | 's';\n```\n\n## AnalyticalWidgetClasses\n\n```typescript\ntype AnalyticalWidgetClasses = {\n /**\n * Кастомный класс для root элемента\n */\n root?: string;\n /**\n * Кастомный класс для topSlot элемента\n */\n topSlot?: string;\n /**\n * Кастомный класс для middleSlot элемента\n */\n middleSlot?: string;\n /**\n * Кастомный класс для contentSlot элемента\n */\n contentSlot?: string;\n};\n```\n\n## Compound types\n\n### AnalyticalWidget.Header\n\n```typescript\ninterface AnalyticalWidgetHeaderProps {\n /**\n * Заголовок. Строка обрезается троеточием (truncated text) с Tooltip при наведении\n * на обрезанный текст. Можно передать произвольный ReactNode (например, Skeleton на\n * время загрузки данных с бэкенда) — он рендерится как есть, без тултипа.\n */\n title?: ReactNode;\n /**\n * Пропсы для Tooltip заголовка\n */\n titleTooltipProps?: Omit<TooltipProps, 'text' | 'target'>;\n /**\n * Метка справа от заголовка\n */\n badge?: string;\n /**\n * Стили для метки (badge). Позволяет переопределить, например, text-transform\n */\n badgeStyles?: CSSProperties;\n /**\n * Подзаголовок. Строка обрезается троеточием (truncated text) с Tooltip при наведении\n * на обрезанный текст. Можно передать произвольный ReactNode (например, Skeleton на\n * время загрузки) — он рендерится как есть, без тултипа.\n */\n subtitle?: ReactNode;\n /**\n * Пропсы для Tooltip подзаголовка\n */\n subtitleTooltipProps?: Omit<TooltipProps, 'text' | 'target'>;\n /**\n * Текст Tooltip при наведении на иконку i, справа от тега. Если не передать этот параметр, то иконка отображаться не будет\n */\n infoTooltipText?: string;\n /**\n * Пропсы для Tooltip иконки i, справа от тега.\n */\n infoTooltipProps?: Omit<TooltipProps, 'text' | 'target'>;\n /**\n * @deprecated Стрелка больше не рисуется. Используйте `titleLinkProps`.\n */\n href?: string;\n /**\n * @deprecated Стрелка больше не рисуется. Используйте `titleLinkProps`.\n */\n hrefProps?: {\n onClick?: MouseEventHandler<HTMLAnchorElement>;\n onKeyDown?: KeyboardEventHandler<HTMLAnchorElement>;\n };\n /**\n * Если необходимо title сделать ссылкой.\n * Пропсы для компонента Link, который оборачивает заголовок.\n * @default underline=\"none\"\n */\n titleLinkProps?: Omit<LinkCompProps, 'ref'>;\n /**\n * Слот для контента в правой части шапки\n */\n rightSlot?: ReactNode;\n /**\n * Имя класса для шапки\n */\n className?: string;\n}\n```\n\n### AnalyticalWidget.Chips\n\n```typescript\ntype AnalyticalWidgetFixedChipProps = ChipCompProps & {\n key?: string | number;\n};\n```\n\n### AnalyticalWidget.FilterIconButton\n\n```typescript\ntype IconButtonFilterProps = IconButtonProps & {\n redSquare?: boolean;\n dropdownProps?: ComponentProps<typeof Dropdown>;\n iconSize?: ComponentProps<typeof Icon>['size'];\n};\n```\n\n### AnalyticalWidget.DotsIconButton\n\n```typescript\ntype IconButtonDotsProps = IconButtonProps & {\n dropdownProps?: ComponentProps<typeof Dropdown>;\n iconSize?: ComponentProps<typeof Icon>['size'];\n iconOrientation?: 'horizontal' | 'vertical';\n};\n```",
|
|
983
916
|
"curatedStories": [
|
|
984
917
|
{
|
|
985
918
|
"exportName": "AnalyticalWidgetL",
|
|
986
919
|
"displayName": "AnalyticalWidgetL",
|
|
987
920
|
"type": "full-code",
|
|
988
|
-
"code": "import {\n Box,\n Combobox,\n Flow,\n SegmentGroup,\n SegmentProvider,\n TooltipList,\n useFiltersList,\n IconDone,\n
|
|
921
|
+
"code": "import {\n Box,\n Combobox,\n Flow,\n SegmentGroup,\n SegmentProvider,\n TooltipList,\n useFiltersList,\n IconDone,\n SegmentItem,\n AnalyticalWidget,\n textInfo\n} from '@daisforge/ui';\nimport type { ItemOrGroup } from '@daisforge/ui';\n\nimport React, { useMemo, useReducer, useState } from 'react';\n\ntype Filters = {\n searchedV: string;\n blocks: string[];\n tribes: string[];\n allocation: string;\n year: number | null;\n filterButton: string;\n dotsButton: string;\n};\n\nconst DEFAULT_FILTERS: Filters = {\n searchedV: '',\n blocks: [],\n tribes: [],\n allocation: '',\n year: null,\n filterButton: '',\n dotsButton: '',\n};\n\nconst LABELS: { [key in keyof Filters]: string } = {\n searchedV: 'Поиск',\n blocks: 'Блок',\n tribes: 'Трайб',\n allocation: 'Аллокация',\n year: 'Год',\n filterButton: 'Фильтры',\n dotsButton: 'Меню',\n};\n\nconst useFetch = (key: 'blocks' | 'tribes' | 'allocation', num = 10) =>\n useMemo(\n () =>\n Array(num)\n .fill(0)\n .map((_, i) => ({\n label: \\\n\n() => {\n const [filters, updateFilters] = useReducer(\n filtersReducer,\n DEFAULT_FILTERS,\n );\n const filtersBlocksOption = useFetch('blocks', 10);\n const filtersTribesOption = useFetch('tribes', 15);\n const filtersAllocationOption = useFetch('allocation', 10);\n const someItems = Array(3).fill(0);\n\n const { filterList, filterListOpened } = useFiltersList({\n filters,\n options: {\n blocks: filtersBlocksOption,\n tribes: filtersTribesOption,\n allocation: filtersAllocationOption,\n filterButton: filterButtonOptions,\n dotsButton: dotsButtonOptions,\n } as Record<keyof Filters, { label: string; value: string }[]>,\n updateFilters: (key, newV) => updateFilters({ [key]: newV }),\n filtersInfo: {\n searchedV: { label: 'Поиск', clearedValue: '' },\n blocks: { label: 'Блок', clearedValue: [] },\n tribes: { label: 'Трайб', clearedValue: [] },\n allocation: { label: 'Аллокация', clearedValue: '' },\n year: { label: 'Год', clearedValue: null },\n filterButton: { label: 'Фильтр', clearedValue: '' },\n dotsButton: { label: 'Меню', clearedValue: '' },\n },\n });\n\n const chipsList = filterList\n .map((item) => {\n if ('groupLabel' in item) {\n return item.items.map((innerItem) => ({\n text: String(innerItem.label),\n view: 'default' as const,\n hasClear: false as const,\n onClick: innerItem.onClick,\n }));\n }\n return {\n text: String(item.label),\n view: 'default' as const,\n hasClear: false as const,\n onClick: item.onClick,\n };\n })\n .flat();\n\n return (\n <GridContainerL>\n <SegmentProvider defaultSelected={['item_0']}>\n <div\n style={{\n position: 'relative',\n width: 'min-content',\n }}\n >\n <AnalyticalWidget\n size=\"l\"\n headerSlot={\n <AnalyticalWidget.Header\n title=\"Analytic widget L\"\n badge=\"TA\"\n subtitle=\"Monthly report\"\n rightSlot={\n <Flow\n alignment=\"center\"\n mainAxisGap=\"8px\"\n style={{\n flexWrap: 'nowrap',\n }}\n >\n <SegmentGroup hasBackground size=\"xs\">\n {someItems.map((_, i) => (\n <SegmentItem\n // eslint-disable-next-line react/no-array-index-key\n key={`item:${i}`}\n value={`item_${i}`}\n label={`Label${i + 1}`}\n size=\"xs\"\n view=\"primary\"\n />\n ))}\n </SegmentGroup>\n </Flow>\n }\n infoTooltipText=\"Info\"\n href=\"/\"\n />\n }\n topSlot={\n <Flow orientation=\"vertical\" mainAxisGap={8}>\n <AnalyticalWidget.Chips\n opened={filterListOpened}\n isWrapped\n gap=\"wide\"\n isCommonChipStyles={false}\n chips={chipsList}\n />\n </Flow>\n }\n contentSlot={\n <div\n style={{\n minHeight: 'fit-content',\n }}\n >\n {longText()}\n </div>\n }\n classes={{\n topSlot: 'myCustomClassForTopSlot',\n middleSlot: 'myCustomClassForMiddleSlot',\n contentSlot: 'myCustomClassForContentSlot',\n root: 'myCustomClassForRoot',\n }}\n />\n <AnalyticalWidget.DotsIconButton\n absolute\n dropdownProps={{\n items: generateButtonItems(\n 'dotsButton',\n dotsButtonOptions,\n filterList,\n ),\n onItemSelect(item) {\n updateFilters({\n dotsButton:\n filters.dotsButton === item.value?.toString()\n ? ''\n : item.value?.toString() ?? '',\n });\n },\n }}\n />\n </div>\n </SegmentProvider>\n </GridContainerL>\n );\n }"
|
|
989
922
|
},
|
|
990
923
|
{
|
|
991
924
|
"exportName": "AnalyticalWidgetM",
|
|
992
925
|
"displayName": "AnalyticalWidgetM",
|
|
993
926
|
"type": "full-code",
|
|
994
|
-
"code": "import {\n Box,\n Combobox,\n Flow,\n SegmentGroup,\n SegmentProvider,\n TooltipList,\n useFiltersList,\n IconDone,\n
|
|
927
|
+
"code": "import {\n Box,\n Combobox,\n Flow,\n SegmentGroup,\n SegmentProvider,\n TooltipList,\n useFiltersList,\n IconDone,\n SegmentItem,\n AnalyticalWidget,\n textInfo\n} from '@daisforge/ui';\nimport type { ItemOrGroup } from '@daisforge/ui';\n\nimport React, { useMemo, useReducer, useState } from 'react';\n\ntype Filters = {\n searchedV: string;\n blocks: string[];\n tribes: string[];\n allocation: string;\n year: number | null;\n filterButton: string;\n dotsButton: string;\n};\n\nconst DEFAULT_FILTERS: Filters = {\n searchedV: '',\n blocks: [],\n tribes: [],\n allocation: '',\n year: null,\n filterButton: '',\n dotsButton: '',\n};\n\nconst LABELS: { [key in keyof Filters]: string } = {\n searchedV: 'Поиск',\n blocks: 'Блок',\n tribes: 'Трайб',\n allocation: 'Аллокация',\n year: 'Год',\n filterButton: 'Фильтры',\n dotsButton: 'Меню',\n};\n\nconst useFetch = (key: 'blocks' | 'tribes' | 'allocation', num = 10) =>\n useMemo(\n () =>\n Array(num)\n .fill(0)\n .map((_, i) => ({\n label: \\\n\n() => {\n const [filters, updateFilters] = useReducer(\n filtersReducer,\n DEFAULT_FILTERS,\n );\n const filtersBlocksOption = useFetch('blocks', 10);\n const filtersTribesOption = useFetch('tribes', 15);\n const filtersAllocationOption = useFetch('allocation', 10);\n const someItems = Array(3).fill(0);\n\n const { filterList, filterListOpened } = useFiltersList({\n filters,\n options: {\n blocks: filtersBlocksOption,\n tribes: filtersTribesOption,\n allocation: filtersAllocationOption,\n filterButton: filterButtonOptions,\n dotsButton: dotsButtonOptions,\n } as Record<keyof Filters, { label: string; value: string }[]>,\n updateFilters: (key, newV) => updateFilters({ [key]: newV }),\n filtersInfo: {\n searchedV: { label: 'Поиск', clearedValue: '' },\n blocks: { label: 'Блок', clearedValue: [] },\n tribes: { label: 'Трайб', clearedValue: [] },\n allocation: { label: 'Аллокация', clearedValue: '' },\n year: { label: 'Год', clearedValue: null },\n filterButton: { label: 'Фильтр', clearedValue: '' },\n dotsButton: { label: 'Меню', clearedValue: '' },\n },\n });\n\n const chipsList = filterList\n .map((item, index) => {\n if ('groupLabel' in item) {\n return item.items.map((innerItem, innerIdex) => ({\n text: String(innerItem.label),\n view: 'default' as const,\n hasClear: false as const,\n onClick: innerItem.onClick,\n key: `chip-key${index}-${innerIdex}-${innerItem.label}`,\n }));\n }\n return {\n text: String(item.label),\n view: 'default' as const,\n hasClear: false as const,\n onClick: item.onClick,\n key: `chip-key-${index}-${item.label}`,\n };\n })\n .flat();\n\n return (\n <GridContainerM>\n <SegmentProvider defaultSelected={['item_0']}>\n <div\n style={{\n position: 'relative',\n width: 'min-content',\n }}\n >\n <AnalyticalWidget\n size=\"m\"\n headerSlot={\n <AnalyticalWidget.Header\n title=\"Analytic widget M\"\n badge=\"TA\"\n subtitle=\"Monthly report\"\n rightSlot={\n <Flow\n alignment=\"center\"\n mainAxisGap=\"8px\"\n style={{\n flexWrap: 'nowrap',\n }}\n >\n <SegmentGroup hasBackground size=\"xs\">\n {someItems.map((_, i) => (\n <SegmentItem\n // eslint-disable-next-line react/no-array-index-key\n key={`item:${i}`}\n value={`item_${i}`}\n label={`Label${i + 1}`}\n size=\"xs\"\n view=\"primary\"\n />\n ))}\n </SegmentGroup>\n </Flow>\n }\n infoTooltipText=\"Info\"\n href=\"/\"\n />\n }\n topSlot={\n <Flow orientation=\"vertical\" mainAxisGap={8}>\n <AnalyticalWidget.Chips\n opened={filterListOpened}\n isWrapped\n gap=\"wide\"\n isCommonChipStyles={false}\n chips={chipsList}\n />\n </Flow>\n }\n contentSlot={\n <div\n style={{\n minHeight: 'fit-content',\n }}\n >\n {longText()}\n </div>\n }\n classes={{\n topSlot: 'myCustomClassForTopSlot',\n middleSlot: 'myCustomClassForMiddleSlot',\n contentSlot: 'myCustomClassForContentSlot',\n root: 'myCustomClassForRoot',\n }}\n />\n <AnalyticalWidget.DotsIconButton\n absolute\n dropdownProps={{\n items: generateButtonItems(\n 'dotsButton',\n dotsButtonOptions,\n filterList,\n ),\n onItemSelect(item) {\n updateFilters({\n dotsButton:\n filters.dotsButton === item.value?.toString()\n ? ''\n : item.value?.toString() ?? '',\n });\n },\n }}\n />\n </div>\n </SegmentProvider>\n </GridContainerM>\n );\n }"
|
|
995
928
|
},
|
|
996
929
|
{
|
|
997
930
|
"exportName": "AnalyticalWidgetS",
|
|
998
931
|
"displayName": "AnalyticalWidgetS",
|
|
999
932
|
"type": "full-code",
|
|
1000
|
-
"code": "import {\n Box,\n Combobox,\n Flow,\n SegmentGroup,\n SegmentProvider,\n TooltipList,\n useFiltersList,\n IconDone,\n
|
|
933
|
+
"code": "import {\n Box,\n Combobox,\n Flow,\n SegmentGroup,\n SegmentProvider,\n TooltipList,\n useFiltersList,\n IconDone,\n SegmentItem,\n AnalyticalWidget,\n textInfo\n} from '@daisforge/ui';\nimport type { ItemOrGroup } from '@daisforge/ui';\n\nimport React, { useMemo, useReducer, useState } from 'react';\n\ntype Filters = {\n searchedV: string;\n blocks: string[];\n tribes: string[];\n allocation: string;\n year: number | null;\n filterButton: string;\n dotsButton: string;\n};\n\nconst DEFAULT_FILTERS: Filters = {\n searchedV: '',\n blocks: [],\n tribes: [],\n allocation: '',\n year: null,\n filterButton: '',\n dotsButton: '',\n};\n\nconst LABELS: { [key in keyof Filters]: string } = {\n searchedV: 'Поиск',\n blocks: 'Блок',\n tribes: 'Трайб',\n allocation: 'Аллокация',\n year: 'Год',\n filterButton: 'Фильтры',\n dotsButton: 'Меню',\n};\n\nconst useFetch = (key: 'blocks' | 'tribes' | 'allocation', num = 10) =>\n useMemo(\n () =>\n Array(num)\n .fill(0)\n .map((_, i) => ({\n label: \\\n\n() => {\n const [filters, updateFilters] = useReducer(\n filtersReducer,\n DEFAULT_FILTERS,\n );\n const filtersBlocksOption = useFetch('blocks', 10);\n const filtersTribesOption = useFetch('tribes', 15);\n const filtersAllocationOption = useFetch('allocation', 10);\n\n const { filterList, filterListOpened } = useFiltersList({\n filters,\n options: {\n blocks: filtersBlocksOption,\n tribes: filtersTribesOption,\n allocation: filtersAllocationOption,\n filterButton: filterButtonOptions,\n dotsButton: dotsButtonOptions,\n } as Record<keyof Filters, { label: string; value: string }[]>,\n updateFilters: (key, newV) => updateFilters({ [key]: newV }),\n filtersInfo: {\n searchedV: { label: 'Поиск', clearedValue: '' },\n blocks: { label: 'Блок', clearedValue: [] },\n tribes: { label: 'Трайб', clearedValue: [] },\n allocation: { label: 'Аллокация', clearedValue: '' },\n year: { label: 'Год', clearedValue: null },\n filterButton: { label: 'Фильтр', clearedValue: '' },\n dotsButton: { label: 'Меню', clearedValue: '' },\n },\n });\n\n const chipsList = filterList\n .map((item) => {\n if ('groupLabel' in item) {\n return item.items.map((innerItem) => ({\n text: String(innerItem.label),\n view: 'default' as const,\n hasClear: false as const,\n onClick: innerItem.onClick,\n }));\n }\n return {\n text: String(item.label),\n view: 'default' as const,\n hasClear: false as const,\n onClick: item.onClick,\n };\n })\n .flat();\n\n return (\n <GridContainerS>\n <SegmentProvider defaultSelected={['item_0']}>\n <div\n style={{\n position: 'relative',\n width: 'min-content',\n }}\n >\n <AnalyticalWidget\n size=\"s\"\n headerSlot={\n <AnalyticalWidget.Header\n title=\"Заголовок\"\n badge=\"TA\"\n subtitle=\"Подзаголовок здесь\"\n infoTooltipText=\"Info\"\n href=\"/\"\n />\n }\n topSlot={\n <Flow orientation=\"vertical\" mainAxisGap={8}>\n <AnalyticalWidget.Chips\n opened={filterListOpened}\n isWrapped\n gap=\"wide\"\n isCommonChipStyles={false}\n chips={chipsList}\n />\n </Flow>\n }\n contentSlot={\n <div\n style={{\n minHeight: 'fit-content',\n }}\n >\n {longText()}\n </div>\n }\n classes={{\n topSlot: 'myCustomClassForTopSlot',\n middleSlot: 'myCustomClassForMiddleSlot',\n contentSlot: 'myCustomClassForContentSlot',\n root: 'myCustomClassForRoot',\n }}\n />\n <AnalyticalWidget.DotsIconButton\n absolute\n dropdownProps={{\n items: generateButtonItems(\n 'dotsButton',\n dotsButtonOptions,\n filterList,\n ),\n onItemSelect(item) {\n updateFilters({\n dotsButton:\n filters.dotsButton === item.value?.toString()\n ? ''\n : item.value?.toString() ?? '',\n });\n },\n }}\n />\n </div>\n </SegmentProvider>\n </GridContainerS>\n );\n }"
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
"exportName": "AnalyticalWidgetCustomTopSlot",
|
|
937
|
+
"displayName": "Custom topSlot + rightSlot",
|
|
938
|
+
"type": "full-code",
|
|
939
|
+
"code": "() => {\n const [filters, updateFilters] = useReducer(\n filtersReducer,\n DEFAULT_FILTERS,\n );\n const filtersBlocksOption = useFetch('blocks', 10);\n const filtersTribesOption = useFetch('tribes', 15);\n const filtersAllocationOption = useFetch('allocation', 10);\n const [period, setPeriod] = useState('month');\n\n const { filterList } = useFiltersList({\n filters,\n options: {\n blocks: filtersBlocksOption,\n tribes: filtersTribesOption,\n allocation: filtersAllocationOption,\n filterButton: filterButtonOptions,\n dotsButton: dotsButtonOptions,\n } as Record<keyof Filters, { label: string; value: string }[]>,\n updateFilters: (key, newV) => updateFilters({ [key]: newV }),\n filtersInfo: {\n searchedV: { label: 'Поиск', clearedValue: '' },\n blocks: { label: 'Блок', clearedValue: [] },\n tribes: { label: 'Трайб', clearedValue: [] },\n allocation: { label: 'Аллокация', clearedValue: '' },\n year: { label: 'Год', clearedValue: null },\n filterButton: { label: 'Фильтр', clearedValue: '' },\n dotsButton: { label: 'Меню', clearedValue: '' },\n },\n });\n\n const customChips = filterList.flatMap((item) =>\n 'groupLabel' in item\n ? item.items.map((inner) => ({\n label: String(inner.label),\n onClick: inner.onClick,\n }))\n : [{ label: String(item.label), onClick: item.onClick }],\n );\n const hasChips = customChips.length > 0;\n const lastRef = useRef(customChips);\n if (hasChips) {\n lastRef.current = customChips;\n }\n const renderedChips = hasChips ? customChips : lastRef.current;\n\n return (\n <div style={{ padding: 20, background: 'grey' }}>\n <div style={{ position: 'relative', width: 600, height: 512 }}>\n <AnalyticalWidget\n size=\"l\"\n headerSlot={\n <AnalyticalWidget.Header\n title=\"Custom topSlot\"\n badge=\"TA\"\n subtitle=\"Свои чипы + Select в rightSlot\"\n infoTooltipText=\"Info\"\n rightSlot={\n <Select\n size=\"xs\"\n value={period}\n onChange={(v) => setPeriod(v as string)}\n items={[\n { label: 'Месяц', value: 'month' },\n { label: 'Квартал', value: 'quarter' },\n { label: 'Год', value: 'year' },\n ]}\n />\n }\n />\n }\n topSlot={\n <div className={analyticalWidgetClassNames.selfSpacedTopSlot}>\n <Collapse isOpen={hasChips} unMountOnClose>\n <div\n style={{\n display: 'flex',\n flexWrap: 'wrap',\n gap: 4,\n paddingTop: 8,\n }}\n >\n {renderedChips.map((chip, index) => (\n <button\n type=\"button\"\n // eslint-disable-next-line react/no-array-index-key\n key={`${chip.label}-${index}`}\n onClick={chip.onClick}\n style={{\n padding: '2px 8px',\n borderRadius: 12,\n background: 'rgba(0, 0, 0, 0.06)',\n border: 'none',\n fontSize: 12,\n lineHeight: '16px',\n whiteSpace: 'nowrap',\n cursor: 'pointer',\n }}\n >\n {chip.label}\n </button>\n ))}\n </div>\n </Collapse>\n </div>\n }\n contentSlot={\n <div style={{ minHeight: 'fit-content' }}>{longText()}</div>\n }\n />\n <AnalyticalWidget.DotsIconButton\n absolute\n dropdownProps={{\n items: generateButtonItems(\n 'dotsButton',\n dotsButtonOptions,\n filterList,\n ),\n onItemSelect(item) {\n updateFilters({\n dotsButton:\n filters.dotsButton === item.value?.toString()\n ? ''\n : item.value?.toString() ?? '',\n });\n },\n }}\n />\n </div>\n </div>\n );\n }"
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
"exportName": "AnalyticalWidgetHeaderSkeleton",
|
|
943
|
+
"displayName": "Header: skeleton title/subtitle",
|
|
944
|
+
"type": "full-code",
|
|
945
|
+
"code": "() => {\n const [loading, setLoading] = useState(true);\n\n return (\n <div style={{ padding: 20, background: 'grey' }}>\n <div style={{ marginBottom: 12 }}>\n <Button size=\"s\" onClick={() => setLoading((v) => !v)}>\n {loading ? 'Загрузить данные' : 'Показать скелетон'}\n </Button>\n </div>\n <div style={{ position: 'relative', width: 600, height: 512 }}>\n <AnalyticalWidget\n size=\"l\"\n headerSlot={\n <AnalyticalWidget.Header\n title={\n loading ? (\n <LineSkeleton size=\"bodyM\" style={{ width: 180 }} />\n ) : (\n 'Аналитический виджет'\n )\n }\n badge={loading ? undefined : 'TA'}\n subtitle={\n loading ? (\n <LineSkeleton size=\"bodyXS\" style={{ width: 120 }} />\n ) : (\n 'Данные за месяц'\n )\n }\n infoTooltipText=\"Info\"\n />\n }\n contentSlot={\n <div style={{ minHeight: 'fit-content' }}>{longText()}</div>\n }\n />\n </div>\n </div>\n );\n }"
|
|
1001
946
|
}
|
|
1002
947
|
],
|
|
1003
948
|
"hasCuratedMeta": true,
|
|
@@ -1010,26 +955,25 @@
|
|
|
1010
955
|
"exportName": "AnalyticalWidgetL",
|
|
1011
956
|
"displayName": "AnalyticalWidgetL",
|
|
1012
957
|
"type": "full-code",
|
|
1013
|
-
"code": "import {\n Box,\n Combobox,\n Flow,\n SegmentGroup,\n SegmentProvider,\n TooltipList,\n useFiltersList,\n IconDone,\n
|
|
958
|
+
"code": "import {\n Box,\n Combobox,\n Flow,\n SegmentGroup,\n SegmentProvider,\n TooltipList,\n useFiltersList,\n IconDone,\n SegmentItem,\n AnalyticalWidget,\n textInfo\n} from '@daisforge/ui';\nimport type { ItemOrGroup } from '@daisforge/ui';\n\nimport React, { useMemo, useReducer, useState } from 'react';\n\ntype Filters = {\n searchedV: string;\n blocks: string[];\n tribes: string[];\n allocation: string;\n year: number | null;\n filterButton: string;\n dotsButton: string;\n};\n\nconst DEFAULT_FILTERS: Filters = {\n searchedV: '',\n blocks: [],\n tribes: [],\n allocation: '',\n year: null,\n filterButton: '',\n dotsButton: '',\n};\n\nconst LABELS: { [key in keyof Filters]: string } = {\n searchedV: 'Поиск',\n blocks: 'Блок',\n tribes: 'Трайб',\n allocation: 'Аллокация',\n year: 'Год',\n filterButton: 'Фильтры',\n dotsButton: 'Меню',\n};\n\nconst useFetch = (key: 'blocks' | 'tribes' | 'allocation', num = 10) =>\n useMemo(\n () =>\n Array(num)\n .fill(0)\n .map((_, i) => ({\n label: \\\n\n() => {\n const [filters, updateFilters] = useReducer(\n filtersReducer,\n DEFAULT_FILTERS,\n );\n const filtersBlocksOption = useFetch('blocks', 10);\n const filtersTribesOption = useFetch('tribes', 15);\n const filtersAllocationOption = useFetch('allocation', 10);\n const someItems = Array(3).fill(0);\n\n const { filterList, filterListOpened } = useFiltersList({\n filters,\n options: {\n blocks: filtersBlocksOption,\n tribes: filtersTribesOption,\n allocation: filtersAllocationOption,\n filterButton: filterButtonOptions,\n dotsButton: dotsButtonOptions,\n } as Record<keyof Filters, { label: string; value: string }[]>,\n updateFilters: (key, newV) => updateFilters({ [key]: newV }),\n filtersInfo: {\n searchedV: { label: 'Поиск', clearedValue: '' },\n blocks: { label: 'Блок', clearedValue: [] },\n tribes: { label: 'Трайб', clearedValue: [] },\n allocation: { label: 'Аллокация', clearedValue: '' },\n year: { label: 'Год', clearedValue: null },\n filterButton: { label: 'Фильтр', clearedValue: '' },\n dotsButton: { label: 'Меню', clearedValue: '' },\n },\n });\n\n const chipsList = filterList\n .map((item) => {\n if ('groupLabel' in item) {\n return item.items.map((innerItem) => ({\n text: String(innerItem.label),\n view: 'default' as const,\n hasClear: false as const,\n onClick: innerItem.onClick,\n }));\n }\n return {\n text: String(item.label),\n view: 'default' as const,\n hasClear: false as const,\n onClick: item.onClick,\n };\n })\n .flat();\n\n return (\n <GridContainerL>\n <SegmentProvider defaultSelected={['item_0']}>\n <div\n style={{\n position: 'relative',\n width: 'min-content',\n }}\n >\n <AnalyticalWidget\n size=\"l\"\n headerSlot={\n <AnalyticalWidget.Header\n title=\"Analytic widget L\"\n badge=\"TA\"\n subtitle=\"Monthly report\"\n rightSlot={\n <Flow\n alignment=\"center\"\n mainAxisGap=\"8px\"\n style={{\n flexWrap: 'nowrap',\n }}\n >\n <SegmentGroup hasBackground size=\"xs\">\n {someItems.map((_, i) => (\n <SegmentItem\n // eslint-disable-next-line react/no-array-index-key\n key={`item:${i}`}\n value={`item_${i}`}\n label={`Label${i + 1}`}\n size=\"xs\"\n view=\"primary\"\n />\n ))}\n </SegmentGroup>\n </Flow>\n }\n infoTooltipText=\"Info\"\n href=\"/\"\n />\n }\n topSlot={\n <Flow orientation=\"vertical\" mainAxisGap={8}>\n <AnalyticalWidget.Chips\n opened={filterListOpened}\n isWrapped\n gap=\"wide\"\n isCommonChipStyles={false}\n chips={chipsList}\n />\n </Flow>\n }\n contentSlot={\n <div\n style={{\n minHeight: 'fit-content',\n }}\n >\n {longText()}\n </div>\n }\n classes={{\n topSlot: 'myCustomClassForTopSlot',\n middleSlot: 'myCustomClassForMiddleSlot',\n contentSlot: 'myCustomClassForContentSlot',\n root: 'myCustomClassForRoot',\n }}\n />\n <AnalyticalWidget.DotsIconButton\n absolute\n dropdownProps={{\n items: generateButtonItems(\n 'dotsButton',\n dotsButtonOptions,\n filterList,\n ),\n onItemSelect(item) {\n updateFilters({\n dotsButton:\n filters.dotsButton === item.value?.toString()\n ? ''\n : item.value?.toString() ?? '',\n });\n },\n }}\n />\n </div>\n </SegmentProvider>\n </GridContainerL>\n );\n }"
|
|
1014
959
|
},
|
|
1015
960
|
{
|
|
1016
961
|
"exportName": "AnalyticalWidgetM",
|
|
1017
962
|
"displayName": "AnalyticalWidgetM",
|
|
1018
963
|
"type": "full-code",
|
|
1019
|
-
"code": "import {\n Box,\n Combobox,\n Flow,\n SegmentGroup,\n SegmentProvider,\n TooltipList,\n useFiltersList,\n IconDone,\n
|
|
964
|
+
"code": "import {\n Box,\n Combobox,\n Flow,\n SegmentGroup,\n SegmentProvider,\n TooltipList,\n useFiltersList,\n IconDone,\n SegmentItem,\n AnalyticalWidget,\n textInfo\n} from '@daisforge/ui';\nimport type { ItemOrGroup } from '@daisforge/ui';\n\nimport React, { useMemo, useReducer, useState } from 'react';\n\ntype Filters = {\n searchedV: string;\n blocks: string[];\n tribes: string[];\n allocation: string;\n year: number | null;\n filterButton: string;\n dotsButton: string;\n};\n\nconst DEFAULT_FILTERS: Filters = {\n searchedV: '',\n blocks: [],\n tribes: [],\n allocation: '',\n year: null,\n filterButton: '',\n dotsButton: '',\n};\n\nconst LABELS: { [key in keyof Filters]: string } = {\n searchedV: 'Поиск',\n blocks: 'Блок',\n tribes: 'Трайб',\n allocation: 'Аллокация',\n year: 'Год',\n filterButton: 'Фильтры',\n dotsButton: 'Меню',\n};\n\nconst useFetch = (key: 'blocks' | 'tribes' | 'allocation', num = 10) =>\n useMemo(\n () =>\n Array(num)\n .fill(0)\n .map((_, i) => ({\n label: \\\n\n() => {\n const [filters, updateFilters] = useReducer(\n filtersReducer,\n DEFAULT_FILTERS,\n );\n const filtersBlocksOption = useFetch('blocks', 10);\n const filtersTribesOption = useFetch('tribes', 15);\n const filtersAllocationOption = useFetch('allocation', 10);\n const someItems = Array(3).fill(0);\n\n const { filterList, filterListOpened } = useFiltersList({\n filters,\n options: {\n blocks: filtersBlocksOption,\n tribes: filtersTribesOption,\n allocation: filtersAllocationOption,\n filterButton: filterButtonOptions,\n dotsButton: dotsButtonOptions,\n } as Record<keyof Filters, { label: string; value: string }[]>,\n updateFilters: (key, newV) => updateFilters({ [key]: newV }),\n filtersInfo: {\n searchedV: { label: 'Поиск', clearedValue: '' },\n blocks: { label: 'Блок', clearedValue: [] },\n tribes: { label: 'Трайб', clearedValue: [] },\n allocation: { label: 'Аллокация', clearedValue: '' },\n year: { label: 'Год', clearedValue: null },\n filterButton: { label: 'Фильтр', clearedValue: '' },\n dotsButton: { label: 'Меню', clearedValue: '' },\n },\n });\n\n const chipsList = filterList\n .map((item, index) => {\n if ('groupLabel' in item) {\n return item.items.map((innerItem, innerIdex) => ({\n text: String(innerItem.label),\n view: 'default' as const,\n hasClear: false as const,\n onClick: innerItem.onClick,\n key: `chip-key${index}-${innerIdex}-${innerItem.label}`,\n }));\n }\n return {\n text: String(item.label),\n view: 'default' as const,\n hasClear: false as const,\n onClick: item.onClick,\n key: `chip-key-${index}-${item.label}`,\n };\n })\n .flat();\n\n return (\n <GridContainerM>\n <SegmentProvider defaultSelected={['item_0']}>\n <div\n style={{\n position: 'relative',\n width: 'min-content',\n }}\n >\n <AnalyticalWidget\n size=\"m\"\n headerSlot={\n <AnalyticalWidget.Header\n title=\"Analytic widget M\"\n badge=\"TA\"\n subtitle=\"Monthly report\"\n rightSlot={\n <Flow\n alignment=\"center\"\n mainAxisGap=\"8px\"\n style={{\n flexWrap: 'nowrap',\n }}\n >\n <SegmentGroup hasBackground size=\"xs\">\n {someItems.map((_, i) => (\n <SegmentItem\n // eslint-disable-next-line react/no-array-index-key\n key={`item:${i}`}\n value={`item_${i}`}\n label={`Label${i + 1}`}\n size=\"xs\"\n view=\"primary\"\n />\n ))}\n </SegmentGroup>\n </Flow>\n }\n infoTooltipText=\"Info\"\n href=\"/\"\n />\n }\n topSlot={\n <Flow orientation=\"vertical\" mainAxisGap={8}>\n <AnalyticalWidget.Chips\n opened={filterListOpened}\n isWrapped\n gap=\"wide\"\n isCommonChipStyles={false}\n chips={chipsList}\n />\n </Flow>\n }\n contentSlot={\n <div\n style={{\n minHeight: 'fit-content',\n }}\n >\n {longText()}\n </div>\n }\n classes={{\n topSlot: 'myCustomClassForTopSlot',\n middleSlot: 'myCustomClassForMiddleSlot',\n contentSlot: 'myCustomClassForContentSlot',\n root: 'myCustomClassForRoot',\n }}\n />\n <AnalyticalWidget.DotsIconButton\n absolute\n dropdownProps={{\n items: generateButtonItems(\n 'dotsButton',\n dotsButtonOptions,\n filterList,\n ),\n onItemSelect(item) {\n updateFilters({\n dotsButton:\n filters.dotsButton === item.value?.toString()\n ? ''\n : item.value?.toString() ?? '',\n });\n },\n }}\n />\n </div>\n </SegmentProvider>\n </GridContainerM>\n );\n }"
|
|
1020
965
|
},
|
|
1021
966
|
{
|
|
1022
967
|
"exportName": "AnalyticalWidgetS",
|
|
1023
968
|
"displayName": "AnalyticalWidgetS",
|
|
1024
969
|
"type": "full-code",
|
|
1025
|
-
"code": "import {\n Box,\n Combobox,\n Flow,\n SegmentGroup,\n SegmentProvider,\n TooltipList,\n useFiltersList,\n IconDone,\n
|
|
970
|
+
"code": "import {\n Box,\n Combobox,\n Flow,\n SegmentGroup,\n SegmentProvider,\n TooltipList,\n useFiltersList,\n IconDone,\n SegmentItem,\n AnalyticalWidget,\n textInfo\n} from '@daisforge/ui';\nimport type { ItemOrGroup } from '@daisforge/ui';\n\nimport React, { useMemo, useReducer, useState } from 'react';\n\ntype Filters = {\n searchedV: string;\n blocks: string[];\n tribes: string[];\n allocation: string;\n year: number | null;\n filterButton: string;\n dotsButton: string;\n};\n\nconst DEFAULT_FILTERS: Filters = {\n searchedV: '',\n blocks: [],\n tribes: [],\n allocation: '',\n year: null,\n filterButton: '',\n dotsButton: '',\n};\n\nconst LABELS: { [key in keyof Filters]: string } = {\n searchedV: 'Поиск',\n blocks: 'Блок',\n tribes: 'Трайб',\n allocation: 'Аллокация',\n year: 'Год',\n filterButton: 'Фильтры',\n dotsButton: 'Меню',\n};\n\nconst useFetch = (key: 'blocks' | 'tribes' | 'allocation', num = 10) =>\n useMemo(\n () =>\n Array(num)\n .fill(0)\n .map((_, i) => ({\n label: \\\n\n() => {\n const [filters, updateFilters] = useReducer(\n filtersReducer,\n DEFAULT_FILTERS,\n );\n const filtersBlocksOption = useFetch('blocks', 10);\n const filtersTribesOption = useFetch('tribes', 15);\n const filtersAllocationOption = useFetch('allocation', 10);\n\n const { filterList, filterListOpened } = useFiltersList({\n filters,\n options: {\n blocks: filtersBlocksOption,\n tribes: filtersTribesOption,\n allocation: filtersAllocationOption,\n filterButton: filterButtonOptions,\n dotsButton: dotsButtonOptions,\n } as Record<keyof Filters, { label: string; value: string }[]>,\n updateFilters: (key, newV) => updateFilters({ [key]: newV }),\n filtersInfo: {\n searchedV: { label: 'Поиск', clearedValue: '' },\n blocks: { label: 'Блок', clearedValue: [] },\n tribes: { label: 'Трайб', clearedValue: [] },\n allocation: { label: 'Аллокация', clearedValue: '' },\n year: { label: 'Год', clearedValue: null },\n filterButton: { label: 'Фильтр', clearedValue: '' },\n dotsButton: { label: 'Меню', clearedValue: '' },\n },\n });\n\n const chipsList = filterList\n .map((item) => {\n if ('groupLabel' in item) {\n return item.items.map((innerItem) => ({\n text: String(innerItem.label),\n view: 'default' as const,\n hasClear: false as const,\n onClick: innerItem.onClick,\n }));\n }\n return {\n text: String(item.label),\n view: 'default' as const,\n hasClear: false as const,\n onClick: item.onClick,\n };\n })\n .flat();\n\n return (\n <GridContainerS>\n <SegmentProvider defaultSelected={['item_0']}>\n <div\n style={{\n position: 'relative',\n width: 'min-content',\n }}\n >\n <AnalyticalWidget\n size=\"s\"\n headerSlot={\n <AnalyticalWidget.Header\n title=\"Заголовок\"\n badge=\"TA\"\n subtitle=\"Подзаголовок здесь\"\n infoTooltipText=\"Info\"\n href=\"/\"\n />\n }\n topSlot={\n <Flow orientation=\"vertical\" mainAxisGap={8}>\n <AnalyticalWidget.Chips\n opened={filterListOpened}\n isWrapped\n gap=\"wide\"\n isCommonChipStyles={false}\n chips={chipsList}\n />\n </Flow>\n }\n contentSlot={\n <div\n style={{\n minHeight: 'fit-content',\n }}\n >\n {longText()}\n </div>\n }\n classes={{\n topSlot: 'myCustomClassForTopSlot',\n middleSlot: 'myCustomClassForMiddleSlot',\n contentSlot: 'myCustomClassForContentSlot',\n root: 'myCustomClassForRoot',\n }}\n />\n <AnalyticalWidget.DotsIconButton\n absolute\n dropdownProps={{\n items: generateButtonItems(\n 'dotsButton',\n dotsButtonOptions,\n filterList,\n ),\n onItemSelect(item) {\n updateFilters({\n dotsButton:\n filters.dotsButton === item.value?.toString()\n ? ''\n : item.value?.toString() ?? '',\n });\n },\n }}\n />\n </div>\n </SegmentProvider>\n </GridContainerS>\n );\n }"
|
|
1026
971
|
},
|
|
1027
972
|
{
|
|
1028
|
-
"exportName": "
|
|
1029
|
-
"displayName": "
|
|
1030
|
-
"type": "
|
|
1031
|
-
"code": "
|
|
1032
|
-
"sourceFile": "packages/storybook/src/stories/AnalyticalWidget/components/WidgetS.tsx"
|
|
973
|
+
"exportName": "AnalyticalWidgetCustomTopSlot",
|
|
974
|
+
"displayName": "Custom topSlot + rightSlot",
|
|
975
|
+
"type": "full-code",
|
|
976
|
+
"code": "() => {\n const [filters, updateFilters] = useReducer(\n filtersReducer,\n DEFAULT_FILTERS,\n );\n const filtersBlocksOption = useFetch('blocks', 10);\n const filtersTribesOption = useFetch('tribes', 15);\n const filtersAllocationOption = useFetch('allocation', 10);\n const [period, setPeriod] = useState('month');\n\n const { filterList } = useFiltersList({\n filters,\n options: {\n blocks: filtersBlocksOption,\n tribes: filtersTribesOption,\n allocation: filtersAllocationOption,\n filterButton: filterButtonOptions,\n dotsButton: dotsButtonOptions,\n } as Record<keyof Filters, { label: string; value: string }[]>,\n updateFilters: (key, newV) => updateFilters({ [key]: newV }),\n filtersInfo: {\n searchedV: { label: 'Поиск', clearedValue: '' },\n blocks: { label: 'Блок', clearedValue: [] },\n tribes: { label: 'Трайб', clearedValue: [] },\n allocation: { label: 'Аллокация', clearedValue: '' },\n year: { label: 'Год', clearedValue: null },\n filterButton: { label: 'Фильтр', clearedValue: '' },\n dotsButton: { label: 'Меню', clearedValue: '' },\n },\n });\n\n const customChips = filterList.flatMap((item) =>\n 'groupLabel' in item\n ? item.items.map((inner) => ({\n label: String(inner.label),\n onClick: inner.onClick,\n }))\n : [{ label: String(item.label), onClick: item.onClick }],\n );\n const hasChips = customChips.length > 0;\n const lastRef = useRef(customChips);\n if (hasChips) {\n lastRef.current = customChips;\n }\n const renderedChips = hasChips ? customChips : lastRef.current;\n\n return (\n <div style={{ padding: 20, background: 'grey' }}>\n <div style={{ position: 'relative', width: 600, height: 512 }}>\n <AnalyticalWidget\n size=\"l\"\n headerSlot={\n <AnalyticalWidget.Header\n title=\"Custom topSlot\"\n badge=\"TA\"\n subtitle=\"Свои чипы + Select в rightSlot\"\n infoTooltipText=\"Info\"\n rightSlot={\n <Select\n size=\"xs\"\n value={period}\n onChange={(v) => setPeriod(v as string)}\n items={[\n { label: 'Месяц', value: 'month' },\n { label: 'Квартал', value: 'quarter' },\n { label: 'Год', value: 'year' },\n ]}\n />\n }\n />\n }\n topSlot={\n <div className={analyticalWidgetClassNames.selfSpacedTopSlot}>\n <Collapse isOpen={hasChips} unMountOnClose>\n <div\n style={{\n display: 'flex',\n flexWrap: 'wrap',\n gap: 4,\n paddingTop: 8,\n }}\n >\n {renderedChips.map((chip, index) => (\n <button\n type=\"button\"\n // eslint-disable-next-line react/no-array-index-key\n key={`${chip.label}-${index}`}\n onClick={chip.onClick}\n style={{\n padding: '2px 8px',\n borderRadius: 12,\n background: 'rgba(0, 0, 0, 0.06)',\n border: 'none',\n fontSize: 12,\n lineHeight: '16px',\n whiteSpace: 'nowrap',\n cursor: 'pointer',\n }}\n >\n {chip.label}\n </button>\n ))}\n </div>\n </Collapse>\n </div>\n }\n contentSlot={\n <div style={{ minHeight: 'fit-content' }}>{longText()}</div>\n }\n />\n <AnalyticalWidget.DotsIconButton\n absolute\n dropdownProps={{\n items: generateButtonItems(\n 'dotsButton',\n dotsButtonOptions,\n filterList,\n ),\n onItemSelect(item) {\n updateFilters({\n dotsButton:\n filters.dotsButton === item.value?.toString()\n ? ''\n : item.value?.toString() ?? '',\n });\n },\n }}\n />\n </div>\n </div>\n );\n }"
|
|
1033
977
|
}
|
|
1034
978
|
]
|
|
1035
979
|
},
|
|
@@ -5033,6 +4977,13 @@
|
|
|
5033
4977
|
"importStatement": "import { Carousel } from '@daisforge/ui';",
|
|
5034
4978
|
"minimalUsage": "<Carousel />",
|
|
5035
4979
|
"examples": [
|
|
4980
|
+
{
|
|
4981
|
+
"exportName": "Usage",
|
|
4982
|
+
"displayName": "Использование в Stories.stories.tsx",
|
|
4983
|
+
"type": "usage",
|
|
4984
|
+
"code": "<Carousel\n index={carouselIndex}\n onChangeIndex={setCarouselIndex}\n scrollAlign=\"start\"\n gap=\"16px\"\n style={{ maxWidth: 360 }}\n >\n {CAROUSEL_PALETTE.map(([from, to], i) => {\n const n = i + 1;\n return (\n <CarouselItem key={n}>\n <Stories.Preview\n title={`Превью ${n}`}\n image={asset(String(n), from, to)}\n viewed={viewed[i]}\n slides={[\n { src: asset(`Слайд ${n}.1`, from, to) },\n { src: asset(`Слайд ${n}.2`, to, from) },\n ]}\n />\n </CarouselItem>\n );\n })}\n </Carousel>",
|
|
4985
|
+
"sourceFile": "packages/storybook/src/stories/Stories/Stories.stories.tsx"
|
|
4986
|
+
},
|
|
5036
4987
|
{
|
|
5037
4988
|
"exportName": "Vendor1",
|
|
5038
4989
|
"displayName": "Примеры Примеры",
|
|
@@ -5087,7 +5038,15 @@
|
|
|
5087
5038
|
"importPath": "@daisforge/ui",
|
|
5088
5039
|
"importStatement": "import { CarouselItem } from '@daisforge/ui';",
|
|
5089
5040
|
"minimalUsage": "<CarouselItem />",
|
|
5090
|
-
"examples": [
|
|
5041
|
+
"examples": [
|
|
5042
|
+
{
|
|
5043
|
+
"exportName": "Usage",
|
|
5044
|
+
"displayName": "Использование в Stories.stories.tsx",
|
|
5045
|
+
"type": "usage",
|
|
5046
|
+
"code": "<CarouselItem key={n}>\n <Stories.Preview\n title={`Превью ${n}`}\n image={asset(String(n), from, to)}\n viewed={viewed[i]}\n slides={[\n { src: asset(`Слайд ${n}.1`, from, to) },\n { src: asset(`Слайд ${n}.2`, to, from) },\n ]}\n />\n </CarouselItem>",
|
|
5047
|
+
"sourceFile": "packages/storybook/src/stories/Stories/Stories.stories.tsx"
|
|
5048
|
+
}
|
|
5049
|
+
]
|
|
5091
5050
|
},
|
|
5092
5051
|
"CellTextbox": {
|
|
5093
5052
|
"name": "CellTextbox",
|
|
@@ -5850,6 +5809,18 @@
|
|
|
5850
5809
|
"type": "React.HTMLInputAutoCompleteAttribute | undefined",
|
|
5851
5810
|
"required": false,
|
|
5852
5811
|
"description": ""
|
|
5812
|
+
},
|
|
5813
|
+
{
|
|
5814
|
+
"name": "enterKeyHint",
|
|
5815
|
+
"type": "\"enter\" | \"done\" | \"go\" | \"next\" | \"previous\" | \"search\" | \"send\" | undefined",
|
|
5816
|
+
"required": false,
|
|
5817
|
+
"description": ""
|
|
5818
|
+
},
|
|
5819
|
+
{
|
|
5820
|
+
"name": "type",
|
|
5821
|
+
"type": "React.HTMLInputTypeAttribute | undefined",
|
|
5822
|
+
"required": false,
|
|
5823
|
+
"description": ""
|
|
5853
5824
|
}
|
|
5854
5825
|
],
|
|
5855
5826
|
"propsTypeName": "ComponentProps<typeof CodeField>",
|
|
@@ -13270,12 +13241,6 @@
|
|
|
13270
13241
|
"type": "React.ReactNode",
|
|
13271
13242
|
"required": false,
|
|
13272
13243
|
"description": ""
|
|
13273
|
-
},
|
|
13274
|
-
{
|
|
13275
|
-
"name": "actionsSlotStyle",
|
|
13276
|
-
"type": "React.CSSProperties | undefined",
|
|
13277
|
-
"required": false,
|
|
13278
|
-
"description": ""
|
|
13279
13244
|
}
|
|
13280
13245
|
]
|
|
13281
13246
|
}
|
|
@@ -13296,13 +13261,13 @@
|
|
|
13296
13261
|
"exportName": "DragDelay",
|
|
13297
13262
|
"displayName": "Задержка активации D&D (dragActivationDelay)",
|
|
13298
13263
|
"type": "full-code",
|
|
13299
|
-
"code": "render() {\n const gridRef = useRef<GridDNDRef>(null);\n const [items] = useState<GridDNDItems[]>([\n { id: 'w1', type: 'm' },\n { id: 'w2', type: 's' },\n { id: 'w3', type: 's' },\n { id: 'w4', type: 'm' },\n { id: 'w5', type: 's' },\n ]);\n\n const renderItem = useCallback(\n (item: GridDNDItemConfig, onRemove: () => void) => (\n <GridDND.ItemWrapper
|
|
13264
|
+
"code": "render() {\n const gridRef = useRef<GridDNDRef>(null);\n const [items] = useState<GridDNDItems[]>([\n { id: 'w1', type: 'm' },\n { id: 'w2', type: 's' },\n { id: 'w3', type: 's' },\n { id: 'w4', type: 'm' },\n { id: 'w5', type: 's' },\n ]);\n\n const renderItem = useCallback(\n (item: GridDNDItemConfig, onRemove: () => void) => (\n <GridDND.ItemWrapper\n item={item}\n actionsSlot={\n <AnalyticalWidget.DotsIconButton\n absolute\n dropdownProps={{\n items: [{ label: 'Удалить', value: 'Удалить' }],\n onItemSelect() {\n onRemove();\n },\n }}\n />\n }\n >\n {item.type === 's' && <WidgetS id={item.id} onRemove={onRemove} />}\n {item.type === 'm' && <WidgetM id={item.id} onRemove={onRemove} />}\n </GridDND.ItemWrapper>\n ),\n [],\n );\n\n return (\n <div>\n <div style={{ marginBottom: 12, color: '#666', fontSize: 14 }}>\n Зажмите карточку на 500мс для активации перетаскивания. Обводка\n появится только у зажатой карточки.\n </div>\n <div style={{ width: 1200, background: 'lightGray' }}>\n <GridDND\n ref={gridRef}\n items={items}\n isDraggable\n dragActivationDelay={500}\n compactType=\"horizontal\"\n // eslint-disable-next-line react/no-children-prop\n children={renderItem}\n onLayoutChange={(layout, _allAreas, meta) => {\n console.debug('Layout changed:', layout, meta);\n }}\n />\n </div>\n </div>\n );\n }"
|
|
13300
13265
|
},
|
|
13301
13266
|
{
|
|
13302
13267
|
"exportName": "GridDNDClassic",
|
|
13303
13268
|
"displayName": "GridDND Classic",
|
|
13304
13269
|
"type": "full-code",
|
|
13305
|
-
"code": "import { GridDND } from '@daisforge/ui';\n\nrender() {\n const gridRef = useRef<GridDNDRef>(null);\n const [items, setItems] = useState<GridDNDItems[]>([]);\n const [width, setWidth] = useState(1660);\n const [drag, setDrag] = useState(true);\n const [loading, setLoading] = useState(true);\n const [smartCompact, setSmartCompact] = useState(true);\n const [compactType, setCompactType] = useState<\n 'vertical' | 'horizontal' | null\n >('horizontal');\n\n const renderItem = useCallback(\n (item: GridDNDItemConfig, onRemove: () => void) => (\n <GridDND.ItemWrapper\n item={item}\n actionsSlot={\n <AnalyticalWidget.DotsIconButton\n
|
|
13270
|
+
"code": "import { GridDND } from '@daisforge/ui';\n\nrender() {\n const gridRef = useRef<GridDNDRef>(null);\n const [items, setItems] = useState<GridDNDItems[]>([]);\n const [width, setWidth] = useState(1660);\n const [drag, setDrag] = useState(true);\n const [loading, setLoading] = useState(true);\n const [smartCompact, setSmartCompact] = useState(true);\n const [compactType, setCompactType] = useState<\n 'vertical' | 'horizontal' | null\n >('horizontal');\n\n const renderItem = useCallback(\n (item: GridDNDItemConfig, onRemove: () => void) => (\n <GridDND.ItemWrapper\n item={item}\n actionsSlot={\n <AnalyticalWidget.DotsIconButton\n absolute\n dropdownProps={{\n items: [{ label: 'Удалить', value: 'Удалить' }],\n onItemSelect(m) {\n if (m.value?.toString().toLowerCase() === 'удалить')\n onRemove();\n },\n }}\n />\n }\n >\n {item.type === 's' && <WidgetS id={item.id} onRemove={onRemove} />}\n {item.type === 'm' && <WidgetM id={item.id} onRemove={onRemove} />}\n {item.type === 'l' && <WidgetL id={item.id} onRemove={onRemove} />}\n </GridDND.ItemWrapper>\n ),\n [],\n );\n\n const handleReorder = () => {\n const currentOrder = gridRef.current?.api.getOrder() || [];\n // Перевернуть порядок\n gridRef.current?.api.setOrder([...currentOrder].reverse());\n };\n\n const saveItems = useCallback(async (newItems: GridDNDItems[]) => {\n try {\n console.log('💾 Saving items to server:', newItems);\n await fetch(gridDndRoutes.ENDPOINTS.PUT_ITEMS, {\n method: 'PUT',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ items: newItems }),\n });\n console.log('✅ Items saved successfully');\n } catch (error) {\n console.error('❌ Failed to save items:', error);\n }\n }, []);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedSave = useCallback(\n debounce((newItems: GridDNDItems[]) => {\n saveItems(newItems);\n }, 800),\n [saveItems],\n );\n\n // Загрузка initial items с сервера\n useEffect(() => {\n const fetchInitialItems = async () => {\n try {\n const response = await fetch(gridDndRoutes.ENDPOINTS.GET_ITEMS);\n const data = await response.json();\n setItems(data.items);\n } catch (error) {\n console.error('Failed to fetch items:', error);\n } finally {\n setLoading(false);\n }\n };\n\n fetchInitialItems();\n }, []);\n\n if (loading) {\n return <div>Loading...</div>;\n }\n\n return (\n <div>\n <div\n style={{\n display: 'flex',\n gap: 8,\n alignItems: 'center',\n marginBottom: 12,\n }}\n >\n <span>Width: {width}px</span>\n <input\n type=\"range\"\n min={600}\n max={1890}\n step={10}\n value={width}\n onChange={(e) => setWidth(+e.target.value)}\n />\n <Switch\n onChange={(e) => setDrag(e.target.checked)}\n label=\"Activate DND\"\n checked={drag}\n />\n <Switch\n onChange={(e) => setSmartCompact(e.target.checked)}\n label=\"Activate Smart Compact\"\n checked={smartCompact}\n />\n <Switch\n onChange={(e) =>\n setCompactType(e.target.checked ? 'vertical' : null)\n }\n label=\"Activate Compact Type Vertical\"\n checked={compactType === 'vertical'}\n />\n <Switch\n onChange={(e) =>\n setCompactType(e.target.checked ? 'horizontal' : null)\n }\n label=\"Activate Compact Type Horizontal\"\n checked={compactType === 'horizontal'}\n />\n </div>\n <div\n style={{\n marginBottom: '30px',\n display: 'flex',\n gap: '8px',\n }}\n >\n <Button\n onClick={() => {\n console.debug(gridRef.current?.api.getOrderDetailed());\n }}\n >\n Get Order Detail\n </Button>\n <Button\n onClick={() =>\n console.debug('Current layout:', gridRef.current?.api.getOrder())\n }\n >\n Get Order\n </Button>\n <Button\n onClick={() =>\n console.debug(\n 'Current template area:',\n gridRef.current?.api.getCurrentLayout(),\n )\n }\n >\n Get Current Layout\n </Button>\n <Button\n onClick={() =>\n console.debug(\n 'All template areas:',\n gridRef.current?.api.getAllLayouts(),\n )\n }\n >\n Get All Layouts\n </Button>\n <Button\n onClick={() => {\n const id = prompt('Enter id');\n const type = prompt('Enter type (s, m, l)');\n if (\n !id ||\n !type ||\n !gridRef.current ||\n (type !== 's' && type !== 'm' && type !== 'l')\n )\n return;\n gridRef.current?.api.addItem({\n id,\n type,\n });\n }}\n >\n + Add widget\n </Button>\n <Button onClick={() => handleReorder()}>Reorder</Button>\n </div>\n\n <div style={{ width, background: 'lightGray' }}>\n <GridDND\n ref={gridRef}\n items={items}\n compactType=\"horizontal\"\n smartCompact={smartCompact}\n // eslint-disable-next-line react/no-children-prop\n children={renderItem}\n onItemsChange={(items) =>\n console.debug('📦 Template Items changed:', items)\n }\n onLayoutChange={(layout, allAreas, meta) => {\n console.group('📐 Template Layout changed:');\n console.debug('Layout:', layout);\n console.debug('All areas:', allAreas);\n console.debug('Meta:', meta);\n if (meta.itemsOrderTyped) {\n console.debug('🔄 Items order changed, saving...');\n debouncedSave(meta.itemsOrderTyped);\n }\n console.groupEnd();\n }}\n onBreakpointChange={(breakpoint: string, layout: unknown) => {\n console.group('📱 Template Breakpoint changed:');\n console.debug('Breakpoint:', breakpoint);\n console.debug('Layout:', layout);\n console.groupEnd();\n }}\n isDraggable={drag}\n />\n </div>\n </div>\n );\n }"
|
|
13306
13271
|
},
|
|
13307
13272
|
{
|
|
13308
13273
|
"exportName": "SelfResize",
|
|
@@ -13321,13 +13286,13 @@
|
|
|
13321
13286
|
"exportName": "DragDelay",
|
|
13322
13287
|
"displayName": "Задержка активации D&D (dragActivationDelay)",
|
|
13323
13288
|
"type": "full-code",
|
|
13324
|
-
"code": "render() {\n const gridRef = useRef<GridDNDRef>(null);\n const [items] = useState<GridDNDItems[]>([\n { id: 'w1', type: 'm' },\n { id: 'w2', type: 's' },\n { id: 'w3', type: 's' },\n { id: 'w4', type: 'm' },\n { id: 'w5', type: 's' },\n ]);\n\n const renderItem = useCallback(\n (item: GridDNDItemConfig, onRemove: () => void) => (\n <GridDND.ItemWrapper
|
|
13289
|
+
"code": "render() {\n const gridRef = useRef<GridDNDRef>(null);\n const [items] = useState<GridDNDItems[]>([\n { id: 'w1', type: 'm' },\n { id: 'w2', type: 's' },\n { id: 'w3', type: 's' },\n { id: 'w4', type: 'm' },\n { id: 'w5', type: 's' },\n ]);\n\n const renderItem = useCallback(\n (item: GridDNDItemConfig, onRemove: () => void) => (\n <GridDND.ItemWrapper\n item={item}\n actionsSlot={\n <AnalyticalWidget.DotsIconButton\n absolute\n dropdownProps={{\n items: [{ label: 'Удалить', value: 'Удалить' }],\n onItemSelect() {\n onRemove();\n },\n }}\n />\n }\n >\n {item.type === 's' && <WidgetS id={item.id} onRemove={onRemove} />}\n {item.type === 'm' && <WidgetM id={item.id} onRemove={onRemove} />}\n </GridDND.ItemWrapper>\n ),\n [],\n );\n\n return (\n <div>\n <div style={{ marginBottom: 12, color: '#666', fontSize: 14 }}>\n Зажмите карточку на 500мс для активации перетаскивания. Обводка\n появится только у зажатой карточки.\n </div>\n <div style={{ width: 1200, background: 'lightGray' }}>\n <GridDND\n ref={gridRef}\n items={items}\n isDraggable\n dragActivationDelay={500}\n compactType=\"horizontal\"\n // eslint-disable-next-line react/no-children-prop\n children={renderItem}\n onLayoutChange={(layout, _allAreas, meta) => {\n console.debug('Layout changed:', layout, meta);\n }}\n />\n </div>\n </div>\n );\n }"
|
|
13325
13290
|
},
|
|
13326
13291
|
{
|
|
13327
13292
|
"exportName": "GridDNDClassic",
|
|
13328
13293
|
"displayName": "GridDND Classic",
|
|
13329
13294
|
"type": "full-code",
|
|
13330
|
-
"code": "import { GridDND } from '@daisforge/ui';\n\nrender() {\n const gridRef = useRef<GridDNDRef>(null);\n const [items, setItems] = useState<GridDNDItems[]>([]);\n const [width, setWidth] = useState(1660);\n const [drag, setDrag] = useState(true);\n const [loading, setLoading] = useState(true);\n const [smartCompact, setSmartCompact] = useState(true);\n const [compactType, setCompactType] = useState<\n 'vertical' | 'horizontal' | null\n >('horizontal');\n\n const renderItem = useCallback(\n (item: GridDNDItemConfig, onRemove: () => void) => (\n <GridDND.ItemWrapper\n item={item}\n actionsSlot={\n <AnalyticalWidget.DotsIconButton\n
|
|
13295
|
+
"code": "import { GridDND } from '@daisforge/ui';\n\nrender() {\n const gridRef = useRef<GridDNDRef>(null);\n const [items, setItems] = useState<GridDNDItems[]>([]);\n const [width, setWidth] = useState(1660);\n const [drag, setDrag] = useState(true);\n const [loading, setLoading] = useState(true);\n const [smartCompact, setSmartCompact] = useState(true);\n const [compactType, setCompactType] = useState<\n 'vertical' | 'horizontal' | null\n >('horizontal');\n\n const renderItem = useCallback(\n (item: GridDNDItemConfig, onRemove: () => void) => (\n <GridDND.ItemWrapper\n item={item}\n actionsSlot={\n <AnalyticalWidget.DotsIconButton\n absolute\n dropdownProps={{\n items: [{ label: 'Удалить', value: 'Удалить' }],\n onItemSelect(m) {\n if (m.value?.toString().toLowerCase() === 'удалить')\n onRemove();\n },\n }}\n />\n }\n >\n {item.type === 's' && <WidgetS id={item.id} onRemove={onRemove} />}\n {item.type === 'm' && <WidgetM id={item.id} onRemove={onRemove} />}\n {item.type === 'l' && <WidgetL id={item.id} onRemove={onRemove} />}\n </GridDND.ItemWrapper>\n ),\n [],\n );\n\n const handleReorder = () => {\n const currentOrder = gridRef.current?.api.getOrder() || [];\n // Перевернуть порядок\n gridRef.current?.api.setOrder([...currentOrder].reverse());\n };\n\n const saveItems = useCallback(async (newItems: GridDNDItems[]) => {\n try {\n console.log('💾 Saving items to server:', newItems);\n await fetch(gridDndRoutes.ENDPOINTS.PUT_ITEMS, {\n method: 'PUT',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ items: newItems }),\n });\n console.log('✅ Items saved successfully');\n } catch (error) {\n console.error('❌ Failed to save items:', error);\n }\n }, []);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedSave = useCallback(\n debounce((newItems: GridDNDItems[]) => {\n saveItems(newItems);\n }, 800),\n [saveItems],\n );\n\n // Загрузка initial items с сервера\n useEffect(() => {\n const fetchInitialItems = async () => {\n try {\n const response = await fetch(gridDndRoutes.ENDPOINTS.GET_ITEMS);\n const data = await response.json();\n setItems(data.items);\n } catch (error) {\n console.error('Failed to fetch items:', error);\n } finally {\n setLoading(false);\n }\n };\n\n fetchInitialItems();\n }, []);\n\n if (loading) {\n return <div>Loading...</div>;\n }\n\n return (\n <div>\n <div\n style={{\n display: 'flex',\n gap: 8,\n alignItems: 'center',\n marginBottom: 12,\n }}\n >\n <span>Width: {width}px</span>\n <input\n type=\"range\"\n min={600}\n max={1890}\n step={10}\n value={width}\n onChange={(e) => setWidth(+e.target.value)}\n />\n <Switch\n onChange={(e) => setDrag(e.target.checked)}\n label=\"Activate DND\"\n checked={drag}\n />\n <Switch\n onChange={(e) => setSmartCompact(e.target.checked)}\n label=\"Activate Smart Compact\"\n checked={smartCompact}\n />\n <Switch\n onChange={(e) =>\n setCompactType(e.target.checked ? 'vertical' : null)\n }\n label=\"Activate Compact Type Vertical\"\n checked={compactType === 'vertical'}\n />\n <Switch\n onChange={(e) =>\n setCompactType(e.target.checked ? 'horizontal' : null)\n }\n label=\"Activate Compact Type Horizontal\"\n checked={compactType === 'horizontal'}\n />\n </div>\n <div\n style={{\n marginBottom: '30px',\n display: 'flex',\n gap: '8px',\n }}\n >\n <Button\n onClick={() => {\n console.debug(gridRef.current?.api.getOrderDetailed());\n }}\n >\n Get Order Detail\n </Button>\n <Button\n onClick={() =>\n console.debug('Current layout:', gridRef.current?.api.getOrder())\n }\n >\n Get Order\n </Button>\n <Button\n onClick={() =>\n console.debug(\n 'Current template area:',\n gridRef.current?.api.getCurrentLayout(),\n )\n }\n >\n Get Current Layout\n </Button>\n <Button\n onClick={() =>\n console.debug(\n 'All template areas:',\n gridRef.current?.api.getAllLayouts(),\n )\n }\n >\n Get All Layouts\n </Button>\n <Button\n onClick={() => {\n const id = prompt('Enter id');\n const type = prompt('Enter type (s, m, l)');\n if (\n !id ||\n !type ||\n !gridRef.current ||\n (type !== 's' && type !== 'm' && type !== 'l')\n )\n return;\n gridRef.current?.api.addItem({\n id,\n type,\n });\n }}\n >\n + Add widget\n </Button>\n <Button onClick={() => handleReorder()}>Reorder</Button>\n </div>\n\n <div style={{ width, background: 'lightGray' }}>\n <GridDND\n ref={gridRef}\n items={items}\n compactType=\"horizontal\"\n smartCompact={smartCompact}\n // eslint-disable-next-line react/no-children-prop\n children={renderItem}\n onItemsChange={(items) =>\n console.debug('📦 Template Items changed:', items)\n }\n onLayoutChange={(layout, allAreas, meta) => {\n console.group('📐 Template Layout changed:');\n console.debug('Layout:', layout);\n console.debug('All areas:', allAreas);\n console.debug('Meta:', meta);\n if (meta.itemsOrderTyped) {\n console.debug('🔄 Items order changed, saving...');\n debouncedSave(meta.itemsOrderTyped);\n }\n console.groupEnd();\n }}\n onBreakpointChange={(breakpoint: string, layout: unknown) => {\n console.group('📱 Template Breakpoint changed:');\n console.debug('Breakpoint:', breakpoint);\n console.debug('Layout:', layout);\n console.groupEnd();\n }}\n isDraggable={drag}\n />\n </div>\n </div>\n );\n }"
|
|
13331
13296
|
},
|
|
13332
13297
|
{
|
|
13333
13298
|
"exportName": "SelfResize",
|
|
@@ -20123,20 +20088,68 @@
|
|
|
20123
20088
|
"description": "Числовое поле со стрелками инкремента/декремента и ограничением min/max",
|
|
20124
20089
|
"props": [
|
|
20125
20090
|
{
|
|
20126
|
-
"name": "
|
|
20127
|
-
"type": "
|
|
20091
|
+
"name": "allowLeadingZeros",
|
|
20092
|
+
"type": "boolean | undefined",
|
|
20128
20093
|
"required": false,
|
|
20129
20094
|
"description": ""
|
|
20130
20095
|
},
|
|
20131
20096
|
{
|
|
20132
|
-
"name": "
|
|
20133
|
-
"type": "
|
|
20097
|
+
"name": "allowNegative",
|
|
20098
|
+
"type": "boolean | undefined",
|
|
20134
20099
|
"required": false,
|
|
20135
20100
|
"description": ""
|
|
20136
20101
|
},
|
|
20137
20102
|
{
|
|
20138
|
-
"name": "
|
|
20139
|
-
"type": "
|
|
20103
|
+
"name": "decimalScale",
|
|
20104
|
+
"type": "number | undefined",
|
|
20105
|
+
"required": false,
|
|
20106
|
+
"description": ""
|
|
20107
|
+
},
|
|
20108
|
+
{
|
|
20109
|
+
"name": "decimalSeparator",
|
|
20110
|
+
"type": "string | undefined",
|
|
20111
|
+
"required": false,
|
|
20112
|
+
"description": ""
|
|
20113
|
+
},
|
|
20114
|
+
{
|
|
20115
|
+
"name": "defaultValue",
|
|
20116
|
+
"type": "string | number | undefined",
|
|
20117
|
+
"required": false,
|
|
20118
|
+
"description": ""
|
|
20119
|
+
},
|
|
20120
|
+
{
|
|
20121
|
+
"name": "fixedDecimalScale",
|
|
20122
|
+
"type": "boolean | undefined",
|
|
20123
|
+
"required": false,
|
|
20124
|
+
"description": ""
|
|
20125
|
+
},
|
|
20126
|
+
{
|
|
20127
|
+
"name": "isAllowed",
|
|
20128
|
+
"type": "((values: NumberFormatValues) => boolean) | ((values: NumberFormatValues) => boolean) | undefined",
|
|
20129
|
+
"required": false,
|
|
20130
|
+
"description": ""
|
|
20131
|
+
},
|
|
20132
|
+
{
|
|
20133
|
+
"name": "thousandSeparator",
|
|
20134
|
+
"type": "string | boolean | undefined",
|
|
20135
|
+
"required": false,
|
|
20136
|
+
"description": ""
|
|
20137
|
+
},
|
|
20138
|
+
{
|
|
20139
|
+
"name": "thousandsGroupStyle",
|
|
20140
|
+
"type": "\"none\" | \"thousand\" | \"lakh\" | \"wan\" | undefined",
|
|
20141
|
+
"required": false,
|
|
20142
|
+
"description": ""
|
|
20143
|
+
},
|
|
20144
|
+
{
|
|
20145
|
+
"name": "autoComplete",
|
|
20146
|
+
"type": "React.HTMLInputAutoCompleteAttribute | undefined",
|
|
20147
|
+
"required": false,
|
|
20148
|
+
"description": ""
|
|
20149
|
+
},
|
|
20150
|
+
{
|
|
20151
|
+
"name": "enterKeyHint",
|
|
20152
|
+
"type": "\"enter\" | \"done\" | \"go\" | \"next\" | \"previous\" | \"search\" | \"send\" | undefined",
|
|
20140
20153
|
"required": false,
|
|
20141
20154
|
"description": ""
|
|
20142
20155
|
}
|
|
@@ -21234,7 +21247,7 @@
|
|
|
21234
21247
|
},
|
|
21235
21248
|
{
|
|
21236
21249
|
"name": "as",
|
|
21237
|
-
"type": "((string | React.ComponentType<any>) & (\"symbol\" | \"object\" | \"form\" | \"pattern\" | \"slot\" | \"style\" | \"title\" | \"view\" | \"s\" | \"input\" | \"search\" | \"
|
|
21250
|
+
"type": "((string | React.ComponentType<any>) & (\"symbol\" | \"object\" | \"form\" | \"pattern\" | \"slot\" | \"style\" | \"title\" | \"view\" | \"s\" | \"input\" | \"search\" | \"article\" | \"button\" | \"dialog\" | \"figure\" | \"img\" | \"link\" | \"main\" | \"menu\" | \"menuitem\" | \"option\" | \"switch\" | \"table\" | \"text\" | \"time\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"base\" | \"bdi\" | \"bdo\" | \"big\" | \"blockquote\" |…",
|
|
21238
21251
|
"required": false,
|
|
21239
21252
|
"description": "Компонент, используемый для корневого узла. Либо строка для использования элемента HTML, либо компонента. (Например: `li`, `p`, `button` и т.д.)"
|
|
21240
21253
|
},
|
|
@@ -21542,7 +21555,7 @@
|
|
|
21542
21555
|
},
|
|
21543
21556
|
{
|
|
21544
21557
|
"name": "as",
|
|
21545
|
-
"type": "((string | React.ComponentType<any>) & (\"symbol\" | \"object\" | \"form\" | \"pattern\" | \"slot\" | \"style\" | \"title\" | \"view\" | \"s\" | \"input\" | \"search\" | \"
|
|
21558
|
+
"type": "((string | React.ComponentType<any>) & (\"symbol\" | \"object\" | \"form\" | \"pattern\" | \"slot\" | \"style\" | \"title\" | \"view\" | \"s\" | \"input\" | \"search\" | \"article\" | \"button\" | \"dialog\" | \"figure\" | \"img\" | \"link\" | \"main\" | \"menu\" | \"menuitem\" | \"option\" | \"switch\" | \"table\" | \"text\" | \"time\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"base\" | \"bdi\" | \"bdo\" | \"big\" | \"blockquote\" |…",
|
|
21546
21559
|
"required": false,
|
|
21547
21560
|
"description": "Компонент, используемый для корневого узла. Либо строка для использования элемента HTML, либо компонента. (Например: `li`, `p`, `button` и т.д.)"
|
|
21548
21561
|
},
|
|
@@ -22103,7 +22116,7 @@
|
|
|
22103
22116
|
},
|
|
22104
22117
|
{
|
|
22105
22118
|
"name": "as",
|
|
22106
|
-
"type": "((string | React.ComponentType<any>) & (\"symbol\" | \"object\" | \"form\" | \"pattern\" | \"slot\" | \"style\" | \"title\" | \"view\" | \"s\" | \"input\" | \"search\" | \"
|
|
22119
|
+
"type": "((string | React.ComponentType<any>) & (\"symbol\" | \"object\" | \"form\" | \"pattern\" | \"slot\" | \"style\" | \"title\" | \"view\" | \"s\" | \"input\" | \"search\" | \"article\" | \"button\" | \"dialog\" | \"figure\" | \"img\" | \"link\" | \"main\" | \"menu\" | \"menuitem\" | \"option\" | \"switch\" | \"table\" | \"text\" | \"time\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"base\" | \"bdi\" | \"bdo\" | \"big\" | \"blockquote\" |…",
|
|
22107
22120
|
"required": false,
|
|
22108
22121
|
"description": "Компонент, используемый для корневого узла. Либо строка для использования элемента HTML, либо компонента. (Например: `li`, `p`, `button` и т.д.)"
|
|
22109
22122
|
},
|
|
@@ -22373,7 +22386,7 @@
|
|
|
22373
22386
|
},
|
|
22374
22387
|
{
|
|
22375
22388
|
"name": "as",
|
|
22376
|
-
"type": "((string | React.ComponentType<any>) & (\"symbol\" | \"object\" | \"form\" | \"pattern\" | \"slot\" | \"style\" | \"title\" | \"view\" | \"s\" | \"input\" | \"search\" | \"
|
|
22389
|
+
"type": "((string | React.ComponentType<any>) & (\"symbol\" | \"object\" | \"form\" | \"pattern\" | \"slot\" | \"style\" | \"title\" | \"view\" | \"s\" | \"input\" | \"search\" | \"article\" | \"button\" | \"dialog\" | \"figure\" | \"img\" | \"link\" | \"main\" | \"menu\" | \"menuitem\" | \"option\" | \"switch\" | \"table\" | \"text\" | \"time\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"base\" | \"bdi\" | \"bdo\" | \"big\" | \"blockquote\" |…",
|
|
22377
22390
|
"required": false,
|
|
22378
22391
|
"description": "Компонент, используемый для корневого узла. Либо строка для использования элемента HTML, либо компонента. (Например: `li`, `p`, `button` и т.д.)"
|
|
22379
22392
|
},
|
|
@@ -26859,7 +26872,14 @@
|
|
|
26859
26872
|
"minimalUsage": "<LineSkeleton />",
|
|
26860
26873
|
"examples": [
|
|
26861
26874
|
{
|
|
26862
|
-
"exportName": "
|
|
26875
|
+
"exportName": "Usage1",
|
|
26876
|
+
"displayName": "Использование в AnalyticalWidget.stories.tsx",
|
|
26877
|
+
"type": "usage",
|
|
26878
|
+
"code": "<LineSkeleton size=\"bodyM\" style={{ width: 180 }} />",
|
|
26879
|
+
"sourceFile": "packages/storybook/src/stories/AnalyticalWidget/AnalyticalWidget.stories.tsx"
|
|
26880
|
+
},
|
|
26881
|
+
{
|
|
26882
|
+
"exportName": "Usage2",
|
|
26863
26883
|
"displayName": "Использование в TableCanvasContextMenu.stories.tsx",
|
|
26864
26884
|
"type": "usage",
|
|
26865
26885
|
"code": "<LineSkeleton size=\"bodyS\" />",
|
|
@@ -28045,19 +28065,19 @@
|
|
|
28045
28065
|
"exportName": "Circle",
|
|
28046
28066
|
"displayName": "Круглые триггеры",
|
|
28047
28067
|
"type": "full-code",
|
|
28048
|
-
"code": "import { Button, Stories } from '@daisforge/ui';\nimport { useState } from 'react';\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'CircleStoriesExample',\n)}"
|
|
28068
|
+
"code": "import { Button, Stories } from '@daisforge/ui';\nimport { useState } from 'react';\n\n${viewedSource}\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'CircleStoriesExample',\n)}"
|
|
28049
28069
|
},
|
|
28050
28070
|
{
|
|
28051
28071
|
"exportName": "Rect",
|
|
28052
28072
|
"displayName": "Прямоугольные триггеры",
|
|
28053
28073
|
"type": "full-code",
|
|
28054
|
-
"code": "import { Button, Stories } from '@daisforge/ui';\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'RectStoriesExample',\n)}"
|
|
28074
|
+
"code": "import { Button, Stories } from '@daisforge/ui';\n\n${viewedSource}\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'RectStoriesExample',\n)}"
|
|
28055
28075
|
},
|
|
28056
28076
|
{
|
|
28057
28077
|
"exportName": "Loading",
|
|
28058
28078
|
"displayName": "Спиннер загрузки (эмуляция)",
|
|
28059
28079
|
"type": "full-code",
|
|
28060
|
-
"code": "import { Stories } from '@daisforge/ui';\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'LoadingStoriesExample',\n)}"
|
|
28080
|
+
"code": "import { Stories } from '@daisforge/ui';\n\n${viewedSource}\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'LoadingStoriesExample',\n)}"
|
|
28061
28081
|
},
|
|
28062
28082
|
{
|
|
28063
28083
|
"exportName": "ErrorState",
|
|
@@ -28075,25 +28095,31 @@
|
|
|
28075
28095
|
"exportName": "ImperativeControl",
|
|
28076
28096
|
"displayName": "Внешнее управление через ref",
|
|
28077
28097
|
"type": "full-code",
|
|
28078
|
-
"code": "import { Button, Stories, StoriesRef } from '@daisforge/ui';\nimport { useRef, useState } from 'react';\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'ImperativeControlExample',\n)}"
|
|
28098
|
+
"code": "import { Button, Stories, StoriesRef } from '@daisforge/ui';\nimport { useRef, useState } from 'react';\n\n${viewedSource}\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'ImperativeControlExample',\n)}"
|
|
28079
28099
|
},
|
|
28080
28100
|
{
|
|
28081
28101
|
"exportName": "InsideModal",
|
|
28082
28102
|
"displayName": "Триггеры внутри ModalDF",
|
|
28083
28103
|
"type": "full-code",
|
|
28084
|
-
"code": "import { Button, ModalDF, Stories } from '@daisforge/ui';\nimport { useState } from 'react';\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'InsideModalExample',\n)}"
|
|
28104
|
+
"code": "import { Button, ModalDF, Stories } from '@daisforge/ui';\nimport { useState } from 'react';\n\n${viewedSource}\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'InsideModalExample',\n)}"
|
|
28085
28105
|
},
|
|
28086
28106
|
{
|
|
28087
28107
|
"exportName": "HiddenArrows",
|
|
28088
28108
|
"displayName": "Стрелки скрыты (arrows=",
|
|
28089
28109
|
"type": "full-code",
|
|
28090
|
-
"code": "import { Stories } from '@daisforge/ui';\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'HiddenArrowsExample',\n)}"
|
|
28110
|
+
"code": "import { Stories } from '@daisforge/ui';\n\n${viewedSource}\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'HiddenArrowsExample',\n)}"
|
|
28091
28111
|
},
|
|
28092
28112
|
{
|
|
28093
28113
|
"exportName": "Titles",
|
|
28094
28114
|
"displayName": "Подписи: 2 строки, ellipsis, выравнивание",
|
|
28095
28115
|
"type": "full-code",
|
|
28096
|
-
"code": "import { Stories } from '@daisforge/ui';\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'TitlesExample',\n)}"
|
|
28116
|
+
"code": "import { Stories } from '@daisforge/ui';\n\n${viewedSource}\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'TitlesExample',\n)}"
|
|
28117
|
+
},
|
|
28118
|
+
{
|
|
28119
|
+
"exportName": "CarouselWrapped",
|
|
28120
|
+
"displayName": "Превью внутри Carousel (вложенность)",
|
|
28121
|
+
"type": "full-code",
|
|
28122
|
+
"code": "import { Carousel, CarouselItem, Stories } from '@daisforge/ui';\n\n${viewedSource}\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'CarouselWrappedExample',\n)}"
|
|
28097
28123
|
}
|
|
28098
28124
|
],
|
|
28099
28125
|
"hasCuratedMeta": true,
|
|
@@ -28109,19 +28135,19 @@
|
|
|
28109
28135
|
"exportName": "Circle",
|
|
28110
28136
|
"displayName": "Круглые триггеры",
|
|
28111
28137
|
"type": "full-code",
|
|
28112
|
-
"code": "import { Button, Stories } from '@daisforge/ui';\nimport { useState } from 'react';\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'CircleStoriesExample',\n)}"
|
|
28138
|
+
"code": "import { Button, Stories } from '@daisforge/ui';\nimport { useState } from 'react';\n\n${viewedSource}\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'CircleStoriesExample',\n)}"
|
|
28113
28139
|
},
|
|
28114
28140
|
{
|
|
28115
28141
|
"exportName": "Rect",
|
|
28116
28142
|
"displayName": "Прямоугольные триггеры",
|
|
28117
28143
|
"type": "full-code",
|
|
28118
|
-
"code": "import { Button, Stories } from '@daisforge/ui';\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'RectStoriesExample',\n)}"
|
|
28144
|
+
"code": "import { Button, Stories } from '@daisforge/ui';\n\n${viewedSource}\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'RectStoriesExample',\n)}"
|
|
28119
28145
|
},
|
|
28120
28146
|
{
|
|
28121
28147
|
"exportName": "Loading",
|
|
28122
28148
|
"displayName": "Спиннер загрузки (эмуляция)",
|
|
28123
28149
|
"type": "full-code",
|
|
28124
|
-
"code": "import { Stories } from '@daisforge/ui';\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'LoadingStoriesExample',\n)}"
|
|
28150
|
+
"code": "import { Stories } from '@daisforge/ui';\n\n${viewedSource}\n\n${getFuncAsString(\n 'packages/storybook/src/stories/Stories/Stories.stories.tsx',\n 'LoadingStoriesExample',\n)}"
|
|
28125
28151
|
},
|
|
28126
28152
|
{
|
|
28127
28153
|
"exportName": "ErrorState",
|
|
@@ -35536,10 +35562,10 @@
|
|
|
35536
35562
|
},
|
|
35537
35563
|
{
|
|
35538
35564
|
"exportName": "Usage2",
|
|
35539
|
-
"displayName": "Использование в
|
|
35565
|
+
"displayName": "Использование в Layout.stories.tsx",
|
|
35540
35566
|
"type": "usage",
|
|
35541
|
-
"code": "<Tabs
|
|
35542
|
-
"sourceFile": "packages/storybook/src/stories/
|
|
35567
|
+
"code": "<Tabs view=\"filled\" stretch size=\"xs\">\n {items.map((_, i) => (\n <TabItem\n view=\"secondary\"\n size=\"xs\"\n selected={i === index}\n tabIndex={0}\n contentLeft={<IconClock size=\"xs\" color=\"inherit\" />}\n onClick={() => setIndex(i)}\n >\n {`Label${i + 1}`}\n </TabItem>\n ))}\n </Tabs>",
|
|
35568
|
+
"sourceFile": "packages/storybook/src/stories/Layout/Layout.stories.tsx"
|
|
35543
35569
|
},
|
|
35544
35570
|
{
|
|
35545
35571
|
"exportName": "Vendor1",
|
|
@@ -45896,6 +45922,12 @@
|
|
|
45896
45922
|
"required": false,
|
|
45897
45923
|
"description": ""
|
|
45898
45924
|
},
|
|
45925
|
+
{
|
|
45926
|
+
"name": "inputWrapperRef",
|
|
45927
|
+
"type": "React.Ref<HTMLDivElement> | undefined",
|
|
45928
|
+
"required": false,
|
|
45929
|
+
"description": ""
|
|
45930
|
+
},
|
|
45899
45931
|
{
|
|
45900
45932
|
"name": "invalidFormatMessage",
|
|
45901
45933
|
"type": "string | undefined",
|
|
@@ -53187,11 +53219,11 @@
|
|
|
53187
53219
|
"legacy": false,
|
|
53188
53220
|
"summary": "*tableConfig.rowsGrouping + columnConfig.rowsGrouping**",
|
|
53189
53221
|
"docs": "# RowsGrouping (TableCanvas)\n\n**tableConfig.rowsGrouping + columnConfig.rowsGrouping**\n\nГруппировка строк таблицы по значениям колонок с поддержкой вложенных группировок.\n\n## Ключевые особенности\n\n- Управляемое состояние группировки через `groupByState`\n- Кнопка с выпадающим списком для выбора группировок в controlBlock\n- Кастомный рендер сгруппированных строк через `renderGroupCell`\n- Кастомные элементы в выпадающем списке через `groupButton.defaultCustomItems`\n- Возможность замены данных группированных строк через `groupRowReplaceTo`\n\n## Особенности\n\n- `rowKeyGetter` должен возвращать уникальный идентификатор строки\n- `groupedColumnProps` позволяет настроить колонку с группировкой (ширину, рендер и т.д.)\n- В `columnConfig.rowsGrouping` можно указать `groupByColumn: false` для исключения колонки из группировки\n- `columnGroupLabel` переопределяет лейбл в выпадающем списке (default: `columnConfig.key`)\n\n> Подробнее о типах — [RowsGrouping API](?path=/docs/локальные-компоненты-tablecanvas-rowsgrouping-api--docs)",
|
|
53190
|
-
"apiDocs": "# RowsGrouping API\n\n## RowsGrouping\n\n```typescript\ntype RowsGrouping<\n RowType extends ObjectForExtending,\n SummaryRowType = unknown,\n ColumnConfig extends LocalColumnInstance = LocalColumnInstance,\n> = {\n /**\n * массив группированных колонок и его setter\n */\n groupByState: [string[], React.Dispatch<React.SetStateAction<string[]>>];\n /**\n * Функция определения уникального id строки\n */\n rowKeyGetter: (row: RowType) => string | number;\n /**\n * Показывать ли кнопку «Группировать» в controlBlock.\n * При `false` кнопка скрыта и не участвует в компрессии,\n * но группировка строк продолжает работать от внешнего `groupByState`.\n * @default true\n */\n showInControl?: boolean;\n /**\n * @default 'Группировка'\n */\n groupedColumnProps?: Partial<Pick<ColumnConfig, 'name' | 'width'>> & {\n renderCell?: (\n props: CellInfoGlideInstance<RowType, SummaryRowType> & {\n parentGroupKey: string | undefined;\n groupByArr: string[];\n },\n ) => CanvasContent;\n rowsGrouping?: Pick<\n ColumnRowsGrouping<RowType, ColumnConfig>,\n 'renderGroupCell'\n >;\n };\n expandAllBtn?: {\n /**\n * Функция для расчета состояния открытости всех раскрываемых строк. Функция должна быть чистой.\n * @returns boolean\n */\n expandedAll: (p: {\n /**\n * allRowsIds - уникальные идентификаторы всех строк (группировок и обычных)\n */\n allRowsIds: Set<string | number> | null;\n /**\n * shownRows - представленные прямо сейчас строки (группировки и обычные). Или видимые строки - видимые не во viewport-е, а которые должны быть показаны из-за раскрытий)\n */\n shownRows: readonly RowType[];\n expandedRowsIds: Set<string | number>;\n }) => boolean;\n };\n /**\n * `groupButton` - свойство для кастомизации кнопки с выпадающим списком\n */\n groupButton?: {\n getGroupedCount?: (props: {\n /**\n * высчитанное автоматически количество активных группировок.\n */\n currCount: number;\n /**\n * активные группировки.\n */\n groupedCols: string[];\n columns: {\n /**\n * `visible` - видимые в выпадающем списке колонки-группировки.\n */\n visible: string[];\n /**\n * `hidden` - невидимые или не участвующие в группировке колонки\n *\n * (columnConfig.rowsGrouping=undefined ||\n * columnConfig.rowsGrouping.groupByColumn=false).\n */\n hidden: string[];\n };\n }) => number;\n /**\n * `defaultCustomItems` - свойство для добавления ключей группировки, которых нет в таблице.\n *\n * `DropdownItemOption.value` - необходимо заполнять ключом, который существует в данных.\n */\n defaultCustomItems?: DropdownItemOption[];\n /**\n * `onItemSelect` - свойство для полного контроля над изменением группировки при выборе опций.\n *\n * `DropdownItemOption.value` - необходимо заполнять ключом, который существует в данных.\n */\n onItemSelect?: (props: {\n item: DropdownItemOption;\n setGroupedCols: React.Dispatch<React.SetStateAction<string[]>>;\n columns: {\n visible: string[];\n hidden: string[];\n };\n }) => void;\n };\n /**\n * `groupRowReplaceTo` - свойство для изменения данных сгруппированных строк. Может понадобиться в редких случаях.\n *\n * @param groupRow данные сгруппированной строки\n * @returns измененная группировка или строка без группировки — строка, которые заменит groupRow\n */\n groupRowReplaceTo?: (\n groupRow: GroupRow<RowType>,\n ) => GroupRow<RowType> | RowType;\n /**\n * Метки для автоматизированного тестирования и аналитики\n * Добавляет data-атрибуты и CSS-классы к элементам controlBlock\n */\n domMetadata?: DomMetadata;\n};\n\nexport type RenderGroupCellProps<\n RowType extends ObjectForExtending,\n ColumnConfig extends LocalColumnInstance = LocalColumnInstance,\n> = {\n column: ColumnConfig;\n tabIndex: number;\n // TODO isExpanded: boolean;\n // TODO toggleGroup: () => void;\n} & GroupRow<RowType>;\n\nexport type ColumnRowsGrouping<\n RowType extends ObjectForExtending,\n ColumnConfig extends LocalColumnInstance,\n> = {\n /**\n * @default true - при наличии ColumnConfig.rowsGrouping\n */\n groupByColumn?: boolean;\n /**\n * @default ColumnConfig.key\n */\n columnGroupLabel?: string;\n renderGroupCell?: (\n props: RenderGroupCellProps<RowType, ColumnConfig>,\n ) => CanvasContent;\n};\n```",
|
|
53222
|
+
"apiDocs": "# RowsGrouping API\n\n## RowsGrouping\n\n```typescript\ntype RowsGrouping<\n RowType extends ObjectForExtending,\n SummaryRowType = unknown,\n ColumnConfig extends LocalColumnInstance = LocalColumnInstance,\n> = {\n /**\n * массив группированных колонок и его setter\n */\n groupByState: [string[], React.Dispatch<React.SetStateAction<string[]>>];\n /**\n * Функция определения уникального id строки\n */\n rowKeyGetter: (row: RowType) => string | number;\n /**\n * Показывать ли кнопку «Группировать» в controlBlock.\n * При `false` кнопка скрыта и не участвует в компрессии,\n * но группировка строк продолжает работать от внешнего `groupByState`.\n * @default true\n */\n showInControl?: boolean;\n /**\n * @default 'Группировка'\n */\n groupedColumnProps?: Partial<Pick<ColumnConfig, 'name' | 'width'>> & {\n renderCell?: (\n props: CellInfoGlideInstance<RowType, SummaryRowType> & {\n parentGroupKey: string | undefined;\n groupByArr: string[];\n },\n ) => CanvasContent;\n rowsGrouping?: Pick<\n ColumnRowsGrouping<RowType, ColumnConfig>,\n 'renderGroupCell'\n >;\n };\n expandAllBtn?: {\n /**\n * Функция для расчета состояния открытости всех раскрываемых строк. Функция должна быть чистой.\n * @returns boolean\n */\n expandedAll: (p: {\n /**\n * allRowsIds - уникальные идентификаторы всех строк (группировок и обычных)\n */\n allRowsIds: Set<string | number> | null;\n /**\n * shownRows - представленные прямо сейчас строки (группировки и обычные). Или видимые строки - видимые не во viewport-е, а которые должны быть показаны из-за раскрытий)\n */\n shownRows: readonly RowType[];\n expandedRowsIds: Set<string | number>;\n }) => boolean;\n };\n /**\n * `groupButton` - свойство для кастомизации кнопки с выпадающим списком\n */\n groupButton?: {\n getGroupedCount?: (props: {\n /**\n * высчитанное автоматически количество активных группировок.\n */\n currCount: number;\n /**\n * активные группировки.\n */\n groupedCols: string[];\n columns: {\n /**\n * `visible` - видимые в выпадающем списке колонки-группировки.\n */\n visible: string[];\n /**\n * `hidden` - невидимые или не участвующие в группировке колонки\n *\n * (columnConfig.rowsGrouping=undefined ||\n * columnConfig.rowsGrouping.groupByColumn=false).\n */\n hidden: string[];\n };\n }) => number;\n /**\n * `defaultCustomItems` - свойство для добавления ключей группировки, которых нет в таблице.\n *\n * `DropdownItemOption.value` - необходимо заполнять ключом, который существует в данных.\n */\n defaultCustomItems?: DropdownItemOption[];\n /**\n * `onItemSelect` - свойство для полного контроля над изменением группировки при выборе опций.\n *\n * `DropdownItemOption.value` - необходимо заполнять ключом, который существует в данных.\n */\n onItemSelect?: (props: {\n item: DropdownItemOption;\n setGroupedCols: React.Dispatch<React.SetStateAction<string[]>>;\n columns: {\n visible: string[];\n hidden: string[];\n };\n }) => void;\n };\n /**\n * `groupRowReplaceTo` - свойство для изменения данных сгруппированных строк. Может понадобиться в редких случаях.\n *\n * @param groupRow данные сгруппированной строки\n * @returns измененная группировка или строка без группировки — строка, которые заменит groupRow\n */\n groupRowReplaceTo?: (\n groupRow: GroupRow<RowType>,\n ) => GroupRow<RowType> | RowType;\n /**\n * Метки для автоматизированного тестирования и аналитики\n * Добавляет data-атрибуты и CSS-классы к элементам controlBlock\n */\n domMetadata?: DomMetadata;\n};\n\nexport type RenderGroupCellProps<\n RowType extends ObjectForExtending,\n ColumnConfig extends LocalColumnInstance = LocalColumnInstance,\n> = {\n column: ColumnConfig;\n tabIndex: number;\n theme?: Theme;\n // TODO isExpanded: boolean;\n // TODO toggleGroup: () => void;\n} & GroupRow<RowType>;\n\nexport type ColumnRowsGrouping<\n RowType extends ObjectForExtending,\n ColumnConfig extends LocalColumnInstance,\n> = {\n /**\n * @default true - при наличии ColumnConfig.rowsGrouping\n */\n groupByColumn?: boolean;\n /**\n * @default ColumnConfig.key\n */\n columnGroupLabel?: string;\n renderGroupCell?: (\n props: RenderGroupCellProps<RowType, ColumnConfig>,\n ) => CanvasContent;\n};\n```",
|
|
53191
53223
|
"api": [
|
|
53192
53224
|
{
|
|
53193
53225
|
"typeName": "RowsGrouping",
|
|
53194
|
-
"source": "type RowsGrouping<\n RowType extends ObjectForExtending,\n SummaryRowType = unknown,\n ColumnConfig extends LocalColumnInstance = LocalColumnInstance,\n> = {\n /**\n * массив группированных колонок и его setter\n */\n groupByState: [string[], React.Dispatch<React.SetStateAction<string[]>>];\n /**\n * Функция определения уникального id строки\n */\n rowKeyGetter: (row: RowType) => string | number;\n /**\n * Показывать ли кнопку «Группировать» в controlBlock.\n * При `false` кнопка скрыта и не участвует в компрессии,\n * но группировка строк продолжает работать от внешнего `groupByState`.\n * @default true\n */\n showInControl?: boolean;\n /**\n * @default 'Группировка'\n */\n groupedColumnProps?: Partial<Pick<ColumnConfig, 'name' | 'width'>> & {\n renderCell?: (\n props: CellInfoGlideInstance<RowType, SummaryRowType> & {\n parentGroupKey: string | undefined;\n groupByArr: string[];\n },\n ) => CanvasContent;\n rowsGrouping?: Pick<\n ColumnRowsGrouping<RowType, ColumnConfig>,\n 'renderGroupCell'\n >;\n };\n expandAllBtn?: {\n /**\n * Функция для расчета состояния открытости всех раскрываемых строк. Функция должна быть чистой.\n * @returns boolean\n */\n expandedAll: (p: {\n /**\n * allRowsIds - уникальные идентификаторы всех строк (группировок и обычных)\n */\n allRowsIds: Set<string | number> | null;\n /**\n * shownRows - представленные прямо сейчас строки (группировки и обычные). Или видимые строки - видимые не во viewport-е, а которые должны быть показаны из-за раскрытий)\n */\n shownRows: readonly RowType[];\n expandedRowsIds: Set<string | number>;\n }) => boolean;\n };\n /**\n * `groupButton` - свойство для кастомизации кнопки с выпадающим списком\n */\n groupButton?: {\n getGroupedCount?: (props: {\n /**\n * высчитанное автоматически количество активных группировок.\n */\n currCount: number;\n /**\n * активные группировки.\n */\n groupedCols: string[];\n columns: {\n /**\n * `visible` - видимые в выпадающем списке колонки-группировки.\n */\n visible: string[];\n /**\n * `hidden` - невидимые или не участвующие в группировке колонки\n *\n * (columnConfig.rowsGrouping=undefined ||\n * columnConfig.rowsGrouping.groupByColumn=false).\n */\n hidden: string[];\n };\n }) => number;\n /**\n * `defaultCustomItems` - свойство для добавления ключей группировки, которых нет в таблице.\n *\n * `DropdownItemOption.value` - необходимо заполнять ключом, который существует в данных.\n */\n defaultCustomItems?: DropdownItemOption[];\n /**\n * `onItemSelect` - свойство для полного контроля над изменением группировки при выборе опций.\n *\n * `DropdownItemOption.value` - необходимо заполнять ключом, который существует в данных.\n */\n onItemSelect?: (props: {\n item: DropdownItemOption;\n setGroupedCols: React.Dispatch<React.SetStateAction<string[]>>;\n columns: {\n visible: string[];\n hidden: string[];\n };\n }) => void;\n };\n /**\n * `groupRowReplaceTo` - свойство для изменения данных сгруппированных строк. Может понадобиться в редких случаях.\n *\n * @param groupRow данные сгруппированной строки\n * @returns измененная группировка или строка без группировки — строка, которые заменит groupRow\n */\n groupRowReplaceTo?: (\n groupRow: GroupRow<RowType>,\n ) => GroupRow<RowType> | RowType;\n /**\n * Метки для автоматизированного тестирования и аналитики\n * Добавляет data-атрибуты и CSS-классы к элементам controlBlock\n */\n domMetadata?: DomMetadata;\n};\n\nexport type RenderGroupCellProps<\n RowType extends ObjectForExtending,\n ColumnConfig extends LocalColumnInstance = LocalColumnInstance,\n> = {\n column: ColumnConfig;\n tabIndex: number;\n // TODO isExpanded: boolean;\n // TODO toggleGroup: () => void;\n} & GroupRow<RowType>;\n\nexport type ColumnRowsGrouping<\n RowType extends ObjectForExtending,\n ColumnConfig extends LocalColumnInstance,\n> = {\n /**\n * @default true - при наличии ColumnConfig.rowsGrouping\n */\n groupByColumn?: boolean;\n /**\n * @default ColumnConfig.key\n */\n columnGroupLabel?: string;\n renderGroupCell?: (\n props: RenderGroupCellProps<RowType, ColumnConfig>,\n ) => CanvasContent;\n};"
|
|
53226
|
+
"source": "type RowsGrouping<\n RowType extends ObjectForExtending,\n SummaryRowType = unknown,\n ColumnConfig extends LocalColumnInstance = LocalColumnInstance,\n> = {\n /**\n * массив группированных колонок и его setter\n */\n groupByState: [string[], React.Dispatch<React.SetStateAction<string[]>>];\n /**\n * Функция определения уникального id строки\n */\n rowKeyGetter: (row: RowType) => string | number;\n /**\n * Показывать ли кнопку «Группировать» в controlBlock.\n * При `false` кнопка скрыта и не участвует в компрессии,\n * но группировка строк продолжает работать от внешнего `groupByState`.\n * @default true\n */\n showInControl?: boolean;\n /**\n * @default 'Группировка'\n */\n groupedColumnProps?: Partial<Pick<ColumnConfig, 'name' | 'width'>> & {\n renderCell?: (\n props: CellInfoGlideInstance<RowType, SummaryRowType> & {\n parentGroupKey: string | undefined;\n groupByArr: string[];\n },\n ) => CanvasContent;\n rowsGrouping?: Pick<\n ColumnRowsGrouping<RowType, ColumnConfig>,\n 'renderGroupCell'\n >;\n };\n expandAllBtn?: {\n /**\n * Функция для расчета состояния открытости всех раскрываемых строк. Функция должна быть чистой.\n * @returns boolean\n */\n expandedAll: (p: {\n /**\n * allRowsIds - уникальные идентификаторы всех строк (группировок и обычных)\n */\n allRowsIds: Set<string | number> | null;\n /**\n * shownRows - представленные прямо сейчас строки (группировки и обычные). Или видимые строки - видимые не во viewport-е, а которые должны быть показаны из-за раскрытий)\n */\n shownRows: readonly RowType[];\n expandedRowsIds: Set<string | number>;\n }) => boolean;\n };\n /**\n * `groupButton` - свойство для кастомизации кнопки с выпадающим списком\n */\n groupButton?: {\n getGroupedCount?: (props: {\n /**\n * высчитанное автоматически количество активных группировок.\n */\n currCount: number;\n /**\n * активные группировки.\n */\n groupedCols: string[];\n columns: {\n /**\n * `visible` - видимые в выпадающем списке колонки-группировки.\n */\n visible: string[];\n /**\n * `hidden` - невидимые или не участвующие в группировке колонки\n *\n * (columnConfig.rowsGrouping=undefined ||\n * columnConfig.rowsGrouping.groupByColumn=false).\n */\n hidden: string[];\n };\n }) => number;\n /**\n * `defaultCustomItems` - свойство для добавления ключей группировки, которых нет в таблице.\n *\n * `DropdownItemOption.value` - необходимо заполнять ключом, который существует в данных.\n */\n defaultCustomItems?: DropdownItemOption[];\n /**\n * `onItemSelect` - свойство для полного контроля над изменением группировки при выборе опций.\n *\n * `DropdownItemOption.value` - необходимо заполнять ключом, который существует в данных.\n */\n onItemSelect?: (props: {\n item: DropdownItemOption;\n setGroupedCols: React.Dispatch<React.SetStateAction<string[]>>;\n columns: {\n visible: string[];\n hidden: string[];\n };\n }) => void;\n };\n /**\n * `groupRowReplaceTo` - свойство для изменения данных сгруппированных строк. Может понадобиться в редких случаях.\n *\n * @param groupRow данные сгруппированной строки\n * @returns измененная группировка или строка без группировки — строка, которые заменит groupRow\n */\n groupRowReplaceTo?: (\n groupRow: GroupRow<RowType>,\n ) => GroupRow<RowType> | RowType;\n /**\n * Метки для автоматизированного тестирования и аналитики\n * Добавляет data-атрибуты и CSS-классы к элементам controlBlock\n */\n domMetadata?: DomMetadata;\n};\n\nexport type RenderGroupCellProps<\n RowType extends ObjectForExtending,\n ColumnConfig extends LocalColumnInstance = LocalColumnInstance,\n> = {\n column: ColumnConfig;\n tabIndex: number;\n theme?: Theme;\n // TODO isExpanded: boolean;\n // TODO toggleGroup: () => void;\n} & GroupRow<RowType>;\n\nexport type ColumnRowsGrouping<\n RowType extends ObjectForExtending,\n ColumnConfig extends LocalColumnInstance,\n> = {\n /**\n * @default true - при наличии ColumnConfig.rowsGrouping\n */\n groupByColumn?: boolean;\n /**\n * @default ColumnConfig.key\n */\n columnGroupLabel?: string;\n renderGroupCell?: (\n props: RenderGroupCellProps<RowType, ColumnConfig>,\n ) => CanvasContent;\n};"
|
|
53195
53227
|
}
|
|
53196
53228
|
],
|
|
53197
53229
|
"stories": [
|
|
@@ -56599,7 +56631,7 @@
|
|
|
56599
56631
|
},
|
|
56600
56632
|
"TableCanvas.RenderGroupCellProps": {
|
|
56601
56633
|
"name": "RenderGroupCellProps",
|
|
56602
|
-
"definition": "export type RenderGroupCellProps<\n RowType extends ObjectForExtending,\n ColumnConfig extends LocalColumnInstance = LocalColumnInstance,\n> = {\n column: ColumnConfig;\n tabIndex: number;\n // TODO isExpanded: boolean;\n // TODO toggleGroup: () => void;\n} & GroupRow<RowType>;",
|
|
56634
|
+
"definition": "export type RenderGroupCellProps<\n RowType extends ObjectForExtending,\n ColumnConfig extends LocalColumnInstance = LocalColumnInstance,\n> = {\n column: ColumnConfig;\n tabIndex: number;\n theme?: Theme;\n // TODO isExpanded: boolean;\n // TODO toggleGroup: () => void;\n} & GroupRow<RowType>;",
|
|
56603
56635
|
"internal": true,
|
|
56604
56636
|
"importNotice": "Тип \"RenderGroupCellProps\" не экспортируется из публичной точки входа — импортировать его нельзя. Определение приведено для понимания структуры: опишите нужную форму по месту либо возьмите её из типа, который экспортирован.",
|
|
56605
56637
|
"sourceFile": "packages/ui-kit/src/components/TableCanvas/feature-rows-grouping/types.ts"
|