@datarobot/design-system 30.6.4 → 30.8.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.
Files changed (64) hide show
  1. package/cjs/button/button.d.ts +21 -21
  2. package/cjs/chat/chat-message-body.js +9 -7
  3. package/cjs/chat/utils.js +5 -1
  4. package/cjs/datetime-picker/datetime-picker.d.ts +2 -2
  5. package/cjs/datetime-range-picker/helpers.d.ts +12 -12
  6. package/cjs/dropdown-menu/dropdown-menu-content.d.ts +1 -1
  7. package/cjs/dropdown-menu/utils.d.ts +30 -31
  8. package/cjs/file-uploader/file-uploader-hook.d.ts +1 -1
  9. package/cjs/floating-panel/constants.d.ts +0 -1
  10. package/cjs/font-awesome-icon/font-awesome-icon.d.ts +0 -1
  11. package/cjs/form-field/utilities.d.ts +1 -1
  12. package/cjs/full-screen-drawer/useFullScreenDrawer.d.ts +0 -1
  13. package/cjs/hooks/use-analytics/use-analytics.d.ts +13 -13
  14. package/cjs/hooks/use-focus-trap/use-focus-trap.d.ts +0 -1
  15. package/cjs/hooks/use-non-native-button-attrs/use-non-native-button-attrs.d.ts +2 -2
  16. package/cjs/hooks/use-ordering/use-ordering.d.ts +0 -1
  17. package/cjs/hooks/use-paginated-search/use-paginated-search.d.ts +2 -2
  18. package/cjs/hooks/use-translation/use-translation.d.ts +20 -19
  19. package/cjs/input/input.d.ts +54 -54
  20. package/cjs/range-slider/context.d.ts +0 -1
  21. package/cjs/table/hooks/use-checkbox-cells-state/use-checkbox-cells-state.d.ts +0 -1
  22. package/cjs/table-react/hooks/useTableReact.d.ts +3 -3
  23. package/cjs/table-react/utils/getHeaderColumnsActions.d.ts +1 -1
  24. package/cjs/text-editor/edited-text.js +12 -4
  25. package/cjs/text-editor/text-editor.js +8 -1
  26. package/cjs/textarea/textarea.d.ts +2 -2
  27. package/cjs/time-from-now/time-from-now.d.ts +1 -1
  28. package/cjs/tour/advanced-tour/hooks.d.ts +0 -1
  29. package/cjs/tour/hooks.d.ts +0 -1
  30. package/cjs/typeahead/use-visible-options.d.ts +3 -3
  31. package/esm/button/button.d.ts +21 -21
  32. package/esm/chat/chat-message-body.js +9 -7
  33. package/esm/chat/utils.js +4 -1
  34. package/esm/datetime-picker/datetime-picker.d.ts +2 -2
  35. package/esm/datetime-range-picker/helpers.d.ts +12 -12
  36. package/esm/dropdown-menu/dropdown-menu-content.d.ts +1 -1
  37. package/esm/dropdown-menu/utils.d.ts +30 -31
  38. package/esm/file-uploader/file-uploader-hook.d.ts +1 -1
  39. package/esm/floating-panel/constants.d.ts +0 -1
  40. package/esm/font-awesome-icon/font-awesome-icon.d.ts +0 -1
  41. package/esm/form-field/utilities.d.ts +1 -1
  42. package/esm/full-screen-drawer/useFullScreenDrawer.d.ts +0 -1
  43. package/esm/hooks/use-analytics/use-analytics.d.ts +13 -13
  44. package/esm/hooks/use-focus-trap/use-focus-trap.d.ts +0 -1
  45. package/esm/hooks/use-non-native-button-attrs/use-non-native-button-attrs.d.ts +2 -2
  46. package/esm/hooks/use-ordering/use-ordering.d.ts +0 -1
  47. package/esm/hooks/use-paginated-search/use-paginated-search.d.ts +2 -2
  48. package/esm/hooks/use-translation/use-translation.d.ts +20 -19
  49. package/esm/input/input.d.ts +54 -54
  50. package/esm/range-slider/context.d.ts +0 -1
  51. package/esm/table/hooks/use-checkbox-cells-state/use-checkbox-cells-state.d.ts +0 -1
  52. package/esm/table-react/hooks/useTableReact.d.ts +3 -3
  53. package/esm/table-react/utils/getHeaderColumnsActions.d.ts +1 -1
  54. package/esm/text-editor/edited-text.js +12 -4
  55. package/esm/text-editor/text-editor.js +8 -1
  56. package/esm/textarea/textarea.d.ts +2 -2
  57. package/esm/time-from-now/time-from-now.d.ts +1 -1
  58. package/esm/tour/advanced-tour/hooks.d.ts +0 -1
  59. package/esm/tour/hooks.d.ts +0 -1
  60. package/esm/typeahead/use-visible-options.d.ts +3 -3
  61. package/js/bundle/bundle.js +89 -18
  62. package/js/bundle/bundle.min.js +1 -1
  63. package/js/bundle/index.d.ts +135 -134
  64. package/package.json +55 -55
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * @typedef {Object} CheckboxesManagement
4
3
  * @property {boolean[]} items - checkboxes array state
