@layers-app/shared 0.0.39 → 0.0.41

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 (117) hide show
  1. package/dist/{KanbanLayout-k814Ysrn.js → KanbanLayout-BUnjGOO7.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/hooks/useAppContainerStore.d.ts +5 -3
  6. package/dist/components/AppContainer/types.d.ts +4 -1
  7. package/dist/components/AttachmentsGalleryModal/ShakaPlayer.d.ts +5 -0
  8. package/dist/components/BouncingLogo/BouncingLogo.d.ts +3 -0
  9. package/dist/components/CircleColorPicker/CircleColorPicker.d.ts +2 -2
  10. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts +12 -0
  11. package/dist/components/CommentComposer/index.d.ts +10 -8
  12. package/dist/components/CommentFilterMenu/index.d.ts +9 -0
  13. package/dist/components/CommentsPanel/components/CommentActionMenu.d.ts +5 -1
  14. package/dist/components/CommentsPanel/components/CommentPanelListItem.d.ts +3 -4
  15. package/dist/components/CommentsPanel/components/{CommentFilterMenu.d.ts → CommentTabFilter.d.ts} +2 -1
  16. package/dist/components/CommentsPanel/components/CommentsEmptyPlaceholder.d.ts +5 -2
  17. package/dist/components/CommentsPanel/components/CommentsListItemMenu.d.ts +2 -1
  18. package/dist/components/CommentsPanel/components/CommentsPanelList.d.ts +3 -4
  19. package/dist/components/CommentsPanel/components/CommentsThreadReplyControls.d.ts +5 -1
  20. package/dist/components/CommentsPanel/components/CommentsUploadFilesPreview.d.ts +9 -5
  21. package/dist/components/CommentsPanel/index.d.ts +10 -6
  22. package/dist/components/CommentsPanel/store.d.ts +7 -1
  23. package/dist/components/CommentsPanel/types.d.ts +152 -57
  24. package/dist/components/CommentsPanel/utils.d.ts +11 -5
  25. package/dist/components/EntityTitle/EntityTitle.d.ts +2 -1
  26. package/dist/components/FormViewer/FormViewer.d.ts +8 -0
  27. package/dist/components/FormViewer/KeyboardNavigation.d.ts +5 -0
  28. package/dist/components/FormViewer/components/AllSlidesLayout.d.ts +7 -0
  29. package/dist/components/FormViewer/components/Container.d.ts +5 -0
  30. package/dist/components/FormViewer/components/ListFocusBox.d.ts +4 -0
  31. package/dist/components/FormViewer/components/NavControls.d.ts +4 -0
  32. package/dist/components/FormViewer/components/Navigation/Navigation.d.ts +1 -0
  33. package/dist/components/FormViewer/components/OneSlideLayput.d.ts +7 -0
  34. package/dist/components/FormViewer/components/Step.d.ts +6 -0
  35. package/dist/components/FormViewer/components/StepDescription.d.ts +6 -0
  36. package/dist/components/FormViewer/components/StepTitle.d.ts +6 -0
  37. package/dist/components/FormViewer/components/fields/AddOptionButton.d.ts +3 -0
  38. package/dist/components/FormViewer/components/fields/ButtonField/ButtonField.d.ts +6 -0
  39. package/dist/components/FormViewer/components/fields/ButtonField/InnerButton.d.ts +9 -0
  40. package/dist/components/FormViewer/components/fields/ChoiceField/ChoiceCard.d.ts +11 -0
  41. package/dist/components/FormViewer/components/fields/ChoiceField/ChoiceField.d.ts +6 -0
  42. package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.d.ts +12 -0
  43. package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.d.ts +6 -0
  44. package/dist/components/FormViewer/components/fields/ConfirmButton.d.ts +6 -0
  45. package/dist/components/FormViewer/components/fields/ConfirmField.d.ts +6 -0
  46. package/dist/components/FormViewer/components/fields/DateField.d.ts +4 -0
  47. package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.d.ts +11 -0
  48. package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.d.ts +6 -0
  49. package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.d.ts +5 -0
  50. package/dist/components/FormViewer/components/fields/EmailField.d.ts +4 -0
  51. package/dist/components/FormViewer/components/fields/LocationField.d.ts +4 -0
  52. package/dist/components/FormViewer/components/fields/LongTextField.d.ts +4 -0
  53. package/dist/components/FormViewer/components/fields/MultipleChoice/MultipleChoiceCard.d.ts +12 -0
  54. package/dist/components/FormViewer/components/fields/MultipleChoice/MultipleChoiceField.d.ts +6 -0
  55. package/dist/components/FormViewer/components/fields/NumberField.d.ts +4 -0
  56. package/dist/components/FormViewer/components/fields/PhoneField.d.ts +4 -0
  57. package/dist/components/FormViewer/components/fields/ProgressLine.d.ts +1 -0
  58. package/dist/components/FormViewer/components/fields/RatingField.d.ts +5 -0
  59. package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.d.ts +21 -0
  60. package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.d.ts +14 -0
  61. package/dist/components/FormViewer/components/fields/SliderField.d.ts +5 -0
  62. package/dist/components/FormViewer/components/fields/StartButton.d.ts +5 -0
  63. package/dist/components/FormViewer/components/fields/StartField.d.ts +6 -0
  64. package/dist/components/FormViewer/components/fields/TextField.d.ts +4 -0
  65. package/dist/components/FormViewer/components/fields/UploadField/UploadField.d.ts +30 -0
  66. package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.d.ts +8 -0
  67. package/dist/components/FormViewer/components/fields/YesNoField.d.ts +4 -0
  68. package/dist/components/FormViewer/constants/defaultTheme.d.ts +2 -0
  69. package/dist/components/FormViewer/helpers/conditions.d.ts +285 -0
  70. package/dist/components/FormViewer/helpers/controls.d.ts +6 -0
  71. package/dist/components/FormViewer/helpers/cssScoping.d.ts +11 -0
  72. package/dist/components/FormViewer/helpers/helpers.d.ts +283 -0
  73. package/dist/components/FormViewer/helpers/index.d.ts +7 -0
  74. package/dist/components/FormViewer/helpers/slides.d.ts +3 -0
  75. package/dist/components/FormViewer/helpers/staticClasses.d.ts +47 -0
  76. package/dist/components/FormViewer/helpers/steps.d.ts +298 -0
  77. package/dist/components/FormViewer/helpers/themeUtils.d.ts +2 -0
  78. package/dist/components/FormViewer/helpers/validation.d.ts +10 -0
  79. package/dist/components/FormViewer/hooks/index.d.ts +6 -0
  80. package/dist/components/FormViewer/hooks/useActiveControl.d.ts +206 -0
  81. package/dist/components/FormViewer/hooks/useActiveStep.d.ts +281 -0
  82. package/dist/components/FormViewer/hooks/useCreateFormContext.d.ts +22 -0
  83. package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts +146 -0
  84. package/dist/components/FormViewer/hooks/useFormMobile.d.ts +4 -0
  85. package/dist/components/FormViewer/hooks/useInterpolateText.d.ts +2 -0
  86. package/dist/components/FormViewer/index.d.ts +8 -0
  87. package/dist/components/FormViewer/store/formStore.d.ts +1357 -0
  88. package/dist/components/FormViewer/store/formStoreApi.d.ts +659 -0
  89. package/dist/components/FormViewer/store/selectors.d.ts +80491 -0
  90. package/dist/components/FormViewer/types/form.d.ts +58 -0
  91. package/dist/components/FormViewer/types/schemes.d.ts +7595 -0
  92. package/dist/components/InviteModal/InviteModal.d.ts +2 -0
  93. package/dist/components/InviteModal/slice.d.ts +13 -0
  94. package/dist/components/NoData/NoData.d.ts +24 -6
  95. package/dist/components/SearchFilters/components/{Date.d.ts → DateFilter.d.ts} +1 -1
  96. package/dist/components/WorkspaceAvatar/WorkspaceAvatar.d.ts +1 -0
  97. package/dist/components/modals/openRemoveConfirmModal.d.ts +4 -0
  98. package/dist/components/table/hooks/TableProvider.d.ts +5 -3
  99. package/dist/components/table/hooks/useCreateTable.d.ts +5 -3
  100. package/dist/components/table/hooks/useTableStore.d.ts +5 -3
  101. package/dist/components/table/store.d.ts +5 -3
  102. package/dist/helpers/dates.d.ts +1 -0
  103. package/dist/helpers/getFileType.d.ts +2 -1
  104. package/dist/helpers/getPartOfTheDay.d.ts +1 -0
  105. package/dist/helpers/isAppMode.d.ts +2 -0
  106. package/dist/hooks/useEvent.d.ts +1 -0
  107. package/dist/hooks/useMenu.d.ts +4 -4
  108. package/dist/{index-BHgJVazX.js → index-Bo9kCsKS.js} +46265 -12296
  109. package/dist/index.d.ts +13 -0
  110. package/dist/index.js +80 -2
  111. package/dist/index.umd.cjs +59 -59
  112. package/dist/store/timezoneStore.d.ts +5 -3
  113. package/dist/store/workspacesOrder.d.ts +5 -3
  114. package/package.json +11 -11
  115. package/dist/components/CommentsPanel/components/CommentsMultiSelectUsers.d.ts +0 -6
  116. package/dist/components/CommentsPanel/components/RemoveConfirmModal.d.ts +0 -11
  117. package/dist/components/OnBoarding/steps/AddMembers/AddMembers.d.ts +0 -2
@@ -1,3 +1,4 @@
1
+ import { EditorType } from '@layers-app/editor';
1
2
  import * as React from 'react';
2
3
  export interface ICommentReaction {
3
4
  id: string;
@@ -11,72 +12,69 @@ export interface ICommentReaction {
11
12
  deletedAt: string;
12
13
  version: number;
13
14
  }
14
- export interface ICommentFile extends File {
15
- id?: string;
16
- lastModified: number;
17
- lastModifiedDate: Date;
18
- name: string;
19
- size: number;
20
- type: string;
21
- webkitRelativePath: string;
22
- }
23
- export interface ILocalCommentFile {
24
- clientKey: string;
25
- loading?: boolean;
26
- file: File;
15
+ export interface ICommentFile {
16
+ src: string;
17
+ id: string;
18
+ file: File & {
19
+ id?: string;
20
+ };
21
+ isImage: boolean;
27
22
  }
28
23
  export type UpdateCommentTextArgs = (text: {
29
24
  value: string;
30
25
  restore: boolean;
31
26
  }, files: {
32
27
  deletedFile: ICommentFile[];
33
- newFiles: ILocalCommentFile[];
28
+ newFiles: ICommentFile[];
34
29
  }, threadOrGeneralId: string, commentId?: string) => void;
35
30
  export type Comment = {
36
- author: string;
37
- content: string;
31
+ authorId: string;
32
+ text: string;
38
33
  deleted: boolean;
39
34
  clientKey: string;
35
+ edited: boolean;
40
36
  id: string;
41
37
  tempId?: string;
42
38
  reactions: ICommentReaction[];
43
- files: Array<ICommentFile | ILocalCommentFile>;
39
+ files: Array<ICommentFile>;
44
40
  timeStamp: number;
45
- type: 'comment';
41
+ type: string;
46
42
  };
47
43
  export type Thread = {
48
44
  children: Array<Comment>;
49
45
  id: string;
50
46
  quote: string;
51
- type: 'thread';
52
- resolve: CommentResolve;
53
- author: string;
47
+ edited: boolean;
48
+ type: string;
49
+ resolution: CommentResolve;
50
+ authorId: string;
54
51
  tempId?: string;
55
52
  reactions: ICommentReaction[];
56
- files: Array<ICommentFile | ILocalCommentFile>;
53
+ files: Array<ICommentFile>;
57
54
  timeStamp: number;
58
55
  clientKey: string;
59
- content: string;
56
+ text: string;
60
57
  deleted: boolean;
61
58
  };
62
59
  export type GeneralComment = {
63
- content: string;
64
- author: string;
60
+ text: string;
61
+ authorId: string;
65
62
  id: string;
66
63
  tempId?: string;
64
+ edited: boolean;
67
65
  quote: string;
68
66
  timeStamp: number;
69
- resolve: CommentResolve;
67
+ resolution: CommentResolve;
70
68
  reactions: ICommentReaction[];
71
- files: Array<ICommentFile | ILocalCommentFile>;
72
- type: 'general';
69
+ files: Array<ICommentFile>;
70
+ type: string;
73
71
  clientKey: string;
74
72
  children: Array<Comment>;
75
73
  deleted: boolean;
76
74
  };
77
75
  type CommentValueType = {
78
76
  value: string;
79
- files: (ICommentFile | ILocalCommentFile)[];
77
+ files: (ICommentFile)[];
80
78
  };
81
79
  export type GetEditorFn = (params: {
82
80
  onSubmit: () => void;
@@ -86,61 +84,57 @@ export type GetEditorFn = (params: {
86
84
  commentValue?: CommentValueType;
87
85
  initialContent?: string;
88
86
  registerClearEditor?: (fn: () => void) => void;
87
+ editorRef?: React.MutableRefObject<EditorType | null>;
89
88
  }) => React.ReactNode;
90
89
  export type Comments = Array<Thread | Comment | GeneralComment>;
91
- export type CommentResolve = 'ACCEPTED' | 'REJECTED' | null;
90
+ export type CommentResolve = 'ACCEPTED' | 'REJECTED' | null | 'NONE';
92
91
  export interface ICommentsFilterProps {
93
92
  commentsFilter: CommentsFilter;
94
93
  setCommentsFilter: React.Dispatch<React.SetStateAction<CommentsFilter>>;
95
94
  disabled: boolean;
95
+ listRef: React.RefObject<HTMLElement>;
96
96
  updateThreadId: (tempId: string, realId: string, updatedAt: string, commentType: string, files: ICommentFile[], thread?: Thread) => void;
97
97
  commentValue: {
98
98
  value: string;
99
- files: (ICommentFile | ILocalCommentFile)[];
99
+ files: (ICommentFile)[];
100
100
  };
101
101
  setCommentValue: React.Dispatch<React.SetStateAction<{
102
102
  value: string;
103
- files: (ICommentFile | ILocalCommentFile)[];
103
+ files: (ICommentFile)[];
104
104
  }>>;
105
105
  submitAddComment: (commentOrThread: Comment | Thread | GeneralComment, isInlineComment: boolean, thread?: Thread | GeneralComment, selection?: any | null, files?: File[]) => void;
106
106
  }
107
- export interface IMember {
107
+ export type IMember = {
108
+ avatarUrl: string | null;
109
+ roleType: string;
110
+ roleId: string;
108
111
  accepted: boolean;
109
- avatarUrl: string;
110
112
  email: string;
111
- expiresAt: string | null;
113
+ userId: string | null;
112
114
  invitationId: string | null;
113
115
  invitationToken: string | null;
114
- name: string;
115
- roleType: string;
116
- roleId: string;
117
- userId: string;
118
- }
116
+ name: string | null;
117
+ expiresAt: string | null;
118
+ };
119
119
  export interface IUser {
120
- activeWorkspaceId: string;
121
- createdAt: string;
122
- darkMode: boolean;
123
- email: string;
124
- id: string;
125
- lang: string;
126
- metaData: {
127
- cover: Record<string, any>;
128
- about: string;
129
- socialNetworks: any[];
130
- fontFamily: string;
131
- };
120
+ activeWorkspaceId: string | null;
132
121
  name: string;
133
122
  nickname: string;
134
- plan: 'FREE' | 'PRO' | 'BUSINESS' | string;
123
+ email: string;
135
124
  profilePicture: {
136
125
  url: string;
137
126
  };
127
+ createdAt: string;
128
+ id: string;
129
+ lang: string;
130
+ plan: string;
131
+ darkMode: boolean;
138
132
  timeZone: string | null;
139
133
  twoFactorEnabled: boolean;
140
- workspaces: any[];
141
134
  }
135
+ export type ResolvedFilter = 'resolved' | 'not-resolved' | 'all';
142
136
  export type CommentsFilter = {
143
- resolved: boolean;
137
+ resolved: ResolvedFilter;
144
138
  feedback: boolean;
145
139
  filteredUsers: IMember[];
146
140
  };
@@ -222,6 +216,8 @@ interface ICommentActions {
222
216
  export interface ICommentOptions {
223
217
  showComments: boolean;
224
218
  setShowComments: (value?: boolean) => void;
219
+ adminPermission: boolean;
220
+ isGuest: boolean;
225
221
  pageId: string;
226
222
  workspaceInfo: {
227
223
  title: string;
@@ -231,8 +227,8 @@ export interface ICommentOptions {
231
227
  }
232
228
  export interface SharedCommentProps {
233
229
  commentOrThread: Comment | Thread | GeneralComment;
234
- deleteCommentOrThread: (commentOrThread: Comment | Thread, thread?: Thread) => void;
235
- resolveThreat?: (threat: Thread | GeneralComment) => void;
230
+ deleteCommentOrThread: (commentOrThread: Comment | Thread, thread?: Thread) => Promise<void>;
231
+ resolveThreat?: (threat: Thread | GeneralComment) => Promise<void>;
236
232
  }
237
233
  type SelectMarkNodeFn = (markNodeKeys: Set<string>, activeElement: Element | null) => void;
238
234
  export interface StoreOptions {
@@ -241,4 +237,103 @@ export interface StoreOptions {
241
237
  commentOptions?: ICommentOptions;
242
238
  selectMarkNode: SelectMarkNodeFn;
243
239
  }
240
+ export interface CommentsNs {
241
+ edited: string;
242
+ title: string;
243
+ addComment: string;
244
+ generalComment: string;
245
+ replyComment: string;
246
+ actionTooltips: {
247
+ resolve: string;
248
+ reopen: string;
249
+ addReaction: string;
250
+ reactionLimit: string;
251
+ reply: string;
252
+ };
253
+ deleteModal: {
254
+ title: {
255
+ thread: string;
256
+ general: string;
257
+ comment: string;
258
+ };
259
+ description: {
260
+ thread: string;
261
+ general: string;
262
+ comment: string;
263
+ };
264
+ actions: {
265
+ cancel: string;
266
+ delete: string;
267
+ remove: string;
268
+ };
269
+ };
270
+ emptyState: {
271
+ "not-resolved": string;
272
+ resolved: string;
273
+ all: string;
274
+ userFilter: string;
275
+ };
276
+ filter: {
277
+ resolved: string;
278
+ open: string;
279
+ all: string;
280
+ selectUsers: string;
281
+ searchPlaceholder: string;
282
+ emptyPlaceholder: string;
283
+ byStatus: string;
284
+ byPerson: string;
285
+ };
286
+ inputEditor: {
287
+ uploadFiles: string;
288
+ sendMessage: string;
289
+ editMessage: string;
290
+ clear: string;
291
+ clearModal: {
292
+ title: string;
293
+ description: {
294
+ both: string;
295
+ text: string;
296
+ files: string;
297
+ empty: string;
298
+ };
299
+ };
300
+ discardModal: {
301
+ title: string;
302
+ description: string;
303
+ labels: {
304
+ confirm: string;
305
+ cancel: string;
306
+ };
307
+ };
308
+ cancelCommentModal: {
309
+ description: string;
310
+ };
311
+ };
312
+ menuActions: {
313
+ edit: string;
314
+ delete: string;
315
+ download: string;
316
+ };
317
+ notifications: {
318
+ title: string;
319
+ description: string;
320
+ options: {
321
+ all: string;
322
+ replies: string;
323
+ };
324
+ uploadMessages: {
325
+ tooManyFiles: string;
326
+ fileTooLarge: string;
327
+ fileLimit: string;
328
+ };
329
+ };
330
+ repliesToggle: {
331
+ show_one: string;
332
+ show_other: string;
333
+ hide: string;
334
+ };
335
+ }
336
+ export interface CommentsLocales {
337
+ comments: CommentsNs;
338
+ }
244
339
  export {};
@@ -1,8 +1,14 @@
1
- import { ICommentFile, ILocalCommentFile } from './types.ts';
2
- import { TFunction } from 'i18next';
1
+ import { default as React, Dispatch, SetStateAction } from 'react';
2
+ import { CommentsFilter, CommentsNs, ICommentFile, IMember } from './types.ts';
3
3
  export declare const cutDeleteImageId: (imageSrc: string) => string;
4
- export declare const uploadAllFiles: (commentId: string, images: ILocalCommentFile[], uploadCommentFileApi: any) => Promise<ICommentFile[]>;
4
+ export declare const uploadAllFiles: (commentId: string, images: ICommentFile[], uploadCommentFileApi: any) => Promise<ICommentFile[]>;
5
5
  export declare function scrollToTop(selector: string): void;
6
- export declare const getDescription: (type: string, t: TFunction) => string;
7
- export declare const getTitle: (type: string, t: TFunction) => string;
6
+ export declare const getDescription: (type: string, locales: CommentsNs) => string;
7
+ export declare const getTitle: (type: string, locales: CommentsNs) => string;
8
+ export declare function toggleFilter(setState: Dispatch<SetStateAction<CommentsFilter>>, key: keyof CommentsFilter, value?: IMember | boolean | string, listRef?: React.RefObject<HTMLElement>): void;
8
9
  export declare const IS_APPLE: boolean;
10
+ export declare const createDefaultCommentsLocales: () => CommentsNs;
11
+ export declare function getClearInputMessage(hasText: boolean, hasFiles: boolean, locales: CommentsNs): string;
12
+ export declare const preparePreviewFile: (file: File & {
13
+ id?: string;
14
+ }, temp?: boolean) => ICommentFile;
@@ -3,7 +3,7 @@ declare global {
3
3
  isTitleFocused: boolean;
4
4
  }
5
5
  }
6
- export declare const EntityTitle: ({ lock, title, handleTitle, placeholder, error, isReadOnly, accessEdit, nowrap, maxLength, fw, }: {
6
+ export declare const EntityTitle: ({ lock, title, handleTitle, placeholder, error, isReadOnly, accessEdit, nowrap, maxLength, fw, onPressEnter, }: {
7
7
  title: string;
8
8
  lock?: boolean;
9
9
  handleTitle?: (title: string) => void;
@@ -14,4 +14,5 @@ export declare const EntityTitle: ({ lock, title, handleTitle, placeholder, erro
14
14
  nowrap?: boolean;
15
15
  maxLength?: number;
16
16
  fw?: number;
17
+ onPressEnter?: () => void;
17
18
  }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ type FormViewerProps = {
3
+ NoStepSlot?: FC;
4
+ copyright?: string;
5
+ };
6
+ /** Основной компонент для отображения формы */
7
+ export declare const FormViewer: ({ NoStepSlot, copyright, }: FormViewerProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from 'react';
2
+ /** Если обернуть `FormViewer`, то можно будет переключаться между слайдами используя клавиаутуру */
3
+ export declare const KeyboardNavigation: ({ children }: {
4
+ children?: ReactNode;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ type AllSlidesLayoutProps = {
3
+ NoStepSlot: FC;
4
+ copyright?: string;
5
+ };
6
+ export declare const AllSlidesLayout: ({ NoStepSlot }: AllSlidesLayoutProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ import { ThemeData } from '../types/form';
2
+ export declare const Container: import('react').MemoExoticComponent<({ children, theme }: {
3
+ children: React.ReactNode;
4
+ theme?: ThemeData;
5
+ }) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,4 @@
1
+ export declare const ListFocusBox: ({ controlId, children, }: {
2
+ controlId: string;
3
+ children: React.ReactNode;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { StepData } from '../types/form';
2
+ export declare const NavControls: ({ data }: {
3
+ data: StepData;
4
+ }) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare const Navigation: () => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ type OneSlideLayoutProps = {
3
+ NoStepSlot: FC;
4
+ copyright?: string;
5
+ };
6
+ export declare const OneSlideLayout: ({ NoStepSlot, copyright, }: OneSlideLayoutProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ import { MediaData, StepData, ThemeData } from '../types/form';
2
+ export declare const getImageFilter: (v: MediaData | null | undefined) => string;
3
+ export declare const Step: import('react').MemoExoticComponent<({ step, theme }: {
4
+ step: StepData;
5
+ theme?: ThemeData;
6
+ }) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,6 @@
1
+ import { Control, ThemeData } from '../types/form';
2
+ export declare const StepDescription: ({ originalStepId, control, theme, }: {
3
+ originalStepId: string;
4
+ control: Control;
5
+ theme?: ThemeData;
6
+ }) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,6 @@
1
+ import { Control, ThemeData } from '../types/form';
2
+ export declare const StepTitle: ({ originalStepId, control, theme, }: {
3
+ originalStepId: string;
4
+ control: Control;
5
+ theme?: ThemeData;
6
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare const AddOptionButton: ({ onClick }: {
2
+ onClick: () => void;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { ButtonControl, StepData, ThemeData } from '../../../types/form';
2
+ export declare const ButtonField: ({ control, step, theme, }: {
3
+ control: ButtonControl;
4
+ step: StepData;
5
+ theme?: ThemeData;
6
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { CSSProperties } from 'react';
2
+ import { ButtonControl, StepData, ThemeData } from '../../../types/form';
3
+ export declare const InnerButton: ({ buttonControl, control, step, wrapperStyle, theme, }: {
4
+ buttonControl: ButtonControl;
5
+ control?: ButtonControl;
6
+ step: StepData;
7
+ wrapperStyle?: CSSProperties;
8
+ theme?: ThemeData;
9
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { ChoiceControlItem, ThemeData } from '../../../types/form';
2
+ export type ChoiceCardProps = {
3
+ label: string;
4
+ showInput?: boolean;
5
+ id: string;
6
+ onUpdate?: (v: Partial<ChoiceControlItem>) => void;
7
+ onRemove?: () => void;
8
+ controlId: string;
9
+ theme?: ThemeData;
10
+ };
11
+ export declare const ChoiceCard: import('react').MemoExoticComponent<({ label, showInput, onUpdate, onRemove, controlId, id, theme, }: ChoiceCardProps) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,6 @@
1
+ import { ChoiceControl, StepData, ThemeData } from '../../../types/form';
2
+ export declare const ChoiceField: ({ control, step, theme, }: {
3
+ control: ChoiceControl;
4
+ step: StepData;
5
+ theme?: ThemeData;
6
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { PictureChoiceControlItem, ThemeData } from '../../../types/form';
2
+ export type PictureChoiceCardProps = {
3
+ label: string;
4
+ showInput?: boolean;
5
+ onUpdate?: (v: Partial<PictureChoiceControlItem>) => void;
6
+ onRemove?: () => void;
7
+ image?: string;
8
+ controlId: string;
9
+ id: string;
10
+ theme?: ThemeData;
11
+ };
12
+ export declare const PictureChoiceCard: import('react').MemoExoticComponent<({ label, showInput, onUpdate, onRemove, image, controlId, id, theme, }: PictureChoiceCardProps) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,6 @@
1
+ import { PictureChoiceControl, StepData, ThemeData } from '../../../types/form';
2
+ export declare const PictureChoiceField: ({ control, step, theme, }: {
3
+ control: PictureChoiceControl;
4
+ step: StepData;
5
+ theme?: ThemeData;
6
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { ConfirmControl, StepData, ThemeData } from '../../types/form';
2
+ export declare const ConfirmButton: ({ step, control, theme, }: {
3
+ step: StepData;
4
+ control: ConfirmControl;
5
+ theme?: ThemeData;
6
+ }) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,6 @@
1
+ import { ConfirmControl, StepData, ThemeData } from '../../types/form';
2
+ export declare const ConfirmField: ({ control, step, theme, }: {
3
+ control: ConfirmControl;
4
+ step: StepData;
5
+ theme?: ThemeData;
6
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { DateControl } from '../../types/form';
2
+ export declare const DateField: ({ control }: {
3
+ control: DateControl;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { DragEndEvent } from '@dnd-kit/core';
2
+ export declare const DragOptions: ({ options, onDragEnd, editable, isGrid, align, }: {
3
+ options?: {
4
+ id: string;
5
+ element: React.ReactNode;
6
+ }[];
7
+ onDragEnd?: (event: DragEndEvent) => void;
8
+ editable?: boolean;
9
+ isGrid?: boolean;
10
+ align?: "start" | "center" | "end";
11
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { DropdownControl, StepData, ThemeData } from '../../../types/form';
2
+ export declare const DropdownField: ({ control, step, theme, }: {
3
+ control: DropdownControl;
4
+ step: StepData;
5
+ theme?: ThemeData;
6
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export declare const EditableContent: ({ value, onChange, placeholder, }: {
2
+ placeholder?: string;
3
+ value?: string;
4
+ onChange?: (title: string) => void;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { EmailControl } from '../../types/form';
2
+ export declare const EmailField: ({ control }: {
3
+ control: EmailControl;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { LocationControl } from '../../types/form';
2
+ export declare const LocationField: ({ control }: {
3
+ control: LocationControl;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { LongTextControl } from '../../types/form';
2
+ export declare const LongTextField: ({ control }: {
3
+ control: LongTextControl;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { MultipleChoiceControlItem, ThemeData } from '../../../types/form';
2
+ export type OptionCardProps = {
3
+ label: string;
4
+ showInput?: boolean;
5
+ maxOptions?: number;
6
+ id: string;
7
+ onUpdate?: (v: Partial<MultipleChoiceControlItem>) => void;
8
+ onRemove?: () => void;
9
+ controlId: string;
10
+ theme?: ThemeData;
11
+ };
12
+ export declare const MultipleChoiceCard: import('react').MemoExoticComponent<({ label, showInput, maxOptions, onUpdate, onRemove, controlId, id, theme, }: OptionCardProps) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,6 @@
1
+ import { MultipleChoiceControl, StepData, ThemeData } from '../../../types/form';
2
+ export declare const MultipleChoiceField: ({ control, step, theme, }: {
3
+ control: MultipleChoiceControl;
4
+ step: StepData;
5
+ theme?: ThemeData;
6
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { NumberControl } from '../../types/form';
2
+ export declare const NumberField: ({ control }: {
3
+ control: NumberControl;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { PhoneControl } from '../../types/form';
2
+ export declare const PhoneField: ({ control }: {
3
+ control: PhoneControl;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const ProgressLine: () => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,5 @@
1
+ import { RatingControl, ThemeData } from '../../types/form';
2
+ export declare const RatingField: ({ control, theme, }: {
3
+ control: RatingControl;
4
+ theme?: ThemeData;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { PictureChoiceControlItem, ThemeData } from '../../../types/form';
3
+ type PictureSelectableCardProps = {
4
+ label: string;
5
+ inputType?: 'radio' | 'checkbox';
6
+ hasInput?: boolean;
7
+ disabled?: boolean;
8
+ active?: boolean;
9
+ onClick: () => void;
10
+ image?: string;
11
+ onRemove?: () => void;
12
+ onUpdate?: (v: Partial<PictureChoiceControlItem>) => void;
13
+ theme?: ThemeData;
14
+ };
15
+ export declare const PictureSelectableCard: import('react').MemoExoticComponent<({ label, active, disabled, hasInput, image, onClick, inputType, onUpdate, onRemove, theme, }: PictureSelectableCardProps) => import("react/jsx-runtime").JSX.Element>;
16
+ export declare const UploadOptionImageButton: ({ children, onUpdate, onRemove, hasImage, }: PropsWithChildren<{
17
+ onUpdate?: (v: Partial<PictureChoiceControlItem>) => void;
18
+ onRemove?: () => void;
19
+ hasImage?: boolean;
20
+ }>) => import("react/jsx-runtime").JSX.Element;
21
+ export {};
@@ -0,0 +1,14 @@
1
+ import { ChoiceControlItem, ThemeData } from '../../../types/form';
2
+ type SelectableCardProps = {
3
+ label: string;
4
+ inputType?: 'radio' | 'checkbox';
5
+ hasInput?: boolean;
6
+ disabled?: boolean;
7
+ active?: boolean;
8
+ onClick: () => void;
9
+ onRemove?: () => void;
10
+ onUpdate?: (v: Partial<ChoiceControlItem>) => void;
11
+ theme?: ThemeData;
12
+ };
13
+ export declare const SelectableCard: import('react').MemoExoticComponent<({ label, active, disabled, hasInput, onClick, inputType, onUpdate, onRemove, theme, }: SelectableCardProps) => import("react/jsx-runtime").JSX.Element>;
14
+ export {};
@@ -0,0 +1,5 @@
1
+ import { SliderControl, ThemeData } from '../../types/form';
2
+ export declare const SliderField: ({ control, theme, }: {
3
+ control: SliderControl;
4
+ theme?: ThemeData;
5
+ }) => import("react/jsx-runtime").JSX.Element;