@layers-app/shared 0.0.39-comments.3 → 0.0.39-comments.4

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.
Files changed (27) hide show
  1. package/dist/{KanbanLayout-C5JdVttk.js → KanbanLayout-BJFmisAk.js} +1 -1
  2. package/dist/components/AppContainer/AppContainer.d.ts +1 -1
  3. package/dist/components/AppContainer/components/DesktopNavbar.d.ts +1 -1
  4. package/dist/components/AppContainer/components/MenuUserDropdown.d.ts +2 -0
  5. package/dist/components/AppContainer/types.d.ts +4 -1
  6. package/dist/components/CommentComposer/index.d.ts +2 -1
  7. package/dist/components/CommentsPanel/index.d.ts +2 -1
  8. package/dist/components/EmojiPicker/EmojiPicker.d.ts +2 -1
  9. package/dist/components/FormViewer/helpers/conditions.d.ts +6 -0
  10. package/dist/components/FormViewer/helpers/helpers.d.ts +6 -0
  11. package/dist/components/FormViewer/helpers/steps.d.ts +6 -0
  12. package/dist/components/FormViewer/hooks/useActiveControl.d.ts +2 -0
  13. package/dist/components/FormViewer/hooks/useActiveStep.d.ts +6 -0
  14. package/dist/components/FormViewer/store/formStore.d.ts +1278 -33
  15. package/dist/components/FormViewer/store/formStoreApi.d.ts +630 -7
  16. package/dist/components/FormViewer/store/selectors.d.ts +7849 -2468
  17. package/dist/components/FormViewer/types/schemes.d.ts +120 -0
  18. package/dist/components/InviteModal/InviteModal.d.ts +2 -0
  19. package/dist/components/InviteModal/slice.d.ts +13 -0
  20. package/dist/components/WorkspaceAvatar/WorkspaceAvatar.d.ts +1 -0
  21. package/dist/helpers/getFileType.d.ts +2 -1
  22. package/dist/helpers/isAppMode.d.ts +2 -0
  23. package/dist/{index-CM1iBMgt.js → index-Cj-dmalk.js} +1702 -1145
  24. package/dist/index.d.ts +3 -0
  25. package/dist/index.js +59 -52
  26. package/dist/index.umd.cjs +59 -59
  27. package/package.json +1 -1
@@ -11,7 +11,7 @@ import "@mantine/form";
11
11
  import "@mantine/dropzone";
12
12
  import "@mantine/notifications";
13
13
  import "lodash-es";
14
- import { u as useOnboardingState, S as StatusBadge } from "./index-CM1iBMgt.js";
14
+ import { u as useOnboardingState, S as StatusBadge } from "./index-Cj-dmalk.js";
15
15
  import "react-dom";
16
16
  import "draggable-ui";
17
17
  import "@mantine/modals";
@@ -5,7 +5,7 @@ declare global {
5
5
  preSignMode?: boolean;
6
6
  }
7
7
  }
