@wise/dynamic-flow-types 3.2.0 → 3.3.1

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.
package/build/main.js CHANGED
@@ -44,6 +44,10 @@ var httpMethodSchema = import_zod.z.union([
44
44
  var iconNamedSchema = import_zod.z.object({
45
45
  name: import_zod.z.string()
46
46
  });
47
+ var supportingValuesSchema = import_zod.z.object({
48
+ value: import_zod.z.string().optional(),
49
+ subvalue: import_zod.z.string().optional()
50
+ });
47
51
  var contextSchema = import_zod.z.union([
48
52
  import_zod.z.literal("positive"),
49
53
  import_zod.z.literal("neutral"),
@@ -54,6 +58,10 @@ var contextSchema = import_zod.z.union([
54
58
  import_zod.z.literal("info"),
55
59
  import_zod.z.literal("primary")
56
60
  ]);
61
+ var inlineAlertSchema = import_zod.z.object({
62
+ content: import_zod.z.string(),
63
+ context: contextSchema.optional()
64
+ });
57
65
  var iconTextSchema = import_zod.z.object({
58
66
  text: import_zod.z.string()
59
67
  });
@@ -332,17 +340,6 @@ var actionSchema = import_zod.z.object({
332
340
  timeout: import_zod.z.number().optional(),
333
341
  skipValidation: import_zod.z.boolean().optional()
334
342
  });
335
- var listLayoutItemSchema = import_zod.z.object({
336
- description: import_zod.z.string().optional(),
337
- status: listLayoutStatusSchema.optional(),
338
- icon: iconSchema.optional(),
339
- image: imageSchema.optional(),
340
- title: import_zod.z.string().optional(),
341
- subtitle: import_zod.z.string().optional(),
342
- value: import_zod.z.string().optional(),
343
- subvalue: import_zod.z.string().optional(),
344
- tag: import_zod.z.string().optional()
345
- });
346
343
  var instructionsLayoutSchema = import_zod.z.object({
347
344
  type: import_zod.z.literal("instructions"),
348
345
  title: import_zod.z.string().optional(),
@@ -350,13 +347,6 @@ var instructionsLayoutSchema = import_zod.z.object({
350
347
  control: import_zod.z.string().optional(),
351
348
  margin: sizeSchema.optional()
352
349
  });
353
- var reviewLayoutFieldSchema = import_zod.z.object({
354
- label: import_zod.z.string(),
355
- value: import_zod.z.string(),
356
- rawValue: import_zod.z.string().optional(),
357
- help: helpSchema.optional(),
358
- tag: import_zod.z.string().optional()
359
- });
360
350
  var searchResultSearchSchema = import_zod.z.object({
361
351
  type: import_zod.z.literal("search"),
362
352
  title: import_zod.z.string(),
@@ -407,12 +397,11 @@ var navigationSchema = import_zod.z.object({
407
397
  var searchResponseBodySchema = import_zod.z.object({
408
398
  results: import_zod.z.array(searchResultSchema)
409
399
  });
410
- var reviewLayoutCallToActionSchema = import_zod.z.lazy(
400
+ var additionalInfoSchema = import_zod.z.lazy(
411
401
  () => import_zod.z.object({
412
- action: actionSchema.optional(),
413
- title: import_zod.z.string(),
414
- accessibilityDescription: import_zod.z.string().optional(),
415
- behavior: behaviorSchema.optional()
402
+ text: import_zod.z.string(),
403
+ behavior: behaviorSchema.optional(),
404
+ accessibilityDescription: import_zod.z.string().optional()
416
405
  })
417
406
  );
418
407
  var behaviorSchema = import_zod.z.lazy(
@@ -424,6 +413,14 @@ var behaviorSchema = import_zod.z.lazy(
424
413
  modalBehaviorSchema
425
414
  ])
426
415
  );
416
+ var reviewLayoutCallToActionSchema = import_zod.z.lazy(
417
+ () => import_zod.z.object({
418
+ action: actionSchema.optional(),
419
+ title: import_zod.z.string(),
420
+ accessibilityDescription: import_zod.z.string().optional(),
421
+ behavior: behaviorSchema.optional()
422
+ })
423
+ );
427
424
  var alertLayoutSchema = import_zod.z.lazy(
428
425
  () => import_zod.z.object({
429
426
  type: import_zod.z.literal("alert"),
@@ -458,6 +455,22 @@ var listLayoutCallToActionSchema = import_zod.z.lazy(
458
455
  behavior: behaviorSchema
459
456
  })
460
457
  );
458
+ var listLayoutItemSchema = import_zod.z.lazy(
459
+ () => import_zod.z.object({
460
+ status: listLayoutStatusSchema.optional(),
461
+ icon: iconSchema.optional(),
462
+ image: imageSchema.optional(),
463
+ title: import_zod.z.string().optional(),
464
+ subtitle: import_zod.z.string().optional(),
465
+ value: import_zod.z.string().optional(),
466
+ subvalue: import_zod.z.string().optional(),
467
+ tag: import_zod.z.string().optional(),
468
+ additionalInfo: additionalInfoSchema.optional(),
469
+ supportingValues: supportingValuesSchema.optional(),
470
+ inlineAlert: inlineAlertSchema.optional(),
471
+ description: import_zod.z.string().optional()
472
+ })
473
+ );
461
474
  var decisionLayoutSchema = import_zod.z.lazy(
462
475
  () => import_zod.z.object({
463
476
  type: import_zod.z.literal("decision"),
@@ -476,7 +489,10 @@ var decisionLayoutOptionSchema = import_zod.z.lazy(
476
489
  icon: iconSchema.optional(),
477
490
  image: imageSchema.optional(),
478
491
  behavior: behaviorSchema.optional(),
479
- tag: import_zod.z.string().optional()
492
+ tag: import_zod.z.string().optional(),
493
+ additionalText: import_zod.z.string().optional(),
494
+ supportingValues: supportingValuesSchema.optional(),
495
+ inlineAlert: inlineAlertSchema.optional()
480
496
  })
481
497
  );
482
498
  var statusListLayoutSchema = import_zod.z.lazy(
@@ -583,6 +599,20 @@ var reviewLayoutSchema = import_zod.z.lazy(
583
599
  margin: sizeSchema.optional()
584
600
  })
585
601
  );
602
+ var reviewLayoutFieldSchema = import_zod.z.lazy(
603
+ () => import_zod.z.object({
604
+ label: import_zod.z.string(),
605
+ value: import_zod.z.string(),
606
+ rawValue: import_zod.z.string().optional(),
607
+ help: helpSchema.optional(),
608
+ tag: import_zod.z.string().optional(),
609
+ icon: iconSchema.optional(),
610
+ image: imageSchema.optional(),
611
+ additionalInfo: additionalInfoSchema.optional(),
612
+ inlineAlert: inlineAlertSchema.optional(),
613
+ callToAction: reviewLayoutCallToActionSchema.optional()
614
+ })
615
+ );
586
616
  var modalLayoutContentSchema = import_zod.z.lazy(
587
617
  () => import_zod.z.object({
588
618
  title: import_zod.z.string().optional(),
package/build/main.mjs CHANGED
@@ -16,6 +16,10 @@ var httpMethodSchema = z.union([
16
16
  var iconNamedSchema = z.object({
17
17
  name: z.string()
18
18
  });
19
+ var supportingValuesSchema = z.object({
20
+ value: z.string().optional(),
21
+ subvalue: z.string().optional()
22
+ });
19
23
  var contextSchema = z.union([
20
24
  z.literal("positive"),
21
25
  z.literal("neutral"),
@@ -26,6 +30,10 @@ var contextSchema = z.union([
26
30
  z.literal("info"),
27
31
  z.literal("primary")
28
32
  ]);
33
+ var inlineAlertSchema = z.object({
34
+ content: z.string(),
35
+ context: contextSchema.optional()
36
+ });
29
37
  var iconTextSchema = z.object({
30
38
  text: z.string()
31
39
  });
@@ -304,17 +312,6 @@ var actionSchema = z.object({
304
312
  timeout: z.number().optional(),
305
313
  skipValidation: z.boolean().optional()
306
314
  });
307
- var listLayoutItemSchema = z.object({
308
- description: z.string().optional(),
309
- status: listLayoutStatusSchema.optional(),
310
- icon: iconSchema.optional(),
311
- image: imageSchema.optional(),
312
- title: z.string().optional(),
313
- subtitle: z.string().optional(),
314
- value: z.string().optional(),
315
- subvalue: z.string().optional(),
316
- tag: z.string().optional()
317
- });
318
315
  var instructionsLayoutSchema = z.object({
319
316
  type: z.literal("instructions"),
320
317
  title: z.string().optional(),
@@ -322,13 +319,6 @@ var instructionsLayoutSchema = z.object({
322
319
  control: z.string().optional(),
323
320
  margin: sizeSchema.optional()
324
321
  });
325
- var reviewLayoutFieldSchema = z.object({
326
- label: z.string(),
327
- value: z.string(),
328
- rawValue: z.string().optional(),
329
- help: helpSchema.optional(),
330
- tag: z.string().optional()
331
- });
332
322
  var searchResultSearchSchema = z.object({
333
323
  type: z.literal("search"),
334
324
  title: z.string(),
@@ -379,12 +369,11 @@ var navigationSchema = z.object({
379
369
  var searchResponseBodySchema = z.object({
380
370
  results: z.array(searchResultSchema)
381
371
  });
382
- var reviewLayoutCallToActionSchema = z.lazy(
372
+ var additionalInfoSchema = z.lazy(
383
373
  () => z.object({
384
- action: actionSchema.optional(),
385
- title: z.string(),
386
- accessibilityDescription: z.string().optional(),
387
- behavior: behaviorSchema.optional()
374
+ text: z.string(),
375
+ behavior: behaviorSchema.optional(),
376
+ accessibilityDescription: z.string().optional()
388
377
  })
389
378
  );
390
379
  var behaviorSchema = z.lazy(
@@ -396,6 +385,14 @@ var behaviorSchema = z.lazy(
396
385
  modalBehaviorSchema
397
386
  ])
398
387
  );
388
+ var reviewLayoutCallToActionSchema = z.lazy(
389
+ () => z.object({
390
+ action: actionSchema.optional(),
391
+ title: z.string(),
392
+ accessibilityDescription: z.string().optional(),
393
+ behavior: behaviorSchema.optional()
394
+ })
395
+ );
399
396
  var alertLayoutSchema = z.lazy(
400
397
  () => z.object({
401
398
  type: z.literal("alert"),
@@ -430,6 +427,22 @@ var listLayoutCallToActionSchema = z.lazy(
430
427
  behavior: behaviorSchema
431
428
  })
432
429
  );
430
+ var listLayoutItemSchema = z.lazy(
431
+ () => z.object({
432
+ status: listLayoutStatusSchema.optional(),
433
+ icon: iconSchema.optional(),
434
+ image: imageSchema.optional(),
435
+ title: z.string().optional(),
436
+ subtitle: z.string().optional(),
437
+ value: z.string().optional(),
438
+ subvalue: z.string().optional(),
439
+ tag: z.string().optional(),
440
+ additionalInfo: additionalInfoSchema.optional(),
441
+ supportingValues: supportingValuesSchema.optional(),
442
+ inlineAlert: inlineAlertSchema.optional(),
443
+ description: z.string().optional()
444
+ })
445
+ );
433
446
  var decisionLayoutSchema = z.lazy(
434
447
  () => z.object({
435
448
  type: z.literal("decision"),
@@ -448,7 +461,10 @@ var decisionLayoutOptionSchema = z.lazy(
448
461
  icon: iconSchema.optional(),
449
462
  image: imageSchema.optional(),
450
463
  behavior: behaviorSchema.optional(),
451
- tag: z.string().optional()
464
+ tag: z.string().optional(),
465
+ additionalText: z.string().optional(),
466
+ supportingValues: supportingValuesSchema.optional(),
467
+ inlineAlert: inlineAlertSchema.optional()
452
468
  })
453
469
  );
454
470
  var statusListLayoutSchema = z.lazy(
@@ -555,6 +571,20 @@ var reviewLayoutSchema = z.lazy(
555
571
  margin: sizeSchema.optional()
556
572
  })
557
573
  );
574
+ var reviewLayoutFieldSchema = z.lazy(
575
+ () => z.object({
576
+ label: z.string(),
577
+ value: z.string(),
578
+ rawValue: z.string().optional(),
579
+ help: helpSchema.optional(),
580
+ tag: z.string().optional(),
581
+ icon: iconSchema.optional(),
582
+ image: imageSchema.optional(),
583
+ additionalInfo: additionalInfoSchema.optional(),
584
+ inlineAlert: inlineAlertSchema.optional(),
585
+ callToAction: reviewLayoutCallToActionSchema.optional()
586
+ })
587
+ );
558
588
  var modalLayoutContentSchema = z.lazy(
559
589
  () => z.object({
560
590
  title: z.string().optional(),
@@ -1,25 +1,26 @@
1
- import type { FormLayout as GeneratedFormLayout } from './layout/FormLayout';
2
1
  import type { JsonElement } from './JsonElement';
2
+ import type { FormLayout as GeneratedFormLayout } from './layout/FormLayout';
3
3
  export type { Action } from './feature/Action';
4
4
  export type { Navigation } from './feature/Navigation';
5
5
  export type { PersistAsync } from './feature/PersistAsync';
6
6
  export type { Polling } from './feature/Polling';
7
7
  export type { PollingOnError } from './feature/PollingOnError';
8
8
  export type { ValidateAsync } from './feature/ValidateAsync';
9
- export type { Behavior } from './feature/Behavior';
10
9
  export type { ActionBehavior } from './feature/ActionBehavior';
10
+ export type { Behavior } from './feature/Behavior';
11
+ export type { DismissBehavior } from './feature/DismissBehavior';
11
12
  export type { LinkBehavior } from './feature/LinkBehavior';
12
13
  export type { ModalBehavior } from './feature/ModalBehavior';
13
- export type { DismissBehavior } from './feature/DismissBehavior';
14
14
  export type { LinkHandler } from './feature/LinkHandler';
15
+ export type { AdditionalInfo } from './misc/AdditionalInfo';
15
16
  export type { Align } from './misc/Align';
16
17
  export type { AutocapitalizationType } from './misc/AutocapitalizationType';
17
18
  export type { Context } from './misc/Context';
18
- export type { Size } from './misc/Size';
19
- export type { Size as Margin } from './misc/Size';
20
19
  export type { Icon } from './misc/Icon';
21
20
  export type { Image } from './misc/Image';
22
- export type { Layout } from './layout/Layout';
21
+ export type { InlineAlert } from './misc/InlineAlert';
22
+ export type { Size as Margin, Size } from './misc/Size';
23
+ export type { SupportingValues } from './misc/SupportingValues';
23
24
  export type { AlertLayout } from './layout/AlertLayout';
24
25
  export type { AlertLayoutCallToAction } from './layout/AlertLayoutCallToAction';
25
26
  export type { BoxLayout } from './layout/BoxLayout';
@@ -28,14 +29,13 @@ export type { ColumnsLayout } from './layout/ColumnsLayout';
28
29
  export type { DecisionLayout } from './layout/DecisionLayout';
29
30
  export type { DecisionLayoutOption } from './layout/DecisionLayoutOption';
30
31
  export type { DividerLayout } from './layout/DividerLayout';
31
- export type FormLayout = GeneratedFormLayout & {
32
- schema?: Reference;
33
- };
34
32
  export type { HeadingLayout } from './layout/HeadingLayout';
35
33
  export type { ImageLayout } from './layout/ImageLayout';
34
+ export type { InfoLayout } from './layout/InfoLayout';
36
35
  export type { InstructionsLayout } from './layout/InstructionsLayout';
37
36
  export type { InstructionsLayoutItem } from './layout/InstructionsLayoutItem';
38
- export type { InfoLayout } from './layout/InfoLayout';
37
+ export type { ItemCallToAction } from './layout/ItemCallToAction';
38
+ export type { Layout } from './layout/Layout';
39
39
  export type { ListLayout } from './layout/ListLayout';
40
40
  export type { ListLayoutCallToAction } from './layout/ListLayoutCallToAction';
41
41
  export type { ListLayoutItem } from './layout/ListLayoutItem';
@@ -53,19 +53,21 @@ export type { SearchLayout } from './layout/SearchLayout';
53
53
  export type { StatusListLayout } from './layout/StatusListLayout';
54
54
  export type { StatusListLayoutItem } from './layout/StatusListLayoutItem';
55
55
  export type { StatusListLayoutStatus } from './layout/StatusListLayoutStatus';
56
- export type { ItemCallToAction } from './layout/ItemCallToAction';
57
- export type { SearchResult } from './responses/search/SearchResult';
56
+ export type FormLayout = GeneratedFormLayout & {
57
+ schema?: Reference;
58
+ };
58
59
  export type { SearchResponseBody } from './responses/search/SearchResponseBody';
59
- export type { Schema } from './schema/Schema';
60
- export type { BooleanSchema } from './schema/BooleanSchema';
60
+ export type { SearchResult } from './responses/search/SearchResult';
61
+ export type { AllOfSchema } from './schema/AllOfSchema';
61
62
  export type { BlobSchema } from './schema/BlobSchema';
63
+ export type { BooleanSchema } from './schema/BooleanSchema';
62
64
  export type { ConstSchema } from './schema/ConstSchema';
65
+ export type { IntegerSchema } from './schema/IntegerSchema';
66
+ export type { NumberSchema } from './schema/NumberSchema';
63
67
  export type { ObjectSchema } from './schema/ObjectSchema';
64
- export type { AllOfSchema } from './schema/AllOfSchema';
65
68
  export type { OneOfSchema } from './schema/OneOfSchema';
69
+ export type { Schema } from './schema/Schema';
66
70
  export type { StringSchema } from './schema/StringSchema';
67
- export type { NumberSchema } from './schema/NumberSchema';
68
- export type { IntegerSchema } from './schema/IntegerSchema';
69
71
  export type { ArraySchema } from './schema/ArraySchema';
70
72
  export type { ArraySchemaList } from './schema/ArraySchemaList';
71
73
  export type { ArraySchemaTuple } from './schema/ArraySchemaTuple';
@@ -74,7 +76,7 @@ export type { ActionResponseBody } from './responses/action/ActionResponseBody';
74
76
  export type { ErrorResponseBody } from './responses/error/ErrorResponseBody';
75
77
  export type { ModalResponseBody } from './responses/modal/ModalResponseBody';
76
78
  export type { Step } from './step/Step';
77
- export type { JsonElement, JsonPrimitive, JsonArray, JsonObject } from './JsonElement';
79
+ export type { JsonArray, JsonElement, JsonObject, JsonPrimitive } from './JsonElement';
78
80
  export type Model = JsonElement;
79
81
  export type ValidationError = JsonElement;
80
82
  export type Reference = {
@@ -2,6 +2,8 @@ import type { Action } from '../feature/Action';
2
2
  import type { Icon } from '../misc/Icon';
3
3
  import type { Image } from '../misc/Image';
4
4
  import type { Behavior } from '../feature/Behavior';
5
+ import type { SupportingValues } from '../misc/SupportingValues';
6
+ import type { InlineAlert } from '../misc/InlineAlert';
5
7
  /**
6
8
  * An option is a single entry in the decision that the user can choose.
7
9
  */
@@ -40,4 +42,20 @@ export type DecisionLayoutOption = {
40
42
  * @experimental This feature may be changed in the future without notice.
41
43
  */
42
44
  tag?: string;
45
+ /**
46
+ * Additional information to be displayed to the user.
47
+ * @experimental This feature may be changed in the future without notice.
48
+ */
49
+ additionalText?: string;
50
+ /**
51
+ * An object containing two strings representing two user-facing values.
52
+ * One being clearly more important than the other.
53
+ * @experimental This feature may be changed in the future without notice.
54
+ */
55
+ supportingValues?: SupportingValues;
56
+ /**
57
+ * An alert that will be displayed inline with the item.
58
+ * @experimental This feature may be changed in the future without notice.
59
+ */
60
+ inlineAlert?: InlineAlert;
43
61
  };
@@ -1,15 +1,13 @@
1
1
  import type { ListLayoutStatus } from './ListLayoutStatus';
2
2
  import type { Icon } from '../misc/Icon';
3
3
  import type { Image } from '../misc/Image';
4
+ import type { AdditionalInfo } from '../misc/AdditionalInfo';
5
+ import type { SupportingValues } from '../misc/SupportingValues';
6
+ import type { InlineAlert } from '../misc/InlineAlert';
4
7
  /**
5
8
  * A single entry in a [ListLayout].
6
9
  */
7
10
  export type ListLayoutItem = {
8
- /**
9
- * A user-facing description.
10
- * @deprecated Please use 'StatusListLayout' instead
11
- */
12
- description?: string;
13
11
  /**
14
12
  * The status of the item, if it has one.
15
13
  * @deprecated Please use 'StatusListLayout' instead
@@ -29,14 +27,17 @@ export type ListLayoutItem = {
29
27
  title?: string;
30
28
  /**
31
29
  * A user-facing subtitle.
30
+ * @deprecated Please use 'description' instead
32
31
  */
33
32
  subtitle?: string;
34
33
  /**
35
34
  * A user-facing value.
35
+ * @deprecated Please use 'supportingValues' instead
36
36
  */
37
37
  value?: string;
38
38
  /**
39
39
  * A user-facing subvalue.
40
+ * @deprecated Please use 'supportingValues' instead
40
41
  */
41
42
  subvalue?: string;
42
43
  /**
@@ -44,4 +45,24 @@ export type ListLayoutItem = {
44
45
  * @experimental This feature may be changed in the future without notice.
45
46
  */
46
47
  tag?: string;
48
+ /**
49
+ * Additional information to be displayed to the user, with optional interactivity.
50
+ * @experimental This feature may be changed in the future without notice.
51
+ */
52
+ additionalInfo?: AdditionalInfo;
53
+ /**
54
+ * An object containing two strings representing two user-facing values.
55
+ * One being clearly more important than the other.
56
+ * @experimental This feature may be changed in the future without notice.
57
+ */
58
+ supportingValues?: SupportingValues;
59
+ /**
60
+ * An alert that will be displayed inline with the item.
61
+ * @experimental This feature may be changed in the future without notice.
62
+ */
63
+ inlineAlert?: InlineAlert;
64
+ /**
65
+ * A user-facing description.
66
+ */
67
+ description?: string;
47
68
  };
@@ -1,4 +1,9 @@
1
1
  import type { Help } from '../feature/Help';
2
+ import type { Icon } from '../misc/Icon';
3
+ import type { Image } from '../misc/Image';
4
+ import type { AdditionalInfo } from '../misc/AdditionalInfo';
5
+ import type { InlineAlert } from '../misc/InlineAlert';
6
+ import type { ReviewLayoutCallToAction } from './ReviewLayoutCallToAction';
2
7
  /**
3
8
  * A single field in a [ReviewLayout]
4
9
  */
@@ -27,4 +32,29 @@ export type ReviewLayoutField = {
27
32
  * @experimental This feature may be changed in the future without notice.
28
33
  */
29
34
  tag?: string;
35
+ /**
36
+ * An icon to represent the item.
37
+ * @experimental This feature may be changed in the future without notice.
38
+ */
39
+ icon?: Icon;
40
+ /**
41
+ * An image to represent the option.
42
+ * @experimental This feature may be changed in the future without notice.
43
+ */
44
+ image?: Image;
45
+ /**
46
+ * Additional information to be displayed to the user, with optional interactivity.
47
+ * @experimental This feature may be changed in the future without notice.
48
+ */
49
+ additionalInfo?: AdditionalInfo;
50
+ /**
51
+ * An alert that will be displayed inline with the item.
52
+ * @experimental This feature may be changed in the future without notice.
53
+ */
54
+ inlineAlert?: InlineAlert;
55
+ /**
56
+ * A titled [com.wise.dynamicflow.feature.Behavior], associated with a specific field, and which can be performed by the user
57
+ * @experimental This feature may be changed in the future without notice.
58
+ */
59
+ callToAction?: ReviewLayoutCallToAction;
30
60
  };
@@ -0,0 +1,18 @@
1
+ import type { Behavior } from '../feature/Behavior';
2
+ /**
3
+ * Additional information to be displayed to the user, with optional interactivity.
4
+ */
5
+ export type AdditionalInfo = {
6
+ /**
7
+ * Additional information to be displayed to the user.
8
+ */
9
+ text: string;
10
+ /**
11
+ * An optional behavior to be triggered when interacting with the text.
12
+ */
13
+ behavior?: Behavior;
14
+ /**
15
+ * A description of the behavior to be used by screen readers.
16
+ */
17
+ accessibilityDescription?: string;
18
+ };
@@ -0,0 +1,14 @@
1
+ import type { Context } from './Context';
2
+ /**
3
+ * An alert that will be displayed inline with the item that contains it.
4
+ */
5
+ export type InlineAlert = {
6
+ /**
7
+ * The content of the alert as string.
8
+ */
9
+ content: string;
10
+ /**
11
+ * The semantics of the alert. Defaults to `neutral`.
12
+ */
13
+ context?: Context;
14
+ };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * An object containing two strings representing two user-facing values.
3
+ * One being clearly more important than the other.
4
+ */
5
+ export type SupportingValues = {
6
+ /**
7
+ * The more important value of the two.
8
+ */
9
+ value?: string;
10
+ /**
11
+ * The less important value of the two.
12
+ */
13
+ subvalue?: string;
14
+ };
@@ -1,7 +1,7 @@
1
1
  import { Icon } from './Icon';
2
2
  import { Image } from './Image';
3
3
  import { BaseRendererProps } from './RendererProps';
4
- import { Margin } from './constants';
4
+ import { InlineAlert, Margin, SupportingValues } from './constants';
5
5
  export type DecisionRendererProps = BaseRendererProps & {
6
6
  type: 'decision';
7
7
  control?: string;
@@ -17,5 +17,11 @@ export type DecisionOption = {
17
17
  image?: Image;
18
18
  title: string;
19
19
  tag?: string;
20
+ /** @experimental This feature may be changed in the future without notice. */
21
+ additionalText?: string;
22
+ /** @experimental This feature may be changed in the future without notice. */
23
+ supportingValues?: SupportingValues;
24
+ /** @experimental This feature may be changed in the future without notice. */
25
+ inlineAlert?: InlineAlert;
20
26
  onClick: () => void;
21
27
  };
@@ -0,0 +1,9 @@
1
+ import { BaseRendererProps } from './RendererProps';
2
+ export type ExternalConfirmationRendererProps = BaseRendererProps & {
3
+ type: 'external-confirmation';
4
+ url: string;
5
+ status: 'initial' | 'success' | 'failure' | 'dismissed';
6
+ onSuccess: () => void;
7
+ onFailure: () => void;
8
+ onCancel: () => void;
9
+ };
@@ -2,8 +2,8 @@ import { ReactNode } from 'react';
2
2
  import { Icon } from './Icon';
3
3
  import { Image } from './Image';
4
4
  import { BaseRendererProps, RendererProps } from './RendererProps';
5
- export type SectionRendererProps = BaseRendererProps & {
6
- type: 'section';
5
+ export type FormSectionRendererProps = BaseRendererProps & {
6
+ type: 'form-section';
7
7
  control?: string;
8
8
  title?: string;
9
9
  description?: string;
@@ -1,7 +1,8 @@
1
+ import { SupportingValues } from '../next';
1
2
  import { Icon } from './Icon';
2
3
  import { Image } from './Image';
3
4
  import { BaseRendererProps } from './RendererProps';
4
- import { Margin } from './constants';
5
+ import { AdditionalInfo, InlineAlert, Margin } from './constants';
5
6
  export type ListRendererProps = BaseRendererProps & {
6
7
  type: 'list';
7
8
  callToAction?: ListCallToAction;
@@ -14,10 +15,20 @@ export type ListItem = {
14
15
  icon?: Icon;
15
16
  image?: Image;
16
17
  title?: string;
18
+ /** @deprecated Use `description` instead. */
17
19
  subtitle?: string;
20
+ description?: string;
21
+ /** @deprecated Use `supportedValues` instead. */
18
22
  value?: string;
23
+ /** @deprecated Use `supportedValues` instead. */
19
24
  subvalue?: string;
20
25
  tag?: string;
26
+ /** @experimental This feature may be changed in the future without notice. */
27
+ supportingValues?: SupportingValues;
28
+ /** @experimental This feature may be changed in the future without notice. */
29
+ additionalInfo?: AdditionalInfo;
30
+ /** @experimental This feature may be changed in the future without notice. */
31
+ inlineAlert?: InlineAlert;
21
32
  };
22
33
  export type ListCallToAction = {
23
34
  accessibilityDescription?: string;
@@ -7,6 +7,7 @@ import { CoreContainerRendererProps } from './CoreContainerRendererProps';
7
7
  import { DateInputRendererProps } from './DateInputRendererProps';
8
8
  import { DecisionRendererProps } from './DecisionRendererProps';
9
9
  import { DividerRendererProps } from './DividerRendererProps';
10
+ import { ExternalConfirmationRendererProps } from './ExternalConfirmationRendererProps';
10
11
  import { FormRendererProps } from './FormRendererProps';
11
12
  import { HeadingRendererProps } from './HeadingRendererProps';
12
13
  import { HiddenRendererProps } from './HiddenRendererProps';
@@ -26,13 +27,13 @@ import { RepeatableRendererProps } from './RepeatableRendererProps';
26
27
  import { ReviewRendererProps } from './ReviewRendererProps';
27
28
  import { RootRendererProps } from './RootRendererProps';
28
29
  import { SearchRendererProps } from './SearchRendererProps';
29
- import { SectionRendererProps } from './SectionRendererProps';
30
+ import { FormSectionRendererProps } from './FormSectionRendererProps';
30
31
  import { SelectInputRendererProps } from './SelectInputRendererProps';
31
32
  import { StatusListRendererProps } from './StatusListRendererProps';
32
33
  import { AnalyticsEventDispatcher, LoadingState, StepRendererProps } from './StepRendererProps';
33
34
  import { TextInputRendererProps } from './TextInputRendererProps';
34
35
  import { UploadInputRendererProps } from './UploadInputRendererProps';
35
- export type RendererProps = AlertRendererProps | CheckboxInputRendererProps | BoxRendererProps | ButtonRendererProps | ColumnsRendererProps | CoreContainerRendererProps | DateInputRendererProps | DecisionRendererProps | DividerRendererProps | FormRendererProps | HeadingRendererProps | HiddenRendererProps | ImageRendererProps | InstructionsRendererProps | IntegerInputRendererProps | ListRendererProps | LoadingIndicatorRendererProps | MarkdownRendererProps | ModalRendererProps | ModalContentRendererProps | MultiSelectInputRendererProps | MultiUploadInputRendererProps | NumberInputRendererProps | ParagraphRendererProps | RepeatableRendererProps | ReviewRendererProps | RootRendererProps | SearchRendererProps | SectionRendererProps | SelectInputRendererProps | StatusListRendererProps | StepRendererProps | TextInputRendererProps | UploadInputRendererProps;
36
+ export type RendererProps = AlertRendererProps | CheckboxInputRendererProps | BoxRendererProps | ButtonRendererProps | ColumnsRendererProps | CoreContainerRendererProps | DateInputRendererProps | DecisionRendererProps | DividerRendererProps | ExternalConfirmationRendererProps | FormRendererProps | HeadingRendererProps | HiddenRendererProps | ImageRendererProps | InstructionsRendererProps | IntegerInputRendererProps | ListRendererProps | LoadingIndicatorRendererProps | MarkdownRendererProps | ModalRendererProps | ModalContentRendererProps | MultiSelectInputRendererProps | MultiUploadInputRendererProps | NumberInputRendererProps | ParagraphRendererProps | RepeatableRendererProps | ReviewRendererProps | RootRendererProps | SearchRendererProps | FormSectionRendererProps | SelectInputRendererProps | StatusListRendererProps | StepRendererProps | TextInputRendererProps | UploadInputRendererProps;
36
37
  export type Renderer<P extends RendererProps> = {
37
38
  canRenderType: P['type'];
38
39
  canRender?: (props: P) => boolean;
@@ -42,7 +43,7 @@ export type RendererContext = {
42
43
  render: RenderFunction;
43
44
  };
44
45
  export type RenderFunction = (props: RendererProps | null) => JSX.Element | null;
45
- export type Renderers = readonly (Renderer<StepRendererProps> | Renderer<CoreContainerRendererProps> | Renderer<AlertRendererProps> | Renderer<BoxRendererProps> | Renderer<ColumnsRendererProps> | Renderer<DecisionRendererProps> | Renderer<DividerRendererProps> | Renderer<FormRendererProps> | Renderer<HeadingRendererProps> | Renderer<InstructionsRendererProps> | Renderer<ListRendererProps> | Renderer<LoadingIndicatorRendererProps> | Renderer<MarkdownRendererProps> | Renderer<ImageRendererProps> | Renderer<ModalRendererProps> | Renderer<ModalContentRendererProps> | Renderer<ParagraphRendererProps> | Renderer<ReviewRendererProps> | Renderer<SearchRendererProps> | Renderer<StatusListRendererProps> | Renderer<CheckboxInputRendererProps> | Renderer<ButtonRendererProps> | Renderer<DateInputRendererProps> | Renderer<HiddenRendererProps> | Renderer<IntegerInputRendererProps> | Renderer<NumberInputRendererProps> | Renderer<RepeatableRendererProps> | Renderer<RootRendererProps> | Renderer<SectionRendererProps> | Renderer<SelectInputRendererProps> | Renderer<MultiSelectInputRendererProps> | Renderer<TextInputRendererProps> | Renderer<UploadInputRendererProps> | Renderer<MultiUploadInputRendererProps>)[];
46
+ export type Renderers = readonly (Renderer<StepRendererProps> | Renderer<CoreContainerRendererProps> | Renderer<AlertRendererProps> | Renderer<BoxRendererProps> | Renderer<ColumnsRendererProps> | Renderer<DecisionRendererProps> | Renderer<DividerRendererProps> | Renderer<ExternalConfirmationRendererProps> | Renderer<FormRendererProps> | Renderer<HeadingRendererProps> | Renderer<InstructionsRendererProps> | Renderer<ListRendererProps> | Renderer<LoadingIndicatorRendererProps> | Renderer<MarkdownRendererProps> | Renderer<ImageRendererProps> | Renderer<ModalRendererProps> | Renderer<ModalContentRendererProps> | Renderer<ParagraphRendererProps> | Renderer<ReviewRendererProps> | Renderer<SearchRendererProps> | Renderer<StatusListRendererProps> | Renderer<CheckboxInputRendererProps> | Renderer<ButtonRendererProps> | Renderer<DateInputRendererProps> | Renderer<HiddenRendererProps> | Renderer<IntegerInputRendererProps> | Renderer<NumberInputRendererProps> | Renderer<RepeatableRendererProps> | Renderer<RootRendererProps> | Renderer<FormSectionRendererProps> | Renderer<SelectInputRendererProps> | Renderer<MultiSelectInputRendererProps> | Renderer<TextInputRendererProps> | Renderer<UploadInputRendererProps> | Renderer<MultiUploadInputRendererProps>)[];
46
47
  export type BaseRendererProps = {
47
48
  uid: string;
48
49
  render: RenderFunction;