@appquality/unguess-design-system 3.1.86-player-ref → 3.1.86
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/CHANGELOG.md +98 -0
- package/build/index.js +2482 -2933
- package/build/stories/chat/_types.d.ts +1 -9
- package/build/stories/chat/context/chatContext.d.ts +2 -21
- package/build/stories/chat/index.stories.d.ts +1 -5
- package/build/stories/chat/parts/comment.d.ts +1 -11
- package/build/stories/chat/parts/extensions.d.ts +1 -1
- package/package.json +2 -6
- package/build/stories/chat/parts/ThumbnailContainer/DeleteThumbnailX.d.ts +0 -5
- package/build/stories/chat/parts/ThumbnailContainer/ImageThumbnail.d.ts +0 -11
- package/build/stories/chat/parts/ThumbnailContainer/VideoThumbnail.d.ts +0 -11
- package/build/stories/chat/parts/ThumbnailContainer/index.d.ts +0 -13
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PlaceholderOptions } from "@tiptap/extension-placeholder";
|
|
3
2
|
import { BubbleMenuProps, EditorOptions } from "@tiptap/react";
|
|
4
3
|
type validationStatus = "success" | "warning" | "error";
|
|
@@ -8,18 +7,16 @@ export type SuggestedUser = {
|
|
|
8
7
|
email: string;
|
|
9
8
|
};
|
|
10
9
|
export interface ChatEditorArgs extends Partial<EditorOptions> {
|
|
11
|
-
author: Author;
|
|
12
|
-
messageBadFileFormat: string;
|
|
13
10
|
placeholderOptions?: Partial<PlaceholderOptions>;
|
|
14
11
|
hasFloatingMenu?: boolean;
|
|
15
12
|
hasButtonsMenu?: boolean;
|
|
16
13
|
bubbleOptions?: any;
|
|
14
|
+
author: Author;
|
|
17
15
|
i18n?: {
|
|
18
16
|
menu?: {
|
|
19
17
|
bold?: string;
|
|
20
18
|
italic?: string;
|
|
21
19
|
mention?: string;
|
|
22
|
-
attachment?: string | React.ReactNode;
|
|
23
20
|
};
|
|
24
21
|
mention?: {
|
|
25
22
|
noResults?: string;
|
|
@@ -38,11 +35,6 @@ export interface EditorHeaderArgs {
|
|
|
38
35
|
title?: string;
|
|
39
36
|
validation?: validationStatus;
|
|
40
37
|
}
|
|
41
|
-
export interface FileItem extends File {
|
|
42
|
-
isLoadingMedia: boolean;
|
|
43
|
-
isError?: boolean;
|
|
44
|
-
internal_id: string;
|
|
45
|
-
}
|
|
46
38
|
export interface FloatingMenuArgs extends Partial<BubbleMenuProps> {
|
|
47
39
|
}
|
|
48
40
|
export {};
|
|
@@ -1,36 +1,17 @@
|
|
|
1
1
|
import { Editor } from "@tiptap/react";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { SuggestedUser } from "../_types";
|
|
4
4
|
export type ChatContextType = {
|
|
5
5
|
triggerSave: () => void;
|
|
6
6
|
editor?: Editor;
|
|
7
7
|
setEditor: React.Dispatch<React.SetStateAction<Editor | undefined>>;
|
|
8
|
-
addThumbnails: (props: {
|
|
9
|
-
files: FileItem[];
|
|
10
|
-
}) => void;
|
|
11
|
-
removeThumbnail: (index: number) => void;
|
|
12
|
-
thumbnails: FileItem[];
|
|
13
8
|
mentionableUsers: (props: {
|
|
14
9
|
query: string;
|
|
15
10
|
}) => SuggestedUser[];
|
|
16
|
-
afterUploadCallback: (failed: string[]) => void;
|
|
17
|
-
clearInput: () => void;
|
|
18
|
-
onDeleteThumbnail: (id: string) => void;
|
|
19
11
|
};
|
|
20
12
|
export declare const ChatContext: React.Context<ChatContextType | null>;
|
|
21
|
-
export
|
|
22
|
-
uploaded_ids?: {
|
|
23
|
-
id: number;
|
|
24
|
-
}[];
|
|
25
|
-
failed?: {
|
|
26
|
-
name: string;
|
|
27
|
-
errorCode: string;
|
|
28
|
-
}[];
|
|
29
|
-
}
|
|
30
|
-
export declare const ChatContextProvider: ({ onSave, onFileUpload, onDeleteThumbnail, setMentionableUsers, children, }: {
|
|
13
|
+
export declare const ChatContextProvider: ({ onSave, setMentionableUsers, children, }: {
|
|
31
14
|
onSave?: ((editor: Editor, mentions: SuggestedUser[]) => void) | undefined;
|
|
32
|
-
onFileUpload?: ((files: FileItem[]) => Promise<Data>) | undefined;
|
|
33
|
-
onDeleteThumbnail: (id: string) => void;
|
|
34
15
|
children: React.ReactNode;
|
|
35
16
|
setMentionableUsers: (props: {
|
|
36
17
|
query: string;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { PlaceholderOptions } from "@tiptap/extension-placeholder";
|
|
2
2
|
import { Editor as TipTapEditor } from "@tiptap/react";
|
|
3
|
-
import { ChatEditorArgs,
|
|
4
|
-
import { MediaType } from "./parts/comment";
|
|
5
|
-
import { Data } from "./context/chatContext";
|
|
3
|
+
import { ChatEditorArgs, SuggestedUser } from "./_types";
|
|
6
4
|
interface EditorStoryArgs extends ChatEditorArgs {
|
|
7
5
|
children?: any;
|
|
8
6
|
comments?: {
|
|
@@ -13,12 +11,10 @@ interface EditorStoryArgs extends ChatEditorArgs {
|
|
|
13
11
|
};
|
|
14
12
|
message: string;
|
|
15
13
|
date: string;
|
|
16
|
-
media?: MediaType[];
|
|
17
14
|
}[];
|
|
18
15
|
editorText?: string;
|
|
19
16
|
background?: string;
|
|
20
17
|
onSave: (editor: TipTapEditor, mentions: SuggestedUser[]) => void;
|
|
21
|
-
onFileUpload?: (files: FileItem[]) => Promise<Data>;
|
|
22
18
|
placeholderOptions?: Partial<PlaceholderOptions>;
|
|
23
19
|
}
|
|
24
20
|
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, EditorStoryArgs>;
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
import { PropsWithChildren } from "react";
|
|
2
2
|
import { Author } from "../_types";
|
|
3
|
-
export
|
|
4
|
-
url: string;
|
|
5
|
-
id: number;
|
|
6
|
-
type: "image" | "video";
|
|
7
|
-
};
|
|
8
|
-
export declare const Comment: ({ author, message, children, date, media, header, }: PropsWithChildren<{
|
|
3
|
+
export declare const Comment: ({ author, message, children, date, }: PropsWithChildren<{
|
|
9
4
|
author: Author;
|
|
10
5
|
message: string;
|
|
11
6
|
date: string;
|
|
12
|
-
media?: MediaType[] | undefined;
|
|
13
|
-
header: {
|
|
14
|
-
title: string;
|
|
15
|
-
message?: string | undefined;
|
|
16
|
-
};
|
|
17
7
|
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -5,4 +5,4 @@ export declare const editorExtensions: ({ placeholderOptions, mentionableUsers,
|
|
|
5
5
|
query: string;
|
|
6
6
|
}) => SuggestedUser[];
|
|
7
7
|
placeholderOptions?: Partial<PlaceholderOptions> | undefined;
|
|
8
|
-
}) => (import("@tiptap/react").Extension<import("@tiptap/extension-typography").TypographyOptions, any> | import("@tiptap/react").Mark<import("@tiptap/extension-link").LinkOptions, any> | import("@tiptap/react").Extension<import("@tiptap/starter-kit").StarterKitOptions, any> | import("@tiptap/react").
|
|
8
|
+
}) => (import("@tiptap/react").Extension<import("@tiptap/extension-typography").TypographyOptions, any> | import("@tiptap/react").Mark<import("@tiptap/extension-link").LinkOptions, any> | import("@tiptap/react").Extension<import("@tiptap/starter-kit").StarterKitOptions, any> | import("@tiptap/react").Extension<PlaceholderOptions, any> | import("@tiptap/react").Extension<import("@tiptap/extension-character-count").CharacterCountOptions, import("@tiptap/extension-character-count").CharacterCountStorage> | import("@tiptap/react").Node<import("@tiptap/extension-mention").MentionOptions, any>)[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appquality/unguess-design-system",
|
|
3
|
-
"version": "3.1.86
|
|
3
|
+
"version": "3.1.86",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -37,8 +37,6 @@
|
|
|
37
37
|
"@nivo/waffle": "^0.80.0",
|
|
38
38
|
"@tiptap/extension-bubble-menu": "2.1.16",
|
|
39
39
|
"@tiptap/extension-character-count": "2.1.16",
|
|
40
|
-
"@tiptap/extension-dropcursor": "^2.2.4",
|
|
41
|
-
"@tiptap/extension-image": "^2.2.4",
|
|
42
40
|
"@tiptap/extension-link": "2.1.16",
|
|
43
41
|
"@tiptap/extension-mention": "2.1.16",
|
|
44
42
|
"@tiptap/extension-placeholder": "2.1.16",
|
|
@@ -68,8 +66,7 @@
|
|
|
68
66
|
"react-slick": "^0.29.0",
|
|
69
67
|
"react-window": "^1.8.6",
|
|
70
68
|
"tippy.js": "^6.3.7",
|
|
71
|
-
"ua-parser-js": "^1.0.2"
|
|
72
|
-
"uuid": "^9.0.1"
|
|
69
|
+
"ua-parser-js": "^1.0.2"
|
|
73
70
|
},
|
|
74
71
|
"devDependencies": {
|
|
75
72
|
"@babel/preset-env": "^7.21.5",
|
|
@@ -93,7 +90,6 @@
|
|
|
93
90
|
"@types/react-window": "^1.8.5",
|
|
94
91
|
"@types/styled-components": "^5.1.23",
|
|
95
92
|
"@types/ua-parser-js": "^0.7.36",
|
|
96
|
-
"@types/uuid": "^9.0.8",
|
|
97
93
|
"@zendeskgarden/react-dropdowns": "^8.49.0",
|
|
98
94
|
"@zendeskgarden/react-forms": "^8.49.0",
|
|
99
95
|
"@zendeskgarden/react-theming": "^8.48.2",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
src: string;
|
|
3
|
-
index?: number;
|
|
4
|
-
removeThumbnail?: (index: number) => void;
|
|
5
|
-
clickThumbnail: () => void;
|
|
6
|
-
showX?: boolean;
|
|
7
|
-
isLoadingMedia: boolean;
|
|
8
|
-
isError?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare const ImageThumbnail: ({ src, index, removeThumbnail, clickThumbnail, showX, isLoadingMedia, isError, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export default ImageThumbnail;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
src: string;
|
|
3
|
-
index?: number;
|
|
4
|
-
removeThumbnail?: (index: number) => void;
|
|
5
|
-
clickThumbnail: () => void;
|
|
6
|
-
showX?: boolean;
|
|
7
|
-
isLoadingMedia: boolean;
|
|
8
|
-
isError?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare const VideoThumbnail: ({ src, index, removeThumbnail, clickThumbnail, showX, isLoadingMedia, isError, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export default VideoThumbnail;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface FileElement {
|
|
2
|
-
fileName: string;
|
|
3
|
-
fileType: string;
|
|
4
|
-
errorCode?: "FILE_TOO_BIG" | "INVALID_FILE_EXTENSION" | "GENERIC_ERROR";
|
|
5
|
-
previewUrl: string;
|
|
6
|
-
internal_id: string;
|
|
7
|
-
isLoadingMedia: boolean;
|
|
8
|
-
}
|
|
9
|
-
interface Props {
|
|
10
|
-
openLightbox: (file: File, index: number) => void;
|
|
11
|
-
}
|
|
12
|
-
declare const ThumbnailContainer: ({ openLightbox }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
-
export default ThumbnailContainer;
|