@digital-ai/dot-components 1.14.0 → 1.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/CHANGE_LOG.md +53 -24
- package/index.esm.js +573 -373
- package/index.umd.js +757 -530
- package/lib/components/app-toolbar/AppToolbar.d.ts +11 -1
- package/lib/components/app-toolbar/AppToolbar.stories.data.d.ts +2 -9
- package/lib/components/button/index.d.ts +4 -0
- package/lib/components/file-upload/FileListItem.d.ts +9 -4
- package/lib/components/file-upload/FileListItem.styles.d.ts +40 -0
- package/lib/components/file-upload/FileUpload.d.ts +6 -1
- package/lib/components/file-upload/FileUpload.stories.data.d.ts +6 -0
- package/lib/components/file-upload/FileUpload.stories.styles.d.ts +2 -0
- package/lib/components/file-upload/index.d.ts +4 -0
- package/lib/components/file-upload/utils/helpers.d.ts +12 -4
- package/lib/components/file-upload/utils/models.d.ts +18 -0
- package/lib/components/index.d.ts +9 -11
- package/lib/components/navigation-rail/NavigationRail.stories.styles.d.ts +2 -0
- package/lib/components/navigation-rail/index.d.ts +2 -0
- package/lib/components/switch/index.d.ts +2 -0
- package/lib/components/table/Table.stories.data.d.ts +5 -21
- package/lib/components/table/TableAction.d.ts +12 -0
- package/lib/components/table/TableActions.d.ts +8 -0
- package/lib/components/table/TableActions.styles.d.ts +4 -0
- package/lib/components/table/TableHeader.d.ts +1 -0
- package/lib/components/table/TableHeaderCell.d.ts +1 -1
- package/lib/components/table/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -2,6 +2,16 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
import { IconButtonProps } from '../button/IconButton';
|
|
4
4
|
import { ListItemProps } from '../list';
|
|
5
|
+
import { BadgeVariant } from '../badge/Badge';
|
|
6
|
+
export interface AppToolbarIconButtons extends IconButtonProps {
|
|
7
|
+
/** custom color code for the badge */
|
|
8
|
+
badgeColor?: string;
|
|
9
|
+
/** the number rendered within the badge */
|
|
10
|
+
badgeContent?: number;
|
|
11
|
+
badgeVariant?: BadgeVariant;
|
|
12
|
+
/** if true, the badge will be displayed, else it will be hidden*/
|
|
13
|
+
displayBadge?: boolean;
|
|
14
|
+
}
|
|
5
15
|
export interface AppToolbarProps extends CommonProps {
|
|
6
16
|
/** If provided will display application logo */
|
|
7
17
|
appLogo?: ReactNode;
|
|
@@ -28,7 +38,7 @@ export interface AppToolbarProps extends CommonProps {
|
|
|
28
38
|
/** Width of main menu drawer if mainMenu provided, defaults to 240px */
|
|
29
39
|
mainMenuWidth?: number;
|
|
30
40
|
/** Array of nav items to be displayed on the right side */
|
|
31
|
-
navItems?: Array<
|
|
41
|
+
navItems?: Array<AppToolbarIconButtons>;
|
|
32
42
|
/** URL of the page the primary logo link will go to */
|
|
33
43
|
primaryLogoHref?: string;
|
|
34
44
|
}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { History } from 'history';
|
|
3
3
|
import { ListItemProps } from '../list';
|
|
4
|
+
import { AppToolbarIconButtons } from './AppToolbar';
|
|
4
5
|
export declare const defaultMainMenuItems: Array<ListItemProps>;
|
|
5
|
-
export declare const defaultNavItems:
|
|
6
|
-
iconId: string;
|
|
7
|
-
tooltip: string;
|
|
8
|
-
onClick?: undefined;
|
|
9
|
-
} | {
|
|
10
|
-
iconId: string;
|
|
11
|
-
onClick: () => void;
|
|
12
|
-
tooltip: string;
|
|
13
|
-
})[];
|
|
6
|
+
export declare const defaultNavItems: AppToolbarIconButtons[];
|
|
14
7
|
export declare const getMenuNavigationItems: (history: History) => Array<ListItemProps>;
|
|
15
8
|
export declare const MenuNavigationRoutes: () => JSX.Element;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { FileWithPath } from 'react-dropzone';
|
|
3
2
|
import { CommonProps } from '../CommonProps';
|
|
3
|
+
export interface ListItemFile {
|
|
4
|
+
id: string | number;
|
|
5
|
+
path: string;
|
|
6
|
+
}
|
|
4
7
|
export interface FileItemProps extends CommonProps {
|
|
5
|
-
deleteFile: (
|
|
8
|
+
deleteFile: (fileIndex: string | number) => void;
|
|
9
|
+
disableDelete?: boolean;
|
|
6
10
|
error?: boolean;
|
|
7
11
|
errorText?: string;
|
|
8
|
-
file:
|
|
12
|
+
file: ListItemFile;
|
|
13
|
+
onClick?: (file: ListItemFile) => void;
|
|
9
14
|
}
|
|
10
|
-
export declare const DotFileListItem: ({ ariaLabel, className, "data-testid": dataTestId, deleteFile, error, errorText, file, }: FileItemProps) => JSX.Element;
|
|
15
|
+
export declare const DotFileListItem: ({ ariaLabel, className, "data-testid": dataTestId, deleteFile, disableDelete, error, errorText, file, onClick, }: FileItemProps) => JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const rootClassName = "dot-file-list-item";
|
|
3
|
+
export declare const StyledFileListItem: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").ListItemTypeMap<{
|
|
4
|
+
button?: false;
|
|
5
|
+
}, "li">> & ((props: {
|
|
6
|
+
href: string;
|
|
7
|
+
} & {
|
|
8
|
+
button: true;
|
|
9
|
+
} & {
|
|
10
|
+
alignItems?: "center" | "flex-start";
|
|
11
|
+
autoFocus?: boolean;
|
|
12
|
+
button?: boolean;
|
|
13
|
+
ContainerComponent?: import("react").ElementType<import("react").HTMLAttributes<HTMLDivElement>>;
|
|
14
|
+
ContainerProps?: import("react").HTMLAttributes<HTMLDivElement>;
|
|
15
|
+
dense?: boolean;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
disableGutters?: boolean;
|
|
18
|
+
divider?: boolean;
|
|
19
|
+
focusVisibleClassName?: string;
|
|
20
|
+
selected?: boolean;
|
|
21
|
+
} & {
|
|
22
|
+
action?: import("react").Ref<import("@material-ui/core").ButtonBaseActions>;
|
|
23
|
+
buttonRef?: import("react").Ref<unknown>;
|
|
24
|
+
centerRipple?: boolean;
|
|
25
|
+
children?: import("react").ReactNode;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
disableRipple?: boolean;
|
|
28
|
+
disableTouchRipple?: boolean;
|
|
29
|
+
focusRipple?: boolean;
|
|
30
|
+
focusVisibleClassName?: string;
|
|
31
|
+
onFocusVisible?: import("react").FocusEventHandler<any>;
|
|
32
|
+
tabIndex?: string | number;
|
|
33
|
+
TouchRippleProps?: Partial<import("@material-ui/core/ButtonBase/TouchRipple").TouchRippleProps>;
|
|
34
|
+
} & import("@material-ui/core/OverridableComponent").CommonProps<import("@material-ui/core").ExtendButtonBaseTypeMap<import("@material-ui/core").ListItemTypeMap<{
|
|
35
|
+
button: true;
|
|
36
|
+
}, "div">>> & Pick<Pick<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "key" | keyof import("react").AnchorHTMLAttributes<HTMLAnchorElement>> & {
|
|
37
|
+
ref?: import("react").Ref<HTMLAnchorElement>;
|
|
38
|
+
}, "slot" | "title" | "type" | "ref" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "download" | "href" | "hrefLang" | "media" | "ping" | "rel" | "target" | "referrerPolicy">) => JSX.Element) & import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").ExtendButtonBaseTypeMap<import("@material-ui/core").ListItemTypeMap<{
|
|
39
|
+
button: true;
|
|
40
|
+
}, "div">>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
import { MappedFile } from './utils/models';
|
|
4
|
+
import { ListItemFile } from './FileListItem';
|
|
4
5
|
export interface FileUploadProps extends CommonProps {
|
|
5
6
|
/** Unique file type specifiers <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers" target="_blank">More Info</a> */
|
|
6
7
|
accept?: Array<string>;
|
|
@@ -8,6 +9,8 @@ export interface FileUploadProps extends CommonProps {
|
|
|
8
9
|
buttonOnly?: boolean;
|
|
9
10
|
/** If true, the upload zone will be disabled */
|
|
10
11
|
disabled?: boolean;
|
|
12
|
+
/** If true, upload file list won't be displayed. Used when consumer wants to render his own list. */
|
|
13
|
+
hideFilesList?: boolean;
|
|
11
14
|
/** Defines the maximum number of files that can be uploaded */
|
|
12
15
|
maxFiles?: number;
|
|
13
16
|
/** Defines the maximum file size (in MB) */
|
|
@@ -16,5 +19,7 @@ export interface FileUploadProps extends CommonProps {
|
|
|
16
19
|
onChange: (files: Array<MappedFile>) => void;
|
|
17
20
|
/** callback triggered when dragenter event occurs */
|
|
18
21
|
onDragEnter?: (event: React.DragEvent<HTMLDivElement>) => void;
|
|
22
|
+
/** Optional callback which gets triggered when the file (from the list) is clicked. */
|
|
23
|
+
onFileClick?: (file: ListItemFile) => void;
|
|
19
24
|
}
|
|
20
|
-
export declare const DotFileUpload: ({ accept, ariaLabel, buttonOnly, className, "data-testid": dataTestId, disabled, maxFiles, maxSize, onChange, onDragEnter, }: FileUploadProps) => JSX.Element;
|
|
25
|
+
export declare const DotFileUpload: ({ accept, ariaLabel, buttonOnly, className, "data-testid": dataTestId, disabled, hideFilesList, maxFiles, maxSize, onChange, onDragEnter, onFileClick, }: FileUploadProps) => JSX.Element;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
+
export type { FileUploadError, MappedFile, MappedListItemFile, } from './utils/models';
|
|
1
2
|
export type { FileUploadProps } from './FileUpload';
|
|
3
|
+
export type { ListItemFile } from './FileListItem';
|
|
4
|
+
export type { FileItemProps } from './FileListItem';
|
|
2
5
|
export { DotFileUpload } from './FileUpload';
|
|
6
|
+
export { DotFileListItem } from './FileListItem';
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { DropzoneContentArgs,
|
|
2
|
+
import { FileRejection } from 'react-dropzone';
|
|
3
|
+
import { DropzoneContentArgs, ParseListItemArgs, UploadedFilesListArgs } from './models';
|
|
4
4
|
export declare const renderMaxSizeMessage: (maxSizeMB: number) => ReactNode;
|
|
5
5
|
export declare const renderMaxFilesMessage: (maxFiles: number, maxFilesClasses: string) => ReactNode;
|
|
6
6
|
export declare const renderSelectFilesButton: (isUploadDisabled: boolean, onButtonClick: () => void) => ReactNode;
|
|
7
7
|
export declare const renderActiveDragArea: () => ReactNode;
|
|
8
8
|
export declare const renderDragAndDropArea: (isUploadDisabled: boolean, onSelectButtonClick: () => void) => ReactNode;
|
|
9
9
|
export declare const renderDropzoneContent: ({ buttonOnly, isDragActive, isUploadDisabled, open, }: DropzoneContentArgs) => React.ReactNode;
|
|
10
|
-
export declare const getUploadedFilesList: (
|
|
10
|
+
export declare const getUploadedFilesList: ({ maxSize, onFileClick, onFileDelete, uploadedFiles, }: UploadedFilesListArgs) => {
|
|
11
11
|
child: JSX.Element;
|
|
12
12
|
}[];
|
|
13
|
-
export declare const parseListItem: (
|
|
13
|
+
export declare const parseListItem: ({ onFileDelete, onFileClick, fileToBeParsed, index, maxSize, }: ParseListItemArgs) => {
|
|
14
14
|
child: JSX.Element;
|
|
15
15
|
};
|
|
16
|
+
export declare const mapAcceptedFiles: (files: File[]) => {
|
|
17
|
+
file: File;
|
|
18
|
+
errors: any[];
|
|
19
|
+
}[];
|
|
20
|
+
export declare const joinAcceptedAndRejectedFiles: (filesAccepted: File[], filesRejected: FileRejection[]) => {
|
|
21
|
+
file: File;
|
|
22
|
+
errors: any[];
|
|
23
|
+
}[];
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { FileWithPath } from 'react-dropzone';
|
|
2
|
+
import { ListItemFile } from '../FileListItem';
|
|
2
3
|
export interface FileUploadError {
|
|
3
4
|
code: string;
|
|
4
5
|
message: string;
|
|
5
6
|
}
|
|
7
|
+
export interface MappedListItemFile {
|
|
8
|
+
errors: FileUploadError[];
|
|
9
|
+
listItemFile: ListItemFile;
|
|
10
|
+
}
|
|
6
11
|
export interface MappedFile {
|
|
7
12
|
errors: Array<FileUploadError>;
|
|
8
13
|
file: FileWithPath;
|
|
@@ -13,3 +18,16 @@ export interface DropzoneContentArgs {
|
|
|
13
18
|
isUploadDisabled: boolean;
|
|
14
19
|
open: () => void;
|
|
15
20
|
}
|
|
21
|
+
export interface UploadedFilesListArgs {
|
|
22
|
+
maxSize: number;
|
|
23
|
+
onFileClick?: (file: ListItemFile) => void;
|
|
24
|
+
onFileDelete: (fileIndexToBeRemoved: number) => void;
|
|
25
|
+
uploadedFiles: MappedFile[];
|
|
26
|
+
}
|
|
27
|
+
export interface ParseListItemArgs {
|
|
28
|
+
fileToBeParsed: MappedFile;
|
|
29
|
+
index: number;
|
|
30
|
+
maxSize: number;
|
|
31
|
+
onFileClick?: (file: ListItemFile) => void;
|
|
32
|
+
onFileDelete: (fileIndexToBeRemoved: number) => void;
|
|
33
|
+
}
|
|
@@ -2,24 +2,23 @@ export type { AppToolbarProps } from './app-toolbar/AppToolbar';
|
|
|
2
2
|
export type { AutoCompleteOption, AutoCompleteProps, AutoCompleteValue, AutocompleteRenderOptionState, } from './auto-complete';
|
|
3
3
|
export type { AvatarProps } from './avatar/Avatar';
|
|
4
4
|
export type { BreadcrumbItem } from './breadcrumbs/Breadcrumbs';
|
|
5
|
-
export type { ButtonProps } from './button
|
|
5
|
+
export type { ButtonProps, IconButtonProps, IconButtonColor, IconButtonSize, } from './button';
|
|
6
6
|
export type { ButtonToggleProps, ButtonToggleValue, ButtonToggleOption, ButtonToggleOrientation, ButtonToggleSingleValue, ButtonToggleSize, } from './button-toggle';
|
|
7
7
|
export type { CheckboxProps } from './checkbox/Checkbox';
|
|
8
8
|
export type { CheckboxGroupProps } from './checkbox/CheckboxGroup';
|
|
9
9
|
export type { SubmitButtonProps } from './dialog/Dialog';
|
|
10
10
|
export type { DynamicFormProps } from './dynamic-form/DynamicForm';
|
|
11
11
|
export type { ConditionFunction, ControlClickHandler, DisabledConditionFunction, DisabledControlCondition, DynamicFormConfig, DynamicFormControl, DynamicFormControlProps, DynamicFormControlType, DynamicFormOutputData, DynamicFormSectionProps, DynamicFormState, DynamicFormStateItem, FieldValidation, } from './dynamic-form/models';
|
|
12
|
-
export type { IconButtonProps } from './button/IconButton';
|
|
13
12
|
export type { InputTextProps } from './input-form-fields/InputText';
|
|
14
13
|
export type { InputSelectProps, InputSelectOption, } from './input-form-fields/InputSelect';
|
|
15
14
|
export type { LinkUnderline } from './link/Link';
|
|
16
15
|
export type { ListItemProps } from './list';
|
|
17
16
|
export type { MenuItemProps } from './menu/Menu';
|
|
18
|
-
export type { RailItem } from './navigation-rail
|
|
17
|
+
export type { RailItem, RailItemsPosition } from './navigation-rail';
|
|
19
18
|
export type { RadioButtonProps } from './radio/RadioButton';
|
|
20
19
|
export type { RadioGroupProps } from './radio/RadioGroup';
|
|
21
20
|
export type { BackItemProps, SidebarProps } from './sidebar/Sidebar';
|
|
22
|
-
export type { SwitchProps } from './switch
|
|
21
|
+
export type { SwitchProps, SwitchColor, SwitchSize, SwitchLabelPlacement, } from './switch';
|
|
23
22
|
export type { DotColumnHeader, MultiSelect, Order, RowSelectionChangeHandler, RowsPerPageOption, TableDataWithPagination, TableRowProps, TableRowSelectChangeHandler, TextAlignment, SortDirection, } from './table';
|
|
24
23
|
export type { TabProps } from './tabs/Tabs';
|
|
25
24
|
export type { TypographyVariant } from './typography/Typography';
|
|
@@ -32,7 +31,7 @@ export type { DraggableItem, DraggableListChangeHandler, } from './draggable-lis
|
|
|
32
31
|
export type { SnackbarProps, SnackbarSeverity, SnackbarOrigin, } from './snackbar';
|
|
33
32
|
export type { CharactersLimit, InlineEditProps } from './inline-edit';
|
|
34
33
|
export type { progressColorOptions, progressVariantOptions, ProgressProps, } from './progress';
|
|
35
|
-
export type { FileUploadProps } from './file-upload';
|
|
34
|
+
export type { FileItemProps, FileUploadError, FileUploadProps, ListItemFile, MappedFile, MappedListItemFile, } from './file-upload';
|
|
36
35
|
export { DotAccordion } from './accordion/Accordion';
|
|
37
36
|
export { DotActionToolbar } from './action-toolbar/ActionToolbar';
|
|
38
37
|
export { DotAlertBanner } from './alert-banner/AlertBanner';
|
|
@@ -43,7 +42,7 @@ export { DotAvatar } from './avatar/Avatar';
|
|
|
43
42
|
export { DotAvatarGroup } from './avatar-group/AvatarGroup';
|
|
44
43
|
export { DotBadge } from './badge';
|
|
45
44
|
export { DotBreadcrumbs } from './breadcrumbs/Breadcrumbs';
|
|
46
|
-
export { DotButton } from './button
|
|
45
|
+
export { DotButton, DotIconButton } from './button';
|
|
47
46
|
export { DotButtonToggle } from './button-toggle';
|
|
48
47
|
export { DotCard } from './card/Card';
|
|
49
48
|
export { DotCardContent } from './card/CardContent';
|
|
@@ -63,14 +62,13 @@ export { DotForm } from './form/Form';
|
|
|
63
62
|
export { DotFormGroup } from './form-group/FormGroup';
|
|
64
63
|
export { DotDynamicForm } from './dynamic-form/DynamicForm';
|
|
65
64
|
export { DotIcon } from './icon/Icon';
|
|
66
|
-
export { DotIconButton } from './button/IconButton';
|
|
67
65
|
export { DotInlineEdit } from './inline-edit';
|
|
68
66
|
export { DotInputText } from './input-form-fields/InputText';
|
|
69
67
|
export { DotInputSelect } from './input-form-fields/InputSelect';
|
|
70
68
|
export { DotLink } from './link/Link';
|
|
71
69
|
export { DotList } from './list';
|
|
72
70
|
export { DotMenu } from './menu/Menu';
|
|
73
|
-
export { DotNavigationRail } from './navigation-rail
|
|
71
|
+
export { DotNavigationRail } from './navigation-rail';
|
|
74
72
|
export { DotPill } from './pill/Pill';
|
|
75
73
|
export { DotProgress } from './progress';
|
|
76
74
|
export { DotRadioButton } from './radio/RadioButton';
|
|
@@ -80,12 +78,12 @@ export { DotSkeleton } from './skeleton/Skeleton';
|
|
|
80
78
|
export { DotSnackbar, DotSnackbarContainer, DotSnackbarProvider, useDotSnackbarContext, } from './snackbar';
|
|
81
79
|
export { DotSplitButton } from './split-button/SplitButton';
|
|
82
80
|
export { DotProgressButton } from './progress-button/ProgressButton';
|
|
83
|
-
export { DotSwitch } from './switch
|
|
84
|
-
export { DotHeaderRow, DotTable, DotTablePagination } from './table';
|
|
81
|
+
export { DotSwitch } from './switch';
|
|
82
|
+
export { DotHeaderRow, DotTable, DotTablePagination, DotTableActions, DotTableAction, } from './table';
|
|
85
83
|
export { DotTooltip } from './tooltip/Tooltip';
|
|
86
84
|
export { DotTabs } from './tabs/Tabs';
|
|
87
85
|
export { DotTypography } from './typography/Typography';
|
|
88
|
-
export { DotFileUpload } from './file-upload';
|
|
86
|
+
export { DotFileUpload, DotFileListItem } from './file-upload';
|
|
89
87
|
export { DotDivider } from './divider';
|
|
90
88
|
export { DotPopper } from './popper';
|
|
91
89
|
export { DotTruncateWithTooltip } from './truncate-with-tooltip';
|
|
@@ -57,9 +57,9 @@ export declare const defaultColumns: ({
|
|
|
57
57
|
id: string;
|
|
58
58
|
label: string;
|
|
59
59
|
sortable: boolean;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
align: string;
|
|
61
|
+
width: string;
|
|
62
|
+
truncate: boolean;
|
|
63
63
|
})[];
|
|
64
64
|
export declare const defaultData: ({
|
|
65
65
|
id: string;
|
|
@@ -69,15 +69,7 @@ export declare const defaultData: ({
|
|
|
69
69
|
title: string;
|
|
70
70
|
hometown: string;
|
|
71
71
|
fans: number;
|
|
72
|
-
delete:
|
|
73
|
-
children: JSX.Element;
|
|
74
|
-
dataTestId: string;
|
|
75
|
-
disabled: boolean;
|
|
76
|
-
iconId: string;
|
|
77
|
-
key: string;
|
|
78
|
-
onclick: () => void;
|
|
79
|
-
tooltip: string;
|
|
80
|
-
}[];
|
|
72
|
+
delete: JSX.Element;
|
|
81
73
|
className: string;
|
|
82
74
|
};
|
|
83
75
|
} | {
|
|
@@ -86,15 +78,7 @@ export declare const defaultData: ({
|
|
|
86
78
|
title: string;
|
|
87
79
|
hometown: string;
|
|
88
80
|
fans: number;
|
|
89
|
-
delete:
|
|
90
|
-
children: JSX.Element;
|
|
91
|
-
dataTestId: string;
|
|
92
|
-
disabled: boolean;
|
|
93
|
-
iconId: string;
|
|
94
|
-
key: string;
|
|
95
|
-
onclick: () => void;
|
|
96
|
-
tooltip: string;
|
|
97
|
-
}[];
|
|
81
|
+
delete: JSX.Element;
|
|
98
82
|
className?: undefined;
|
|
99
83
|
};
|
|
100
84
|
className?: undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import { CommonProps } from '../CommonProps';
|
|
3
|
+
export interface TableActionProps extends CommonProps {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
iconId: string;
|
|
6
|
+
id?: string;
|
|
7
|
+
label: string;
|
|
8
|
+
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
9
|
+
tooltip?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const getMenuItem: (action: TableActionProps) => JSX.Element;
|
|
12
|
+
export declare const DotTableAction: ({ "data-testid": dataTestId, disabled, iconId, onClick, tooltip, }: TableActionProps) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CommonProps } from '../CommonProps';
|
|
3
|
+
import { TableActionProps } from './TableAction';
|
|
4
|
+
export interface TableActionsProps extends CommonProps {
|
|
5
|
+
actions?: Array<TableActionProps>;
|
|
6
|
+
id: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const DotTableActions: ({ actions, id }: TableActionsProps) => JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const rootClassName = "dot-table-actions";
|
|
3
|
+
export declare const TableActionsContainer: import("styled-components").StyledComponent<"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, selectedKey, }: import("../menu/Menu").MenuProps) => JSX.Element, any, {}, never>;
|
|
@@ -13,6 +13,7 @@ export interface DotColumnHeader {
|
|
|
13
13
|
export declare type Order = 'asc' | 'desc';
|
|
14
14
|
export interface HeaderProps {
|
|
15
15
|
columns: Array<DotColumnHeader>;
|
|
16
|
+
/** DEPRECATED, DO NOT USE */
|
|
16
17
|
hasActionColumn: boolean;
|
|
17
18
|
multiSelectHeader?: MultiSelectHeader;
|
|
18
19
|
onRequestSort: (property: string) => void;
|
|
@@ -10,7 +10,7 @@ export interface HeaderCellProps {
|
|
|
10
10
|
createSortHandler?: (property: string) => (event: MouseEvent<unknown>) => void;
|
|
11
11
|
/** The Id of table cell */
|
|
12
12
|
id?: string;
|
|
13
|
-
/**
|
|
13
|
+
/** DEPRECATED, DO NOT USE */
|
|
14
14
|
isInActionColumn: boolean;
|
|
15
15
|
/** The order of data which is being sorted by */
|
|
16
16
|
order?: Order;
|
|
@@ -8,3 +8,5 @@ export type { MultiSelect, TableRowSelectChangeHandler, RowSelectionChangeHandle
|
|
|
8
8
|
export { DotTablePagination } from './TablePagination';
|
|
9
9
|
export { DotTable } from './Table';
|
|
10
10
|
export { DotHeaderRow } from './TableHeader';
|
|
11
|
+
export { DotTableAction } from './TableAction';
|
|
12
|
+
export { DotTableActions } from './TableActions';
|