gantri-components 2.38.1 → 2.39.0-beta.10

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.
Files changed (107) hide show
  1. package/dist/components/checkbox/checkbox.styles.d.ts +1 -0
  2. package/dist/components/checkbox/checkbox.types.d.ts +1 -0
  3. package/dist/components/dropdown-menu/dropdown-menu.styles.d.ts +3 -1
  4. package/dist/components/dropdown-menu/dropdown-menu.types.d.ts +2 -0
  5. package/dist/components/filter-button/filter-button.types.d.ts +3 -1
  6. package/dist/components/icon/generated/ui-control/ExlamationCircleFilled.d.ts +3 -0
  7. package/dist/components/icon/generated/ui-control/ExlamationCircleFilled24.d.ts +3 -0
  8. package/dist/components/index.d.ts +1 -0
  9. package/dist/components/paging/__tests__/paging.test.d.ts +1 -0
  10. package/dist/components/paging/index.d.ts +1 -0
  11. package/dist/components/paging/paging.d.ts +5 -0
  12. package/dist/components/paging/paging.presets.d.ts +2 -0
  13. package/dist/components/paging/paging.styles.d.ts +3 -0
  14. package/dist/components/paging/paging.types.d.ts +13 -0
  15. package/dist/components/table/components/custom-columns-wrapper/components/user-preferences-toggle/components/user-preferences-modal/index.d.ts +1 -0
  16. package/dist/components/table/components/custom-columns-wrapper/components/user-preferences-toggle/components/user-preferences-modal/user-preferences-modal.d.ts +2 -0
  17. package/dist/components/table/components/custom-columns-wrapper/components/user-preferences-toggle/components/user-preferences-modal/user-preferences-modal.styles.d.ts +6 -0
  18. package/dist/components/table/components/custom-columns-wrapper/components/user-preferences-toggle/components/user-preferences-modal/user-preferences-modal.types.d.ts +7 -0
  19. package/dist/components/table/components/custom-columns-wrapper/components/user-preferences-toggle/index.d.ts +1 -0
  20. package/dist/components/table/components/custom-columns-wrapper/components/user-preferences-toggle/user-preferences-toggle.d.ts +3 -0
  21. package/dist/components/table/components/custom-columns-wrapper/components/user-preferences-toggle/user-preferences-toggle.styles.d.ts +4 -0
  22. package/dist/components/table/components/custom-columns-wrapper/components/user-preferences-toggle/user-preferences-toggle.types.d.ts +10 -0
  23. package/dist/components/table/components/custom-columns-wrapper/custom-columns-wrapper.d.ts +7 -0
  24. package/dist/components/table/components/custom-columns-wrapper/custom-columns-wrapper.styles.d.ts +3 -0
  25. package/dist/components/table/components/custom-columns-wrapper/custom-columns-wrapper.types.d.ts +19 -0
  26. package/dist/components/table/components/custom-columns-wrapper/helpers/get-custom-column-initial-visibility/get-custom-column-initial-visibility.d.ts +1 -0
  27. package/dist/components/table/components/custom-columns-wrapper/helpers/get-custom-column-initial-visibility/index.d.ts +1 -0
  28. package/dist/components/table/components/custom-columns-wrapper/helpers/get-custom-column-options/get-custom-column-options.d.ts +8 -0
  29. package/dist/components/table/components/custom-columns-wrapper/helpers/get-custom-column-options/get-custom-column-options.types.d.ts +6 -0
  30. package/dist/components/table/components/custom-columns-wrapper/helpers/get-custom-column-options/index.d.ts +1 -0
  31. package/dist/components/table/components/custom-columns-wrapper/hooks/use-detect-horizontal-scroll/index.d.ts +1 -0
  32. package/dist/components/table/components/custom-columns-wrapper/hooks/use-detect-horizontal-scroll/use-detect-horizontal-scroll.d.ts +6 -0
  33. package/dist/components/table/components/custom-columns-wrapper/index.d.ts +1 -0
  34. package/dist/components/table/components/table-actions-wrapper/__test__/table-actions-wrapper.test.d.ts +1 -0
  35. package/dist/components/table/components/table-actions-wrapper/components/search/__tests__/search.test.d.ts +1 -0
  36. package/dist/components/table/components/table-actions-wrapper/components/search/index.d.ts +1 -0
  37. package/dist/components/table/components/table-actions-wrapper/components/search/search.d.ts +5 -0
  38. package/dist/components/table/components/table-actions-wrapper/components/search/search.presets.d.ts +2 -0
  39. package/dist/components/table/components/table-actions-wrapper/components/search/search.styles.d.ts +1 -0
  40. package/dist/components/table/components/table-actions-wrapper/components/search/search.types.d.ts +12 -0
  41. package/dist/components/table/components/table-actions-wrapper/components/sort/helpers/get-sort-mapping/get-sort-mapping.d.ts +3 -0
  42. package/dist/components/table/components/table-actions-wrapper/components/sort/helpers/get-sort-mapping/get-sort-mapping.types.d.ts +2 -0
  43. package/dist/components/table/components/table-actions-wrapper/components/sort/helpers/get-sort-mapping/index.d.ts +1 -0
  44. package/dist/components/table/components/table-actions-wrapper/components/sort/helpers/get-sort-options/__tests__/get-sort-options.test.d.ts +1 -0
  45. package/dist/components/table/components/table-actions-wrapper/components/sort/helpers/get-sort-options/get-sort-options.d.ts +8 -0
  46. package/dist/components/table/components/table-actions-wrapper/components/sort/helpers/get-sort-options/get-sort-options.types.d.ts +2 -0
  47. package/dist/components/table/components/table-actions-wrapper/components/sort/helpers/get-sort-options/index.d.ts +1 -0
  48. package/dist/components/table/components/table-actions-wrapper/components/sort/index.d.ts +1 -0
  49. package/dist/components/table/components/table-actions-wrapper/components/sort/sort.d.ts +2 -0
  50. package/dist/components/table/components/table-actions-wrapper/components/sort/sort.styles.d.ts +2 -0
  51. package/dist/components/table/components/table-actions-wrapper/components/sort/sort.types.d.ts +29 -0
  52. package/dist/components/table/components/table-actions-wrapper/hooks/use-confirm-interaction/index.d.ts +1 -0
  53. package/dist/components/table/components/table-actions-wrapper/hooks/use-confirm-interaction/use-confirm-interaction.constants.d.ts +2 -0
  54. package/dist/components/table/components/table-actions-wrapper/hooks/use-confirm-interaction/use-confirm-interaction.d.ts +12 -0
  55. package/dist/components/table/components/table-actions-wrapper/hooks/use-confirm-interaction/use-confirm-interaction.types.d.ts +6 -0
  56. package/dist/components/table/components/table-actions-wrapper/index.d.ts +1 -0
  57. package/dist/components/table/components/table-actions-wrapper/table-actions-wrapper.d.ts +9 -0
  58. package/dist/components/table/components/table-actions-wrapper/table-actions-wrapper.types.d.ts +33 -0
  59. package/dist/components/table/components/table-footer/index.d.ts +1 -0
  60. package/dist/components/table/components/table-footer/table-footer.d.ts +7 -0
  61. package/dist/components/table/components/table-footer/table-footer.types.d.ts +4 -0
  62. package/dist/components/table/components/table-header/index.d.ts +1 -0
  63. package/dist/components/table/components/table-header/table-header.d.ts +7 -0
  64. package/dist/components/table/components/table-header/table-header.styles.d.ts +3 -0
  65. package/dist/components/table/components/table-header/table-header.types.d.ts +6 -0
  66. package/dist/components/table/components/table-row/hooks/use-drag-and-drop/index.d.ts +1 -0
  67. package/dist/components/table/components/table-row/hooks/use-drag-and-drop/use-drag-and-drop.d.ts +14 -0
  68. package/dist/components/table/components/table-row/hooks/use-drag-and-drop/use-drag-and-drop.types.d.ts +9 -0
  69. package/dist/components/table/components/table-row/index.d.ts +1 -0
  70. package/dist/components/table/components/table-row/table-row.constants.d.ts +10 -0
  71. package/dist/components/table/components/table-row/table-row.d.ts +7 -0
  72. package/dist/components/table/components/table-row/table-row.styles.d.ts +4 -0
  73. package/dist/components/table/components/table-row/table-row.types.d.ts +12 -0
  74. package/dist/components/table/helpers/add-missing-ids/add-missing-ids.d.ts +7 -0
  75. package/dist/components/table/helpers/add-missing-ids/index.d.ts +1 -0
  76. package/dist/components/table/helpers/hyphenate-column-id/hyphenate-column-id.d.ts +1 -0
  77. package/dist/components/table/helpers/hyphenate-column-id/index.d.ts +1 -0
  78. package/dist/components/table/hooks/use-move-row/index.d.ts +1 -0
  79. package/dist/components/table/hooks/use-move-row/use-move-row.d.ts +9 -0
  80. package/dist/components/table/hooks/use-move-row/use-move-row.types.d.ts +5 -0
  81. package/dist/components/table/hooks/use-track-sticky-cells/index.d.ts +1 -0
  82. package/dist/components/table/hooks/use-track-sticky-cells/use-track-sticky-cells.d.ts +3 -0
  83. package/dist/components/table/hooks/use-track-sticky-cells/use-track-sticky-cells.types.d.ts +7 -0
  84. package/dist/components/table/index.d.ts +4 -0
  85. package/dist/components/table/table.d.ts +10 -0
  86. package/dist/components/table/table.presets.d.ts +2 -0
  87. package/dist/components/table/table.styles.d.ts +4 -0
  88. package/dist/components/table/table.types.d.ts +46 -0
  89. package/dist/helpers/format-as-locale-number/format-as-locale-number.d.ts +6 -0
  90. package/dist/helpers/format-as-locale-number/format-as-locale-number.types.d.ts +3 -0
  91. package/dist/helpers/format-as-locale-number/index.d.ts +1 -0
  92. package/dist/helpers/mark-sticky-elements/__tests__/mark-sticky-elements.test.d.ts +1 -0
  93. package/dist/helpers/mark-sticky-elements/__tests__/setup.d.ts +8 -0
  94. package/dist/helpers/mark-sticky-elements/helpers/get-intersection-observer-callback/__tests__/get-intersection-observer-callback.test.d.ts +1 -0
  95. package/dist/helpers/mark-sticky-elements/helpers/get-intersection-observer-callback/get-intersection-observer-callback.d.ts +2 -0
  96. package/dist/helpers/mark-sticky-elements/helpers/get-intersection-observer-callback/get-intersection-observer-callback.types.d.ts +8 -0
  97. package/dist/helpers/mark-sticky-elements/helpers/get-intersection-observer-callback/index.d.ts +1 -0
  98. package/dist/helpers/mark-sticky-elements/index.d.ts +1 -0
  99. package/dist/helpers/mark-sticky-elements/mark-sticky-elements.constants.d.ts +2 -0
  100. package/dist/helpers/mark-sticky-elements/mark-sticky-elements.d.ts +28 -0
  101. package/dist/helpers/mark-sticky-elements/mark-sticky-elements.types.d.ts +28 -0
  102. package/dist/index.cjs.js +1 -1
  103. package/dist/index.d.ts +1 -7
  104. package/dist/index.esm.js +1 -1
  105. package/dist/index.umd.js +1 -1
  106. package/dist/setupTests.d.ts +9 -0
  107. package/package.json +7 -1
