@digital-ai/dot-components 1.7.0 → 1.9.1

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 (36) hide show
  1. package/CHANGE_LOG.md +77 -2
  2. package/{dot-components.esm.js → index.esm.js} +592 -309
  3. package/{dot-components.umd.js → index.umd.js} +781 -462
  4. package/lib/components/auto-complete/AutoComplete.d.ts +9 -5
  5. package/lib/components/auto-complete/AutoComplete.styles.d.ts +2 -0
  6. package/lib/components/auto-complete/Autocomplete.stories.data.d.ts +16 -0
  7. package/lib/components/auto-complete/utils/helpers.d.ts +7 -0
  8. package/lib/components/button-toggle/ButtonToggle.d.ts +9 -9
  9. package/lib/components/button-toggle/index.d.ts +1 -0
  10. package/lib/components/divider/Divider.d.ts +17 -0
  11. package/lib/components/divider/Divider.stories.styles.d.ts +2 -0
  12. package/lib/components/divider/Divider.styles.d.ts +2 -0
  13. package/lib/components/divider/index.d.ts +1 -0
  14. package/lib/components/drawer/Drawer.d.ts +4 -4
  15. package/lib/components/index.d.ts +9 -3
  16. package/lib/components/menu/Menu.d.ts +7 -1
  17. package/lib/components/menu/Menu.stories.data.d.ts +1 -0
  18. package/lib/components/menu/Menu.stories.styles.d.ts +2 -0
  19. package/lib/components/menu/MenuList.d.ts +26 -0
  20. package/lib/components/menu/MenuList.styles.d.ts +5 -0
  21. package/lib/components/menu/utils/helpers.d.ts +4 -0
  22. package/lib/components/popper/Popper.d.ts +18 -0
  23. package/lib/components/popper/Popper.data.d.ts +7 -0
  24. package/lib/components/popper/Popper.stories.data.d.ts +6 -0
  25. package/lib/components/popper/Popper.stories.styles.d.ts +4 -0
  26. package/lib/components/popper/Popper.styles.d.ts +3 -0
  27. package/lib/components/popper/index.d.ts +2 -0
  28. package/lib/components/sidebar/Sidebar.stories.data.d.ts +1 -0
  29. package/lib/components/split-button/SplitButton.styles.d.ts +1 -1
  30. package/lib/components/table/Table.data.d.ts +43 -0
  31. package/lib/components/table/Table.stories.data.d.ts +2 -0
  32. package/lib/components/table/Table.styles.d.ts +1 -1
  33. package/lib/components/table/TableSelectionToolbar.d.ts +2 -1
  34. package/lib/components/table/utils/models.d.ts +1 -0
  35. package/lib/testing-utils/index.d.ts +60 -0
  36. package/package.json +4 -4
@@ -1,13 +1,16 @@
1
1
  import { ChangeEvent, ReactNode, Ref } from 'react';
2
2
  import { AutocompleteCloseReason } from '@material-ui/lab';
3
3
  import { CommonProps } from '../CommonProps';
4
+ export declare const DEFAULT_ACTION_ITEM_TEXT = "Add new item";
4
5
  export interface ActionItem {
5
6
  /** The icon to display on the button */
6
- iconId: string;
7
+ iconId?: string;
7
8
  /** Event callback */
8
- onClick: () => void;
9
+ onClick: (inputText?: string) => void;
10
+ /** If set to true, it will prevent duplicate item insertion */
11
+ preventDuplicateInsertion?: boolean;
9
12
  /** Text/Node displayed */
10
- text: string | ReactNode;
13
+ text?: string | ReactNode;
11
14
  }
12
15
  export declare type autoCompleteSize = 'medium' | 'small';
13
16
  export declare type AutoCompleteValue = string | string[] | AutoCompleteOption | AutoCompleteOption[];
@@ -16,7 +19,6 @@ export interface AutoCompleteOption {
16
19
  group?: string;
17
20
  title: string;
18
21
  }
