@appquality/unguess-design-system 3.1.87-beta-attachments → 3.1.87
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 +253 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +1000 -585
- package/build/stories/chat/_types.d.ts +7 -1
- package/build/stories/chat/context/chatContext.d.ts +11 -12
- package/build/stories/chat/index.stories.d.ts +2 -2
- package/build/stories/chat/parts/ThumbnailContainer/DeleteThumbnailX.d.ts +1 -2
- package/build/stories/chat/parts/ThumbnailContainer/ImageThumbnail.d.ts +11 -0
- package/build/stories/chat/parts/ThumbnailContainer/VideoThumbnail.d.ts +11 -0
- package/build/stories/chat/parts/ThumbnailContainer/index.d.ts +2 -1
- package/build/stories/highlight/_types.d.ts +38 -0
- package/build/stories/highlight/highlightContext.d.ts +10 -0
- package/build/stories/highlight/index.d.ts +10 -0
- package/build/stories/highlight/index.stories.d.ts +18 -0
- package/build/stories/highlight/searchable.d.ts +4 -0
- package/build/stories/player/_types.d.ts +18 -0
- package/build/stories/player/index.stories.d.ts +1 -2
- package/build/stories/player/parts/bookmark.d.ts +2 -0
- package/build/stories/player/parts/controls.d.ts +7 -2
- package/build/stories/player/parts/controlsCenterGroup.d.ts +2 -1
- package/build/stories/player/parts/cutterButton.d.ts +6 -0
- package/build/stories/player/parts/progress.d.ts +11 -0
- package/build/stories/player/parts/progressContext.d.ts +16 -0
- package/build/stories/player/parts/timeLabel.d.ts +2 -2
- package/package.json +4 -2
- package/build/stories/chat/parts/ThumbnailContainer/Thumbnail.d.ts +0 -13
- package/yarn-error.log +0 -17994
|
@@ -8,11 +8,12 @@ export type SuggestedUser = {
|
|
|
8
8
|
email: string;
|
|
9
9
|
};
|
|
10
10
|
export interface ChatEditorArgs extends Partial<EditorOptions> {
|
|
11
|
+
author: Author;
|
|
12
|
+
messageBadFileFormat: string;
|
|
11
13
|
placeholderOptions?: Partial<PlaceholderOptions>;
|
|
12
14
|
hasFloatingMenu?: boolean;
|
|
13
15
|
hasButtonsMenu?: boolean;
|
|
14
16
|
bubbleOptions?: any;
|
|
15
|
-
author: Author;
|
|
16
17
|
i18n?: {
|
|
17
18
|
menu?: {
|
|
18
19
|
bold?: string;
|
|
@@ -37,6 +38,11 @@ export interface EditorHeaderArgs {
|
|
|
37
38
|
title?: string;
|
|
38
39
|
validation?: validationStatus;
|
|
39
40
|
}
|
|
41
|
+
export interface FileItem extends File {
|
|
42
|
+
isLoadingMedia: boolean;
|
|
43
|
+
isError?: boolean;
|
|
44
|
+
internal_id: string;
|
|
45
|
+
}
|
|
40
46
|
export interface FloatingMenuArgs extends Partial<BubbleMenuProps> {
|
|
41
47
|
}
|
|
42
48
|
export {};
|
|
@@ -1,37 +1,36 @@
|
|
|
1
1
|
import { Editor } from "@tiptap/react";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { SuggestedUser } from "../_types";
|
|
3
|
+
import { FileItem, 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
8
|
addThumbnails: (props: {
|
|
9
|
-
files:
|
|
10
|
-
isLoadingMedia: boolean;
|
|
11
|
-
})[];
|
|
9
|
+
files: FileItem[];
|
|
12
10
|
}) => void;
|
|
13
11
|
removeThumbnail: (index: number) => void;
|
|
14
|
-
thumbnails:
|
|
15
|
-
isLoadingMedia: boolean;
|
|
16
|
-
})[];
|
|
12
|
+
thumbnails: FileItem[];
|
|
17
13
|
mentionableUsers: (props: {
|
|
18
14
|
query: string;
|
|
19
15
|
}) => SuggestedUser[];
|
|
20
16
|
afterUploadCallback: (failed: string[]) => void;
|
|
17
|
+
clearInput: () => void;
|
|
18
|
+
onDeleteThumbnail: (id: string) => void;
|
|
21
19
|
};
|
|
22
20
|
export declare const ChatContext: React.Context<ChatContextType | null>;
|
|
23
21
|
export interface Data {
|
|
24
|
-
uploaded_ids?:
|
|
22
|
+
uploaded_ids?: {
|
|
23
|
+
id: number;
|
|
24
|
+
}[];
|
|
25
25
|
failed?: {
|
|
26
26
|
name: string;
|
|
27
27
|
errorCode: string;
|
|
28
28
|
}[];
|
|
29
29
|
}
|
|
30
|
-
export declare const ChatContextProvider: ({ onSave, onFileUpload, setMentionableUsers, children, }: {
|
|
30
|
+
export declare const ChatContextProvider: ({ onSave, onFileUpload, onDeleteThumbnail, setMentionableUsers, children, }: {
|
|
31
31
|
onSave?: ((editor: Editor, mentions: SuggestedUser[]) => void) | undefined;
|
|
32
|
-
onFileUpload?: ((files:
|
|
33
|
-
|
|
34
|
-
})[]) => Promise<Data>) | undefined;
|
|
32
|
+
onFileUpload?: ((files: FileItem[]) => Promise<Data>) | undefined;
|
|
33
|
+
onDeleteThumbnail: (id: string) => void;
|
|
35
34
|
children: React.ReactNode;
|
|
36
35
|
setMentionableUsers: (props: {
|
|
37
36
|
query: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PlaceholderOptions } from "@tiptap/extension-placeholder";
|
|
2
2
|
import { Editor as TipTapEditor } from "@tiptap/react";
|
|
3
|
-
import { ChatEditorArgs, SuggestedUser } from "./_types";
|
|
3
|
+
import { ChatEditorArgs, FileItem, SuggestedUser } from "./_types";
|
|
4
4
|
import { MediaType } from "./parts/comment";
|
|
5
5
|
import { Data } from "./context/chatContext";
|
|
6
6
|
interface EditorStoryArgs extends ChatEditorArgs {
|
|
@@ -18,7 +18,7 @@ interface EditorStoryArgs extends ChatEditorArgs {
|
|
|
18
18
|
editorText?: string;
|
|
19
19
|
background?: string;
|
|
20
20
|
onSave: (editor: TipTapEditor, mentions: SuggestedUser[]) => void;
|
|
21
|
-
onFileUpload?: (files:
|
|
21
|
+
onFileUpload?: (files: FileItem[]) => Promise<Data>;
|
|
22
22
|
placeholderOptions?: Partial<PlaceholderOptions>;
|
|
23
23
|
}
|
|
24
24
|
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, EditorStoryArgs>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
interface Props {
|
|
2
|
-
content: string;
|
|
3
2
|
deleteThumbnail: (e: any) => void;
|
|
4
3
|
}
|
|
5
|
-
declare const DeleteThumbnailX: ({
|
|
4
|
+
declare const DeleteThumbnailX: ({ deleteThumbnail }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export default DeleteThumbnailX;
|
|
@@ -0,0 +1,11 @@
|
|
|
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;
|
|
@@ -0,0 +1,11 @@
|
|
|
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,9 +1,10 @@
|
|
|
1
1
|
export interface FileElement {
|
|
2
2
|
fileName: string;
|
|
3
3
|
fileType: string;
|
|
4
|
-
status: "success" | "failed" | "uploading";
|
|
5
4
|
errorCode?: "FILE_TOO_BIG" | "INVALID_FILE_EXTENSION" | "GENERIC_ERROR";
|
|
6
5
|
previewUrl: string;
|
|
6
|
+
internal_id: string;
|
|
7
|
+
isLoadingMedia: boolean;
|
|
7
8
|
}
|
|
8
9
|
interface Props {
|
|
9
10
|
openLightbox: (file: File, index: number) => void;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ISpanProps } from "@zendeskgarden/react-typography";
|
|
2
|
+
export interface HighlightArgs {
|
|
3
|
+
/**
|
|
4
|
+
* Applies a font color. Use [PALETTE](/components/palette#palette) colors
|
|
5
|
+
* when possible. Accepts all hex values.
|
|
6
|
+
*/
|
|
7
|
+
hue?: string;
|
|
8
|
+
/** Updates the element's HTML tag */
|
|
9
|
+
tag?: any;
|
|
10
|
+
/** Applies bold font style. Font weight is inherited by default. */
|
|
11
|
+
isBold?: boolean;
|
|
12
|
+
/** Renders with monospace font */
|
|
13
|
+
isMonospace?: boolean;
|
|
14
|
+
/** Adjusts the font size. By default font size is medium */
|
|
15
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl";
|
|
16
|
+
handleSelection?: (part: {
|
|
17
|
+
from: number;
|
|
18
|
+
to: number;
|
|
19
|
+
text: string;
|
|
20
|
+
}) => void;
|
|
21
|
+
search?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface Observation {
|
|
24
|
+
id: number;
|
|
25
|
+
start: number;
|
|
26
|
+
end: number;
|
|
27
|
+
backgroundColor?: string;
|
|
28
|
+
color?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface WordProps extends ISpanProps {
|
|
31
|
+
start: number;
|
|
32
|
+
end: number;
|
|
33
|
+
currentTime?: number;
|
|
34
|
+
observations?: Observation[];
|
|
35
|
+
text: string;
|
|
36
|
+
/** Adjusts the font size. By default font size is medium */
|
|
37
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl";
|
|
38
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type HighlightContextType = {
|
|
3
|
+
searchTerm: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const HighlightContext: React.Context<HighlightContextType | null>;
|
|
6
|
+
export declare const HighlightContextProvider: ({ term, children, }: {
|
|
7
|
+
term?: string | undefined;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const useHighlightContext: () => HighlightContextType;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
import { HighlightArgs, WordProps } from "./_types";
|
|
3
|
+
/**
|
|
4
|
+
* Use Highlight to use highlight interation on any text element
|
|
5
|
+
*/
|
|
6
|
+
declare const Highlight: {
|
|
7
|
+
(props: PropsWithChildren<HighlightArgs>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
Word: (props: WordProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
export { Highlight };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HighlightArgs } from "./_types";
|
|
2
|
+
interface StoryArgs extends HighlightArgs {
|
|
3
|
+
words: {
|
|
4
|
+
start: number;
|
|
5
|
+
end: number;
|
|
6
|
+
word: string;
|
|
7
|
+
speaker: number;
|
|
8
|
+
}[];
|
|
9
|
+
currentTime: number;
|
|
10
|
+
includeSearch?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, StoryArgs>;
|
|
13
|
+
export declare const VideoSync: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, StoryArgs>;
|
|
14
|
+
export declare const WithSearch: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, StoryArgs>;
|
|
15
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, HighlightArgs & {
|
|
16
|
+
children?: import("react").ReactNode;
|
|
17
|
+
}>;
|
|
18
|
+
export default _default;
|
|
@@ -3,6 +3,24 @@ export interface PlayerArgs extends HTMLAttributes<HTMLVideoElement> {
|
|
|
3
3
|
url: string;
|
|
4
4
|
start?: number;
|
|
5
5
|
end?: number;
|
|
6
|
+
enablePipOnScroll?: boolean;
|
|
7
|
+
onCutHandler?: (time: number) => void;
|
|
8
|
+
isCutting?: boolean;
|
|
9
|
+
bookmarks?: IBookmark[];
|
|
10
|
+
handleBookmarkUpdate?: (bookmark: IBookmark) => void;
|
|
11
|
+
i18n?: PlayerI18n;
|
|
12
|
+
}
|
|
13
|
+
export interface PlayerI18n {
|
|
14
|
+
beforeHighlight?: string;
|
|
15
|
+
onHighlight?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface IBookmark {
|
|
18
|
+
id: number;
|
|
19
|
+
start: number;
|
|
20
|
+
end: number;
|
|
21
|
+
hue?: string;
|
|
22
|
+
label?: string;
|
|
23
|
+
onClick?: () => void;
|
|
6
24
|
}
|
|
7
25
|
export interface WrapperProps {
|
|
8
26
|
isPlaying?: boolean;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PlayerArgs } from "./_types";
|
|
3
2
|
interface PlayerStoryArgs extends PlayerArgs {
|
|
4
|
-
url: string;
|
|
5
3
|
}
|
|
6
4
|
export declare const Basic: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, PlayerStoryArgs>;
|
|
7
5
|
export declare const Streaming: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, PlayerStoryArgs>;
|
|
6
|
+
export declare const WithBookmarks: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, PlayerStoryArgs>;
|
|
8
7
|
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, PlayerArgs & import("react").RefAttributes<HTMLVideoElement>>;
|
|
9
8
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { WrapperProps } from "../_types";
|
|
2
|
+
import { IBookmark, PlayerI18n, WrapperProps } from "../_types";
|
|
3
3
|
export declare const ControlsWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, WrapperProps>>;
|
|
4
4
|
export declare const ControlsBar: import("styled-components").IStyledComponent<"web", {
|
|
5
5
|
ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
|
|
@@ -268,6 +268,11 @@ export declare const ControlsBar: import("styled-components").IStyledComponent<"
|
|
|
268
268
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
269
269
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
270
270
|
}>;
|
|
271
|
-
export declare const Controls: ({ container, }: {
|
|
271
|
+
export declare const Controls: ({ container, onCutHandler, bookmarks, isCutting, onBookMarkUpdated, i18n, }: {
|
|
272
272
|
container: HTMLDivElement | null;
|
|
273
|
+
onCutHandler?: ((time: number) => void) | undefined;
|
|
274
|
+
bookmarks?: IBookmark[] | undefined;
|
|
275
|
+
isCutting?: boolean | undefined;
|
|
276
|
+
onBookMarkUpdated?: ((bookmark: IBookmark) => void) | undefined;
|
|
277
|
+
i18n?: PlayerI18n | undefined;
|
|
273
278
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
export declare const ControlsGroupCenter: (props: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PlayerI18n } from "../_types";
|
|
2
|
+
export declare const Cutter: ({ onCutHandler, isCutting, i18n, }: {
|
|
3
|
+
onCutHandler?: ((time: number) => void) | undefined;
|
|
4
|
+
isCutting?: boolean | undefined;
|
|
5
|
+
i18n?: PlayerI18n | undefined;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface ProgressProps {
|
|
3
|
+
/**
|
|
4
|
+
* The current progress of the player
|
|
5
|
+
*/
|
|
6
|
+
progress: number;
|
|
7
|
+
handleSkipAhead: (pageX: number) => void;
|
|
8
|
+
duration: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const ProgressBar: import("react").ForwardRefExoticComponent<ProgressProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IBookmark } from "../_types";
|
|
3
|
+
export type ProgressContextType = {
|
|
4
|
+
reset: () => void;
|
|
5
|
+
isGrabbing: boolean;
|
|
6
|
+
setIsGrabbing: React.Dispatch<React.SetStateAction<boolean>>;
|
|
7
|
+
fromEnd: boolean;
|
|
8
|
+
setFromEnd: React.Dispatch<React.SetStateAction<boolean>>;
|
|
9
|
+
activeBookmark?: IBookmark;
|
|
10
|
+
setactiveBookmark: React.Dispatch<React.SetStateAction<IBookmark | undefined>>;
|
|
11
|
+
};
|
|
12
|
+
export declare const ProgressContext: React.Context<ProgressContextType | null>;
|
|
13
|
+
export declare const ProgressContextProvider: ({ children, }: {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const useProgressContext: () => ProgressContextType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appquality/unguess-design-system",
|
|
3
|
-
"version": "3.1.87
|
|
3
|
+
"version": "3.1.87",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -68,7 +68,8 @@
|
|
|
68
68
|
"react-slick": "^0.29.0",
|
|
69
69
|
"react-window": "^1.8.6",
|
|
70
70
|
"tippy.js": "^6.3.7",
|
|
71
|
-
"ua-parser-js": "^1.0.2"
|
|
71
|
+
"ua-parser-js": "^1.0.2",
|
|
72
|
+
"uuid": "^9.0.1"
|
|
72
73
|
},
|
|
73
74
|
"devDependencies": {
|
|
74
75
|
"@babel/preset-env": "^7.21.5",
|
|
@@ -92,6 +93,7 @@
|
|
|
92
93
|
"@types/react-window": "^1.8.5",
|
|
93
94
|
"@types/styled-components": "^5.1.23",
|
|
94
95
|
"@types/ua-parser-js": "^0.7.36",
|
|
96
|
+
"@types/uuid": "^9.0.8",
|
|
95
97
|
"@zendeskgarden/react-dropdowns": "^8.49.0",
|
|
96
98
|
"@zendeskgarden/react-forms": "^8.49.0",
|
|
97
99
|
"@zendeskgarden/react-theming": "^8.48.2",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
src: string;
|
|
3
|
-
label: string;
|
|
4
|
-
index?: number;
|
|
5
|
-
removeThumbnail?: (index: number) => void;
|
|
6
|
-
clickThumbnail: () => void;
|
|
7
|
-
showX?: boolean;
|
|
8
|
-
showLabel?: boolean;
|
|
9
|
-
mediaType: string;
|
|
10
|
-
isLoadingMedia: boolean;
|
|
11
|
-
}
|
|
12
|
-
declare const Thumbnail: ({ clickThumbnail, src, label, index, removeThumbnail, showX, showLabel, mediaType, isLoadingMedia, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export default Thumbnail;
|