@@ -4,6 +4,7 @@ export declare const StyledCheckbox: import("styled-components").StyledComponent
4
4
  $checked: boolean;
5
5
  $variant?: CheckboxVariant | undefined;
6
6
  }, never>;
7
+ export declare const StyledIndeterminateMarker: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
7
8
  export declare const StyledCheckboxContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
8
9
  disabled: boolean;
9
10
  }, never>;
@@ -9,6 +9,7 @@ export interface CheckboxProps<T = boolean> {
9
9
  }>;
10
10
  checked?: boolean;
11
11
  disabled?: boolean;
12
+ indeterminate?: boolean;
12
13
  labelPosition?: 'left' | 'right';
13
14
  labelText?: string;
14
15
  labelTx?: string;
@@ -1,3 +1,4 @@
1
+ import { Property } from 'csstype';
1
2
  export declare const StyledContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
2
3
  $hasHeader?: boolean | undefined;
3
4
  $noShadow: boolean;
@@ -5,6 +6,7 @@ export declare const StyledContainer: import("styled-components").StyledComponen
5
6
  export declare const StyledHeader: import("styled-components").StyledComponent<"header", import("styled-components").DefaultTheme, {}, never>;
6
7
  export declare const StyledItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
7
8
  $basic: boolean;
