@infomaximum/ui-kit 0.15.8 → 0.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/dist/components/BaseTooltip/BaseTooltip.js +4 -4
- package/dist/components/ConfigProvider/ConfigProvider.js +4 -2
- package/dist/components/ConfigProvider/ConfigProvider.types.d.ts +2 -3
- package/dist/components/ConfigProvider/contexts/ConfigContext.d.ts +2 -2
- package/dist/components/ConfigProvider/contexts/ConfigContext.types.d.ts +3 -1
- package/dist/components/ConfigProvider/contexts/index.d.ts +2 -1
- package/dist/components/ConfigProvider/hooks/useConfig/useConfig.d.ts +2 -2
- package/dist/components/ConfigProvider/index.d.ts +1 -1
- package/dist/components/Empty/Empty.js +3 -1
- package/dist/components/Empty/Empty.types.d.ts +5 -0
- package/dist/components/Radio/components/RadioInternal/RadioInternal.types.d.ts +1 -1
- package/dist/components/Table/Table.d.ts +7 -0
- package/dist/components/Table/Table.js +218 -0
- package/dist/components/Table/Table.styles.d.ts +12 -0
- package/dist/components/Table/Table.styles.js +62 -0
- package/dist/components/Table/Table.tokens.d.ts +19 -0
- package/dist/components/Table/Table.tokens.js +20 -0
- package/dist/components/Table/Table.types.d.ts +48 -0
- package/dist/components/Table/components/Body/Body.d.ts +5 -0
- package/dist/components/Table/components/Body/Body.js +56 -0
- package/dist/components/Table/components/Body/Body.styles.d.ts +4 -0
- package/dist/components/Table/components/Body/Body.styles.js +6 -0
- package/dist/components/Table/components/Body/Body.types.d.ts +6 -0
- package/dist/components/Table/components/Body/components/BodyCell/BodyCell.d.ts +3 -0
- package/dist/components/Table/components/Body/components/BodyCell/BodyCell.js +117 -0
- package/dist/components/Table/components/Body/components/BodyCell/BodyCell.styles.d.ts +27 -0
- package/dist/components/Table/components/Body/components/BodyCell/BodyCell.styles.js +32 -0
- package/dist/components/Table/components/Body/components/BodyCell/BodyCell.types.d.ts +12 -0
- package/dist/components/Table/components/Body/components/BodyColGroup/BodyColGroup.d.ts +3 -0
- package/dist/components/Table/components/Body/components/BodyColGroup/BodyColGroup.js +35 -0
- package/dist/components/Table/components/Body/components/BodyColGroup/BodyColGroup.types.d.ts +2 -0
- package/dist/components/Table/components/Body/components/BodyRow/BodyRow.d.ts +3 -0
- package/dist/components/Table/components/Body/components/BodyRow/BodyRow.js +41 -0
- package/dist/components/Table/components/Body/components/BodyRow/BodyRow.types.d.ts +8 -0
- package/dist/components/Table/components/Body/components/MeasureCell/MeasureCell.d.ts +3 -0
- package/dist/components/Table/components/Body/components/MeasureCell/MeasureCell.js +33 -0
- package/dist/components/Table/components/Body/components/MeasureCell/MeasureCell.styles.d.ts +10 -0
- package/dist/components/Table/components/Body/components/MeasureCell/MeasureCell.styles.js +14 -0
- package/dist/components/Table/components/Body/components/MeasureCell/MeasureCell.types.d.ts +6 -0
- package/dist/components/Table/components/Body/components/MeasureRow/MeasureRow.d.ts +5 -0
- package/dist/components/Table/components/Body/components/MeasureRow/MeasureRow.js +87 -0
- package/dist/components/Table/components/Body/components/MeasureRow/MeasureRow.types.d.ts +2 -0
- package/dist/components/Table/components/Body/components/MeasureRow/MeasureRow.utils.d.ts +4 -0
- package/dist/components/Table/components/Body/components/MeasureRow/MeasureRow.utils.js +13 -0
- package/dist/components/Table/components/Cell/Cell.d.ts +3 -0
- package/dist/components/Table/components/Cell/Cell.js +25 -0
- package/dist/components/Table/components/Cell/Cell.styles.d.ts +28 -0
- package/dist/components/Table/components/Cell/Cell.styles.js +31 -0
- package/dist/components/Table/components/Cell/Cell.types.d.ts +16 -0
- package/dist/components/Table/components/EmptyDataRow/EmptyDataRow.d.ts +3 -0
- package/dist/components/Table/components/EmptyDataRow/EmptyDataRow.js +69 -0
- package/dist/components/Table/components/EmptyDataRow/EmptyDataRow.styles.d.ts +15 -0
- package/dist/components/Table/components/EmptyDataRow/EmptyDataRow.styles.js +26 -0
- package/dist/components/Table/components/EmptyDataRow/EmptyDataRow.types.d.ts +2 -0
- package/dist/components/Table/components/EmptyDataRow/EmptyDataRow.utils.d.ts +7 -0
- package/dist/components/Table/components/EmptyDataRow/EmptyDataRow.utils.js +17 -0
- package/dist/components/Table/components/FixedHeader/FixedHeader.d.ts +2 -0
- package/dist/components/Table/components/FixedHeader/FixedHeader.js +25 -0
- package/dist/components/Table/components/FixedHeader/FixedHeader.types.d.ts +6 -0
- package/dist/components/Table/components/FixedHeader/components/FixedHeaderColGroup/FixedHeaderColGroup.d.ts +3 -0
- package/dist/components/Table/components/FixedHeader/components/FixedHeaderColGroup/FixedHeaderColGroup.js +33 -0
- package/dist/components/Table/components/FixedHeader/components/FixedHeaderColGroup/FixedHeaderColGroup.types.d.ts +2 -0
- package/dist/components/Table/components/Header/Header.d.ts +3 -0
- package/dist/components/Table/components/Header/Header.js +23 -0
- package/dist/components/Table/components/Header/Header.styles.d.ts +4 -0
- package/dist/components/Table/components/Header/Header.styles.js +6 -0
- package/dist/components/Table/components/Header/Header.types.d.ts +15 -0
- package/dist/components/Table/components/Header/components/HeaderCell/HeaderCell.d.ts +3 -0
- package/dist/components/Table/components/Header/components/HeaderCell/HeaderCell.js +63 -0
- package/dist/components/Table/components/Header/components/HeaderCell/HeaderCell.styles.d.ts +21 -0
- package/dist/components/Table/components/Header/components/HeaderCell/HeaderCell.styles.js +25 -0
- package/dist/components/Table/components/Header/components/HeaderCell/HeaderCell.types.d.ts +6 -0
- package/dist/components/Table/components/Header/components/HeaderCell/HeaderCell.utils.d.ts +2 -0
- package/dist/components/Table/components/Header/components/HeaderCell/HeaderCell.utils.js +4 -0
- package/dist/components/Table/components/Header/components/HeaderRow/HeaderRow.d.ts +3 -0
- package/dist/components/Table/components/Header/components/HeaderRow/HeaderRow.js +34 -0
- package/dist/components/Table/components/Header/components/HeaderRow/HeaderRow.styles.d.ts +6 -0
- package/dist/components/Table/components/Header/components/HeaderRow/HeaderRow.styles.js +8 -0
- package/dist/components/Table/components/Header/components/HeaderRow/HeaderRow.types.d.ts +6 -0
- package/dist/components/Table/components/Header/utils/index.d.ts +1 -0
- package/dist/components/Table/components/Header/utils/parseHeaderRows/parseHeaderRows.d.ts +4 -0
- package/dist/components/Table/components/Header/utils/parseHeaderRows/parseHeaderRows.js +50 -0
- package/dist/components/Table/contexts/index.d.ts +3 -0
- package/dist/components/Table/contexts/tableContext/TableContext.d.ts +3 -0
- package/dist/components/Table/contexts/tableContext/TableContext.js +21 -0
- package/dist/components/Table/contexts/tableContext/TableContext.types.d.ts +27 -0
- package/dist/components/Table/contexts/tableContext/useTableContext/useTableContext.d.ts +2 -0
- package/dist/components/Table/contexts/tableContext/useTableContext/useTableContext.js +8 -0
- package/dist/components/Table/features/tableExpand/components/DefaultExpandIcon/DefaultExpandIcon.d.ts +3 -0
- package/dist/components/Table/features/tableExpand/components/DefaultExpandIcon/DefaultExpandIcon.js +23 -0
- package/dist/components/Table/features/tableExpand/components/DefaultExpandIcon/DefaultExpandIcon.styles.d.ts +19 -0
- package/dist/components/Table/features/tableExpand/components/DefaultExpandIcon/DefaultExpandIcon.styles.js +22 -0
- package/dist/components/Table/features/tableExpand/components/DefaultExpandIcon/DefaultExpandIcon.types.d.ts +3 -0
- package/dist/components/Table/features/tableExpand/components/ExpandIconWrapper/ExpandIconWrapper.d.ts +3 -0
- package/dist/components/Table/features/tableExpand/components/ExpandIconWrapper/ExpandIconWrapper.js +24 -0
- package/dist/components/Table/features/tableExpand/components/ExpandIconWrapper/ExpandIconWrapper.types.d.ts +5 -0
- package/dist/components/Table/features/tableExpand/contexts/index.d.ts +3 -0
- package/dist/components/Table/features/tableExpand/contexts/tableExpandedContext/TableExpandedContext.d.ts +2 -0
- package/dist/components/Table/features/tableExpand/contexts/tableExpandedContext/TableExpandedContext.js +9 -0
- package/dist/components/Table/features/tableExpand/contexts/tableExpandedContext/TableExpandedContext.types.d.ts +7 -0
- package/dist/components/Table/features/tableExpand/contexts/tableExpandedContext/useTableExpandedContext/useTableExpandedContext.d.ts +1 -0
- package/dist/components/Table/features/tableExpand/contexts/tableExpandedContext/useTableExpandedContext/useTableExpandedContext.js +8 -0
- package/dist/components/Table/features/tableExpand/hooks/index.d.ts +2 -0
- package/dist/components/Table/features/tableExpand/hooks/useBodyExpand/useBodyExpand.d.ts +6 -0
- package/dist/components/Table/features/tableExpand/hooks/useBodyExpand/useBodyExpand.js +38 -0
- package/dist/components/Table/features/tableExpand/hooks/useBodyExpand/useBodyExpand.types.d.ts +3 -0
- package/dist/components/Table/features/tableExpand/hooks/useTableExpand/useTableExpand.d.ts +8 -0
- package/dist/components/Table/features/tableExpand/hooks/useTableExpand/useTableExpand.js +26 -0
- package/dist/components/Table/features/tableExpand/hooks/useTableExpand/useTableExpand.types.d.ts +3 -0
- package/dist/components/Table/features/tableExpand/index.d.ts +4 -0
- package/dist/components/Table/features/tableExpand/types.d.ts +16 -0
- package/dist/components/Table/features/tableRowSelection/components/CheckboxCellContentWrapper/CheckboxCellContentWrapper.d.ts +3 -0
- package/dist/components/Table/features/tableRowSelection/components/CheckboxCellContentWrapper/CheckboxCellContentWrapper.js +78 -0
- package/dist/components/Table/features/tableRowSelection/components/CheckboxCellContentWrapper/CheckboxCellContentWrapper.types.d.ts +4 -0
- package/dist/components/Table/features/tableRowSelection/components/CheckboxCellContentWrapper/CheckboxCellContentWrapper.utils.d.ts +3 -0
- package/dist/components/Table/features/tableRowSelection/components/CheckboxCellContentWrapper/CheckboxCellContentWrapper.utils.js +20 -0
- package/dist/components/Table/features/tableRowSelection/components/HeaderCheckboxCellContentWrapper/HeaderCheckboxCellContentWrapper.d.ts +2 -0
- package/dist/components/Table/features/tableRowSelection/components/HeaderCheckboxCellContentWrapper/HeaderCheckboxCellContentWrapper.js +73 -0
- package/dist/components/Table/features/tableRowSelection/components/HeaderCheckboxCellContentWrapper/HeaderCheckboxCellContentWrapper.types.d.ts +5 -0
- package/dist/components/Table/features/tableRowSelection/components/RadioCellContentWrapper/RadioCellContentWrapper.d.ts +3 -0
- package/dist/components/Table/features/tableRowSelection/components/RadioCellContentWrapper/RadioCellContentWrapper.js +43 -0
- package/dist/components/Table/features/tableRowSelection/components/RadioCellContentWrapper/RadioCellContentWrapper.types.d.ts +4 -0
- package/dist/components/Table/features/tableRowSelection/contexts/index.d.ts +3 -0
- package/dist/components/Table/features/tableRowSelection/contexts/tableRowSelectionContext/TableRowSelectionContext.d.ts +2 -0
- package/dist/components/Table/features/tableRowSelection/contexts/tableRowSelectionContext/TableRowSelectionContext.js +20 -0
- package/dist/components/Table/features/tableRowSelection/contexts/tableRowSelectionContext/TableRowSelectionContext.types.d.ts +18 -0
- package/dist/components/Table/features/tableRowSelection/contexts/tableRowSelectionContext/useTableRowSelectionContext/useTableRowSelectionContext.d.ts +1 -0
- package/dist/components/Table/features/tableRowSelection/contexts/tableRowSelectionContext/useTableRowSelectionContext/useTableRowSelectionContext.js +8 -0
- package/dist/components/Table/features/tableRowSelection/hooks/index.d.ts +4 -0
- package/dist/components/Table/features/tableRowSelection/hooks/useMultipleSelect/useMultipleSelect.d.ts +2 -0
- package/dist/components/Table/features/tableRowSelection/hooks/useMultipleSelect/useMultipleSelect.js +32 -0
- package/dist/components/Table/features/tableRowSelection/hooks/useMultipleSelect/useMultipleSelect.types.d.ts +4 -0
- package/dist/components/Table/features/tableRowSelection/hooks/useTableRowSelection/useTableRowSelection.d.ts +19 -0
- package/dist/components/Table/features/tableRowSelection/hooks/useTableRowSelection/useTableRowSelection.js +126 -0
- package/dist/components/Table/features/tableRowSelection/hooks/useTableRowSelection/useTableRowSelection.types.d.ts +8 -0
- package/dist/components/Table/features/tableRowSelection/hooks/useTableRowSelection/useTableRowSelection.utils.d.ts +2 -0
- package/dist/components/Table/features/tableRowSelection/hooks/useTableRowSelection/useTableRowSelection.utils.js +13 -0
- package/dist/components/Table/features/tableRowSelection/hooks/useTransformColumns/useTransformColumns.d.ts +6 -0
- package/dist/components/Table/features/tableRowSelection/hooks/useTransformColumns/useTransformColumns.js +59 -0
- package/dist/components/Table/features/tableRowSelection/hooks/useTransformColumns/useTransformColumns.types.d.ts +3 -0
- package/dist/components/Table/features/tableRowSelection/hooks/useTransformColumns/useTransformColumns.utils.d.ts +1 -0
- package/dist/components/Table/features/tableRowSelection/hooks/useTransformColumns/useTransformColumns.utils.js +12 -0
- package/dist/components/Table/features/tableRowSelection/index.d.ts +5 -0
- package/dist/components/Table/features/tableRowSelection/styles.d.ts +16 -0
- package/dist/components/Table/features/tableRowSelection/styles.js +25 -0
- package/dist/components/Table/features/tableRowSelection/types.d.ts +24 -0
- package/dist/components/Table/features/tableRowSelection/utils/const.d.ts +1 -0
- package/dist/components/Table/features/tableRowSelection/utils/const.js +4 -0
- package/dist/components/Table/features/tableRowSelection/utils/index.d.ts +1 -0
- package/dist/components/Table/features/tableSort/components/HeaderCellWithSort/HeaderCellWithSort.d.ts +3 -0
- package/dist/components/Table/features/tableSort/components/HeaderCellWithSort/HeaderCellWithSort.js +75 -0
- package/dist/components/Table/features/tableSort/components/HeaderCellWithSort/HeaderCellWithSort.styles.d.ts +7 -0
- package/dist/components/Table/features/tableSort/components/HeaderCellWithSort/HeaderCellWithSort.styles.js +9 -0
- package/dist/components/Table/features/tableSort/components/HeaderCellWithSort/HeaderCellWithSort.types.d.ts +6 -0
- package/dist/components/Table/features/tableSort/components/SortButton/SortButton.d.ts +2 -0
- package/dist/components/Table/features/tableSort/components/SortButton/SortButton.js +27 -0
- package/dist/components/Table/features/tableSort/components/SortButton/SortButton.styles.d.ts +17 -0
- package/dist/components/Table/features/tableSort/components/SortButton/SortButton.styles.js +20 -0
- package/dist/components/Table/features/tableSort/components/SortButton/SortButton.types.d.ts +4 -0
- package/dist/components/Table/features/tableSort/hooks/index.d.ts +5 -0
- package/dist/components/Table/features/tableSort/hooks/useHeaderCellSort/useHeaderCellSort.d.ts +6 -0
- package/dist/components/Table/features/tableSort/hooks/useHeaderCellSort/useHeaderCellSort.js +47 -0
- package/dist/components/Table/features/tableSort/hooks/useHeaderCellSort/useHeaderCellSort.types.d.ts +7 -0
- package/dist/components/Table/features/tableSort/hooks/useHeaderCellSort/useHeaderCellSort.utils.d.ts +2 -0
- package/dist/components/Table/features/tableSort/hooks/useHeaderCellSort/useHeaderCellSort.utils.js +9 -0
- package/dist/components/Table/features/tableSort/hooks/useSortState/useSortState.d.ts +5 -0
- package/dist/components/Table/features/tableSort/hooks/useSortState/useSortState.js +39 -0
- package/dist/components/Table/features/tableSort/hooks/useSortState/useSortState.types.d.ts +4 -0
- package/dist/components/Table/features/tableSort/hooks/useTableSort/useTableSort.d.ts +9 -0
- package/dist/components/Table/features/tableSort/hooks/useTableSort/useTableSort.js +54 -0
- package/dist/components/Table/features/tableSort/hooks/useTableSort/useTableSort.types.d.ts +14 -0
- package/dist/components/Table/features/tableSort/hooks/useTransformColumns/useTransformColumns.d.ts +5 -0
- package/dist/components/Table/features/tableSort/hooks/useTransformColumns/useTransformColumns.js +47 -0
- package/dist/components/Table/features/tableSort/hooks/useTransformColumns/useTransformColumns.styles.d.ts +6 -0
- package/dist/components/Table/features/tableSort/hooks/useTransformColumns/useTransformColumns.styles.js +8 -0
- package/dist/components/Table/features/tableSort/icons/ArrowFilled.d.ts +2 -0
- package/dist/components/Table/features/tableSort/icons/ArrowFilled.js +12 -0
- package/dist/components/Table/features/tableSort/icons/index.d.ts +1 -0
- package/dist/components/Table/features/tableSort/index.d.ts +5 -0
- package/dist/components/Table/features/tableSort/types.d.ts +10 -0
- package/dist/components/Table/features/tableSort/utils/const.d.ts +4 -0
- package/dist/components/Table/features/tableSort/utils/const.js +8 -0
- package/dist/components/Table/features/tableSort/utils/getSortFunction/getSortFunction.d.ts +2 -0
- package/dist/components/Table/features/tableSort/utils/getSortFunction/getSortFunction.js +9 -0
- package/dist/components/Table/features/tableSort/utils/getSortFunction/index.d.ts +1 -0
- package/dist/components/Table/features/tableSort/utils/getSortedData/getSortedData.d.ts +3 -0
- package/dist/components/Table/features/tableSort/utils/getSortedData/getSortedData.js +48 -0
- package/dist/components/Table/features/tableSort/utils/getSortedData/index.d.ts +1 -0
- package/dist/components/Table/features/tableSort/utils/index.d.ts +2 -0
- package/dist/components/Table/features/tableStaticContext/contexts/index.d.ts +1 -0
- package/dist/components/Table/features/tableStaticContext/contexts/tableStaticContext/TableStaticContext.d.ts +21 -0
- package/dist/components/Table/features/tableStaticContext/contexts/tableStaticContext/TableStaticContext.js +29 -0
- package/dist/components/Table/features/tableStaticContext/contexts/tableStaticContext/TableStaticContext.types.d.ts +24 -0
- package/dist/components/Table/features/tableStaticContext/contexts/tableStaticContext/useTableStaticContext/useTableStaticContext.d.ts +2 -0
- package/dist/components/Table/features/tableStaticContext/contexts/tableStaticContext/useTableStaticContext/useTableStaticContext.js +8 -0
- package/dist/components/Table/features/tableStaticContext/hocs/index.d.ts +1 -0
- package/dist/components/Table/features/tableStaticContext/hocs/withTableStaticContext.d.ts +3 -0
- package/dist/components/Table/features/tableStaticContext/hocs/withTableStaticContext.js +15 -0
- package/dist/components/Table/features/tableStaticContext/index.d.ts +2 -0
- package/dist/components/Table/features/typedEventBus/hooks.d.ts +3 -0
- package/dist/components/Table/features/typedEventBus/hooks.js +8 -0
- package/dist/components/Table/features/typedEventBus/index.d.ts +2 -0
- package/dist/components/Table/features/typedEventBus/types.d.ts +22 -0
- package/dist/components/Table/forStories/components.d.ts +2 -0
- package/dist/components/Table/forStories/example_1.d.ts +11 -0
- package/dist/components/Table/forStories/example_2.d.ts +11 -0
- package/dist/components/Table/forStories/example_3.d.ts +10 -0
- package/dist/components/Table/forStories/example_4.d.ts +10 -0
- package/dist/components/Table/forStories/example_5.d.ts +9 -0
- package/dist/components/Table/forStories/example_6.d.ts +9 -0
- package/dist/components/Table/forStories/example_7.d.ts +9 -0
- package/dist/components/Table/forStories/index.d.ts +7 -0
- package/dist/components/Table/hooks/useBodyCellRender/index.d.ts +1 -0
- package/dist/components/Table/hooks/useBodyCellRender/useBodyCellRender.d.ts +4 -0
- package/dist/components/Table/hooks/useBodyCellRender/useBodyCellRender.js +27 -0
- package/dist/components/Table/hooks/useBodyCellRender/useBodyCellRender.types.d.ts +7 -0
- package/dist/components/Table/hooks/useBodyFlattenData/index.d.ts +1 -0
- package/dist/components/Table/hooks/useBodyFlattenData/useBodyFlattenData.d.ts +5 -0
- package/dist/components/Table/hooks/useBodyFlattenData/useBodyFlattenData.js +31 -0
- package/dist/components/Table/hooks/useBodyFlattenData/useBodyFlattenData.types.d.ts +11 -0
- package/dist/components/Table/hooks/useBodyFlattenData/useBodyFlattenData.utils.d.ts +3 -0
- package/dist/components/Table/hooks/useBodyFlattenData/useBodyFlattenData.utils.js +19 -0
- package/dist/components/Table/hooks/useCellFixedInfo/index.d.ts +3 -0
- package/dist/components/Table/hooks/useCellFixedInfo/useCellFixedInfo.d.ts +12 -0
- package/dist/components/Table/hooks/useCellFixedInfo/useCellFixedInfo.js +117 -0
- package/dist/components/Table/hooks/useCellFixedInfo/useCellFixedInfo.styles.d.ts +26 -0
- package/dist/components/Table/hooks/useCellFixedInfo/useCellFixedInfo.styles.js +33 -0
- package/dist/components/Table/hooks/useCellFixedInfo/useCellFixedInfo.types.d.ts +19 -0
- package/dist/components/Table/hooks/useCellFixedInfo/useCellFixedInfo.utils.d.ts +9 -0
- package/dist/components/Table/hooks/useCellFixedInfo/useCellFixedInfo.utils.js +75 -0
- package/dist/components/Table/hooks/useCellHover/index.d.ts +1 -0
- package/dist/components/Table/hooks/useCellHover/useCellHover.d.ts +8 -0
- package/dist/components/Table/hooks/useCellHover/useCellHover.js +34 -0
- package/dist/components/Table/hooks/useCellHover/useCellHover.types.d.ts +5 -0
- package/dist/components/Table/hooks/useCellHover/useCellHover.utils.d.ts +1 -0
- package/dist/components/Table/hooks/useCellHover/useCellHover.utils.js +7 -0
- package/dist/components/Table/hooks/useTableColumns/index.d.ts +1 -0
- package/dist/components/Table/hooks/useTableColumns/useTableColumns.d.ts +7 -0
- package/dist/components/Table/hooks/useTableColumns/useTableColumns.js +39 -0
- package/dist/components/Table/hooks/useTableColumns/useTableColumns.types.d.ts +4 -0
- package/dist/components/Table/hooks/useTableColumns/useTableColumns.utils.d.ts +2 -0
- package/dist/components/Table/hooks/useTableColumns/useTableColumns.utils.js +24 -0
- package/dist/components/Table/hooks/useTableComponents/index.d.ts +1 -0
- package/dist/components/Table/hooks/useTableComponents/useTableComponents.d.ts +6 -0
- package/dist/components/Table/hooks/useTableComponents/useTableComponents.js +14 -0
- package/dist/components/Table/hooks/useTableComponents/useTableComponents.types.d.ts +3 -0
- package/dist/components/Table/hooks/useTableVisualParamsChange/index.d.ts +1 -0
- package/dist/components/Table/hooks/useTableVisualParamsChange/types.d.ts +4 -0
- package/dist/components/Table/hooks/useTableVisualParamsChange/useTableVisualParamsChange.d.ts +12 -0
- package/dist/components/Table/hooks/useTableVisualParamsChange/useTableVisualParamsChange.js +116 -0
- package/dist/components/Table/hooks/useTableVisualParamsChange/utils.d.ts +3 -0
- package/dist/components/Table/hooks/useTableVisualParamsChange/utils.js +35 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/interfaces/tableColumns.types.d.ts +45 -0
- package/dist/components/Table/interfaces/tableComponents.types.d.ts +28 -0
- package/dist/components/Table/utils/getRowKey/getRowKey.d.ts +2 -0
- package/dist/components/Table/utils/getRowKey/getRowKey.js +4 -0
- package/dist/components/Table/utils/getRowKey/index.d.ts +2 -0
- package/dist/components/Table/utils/getRowKey/types.d.ts +2 -0
- package/dist/components/Table/utils/index.d.ts +2 -0
- package/dist/components/Table/utils/ref/index.d.ts +1 -0
- package/dist/components/Table/utils/ref/ref.d.ts +5 -0
- package/dist/components/Table/utils/ref/ref.js +16 -0
- package/dist/components/Table/utils/ref/types.d.ts +10 -0
- package/dist/hooks/useEvent/index.d.ts +1 -0
- package/dist/hooks/useEvent/useEvent.d.ts +2 -0
- package/dist/hooks/useEvent/useEvent.js +9 -0
- package/dist/hooks/useEvent/useEvent.types.d.ts +1 -0
- package/dist/hooks/useFirstMount/index.d.ts +1 -0
- package/dist/hooks/useFirstMount/useFirstMount.d.ts +1 -0
- package/dist/hooks/useFirstMount/useFirstMount.js +12 -0
- package/dist/hooks/useStatic/index.d.ts +1 -0
- package/dist/hooks/useStatic/useStatic.d.ts +1 -0
- package/dist/hooks/useStatic/useStatic.js +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/utils/eventBus/context/EventBusContext.d.ts +2 -0
- package/dist/utils/eventBus/context/EventBusContext.js +5 -0
- package/dist/utils/eventBus/context/EventBusContext.types.d.ts +5 -0
- package/dist/utils/eventBus/eventBus.d.ts +10 -0
- package/dist/utils/eventBus/eventBus.js +47 -0
- package/dist/utils/eventBus/hocs/withEventBus/index.d.ts +1 -0
- package/dist/utils/eventBus/hocs/withEventBus/withEventBus.d.ts +2 -0
- package/dist/utils/eventBus/hocs/withEventBus/withEventBus.js +15 -0
- package/dist/utils/eventBus/hooks/useEmitter/useEmitter.d.ts +2 -0
- package/dist/utils/eventBus/hooks/useEmitter/useEmitter.js +8 -0
- package/dist/utils/eventBus/hooks/useEventBus/useEventBus.d.ts +3 -0
- package/dist/utils/eventBus/hooks/useEventBus/useEventBus.js +12 -0
- package/dist/utils/eventBus/hooks/useSubscribe/useSubscribe.d.ts +3 -0
- package/dist/utils/eventBus/hooks/useSubscribe/useSubscribe.js +18 -0
- package/dist/utils/eventBus/index.d.ts +6 -0
- package/dist/utils/eventBus/provider/EventBusProvider.d.ts +3 -0
- package/dist/utils/eventBus/provider/EventBusProvider.js +16 -0
- package/dist/utils/eventBus/provider/EventBusProvider.types.d.ts +6 -0
- package/dist/utils/eventBus/types.d.ts +6 -0
- package/package.json +7 -6
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { RadioCellContentWrapperProps } from './RadioCellContentWrapper.types';
|
|
2
|
+
import { DefaultRecord } from 'components/Table/Table.types';
|
|
3
|
+
export declare const RadioCellContentWrapper: <Record extends DefaultRecord>(props: RadioCellContentWrapperProps<Record>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { Fragment } from "react";
|
|
3
|
+
import { useEvent } from "../../../../../../hooks/useEvent/useEvent.js";
|
|
4
|
+
import { selectionItemContainerStyle, getBorderedSelectionItemContainerStyle } from "../../styles.js";
|
|
5
|
+
import { useTableContext } from "../../../../contexts/tableContext/useTableContext/useTableContext.js";
|
|
6
|
+
import { useTableRowSelectionContext } from "../../contexts/tableRowSelectionContext/useTableRowSelectionContext/useTableRowSelectionContext.js";
|
|
7
|
+
import { getRowKey } from "../../../../utils/getRowKey/getRowKey.js";
|
|
8
|
+
import { Radio } from "../../../../../Radio/Radio.js";
|
|
9
|
+
const RadioCellContentWrapperComponent = (props) => {
|
|
10
|
+
const {
|
|
11
|
+
renderCell: RenderCell,
|
|
12
|
+
record
|
|
13
|
+
} = props;
|
|
14
|
+
const {
|
|
15
|
+
bordered
|
|
16
|
+
} = useTableContext();
|
|
17
|
+
const {
|
|
18
|
+
checkboxPropsMap,
|
|
19
|
+
derivedSelectedKeySet,
|
|
20
|
+
triggerSingleSelection
|
|
21
|
+
} = useTableRowSelectionContext();
|
|
22
|
+
const key = getRowKey(record);
|
|
23
|
+
const checked = derivedSelectedKeySet.has(key);
|
|
24
|
+
const radioProps = checkboxPropsMap.get(key);
|
|
25
|
+
const handleClick = useEvent((e) => {
|
|
26
|
+
var _a;
|
|
27
|
+
e.stopPropagation();
|
|
28
|
+
(_a = radioProps == null ? void 0 : radioProps.onClick) == null ? void 0 : _a.call(radioProps, e);
|
|
29
|
+
});
|
|
30
|
+
const handleChange = useEvent((e) => {
|
|
31
|
+
var _a;
|
|
32
|
+
if (!derivedSelectedKeySet.has(key)) {
|
|
33
|
+
triggerSingleSelection(key, true, [key], e.nativeEvent);
|
|
34
|
+
}
|
|
35
|
+
(_a = radioProps == null ? void 0 : radioProps.onChange) == null ? void 0 : _a.call(radioProps, e);
|
|
36
|
+
});
|
|
37
|
+
const Wrapper = RenderCell ?? Fragment;
|
|
38
|
+
return /* @__PURE__ */ jsx("div", { css: [selectionItemContainerStyle, bordered ? getBorderedSelectionItemContainerStyle() : void 0, process.env.NODE_ENV === "production" ? "" : ";label:RadioCellContentWrapperComponent;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9idWlsZHMvZnJvbnRlbmQvbGlicy91aS1raXQvc3JjL2NvbXBvbmVudHMvVGFibGUvZmVhdHVyZXMvdGFibGVSb3dTZWxlY3Rpb24vY29tcG9uZW50cy9SYWRpb0NlbGxDb250ZW50V3JhcHBlci9SYWRpb0NlbGxDb250ZW50V3JhcHBlci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBd0NNIiwiZmlsZSI6Ii9idWlsZHMvZnJvbnRlbmQvbGlicy91aS1raXQvc3JjL2NvbXBvbmVudHMvVGFibGUvZmVhdHVyZXMvdGFibGVSb3dTZWxlY3Rpb24vY29tcG9uZW50cy9SYWRpb0NlbGxDb250ZW50V3JhcHBlci9SYWRpb0NlbGxDb250ZW50V3JhcHBlci50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBGcmFnbWVudCB9IGZyb20gXCJyZWFjdFwiO1xuaW1wb3J0IHR5cGUgeyBSYWRpb0NlbGxDb250ZW50V3JhcHBlclByb3BzIH0gZnJvbSBcIi4vUmFkaW9DZWxsQ29udGVudFdyYXBwZXIudHlwZXNcIjtcbmltcG9ydCB7IHVzZVRhYmxlQ29udGV4dCB9IGZyb20gXCJjb21wb25lbnRzL1RhYmxlL2NvbnRleHRzXCI7XG5pbXBvcnQgeyB1c2VFdmVudCB9IGZyb20gXCJob29rcy91c2VFdmVudFwiO1xuaW1wb3J0IHsgZ2V0Um93S2V5IH0gZnJvbSBcImNvbXBvbmVudHMvVGFibGUvdXRpbHNcIjtcbmltcG9ydCB7IFJhZGlvLCB0eXBlIFJhZGlvUHJvcHMgfSBmcm9tIFwiY29tcG9uZW50cy9SYWRpb1wiO1xuaW1wb3J0IH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2VsbENvbnRlbnRXcmFwcGVyQ29tcG9uZW50O1xuIl19 */"], children: /* @__PURE__ */ jsx(Wrapper, { children: /* @__PURE__ */ jsx(Radio, { ...radioProps, checked, onClick: handleClick, onChange: handleChange }) }) });
|
|
39
|
+
};
|
|
40
|
+
const RadioCellContentWrapper = RadioCellContentWrapperComponent;
|
|
41
|
+
export {
|
|
42
|
+
RadioCellContentWrapper
|
|
43
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { useTableRowSelectionContext } from './tableRowSelectionContext/useTableRowSelectionContext/useTableRowSelectionContext';
|
|
2
|
+
export { TableRowSelectionContext } from './tableRowSelectionContext/TableRowSelectionContext';
|
|
3
|
+
export type { TableRowSelectionContextValue } from './tableRowSelectionContext/TableRowSelectionContext.types';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createContext } from "react";
|
|
2
|
+
import { noop, identity } from "lodash-es";
|
|
3
|
+
const TableRowSelectionContext = createContext({
|
|
4
|
+
checkedCurrentAll: false,
|
|
5
|
+
checkedCurrentSome: false,
|
|
6
|
+
flattedData: [],
|
|
7
|
+
checkboxPropsMap: /* @__PURE__ */ new Map(),
|
|
8
|
+
keySet: /* @__PURE__ */ new Set(),
|
|
9
|
+
derivedSelectedKeySet: /* @__PURE__ */ new Set(),
|
|
10
|
+
derivedSelectedKeys: [],
|
|
11
|
+
derivedHalfSelectedKeySet: /* @__PURE__ */ new Set(),
|
|
12
|
+
recordKeys: [],
|
|
13
|
+
setSelectedKeys: noop,
|
|
14
|
+
triggerSingleSelection: noop,
|
|
15
|
+
multipleSelect: identity,
|
|
16
|
+
updatePrevSelectedIndex: noop
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
TableRowSelectionContext
|
|
20
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useTableRowSelection } from '../../hooks';
|
|
2
|
+
type UseTableRowSelectionReturnType = ReturnType<typeof useTableRowSelection>;
|
|
3
|
+
export interface TableRowSelectionContextValue {
|
|
4
|
+
checkedCurrentAll: UseTableRowSelectionReturnType["checkedCurrentAll"];
|
|
5
|
+
checkedCurrentSome: UseTableRowSelectionReturnType["checkedCurrentSome"];
|
|
6
|
+
flattedData: UseTableRowSelectionReturnType["flattedData"];
|
|
7
|
+
checkboxPropsMap: UseTableRowSelectionReturnType["checkboxPropsMap"];
|
|
8
|
+
keySet: UseTableRowSelectionReturnType["keySet"];
|
|
9
|
+
derivedSelectedKeySet: UseTableRowSelectionReturnType["derivedSelectedKeySet"];
|
|
10
|
+
derivedSelectedKeys: UseTableRowSelectionReturnType["derivedSelectedKeys"];
|
|
11
|
+
derivedHalfSelectedKeySet: UseTableRowSelectionReturnType["derivedHalfSelectedKeySet"];
|
|
12
|
+
recordKeys: UseTableRowSelectionReturnType["recordKeys"];
|
|
13
|
+
setSelectedKeys: UseTableRowSelectionReturnType["setSelectedKeys"];
|
|
14
|
+
triggerSingleSelection: UseTableRowSelectionReturnType["triggerSingleSelection"];
|
|
15
|
+
multipleSelect: UseTableRowSelectionReturnType["multipleSelect"];
|
|
16
|
+
updatePrevSelectedIndex: UseTableRowSelectionReturnType["updatePrevSelectedIndex"];
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useTableRowSelectionContext: () => import('../TableRowSelectionContext.types').TableRowSelectionContextValue;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { useTableRowSelection } from './useTableRowSelection/useTableRowSelection';
|
|
2
|
+
export { useTransformColumns } from './useTransformColumns/useTransformColumns';
|
|
3
|
+
export type { RowSelectionItemProps } from './useTableRowSelection/useTableRowSelection.types';
|
|
4
|
+
export type { UseTransformColumnsOptions } from './useTransformColumns/useTransformColumns.types';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { PrevSelectedIndex, UseMultipleSelectOptions } from './useMultipleSelect.types';
|
|
2
|
+
export declare const useMultipleSelect: <T, K>(options: UseMultipleSelectOptions<T, K>) => readonly [(currentSelectedIndex: number, data: T[], selectedKeys: Set<K>) => K[], import('react').Dispatch<import('react').SetStateAction<PrevSelectedIndex>>];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { useState, useCallback } from "react";
|
|
2
|
+
const useMultipleSelect = (options) => {
|
|
3
|
+
const {
|
|
4
|
+
getKey
|
|
5
|
+
} = options;
|
|
6
|
+
const [prevSelectedIndex, setPrevSelectedIndex] = useState(null);
|
|
7
|
+
const multipleSelect = useCallback((currentSelectedIndex, data, selectedKeys) => {
|
|
8
|
+
const configPrevSelectedIndex = prevSelectedIndex ?? currentSelectedIndex;
|
|
9
|
+
const startIndex = Math.min(configPrevSelectedIndex || 0, currentSelectedIndex);
|
|
10
|
+
const endIndex = Math.max(configPrevSelectedIndex || 0, currentSelectedIndex);
|
|
11
|
+
const rangeKeys = data.slice(startIndex, endIndex + 1).map(getKey);
|
|
12
|
+
const shouldSelected = rangeKeys.some((rangeKey) => !selectedKeys.has(rangeKey));
|
|
13
|
+
const changedKeys = [];
|
|
14
|
+
rangeKeys.forEach((item) => {
|
|
15
|
+
if (shouldSelected) {
|
|
16
|
+
if (!selectedKeys.has(item)) {
|
|
17
|
+
changedKeys.push(item);
|
|
18
|
+
}
|
|
19
|
+
selectedKeys.add(item);
|
|
20
|
+
} else {
|
|
21
|
+
selectedKeys.delete(item);
|
|
22
|
+
changedKeys.push(item);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
setPrevSelectedIndex(shouldSelected ? endIndex : null);
|
|
26
|
+
return changedKeys;
|
|
27
|
+
}, [prevSelectedIndex]);
|
|
28
|
+
return [multipleSelect, setPrevSelectedIndex];
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
useMultipleSelect
|
|
32
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UseTableRowSelectionOptions } from './useTableRowSelection.types';
|
|
2
|
+
import { DefaultRecord, Key } from 'components/Table/Table.types';
|
|
3
|
+
import { RowSelectMethod } from '../../types';
|
|
4
|
+
/** TODO: Посмотреть как покажет себя этот хук во время внедрения PT-16172. Возможно, переписать */
|
|
5
|
+
export declare const useTableRowSelection: <Record extends DefaultRecord<Record>>(options: UseTableRowSelectionOptions<Record>) => {
|
|
6
|
+
checkedCurrentAll: boolean;
|
|
7
|
+
checkedCurrentSome: boolean;
|
|
8
|
+
flattedData: Record[];
|
|
9
|
+
checkboxPropsMap: Map<import('react').Key, Partial<Omit<import('../../../../../Checkbox').CheckboxProps, "defaultChecked" | "checked">>>;
|
|
10
|
+
derivedSelectedKeySet: Set<import('react').Key>;
|
|
11
|
+
derivedSelectedKeys: import('react').Key[];
|
|
12
|
+
derivedHalfSelectedKeySet: Set<import('react').Key>;
|
|
13
|
+
recordKeys: import('react').Key[];
|
|
14
|
+
keySet: Set<import('react').Key>;
|
|
15
|
+
triggerSingleSelection: (key: Key, selected: boolean, keys: Key[], event: Event) => void;
|
|
16
|
+
setSelectedKeys: (keys: Key[], method: RowSelectMethod) => void;
|
|
17
|
+
multipleSelect: (currentSelectedIndex: number, data: import('react').Key[], selectedKeys: Set<import('react').Key>) => import('react').Key[];
|
|
18
|
+
updatePrevSelectedIndex: import('react').Dispatch<import('react').SetStateAction<import('../useMultipleSelect/useMultipleSelect.types').PrevSelectedIndex>>;
|
|
19
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { useMemo, useCallback } from "react";
|
|
2
|
+
import { useEvent } from "../../../../../../hooks/useEvent/useEvent.js";
|
|
3
|
+
import { compact } from "lodash-es";
|
|
4
|
+
import { useMultipleSelect } from "../useMultipleSelect/useMultipleSelect.js";
|
|
5
|
+
import { flattenData } from "./useTableRowSelection.utils.js";
|
|
6
|
+
import { useControlledState } from "../../../../../../hooks/useControlledState/useControlledState.js";
|
|
7
|
+
import { getRowKey } from "../../../../utils/getRowKey/getRowKey.js";
|
|
8
|
+
import { useEmitter } from "../../../typedEventBus/hooks.js";
|
|
9
|
+
import { useFirstMountLayoutEffect } from "../../../../../../hooks/useFirstMountLayoutEffect/useFirstMountLayoutEffect.js";
|
|
10
|
+
const useTableRowSelection = (options) => {
|
|
11
|
+
const {
|
|
12
|
+
rowSelection,
|
|
13
|
+
dataSource,
|
|
14
|
+
sortedData
|
|
15
|
+
} = options;
|
|
16
|
+
const {
|
|
17
|
+
getCheckboxProps,
|
|
18
|
+
onChange: onChangeProp,
|
|
19
|
+
onSelect,
|
|
20
|
+
defaultSelectedRowKeys,
|
|
21
|
+
selectedRowKeys,
|
|
22
|
+
type = "checkbox"
|
|
23
|
+
} = rowSelection || {};
|
|
24
|
+
const [mergedSelectedKeys, setMergedSelectedKeys] = useControlledState(selectedRowKeys || defaultSelectedRowKeys || [], selectedRowKeys);
|
|
25
|
+
const [multipleSelect, updatePrevSelectedIndex] = useMultipleSelect({
|
|
26
|
+
getKey: (item) => item
|
|
27
|
+
});
|
|
28
|
+
const {
|
|
29
|
+
getRecordByKey
|
|
30
|
+
} = useMemo(() => {
|
|
31
|
+
const map = /* @__PURE__ */ new Map();
|
|
32
|
+
function dig(records) {
|
|
33
|
+
records.forEach((record) => {
|
|
34
|
+
const rowKey = getRowKey(record);
|
|
35
|
+
map.set(rowKey, record);
|
|
36
|
+
if (record && typeof record === "object" && "children" in record) {
|
|
37
|
+
dig(record["children"] || []);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
dig(dataSource);
|
|
42
|
+
const getRecordByKey2 = (key) => {
|
|
43
|
+
return map.get(key);
|
|
44
|
+
};
|
|
45
|
+
return {
|
|
46
|
+
getRecordByKey: getRecordByKey2
|
|
47
|
+
};
|
|
48
|
+
}, [dataSource]);
|
|
49
|
+
const flattedData = useMemo(() => flattenData(sortedData), [sortedData]);
|
|
50
|
+
const checkboxPropsMap = useMemo(() => {
|
|
51
|
+
const map = /* @__PURE__ */ new Map();
|
|
52
|
+
flattedData.forEach((record) => {
|
|
53
|
+
const key = getRowKey(record);
|
|
54
|
+
const checkboxProps = (getCheckboxProps ? getCheckboxProps(record) : null) || {};
|
|
55
|
+
map.set(key, checkboxProps);
|
|
56
|
+
});
|
|
57
|
+
return map;
|
|
58
|
+
}, [flattedData, getCheckboxProps]);
|
|
59
|
+
const [derivedSelectedKeys, derivedHalfSelectedKeys] = useMemo(() => {
|
|
60
|
+
return [mergedSelectedKeys, []];
|
|
61
|
+
}, [mergedSelectedKeys]);
|
|
62
|
+
const derivedSelectedKeySet = useMemo(() => {
|
|
63
|
+
const keys = type === "radio" ? derivedSelectedKeys.slice(0, 1) : derivedSelectedKeys;
|
|
64
|
+
return new Set(keys);
|
|
65
|
+
}, [derivedSelectedKeys, type]);
|
|
66
|
+
const derivedHalfSelectedKeySet = useMemo(() => type === "radio" ? /* @__PURE__ */ new Set() : new Set(derivedHalfSelectedKeys), [derivedHalfSelectedKeys, type]);
|
|
67
|
+
const keySet = useMemo(() => new Set(derivedSelectedKeySet), [derivedSelectedKeySet]);
|
|
68
|
+
const recordKeys = useMemo(() => flattedData.map(getRowKey).filter((key) => {
|
|
69
|
+
var _a;
|
|
70
|
+
return !((_a = checkboxPropsMap.get(key)) == null ? void 0 : _a.disabled);
|
|
71
|
+
}), [checkboxPropsMap, flattedData]);
|
|
72
|
+
const checkedCurrentAll = recordKeys.every((key) => keySet.has(key));
|
|
73
|
+
const checkedCurrentSome = recordKeys.some((key) => keySet.has(key));
|
|
74
|
+
const setSelectedKeys = useCallback((keys, method) => {
|
|
75
|
+
const availableKeys = [];
|
|
76
|
+
const records = [];
|
|
77
|
+
keys.forEach((key) => {
|
|
78
|
+
const record = getRecordByKey(key);
|
|
79
|
+
if (record !== void 0) {
|
|
80
|
+
availableKeys.push(key);
|
|
81
|
+
records.push(record);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
setMergedSelectedKeys(availableKeys);
|
|
85
|
+
onChangeProp == null ? void 0 : onChangeProp(availableKeys, records, {
|
|
86
|
+
type: method
|
|
87
|
+
});
|
|
88
|
+
}, [getRecordByKey, onChangeProp, setMergedSelectedKeys]);
|
|
89
|
+
const triggerSingleSelection = useCallback((key, selected, keys, event) => {
|
|
90
|
+
if (onSelect) {
|
|
91
|
+
const rows = compact(keys.map((k) => getRecordByKey(k)));
|
|
92
|
+
const record = getRecordByKey(key);
|
|
93
|
+
if (record) {
|
|
94
|
+
onSelect(record, selected, rows, event);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
setSelectedKeys(keys, "single");
|
|
98
|
+
}, [onSelect, getRecordByKey, setSelectedKeys]);
|
|
99
|
+
const emitRowSelect = useEvent(useEmitter("row:select"));
|
|
100
|
+
useFirstMountLayoutEffect((firstMount) => {
|
|
101
|
+
if (firstMount) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
emitRowSelect({
|
|
105
|
+
selectedKeySet: derivedSelectedKeySet
|
|
106
|
+
});
|
|
107
|
+
}, [emitRowSelect, derivedSelectedKeySet]);
|
|
108
|
+
return {
|
|
109
|
+
checkedCurrentAll,
|
|
110
|
+
checkedCurrentSome,
|
|
111
|
+
flattedData,
|
|
112
|
+
checkboxPropsMap,
|
|
113
|
+
derivedSelectedKeySet,
|
|
114
|
+
derivedSelectedKeys,
|
|
115
|
+
derivedHalfSelectedKeySet,
|
|
116
|
+
recordKeys,
|
|
117
|
+
keySet,
|
|
118
|
+
triggerSingleSelection,
|
|
119
|
+
setSelectedKeys,
|
|
120
|
+
multipleSelect,
|
|
121
|
+
updatePrevSelectedIndex
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
export {
|
|
125
|
+
useTableRowSelection
|
|
126
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CheckboxProps } from 'components/Checkbox';
|
|
2
|
+
import { RadioProps } from 'components/Radio';
|
|
3
|
+
import { useTableSort } from 'components/Table/features/tableSort';
|
|
4
|
+
import { DefaultRecord, TableProps } from 'components/Table/Table.types';
|
|
5
|
+
export interface UseTableRowSelectionOptions<Record extends DefaultRecord> extends Pick<TableProps<Record>, "rowSelection" | "dataSource"> {
|
|
6
|
+
sortedData: ReturnType<typeof useTableSort<Record>>["sortedData"];
|
|
7
|
+
}
|
|
8
|
+
export type RowSelectionItemProps<P extends CheckboxProps | RadioProps = CheckboxProps> = Partial<Omit<P, "checked" | "defaultChecked">>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UseTransformColumnsOptions } from './useTransformColumns.types';
|
|
2
|
+
import { DefaultRecord } from 'components/Table/Table.types';
|
|
3
|
+
import { ColumnsTransformer } from 'components/Table/interfaces/tableColumns.types';
|
|
4
|
+
export declare const useTransformColumns: <Record extends DefaultRecord>(options: UseTransformColumnsOptions<Record>) => {
|
|
5
|
+
transformColumns: ColumnsTransformer<Record>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useCallback, Fragment } from "react";
|
|
3
|
+
import { addDefinedValueKeys } from "./useTransformColumns.utils.js";
|
|
4
|
+
import { RadioCellContentWrapper } from "../../components/RadioCellContentWrapper/RadioCellContentWrapper.js";
|
|
5
|
+
import { CheckboxCellContentWrapper } from "../../components/CheckboxCellContentWrapper/CheckboxCellContentWrapper.js";
|
|
6
|
+
import { HeaderCheckboxCellContentWrapper } from "../../components/HeaderCheckboxCellContentWrapper/HeaderCheckboxCellContentWrapper.js";
|
|
7
|
+
import { isUndefined } from "lodash-es";
|
|
8
|
+
import { defaultRowSelectionColumnWidth } from "../../../tableSort/utils/const.js";
|
|
9
|
+
import { selectionColumnKey } from "../../utils/const.js";
|
|
10
|
+
const useTransformColumns = (options) => {
|
|
11
|
+
const {
|
|
12
|
+
rowSelection
|
|
13
|
+
} = options;
|
|
14
|
+
const transformColumns = useCallback(
|
|
15
|
+
(columns) => {
|
|
16
|
+
if (!rowSelection) {
|
|
17
|
+
return columns;
|
|
18
|
+
}
|
|
19
|
+
const {
|
|
20
|
+
columnTitle,
|
|
21
|
+
columnWidth = defaultRowSelectionColumnWidth,
|
|
22
|
+
hideSelectAll,
|
|
23
|
+
onCell,
|
|
24
|
+
getTitleCheckboxProps,
|
|
25
|
+
renderCell,
|
|
26
|
+
type = "checkbox"
|
|
27
|
+
} = rowSelection;
|
|
28
|
+
const Title = type === "checkbox" && !hideSelectAll ? HeaderCheckboxCellContentWrapper : Fragment;
|
|
29
|
+
const title = (() => {
|
|
30
|
+
if (isUndefined(columnTitle) || typeof columnTitle === "function") {
|
|
31
|
+
if (Title === Fragment) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
return /* @__PURE__ */ jsx(Title, { columnTitle, getTitleCheckboxProps });
|
|
35
|
+
}
|
|
36
|
+
return columnTitle;
|
|
37
|
+
})();
|
|
38
|
+
const selectionColumn = {
|
|
39
|
+
key: selectionColumnKey,
|
|
40
|
+
title,
|
|
41
|
+
render: (_, record) => type === "checkbox" ? /* @__PURE__ */ jsx(CheckboxCellContentWrapper, { renderCell, record }) : /* @__PURE__ */ jsx(RadioCellContentWrapper, { renderCell, record })
|
|
42
|
+
};
|
|
43
|
+
addDefinedValueKeys(selectionColumn, {
|
|
44
|
+
onCell,
|
|
45
|
+
width: columnWidth
|
|
46
|
+
});
|
|
47
|
+
columns.unshift(selectionColumn);
|
|
48
|
+
return columns;
|
|
49
|
+
},
|
|
50
|
+
// TODO: проверить стабильность ссылки во время внедрения (часто зависит от selectedKeys) PT-16172
|
|
51
|
+
[rowSelection]
|
|
52
|
+
);
|
|
53
|
+
return {
|
|
54
|
+
transformColumns
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
useTransformColumns
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const addDefinedValueKeys: <T, K extends keyof T>(target: T, keys: { [P in K]: T[P]; }) => void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { useTableRowSelectionContext, TableRowSelectionContext, type TableRowSelectionContextValue, } from './contexts';
|
|
2
|
+
export { useTableRowSelection, useTransformColumns, type RowSelectionItemProps, type UseTransformColumnsOptions, } from './hooks';
|
|
3
|
+
export type { TableRowSelection } from './types';
|
|
4
|
+
export { selectionItemContainerStyle, getBorderedSelectionItemContainerStyle } from './styles';
|
|
5
|
+
export { selectionColumnKey } from './utils';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const selectionItemContainerStyle: {
|
|
2
|
+
readonly position: "absolute";
|
|
3
|
+
readonly inset: 0;
|
|
4
|
+
readonly bottom: -1;
|
|
5
|
+
readonly display: "flex";
|
|
6
|
+
readonly alignItems: "center";
|
|
7
|
+
readonly justifyContent: "center";
|
|
8
|
+
};
|
|
9
|
+
export declare const getBorderedSelectionItemContainerStyle: (includeTop?: boolean) => {
|
|
10
|
+
left: number;
|
|
11
|
+
right: number;
|
|
12
|
+
} | {
|
|
13
|
+
top: number;
|
|
14
|
+
left: number;
|
|
15
|
+
right: number;
|
|
16
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const selectionItemContainerStyle = {
|
|
2
|
+
position: "absolute",
|
|
3
|
+
inset: 0,
|
|
4
|
+
bottom: -1,
|
|
5
|
+
display: "flex",
|
|
6
|
+
alignItems: "center",
|
|
7
|
+
justifyContent: "center"
|
|
8
|
+
};
|
|
9
|
+
const getBorderedSelectionItemContainerStyle = (includeTop = false) => {
|
|
10
|
+
const baseStyle = {
|
|
11
|
+
left: -1,
|
|
12
|
+
right: -1
|
|
13
|
+
};
|
|
14
|
+
if (includeTop) {
|
|
15
|
+
return {
|
|
16
|
+
...baseStyle,
|
|
17
|
+
top: -1
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
return baseStyle;
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
getBorderedSelectionItemContainerStyle,
|
|
24
|
+
selectionItemContainerStyle
|
|
25
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CheckboxProps } from 'components/Checkbox';
|
|
2
|
+
import { GetComponentProps } from 'components/Table/interfaces/tableComponents.types';
|
|
3
|
+
import { DefaultRecord, Key } from 'components/Table/Table.types';
|
|
4
|
+
import { AriaAttributes, ComponentType, ReactNode } from 'react';
|
|
5
|
+
type RowSelectionType = "checkbox" | "radio";
|
|
6
|
+
export type RowSelectMethod = "all" | "none" | "invert" | "single" | "multiple";
|
|
7
|
+
type SelectionSelectFn<T = DefaultRecord> = (record: T, selected: boolean, selectedRows: T[], nativeEvent: Event) => void;
|
|
8
|
+
export interface TableRowSelection<T = DefaultRecord> {
|
|
9
|
+
type?: RowSelectionType;
|
|
10
|
+
defaultSelectedRowKeys?: Key[];
|
|
11
|
+
selectedRowKeys?: Key[];
|
|
12
|
+
onChange?: (selectedRowKeys: Key[], selectedRows: T[], info: {
|
|
13
|
+
type: RowSelectMethod;
|
|
14
|
+
}) => void;
|
|
15
|
+
getTitleCheckboxProps?: () => Partial<Omit<CheckboxProps, "checked" | "defaultChecked">> & AriaAttributes;
|
|
16
|
+
getCheckboxProps?: (record: T) => Partial<Omit<CheckboxProps, "checked" | "defaultChecked">>;
|
|
17
|
+
onSelect?: SelectionSelectFn<T>;
|
|
18
|
+
hideSelectAll?: boolean;
|
|
19
|
+
columnWidth?: string | number;
|
|
20
|
+
columnTitle?: ReactNode | ComponentType;
|
|
21
|
+
renderCell?: ComponentType;
|
|
22
|
+
onCell?: GetComponentProps<T>;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const selectionColumnKey = "__SELECTION_COLUMN";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { selectionColumnKey } from './const';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { HeaderCellWithSortProps } from './HeaderCellWithSort.types';
|
|
2
|
+
import { DefaultRecord } from 'components/Table/Table.types';
|
|
3
|
+
export declare const HeaderCellWithSort: <Record extends DefaultRecord>(props: HeaderCellWithSortProps<Record>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
package/dist/components/Table/features/tableSort/components/HeaderCellWithSort/HeaderCellWithSort.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useCellFixedInfo } from "../../../../hooks/useCellFixedInfo/useCellFixedInfo.js";
|
|
3
|
+
import { getFixedCellStyle } from "../../../../hooks/useCellFixedInfo/useCellFixedInfo.styles.js";
|
|
4
|
+
import { headerCellWithSortStyle } from "./HeaderCellWithSort.styles.js";
|
|
5
|
+
import { Cell } from "../../../../components/Cell/Cell.js";
|
|
6
|
+
import { getHeaderCellScope } from "../../../../components/Header/components/HeaderCell/HeaderCell.utils.js";
|
|
7
|
+
import { headerCellStyle, borderedHeaderCellStyle } from "../../../../components/Header/components/HeaderCell/HeaderCell.styles.js";
|
|
8
|
+
import { useTableContext } from "../../../../contexts/tableContext/useTableContext/useTableContext.js";
|
|
9
|
+
import { useHeaderCellSort } from "../../hooks/useHeaderCellSort/useHeaderCellSort.js";
|
|
10
|
+
const HeaderCellWithSortComponent = (props) => {
|
|
11
|
+
var _a;
|
|
12
|
+
const {
|
|
13
|
+
cell
|
|
14
|
+
} = props;
|
|
15
|
+
const {
|
|
16
|
+
children,
|
|
17
|
+
colSpan: cellColSpan,
|
|
18
|
+
rowSpan: cellRowSpan,
|
|
19
|
+
colStart,
|
|
20
|
+
colEnd,
|
|
21
|
+
column
|
|
22
|
+
} = cell;
|
|
23
|
+
const {
|
|
24
|
+
getComponent,
|
|
25
|
+
bordered,
|
|
26
|
+
tableTokens
|
|
27
|
+
} = useTableContext();
|
|
28
|
+
const HeaderCellComponent = getComponent(["header", "cell"], "th");
|
|
29
|
+
const {
|
|
30
|
+
colSpan,
|
|
31
|
+
rowSpan,
|
|
32
|
+
onClick: headerCellOnClick,
|
|
33
|
+
onKeyDown: headerCellOnKeyDown,
|
|
34
|
+
css: headerCellCss,
|
|
35
|
+
...restAdditionalHeaderCellProps
|
|
36
|
+
} = ((_a = column.onHeaderCell) == null ? void 0 : _a.call(column, column)) || {};
|
|
37
|
+
const {
|
|
38
|
+
onClick,
|
|
39
|
+
onKeyDown
|
|
40
|
+
} = useHeaderCellSort({
|
|
41
|
+
column,
|
|
42
|
+
onClick: headerCellOnClick,
|
|
43
|
+
onKeyDown: headerCellOnKeyDown
|
|
44
|
+
});
|
|
45
|
+
const {
|
|
46
|
+
isFixStart,
|
|
47
|
+
isFixEnd,
|
|
48
|
+
fixStart,
|
|
49
|
+
fixEnd,
|
|
50
|
+
zIndexReverse,
|
|
51
|
+
fixedStartShadow,
|
|
52
|
+
fixedEndShadow,
|
|
53
|
+
showFixStartShadow,
|
|
54
|
+
showFixEndShadow
|
|
55
|
+
} = useCellFixedInfo({
|
|
56
|
+
colStart,
|
|
57
|
+
colEnd
|
|
58
|
+
});
|
|
59
|
+
return /* @__PURE__ */ jsx(Cell, { component: HeaderCellComponent, align: column.align, ellipsis: column.ellipsis, bordered, tableTokens, css: [headerCellStyle(tableTokens), headerCellWithSortStyle(tableTokens), bordered ? borderedHeaderCellStyle(tableTokens, bordered) : void 0, ...getFixedCellStyle({
|
|
60
|
+
columnKey: column.key,
|
|
61
|
+
isFixStart,
|
|
62
|
+
isFixEnd,
|
|
63
|
+
fixStart,
|
|
64
|
+
fixEnd,
|
|
65
|
+
zIndexReverse,
|
|
66
|
+
fixedStartShadow,
|
|
67
|
+
fixedEndShadow,
|
|
68
|
+
showFixStartShadow,
|
|
69
|
+
showFixEndShadow
|
|
70
|
+
}), headerCellCss, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9idWlsZHMvZnJvbnRlbmQvbGlicy91aS1raXQvc3JjL2NvbXBvbmVudHMvVGFibGUvZmVhdHVyZXMvdGFibGVTb3J0L2NvbXBvbmVudHMvSGVhZGVyQ2VsbFdpdGhTb3J0L0hlYWRlckNlbGxXaXRoU29ydC50c3giXSwibmFtZXMiOlt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0eWxlKHtcbiAgICAgICAgICBjb2x1bW5LZXk6IGNvbHVtbi5rZXksXG4gICAgICAgICAgaXNGaXhTdGFydCxcbiAgICAgICAgICBpc0ZpeEVuZCxcbiAgICAgICAgICBmaXhTdGFydCxcbiAgICAgICAgICBmaXhFbmQsXG4gICAgICAgICAgekluZGV4UmV2ZXJzZSxcbiAgICAgICAgICBmaXhlZFN0YXJ0U2hhZG93LFxuICAgICAgICAgIGZpeGVkRW5kU2hhZG93LFxuICAgICAgICAgIHNob3dGaXhTdGFydFNoYWRvdyxcbiAgICAgICAgICBzaG93Rml4RW5kU2hhZG93LFxuICAgICAgICB9KSxcbiAgICAgICAgaGVhZGVyQ2VsbENzcyxcbiAgICAgIF19XG4gICAgICB0YWJJbmRleD17MH1cbiAgICAgIG9uQ2xpY2s9e29uQ2xpY2t9XG4gICAgICBvbktleURvd249e29uS2V5RG93bn1cbiAgICAgIHsuLi5yZXN0QWRkaXRpb25hbEhlYWRlckNlbGxQcm9wc31cbiAgICAgIGNvbFNwYW49e2NvbFNwYW4gPz8gY2VsbENvbFNwYW59XG4gICAgICByb3dTcGFuPXtyb3dTcGFuID8/IGNlbGxSb3dTcGFufVxuICAgICAgc2NvcGU9e2dldEhlYWRlckNlbGxTY29wZShjb2x1bW4udGl0bGUsIGNlbGxDb2xTcGFuKX1cbiAgICA+XG4gICAgICB7Y2hpbGRyZW59XG4gICAgPC9DZWxsPlxuICApO1xufTtcblxuZXhwb3J0IGNvbnN0IEhlYWRlckNlbGxXaXRoU29ydCA9IEhlYWRlckNlbGxXaXRoU29ydENvbXBvbmVudDtcbiJdfQ== */"], tabIndex: 0, onClick, onKeyDown, ...restAdditionalHeaderCellProps, colSpan: colSpan ?? cellColSpan, rowSpan: rowSpan ?? cellRowSpan, scope: getHeaderCellScope(column.title, cellColSpan), children });
|
|
71
|
+
};
|
|
72
|
+
const HeaderCellWithSort = HeaderCellWithSortComponent;
|
|
73
|
+
export {
|
|
74
|
+
HeaderCellWithSort
|
|
75
|
+
};
|