19
- export declare const parseAutoCompleteValue: (value: AutoCompleteValue) => string;
20
22
  export interface AutoCompleteProps extends CommonProps {
21
23
  /** Action button as the last element on the menu **/
22
24
  actionItem?: ActionItem;
@@ -24,6 +26,8 @@ export interface AutoCompleteProps extends CommonProps {
24
26
  autoFocus?: boolean;
25
27
  /** default option that is selected */
26
28
  defaultValue?: AutoCompleteValue;
29
+ /** When `true` input textbox will be small size, when `false` it will be medium size. Default value is `true`. **/
30
+ dense?: boolean;
27
31
  /** Disable the portal behavior. If true, children stay within parent DOM hierarchy. */
28
32
  disablePortal?: boolean;
29
33
  /** If true, the input will be disabled. */
@@ -67,4 +71,4 @@ export interface AutoCompleteProps extends CommonProps {
67
71
  /** value if this is a controlled component */
68
72
  value?: AutoCompleteValue;
69
73
  }
70
- export declare const DotAutoComplete: ({ actionItem, ariaLabel, autoFocus, className, "data-testid": dataTestId, defaultValue, disabled, disablePortal, error, freesolo, group, helperText, inputId, inputRef, label, loading, multiple, onChange, onClose, onInputChange, onOpen, open, options, placeholder, required, size, value, }: AutoCompleteProps) => JSX.Element;
74
+ export declare const DotAutoComplete: ({ actionItem, ariaLabel, autoFocus, className, "data-testid": dataTestId, defaultValue, dense, disabled, disablePortal, error, freesolo, group, helperText, inputId, inputRef, label, loading, multiple, onChange, onClose, onInputChange, onOpen, open, options, placeholder, required, size, value, }: AutoCompleteProps) => JSX.Element;
@@ -1,3 +1,5 @@
1
1
  import { Autocomplete } from '@material-ui/lab';
2
2
  export declare const rootClassName = "dot-autocomplete";
3
+ export declare const inputRootClassName = "dot-input-root";
4
+ export declare const inputMediumClassName = "dot-input-medium";
3
5
  export declare const StyledAutocomplete: import("styled-components").StyledComponent<typeof Autocomplete, any, {}, never>;
@@ -1,5 +1,21 @@
1
+ import { ActionItem } from './AutoComplete';
1
2
  export declare const movies: {
2
3
  group: string;
3
4
  title: string;
4
5
  error: boolean;
5
6
  }[];
7
+ export declare const handleActionItemClick: (newItem?: string) => void;
8
+ export declare const actionItemOptions: ActionItem[];
9
+ export declare const actionItemArgType: {
10
+ options: string[];
11
+ mapping: ActionItem[];
12
+ control: {
13
+ type: string;
14
+ labels: {
15
+ 0: string;
16
+ 1: string;
17
+ 2: string;
18
+ };
19
+ };
20
+ defaultValue: string;
21
+ };
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { AutocompleteGetTagProps } from '@material-ui/lab';
3
+ import { ChipSize } from '../../chip/Chip';
4
+ import { AutoCompleteOption, AutoCompleteValue } from '../AutoComplete';
5
+ export declare const parseAutoCompleteValue: (value: AutoCompleteValue) => string;
6
+ export declare const getChipsFromAutocomplete: (values: Array<AutoCompleteOption | string>, getTagProps: AutocompleteGetTagProps, chipSize?: ChipSize) => JSX.Element[];
7
+ export declare const checkIfDuplicateItem: (itemText: string, autocompleteOptions: AutoCompleteOption[]) => boolean;
@@ -2,16 +2,17 @@ import { MouseEvent } from 'react';
2
2
  import { CommonProps } from '../CommonProps';
3
3
  export declare type ButtonToggleSize = 'small' | 'medium' | 'large';
4
4
  export declare type ButtonToggleOrientation = 'horizontal' | 'vertical';
5
- declare type ButtonToggleValue = string | number | boolean;
5
+ export declare type ButtonToggleValue = string | number | boolean;
6
+ export interface ButtonToggleOption extends CommonProps {
7
+ ariaLabel: string;
8
+ disabled?: boolean;
9
+ iconId?: string;
10
+ text?: string;
11
+ value: ButtonToggleValue;
12
+ }
6
13
  export interface ButtonToggleProps extends CommonProps {
7
14
  /** button props for each toggle button options*/
8
- buttonOptions: {
9
- ariaLabel: string;
10
- disabled?: boolean;
11
- iconId?: string;
12
- text?: string;
13
- value: ButtonToggleValue;
14
- }[];
15
+ buttonOptions: ButtonToggleOption[];
15
16
  /** If true, the keyboard focus ripple will be disabled */
16
17
  disableFocusRipple?: boolean;
17
18
  /** If true, the ripple effect will be disabled. */
@@ -28,4 +29,3 @@ export interface ButtonToggleProps extends CommonProps {
28
29
  value?: ButtonToggleValue;
29
30
  }
30
31
  export declare const DotButtonToggle: ({ ariaLabel, buttonOptions, className, "data-testid": dataTestId, disableFocusRipple, disableRipple, exclusive, onChange, orientation, size, value, }: ButtonToggleProps) => JSX.Element;
31
- export {};
@@ -0,0 +1 @@
1
+ export * from './ButtonToggle';
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import { CommonProps } from '../CommonProps';
3
+ export declare type DividerOrientation = 'horizontal' | 'vertical';
4
+ export declare type DividerVariant = 'fullWidth' | 'inset' | 'middle';
5
+ export interface DividerProps extends CommonProps {
6
+ /** Absolutely position the element. Default value: `false` */
7
+ absolute?: boolean;
8
+ /** If true, a vertical divider will have the correct height when used in flex container. (By default, a vertical divider will have a calculated height of 0px if it is the child of a flex container.) */
9
+ flexItem?: boolean;
10
+ /** If `true`, the divider will have a lighter color. Default value: `false` */
11
+ light?: boolean;
12
+ /** The divider orientation. (`horizontal`, `vertical`). Default value: `horizontal` */
13
+ orientation?: DividerOrientation;
14
+ /** The variant to use. (`fullWidth`, `inset`, `middle`) */
15
+ variant?: DividerVariant;
16
+ }
17
+ export declare const DotDivider: ({ absolute, ariaLabel, className, "data-testid": dataTestId, flexItem, light, orientation, variant, }: DividerProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare const verticalClassName = "dot-divider-vertical";
2
+ export declare const StyledVerticalDividerWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,2 @@
1
+ export declare const rootClassName = "dot-divider";
2
+ export declare const StyledDivider: import("styled-components").StyledComponent<import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").DividerTypeMap<{}, "hr">>, any, {}, never>;
@@ -0,0 +1 @@
1
+ export * from './Divider';
@@ -1,4 +1,4 @@
1
- import { MouseEvent, ReactNode, CSSProperties } from 'react';
1
+ import { CSSProperties, MouseEvent, ReactNode } from 'react';
2
2
  import { CommonProps } from '../CommonProps';
3
3
  export declare type DrawerAnchor = 'bottom' | 'left' | 'right' | 'top';
4
4
  export declare type DrawerVariant = 'permanent' | 'persistent' | 'temporary';
@@ -23,11 +23,11 @@ export interface DrawerProps extends CommonProps {
23
23
  /** string or JSX element that is displayed inside the drawer */
24
24
  children?: ReactNode;
25
25
  /** Props applied to drawer body */
26
- drawerBodyProps?: DrawerSection;
26
+ drawerBodyProps?: Omit<DrawerSection, 'ariaLabel'>;
27
27
  /** Props applied to drawer footer */
28
- drawerFooterProps?: DrawerSection;
28
+ drawerFooterProps?: Omit<DrawerSection, 'ariaLabel'>;
29
29
  /** Props applied to drawer header */
30
- drawerHeaderProps?: DrawerSection;
30
+ drawerHeaderProps?: Omit<DrawerSection, 'ariaLabel'>;
31
31
  /** The height of the drawer when anchor is 'top' or 'bottom' */
32
32
  height?: string;
33
33
  /** Callback fired when the component requests to be closed. */
@@ -3,6 +3,7 @@ export type { AutoCompleteOption, AutoCompleteProps, AutoCompleteValue, } from '
3
3
  export type { AvatarProps } from './avatar/Avatar';
4
4
  export type { BreadcrumbItem } from './breadcrumbs/Breadcrumbs';
5
5
  export type { ButtonProps } from './button/Button';
6
+ export type { ButtonToggleProps, ButtonToggleValue, ButtonToggleOption, ButtonToggleOrientation, ButtonToggleSize, } from './button-toggle';
6
7
  export type { CheckboxProps } from './checkbox/Checkbox';
7
8
  export type { CheckboxGroupProps } from './checkbox/CheckboxGroup';
8
9
  export type { SubmitButtonProps } from './dialog/Dialog';
@@ -10,7 +11,7 @@ export type { DynamicFormProps } from './dynamic-form/DynamicForm';
10
11
  export type { ConditionFunction, ControlClickHandler, DisabledConditionFunction, DisabledControlCondition, DynamicFormConfig, DynamicFormControl, DynamicFormControlProps, DynamicFormControlType, DynamicFormOutputData, DynamicFormSectionProps, DynamicFormState, DynamicFormStateItem, FieldValidation, } from './dynamic-form/models';
11
12
  export type { IconButtonProps } from './button/IconButton';
12
13
  export type { InputTextProps } from './input-form-fields/InputText';
13
- export type { InputSelectProps, InputSelectOption } from './input-form-fields/InputSelect';
14
+ export type { InputSelectProps, InputSelectOption, } from './input-form-fields/InputSelect';
14
15
  export type { LinkUnderline } from './link/Link';
15
16
  export type { ListItemProps } from './list';
16
17
  export type { MenuItemProps } from './menu/Menu';
@@ -23,18 +24,20 @@ export type { DotColumnHeader, MultiSelect, Order, RowSelectionChangeHandler, Ro
23
24
  export type { TabProps } from './tabs/Tabs';
24
25
  export type { TypographyVariant } from './typography/Typography';
25
26
  export type { ProgressButtonProps } from './progress-button/ProgressButton';
27
+ export type { PopperPlacementType } from './popper';
28
+ export type { DividerOrientation, DividerProps, DividerVariant, } from './divider';
26
29
  export { DotAccordion } from './accordion/Accordion';
27
30
  export { DotActionToolbar } from './action-toolbar/ActionToolbar';
28
31
  export { DotAlertBanner } from './alert-banner/AlertBanner';
29
32
  export { DotAppLogo } from './app-logo/AppLogo';
30
33
  export { DotAppToolbar } from './app-toolbar/AppToolbar';
31
- export { DotAutoComplete, parseAutoCompleteValue, } from './auto-complete/AutoComplete';
34
+ export { DotAutoComplete } from './auto-complete/AutoComplete';
32
35
  export { DotAvatar } from './avatar/Avatar';
33
36
  export { DotAvatarGroup } from './avatar-group/AvatarGroup';
34
37
  export { DotBadge } from './badge/Badge';
35
38
  export { DotBreadcrumbs } from './breadcrumbs/Breadcrumbs';
36
39
  export { DotButton } from './button/Button';
37
- export { DotButtonToggle } from './button-toggle/ButtonToggle';
40
+ export { DotButtonToggle } from './button-toggle';
38
41
  export { DotCard } from './card/Card';
39
42
  export { DotCardContent } from './card/CardContent';
40
43
  export { DotCardFooter } from './card/CardFooter';
@@ -77,3 +80,6 @@ export { DotTooltip } from './tooltip/Tooltip';
77
80
  export { DotTabs } from './tabs/Tabs';
78
81
  export { DotTypography } from './typography/Typography';
79
82
  export { DotFileUpload } from './file-upload/FileUpload';
83
+ export { parseAutoCompleteValue } from './auto-complete/utils/helpers';
84
+ export { DotDivider } from './divider';
85
+ export { DotPopper } from './popper';
@@ -26,6 +26,8 @@ export interface MenuProps extends CommonProps {
26
26
  onSelect?: (event: MouseEvent | KeyboardEvent, menuId: string, itemKey: string) => void;
27
27
  /** If true, the menu is open. */
28
28
  open?: boolean;
29
+ /** Key of the item which needs to be selected. If provided, item will be highlighted. */
30
+ selectedKey?: string;
29
31
  }
30
32
  export interface MenuItemProps {
31
33
  /** Defines a string value that labels the current element **/
@@ -34,9 +36,13 @@ export interface MenuItemProps {
34
36
  children?: ReactNode;
35
37
  /** Space delimited CSS classes to be attributed to the menu item */
36
38
  classes?: string;
39
+ /** If true, a 1px light border is added to the bottom of the menu item. */
40
+ divider?: boolean;
37
41
  /** Used to set custom item height (in pixels). This value has priority over "menuItemHeight" prop. */
38
42
  height?: number;
43
+ /** Children items, for multi-level menu display */
44
+ items?: MenuItemProps[];
39
45
  /** A key that can be used to determine which item was clicked */
40
46
  key?: string;
41
47
  }
42
- export declare const DotMenu: ({ anchorEl, ariaLabel, className, "data-testid": dataTestId, dense, disablePortal, id, loading, maxVisibleItems, menuItemHeight, menuItems, menuPlacement, onLeave, onSelect, open, }: MenuProps) => JSX.Element;
48
+ export declare const DotMenu: ({ anchorEl, ariaLabel, className, "data-testid": dataTestId, dense, disablePortal, id, loading, maxVisibleItems, menuItemHeight, menuItems, menuPlacement, onLeave, onSelect, open, selectedKey, }: MenuProps) => JSX.Element;
@@ -9,6 +9,7 @@ export declare const defaultMenuItems: ({
9
9
  key: string;
10
10
  classes?: undefined;
11
11
  })[];
12
+ export declare const multiLevelMenuItems: MenuItemProps[];
12
13
  export declare const buttonMenuItems: {
13
14
  children: string;
14
15
  key: string;
@@ -1,2 +1,4 @@
1
1
  export declare const rootClassName = "dot-menu-wrapper";
2
+ export declare const multiLevelClassName = "dot-multi-level-menu";
2
3
  export declare const StyledMenuWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export declare const StyledMultiLevelMenu: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,26 @@
1
+ import React, { KeyboardEvent, KeyboardEventHandler, MouseEvent, ReactNode } from 'react';
2
+ import { CommonProps } from '../CommonProps';
3
+ import { MenuItemProps } from './Menu';
4
+ export interface SubMenuCreateArgs {
5
+ anchorElement: Element;
6
+ isOpened: boolean;
7
+ subMenuId: string;
8
+ subMenuItems: MenuItemProps[];
9
+ }
10
+ export interface MenuListProps extends CommonProps {
11
+ autoFocusItem?: boolean;
12
+ dense?: boolean;
13
+ id?: string;
14
+ maxVisibleItems: number;
15
+ menuItemHeight: number | string;
16
+ menuItems: Array<MenuItemProps>;
17
+ onItemSelect?: (event: MouseEvent | KeyboardEvent, itemKey: string) => void;
18
+ onKeyDown?: KeyboardEventHandler<Element>;
19
+ onSubMenuCreate?: (args: SubMenuCreateArgs) => ReactNode;
20
+ selectedKey?: string;
21
+ }
22
+ /**
23
+ * Since this component is used inside 'ClickAwayListener',
24
+ * it needs to be contained within 'forwardRef' function
25
+ */
26
+ export declare const DotMenuList: React.ForwardRefExoticComponent<MenuListProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,5 @@
1
+ import { MenuList } from '@material-ui/core';
2
+ export declare const rootClassName = "dot-ul";
3
+ export declare const listItemClassName = "dot-li";
4
+ export declare const listItemWithSubmenuClassName = "dot-li-with-submenu";
5
+ export declare const StyledMenuList: import("styled-components").StyledComponent<typeof MenuList, any, {}, never>;
@@ -9,4 +9,8 @@ export declare const getDefaultItemHeight: (isDense: boolean) => 28 | 33;
9
9
  export declare const calculateItemHeight: (isDense: boolean, customItemHeight?: number, menuItemHeight?: number | string) => number | string;
10
10
  export declare const getNumberOfVisibleItems: (numberOfItems: number, maxVisibleItems?: number) => number;
11
11
  export declare const calculateMaxHeight: ({ isDense, maxVisibleItems, menuItems, menuItemHeight, }: MaxHeightCalculationArgs) => number | string;
12
+ export declare const checkForSubItems: (menuItems: MenuItemProps[]) => boolean;
13
+ export declare const checkIfSubmenu: (anchorElement: Element) => boolean;
14
+ export declare const checkIfMenuItemSelected: (key: string, selectedKey: string, activeSubmenu: string) => boolean;
15
+ export declare const checkForAutoFocus: (autoFocusItem: boolean, isFirstItem: boolean) => boolean;
12
16
  export {};
@@ -0,0 +1,18 @@
1
+ import { KeyboardEvent, MouseEvent, ReactNode } from 'react';
2
+ import { PopperPlacementType } from '@material-ui/core';
3
+ import { CommonProps } from '../CommonProps';
4
+ export interface PopperProps extends CommonProps {
5
+ /** Element that popper is attached to */
6
+ anchorEl?: Element;
7
+ /** The content of the component */
8
+ children: ReactNode;
9
+ /** Disable the portal behavior. If `true`, children stay within parent DOM hierarchy. */
10
+ disablePortal?: boolean;
11
+ /** Event callback when leaving popper by clicking away */
12
+ onClickAway?: (event: KeyboardEvent | MouseEvent<Document>) => void;
13
+ /** If `true`, the popper is visible. */
14
+ open: boolean;
15
+ /** Popper placement. */
16
+ placement?: PopperPlacementType;
17
+ }
18
+ export declare const DotPopper: ({ ariaLabel, anchorEl, children, className, "data-testid": dataTestId, disablePortal, onClickAway, open, placement, }: PopperProps) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { KeyboardEvent, MouseEvent } from 'react';
2
+ export interface PopperTestWrapperProps {
3
+ dataTestId?: string;
4
+ disablePortal?: boolean;
5
+ onClickAway?: (event: KeyboardEvent | MouseEvent<Document>) => void;
6
+ }
7
+ export declare const PopperTestWrapper: (props: PopperTestWrapperProps) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { ButtonToggleValue } from '../button-toggle';
3
+ export interface FlagTaskProps {
4
+ onChange: (optionValue: ButtonToggleValue) => void;
5
+ }
6
+ export declare const FlagTask: ({ onChange }: FlagTaskProps) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare const defaultStoryClassName = "dot-popper-default";
2
+ export declare const flagTaskClassName = "dot-flag-task";
3
+ export declare const StyledPopperStory: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export declare const StyledFlagTask: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,3 @@
1
+ import { Popper } from '@material-ui/core';
2
+ export declare const rootClassName = "dot-popper";
3
+ export declare const StyledPopper: import("styled-components").StyledComponent<typeof Popper, any, {}, never>;
@@ -0,0 +1,2 @@
1
+ export { PopperPlacementType } from '@material-ui/core';
2
+ export * from './Popper';
@@ -1,5 +1,6 @@
1
1
  import { MouseEvent } from 'react';
2
2
  import { ListItemProps } from '../list/utils/models';
3
+ export declare const childElement: JSX.Element;
3
4
  export declare const getNavigationItems: (isSelected: (key: number) => boolean, handleClick: (key: number) => void) => ({
4
5
  startIconId: string;
5
6
  onClick: import("@storybook/addon-actions").HandlerFunction;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  export declare const rootClassName = "dot-split-button-group";
3
3
  export declare const StyledSplitButtonGroup: import("styled-components").StyledComponent<import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").ButtonGroupTypeMap<{}, "div">>, any, {}, never>;
4
- export declare const StyledMenu: import("styled-components").StyledComponent<({ anchorEl, ariaLabel, className, "data-testid": dataTestId, dense, disablePortal, id, loading, maxVisibleItems, menuItemHeight, menuItems, menuPlacement, onLeave, onSelect, open, }: import("../menu/Menu").MenuProps) => JSX.Element, any, {}, never>;
4
+ export declare const StyledMenu: import("styled-components").StyledComponent<({ anchorEl, ariaLabel, className, "data-testid": dataTestId, dense, disablePortal, id, loading, maxVisibleItems, menuItemHeight, menuItems, menuPlacement, onLeave, onSelect, open, selectedKey, }: import("../menu/Menu").MenuProps) => JSX.Element, any, {}, never>;
@@ -0,0 +1,43 @@
1
+ /// <reference types="react" />
2
+ export declare const handleDeleteClick: () => void;
3
+ export declare const handleBulkDeleteClick: () => void;
4
+ export declare const actionItemArray: {
5
+ actions: {
6
+ children: JSX.Element;
7
+ key: string;
8
+ onclick: () => void;
9
+ }[];
10
+ }[];
11
+ export declare const actionCol: {
12
+ id: string;
13
+ label: string;
14
+ }[];
15
+ export declare const tableData: {
16
+ id: string;
17
+ rowData: {
18
+ action: {
19
+ actions: {
20
+ children: JSX.Element;
21
+ key: string;
22
+ onclick: () => void;
23
+ }[];
24
+ }[];
25
+ type: string;
26
+ };
27
+ }[];
28
+ export declare const testCols: ({
29
+ id: string;
30
+ label: string;
31
+ truncate: boolean;
32
+ } | {
33
+ id: string;
34
+ label: string;
35
+ truncate?: undefined;
36
+ })[];
37
+ export declare const testData: {
38
+ id: string;
39
+ rowData: {
40
+ name: string;
41
+ type: string;
42
+ };
43
+ }[];
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { TextAlignment } from './TableCell';
3
+ import { TableProps } from './Table';
3
4
  export declare const actionMenuColumns: ({
4
5
  id: string;
5
6
  label: string;
@@ -119,3 +120,4 @@ export declare const paginatedData: {
119
120
  hit: string;
120
121
  };
121
122
  }[];
123
+ export declare const MultiSelectTable: (props: TableProps) => JSX.Element;
@@ -3,4 +3,4 @@ import { Paper } from '@material-ui/core';
3
3
  export declare const rootClassName = "dot-table";
4
4
  export declare const StyledPaper: import("styled-components").StyledComponent<typeof Paper, any, {}, never>;
5
5
  export declare const StyledTableContainer: import("styled-components").StyledComponent<import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").TableContainerTypeMap<{}, "div">>, any, {}, never>;
6
- export declare const StyledMenu: import("styled-components").StyledComponent<({ anchorEl, ariaLabel, className, "data-testid": dataTestId, dense, disablePortal, id, loading, maxVisibleItems, menuItemHeight, menuItems, menuPlacement, onLeave, onSelect, open, }: import("../menu/Menu").MenuProps) => JSX.Element, any, {}, never>;
6
+ export declare const StyledMenu: import("styled-components").StyledComponent<({ anchorEl, ariaLabel, className, "data-testid": dataTestId, dense, disablePortal, id, loading, maxVisibleItems, menuItemHeight, menuItems, menuPlacement, onLeave, onSelect, open, selectedKey, }: import("../menu/Menu").MenuProps) => JSX.Element, any, {}, never>;
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
2
2
  import { CommonProps } from '../CommonProps';
3
3
  export interface TableSelectionToolbarProps extends CommonProps {
4
4
  bulkActions?: ReactNode;
5
+ onClearAll?: () => void;
5
6
  selectedRowsNumber: number;
6
7
  }
7
- export declare const DotTableSelectionToolbar: ({ ariaLabel, bulkActions, className, "data-testid": dataTestId, selectedRowsNumber, }: TableSelectionToolbarProps) => JSX.Element;
8
+ export declare const DotTableSelectionToolbar: ({ ariaLabel, bulkActions, className, "data-testid": dataTestId, onClearAll, selectedRowsNumber, }: TableSelectionToolbarProps) => JSX.Element;
@@ -7,6 +7,7 @@ export interface MultiSelect {
7
7
  bulkActions?: ReactNode;
8
8
  onCheckAllChange?: TableRowSelectChangeHandler;
9
9
  onCheckRowChange?: TableRowSelectChangeHandler;
10
+ onClearAllChange?: TableRowSelectChangeHandler;
10
11
  }
11
12
  interface MultiSelectTableBase {
12
13
  selectedTableRowIds: string[];
@@ -0,0 +1,60 @@
1
+ import React, { ReactNode } from 'react';
2
+ export { mockResizeObserver } from './resize-observer-mock';
3
+ declare const renderWithTheme: (ui: ReactNode) => {
4
+ container: HTMLElement;
5
+ baseElement: Element;
6
+ debug: (baseElement?: Element | DocumentFragment | (Element | DocumentFragment)[], maxLength?: number, options?: import("pretty-format").PrettyFormatOptions) => void;
7
+ rerender: (ui: React.ReactElement<any, string | React.JSXElementConstructor<any>>) => void;
8
+ unmount: () => void;
9
+ asFragment: () => DocumentFragment;
10
+ getByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions) => HTMLElement;
11
+ getAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions) => HTMLElement[];
12
+ queryByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions) => HTMLElement;
13
+ queryAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions) => HTMLElement[];
14
+ findByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions, waitForElementOptions?: import("@testing-library/react").waitForOptions) => Promise<HTMLElement>;
15
+ findAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions, waitForElementOptions?: import("@testing-library/react").waitForOptions) => Promise<HTMLElement[]>;
16
+ getByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions) => HTMLElement;
17
+ getAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions) => HTMLElement[];
18
+ queryByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions) => HTMLElement;
19
+ queryAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions) => HTMLElement[];
20
+ findByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions, waitForElementOptions?: import("@testing-library/react").waitForOptions) => Promise<HTMLElement>;
21
+ findAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions, waitForElementOptions?: import("@testing-library/react").waitForOptions) => Promise<HTMLElement[]>;
22
+ getByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions) => HTMLElement;
23
+ getAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions) => HTMLElement[];
24
+ queryByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions) => HTMLElement;
25
+ queryAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions) => HTMLElement[];
26
+ findByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions, waitForElementOptions?: import("@testing-library/react").waitForOptions) => Promise<HTMLElement>;
27
+ findAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions, waitForElementOptions?: import("@testing-library/react").waitForOptions) => Promise<HTMLElement[]>;
28
+ getByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions) => HTMLElement;
29
+ getAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions) => HTMLElement[];
30
+ queryByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions) => HTMLElement;
31
+ queryAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions) => HTMLElement[];
32
+ findByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions, waitForElementOptions?: import("@testing-library/react").waitForOptions) => Promise<HTMLElement>;
33
+ findAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions, waitForElementOptions?: import("@testing-library/react").waitForOptions) => Promise<HTMLElement[]>;
34
+ getByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions) => HTMLElement;
35
+ getAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions) => HTMLElement[];
36
+ queryByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions) => HTMLElement;
37
+ queryAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions) => HTMLElement[];
38
+ findByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions, waitForElementOptions?: import("@testing-library/react").waitForOptions) => Promise<HTMLElement>;
39
+ findAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions, waitForElementOptions?: import("@testing-library/react").waitForOptions) => Promise<HTMLElement[]>;
40
+ getByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions) => HTMLElement;
41
+ getAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions) => HTMLElement[];
42
+ queryByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions) => HTMLElement;
43
+ queryAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions) => HTMLElement[];
44
+ findByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions, waitForElementOptions?: import("@testing-library/react").waitForOptions) => Promise<HTMLElement>;
45
+ findAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions, waitForElementOptions?: import("@testing-library/react").waitForOptions) => Promise<HTMLElement[]>;
46
+ getByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions) => HTMLElement;
47
+ getAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions) => HTMLElement[];
48
+ queryByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions) => HTMLElement;
49
+ queryAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions) => HTMLElement[];
50
+ findByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions, waitForElementOptions?: import("@testing-library/react").waitForOptions) => Promise<HTMLElement>;
51
+ findAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions, waitForElementOptions?: import("@testing-library/react").waitForOptions) => Promise<HTMLElement[]>;
52
+ getByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions) => HTMLElement;
53
+ getAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions) => HTMLElement[];
54
+ queryByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions) => HTMLElement;
55
+ queryAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions) => HTMLElement[];
56
+ findByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions, waitForElementOptions?: import("@testing-library/react").waitForOptions) => Promise<HTMLElement>;
57
+ findAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions, waitForElementOptions?: import("@testing-library/react").waitForOptions) => Promise<HTMLElement[]>;
58
+ };
59
+ export * from '@testing-library/react';
60
+ export { renderWithTheme as render };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "1.7.0",
3
+ "version": "1.9.1",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [
@@ -13,8 +13,8 @@
13
13
  "type": "git",
14
14
  "url": "git://github.com/digital-ai/dot-components.git"
15
15
  },
16
- "main": "./dot-components.umd.js",
17
- "module": "./dot-components.esm.js",
16
+ "main": "./index.umd.js",
17
+ "module": "./index.esm.js",
18
18
  "typings": "./index.d.ts",
19
19
  "description": "A component library the follows the Dot Design System",
20
20
  "bugs": {
@@ -33,6 +33,6 @@
33
33
  },
34
34
  "peerDependencies": {
35
35
  "react": "^16.8.0 || ^17.0.0",
36
- "react-router-dom": "^5.2.0"
36
+ "react-router-dom": "5.3.0"
37
37
  }
38
38
  }