@digital-ai/dot-components 3.15.2 → 3.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "3.15.2",
3
+ "version": "3.16.0",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [
@@ -5,6 +5,7 @@ interface DashboardActionsCommonProps {
5
5
  dashboard: DashboardView;
6
6
  isEdit?: boolean;
7
7
  onClose?: (dashboard: DashboardView) => void;
8
+ onDeleted?: (id: string, result: boolean) => void;
8
9
  onDuplicated?: (dashboard: DashboardView, isDone?: boolean) => void;
9
10
  onFavorite?: (id: string, value: boolean) => void;
10
11
  onStatusChanged?: (dashboard: DashboardView) => void;
@@ -13,5 +14,5 @@ interface DashboardActionsCommonProps {
13
14
  interface DashboardActionsProps extends DashboardActionsCommonProps {
14
15
  applications: ApplicationModel[];
15
16
  }
16
- declare function DotDashboardActions({ applications, dashboard, isEdit, canEdit, onClose, onFavorite, onStatusChanged, onDuplicated, onViewMode, }: DashboardActionsProps): import("react/jsx-runtime").JSX.Element;
17
+ declare function DotDashboardActions({ applications, dashboard, isEdit, canEdit, onClose, onFavorite, onStatusChanged, onDeleted, onDuplicated, onViewMode, }: DashboardActionsProps): import("react/jsx-runtime").JSX.Element;
17
18
  export { DashboardActionsCommonProps, DotDashboardActions };
@@ -3,9 +3,10 @@ interface DashboardOptionsMenuProps {
3
3
  dashboard: DashboardView;
4
4
  isEdit?: boolean;
5
5
  onDetails?: (dashboard: DashboardView) => void;
6
+ onStartDelete?: (dashboard: DashboardView) => void;
6
7
  onStartDuplicate?: (dashboard: DashboardView) => void;
7
8
  onStartStatusChange?: (dashboard: DashboardView, status: DashboardView.lifecycle_state) => void;
8
9
  onViewMode?: (dashboard: DashboardView, mode: string) => void;
9
10
  }
10
- export declare function DotDashboardOptionsMenu({ dashboard, isEdit, onStartDuplicate, onStartStatusChange, onViewMode, onDetails, }: DashboardOptionsMenuProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function DotDashboardOptionsMenu({ dashboard, isEdit, onStartDelete, onStartDuplicate, onStartStatusChange, onViewMode, onDetails, }: DashboardOptionsMenuProps): import("react/jsx-runtime").JSX.Element;
11
12
  export {};
@@ -2,5 +2,5 @@ import { DashboardActionsCommonProps } from '../dashboard-actions/DashboardActio
2
2
  interface DashboardHeaderProps extends DashboardActionsCommonProps {
3
3
  accountId?: string;
4
4
  }
5
- declare function DotDashboardHeader({ accountId, dashboard, isEdit, canEdit, onClose, onFavorite, onStatusChanged, onDuplicated, onViewMode, }: DashboardHeaderProps): import("react/jsx-runtime").JSX.Element;
5
+ declare function DotDashboardHeader({ accountId, dashboard, isEdit, canEdit, onClose, onFavorite, onStatusChanged, onDeleted, onDuplicated, onViewMode, }: DashboardHeaderProps): import("react/jsx-runtime").JSX.Element;
6
6
  export { DashboardHeaderProps, DotDashboardHeader };
@@ -9,6 +9,7 @@ export interface MetadataApiProviderProps {
9
9
  interface DotMetadataApiContextProps {
10
10
  dashboardsError: ApiError;
11
11
  dashboardsLoading: boolean;
12
+ deleteDashboard: (dashboardId: string) => Promise<boolean>;
12
13
  duplicateDashboard: (dashboardId: string, dashboard: DashboardCopyBody) => Promise<DashboardView>;
13
14
  favoriteDashboard: (dashboardId: string, favoriteValue: boolean) => Promise<DashboardView>;
14
15
  getAuthors: (appType: string, publishedOnly?: boolean) => Promise<Author[]>;
@@ -0,0 +1,16 @@
1
+ import { ReactElement, KeyboardEvent, MouseEvent, ReactNode } from 'react';
2
+ interface ImpactProps {
3
+ action?: string;
4
+ actionIcon?: string;
5
+ className?: string;
6
+ 'data-testid'?: string;
7
+ impact?: 'high' | 'medium';
8
+ message?: ReactNode;
9
+ objectType?: string;
10
+ onCancel: (event: KeyboardEvent | MouseEvent) => void;
11
+ onSubmit?: (event: KeyboardEvent | MouseEvent) => void;
12
+ open: boolean;
13
+ record: string;
14
+ }
15
+ export declare const DotImpactDialog: ({ "data-testid": dataTestId, className, record, action, actionIcon, objectType, impact, message, open, onSubmit, onCancel, }: ImpactProps) => ReactElement;
16
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const rootClassName = "dot-impact-dialog";
2
+ export declare const StyledImpactDialog: import("styled-components").StyledComponent<({ ariaLabel, cancelButtonProps, cancelButtonVisible, className, "data-pendoid": dataPendoId, "data-testid": dataTestId, children, closeIconVisible, closeOnClickAway, closeOnSubmit, hasPrimaryAction, onCancel, onSubmit, open, submitButtonProps, title, }: import("../dialog/Dialog").DialogProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
@@ -87,6 +87,7 @@ export { DotFormGroup } from './form-group/FormGroup';
87
87
  export { DotDynamicForm } from './dynamic-form/DynamicForm';
88
88
  export { DotIcon } from './icon/Icon';
89
89
  export { DotIllustration } from './illustration/Illustration';
90
+ export { DotImpactDialog } from './impact-dialog/ImpactDialog';
90
91
  export { DotInlineEdit } from './inline-edit';
91
92
  export { DotInputText } from './input-form-fields/InputText';
92
93
  export { DotInputSelect } from './input-form-fields/InputSelect';
@@ -8,7 +8,14 @@ export declare const successClassName = "dot-success";
8
8
  export declare const adornmentIconClassName = "dot-adornment-icon";
9
9
  export declare const fieldsetClassName = "MuiOutlinedInput-notchedOutline";
10
10
  export declare const readOnlyClassName = "read-only";
11
+ export declare const resizerClassName = "with-resizer";
12
+ export declare const ROW_HEIGHT = 37;
13
+ interface StyledTextFieldProps {
14
+ $maxRows?: number;
15
+ $minRows?: number;
16
+ }
11
17
  export declare const StyledAdornment: import("styled-components").StyledComponent<import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").InputAdornmentTypeMap<{}, "div">>, any, {}, never>;
12
18
  export declare const StyledInputLabel: import("styled-components").StyledComponent<import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").InputLabelTypeMap<{}, "label">>, any, {}, never>;
13
19
  export declare const StyledTextFieldContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
14
- export declare const StyledTextField: import("styled-components").StyledComponent<typeof TextField, any, {}, never>;
20
+ export declare const StyledTextField: import("styled-components").StyledComponent<typeof TextField, any, StyledTextFieldProps, never>;
21
+ export {};
@@ -11,9 +11,11 @@ export interface InputTextProps extends InputProps {
11
11
  endAdornmentTooltip?: string;
12
12
  /** If true, the input will use debounce functionality. */
13
13
  hasDebounce?: boolean;
14
- /** max of rows for multiline line */
14
+ /** If true, the input will render resizer in multiline mode. False by default. */
15
+ hasResizer?: boolean;
16
+ /** Maximum number of rows for multiline mode. */
15
17
  maxRows?: number;
16
- /** number of rows for multiline line */
18
+ /** Minimum number of rows for multiline mode. */
17
19
  minRows?: number;
18
20
  /** if multiline it wil render multiple lines */
19
21
  multiline?: boolean;
@@ -36,4 +38,4 @@ export interface EndIconProps {
36
38
  success?: boolean;
37
39
  warning?: boolean;
38
40
  }
39
- export declare const DotInputText: ({ autoComplete, autoFocus, className, defaultValue, "data-pendoid": dataPendoId, "data-testid": dataTestId, disabled, error, endAdornmentTooltip, fullWidth, hasDebounce, helperText, endIcon, endText, id, inputRef, label, max, maxLength, maxRows, min, minLength, minRows, multiline, name, onBlur, onChange, onClear, onFocus, onKeyDown, onMouseUp, persistentLabel, placeholder, readOnly, required, shrink, startIcon, size, success, type, value, warning, }: InputTextProps) => import("react/jsx-runtime").JSX.Element;
41
+ export declare const DotInputText: ({ autoComplete, autoFocus, className, defaultValue, "data-pendoid": dataPendoId, "data-testid": dataTestId, disabled, error, endAdornmentTooltip, fullWidth, hasDebounce, hasResizer, helperText, endIcon, endText, id, inputRef, label, max, maxLength, maxRows, min, minLength, minRows, multiline, name, onBlur, onChange, onClear, onFocus, onKeyDown, onMouseUp, persistentLabel, placeholder, readOnly, required, shrink, startIcon, size, success, type, value, warning, }: InputTextProps) => import("react/jsx-runtime").JSX.Element;
@@ -8,6 +8,8 @@ export interface TooltipProps extends CommonProps {
8
8
  children: ReactElement;
9
9
  /** Disable the portal behavior. If true, children stay within parent DOM hierarchy. */
10
10
  disablePortal?: boolean;
11
+ enterDelay?: number;
12
+ followCursor?: boolean;
11
13
  hoverVisibility?: TooltipHoverVisibility;
12
14
  leaveDelay?: number;
13
15
  onClose?: (event: ChangeEvent) => void;
@@ -16,4 +18,4 @@ export interface TooltipProps extends CommonProps {
16
18
  popperClassName?: string;
17
19
  title?: ReactNode | string | number;
18
20
  }
19
- export declare const DotTooltip: ({ ariaLabel, ariaRole, arrow, children, className, "data-testid": dataTestId, disablePortal, hoverVisibility, leaveDelay, onClose, open, placement, popperClassName, title, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const DotTooltip: ({ ariaLabel, ariaRole, arrow, children, className, "data-testid": dataTestId, disablePortal, followCursor, enterDelay, hoverVisibility, leaveDelay, onClose, open, placement, popperClassName, title, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;