8
- export declare const AppContainer: (({ header, content, navbar, navbarTitle, displayType, footer, }: AppContainerProps) => import("react/jsx-runtime").JSX.Element) & {
8
+ export declare const AppContainer: (({ header, content, navbar, navbarTitle, displayType, footer, onTitleChange, }: AppContainerProps) => import("react/jsx-runtime").JSX.Element) & {
9
9
  NavbarContent: ({ children }: import('react').PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
10
10
  NavbarFooter: ({ children }: import('react').PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
11
11
  NavbarHeader: ({ children }: import('react').PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
@@ -4,4 +4,4 @@ declare global {
4
4
  openTemplatesModal?: () => void;
5
5
  }
6
6
  }
7
- export declare const DesktopNavbar: (props: Pick<AppContainerProps, "navbar" | "navbarTitle" | "displayType">) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const DesktopNavbar: (props: Pick<AppContainerProps, "navbar" | "navbarTitle" | "displayType" | "onTitleChange">) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,12 @@
1
1
  import { PropsWithChildren, ReactNode } from 'react';
2
+ import { appMode } from '../../..';
2
3
  import { FloatingPosition } from '@mantine/core';
3
4
  export type MenuUser = {
4
5
  id: string;
5
6
  avatar: string | null;
6
7
  email?: string | null;
7
8
  name: string | null;
9
+ mode?: appMode;
8
10
  };
9
11
  export type UserNotifications = {
10
12
  createdAt: string;
@@ -17,11 +17,14 @@ export type AppContainerProps = {
17
17
  navbarTitle?: string;
18
18
  displayType?: 'ROUNDED' | 'BOXED';
19
19
  footer?: ReactNode;
20
+ onTitleChange?: (title?: string) => void;
20
21
  };
21
22
  export type AppContainerDataStore = {
22
23
  tools: ToolDef[];
23
24
  workspaceMenu: WorkspaceMenuProps;
24
- user: MenuUser;
25
+ user: MenuUser & {
26
+ role: string;
27
+ };
25
28
  userMenuItems?: ReactNode;
26
29
  notifications: UserNotifications[];
27
30
  isAnonym: boolean;
@@ -1,5 +1,5 @@
1
1
  import { MutableRefObject } from 'react';
2
- import { RangeSelection } from '@layers-app/editor';
2
+ import { RangeSelection, EditorType } from '@layers-app/editor';
3
3
  import { Comment, CommentsNs, GeneralComment, ICommentFile, ICommentOptions, IUser, Thread } from '../CommentsPanel/types.ts';
4
4
  import * as React from 'react';
5
5
  interface CommentValue {
@@ -14,6 +14,7 @@ interface CommentComposerProps {
14
14
  setCommentValue: React.Dispatch<React.SetStateAction<CommentValue>>;
15
15
  commentValue: CommentValue;
16
16
  registerClearEditor?: (fn: () => void) => void;
17
+ editorRef?: React.MutableRefObject<EditorType | null>;
17
18
  }) => React.ReactNode;
18
19
  getSelectionText?: (selection: RangeSelection) => string;
19
20
  removeCommentImage?: (index: string) => void;
@@ -5,6 +5,7 @@ import * as React from 'react';
5
5
  interface CommentsPanelProps extends Omit<SharedCommentProps, 'commentOrThread'> {
6
6
  comments: Comments;
7
7
  activeIDs: string[];
8
+ restoreComment: (commentId: string, threadId?: string) => void;
8
9
  storeOptions: StoreOptions;
9
10
  updateThreadId: (tempId: string, realId: string, updatedAt: string, commentType: string, files: ICommentFile[], thread?: Thread) => void;
10
11
  deleteCommentImage: (photoToRemove: string, threadOrGeneralId: string, commentId?: string) => void;
@@ -22,5 +23,5 @@ interface CommentsPanelProps extends Omit<SharedCommentProps, 'commentOrThread'>
22
23
  setCommentsFilter: React.Dispatch<React.SetStateAction<CommentsFilter>>;
23
24
  isLoading: boolean;
24
25
  }
25
- export declare function CommentsPanel({ activeIDs, deleteCommentOrThread, comments, submitAddComment, markNodeMap, storeOptions, deleteCommentImage, addCommentReaction, removeCommentReactions, updateCommentTextOrImage, listRef, resolveThreat, updateThreadId, locales, getEditor, setCommentsFilter, commentsFilter, clipPath, isLoading, isSidebar, }: CommentsPanelProps): ReactElement;
26
+ export declare function CommentsPanel({ activeIDs, deleteCommentOrThread, comments, submitAddComment, markNodeMap, storeOptions, deleteCommentImage, addCommentReaction, removeCommentReactions, restoreComment, updateCommentTextOrImage, listRef, resolveThreat, updateThreadId, locales, getEditor, setCommentsFilter, commentsFilter, clipPath, isLoading, isSidebar, }: CommentsPanelProps): ReactElement;
26
27
  export {};
@@ -7,6 +7,7 @@ export type EmojiPickerProps = {
7
7
  position?: FloatingPosition;
8
8
  popoverProps?: PopoverProps;
9
9
  locales?: EmojiPickerLocales;
10
+ withinPortal?: boolean;
10
11
  showIcons?: boolean;
11
12
  showColors?: boolean;
12
13
  showEmojis?: boolean;
@@ -28,4 +29,4 @@ export type EmojiPickerLocales = {
28
29
  icons?: string;
29
30
  emojiCategory?: Record<string, string>;
30
31
  };
31
- export declare const EmojiPicker: ({ project, value, querySearch, children, onChange, position, popoverProps, showIcons, showColors, defaultActiveTab, showEmojis, locales: _locales, openWhen, triggerRegex, typingSeq, }: PropsWithChildren<EmojiPickerProps>) => import("react/jsx-runtime").JSX.Element;
32
+ export declare const EmojiPicker: ({ project, value, querySearch, children, onChange, position, popoverProps, showIcons, showColors, defaultActiveTab, showEmojis, withinPortal, locales: _locales, openWhen, triggerRegex, typingSeq, }: PropsWithChildren<EmojiPickerProps>) => import("react/jsx-runtime").JSX.Element;
@@ -96,6 +96,7 @@ export declare const getNextStep: (step: StepData, steps: StepData[], form: UseF
96
96
  required?: boolean | undefined;
97
97
  variableName?: string | undefined;
98
98
  showInput?: boolean | undefined;
99
+ otherOption?: boolean | undefined;
99
100
  } | {
100
101
  id: string;
101
102
  options: {
@@ -109,6 +110,7 @@ export declare const getNextStep: (step: StepData, steps: StepData[], form: UseF
109
110
  required?: boolean | undefined;
110
111
  variableName?: string | undefined;
111
112
  showInput?: boolean | undefined;
113
+ otherOption?: boolean | undefined;
112
114
  minOptions?: number | undefined;
113
115
  maxOptions?: number | undefined;
114
116
  } | {
@@ -208,6 +210,10 @@ export declare const getNextStep: (step: StepData, steps: StepData[], form: UseF
208
210
  variableName?: string | undefined;
209
211
  })[];
210
212
  trigger: string;
213
+ position?: {
214
+ x: number;
215
+ y: number;
216
+ } | undefined;
211
217
  media?: {
212
218
  video?: string | undefined;
213
219
  image?: string | undefined;
@@ -95,6 +95,7 @@ export declare const sortSteps: (steps: StepData[]) => {
95
95
  required?: boolean | undefined;
96
96
  variableName?: string | undefined;
97
97
  showInput?: boolean | undefined;
98
+ otherOption?: boolean | undefined;
98
99
  } | {
99
100
  id: string;
100
101
  options: {
@@ -108,6 +109,7 @@ export declare const sortSteps: (steps: StepData[]) => {
108
109
  required?: boolean | undefined;
109
110
  variableName?: string | undefined;
110
111
  showInput?: boolean | undefined;
112
+ otherOption?: boolean | undefined;
111
113
  minOptions?: number | undefined;
112
114
  maxOptions?: number | undefined;
113
115
  } | {
@@ -207,6 +209,10 @@ export declare const sortSteps: (steps: StepData[]) => {
207
209
  variableName?: string | undefined;
208
210
  })[];
209
211
  trigger: string;
212
+ position?: {
213
+ x: number;
214
+ y: number;
215
+ } | undefined;
210
216
  media?: {
211
217
  video?: string | undefined;
212
218
  image?: string | undefined;
@@ -95,6 +95,7 @@ export declare const getFirstStep: (steps: StepData[]) => {
95
95
  required?: boolean | undefined;
96
96
  variableName?: string | undefined;
97
97
  showInput?: boolean | undefined;
98
+ otherOption?: boolean | undefined;
98
99
  } | {
99
100
  id: string;
100
101
  options: {
@@ -108,6 +109,7 @@ export declare const getFirstStep: (steps: StepData[]) => {
108
109
  required?: boolean | undefined;
109
110
  variableName?: string | undefined;
110
111
  showInput?: boolean | undefined;
112
+ otherOption?: boolean | undefined;
111
113
  minOptions?: number | undefined;
112
114
  maxOptions?: number | undefined;
113
115
  } | {
@@ -207,6 +209,10 @@ export declare const getFirstStep: (steps: StepData[]) => {
207
209
  variableName?: string | undefined;
208
210
  })[];
209
211
  trigger: string;
212
+ position?: {
213
+ x: number;
214
+ y: number;
215
+ } | undefined;
210
216
  media?: {
211
217
  video?: string | undefined;
212
218
  image?: string | undefined;
@@ -91,6 +91,7 @@ export declare const useActiveControl: () => {
91
91
  required?: boolean | undefined;
92
92
  variableName?: string | undefined;
93
93
  showInput?: boolean | undefined;
94
+ otherOption?: boolean | undefined;
94
95
  } | {
95
96
  id: string;
96
97
  options: {
@@ -104,6 +105,7 @@ export declare const useActiveControl: () => {
104
105
  required?: boolean | undefined;
105
106
  variableName?: string | undefined;
106
107
  showInput?: boolean | undefined;
108
+ otherOption?: boolean | undefined;
107
109
  minOptions?: number | undefined;
108
110
  maxOptions?: number | undefined;
109
111
  } | {
@@ -93,6 +93,7 @@ export declare const useActiveStep: () => {
93
93
  required?: boolean | undefined;
94
94
  variableName?: string | undefined;
95
95
  showInput?: boolean | undefined;
96
+ otherOption?: boolean | undefined;
96
97
  } | {
97
98
  id: string;
98
99
  options: {
@@ -106,6 +107,7 @@ export declare const useActiveStep: () => {
106
107
  required?: boolean | undefined;
107
108
  variableName?: string | undefined;
108
109
  showInput?: boolean | undefined;
110
+ otherOption?: boolean | undefined;
109
111
  minOptions?: number | undefined;
110
112
  maxOptions?: number | undefined;
111
113
  } | {
@@ -205,6 +207,10 @@ export declare const useActiveStep: () => {
205
207
  variableName?: string | undefined;
206
208
  })[];
207
209
  trigger: string;
210
+ position?: {
211
+ x: number;
212
+ y: number;
213
+ } | undefined;
208
214
  media?: {
209
215
  video?: string | undefined;
210
216
  image?: string | undefined;