@myunisoft/design-system 1.4.0-rev414 → 1.4.0-rev418
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/dist/assets/I18n/locales/en.d.ts +56 -0
- package/dist/assets/I18n/locales/fr.d.ts +56 -0
- package/dist/components/DocumentComposer/Treeview/CustomTreeItem.d.ts +1 -0
- package/dist/components/DocumentComposer/Treeview/TreeviewSkeleton.d.ts +2 -0
- package/dist/components/DocumentComposer/Treeview/slots/LabelSlot.d.ts +2 -1
- package/dist/components/DocumentComposer/Treeview/types.d.ts +0 -1
- package/dist/components/RichTextEditor/components/AlignmentSplitButton.d.ts +10 -0
- package/dist/components/RichTextEditor/components/EditorToolbarButton.d.ts +7 -0
- package/dist/components/RichTextEditor/components/FontColorButton.d.ts +5 -0
- package/dist/components/RichTextEditor/components/ImageButton.d.ts +7 -0
- package/dist/components/RichTextEditor/components/ImageResizeObserver.d.ts +2 -0
- package/dist/components/RichTextEditor/components/LinkButton.d.ts +8 -0
- package/dist/components/RichTextEditor/components/SplitButton.d.ts +16 -0
- package/dist/components/RichTextEditor/components/TableBubbleMenu.d.ts +2 -0
- package/dist/components/RichTextEditor/components/Toolbar.d.ts +22 -0
- package/dist/components/RichTextEditor/extensions/TableWithAlignment.d.ts +1 -0
- package/dist/components/RichTextEditor/index.d.ts +18 -0
- package/dist/components/RichTextEditor/styles.d.ts +1 -0
- package/dist/index.js +4 -4
- package/package.json +37 -2
|
@@ -5,6 +5,62 @@ declare const _default: {
|
|
|
5
5
|
autocomplete: {
|
|
6
6
|
createOption: string;
|
|
7
7
|
};
|
|
8
|
+
richTextEditor: {
|
|
9
|
+
toolbar: {
|
|
10
|
+
bold: string;
|
|
11
|
+
italic: string;
|
|
12
|
+
strikethrough: string;
|
|
13
|
+
underline: string;
|
|
14
|
+
alignleft: string;
|
|
15
|
+
aligncenter: string;
|
|
16
|
+
alignright: string;
|
|
17
|
+
alignjustify: string;
|
|
18
|
+
blockquote: string;
|
|
19
|
+
numberedlist: string;
|
|
20
|
+
bulletlist: string;
|
|
21
|
+
indent: string;
|
|
22
|
+
outdent: string;
|
|
23
|
+
subscript: string;
|
|
24
|
+
superscript: string;
|
|
25
|
+
table: string;
|
|
26
|
+
image: string;
|
|
27
|
+
link: string;
|
|
28
|
+
fontcolor: string;
|
|
29
|
+
undo: string;
|
|
30
|
+
redo: string;
|
|
31
|
+
more: string;
|
|
32
|
+
alignment: string;
|
|
33
|
+
clearformatting: string;
|
|
34
|
+
};
|
|
35
|
+
image: {
|
|
36
|
+
fromComputer: string;
|
|
37
|
+
fromUrl: string;
|
|
38
|
+
browse: string;
|
|
39
|
+
insert: string;
|
|
40
|
+
};
|
|
41
|
+
table: {
|
|
42
|
+
addRowBefore: string;
|
|
43
|
+
addRowAfter: string;
|
|
44
|
+
deleteRow: string;
|
|
45
|
+
addColumnBefore: string;
|
|
46
|
+
addColumnAfter: string;
|
|
47
|
+
deleteColumn: string;
|
|
48
|
+
deleteTable: string;
|
|
49
|
+
mergeCells: string;
|
|
50
|
+
splitCell: string;
|
|
51
|
+
toggleHeaderRow: string;
|
|
52
|
+
toggleHeaderColumn: string;
|
|
53
|
+
toggleHeaderCell: string;
|
|
54
|
+
alignLeft: string;
|
|
55
|
+
alignCenter: string;
|
|
56
|
+
alignRight: string;
|
|
57
|
+
};
|
|
58
|
+
link: {
|
|
59
|
+
update: string;
|
|
60
|
+
add: string;
|
|
61
|
+
remove: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
8
64
|
common: {
|
|
9
65
|
addRow: string;
|
|
10
66
|
cancel: string;
|
|
@@ -5,6 +5,62 @@ declare const _default: {
|
|
|
5
5
|
autocomplete: {
|
|
6
6
|
createOption: string;
|
|
7
7
|
};
|
|
8
|
+
richTextEditor: {
|
|
9
|
+
toolbar: {
|
|
10
|
+
bold: string;
|
|
11
|
+
italic: string;
|
|
12
|
+
strikethrough: string;
|
|
13
|
+
underline: string;
|
|
14
|
+
alignleft: string;
|
|
15
|
+
aligncenter: string;
|
|
16
|
+
alignright: string;
|
|
17
|
+
alignjustify: string;
|
|
18
|
+
blockquote: string;
|
|
19
|
+
numberedlist: string;
|
|
20
|
+
bulletlist: string;
|
|
21
|
+
indent: string;
|
|
22
|
+
outdent: string;
|
|
23
|
+
subscript: string;
|
|
24
|
+
superscript: string;
|
|
25
|
+
table: string;
|
|
26
|
+
image: string;
|
|
27
|
+
link: string;
|
|
28
|
+
fontcolor: string;
|
|
29
|
+
undo: string;
|
|
30
|
+
redo: string;
|
|
31
|
+
more: string;
|
|
32
|
+
alignment: string;
|
|
33
|
+
clearformatting: string;
|
|
34
|
+
};
|
|
35
|
+
image: {
|
|
36
|
+
fromComputer: string;
|
|
37
|
+
fromUrl: string;
|
|
38
|
+
browse: string;
|
|
39
|
+
insert: string;
|
|
40
|
+
};
|
|
41
|
+
table: {
|
|
42
|
+
addRowBefore: string;
|
|
43
|
+
addRowAfter: string;
|
|
44
|
+
deleteRow: string;
|
|
45
|
+
addColumnBefore: string;
|
|
46
|
+
addColumnAfter: string;
|
|
47
|
+
deleteColumn: string;
|
|
48
|
+
deleteTable: string;
|
|
49
|
+
mergeCells: string;
|
|
50
|
+
splitCell: string;
|
|
51
|
+
toggleHeaderRow: string;
|
|
52
|
+
toggleHeaderColumn: string;
|
|
53
|
+
toggleHeaderCell: string;
|
|
54
|
+
alignLeft: string;
|
|
55
|
+
alignCenter: string;
|
|
56
|
+
alignRight: string;
|
|
57
|
+
};
|
|
58
|
+
link: {
|
|
59
|
+
update: string;
|
|
60
|
+
add: string;
|
|
61
|
+
remove: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
8
64
|
common: {
|
|
9
65
|
addRow: string;
|
|
10
66
|
cancel: string;
|
|
@@ -3,6 +3,7 @@ import type { TreeviewProps } from './types';
|
|
|
3
3
|
type TreeItemCallbacks<T extends Record<string, unknown>> = Pick<TreeviewProps<T>, 'isSectionItem' | 'isVisibleItem' | 'getIconItem' | 'hasItemMenu' | 'getMenuItems' | 'isSectionDraggable' | 'onItemVisibilityChange' | 'temporaryItem' | 'isTemporaryItem' | 'onTemporarySectionValidation' | 'onTemporarySectionCancel' | 'onItemLabelChange' | 'hiddenSectionTooltip' | 'visibleIconTooltip' | 'hiddenIconTooltip'> & {
|
|
4
4
|
apiRef: RichTreeViewProApiRef;
|
|
5
5
|
onEditingChange?: (itemId: string | null) => void;
|
|
6
|
+
onLabelClick?: (itemId: string) => void;
|
|
6
7
|
};
|
|
7
8
|
type CustomTreeItemProps<T extends Record<string, unknown>> = TreeItemProps & TreeItemCallbacks<T>;
|
|
8
9
|
export declare const CustomTreeItem: <T extends Record<string, unknown>>(props: CustomTreeItemProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,9 +10,10 @@ type LabelSlotProps = {
|
|
|
10
10
|
menuAnchorEl?: HTMLElement | null;
|
|
11
11
|
onMenuClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
12
12
|
onItemVisibilityChange?: (itemId: string, visible: boolean) => void;
|
|
13
|
+
onLabelClick?: (itemId: string) => void;
|
|
13
14
|
hiddenSectionTooltip?: string;
|
|
14
15
|
visibleIconTooltip?: string;
|
|
15
16
|
hiddenIconTooltip?: string;
|
|
16
17
|
};
|
|
17
|
-
declare const _default: import("react").MemoExoticComponent<({ children, sx, customIcon, hasMenu, itemId, isVisible, isTemporary, menuAnchorEl, onItemVisibilityChange, onMenuClick, hiddenSectionTooltip, visibleIconTooltip, hiddenIconTooltip, ...rest }: LabelSlotProps) => import("react/jsx-runtime").JSX.Element>;
|
|
18
|
+
declare const _default: import("react").MemoExoticComponent<({ children, sx, customIcon, hasMenu, itemId, isVisible, isTemporary, menuAnchorEl, onItemVisibilityChange, onMenuClick, onLabelClick, hiddenSectionTooltip, visibleIconTooltip, hiddenIconTooltip, ...rest }: LabelSlotProps) => import("react/jsx-runtime").JSX.Element>;
|
|
18
19
|
export default _default;
|
|
@@ -41,7 +41,6 @@ export type TreeviewProps<T> = {
|
|
|
41
41
|
defaultExpandedItems: string[];
|
|
42
42
|
checkboxSelection?: boolean;
|
|
43
43
|
onItemSelect?: (itemId: string | null) => void;
|
|
44
|
-
loading?: boolean;
|
|
45
44
|
} & CustomTreeviewItemProps<T>;
|
|
46
45
|
export type TreeviewItemProps<T> = {
|
|
47
46
|
itemId: string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type Alignment = 'left' | 'center' | 'right' | 'justify';
|
|
2
|
+
type AlignmentSplitButtonProps = {
|
|
3
|
+
activeAlignment?: Alignment;
|
|
4
|
+
onSelect?: (alignment: Alignment) => void;
|
|
5
|
+
options?: Alignment[];
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const AlignmentSplitButton: ({ activeAlignment, onSelect, options, disabled }: AlignmentSplitButtonProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export default AlignmentSplitButton;
|
|
10
|
+
export type { Alignment };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type IconButtonProps } from '@mui/material';
|
|
2
|
+
type Props = IconButtonProps & {
|
|
3
|
+
active?: boolean;
|
|
4
|
+
tooltipText?: string | null;
|
|
5
|
+
};
|
|
6
|
+
declare const EditorToolbarButton: ({ active, tooltipText, children, sx, ...otherProps }: Props) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
7
|
+
export default EditorToolbarButton;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
externalAnchorEl?: HTMLElement | null;
|
|
3
|
+
onExternalClose?: () => void;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const ImageButton: ({ externalAnchorEl, onExternalClose, disabled }?: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export default ImageButton;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
active?: boolean;
|
|
3
|
+
externalAnchorEl?: HTMLElement | null;
|
|
4
|
+
onExternalClose?: () => void;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const LinkButton: ({ active, externalAnchorEl, onExternalClose, disabled }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export default LinkButton;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type SplitButtonOption = {
|
|
2
|
+
value: string;
|
|
3
|
+
icon: React.ReactNode;
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
type SplitButtonProps = {
|
|
7
|
+
options: SplitButtonOption[];
|
|
8
|
+
onSelect: (value: string) => void;
|
|
9
|
+
defaultValue?: string;
|
|
10
|
+
value?: string;
|
|
11
|
+
ariaLabel?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
declare const SplitButton: ({ options, onSelect, defaultValue, value, ariaLabel, disabled }: SplitButtonProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
export default SplitButton;
|
|
16
|
+
export type { SplitButtonOption };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/react';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
export type BuiltInButtonId = '-' | 'bold' | 'italic' | 'strikethrough' | 'underline' | 'fontColor' | 'subscript' | 'superscript' | 'alignment' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'orderedList' | 'bulletList' | 'indent' | 'outdent' | 'blockquote' | 'link' | 'image' | 'table' | 'undo' | 'redo' | 'clearFormatting';
|
|
4
|
+
export type CustomToolbarButton = {
|
|
5
|
+
id: string;
|
|
6
|
+
icon: ReactNode;
|
|
7
|
+
onClick: (editor: Editor) => void;
|
|
8
|
+
isActive?: (editor: Editor) => boolean;
|
|
9
|
+
isDisabled?: (editor: Editor) => boolean;
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
tooltipText?: string;
|
|
12
|
+
};
|
|
13
|
+
export type ToolbarButton = BuiltInButtonId | CustomToolbarButton | ReactNode;
|
|
14
|
+
export type ToolbarProps = {
|
|
15
|
+
buttons?: ToolbarButton[];
|
|
16
|
+
extraButtons?: ToolbarButton[];
|
|
17
|
+
overflowMenu?: boolean;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare const defaultButtonsCompleteSet: BuiltInButtonId[];
|
|
21
|
+
declare const Toolbar: ({ buttons, extraButtons, overflowMenu, disabled }: ToolbarProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
22
|
+
export default Toolbar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TableWithAlignment: import("@tiptap/core").Node<import("@tiptap/extension-table").TableOptions, any>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Editor } from '@tiptap/react';
|
|
2
|
+
import { type ToolbarButton, type BuiltInButtonId, type CustomToolbarButton, type ToolbarProps } from './components/Toolbar';
|
|
3
|
+
export type RichTextEditorRef = {
|
|
4
|
+
editor: Editor | null;
|
|
5
|
+
};
|
|
6
|
+
declare const RichTextEditor: import("react").ForwardRefExoticComponent<Partial<import("@tiptap/core").EditorOptions> & {
|
|
7
|
+
immediatelyRender?: boolean;
|
|
8
|
+
shouldRerenderOnTransaction?: boolean;
|
|
9
|
+
} & {
|
|
10
|
+
toolbarSet?: "all" | "minimal";
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
slotProps?: {
|
|
14
|
+
toolbar?: ToolbarProps;
|
|
15
|
+
};
|
|
16
|
+
} & import("react").RefAttributes<RichTextEditorRef>>;
|
|
17
|
+
export default RichTextEditor;
|
|
18
|
+
export type { ToolbarButton, BuiltInButtonId, CustomToolbarButton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EditorContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|