@wise/dynamic-flow-client 4.8.7 → 4.9.0-exp-modal-renderer-c6d2baa

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 (53) hide show
  1. package/build/main.js +101 -58
  2. package/build/main.mjs +101 -58
  3. package/build/types/revamp/domain/components/AlertComponent.d.ts +1 -0
  4. package/build/types/revamp/domain/components/AllOfComponent.d.ts +2 -1
  5. package/build/types/revamp/domain/components/BooleanInputComponent.d.ts +1 -0
  6. package/build/types/revamp/domain/components/BoxComponent.d.ts +1 -0
  7. package/build/types/revamp/domain/components/ButtonComponent.d.ts +1 -0
  8. package/build/types/revamp/domain/components/ColumnsComponent.d.ts +1 -0
  9. package/build/types/revamp/domain/components/ConstComponent.d.ts +1 -0
  10. package/build/types/revamp/domain/components/ContainerComponent.d.ts +1 -0
  11. package/build/types/revamp/domain/components/DateInputComponent.d.ts +1 -0
  12. package/build/types/revamp/domain/components/DecisionComponent.d.ts +1 -0
  13. package/build/types/revamp/domain/components/DividerComponent.d.ts +1 -0
  14. package/build/types/revamp/domain/components/FormComponent.d.ts +1 -0
  15. package/build/types/revamp/domain/components/HeadingComponent.d.ts +1 -0
  16. package/build/types/revamp/domain/components/ImageComponent.d.ts +1 -0
  17. package/build/types/revamp/domain/components/InstructionsComponent.d.ts +1 -0
  18. package/build/types/revamp/domain/components/IntegerInputComponent.d.ts +1 -0
  19. package/build/types/revamp/domain/components/ListComponent.d.ts +1 -0
  20. package/build/types/revamp/domain/components/LoadingIndicatorComponent.d.ts +1 -0
  21. package/build/types/revamp/domain/components/MarkdownComponent.d.ts +1 -0
  22. package/build/types/revamp/domain/components/ModalComponent.d.ts +7 -9
  23. package/build/types/revamp/domain/components/ModalLayoutComponent.d.ts +14 -0
  24. package/build/types/revamp/domain/components/MultiSelectInputComponent.d.ts +1 -0
  25. package/build/types/revamp/domain/components/MultiUploadInputComponent.d.ts +1 -0
  26. package/build/types/revamp/domain/components/NumberInputComponent.d.ts +1 -0
  27. package/build/types/revamp/domain/components/ObjectComponent.d.ts +2 -1
  28. package/build/types/revamp/domain/components/ParagraphComponent.d.ts +1 -0
  29. package/build/types/revamp/domain/components/PersistAsyncComponent.d.ts +1 -0
  30. package/build/types/revamp/domain/components/RepeatableComponent.d.ts +1 -0
  31. package/build/types/revamp/domain/components/ReviewComponent.d.ts +1 -0
  32. package/build/types/revamp/domain/components/RootDomainComponent.d.ts +4 -3
  33. package/build/types/revamp/domain/components/SectionComponent.d.ts +1 -0
  34. package/build/types/revamp/domain/components/SelectInputComponent.d.ts +1 -0
  35. package/build/types/revamp/domain/components/StatusListComponent.d.ts +1 -0
  36. package/build/types/revamp/domain/components/TabsComponent.d.ts +1 -0
  37. package/build/types/revamp/domain/components/TextInputComponent.d.ts +1 -0
  38. package/build/types/revamp/domain/components/TupleComponent.d.ts +2 -1
  39. package/build/types/revamp/domain/components/UploadInputComponent.d.ts +1 -0
  40. package/build/types/revamp/domain/components/searchComponent/SearchComponent.d.ts +1 -0
  41. package/build/types/revamp/domain/components/step/ExternalConfirmationComponent.d.ts +1 -0
  42. package/build/types/revamp/domain/components/step/StepDomainComponent.d.ts +6 -5
  43. package/build/types/revamp/domain/mappers/layout/modalLayoutToComponent.d.ts +1 -1
  44. package/build/types/revamp/domain/mappers/layout/modalToContent.d.ts +2 -2
  45. package/build/types/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.d.ts +464 -1
  46. package/build/types/revamp/domain/mappers/schema/persistAsyncSchemaToComponent.d.ts +476 -1
  47. package/build/types/revamp/domain/types.d.ts +9 -4
  48. package/build/types/revamp/renderers/mappers/componentToRendererProps.d.ts +3 -3
  49. package/build/types/revamp/renderers/mappers/modalComponentToProps.d.ts +1 -1
  50. package/build/types/revamp/renderers/mappers/modalLayoutComponentToProps.d.ts +4 -0
  51. package/package.json +2 -2
  52. package/build/types/revamp/domain/components/ModalContentComponent.d.ts +0 -10
  53. package/build/types/revamp/renderers/mappers/modalContentComponentToProps.d.ts +0 -4
