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

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-CsVw_K58.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-DR3WQFkj.js} +1705 -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
@@ -1,13 +1,14 @@
1
+ import { PropsWithChildren } from 'react';
1
2
  import { UploadFileData } from '../components/fields/UploadField/UploadField';
2
- import { ParsedFormConfig, SettingsData, StepData, ThemeData } from '../types/form';
3
+ import { ParsedFormConfig, StepData } from '../types/form';
3
4
  export type FormEditorTabType = 'steps' | 'add' | 'settings' | 'logic';
4
5
  export type FormViewLayout = 'all-slides' | 'one-slide';
5
6
  export type FormStoreState = {
6
- steps: StepData[];
7
- listStep: StepData;
8
- activeStep: string | null;
9
- settings: SettingsData;
10
- theme: ThemeData;
7
+ activeStep: {
8
+ history: (string | null)[];
9
+ current: number;
10
+ };
11
+ config: Required<ParsedFormConfig>;
11
12
  isMobile?: boolean;
12
13
  editing?: boolean;
13
14
  preview?: boolean;
@@ -17,21 +18,17 @@ export type FormStoreState = {
17
18
  uploadFileFn?: (file: UploadFileData) => Promise<string>;
18
19
  layout?: FormViewLayout;
19
20
  };
20
- export declare const emptySettings: SettingsData;
21
- export declare const createFormStore: (props?: {
22
- initialState?: Partial<FormStoreState>;
23
- }) => {
21
+ export declare const createFormStore: () => {
24
22
  useStore: import('zustand').UseBoundStore<import('zustand').StoreApi<FormStoreState>>;
25
23
  api: {
26
- applyTheme: (theme: ThemeData) => void;
24
+ applyTheme: (theme: import('../types/form').ThemeData) => void;
27
25
  setLayout: (layout: FormViewLayout) => void;
28
- patchSettingsData: (v: Partial<SettingsData>) => void;
29
- patchThemeData: (v: Partial<ThemeData>) => void;
26
+ patchSettingsData: (v: Partial<import('../types/form').SettingsData>) => void;
27
+ patchThemeData: (v: Partial<import('../types/form').ThemeData>) => void;
30
28
  patchContainerTheme: (v: Partial<import('../types/form').ContainerProperties>) => void;
31
29
  patchTitleProperties: (v: Partial<import('../types/form').TextProperties>) => void;
32
30
  patchDescriptionProperties: (v: Partial<import('../types/form').TextProperties>) => void;
33
31
  patchCommonFontProperties: (v: Partial<import('../types/form').TextProperties>) => void;
34
- setActiveStep: (v: string | null) => void;
35
32
  setSteps: (steps: StepData[]) => void;
36
33
  addStep: (step: StepData, index?: number) => void;
37
34
  removeStep: (stepId: string) => void;
@@ -45,47 +42,671 @@ export declare const createFormStore: (props?: {
45
42
  updateCondition: (stepId: string, conditionIndex: number, updatedCondition: Partial<import('../types/form').Condition>) => void;
46
43
  removeCondition: (stepId: string, conditionIndex: number) => void;
47
44
  setIsMobile: (isMobile: boolean) => void;
48
- setFormConfig: (config: ParsedFormConfig | null, { silent }?: {
45
+ setConfig: (config: ParsedFormConfig | null, { silent }?: {
49
46
  silent?: boolean;
50
47
  }) => void;
51
- isFormDirty: () => boolean;
52
- switchToNextStep: () => void;
53
- switchToPrevStep: () => void;
54
- setActiveStepId: (stepId: string | null) => void;
48
+ setActiveStepId: (stepId: string) => void;
55
49
  setFormLayout: (layout: import('../types/form').FormLayout) => void;
56
50
  scrollToControl: (controlId: string) => void;
51
+ getConfig: () => Required<{
52
+ theme?: {
53
+ input?: {
54
+ backgroundColor?: string | undefined;
55
+ borderColor?: string | undefined;
56
+ } | undefined;
57
+ title?: {
58
+ color?: string | undefined;
59
+ fontSize?: number | undefined;
60
+ fontWeight?: number | undefined;
61
+ fontFamily?: string | undefined;
62
+ } | undefined;
63
+ size?: "sm" | "md" | "lg" | undefined;
64
+ description?: {
65
+ color?: string | undefined;
66
+ fontSize?: number | undefined;
67
+ fontWeight?: number | undefined;
68
+ fontFamily?: string | undefined;
69
+ } | undefined;
70
+ align?: "center" | "end" | "start" | undefined;
71
+ background?: {
72
+ image?: string | undefined;
73
+ color?: string | undefined;
74
+ opacity?: number | undefined;
75
+ blur?: number | undefined;
76
+ brightness?: number | undefined;
77
+ fit?: string | undefined;
78
+ blendMode?: string | undefined;
79
+ } | undefined;
80
+ container?: {
81
+ color?: string | undefined;
82
+ opacity?: number | undefined;
83
+ backgroundImage?: string | undefined;
84
+ blur?: number | undefined;
85
+ shadowSize?: number | undefined;
86
+ shadowColor?: string | undefined;
87
+ } | undefined;
88
+ borderRadius?: "sm" | "md" | "lg" | undefined;
89
+ font?: {
90
+ color?: string | undefined;
91
+ fontSize?: number | undefined;
92
+ fontWeight?: number | undefined;
93
+ fontFamily?: string | undefined;
94
+ } | undefined;
95
+ listStyle?: string | undefined;
96
+ primaryColor?: string | undefined;
97
+ customCSS?: string | undefined;
98
+ } | undefined;
99
+ settings?: {
100
+ layout: "list" | "slides";
101
+ slideAnimation: "none" | "horizontal" | "vertical";
102
+ freeNav: boolean;
103
+ copyright?: boolean | undefined;
104
+ enterIndicator?: any;
105
+ progressBar?: boolean | undefined;
106
+ navArrows?: boolean | undefined;
107
+ questionNumber?: boolean | undefined;
108
+ mainLanguage?: string | undefined;
109
+ recaptcha?: boolean | undefined;
110
+ } | undefined;
111
+ steps?: {
112
+ id: string;
113
+ controls: ({
114
+ id: string;
115
+ controlType: "text";
116
+ title?: string | undefined;
117
+ description?: string | undefined;
118
+ icon?: string | undefined;
119
+ maxLength?: number | undefined;
120
+ minLength?: number | undefined;
121
+ placeholder?: string | undefined;
122
+ required?: boolean | undefined;
123
+ variableName?: string | undefined;
124
+ } | {
125
+ id: string;
126
+ controlType: "longText";
127
+ title?: string | undefined;
128
+ description?: string | undefined;
129
+ icon?: string | undefined;
130
+ maxLength?: number | undefined;
131
+ minLength?: number | undefined;
132
+ placeholder?: string | undefined;
133
+ required?: boolean | undefined;
134
+ variableName?: string | undefined;
135
+ } | {
136
+ id: string;
137
+ controlType: "button";
138
+ label?: string | undefined;
139
+ link?: string | undefined;
140
+ title?: string | undefined;
141
+ description?: string | undefined;
142
+ buttons?: any[] | undefined;
143
+ width?: number | undefined;
144
+ orientation?: "column" | "column-reverse" | "row" | "row-reverse" | undefined;
145
+ required?: boolean | undefined;
146
+ showIconButton?: boolean | undefined;
147
+ buttonIcon?: string | undefined;
148
+ alignButton?: "center" | "end" | "start" | undefined;
149
+ enableTooltip?: boolean | undefined;
150
+ fullWidthMobile?: boolean | undefined;
151
+ } | {
152
+ id: string;
153
+ controlType: "date";
154
+ title?: string | undefined;
155
+ description?: string | undefined;
156
+ icon?: string | undefined;
157
+ placeholder?: string | undefined;
158
+ required?: boolean | undefined;
159
+ minDate?: string | undefined;
160
+ maxDate?: string | undefined;
161
+ variableName?: string | undefined;
162
+ } | {
163
+ id: string;
164
+ controlType: "start";
165
+ label?: string | undefined;
166
+ title?: string | undefined;
167
+ description?: string | undefined;
168
+ icon?: string | undefined;
169
+ required?: boolean | undefined;
170
+ showIconButton?: boolean | undefined;
171
+ buttonIcon?: string | undefined;
172
+ showButton?: boolean | undefined;
173
+ } | {
174
+ id: string;
175
+ controlType: "confirm";
176
+ label?: string | undefined;
177
+ link?: string | undefined;
178
+ title?: string | undefined;
179
+ description?: string | undefined;
180
+ required?: boolean | undefined;
181
+ buttonIcon?: string | undefined;
182
+ showButton?: boolean | undefined;
183
+ } | {
184
+ id: string;
185
+ controlType: "number";
186
+ title?: string | undefined;
187
+ description?: string | undefined;
188
+ icon?: string | undefined;
189
+ max?: number | undefined;
190
+ min?: number | undefined;
191
+ placeholder?: string | undefined;
192
+ required?: boolean | undefined;
193
+ variableName?: string | undefined;
194
+ } | {
195
+ id: string;
196
+ options: {
197
+ label: string;
198
+ id: string;
199
+ }[];
200
+ controlType: "choice";
201
+ title?: string | undefined;
202
+ description?: string | undefined;
203
+ required?: boolean | undefined;
204
+ variableName?: string | undefined;
205
+ showInput?: boolean | undefined;
206
+ otherOption?: boolean | undefined;
207
+ } | {
208
+ id: string;
209
+ options: {
210
+ label: string;
211
+ id: string;
212
+ }[];
213
+ controlType: "multipleChoice";
214
+ title?: string | undefined;
215
+ description?: string | undefined;
216
+ icon?: string | undefined;
217
+ required?: boolean | undefined;
218
+ variableName?: string | undefined;
219
+ showInput?: boolean | undefined;
220
+ otherOption?: boolean | undefined;
221
+ minOptions?: number | undefined;
222
+ maxOptions?: number | undefined;
223
+ } | {
224
+ id: string;
225
+ options: {
226
+ label: string;
227
+ id: string;
228
+ image?: string | undefined;
229
+ }[];
230
+ controlType: "pictureChoice";
231
+ title?: string | undefined;
232
+ description?: string | undefined;
233
+ icon?: string | undefined;
234
+ required?: boolean | undefined;
235
+ variableName?: string | undefined;
236
+ showInput?: boolean | undefined;
237
+ } | {
238
+ id: string;
239
+ options: {
240
+ label: string;
241
+ id: string;
242
+ }[];
243
+ controlType: "dropdown";
244
+ title?: string | undefined;
245
+ description?: string | undefined;
246
+ icon?: string | undefined;
247
+ placeholder?: string | undefined;
248
+ required?: boolean | undefined;
249
+ variableName?: string | undefined;
250
+ } | {
251
+ id: string;
252
+ controlType: "email";
253
+ title?: string | undefined;
254
+ description?: string | undefined;
255
+ icon?: string | undefined;
256
+ placeholder?: string | undefined;
257
+ required?: boolean | undefined;
258
+ variableName?: string | undefined;
259
+ } | {
260
+ id: string;
261
+ controlType: "location";
262
+ title?: string | undefined;
263
+ description?: string | undefined;
264
+ icon?: string | undefined;
265
+ placeholder?: string | undefined;
266
+ required?: boolean | undefined;
267
+ variableName?: string | undefined;
268
+ } | {
269
+ id: string;
270
+ controlType: "phone";
271
+ title?: string | undefined;
272
+ description?: string | undefined;
273
+ icon?: string | undefined;
274
+ placeholder?: string | undefined;
275
+ required?: boolean | undefined;
276
+ variableName?: string | undefined;
277
+ } | {
278
+ id: string;
279
+ controlType: "slider";
280
+ title?: string | undefined;
281
+ description?: string | undefined;
282
+ icon?: string | undefined;
283
+ max?: number | undefined;
284
+ min?: number | undefined;
285
+ required?: boolean | undefined;
286
+ variableName?: string | undefined;
287
+ } | {
288
+ id: string;
289
+ controlType: "upload";
290
+ title?: string | undefined;
291
+ description?: string | undefined;
292
+ icon?: string | undefined;
293
+ multiple?: boolean | undefined;
294
+ accept?: string[] | undefined;
295
+ required?: boolean | undefined;
296
+ maxSize?: number | undefined;
297
+ maxFiles?: number | undefined;
298
+ variableName?: string | undefined;
299
+ minFiles?: number | undefined;
300
+ } | {
301
+ id: string;
302
+ controlType: "yesNo";
303
+ title?: string | undefined;
304
+ description?: string | undefined;
305
+ icon?: string | undefined;
306
+ required?: boolean | undefined;
307
+ variableName?: string | undefined;
308
+ yesLabel?: string | undefined;
309
+ noLabel?: string | undefined;
310
+ } | {
311
+ id: string;
312
+ controlType: "rating";
313
+ title?: string | undefined;
314
+ description?: string | undefined;
315
+ required?: boolean | undefined;
316
+ count?: number | undefined;
317
+ variableName?: string | undefined;
318
+ })[];
319
+ trigger: string;
320
+ position?: {
321
+ x: number;
322
+ y: number;
323
+ } | undefined;
324
+ media?: {
325
+ video?: string | undefined;
326
+ image?: string | undefined;
327
+ color?: string | undefined;
328
+ size?: number | undefined;
329
+ layout?: "content" | "top" | "left" | "bottom" | "right" | "background" | "fullLeft" | "fullRight" | "fullTop" | "fullBottom" | undefined;
330
+ blur?: number | undefined;
331
+ brightness?: number | undefined;
332
+ videoThumb?: string | undefined;
333
+ } | undefined;
334
+ theme?: {
335
+ input?: {
336
+ backgroundColor?: string | undefined;
337
+ borderColor?: string | undefined;
338
+ } | undefined;
339
+ title?: {
340
+ color?: string | undefined;
341
+ fontSize?: number | undefined;
342
+ fontWeight?: number | undefined;
343
+ fontFamily?: string | undefined;
344
+ } | undefined;
345
+ size?: "sm" | "md" | "lg" | undefined;
346
+ description?: {
347
+ color?: string | undefined;
348
+ fontSize?: number | undefined;
349
+ fontWeight?: number | undefined;
350
+ fontFamily?: string | undefined;
351
+ } | undefined;
352
+ align?: "center" | "end" | "start" | undefined;
353
+ background?: {
354
+ image?: string | undefined;
355
+ color?: string | undefined;
356
+ opacity?: number | undefined;
357
+ blur?: number | undefined;
358
+ brightness?: number | undefined;
359
+ fit?: string | undefined;
360
+ blendMode?: string | undefined;
361
+ } | undefined;
362
+ container?: {
363
+ color?: string | undefined;
364
+ opacity?: number | undefined;
365
+ backgroundImage?: string | undefined;
366
+ blur?: number | undefined;
367
+ shadowSize?: number | undefined;
368
+ shadowColor?: string | undefined;
369
+ } | undefined;
370
+ borderRadius?: "sm" | "md" | "lg" | undefined;
371
+ font?: {
372
+ color?: string | undefined;
373
+ fontSize?: number | undefined;
374
+ fontWeight?: number | undefined;
375
+ fontFamily?: string | undefined;
376
+ } | undefined;
377
+ listStyle?: string | undefined;
378
+ primaryColor?: string | undefined;
379
+ customCSS?: string | undefined;
380
+ } | undefined;
381
+ isStart?: boolean | undefined;
382
+ isEnd?: boolean | undefined;
383
+ autoSubmit?: boolean | undefined;
384
+ confirmLabel?: string | undefined;
385
+ conditions?: {
386
+ operator: string;
387
+ trigger: string;
388
+ controlId: string;
389
+ compareValue?: string | undefined;
390
+ }[] | undefined;
391
+ }[] | undefined;
392
+ listStep?: {
393
+ id: string;
394
+ controls: ({
395
+ id: string;
396
+ controlType: "text";
397
+ title?: string | undefined;
398
+ description?: string | undefined;
399
+ icon?: string | undefined;
400
+ maxLength?: number | undefined;
401
+ minLength?: number | undefined;
402
+ placeholder?: string | undefined;
403
+ required?: boolean | undefined;
404
+ variableName?: string | undefined;
405
+ } | {
406
+ id: string;
407
+ controlType: "longText";
408
+ title?: string | undefined;
409
+ description?: string | undefined;
410
+ icon?: string | undefined;
411
+ maxLength?: number | undefined;
412
+ minLength?: number | undefined;
413
+ placeholder?: string | undefined;
414
+ required?: boolean | undefined;
415
+ variableName?: string | undefined;
416
+ } | {
417
+ id: string;
418
+ controlType: "button";
419
+ label?: string | undefined;
420
+ link?: string | undefined;
421
+ title?: string | undefined;
422
+ description?: string | undefined;
423
+ buttons?: any[] | undefined;
424
+ width?: number | undefined;
425
+ orientation?: "column" | "column-reverse" | "row" | "row-reverse" | undefined;
426
+ required?: boolean | undefined;
427
+ showIconButton?: boolean | undefined;
428
+ buttonIcon?: string | undefined;
429
+ alignButton?: "center" | "end" | "start" | undefined;
430
+ enableTooltip?: boolean | undefined;
431
+ fullWidthMobile?: boolean | undefined;
432
+ } | {
433
+ id: string;
434
+ controlType: "date";
435
+ title?: string | undefined;
436
+ description?: string | undefined;
437
+ icon?: string | undefined;
438
+ placeholder?: string | undefined;
439
+ required?: boolean | undefined;
440
+ minDate?: string | undefined;
441
+ maxDate?: string | undefined;
442
+ variableName?: string | undefined;
443
+ } | {
444
+ id: string;
445
+ controlType: "start";
446
+ label?: string | undefined;
447
+ title?: string | undefined;
448
+ description?: string | undefined;
449
+ icon?: string | undefined;
450
+ required?: boolean | undefined;
451
+ showIconButton?: boolean | undefined;
452
+ buttonIcon?: string | undefined;
453
+ showButton?: boolean | undefined;
454
+ } | {
455
+ id: string;
456
+ controlType: "confirm";
457
+ label?: string | undefined;
458
+ link?: string | undefined;
459
+ title?: string | undefined;
460
+ description?: string | undefined;
461
+ required?: boolean | undefined;
462
+ buttonIcon?: string | undefined;
463
+ showButton?: boolean | undefined;
464
+ } | {
465
+ id: string;
466
+ controlType: "number";
467
+ title?: string | undefined;
468
+ description?: string | undefined;
469
+ icon?: string | undefined;
470
+ max?: number | undefined;
471
+ min?: number | undefined;
472
+ placeholder?: string | undefined;
473
+ required?: boolean | undefined;
474
+ variableName?: string | undefined;
475
+ } | {
476
+ id: string;
477
+ options: {
478
+ label: string;
479
+ id: string;
480
+ }[];
481
+ controlType: "choice";
482
+ title?: string | undefined;
483
+ description?: string | undefined;
484
+ required?: boolean | undefined;
485
+ variableName?: string | undefined;
486
+ showInput?: boolean | undefined;
487
+ otherOption?: boolean | undefined;
488
+ } | {
489
+ id: string;
490
+ options: {
491
+ label: string;
492
+ id: string;
493
+ }[];
494
+ controlType: "multipleChoice";
495
+ title?: string | undefined;
496
+ description?: string | undefined;
497
+ icon?: string | undefined;
498
+ required?: boolean | undefined;
499
+ variableName?: string | undefined;
500
+ showInput?: boolean | undefined;
501
+ otherOption?: boolean | undefined;
502
+ minOptions?: number | undefined;
503
+ maxOptions?: number | undefined;
504
+ } | {
505
+ id: string;
506
+ options: {
507
+ label: string;
508
+ id: string;
509
+ image?: string | undefined;
510
+ }[];
511
+ controlType: "pictureChoice";
512
+ title?: string | undefined;
513
+ description?: string | undefined;
514
+ icon?: string | undefined;
515
+ required?: boolean | undefined;
516
+ variableName?: string | undefined;
517
+ showInput?: boolean | undefined;
518
+ } | {
519
+ id: string;
520
+ options: {
521
+ label: string;
522
+ id: string;
523
+ }[];
524
+ controlType: "dropdown";
525
+ title?: string | undefined;
526
+ description?: string | undefined;
527
+ icon?: string | undefined;
528
+ placeholder?: string | undefined;
529
+ required?: boolean | undefined;
530
+ variableName?: string | undefined;
531
+ } | {
532
+ id: string;
533
+ controlType: "email";
534
+ title?: string | undefined;
535
+ description?: string | undefined;
536
+ icon?: string | undefined;
537
+ placeholder?: string | undefined;
538
+ required?: boolean | undefined;
539
+ variableName?: string | undefined;
540
+ } | {
541
+ id: string;
542
+ controlType: "location";
543
+ title?: string | undefined;
544
+ description?: string | undefined;
545
+ icon?: string | undefined;
546
+ placeholder?: string | undefined;
547
+ required?: boolean | undefined;
548
+ variableName?: string | undefined;
549
+ } | {
550
+ id: string;
551
+ controlType: "phone";
552
+ title?: string | undefined;
553
+ description?: string | undefined;
554
+ icon?: string | undefined;
555
+ placeholder?: string | undefined;
556
+ required?: boolean | undefined;
557
+ variableName?: string | undefined;
558
+ } | {
559
+ id: string;
560
+ controlType: "slider";
561
+ title?: string | undefined;
562
+ description?: string | undefined;
563
+ icon?: string | undefined;
564
+ max?: number | undefined;
565
+ min?: number | undefined;
566
+ required?: boolean | undefined;
567
+ variableName?: string | undefined;
568
+ } | {
569
+ id: string;
570
+ controlType: "upload";
571
+ title?: string | undefined;
572
+ description?: string | undefined;
573
+ icon?: string | undefined;
574
+ multiple?: boolean | undefined;
575
+ accept?: string[] | undefined;
576
+ required?: boolean | undefined;
577
+ maxSize?: number | undefined;
578
+ maxFiles?: number | undefined;
579
+ variableName?: string | undefined;
580
+ minFiles?: number | undefined;
581
+ } | {
582
+ id: string;
583
+ controlType: "yesNo";
584
+ title?: string | undefined;
585
+ description?: string | undefined;
586
+ icon?: string | undefined;
587
+ required?: boolean | undefined;
588
+ variableName?: string | undefined;
589
+ yesLabel?: string | undefined;
590
+ noLabel?: string | undefined;
591
+ } | {
592
+ id: string;
593
+ controlType: "rating";
594
+ title?: string | undefined;
595
+ description?: string | undefined;
596
+ required?: boolean | undefined;
597
+ count?: number | undefined;
598
+ variableName?: string | undefined;
599
+ })[];
600
+ trigger: string;
601
+ position?: {
602
+ x: number;
603
+ y: number;
604
+ } | undefined;
605
+ media?: {
606
+ video?: string | undefined;
607
+ image?: string | undefined;
608
+ color?: string | undefined;
609
+ size?: number | undefined;
610
+ layout?: "content" | "top" | "left" | "bottom" | "right" | "background" | "fullLeft" | "fullRight" | "fullTop" | "fullBottom" | undefined;
611
+ blur?: number | undefined;
612
+ brightness?: number | undefined;
613
+ videoThumb?: string | undefined;
614
+ } | undefined;
615
+ theme?: {
616
+ input?: {
617
+ backgroundColor?: string | undefined;
618
+ borderColor?: string | undefined;
619
+ } | undefined;
620
+ title?: {
621
+ color?: string | undefined;
622
+ fontSize?: number | undefined;
623
+ fontWeight?: number | undefined;
624
+ fontFamily?: string | undefined;
625
+ } | undefined;
626
+ size?: "sm" | "md" | "lg" | undefined;
627
+ description?: {
628
+ color?: string | undefined;
629
+ fontSize?: number | undefined;
630
+ fontWeight?: number | undefined;
631
+ fontFamily?: string | undefined;
632
+ } | undefined;
633
+ align?: "center" | "end" | "start" | undefined;
634
+ background?: {
635
+ image?: string | undefined;
636
+ color?: string | undefined;
637
+ opacity?: number | undefined;
638
+ blur?: number | undefined;
639
+ brightness?: number | undefined;
640
+ fit?: string | undefined;
641
+ blendMode?: string | undefined;
642
+ } | undefined;
643
+ container?: {
644
+ color?: string | undefined;
645
+ opacity?: number | undefined;
646
+ backgroundImage?: string | undefined;
647
+ blur?: number | undefined;
648
+ shadowSize?: number | undefined;
649
+ shadowColor?: string | undefined;
650
+ } | undefined;
651
+ borderRadius?: "sm" | "md" | "lg" | undefined;
652
+ font?: {
653
+ color?: string | undefined;
654
+ fontSize?: number | undefined;
655
+ fontWeight?: number | undefined;
656
+ fontFamily?: string | undefined;
657
+ } | undefined;
658
+ listStyle?: string | undefined;
659
+ primaryColor?: string | undefined;
660
+ customCSS?: string | undefined;
661
+ } | undefined;
662
+ isStart?: boolean | undefined;
663
+ isEnd?: boolean | undefined;
664
+ autoSubmit?: boolean | undefined;
665
+ confirmLabel?: string | undefined;
666
+ conditions?: {
667
+ operator: string;
668
+ trigger: string;
669
+ controlId: string;
670
+ compareValue?: string | undefined;
671
+ }[] | undefined;
672
+ } | undefined;
673
+ }>;
674
+ setProps: (props: FormViewerProps) => void;
675
+ forwardActiveStep: (steps?: number) => void;
676
+ backActiveStep: (steps?: number) => void;
677
+ resetActiveStep: () => void;
57
678
  };
58
679
  };
59
- /** Необходимо оборачивать FormViewer в провайдер, иначе будет использоваться `globalFormStore` */
60
- export declare const FormStoreProvider: ({ children, editing, preview, store, addEndStep, onConfigChange, uploadFileFn, layout, }: {
61
- children: React.ReactNode;
680
+ export type FormViewerProps = {
62
681
  /** Режим для редактирования */
63
682
  editing?: boolean;
64
683
  /** Режим для предпросмотра */
65
684
  preview?: boolean;
66
685
  onConfigChange?: (config: ParsedFormConfig) => void;
67
- /** Можно создать и передать стор снаружи, в ином случае стор создается внутри провайдера */
68
- store?: ReturnType<typeof createFormStore>;
69
686
  /** Добавит конечный шаг, если его нету */
70
687
  addEndStep?: () => StepData;
71
688
  /** Как отображать форму */
72
689
  layout?: FormViewLayout;
73
690
  /** Функция для загрузки файлов пользователем */
74
691
  uploadFileFn?: (file: UploadFileData) => Promise<any>;
692
+ };
693
+ /** Необходимо оборачивать FormViewer в провайдер, иначе будет использоваться `globalFormStore` */
694
+ export declare const FormStoreProvider: ({ children, editing, preview, store, addEndStep, onConfigChange, uploadFileFn, layout, }: PropsWithChildren<FormViewerProps> & {
695
+ /** Можно создать и передать стор снаружи, в ином случае стор создается внутри провайдера */
696
+ store?: ReturnType<typeof createFormStore>;
75
697
  }) => import("react/jsx-runtime").JSX.Element;
76
698
  /** Возвращает ближайший стор для формы, если таких нет - вернёт слобальный стор */
77
699
  export declare const useFormViewerStore: () => {
78
700
  useStore: import('zustand').UseBoundStore<import('zustand').StoreApi<FormStoreState>>;
79
701
  api: {
80
- applyTheme: (theme: ThemeData) => void;
702
+ applyTheme: (theme: import('../types/form').ThemeData) => void;
81
703
  setLayout: (layout: FormViewLayout) => void;
82
- patchSettingsData: (v: Partial<SettingsData>) => void;
83
- patchThemeData: (v: Partial<ThemeData>) => void;
704
+ patchSettingsData: (v: Partial<import('../types/form').SettingsData>) => void;
705
+ patchThemeData: (v: Partial<import('../types/form').ThemeData>) => void;
84
706
  patchContainerTheme: (v: Partial<import('../types/form').ContainerProperties>) => void;
85
707
  patchTitleProperties: (v: Partial<import('../types/form').TextProperties>) => void;
86
708
  patchDescriptionProperties: (v: Partial<import('../types/form').TextProperties>) => void;
87
709
  patchCommonFontProperties: (v: Partial<import('../types/form').TextProperties>) => void;
88
- setActiveStep: (v: string | null) => void;
89
710
  setSteps: (steps: StepData[]) => void;
90
711
  addStep: (step: StepData, index?: number) => void;
91
712
  removeStep: (stepId: string) => void;
@@ -99,14 +720,638 @@ export declare const useFormViewerStore: () => {
99
720
  updateCondition: (stepId: string, conditionIndex: number, updatedCondition: Partial<import('../types/form').Condition>) => void;
100
721
  removeCondition: (stepId: string, conditionIndex: number) => void;
101
722
  setIsMobile: (isMobile: boolean) => void;
102
- setFormConfig: (config: ParsedFormConfig | null, { silent }?: {
723
+ setConfig: (config: ParsedFormConfig | null, { silent }?: {
103
724
  silent?: boolean;
104
725
  }) => void;
105
- isFormDirty: () => boolean;
106
- switchToNextStep: () => void;
107
- switchToPrevStep: () => void;
108
- setActiveStepId: (stepId: string | null) => void;
726
+ setActiveStepId: (stepId: string) => void;
109
727
  setFormLayout: (layout: import('../types/form').FormLayout) => void;
110
728
  scrollToControl: (controlId: string) => void;
729
+ getConfig: () => Required<{
730
+ theme?: {
731
+ input?: {
732
+ backgroundColor?: string | undefined;
733
+ borderColor?: string | undefined;
734
+ } | undefined;
735
+ title?: {
736
+ color?: string | undefined;
737
+ fontSize?: number | undefined;
738
+ fontWeight?: number | undefined;
739
+ fontFamily?: string | undefined;
740
+ } | undefined;
741
+ size?: "sm" | "md" | "lg" | undefined;
742
+ description?: {
743
+ color?: string | undefined;
744
+ fontSize?: number | undefined;
745
+ fontWeight?: number | undefined;
746
+ fontFamily?: string | undefined;
747
+ } | undefined;
748
+ align?: "center" | "end" | "start" | undefined;
749
+ background?: {
750
+ image?: string | undefined;
751
+ color?: string | undefined;
752
+ opacity?: number | undefined;
753
+ blur?: number | undefined;
754
+ brightness?: number | undefined;
755
+ fit?: string | undefined;
756
+ blendMode?: string | undefined;
757
+ } | undefined;
758
+ container?: {
759
+ color?: string | undefined;
760
+ opacity?: number | undefined;
761
+ backgroundImage?: string | undefined;
762
+ blur?: number | undefined;
763
+ shadowSize?: number | undefined;
764
+ shadowColor?: string | undefined;
765
+ } | undefined;
766
+ borderRadius?: "sm" | "md" | "lg" | undefined;
767
+ font?: {
768
+ color?: string | undefined;
769
+ fontSize?: number | undefined;
770
+ fontWeight?: number | undefined;
771
+ fontFamily?: string | undefined;
772
+ } | undefined;
773
+ listStyle?: string | undefined;
774
+ primaryColor?: string | undefined;
775
+ customCSS?: string | undefined;
776
+ } | undefined;
777
+ settings?: {
778
+ layout: "list" | "slides";
779
+ slideAnimation: "none" | "horizontal" | "vertical";
780
+ freeNav: boolean;
781
+ copyright?: boolean | undefined;
782
+ enterIndicator?: any;
783
+ progressBar?: boolean | undefined;
784
+ navArrows?: boolean | undefined;
785
+ questionNumber?: boolean | undefined;
786
+ mainLanguage?: string | undefined;
787
+ recaptcha?: boolean | undefined;
788
+ } | undefined;
789
+ steps?: {
790
+ id: string;
791
+ controls: ({
792
+ id: string;
793
+ controlType: "text";
794
+ title?: string | undefined;
795
+ description?: string | undefined;
796
+ icon?: string | undefined;
797
+ maxLength?: number | undefined;
798
+ minLength?: number | undefined;
799
+ placeholder?: string | undefined;
800
+ required?: boolean | undefined;
801
+ variableName?: string | undefined;
802
+ } | {
803
+ id: string;
804
+ controlType: "longText";
805
+ title?: string | undefined;
806
+ description?: string | undefined;
807
+ icon?: string | undefined;
808
+ maxLength?: number | undefined;
809
+ minLength?: number | undefined;
810
+ placeholder?: string | undefined;
811
+ required?: boolean | undefined;
812
+ variableName?: string | undefined;
813
+ } | {
814
+ id: string;
815
+ controlType: "button";
816
+ label?: string | undefined;
817
+ link?: string | undefined;
818
+ title?: string | undefined;
819
+ description?: string | undefined;
820
+ buttons?: any[] | undefined;
821
+ width?: number | undefined;
822
+ orientation?: "column" | "column-reverse" | "row" | "row-reverse" | undefined;
823
+ required?: boolean | undefined;
824
+ showIconButton?: boolean | undefined;
825
+ buttonIcon?: string | undefined;
826
+ alignButton?: "center" | "end" | "start" | undefined;
827
+ enableTooltip?: boolean | undefined;
828
+ fullWidthMobile?: boolean | undefined;
829
+ } | {
830
+ id: string;
831
+ controlType: "date";
832
+ title?: string | undefined;
833
+ description?: string | undefined;
834
+ icon?: string | undefined;
835
+ placeholder?: string | undefined;
836
+ required?: boolean | undefined;
837
+ minDate?: string | undefined;
838
+ maxDate?: string | undefined;
839
+ variableName?: string | undefined;
840
+ } | {
841
+ id: string;
842
+ controlType: "start";
843
+ label?: string | undefined;
844
+ title?: string | undefined;
845
+ description?: string | undefined;
846
+ icon?: string | undefined;
847
+ required?: boolean | undefined;
848
+ showIconButton?: boolean | undefined;
849
+ buttonIcon?: string | undefined;
850
+ showButton?: boolean | undefined;
851
+ } | {
852
+ id: string;
853
+ controlType: "confirm";
854
+ label?: string | undefined;
855
+ link?: string | undefined;
856
+ title?: string | undefined;
857
+ description?: string | undefined;
858
+ required?: boolean | undefined;
859
+ buttonIcon?: string | undefined;
860
+ showButton?: boolean | undefined;
861
+ } | {
862
+ id: string;
863
+ controlType: "number";
864
+ title?: string | undefined;
865
+ description?: string | undefined;
866
+ icon?: string | undefined;
867
+ max?: number | undefined;
868
+ min?: number | undefined;
869
+ placeholder?: string | undefined;
870
+ required?: boolean | undefined;
871
+ variableName?: string | undefined;
872
+ } | {
873
+ id: string;
874
+ options: {
875
+ label: string;
876
+ id: string;
877
+ }[];
878
+ controlType: "choice";
879
+ title?: string | undefined;
880
+ description?: string | undefined;
881
+ required?: boolean | undefined;
882
+ variableName?: string | undefined;
883
+ showInput?: boolean | undefined;
884
+ otherOption?: boolean | undefined;
885
+ } | {
886
+ id: string;
887
+ options: {
888
+ label: string;
889
+ id: string;
890
+ }[];
891
+ controlType: "multipleChoice";
892
+ title?: string | undefined;
893
+ description?: string | undefined;
894
+ icon?: string | undefined;
895
+ required?: boolean | undefined;
896
+ variableName?: string | undefined;
897
+ showInput?: boolean | undefined;
898
+ otherOption?: boolean | undefined;
899
+ minOptions?: number | undefined;
900
+ maxOptions?: number | undefined;
901
+ } | {
902
+ id: string;
903
+ options: {
904
+ label: string;
905
+ id: string;
906
+ image?: string | undefined;
907
+ }[];
908
+ controlType: "pictureChoice";
909
+ title?: string | undefined;
910
+ description?: string | undefined;
911
+ icon?: string | undefined;
912
+ required?: boolean | undefined;
913
+ variableName?: string | undefined;
914
+ showInput?: boolean | undefined;
915
+ } | {
916
+ id: string;
917
+ options: {
918
+ label: string;
919
+ id: string;
920
+ }[];
921
+ controlType: "dropdown";
922
+ title?: string | undefined;
923
+ description?: string | undefined;
924
+ icon?: string | undefined;
925
+ placeholder?: string | undefined;
926
+ required?: boolean | undefined;
927
+ variableName?: string | undefined;
928
+ } | {
929
+ id: string;
930
+ controlType: "email";
931
+ title?: string | undefined;
932
+ description?: string | undefined;
933
+ icon?: string | undefined;
934
+ placeholder?: string | undefined;
935
+ required?: boolean | undefined;
936
+ variableName?: string | undefined;
937
+ } | {
938
+ id: string;
939
+ controlType: "location";
940
+ title?: string | undefined;
941
+ description?: string | undefined;
942
+ icon?: string | undefined;
943
+ placeholder?: string | undefined;
944
+ required?: boolean | undefined;
945
+ variableName?: string | undefined;
946
+ } | {
947
+ id: string;
948
+ controlType: "phone";
949
+ title?: string | undefined;
950
+ description?: string | undefined;
951
+ icon?: string | undefined;
952
+ placeholder?: string | undefined;
953
+ required?: boolean | undefined;
954
+ variableName?: string | undefined;
955
+ } | {
956
+ id: string;
957
+ controlType: "slider";
958
+ title?: string | undefined;
959
+ description?: string | undefined;
960
+ icon?: string | undefined;
961
+ max?: number | undefined;
962
+ min?: number | undefined;
963
+ required?: boolean | undefined;
964
+ variableName?: string | undefined;
965
+ } | {
966
+ id: string;
967
+ controlType: "upload";
968
+ title?: string | undefined;
969
+ description?: string | undefined;
970
+ icon?: string | undefined;
971
+ multiple?: boolean | undefined;
972
+ accept?: string[] | undefined;
973
+ required?: boolean | undefined;
974
+ maxSize?: number | undefined;
975
+ maxFiles?: number | undefined;
976
+ variableName?: string | undefined;
977
+ minFiles?: number | undefined;
978
+ } | {
979
+ id: string;
980
+ controlType: "yesNo";
981
+ title?: string | undefined;
982
+ description?: string | undefined;
983
+ icon?: string | undefined;
984
+ required?: boolean | undefined;
985
+ variableName?: string | undefined;
986
+ yesLabel?: string | undefined;
987
+ noLabel?: string | undefined;
988
+ } | {
989
+ id: string;
990
+ controlType: "rating";
991
+ title?: string | undefined;
992
+ description?: string | undefined;
993
+ required?: boolean | undefined;
994
+ count?: number | undefined;
995
+ variableName?: string | undefined;
996
+ })[];
997
+ trigger: string;
998
+ position?: {
999
+ x: number;
1000
+ y: number;
1001
+ } | undefined;
1002
+ media?: {
1003
+ video?: string | undefined;
1004
+ image?: string | undefined;
1005
+ color?: string | undefined;
1006
+ size?: number | undefined;
1007
+ layout?: "content" | "top" | "left" | "bottom" | "right" | "background" | "fullLeft" | "fullRight" | "fullTop" | "fullBottom" | undefined;
1008
+ blur?: number | undefined;
1009
+ brightness?: number | undefined;
1010
+ videoThumb?: string | undefined;
1011
+ } | undefined;
1012
+ theme?: {
1013
+ input?: {
1014
+ backgroundColor?: string | undefined;
1015
+ borderColor?: string | undefined;
1016
+ } | undefined;
1017
+ title?: {
1018
+ color?: string | undefined;
1019
+ fontSize?: number | undefined;
1020
+ fontWeight?: number | undefined;
1021
+ fontFamily?: string | undefined;
1022
+ } | undefined;
1023
+ size?: "sm" | "md" | "lg" | undefined;
1024
+ description?: {
1025
+ color?: string | undefined;
1026
+ fontSize?: number | undefined;
1027
+ fontWeight?: number | undefined;
1028
+ fontFamily?: string | undefined;
1029
+ } | undefined;
1030
+ align?: "center" | "end" | "start" | undefined;
1031
+ background?: {
1032
+ image?: string | undefined;
1033
+ color?: string | undefined;
1034
+ opacity?: number | undefined;
1035
+ blur?: number | undefined;
1036
+ brightness?: number | undefined;
1037
+ fit?: string | undefined;
1038
+ blendMode?: string | undefined;
1039
+ } | undefined;
1040
+ container?: {
1041
+ color?: string | undefined;
1042
+ opacity?: number | undefined;
1043
+ backgroundImage?: string | undefined;
1044
+ blur?: number | undefined;
1045
+ shadowSize?: number | undefined;
1046
+ shadowColor?: string | undefined;
1047
+ } | undefined;
1048
+ borderRadius?: "sm" | "md" | "lg" | undefined;
1049
+ font?: {
1050
+ color?: string | undefined;
1051
+ fontSize?: number | undefined;
1052
+ fontWeight?: number | undefined;
1053
+ fontFamily?: string | undefined;
1054
+ } | undefined;
1055
+ listStyle?: string | undefined;
1056
+ primaryColor?: string | undefined;
1057
+ customCSS?: string | undefined;
1058
+ } | undefined;
1059
+ isStart?: boolean | undefined;
1060
+ isEnd?: boolean | undefined;
1061
+ autoSubmit?: boolean | undefined;
1062
+ confirmLabel?: string | undefined;
1063
+ conditions?: {
1064
+ operator: string;
1065
+ trigger: string;
1066
+ controlId: string;
1067
+ compareValue?: string | undefined;
1068
+ }[] | undefined;
1069
+ }[] | undefined;
1070
+ listStep?: {
1071
+ id: string;
1072
+ controls: ({
1073
+ id: string;
1074
+ controlType: "text";
1075
+ title?: string | undefined;
1076
+ description?: string | undefined;
1077
+ icon?: string | undefined;
1078
+ maxLength?: number | undefined;
1079
+ minLength?: number | undefined;
1080
+ placeholder?: string | undefined;
1081
+ required?: boolean | undefined;
1082
+ variableName?: string | undefined;
1083
+ } | {
1084
+ id: string;
1085
+ controlType: "longText";
1086
+ title?: string | undefined;
1087
+ description?: string | undefined;
1088
+ icon?: string | undefined;
1089
+ maxLength?: number | undefined;
1090
+ minLength?: number | undefined;
1091
+ placeholder?: string | undefined;
1092
+ required?: boolean | undefined;
1093
+ variableName?: string | undefined;
1094
+ } | {
1095
+ id: string;
1096
+ controlType: "button";
1097
+ label?: string | undefined;
1098
+ link?: string | undefined;
1099
+ title?: string | undefined;
1100
+ description?: string | undefined;
1101
+ buttons?: any[] | undefined;
1102
+ width?: number | undefined;
1103
+ orientation?: "column" | "column-reverse" | "row" | "row-reverse" | undefined;
1104
+ required?: boolean | undefined;
1105
+ showIconButton?: boolean | undefined;
1106
+ buttonIcon?: string | undefined;
1107
+ alignButton?: "center" | "end" | "start" | undefined;
1108
+ enableTooltip?: boolean | undefined;
1109
+ fullWidthMobile?: boolean | undefined;
1110
+ } | {
1111
+ id: string;
1112
+ controlType: "date";
1113
+ title?: string | undefined;
1114
+ description?: string | undefined;
1115
+ icon?: string | undefined;
1116
+ placeholder?: string | undefined;
1117
+ required?: boolean | undefined;
1118
+ minDate?: string | undefined;
1119
+ maxDate?: string | undefined;
1120
+ variableName?: string | undefined;
1121
+ } | {
1122
+ id: string;
1123
+ controlType: "start";
1124
+ label?: string | undefined;
1125
+ title?: string | undefined;
1126
+ description?: string | undefined;
1127
+ icon?: string | undefined;
1128
+ required?: boolean | undefined;
1129
+ showIconButton?: boolean | undefined;
1130
+ buttonIcon?: string | undefined;
1131
+ showButton?: boolean | undefined;
1132
+ } | {
1133
+ id: string;
1134
+ controlType: "confirm";
1135
+ label?: string | undefined;
1136
+ link?: string | undefined;
1137
+ title?: string | undefined;
1138
+ description?: string | undefined;
1139
+ required?: boolean | undefined;
1140
+ buttonIcon?: string | undefined;
1141
+ showButton?: boolean | undefined;
1142
+ } | {
1143
+ id: string;
1144
+ controlType: "number";
1145
+ title?: string | undefined;
1146
+ description?: string | undefined;
1147
+ icon?: string | undefined;
1148
+ max?: number | undefined;
1149
+ min?: number | undefined;
1150
+ placeholder?: string | undefined;
1151
+ required?: boolean | undefined;
1152
+ variableName?: string | undefined;
1153
+ } | {
1154
+ id: string;
1155
+ options: {
1156
+ label: string;
1157
+ id: string;
1158
+ }[];
1159
+ controlType: "choice";
1160
+ title?: string | undefined;
1161
+ description?: string | undefined;
1162
+ required?: boolean | undefined;
1163
+ variableName?: string | undefined;
1164
+ showInput?: boolean | undefined;
1165
+ otherOption?: boolean | undefined;
1166
+ } | {
1167
+ id: string;
1168
+ options: {
1169
+ label: string;
1170
+ id: string;
1171
+ }[];
1172
+ controlType: "multipleChoice";
1173
+ title?: string | undefined;
1174
+ description?: string | undefined;
1175
+ icon?: string | undefined;
1176
+ required?: boolean | undefined;
1177
+ variableName?: string | undefined;
1178
+ showInput?: boolean | undefined;
1179
+ otherOption?: boolean | undefined;
1180
+ minOptions?: number | undefined;
1181
+ maxOptions?: number | undefined;
1182
+ } | {
1183
+ id: string;
1184
+ options: {
1185
+ label: string;
1186
+ id: string;
1187
+ image?: string | undefined;
1188
+ }[];
1189
+ controlType: "pictureChoice";
1190
+ title?: string | undefined;
1191
+ description?: string | undefined;
1192
+ icon?: string | undefined;
1193
+ required?: boolean | undefined;
1194
+ variableName?: string | undefined;
1195
+ showInput?: boolean | undefined;
1196
+ } | {
1197
+ id: string;
1198
+ options: {
1199
+ label: string;
1200
+ id: string;
1201
+ }[];
1202
+ controlType: "dropdown";
1203
+ title?: string | undefined;
1204
+ description?: string | undefined;
1205
+ icon?: string | undefined;
1206
+ placeholder?: string | undefined;
1207
+ required?: boolean | undefined;
1208
+ variableName?: string | undefined;
1209
+ } | {
1210
+ id: string;
1211
+ controlType: "email";
1212
+ title?: string | undefined;
1213
+ description?: string | undefined;
1214
+ icon?: string | undefined;
1215
+ placeholder?: string | undefined;
1216
+ required?: boolean | undefined;
1217
+ variableName?: string | undefined;
1218
+ } | {
1219
+ id: string;
1220
+ controlType: "location";
1221
+ title?: string | undefined;
1222
+ description?: string | undefined;
1223
+ icon?: string | undefined;
1224
+ placeholder?: string | undefined;
1225
+ required?: boolean | undefined;
1226
+ variableName?: string | undefined;
1227
+ } | {
1228
+ id: string;
1229
+ controlType: "phone";
1230
+ title?: string | undefined;
1231
+ description?: string | undefined;
1232
+ icon?: string | undefined;
1233
+ placeholder?: string | undefined;
1234
+ required?: boolean | undefined;
1235
+ variableName?: string | undefined;
1236
+ } | {
1237
+ id: string;
1238
+ controlType: "slider";
1239
+ title?: string | undefined;
1240
+ description?: string | undefined;
1241
+ icon?: string | undefined;
1242
+ max?: number | undefined;
1243
+ min?: number | undefined;
1244
+ required?: boolean | undefined;
1245
+ variableName?: string | undefined;
1246
+ } | {
1247
+ id: string;
1248
+ controlType: "upload";
1249
+ title?: string | undefined;
1250
+ description?: string | undefined;
1251
+ icon?: string | undefined;
1252
+ multiple?: boolean | undefined;
1253
+ accept?: string[] | undefined;
1254
+ required?: boolean | undefined;
1255
+ maxSize?: number | undefined;
1256
+ maxFiles?: number | undefined;
1257
+ variableName?: string | undefined;
1258
+ minFiles?: number | undefined;
1259
+ } | {
1260
+ id: string;
1261
+ controlType: "yesNo";
1262
+ title?: string | undefined;
1263
+ description?: string | undefined;
1264
+ icon?: string | undefined;
1265
+ required?: boolean | undefined;
1266
+ variableName?: string | undefined;
1267
+ yesLabel?: string | undefined;
1268
+ noLabel?: string | undefined;
1269
+ } | {
1270
+ id: string;
1271
+ controlType: "rating";
1272
+ title?: string | undefined;
1273
+ description?: string | undefined;
1274
+ required?: boolean | undefined;
1275
+ count?: number | undefined;
1276
+ variableName?: string | undefined;
1277
+ })[];
1278
+ trigger: string;
1279
+ position?: {
1280
+ x: number;
1281
+ y: number;
1282
+ } | undefined;
1283
+ media?: {
1284
+ video?: string | undefined;
1285
+ image?: string | undefined;
1286
+ color?: string | undefined;
1287
+ size?: number | undefined;
1288
+ layout?: "content" | "top" | "left" | "bottom" | "right" | "background" | "fullLeft" | "fullRight" | "fullTop" | "fullBottom" | undefined;
1289
+ blur?: number | undefined;
1290
+ brightness?: number | undefined;
1291
+ videoThumb?: string | undefined;
1292
+ } | undefined;
1293
+ theme?: {
1294
+ input?: {
1295
+ backgroundColor?: string | undefined;
1296
+ borderColor?: string | undefined;
1297
+ } | undefined;
1298
+ title?: {
1299
+ color?: string | undefined;
1300
+ fontSize?: number | undefined;
1301
+ fontWeight?: number | undefined;
1302
+ fontFamily?: string | undefined;
1303
+ } | undefined;
1304
+ size?: "sm" | "md" | "lg" | undefined;
1305
+ description?: {
1306
+ color?: string | undefined;
1307
+ fontSize?: number | undefined;
1308
+ fontWeight?: number | undefined;
1309
+ fontFamily?: string | undefined;
1310
+ } | undefined;
1311
+ align?: "center" | "end" | "start" | undefined;
1312
+ background?: {
1313
+ image?: string | undefined;
1314
+ color?: string | undefined;
1315
+ opacity?: number | undefined;
1316
+ blur?: number | undefined;
1317
+ brightness?: number | undefined;
1318
+ fit?: string | undefined;
1319
+ blendMode?: string | undefined;
1320
+ } | undefined;
1321
+ container?: {
1322
+ color?: string | undefined;
1323
+ opacity?: number | undefined;
1324
+ backgroundImage?: string | undefined;
1325
+ blur?: number | undefined;
1326
+ shadowSize?: number | undefined;
1327
+ shadowColor?: string | undefined;
1328
+ } | undefined;
1329
+ borderRadius?: "sm" | "md" | "lg" | undefined;
1330
+ font?: {
1331
+ color?: string | undefined;
1332
+ fontSize?: number | undefined;
1333
+ fontWeight?: number | undefined;
1334
+ fontFamily?: string | undefined;
1335
+ } | undefined;
1336
+ listStyle?: string | undefined;
1337
+ primaryColor?: string | undefined;
1338
+ customCSS?: string | undefined;
1339
+ } | undefined;
1340
+ isStart?: boolean | undefined;
1341
+ isEnd?: boolean | undefined;
1342
+ autoSubmit?: boolean | undefined;
1343
+ confirmLabel?: string | undefined;
1344
+ conditions?: {
1345
+ operator: string;
1346
+ trigger: string;
1347
+ controlId: string;
1348
+ compareValue?: string | undefined;
1349
+ }[] | undefined;
1350
+ } | undefined;
1351
+ }>;
1352
+ setProps: (props: FormViewerProps) => void;
1353
+ forwardActiveStep: (steps?: number) => void;
1354
+ backActiveStep: (steps?: number) => void;
1355
+ resetActiveStep: () => void;
111
1356
  };
112
1357
  };