@wise/dynamic-flow-client 4.1.0-experimental-6bb6f02 → 4.2.0
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/i18n/nl.json +45 -45
- package/build/main.css +6 -2
- package/build/main.js +493 -456
- package/build/main.mjs +493 -456
- package/build/types/revamp/domain/components/DateInputComponent.d.ts +3 -2
- package/build/types/revamp/domain/components/StepDomainComponent.d.ts +4 -4
- package/build/types/revamp/domain/components/TextInputComponent.d.ts +3 -2
- package/build/types/revamp/domain/components/utils/isOrWasValid.d.ts +2 -0
- package/build/types/revamp/domain/features/refreshAfter/getStepRefreshAfter.d.ts +10 -0
- package/build/types/revamp/domain/types.d.ts +10 -0
- package/build/types/revamp/renderers/stepComponentToProps.d.ts +1 -1
- package/build/types/revamp/test-utils/DynamicFlowWise.d.ts +6 -1
- package/package.json +21 -21
- package/build/types/revamp/utils/time-utils.d.ts +0 -6
package/build/main.mjs
CHANGED
|
@@ -5404,37 +5404,11 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
5404
5404
|
quotelessJson,
|
|
5405
5405
|
ZodError
|
|
5406
5406
|
});
|
|
5407
|
-
var
|
|
5408
|
-
|
|
5409
|
-
url: z.string()
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
z.literal("default"),
|
|
5413
|
-
z.literal("remove-previous"),
|
|
5414
|
-
z.literal("remove-all"),
|
|
5415
|
-
z.literal("replace-current")
|
|
5416
|
-
]);
|
|
5417
|
-
var jsonElementSchema = z.lazy(
|
|
5418
|
-
() => z.union([
|
|
5419
|
-
z.string(),
|
|
5420
|
-
z.number(),
|
|
5421
|
-
z.boolean(),
|
|
5422
|
-
z.record(jsonElementSchema),
|
|
5423
|
-
z.array(jsonElementSchema)
|
|
5424
|
-
]).nullable()
|
|
5425
|
-
);
|
|
5426
|
-
var helpSchema = z.object({
|
|
5427
|
-
markdown: z.string()
|
|
5428
|
-
});
|
|
5429
|
-
var actionTypeSchema = z.union([
|
|
5430
|
-
z.literal("primary"),
|
|
5431
|
-
z.literal("secondary"),
|
|
5432
|
-
z.literal("link"),
|
|
5433
|
-
z.literal("positive"),
|
|
5434
|
-
z.literal("negative")
|
|
5435
|
-
]);
|
|
5436
|
-
var linkSchema = z.object({
|
|
5437
|
-
url: z.string()
|
|
5407
|
+
var imageSchema = z.object({
|
|
5408
|
+
text: z.string().optional(),
|
|
5409
|
+
url: z.string().optional(),
|
|
5410
|
+
uri: z.string().optional(),
|
|
5411
|
+
accessibilityDescription: z.string().optional()
|
|
5438
5412
|
});
|
|
5439
5413
|
var httpMethodSchema = z.union([
|
|
5440
5414
|
z.literal("GET"),
|
|
@@ -5443,54 +5417,8 @@ var httpMethodSchema = z.union([
|
|
|
5443
5417
|
z.literal("PATCH"),
|
|
5444
5418
|
z.literal("DELETE")
|
|
5445
5419
|
]);
|
|
5446
|
-
var
|
|
5447
|
-
|
|
5448
|
-
param: z.string(),
|
|
5449
|
-
method: httpMethodSchema,
|
|
5450
|
-
url: z.string()
|
|
5451
|
-
});
|
|
5452
|
-
var summaryProviderSchema = z.object({
|
|
5453
|
-
providesTitle: z.boolean().optional(),
|
|
5454
|
-
providesDescription: z.boolean().optional(),
|
|
5455
|
-
providesIcon: z.boolean().optional(),
|
|
5456
|
-
providesImage: z.boolean().optional()
|
|
5457
|
-
});
|
|
5458
|
-
var imageSchema = z.object({
|
|
5459
|
-
text: z.string().optional(),
|
|
5460
|
-
url: z.string().optional(),
|
|
5461
|
-
uri: z.string().optional(),
|
|
5462
|
-
accessibilityDescription: z.string().optional()
|
|
5463
|
-
});
|
|
5464
|
-
var externalSchema = z.object({
|
|
5465
|
-
url: z.string()
|
|
5466
|
-
});
|
|
5467
|
-
var columnsLayoutBiasSchema = z.union([
|
|
5468
|
-
z.literal("none"),
|
|
5469
|
-
z.literal("left"),
|
|
5470
|
-
z.literal("right")
|
|
5471
|
-
]);
|
|
5472
|
-
var sizeSchema = z.union([
|
|
5473
|
-
z.literal("xs"),
|
|
5474
|
-
z.literal("sm"),
|
|
5475
|
-
z.literal("md"),
|
|
5476
|
-
z.literal("lg"),
|
|
5477
|
-
z.literal("xl")
|
|
5478
|
-
]);
|
|
5479
|
-
var dividerLayoutSchema = z.object({
|
|
5480
|
-
type: z.literal("divider"),
|
|
5481
|
-
control: z.string().optional(),
|
|
5482
|
-
margin: sizeSchema.optional()
|
|
5483
|
-
});
|
|
5484
|
-
var statusListLayoutStatusSchema = z.union([
|
|
5485
|
-
z.literal("not-done"),
|
|
5486
|
-
z.literal("pending"),
|
|
5487
|
-
z.literal("done")
|
|
5488
|
-
]);
|
|
5489
|
-
var loadingIndicatorLayoutSchema = z.object({
|
|
5490
|
-
type: z.literal("loading-indicator"),
|
|
5491
|
-
size: sizeSchema.optional(),
|
|
5492
|
-
control: z.string().optional(),
|
|
5493
|
-
margin: sizeSchema.optional()
|
|
5420
|
+
var iconNamedSchema = z.object({
|
|
5421
|
+
name: z.string()
|
|
5494
5422
|
});
|
|
5495
5423
|
var contextSchema = z.union([
|
|
5496
5424
|
z.literal("positive"),
|
|
@@ -5502,92 +5430,24 @@ var contextSchema = z.union([
|
|
|
5502
5430
|
z.literal("info"),
|
|
5503
5431
|
z.literal("primary")
|
|
5504
5432
|
]);
|
|
5505
|
-
var
|
|
5506
|
-
text: z.string()
|
|
5507
|
-
context: contextSchema,
|
|
5508
|
-
tag: z.string().optional()
|
|
5509
|
-
});
|
|
5510
|
-
var formLayoutSchemaReferenceSchema = z.object({
|
|
5511
|
-
$ref: z.string()
|
|
5512
|
-
});
|
|
5513
|
-
var modalLayoutTriggerSchema = z.object({
|
|
5514
|
-
title: z.string()
|
|
5515
|
-
});
|
|
5516
|
-
var instructionsLayoutSchema = z.object({
|
|
5517
|
-
type: z.literal("instructions"),
|
|
5518
|
-
title: z.string().optional(),
|
|
5519
|
-
items: z.array(instructionsLayoutItemSchema),
|
|
5520
|
-
control: z.string().optional(),
|
|
5521
|
-
margin: sizeSchema.optional()
|
|
5522
|
-
});
|
|
5523
|
-
var reviewLayoutFieldSchema = z.object({
|
|
5524
|
-
label: z.string(),
|
|
5525
|
-
value: z.string(),
|
|
5526
|
-
rawValue: z.string().optional(),
|
|
5527
|
-
help: helpSchema.optional(),
|
|
5528
|
-
tag: z.string().optional()
|
|
5529
|
-
});
|
|
5530
|
-
var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
|
|
5531
|
-
var searchLayoutSchema = z.object({
|
|
5532
|
-
type: z.literal("search"),
|
|
5533
|
-
title: z.string(),
|
|
5534
|
-
method: httpMethodSchema,
|
|
5535
|
-
url: z.string(),
|
|
5536
|
-
param: z.string(),
|
|
5537
|
-
emptyMessage: z.string().optional(),
|
|
5538
|
-
control: z.string().optional(),
|
|
5539
|
-
margin: sizeSchema.optional()
|
|
5540
|
-
});
|
|
5541
|
-
var headingLayoutSchema = z.object({
|
|
5542
|
-
type: z.literal("heading"),
|
|
5543
|
-
text: z.string(),
|
|
5544
|
-
size: sizeSchema.optional(),
|
|
5545
|
-
align: alignSchema.optional(),
|
|
5546
|
-
control: z.string().optional(),
|
|
5547
|
-
margin: sizeSchema.optional()
|
|
5548
|
-
});
|
|
5549
|
-
var imageLayoutSchema = z.object({
|
|
5550
|
-
type: z.literal("image"),
|
|
5551
|
-
text: z.string().optional(),
|
|
5552
|
-
url: z.string().optional(),
|
|
5553
|
-
accessibilityDescription: z.string().optional(),
|
|
5554
|
-
content: imageSchema.optional(),
|
|
5555
|
-
size: sizeSchema.optional(),
|
|
5556
|
-
control: z.string().optional(),
|
|
5557
|
-
margin: sizeSchema.optional()
|
|
5558
|
-
});
|
|
5559
|
-
var markdownLayoutSchema = z.object({
|
|
5560
|
-
type: z.literal("markdown"),
|
|
5561
|
-
content: z.string(),
|
|
5562
|
-
align: alignSchema.optional(),
|
|
5563
|
-
control: z.string().optional(),
|
|
5564
|
-
margin: sizeSchema.optional()
|
|
5565
|
-
});
|
|
5566
|
-
var paragraphLayoutSchema = z.object({
|
|
5567
|
-
type: z.literal("paragraph"),
|
|
5568
|
-
text: z.string(),
|
|
5569
|
-
align: alignSchema.optional(),
|
|
5570
|
-
control: z.string().optional(),
|
|
5571
|
-
margin: sizeSchema.optional()
|
|
5433
|
+
var iconTextSchema = z.object({
|
|
5434
|
+
text: z.string()
|
|
5572
5435
|
});
|
|
5573
|
-
var
|
|
5574
|
-
z.literal("
|
|
5575
|
-
z.literal("
|
|
5576
|
-
z.literal("
|
|
5436
|
+
var sizeSchema = z.union([
|
|
5437
|
+
z.literal("xs"),
|
|
5438
|
+
z.literal("sm"),
|
|
5439
|
+
z.literal("md"),
|
|
5440
|
+
z.literal("lg"),
|
|
5441
|
+
z.literal("xl")
|
|
5577
5442
|
]);
|
|
5578
|
-
var
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
var
|
|
5586
|
-
url: z.string(),
|
|
5587
|
-
method: httpMethodSchema,
|
|
5588
|
-
param: z.string(),
|
|
5589
|
-
query: z.string()
|
|
5590
|
-
});
|
|
5443
|
+
var autocapitalizationTypeSchema = z.union([
|
|
5444
|
+
z.literal("none"),
|
|
5445
|
+
z.literal("characters"),
|
|
5446
|
+
z.literal("sentences"),
|
|
5447
|
+
z.literal("words")
|
|
5448
|
+
]);
|
|
5449
|
+
var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
|
|
5450
|
+
var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
5591
5451
|
var autocompleteTokenSchema = z.union([
|
|
5592
5452
|
z.literal("on"),
|
|
5593
5453
|
z.literal("name"),
|
|
@@ -5653,17 +5513,124 @@ var autocompleteTokenSchema = z.union([
|
|
|
5653
5513
|
z.literal("fax"),
|
|
5654
5514
|
z.literal("pager")
|
|
5655
5515
|
]);
|
|
5656
|
-
var
|
|
5516
|
+
var loadingIndicatorLayoutSchema = z.object({
|
|
5517
|
+
type: z.literal("loading-indicator"),
|
|
5518
|
+
size: sizeSchema.optional(),
|
|
5519
|
+
control: z.string().optional(),
|
|
5520
|
+
margin: sizeSchema.optional()
|
|
5521
|
+
});
|
|
5522
|
+
var paragraphLayoutSchema = z.object({
|
|
5523
|
+
type: z.literal("paragraph"),
|
|
5524
|
+
text: z.string(),
|
|
5525
|
+
align: alignSchema.optional(),
|
|
5526
|
+
control: z.string().optional(),
|
|
5527
|
+
margin: sizeSchema.optional()
|
|
5528
|
+
});
|
|
5529
|
+
var dividerLayoutSchema = z.object({
|
|
5530
|
+
type: z.literal("divider"),
|
|
5531
|
+
control: z.string().optional(),
|
|
5532
|
+
margin: sizeSchema.optional()
|
|
5533
|
+
});
|
|
5534
|
+
var listLayoutStatusSchema = z.union([
|
|
5535
|
+
z.literal("warning"),
|
|
5536
|
+
z.literal("neutral"),
|
|
5537
|
+
z.literal("positive")
|
|
5538
|
+
]);
|
|
5539
|
+
var formLayoutSchemaReferenceSchema = z.object({
|
|
5540
|
+
$ref: z.string()
|
|
5541
|
+
});
|
|
5542
|
+
var imageLayoutSchema = z.object({
|
|
5543
|
+
type: z.literal("image"),
|
|
5544
|
+
text: z.string().optional(),
|
|
5545
|
+
url: z.string().optional(),
|
|
5546
|
+
accessibilityDescription: z.string().optional(),
|
|
5547
|
+
content: imageSchema.optional(),
|
|
5548
|
+
size: sizeSchema.optional(),
|
|
5549
|
+
control: z.string().optional(),
|
|
5550
|
+
margin: sizeSchema.optional(),
|
|
5551
|
+
align: alignSchema.optional()
|
|
5552
|
+
});
|
|
5553
|
+
var statusListLayoutStatusSchema = z.union([
|
|
5554
|
+
z.literal("not-done"),
|
|
5555
|
+
z.literal("pending"),
|
|
5556
|
+
z.literal("done")
|
|
5557
|
+
]);
|
|
5558
|
+
var instructionsLayoutItemSchema = z.object({
|
|
5559
|
+
text: z.string(),
|
|
5560
|
+
context: contextSchema,
|
|
5561
|
+
tag: z.string().optional()
|
|
5562
|
+
});
|
|
5563
|
+
var modalLayoutTriggerSchema = z.object({
|
|
5564
|
+
title: z.string()
|
|
5565
|
+
});
|
|
5566
|
+
var searchLayoutSchema = z.object({
|
|
5567
|
+
type: z.literal("search"),
|
|
5568
|
+
title: z.string(),
|
|
5569
|
+
method: httpMethodSchema,
|
|
5570
|
+
url: z.string(),
|
|
5571
|
+
param: z.string(),
|
|
5572
|
+
emptyMessage: z.string().optional(),
|
|
5573
|
+
control: z.string().optional(),
|
|
5574
|
+
margin: sizeSchema.optional()
|
|
5575
|
+
});
|
|
5576
|
+
var infoLayoutSchema = z.object({
|
|
5577
|
+
type: z.literal("info"),
|
|
5578
|
+
markdown: z.string(),
|
|
5579
|
+
align: alignSchema.optional(),
|
|
5580
|
+
control: z.string().optional(),
|
|
5581
|
+
margin: sizeSchema.optional()
|
|
5582
|
+
});
|
|
5583
|
+
var formLayoutSchema = z.object({
|
|
5584
|
+
type: z.literal("form"),
|
|
5585
|
+
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
5586
|
+
schemaId: z.string(),
|
|
5587
|
+
control: z.string().optional(),
|
|
5588
|
+
margin: sizeSchema.optional()
|
|
5589
|
+
});
|
|
5590
|
+
var headingLayoutSchema = z.object({
|
|
5591
|
+
type: z.literal("heading"),
|
|
5592
|
+
text: z.string(),
|
|
5593
|
+
size: sizeSchema.optional(),
|
|
5594
|
+
align: alignSchema.optional(),
|
|
5595
|
+
control: z.string().optional(),
|
|
5596
|
+
margin: sizeSchema.optional()
|
|
5597
|
+
});
|
|
5598
|
+
var markdownLayoutSchema = z.object({
|
|
5599
|
+
type: z.literal("markdown"),
|
|
5600
|
+
content: z.string(),
|
|
5601
|
+
align: alignSchema.optional(),
|
|
5602
|
+
control: z.string().optional(),
|
|
5603
|
+
margin: sizeSchema.optional()
|
|
5604
|
+
});
|
|
5605
|
+
var columnsLayoutBiasSchema = z.union([
|
|
5657
5606
|
z.literal("none"),
|
|
5658
|
-
z.literal("
|
|
5659
|
-
z.literal("
|
|
5660
|
-
z.literal("words")
|
|
5607
|
+
z.literal("left"),
|
|
5608
|
+
z.literal("right")
|
|
5661
5609
|
]);
|
|
5662
|
-
var
|
|
5663
|
-
|
|
5610
|
+
var helpSchema = z.object({
|
|
5611
|
+
markdown: z.string()
|
|
5664
5612
|
});
|
|
5665
|
-
var
|
|
5666
|
-
|
|
5613
|
+
var searchSearchRequestSchema = z.object({
|
|
5614
|
+
url: z.string(),
|
|
5615
|
+
method: httpMethodSchema,
|
|
5616
|
+
param: z.string(),
|
|
5617
|
+
query: z.string()
|
|
5618
|
+
});
|
|
5619
|
+
var jsonElementSchema = z.lazy(
|
|
5620
|
+
() => z.union([
|
|
5621
|
+
z.string(),
|
|
5622
|
+
z.number(),
|
|
5623
|
+
z.boolean(),
|
|
5624
|
+
z.record(jsonElementSchema),
|
|
5625
|
+
z.array(jsonElementSchema)
|
|
5626
|
+
]).nullable()
|
|
5627
|
+
);
|
|
5628
|
+
var externalSchema = z.object({
|
|
5629
|
+
url: z.string()
|
|
5630
|
+
});
|
|
5631
|
+
var stepErrorSchema = z.object({
|
|
5632
|
+
error: z.string().optional(),
|
|
5633
|
+
validation: jsonElementSchema.optional()
|
|
5667
5634
|
});
|
|
5668
5635
|
var stringSchemaFormatSchema = z.union([
|
|
5669
5636
|
z.literal("date"),
|
|
@@ -5673,9 +5640,55 @@ var stringSchemaFormatSchema = z.union([
|
|
|
5673
5640
|
z.literal("phone-number"),
|
|
5674
5641
|
z.literal("base64url")
|
|
5675
5642
|
]);
|
|
5676
|
-
var
|
|
5677
|
-
|
|
5678
|
-
|
|
5643
|
+
var summarySummariserSchema = z.object({
|
|
5644
|
+
defaultTitle: z.string().optional(),
|
|
5645
|
+
defaultDescription: z.string().optional(),
|
|
5646
|
+
defaultIcon: iconSchema.optional(),
|
|
5647
|
+
defaultImage: imageSchema.optional(),
|
|
5648
|
+
providesTitle: z.boolean().optional(),
|
|
5649
|
+
providesDescription: z.boolean().optional(),
|
|
5650
|
+
providesIcon: z.boolean().optional(),
|
|
5651
|
+
providesImage: z.boolean().optional()
|
|
5652
|
+
});
|
|
5653
|
+
var validateAsyncSchema = z.object({
|
|
5654
|
+
param: z.string(),
|
|
5655
|
+
method: httpMethodSchema,
|
|
5656
|
+
url: z.string()
|
|
5657
|
+
});
|
|
5658
|
+
var summaryProviderSchema = z.object({
|
|
5659
|
+
providesTitle: z.boolean().optional(),
|
|
5660
|
+
providesDescription: z.boolean().optional(),
|
|
5661
|
+
providesIcon: z.boolean().optional(),
|
|
5662
|
+
providesImage: z.boolean().optional()
|
|
5663
|
+
});
|
|
5664
|
+
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
5665
|
+
var suggestionsValueSchema = z.object({
|
|
5666
|
+
label: z.string(),
|
|
5667
|
+
value: jsonElementSchema.optional(),
|
|
5668
|
+
icon: iconSchema.optional(),
|
|
5669
|
+
image: imageSchema.optional(),
|
|
5670
|
+
tag: z.string().optional()
|
|
5671
|
+
});
|
|
5672
|
+
var navigationStackBehaviorSchema = z.union([
|
|
5673
|
+
z.literal("default"),
|
|
5674
|
+
z.literal("remove-previous"),
|
|
5675
|
+
z.literal("remove-all"),
|
|
5676
|
+
z.literal("replace-current")
|
|
5677
|
+
]);
|
|
5678
|
+
var actionTypeSchema = z.union([
|
|
5679
|
+
z.literal("primary"),
|
|
5680
|
+
z.literal("secondary"),
|
|
5681
|
+
z.literal("link"),
|
|
5682
|
+
z.literal("positive"),
|
|
5683
|
+
z.literal("negative")
|
|
5684
|
+
]);
|
|
5685
|
+
var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
5686
|
+
var linkBehaviorSchema = z.object({
|
|
5687
|
+
type: z.literal("link"),
|
|
5688
|
+
url: z.string()
|
|
5689
|
+
});
|
|
5690
|
+
var linkSchema = z.object({
|
|
5691
|
+
url: z.string()
|
|
5679
5692
|
});
|
|
5680
5693
|
var actionSchema = z.object({
|
|
5681
5694
|
title: z.string().optional(),
|
|
@@ -5692,21 +5705,6 @@ var actionSchema = z.object({
|
|
|
5692
5705
|
timeout: z.number().optional(),
|
|
5693
5706
|
skipValidation: z.boolean().optional()
|
|
5694
5707
|
});
|
|
5695
|
-
var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
5696
|
-
var formLayoutSchema = z.object({
|
|
5697
|
-
type: z.literal("form"),
|
|
5698
|
-
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
5699
|
-
schemaId: z.string(),
|
|
5700
|
-
control: z.string().optional(),
|
|
5701
|
-
margin: sizeSchema.optional()
|
|
5702
|
-
});
|
|
5703
|
-
var infoLayoutSchema = z.object({
|
|
5704
|
-
type: z.literal("info"),
|
|
5705
|
-
markdown: z.string(),
|
|
5706
|
-
align: alignSchema.optional(),
|
|
5707
|
-
control: z.string().optional(),
|
|
5708
|
-
margin: sizeSchema.optional()
|
|
5709
|
-
});
|
|
5710
5708
|
var listLayoutItemSchema = z.object({
|
|
5711
5709
|
description: z.string().optional(),
|
|
5712
5710
|
status: listLayoutStatusSchema.optional(),
|
|
@@ -5718,16 +5716,19 @@ var listLayoutItemSchema = z.object({
|
|
|
5718
5716
|
subvalue: z.string().optional(),
|
|
5719
5717
|
tag: z.string().optional()
|
|
5720
5718
|
});
|
|
5721
|
-
var
|
|
5722
|
-
|
|
5719
|
+
var instructionsLayoutSchema = z.object({
|
|
5720
|
+
type: z.literal("instructions"),
|
|
5721
|
+
title: z.string().optional(),
|
|
5722
|
+
items: z.array(instructionsLayoutItemSchema),
|
|
5723
|
+
control: z.string().optional(),
|
|
5724
|
+
margin: sizeSchema.optional()
|
|
5723
5725
|
});
|
|
5724
|
-
var
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
value: actionSchema
|
|
5726
|
+
var reviewLayoutFieldSchema = z.object({
|
|
5727
|
+
label: z.string(),
|
|
5728
|
+
value: z.string(),
|
|
5729
|
+
rawValue: z.string().optional(),
|
|
5730
|
+
help: helpSchema.optional(),
|
|
5731
|
+
tag: z.string().optional()
|
|
5731
5732
|
});
|
|
5732
5733
|
var searchResultSearchSchema = z.object({
|
|
5733
5734
|
type: z.literal("search"),
|
|
@@ -5737,59 +5738,54 @@ var searchResultSearchSchema = z.object({
|
|
|
5737
5738
|
image: imageSchema.optional(),
|
|
5738
5739
|
value: searchSearchRequestSchema
|
|
5739
5740
|
});
|
|
5740
|
-
var
|
|
5741
|
+
var searchResultActionSchema = z.object({
|
|
5741
5742
|
type: z.literal("action"),
|
|
5743
|
+
title: z.string(),
|
|
5744
|
+
description: z.string().optional(),
|
|
5745
|
+
icon: iconSchema.optional(),
|
|
5746
|
+
image: imageSchema.optional(),
|
|
5747
|
+
value: actionSchema
|
|
5748
|
+
});
|
|
5749
|
+
var actionResponseBodySchema = z.object({
|
|
5742
5750
|
action: actionSchema
|
|
5743
5751
|
});
|
|
5744
|
-
var
|
|
5745
|
-
|
|
5746
|
-
|
|
5752
|
+
var errorResponseBodySchema = z.object({
|
|
5753
|
+
refreshFormUrl: z.string().optional(),
|
|
5754
|
+
analytics: z.record(z.string()).optional(),
|
|
5755
|
+
error: z.string().optional(),
|
|
5756
|
+
validation: jsonElementSchema.optional(),
|
|
5757
|
+
refreshUrl: z.string().optional()
|
|
5758
|
+
});
|
|
5759
|
+
var suggestionsSchema = z.object({
|
|
5760
|
+
values: z.array(suggestionsValueSchema)
|
|
5747
5761
|
});
|
|
5748
5762
|
var navigationBackBehaviorSchema = z.object({
|
|
5749
5763
|
title: z.string().optional(),
|
|
5750
5764
|
action: actionSchema
|
|
5751
5765
|
});
|
|
5752
|
-
var
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
defaultIcon: iconSchema.optional(),
|
|
5756
|
-
defaultImage: imageSchema.optional(),
|
|
5757
|
-
providesTitle: z.boolean().optional(),
|
|
5758
|
-
providesDescription: z.boolean().optional(),
|
|
5759
|
-
providesIcon: z.boolean().optional(),
|
|
5760
|
-
providesImage: z.boolean().optional()
|
|
5766
|
+
var actionBehaviorSchema = z.object({
|
|
5767
|
+
type: z.literal("action"),
|
|
5768
|
+
action: actionSchema
|
|
5761
5769
|
});
|
|
5762
|
-
var
|
|
5763
|
-
|
|
5764
|
-
|
|
5770
|
+
var containerBehaviorSchema = z.object({
|
|
5771
|
+
action: actionSchema.optional(),
|
|
5772
|
+
link: linkSchema.optional()
|
|
5765
5773
|
});
|
|
5766
5774
|
var behaviorSchema = z.union([
|
|
5767
5775
|
actionBehaviorSchema,
|
|
5768
5776
|
containerBehaviorSchema,
|
|
5769
5777
|
linkBehaviorSchema
|
|
5770
5778
|
]);
|
|
5771
|
-
var
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
});
|
|
5776
|
-
var linkHandlerSchema = z.object({
|
|
5777
|
-
regexPattern: z.string(),
|
|
5778
|
-
behavior: behaviorSchema.optional()
|
|
5779
|
-
});
|
|
5780
|
-
var pollingOnErrorSchema = z.object({
|
|
5781
|
-
action: actionSchema.optional(),
|
|
5782
|
-
behavior: behaviorSchema.optional()
|
|
5779
|
+
var alertLayoutCallToActionSchema = z.object({
|
|
5780
|
+
title: z.string(),
|
|
5781
|
+
accessibilityDescription: z.string().optional(),
|
|
5782
|
+
behavior: behaviorSchema
|
|
5783
5783
|
});
|
|
5784
|
-
var
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
timeout: z.number().optional(),
|
|
5789
|
-
maxAttempts: z.number(),
|
|
5790
|
-
onError: pollingOnErrorSchema
|
|
5784
|
+
var listLayoutCallToActionSchema = z.object({
|
|
5785
|
+
title: z.string(),
|
|
5786
|
+
accessibilityDescription: z.string().optional(),
|
|
5787
|
+
behavior: behaviorSchema
|
|
5791
5788
|
});
|
|
5792
|
-
var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
5793
5789
|
var decisionLayoutOptionSchema = z.object({
|
|
5794
5790
|
action: actionSchema.optional(),
|
|
5795
5791
|
title: z.string(),
|
|
@@ -5800,6 +5796,11 @@ var decisionLayoutOptionSchema = z.object({
|
|
|
5800
5796
|
behavior: behaviorSchema.optional(),
|
|
5801
5797
|
tag: z.string().optional()
|
|
5802
5798
|
});
|
|
5799
|
+
var itemCallToActionSchema = z.object({
|
|
5800
|
+
title: z.string(),
|
|
5801
|
+
accessibilityDescription: z.string().optional(),
|
|
5802
|
+
behavior: behaviorSchema
|
|
5803
|
+
});
|
|
5803
5804
|
var buttonLayoutSchema = z.object({
|
|
5804
5805
|
type: z.literal("button"),
|
|
5805
5806
|
action: actionSchema.optional(),
|
|
@@ -5812,21 +5813,25 @@ var buttonLayoutSchema = z.object({
|
|
|
5812
5813
|
control: z.string().optional(),
|
|
5813
5814
|
margin: sizeSchema.optional()
|
|
5814
5815
|
});
|
|
5815
|
-
var
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
accessibilityDescription: z.string().optional(),
|
|
5816
|
+
var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
5817
|
+
var linkHandlerSchema = z.object({
|
|
5818
|
+
regexPattern: z.string(),
|
|
5819
5819
|
behavior: behaviorSchema.optional()
|
|
5820
5820
|
});
|
|
5821
|
-
var
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
5821
|
+
var navigationSchema = z.object({
|
|
5822
|
+
backButton: navigationBackBehaviorSchema.optional(),
|
|
5823
|
+
back: navigationBackBehaviorSchema.optional(),
|
|
5824
|
+
stackBehavior: navigationStackBehaviorSchema.optional()
|
|
5825
5825
|
});
|
|
5826
|
-
var
|
|
5826
|
+
var pollingOnErrorSchema = z.object({
|
|
5827
|
+
action: actionSchema.optional(),
|
|
5828
|
+
behavior: behaviorSchema.optional()
|
|
5829
|
+
});
|
|
5830
|
+
var reviewLayoutCallToActionSchema = z.object({
|
|
5831
|
+
action: actionSchema.optional(),
|
|
5827
5832
|
title: z.string(),
|
|
5828
5833
|
accessibilityDescription: z.string().optional(),
|
|
5829
|
-
behavior: behaviorSchema
|
|
5834
|
+
behavior: behaviorSchema.optional()
|
|
5830
5835
|
});
|
|
5831
5836
|
var alertLayoutSchema = z.object({
|
|
5832
5837
|
type: z.literal("alert"),
|
|
@@ -5836,10 +5841,13 @@ var alertLayoutSchema = z.object({
|
|
|
5836
5841
|
margin: sizeSchema.optional(),
|
|
5837
5842
|
callToAction: alertLayoutCallToActionSchema.optional()
|
|
5838
5843
|
});
|
|
5839
|
-
var
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5844
|
+
var listLayoutSchema = z.object({
|
|
5845
|
+
type: z.literal("list"),
|
|
5846
|
+
title: z.string().optional(),
|
|
5847
|
+
callToAction: listLayoutCallToActionSchema.optional(),
|
|
5848
|
+
items: z.array(listLayoutItemSchema),
|
|
5849
|
+
control: z.string().optional(),
|
|
5850
|
+
margin: sizeSchema.optional()
|
|
5843
5851
|
});
|
|
5844
5852
|
var decisionLayoutSchema = z.object({
|
|
5845
5853
|
type: z.literal("decision"),
|
|
@@ -5848,29 +5856,34 @@ var decisionLayoutSchema = z.object({
|
|
|
5848
5856
|
control: z.string().optional(),
|
|
5849
5857
|
margin: sizeSchema.optional()
|
|
5850
5858
|
});
|
|
5851
|
-
var
|
|
5852
|
-
|
|
5859
|
+
var statusListLayoutItemSchema = z.object({
|
|
5860
|
+
title: z.string(),
|
|
5861
|
+
description: z.string().optional(),
|
|
5862
|
+
icon: iconSchema,
|
|
5863
|
+
status: statusListLayoutStatusSchema.optional(),
|
|
5864
|
+
callToAction: itemCallToActionSchema.optional(),
|
|
5865
|
+
tag: z.string().optional()
|
|
5866
|
+
});
|
|
5867
|
+
var reviewLayoutSchema = z.object({
|
|
5868
|
+
type: z.literal("review"),
|
|
5869
|
+
orientation: z.string().optional(),
|
|
5870
|
+
action: actionSchema.optional(),
|
|
5871
|
+
fields: z.array(reviewLayoutFieldSchema),
|
|
5853
5872
|
title: z.string().optional(),
|
|
5854
|
-
callToAction:
|
|
5855
|
-
items: z.array(listLayoutItemSchema),
|
|
5873
|
+
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
5856
5874
|
control: z.string().optional(),
|
|
5857
5875
|
margin: sizeSchema.optional()
|
|
5858
5876
|
});
|
|
5859
|
-
var
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
image: imageSchema.optional(),
|
|
5870
|
-
keywords: z.array(z.string()).optional(),
|
|
5871
|
-
summary: summaryProviderSchema.optional(),
|
|
5872
|
-
analyticsId: z.string().optional(),
|
|
5873
|
-
disabled: z.boolean().optional()
|
|
5877
|
+
var searchResponseBodySchema = z.object({
|
|
5878
|
+
results: z.array(searchResultSchema)
|
|
5879
|
+
});
|
|
5880
|
+
var pollingSchema = z.object({
|
|
5881
|
+
interval: z.number().optional(),
|
|
5882
|
+
url: z.string(),
|
|
5883
|
+
delay: z.number().optional(),
|
|
5884
|
+
timeout: z.number().optional(),
|
|
5885
|
+
maxAttempts: z.number(),
|
|
5886
|
+
onError: pollingOnErrorSchema
|
|
5874
5887
|
});
|
|
5875
5888
|
var blobSchemaSchema = z.object({
|
|
5876
5889
|
type: z.literal("blob"),
|
|
@@ -5894,64 +5907,29 @@ var blobSchemaSchema = z.object({
|
|
|
5894
5907
|
source: uploadSourceSchema.optional(),
|
|
5895
5908
|
disabled: z.boolean().optional()
|
|
5896
5909
|
});
|
|
5897
|
-
var
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
action: actionSchema.optional(),
|
|
5901
|
-
fields: z.array(reviewLayoutFieldSchema),
|
|
5902
|
-
title: z.string().optional(),
|
|
5903
|
-
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
5910
|
+
var constSchemaSchema = z.object({
|
|
5911
|
+
hidden: z.boolean().optional(),
|
|
5912
|
+
alert: alertLayoutSchema.optional(),
|
|
5904
5913
|
control: z.string().optional(),
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
title: z.string(),
|
|
5914
|
+
promoted: z.boolean().optional(),
|
|
5915
|
+
$id: z.string().optional(),
|
|
5916
|
+
const: jsonElementSchema,
|
|
5917
|
+
title: z.string().optional(),
|
|
5909
5918
|
description: z.string().optional(),
|
|
5910
|
-
icon: iconSchema,
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5919
|
+
icon: iconSchema.optional(),
|
|
5920
|
+
image: imageSchema.optional(),
|
|
5921
|
+
keywords: z.array(z.string()).optional(),
|
|
5922
|
+
summary: summaryProviderSchema.optional(),
|
|
5923
|
+
analyticsId: z.string().optional(),
|
|
5924
|
+
disabled: z.boolean().optional()
|
|
5914
5925
|
});
|
|
5915
5926
|
var statusListLayoutSchema = z.object({
|
|
5916
5927
|
type: z.literal("status-list"),
|
|
5917
5928
|
items: z.array(statusListLayoutItemSchema),
|
|
5918
5929
|
title: z.string().optional(),
|
|
5919
5930
|
control: z.string().optional(),
|
|
5920
|
-
margin: sizeSchema.optional()
|
|
5921
|
-
});
|
|
5922
|
-
var persistAsyncSchema = z.lazy(
|
|
5923
|
-
() => z.object({
|
|
5924
|
-
param: z.string(),
|
|
5925
|
-
idProperty: z.string(),
|
|
5926
|
-
schema: schemaSchema,
|
|
5927
|
-
url: z.string(),
|
|
5928
|
-
method: httpMethodSchema
|
|
5929
|
-
})
|
|
5930
|
-
);
|
|
5931
|
-
var schemaSchema = z.lazy(
|
|
5932
|
-
() => z.union([
|
|
5933
|
-
allOfSchemaSchema,
|
|
5934
|
-
arraySchemaSchema,
|
|
5935
|
-
blobSchemaSchema,
|
|
5936
|
-
booleanSchemaSchema,
|
|
5937
|
-
constSchemaSchema,
|
|
5938
|
-
integerSchemaSchema,
|
|
5939
|
-
numberSchemaSchema,
|
|
5940
|
-
objectSchemaSchema,
|
|
5941
|
-
oneOfSchemaSchema,
|
|
5942
|
-
stringSchemaSchema
|
|
5943
|
-
])
|
|
5944
|
-
);
|
|
5945
|
-
var columnsLayoutSchema = z.lazy(
|
|
5946
|
-
() => z.object({
|
|
5947
|
-
type: z.literal("columns"),
|
|
5948
|
-
left: z.array(layoutSchema),
|
|
5949
|
-
right: z.array(layoutSchema),
|
|
5950
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
5951
|
-
control: z.string().optional(),
|
|
5952
|
-
margin: sizeSchema.optional()
|
|
5953
|
-
})
|
|
5954
|
-
);
|
|
5931
|
+
margin: sizeSchema.optional()
|
|
5932
|
+
});
|
|
5955
5933
|
var layoutSchema = z.lazy(
|
|
5956
5934
|
() => z.union([
|
|
5957
5935
|
alertLayoutSchema,
|
|
@@ -5975,12 +5953,6 @@ var layoutSchema = z.lazy(
|
|
|
5975
5953
|
statusListLayoutSchema
|
|
5976
5954
|
])
|
|
5977
5955
|
);
|
|
5978
|
-
var modalLayoutContentSchema = z.lazy(
|
|
5979
|
-
() => z.object({
|
|
5980
|
-
title: z.string().optional(),
|
|
5981
|
-
components: z.array(layoutSchema)
|
|
5982
|
-
})
|
|
5983
|
-
);
|
|
5984
5956
|
var boxLayoutSchema = z.lazy(
|
|
5985
5957
|
() => z.object({
|
|
5986
5958
|
type: z.literal("box"),
|
|
@@ -5991,6 +5963,16 @@ var boxLayoutSchema = z.lazy(
|
|
|
5991
5963
|
margin: sizeSchema.optional()
|
|
5992
5964
|
})
|
|
5993
5965
|
);
|
|
5966
|
+
var columnsLayoutSchema = z.lazy(
|
|
5967
|
+
() => z.object({
|
|
5968
|
+
type: z.literal("columns"),
|
|
5969
|
+
left: z.array(layoutSchema),
|
|
5970
|
+
right: z.array(layoutSchema),
|
|
5971
|
+
bias: columnsLayoutBiasSchema.optional(),
|
|
5972
|
+
control: z.string().optional(),
|
|
5973
|
+
margin: sizeSchema.optional()
|
|
5974
|
+
})
|
|
5975
|
+
);
|
|
5994
5976
|
var modalLayoutSchema = z.lazy(
|
|
5995
5977
|
() => z.object({
|
|
5996
5978
|
type: z.literal("modal"),
|
|
@@ -6000,6 +5982,12 @@ var modalLayoutSchema = z.lazy(
|
|
|
6000
5982
|
content: modalLayoutContentSchema
|
|
6001
5983
|
})
|
|
6002
5984
|
);
|
|
5985
|
+
var modalLayoutContentSchema = z.lazy(
|
|
5986
|
+
() => z.object({
|
|
5987
|
+
title: z.string().optional(),
|
|
5988
|
+
components: z.array(layoutSchema)
|
|
5989
|
+
})
|
|
5990
|
+
);
|
|
6003
5991
|
var stepSchema = z.lazy(
|
|
6004
5992
|
() => z.object({
|
|
6005
5993
|
key: z.string().optional(),
|
|
@@ -6019,33 +6007,58 @@ var stepSchema = z.lazy(
|
|
|
6019
6007
|
errors: stepErrorSchema.optional(),
|
|
6020
6008
|
navigation: navigationSchema.optional(),
|
|
6021
6009
|
refreshUrl: z.string().optional(),
|
|
6022
|
-
|
|
6023
|
-
|
|
6010
|
+
control: z.string().optional(),
|
|
6011
|
+
refreshAfter: z.string().optional()
|
|
6024
6012
|
})
|
|
6025
6013
|
);
|
|
6026
|
-
var
|
|
6014
|
+
var schemaSchema = z.lazy(
|
|
6015
|
+
() => z.union([
|
|
6016
|
+
allOfSchemaSchema,
|
|
6017
|
+
arraySchemaSchema,
|
|
6018
|
+
blobSchemaSchema,
|
|
6019
|
+
booleanSchemaSchema,
|
|
6020
|
+
constSchemaSchema,
|
|
6021
|
+
integerSchemaSchema,
|
|
6022
|
+
numberSchemaSchema,
|
|
6023
|
+
objectSchemaSchema,
|
|
6024
|
+
oneOfSchemaSchema,
|
|
6025
|
+
stringSchemaSchema
|
|
6026
|
+
])
|
|
6027
|
+
);
|
|
6028
|
+
var allOfSchemaSchema = z.lazy(
|
|
6027
6029
|
() => z.object({
|
|
6028
|
-
|
|
6030
|
+
disabled: z.boolean().optional(),
|
|
6031
|
+
promoted: z.boolean().optional(),
|
|
6032
|
+
allOf: z.array(schemaSchema),
|
|
6033
|
+
$id: z.string().optional(),
|
|
6034
|
+
title: z.string().optional(),
|
|
6035
|
+
description: z.string().optional(),
|
|
6036
|
+
control: z.string().optional(),
|
|
6037
|
+
hidden: z.boolean().optional(),
|
|
6038
|
+
icon: iconSchema.optional(),
|
|
6039
|
+
image: imageSchema.optional(),
|
|
6040
|
+
keywords: z.array(z.string()).optional(),
|
|
6041
|
+
summary: summaryProviderSchema.optional(),
|
|
6042
|
+
analyticsId: z.string().optional(),
|
|
6043
|
+
alert: alertLayoutSchema.optional()
|
|
6044
|
+
})
|
|
6045
|
+
);
|
|
6046
|
+
var arraySchemaSchema = z.lazy(
|
|
6047
|
+
() => z.union([arraySchemaListSchema, arraySchemaTupleSchema])
|
|
6048
|
+
);
|
|
6049
|
+
var booleanSchemaSchema = z.lazy(
|
|
6050
|
+
() => z.object({
|
|
6051
|
+
type: z.literal("boolean"),
|
|
6029
6052
|
autofillProvider: z.string().optional(),
|
|
6030
6053
|
promoted: z.boolean().optional(),
|
|
6031
6054
|
refreshFormOnChange: z.boolean().optional(),
|
|
6032
6055
|
refreshUrl: z.string().optional(),
|
|
6033
6056
|
refreshFormUrl: z.string().optional(),
|
|
6034
|
-
format: stringSchemaFormatSchema.optional(),
|
|
6035
|
-
displayFormat: z.string().optional(),
|
|
6036
|
-
placeholder: z.string().optional(),
|
|
6037
|
-
minLength: z.number().optional(),
|
|
6038
|
-
maxLength: z.number().optional(),
|
|
6039
|
-
minimum: z.string().optional(),
|
|
6040
|
-
maximum: z.string().optional(),
|
|
6041
|
-
pattern: z.string().optional(),
|
|
6042
|
-
autocapitalization: autocapitalizationTypeSchema.optional(),
|
|
6043
|
-
autocorrect: z.boolean().optional(),
|
|
6044
6057
|
$id: z.string().optional(),
|
|
6045
6058
|
title: z.string().optional(),
|
|
6046
6059
|
description: z.string().optional(),
|
|
6047
6060
|
control: z.string().optional(),
|
|
6048
|
-
default: z.
|
|
6061
|
+
default: z.boolean().optional(),
|
|
6049
6062
|
hidden: z.boolean().optional(),
|
|
6050
6063
|
disabled: z.boolean().optional(),
|
|
6051
6064
|
icon: iconSchema.optional(),
|
|
@@ -6056,45 +6069,42 @@ var stringSchemaSchema = z.lazy(
|
|
|
6056
6069
|
persistAsync: persistAsyncSchema.optional(),
|
|
6057
6070
|
refreshStepOnChange: z.boolean().optional(),
|
|
6058
6071
|
validationAsync: validateAsyncSchema.optional(),
|
|
6059
|
-
validationMessages: z.record(z.string()).optional(),
|
|
6060
6072
|
alert: alertLayoutSchema.optional(),
|
|
6061
|
-
cameraConfig: jsonElementSchema.optional(),
|
|
6062
|
-
accepts: z.array(z.string()).optional(),
|
|
6063
|
-
maxSize: z.number().optional(),
|
|
6064
|
-
source: uploadSourceSchema.optional(),
|
|
6065
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
6066
6073
|
autofillKey: z.string().optional(),
|
|
6067
6074
|
help: helpSchema.optional()
|
|
6068
6075
|
})
|
|
6069
6076
|
);
|
|
6070
|
-
var
|
|
6077
|
+
var integerSchemaSchema = z.lazy(
|
|
6071
6078
|
() => z.object({
|
|
6079
|
+
type: z.literal("integer"),
|
|
6072
6080
|
autofillProvider: z.string().optional(),
|
|
6073
6081
|
promoted: z.boolean().optional(),
|
|
6074
6082
|
refreshFormOnChange: z.boolean().optional(),
|
|
6075
6083
|
refreshUrl: z.string().optional(),
|
|
6076
6084
|
refreshFormUrl: z.string().optional(),
|
|
6077
|
-
promotion: jsonElementSchema.optional(),
|
|
6078
|
-
oneOf: z.array(schemaSchema),
|
|
6079
6085
|
placeholder: z.string().optional(),
|
|
6086
|
+
minimum: z.number().optional(),
|
|
6087
|
+
maximum: z.number().optional(),
|
|
6080
6088
|
$id: z.string().optional(),
|
|
6081
6089
|
title: z.string().optional(),
|
|
6082
6090
|
description: z.string().optional(),
|
|
6083
6091
|
control: z.string().optional(),
|
|
6084
|
-
default:
|
|
6092
|
+
default: z.number().optional(),
|
|
6085
6093
|
hidden: z.boolean().optional(),
|
|
6094
|
+
disabled: z.boolean().optional(),
|
|
6086
6095
|
icon: iconSchema.optional(),
|
|
6087
6096
|
image: imageSchema.optional(),
|
|
6088
6097
|
keywords: z.array(z.string()).optional(),
|
|
6089
6098
|
summary: summaryProviderSchema.optional(),
|
|
6090
6099
|
analyticsId: z.string().optional(),
|
|
6100
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
6091
6101
|
refreshStepOnChange: z.boolean().optional(),
|
|
6102
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
6103
|
+
validationMessages: z.record(z.string()).optional(),
|
|
6092
6104
|
alert: alertLayoutSchema.optional(),
|
|
6093
|
-
help: helpSchema.optional(),
|
|
6094
6105
|
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
6095
6106
|
autofillKey: z.string().optional(),
|
|
6096
|
-
|
|
6097
|
-
disabled: z.boolean().optional()
|
|
6107
|
+
help: helpSchema.optional()
|
|
6098
6108
|
})
|
|
6099
6109
|
);
|
|
6100
6110
|
var numberSchemaSchema = z.lazy(
|
|
@@ -6130,12 +6140,16 @@ var numberSchemaSchema = z.lazy(
|
|
|
6130
6140
|
help: helpSchema.optional()
|
|
6131
6141
|
})
|
|
6132
6142
|
);
|
|
6133
|
-
var
|
|
6143
|
+
var objectSchemaSchema = z.lazy(
|
|
6134
6144
|
() => z.object({
|
|
6135
|
-
type: z.literal("
|
|
6145
|
+
type: z.literal("object"),
|
|
6146
|
+
disabled: z.boolean().optional(),
|
|
6136
6147
|
promoted: z.boolean().optional(),
|
|
6148
|
+
help: helpSchema.optional(),
|
|
6149
|
+
properties: z.record(schemaSchema),
|
|
6150
|
+
displayOrder: z.array(z.string()),
|
|
6151
|
+
required: z.array(z.string()).optional(),
|
|
6137
6152
|
$id: z.string().optional(),
|
|
6138
|
-
items: z.array(schemaSchema),
|
|
6139
6153
|
title: z.string().optional(),
|
|
6140
6154
|
description: z.string().optional(),
|
|
6141
6155
|
control: z.string().optional(),
|
|
@@ -6145,27 +6159,62 @@ var arraySchemaTupleSchema = z.lazy(
|
|
|
6145
6159
|
keywords: z.array(z.string()).optional(),
|
|
6146
6160
|
summary: summaryProviderSchema.optional(),
|
|
6147
6161
|
analyticsId: z.string().optional(),
|
|
6148
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
6149
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
6150
6162
|
alert: alertLayoutSchema.optional()
|
|
6151
6163
|
})
|
|
6152
6164
|
);
|
|
6153
|
-
var
|
|
6165
|
+
var oneOfSchemaSchema = z.lazy(
|
|
6154
6166
|
() => z.object({
|
|
6155
|
-
type: z.literal("integer"),
|
|
6156
6167
|
autofillProvider: z.string().optional(),
|
|
6157
6168
|
promoted: z.boolean().optional(),
|
|
6158
6169
|
refreshFormOnChange: z.boolean().optional(),
|
|
6159
6170
|
refreshUrl: z.string().optional(),
|
|
6160
6171
|
refreshFormUrl: z.string().optional(),
|
|
6172
|
+
promotion: jsonElementSchema.optional(),
|
|
6173
|
+
oneOf: z.array(schemaSchema),
|
|
6161
6174
|
placeholder: z.string().optional(),
|
|
6162
|
-
minimum: z.number().optional(),
|
|
6163
|
-
maximum: z.number().optional(),
|
|
6164
6175
|
$id: z.string().optional(),
|
|
6165
6176
|
title: z.string().optional(),
|
|
6166
6177
|
description: z.string().optional(),
|
|
6167
6178
|
control: z.string().optional(),
|
|
6168
|
-
default:
|
|
6179
|
+
default: jsonElementSchema.optional(),
|
|
6180
|
+
hidden: z.boolean().optional(),
|
|
6181
|
+
icon: iconSchema.optional(),
|
|
6182
|
+
image: imageSchema.optional(),
|
|
6183
|
+
keywords: z.array(z.string()).optional(),
|
|
6184
|
+
summary: summaryProviderSchema.optional(),
|
|
6185
|
+
analyticsId: z.string().optional(),
|
|
6186
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
6187
|
+
alert: alertLayoutSchema.optional(),
|
|
6188
|
+
help: helpSchema.optional(),
|
|
6189
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
6190
|
+
autofillKey: z.string().optional(),
|
|
6191
|
+
validationMessages: z.record(z.string()).optional(),
|
|
6192
|
+
disabled: z.boolean().optional()
|
|
6193
|
+
})
|
|
6194
|
+
);
|
|
6195
|
+
var stringSchemaSchema = z.lazy(
|
|
6196
|
+
() => z.object({
|
|
6197
|
+
type: z.literal("string"),
|
|
6198
|
+
autofillProvider: z.string().optional(),
|
|
6199
|
+
promoted: z.boolean().optional(),
|
|
6200
|
+
refreshFormOnChange: z.boolean().optional(),
|
|
6201
|
+
refreshUrl: z.string().optional(),
|
|
6202
|
+
refreshFormUrl: z.string().optional(),
|
|
6203
|
+
format: stringSchemaFormatSchema.optional(),
|
|
6204
|
+
displayFormat: z.string().optional(),
|
|
6205
|
+
placeholder: z.string().optional(),
|
|
6206
|
+
minLength: z.number().optional(),
|
|
6207
|
+
maxLength: z.number().optional(),
|
|
6208
|
+
minimum: z.string().optional(),
|
|
6209
|
+
maximum: z.string().optional(),
|
|
6210
|
+
pattern: z.string().optional(),
|
|
6211
|
+
autocapitalization: autocapitalizationTypeSchema.optional(),
|
|
6212
|
+
autocorrect: z.boolean().optional(),
|
|
6213
|
+
$id: z.string().optional(),
|
|
6214
|
+
title: z.string().optional(),
|
|
6215
|
+
description: z.string().optional(),
|
|
6216
|
+
control: z.string().optional(),
|
|
6217
|
+
default: z.string().optional(),
|
|
6169
6218
|
hidden: z.boolean().optional(),
|
|
6170
6219
|
disabled: z.boolean().optional(),
|
|
6171
6220
|
icon: iconSchema.optional(),
|
|
@@ -6178,14 +6227,16 @@ var integerSchemaSchema = z.lazy(
|
|
|
6178
6227
|
validationAsync: validateAsyncSchema.optional(),
|
|
6179
6228
|
validationMessages: z.record(z.string()).optional(),
|
|
6180
6229
|
alert: alertLayoutSchema.optional(),
|
|
6230
|
+
cameraConfig: jsonElementSchema.optional(),
|
|
6231
|
+
accepts: z.array(z.string()).optional(),
|
|
6232
|
+
maxSize: z.number().optional(),
|
|
6233
|
+
source: uploadSourceSchema.optional(),
|
|
6181
6234
|
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
6182
6235
|
autofillKey: z.string().optional(),
|
|
6183
|
-
help: helpSchema.optional()
|
|
6236
|
+
help: helpSchema.optional(),
|
|
6237
|
+
suggestions: suggestionsSchema.optional()
|
|
6184
6238
|
})
|
|
6185
6239
|
);
|
|
6186
|
-
var arraySchemaSchema = z.lazy(
|
|
6187
|
-
() => z.union([arraySchemaListSchema, arraySchemaTupleSchema])
|
|
6188
|
-
);
|
|
6189
6240
|
var arraySchemaListSchema = z.lazy(
|
|
6190
6241
|
() => z.object({
|
|
6191
6242
|
type: z.literal("array"),
|
|
@@ -6213,71 +6264,32 @@ var arraySchemaListSchema = z.lazy(
|
|
|
6213
6264
|
disabled: z.boolean().optional()
|
|
6214
6265
|
})
|
|
6215
6266
|
);
|
|
6216
|
-
var
|
|
6267
|
+
var persistAsyncSchema = z.lazy(
|
|
6217
6268
|
() => z.object({
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6223
|
-
description: z.string().optional(),
|
|
6224
|
-
control: z.string().optional(),
|
|
6225
|
-
hidden: z.boolean().optional(),
|
|
6226
|
-
icon: iconSchema.optional(),
|
|
6227
|
-
image: imageSchema.optional(),
|
|
6228
|
-
keywords: z.array(z.string()).optional(),
|
|
6229
|
-
summary: summaryProviderSchema.optional(),
|
|
6230
|
-
analyticsId: z.string().optional(),
|
|
6231
|
-
alert: alertLayoutSchema.optional()
|
|
6269
|
+
param: z.string(),
|
|
6270
|
+
idProperty: z.string(),
|
|
6271
|
+
schema: schemaSchema,
|
|
6272
|
+
url: z.string(),
|
|
6273
|
+
method: httpMethodSchema
|
|
6232
6274
|
})
|
|
6233
6275
|
);
|
|
6234
|
-
var
|
|
6276
|
+
var arraySchemaTupleSchema = z.lazy(
|
|
6235
6277
|
() => z.object({
|
|
6236
|
-
type: z.literal("
|
|
6237
|
-
autofillProvider: z.string().optional(),
|
|
6278
|
+
type: z.literal("array"),
|
|
6238
6279
|
promoted: z.boolean().optional(),
|
|
6239
|
-
refreshFormOnChange: z.boolean().optional(),
|
|
6240
|
-
refreshUrl: z.string().optional(),
|
|
6241
|
-
refreshFormUrl: z.string().optional(),
|
|
6242
6280
|
$id: z.string().optional(),
|
|
6281
|
+
items: z.array(schemaSchema),
|
|
6243
6282
|
title: z.string().optional(),
|
|
6244
6283
|
description: z.string().optional(),
|
|
6245
6284
|
control: z.string().optional(),
|
|
6246
|
-
default: z.boolean().optional(),
|
|
6247
6285
|
hidden: z.boolean().optional(),
|
|
6248
|
-
disabled: z.boolean().optional(),
|
|
6249
6286
|
icon: iconSchema.optional(),
|
|
6250
6287
|
image: imageSchema.optional(),
|
|
6251
6288
|
keywords: z.array(z.string()).optional(),
|
|
6252
6289
|
summary: summaryProviderSchema.optional(),
|
|
6253
6290
|
analyticsId: z.string().optional(),
|
|
6254
6291
|
persistAsync: persistAsyncSchema.optional(),
|
|
6255
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
6256
6292
|
validationAsync: validateAsyncSchema.optional(),
|
|
6257
|
-
alert: alertLayoutSchema.optional(),
|
|
6258
|
-
autofillKey: z.string().optional(),
|
|
6259
|
-
help: helpSchema.optional()
|
|
6260
|
-
})
|
|
6261
|
-
);
|
|
6262
|
-
var objectSchemaSchema = z.lazy(
|
|
6263
|
-
() => z.object({
|
|
6264
|
-
type: z.literal("object"),
|
|
6265
|
-
disabled: z.boolean().optional(),
|
|
6266
|
-
promoted: z.boolean().optional(),
|
|
6267
|
-
help: helpSchema.optional(),
|
|
6268
|
-
properties: z.record(schemaSchema),
|
|
6269
|
-
displayOrder: z.array(z.string()),
|
|
6270
|
-
required: z.array(z.string()).optional(),
|
|
6271
|
-
$id: z.string().optional(),
|
|
6272
|
-
title: z.string().optional(),
|
|
6273
|
-
description: z.string().optional(),
|
|
6274
|
-
control: z.string().optional(),
|
|
6275
|
-
hidden: z.boolean().optional(),
|
|
6276
|
-
icon: iconSchema.optional(),
|
|
6277
|
-
image: imageSchema.optional(),
|
|
6278
|
-
keywords: z.array(z.string()).optional(),
|
|
6279
|
-
summary: summaryProviderSchema.optional(),
|
|
6280
|
-
analyticsId: z.string().optional(),
|
|
6281
6293
|
alert: alertLayoutSchema.optional()
|
|
6282
6294
|
})
|
|
6283
6295
|
);
|
|
@@ -6433,7 +6445,7 @@ var getInputUpdateFunction = (uid, updateComponent) => (updateFn) => {
|
|
|
6433
6445
|
|
|
6434
6446
|
// src/revamp/domain/components/StepDomainComponent.ts
|
|
6435
6447
|
var createStepComponent = (stepProps) => {
|
|
6436
|
-
const _a = stepProps, { uid, stepPolling, updateComponent } = _a, rest = __objRest(_a, ["uid", "stepPolling", "updateComponent"]);
|
|
6448
|
+
const _a = stepProps, { uid, stepPolling, stepRefreshAfter, updateComponent } = _a, rest = __objRest(_a, ["uid", "stepPolling", "stepRefreshAfter", "updateComponent"]);
|
|
6437
6449
|
const update = getInputUpdateFunction(uid, updateComponent);
|
|
6438
6450
|
return __spreadProps(__spreadValues({
|
|
6439
6451
|
uid
|
|
@@ -6464,9 +6476,7 @@ var createStepComponent = (stepProps) => {
|
|
|
6464
6476
|
},
|
|
6465
6477
|
stop() {
|
|
6466
6478
|
stepPolling == null ? void 0 : stepPolling.stop();
|
|
6467
|
-
|
|
6468
|
-
getRefreshAfter() {
|
|
6469
|
-
return this.step.refreshAfter;
|
|
6479
|
+
stepRefreshAfter == null ? void 0 : stepRefreshAfter.stop();
|
|
6470
6480
|
}
|
|
6471
6481
|
});
|
|
6472
6482
|
};
|
|
@@ -7191,6 +7201,9 @@ var getComponentValidationAsync = (update, performValidationAsync) => (
|
|
|
7191
7201
|
}
|
|
7192
7202
|
);
|
|
7193
7203
|
|
|
7204
|
+
// src/revamp/domain/components/utils/isOrWasValid.ts
|
|
7205
|
+
var isOrWasValid = (getErrors, previous, current) => getErrors(previous).length === 0 || getErrors(current).length === 0;
|
|
7206
|
+
|
|
7194
7207
|
// src/revamp/domain/components/NumberInputComponent.ts
|
|
7195
7208
|
var createNumberInputComponent = (numberInputProps, updateComponent) => {
|
|
7196
7209
|
const _a = numberInputProps, {
|
|
@@ -7234,12 +7247,15 @@ var createNumberInputComponent = (numberInputProps, updateComponent) => {
|
|
|
7234
7247
|
},
|
|
7235
7248
|
// Noop
|
|
7236
7249
|
onChange(updatedValue) {
|
|
7250
|
+
const prevValue = this.value;
|
|
7237
7251
|
update((draft) => {
|
|
7238
7252
|
draft.errors = [];
|
|
7239
7253
|
draft.validationAsyncState.messages = {};
|
|
7240
7254
|
draft.value = updatedValue;
|
|
7241
7255
|
});
|
|
7242
|
-
|
|
7256
|
+
if (isOrWasValid(getValidationErrors, prevValue, updatedValue)) {
|
|
7257
|
+
performDebouncedRefresh == null ? void 0 : performDebouncedRefresh();
|
|
7258
|
+
}
|
|
7243
7259
|
onValueChange();
|
|
7244
7260
|
},
|
|
7245
7261
|
async getSubmittableValue() {
|
|
@@ -8023,12 +8039,15 @@ var createIntegerInputComponent = (integerInputProps, updateComponent) => {
|
|
|
8023
8039
|
},
|
|
8024
8040
|
// Noop
|
|
8025
8041
|
onChange(updatedValue) {
|
|
8042
|
+
const prevValue = this.value;
|
|
8026
8043
|
update((draft) => {
|
|
8027
8044
|
draft.errors = [];
|
|
8028
8045
|
draft.validationAsyncState.messages = {};
|
|
8029
8046
|
draft.value = updatedValue;
|
|
8030
8047
|
});
|
|
8031
|
-
|
|
8048
|
+
if (isOrWasValid(getValidationErrors, prevValue, updatedValue)) {
|
|
8049
|
+
performDebouncedRefresh == null ? void 0 : performDebouncedRefresh();
|
|
8050
|
+
}
|
|
8032
8051
|
onValueChange();
|
|
8033
8052
|
},
|
|
8034
8053
|
async getSubmittableValue() {
|
|
@@ -8330,12 +8349,15 @@ var createDateInputComponent = (textInputProps, updateComponent) => {
|
|
|
8330
8349
|
},
|
|
8331
8350
|
// Noop
|
|
8332
8351
|
onChange(updatedValue) {
|
|
8352
|
+
const prevValue = this.value;
|
|
8333
8353
|
update((draft) => {
|
|
8334
8354
|
draft.errors = [];
|
|
8335
8355
|
draft.validationAsyncState.messages = {};
|
|
8336
8356
|
draft.value = updatedValue;
|
|
8337
8357
|
});
|
|
8338
|
-
|
|
8358
|
+
if (isOrWasValid(getValidationErrors, prevValue, updatedValue)) {
|
|
8359
|
+
performRefresh == null ? void 0 : performRefresh();
|
|
8360
|
+
}
|
|
8339
8361
|
onValueChange();
|
|
8340
8362
|
},
|
|
8341
8363
|
async getSubmittableValue() {
|
|
@@ -8399,7 +8421,8 @@ var stringSchemaToDateInputComponent = (schemaMapperProps, mapperProps) => {
|
|
|
8399
8421
|
autocompleteHint,
|
|
8400
8422
|
default: defaultValue,
|
|
8401
8423
|
minimum: minimumDate,
|
|
8402
|
-
maximum: maximumDate
|
|
8424
|
+
maximum: maximumDate,
|
|
8425
|
+
suggestions
|
|
8403
8426
|
} = schema;
|
|
8404
8427
|
const { getErrorMessageFunctions, updateComponent, onRefresh, onValueChange } = mapperProps;
|
|
8405
8428
|
const errorMessageFunctions = getErrorMessageFunctions(schema.validationMessages);
|
|
@@ -8424,6 +8447,11 @@ var stringSchemaToDateInputComponent = (schemaMapperProps, mapperProps) => {
|
|
|
8424
8447
|
],
|
|
8425
8448
|
minimumDate,
|
|
8426
8449
|
maximumDate,
|
|
8450
|
+
suggestions: suggestions ? {
|
|
8451
|
+
values: suggestions.values.map((suggestion) => __spreadProps(__spreadValues({}, suggestion), {
|
|
8452
|
+
image: mapSpecImage(suggestion.image)
|
|
8453
|
+
}))
|
|
8454
|
+
} : void 0,
|
|
8427
8455
|
value,
|
|
8428
8456
|
persistedState,
|
|
8429
8457
|
validationAsyncState,
|
|
@@ -8644,12 +8672,15 @@ var createTextInputComponent = (textInputProps, updateComponent) => {
|
|
|
8644
8672
|
},
|
|
8645
8673
|
// Noop
|
|
8646
8674
|
onChange(updatedValue) {
|
|
8675
|
+
const prevValue = this.value;
|
|
8647
8676
|
update((draft) => {
|
|
8648
8677
|
draft.errors = [];
|
|
8649
8678
|
draft.validationAsyncState.messages = {};
|
|
8650
8679
|
draft.value = updatedValue;
|
|
8651
8680
|
});
|
|
8652
|
-
|
|
8681
|
+
if (isOrWasValid(getValidationErrors, prevValue, updatedValue)) {
|
|
8682
|
+
performDebouncedRefresh == null ? void 0 : performDebouncedRefresh();
|
|
8683
|
+
}
|
|
8653
8684
|
onValueChange();
|
|
8654
8685
|
},
|
|
8655
8686
|
async getSubmittableValue() {
|
|
@@ -8716,6 +8747,7 @@ var stringSchemaToTextInputComponent = (schemaMapperProps, mapperProps) => {
|
|
|
8716
8747
|
format,
|
|
8717
8748
|
maxLength,
|
|
8718
8749
|
minLength,
|
|
8750
|
+
suggestions,
|
|
8719
8751
|
validationMessages
|
|
8720
8752
|
} = schema;
|
|
8721
8753
|
const { getErrorMessageFunctions, updateComponent, onRefresh, onValueChange, logEvent } = mapperProps;
|
|
@@ -8746,6 +8778,11 @@ var stringSchemaToTextInputComponent = (schemaMapperProps, mapperProps) => {
|
|
|
8746
8778
|
displayFormat,
|
|
8747
8779
|
maxLength,
|
|
8748
8780
|
minLength,
|
|
8781
|
+
suggestions: suggestions ? {
|
|
8782
|
+
values: suggestions.values.map((suggestion) => __spreadProps(__spreadValues({}, suggestion), {
|
|
8783
|
+
image: mapSpecImage(suggestion.image)
|
|
8784
|
+
}))
|
|
8785
|
+
} : void 0,
|
|
8749
8786
|
value,
|
|
8750
8787
|
persistedState,
|
|
8751
8788
|
validationAsyncState,
|
|
@@ -10424,6 +10461,22 @@ var getUnreferencedSchemas = (step) => {
|
|
|
10424
10461
|
);
|
|
10425
10462
|
};
|
|
10426
10463
|
|
|
10464
|
+
// src/revamp/domain/features/refreshAfter/getStepRefreshAfter.ts
|
|
10465
|
+
var ONE_SECOND = 1e3;
|
|
10466
|
+
var getStepRefreshAfter = ({ refreshAfter, onRefresh }) => {
|
|
10467
|
+
const targetTime = new Date(refreshAfter).getTime();
|
|
10468
|
+
if (typeof refreshAfter !== "string" || Number.isNaN(targetTime)) {
|
|
10469
|
+
throw new Error(`Invalid refreshAfter value: ${String(refreshAfter)}`);
|
|
10470
|
+
}
|
|
10471
|
+
const timeLeft = Math.max(targetTime - Date.now(), ONE_SECOND);
|
|
10472
|
+
const timeout = setTimeout(() => {
|
|
10473
|
+
void onRefresh("refreshAfter");
|
|
10474
|
+
}, timeLeft);
|
|
10475
|
+
return {
|
|
10476
|
+
stop: () => clearTimeout(timeout)
|
|
10477
|
+
};
|
|
10478
|
+
};
|
|
10479
|
+
|
|
10427
10480
|
// src/revamp/domain/mappers/mapStepToComponent.ts
|
|
10428
10481
|
var mapStepToComponent = (_a) => {
|
|
10429
10482
|
var _b = _a, {
|
|
@@ -10451,6 +10504,7 @@ var mapStepToComponent = (_a) => {
|
|
|
10451
10504
|
layout = [],
|
|
10452
10505
|
navigation,
|
|
10453
10506
|
polling,
|
|
10507
|
+
refreshAfter,
|
|
10454
10508
|
title
|
|
10455
10509
|
} = step;
|
|
10456
10510
|
const backNavigation = (_a2 = navigation == null ? void 0 : navigation.back) != null ? _a2 : navigation == null ? void 0 : navigation.backButton;
|
|
@@ -10482,6 +10536,7 @@ var mapStepToComponent = (_a) => {
|
|
|
10482
10536
|
};
|
|
10483
10537
|
const onRefresh = async (schemaId, url) => restProps.onRefresh(schemaId, url != null ? url : refreshUrl);
|
|
10484
10538
|
const stepPolling = polling ? getStepPolling({ pollingConfig: polling, onAction: restProps.onAction, onPoll }) : void 0;
|
|
10539
|
+
const stepRefreshAfter = refreshAfter ? getStepRefreshAfter({ refreshAfter, onRefresh }) : void 0;
|
|
10485
10540
|
const mapperProps = __spreadProps(__spreadValues({}, restProps), { trackEvent, onAction, onRefresh });
|
|
10486
10541
|
const unreferencedSchemaFormComponents = mapUnreferencedSchemas(mapperProps);
|
|
10487
10542
|
const layoutComponents = layout.map(
|
|
@@ -10498,12 +10553,12 @@ var mapStepToComponent = (_a) => {
|
|
|
10498
10553
|
external,
|
|
10499
10554
|
loadingState,
|
|
10500
10555
|
stepPolling,
|
|
10556
|
+
stepRefreshAfter,
|
|
10501
10557
|
title: displayStepTitle ? title : void 0,
|
|
10502
10558
|
step,
|
|
10503
10559
|
updateComponent,
|
|
10504
10560
|
trackEvent,
|
|
10505
|
-
onAction
|
|
10506
|
-
onRefresh
|
|
10561
|
+
onAction
|
|
10507
10562
|
});
|
|
10508
10563
|
return stepComponent;
|
|
10509
10564
|
};
|
|
@@ -10941,13 +10996,6 @@ function useStableCallback(handler) {
|
|
|
10941
10996
|
return useCallback((...args) => ref.current ? ref.current(...args) : null, []);
|
|
10942
10997
|
}
|
|
10943
10998
|
|
|
10944
|
-
// src/revamp/utils/time-utils.ts
|
|
10945
|
-
var getTimeDiffInMs = (timestamp) => {
|
|
10946
|
-
const targetTime = new Date(timestamp).getTime();
|
|
10947
|
-
const currentTime = Date.now();
|
|
10948
|
-
return targetTime - currentTime;
|
|
10949
|
-
};
|
|
10950
|
-
|
|
10951
10999
|
// src/revamp/useDynamicFlowCore.tsx
|
|
10952
11000
|
function useDynamicFlowCore(props) {
|
|
10953
11001
|
const _a = props, { flowId, initialAction, initialStep, displayStepTitle = true } = _a, rest = __objRest(_a, ["flowId", "initialAction", "initialStep", "displayStepTitle"]);
|
|
@@ -10984,20 +11032,6 @@ function useDynamicFlowCore(props) {
|
|
|
10984
11032
|
trackCoreEvent("Step Shown", { isFirstStep: true });
|
|
10985
11033
|
}
|
|
10986
11034
|
}, []);
|
|
10987
|
-
const refreshAfter = stepComponent == null ? void 0 : stepComponent.getRefreshAfter();
|
|
10988
|
-
console.log({ refreshAfter });
|
|
10989
|
-
useEffect(() => {
|
|
10990
|
-
if (!refreshAfter) return;
|
|
10991
|
-
const timeLeft = getTimeDiffInMs(refreshAfter);
|
|
10992
|
-
if (timeLeft <= 0) {
|
|
10993
|
-
void (stepComponent == null ? void 0 : stepComponent.onRefresh(void 0));
|
|
10994
|
-
return;
|
|
10995
|
-
}
|
|
10996
|
-
const timeout = setTimeout(() => {
|
|
10997
|
-
void (stepComponent == null ? void 0 : stepComponent.onRefresh(void 0));
|
|
10998
|
-
}, timeLeft);
|
|
10999
|
-
return () => clearTimeout(timeout);
|
|
11000
|
-
}, [refreshAfter]);
|
|
11001
11035
|
const createStep = useCallback2((newStep, etag) => {
|
|
11002
11036
|
if (stepComponentRef.current) {
|
|
11003
11037
|
stepCount.current += 1;
|
|
@@ -11402,6 +11436,7 @@ var dateInputComponentToProps = (component, rendererMapperProps) => __spreadProp
|
|
|
11402
11436
|
autoComplete: component.autoComplete,
|
|
11403
11437
|
minimumDate: component.minimumDate,
|
|
11404
11438
|
maximumDate: component.maximumDate,
|
|
11439
|
+
suggestions: component.suggestions,
|
|
11405
11440
|
onChange: component.onChange.bind(component)
|
|
11406
11441
|
});
|
|
11407
11442
|
|
|
@@ -11668,6 +11703,7 @@ var textInputComponentToProps = (component, rendererMapperProps) => __spreadProp
|
|
|
11668
11703
|
displayFormat: component.displayFormat,
|
|
11669
11704
|
maxLength: component.maxLength,
|
|
11670
11705
|
minLength: component.minLength,
|
|
11706
|
+
suggestions: component.suggestions,
|
|
11671
11707
|
onChange: component.onChange.bind(component)
|
|
11672
11708
|
});
|
|
11673
11709
|
|
|
@@ -11725,8 +11761,10 @@ var stepComponentToProps = ({
|
|
|
11725
11761
|
error,
|
|
11726
11762
|
external,
|
|
11727
11763
|
loadingState,
|
|
11764
|
+
step,
|
|
11728
11765
|
title,
|
|
11729
|
-
components
|
|
11766
|
+
components,
|
|
11767
|
+
onAction
|
|
11730
11768
|
}, rendererMapperProps) => {
|
|
11731
11769
|
const childrenProps = components.map((c) => componentToRendererProps(c, rendererMapperProps));
|
|
11732
11770
|
return __spreadValues({
|
|
@@ -11738,9 +11776,11 @@ var stepComponentToProps = ({
|
|
|
11738
11776
|
error,
|
|
11739
11777
|
external,
|
|
11740
11778
|
loadingState,
|
|
11779
|
+
step,
|
|
11741
11780
|
title,
|
|
11742
11781
|
children: childrenProps.map(rendererMapperProps.render),
|
|
11743
|
-
childrenProps
|
|
11782
|
+
childrenProps,
|
|
11783
|
+
onAction
|
|
11744
11784
|
}, rendererMapperProps);
|
|
11745
11785
|
};
|
|
11746
11786
|
|
|
@@ -14861,10 +14901,9 @@ var getSafeStringValue = (value, options = {}) => {
|
|
|
14861
14901
|
if (coerceValue) {
|
|
14862
14902
|
logInvalidTypeCoercedWarning({ received: typeof value, expected: "string" });
|
|
14863
14903
|
return String(value);
|
|
14864
|
-
} else {
|
|
14865
|
-
logInvalidTypeFallbackWarning({ received: typeof value, expected: "string" });
|
|
14866
|
-
return void 0;
|
|
14867
14904
|
}
|
|
14905
|
+
logInvalidTypeFallbackWarning({ received: typeof value, expected: "string" });
|
|
14906
|
+
return void 0;
|
|
14868
14907
|
}
|
|
14869
14908
|
return value;
|
|
14870
14909
|
};
|
|
@@ -14885,10 +14924,9 @@ var getSafeStringOrNumberValue = (value, options = {}) => {
|
|
|
14885
14924
|
if (coerceValue) {
|
|
14886
14925
|
logInvalidTypeCoercedWarning(logProps);
|
|
14887
14926
|
return String(value);
|
|
14888
|
-
} else {
|
|
14889
|
-
logInvalidTypeFallbackWarning(logProps);
|
|
14890
|
-
return void 0;
|
|
14891
14927
|
}
|
|
14928
|
+
logInvalidTypeFallbackWarning(logProps);
|
|
14929
|
+
return void 0;
|
|
14892
14930
|
}
|
|
14893
14931
|
return value;
|
|
14894
14932
|
};
|
|
@@ -14901,10 +14939,9 @@ var getSafeBooleanValue = (value, options = {}) => {
|
|
|
14901
14939
|
if (coerceValue) {
|
|
14902
14940
|
logInvalidTypeCoercedWarning({ received: typeof value, expected: "boolean" });
|
|
14903
14941
|
return Boolean(value);
|
|
14904
|
-
} else {
|
|
14905
|
-
logInvalidTypeFallbackWarning({ received: typeof value, expected: "boolean" });
|
|
14906
|
-
return void 0;
|
|
14907
14942
|
}
|
|
14943
|
+
logInvalidTypeFallbackWarning({ received: typeof value, expected: "boolean" });
|
|
14944
|
+
return void 0;
|
|
14908
14945
|
}
|
|
14909
14946
|
return value;
|
|
14910
14947
|
};
|