@@ -3,4 +3,479 @@ import { SchemaComponent } from '../../types';
3
3
  import { MapperProps, SchemaMapperProps } from './types';
4
4
  export declare const persistAsyncSchemaToComponent: (schemaMapperProps: SchemaMapperProps & {
5
5
  schema: SchemaWithPersistAsync;
6
- }, mapperProps: MapperProps) => SchemaComponent;
6
+ }, mapperProps: MapperProps) => import("../../components/PersistAsyncComponent").PersistAsyncComponent | (import("../../types").BaseComponent & {
7
+ schemaId?: string;
8
+ isSchemaReferencedInStep?: boolean;
9
+ control?: string;
10
+ description?: string;
11
+ help?: string;
12
+ hidden: boolean;
13
+ icon?: import("@wise/dynamic-flow-types/build/next").Icon;
14
+ image?: import("../../types").Image;
15
+ title?: string;
16
+ getLocalValue: () => import("../../types").LocalValue;
17
+ getSubmittableValueSync: () => import("@wise/dynamic-flow-types/build/next").Model;
18
+ getSummary: () => import("../../types").RepeatableSummary;
19
+ getSubmittableValue: () => Promise<import("@wise/dynamic-flow-types/build/next").Model>;
20
+ validate: () => boolean;
21
+ } & {
22
+ type: "all-of";
23
+ kind: "input";
24
+ components: SchemaComponent[];
25
+ alert?: import("../../types").InlineAlert;
26
+ getChildren: () => SchemaComponent[];
27
+ } & {
28
+ kind: "input";
29
+ }) | (import("../../types").BaseComponent & {
30
+ schemaId?: string;
31
+ isSchemaReferencedInStep?: boolean;
32
+ control?: string;
33
+ description?: string;
34
+ help?: string;
35
+ hidden: boolean;
36
+ icon?: import("@wise/dynamic-flow-types/build/next").Icon;
37
+ image?: import("../../types").Image;
38
+ title?: string;
39
+ getLocalValue: () => boolean;
40
+ getSubmittableValueSync: () => import("@wise/dynamic-flow-types/build/next").Model;
41
+ getSummary: () => import("../../types").RepeatableSummary;
42
+ getSubmittableValue: () => Promise<import("@wise/dynamic-flow-types/build/next").Model>;
43
+ validate: () => boolean;
44
+ } & {
45
+ id: string;
46
+ autoComplete: string;
47
+ disabled: boolean;
48
+ errors: string[] | undefined;
49
+ placeholder?: string;
50
+ required: boolean;
51
+ validationAsyncState?: import("../../types").ValidationAsyncState;
52
+ value: boolean;
53
+ alert?: import("../../types").InlineAlert;
54
+ onBlur: () => void;
55
+ onFocus: () => void;
56
+ } & {
57
+ type: "boolean";
58
+ kind: "input";
59
+ validationAsyncState: import("../../types").ValidationAsyncState;
60
+ onChange: (value: boolean) => void;
61
+ } & {
62
+ kind: "input";
63
+ }) | (import("../../types").BaseComponent & {
64
+ schemaId?: string;
65
+ isSchemaReferencedInStep?: boolean;
66
+ control?: string;
67
+ description?: string;
68
+ help?: string;
69
+ hidden: boolean;
70
+ icon?: import("@wise/dynamic-flow-types/build/next").Icon;
71
+ image?: import("../../types").Image;
72
+ title?: string;
73
+ getLocalValue: () => import("../../types").LocalValue;
74
+ getSubmittableValueSync: () => import("@wise/dynamic-flow-types/build/next").Model;
75
+ getSummary: () => import("../../types").RepeatableSummary;
76
+ getSubmittableValue: () => Promise<import("@wise/dynamic-flow-types/build/next").Model>;
77
+ validate: () => boolean;
78
+ } & {
79
+ type: "const";
80
+ kind: "input";
81
+ } & {
82
+ kind: "input";
83
+ }) | (import("../../types").BaseComponent & {
84
+ schemaId?: string;
85
+ isSchemaReferencedInStep?: boolean;
86
+ control?: string;
87
+ description?: string;
88
+ help?: string;
89
+ hidden: boolean;
90
+ icon?: import("@wise/dynamic-flow-types/build/next").Icon;
91
+ image?: import("../../types").Image;
92
+ title?: string;
93
+ getLocalValue: () => string | null;
94
+ getSubmittableValueSync: () => import("@wise/dynamic-flow-types/build/next").Model;
95
+ getSummary: () => import("../../types").RepeatableSummary;
96
+ getSubmittableValue: () => Promise<import("@wise/dynamic-flow-types/build/next").Model>;
97
+ validate: () => boolean;
98
+ } & {
99
+ id: string;
100
+ autoComplete: string;
101
+ disabled: boolean;
102
+ errors: string[] | undefined;
103
+ placeholder?: string;
104
+ required: boolean;
105
+ validationAsyncState?: import("../../types").ValidationAsyncState;
106
+ value: string | null;
107
+ alert?: import("../../types").InlineAlert;
108
+ onBlur: () => void;
109
+ onFocus: () => void;
110
+ } & {
111
+ type: "date";
112
+ kind: "input";
113
+ minimumDate?: string;
114
+ maximumDate?: string;
115
+ suggestions?: import("../../types").Suggestions;
116
+ validationAsyncState: import("../../types").ValidationAsyncState;
117
+ onChange: (value: string | null) => void;
118
+ } & {
119
+ kind: "input";
120
+ }) | (import("../../types").BaseComponent & {
121
+ schemaId?: string;
122
+ isSchemaReferencedInStep?: boolean;
123
+ control?: string;
124
+ description?: string;
125
+ help?: string;
126
+ hidden: boolean;
127
+ icon?: import("@wise/dynamic-flow-types/build/next").Icon;
128
+ image?: import("../../types").Image;
129
+ title?: string;
130
+ getLocalValue: () => number | null;
131
+ getSubmittableValueSync: () => import("@wise/dynamic-flow-types/build/next").Model;
132
+ getSummary: () => import("../../types").RepeatableSummary;
133
+ getSubmittableValue: () => Promise<import("@wise/dynamic-flow-types/build/next").Model>;
134
+ validate: () => boolean;
135
+ } & {
136
+ id: string;
137
+ autoComplete: string;
138
+ disabled: boolean;
139
+ errors: string[] | undefined;
140
+ placeholder?: string;
141
+ required: boolean;
142
+ validationAsyncState?: import("../../types").ValidationAsyncState;
143
+ value: number | null;
144
+ alert?: import("../../types").InlineAlert;
145
+ onBlur: () => void;
146
+ onFocus: () => void;
147
+ } & {
148
+ type: "integer";
149
+ kind: "input";
150
+ maximum?: number;
151
+ minimum?: number;
152
+ validationAsyncState: import("../../types").ValidationAsyncState;
153
+ onChange: (value: number | null) => void;
154
+ } & {
155
+ kind: "input";
156
+ }) | (import("../../types").BaseComponent & {
157
+ schemaId?: string;
158
+ isSchemaReferencedInStep?: boolean;
159
+ control?: string;
160
+ description?: string;
161
+ help?: string;
162
+ hidden: boolean;
163
+ icon?: import("@wise/dynamic-flow-types/build/next").Icon;
164
+ image?: import("../../types").Image;
165
+ title?: string;
166
+ getLocalValue: () => import("../../types").LocalValueArray | null;
167
+ getSubmittableValueSync: () => import("@wise/dynamic-flow-types/build/next").Model;
168
+ getSummary: () => import("../../types").RepeatableSummary;
169
+ getSubmittableValue: () => Promise<import("@wise/dynamic-flow-types/build/next").Model>;
170
+ validate: () => boolean;
171
+ } & {
172
+ id: string;
173
+ autoComplete: string;
174
+ disabled: boolean;
175
+ errors: string[] | undefined;
176
+ placeholder?: string;
177
+ required: boolean;
178
+ validationAsyncState?: import("../../types").ValidationAsyncState;
179
+ value: import("../../types").LocalValueArray | null;
180
+ alert?: import("../../types").InlineAlert;
181
+ onBlur: () => void;
182
+ onFocus: () => void;
183
+ } & {
184
+ type: "multi-select";
185
+ kind: "input";
186
+ children: SchemaComponent[];
187
+ maxItems?: number;
188
+ minItems?: number;
189
+ options: import("../../components/SelectInputComponent").SelectInputOption[];
190
+ validationAsyncState: import("../../types").ValidationAsyncState;
191
+ selectedIndices: number[];
192
+ getChildren: () => SchemaComponent[];
193
+ getSelectedChildren: () => SchemaComponent[] | null;
194
+ onSelect: (indices: number[]) => void;
195
+ } & {
196
+ kind: "input";
197
+ }) | (import("../../types").BaseComponent & {
198
+ schemaId?: string;
199
+ isSchemaReferencedInStep?: boolean;
200
+ control?: string;
201
+ description?: string;
202
+ help?: string;
203
+ hidden: boolean;
204
+ icon?: import("@wise/dynamic-flow-types/build/next").Icon;
205
+ image?: import("../../types").Image;
206
+ title?: string;
207
+ getLocalValue: () => File[];
208
+ getSubmittableValueSync: () => import("@wise/dynamic-flow-types/build/next").Model;
209
+ getSummary: () => import("../../types").RepeatableSummary;
210
+ getSubmittableValue: () => Promise<import("@wise/dynamic-flow-types/build/next").Model>;
211
+ validate: () => boolean;
212
+ } & {
213
+ id: string;
214
+ autoComplete: string;
215
+ disabled: boolean;
216
+ errors: string[] | undefined;
217
+ placeholder?: string;
218
+ required: boolean;
219
+ validationAsyncState?: import("../../types").ValidationAsyncState;
220
+ value: File[];
221
+ alert?: import("../../types").InlineAlert;
222
+ onBlur: () => void;
223
+ onFocus: () => void;
224
+ } & {
225
+ type: "multi-upload";
226
+ kind: "input";
227
+ accepts?: string[];
228
+ cameraConfig?: import("@wise/dynamic-flow-types/build/next").JsonElement;
229
+ files: {
230
+ file: File;
231
+ errors: string[];
232
+ id: string;
233
+ }[];
234
+ format: "blob" | "base64";
235
+ maxItems?: number;
236
+ maxSize?: number;
237
+ minItems?: number;
238
+ persistedState: import("../../types").PersistedState[];
239
+ source?: import("../../types").UploadSource;
240
+ validationAsyncState?: undefined;
241
+ uploadLabel?: string;
242
+ onRemoveFile: (index: number) => Promise<void>;
243
+ onInsertFile: (index: number, file: File) => Promise<string>;
244
+ } & {
245
+ kind: "input";
246
+ }) | (import("../../types").BaseComponent & {
247
+ schemaId?: string;
248
+ isSchemaReferencedInStep?: boolean;
249
+ control?: string;
250
+ description?: string;
251
+ help?: string;
252
+ hidden: boolean;
253
+ icon?: import("@wise/dynamic-flow-types/build/next").Icon;
254
+ image?: import("../../types").Image;
255
+ title?: string;
256
+ getLocalValue: () => number | null;
257
+ getSubmittableValueSync: () => import("@wise/dynamic-flow-types/build/next").Model;
258
+ getSummary: () => import("../../types").RepeatableSummary;
259
+ getSubmittableValue: () => Promise<import("@wise/dynamic-flow-types/build/next").Model>;
260
+ validate: () => boolean;
261
+ } & {
262
+ id: string;
263
+ autoComplete: string;
264
+ disabled: boolean;
265
+ errors: string[] | undefined;
266
+ placeholder?: string;
267
+ required: boolean;
268
+ validationAsyncState?: import("../../types").ValidationAsyncState;
269
+ value: number | null;
270
+ alert?: import("../../types").InlineAlert;
271
+ onBlur: () => void;
272
+ onFocus: () => void;
273
+ } & {
274
+ type: "number";
275
+ kind: "input";
276
+ maximum?: number;
277
+ minimum?: number;
278
+ validationAsyncState: import("../../types").ValidationAsyncState;
279
+ onChange: (value: number | null) => void;
280
+ } & {
281
+ kind: "input";
282
+ }) | (import("../../types").BaseComponent & {
283
+ schemaId?: string;
284
+ isSchemaReferencedInStep?: boolean;
285
+ control?: string;
286
+ description?: string;
287
+ help?: string;
288
+ hidden: boolean;
289
+ icon?: import("@wise/dynamic-flow-types/build/next").Icon;
290
+ image?: import("../../types").Image;
291
+ title?: string;
292
+ getLocalValue: () => import("../../types").LocalValueObject;
293
+ getSubmittableValueSync: () => import("@wise/dynamic-flow-types/build/next").Model;
294
+ getSummary: () => import("../../types").RepeatableSummary;
295
+ getSubmittableValue: () => Promise<import("@wise/dynamic-flow-types/build/next").Model>;
296
+ validate: () => boolean;
297
+ } & {
298
+ type: "object";
299
+ kind: "input";
300
+ componentMap: Record<string, SchemaComponent>;
301
+ alert?: import("../../types").InlineAlert;
302
+ getChildren: () => SchemaComponent[];
303
+ } & {
304
+ kind: "input";
305
+ }) | (import("../../types").BaseComponent & {
306
+ schemaId?: string;
307
+ isSchemaReferencedInStep?: boolean;
308
+ control?: string;
309
+ description?: string;
310
+ help?: string;
311
+ hidden: boolean;
312
+ icon?: import("@wise/dynamic-flow-types/build/next").Icon;
313
+ image?: import("../../types").Image;
314
+ title?: string;
315
+ getLocalValue: () => import("../../types").LocalValueArray;
316
+ getSubmittableValueSync: () => import("@wise/dynamic-flow-types/build/next").Model;
317
+ getSummary: () => import("../../types").RepeatableSummary;
318
+ getSubmittableValue: () => Promise<import("@wise/dynamic-flow-types/build/next").Model>;
319
+ validate: () => boolean;
320
+ } & {
321
+ type: "repeatable";
322
+ kind: "input";
323
+ id?: string;
324
+ components: SchemaComponent[];
325
+ addItemTitle: string;
326
+ alert?: import("../../types").InlineAlert;
327
+ editableComponent: SchemaComponent | null;
328
+ editableIndex: number | null;
329
+ editItemTitle: string;
330
+ errors: string[] | undefined;
331
+ maxItems?: number;
332
+ minItems?: number;
333
+ summaryDefaults: import("../../types").RepeatableSummary;
334
+ getChildren: () => SchemaComponent[];
335
+ onAdd: () => void;
336
+ onEdit: (itemIndex: number) => void;
337
+ onRemove: () => void;
338
+ onSave: () => boolean;
339
+ } & {
340
+ kind: "input";
341
+ }) | (import("../../types").BaseComponent & {
342
+ schemaId?: string;
343
+ isSchemaReferencedInStep?: boolean;
344
+ control?: string;
345
+ description?: string;
346
+ help?: string;
347
+ hidden: boolean;
348
+ icon?: import("@wise/dynamic-flow-types/build/next").Icon;
349
+ image?: import("../../types").Image;
350
+ title?: string;
351
+ getLocalValue: () => import("../../types").LocalValue;
352
+ getSubmittableValueSync: () => import("@wise/dynamic-flow-types/build/next").Model;
353
+ getSummary: () => import("../../types").RepeatableSummary;
354
+ getSubmittableValue: () => Promise<import("@wise/dynamic-flow-types/build/next").Model>;
355
+ validate: () => boolean;
356
+ } & {
357
+ id: string;
358
+ autoComplete: string;
359
+ disabled: boolean;
360
+ errors: string[] | undefined;
361
+ placeholder?: string;
362
+ required: boolean;
363
+ validationAsyncState?: import("../../types").ValidationAsyncState;
364
+ value: import("../../types").LocalValue;
365
+ alert?: import("../../types").InlineAlert;
366
+ onBlur: () => void;
367
+ onFocus: () => void;
368
+ } & {
369
+ type: "select";
370
+ kind: "input";
371
+ selectedIndex: number | null;
372
+ options: import("../../components/SelectInputComponent").SelectInputOption[];
373
+ children: SchemaComponent[];
374
+ validationAsyncState?: undefined;
375
+ onSelect: (index: number | null) => void;
376
+ getChildren: () => SchemaComponent[];
377
+ getSelectedChild: () => SchemaComponent | null;
378
+ } & {
379
+ kind: "input";
380
+ }) | (import("../../types").BaseComponent & {
381
+ schemaId?: string;
382
+ isSchemaReferencedInStep?: boolean;
383
+ control?: string;
384
+ description?: string;
385
+ help?: string;
386
+ hidden: boolean;
387
+ icon?: import("@wise/dynamic-flow-types/build/next").Icon;
388
+ image?: import("../../types").Image;
389
+ title?: string;
390
+ getLocalValue: () => string | null;
391
+ getSubmittableValueSync: () => import("@wise/dynamic-flow-types/build/next").Model;
392
+ getSummary: () => import("../../types").RepeatableSummary;
393
+ getSubmittableValue: () => Promise<import("@wise/dynamic-flow-types/build/next").Model>;
394
+ validate: () => boolean;
395
+ } & {
396
+ id: string;
397
+ autoComplete: string;
398
+ disabled: boolean;
399
+ errors: string[] | undefined;
400
+ placeholder?: string;
401
+ required: boolean;
402
+ validationAsyncState?: import("../../types").ValidationAsyncState;
403
+ value: string | null;
404
+ alert?: import("../../types").InlineAlert;
405
+ onBlur: () => void;
406
+ onFocus: () => void;
407
+ } & {
408
+ type: "text";
409
+ kind: "input";
410
+ autocapitalization?: import("../../types").Autocapitalization;
411
+ displayFormat?: string;
412
+ maxLength?: number;
413
+ minLength?: number;
414
+ suggestions?: import("../../types").Suggestions;
415
+ validationAsyncState: import("../../types").ValidationAsyncState;
416
+ onChange: (value: string | null) => void;
417
+ } & {
418
+ kind: "input";
419
+ }) | (import("../../types").BaseComponent & {
420
+ schemaId?: string;
421
+ isSchemaReferencedInStep?: boolean;
422
+ control?: string;
423
+ description?: string;
424
+ help?: string;
425
+ hidden: boolean;
426
+ icon?: import("@wise/dynamic-flow-types/build/next").Icon;
427
+ image?: import("../../types").Image;
428
+ title?: string;
429
+ getLocalValue: () => import("../../types").LocalValueArray;
430
+ getSubmittableValueSync: () => import("@wise/dynamic-flow-types/build/next").Model;
431
+ getSummary: () => import("../../types").RepeatableSummary;
432
+ getSubmittableValue: () => Promise<import("@wise/dynamic-flow-types/build/next").Model>;
433
+ validate: () => boolean;
434
+ } & {
435
+ type: "tuple";
436
+ kind: "input";
437
+ components: SchemaComponent[];
438
+ alert?: import("../../types").InlineAlert;
439
+ getChildren: () => SchemaComponent[];
440
+ } & {
441
+ kind: "input";
442
+ }) | (import("../../types").BaseComponent & {
443
+ schemaId?: string;
444
+ isSchemaReferencedInStep?: boolean;
445
+ control?: string;
446
+ description?: string;
447
+ help?: string;
448
+ hidden: boolean;
449
+ icon?: import("@wise/dynamic-flow-types/build/next").Icon;
450
+ image?: import("../../types").Image;
451
+ title?: string;
452
+ getLocalValue: () => File | null;
453
+ getSubmittableValueSync: () => import("@wise/dynamic-flow-types/build/next").Model;
454
+ getSummary: () => import("../../types").RepeatableSummary;
455
+ getSubmittableValue: () => Promise<import("@wise/dynamic-flow-types/build/next").Model>;
456
+ validate: () => boolean;
457
+ } & {
458
+ id: string;
459
+ autoComplete: string;
460
+ disabled: boolean;
461
+ errors: string[] | undefined;
462
+ placeholder?: string;
463
+ required: boolean;
464
+ validationAsyncState?: import("../../types").ValidationAsyncState;
465
+ value: File | null;
466
+ alert?: import("../../types").InlineAlert;
467
+ onBlur: () => void;
468
+ onFocus: () => void;
469
+ } & {
470
+ type: "upload";
471
+ kind: "input";
472
+ format: "blob" | "base64";
473
+ cameraConfig?: import("@wise/dynamic-flow-types/build/next").JsonElement;
474
+ maxSize?: number;
475
+ accepts?: string[];
476
+ source?: import("../../types").UploadSource;
477
+ validationAsyncState?: undefined;
478
+ onUpload: (value: File | null) => Promise<void>;
479
+ } & {
480
+ kind: "input";
481
+ });
@@ -19,7 +19,7 @@ import type { ListComponent } from './components/ListComponent';
19
19
  import type { LoadingIndicatorComponent } from './components/LoadingIndicatorComponent';
