@consta/uikit 5.21.0 → 5.22.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/__internal__/src/components/AutoComplete/types.d.ts +1 -1
- package/__internal__/src/components/AutoComplete/types.js.map +1 -1
- package/__internal__/src/components/AutoCompleteCanary/types.d.ts +3 -3
- package/__internal__/src/components/AutoCompleteCanary/types.js.map +1 -1
- package/__internal__/src/components/AvatarGroup/helpers.d.ts +66 -56
- package/__internal__/src/components/AvatarGroup/types.d.ts +1 -1
- package/__internal__/src/components/AvatarGroup/types.js.map +1 -1
- package/__internal__/src/components/BadgeGroup/types.d.ts +1 -1
- package/__internal__/src/components/BadgeGroup/types.js.map +1 -1
- package/__internal__/src/components/BookmarkTabs/BookmarkTabs.js.map +1 -1
- package/__internal__/src/components/BookmarkTabs/BookmarkTabsTab/BookmarkTabsTab.css +1 -1
- package/__internal__/src/components/BookmarkTabs/helper.d.ts +66 -56
- package/__internal__/src/components/BookmarkTabs/types.d.ts +3 -3
- package/__internal__/src/components/BookmarkTabs/types.js.map +1 -1
- package/__internal__/src/components/Breadcrumbs/BreadcrumbsMore/BreadcrumbsMore.d.ts +1 -1
- package/__internal__/src/components/Breadcrumbs/helpers.d.ts +66 -56
- package/__internal__/src/components/Breadcrumbs/types.d.ts +7 -7
- package/__internal__/src/components/Breadcrumbs/types.js.map +1 -1
- package/__internal__/src/components/Card/Card.d.ts +3 -2
- package/__internal__/src/components/Card/Card.js.map +1 -1
- package/__internal__/src/components/CheckboxGroup/helper.d.ts +66 -56
- package/__internal__/src/components/CheckboxGroup/types.d.ts +1 -1
- package/__internal__/src/components/CheckboxGroup/types.js.map +1 -1
- package/__internal__/src/components/Chips/ChipsChoice/types.d.ts +1 -1
- package/__internal__/src/components/Chips/ChipsChoice/types.js.map +1 -1
- package/__internal__/src/components/Chips/types.d.ts +1 -1
- package/__internal__/src/components/Chips/types.js.map +1 -1
- package/__internal__/src/components/ChoiceGroup/helper.d.ts +66 -56
- package/__internal__/src/components/ChoiceGroup/types.d.ts +1 -1
- package/__internal__/src/components/ChoiceGroup/types.js.map +1 -1
- package/__internal__/src/components/Collapse/types.d.ts +1 -1
- package/__internal__/src/components/Collapse/types.js.map +1 -1
- package/__internal__/src/components/CollapseGroup/helpers.d.ts +2 -2
- package/__internal__/src/components/CollapseGroup/helpers.js.map +1 -1
- package/__internal__/src/components/Combobox/helpers.d.ts +4 -4
- package/__internal__/src/components/Combobox/helpers.js.map +1 -1
- package/__internal__/src/components/ComboboxDeprecated/helpers.d.ts +4 -4
- package/__internal__/src/components/ComboboxDeprecated/helpers.js.map +1 -1
- package/__internal__/src/components/ContextMenu/ContextMenuLevelWrapper/ContextMenuLevelWrapper.d.ts +1 -1
- package/__internal__/src/components/ContextMenu/ContextMenuWrapper/ContextMenuWrapper.d.ts +1 -1
- package/__internal__/src/components/ContextMenu/types.d.ts +4 -4
- package/__internal__/src/components/ContextMenu/types.js.map +1 -1
- package/__internal__/src/components/DatePicker/DatePickerDropdown/DatePickerDropdown.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerDropdown/DatePickerDropdown.js.map +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeDate/DatePickerFieldTypeDate.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateRange/DatePickerFieldTypeDateRange.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTime/DatePickerFieldTypeDateTime.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTimeRange/DatePickerFieldTypeDateTimeRange.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeMonth/DatePickerFieldTypeMonth.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeMonthRange/DatePickerFieldTypeMonthRange.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeTime/DatePickerFieldTypeTime.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeYear/DatePickerFieldTypeYear.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeYearRange/DatePickerFieldTypeYearRange.d.ts +1 -1
- package/__internal__/src/components/DatePicker/types.d.ts +2 -2
- package/__internal__/src/components/DatePicker/types.js.map +1 -1
- package/__internal__/src/components/DateTime/DateTimeCell/DateTimeCell.d.ts +1 -1
- package/__internal__/src/components/DateTime/DateTimeItem/DateTimeItem.d.ts +1 -1
- package/__internal__/src/components/DateTime/helpers/types.d.ts +2 -2
- package/__internal__/src/components/DateTime/helpers/types.js.map +1 -1
- package/__internal__/src/components/EventInterceptor/EventInterceptor.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldArrayValueInlineControl/types.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldArrayValueInlineControl/types.js.map +1 -1
- package/__internal__/src/components/FieldComponents/FieldButton/FieldButton.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldClearButton/FieldClearButton.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldControlLayout/FieldControlLayout.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldControlLayout/helpers.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldControlLayout/helpers.js.map +1 -1
- package/__internal__/src/components/FieldComponents/FieldControlLayout/types.d.ts +2 -2
- package/__internal__/src/components/FieldComponents/FieldControlLayout/types.js.map +1 -1
- package/__internal__/src/components/FieldComponents/FieldCounter/FieldCounter.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldInput/FieldInput.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldToggleVisiblePasswordButton/FieldToggleVisiblePasswordButton.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/renderSide.d.ts +1 -1
- package/__internal__/src/components/Grid/helpers.d.ts +1 -1
- package/__internal__/src/components/ListCanary/ListAddItem/ListAddItem.d.ts +1 -1
- package/__internal__/src/components/ListCanary/ListBox/ListBox.d.ts +1 -1
- package/__internal__/src/components/ListCanary/ListDivider/ListDivider.d.ts +1 -1
- package/__internal__/src/components/ListCanary/ListGroupLabel/ListGroupLabel.d.ts +1 -1
- package/__internal__/src/components/ListCanary/ListLoader/ListLoader.d.ts +1 -1
- package/__internal__/src/components/ListCanary/types.d.ts +3 -3
- package/__internal__/src/components/ListCanary/types.js.map +1 -1
- package/__internal__/src/components/Modal/Modal.js.map +1 -1
- package/__internal__/src/components/Pagination/PaginationArrow/PaginationArrow.d.ts +1 -1
- package/__internal__/src/components/Pagination/types.d.ts +3 -3
- package/__internal__/src/components/Pagination/types.js.map +1 -1
- package/__internal__/src/components/PaginationDeprecated/PaginationDeprecated.d.ts +1 -1
- package/__internal__/src/components/PaginationDeprecated/PaginationDeprecated.js.map +1 -1
- package/__internal__/src/components/Picture/Picture.d.ts +1 -1
- package/__internal__/src/components/Popover/Popover.d.ts +1 -1
- package/__internal__/src/components/Popover/Popover.js.map +1 -1
- package/__internal__/src/components/ProgressLine/helpers.d.ts +66 -56
- package/__internal__/src/components/ProgressLine/types.d.ts +1 -1
- package/__internal__/src/components/ProgressLine/types.js.map +1 -1
- package/__internal__/src/components/ProgressStepBar/ProgressStepBarLine/ProgressStepBarLine.d.ts +1 -1
- package/__internal__/src/components/ProgressStepBar/helpers.d.ts +3 -3
- package/__internal__/src/components/ProgressStepBar/helpers.js.map +1 -1
- package/__internal__/src/components/RadioGroup/helper.d.ts +66 -56
- package/__internal__/src/components/RadioGroup/types.d.ts +1 -1
- package/__internal__/src/components/RadioGroup/types.js.map +1 -1
- package/__internal__/src/components/Select/helpers.d.ts +4 -4
- package/__internal__/src/components/Select/helpers.js.map +1 -1
- package/__internal__/src/components/SelectCanary/SelectControlLayout/SelectControlLayout.d.ts +1 -1
- package/__internal__/src/components/SelectCanary/SelectCreateButton/SelectCreateButton.d.ts +1 -1
- package/__internal__/src/components/SelectCanary/SelectCreateButton/SelectCreateButton.js.map +1 -1
- package/__internal__/src/components/SelectCanary/SelectDropdown/SelectDropdown.d.ts +1 -1
- package/__internal__/src/components/SelectCanary/SelectDropdown/SelectDropdown.js.map +1 -1
- package/__internal__/src/components/SelectCanary/SelectInput/SelectInput.d.ts +1 -1
- package/__internal__/src/components/SelectCanary/SelectLoader/SelectLoader.d.ts +1 -1
- package/__internal__/src/components/SelectCanary/SelectMultipleValue/SelectMultipleValue.d.ts +2 -2
- package/__internal__/src/components/SelectCanary/SelectMultipleValue/SelectMultipleValue.js.map +1 -1
- package/__internal__/src/components/SelectCanary/SelectRenderItem/SelectRenderItem.d.ts +1 -1
- package/__internal__/src/components/SelectCanary/SelectRenderItem/SelectRenderItem.js.map +1 -1
- package/__internal__/src/components/SelectCanary/helpers.d.ts +1 -1
- package/__internal__/src/components/SelectCanary/types.d.ts +1 -1
- package/__internal__/src/components/SelectCanary/types.js.map +1 -1
- package/__internal__/src/components/SelectComponents/SelectContainer/SelectContainer.d.ts +1 -1
- package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.d.ts +2 -2
- package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.js.map +1 -1
- package/__internal__/src/components/SelectComponents/SelectLoader/SelectLoader.d.ts +1 -1
- package/__internal__/src/components/SelectComponentsDeprecated/SelectContainer/SelectContainer.d.ts +1 -1
- package/__internal__/src/components/SelectComponentsDeprecated/SelectDropdown/SelectDropdown.d.ts +2 -2
- package/__internal__/src/components/SelectComponentsDeprecated/SelectDropdown/SelectDropdown.js.map +1 -1
- package/__internal__/src/components/SelectComponentsDeprecated/SelectItemAll/SelectSelectAll.d.ts +1 -1
- package/__internal__/src/components/SelectComponentsDeprecated/SelectLoader/SelectLoader.d.ts +1 -1
- package/__internal__/src/components/SelectDeprecated/helpers.d.ts +4 -4
- package/__internal__/src/components/SelectDeprecated/helpers.js.map +1 -1
- package/__internal__/src/components/Sidebar/Sidebar.js.map +1 -1
- package/__internal__/src/components/Skeleton/SkeletonBrick/SkeletonBrick.d.ts +1 -1
- package/__internal__/src/components/Skeleton/SkeletonCircle/SkeletonCircle.d.ts +1 -1
- package/__internal__/src/components/Slider/SliderInput/SliderInput.d.ts +1 -1
- package/__internal__/src/components/Slider/SliderLine/SliderLine.d.ts +1 -1
- package/__internal__/src/components/Slider/SliderPoint/SliderPoint.d.ts +1 -1
- package/__internal__/src/components/Slider/helper.d.ts +1 -1
- package/__internal__/src/components/Slider/helper.js.map +1 -1
- package/__internal__/src/components/SnackBar/SnackBarItem/SnackBarItem.d.ts +1 -1
- package/__internal__/src/components/SnackBar/helper.d.ts +67 -57
- package/__internal__/src/components/SnackBar/types.d.ts +2 -2
- package/__internal__/src/components/SnackBar/types.js.map +1 -1
- package/__internal__/src/components/Steps/helper.d.ts +66 -56
- package/__internal__/src/components/Steps/types.d.ts +1 -1
- package/__internal__/src/components/Steps/types.js.map +1 -1
- package/__internal__/src/components/StepsCanary/helper.d.ts +66 -56
- package/__internal__/src/components/StepsCanary/types.d.ts +1 -1
- package/__internal__/src/components/StepsCanary/types.js.map +1 -1
- package/__internal__/src/components/Switch/Switch.d.ts +2 -1
- package/__internal__/src/components/Switch/Switch.js +1 -1
- package/__internal__/src/components/Switch/Switch.js.map +1 -1
- package/__internal__/src/components/Switch/types.d.ts +1 -0
- package/__internal__/src/components/Switch/types.js.map +1 -1
- package/__internal__/src/components/SwitchGroup/helpers.d.ts +66 -56
- package/__internal__/src/components/SwitchGroup/types.d.ts +1 -1
- package/__internal__/src/components/SwitchGroup/types.js.map +1 -1
- package/__internal__/src/components/Table/Cell/TableCell.d.ts +1 -1
- package/__internal__/src/components/Table/Cell/TableCell.js.map +1 -1
- package/__internal__/src/components/Table/Header/TableHeader.d.ts +1 -1
- package/__internal__/src/components/Table/Header/TableHeader.js.map +1 -1
- package/__internal__/src/components/Table/Resizer/TableResizer.d.ts +1 -1
- package/__internal__/src/components/Table/Resizer/TableResizer.js.map +1 -1
- package/__internal__/src/components/Table/Table.d.ts +1 -1
- package/__internal__/src/components/Table/Table.js.map +1 -1
- package/__internal__/src/components/Table/__mock__/data.mock.d.ts +1 -1
- package/__internal__/src/components/Tabs/Tabs.js.map +1 -1
- package/__internal__/src/components/Tabs/TabsFitModeDropdownWrapper/TabsFitModeDropdownWrapper.d.ts +1 -1
- package/__internal__/src/components/Tabs/TabsFitModeDropdownWrapper/TabsFitModeDropdownWrapper.js.map +1 -1
- package/__internal__/src/components/Tabs/TabsFitModeScrollWrapper/TabsFitModeScrollWrapper.d.ts +1 -1
- package/__internal__/src/components/Tabs/TabsFitModeScrollWrapper/TabsFitModeScrollWrapper.js.map +1 -1
- package/__internal__/src/components/Tabs/TabsListWrapper/TabsListWrapper.d.ts +1 -1
- package/__internal__/src/components/Tabs/helpers.d.ts +199 -169
- package/__internal__/src/components/Tabs/types.d.ts +4 -4
- package/__internal__/src/components/Tabs/types.js.map +1 -1
- package/__internal__/src/components/Tag/Tag.d.ts +1 -1
- package/__internal__/src/components/Tag/Tag.js.map +1 -1
- package/__internal__/src/components/TagBase/TagBase.d.ts +1 -1
- package/__internal__/src/components/TextField/TextField.d.ts +1 -1
- package/__internal__/src/components/TextField/types.d.ts +1 -1
- package/__internal__/src/components/TextField/types.js.map +1 -1
- package/__internal__/src/components/TextFieldCanary/TextFieldTypeTextArray/TextFieldTypeTextArray.js +1 -1
- package/__internal__/src/components/TextFieldCanary/TextFieldTypeTextArray/TextFieldTypeTextArray.js.map +1 -1
- package/__internal__/src/components/TextFieldCanary/types.d.ts +2 -2
- package/__internal__/src/components/TextFieldCanary/types.js.map +1 -1
- package/__internal__/src/components/ThemeToggler/helpers.d.ts +66 -56
- package/__internal__/src/components/ThemeToggler/types.d.ts +1 -1
- package/__internal__/src/components/ThemeToggler/types.js.map +1 -1
- package/__internal__/src/components/Timer/Timer.d.ts +1 -1
- package/__internal__/src/components/Tooltip/Tooltip.d.ts +1 -1
- package/__internal__/src/components/TooltipDeprecated/TooltipDeprecated.d.ts +1 -1
- package/__internal__/src/components/UserSelect/helpers.d.ts +4 -4
- package/__internal__/src/components/UserSelect/helpers.js.map +1 -1
- package/__internal__/src/components/UserSelectDeprecated/helpers.d.ts +4 -4
- package/__internal__/src/components/UserSelectDeprecated/helpers.js.map +1 -1
- package/__internal__/src/fileIcons/FileIconAvi/FileIconAvi_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconAvi/FileIconAvi_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconBmp/FileIconBmp_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconBmp/FileIconBmp_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconCsv/FileIconCsv_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconCsv/FileIconCsv_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconDoc/FileIconDoc_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconDoc/FileIconDoc_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconExe/FileIconExe_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconExe/FileIconExe_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconGif/FileIconGif_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconGif/FileIconGif_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconJpg/FileIconJpg_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconJpg/FileIconJpg_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconJson/FileIconJson_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconJson/FileIconJson_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconLoading/FileIconLoading_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconLoading/FileIconLoading_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconMov/FileIconMov_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconMov/FileIconMov_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconMp3/FileIconMp3_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconMp3/FileIconMp3_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconMp4/FileIconMp4_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconMp4/FileIconMp4_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconMsg/FileIconMsg_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconMsg/FileIconMsg_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconPdf/FileIconPdf_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconPdf/FileIconPdf_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconPng/FileIconPng_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconPng/FileIconPng_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconPpt/FileIconPpt_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconPpt/FileIconPpt_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconRar/FileIconRar_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconRar/FileIconRar_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconRtf/FileIconRtf_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconRtf/FileIconRtf_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconSvg/FileIconSvg_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconSvg/FileIconSvg_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconTiff/FileIconTiff_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconTiff/FileIconTiff_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconTxt/FileIconTxt_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconTxt/FileIconTxt_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconUndefined/FileIconUndefined_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconUndefined/FileIconUndefined_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconVsd/FileIconVsd_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconVsd/FileIconVsd_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconWav/FileIconWav_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconWav/FileIconWav_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconXls/FileIconXls_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconXls/FileIconXls_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconZip/FileIconZip_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconZip/FileIconZip_size_s.d.ts +1 -1
- package/__internal__/src/hocs/withTooltip/withTooltip.d.ts +1 -1
- package/__internal__/src/hocs/withTooltip/withTooltip.js.map +1 -1
- package/__internal__/src/hooks/useForkRef/useForkRef.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImage403/ResponsesImage403Svg.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImage404/ResponsesImage404Svg.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImage500/ResponsesImage500Svg.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImage503/ResponsesImage503Svg.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImageConnectionError/ResponsesImageConnectionErrorSvg.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImageDeleted/ResponsesImageDeletedSvg.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImageEmptyBox/ResponsesImageEmptyBoxSvg.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImageEmptyPockets/ResponsesImageEmptyPocketsSvg.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImageExit/ResponsesImageExitSvg.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImageNothingFound/ResponsesImageNothingFoundSvg.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImageSuccess/ResponsesImageSuccessSvg.d.ts +1 -1
- package/__internal__/src/uiKit/components/Image/Image.d.ts +1 -1
- package/__internal__/src/utils/state/withCtx/withCtx.js.map +1 -1
- package/__internal__/src/utils/types/PropsWithAsAttributes.d.ts +2 -2
- package/__internal__/src/utils/types/PropsWithAsAttributes.js.map +1 -1
- package/package.json +1 -1
|
@@ -16,14 +16,17 @@ export declare const withDefaultGetters: (props: SwitchGroupProps) => {
|
|
|
16
16
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
17
17
|
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
18
18
|
accessKey?: string | undefined | undefined;
|
|
19
|
-
|
|
19
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
20
|
+
autoFocus?: boolean | undefined | undefined;
|
|
21
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
20
22
|
contextMenu?: string | undefined | undefined;
|
|
21
23
|
dir?: string | undefined | undefined;
|
|
22
24
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
25
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
23
26
|
hidden?: boolean | undefined | undefined;
|
|
24
27
|
id?: string | undefined | undefined;
|
|
25
28
|
lang?: string | undefined | undefined;
|
|
26
|
-
|
|
29
|
+
nonce?: string | undefined | undefined;
|
|
27
30
|
slot?: string | undefined | undefined;
|
|
28
31
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
29
32
|
style?: import("react").CSSProperties | undefined;
|
|
@@ -33,14 +36,16 @@ export declare const withDefaultGetters: (props: SwitchGroupProps) => {
|
|
|
33
36
|
radioGroup?: string | undefined | undefined;
|
|
34
37
|
role?: import("react").AriaRole | undefined;
|
|
35
38
|
about?: string | undefined | undefined;
|
|
39
|
+
content?: string | undefined | undefined;
|
|
36
40
|
datatype?: string | undefined | undefined;
|
|
37
41
|
inlist?: any;
|
|
38
42
|
prefix?: string | undefined | undefined;
|
|
39
43
|
property?: string | undefined | undefined;
|
|
44
|
+
rel?: string | undefined | undefined;
|
|
40
45
|
resource?: string | undefined | undefined;
|
|
46
|
+
rev?: string | undefined | undefined;
|
|
41
47
|
typeof?: string | undefined | undefined;
|
|
42
48
|
vocab?: string | undefined | undefined;
|
|
43
|
-
autoCapitalize?: string | undefined | undefined;
|
|
44
49
|
autoCorrect?: string | undefined | undefined;
|
|
45
50
|
autoSave?: string | undefined | undefined;
|
|
46
51
|
color?: string | undefined | undefined;
|
|
@@ -54,57 +59,64 @@ export declare const withDefaultGetters: (props: SwitchGroupProps) => {
|
|
|
54
59
|
unselectable?: "on" | "off" | undefined | undefined;
|
|
55
60
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
56
61
|
is?: string | undefined | undefined;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
62
|
+
exportparts?: string | undefined | undefined;
|
|
63
|
+
part?: string | undefined | undefined;
|
|
64
|
+
"aria-activedescendant"?: string | undefined | undefined;
|
|
65
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
66
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
67
|
+
"aria-braillelabel"?: string | undefined | undefined;
|
|
68
|
+
"aria-brailleroledescription"?: string | undefined | undefined;
|
|
69
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
70
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
71
|
+
"aria-colcount"?: number | undefined | undefined;
|
|
72
|
+
"aria-colindex"?: number | undefined | undefined;
|
|
73
|
+
"aria-colindextext"?: string | undefined | undefined;
|
|
74
|
+
"aria-colspan"?: number | undefined | undefined;
|
|
75
|
+
"aria-controls"?: string | undefined | undefined;
|
|
76
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
|
|
77
|
+
"aria-describedby"?: string | undefined | undefined;
|
|
78
|
+
"aria-description"?: string | undefined | undefined;
|
|
79
|
+
"aria-details"?: string | undefined | undefined;
|
|
80
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
81
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
|
|
82
|
+
"aria-errormessage"?: string | undefined | undefined;
|
|
83
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
84
|
+
"aria-flowto"?: string | undefined | undefined;
|
|
85
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
86
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
|
|
87
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
88
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
|
|
89
|
+
"aria-keyshortcuts"?: string | undefined | undefined;
|
|
90
|
+
"aria-label"?: string | undefined | undefined;
|
|
91
|
+
"aria-labelledby"?: string | undefined | undefined;
|
|
92
|
+
"aria-level"?: number | undefined | undefined;
|
|
93
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
|
|
94
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
95
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
96
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
97
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
|
|
98
|
+
"aria-owns"?: string | undefined | undefined;
|
|
99
|
+
"aria-placeholder"?: string | undefined | undefined;
|
|
100
|
+
"aria-posinset"?: number | undefined | undefined;
|
|
101
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
102
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
103
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
|
|
104
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
105
|
+
"aria-roledescription"?: string | undefined | undefined;
|
|
106
|
+
"aria-rowcount"?: number | undefined | undefined;
|
|
107
|
+
"aria-rowindex"?: number | undefined | undefined;
|
|
108
|
+
"aria-rowindextext"?: string | undefined | undefined;
|
|
109
|
+
"aria-rowspan"?: number | undefined | undefined;
|
|
110
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
111
|
+
"aria-setsize"?: number | undefined | undefined;
|
|
112
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
|
|
113
|
+
"aria-valuemax"?: number | undefined | undefined;
|
|
114
|
+
"aria-valuemin"?: number | undefined | undefined;
|
|
115
|
+
"aria-valuenow"?: number | undefined | undefined;
|
|
116
|
+
"aria-valuetext"?: string | undefined | undefined;
|
|
105
117
|
children?: import("react").ReactNode;
|
|
106
118
|
dangerouslySetInnerHTML?: {
|
|
107
|
-
__html: string;
|
|
119
|
+
__html: string | TrustedHTML;
|
|
108
120
|
} | undefined | undefined;
|
|
109
121
|
onCopy?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
110
122
|
onCopyCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
@@ -123,7 +135,7 @@ export declare const withDefaultGetters: (props: SwitchGroupProps) => {
|
|
|
123
135
|
onBlur?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
124
136
|
onBlurCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
125
137
|
onChangeCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
126
|
-
onBeforeInput?: import("react").
|
|
138
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLDivElement> | undefined;
|
|
127
139
|
onBeforeInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
128
140
|
onInput?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
129
141
|
onInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
@@ -242,9 +254,7 @@ export declare const withDefaultGetters: (props: SwitchGroupProps) => {
|
|
|
242
254
|
onPointerCancel?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
243
255
|
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
244
256
|
onPointerEnter?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
245
|
-
onPointerEnterCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
246
257
|
onPointerLeave?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
247
|
-
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
248
258
|
onPointerOver?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
249
259
|
onPointerOverCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
250
260
|
onPointerOut?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
@@ -265,6 +275,6 @@ export declare const withDefaultGetters: (props: SwitchGroupProps) => {
|
|
|
265
275
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
266
276
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
267
277
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
268
|
-
ref?: import("react").
|
|
278
|
+
ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
|
|
269
279
|
key?: import("react").Key | null | undefined;
|
|
270
280
|
};
|
|
@@ -29,4 +29,4 @@ export type SwitchGroupProps<ITEM = SwitchGroupDefaultItem> = PropsWithHTMLAttri
|
|
|
29
29
|
} ? {} : {
|
|
30
30
|
getItemLabel: SwitchGroupPropGetItemLabel<ITEM>;
|
|
31
31
|
});
|
|
32
|
-
export type SwitchGroupComponent = <ITEM>(props: SwitchGroupProps<ITEM>) => React.
|
|
32
|
+
export type SwitchGroupComponent = <ITEM>(props: SwitchGroupProps<ITEM>) => React.ReactNode | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["switchGroupDirections","switchGroupDefaultDirection"],"sources":["../../../../../src/components/SwitchGroup/types.ts"],"sourcesContent":["import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\nimport { SwitchPropSize, SwitchPropView } from '../Switch/types';\n\nexport type SwitchGroupDefaultItem = {\n label: string;\n disabled?: boolean;\n};\n\nexport const switchGroupDirections = ['column', 'row'] as const;\nexport type SwitchGroupDirection = typeof switchGroupDirections[number];\nexport const switchGroupDefaultDirection: SwitchGroupDirection =\n switchGroupDirections[0];\n\nexport type SwitchGroupPropGetItemLabel<ITEM> = (item: ITEM) => string;\nexport type SwitchGroupPropGetItemDisabled<ITEM> = (\n item: ITEM,\n) => boolean | undefined;\n\nexport type SwitchGroupPropOnChange<ITEM> = (\n value: ITEM[] | null,\n props: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nexport type SwitchGroupProps<ITEM = SwitchGroupDefaultItem> =\n PropsWithHTMLAttributesAndRef<\n {\n value?: ITEM[] | null;\n items: ITEM[];\n getItemLabel?: SwitchGroupPropGetItemLabel<ITEM>;\n getItemDisabled?: SwitchGroupPropGetItemDisabled<ITEM>;\n onChange?: SwitchGroupPropOnChange<ITEM>;\n name: string;\n direction?: SwitchGroupDirection;\n size?: SwitchPropSize;\n view?: SwitchPropView;\n disabled?: boolean;\n className?: string;\n },\n HTMLDivElement\n > &\n (ITEM extends { label: SwitchGroupDefaultItem['label'] }\n ? {}\n : {\n getItemLabel: SwitchGroupPropGetItemLabel<ITEM>;\n });\n\nexport type SwitchGroupComponent = <ITEM>(\n props: SwitchGroupProps<ITEM>,\n) => React.
|
|
1
|
+
{"version":3,"file":"types.js","names":["switchGroupDirections","switchGroupDefaultDirection"],"sources":["../../../../../src/components/SwitchGroup/types.ts"],"sourcesContent":["import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\nimport { SwitchPropSize, SwitchPropView } from '../Switch/types';\n\nexport type SwitchGroupDefaultItem = {\n label: string;\n disabled?: boolean;\n};\n\nexport const switchGroupDirections = ['column', 'row'] as const;\nexport type SwitchGroupDirection = typeof switchGroupDirections[number];\nexport const switchGroupDefaultDirection: SwitchGroupDirection =\n switchGroupDirections[0];\n\nexport type SwitchGroupPropGetItemLabel<ITEM> = (item: ITEM) => string;\nexport type SwitchGroupPropGetItemDisabled<ITEM> = (\n item: ITEM,\n) => boolean | undefined;\n\nexport type SwitchGroupPropOnChange<ITEM> = (\n value: ITEM[] | null,\n props: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nexport type SwitchGroupProps<ITEM = SwitchGroupDefaultItem> =\n PropsWithHTMLAttributesAndRef<\n {\n value?: ITEM[] | null;\n items: ITEM[];\n getItemLabel?: SwitchGroupPropGetItemLabel<ITEM>;\n getItemDisabled?: SwitchGroupPropGetItemDisabled<ITEM>;\n onChange?: SwitchGroupPropOnChange<ITEM>;\n name: string;\n direction?: SwitchGroupDirection;\n size?: SwitchPropSize;\n view?: SwitchPropView;\n disabled?: boolean;\n className?: string;\n },\n HTMLDivElement\n > &\n (ITEM extends { label: SwitchGroupDefaultItem['label'] }\n ? {}\n : {\n getItemLabel: SwitchGroupPropGetItemLabel<ITEM>;\n });\n\nexport type SwitchGroupComponent = <ITEM>(\n props: SwitchGroupProps<ITEM>,\n) => React.ReactNode | null;\n"],"mappings":"AAQA,MAAO,IAAMA,sBAAqB,CAAG,CAAC,QAAD,CAAW,KAAX,CAA9B,CAEP,MAAO,IAAMC,4BAAiD,CAC5DD,qBAAqB,CAAC,CAAD,CADhB"}
|
|
@@ -32,6 +32,6 @@ type Props<T extends TableRow> = {
|
|
|
32
32
|
} | {
|
|
33
33
|
type: 'resizer';
|
|
34
34
|
}) & React.RefAttributes<HTMLDivElement>;
|
|
35
|
-
type TableCell = <T extends TableRow>(props: Props<T>) => React.
|
|
35
|
+
type TableCell = <T extends TableRow>(props: Props<T>) => React.ReactNode | null;
|
|
36
36
|
export declare const TableCell: TableCell;
|
|
37
37
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableCell.js","names":["React","cn","cnTableCell","verticalAligns","horizontalAligns","getCellClasses","props","column","showVerticalShadow","className","isSticky","isResized","type","isSortable","sortable","isHeader","isResizer","stickyOnTop","stickyOnLeft","isFilterable","filterable","isControl","control","withoutBorder","isClickable","isBorderTop","isBorderLeft","getWrapperClasses","wrapperClassName","withoutPadding","verticalAlign","horizontalAlign","align","wrap","TableCell","forwardRef","ref","style","onClick","onContextMenu","children","propsWithRole","role"],"sources":["../../../../../../src/components/Table/Cell/TableCell.tsx"],"sourcesContent":["import './TableCell.css';\n\nimport React from 'react';\n\nimport { cn } from '../../../utils/bem';\nimport { TableColumn, TableRow } from '../Table';\n\nconst cnTableCell = cn('TableCell');\n\nexport const verticalAligns = ['top', 'center', 'bottom'] as const;\nexport type VerticalAlign = typeof verticalAligns[number];\nexport const horizontalAligns = ['left', 'center', 'right'] as const;\nexport type HorizontalAlign = typeof horizontalAligns[number];\n\ntype Props<T extends TableRow> = {\n column: TableColumn<T> & {\n isSticky?: boolean;\n isResized?: boolean;\n filterable?: boolean;\n };\n onClick?: (e: React.SyntheticEvent) => void;\n onContextMenu?: (e: React.SyntheticEvent) => void;\n style?: React.CSSProperties;\n className?: string;\n wrapperClassName?: string;\n children: React.ReactNode;\n wrap?: 'truncate' | 'break';\n showVerticalShadow?: boolean;\n verticalAlign?: VerticalAlign;\n} & (\n | {\n type: 'header';\n isSticky?: boolean;\n isResized?: boolean;\n }\n | {\n type: 'content';\n isClickable?: boolean;\n isBorderTop?: boolean;\n isBorderLeft?: boolean;\n }\n | {\n type: 'resizer';\n }\n) &\n React.RefAttributes<HTMLDivElement>;\n\ntype TableCell = <T extends TableRow>(\n props: Props<T>,\n) => React.
|
|
1
|
+
{"version":3,"file":"TableCell.js","names":["React","cn","cnTableCell","verticalAligns","horizontalAligns","getCellClasses","props","column","showVerticalShadow","className","isSticky","isResized","type","isSortable","sortable","isHeader","isResizer","stickyOnTop","stickyOnLeft","isFilterable","filterable","isControl","control","withoutBorder","isClickable","isBorderTop","isBorderLeft","getWrapperClasses","wrapperClassName","withoutPadding","verticalAlign","horizontalAlign","align","wrap","TableCell","forwardRef","ref","style","onClick","onContextMenu","children","propsWithRole","role"],"sources":["../../../../../../src/components/Table/Cell/TableCell.tsx"],"sourcesContent":["import './TableCell.css';\n\nimport React from 'react';\n\nimport { cn } from '../../../utils/bem';\nimport { TableColumn, TableRow } from '../Table';\n\nconst cnTableCell = cn('TableCell');\n\nexport const verticalAligns = ['top', 'center', 'bottom'] as const;\nexport type VerticalAlign = typeof verticalAligns[number];\nexport const horizontalAligns = ['left', 'center', 'right'] as const;\nexport type HorizontalAlign = typeof horizontalAligns[number];\n\ntype Props<T extends TableRow> = {\n column: TableColumn<T> & {\n isSticky?: boolean;\n isResized?: boolean;\n filterable?: boolean;\n };\n onClick?: (e: React.SyntheticEvent) => void;\n onContextMenu?: (e: React.SyntheticEvent) => void;\n style?: React.CSSProperties;\n className?: string;\n wrapperClassName?: string;\n children: React.ReactNode;\n wrap?: 'truncate' | 'break';\n showVerticalShadow?: boolean;\n verticalAlign?: VerticalAlign;\n} & (\n | {\n type: 'header';\n isSticky?: boolean;\n isResized?: boolean;\n }\n | {\n type: 'content';\n isClickable?: boolean;\n isBorderTop?: boolean;\n isBorderLeft?: boolean;\n }\n | {\n type: 'resizer';\n }\n) &\n React.RefAttributes<HTMLDivElement>;\n\ntype TableCell = <T extends TableRow>(\n props: Props<T>,\n) => React.ReactNode | null;\n\nconst getCellClasses = <T extends TableRow>(props: Props<T>): string => {\n const { column, showVerticalShadow, className } = props;\n\n return cnTableCell(\n {\n showVerticalShadow,\n isSticky: column.isSticky,\n isResized: props.type === 'header' ? props.isResized : column.isResized,\n isSortable: column.sortable,\n isHeader: props.type === 'header',\n isResizer: props.type === 'resizer',\n stickyOnTop:\n (props.type === 'header' && props.isSticky) || props.type === 'resizer',\n stickyOnLeft: column.isSticky,\n isFilterable: column.filterable,\n isControl: Boolean(column.control),\n withoutBorder: props.type === 'resizer',\n isClickable: 'isClickable' in props && props.isClickable,\n isBorderTop: 'isBorderTop' in props && props.isBorderTop,\n isBorderLeft: 'isBorderLeft' in props && props.isBorderLeft,\n },\n [className],\n );\n};\n\nconst getWrapperClasses = <T extends TableRow>(props: Props<T>): string => {\n const { column, wrapperClassName } = props;\n\n return cnTableCell(\n 'Wrapper',\n {\n withoutPadding: column.withoutPadding || props.type === 'resizer',\n verticalAlign: props.verticalAlign,\n horizontalAlign: column.align,\n isHeader: props.type === 'header',\n wrap: props.wrap,\n },\n [wrapperClassName],\n );\n};\n\nexport const TableCell: TableCell = React.forwardRef((props, ref) => {\n const { style, onClick, onContextMenu, children } = props;\n\n const propsWithRole = onClick\n ? {\n role: 'button',\n onClick,\n }\n : {\n role: 'cell',\n };\n\n return (\n <div\n {...propsWithRole}\n onContextMenu={onContextMenu}\n ref={ref}\n className={getCellClasses(props)}\n style={style}\n >\n <div className={getWrapperClasses(props)}>{children}</div>\n </div>\n );\n});\n"],"mappings":"AAAA,wBAEA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,EAAT,0BAGA,GAAMC,YAAW,CAAGD,EAAE,CAAC,WAAD,CAAtB,CAEA,MAAO,IAAME,eAAc,CAAG,CAAC,KAAD,CAAQ,QAAR,CAAkB,QAAlB,CAAvB,CAEP,MAAO,IAAMC,iBAAgB,CAAG,CAAC,MAAD,CAAS,QAAT,CAAmB,OAAnB,CAAzB,C,GAwCDC,eAAc,CAAG,SAAqBC,CAArB,CAAiD,CACtE,GAAQC,EAAR,CAAkDD,CAAlD,CAAQC,MAAR,CAAgBC,CAAhB,CAAkDF,CAAlD,CAAgBE,kBAAhB,CAAoCC,CAApC,CAAkDH,CAAlD,CAAoCG,SAApC,CAEA,MAAOP,YAAW,CAChB,CACEM,kBAAkB,CAAlBA,CADF,CAEEE,QAAQ,CAAEH,CAAM,CAACG,QAFnB,CAGEC,SAAS,CAAiB,QAAf,GAAAL,CAAK,CAACM,IAAN,CAA0BN,CAAK,CAACK,SAAhC,CAA4CJ,CAAM,CAACI,SAHhE,CAIEE,UAAU,CAAEN,CAAM,CAACO,QAJrB,CAKEC,QAAQ,CAAiB,QAAf,GAAAT,CAAK,CAACM,IALlB,CAMEI,SAAS,CAAiB,SAAf,GAAAV,CAAK,CAACM,IANnB,CAOEK,WAAW,CACO,QAAf,GAAAX,CAAK,CAACM,IAAN,EAA2BN,CAAK,CAACI,QAAlC,EAA8D,SAAf,GAAAJ,CAAK,CAACM,IARzD,CASEM,YAAY,CAAEX,CAAM,CAACG,QATvB,CAUES,YAAY,CAAEZ,CAAM,CAACa,UAVvB,CAWEC,SAAS,GAAUd,CAAM,CAACe,OAX5B,CAYEC,aAAa,CAAiB,SAAf,GAAAjB,CAAK,CAACM,IAZvB,CAaEY,WAA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3B,CAKE,KAAK,CAAE+B,CALT,GAOE,2BAAK,SAAS,CAAEV,iBAAiB,CAACrB,CAAD,CAAjC,EAA2CkC,CAA3C,CAPF,CAUH,CAvBmC,CAA7B"}
|
|
@@ -25,5 +25,5 @@ type Props<T extends TableRow> = {
|
|
|
25
25
|
showHorizontalCellShadow: boolean;
|
|
26
26
|
borderBetweenColumns: boolean;
|
|
27
27
|
};
|
|
28
|
-
export declare const TableHeader: <T extends TableRow>({ isStickyHeader, headersWithMetaData, headerRowsHeights, headerRowsRefs, getStickyLeftOffset, stickyColumnsGrid, showVerticalCellShadow, headerVerticalAlign, getSortIcon, handleSortClick, handleFilterTogglerClick, handleCellClick, handleTooltipSave, filters, visibleFilter, selectedFilters, showHorizontalCellShadow, borderBetweenColumns, }: Props<T>) => React.
|
|
28
|
+
export declare const TableHeader: <T extends TableRow>({ isStickyHeader, headersWithMetaData, headerRowsHeights, headerRowsRefs, getStickyLeftOffset, stickyColumnsGrid, showVerticalCellShadow, headerVerticalAlign, getSortIcon, handleSortClick, handleFilterTogglerClick, handleCellClick, handleTooltipSave, filters, visibleFilter, selectedFilters, showHorizontalCellShadow, borderBetweenColumns, }: Props<T>) => React.ReactNode;
|
|
29
29
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeader.js","names":["React","cn","Button","TableCell","getOptionsForFilters","TableFilterTooltip","cnTableHeader","levelTypes","TableHeader","isStickyHeader","headersWithMetaData","headerRowsHeights","headerRowsRefs","getStickyLeftOffset","stickyColumnsGrid","showVerticalCellShadow","headerVerticalAlign","getSortIcon","handleSortClick","handleFilterTogglerClick","handleCellClick","handleTooltipSave","filters","visibleFilter","selectedFilters","showHorizontalCellShadow","borderBetweenColumns","tableHeaderHeight","reduce","a","b","tableHeaderStyle","getLevelType","column","position","colSpan","smallTextSize","isColumnResized","headers","build","header","columns","forEach","col","find","head","title","push","some","isResized","getFilterPopover","accessor","curFilter","field","FilterComponent","component","name","filterComponentProps","props","onToggle","filterId","id","filterable","selected","type","handleFilterSave","filterValue","value","control","withVerticalBorder","map","columnIdx","style","gridColumnEnd","rowSpan","gridRowEnd","top","slice","level","ref","current","left","gridIndex","topHeaderGridIndex","e","isFirstColumn","isFirst","isFirstRow","isLastInColumn","isSortingActive","isFilterActive","verticalAlign","sortable","show"],"sources":["../../../../../../src/components/Table/Header/TableHeader.tsx"],"sourcesContent":["import './TableHeader.css';\n\nimport React from 'react';\n\nimport { cn } from '../../../utils/bem';\nimport { Button } from '../../Button/Button';\nimport { TableCell } from '../Cell/TableCell';\nimport {\n FieldSelectedValues,\n Filters,\n getOptionsForFilters,\n SelectedFilters,\n} from '../filtering';\nimport { TableFilterTooltip } from '../FilterTooltip/TableFilterTooltip';\nimport { Header } from '../helpers';\nimport {\n ColumnMetaData,\n HeaderVerticalAlign,\n onCellClick,\n TableColumn,\n TableRow,\n} from '../Table';\n\nconst cnTableHeader = cn('TableHeader');\n\ntype TableCSSCustomProperty = {\n '--table-header-height': string;\n};\n\nexport const levelTypes = ['high', 'low', 'default'] as const;\nexport type LevelType = typeof levelTypes[number];\n\ntype Props<T extends TableRow> = {\n isStickyHeader: boolean;\n headersWithMetaData: Array<Header<T> & ColumnMetaData>;\n headerRowsHeights: Array<number>;\n headerRowsRefs: React.MutableRefObject<Record<number, HTMLDivElement | null>>;\n getStickyLeftOffset: (\n columnIndex: number,\n topHeaderGridIndex: number,\n ) => number | undefined;\n stickyColumnsGrid: number;\n showVerticalCellShadow: boolean;\n headerVerticalAlign: HeaderVerticalAlign;\n getSortIcon: (column: Header<T>) => React.FC;\n handleSortClick: (column: TableColumn<T>) => void;\n handleFilterTogglerClick: (id: string) => () => void;\n handleCellClick: onCellClick;\n handleTooltipSave: (\n field: string,\n tooltipSelectedFilters: FieldSelectedValues,\n value?: unknown,\n ) => void;\n filters: Filters<T> | undefined;\n visibleFilter: string | null;\n selectedFilters: SelectedFilters;\n showHorizontalCellShadow: boolean;\n borderBetweenColumns: boolean;\n};\n\nexport const TableHeader = <T extends TableRow>({\n isStickyHeader,\n headersWithMetaData,\n headerRowsHeights,\n headerRowsRefs,\n getStickyLeftOffset,\n stickyColumnsGrid,\n showVerticalCellShadow,\n headerVerticalAlign,\n getSortIcon,\n handleSortClick,\n handleFilterTogglerClick,\n handleCellClick,\n handleTooltipSave,\n filters,\n visibleFilter,\n selectedFilters,\n showHorizontalCellShadow,\n borderBetweenColumns,\n}: Props<T>): React.ReactElement => {\n const tableHeaderHeight = headerRowsHeights.reduce(\n (a: number, b: number) => a + b,\n 0,\n );\n const tableHeaderStyle: React.CSSProperties & TableCSSCustomProperty = {\n '--table-header-height': `${tableHeaderHeight}px`,\n };\n const getLevelType = (column: Header<T> & ColumnMetaData): LevelType => {\n if (Number(column.position!.colSpan) >= 1) return 'high';\n if (column.position?.smallTextSize) return 'low';\n return 'default';\n };\n const isColumnResized = (column: Header<T> & ColumnMetaData): boolean => {\n const headers: Array<Header<T> & ColumnMetaData> = [];\n const build = (header: Header<T> & ColumnMetaData) => {\n if (!header.columns) {\n headers.push(header);\n } else {\n header.columns.forEach((col) =>\n build(\n headersWithMetaData.find(\n (head) => head.title === col.title,\n ) as Header<T> & ColumnMetaData,\n ),\n );\n }\n };\n build(column);\n return headers.some((header) => header.isResized);\n };\n\n const getFilterPopover = (\n column: Header<T> & ColumnMetaData,\n ): React.ReactNode => {\n if (!filters || !column.accessor) {\n return null;\n }\n const curFilter = filters.find(({ field }) => field === column.accessor);\n const FilterComponent = curFilter?.component?.name;\n const filterComponentProps = curFilter?.component?.props ?? {};\n const onToggle = handleFilterTogglerClick(column.accessor);\n const filterId = curFilter?.id;\n const handleFilterSave = (filterValue?: unknown) => {\n if (filterId) {\n handleTooltipSave(column.accessor!, [filterId], filterValue);\n }\n onToggle();\n };\n\n return column.filterable ? (\n <TableFilterTooltip\n field={column.accessor}\n isOpened={visibleFilter === column.accessor}\n options={getOptionsForFilters(filters, column.accessor)}\n values={selectedFilters[column.accessor].selected || []}\n onChange={handleTooltipSave}\n onToggle={handleFilterTogglerClick(column.accessor)}\n className={cnTableHeader('Icon', { type: 'filter' })}\n >\n {FilterComponent && (\n <FilterComponent\n {...filterComponentProps}\n onConfirm={handleFilterSave}\n filterValue={selectedFilters[column.accessor]?.value}\n onCancel={handleFilterTogglerClick(column.accessor)}\n />\n )}\n </TableFilterTooltip>\n ) : null;\n };\n\n const control = (column: Header<T> & ColumnMetaData): React.ReactNode => {\n if (column.control) {\n return (\n <div className={cnTableHeader('Control')}>\n {column.control({ column })}\n </div>\n );\n }\n\n return null;\n };\n\n return (\n <>\n <div\n className={cnTableHeader('Row', {\n withVerticalBorder: borderBetweenColumns,\n })}\n >\n {headersWithMetaData.map(\n (column: Header<T> & ColumnMetaData, columnIdx: number) => {\n const style: React.CSSProperties = {};\n if (column.position!.colSpan) {\n style.gridColumnEnd = `span ${column.position!.colSpan}`;\n }\n if (column.position!.rowSpan) {\n style.gridRowEnd = `span ${column.position!.rowSpan}`;\n }\n if (isStickyHeader) {\n style.top = headerRowsHeights\n .slice(0, column.position!.level)\n .reduce((a: number, b: number) => a + b, 0);\n }\n return (\n <TableCell\n type=\"header\"\n key={columnIdx}\n ref={(ref: HTMLDivElement | null): void => {\n /* eslint-disable-next-line no-param-reassign */\n headerRowsRefs.current[columnIdx] = ref;\n }}\n style={{\n ...style,\n left: getStickyLeftOffset(\n column.position!.gridIndex,\n column.position!.topHeaderGridIndex,\n ),\n }}\n isSticky={isStickyHeader}\n isResized={isColumnResized(column)}\n column={column}\n verticalAlign={headerVerticalAlign}\n onContextMenu={(e: React.SyntheticEvent) =>\n handleCellClick({\n e,\n type: 'contextMenu',\n columnIdx,\n ref: { current: headerRowsRefs.current[columnIdx] },\n })\n }\n onClick={(e: React.SyntheticEvent) =>\n handleCellClick({\n e,\n type: 'click',\n columnIdx,\n ref: { current: headerRowsRefs.current[columnIdx] },\n })\n }\n className={cnTableHeader('Cell', {\n isFirstColumn: column.position?.isFirst,\n isFirstRow: column.position!.level === 0,\n isLastInColumn:\n column.position?.topHeaderGridIndex !==\n headersWithMetaData[columnIdx + 1]?.position\n ?.topHeaderGridIndex,\n level: getLevelType(column),\n })}\n showVerticalShadow={\n showVerticalCellShadow &&\n column.position!.gridIndex! +\n (column?.position!.colSpan || 1) ===\n stickyColumnsGrid\n }\n >\n {column.title}\n\n <div\n className={cnTableHeader('Buttons', {\n isSortingActive: column.isSortingActive,\n isFilterActive: column.isFilterActive,\n verticalAlign: headerVerticalAlign,\n })}\n >\n {column.sortable && (\n <Button\n type=\"button\"\n size=\"xs\"\n iconSize=\"s\"\n view=\"clear\"\n onlyIcon\n onClick={(): void => handleSortClick(column)}\n iconLeft={getSortIcon(column)}\n className={cnTableHeader('Icon', { type: 'sort' })}\n />\n )}\n\n {getFilterPopover(column)}\n\n {control(column)}\n </div>\n </TableCell>\n );\n },\n )}\n </div>\n {/*\n Рендерим тень заголовка отдельно чтобы избежать возможных наложений\n теней для ячеек заголовка и ячеек прикрепленных слева.\n */}\n <div className={cnTableHeader('ShadowWrapper')} style={tableHeaderStyle}>\n <div\n className={cnTableHeader('Shadow', {\n show: showHorizontalCellShadow && isStickyHeader,\n })}\n />\n </div>\n </>\n );\n};\n"],"mappings":"qqBAAA,0BAEA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,EAAT,0BACA,OAASC,MAAT,2BACA,OAASC,SAAT,yBACA,OAGEC,oBAHF,oBAMA,OAASC,kBAAT,2CAUA,GAAMC,cAAa,CAAGL,EAAE,CAAC,aAAD,CAAxB,CAMA,MAAO,IAAMM,WAAU,CAAG,CAAC,MAAD,CAAS,KAAT,CAAgB,SAAhB,CAAnB,CA+BP,MAAO,IAAMC,YAAW,CAAG,WAmBS,IAlBlCC,EAkBkC,GAlBlCA,cAkBkC,CAjBlCC,CAiBkC,GAjBlCA,mBAiBkC,CAhBlCC,CAgBkC,GAhBlCA,iBAgBkC,CAflCC,CAekC,GAflCA,cAekC,CAdlCC,CAckC,GAdlCA,mBAckC,CAblCC,CAakC,GAbl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Y,CAACC,CAAD,CAPY,CAAT,CAlC1B,CA2CE,kBAAkB,CAChBlB,CAAsB,EACtBkB,CAAM,CAACC,QAAP,CAAiBgD,SAAjB,EACG,QAAAjD,CAAM,WAANA,CAAA,QAAAA,CAAM,CAAEC,QAAR,CAAkBC,OAAlB,GAA6B,CADhC,IAEErB,CA/CN,EAkDGmB,CAAM,CAACa,KAlDV,CAoDE,2BACE,SAAS,CAAExC,aAAa,CAAC,SAAD,CAAY,CAClCmF,eAAe,CAAExD,CAAM,CAACwD,eADU,CAElCC,cAAc,CAAEzD,CAAM,CAACyD,cAFW,CAGlCC,aAAa,CAAE3E,CAHmB,CAAZ,CAD1B,EAOGiB,CAAM,CAAC2D,QAAP,EACC,oBAAC,MAAD,EACE,IAAI,CAAC,QADP,CAEE,IAAI,CAAC,IAFP,CAGE,QAAQ,CAAC,GAHX,CAIE,IAAI,CAAC,OAJP,CAKE,QAAQ,GALV,CAME,OAAO,CAAE,yBAAY1E,EAAe,CAACe,CAAD,CAA3B,CANX,CAOE,QAAQ,CAAEhB,CAAW,CAACgB,CAAD,CAPvB,CAQE,SAAS,CAAE3B,aAAa,CAAC,MAAD,CAAS,CAAE0D,IAAI,CAAE,MAAR,CAAT,CAR1B,EARJ,CAoBGd,CAAgB,CAACjB,CAAD,CApBnB,CAsBGmC,CAAO,CAACnC,CAAD,CAtBV,CApDF,CA8EH,CA7FF,CALH,CADF,CA0GE,2BAAK,SAAS,CAAE3B,aAAa,CAAC,eAAD,CAA7B,CAAgD,KAAK,CAAEyB,CAAvD,EACE,2BACE,SAAS,CAAEzB,aAAa,CAAC,QAAD,CAAW,CACjCuF,IAAI,CAAEpE,CAAwB,EAAIhB,CADD,CAAX,CAD1B,EADF,CA1GF,CAmHH,CA3NM"}
|
|
1
|
+
{"version":3,"file":"TableHeader.js","names":["React","cn","Button","TableCell","getOptionsForFilters","TableFilterTooltip","cnTableHeader","levelTypes","TableHeader","isStickyHeader","headersWithMetaData","headerRowsHeights","headerRowsRefs","getStickyLeftOffset","stickyColumnsGrid","showVerticalCellShadow","headerVerticalAlign","getSortIcon","handleSortClick","handleFilterTogglerClick","handleCellClick","handleTooltipSave","filters","visibleFilter","selectedFilters","showHorizontalCellShadow","borderBetweenColumns","tableHeaderHeight","reduce","a","b","tableHeaderStyle","getLevelType","column","position","colSpan","smallTextSize","isColumnResized","headers","build","header","columns","forEach","col","find","head","title","push","some","isResized","getFilterPopover","accessor","curFilter","field","FilterComponent","component","name","filterComponentProps","props","onToggle","filterId","id","filterable","selected","type","handleFilterSave","filterValue","value","control","withVerticalBorder","map","columnIdx","style","gridColumnEnd","rowSpan","gridRowEnd","top","slice","level","ref","current","left","gridIndex","topHeaderGridIndex","e","isFirstColumn","isFirst","isFirstRow","isLastInColumn","isSortingActive","isFilterActive","verticalAlign","sortable","show"],"sources":["../../../../../../src/components/Table/Header/TableHeader.tsx"],"sourcesContent":["import './TableHeader.css';\n\nimport React from 'react';\n\nimport { cn } from '../../../utils/bem';\nimport { Button } from '../../Button/Button';\nimport { TableCell } from '../Cell/TableCell';\nimport {\n FieldSelectedValues,\n Filters,\n getOptionsForFilters,\n SelectedFilters,\n} from '../filtering';\nimport { TableFilterTooltip } from '../FilterTooltip/TableFilterTooltip';\nimport { Header } from '../helpers';\nimport {\n ColumnMetaData,\n HeaderVerticalAlign,\n onCellClick,\n TableColumn,\n TableRow,\n} from '../Table';\n\nconst cnTableHeader = cn('TableHeader');\n\ntype TableCSSCustomProperty = {\n '--table-header-height': string;\n};\n\nexport const levelTypes = ['high', 'low', 'default'] as const;\nexport type LevelType = typeof levelTypes[number];\n\ntype Props<T extends TableRow> = {\n isStickyHeader: boolean;\n headersWithMetaData: Array<Header<T> & ColumnMetaData>;\n headerRowsHeights: Array<number>;\n headerRowsRefs: React.MutableRefObject<Record<number, HTMLDivElement | null>>;\n getStickyLeftOffset: (\n columnIndex: number,\n topHeaderGridIndex: number,\n ) => number | undefined;\n stickyColumnsGrid: number;\n showVerticalCellShadow: boolean;\n headerVerticalAlign: HeaderVerticalAlign;\n getSortIcon: (column: Header<T>) => React.FC;\n handleSortClick: (column: TableColumn<T>) => void;\n handleFilterTogglerClick: (id: string) => () => void;\n handleCellClick: onCellClick;\n handleTooltipSave: (\n field: string,\n tooltipSelectedFilters: FieldSelectedValues,\n value?: unknown,\n ) => void;\n filters: Filters<T> | undefined;\n visibleFilter: string | null;\n selectedFilters: SelectedFilters;\n showHorizontalCellShadow: boolean;\n borderBetweenColumns: boolean;\n};\n\nexport const TableHeader = <T extends TableRow>({\n isStickyHeader,\n headersWithMetaData,\n headerRowsHeights,\n headerRowsRefs,\n getStickyLeftOffset,\n stickyColumnsGrid,\n showVerticalCellShadow,\n headerVerticalAlign,\n getSortIcon,\n handleSortClick,\n handleFilterTogglerClick,\n handleCellClick,\n handleTooltipSave,\n filters,\n visibleFilter,\n selectedFilters,\n showHorizontalCellShadow,\n borderBetweenColumns,\n}: Props<T>): React.ReactNode => {\n const tableHeaderHeight = headerRowsHeights.reduce(\n (a: number, b: number) => a + b,\n 0,\n );\n const tableHeaderStyle: React.CSSProperties & TableCSSCustomProperty = {\n '--table-header-height': `${tableHeaderHeight}px`,\n };\n const getLevelType = (column: Header<T> & ColumnMetaData): LevelType => {\n if (Number(column.position!.colSpan) >= 1) return 'high';\n if (column.position?.smallTextSize) return 'low';\n return 'default';\n };\n const isColumnResized = (column: Header<T> & ColumnMetaData): boolean => {\n const headers: Array<Header<T> & ColumnMetaData> = [];\n const build = (header: Header<T> & ColumnMetaData) => {\n if (!header.columns) {\n headers.push(header);\n } else {\n header.columns.forEach((col) =>\n build(\n headersWithMetaData.find(\n (head) => head.title === col.title,\n ) as Header<T> & ColumnMetaData,\n ),\n );\n }\n };\n build(column);\n return headers.some((header) => header.isResized);\n };\n\n const getFilterPopover = (\n column: Header<T> & ColumnMetaData,\n ): React.ReactNode => {\n if (!filters || !column.accessor) {\n return null;\n }\n const curFilter = filters.find(({ field }) => field === column.accessor);\n const FilterComponent = curFilter?.component?.name;\n const filterComponentProps = curFilter?.component?.props ?? {};\n const onToggle = handleFilterTogglerClick(column.accessor);\n const filterId = curFilter?.id;\n const handleFilterSave = (filterValue?: unknown) => {\n if (filterId) {\n handleTooltipSave(column.accessor!, [filterId], filterValue);\n }\n onToggle();\n };\n\n return column.filterable ? (\n <TableFilterTooltip\n field={column.accessor}\n isOpened={visibleFilter === column.accessor}\n options={getOptionsForFilters(filters, column.accessor)}\n values={selectedFilters[column.accessor].selected || []}\n onChange={handleTooltipSave}\n onToggle={handleFilterTogglerClick(column.accessor)}\n className={cnTableHeader('Icon', { type: 'filter' })}\n >\n {FilterComponent && (\n <FilterComponent\n {...filterComponentProps}\n onConfirm={handleFilterSave}\n filterValue={selectedFilters[column.accessor]?.value}\n onCancel={handleFilterTogglerClick(column.accessor)}\n />\n )}\n </TableFilterTooltip>\n ) : null;\n };\n\n const control = (column: Header<T> & ColumnMetaData): React.ReactNode => {\n if (column.control) {\n return (\n <div className={cnTableHeader('Control')}>\n {column.control({ column })}\n </div>\n );\n }\n\n return null;\n };\n\n return (\n <>\n <div\n className={cnTableHeader('Row', {\n withVerticalBorder: borderBetweenColumns,\n })}\n >\n {headersWithMetaData.map(\n (column: Header<T> & ColumnMetaData, columnIdx: number) => {\n const style: React.CSSProperties = {};\n if (column.position!.colSpan) {\n style.gridColumnEnd = `span ${column.position!.colSpan}`;\n }\n if (column.position!.rowSpan) {\n style.gridRowEnd = `span ${column.position!.rowSpan}`;\n }\n if (isStickyHeader) {\n style.top = headerRowsHeights\n .slice(0, column.position!.level)\n .reduce((a: number, b: number) => a + b, 0);\n }\n return (\n <TableCell\n type=\"header\"\n key={columnIdx}\n ref={(ref: HTMLDivElement | null): void => {\n /* eslint-disable-next-line no-param-reassign */\n headerRowsRefs.current[columnIdx] = ref;\n }}\n style={{\n ...style,\n left: getStickyLeftOffset(\n column.position!.gridIndex,\n column.position!.topHeaderGridIndex,\n ),\n }}\n isSticky={isStickyHeader}\n isResized={isColumnResized(column)}\n column={column}\n verticalAlign={headerVerticalAlign}\n onContextMenu={(e: React.SyntheticEvent) =>\n handleCellClick({\n e,\n type: 'contextMenu',\n columnIdx,\n ref: { current: headerRowsRefs.current[columnIdx] },\n })\n }\n onClick={(e: React.SyntheticEvent) =>\n handleCellClick({\n e,\n type: 'click',\n columnIdx,\n ref: { current: headerRowsRefs.current[columnIdx] },\n })\n }\n className={cnTableHeader('Cell', {\n isFirstColumn: column.position?.isFirst,\n isFirstRow: column.position!.level === 0,\n isLastInColumn:\n column.position?.topHeaderGridIndex !==\n headersWithMetaData[columnIdx + 1]?.position\n ?.topHeaderGridIndex,\n level: getLevelType(column),\n })}\n showVerticalShadow={\n showVerticalCellShadow &&\n column.position!.gridIndex! +\n (column?.position!.colSpan || 1) ===\n stickyColumnsGrid\n }\n >\n {column.title}\n\n <div\n className={cnTableHeader('Buttons', {\n isSortingActive: column.isSortingActive,\n isFilterActive: column.isFilterActive,\n verticalAlign: headerVerticalAlign,\n })}\n >\n {column.sortable && (\n <Button\n type=\"button\"\n size=\"xs\"\n iconSize=\"s\"\n view=\"clear\"\n onlyIcon\n onClick={(): void => handleSortClick(column)}\n iconLeft={getSortIcon(column)}\n className={cnTableHeader('Icon', { type: 'sort' })}\n />\n )}\n\n {getFilterPopover(column)}\n\n {control(column)}\n </div>\n </TableCell>\n );\n },\n )}\n </div>\n {/*\n Рендерим тень заголовка отдельно чтобы избежать возможных наложений\n теней для ячеек заголовка и ячеек прикрепленных слева.\n */}\n <div className={cnTableHeader('ShadowWrapper')} style={tableHeaderStyle}>\n <div\n className={cnTableHeader('Shadow', {\n show: showHorizontalCellShadow && isStickyHeader,\n })}\n />\n </div>\n </>\n );\n};\n"],"mappings":"qqBAAA,0BAEA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,EAAT,0BACA,OAASC,MAAT,2BACA,OAASC,SAAT,yBACA,OAGEC,oBAHF,oBAMA,OAASC,kBAAT,2CAUA,GAAMC,cAAa,CAAGL,EAAE,CAAC,aAAD,CAA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AE3B,aAAa,CAAC,eAAD,CAA7B,CAAgD,KAAK,CAAEyB,CAAvD,EACE,2BACE,SAAS,CAAEzB,aAAa,CAAC,QAAD,CAAW,CACjCuF,IAAI,CAAEpE,CAAwB,EAAIhB,CADD,CAAX,CAD1B,EADF,CA1GF,CAmHH,CA3NM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableResizer.js","names":["React","cn","cnTableResizer","TableResizer","isDragging","setState","document","addEventListener","onMouseMove","onMouseUp","e","movementX","props","onResize","removeListeners","removeEventListener","state","isVisible","height","top","onMouseDown","onDoubleClick","Component"],"sources":["../../../../../../src/components/Table/Resizer/TableResizer.tsx"],"sourcesContent":["import './TableResizer.css';\n\nimport React from 'react';\n\nimport { cn } from '../../../utils/bem';\n\nconst cnTableResizer = cn('TableResizer');\n\ntype Props = {\n height: number;\n top: number;\n isVisible?: boolean;\n onResize: (delta: number) => void;\n onDoubleClick: () => void;\n};\n\n/* Сделано классом, чтобы функции событий на document имели доступ к актуальному состоянию/пропсам без пересоздания подписок */\nexport class TableResizer extends React.Component<\n Props,\n { isDragging: boolean }\n> {\n state = {\n isDragging: false,\n };\n\n componentWillUnmount(): void {\n this.removeListeners();\n }\n\n onMouseDown = (): void => {\n this.setState({ isDragging: true });\n\n document.addEventListener('mousemove', this.onMouseMove);\n document.addEventListener('mouseup', this.onMouseUp);\n };\n\n onMouseMove = (e: MouseEvent): void => {\n if (e.movementX) {\n this.props.onResize(e.movementX);\n }\n };\n\n onMouseUp = (): void => {\n this.setState({ isDragging: false });\n\n this.removeListeners();\n };\n\n removeListeners = (): void => {\n document.removeEventListener('mousemove', this.onMouseMove);\n document.removeEventListener('mouseup', this.onMouseUp);\n };\n\n render():
|
|
1
|
+
{"version":3,"file":"TableResizer.js","names":["React","cn","cnTableResizer","TableResizer","isDragging","setState","document","addEventListener","onMouseMove","onMouseUp","e","movementX","props","onResize","removeListeners","removeEventListener","state","isVisible","height","top","onMouseDown","onDoubleClick","Component"],"sources":["../../../../../../src/components/Table/Resizer/TableResizer.tsx"],"sourcesContent":["import './TableResizer.css';\n\nimport React from 'react';\n\nimport { cn } from '../../../utils/bem';\n\nconst cnTableResizer = cn('TableResizer');\n\ntype Props = {\n height: number;\n top: number;\n isVisible?: boolean;\n onResize: (delta: number) => void;\n onDoubleClick: () => void;\n};\n\n/* Сделано классом, чтобы функции событий на document имели доступ к актуальному состоянию/пропсам без пересоздания подписок */\nexport class TableResizer extends React.Component<\n Props,\n { isDragging: boolean }\n> {\n state = {\n isDragging: false,\n };\n\n componentWillUnmount(): void {\n this.removeListeners();\n }\n\n onMouseDown = (): void => {\n this.setState({ isDragging: true });\n\n document.addEventListener('mousemove', this.onMouseMove);\n document.addEventListener('mouseup', this.onMouseUp);\n };\n\n onMouseMove = (e: MouseEvent): void => {\n if (e.movementX) {\n this.props.onResize(e.movementX);\n }\n };\n\n onMouseUp = (): void => {\n this.setState({ isDragging: false });\n\n this.removeListeners();\n };\n\n removeListeners = (): void => {\n document.removeEventListener('mousemove', this.onMouseMove);\n document.removeEventListener('mouseup', this.onMouseUp);\n };\n\n render(): React.ReactNode {\n return (\n <div\n className={cnTableResizer({\n isDragging: this.state.isDragging,\n isVisible: this.props.isVisible,\n })}\n aria-hidden\n style={{ height: this.props.height, top: this.props.top }}\n onMouseDown={this.onMouseDown}\n onDoubleClick={this.props.onDoubleClick}\n />\n );\n }\n}\n"],"mappings":"+/BAAA,2BAEA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,EAAT,0BAEA,GAAMC,eAAc,CAAGD,EAAE,CAAC,cAAD,CAAzB,CAWA,UAAaE,aAAb,wNAIU,CACNC,UAAU,GADJ,CAJV,0DAYgB,UAAY,CACxB,EAAKC,QAAL,CAAc,CAAED,UAAU,GAAZ,CAAd,CADwB,CAGxBE,QAAQ,CAACC,gBAAT,CAA0B,WAA1B,CAAuC,EAAKC,WAA5C,CAHwB,CAIxBF,QAAQ,CAACC,gBAAT,CAA0B,SAA1B,CAAqC,EAAKE,SAA1C,CACD,CAjBH,0DAmBgB,SAACC,CAAD,CAAyB,CACjCA,CAAC,CAACC,SAD+B,EAEnC,EAAKC,KAAL,CAAWC,QAAX,CAAoBH,CAAC,CAACC,SAAtB,CAEH,CAvBH,wDAyBc,UAAY,CACtB,EAAKN,QAAL,CAAc,CAAED,UAAU,GAAZ,CAAd,CADsB,CAGtB,EAAKU,eAAL,EACD,CA7BH,8DA+BoB,UAAY,CAC5BR,QAAQ,CAACS,mBAAT,CAA6B,WAA7B,CAA0C,EAAKP,WAA/C,CAD4B,CAE5BF,QAAQ,CAACS,mBAAT,CAA6B,SAA7B,CAAwC,EAAKN,SAA7C,CACD,CAlCH,kGAQE,+BAA6B,CAC3B,KAAKK,eAAL,EACD,CAVH,sBAoCE,iBAA0B,CACxB,MACE,4BACE,SAAS,CAAEZ,cAAc,CAAC,CACxBE,UAAU,CAAE,KAAKY,KAAL,CAAWZ,UADC,CAExBa,SAAS,CAAE,KAAKL,KAAL,CAAWK,SAFE,CAAD,CAD3B,CAKE,gBALF,CAME,KAAK,CAAE,CAAEC,MAAM,CAAE,KAAKN,KAAL,CAAWM,MAArB,CAA6BC,GAAG,CAAE,KAAKP,KAAL,CAAWO,GAA7C,CANT,CAOE,WAAW,CAAE,KAAKC,WAPpB,CAQE,aAAa,CAAE,KAAKR,KAAL,CAAWS,aAR5B,EAWH,CAjDH,OAAkCrB,KAAK,CAACsB,SAAxC"}
|
|
@@ -134,7 +134,7 @@ export type TableProps<T extends TableRow> = {
|
|
|
134
134
|
};
|
|
135
135
|
type Table = <T extends TableRow>(props: TableProps<T> & {
|
|
136
136
|
ref?: React.Ref<HTMLDivElement>;
|
|
137
|
-
}) => React.
|
|
137
|
+
}) => React.ReactNode | null;
|
|
138
138
|
export type ColumnMetaData = {
|
|
139
139
|
filterable: boolean;
|
|
140
140
|
isSortingActive: boolean;
|