@wise/dynamic-flow-client 4.0.0-experimental-af37aae → 4.0.0-experimental-9cbdd3f
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 +608 -595
- package/build/main.mjs +608 -595
- package/build/types/index.d.ts +1 -1
- package/build/types/revamp/domain/components/AllOfComponent.d.ts +2 -10
- package/build/types/revamp/domain/components/ImageComponent.d.ts +1 -3
- package/build/types/revamp/domain/components/RepeatableComponent.d.ts +14 -3
- package/build/types/revamp/domain/components/SelectInputComponent.d.ts +2 -2
- package/build/types/revamp/domain/features/summary/summary-utils.d.ts +3 -23
- package/build/types/revamp/domain/mappers/layout/buttonLayoutToComponent.d.ts +1 -4
- package/build/types/revamp/domain/mappers/layout/decisionLayoutToComponent.d.ts +1 -4
- package/build/types/revamp/domain/mappers/layout/imageLayoutToComponent.d.ts +1 -10
- package/build/types/revamp/domain/mappers/mapStepToComponent.d.ts +2 -2
- package/build/types/revamp/domain/mappers/schema/utils/mapCommonSchemaProps.d.ts +2 -12
- package/build/types/revamp/domain/mappers/utils/image.d.ts +3 -0
- package/build/types/revamp/domain/types.d.ts +1 -15
- package/build/types/revamp/renderers/mappers/allOfComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/utils/inputComponentToProps.d.ts +1 -5
- package/build/types/revamp/renderers/utils.d.ts +1 -5
- package/package.json +4 -4
package/build/main.js
CHANGED
|
@@ -443,8 +443,7 @@ __export(index_exports, {
|
|
|
443
443
|
JsonSchemaForm: () => JsonSchemaForm_default,
|
|
444
444
|
Layout: () => DynamicLayout_default,
|
|
445
445
|
convertStepToLayout: () => convertStepToLayout,
|
|
446
|
-
|
|
447
|
-
findType: () => findType,
|
|
446
|
+
findRendererPropsByType: () => findRendererPropsByType,
|
|
448
447
|
inlineReferences: () => inlineReferences,
|
|
449
448
|
isValidSchema: () => isValidSchema,
|
|
450
449
|
makeHttpClient: () => makeHttpClient,
|
|
@@ -5410,10 +5409,50 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
5410
5409
|
quotelessJson,
|
|
5411
5410
|
ZodError
|
|
5412
5411
|
});
|
|
5413
|
-
var
|
|
5414
|
-
|
|
5415
|
-
url: z.string()
|
|
5416
|
-
|
|
5412
|
+
var linkBehaviorSchema = z.object({
|
|
5413
|
+
type: z.literal("link"),
|
|
5414
|
+
url: z.string()
|
|
5415
|
+
});
|
|
5416
|
+
var navigationStackBehaviorSchema = z.union([
|
|
5417
|
+
z.literal("default"),
|
|
5418
|
+
z.literal("remove-previous"),
|
|
5419
|
+
z.literal("remove-all"),
|
|
5420
|
+
z.literal("replace-current")
|
|
5421
|
+
]);
|
|
5422
|
+
var jsonElementSchema = z.lazy(
|
|
5423
|
+
() => z.union([
|
|
5424
|
+
z.string(),
|
|
5425
|
+
z.number(),
|
|
5426
|
+
z.boolean(),
|
|
5427
|
+
z.record(jsonElementSchema),
|
|
5428
|
+
z.array(jsonElementSchema)
|
|
5429
|
+
]).nullable()
|
|
5430
|
+
);
|
|
5431
|
+
var helpSchema = z.object({
|
|
5432
|
+
markdown: z.string()
|
|
5433
|
+
});
|
|
5434
|
+
var actionTypeSchema = z.union([
|
|
5435
|
+
z.literal("primary"),
|
|
5436
|
+
z.literal("secondary"),
|
|
5437
|
+
z.literal("link"),
|
|
5438
|
+
z.literal("positive"),
|
|
5439
|
+
z.literal("negative")
|
|
5440
|
+
]);
|
|
5441
|
+
var linkSchema = z.object({
|
|
5442
|
+
url: z.string()
|
|
5443
|
+
});
|
|
5444
|
+
var httpMethodSchema = z.union([
|
|
5445
|
+
z.literal("GET"),
|
|
5446
|
+
z.literal("POST"),
|
|
5447
|
+
z.literal("PUT"),
|
|
5448
|
+
z.literal("PATCH"),
|
|
5449
|
+
z.literal("DELETE")
|
|
5450
|
+
]);
|
|
5451
|
+
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
5452
|
+
var validateAsyncSchema = z.object({
|
|
5453
|
+
param: z.string(),
|
|
5454
|
+
method: httpMethodSchema,
|
|
5455
|
+
url: z.string()
|
|
5417
5456
|
});
|
|
5418
5457
|
var summaryProviderSchema = z.object({
|
|
5419
5458
|
providesTitle: z.boolean().optional(),
|
|
@@ -5421,6 +5460,139 @@ var summaryProviderSchema = z.object({
|
|
|
5421
5460
|
providesIcon: z.boolean().optional(),
|
|
5422
5461
|
providesImage: z.boolean().optional()
|
|
5423
5462
|
});
|
|
5463
|
+
var imageSchema = z.object({
|
|
5464
|
+
text: z.string().optional(),
|
|
5465
|
+
url: z.string().optional(),
|
|
5466
|
+
uri: z.string().optional(),
|
|
5467
|
+
accessibilityDescription: z.string().optional()
|
|
5468
|
+
});
|
|
5469
|
+
var externalSchema = z.object({
|
|
5470
|
+
url: z.string()
|
|
5471
|
+
});
|
|
5472
|
+
var columnsLayoutBiasSchema = z.union([
|
|
5473
|
+
z.literal("none"),
|
|
5474
|
+
z.literal("left"),
|
|
5475
|
+
z.literal("right")
|
|
5476
|
+
]);
|
|
5477
|
+
var sizeSchema = z.union([
|
|
5478
|
+
z.literal("xs"),
|
|
5479
|
+
z.literal("sm"),
|
|
5480
|
+
z.literal("md"),
|
|
5481
|
+
z.literal("lg"),
|
|
5482
|
+
z.literal("xl")
|
|
5483
|
+
]);
|
|
5484
|
+
var dividerLayoutSchema = z.object({
|
|
5485
|
+
type: z.literal("divider"),
|
|
5486
|
+
control: z.string().optional(),
|
|
5487
|
+
margin: sizeSchema.optional()
|
|
5488
|
+
});
|
|
5489
|
+
var statusListLayoutStatusSchema = z.union([
|
|
5490
|
+
z.literal("not-done"),
|
|
5491
|
+
z.literal("pending"),
|
|
5492
|
+
z.literal("done")
|
|
5493
|
+
]);
|
|
5494
|
+
var loadingIndicatorLayoutSchema = z.object({
|
|
5495
|
+
type: z.literal("loading-indicator"),
|
|
5496
|
+
size: sizeSchema.optional(),
|
|
5497
|
+
control: z.string().optional(),
|
|
5498
|
+
margin: sizeSchema.optional()
|
|
5499
|
+
});
|
|
5500
|
+
var contextSchema = z.union([
|
|
5501
|
+
z.literal("positive"),
|
|
5502
|
+
z.literal("neutral"),
|
|
5503
|
+
z.literal("warning"),
|
|
5504
|
+
z.literal("negative"),
|
|
5505
|
+
z.literal("success"),
|
|
5506
|
+
z.literal("failure"),
|
|
5507
|
+
z.literal("info"),
|
|
5508
|
+
z.literal("primary")
|
|
5509
|
+
]);
|
|
5510
|
+
var instructionsLayoutItemSchema = z.object({
|
|
5511
|
+
text: z.string(),
|
|
5512
|
+
context: contextSchema,
|
|
5513
|
+
tag: z.string().optional()
|
|
5514
|
+
});
|
|
5515
|
+
var formLayoutSchemaReferenceSchema = z.object({
|
|
5516
|
+
$ref: z.string()
|
|
5517
|
+
});
|
|
5518
|
+
var modalLayoutTriggerSchema = z.object({
|
|
5519
|
+
title: z.string()
|
|
5520
|
+
});
|
|
5521
|
+
var instructionsLayoutSchema = z.object({
|
|
5522
|
+
type: z.literal("instructions"),
|
|
5523
|
+
title: z.string().optional(),
|
|
5524
|
+
items: z.array(instructionsLayoutItemSchema),
|
|
5525
|
+
control: z.string().optional(),
|
|
5526
|
+
margin: sizeSchema.optional()
|
|
5527
|
+
});
|
|
5528
|
+
var reviewLayoutFieldSchema = z.object({
|
|
5529
|
+
label: z.string(),
|
|
5530
|
+
value: z.string(),
|
|
5531
|
+
rawValue: z.string().optional(),
|
|
5532
|
+
help: helpSchema.optional(),
|
|
5533
|
+
tag: z.string().optional()
|
|
5534
|
+
});
|
|
5535
|
+
var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
|
|
5536
|
+
var searchLayoutSchema = z.object({
|
|
5537
|
+
type: z.literal("search"),
|
|
5538
|
+
title: z.string(),
|
|
5539
|
+
method: httpMethodSchema,
|
|
5540
|
+
url: z.string(),
|
|
5541
|
+
param: z.string(),
|
|
5542
|
+
emptyMessage: z.string().optional(),
|
|
5543
|
+
control: z.string().optional(),
|
|
5544
|
+
margin: sizeSchema.optional()
|
|
5545
|
+
});
|
|
5546
|
+
var headingLayoutSchema = z.object({
|
|
5547
|
+
type: z.literal("heading"),
|
|
5548
|
+
text: z.string(),
|
|
5549
|
+
size: sizeSchema.optional(),
|
|
5550
|
+
align: alignSchema.optional(),
|
|
5551
|
+
control: z.string().optional(),
|
|
5552
|
+
margin: sizeSchema.optional()
|
|
5553
|
+
});
|
|
5554
|
+
var imageLayoutSchema = z.object({
|
|
5555
|
+
type: z.literal("image"),
|
|
5556
|
+
text: z.string().optional(),
|
|
5557
|
+
url: z.string().optional(),
|
|
5558
|
+
accessibilityDescription: z.string().optional(),
|
|
5559
|
+
content: imageSchema.optional(),
|
|
5560
|
+
size: sizeSchema.optional(),
|
|
5561
|
+
control: z.string().optional(),
|
|
5562
|
+
margin: sizeSchema.optional()
|
|
5563
|
+
});
|
|
5564
|
+
var markdownLayoutSchema = z.object({
|
|
5565
|
+
type: z.literal("markdown"),
|
|
5566
|
+
content: z.string(),
|
|
5567
|
+
align: alignSchema.optional(),
|
|
5568
|
+
control: z.string().optional(),
|
|
5569
|
+
margin: sizeSchema.optional()
|
|
5570
|
+
});
|
|
5571
|
+
var paragraphLayoutSchema = z.object({
|
|
5572
|
+
type: z.literal("paragraph"),
|
|
5573
|
+
text: z.string(),
|
|
5574
|
+
align: alignSchema.optional(),
|
|
5575
|
+
control: z.string().optional(),
|
|
5576
|
+
margin: sizeSchema.optional()
|
|
5577
|
+
});
|
|
5578
|
+
var listLayoutStatusSchema = z.union([
|
|
5579
|
+
z.literal("warning"),
|
|
5580
|
+
z.literal("neutral"),
|
|
5581
|
+
z.literal("positive")
|
|
5582
|
+
]);
|
|
5583
|
+
var errorResponseBodySchema = z.object({
|
|
5584
|
+
refreshFormUrl: z.string().optional(),
|
|
5585
|
+
analytics: z.record(z.string()).optional(),
|
|
5586
|
+
error: z.string().optional(),
|
|
5587
|
+
validation: jsonElementSchema.optional(),
|
|
5588
|
+
refreshUrl: z.string().optional()
|
|
5589
|
+
});
|
|
5590
|
+
var searchSearchRequestSchema = z.object({
|
|
5591
|
+
url: z.string(),
|
|
5592
|
+
method: httpMethodSchema,
|
|
5593
|
+
param: z.string(),
|
|
5594
|
+
query: z.string()
|
|
5595
|
+
});
|
|
5424
5596
|
var autocompleteTokenSchema = z.union([
|
|
5425
5597
|
z.literal("on"),
|
|
5426
5598
|
z.literal("name"),
|
|
@@ -5486,214 +5658,29 @@ var autocompleteTokenSchema = z.union([
|
|
|
5486
5658
|
z.literal("fax"),
|
|
5487
5659
|
z.literal("pager")
|
|
5488
5660
|
]);
|
|
5489
|
-
var helpSchema = z.object({
|
|
5490
|
-
markdown: z.string()
|
|
5491
|
-
});
|
|
5492
|
-
var jsonElementSchema = z.lazy(
|
|
5493
|
-
() => z.union([
|
|
5494
|
-
z.string(),
|
|
5495
|
-
z.number(),
|
|
5496
|
-
z.boolean(),
|
|
5497
|
-
z.record(jsonElementSchema),
|
|
5498
|
-
z.array(jsonElementSchema)
|
|
5499
|
-
]).nullable()
|
|
5500
|
-
);
|
|
5501
|
-
var stringSchemaFormatSchema = z.union([
|
|
5502
|
-
z.literal("date"),
|
|
5503
|
-
z.literal("email"),
|
|
5504
|
-
z.literal("numeric"),
|
|
5505
|
-
z.literal("password"),
|
|
5506
|
-
z.literal("phone-number"),
|
|
5507
|
-
z.literal("base64url")
|
|
5508
|
-
]);
|
|
5509
5661
|
var autocapitalizationTypeSchema = z.union([
|
|
5510
5662
|
z.literal("none"),
|
|
5511
5663
|
z.literal("characters"),
|
|
5512
5664
|
z.literal("sentences"),
|
|
5513
5665
|
z.literal("words")
|
|
5514
5666
|
]);
|
|
5515
|
-
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
5516
|
-
var externalSchema = z.object({
|
|
5517
|
-
url: z.string()
|
|
5518
|
-
});
|
|
5519
|
-
var stepErrorSchema = z.object({
|
|
5520
|
-
error: z.string().optional(),
|
|
5521
|
-
validation: jsonElementSchema.optional()
|
|
5522
|
-
});
|
|
5523
5667
|
var iconNamedSchema = z.object({
|
|
5524
5668
|
name: z.string()
|
|
5525
5669
|
});
|
|
5526
5670
|
var iconTextSchema = z.object({
|
|
5527
5671
|
text: z.string()
|
|
5528
5672
|
});
|
|
5529
|
-
var
|
|
5530
|
-
|
|
5531
|
-
z.literal("
|
|
5532
|
-
z.literal("
|
|
5533
|
-
z.literal("
|
|
5534
|
-
z.literal("
|
|
5535
|
-
z.literal("
|
|
5536
|
-
]);
|
|
5537
|
-
var sizeSchema = z.union([
|
|
5538
|
-
z.literal("xs"),
|
|
5539
|
-
z.literal("sm"),
|
|
5540
|
-
z.literal("md"),
|
|
5541
|
-
z.literal("lg"),
|
|
5542
|
-
z.literal("xl")
|
|
5543
|
-
]);
|
|
5544
|
-
var contextSchema = z.union([
|
|
5545
|
-
z.literal("positive"),
|
|
5546
|
-
z.literal("neutral"),
|
|
5547
|
-
z.literal("warning"),
|
|
5548
|
-
z.literal("negative"),
|
|
5549
|
-
z.literal("success"),
|
|
5550
|
-
z.literal("failure"),
|
|
5551
|
-
z.literal("info"),
|
|
5552
|
-
z.literal("primary")
|
|
5673
|
+
var stringSchemaFormatSchema = z.union([
|
|
5674
|
+
z.literal("date"),
|
|
5675
|
+
z.literal("email"),
|
|
5676
|
+
z.literal("numeric"),
|
|
5677
|
+
z.literal("password"),
|
|
5678
|
+
z.literal("phone-number"),
|
|
5679
|
+
z.literal("base64url")
|
|
5553
5680
|
]);
|
|
5554
|
-
var
|
|
5555
|
-
type: z.literal("image"),
|
|
5556
|
-
text: z.string().optional(),
|
|
5557
|
-
url: z.string(),
|
|
5558
|
-
size: sizeSchema.optional(),
|
|
5559
|
-
accessibilityDescription: z.string().optional(),
|
|
5560
|
-
control: z.string().optional(),
|
|
5561
|
-
margin: sizeSchema.optional()
|
|
5562
|
-
});
|
|
5563
|
-
var searchSearchRequestSchema = z.object({
|
|
5564
|
-
url: z.string(),
|
|
5565
|
-
method: httpMethodSchema,
|
|
5566
|
-
param: z.string(),
|
|
5567
|
-
query: z.string()
|
|
5568
|
-
});
|
|
5569
|
-
var errorResponseBodySchema = z.object({
|
|
5570
|
-
refreshFormUrl: z.string().optional(),
|
|
5571
|
-
analytics: z.record(z.string()).optional(),
|
|
5681
|
+
var stepErrorSchema = z.object({
|
|
5572
5682
|
error: z.string().optional(),
|
|
5573
|
-
validation: jsonElementSchema.optional()
|
|
5574
|
-
refreshUrl: z.string().optional()
|
|
5575
|
-
});
|
|
5576
|
-
var paragraphLayoutSchema = z.object({
|
|
5577
|
-
type: z.literal("paragraph"),
|
|
5578
|
-
text: z.string(),
|
|
5579
|
-
align: alignSchema.optional(),
|
|
5580
|
-
control: z.string().optional(),
|
|
5581
|
-
margin: sizeSchema.optional()
|
|
5582
|
-
});
|
|
5583
|
-
var instructionsLayoutItemSchema = z.object({
|
|
5584
|
-
text: z.string(),
|
|
5585
|
-
context: contextSchema,
|
|
5586
|
-
tag: z.string().optional()
|
|
5587
|
-
});
|
|
5588
|
-
var columnsLayoutBiasSchema = z.union([
|
|
5589
|
-
z.literal("none"),
|
|
5590
|
-
z.literal("left"),
|
|
5591
|
-
z.literal("right")
|
|
5592
|
-
]);
|
|
5593
|
-
var formLayoutSchemaReferenceSchema = z.object({
|
|
5594
|
-
$ref: z.string()
|
|
5595
|
-
});
|
|
5596
|
-
var headingLayoutSchema = z.object({
|
|
5597
|
-
type: z.literal("heading"),
|
|
5598
|
-
text: z.string(),
|
|
5599
|
-
size: sizeSchema.optional(),
|
|
5600
|
-
align: alignSchema.optional(),
|
|
5601
|
-
control: z.string().optional(),
|
|
5602
|
-
margin: sizeSchema.optional()
|
|
5603
|
-
});
|
|
5604
|
-
var dividerLayoutSchema = z.object({
|
|
5605
|
-
type: z.literal("divider"),
|
|
5606
|
-
control: z.string().optional(),
|
|
5607
|
-
margin: sizeSchema.optional()
|
|
5608
|
-
});
|
|
5609
|
-
var infoLayoutSchema = z.object({
|
|
5610
|
-
type: z.literal("info"),
|
|
5611
|
-
markdown: z.string(),
|
|
5612
|
-
align: alignSchema.optional(),
|
|
5613
|
-
control: z.string().optional(),
|
|
5614
|
-
margin: sizeSchema.optional()
|
|
5615
|
-
});
|
|
5616
|
-
var instructionsLayoutSchema = z.object({
|
|
5617
|
-
type: z.literal("instructions"),
|
|
5618
|
-
title: z.string().optional(),
|
|
5619
|
-
items: z.array(instructionsLayoutItemSchema),
|
|
5620
|
-
control: z.string().optional(),
|
|
5621
|
-
margin: sizeSchema.optional()
|
|
5622
|
-
});
|
|
5623
|
-
var loadingIndicatorLayoutSchema = z.object({
|
|
5624
|
-
type: z.literal("loading-indicator"),
|
|
5625
|
-
size: sizeSchema.optional(),
|
|
5626
|
-
control: z.string().optional(),
|
|
5627
|
-
margin: sizeSchema.optional()
|
|
5628
|
-
});
|
|
5629
|
-
var markdownLayoutSchema = z.object({
|
|
5630
|
-
type: z.literal("markdown"),
|
|
5631
|
-
content: z.string(),
|
|
5632
|
-
align: alignSchema.optional(),
|
|
5633
|
-
control: z.string().optional(),
|
|
5634
|
-
margin: sizeSchema.optional()
|
|
5635
|
-
});
|
|
5636
|
-
var searchLayoutSchema = z.object({
|
|
5637
|
-
type: z.literal("search"),
|
|
5638
|
-
title: z.string(),
|
|
5639
|
-
method: httpMethodSchema,
|
|
5640
|
-
url: z.string(),
|
|
5641
|
-
param: z.string(),
|
|
5642
|
-
emptyMessage: z.string().optional(),
|
|
5643
|
-
control: z.string().optional(),
|
|
5644
|
-
margin: sizeSchema.optional()
|
|
5645
|
-
});
|
|
5646
|
-
var modalLayoutTriggerSchema = z.object({
|
|
5647
|
-
title: z.string()
|
|
5648
|
-
});
|
|
5649
|
-
var listLayoutStatusSchema = z.union([
|
|
5650
|
-
z.literal("warning"),
|
|
5651
|
-
z.literal("neutral"),
|
|
5652
|
-
z.literal("positive")
|
|
5653
|
-
]);
|
|
5654
|
-
var reviewLayoutFieldSchema = z.object({
|
|
5655
|
-
label: z.string(),
|
|
5656
|
-
value: z.string(),
|
|
5657
|
-
rawValue: z.string().optional(),
|
|
5658
|
-
help: helpSchema.optional(),
|
|
5659
|
-
tag: z.string().optional()
|
|
5660
|
-
});
|
|
5661
|
-
var statusListLayoutStatusSchema = z.union([
|
|
5662
|
-
z.literal("not-done"),
|
|
5663
|
-
z.literal("pending"),
|
|
5664
|
-
z.literal("done")
|
|
5665
|
-
]);
|
|
5666
|
-
var linkSchema = z.object({
|
|
5667
|
-
url: z.string()
|
|
5668
|
-
});
|
|
5669
|
-
var actionTypeSchema = z.union([
|
|
5670
|
-
z.literal("primary"),
|
|
5671
|
-
z.literal("secondary"),
|
|
5672
|
-
z.literal("link"),
|
|
5673
|
-
z.literal("positive"),
|
|
5674
|
-
z.literal("negative")
|
|
5675
|
-
]);
|
|
5676
|
-
var navigationStackBehaviorSchema = z.union([
|
|
5677
|
-
z.literal("default"),
|
|
5678
|
-
z.literal("remove-previous"),
|
|
5679
|
-
z.literal("remove-all"),
|
|
5680
|
-
z.literal("replace-current")
|
|
5681
|
-
]);
|
|
5682
|
-
var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
5683
|
-
var validateAsyncSchema = z.object({
|
|
5684
|
-
param: z.string(),
|
|
5685
|
-
method: httpMethodSchema,
|
|
5686
|
-
url: z.string()
|
|
5687
|
-
});
|
|
5688
|
-
var summarySummariserSchema = z.object({
|
|
5689
|
-
defaultTitle: z.string().optional(),
|
|
5690
|
-
defaultDescription: z.string().optional(),
|
|
5691
|
-
defaultIcon: iconSchema.optional(),
|
|
5692
|
-
defaultImage: imageLayoutSchema.optional(),
|
|
5693
|
-
providesTitle: z.boolean().optional(),
|
|
5694
|
-
providesDescription: z.boolean().optional(),
|
|
5695
|
-
providesIcon: z.boolean().optional(),
|
|
5696
|
-
providesImage: z.boolean().optional()
|
|
5683
|
+
validation: jsonElementSchema.optional()
|
|
5697
5684
|
});
|
|
5698
5685
|
var actionSchema = z.object({
|
|
5699
5686
|
title: z.string().optional(),
|
|
@@ -5710,8 +5697,33 @@ var actionSchema = z.object({
|
|
|
5710
5697
|
timeout: z.number().optional(),
|
|
5711
5698
|
skipValidation: z.boolean().optional()
|
|
5712
5699
|
});
|
|
5713
|
-
var
|
|
5714
|
-
|
|
5700
|
+
var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
5701
|
+
var formLayoutSchema = z.object({
|
|
5702
|
+
type: z.literal("form"),
|
|
5703
|
+
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
5704
|
+
schemaId: z.string(),
|
|
5705
|
+
control: z.string().optional(),
|
|
5706
|
+
margin: sizeSchema.optional()
|
|
5707
|
+
});
|
|
5708
|
+
var infoLayoutSchema = z.object({
|
|
5709
|
+
type: z.literal("info"),
|
|
5710
|
+
markdown: z.string(),
|
|
5711
|
+
align: alignSchema.optional(),
|
|
5712
|
+
control: z.string().optional(),
|
|
5713
|
+
margin: sizeSchema.optional()
|
|
5714
|
+
});
|
|
5715
|
+
var listLayoutItemSchema = z.object({
|
|
5716
|
+
description: z.string().optional(),
|
|
5717
|
+
status: listLayoutStatusSchema.optional(),
|
|
5718
|
+
icon: iconSchema.optional(),
|
|
5719
|
+
image: imageSchema.optional(),
|
|
5720
|
+
title: z.string().optional(),
|
|
5721
|
+
subtitle: z.string().optional(),
|
|
5722
|
+
value: z.string().optional(),
|
|
5723
|
+
subvalue: z.string().optional(),
|
|
5724
|
+
tag: z.string().optional()
|
|
5725
|
+
});
|
|
5726
|
+
var actionResponseBodySchema = z.object({
|
|
5715
5727
|
action: actionSchema
|
|
5716
5728
|
});
|
|
5717
5729
|
var searchResultActionSchema = z.object({
|
|
@@ -5719,7 +5731,7 @@ var searchResultActionSchema = z.object({
|
|
|
5719
5731
|
title: z.string(),
|
|
5720
5732
|
description: z.string().optional(),
|
|
5721
5733
|
icon: iconSchema.optional(),
|
|
5722
|
-
image:
|
|
5734
|
+
image: imageSchema.optional(),
|
|
5723
5735
|
value: actionSchema
|
|
5724
5736
|
});
|
|
5725
5737
|
var searchResultSearchSchema = z.object({
|
|
@@ -5727,112 +5739,109 @@ var searchResultSearchSchema = z.object({
|
|
|
5727
5739
|
title: z.string(),
|
|
5728
5740
|
description: z.string().optional(),
|
|
5729
5741
|
icon: iconSchema.optional(),
|
|
5730
|
-
image:
|
|
5742
|
+
image: imageSchema.optional(),
|
|
5731
5743
|
value: searchSearchRequestSchema
|
|
5732
5744
|
});
|
|
5733
|
-
var
|
|
5745
|
+
var actionBehaviorSchema = z.object({
|
|
5746
|
+
type: z.literal("action"),
|
|
5734
5747
|
action: actionSchema
|
|
5735
5748
|
});
|
|
5736
|
-
var
|
|
5737
|
-
|
|
5749
|
+
var containerBehaviorSchema = z.object({
|
|
5750
|
+
action: actionSchema.optional(),
|
|
5751
|
+
link: linkSchema.optional()
|
|
5752
|
+
});
|
|
5753
|
+
var navigationBackBehaviorSchema = z.object({
|
|
5754
|
+
title: z.string().optional(),
|
|
5738
5755
|
action: actionSchema
|
|
5739
5756
|
});
|
|
5740
|
-
var
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5757
|
+
var summarySummariserSchema = z.object({
|
|
5758
|
+
defaultTitle: z.string().optional(),
|
|
5759
|
+
defaultDescription: z.string().optional(),
|
|
5760
|
+
defaultIcon: iconSchema.optional(),
|
|
5761
|
+
defaultImage: imageSchema.optional(),
|
|
5762
|
+
providesTitle: z.boolean().optional(),
|
|
5763
|
+
providesDescription: z.boolean().optional(),
|
|
5764
|
+
providesIcon: z.boolean().optional(),
|
|
5765
|
+
providesImage: z.boolean().optional()
|
|
5766
|
+
});
|
|
5767
|
+
var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
5768
|
+
var searchResponseBodySchema = z.object({
|
|
5769
|
+
results: z.array(searchResultSchema)
|
|
5770
|
+
});
|
|
5771
|
+
var behaviorSchema = z.union([
|
|
5772
|
+
actionBehaviorSchema,
|
|
5773
|
+
containerBehaviorSchema,
|
|
5774
|
+
linkBehaviorSchema
|
|
5775
|
+
]);
|
|
5776
|
+
var navigationSchema = z.object({
|
|
5777
|
+
backButton: navigationBackBehaviorSchema.optional(),
|
|
5778
|
+
back: navigationBackBehaviorSchema.optional(),
|
|
5779
|
+
stackBehavior: navigationStackBehaviorSchema.optional()
|
|
5746
5780
|
});
|
|
5781
|
+
var linkHandlerSchema = z.object({
|
|
5782
|
+
regexPattern: z.string(),
|
|
5783
|
+
behavior: behaviorSchema.optional()
|
|
5784
|
+
});
|
|
5785
|
+
var pollingOnErrorSchema = z.object({
|
|
5786
|
+
action: actionSchema.optional(),
|
|
5787
|
+
behavior: behaviorSchema.optional()
|
|
5788
|
+
});
|
|
5789
|
+
var pollingSchema = z.object({
|
|
5790
|
+
interval: z.number().optional(),
|
|
5791
|
+
url: z.string(),
|
|
5792
|
+
delay: z.number().optional(),
|
|
5793
|
+
timeout: z.number().optional(),
|
|
5794
|
+
maxAttempts: z.number(),
|
|
5795
|
+
onError: pollingOnErrorSchema
|
|
5796
|
+
});
|
|
5797
|
+
var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
5747
5798
|
var decisionLayoutOptionSchema = z.object({
|
|
5748
|
-
action: actionSchema,
|
|
5799
|
+
action: actionSchema.optional(),
|
|
5749
5800
|
title: z.string(),
|
|
5750
5801
|
description: z.string().optional(),
|
|
5751
5802
|
disabled: z.boolean().optional(),
|
|
5752
5803
|
icon: iconSchema.optional(),
|
|
5753
|
-
image:
|
|
5804
|
+
image: imageSchema.optional(),
|
|
5805
|
+
behavior: behaviorSchema.optional(),
|
|
5754
5806
|
tag: z.string().optional()
|
|
5755
5807
|
});
|
|
5756
|
-
var behaviorSchema = z.object({
|
|
5757
|
-
action: actionSchema.optional(),
|
|
5758
|
-
link: linkSchema.optional()
|
|
5759
|
-
});
|
|
5760
5808
|
var buttonLayoutSchema = z.object({
|
|
5761
5809
|
type: z.literal("button"),
|
|
5810
|
+
action: actionSchema.optional(),
|
|
5762
5811
|
size: sizeSchema.optional(),
|
|
5763
5812
|
title: z.string().optional(),
|
|
5764
|
-
|
|
5813
|
+
behavior: behaviorSchema.optional(),
|
|
5765
5814
|
context: contextSchema.optional(),
|
|
5766
5815
|
disabled: z.boolean().optional(),
|
|
5767
5816
|
pinOrder: z.number().optional(),
|
|
5768
5817
|
control: z.string().optional(),
|
|
5769
5818
|
margin: sizeSchema.optional()
|
|
5770
5819
|
});
|
|
5771
|
-
var
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
title: z.string().optional(),
|
|
5777
|
-
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
5778
|
-
control: z.string().optional(),
|
|
5779
|
-
margin: sizeSchema.optional()
|
|
5780
|
-
});
|
|
5781
|
-
var itemCallToActionSchema = z.object({
|
|
5782
|
-
title: z.string(),
|
|
5783
|
-
accessibilityDescription: z.string().optional(),
|
|
5784
|
-
behavior: behaviorSchema
|
|
5785
|
-
});
|
|
5786
|
-
var listLayoutCallToActionSchema = z.object({
|
|
5787
|
-
title: z.string(),
|
|
5788
|
-
accessibilityDescription: z.string().optional(),
|
|
5789
|
-
behavior: behaviorSchema
|
|
5790
|
-
});
|
|
5791
|
-
var listLayoutItemSchema = z.object({
|
|
5792
|
-
description: z.string().optional(),
|
|
5793
|
-
status: listLayoutStatusSchema.optional(),
|
|
5794
|
-
icon: iconSchema.optional(),
|
|
5795
|
-
image: imageSchema.optional(),
|
|
5796
|
-
title: z.string().optional(),
|
|
5797
|
-
subtitle: z.string().optional(),
|
|
5798
|
-
value: z.string().optional(),
|
|
5799
|
-
subvalue: z.string().optional(),
|
|
5800
|
-
tag: z.string().optional()
|
|
5801
|
-
});
|
|
5802
|
-
var statusListLayoutItemSchema = z.object({
|
|
5803
|
-
title: z.string(),
|
|
5804
|
-
description: z.string().optional(),
|
|
5805
|
-
icon: iconSchema,
|
|
5806
|
-
status: statusListLayoutStatusSchema.optional(),
|
|
5807
|
-
callToAction: itemCallToActionSchema.optional(),
|
|
5808
|
-
tag: z.string().optional()
|
|
5809
|
-
});
|
|
5810
|
-
var pollingOnErrorSchema = z.object({
|
|
5811
|
-
action: actionSchema
|
|
5812
|
-
});
|
|
5813
|
-
var navigationBackBehaviorSchema = z.object({
|
|
5814
|
-
title: z.string().optional(),
|
|
5815
|
-
action: actionSchema
|
|
5820
|
+
var reviewLayoutCallToActionSchema = z.object({
|
|
5821
|
+
action: actionSchema.optional(),
|
|
5822
|
+
title: z.string(),
|
|
5823
|
+
accessibilityDescription: z.string().optional(),
|
|
5824
|
+
behavior: behaviorSchema.optional()
|
|
5816
5825
|
});
|
|
5817
|
-
var
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
delay: z.number().optional(),
|
|
5822
|
-
timeout: z.number().optional(),
|
|
5823
|
-
maxAttempts: z.number(),
|
|
5824
|
-
onError: pollingOnErrorSchema
|
|
5826
|
+
var alertLayoutCallToActionSchema = z.object({
|
|
5827
|
+
title: z.string(),
|
|
5828
|
+
accessibilityDescription: z.string().optional(),
|
|
5829
|
+
behavior: behaviorSchema
|
|
5825
5830
|
});
|
|
5826
|
-
var
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
|
|
5831
|
+
var itemCallToActionSchema = z.object({
|
|
5832
|
+
title: z.string(),
|
|
5833
|
+
accessibilityDescription: z.string().optional(),
|
|
5834
|
+
behavior: behaviorSchema
|
|
5830
5835
|
});
|
|
5831
|
-
var
|
|
5832
|
-
|
|
5833
|
-
|
|
5836
|
+
var alertLayoutSchema = z.object({
|
|
5837
|
+
type: z.literal("alert"),
|
|
5838
|
+
markdown: z.string(),
|
|
5839
|
+
context: contextSchema.optional(),
|
|
5840
|
+
control: z.string().optional(),
|
|
5841
|
+
margin: sizeSchema.optional(),
|
|
5842
|
+
callToAction: alertLayoutCallToActionSchema.optional()
|
|
5834
5843
|
});
|
|
5835
|
-
var
|
|
5844
|
+
var listLayoutCallToActionSchema = z.object({
|
|
5836
5845
|
title: z.string(),
|
|
5837
5846
|
accessibilityDescription: z.string().optional(),
|
|
5838
5847
|
behavior: behaviorSchema
|
|
@@ -5852,21 +5861,6 @@ var listLayoutSchema = z.object({
|
|
|
5852
5861
|
control: z.string().optional(),
|
|
5853
5862
|
margin: sizeSchema.optional()
|
|
5854
5863
|
});
|
|
5855
|
-
var statusListLayoutSchema = z.object({
|
|
5856
|
-
type: z.literal("status-list"),
|
|
5857
|
-
items: z.array(statusListLayoutItemSchema),
|
|
5858
|
-
title: z.string().optional(),
|
|
5859
|
-
control: z.string().optional(),
|
|
5860
|
-
margin: sizeSchema.optional()
|
|
5861
|
-
});
|
|
5862
|
-
var alertLayoutSchema = z.object({
|
|
5863
|
-
type: z.literal("alert"),
|
|
5864
|
-
markdown: z.string(),
|
|
5865
|
-
context: contextSchema.optional(),
|
|
5866
|
-
control: z.string().optional(),
|
|
5867
|
-
margin: sizeSchema.optional(),
|
|
5868
|
-
callToAction: alertLayoutCallToActionSchema.optional()
|
|
5869
|
-
});
|
|
5870
5864
|
var constSchemaSchema = z.object({
|
|
5871
5865
|
hidden: z.boolean().optional(),
|
|
5872
5866
|
alert: alertLayoutSchema.optional(),
|
|
@@ -5905,22 +5899,157 @@ var blobSchemaSchema = z.object({
|
|
|
5905
5899
|
source: uploadSourceSchema.optional(),
|
|
5906
5900
|
disabled: z.boolean().optional()
|
|
5907
5901
|
});
|
|
5908
|
-
var
|
|
5902
|
+
var reviewLayoutSchema = z.object({
|
|
5903
|
+
type: z.literal("review"),
|
|
5904
|
+
orientation: z.string().optional(),
|
|
5905
|
+
action: actionSchema.optional(),
|
|
5906
|
+
fields: z.array(reviewLayoutFieldSchema),
|
|
5907
|
+
title: z.string().optional(),
|
|
5908
|
+
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
5909
|
+
control: z.string().optional(),
|
|
5910
|
+
margin: sizeSchema.optional()
|
|
5911
|
+
});
|
|
5912
|
+
var statusListLayoutItemSchema = z.object({
|
|
5913
|
+
title: z.string(),
|
|
5914
|
+
description: z.string().optional(),
|
|
5915
|
+
icon: iconSchema,
|
|
5916
|
+
status: statusListLayoutStatusSchema.optional(),
|
|
5917
|
+
callToAction: itemCallToActionSchema.optional(),
|
|
5918
|
+
tag: z.string().optional()
|
|
5919
|
+
});
|
|
5920
|
+
var statusListLayoutSchema = z.object({
|
|
5921
|
+
type: z.literal("status-list"),
|
|
5922
|
+
items: z.array(statusListLayoutItemSchema),
|
|
5923
|
+
title: z.string().optional(),
|
|
5924
|
+
control: z.string().optional(),
|
|
5925
|
+
margin: sizeSchema.optional()
|
|
5926
|
+
});
|
|
5927
|
+
var persistAsyncSchema = z.lazy(
|
|
5909
5928
|
() => z.object({
|
|
5910
|
-
|
|
5929
|
+
param: z.string(),
|
|
5930
|
+
idProperty: z.string(),
|
|
5931
|
+
schema: schemaSchema,
|
|
5932
|
+
url: z.string(),
|
|
5933
|
+
method: httpMethodSchema
|
|
5934
|
+
})
|
|
5935
|
+
);
|
|
5936
|
+
var schemaSchema = z.lazy(
|
|
5937
|
+
() => z.union([
|
|
5938
|
+
allOfSchemaSchema,
|
|
5939
|
+
arraySchemaSchema,
|
|
5940
|
+
blobSchemaSchema,
|
|
5941
|
+
booleanSchemaSchema,
|
|
5942
|
+
constSchemaSchema,
|
|
5943
|
+
integerSchemaSchema,
|
|
5944
|
+
numberSchemaSchema,
|
|
5945
|
+
objectSchemaSchema,
|
|
5946
|
+
oneOfSchemaSchema,
|
|
5947
|
+
stringSchemaSchema
|
|
5948
|
+
])
|
|
5949
|
+
);
|
|
5950
|
+
var columnsLayoutSchema = z.lazy(
|
|
5951
|
+
() => z.object({
|
|
5952
|
+
type: z.literal("columns"),
|
|
5953
|
+
left: z.array(layoutSchema),
|
|
5954
|
+
right: z.array(layoutSchema),
|
|
5955
|
+
bias: columnsLayoutBiasSchema.optional(),
|
|
5956
|
+
control: z.string().optional(),
|
|
5957
|
+
margin: sizeSchema.optional()
|
|
5958
|
+
})
|
|
5959
|
+
);
|
|
5960
|
+
var layoutSchema = z.lazy(
|
|
5961
|
+
() => z.union([
|
|
5962
|
+
alertLayoutSchema,
|
|
5963
|
+
boxLayoutSchema,
|
|
5964
|
+
buttonLayoutSchema,
|
|
5965
|
+
columnsLayoutSchema,
|
|
5966
|
+
decisionLayoutSchema,
|
|
5967
|
+
dividerLayoutSchema,
|
|
5968
|
+
formLayoutSchema,
|
|
5969
|
+
headingLayoutSchema,
|
|
5970
|
+
imageLayoutSchema,
|
|
5971
|
+
infoLayoutSchema,
|
|
5972
|
+
instructionsLayoutSchema,
|
|
5973
|
+
listLayoutSchema,
|
|
5974
|
+
loadingIndicatorLayoutSchema,
|
|
5975
|
+
markdownLayoutSchema,
|
|
5976
|
+
modalLayoutSchema,
|
|
5977
|
+
paragraphLayoutSchema,
|
|
5978
|
+
reviewLayoutSchema,
|
|
5979
|
+
searchLayoutSchema,
|
|
5980
|
+
statusListLayoutSchema
|
|
5981
|
+
])
|
|
5982
|
+
);
|
|
5983
|
+
var modalLayoutContentSchema = z.lazy(
|
|
5984
|
+
() => z.object({
|
|
5985
|
+
title: z.string().optional(),
|
|
5986
|
+
components: z.array(layoutSchema)
|
|
5987
|
+
})
|
|
5988
|
+
);
|
|
5989
|
+
var boxLayoutSchema = z.lazy(
|
|
5990
|
+
() => z.object({
|
|
5991
|
+
type: z.literal("box"),
|
|
5992
|
+
components: z.array(layoutSchema),
|
|
5993
|
+
width: sizeSchema.optional(),
|
|
5994
|
+
border: z.boolean().optional(),
|
|
5995
|
+
control: z.string().optional(),
|
|
5996
|
+
margin: sizeSchema.optional()
|
|
5997
|
+
})
|
|
5998
|
+
);
|
|
5999
|
+
var modalLayoutSchema = z.lazy(
|
|
6000
|
+
() => z.object({
|
|
6001
|
+
type: z.literal("modal"),
|
|
6002
|
+
control: z.string().optional(),
|
|
6003
|
+
margin: sizeSchema.optional(),
|
|
6004
|
+
trigger: modalLayoutTriggerSchema,
|
|
6005
|
+
content: modalLayoutContentSchema
|
|
6006
|
+
})
|
|
6007
|
+
);
|
|
6008
|
+
var stepSchema = z.lazy(
|
|
6009
|
+
() => z.object({
|
|
6010
|
+
key: z.string().optional(),
|
|
6011
|
+
type: z.string().optional(),
|
|
6012
|
+
actions: z.array(actionSchema).optional(),
|
|
6013
|
+
refreshFormUrl: z.string().optional(),
|
|
6014
|
+
id: z.string(),
|
|
6015
|
+
title: z.string(),
|
|
6016
|
+
schemas: z.array(schemaSchema),
|
|
6017
|
+
layout: z.array(layoutSchema),
|
|
6018
|
+
description: z.string().optional(),
|
|
6019
|
+
model: jsonElementSchema.optional(),
|
|
6020
|
+
external: externalSchema.optional(),
|
|
6021
|
+
polling: pollingSchema.optional(),
|
|
6022
|
+
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
6023
|
+
analytics: z.record(z.string()).optional(),
|
|
6024
|
+
errors: stepErrorSchema.optional(),
|
|
6025
|
+
navigation: navigationSchema.optional(),
|
|
6026
|
+
refreshUrl: z.string().optional(),
|
|
6027
|
+
control: z.string().optional()
|
|
6028
|
+
})
|
|
6029
|
+
);
|
|
6030
|
+
var stringSchemaSchema = z.lazy(
|
|
6031
|
+
() => z.object({
|
|
6032
|
+
type: z.literal("string"),
|
|
5911
6033
|
autofillProvider: z.string().optional(),
|
|
5912
6034
|
promoted: z.boolean().optional(),
|
|
5913
6035
|
refreshFormOnChange: z.boolean().optional(),
|
|
5914
6036
|
refreshUrl: z.string().optional(),
|
|
5915
6037
|
refreshFormUrl: z.string().optional(),
|
|
6038
|
+
format: stringSchemaFormatSchema.optional(),
|
|
6039
|
+
displayFormat: z.string().optional(),
|
|
5916
6040
|
placeholder: z.string().optional(),
|
|
5917
|
-
|
|
5918
|
-
|
|
6041
|
+
minLength: z.number().optional(),
|
|
6042
|
+
maxLength: z.number().optional(),
|
|
6043
|
+
minimum: z.string().optional(),
|
|
6044
|
+
maximum: z.string().optional(),
|
|
6045
|
+
pattern: z.string().optional(),
|
|
6046
|
+
autocapitalization: autocapitalizationTypeSchema.optional(),
|
|
6047
|
+
autocorrect: z.boolean().optional(),
|
|
5919
6048
|
$id: z.string().optional(),
|
|
5920
6049
|
title: z.string().optional(),
|
|
5921
6050
|
description: z.string().optional(),
|
|
5922
6051
|
control: z.string().optional(),
|
|
5923
|
-
default: z.
|
|
6052
|
+
default: z.string().optional(),
|
|
5924
6053
|
hidden: z.boolean().optional(),
|
|
5925
6054
|
disabled: z.boolean().optional(),
|
|
5926
6055
|
icon: iconSchema.optional(),
|
|
@@ -5933,67 +6062,61 @@ var numberSchemaSchema = z.lazy(
|
|
|
5933
6062
|
validationAsync: validateAsyncSchema.optional(),
|
|
5934
6063
|
validationMessages: z.record(z.string()).optional(),
|
|
5935
6064
|
alert: alertLayoutSchema.optional(),
|
|
6065
|
+
cameraConfig: jsonElementSchema.optional(),
|
|
6066
|
+
accepts: z.array(z.string()).optional(),
|
|
6067
|
+
maxSize: z.number().optional(),
|
|
6068
|
+
source: uploadSourceSchema.optional(),
|
|
5936
6069
|
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
5937
6070
|
autofillKey: z.string().optional(),
|
|
5938
6071
|
help: helpSchema.optional()
|
|
5939
6072
|
})
|
|
5940
6073
|
);
|
|
5941
|
-
var
|
|
5942
|
-
() => z.object({
|
|
5943
|
-
param: z.string(),
|
|
5944
|
-
idProperty: z.string(),
|
|
5945
|
-
schema: schemaSchema,
|
|
5946
|
-
url: z.string(),
|
|
5947
|
-
method: httpMethodSchema
|
|
5948
|
-
})
|
|
5949
|
-
);
|
|
5950
|
-
var arraySchemaTupleSchema = z.lazy(
|
|
6074
|
+
var oneOfSchemaSchema = z.lazy(
|
|
5951
6075
|
() => z.object({
|
|
5952
|
-
|
|
6076
|
+
autofillProvider: z.string().optional(),
|
|
5953
6077
|
promoted: z.boolean().optional(),
|
|
6078
|
+
refreshFormOnChange: z.boolean().optional(),
|
|
6079
|
+
refreshUrl: z.string().optional(),
|
|
6080
|
+
refreshFormUrl: z.string().optional(),
|
|
6081
|
+
promotion: jsonElementSchema.optional(),
|
|
6082
|
+
oneOf: z.array(schemaSchema),
|
|
6083
|
+
placeholder: z.string().optional(),
|
|
5954
6084
|
$id: z.string().optional(),
|
|
5955
|
-
items: z.array(schemaSchema),
|
|
5956
6085
|
title: z.string().optional(),
|
|
5957
6086
|
description: z.string().optional(),
|
|
5958
6087
|
control: z.string().optional(),
|
|
6088
|
+
default: jsonElementSchema.optional(),
|
|
5959
6089
|
hidden: z.boolean().optional(),
|
|
5960
6090
|
icon: iconSchema.optional(),
|
|
5961
6091
|
image: imageSchema.optional(),
|
|
5962
6092
|
keywords: z.array(z.string()).optional(),
|
|
5963
6093
|
summary: summaryProviderSchema.optional(),
|
|
5964
6094
|
analyticsId: z.string().optional(),
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
6095
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
6096
|
+
alert: alertLayoutSchema.optional(),
|
|
6097
|
+
help: helpSchema.optional(),
|
|
6098
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
6099
|
+
autofillKey: z.string().optional(),
|
|
6100
|
+
validationMessages: z.record(z.string()).optional(),
|
|
6101
|
+
disabled: z.boolean().optional()
|
|
5968
6102
|
})
|
|
5969
6103
|
);
|
|
5970
|
-
var
|
|
5971
|
-
() => z.union([
|
|
5972
|
-
allOfSchemaSchema,
|
|
5973
|
-
arraySchemaSchema,
|
|
5974
|
-
blobSchemaSchema,
|
|
5975
|
-
booleanSchemaSchema,
|
|
5976
|
-
constSchemaSchema,
|
|
5977
|
-
integerSchemaSchema,
|
|
5978
|
-
numberSchemaSchema,
|
|
5979
|
-
objectSchemaSchema,
|
|
5980
|
-
oneOfSchemaSchema,
|
|
5981
|
-
stringSchemaSchema
|
|
5982
|
-
])
|
|
5983
|
-
);
|
|
5984
|
-
var booleanSchemaSchema = z.lazy(
|
|
6104
|
+
var numberSchemaSchema = z.lazy(
|
|
5985
6105
|
() => z.object({
|
|
5986
|
-
type: z.literal("
|
|
6106
|
+
type: z.literal("number"),
|
|
5987
6107
|
autofillProvider: z.string().optional(),
|
|
5988
6108
|
promoted: z.boolean().optional(),
|
|
5989
6109
|
refreshFormOnChange: z.boolean().optional(),
|
|
5990
6110
|
refreshUrl: z.string().optional(),
|
|
5991
6111
|
refreshFormUrl: z.string().optional(),
|
|
6112
|
+
placeholder: z.string().optional(),
|
|
6113
|
+
minimum: z.number().optional(),
|
|
6114
|
+
maximum: z.number().optional(),
|
|
5992
6115
|
$id: z.string().optional(),
|
|
5993
6116
|
title: z.string().optional(),
|
|
5994
6117
|
description: z.string().optional(),
|
|
5995
6118
|
control: z.string().optional(),
|
|
5996
|
-
default: z.
|
|
6119
|
+
default: z.number().optional(),
|
|
5997
6120
|
hidden: z.boolean().optional(),
|
|
5998
6121
|
disabled: z.boolean().optional(),
|
|
5999
6122
|
icon: iconSchema.optional(),
|
|
@@ -6004,17 +6127,19 @@ var booleanSchemaSchema = z.lazy(
|
|
|
6004
6127
|
persistAsync: persistAsyncSchema.optional(),
|
|
6005
6128
|
refreshStepOnChange: z.boolean().optional(),
|
|
6006
6129
|
validationAsync: validateAsyncSchema.optional(),
|
|
6130
|
+
validationMessages: z.record(z.string()).optional(),
|
|
6007
6131
|
alert: alertLayoutSchema.optional(),
|
|
6132
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
6008
6133
|
autofillKey: z.string().optional(),
|
|
6009
6134
|
help: helpSchema.optional()
|
|
6010
6135
|
})
|
|
6011
6136
|
);
|
|
6012
|
-
var
|
|
6137
|
+
var arraySchemaTupleSchema = z.lazy(
|
|
6013
6138
|
() => z.object({
|
|
6014
|
-
|
|
6139
|
+
type: z.literal("array"),
|
|
6015
6140
|
promoted: z.boolean().optional(),
|
|
6016
|
-
allOf: z.array(schemaSchema),
|
|
6017
6141
|
$id: z.string().optional(),
|
|
6142
|
+
items: z.array(schemaSchema),
|
|
6018
6143
|
title: z.string().optional(),
|
|
6019
6144
|
description: z.string().optional(),
|
|
6020
6145
|
control: z.string().optional(),
|
|
@@ -6024,12 +6149,11 @@ var allOfSchemaSchema = z.lazy(
|
|
|
6024
6149
|
keywords: z.array(z.string()).optional(),
|
|
6025
6150
|
summary: summaryProviderSchema.optional(),
|
|
6026
6151
|
analyticsId: z.string().optional(),
|
|
6152
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
6153
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
6027
6154
|
alert: alertLayoutSchema.optional()
|
|
6028
6155
|
})
|
|
6029
6156
|
);
|
|
6030
|
-
var arraySchemaSchema = z.lazy(
|
|
6031
|
-
() => z.union([arraySchemaListSchema, arraySchemaTupleSchema])
|
|
6032
|
-
);
|
|
6033
6157
|
var integerSchemaSchema = z.lazy(
|
|
6034
6158
|
() => z.object({
|
|
6035
6159
|
type: z.literal("integer"),
|
|
@@ -6063,16 +6187,20 @@ var integerSchemaSchema = z.lazy(
|
|
|
6063
6187
|
help: helpSchema.optional()
|
|
6064
6188
|
})
|
|
6065
6189
|
);
|
|
6066
|
-
var
|
|
6190
|
+
var arraySchemaSchema = z.lazy(
|
|
6191
|
+
() => z.union([arraySchemaListSchema, arraySchemaTupleSchema])
|
|
6192
|
+
);
|
|
6193
|
+
var arraySchemaListSchema = z.lazy(
|
|
6067
6194
|
() => z.object({
|
|
6068
|
-
type: z.literal("
|
|
6069
|
-
disabled: z.boolean().optional(),
|
|
6195
|
+
type: z.literal("array"),
|
|
6070
6196
|
promoted: z.boolean().optional(),
|
|
6071
|
-
help: helpSchema.optional(),
|
|
6072
|
-
properties: z.record(schemaSchema),
|
|
6073
|
-
displayOrder: z.array(z.string()),
|
|
6074
|
-
required: z.array(z.string()).optional(),
|
|
6075
6197
|
$id: z.string().optional(),
|
|
6198
|
+
items: schemaSchema,
|
|
6199
|
+
addItemTitle: z.string(),
|
|
6200
|
+
editItemTitle: z.string(),
|
|
6201
|
+
minItems: z.number().optional(),
|
|
6202
|
+
maxItems: z.number().optional(),
|
|
6203
|
+
placeholder: z.string().optional(),
|
|
6076
6204
|
title: z.string().optional(),
|
|
6077
6205
|
description: z.string().optional(),
|
|
6078
6206
|
control: z.string().optional(),
|
|
@@ -6080,64 +6208,46 @@ var objectSchemaSchema = z.lazy(
|
|
|
6080
6208
|
icon: iconSchema.optional(),
|
|
6081
6209
|
image: imageSchema.optional(),
|
|
6082
6210
|
keywords: z.array(z.string()).optional(),
|
|
6083
|
-
summary:
|
|
6211
|
+
summary: summarySummariserSchema.optional(),
|
|
6084
6212
|
analyticsId: z.string().optional(),
|
|
6085
|
-
|
|
6213
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
6214
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
6215
|
+
alert: alertLayoutSchema.optional(),
|
|
6216
|
+
validationMessages: z.record(z.string()).optional(),
|
|
6217
|
+
disabled: z.boolean().optional()
|
|
6086
6218
|
})
|
|
6087
6219
|
);
|
|
6088
|
-
var
|
|
6220
|
+
var allOfSchemaSchema = z.lazy(
|
|
6089
6221
|
() => z.object({
|
|
6090
|
-
|
|
6222
|
+
disabled: z.boolean().optional(),
|
|
6091
6223
|
promoted: z.boolean().optional(),
|
|
6092
|
-
|
|
6093
|
-
refreshUrl: z.string().optional(),
|
|
6094
|
-
refreshFormUrl: z.string().optional(),
|
|
6095
|
-
promotion: jsonElementSchema.optional(),
|
|
6096
|
-
oneOf: z.array(schemaSchema),
|
|
6097
|
-
placeholder: z.string().optional(),
|
|
6224
|
+
allOf: z.array(schemaSchema),
|
|
6098
6225
|
$id: z.string().optional(),
|
|
6099
6226
|
title: z.string().optional(),
|
|
6100
6227
|
description: z.string().optional(),
|
|
6101
6228
|
control: z.string().optional(),
|
|
6102
|
-
default: jsonElementSchema.optional(),
|
|
6103
6229
|
hidden: z.boolean().optional(),
|
|
6104
6230
|
icon: iconSchema.optional(),
|
|
6105
6231
|
image: imageSchema.optional(),
|
|
6106
6232
|
keywords: z.array(z.string()).optional(),
|
|
6107
6233
|
summary: summaryProviderSchema.optional(),
|
|
6108
6234
|
analyticsId: z.string().optional(),
|
|
6109
|
-
|
|
6110
|
-
alert: alertLayoutSchema.optional(),
|
|
6111
|
-
help: helpSchema.optional(),
|
|
6112
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
6113
|
-
autofillKey: z.string().optional(),
|
|
6114
|
-
validationMessages: z.record(z.string()).optional(),
|
|
6115
|
-
disabled: z.boolean().optional()
|
|
6235
|
+
alert: alertLayoutSchema.optional()
|
|
6116
6236
|
})
|
|
6117
6237
|
);
|
|
6118
|
-
var
|
|
6238
|
+
var booleanSchemaSchema = z.lazy(
|
|
6119
6239
|
() => z.object({
|
|
6120
|
-
type: z.literal("
|
|
6240
|
+
type: z.literal("boolean"),
|
|
6121
6241
|
autofillProvider: z.string().optional(),
|
|
6122
6242
|
promoted: z.boolean().optional(),
|
|
6123
6243
|
refreshFormOnChange: z.boolean().optional(),
|
|
6124
6244
|
refreshUrl: z.string().optional(),
|
|
6125
6245
|
refreshFormUrl: z.string().optional(),
|
|
6126
|
-
format: stringSchemaFormatSchema.optional(),
|
|
6127
|
-
displayFormat: z.string().optional(),
|
|
6128
|
-
placeholder: z.string().optional(),
|
|
6129
|
-
minLength: z.number().optional(),
|
|
6130
|
-
maxLength: z.number().optional(),
|
|
6131
|
-
minimum: z.string().optional(),
|
|
6132
|
-
maximum: z.string().optional(),
|
|
6133
|
-
pattern: z.string().optional(),
|
|
6134
|
-
autocapitalization: autocapitalizationTypeSchema.optional(),
|
|
6135
|
-
autocorrect: z.boolean().optional(),
|
|
6136
6246
|
$id: z.string().optional(),
|
|
6137
6247
|
title: z.string().optional(),
|
|
6138
6248
|
description: z.string().optional(),
|
|
6139
6249
|
control: z.string().optional(),
|
|
6140
|
-
default: z.
|
|
6250
|
+
default: z.boolean().optional(),
|
|
6141
6251
|
hidden: z.boolean().optional(),
|
|
6142
6252
|
disabled: z.boolean().optional(),
|
|
6143
6253
|
icon: iconSchema.optional(),
|
|
@@ -6148,28 +6258,21 @@ var stringSchemaSchema = z.lazy(
|
|
|
6148
6258
|
persistAsync: persistAsyncSchema.optional(),
|
|
6149
6259
|
refreshStepOnChange: z.boolean().optional(),
|
|
6150
6260
|
validationAsync: validateAsyncSchema.optional(),
|
|
6151
|
-
validationMessages: z.record(z.string()).optional(),
|
|
6152
6261
|
alert: alertLayoutSchema.optional(),
|
|
6153
|
-
cameraConfig: jsonElementSchema.optional(),
|
|
6154
|
-
accepts: z.array(z.string()).optional(),
|
|
6155
|
-
maxSize: z.number().optional(),
|
|
6156
|
-
source: uploadSourceSchema.optional(),
|
|
6157
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
6158
6262
|
autofillKey: z.string().optional(),
|
|
6159
6263
|
help: helpSchema.optional()
|
|
6160
6264
|
})
|
|
6161
6265
|
);
|
|
6162
|
-
var
|
|
6266
|
+
var objectSchemaSchema = z.lazy(
|
|
6163
6267
|
() => z.object({
|
|
6164
|
-
type: z.literal("
|
|
6268
|
+
type: z.literal("object"),
|
|
6269
|
+
disabled: z.boolean().optional(),
|
|
6165
6270
|
promoted: z.boolean().optional(),
|
|
6271
|
+
help: helpSchema.optional(),
|
|
6272
|
+
properties: z.record(schemaSchema),
|
|
6273
|
+
displayOrder: z.array(z.string()),
|
|
6274
|
+
required: z.array(z.string()).optional(),
|
|
6166
6275
|
$id: z.string().optional(),
|
|
6167
|
-
items: schemaSchema,
|
|
6168
|
-
addItemTitle: z.string(),
|
|
6169
|
-
editItemTitle: z.string(),
|
|
6170
|
-
minItems: z.number().optional(),
|
|
6171
|
-
maxItems: z.number().optional(),
|
|
6172
|
-
placeholder: z.string().optional(),
|
|
6173
6276
|
title: z.string().optional(),
|
|
6174
6277
|
description: z.string().optional(),
|
|
6175
6278
|
control: z.string().optional(),
|
|
@@ -6177,93 +6280,9 @@ var arraySchemaListSchema = z.lazy(
|
|
|
6177
6280
|
icon: iconSchema.optional(),
|
|
6178
6281
|
image: imageSchema.optional(),
|
|
6179
6282
|
keywords: z.array(z.string()).optional(),
|
|
6180
|
-
summary:
|
|
6283
|
+
summary: summaryProviderSchema.optional(),
|
|
6181
6284
|
analyticsId: z.string().optional(),
|
|
6182
|
-
|
|
6183
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
6184
|
-
alert: alertLayoutSchema.optional(),
|
|
6185
|
-
validationMessages: z.record(z.string()).optional(),
|
|
6186
|
-
disabled: z.boolean().optional()
|
|
6187
|
-
})
|
|
6188
|
-
);
|
|
6189
|
-
var stepSchema = z.lazy(
|
|
6190
|
-
() => z.object({
|
|
6191
|
-
key: z.string().optional(),
|
|
6192
|
-
type: z.string().optional(),
|
|
6193
|
-
actions: z.array(actionSchema).optional(),
|
|
6194
|
-
refreshFormUrl: z.string().optional(),
|
|
6195
|
-
id: z.string(),
|
|
6196
|
-
title: z.string(),
|
|
6197
|
-
schemas: z.array(schemaSchema),
|
|
6198
|
-
layout: z.array(layoutSchema),
|
|
6199
|
-
description: z.string().optional(),
|
|
6200
|
-
model: jsonElementSchema.optional(),
|
|
6201
|
-
external: externalSchema.optional(),
|
|
6202
|
-
polling: pollingSchema.optional(),
|
|
6203
|
-
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
6204
|
-
analytics: z.record(z.string()).optional(),
|
|
6205
|
-
errors: stepErrorSchema.optional(),
|
|
6206
|
-
navigation: navigationSchema.optional(),
|
|
6207
|
-
refreshUrl: z.string().optional(),
|
|
6208
|
-
control: z.string().optional()
|
|
6209
|
-
})
|
|
6210
|
-
);
|
|
6211
|
-
var layoutSchema = z.lazy(
|
|
6212
|
-
() => z.union([
|
|
6213
|
-
alertLayoutSchema,
|
|
6214
|
-
boxLayoutSchema,
|
|
6215
|
-
buttonLayoutSchema,
|
|
6216
|
-
columnsLayoutSchema,
|
|
6217
|
-
decisionLayoutSchema,
|
|
6218
|
-
dividerLayoutSchema,
|
|
6219
|
-
formLayoutSchema,
|
|
6220
|
-
headingLayoutSchema,
|
|
6221
|
-
imageLayoutSchema,
|
|
6222
|
-
infoLayoutSchema,
|
|
6223
|
-
instructionsLayoutSchema,
|
|
6224
|
-
listLayoutSchema,
|
|
6225
|
-
loadingIndicatorLayoutSchema,
|
|
6226
|
-
markdownLayoutSchema,
|
|
6227
|
-
modalLayoutSchema,
|
|
6228
|
-
paragraphLayoutSchema,
|
|
6229
|
-
reviewLayoutSchema,
|
|
6230
|
-
searchLayoutSchema,
|
|
6231
|
-
statusListLayoutSchema
|
|
6232
|
-
])
|
|
6233
|
-
);
|
|
6234
|
-
var columnsLayoutSchema = z.lazy(
|
|
6235
|
-
() => z.object({
|
|
6236
|
-
type: z.literal("columns"),
|
|
6237
|
-
left: z.array(layoutSchema),
|
|
6238
|
-
right: z.array(layoutSchema),
|
|
6239
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
6240
|
-
control: z.string().optional(),
|
|
6241
|
-
margin: sizeSchema.optional()
|
|
6242
|
-
})
|
|
6243
|
-
);
|
|
6244
|
-
var modalLayoutContentSchema = z.lazy(
|
|
6245
|
-
() => z.object({
|
|
6246
|
-
title: z.string().optional(),
|
|
6247
|
-
components: z.array(layoutSchema)
|
|
6248
|
-
})
|
|
6249
|
-
);
|
|
6250
|
-
var boxLayoutSchema = z.lazy(
|
|
6251
|
-
() => z.object({
|
|
6252
|
-
type: z.literal("box"),
|
|
6253
|
-
components: z.array(layoutSchema),
|
|
6254
|
-
width: sizeSchema.optional(),
|
|
6255
|
-
border: z.boolean().optional(),
|
|
6256
|
-
control: z.string().optional(),
|
|
6257
|
-
margin: sizeSchema.optional()
|
|
6258
|
-
})
|
|
6259
|
-
);
|
|
6260
|
-
var modalLayoutSchema = z.lazy(
|
|
6261
|
-
() => z.object({
|
|
6262
|
-
type: z.literal("modal"),
|
|
6263
|
-
control: z.string().optional(),
|
|
6264
|
-
margin: sizeSchema.optional(),
|
|
6265
|
-
trigger: modalLayoutTriggerSchema,
|
|
6266
|
-
content: modalLayoutContentSchema
|
|
6285
|
+
alert: alertLayoutSchema.optional()
|
|
6267
6286
|
})
|
|
6268
6287
|
);
|
|
6269
6288
|
var validateStep = (step) => validate(step, stepSchema);
|
|
@@ -6359,6 +6378,15 @@ var mergeModels = (valueA, valueB) => {
|
|
|
6359
6378
|
return valueB;
|
|
6360
6379
|
};
|
|
6361
6380
|
|
|
6381
|
+
// src/revamp/domain/mappers/utils/image.ts
|
|
6382
|
+
var mapSpecImage = (image) => {
|
|
6383
|
+
var _a, _b, _c;
|
|
6384
|
+
return image ? {
|
|
6385
|
+
uri: (_b = (_a = image.uri) != null ? _a : image.url) != null ? _b : "",
|
|
6386
|
+
accessibilityDescription: (_c = image.accessibilityDescription) != null ? _c : image.text
|
|
6387
|
+
} : void 0;
|
|
6388
|
+
};
|
|
6389
|
+
|
|
6362
6390
|
// src/revamp/domain/features/summary/summary-utils.ts
|
|
6363
6391
|
var getSummariser = (schema) => (value) => {
|
|
6364
6392
|
const { summary, icon, image } = schema;
|
|
@@ -6391,7 +6419,7 @@ var summaryIfProvides = (summary, { value, icon, image }) => {
|
|
|
6391
6419
|
title: summary.providesTitle && value || void 0,
|
|
6392
6420
|
description: summary.providesDescription && value || void 0,
|
|
6393
6421
|
icon: summary.providesIcon && icon || void 0,
|
|
6394
|
-
image: summary.providesImage && image || void 0
|
|
6422
|
+
image: summary.providesImage && mapSpecImage(image != null ? image : void 0) || void 0
|
|
6395
6423
|
};
|
|
6396
6424
|
};
|
|
6397
6425
|
|
|
@@ -6491,7 +6519,7 @@ var getOnErrorAction = (onError) => {
|
|
|
6491
6519
|
return onError.behavior.action;
|
|
6492
6520
|
}
|
|
6493
6521
|
}
|
|
6494
|
-
if ("action" in onError) {
|
|
6522
|
+
if ("action" in onError && onError.action) {
|
|
6495
6523
|
return onError.action;
|
|
6496
6524
|
}
|
|
6497
6525
|
return {};
|
|
@@ -6702,6 +6730,10 @@ var buttonLayoutToComponentWithBehavior = (uid, button, mapperProps) => {
|
|
|
6702
6730
|
const { onAction, onLink, step } = mapperProps;
|
|
6703
6731
|
const { context, control, disabled, margin = "md", pinOrder, size, title, behavior } = button;
|
|
6704
6732
|
const getOnClick2 = () => {
|
|
6733
|
+
if (!behavior) {
|
|
6734
|
+
return () => {
|
|
6735
|
+
};
|
|
6736
|
+
}
|
|
6705
6737
|
if ("type" in behavior) {
|
|
6706
6738
|
switch (behavior.type) {
|
|
6707
6739
|
case "action": {
|
|
@@ -6871,6 +6903,7 @@ var decisionLayoutToComponent = (uid, {
|
|
|
6871
6903
|
return __spreadProps(__spreadValues({}, option), {
|
|
6872
6904
|
disabled: (_a = option.disabled) != null ? _a : false,
|
|
6873
6905
|
href: getHref(option),
|
|
6906
|
+
image: mapSpecImage(option.image),
|
|
6874
6907
|
onClick: getOnClick(option, mapperProps)
|
|
6875
6908
|
});
|
|
6876
6909
|
}),
|
|
@@ -6885,13 +6918,13 @@ var getHref = (option) => {
|
|
|
6885
6918
|
};
|
|
6886
6919
|
var getOnClick = (option, { step, onAction, onLink }) => {
|
|
6887
6920
|
const { behavior } = option;
|
|
6888
|
-
if (!behavior) {
|
|
6921
|
+
if (!behavior && option.action) {
|
|
6889
6922
|
const action = inlineAction(option.action, step == null ? void 0 : step.actions);
|
|
6890
6923
|
return () => {
|
|
6891
6924
|
void onAction(action);
|
|
6892
6925
|
};
|
|
6893
6926
|
}
|
|
6894
|
-
if ("type" in behavior) {
|
|
6927
|
+
if (behavior && "type" in behavior) {
|
|
6895
6928
|
switch (behavior.type) {
|
|
6896
6929
|
case "action": {
|
|
6897
6930
|
const action = inlineAction(behavior.action, step == null ? void 0 : step.actions);
|
|
@@ -6965,6 +6998,9 @@ var isExactLocalValueMatch = (valueA, valueB) => {
|
|
|
6965
6998
|
return valueA === valueB;
|
|
6966
6999
|
};
|
|
6967
7000
|
|
|
7001
|
+
// src/revamp/domain/components/utils/getRandomId.ts
|
|
7002
|
+
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
7003
|
+
|
|
6968
7004
|
// src/revamp/domain/features/persistAsync/getComponentPersistAsync.ts
|
|
6969
7005
|
var getComponentPersistAsync = (update, performPersistAsync) => (
|
|
6970
7006
|
/**
|
|
@@ -7044,7 +7080,7 @@ var getComponentMultiPersistAsync = (update, performPersistAsync) => (
|
|
|
7044
7080
|
draft.persistedState = [
|
|
7045
7081
|
...draft.persistedState.slice(0, index),
|
|
7046
7082
|
{
|
|
7047
|
-
id:
|
|
7083
|
+
id: getRandomId(),
|
|
7048
7084
|
abortController: newAbortController,
|
|
7049
7085
|
lastResponse: null,
|
|
7050
7086
|
lastSubmitted: null,
|
|
@@ -7605,7 +7641,7 @@ var mapCommonSchemaProps = (schemaMapperProps) => {
|
|
|
7605
7641
|
errors: isString(validationErrors) ? [validationErrors] : void 0,
|
|
7606
7642
|
hidden: Boolean(hidden),
|
|
7607
7643
|
icon,
|
|
7608
|
-
image,
|
|
7644
|
+
image: mapSpecImage(image),
|
|
7609
7645
|
keywords,
|
|
7610
7646
|
required: Boolean(required),
|
|
7611
7647
|
title,
|
|
@@ -8212,7 +8248,7 @@ var oneOfSchemaToComponent = (schemaMapperProps, mapperProps) => {
|
|
|
8212
8248
|
return {
|
|
8213
8249
|
title,
|
|
8214
8250
|
description,
|
|
8215
|
-
image,
|
|
8251
|
+
image: mapSpecImage(image),
|
|
8216
8252
|
icon,
|
|
8217
8253
|
keywords,
|
|
8218
8254
|
disabled: "disabled" in childSchema ? Boolean(childSchema.disabled) : false,
|
|
@@ -8933,7 +8969,9 @@ var arraySchemaToRepeatableComponent = (schemaMapperProps, mapperProps) => {
|
|
|
8933
8969
|
editItemTitle,
|
|
8934
8970
|
maxItems,
|
|
8935
8971
|
minItems,
|
|
8936
|
-
summary,
|
|
8972
|
+
summary: __spreadProps(__spreadValues({}, summary), {
|
|
8973
|
+
defaultImage: mapSpecImage(summary == null ? void 0 : summary.defaultImage)
|
|
8974
|
+
}),
|
|
8937
8975
|
createEditableComponent,
|
|
8938
8976
|
onValueChange
|
|
8939
8977
|
}),
|
|
@@ -8956,9 +8994,6 @@ var localValueToJsonElement = (localValue) => {
|
|
|
8956
8994
|
};
|
|
8957
8995
|
var getRandomInt = () => Math.floor(Math.random() * 1e8);
|
|
8958
8996
|
|
|
8959
|
-
// src/revamp/domain/components/utils/getRandomId.ts
|
|
8960
|
-
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
8961
|
-
|
|
8962
8997
|
// src/revamp/domain/components/MultiUploadInputComponent.ts
|
|
8963
8998
|
var createMultiUploadInputComponent = (uploadInputProps, updateComponent) => {
|
|
8964
8999
|
const _a = uploadInputProps, {
|
|
@@ -9261,7 +9296,7 @@ var arraySchemaToMultiSelectComponent = (schemaMapperProps, mapperProps) => {
|
|
|
9261
9296
|
return {
|
|
9262
9297
|
title: title2,
|
|
9263
9298
|
description,
|
|
9264
|
-
image,
|
|
9299
|
+
image: mapSpecImage(image),
|
|
9265
9300
|
icon,
|
|
9266
9301
|
keywords,
|
|
9267
9302
|
disabled: "disabled" in childSchema ? Boolean(childSchema.disabled) : false,
|
|
@@ -9722,13 +9757,27 @@ var createImageComponent = (imageProps) => __spreadProps(__spreadValues({
|
|
|
9722
9757
|
});
|
|
9723
9758
|
|
|
9724
9759
|
// src/revamp/domain/mappers/layout/imageLayoutToComponent.ts
|
|
9725
|
-
var imageLayoutToComponent = (uid, {
|
|
9726
|
-
|
|
9727
|
-
content
|
|
9760
|
+
var imageLayoutToComponent = (uid, {
|
|
9761
|
+
accessibilityDescription,
|
|
9762
|
+
content,
|
|
9728
9763
|
control,
|
|
9729
|
-
margin,
|
|
9730
|
-
size
|
|
9731
|
-
|
|
9764
|
+
margin = "md",
|
|
9765
|
+
size = "md",
|
|
9766
|
+
text,
|
|
9767
|
+
url
|
|
9768
|
+
}) => {
|
|
9769
|
+
var _a, _b, _c;
|
|
9770
|
+
return createImageComponent({
|
|
9771
|
+
uid,
|
|
9772
|
+
content: content ? {
|
|
9773
|
+
uri: (_b = (_a = content.uri) != null ? _a : content.url) != null ? _b : "",
|
|
9774
|
+
accessibilityDescription: (_c = content.accessibilityDescription) != null ? _c : content.text
|
|
9775
|
+
} : { accessibilityDescription: accessibilityDescription != null ? accessibilityDescription : text, uri: url != null ? url : "" },
|
|
9776
|
+
control,
|
|
9777
|
+
margin,
|
|
9778
|
+
size
|
|
9779
|
+
});
|
|
9780
|
+
};
|
|
9732
9781
|
|
|
9733
9782
|
// src/revamp/domain/components/MarkdownComponent.ts
|
|
9734
9783
|
var createMarkdownComponent = (markdownProps) => __spreadProps(__spreadValues({
|
|
@@ -10253,7 +10302,9 @@ var createListComponent = (listProps) => __spreadProps(__spreadValues({
|
|
|
10253
10302
|
var listLayoutToComponent = (uid, { callToAction, control, items, margin = "md", title }, mapperProps) => createListComponent({
|
|
10254
10303
|
uid,
|
|
10255
10304
|
control,
|
|
10256
|
-
items: items.map((item) => __spreadValues({}, item)
|
|
10305
|
+
items: items.map((item) => __spreadProps(__spreadValues({}, item), {
|
|
10306
|
+
image: mapSpecImage(item.image)
|
|
10307
|
+
})),
|
|
10257
10308
|
callToAction: getListCallToAction(callToAction, mapperProps),
|
|
10258
10309
|
margin,
|
|
10259
10310
|
title
|
|
@@ -10377,13 +10428,13 @@ var getUnreferencedSchemas = (step) => {
|
|
|
10377
10428
|
// src/revamp/domain/mappers/mapStepToComponent.ts
|
|
10378
10429
|
var mapStepToComponent = (_a) => {
|
|
10379
10430
|
var _b = _a, {
|
|
10380
|
-
|
|
10431
|
+
count,
|
|
10381
10432
|
loadingState,
|
|
10382
10433
|
displayStepTitle,
|
|
10383
10434
|
trackEvent,
|
|
10384
10435
|
onPoll
|
|
10385
10436
|
} = _b, restProps = __objRest(_b, [
|
|
10386
|
-
"
|
|
10437
|
+
"count",
|
|
10387
10438
|
"loadingState",
|
|
10388
10439
|
"displayStepTitle",
|
|
10389
10440
|
"trackEvent",
|
|
@@ -10391,7 +10442,18 @@ var mapStepToComponent = (_a) => {
|
|
|
10391
10442
|
]);
|
|
10392
10443
|
var _a2, _b2;
|
|
10393
10444
|
const { step, updateComponent } = restProps;
|
|
10394
|
-
const {
|
|
10445
|
+
const {
|
|
10446
|
+
id,
|
|
10447
|
+
control,
|
|
10448
|
+
description,
|
|
10449
|
+
errors,
|
|
10450
|
+
external,
|
|
10451
|
+
key,
|
|
10452
|
+
layout = [],
|
|
10453
|
+
navigation,
|
|
10454
|
+
polling,
|
|
10455
|
+
title
|
|
10456
|
+
} = step;
|
|
10395
10457
|
const backNavigation = (_a2 = navigation == null ? void 0 : navigation.back) != null ? _a2 : navigation == null ? void 0 : navigation.backButton;
|
|
10396
10458
|
const back = backNavigation ? {
|
|
10397
10459
|
title: backNavigation.title,
|
|
@@ -10404,7 +10466,7 @@ var mapStepToComponent = (_a) => {
|
|
|
10404
10466
|
if (stepId === void 0) {
|
|
10405
10467
|
throw new Error("Step must have an id or a key");
|
|
10406
10468
|
}
|
|
10407
|
-
const uid = `${stepId != null ? stepId : "step"}_${
|
|
10469
|
+
const uid = `${stepId != null ? stepId : "step"}_${count % 100}`;
|
|
10408
10470
|
const onAction = async (action) => {
|
|
10409
10471
|
try {
|
|
10410
10472
|
await stepComponent.getSubmittableValue();
|
|
@@ -10431,6 +10493,7 @@ var mapStepToComponent = (_a) => {
|
|
|
10431
10493
|
uid,
|
|
10432
10494
|
back,
|
|
10433
10495
|
components,
|
|
10496
|
+
control,
|
|
10434
10497
|
description,
|
|
10435
10498
|
error: errors == null ? void 0 : errors.error,
|
|
10436
10499
|
external,
|
|
@@ -10895,10 +10958,7 @@ function useDynamicFlowCore(props) {
|
|
|
10895
10958
|
);
|
|
10896
10959
|
const [stepComponent, setStepComponent] = (0, import_react3.useState)(null);
|
|
10897
10960
|
const stepComponentRef = (0, import_react3.useRef)(null);
|
|
10898
|
-
const
|
|
10899
|
-
const flipStepBit = () => {
|
|
10900
|
-
stepBit.current = stepBit.current === "flip" ? "flop" : "flip";
|
|
10901
|
-
};
|
|
10961
|
+
const stepCount = (0, import_react3.useRef)(0);
|
|
10902
10962
|
const stepRef = (0, import_react3.useRef)(initialStep != null ? initialStep : null);
|
|
10903
10963
|
const etagRef = (0, import_react3.useRef)(null);
|
|
10904
10964
|
const abortControllerRef = (0, import_react3.useRef)(new AbortController());
|
|
@@ -10913,13 +10973,23 @@ function useDynamicFlowCore(props) {
|
|
|
10913
10973
|
void onAction(__spreadValues({ method: "GET" }, initialAction));
|
|
10914
10974
|
}
|
|
10915
10975
|
if (initialStep && !initialAction) {
|
|
10916
|
-
|
|
10976
|
+
createStep(initialStep, null);
|
|
10917
10977
|
trackCoreEvent("Step Shown", { isFirstStep: true });
|
|
10918
10978
|
}
|
|
10919
10979
|
}, []);
|
|
10980
|
+
const createStep = (0, import_react3.useCallback)((newStep, etag) => {
|
|
10981
|
+
if (stepComponentRef.current) {
|
|
10982
|
+
stepCount.current += 1;
|
|
10983
|
+
}
|
|
10984
|
+
initialiseWithStep(newStep, etag, null);
|
|
10985
|
+
}, []);
|
|
10986
|
+
const updateStep = (0, import_react3.useCallback)((newStep, etag) => {
|
|
10987
|
+
var _a2, _b;
|
|
10988
|
+
initialiseWithStep(newStep, etag, (_b = (_a2 = stepComponentRef.current) == null ? void 0 : _a2.getLocalValue()) != null ? _b : null);
|
|
10989
|
+
}, []);
|
|
10920
10990
|
const initialiseWithStep = (0, import_react3.useCallback)(
|
|
10921
|
-
(newStep, etag) => {
|
|
10922
|
-
var _a2
|
|
10991
|
+
(newStep, etag, localValue) => {
|
|
10992
|
+
var _a2;
|
|
10923
10993
|
(_a2 = stepComponentRef.current) == null ? void 0 : _a2.stop();
|
|
10924
10994
|
stepRef.current = newStep;
|
|
10925
10995
|
etagRef.current = etag;
|
|
@@ -10942,8 +11012,8 @@ function useDynamicFlowCore(props) {
|
|
|
10942
11012
|
};
|
|
10943
11013
|
try {
|
|
10944
11014
|
const newStepComponent = mapStepToComponent({
|
|
10945
|
-
|
|
10946
|
-
stepLocalValue:
|
|
11015
|
+
count: stepCount.current,
|
|
11016
|
+
stepLocalValue: localValue,
|
|
10947
11017
|
step: newStep,
|
|
10948
11018
|
displayStepTitle,
|
|
10949
11019
|
loadingState: "idle",
|
|
@@ -11028,8 +11098,7 @@ function useDynamicFlowCore(props) {
|
|
|
11028
11098
|
}
|
|
11029
11099
|
case "replace-step": {
|
|
11030
11100
|
const isFirstStep = stepRef.current === null;
|
|
11031
|
-
|
|
11032
|
-
initialiseWithStep(command.step, command.etag);
|
|
11101
|
+
createStep(command.step, command.etag);
|
|
11033
11102
|
trackCoreEvent("Step Shown", { isFirstStep });
|
|
11034
11103
|
break;
|
|
11035
11104
|
}
|
|
@@ -11037,7 +11106,7 @@ function useDynamicFlowCore(props) {
|
|
|
11037
11106
|
const genericErrorMessage = getErrorMessageFunctions().genericErrorWithRetry();
|
|
11038
11107
|
const { errors = { error: genericErrorMessage } } = command.body;
|
|
11039
11108
|
if (stepRef.current) {
|
|
11040
|
-
|
|
11109
|
+
updateStep(
|
|
11041
11110
|
__spreadProps(__spreadValues({}, stepRef.current), {
|
|
11042
11111
|
// the existing step
|
|
11043
11112
|
errors,
|
|
@@ -11085,7 +11154,7 @@ function useDynamicFlowCore(props) {
|
|
|
11085
11154
|
case "refresh-step":
|
|
11086
11155
|
{
|
|
11087
11156
|
const errors = errorsOverride != null ? errorsOverride : command.step.errors;
|
|
11088
|
-
|
|
11157
|
+
updateStep(__spreadProps(__spreadValues({}, command.step), { errors }), command.etag);
|
|
11089
11158
|
}
|
|
11090
11159
|
break;
|
|
11091
11160
|
case "error": {
|
|
@@ -11118,8 +11187,7 @@ function useDynamicFlowCore(props) {
|
|
|
11118
11187
|
});
|
|
11119
11188
|
switch (command.type) {
|
|
11120
11189
|
case "replace-step":
|
|
11121
|
-
|
|
11122
|
-
initialiseWithStep(command.step, command.etag);
|
|
11190
|
+
createStep(command.step, command.etag);
|
|
11123
11191
|
return true;
|
|
11124
11192
|
case "action":
|
|
11125
11193
|
void onAction(command.action);
|
|
@@ -11175,7 +11243,7 @@ var mapErrorsToValidationState = (errors) => {
|
|
|
11175
11243
|
|
|
11176
11244
|
// src/revamp/renderers/mappers/utils/inputComponentToProps.ts
|
|
11177
11245
|
var inputComponentToProps = (component, type) => {
|
|
11178
|
-
var _a
|
|
11246
|
+
var _a;
|
|
11179
11247
|
const {
|
|
11180
11248
|
uid,
|
|
11181
11249
|
control,
|
|
@@ -11204,11 +11272,7 @@ var inputComponentToProps = (component, type) => {
|
|
|
11204
11272
|
help,
|
|
11205
11273
|
icon,
|
|
11206
11274
|
id,
|
|
11207
|
-
image
|
|
11208
|
-
accessibilityDescription: (_b = image.accessibilityDescription) != null ? _b : image.text,
|
|
11209
|
-
uri: image.uri,
|
|
11210
|
-
url: (_d = (_c = image.uri) != null ? _c : image.url) != null ? _d : ""
|
|
11211
|
-
} : void 0,
|
|
11275
|
+
image,
|
|
11212
11276
|
placeholder,
|
|
11213
11277
|
required,
|
|
11214
11278
|
title,
|
|
@@ -11263,7 +11327,7 @@ var mapBoxControl = ({
|
|
|
11263
11327
|
|
|
11264
11328
|
// src/revamp/renderers/mappers/buttonComponentToProps.ts
|
|
11265
11329
|
var buttonComponentToProps = (component, rendererMapperProps) => {
|
|
11266
|
-
return __spreadValues(__spreadValues({
|
|
11330
|
+
return __spreadValues(__spreadProps(__spreadValues({
|
|
11267
11331
|
type: "button"
|
|
11268
11332
|
}, pick(
|
|
11269
11333
|
component,
|
|
@@ -11271,12 +11335,13 @@ var buttonComponentToProps = (component, rendererMapperProps) => {
|
|
|
11271
11335
|
"title",
|
|
11272
11336
|
"control",
|
|
11273
11337
|
"context",
|
|
11274
|
-
"disabled",
|
|
11275
11338
|
"margin",
|
|
11276
11339
|
"pinOrder",
|
|
11277
11340
|
"size",
|
|
11278
11341
|
"onClick"
|
|
11279
|
-
)),
|
|
11342
|
+
)), {
|
|
11343
|
+
disabled: component.disabled || rendererMapperProps.stepLoadingState !== "idle"
|
|
11344
|
+
}), rendererMapperProps);
|
|
11280
11345
|
};
|
|
11281
11346
|
|
|
11282
11347
|
// src/revamp/renderers/mappers/columnsComponentToProps.ts
|
|
@@ -11322,14 +11387,9 @@ var dateInputComponentToProps = (component, rendererMapperProps) => __spreadProp
|
|
|
11322
11387
|
// src/revamp/renderers/mappers/decisionComponentToProps.ts
|
|
11323
11388
|
var decisionComponentToProps = (component, rendererMapperProps) => __spreadProps(__spreadValues(__spreadValues({}, pick(component, "uid", "type", "control", "margin", "title")), rendererMapperProps), {
|
|
11324
11389
|
options: component.options.map((_a) => {
|
|
11325
|
-
var _b = _a, {
|
|
11326
|
-
var _a2, _b2, _c;
|
|
11390
|
+
var _b = _a, { disabled } = _b, rest = __objRest(_b, ["disabled"]);
|
|
11327
11391
|
return __spreadProps(__spreadValues({}, rest), {
|
|
11328
|
-
|
|
11329
|
-
accessibilityDescription: (_a2 = image.accessibilityDescription) != null ? _a2 : image.text,
|
|
11330
|
-
uri: image.uri,
|
|
11331
|
-
url: (_c = (_b2 = image.uri) != null ? _b2 : image.url) != null ? _c : ""
|
|
11332
|
-
} : image
|
|
11392
|
+
disabled: disabled || rendererMapperProps.stepLoadingState !== "idle"
|
|
11333
11393
|
});
|
|
11334
11394
|
})
|
|
11335
11395
|
});
|
|
@@ -11361,14 +11421,10 @@ var hiddenComponentToProps = ({ uid }) => ({
|
|
|
11361
11421
|
});
|
|
11362
11422
|
|
|
11363
11423
|
// src/revamp/renderers/mappers/imageComponentToProps.ts
|
|
11364
|
-
var imageComponentToProps = (component, rendererMapperProps) => {
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
|
|
11368
|
-
url: (_a = component.content.url) != null ? _a : "",
|
|
11369
|
-
uri: component.content.uri
|
|
11370
|
-
});
|
|
11371
|
-
};
|
|
11424
|
+
var imageComponentToProps = (component, rendererMapperProps) => __spreadProps(__spreadValues(__spreadValues({}, pick(component, "uid", "type", "control", "margin", "size")), rendererMapperProps), {
|
|
11425
|
+
uri: component.content.uri,
|
|
11426
|
+
accessibilityDescription: component.content.accessibilityDescription
|
|
11427
|
+
});
|
|
11372
11428
|
|
|
11373
11429
|
// src/revamp/renderers/mappers/instructionsComponentToProps.ts
|
|
11374
11430
|
var instructionsComponentToProps = (component, rendererMapperProps) => __spreadValues(__spreadValues({}, pick(component, "uid", "type", "control", "items", "margin", "title")), rendererMapperProps);
|
|
@@ -11433,15 +11489,10 @@ var numberInputComponentToProps = (component, rendererMapperProps) => __spreadPr
|
|
|
11433
11489
|
|
|
11434
11490
|
// src/revamp/renderers/mappers/objectComponentToProps.ts
|
|
11435
11491
|
var objectComponentToProps = (component, rendererMapperProps) => {
|
|
11436
|
-
var _a, _b;
|
|
11437
11492
|
const childrenProps = component.getChildren().map((c) => componentToRendererProps(c, rendererMapperProps));
|
|
11438
11493
|
return __spreadProps(__spreadValues(__spreadValues({
|
|
11439
11494
|
type: "section"
|
|
11440
|
-
}, pick(component, "uid", "control", "description", "help", "icon", "title")), rendererMapperProps), {
|
|
11441
|
-
// TODO: Remove when viewbindings are updated
|
|
11442
|
-
image: component.image ? __spreadProps(__spreadValues({}, component.image), {
|
|
11443
|
-
url: (_b = (_a = component.image) == null ? void 0 : _a.url) != null ? _b : ""
|
|
11444
|
-
}) : void 0,
|
|
11495
|
+
}, pick(component, "uid", "control", "description", "help", "icon", "image", "title")), rendererMapperProps), {
|
|
11445
11496
|
children: childrenProps.map(rendererMapperProps.render),
|
|
11446
11497
|
childrenProps
|
|
11447
11498
|
});
|
|
@@ -11452,7 +11503,6 @@ var paragraphComponentToProps = (component, rendererMapperProps) => __spreadValu
|
|
|
11452
11503
|
|
|
11453
11504
|
// src/revamp/renderers/mappers/repeatableComponentToProps.ts
|
|
11454
11505
|
var repeatableComponentToProps = (component, rendererMapperProps) => {
|
|
11455
|
-
var _a, _b;
|
|
11456
11506
|
const {
|
|
11457
11507
|
uid,
|
|
11458
11508
|
addItemTitle,
|
|
@@ -11475,26 +11525,13 @@ var repeatableComponentToProps = (component, rendererMapperProps) => {
|
|
|
11475
11525
|
} = component;
|
|
11476
11526
|
const childrenProps = component.getChildren().map((c) => componentToRendererProps(c, rendererMapperProps));
|
|
11477
11527
|
const editableItemProps = editableComponent ? componentToRendererProps(editableComponent, rendererMapperProps) : null;
|
|
11478
|
-
const getSummaryImage = (componentSummary) => {
|
|
11479
|
-
var _a2, _b2;
|
|
11480
|
-
if (componentSummary.image) {
|
|
11481
|
-
return __spreadProps(__spreadValues({}, componentSummary.image), {
|
|
11482
|
-
url: (_a2 = componentSummary.image.url) != null ? _a2 : ""
|
|
11483
|
-
});
|
|
11484
|
-
}
|
|
11485
|
-
if (summaryDefaults.image) {
|
|
11486
|
-
return __spreadProps(__spreadValues({}, summaryDefaults.image), {
|
|
11487
|
-
url: (_b2 = summaryDefaults.image.url) != null ? _b2 : ""
|
|
11488
|
-
});
|
|
11489
|
-
}
|
|
11490
|
-
};
|
|
11491
11528
|
const getSummary = (componentSummary) => {
|
|
11492
|
-
var
|
|
11529
|
+
var _a, _b, _c, _d;
|
|
11493
11530
|
return {
|
|
11494
|
-
title: (
|
|
11495
|
-
description: (
|
|
11531
|
+
title: (_a = componentSummary.title) != null ? _a : summaryDefaults.title,
|
|
11532
|
+
description: (_b = componentSummary.description) != null ? _b : summaryDefaults.description,
|
|
11496
11533
|
icon: (_c = componentSummary.icon) != null ? _c : summaryDefaults.icon,
|
|
11497
|
-
image:
|
|
11534
|
+
image: (_d = componentSummary.image) != null ? _d : summaryDefaults.image
|
|
11498
11535
|
};
|
|
11499
11536
|
};
|
|
11500
11537
|
const itemProps = components.map((childComponent) => __spreadProps(__spreadValues({}, getSummary(childComponent.getSummary())), {
|
|
@@ -11512,11 +11549,7 @@ var repeatableComponentToProps = (component, rendererMapperProps) => {
|
|
|
11512
11549
|
editableItemProps,
|
|
11513
11550
|
editItemTitle,
|
|
11514
11551
|
icon,
|
|
11515
|
-
image
|
|
11516
|
-
accessibilityDescription: (_a = image.accessibilityDescription) != null ? _a : image.text,
|
|
11517
|
-
uri: image.uri,
|
|
11518
|
-
url: (_b = image.url) != null ? _b : ""
|
|
11519
|
-
} : void 0,
|
|
11552
|
+
image,
|
|
11520
11553
|
items: itemProps,
|
|
11521
11554
|
maxItems,
|
|
11522
11555
|
minItems,
|
|
@@ -11581,6 +11614,7 @@ var getSearchState = ({
|
|
|
11581
11614
|
var _a;
|
|
11582
11615
|
return __spreadProps(__spreadValues({}, result), {
|
|
11583
11616
|
id: result.type === "action" ? (_a = result.value.id) != null ? _a : result.value.$id : void 0,
|
|
11617
|
+
image: mapSpecImage(result.image),
|
|
11584
11618
|
onClick: () => onSelect(result)
|
|
11585
11619
|
});
|
|
11586
11620
|
});
|
|
@@ -11644,15 +11678,10 @@ var uploadInputComponentToProps = (component, rendererMapperProps) => {
|
|
|
11644
11678
|
|
|
11645
11679
|
// src/revamp/renderers/mappers/tupleComponentToProps.ts
|
|
11646
11680
|
var tupleComponentToProps = (component, rendererMapperProps) => {
|
|
11647
|
-
var _a, _b;
|
|
11648
11681
|
const childrenProps = component.getChildren().map((c) => componentToRendererProps(c, rendererMapperProps));
|
|
11649
11682
|
return __spreadProps(__spreadValues(__spreadValues({
|
|
11650
11683
|
type: "section"
|
|
11651
|
-
}, pick(component, "uid", "control", "description", "help", "icon", "title")), rendererMapperProps), {
|
|
11652
|
-
// TODO Remove URL default after next types update (add back to `pick`)
|
|
11653
|
-
image: component.image ? __spreadProps(__spreadValues({}, component.image), {
|
|
11654
|
-
url: (_b = (_a = component.image) == null ? void 0 : _a.url) != null ? _b : ""
|
|
11655
|
-
}) : void 0,
|
|
11684
|
+
}, pick(component, "uid", "control", "description", "help", "icon", "image", "title")), rendererMapperProps), {
|
|
11656
11685
|
children: childrenProps.map(rendererMapperProps.render),
|
|
11657
11686
|
childrenProps
|
|
11658
11687
|
});
|
|
@@ -11661,15 +11690,8 @@ var tupleComponentToProps = (component, rendererMapperProps) => {
|
|
|
11661
11690
|
// src/revamp/renderers/mappers/listComponentToProps.ts
|
|
11662
11691
|
var listComponentToProps = (component, rendererMapperProps) => __spreadProps(__spreadValues(__spreadValues({}, pick(component, "uid", "type", "callToAction", "control", "margin", "title")), rendererMapperProps), {
|
|
11663
11692
|
items: component.items.map((_a) => {
|
|
11664
|
-
var
|
|
11665
|
-
|
|
11666
|
-
return __spreadProps(__spreadValues({}, rest), {
|
|
11667
|
-
image: image ? {
|
|
11668
|
-
accessibilityDescription: (_a2 = image == null ? void 0 : image.accessibilityDescription) != null ? _a2 : image == null ? void 0 : image.text,
|
|
11669
|
-
uri: image == null ? void 0 : image.uri,
|
|
11670
|
-
url: (_c = (_b2 = image == null ? void 0 : image.url) != null ? _b2 : image == null ? void 0 : image.url) != null ? _c : ""
|
|
11671
|
-
} : void 0
|
|
11672
|
-
});
|
|
11693
|
+
var item = __objRest(_a, []);
|
|
11694
|
+
return __spreadValues({}, item);
|
|
11673
11695
|
})
|
|
11674
11696
|
});
|
|
11675
11697
|
|
|
@@ -18907,22 +18929,13 @@ var noop8 = () => {
|
|
|
18907
18929
|
};
|
|
18908
18930
|
|
|
18909
18931
|
// src/revamp/renderers/utils.ts
|
|
18910
|
-
function
|
|
18911
|
-
if (isArray(root)) {
|
|
18912
|
-
return root.flatMap((child) => find(child, predicate));
|
|
18913
|
-
}
|
|
18914
|
-
return [
|
|
18915
|
-
...predicate(root) ? [root] : [],
|
|
18916
|
-
...getChildren(root).flatMap((child) => find(child, predicate))
|
|
18917
|
-
];
|
|
18918
|
-
}
|
|
18919
|
-
function findType(root, type, predicate = () => true) {
|
|
18932
|
+
function findRendererPropsByType(root, type, predicate = () => true) {
|
|
18920
18933
|
if (isArray(root)) {
|
|
18921
|
-
return root.flatMap((child) =>
|
|
18934
|
+
return root.flatMap((child) => findRendererPropsByType(child, type, predicate));
|
|
18922
18935
|
}
|
|
18923
18936
|
return [
|
|
18924
18937
|
...isType(root, type) && predicate(root) ? [root] : [],
|
|
18925
|
-
...getChildren(root).flatMap((child) =>
|
|
18938
|
+
...getChildren(root).flatMap((child) => findRendererPropsByType(child, type, predicate))
|
|
18926
18939
|
];
|
|
18927
18940
|
}
|
|
18928
18941
|
var isType = (node, type) => node.type === type;
|