20
20
  import type { MarkdownComponent } from './components/MarkdownComponent';
21
21
  import type { ModalComponent } from './components/ModalComponent';
22
- import type { ModalContentComponent } from './components/ModalContentComponent';
22
+ import type { ModalLayoutComponent } from './components/ModalLayoutComponent';
23
23
  import type { MultiSelectComponent } from './components/MultiSelectInputComponent';
24
24
  import type { MultiUploadInputComponent } from './components/MultiUploadInputComponent';
25
25
  import type { NumberInputComponent } from './components/NumberInputComponent';
@@ -39,9 +39,13 @@ import type { TabsComponent } from './components/TabsComponent';
39
39
  import type { TextInputComponent } from './components/TextInputComponent';
40
40
  import type { TupleComponent } from './components/TupleComponent';
41
41
  import type { UploadInputComponent } from './components/UploadInputComponent';
42
- export type DomainComponent = SchemaComponent | LayoutComponent | RootDomainComponent | StepDomainComponent;
43
- export type SchemaComponent = PersistAsyncComponent | AllOfComponent | BooleanInputComponent | ConstComponent | DateInputComponent | IntegerInputComponent | MultiSelectComponent | MultiUploadInputComponent | NumberInputComponent | ObjectComponent | RepeatableComponent | SelectInputComponent | TextInputComponent | TupleComponent | UploadInputComponent;
44
- export type LayoutComponent = AlertComponent | BoxComponent | ButtonComponent | ColumnsComponent | ContainerComponent | DecisionComponent | DividerComponent | ExternalConfirmationComponent | FormComponent | HeadingComponent | ImageComponent | InstructionsComponent | ListComponent | LoadingIndicatorComponent | MarkdownComponent | ModalComponent | ModalContentComponent | ParagraphComponent | ReviewComponent | SearchComponent | SectionComponent | StatusListComponent | TabsComponent;
42
+ export type DomainComponent = RootDomainComponent | StepDomainComponent | PersistAsyncComponent | AllOfComponent | BooleanInputComponent | ConstComponent | DateInputComponent | IntegerInputComponent | MultiSelectComponent | MultiUploadInputComponent | NumberInputComponent | ObjectComponent | RepeatableComponent | SelectInputComponent | TextInputComponent | TupleComponent | UploadInputComponent | AlertComponent | BoxComponent | ButtonComponent | ColumnsComponent | ContainerComponent | DecisionComponent | DividerComponent | ExternalConfirmationComponent | FormComponent | HeadingComponent | ImageComponent | InstructionsComponent | ListComponent | LoadingIndicatorComponent | MarkdownComponent | ModalLayoutComponent | ModalComponent | ParagraphComponent | ReviewComponent | SearchComponent | SectionComponent | StatusListComponent | TabsComponent;
43
+ export type SchemaComponent = DomainComponent & {
44
+ kind: 'input';
45
+ };
46
+ export type LayoutComponent = DomainComponent & {
47
+ kind: 'layout';
48
+ };
45
49
  export type LocalValue = LocalValuePrimitive | LocalValueObject | LocalValueArray;