8
- $disabled?: boolean | undefined;
9
+ $disabled: boolean | undefined;
10
+ $justifyContent: Property.JustifyContent | undefined;
9
11
  $selected: boolean;
10
12
  }, never>;
@@ -8,6 +8,8 @@ export interface DropdownMenuProps<T = Record<string, unknown>> {
8
8
  idProperty?: keyof T;
9
9
  /** Can optionally include `disabled: true` to any index to disable that item. */
10
10
  items: T[];
11
+ /** Sets the alignment of the dropdown items. */
12
+ justifyContent?: Property.JustifyContent;
11
13
  keyProperty?: (item?: T) => string;
12
14
  labelProperty?: keyof T | ((item?: T) => string);
13
15
  labelPropertyTx?: (item?: T) => string;
@@ -1,5 +1,6 @@
1
1
  import { ResolutionAwareProp } from '../../types/resolution-aware-prop.type';
2
2
  import { ButtonSize } from '../button/button.types';
3
+ import { OnConfirmInteraction } from '../table/components/table-actions-wrapper/hooks/use-confirm-interaction/use-confirm-interaction.types';
3
4
  export interface FilterButtonProps {
4
5
  Content?: JSX.Element;
5
6
  applyButtonText?: string;
@@ -11,11 +12,12 @@ export interface FilterButtonProps {
11
12
  modalTitleTx?: string;
12
13
  onApply?: () => void;
13
14
  onClose?: () => void;
15
+ onConfirmInteraction?: OnConfirmInteraction;
14
16
  onOpen?: () => void;
15
17
  onReset?: () => void;
16
18
  recordsCount?: number;
17
19
  resetButtonText?: string;
20
+ resetButtonTx?: string;
18
21
  size?: ResolutionAwareProp<ButtonSize>;
19
22
  variant?: 'primary' | 'secondary';
20
- resetButtonTx?: string;
21
23
  }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const SvgExlamationCircleFilled: React.NamedExoticComponent<object>;
3
+ export default SvgExlamationCircleFilled;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const SvgExlamationCircleFilled24: React.NamedExoticComponent<object>;
3
+ export default SvgExlamationCircleFilled24;
@@ -27,6 +27,7 @@ export * from './radio';
27
27
  export * from './search-field';
28
28
  export * from './slider';
29
29
  export * from './stack';
30
+ export * from './table';
30
31
  export * from './tabs';
31
32
  export * from './text-area';
32
33
  export * from './text-field';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { Paging } from './paging';
@@ -0,0 +1,5 @@
1
+ import { PagingComponentProps } from './paging.types';
2
+ export declare const Paging: {
3
+ (props: PagingComponentProps): JSX.Element;
4
+ defaultProps: Partial<import("./paging.types").PagingProps>;
5
+ };
@@ -0,0 +1,2 @@
1
+ import { PagingProps } from './paging.types';
2
+ export declare const pagingDefaultProps: Partial<PagingProps>;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledFlex: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../flex/flex.types").FlexProps & import("react").RefAttributes<import("../flex/flex.types").FlexProps>>, import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const StyledPagingButton: import("styled-components").StyledComponent<import("react").FC<import("../button/button.types").ButtonProps>, import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,13 @@
1
+ import { OnConfirmInteraction } from '../table/components/table-actions-wrapper/hooks/use-confirm-interaction/use-confirm-interaction.types';
2
+ export interface PagingProps {
3
+ currentPage: number;
4
+ onPageChange: (page: number) => void;
5
+ /** Total number of pages. */
6
+ pageCount: number;
7
+ /** Total number of returned results. */
8
+ total: number;
9
+ }
10
+ export interface PagingComponentProps extends PagingProps {
11
+ confirmAllInteractions: boolean;
12
+ onConfirmInteraction: OnConfirmInteraction;
13
+ }
@@ -0,0 +1,2 @@
1
+ import { UserPreferencesModalProps } from './user-preferences-modal.types';
2
+ export declare const UserPreferencesModal: (props: UserPreferencesModalProps) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledPreferencesPopUp: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const StyledHeading: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../../../../grid/grid.types").GridProps & import("react").RefAttributes<import("../../../../../../../grid/grid.types").GridProps>>, import("styled-components").DefaultTheme, {}, never>;
4
+ export declare const StyledClickableIcon: import("styled-components").StyledComponent<import("react").FC<import("../../../../../../../icon/icon.types").IconProps>, import("styled-components").DefaultTheme, {}, never>;
5
+ export declare const StyledContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
6
+ export declare const StyledFooter: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,7 @@
1
+ import { CustomColumnOption } from '../../../../custom-columns-wrapper.types';
2
+ export interface UserPreferencesModalProps {
3
+ checklistOptions: CustomColumnOption[];
4
+ onClose: () => Promise<void>;
5
+ onReset: () => Promise<void>;
6
+ title: string;
7
+ }
@@ -0,0 +1,3 @@
1
+ import { UserPreferencesToggleProps } from './user-preferences-toggle.types';
2
+ /** Toggles a dialog where the user can save their preferences for the specified `page`. */
3
+ export declare const UserPreferencesToggle: (props: UserPreferencesToggleProps) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledButton: import("styled-components").StyledComponent<import("react").FC<import("../../../../../button/button.types").ButtonProps>, import("styled-components").DefaultTheme, {
3
+ 'data-is-active': boolean;
4
+ }, never>;
@@ -0,0 +1,10 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ import { CustomColumnOption } from '../../custom-columns-wrapper.types';
3
+ export interface UserPreferencesToggleProps {
4
+ checklistOptions: CustomColumnOption[];
5
+ isActive: boolean;
6
+ modalHeading: string;
7
+ onClose: () => Promise<void>;
8
+ onReset: () => Promise<void>;
9
+ setIsActive: Dispatch<SetStateAction<boolean>>;
10
+ }
@@ -0,0 +1,7 @@
1
+ import { RowData } from '@tanstack/react-table';
2
+ import { CustomColumnsWrapperProps } from './custom-columns-wrapper.types';
3
+ export declare const CustomColumnsWrapper: <DataType extends RowData<{
4
+ [key: string]: unknown;
5
+ id: string | number;
6
+ subRows?: any[] | undefined;
7
+ }>>(props: CustomColumnsWrapperProps<DataType>) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare const StyledToggleWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
2
+ isScrolling: boolean;
3
+ }, never>;
@@ -0,0 +1,19 @@
1
+ import { RowData, Table } from '@tanstack/react-table';
2
+ import { PropsWithChildren } from 'react';
3
+ export interface CustomColumnsProps<DataType extends RowData> {
4
+ disabledColumns: (keyof DataType | string)[];
5
+ hiddenColumns: (keyof DataType | string)[];
6
+ onUpdateHiddenColumns: (columnsToHide: string[]) => Promise<void>;
7
+ }
8
+ export interface CustomColumnOption {
9
+ checked: boolean;
10
+ disabled: boolean;
11
+ label: string;
12
+ onChange: (event: unknown) => void;
13
+ value: string;
14
+ }
15
+ export type CustomColumnsWrapperProps<DataType extends RowData> = PropsWithChildren<{
16
+ customColumns: CustomColumnsProps<DataType> | undefined;
17
+ table: Table<DataType>;
18
+ tableContainerEl: HTMLDivElement | null;
19
+ }>;
@@ -0,0 +1 @@
1
+ export declare const getCustomColumnInitialVisibility: (hiddenColumns: string[]) => {};
@@ -0,0 +1 @@
1
+ export * from './get-custom-column-initial-visibility';
@@ -0,0 +1,8 @@
1
+ import { RowData } from '@tanstack/react-table';
2
+ import { CustomColumnOption } from '../../custom-columns-wrapper.types';
3
+ import { GetCustomColumnOptionsArgs } from './get-custom-column-options.types';
4
+ export declare const getCustomColumnOptions: <DataType extends RowData<{
5
+ [key: string]: unknown;
6
+ id: string | number;
7
+ subRows?: any[] | undefined;
8
+ }>>(args: GetCustomColumnOptionsArgs<DataType>) => CustomColumnOption[];
@@ -0,0 +1,6 @@
1
+ import { RowData, Table } from '@tanstack/react-table';
2
+ import { CustomColumnsProps } from '../../custom-columns-wrapper.types';
3
+ export interface GetCustomColumnOptionsArgs<DataType extends RowData> {
4
+ customColumns: CustomColumnsProps<DataType> | undefined;
5
+ table: Table<DataType>;
6
+ }
@@ -0,0 +1 @@
1
+ export * from './get-custom-column-options';
@@ -0,0 +1 @@
1
+ export * from './use-detect-horizontal-scroll';
@@ -0,0 +1,6 @@
1
+ export declare const useDetectHorizontalScroll: (props: {
2
+ element: HTMLElement | null;
3
+ enabled: boolean;
4
+ onEndScrolling: () => void;
5
+ onStartScrolling: () => void;
6
+ }) => void;
@@ -0,0 +1 @@
1
+ export * from './custom-columns-wrapper';
@@ -0,0 +1,5 @@
1
+ import { SearchComponentProps } from './search.types';
2
+ export declare const Search: {
3
+ (props: SearchComponentProps): JSX.Element;
4
+ defaultProps: import("./search.types").SearchDefaultProps;
5
+ };
@@ -0,0 +1,2 @@
1
+ import { SearchDefaultProps } from './search.types';
2
+ export declare const searchDefaultProps: SearchDefaultProps;
@@ -0,0 +1 @@
1
+ export declare const StyledSearchInputWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,12 @@
1
+ import { TextFieldProps } from '../../../../../text-field';
2
+ import { OnConfirmInteraction } from '../../hooks/use-confirm-interaction/use-confirm-interaction.types';
3
+ export interface SearchProps extends Partial<SearchDefaultProps> {
4
+ onChange: TextFieldProps['onTextChange'];
5
+ }
6
+ export interface SearchComponentProps extends SearchProps {
7
+ onConfirmInteraction: OnConfirmInteraction;
8
+ }
9
+ export interface SearchDefaultProps {
10
+ placeholder: string;
11
+ value: string;
12
+ }
@@ -0,0 +1,3 @@
1
+ import { TableSortField } from '../../sort.types';
2
+ import { SortMapping } from './get-sort-mapping.types';
3
+ export declare const getSortMapping: <SortingField = string>(sortingOptions?: TableSortField<SortingField>[]) => SortMapping<SortingField>;
@@ -0,0 +1,2 @@
1
+ import { SortInfo } from '../../../../table.props';
2
+ export type SortMapping<SortingField = string> = Record<string, SortInfo<SortingField>>;
@@ -0,0 +1,8 @@
1
+ import { SortInfo, TableSortField } from '../../sort.types';
2
+ interface MappedSortItem<SortingField = string> {
3
+ id: string;
4
+ label: string;
5
+ value: SortInfo<SortingField>;
6
+ }
7
+ export declare const getSortOptions: <SortingField = string>(sortingOptions?: TableSortField<SortingField>[]) => MappedSortItem<SortingField>[];
8
+ export {};
@@ -0,0 +1,2 @@
1
+ import { SortInfo } from '../../sort.types';
2
+ export type SortMapping<SortingField = string> = Record<string, SortInfo<SortingField>>;
@@ -0,0 +1,2 @@
1
+ import { SortComponentProps } from './sort.types';
2
+ export declare const Sort: (props: SortComponentProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledDropdown: import("styled-components").StyledComponent<import("react").FC<import("react").PropsWithChildren<import("../../../../../dropdown").DropdownProps<any>>>, import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,29 @@
1
+ import { OnConfirmInteraction } from '../../hooks/use-confirm-interaction/use-confirm-interaction.types';
2
+ export interface SortProps {
3
+ current: SortInfo;
4
+ disabled?: boolean;
5
+ fields: TableSortField<string>[];
6
+ onSort: (sortInfo: SortInfo) => void;
7
+ }
8
+ export interface SortComponentProps extends SortProps {
9
+ confirmAllInteractions: boolean;
10
+ onConfirmInteraction: OnConfirmInteraction;
11
+ }
12
+ export interface SortInfo<SortingField = string> {
13
+ label?: string;
14
+ sortingField: SortingField;
15
+ sortingType?: SortingType;
16
+ }
17
+ export type SortingType = 'ASC' | 'DESC';
18
+ export type TableSortField<SortingField = string> = {
19
+ bidirectional?: never;
20
+ label: string;
21
+ sortingField: SortingField;
22
+ /** If not provided, defaults to 'DESC' */
23
+ sortingType?: SortingType;
24
+ } | {
25
+ bidirectional: true;
26
+ label: string;
27
+ sortingField: SortingField;
28
+ sortingType?: never;
29
+ };
@@ -0,0 +1 @@
1
+ export * from './use-confirm-interaction';
@@ -0,0 +1,2 @@
1
+ import { TableInteraction } from './use-confirm-interaction.types';
2
+ export declare const confirmInteractionMessage: Record<TableInteraction, string>;
@@ -0,0 +1,12 @@
1
+ import { RowData } from '@tanstack/react-table';
2
+ import { UseConfirmInteractionProps, OnConfirmInteraction } from './use-confirm-interaction.types';
3
+ export declare const useConfirmInteraction: <DataType extends RowData<{
4
+ [key: string]: unknown;
5
+ id: string | number;
6
+ subRows?: any[] | undefined;
7
+ }>>(props: UseConfirmInteractionProps<DataType>) => {
8
+ /** Not necessary for `onConfirmInteraction`. Only provided in case additional logic is needed. */
9
+ confirmAllInteractions: boolean;
10
+ /** If applicable, renders a discard selections confirmation modal when called. */
11
+ onConfirmInteraction: OnConfirmInteraction;
12
+ };
@@ -0,0 +1,6 @@
1
+ import { RowData, Table } from '@tanstack/react-table';
2
+ export type TableInteraction = 'FOCUS_SEARCH' | 'OPEN_FILTERS' | 'OPEN_SORT' | 'USE_PAGING' | 'CUSTOM_ACTION';
3
+ export interface UseConfirmInteractionProps<DataType extends RowData> {
4
+ table: Table<DataType>;
5
+ }
6
+ export type OnConfirmInteraction = (interaction: TableInteraction) => Promise<boolean>;
@@ -0,0 +1 @@
1
+ export * from './table-actions-wrapper';
@@ -0,0 +1,9 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ import { RowData } from '@tanstack/react-table';
3
+ import { TableActionsWrapperProps } from './table-actions-wrapper.types';
4
+ /** Wraps the table with relevant components for paging, filters, sort, and table actions. */
5
+ export declare const TableActionsWrapper: <DataType extends RowData<{
6
+ [key: string]: unknown;
7
+ id: string | number;
8
+ subRows?: any[] | undefined;
9
+ }>>(props: React.PropsWithChildren<TableActionsWrapperProps<DataType>>) => JSX.Element;
@@ -0,0 +1,33 @@
1
+ import { JSXElementConstructor } from 'react';
2
+ import { RowData, Table } from '@tanstack/react-table';
3
+ import { PagingProps } from '../../../paging/paging.types';
4
+ import { SortProps } from './components/sort/sort.types';
5
+ export type FiltersProps = {
6
+ count: number;
7
+ filtersContent: JSX.Element;
8
+ numActive: number;
9
+ onApply: () => void;
10
+ onClose: () => void;
11
+ onReset: () => void;
12
+ };
13
+ export interface SearchProps {
14
+ onSearch: (value: string) => void;
15
+ placeholder?: string;
16
+ value: string;
17
+ }
18
+ export interface CustomActionProps<DataType extends RowData> {
19
+ Component: JSXElementConstructor<{
20
+ onConfirmInteraction: () => Promise<boolean>;
21
+ table: Table<DataType>;
22
+ }>;
23
+ position?: 'left' | 'right' | 'bottom';
24
+ }
25
+ export interface TableActionsWrapperProps<DataType extends RowData> {
26
+ className: string | undefined;
27
+ customAction: CustomActionProps<DataType> | undefined;
28
+ filters: FiltersProps | undefined;
29
+ paging: PagingProps | undefined;
30
+ search: SearchProps | undefined;
31
+ sorting: SortProps | undefined;
32
+ table: Table<DataType>;
33
+ }
@@ -0,0 +1 @@
1
+ export * from './table-footer';
@@ -0,0 +1,7 @@
1
+ import { RowData } from '@tanstack/react-table';
2
+ import { TableFooterProps } from './table-footer.types';
3
+ export declare const TableFooter: <DataType extends RowData<{
4
+ [key: string]: unknown;
5
+ id: string | number;
6
+ subRows?: any[] | undefined;
7
+ }>>(props: TableFooterProps<DataType>) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { RowData, Table } from '@tanstack/react-table';
2
+ export type TableFooterProps<DataType extends RowData> = {
3
+ table: Table<DataType>;
4
+ };
@@ -0,0 +1 @@
1
+ export * from './table-header';
@@ -0,0 +1,7 @@
1
+ import { RowData } from '@tanstack/react-table';
2
+ import { TableHeaderProps } from './table-header.types';
3
+ export declare const TableHeader: <DataType extends RowData<{
4
+ [key: string]: unknown;
5
+ id: string | number;
6
+ subRows?: any[] | undefined;
7
+ }>>(props: TableHeaderProps<DataType>) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare const StyledTH: import("styled-components").StyledComponent<"th", import("styled-components").DefaultTheme, {
2
+ size: number;
3
+ }, never>;
@@ -0,0 +1,6 @@
1
+ import { RowData, Table } from '@tanstack/react-table';
2
+ import { GetHeaderCellProps } from '../../table.types';
3
+ export type TableHeaderProps<DataType extends RowData> = {
4
+ getHeaderCellProps: GetHeaderCellProps<DataType> | undefined;
5
+ table: Table<DataType>;
6
+ };
@@ -0,0 +1 @@
1
+ export * from './use-drag-and-drop';
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { RowData } from '@tanstack/react-table';
3
+ import { UseDragAndDropProps } from './use-drag-and-drop.types';
4
+ export declare const useDragAndDrop: <DataType extends RowData<{
5
+ [key: string]: unknown;
6
+ id: string | number;
7
+ subRows?: any[] | undefined;
8
+ }>>(props: UseDragAndDropProps<DataType>) => {
9
+ dragAndDropRef: import("react").RefObject<HTMLTableRowElement>;
10
+ isDragging: boolean;
11
+ } | {
12
+ dragAndDropRef?: undefined;
13
+ isDragging?: undefined;
14
+ };
@@ -0,0 +1,9 @@
1
+ import { Row, RowData } from '@tanstack/react-table';
2
+ export interface UseDragAndDropProps<DataType extends RowData> {
3
+ enableReordering: boolean;
4
+ handleOnReorder: () => Promise<void>;
5
+ index: number;
6
+ isSubRow: boolean;
7
+ moveRow: (startIndex: number, endIndex: number) => void;
8
+ row: Row<DataType>;
9
+ }
@@ -0,0 +1 @@
1
+ export * from './table-row';
@@ -0,0 +1,10 @@
1
+ /** See `RowStatusValue` type for possible values. */
2
+ export declare const dataAttrRowStatus: "data-row-status";
3
+ export declare const dataAttrRowIsClickable: "data-row-is-clickable";
4
+ export declare const dataAttrRowHighlightOnHover: "data-row-highlight-on-hover";
5
+ /** Applying this data attribute marks a row as active, applying a new background color. */
6
+ export declare const dataAttrActiveRow: "data-active-row";
7
+ /** Prefix added to table cell data attrs (like cell ID). */
8
+ export declare const dataAttrCellPrefix: "data-cell";
9
+ /** Applied when a sticky styled element is observed to have become sticky via `markStickyElements`. */
10
+ export declare const dataAttrIsSticky: "data-is-sticky";
@@ -0,0 +1,7 @@
1
+ import { RowData } from '@tanstack/react-table';
2
+ import { TableRowProps } from './table-row.types';
3
+ export declare const TableRow: <DataType extends RowData<{
4
+ [key: string]: unknown;
5
+ id: string | number;
6
+ subRows?: any[] | undefined;
7
+ }>>(props: TableRowProps<DataType>) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare const StyledTR: import("styled-components").StyledComponent<"tr", import("styled-components").DefaultTheme, {
2
+ canReorder: boolean;
3
+ isDragging: boolean | undefined;
4
+ }, never>;
@@ -0,0 +1,12 @@
1
+ import { Row, RowData } from '@tanstack/react-table';
2
+ import { CustomRowProps, GetCellProps, OnRowClick } from '../../table.types';
3
+ export interface TableRowProps<DataType extends RowData> {
4
+ customRowProps: CustomRowProps;
5
+ enableReordering: boolean;
6
+ getCellProps: GetCellProps<DataType> | undefined;
7
+ handleOnReorder: () => Promise<void>;
8
+ index: number;
9
+ moveRow: (startIndex: number, endIndex: number) => void;
10
+ onRowClick?: OnRowClick<DataType>;
11
+ row: Row<DataType>;
12
+ }
@@ -0,0 +1,7 @@
1
+ import { RowData } from '@tanstack/react-table';
2
+ /** If an index does not contain an `id` value, one is added using uuid. */
3
+ export declare const addMissingIds: <DataType extends RowData<{
4
+ [key: string]: unknown;
5
+ id: string | number;
6
+ subRows?: any[] | undefined;
7
+ }>>(data: DataType[]) => DataType[];
@@ -0,0 +1 @@
1
+ export * from './add-missing-ids';
@@ -0,0 +1 @@
1
+ export declare const hyphenateColumnId: ((id: string) => string) & import("lodash").MemoizedFunction;
@@ -0,0 +1 @@
1
+ export * from './hyphenate-column-id';
@@ -0,0 +1 @@
1
+ export * from './use-move-row';
@@ -0,0 +1,9 @@
1
+ import { RowData } from '@tanstack/react-table';
2
+ import { UseMoveRowProps } from './use-move-row.types';
3
+ export declare const useMoveRow: <TData extends RowData<{
4
+ [key: string]: unknown;
5
+ id: string | number;
6
+ subRows?: any[] | undefined;
7
+ }>>(props: UseMoveRowProps<TData>) => {
8
+ moveRow: (startIndex: number, endIndex: number) => void;
9
+ };
@@ -0,0 +1,5 @@
1
+ import { RowData } from '@tanstack/react-table';
2
+ import { Dispatch, SetStateAction } from 'react';
3
+ export interface UseMoveRowProps<TData extends RowData> {
4
+ setData: Dispatch<SetStateAction<TData[]>>;
5
+ }