@appquality/unguess-design-system 3.1.90 → 3.1.91-alpha-marks

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.
@@ -9,7 +9,6 @@ export type SuggestedUser = {
9
9
  };
10
10
  export interface ChatEditorArgs extends Partial<EditorOptions> {
11
11
  author: Author;
12
- messageBadFileFormat: string;
13
12
  placeholderOptions?: Partial<PlaceholderOptions>;
14
13
  hasFloatingMenu?: boolean;
15
14
  hasButtonsMenu?: boolean;
@@ -19,7 +18,7 @@ export interface ChatEditorArgs extends Partial<EditorOptions> {
19
18
  bold?: string;
20
19
  italic?: string;
21
20
  mention?: string;
22
- attachment?: string | React.ReactNode;
21
+ attachment?: React.ReactNode;
23
22
  };
24
23
  mention?: {
25
24
  noResults?: string;
@@ -38,10 +37,13 @@ export interface EditorHeaderArgs {
38
37
  title?: string;
39
38
  validation?: validationStatus;
40
39
  }
41
- export interface FileItem extends File {
42
- isLoadingMedia: boolean;
40
+ export interface CommentMedia {
41
+ id: string;
42
+ type: string;
43
+ name?: string;
44
+ isLoadingMedia?: boolean;
43
45
  isError?: boolean;
44
- internal_id: string;
46
+ url?: string;
45
47
  }
46
48
  export interface FloatingMenuArgs extends Partial<BubbleMenuProps> {
47
49
  }
@@ -1,15 +1,15 @@
1
1
  import { Editor } from "@tiptap/react";
2
2
  import React from "react";
3
- import { FileItem, SuggestedUser } from "../_types";
3
+ import { CommentMedia, 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: FileItem[];
9
+ files: (File & CommentMedia)[];
10
10
  }) => void;
11
11
  removeThumbnail: (index: number) => void;
12
- thumbnails: FileItem[];
12
+ thumbnails: CommentMedia[];
13
13
  mentionableUsers: (props: {
14
14
  query: string;
15
15
  }) => SuggestedUser[];
@@ -29,7 +29,7 @@ export interface Data {
29
29
  }
30
30
  export declare const ChatContextProvider: ({ onSave, onFileUpload, onDeleteThumbnail, setMentionableUsers, children, }: {
31
31
  onSave?: ((editor: Editor, mentions: SuggestedUser[]) => void) | undefined;
32
- onFileUpload?: ((files: FileItem[]) => Promise<Data>) | undefined;
32
+ onFileUpload?: ((files: (File & CommentMedia)[]) => Promise<Data>) | undefined;
33
33
  onDeleteThumbnail: (id: string) => void;
34
34
  children: React.ReactNode;
35
35
  setMentionableUsers: (props: {
@@ -0,0 +1,8 @@
1
+ export declare const acceptedMediaTypes: RegExp;
2
+ export declare function useMedia(): {
3
+ getMedia: (data: FileList) => (File & {
4
+ url: string;
5
+ isLoadingMedia: boolean;
6
+ id: string;
7
+ })[];
8
+ };
@@ -1,7 +1,6 @@
1
1
  import { PlaceholderOptions } from "@tiptap/extension-placeholder";
2
2
  import { Editor as TipTapEditor } from "@tiptap/react";
3
- import { ChatEditorArgs, FileItem, SuggestedUser } from "./_types";
4
- import { MediaType } from "./parts/comment";
3
+ import { ChatEditorArgs, CommentMedia, SuggestedUser } from "./_types";
5
4
  import { Data } from "./context/chatContext";
6
5
  interface EditorStoryArgs extends ChatEditorArgs {
7
6
  children?: any;
@@ -13,12 +12,12 @@ interface EditorStoryArgs extends ChatEditorArgs {
13
12
  };
14
13
  message: string;
15
14
  date: string;
16
- media?: MediaType[];
15
+ media?: CommentMedia[];
17
16
  }[];
18
17
  editorText?: string;
19
18
  background?: string;
20
19
  onSave: (editor: TipTapEditor, mentions: SuggestedUser[]) => void;
21
- onFileUpload?: (files: FileItem[]) => Promise<Data>;
20
+ onFileUpload?: (files: (File & CommentMedia)[]) => Promise<Data>;
22
21
  placeholderOptions?: Partial<PlaceholderOptions>;
23
22
  }
24
23
  export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, EditorStoryArgs>;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { CommentMedia } from "../_types";
3
+ interface MediaLightBoxProps {
4
+ isOpen: boolean;
5
+ header: React.ReactNode;
6
+ onClose: () => void;
7
+ slideChange: (index: number) => void;
8
+ selectedImageIndex: number;
9
+ thumbnails: CommentMedia[];
10
+ videoRefs: React.MutableRefObject<Array<HTMLVideoElement | null>>;
11
+ details?: React.ReactNode;
12
+ }
13
+ declare const MediaLightBox: ({ header, onClose, slideChange, selectedImageIndex, thumbnails, videoRefs, isOpen, details }: MediaLightBoxProps) => import("react/jsx-runtime").JSX.Element | null;
14
+ export default MediaLightBox;
@@ -0,0 +1,11 @@
1
+ interface Props {
2
+ src?: string;
3
+ type: string;
4
+ clickThumbnail?: () => void;
5
+ isLoadingMedia?: boolean;
6
+ removeThumbnail?: () => void;
7
+ showX?: boolean;
8
+ isError?: boolean;
9
+ }
10
+ declare const Thumbnail: ({ src, type, removeThumbnail, clickThumbnail, showX, isLoadingMedia, isError, }: Props) => import("react/jsx-runtime").JSX.Element;
11
+ export default Thumbnail;
@@ -7,7 +7,7 @@ export interface FileElement {
7
7
  isLoadingMedia: boolean;
8
8
  }
9
9
  interface Props {
10
- openLightbox: (file: File, index: number) => void;
10
+ openLightbox: (index: number) => void;
11
11
  }
12
12
  declare const ThumbnailContainer: ({ openLightbox }: Props) => import("react/jsx-runtime").JSX.Element | null;
13
13
  export default ThumbnailContainer;
@@ -1,15 +1,10 @@
1
1
  import { PropsWithChildren } from "react";
2
- import { Author } from "../_types";
3
- export type MediaType = {
4
- url: string;
5
- id: number;
6
- type: "image" | "video";
7
- };
2
+ import { Author, CommentMedia } from "../_types";
8
3
  export declare const Comment: ({ author, message, children, date, media, header, }: PropsWithChildren<{
9
4
  author: Author;
10
5
  message: string;
11
6
  date: string;
12
- media?: MediaType[] | undefined;
7
+ media?: CommentMedia[] | undefined;
13
8
  header: {
14
9
  title: string;
15
10
  message?: string | undefined;
@@ -41,9 +41,15 @@ export declare const DemoTranscript: {
41
41
  num_words: number;
42
42
  start: number;
43
43
  end: number;
44
+ sentiment: number;
44
45
  }[];
45
46
  };
46
47
  }[];
47
48
  }[];
48
49
  };
49
50
  };
51
+ export declare const DemoSentiment: {
52
+ role: string;
53
+ rate: number;
54
+ content: string;
55
+ };
@@ -0,0 +1,7 @@
1
+ export declare const getSentiment: (value: number) => {
2
+ color: string;
3
+ text: import("react/jsx-runtime").JSX.Element;
4
+ } | {
5
+ color: string;
6
+ text: string;
7
+ };
@@ -0,0 +1,5 @@
1
+ import { StoryArgs } from "../index.stories";
2
+ export declare const TSentiment: (args: StoryArgs & {
3
+ currentTime: number;
4
+ offset: number;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,3 @@
1
- export declare const Searchable: ({ start, text, }: {
2
- start: number;
1
+ export declare const Searchable: ({ text, }: {
3
2
  text: string;
4
3
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { HTMLAttributes } from "react";
1
+ import { HTMLAttributes, ReactNode } from "react";
2
2
  export interface PlayerArgs extends HTMLAttributes<HTMLVideoElement> {
3
3
  url: string;
4
4
  start?: number;
@@ -20,9 +20,24 @@ export interface IBookmark {
20
20
  end: number;
21
21
  hue?: string;
22
22
  label?: string;
23
+ tooltipContent?: ReactNode;
23
24
  onClick?: () => void;
25
+ tags?: VideoTag[];
24
26
  }
25
27
  export interface WrapperProps {
26
28
  isPlaying?: boolean;
27
29
  isLoaded?: boolean;
28
30
  }
31
+ type VideoTag = {
32
+ group: {
33
+ id: number;
34
+ name: string;
35
+ };
36
+ tag: {
37
+ id: number;
38
+ name: string;
39
+ style: string;
40
+ usageNumber: number;
41
+ };
42
+ };
43
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "3.1.90",
3
+ "version": "3.1.91-alpha-marks",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -98,6 +98,7 @@
98
98
  "@zendeskgarden/react-forms": "^8.49.0",
99
99
  "@zendeskgarden/react-theming": "^8.48.2",
100
100
  "@zendeskgarden/svg-icons": "^6.31.1",
101
+ "auto": "^11.1.1",
101
102
  "formik": "^2.2.9",
102
103
  "prop-types": "^15.8.1",
103
104
  "react": "^18.2.0",
@@ -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;