46
50
  export type LocalValuePrimitive = string | number | boolean | File | null;
47
51
  export interface LocalValueObject extends Record<string, LocalValuePrimitive | LocalValueObject | LocalValueArray> {
@@ -70,6 +74,7 @@ type RefreshBehavior = {
70
74
  url?: string;
71
75
  };
72
76
  export type BaseComponent = {
77
+ kind: 'step' | 'input' | 'layout';
73
78
  type: string;
74
79
  uid: string;
75
80
  analyticsId?: string;
@@ -1,11 +1,11 @@
1
1
  import type { RendererProps, RenderFunction } from '@wise/dynamic-flow-types/build/renderers';
2
+ import type { AnalyticsEventDispatcher } from '../../domain/features/events';
2
3
  import type { DomainComponent, LoadingState } from '../../domain/types';
3
- import { AnalyticsEventDispatcher } from '../../domain/features/events';
4
- import { HttpClient } from '../../types';
4
+ import type { HttpClient } from '../../types';
5
5
  export type RendererMapperProps = {
6
6
  stepLoadingState: LoadingState;
7
7
  render: RenderFunction;
8
8
  httpClient: HttpClient;
9
9
  trackEvent: AnalyticsEventDispatcher<string>;
10
10
  };
11
- export declare const componentToRendererProps: (component: DomainComponent, rendererMapperProps: RendererMapperProps) => RendererProps;
11
+ export declare const componentToRendererProps: (component: DomainComponent, mapperProps: RendererMapperProps) => RendererProps;
@@ -1,4 +1,4 @@
1
1
  import type { ModalRendererProps } from '@wise/dynamic-flow-types/build/renderers';
2
- import type { ModalComponent } from '../../domain/components/ModalComponent';
2
+ import { ModalComponent } from '../../domain/components/ModalComponent';
3
3
  import { RendererMapperProps } from './componentToRendererProps';
4
4
  export declare const modalComponentToProps: (component: ModalComponent, rendererMapperProps: RendererMapperProps) => ModalRendererProps;
@@ -0,0 +1,4 @@
1
+ import type { ModalLayoutRendererProps } from '@wise/dynamic-flow-types/build/renderers';
2
+ import type { ModalLayoutComponent } from '../../domain/components/ModalLayoutComponent';
3
+ import { RendererMapperProps } from './componentToRendererProps';
4
+ export declare const modalLayoutComponentToProps: (component: ModalLayoutComponent, rendererMapperProps: RendererMapperProps) => ModalLayoutRendererProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-client",
3
- "version": "4.8.7",
3
+ "version": "4.9.0-exp-modal-renderer-c6d2baa",
4
4
  "description": "Dynamic Flow web client",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/main.js",
@@ -95,7 +95,7 @@
95
95
  "classnames": "2.5.1",
96
96
  "react-webcam": "^7.2.0",
97
97
  "screenfull": "^5.2.0",
98
- "@wise/dynamic-flow-types": "3.7.0"
98
+ "@wise/dynamic-flow-types": "3.8.0-exp-modal-renderer-c6d2baa"
99
99
  },
100
100
  "scripts": {
101
101
  "dev": "pnpm build:visual-tests && storybook dev -p 3003",
@@ -1,10 +0,0 @@
1
- import type { BaseComponent, DomainComponent, UpdateComponent } from '../types';
2
- export type ModalContentComponent = BaseComponent & {
3
- type: 'modal-content';
4
- components: DomainComponent[];
5
- open: boolean;
6
- title?: string;
7
- getChildren: () => DomainComponent[];
8
- close: () => void;
9
- };
10
- export declare const createModalContentComponent: (modalProps: Pick<ModalContentComponent, "uid" | "analyticsId" | "components" | "title">, updateComponent: UpdateComponent) => ModalContentComponent;
@@ -1,4 +0,0 @@
1
- import type { ModalContentRendererProps } from '@wise/dynamic-flow-types/build/renderers';
2
- import { ModalContentComponent } from '../../domain/components/ModalContentComponent';
3
- import { RendererMapperProps } from './componentToRendererProps';
4
- export declare const modalContentComponentToProps: (component: ModalContentComponent, rendererMapperProps: RendererMapperProps) => ModalContentRendererProps;