@@ -42,7 +42,7 @@ export declare function useTableReact<FiltersData>({ tableId, version, debounceS
42
42
  };
43
43
  reset: () => void;
44
44
  defaultState: {
45
- defaultColumnSizing?: ColumnSizingState | undefined;
45
+ defaultColumnSizing?: ColumnSizingState;
46
46
  sorting: SortingState;
47
47
  visible: {};
48
48
  pagination: PaginationState;
@@ -51,7 +51,7 @@ export declare function useTableReact<FiltersData>({ tableId, version, debounceS
51
51
  selected: {};
52
52
  expandedRows: {};
53
53
  columnOrder: ColumnOrderState;
54
- touched?: Touched | undefined;
54
+ touched?: Touched;
55
55
  filters?: FiltersData | undefined;
56
56
  columnSizing: {};
57
57
  } | {
@@ -64,7 +64,7 @@ export declare function useTableReact<FiltersData>({ tableId, version, debounceS
64
64
  selected: {};
65
65
  expandedRows: {};
66
66
  columnOrder: ColumnOrderState;
67
- touched?: Touched | undefined;
67
+ touched?: Touched;
68
68
  filters?: FiltersData | undefined;
69
69
  };
70
70
  };
@@ -34,4 +34,4 @@ export declare function getHeaderColumnsActions({ isPinned, canSort, canPin, isP
34
34
  } | {
35
35
  key: string;
36
36
  subOptions: DropdownMenuOption[];
37
- } | null)[];
37
+ })[];
@@ -7,6 +7,7 @@ exports.default = EditedText;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _classnames = _interopRequireDefault(require("classnames"));
9
9
  var _isEqual = _interopRequireDefault(require("lodash-es/isEqual"));
10
+ var _cloneDeep = _interopRequireDefault(require("lodash-es/cloneDeep"));
10
11
  var _slateHistory = require("slate-history");
11
12
  var _chat = require("../chat");
12
13
  var _textEditorContext = _interopRequireDefault(require("./text-editor-context"));
@@ -37,12 +38,19 @@ function EditedTextComponent({
37
38
  Slate
38
39
  } = slateReact;
39
40
  const editor = (0, _react.useMemo)(() => (0, _withLinks.default)((0, _slateHistory.withHistory)(withReact(createEditor()))), []);
41
+
42
+ // Clone the incoming value so this editor instance owns its own Slate node
43
+ // references. slate-dom 0.123+ keys internal WeakMaps by node identity, and
44
+ // sharing node references across editors (e.g. the same value bound to a
45
+ // form's TextEditor and a preview's EditedText at the same time) makes
46
+ // findPath throw "Unable to find the path for Slate node".
47
+ const slateValue = (0, _react.useMemo)(() => value ? (0, _cloneDeep.default)(value) : value, [value]);
40
48
  (0, _react.useEffect)(() => {
41
- if (value && !(0, _isEqual.default)(editor.children, value)) {
49
+ if (slateValue && !(0, _isEqual.default)(editor.children, slateValue)) {
42
50
  // Update the cached value inside the editor
43
- (0, _chat.resetNodes)(editor, value);
51
+ (0, _chat.resetNodes)(editor, slateValue);
44
52
  }
45
- }, [value, editor]);
53
+ }, [slateValue, editor]);
46
54
  const ariaAttrs = (0, _react.useMemo)(() => {
47
55
  return {
48
56
  'aria-label': ariaLabel
@@ -53,7 +61,7 @@ function EditedTextComponent({
53
61
  // Slate throws an error when no onChange is given, providing a noop func to avoid issues
54
62
  (0, _jsxRuntime.jsx)(Slate, {
55
63
  editor: editor,
56
- initialValue: value,
64
+ initialValue: slateValue,
57
65
  onChange: () => undefined,
58
66
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_textEditorContent.default, {
59
67
  placeholder: placeholder,
@@ -7,6 +7,7 @@ exports.default = TextEditor;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _classnames = _interopRequireDefault(require("classnames"));
9
9
  var _isEqual = _interopRequireDefault(require("lodash-es/isEqual"));
10
+ var _cloneDeep = _interopRequireDefault(require("lodash-es/cloneDeep"));
10
11
  var _slateHistory = require("slate-history");
11
12
  var _formField = require("../form-field");
12
13
  var _chat = require("../chat");
@@ -79,7 +80,13 @@ function TextEditorComponent({
79
80
  }, [getCharactersCounterString]);
80
81
  const editor = (0, _react.useMemo)(() => (0, _chat.withMaxLength)(maxLength)((0, _withLinks.default)((0, _slateHistory.withHistory)(withReact(createEditor())))), [maxLength]);
81
82
  const selection = (0, _react.useRef)(null);
82
- const slateValue = value || initialValue || _textEditorConstants.TEXT_EDITOR_DEFAULT_VALUE;
83
+ // Clone the incoming value so this editor instance owns its own Slate node
84
+ // references. slate-dom 0.123+ keys internal WeakMaps by node identity, and
85
+ // sharing the same node references across editors (e.g. several editors
86
+ // falling back to TEXT_EDITOR_DEFAULT_VALUE, or the same parent state being
87
+ // bound to multiple editors at once) makes findPath throw
88
+ // "Unable to find the path for Slate node".
89
+ const slateValue = (0, _react.useMemo)(() => (0, _cloneDeep.default)(value || initialValue || _textEditorConstants.TEXT_EDITOR_DEFAULT_VALUE), [value, initialValue]);
83
90
  (0, _react.useEffect)(() => {
84
91
  if (!(0, _isEqual.default)(editor.children, slateValue)) {
85
92
  // Update the cached value inside the editor
@@ -19,6 +19,6 @@ export function TextArea(props: FormFieldProps) {
19
19
  * [CAPITALIZATION] Don't have mixed format in one text block, use sentence case
20
20
  */
21
21
  export declare const TextArea: React.ForwardRefExoticComponent<FormFieldProps & Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & {
22
- useFont?: boolean | undefined;
23
- allowResizing?: boolean | TextAreaResizeValues | undefined;
22
+ useFont?: boolean;
23
+ allowResizing?: boolean | TextAreaResizeValues;
24
24
  } & React.RefAttributes<HTMLTextAreaElement>>;
@@ -9,6 +9,6 @@ export type TimeFromNowProps = {
9
9
  tooltipPlacement?: TooltipPlacementsType;
10
10
  tooltipDelayType?: TooltipDelayType;
11
11
  };
12
- export declare const getLocalTime: (timestamp: number | string, standard?: 'utc') => moment.Moment;
12
+ export declare const getLocalTime: (timestamp: number | string, standard?: "utc") => moment.Moment;
13
13
  declare const TimeFromNow: ({ timestamp, format, standard, hideSuffix, showTooltip, tooltipPlacement, tooltipDelayType, }: TimeFromNowProps) => import("react/jsx-runtime").JSX.Element;
14
14
  export default TimeFromNow;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { AdvancedTourHooksParams } from './types';
3
2
  /**
4
3
  * useAdvancedTour is required to add AdvancedTour on the page where you need it. * */
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TourHooksParams } from './types';
3
2
  export declare const useTour: ({ isShowTour, tourId, }: TourHooksParams) => {
4
3
  advancedTourStepId: number;
@@ -1,9 +1,9 @@
1
1
  import { TypeaheadOption } from './typeahead';
2
2
  export declare const useVisibleOptions: ({ formatSearchValue, searchValue, options, searchFields, isShowAll, }: {
3
- formatSearchValue?: ((value?: string) => string) | undefined;
4
- searchValue?: string | undefined;
3
+ formatSearchValue?: (value?: string) => string;
4
+ searchValue?: string;
5
5
  options: TypeaheadOption[];
6
- searchFields?: string[] | undefined;
6
+ searchFields?: string[];
7
7
  isShowAll: boolean;
8
8
  }) => {
9
9
  visibleOptions: TypeaheadOption[];
@@ -66,48 +66,48 @@ export type ButtonProps = {
66
66
  */
67
67
  declare const Button: React.ForwardRefExoticComponent<{
68
68
  /** Specifies an event handler. */
69
- onClick?: ((event: MouseEvent<HTMLButtonElement>) => void) | undefined;
69
+ onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
70
70
  /** Specifies content of the button. */
71
71
  children?: React.ReactNode;
72
72
  /** Specifies the look of the button. */
73
- accentType?: AccentType | undefined;
73
+ accentType?: AccentType;
74
74
  /** Specifies that a button should automatically get focus when the page loads. */
75
- autofocus?: boolean | undefined;
75
+ autofocus?: boolean;
76
76
  /** Specifies an additional css class. */
77
- className?: string | undefined;
77
+ className?: string;
78
78
  /** Specifies that a button should be disabled. */
79
- isDisabled?: boolean | undefined;
79
+ isDisabled?: boolean;
80
80
  /** Specifies the form element the button belongs to. Should be used for buttons located outside a form. Applicable to buttons of submit type. */
81
- formId?: string | undefined;
81
+ formId?: string;
82
82
  /** Shows loading icon. */
83
- isLoading?: boolean | undefined;
83
+ isLoading?: boolean;
84
84
  /** Specifies loading text. */
85
- loadingText?: string | undefined;
85
+ loadingText?: string;
86
86
  /** Specifies the button size. Note: applicable to round button only. */
87
- size?: ButtonSize | undefined;
87
+ size?: ButtonSize;
88
88
  /** Specifies the type of button. */
89
- type?: ButtonType | undefined;
89
+ type?: ButtonType;
90
90
  /** Specifies button width to 100% */
91
- fullWidth?: boolean | undefined;
91
+ fullWidth?: boolean;
92
92
  /** Specifies button tooltip text. If text is equal to false or empty string tooltip won't be applied */
93
93
  tooltipText?: React.ReactNode;
94
94
  /** Specifies the tooltip placement of the button. */
95
- tooltipPlacement?: TooltipPlacementsType | undefined;
95
+ tooltipPlacement?: TooltipPlacementsType;
96
96
  /** Set docs link for the tooltip */
97
97
  tooltipDocsLink?: React.ReactNode;
98
98
  /** Font Awesome icon for field with left side icon */
99
- leftIcon?: IconLookup | null | undefined;
99
+ leftIcon?: IconLookup | null;
100
100
  /** Font Awesome icon for field with right side icon */
101
- rightIcon?: IconLookup | null | undefined;
101
+ rightIcon?: IconLookup | null;
102
102
  /** Used for tests */
103
- testId?: string | undefined;
104
- leftIconTestId?: string | undefined;
105
- rightIconTestId?: string | undefined;
103
+ testId?: string;
104
+ leftIconTestId?: string;
105
+ rightIconTestId?: string;
106
106
  /** Used for onboarding tours */
107
- tourId?: string | undefined;
107
+ tourId?: string;
108
108
  /** Use ariaLabel only when there is not text and icon is the only content. aria-label will work too */
109
- ariaLabel?: string | undefined;
110
- tooltipDelayType?: TooltipDelayType | undefined;
111
- hasCustomButtonContent?: boolean | undefined;
109
+ ariaLabel?: string;
110
+ tooltipDelayType?: TooltipDelayType;
111
+ hasCustomButtonContent?: boolean;
112
112
  } & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
113
113
  export default Button;
@@ -1,5 +1,6 @@
1
1
  import React, { useMemo, useState, useCallback, useRef, useEffect, memo } from 'react';
2
2
  import isEqual from 'lodash-es/isEqual';
3
+ import cloneDeep from 'lodash-es/cloneDeep';
3
4
  import classNames from 'classnames';
4
5
  import { Editor, createEditor, Transforms, Range } from 'slate';
5
6
  import { Slate, Editable, ReactEditor, withReact } from 'slate-react';
@@ -28,8 +29,9 @@ function ChatMessageBodyBase({
28
29
  editableContentClassName,
29
30
  mentionsPropmptText,
30
31
  autoFocus,
31
- value = DEFAULT_VALUE
32
+ value
32
33
  }) {
34
+ const slateValue = useMemo(() => cloneDeep(value ?? DEFAULT_VALUE), [value]);
33
35
  const anchorRef = useRef(null);
34
36
  const [target, setTarget] = useState();
35
37
  const [search, setSearch] = useState('');
@@ -46,10 +48,10 @@ function ChatMessageBodyBase({
46
48
  event.preventDefault();
47
49
  onSubmit({
48
50
  key: itemKey,
49
- value
51
+ value: slateValue
50
52
  });
51
53
  }
52
- }, [mentions, target, value, itemKey, onSubmit]);
54
+ }, [mentions, target, slateValue, itemKey, onSubmit]);
53
55
  const handleChange = useCallback(val => {
54
56
  onChange({
55
57
  key: itemKey,
@@ -116,14 +118,14 @@ function ChatMessageBodyBase({
116
118
  });
117
119
  }, [search]);
118
120
  useEffect(() => {
119
- if (!isEqual(editor.children, value)) {
120
- resetNodes(editor, value);
121
+ if (!isEqual(editor.children, slateValue)) {
122
+ resetNodes(editor, slateValue);
121
123
  }
122
- }, [value, editor]);
124
+ }, [slateValue, editor]);
123
125
  return /*#__PURE__*/_jsxs(_Fragment, {
124
126
  children: [/*#__PURE__*/_jsxs(Slate, {
125
127
  editor: editor,
126
- initialValue: value,
128
+ initialValue: slateValue,
127
129
  onChange: handleChange,
128
130
  children: [/*#__PURE__*/_jsx("div", {
129
131
  "test-id": `chat-item-body-editable-content-${itemKey}`,
package/esm/chat/utils.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Editor, Transforms } from 'slate';
2
+ import cloneDeep from 'lodash-es/cloneDeep';
2
3
  import { CUSTOM_ELEMENT_TYPES } from './constants';
3
4
  export function isMentionElement(type) {
4
5
  return type === CUSTOM_ELEMENT_TYPES.mention;
@@ -26,10 +27,12 @@ export function resetNodes(editor, nodes) {
26
27
  path: [0],
27
28
  node
28
29
  }));
30
+
31
+ // Clone nodes before inserting so multiple editors never share Slate node refs.
29
32
  nodes.forEach((node, i) => editor.apply({
30
33
  type: 'insert_node',
31
34
  path: [i],
32
- node
35
+ node: cloneDeep(node)
33
36
  }));
34
37
  const point = Editor.end(editor, []);
35
38
  Transforms.select(editor, point);
@@ -1,5 +1,5 @@
1
1
  import React, { ComponentType, FocusEvent, FocusEventHandler, HTMLProps } from 'react';
2
- import Datetime, { ViewMode, TimeConstraints } from 'react-datetime';
2
+ import { ViewMode, TimeConstraints } from 'react-datetime';
3
3
  import { Moment, MomentInput } from 'moment';
4
4
  import { InputProps } from '../input';
5
5
  import { DATE_PICKER_START_END_DATE, DATE_PICKER_VALUE, DatePickerPlacement, DATE_PICKER_VALIDITY } from './types';
@@ -57,7 +57,7 @@ export declare class DatePicker extends React.Component<DatePickerProps> {
57
57
  onNavigate: () => void;
58
58
  onNavigateBack: () => void;
59
59
  onNavigateForward: () => void;
60
- initialViewMode: Datetime.ViewMode;
60
+ initialViewMode: ViewMode;
61
61
  closeOnSelect: boolean;
62
62
  closeOnTab: boolean;
63
63
  timeConstraints: {};
@@ -3,24 +3,24 @@ import moment, { MomentInput, Moment, unitOfTime } from 'moment';
3
3
  import Datetime from 'react-datetime';
4
4
  import { InitialDirection } from './datetime-range-picker';
5
5
  export declare function useValidateOnClick(): ({ start, end, minStart, maxEnd, viewMode, dateTimeFormat, sameDateError, }: {
6
- start?: moment.Moment | null | undefined;
7
- end?: moment.Moment | null | undefined;
6
+ start?: Moment | null;
7
+ end?: Moment | null;
8
8
  viewMode: string;
9
9
  dateTimeFormat: string;
10
- minStart?: moment.Moment | undefined;
11
- maxEnd?: moment.Moment | undefined;
12
- sameDateError?: boolean | undefined;
10
+ minStart?: Moment;
11
+ maxEnd?: Moment;
12
+ sameDateError?: boolean;
13
13
  }) => {
14
14
  startErrors: {
15
- START_BEFORE_MIN?: string | undefined;
16
- START_AFTER_MAX?: string | undefined;
17
- INVALID_START_DATE?: string | undefined;
18
- START_END_SAME?: string | undefined;
15
+ START_BEFORE_MIN?: string;
16
+ START_AFTER_MAX?: string;
17
+ INVALID_START_DATE?: string;
18
+ START_END_SAME?: string;
19
19
  };
20
20
  endErrors: {
21
- INVALID_END_DATE?: string | undefined;
22
- END_AFTER_MIN?: string | undefined;
23
- END_AFTER_MAX?: string | undefined;
21
+ INVALID_END_DATE?: string;
22
+ END_AFTER_MIN?: string;
23
+ END_AFTER_MAX?: string;
24
24
  };
25
25
  };
26
26
  /** Checks whether a string can be strictly parsed as a moment object following a provided datetime format
@@ -25,7 +25,7 @@ export type DropdownMenuContentProps = {
25
25
  handleSearch: (value: string) => void;
26
26
  selectedKey?: string | number;
27
27
  selectedItem?: DropdownMenuOption;
28
- renderCustomHeader: null | (() => void);
28
+ renderCustomHeader: null | (() => ReactNode);
29
29
  contentClassName?: string;
30
30
  labelledBy?: string;
31
31
  LinkComponent: LinkComponentType;
@@ -1,42 +1,41 @@
1
- /// <reference types="react" />
2
1
  import { DropdownMenuOption } from './types';
3
2
  export declare function getFlattenedSubsectionOptions(collection: Array<DropdownMenuOption>): DropdownMenuOption[];
4
3
  export declare function getFooterOptionWithPrivateKey(option: DropdownMenuOption): {
5
- id?: string | undefined;
4
+ id?: string;
6
5
  key: string | number;
7
- testId?: string | undefined;
8
- link?: string | undefined;
9
- icon?: import("@fortawesome/fontawesome-svg-core").IconProp | undefined;
10
- iconClass?: string | undefined;
11
- className?: string | undefined;
6
+ testId?: string;
7
+ link?: string;
8
+ icon?: import("@fortawesome/fontawesome-svg-core").IconProp;
9
+ iconClass?: string;
10
+ className?: string;
12
11
  title?: import("react").ReactNode;
13
12
  subtext?: import("react").ReactNode;
14
- searchableValue?: string | undefined;
15
- value?: string | number | undefined;
16
- disabled?: boolean | undefined;
13
+ searchableValue?: string;
14
+ value?: string | number;
15
+ disabled?: boolean;
17
16
  tooltipText?: import("react").ReactNode;
18
- tooltipTestId?: string | undefined;
19
- tooltipPlacement?: import("..").TooltipPlacementsType | undefined;
20
- tooltipDocsLink?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
21
- isChecked?: boolean | undefined;
22
- isFileUpload?: boolean | undefined;
23
- acceptedFiles?: string[] | undefined;
24
- isMultiple?: boolean | undefined;
25
- isShown?: boolean | undefined;
26
- shouldNotCloseDropdown?: boolean | undefined;
27
- isFolderUpload?: boolean | undefined;
28
- level?: string | undefined;
17
+ tooltipTestId?: string;
18
+ tooltipPlacement?: import("..").TooltipPlacementsType;
19
+ tooltipDocsLink?: import("react").ReactElement;
20
+ isChecked?: boolean;
21
+ isFileUpload?: boolean;
22
+ acceptedFiles?: Array<string>;
23
+ isMultiple?: boolean;
24
+ isShown?: boolean;
25
+ shouldNotCloseDropdown?: boolean;
26
+ isFolderUpload?: boolean;
27
+ level?: string;
29
28
  privateKey: string;
30
- subOptions?: DropdownMenuOption[] | undefined;
31
- radioOptions?: import("./types").DropdownRadioOptionType[] | undefined;
32
- redirect?: ((e: import("./types").DropdownOnClickValueType) => void) | undefined;
33
- isExternal?: boolean | undefined;
34
- subItems?: DropdownMenuOption[] | undefined;
35
- activeItemId?: string | undefined;
36
- onOptionSelect?: (() => void) | undefined;
37
- groupIdentifier?: string | undefined;
38
- tooltipId?: string | undefined;
39
- LinkComponent?: import("./types").LinkComponentType | undefined;
29
+ subOptions?: Array<DropdownMenuOption>;
30
+ radioOptions?: Array<import("./types").DropdownRadioOptionType>;
31
+ redirect?: (e: import("./types").DropdownOnClickValueType) => void;
32
+ isExternal?: boolean;
33
+ subItems?: Array<DropdownMenuOption>;
34
+ activeItemId?: string;
35
+ onOptionSelect?: () => void;
36
+ groupIdentifier?: string;
37
+ tooltipId?: string;
38
+ LinkComponent?: import("./types").LinkComponentType;
40
39
  };
41
40
  /**
42
41
  * privateKey is used for internal logic only, for efficient search and comparison of options.
@@ -8,7 +8,7 @@ type FileUploaderHookProps = {
8
8
  export declare const useFileUploader: ({ initialFiles, isMultiple, setErrorMessage, }: FileUploaderHookProps) => {
9
9
  addedFileStructure: any[];
10
10
  collectedFileStructure: FileType[];
11
- generateFileStructure: (dataTransfer: any) => Promise<any>;
11
+ generateFileStructure: (dataTransfer: DataTransfer | any) => Promise<any>;
12
12
  removeFileFromStructure: (name: string) => void;
13
13
  updateFileStructure: (name: string, payload: any) => void;
14
14
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { FloatingPanelContextType } from './types';
3
2
  export declare const FloatingPanelContext: import("react").Context<FloatingPanelContextType>;
4
3
  export declare const MOVE_KEYS: {
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const FontAwesomeIcon: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<import("@fortawesome/react-fontawesome").FontAwesomeIconProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>>;
@@ -2,7 +2,7 @@ import { InputTypes } from '../input';
2
2
  import { FormFieldValidity } from './validity-shape';
3
3
  import { VALIDATION_VALUES } from './constants';
4
4
  import { MessageTypes } from '../message';
5
- export declare function isPassword(type?: InputTypes): boolean;
5
+ export declare function isPassword(type?: InputTypes): type is "password";
6
6
  export type GetValidityMessagesParam = {
7
7
  validity?: FormFieldValidity | null;
8
8
  validationValues: VALIDATION_VALUES;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type UseFullScreenDrawerParamsType = {
3
2
  isShow?: boolean;
4
3
  onDismissCallback?: () => void;
@@ -28,27 +28,27 @@ export declare function useAnalytics({ analyticsProviders }?: {
28
28
  tabView: (name: string) => void;
29
29
  change: ({ element, property, value, isOptions, }: Omit<{
30
30
  event: string;
31
- label?: string | null | undefined;
32
- property?: string | null | undefined;
33
- value?: string | null | undefined;
34
- isOptions?: boolean | null | undefined;
35
- }, "label" | "event"> & {
31
+ label?: string | null;
32
+ property?: string | null;
33
+ value?: string | null;
34
+ isOptions?: boolean | null;
35
+ }, "event" | "label"> & {
36
36
  element: string;
37
37
  }) => void;
38
38
  reset: () => void;
39
39
  click: ({ label, property, value, }: Omit<{
40
40
  event: string;
41
- label?: string | null | undefined;
42
- property?: string | null | undefined;
43
- value?: string | null | undefined;
44
- isOptions?: boolean | null | undefined;
41
+ label?: string | null;
42
+ property?: string | null;
43
+ value?: string | null;
44
+ isOptions?: boolean | null;
45
45
  }, "event" | "isOptions">) => void;
46
46
  track: ({ event, label, property, value, isOptions, }: {
47
47
  event: string;
48
- label?: string | null | undefined;
49
- property?: string | null | undefined;
50
- value?: string | null | undefined;
51
- isOptions?: boolean | null | undefined;
48
+ label?: string | null;
49
+ property?: string | null;
50
+ value?: string | null;
51
+ isOptions?: boolean | null;
52
52
  }) => void;
53
53
  };
54
54
  /**
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  export declare function getFocusableElements(container?: HTMLElement | null): HTMLElement[];
3
2
  export declare function useFocusTrap(ref: React.RefObject<HTMLElement>): void;
@@ -18,7 +18,7 @@ export declare function useNonNativeButtonAttrs({ onKeyDown, onClick, tabIndex,
18
18
  tabIndex: number;
19
19
  role: string;
20
20
  'aria-disabled': boolean;
21
- onKeyDown(e: KeyboardEvent<Element>): void;
22
- onClick(e: MouseEvent<Element, globalThis.MouseEvent>): void;
21
+ onKeyDown(e: KeyboardEvent): void;
22
+ onClick(e: MouseEvent): void;
23
23
  };
24
24
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type OrderingStateProps = {
3
2
  orderBy?: string;
4
3
  isAscendingOrder?: boolean;
@@ -15,7 +15,7 @@ export declare function usePaginatedSearchState(config: SearchState): {
15
15
  count: number;
16
16
  setPage: (page: number) => void;
17
17
  setPageSize: (size: number) => void;
18
- setTotal?: ((val: number) => void) | undefined;
18
+ setTotal?: (val: number) => void;
19
19
  };
20
20
  /**
21
21
  * @typedef PaginatedSearch
@@ -59,7 +59,7 @@ export declare function usePaginatedSearch(items?: never[], { searchFields, filt
59
59
  count: number;
60
60
  setPage: (page: number) => void;
61
61
  setPageSize: (size: number) => void;
62
- setTotal?: ((val: number) => void) | undefined;
62
+ setTotal?: (val: number) => void;
63
63
  };
64
64
  /**
65
65
  * Example: