@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/main.js CHANGED
@@ -5427,37 +5427,11 @@ var z = /* @__PURE__ */ Object.freeze({
5427
5427
  quotelessJson,
5428
5428
  ZodError
5429
5429
  });
5430
- var linkBehaviorSchema = z.object({
5431
- type: z.literal("link"),
5432
- url: z.string()
5433
- });
5434
- var navigationStackBehaviorSchema = z.union([
5435
- z.literal("default"),
5436
- z.literal("remove-previous"),
5437
- z.literal("remove-all"),
5438
- z.literal("replace-current")
5439
- ]);
5440
- var jsonElementSchema = z.lazy(
5441
- () => z.union([
5442
- z.string(),
5443
- z.number(),
5444
- z.boolean(),
5445
- z.record(jsonElementSchema),
5446
- z.array(jsonElementSchema)
5447
- ]).nullable()
5448
- );
5449
- var helpSchema = z.object({
5450
- markdown: z.string()
5451
- });
5452
- var actionTypeSchema = z.union([
5453
- z.literal("primary"),
5454
- z.literal("secondary"),
5455
- z.literal("link"),
5456
- z.literal("positive"),
5457
- z.literal("negative")
5458
- ]);
5459
- var linkSchema = z.object({
5460
- url: z.string()
5430
+ var imageSchema = z.object({
5431
+ text: z.string().optional(),
5432
+ url: z.string().optional(),
5433
+ uri: z.string().optional(),
5434
+ accessibilityDescription: z.string().optional()
5461
5435
  });
5462
5436
  var httpMethodSchema = z.union([
5463
5437
  z.literal("GET"),
@@ -5466,54 +5440,8 @@ var httpMethodSchema = z.union([
5466
5440
  z.literal("PATCH"),
5467
5441
  z.literal("DELETE")
5468
5442
  ]);
5469
- var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
5470
- var validateAsyncSchema = z.object({
5471
- param: z.string(),
5472
- method: httpMethodSchema,
5473
- url: z.string()
5474
- });
5475
- var summaryProviderSchema = z.object({
5476
- providesTitle: z.boolean().optional(),
5477
- providesDescription: z.boolean().optional(),
5478
- providesIcon: z.boolean().optional(),
5479
- providesImage: z.boolean().optional()
5480
- });
5481
- var imageSchema = z.object({
5482
- text: z.string().optional(),
5483
- url: z.string().optional(),
5484
- uri: z.string().optional(),
5485
- accessibilityDescription: z.string().optional()
5486
- });
5487
- var externalSchema = z.object({
5488
- url: z.string()
5489
- });
5490
- var columnsLayoutBiasSchema = z.union([
5491
- z.literal("none"),
5492
- z.literal("left"),
5493
- z.literal("right")
5494
- ]);
5495
- var sizeSchema = z.union([
5496
- z.literal("xs"),
5497
- z.literal("sm"),
5498
- z.literal("md"),
5499
- z.literal("lg"),
5500
- z.literal("xl")
5501
- ]);
5502
- var dividerLayoutSchema = z.object({
5503
- type: z.literal("divider"),
5504
- control: z.string().optional(),
5505
- margin: sizeSchema.optional()
5506
- });
5507
- var statusListLayoutStatusSchema = z.union([
5508
- z.literal("not-done"),
5509
- z.literal("pending"),
5510
- z.literal("done")
5511
- ]);
5512
- var loadingIndicatorLayoutSchema = z.object({
5513
- type: z.literal("loading-indicator"),
5514
- size: sizeSchema.optional(),
5515
- control: z.string().optional(),
5516
- margin: sizeSchema.optional()
5443
+ var iconNamedSchema = z.object({
5444
+ name: z.string()
5517
5445
  });
5518
5446
  var contextSchema = z.union([
5519
5447
  z.literal("positive"),
@@ -5525,92 +5453,24 @@ var contextSchema = z.union([
5525
5453
  z.literal("info"),
5526
5454
  z.literal("primary")
5527
5455
  ]);
5528
- var instructionsLayoutItemSchema = z.object({
5529
- text: z.string(),
5530
- context: contextSchema,
5531
- tag: z.string().optional()
5532
- });
5533
- var formLayoutSchemaReferenceSchema = z.object({
5534
- $ref: z.string()
5535
- });
5536
- var modalLayoutTriggerSchema = z.object({
5537
- title: z.string()
5538
- });
5539
- var instructionsLayoutSchema = z.object({
5540
- type: z.literal("instructions"),
5541
- title: z.string().optional(),
5542
- items: z.array(instructionsLayoutItemSchema),
5543
- control: z.string().optional(),
5544
- margin: sizeSchema.optional()
5545
- });
5546
- var reviewLayoutFieldSchema = z.object({
5547
- label: z.string(),
5548
- value: z.string(),
5549
- rawValue: z.string().optional(),
5550
- help: helpSchema.optional(),
5551
- tag: z.string().optional()
5552
- });
5553
- var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
5554
- var searchLayoutSchema = z.object({
5555
- type: z.literal("search"),
5556
- title: z.string(),
5557
- method: httpMethodSchema,
5558
- url: z.string(),
5559
- param: z.string(),
5560
- emptyMessage: z.string().optional(),
5561
- control: z.string().optional(),
5562
- margin: sizeSchema.optional()
5563
- });
5564
- var headingLayoutSchema = z.object({
5565
- type: z.literal("heading"),
5566
- text: z.string(),
5567
- size: sizeSchema.optional(),
5568
- align: alignSchema.optional(),
5569
- control: z.string().optional(),
5570
- margin: sizeSchema.optional()
5571
- });
5572
- var imageLayoutSchema = z.object({
5573
- type: z.literal("image"),
5574
- text: z.string().optional(),
5575
- url: z.string().optional(),
5576
- accessibilityDescription: z.string().optional(),
5577
- content: imageSchema.optional(),
5578
- size: sizeSchema.optional(),
5579
- control: z.string().optional(),
5580
- margin: sizeSchema.optional()
5581
- });
5582
- var markdownLayoutSchema = z.object({
5583
- type: z.literal("markdown"),
5584
- content: z.string(),
5585
- align: alignSchema.optional(),
5586
- control: z.string().optional(),
5587
- margin: sizeSchema.optional()
5588
- });
5589
- var paragraphLayoutSchema = z.object({
5590
- type: z.literal("paragraph"),
5591
- text: z.string(),
5592
- align: alignSchema.optional(),
5593
- control: z.string().optional(),
5594
- margin: sizeSchema.optional()
5456
+ var iconTextSchema = z.object({
5457
+ text: z.string()
5595
5458
  });
5596
- var listLayoutStatusSchema = z.union([
5597
- z.literal("warning"),
5598
- z.literal("neutral"),
5599
- z.literal("positive")
5459
+ var sizeSchema = z.union([
5460
+ z.literal("xs"),
5461
+ z.literal("sm"),
5462
+ z.literal("md"),
5463
+ z.literal("lg"),
5464
+ z.literal("xl")
5600
5465
  ]);
5601
- var errorResponseBodySchema = z.object({
5602
- refreshFormUrl: z.string().optional(),
5603
- analytics: z.record(z.string()).optional(),
5604
- error: z.string().optional(),
5605
- validation: jsonElementSchema.optional(),
5606
- refreshUrl: z.string().optional()
5607
- });
5608
- var searchSearchRequestSchema = z.object({
5609
- url: z.string(),
5610
- method: httpMethodSchema,
5611
- param: z.string(),
5612
- query: z.string()
5613
- });
5466
+ var autocapitalizationTypeSchema = z.union([
5467
+ z.literal("none"),
5468
+ z.literal("characters"),
5469
+ z.literal("sentences"),
5470
+ z.literal("words")
5471
+ ]);
5472
+ var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
5473
+ var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
5614
5474
  var autocompleteTokenSchema = z.union([
5615
5475
  z.literal("on"),
5616
5476
  z.literal("name"),
@@ -5676,17 +5536,124 @@ var autocompleteTokenSchema = z.union([
5676
5536
  z.literal("fax"),
5677
5537
  z.literal("pager")
5678
5538
  ]);
5679
- var autocapitalizationTypeSchema = z.union([
5539
+ var loadingIndicatorLayoutSchema = z.object({
5540
+ type: z.literal("loading-indicator"),
5541
+ size: sizeSchema.optional(),
5542
+ control: z.string().optional(),
5543
+ margin: sizeSchema.optional()
5544
+ });
5545
+ var paragraphLayoutSchema = z.object({
5546
+ type: z.literal("paragraph"),
5547
+ text: z.string(),
5548
+ align: alignSchema.optional(),
5549
+ control: z.string().optional(),
5550
+ margin: sizeSchema.optional()
5551
+ });
5552
+ var dividerLayoutSchema = z.object({
5553
+ type: z.literal("divider"),
5554
+ control: z.string().optional(),
5555
+ margin: sizeSchema.optional()
5556
+ });
5557
+ var listLayoutStatusSchema = z.union([
5558
+ z.literal("warning"),
5559
+ z.literal("neutral"),
5560
+ z.literal("positive")
5561
+ ]);
5562
+ var formLayoutSchemaReferenceSchema = z.object({
5563
+ $ref: z.string()
5564
+ });
5565
+ var imageLayoutSchema = z.object({
5566
+ type: z.literal("image"),
5567
+ text: z.string().optional(),
5568
+ url: z.string().optional(),
5569
+ accessibilityDescription: z.string().optional(),
5570
+ content: imageSchema.optional(),
5571
+ size: sizeSchema.optional(),
5572
+ control: z.string().optional(),
5573
+ margin: sizeSchema.optional(),
5574
+ align: alignSchema.optional()
5575
+ });
5576
+ var statusListLayoutStatusSchema = z.union([
5577
+ z.literal("not-done"),
5578
+ z.literal("pending"),
5579
+ z.literal("done")
5580
+ ]);
5581
+ var instructionsLayoutItemSchema = z.object({
5582
+ text: z.string(),
5583
+ context: contextSchema,
5584
+ tag: z.string().optional()
5585
+ });
5586
+ var modalLayoutTriggerSchema = z.object({
5587
+ title: z.string()
5588
+ });
5589
+ var searchLayoutSchema = z.object({
5590
+ type: z.literal("search"),
5591
+ title: z.string(),
5592
+ method: httpMethodSchema,
5593
+ url: z.string(),
5594
+ param: z.string(),
5595
+ emptyMessage: z.string().optional(),
5596
+ control: z.string().optional(),
5597
+ margin: sizeSchema.optional()
5598
+ });
5599
+ var infoLayoutSchema = z.object({
5600
+ type: z.literal("info"),
5601
+ markdown: z.string(),
5602
+ align: alignSchema.optional(),
5603
+ control: z.string().optional(),
5604
+ margin: sizeSchema.optional()
5605
+ });
5606
+ var formLayoutSchema = z.object({
5607
+ type: z.literal("form"),
5608
+ schema: formLayoutSchemaReferenceSchema.optional(),
5609
+ schemaId: z.string(),
5610
+ control: z.string().optional(),
5611
+ margin: sizeSchema.optional()
5612
+ });
5613
+ var headingLayoutSchema = z.object({
5614
+ type: z.literal("heading"),
5615
+ text: z.string(),
5616
+ size: sizeSchema.optional(),
5617
+ align: alignSchema.optional(),
5618
+ control: z.string().optional(),
5619
+ margin: sizeSchema.optional()
5620
+ });
5621
+ var markdownLayoutSchema = z.object({
5622
+ type: z.literal("markdown"),
5623
+ content: z.string(),
5624
+ align: alignSchema.optional(),
5625
+ control: z.string().optional(),
5626
+ margin: sizeSchema.optional()
5627
+ });
5628
+ var columnsLayoutBiasSchema = z.union([
5680
5629
  z.literal("none"),
5681
- z.literal("characters"),
5682
- z.literal("sentences"),
5683
- z.literal("words")
5630
+ z.literal("left"),
5631
+ z.literal("right")
5684
5632
  ]);
5685
- var iconNamedSchema = z.object({
5686
- name: z.string()
5633
+ var helpSchema = z.object({
5634
+ markdown: z.string()
5687
5635
  });
5688
- var iconTextSchema = z.object({
5689
- text: z.string()
5636
+ var searchSearchRequestSchema = z.object({
5637
+ url: z.string(),
5638
+ method: httpMethodSchema,
5639
+ param: z.string(),
5640
+ query: z.string()
5641
+ });
5642
+ var jsonElementSchema = z.lazy(
5643
+ () => z.union([
5644
+ z.string(),
5645
+ z.number(),
5646
+ z.boolean(),
5647
+ z.record(jsonElementSchema),
5648
+ z.array(jsonElementSchema)
5649
+ ]).nullable()
5650
+ );
5651
+ var externalSchema = z.object({
5652
+ url: z.string()
5653
+ });
5654
+ var stepErrorSchema = z.object({
5655
+ error: z.string().optional(),
5656
+ validation: jsonElementSchema.optional()
5690
5657
  });
5691
5658
  var stringSchemaFormatSchema = z.union([
5692
5659
  z.literal("date"),
@@ -5696,9 +5663,55 @@ var stringSchemaFormatSchema = z.union([
5696
5663
  z.literal("phone-number"),
5697
5664
  z.literal("base64url")
5698
5665
  ]);
5699
- var stepErrorSchema = z.object({
5700
- error: z.string().optional(),
5701
- validation: jsonElementSchema.optional()
5666
+ var summarySummariserSchema = z.object({
5667
+ defaultTitle: z.string().optional(),
5668
+ defaultDescription: z.string().optional(),
5669
+ defaultIcon: iconSchema.optional(),
5670
+ defaultImage: imageSchema.optional(),
5671
+ providesTitle: z.boolean().optional(),
5672
+ providesDescription: z.boolean().optional(),
5673
+ providesIcon: z.boolean().optional(),
5674
+ providesImage: z.boolean().optional()
5675
+ });
5676
+ var validateAsyncSchema = z.object({
5677
+ param: z.string(),
5678
+ method: httpMethodSchema,
5679
+ url: z.string()
5680
+ });
5681
+ var summaryProviderSchema = z.object({
5682
+ providesTitle: z.boolean().optional(),
5683
+ providesDescription: z.boolean().optional(),
5684
+ providesIcon: z.boolean().optional(),
5685
+ providesImage: z.boolean().optional()
5686
+ });
5687
+ var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
5688
+ var suggestionsValueSchema = z.object({
5689
+ label: z.string(),
5690
+ value: jsonElementSchema.optional(),
5691
+ icon: iconSchema.optional(),
5692
+ image: imageSchema.optional(),
5693
+ tag: z.string().optional()
5694
+ });
5695
+ var navigationStackBehaviorSchema = z.union([
5696
+ z.literal("default"),
5697
+ z.literal("remove-previous"),
5698
+ z.literal("remove-all"),
5699
+ z.literal("replace-current")
5700
+ ]);
5701
+ var actionTypeSchema = z.union([
5702
+ z.literal("primary"),
5703
+ z.literal("secondary"),
5704
+ z.literal("link"),
5705
+ z.literal("positive"),
5706
+ z.literal("negative")
5707
+ ]);
5708
+ var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
5709
+ var linkBehaviorSchema = z.object({
5710
+ type: z.literal("link"),
5711
+ url: z.string()
5712
+ });
5713
+ var linkSchema = z.object({
5714
+ url: z.string()
5702
5715
  });
5703
5716
  var actionSchema = z.object({
5704
5717
  title: z.string().optional(),
@@ -5715,21 +5728,6 @@ var actionSchema = z.object({
5715
5728
  timeout: z.number().optional(),
5716
5729
  skipValidation: z.boolean().optional()
5717
5730
  });
5718
- var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
5719
- var formLayoutSchema = z.object({
5720
- type: z.literal("form"),
5721
- schema: formLayoutSchemaReferenceSchema.optional(),
5722
- schemaId: z.string(),
5723
- control: z.string().optional(),
5724
- margin: sizeSchema.optional()
5725
- });
5726
- var infoLayoutSchema = z.object({
5727
- type: z.literal("info"),
5728
- markdown: z.string(),
5729
- align: alignSchema.optional(),
5730
- control: z.string().optional(),
5731
- margin: sizeSchema.optional()
5732
- });
5733
5731
  var listLayoutItemSchema = z.object({
5734
5732
  description: z.string().optional(),
5735
5733
  status: listLayoutStatusSchema.optional(),
@@ -5741,16 +5739,19 @@ var listLayoutItemSchema = z.object({
5741
5739
  subvalue: z.string().optional(),
5742
5740
  tag: z.string().optional()
5743
5741
  });
5744
- var actionResponseBodySchema = z.object({
5745
- action: actionSchema
5742
+ var instructionsLayoutSchema = z.object({
5743
+ type: z.literal("instructions"),
5744
+ title: z.string().optional(),
5745
+ items: z.array(instructionsLayoutItemSchema),
5746
+ control: z.string().optional(),
5747
+ margin: sizeSchema.optional()
5746
5748
  });
5747
- var searchResultActionSchema = z.object({
5748
- type: z.literal("action"),
5749
- title: z.string(),
5750
- description: z.string().optional(),
5751
- icon: iconSchema.optional(),
5752
- image: imageSchema.optional(),
5753
- value: actionSchema
5749
+ var reviewLayoutFieldSchema = z.object({
5750
+ label: z.string(),
5751
+ value: z.string(),
5752
+ rawValue: z.string().optional(),
5753
+ help: helpSchema.optional(),
5754
+ tag: z.string().optional()
5754
5755
  });
5755
5756
  var searchResultSearchSchema = z.object({
5756
5757
  type: z.literal("search"),
@@ -5760,59 +5761,54 @@ var searchResultSearchSchema = z.object({
5760
5761
  image: imageSchema.optional(),
5761
5762
  value: searchSearchRequestSchema
5762
5763
  });
5763
- var actionBehaviorSchema = z.object({
5764
+ var searchResultActionSchema = z.object({
5764
5765
  type: z.literal("action"),
5766
+ title: z.string(),
5767
+ description: z.string().optional(),
5768
+ icon: iconSchema.optional(),
5769
+ image: imageSchema.optional(),
5770
+ value: actionSchema
5771
+ });
5772
+ var actionResponseBodySchema = z.object({
5765
5773
  action: actionSchema
5766
5774
  });
5767
- var containerBehaviorSchema = z.object({
5768
- action: actionSchema.optional(),
5769
- link: linkSchema.optional()
5775
+ var errorResponseBodySchema = z.object({
5776
+ refreshFormUrl: z.string().optional(),
5777
+ analytics: z.record(z.string()).optional(),
5778
+ error: z.string().optional(),
5779
+ validation: jsonElementSchema.optional(),
5780
+ refreshUrl: z.string().optional()
5781
+ });
5782
+ var suggestionsSchema = z.object({
5783
+ values: z.array(suggestionsValueSchema)
5770
5784
  });
5771
5785
  var navigationBackBehaviorSchema = z.object({
5772
5786
  title: z.string().optional(),
5773
5787
  action: actionSchema
5774
5788
  });
5775
- var summarySummariserSchema = z.object({
5776
- defaultTitle: z.string().optional(),
5777
- defaultDescription: z.string().optional(),
5778
- defaultIcon: iconSchema.optional(),
5779
- defaultImage: imageSchema.optional(),
5780
- providesTitle: z.boolean().optional(),
5781
- providesDescription: z.boolean().optional(),
5782
- providesIcon: z.boolean().optional(),
5783
- providesImage: z.boolean().optional()
5789
+ var actionBehaviorSchema = z.object({
5790
+ type: z.literal("action"),
5791
+ action: actionSchema
5784
5792
  });
5785
- var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
5786
- var searchResponseBodySchema = z.object({
5787
- results: z.array(searchResultSchema)
5793
+ var containerBehaviorSchema = z.object({
5794
+ action: actionSchema.optional(),
5795
+ link: linkSchema.optional()
5788
5796
  });
5789
5797
  var behaviorSchema = z.union([
5790
5798
  actionBehaviorSchema,
5791
5799
  containerBehaviorSchema,
5792
5800
  linkBehaviorSchema
5793
5801
  ]);
5794
- var navigationSchema = z.object({
5795
- backButton: navigationBackBehaviorSchema.optional(),
5796
- back: navigationBackBehaviorSchema.optional(),
5797
- stackBehavior: navigationStackBehaviorSchema.optional()
5798
- });
5799
- var linkHandlerSchema = z.object({
5800
- regexPattern: z.string(),
5801
- behavior: behaviorSchema.optional()
5802
- });
5803
- var pollingOnErrorSchema = z.object({
5804
- action: actionSchema.optional(),
5805
- behavior: behaviorSchema.optional()
5802
+ var alertLayoutCallToActionSchema = z.object({
5803
+ title: z.string(),
5804
+ accessibilityDescription: z.string().optional(),
5805
+ behavior: behaviorSchema
5806
5806
  });
5807
- var pollingSchema = z.object({
5808
- interval: z.number().optional(),
5809
- url: z.string(),
5810
- delay: z.number().optional(),
5811
- timeout: z.number().optional(),
5812
- maxAttempts: z.number(),
5813
- onError: pollingOnErrorSchema
5807
+ var listLayoutCallToActionSchema = z.object({
5808
+ title: z.string(),
5809
+ accessibilityDescription: z.string().optional(),
5810
+ behavior: behaviorSchema
5814
5811
  });
5815
- var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
5816
5812
  var decisionLayoutOptionSchema = z.object({
5817
5813
  action: actionSchema.optional(),
5818
5814
  title: z.string(),
@@ -5823,6 +5819,11 @@ var decisionLayoutOptionSchema = z.object({
5823
5819
  behavior: behaviorSchema.optional(),
5824
5820
  tag: z.string().optional()
5825
5821
  });
5822
+ var itemCallToActionSchema = z.object({
5823
+ title: z.string(),
5824
+ accessibilityDescription: z.string().optional(),
5825
+ behavior: behaviorSchema
5826
+ });
5826
5827
  var buttonLayoutSchema = z.object({
5827
5828
  type: z.literal("button"),
5828
5829
  action: actionSchema.optional(),
@@ -5835,21 +5836,25 @@ var buttonLayoutSchema = z.object({
5835
5836
  control: z.string().optional(),
5836
5837
  margin: sizeSchema.optional()
5837
5838
  });
5838
- var reviewLayoutCallToActionSchema = z.object({
5839
- action: actionSchema.optional(),
5840
- title: z.string(),
5841
- accessibilityDescription: z.string().optional(),
5839
+ var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
5840
+ var linkHandlerSchema = z.object({
5841
+ regexPattern: z.string(),
5842
5842
  behavior: behaviorSchema.optional()
5843
5843
  });
5844
- var alertLayoutCallToActionSchema = z.object({
5845
- title: z.string(),
5846
- accessibilityDescription: z.string().optional(),
5847
- behavior: behaviorSchema
5844
+ var navigationSchema = z.object({
5845
+ backButton: navigationBackBehaviorSchema.optional(),
5846
+ back: navigationBackBehaviorSchema.optional(),
5847
+ stackBehavior: navigationStackBehaviorSchema.optional()
5848
5848
  });
5849
- var itemCallToActionSchema = z.object({
5849
+ var pollingOnErrorSchema = z.object({
5850
+ action: actionSchema.optional(),
5851
+ behavior: behaviorSchema.optional()
5852
+ });
5853
+ var reviewLayoutCallToActionSchema = z.object({
5854
+ action: actionSchema.optional(),
5850
5855
  title: z.string(),
5851
5856
  accessibilityDescription: z.string().optional(),
5852
- behavior: behaviorSchema
5857
+ behavior: behaviorSchema.optional()
5853
5858
  });
5854
5859
  var alertLayoutSchema = z.object({
5855
5860
  type: z.literal("alert"),
@@ -5859,10 +5864,13 @@ var alertLayoutSchema = z.object({
5859
5864
  margin: sizeSchema.optional(),
5860
5865
  callToAction: alertLayoutCallToActionSchema.optional()
5861
5866
  });
5862
- var listLayoutCallToActionSchema = z.object({
5863
- title: z.string(),
5864
- accessibilityDescription: z.string().optional(),
5865
- behavior: behaviorSchema
5867
+ var listLayoutSchema = z.object({
5868
+ type: z.literal("list"),
5869
+ title: z.string().optional(),
5870
+ callToAction: listLayoutCallToActionSchema.optional(),
5871
+ items: z.array(listLayoutItemSchema),
5872
+ control: z.string().optional(),
5873
+ margin: sizeSchema.optional()
5866
5874
  });
5867
5875
  var decisionLayoutSchema = z.object({
5868
5876
  type: z.literal("decision"),
@@ -5871,29 +5879,34 @@ var decisionLayoutSchema = z.object({
5871
5879
  control: z.string().optional(),
5872
5880
  margin: sizeSchema.optional()
5873
5881
  });
5874
- var listLayoutSchema = z.object({
5875
- type: z.literal("list"),
5882
+ var statusListLayoutItemSchema = z.object({
5883
+ title: z.string(),
5884
+ description: z.string().optional(),
5885
+ icon: iconSchema,
5886
+ status: statusListLayoutStatusSchema.optional(),
5887
+ callToAction: itemCallToActionSchema.optional(),
5888
+ tag: z.string().optional()
5889
+ });
5890
+ var reviewLayoutSchema = z.object({
5891
+ type: z.literal("review"),
5892
+ orientation: z.string().optional(),
5893
+ action: actionSchema.optional(),
5894
+ fields: z.array(reviewLayoutFieldSchema),
5876
5895
  title: z.string().optional(),
5877
- callToAction: listLayoutCallToActionSchema.optional(),
5878
- items: z.array(listLayoutItemSchema),
5896
+ callToAction: reviewLayoutCallToActionSchema.optional(),
5879
5897
  control: z.string().optional(),
5880
5898
  margin: sizeSchema.optional()
5881
5899
  });
5882
- var constSchemaSchema = z.object({
5883
- hidden: z.boolean().optional(),
5884
- alert: alertLayoutSchema.optional(),
5885
- control: z.string().optional(),
5886
- promoted: z.boolean().optional(),
5887
- $id: z.string().optional(),
5888
- const: jsonElementSchema,
5889
- title: z.string().optional(),
5890
- description: z.string().optional(),
5891
- icon: iconSchema.optional(),
5892
- image: imageSchema.optional(),
5893
- keywords: z.array(z.string()).optional(),
5894
- summary: summaryProviderSchema.optional(),
5895
- analyticsId: z.string().optional(),
5896
- disabled: z.boolean().optional()
5900
+ var searchResponseBodySchema = z.object({
5901
+ results: z.array(searchResultSchema)
5902
+ });
5903
+ var pollingSchema = z.object({
5904
+ interval: z.number().optional(),
5905
+ url: z.string(),
5906
+ delay: z.number().optional(),
5907
+ timeout: z.number().optional(),
5908
+ maxAttempts: z.number(),
5909
+ onError: pollingOnErrorSchema
5897
5910
  });
5898
5911
  var blobSchemaSchema = z.object({
5899
5912
  type: z.literal("blob"),
@@ -5917,64 +5930,29 @@ var blobSchemaSchema = z.object({
5917
5930
  source: uploadSourceSchema.optional(),
5918
5931
  disabled: z.boolean().optional()
5919
5932
  });
5920
- var reviewLayoutSchema = z.object({
5921
- type: z.literal("review"),
5922
- orientation: z.string().optional(),
5923
- action: actionSchema.optional(),
5924
- fields: z.array(reviewLayoutFieldSchema),
5925
- title: z.string().optional(),
5926
- callToAction: reviewLayoutCallToActionSchema.optional(),
5933
+ var constSchemaSchema = z.object({
5934
+ hidden: z.boolean().optional(),
5935
+ alert: alertLayoutSchema.optional(),
5927
5936
  control: z.string().optional(),
5928
- margin: sizeSchema.optional()
5929
- });
5930
- var statusListLayoutItemSchema = z.object({
5931
- title: z.string(),
5937
+ promoted: z.boolean().optional(),
5938
+ $id: z.string().optional(),
5939
+ const: jsonElementSchema,
5940
+ title: z.string().optional(),
5932
5941
  description: z.string().optional(),
5933
- icon: iconSchema,
5934
- status: statusListLayoutStatusSchema.optional(),
5935
- callToAction: itemCallToActionSchema.optional(),
5936
- tag: z.string().optional()
5942
+ icon: iconSchema.optional(),
5943
+ image: imageSchema.optional(),
5944
+ keywords: z.array(z.string()).optional(),
5945
+ summary: summaryProviderSchema.optional(),
5946
+ analyticsId: z.string().optional(),
5947
+ disabled: z.boolean().optional()
5937
5948
  });
5938
5949
  var statusListLayoutSchema = z.object({
5939
5950
  type: z.literal("status-list"),
5940
5951
  items: z.array(statusListLayoutItemSchema),
5941
5952
  title: z.string().optional(),
5942
5953
  control: z.string().optional(),
5943
- margin: sizeSchema.optional()
5944
- });
5945
- var persistAsyncSchema = z.lazy(
5946
- () => z.object({
5947
- param: z.string(),
5948
- idProperty: z.string(),
5949
- schema: schemaSchema,
5950
- url: z.string(),
5951
- method: httpMethodSchema
5952
- })
5953
- );
5954
- var schemaSchema = z.lazy(
5955
- () => z.union([
5956
- allOfSchemaSchema,
5957
- arraySchemaSchema,
5958
- blobSchemaSchema,
5959
- booleanSchemaSchema,
5960
- constSchemaSchema,
5961
- integerSchemaSchema,
5962
- numberSchemaSchema,
5963
- objectSchemaSchema,
5964
- oneOfSchemaSchema,
5965
- stringSchemaSchema
5966
- ])
5967
- );
5968
- var columnsLayoutSchema = z.lazy(
5969
- () => z.object({
5970
- type: z.literal("columns"),
5971
- left: z.array(layoutSchema),
5972
- right: z.array(layoutSchema),
5973
- bias: columnsLayoutBiasSchema.optional(),
5974
- control: z.string().optional(),
5975
- margin: sizeSchema.optional()
5976
- })
5977
- );
5954
+ margin: sizeSchema.optional()
5955
+ });
5978
5956
  var layoutSchema = z.lazy(
5979
5957
  () => z.union([
5980
5958
  alertLayoutSchema,
@@ -5998,12 +5976,6 @@ var layoutSchema = z.lazy(
5998
5976
  statusListLayoutSchema
5999
5977
  ])
6000
5978
  );
6001
- var modalLayoutContentSchema = z.lazy(
6002
- () => z.object({
6003
- title: z.string().optional(),
6004
- components: z.array(layoutSchema)
6005
- })
6006
- );
6007
5979
  var boxLayoutSchema = z.lazy(
6008
5980
  () => z.object({
6009
5981
  type: z.literal("box"),
@@ -6014,6 +5986,16 @@ var boxLayoutSchema = z.lazy(
6014
5986
  margin: sizeSchema.optional()
6015
5987
  })
6016
5988
  );
5989
+ var columnsLayoutSchema = z.lazy(
5990
+ () => z.object({
5991
+ type: z.literal("columns"),
5992
+ left: z.array(layoutSchema),
5993
+ right: z.array(layoutSchema),
5994
+ bias: columnsLayoutBiasSchema.optional(),
5995
+ control: z.string().optional(),
5996
+ margin: sizeSchema.optional()
5997
+ })
5998
+ );
6017
5999
  var modalLayoutSchema = z.lazy(
6018
6000
  () => z.object({
6019
6001
  type: z.literal("modal"),
@@ -6023,6 +6005,12 @@ var modalLayoutSchema = z.lazy(
6023
6005
  content: modalLayoutContentSchema
6024
6006
  })
6025
6007
  );
6008
+ var modalLayoutContentSchema = z.lazy(
6009
+ () => z.object({
6010
+ title: z.string().optional(),
6011
+ components: z.array(layoutSchema)
6012
+ })
6013
+ );
6026
6014
  var stepSchema = z.lazy(
6027
6015
  () => z.object({
6028
6016
  key: z.string().optional(),
@@ -6042,33 +6030,58 @@ var stepSchema = z.lazy(
6042
6030
  errors: stepErrorSchema.optional(),
6043
6031
  navigation: navigationSchema.optional(),
6044
6032
  refreshUrl: z.string().optional(),
6045
- refreshAfter: z.string().optional(),
6046
- control: z.string().optional()
6033
+ control: z.string().optional(),
6034
+ refreshAfter: z.string().optional()
6047
6035
  })
6048
6036
  );
6049
- var stringSchemaSchema = z.lazy(
6037
+ var schemaSchema = z.lazy(
6038
+ () => z.union([
6039
+ allOfSchemaSchema,
6040
+ arraySchemaSchema,
6041
+ blobSchemaSchema,
6042
+ booleanSchemaSchema,
6043
+ constSchemaSchema,
6044
+ integerSchemaSchema,
6045
+ numberSchemaSchema,
6046
+ objectSchemaSchema,
6047
+ oneOfSchemaSchema,
6048
+ stringSchemaSchema
6049
+ ])
6050
+ );
6051
+ var allOfSchemaSchema = z.lazy(
6050
6052
  () => z.object({
6051
- type: z.literal("string"),
6053
+ disabled: z.boolean().optional(),
6054
+ promoted: z.boolean().optional(),
6055
+ allOf: z.array(schemaSchema),
6056
+ $id: z.string().optional(),
6057
+ title: z.string().optional(),
6058
+ description: z.string().optional(),
6059
+ control: z.string().optional(),
6060
+ hidden: z.boolean().optional(),
6061
+ icon: iconSchema.optional(),
6062
+ image: imageSchema.optional(),
6063
+ keywords: z.array(z.string()).optional(),
6064
+ summary: summaryProviderSchema.optional(),
6065
+ analyticsId: z.string().optional(),
6066
+ alert: alertLayoutSchema.optional()
6067
+ })
6068
+ );
6069
+ var arraySchemaSchema = z.lazy(
6070
+ () => z.union([arraySchemaListSchema, arraySchemaTupleSchema])
6071
+ );
6072
+ var booleanSchemaSchema = z.lazy(
6073
+ () => z.object({
6074
+ type: z.literal("boolean"),
6052
6075
  autofillProvider: z.string().optional(),
6053
6076
  promoted: z.boolean().optional(),
6054
6077
  refreshFormOnChange: z.boolean().optional(),
6055
6078
  refreshUrl: z.string().optional(),
6056
6079
  refreshFormUrl: z.string().optional(),
6057
- format: stringSchemaFormatSchema.optional(),
6058
- displayFormat: z.string().optional(),
6059
- placeholder: z.string().optional(),
6060
- minLength: z.number().optional(),
6061
- maxLength: z.number().optional(),
6062
- minimum: z.string().optional(),
6063
- maximum: z.string().optional(),
6064
- pattern: z.string().optional(),
6065
- autocapitalization: autocapitalizationTypeSchema.optional(),
6066
- autocorrect: z.boolean().optional(),
6067
6080
  $id: z.string().optional(),
6068
6081
  title: z.string().optional(),
6069
6082
  description: z.string().optional(),
6070
6083
  control: z.string().optional(),
6071
- default: z.string().optional(),
6084
+ default: z.boolean().optional(),
6072
6085
  hidden: z.boolean().optional(),
6073
6086
  disabled: z.boolean().optional(),
6074
6087
  icon: iconSchema.optional(),
@@ -6079,45 +6092,42 @@ var stringSchemaSchema = z.lazy(
6079
6092
  persistAsync: persistAsyncSchema.optional(),
6080
6093
  refreshStepOnChange: z.boolean().optional(),
6081
6094
  validationAsync: validateAsyncSchema.optional(),
6082
- validationMessages: z.record(z.string()).optional(),
6083
6095
  alert: alertLayoutSchema.optional(),
6084
- cameraConfig: jsonElementSchema.optional(),
6085
- accepts: z.array(z.string()).optional(),
6086
- maxSize: z.number().optional(),
6087
- source: uploadSourceSchema.optional(),
6088
- autocompleteHint: z.array(autocompleteTokenSchema).optional(),
6089
6096
  autofillKey: z.string().optional(),
6090
6097
  help: helpSchema.optional()
6091
6098
  })
6092
6099
  );
6093
- var oneOfSchemaSchema = z.lazy(
6100
+ var integerSchemaSchema = z.lazy(
6094
6101
  () => z.object({
6102
+ type: z.literal("integer"),
6095
6103
  autofillProvider: z.string().optional(),
6096
6104
  promoted: z.boolean().optional(),
6097
6105
  refreshFormOnChange: z.boolean().optional(),
6098
6106
  refreshUrl: z.string().optional(),
6099
6107
  refreshFormUrl: z.string().optional(),
6100
- promotion: jsonElementSchema.optional(),
6101
- oneOf: z.array(schemaSchema),
6102
6108
  placeholder: z.string().optional(),
6109
+ minimum: z.number().optional(),
6110
+ maximum: z.number().optional(),
6103
6111
  $id: z.string().optional(),
6104
6112
  title: z.string().optional(),
6105
6113
  description: z.string().optional(),
6106
6114
  control: z.string().optional(),
6107
- default: jsonElementSchema.optional(),
6115
+ default: z.number().optional(),
6108
6116
  hidden: z.boolean().optional(),
6117
+ disabled: z.boolean().optional(),
6109
6118
  icon: iconSchema.optional(),
6110
6119
  image: imageSchema.optional(),
6111
6120
  keywords: z.array(z.string()).optional(),
6112
6121
  summary: summaryProviderSchema.optional(),
6113
6122
  analyticsId: z.string().optional(),
6123
+ persistAsync: persistAsyncSchema.optional(),
6114
6124
  refreshStepOnChange: z.boolean().optional(),
6125
+ validationAsync: validateAsyncSchema.optional(),
6126
+ validationMessages: z.record(z.string()).optional(),
6115
6127
  alert: alertLayoutSchema.optional(),
6116
- help: helpSchema.optional(),
6117
6128
  autocompleteHint: z.array(autocompleteTokenSchema).optional(),
6118
6129
  autofillKey: z.string().optional(),
6119
- validationMessages: z.record(z.string()).optional(),
6120
- disabled: z.boolean().optional()
6130
+ help: helpSchema.optional()
6121
6131
  })
6122
6132
  );
6123
6133
  var numberSchemaSchema = z.lazy(
@@ -6153,12 +6163,16 @@ var numberSchemaSchema = z.lazy(
6153
6163
  help: helpSchema.optional()
6154
6164
  })
6155
6165
  );
6156
- var arraySchemaTupleSchema = z.lazy(
6166
+ var objectSchemaSchema = z.lazy(
6157
6167
  () => z.object({
6158
- type: z.literal("array"),
6168
+ type: z.literal("object"),
6169
+ disabled: z.boolean().optional(),
6159
6170
  promoted: z.boolean().optional(),
6171
+ help: helpSchema.optional(),
6172
+ properties: z.record(schemaSchema),
6173
+ displayOrder: z.array(z.string()),
6174
+ required: z.array(z.string()).optional(),
6160
6175
  $id: z.string().optional(),
6161
- items: z.array(schemaSchema),
6162
6176
  title: z.string().optional(),
6163
6177
  description: z.string().optional(),
6164
6178
  control: z.string().optional(),
@@ -6168,27 +6182,62 @@ var arraySchemaTupleSchema = z.lazy(
6168
6182
  keywords: z.array(z.string()).optional(),
6169
6183
  summary: summaryProviderSchema.optional(),
6170
6184
  analyticsId: z.string().optional(),
6171
- persistAsync: persistAsyncSchema.optional(),
6172
- validationAsync: validateAsyncSchema.optional(),
6173
6185
  alert: alertLayoutSchema.optional()
6174
6186
  })
6175
6187
  );
6176
- var integerSchemaSchema = z.lazy(
6188
+ var oneOfSchemaSchema = z.lazy(
6177
6189
  () => z.object({
6178
- type: z.literal("integer"),
6179
6190
  autofillProvider: z.string().optional(),
6180
6191
  promoted: z.boolean().optional(),
6181
6192
  refreshFormOnChange: z.boolean().optional(),
6182
6193
  refreshUrl: z.string().optional(),
6183
6194
  refreshFormUrl: z.string().optional(),
6195
+ promotion: jsonElementSchema.optional(),
6196
+ oneOf: z.array(schemaSchema),
6184
6197
  placeholder: z.string().optional(),
6185
- minimum: z.number().optional(),
6186
- maximum: z.number().optional(),
6187
6198
  $id: z.string().optional(),
6188
6199
  title: z.string().optional(),
6189
6200
  description: z.string().optional(),
6190
6201
  control: z.string().optional(),
6191
- default: z.number().optional(),
6202
+ default: jsonElementSchema.optional(),
6203
+ hidden: z.boolean().optional(),
6204
+ icon: iconSchema.optional(),
6205
+ image: imageSchema.optional(),
6206
+ keywords: z.array(z.string()).optional(),
6207
+ summary: summaryProviderSchema.optional(),
6208
+ analyticsId: z.string().optional(),
6209
+ refreshStepOnChange: z.boolean().optional(),
6210
+ alert: alertLayoutSchema.optional(),
6211
+ help: helpSchema.optional(),
6212
+ autocompleteHint: z.array(autocompleteTokenSchema).optional(),
6213
+ autofillKey: z.string().optional(),
6214
+ validationMessages: z.record(z.string()).optional(),
6215
+ disabled: z.boolean().optional()
6216
+ })
6217
+ );
6218
+ var stringSchemaSchema = z.lazy(
6219
+ () => z.object({
6220
+ type: z.literal("string"),
6221
+ autofillProvider: z.string().optional(),
6222
+ promoted: z.boolean().optional(),
6223
+ refreshFormOnChange: z.boolean().optional(),
6224
+ refreshUrl: z.string().optional(),
6225
+ refreshFormUrl: z.string().optional(),
6226
+ format: stringSchemaFormatSchema.optional(),
6227
+ displayFormat: z.string().optional(),
6228
+ placeholder: z.string().optional(),
6229
+ minLength: z.number().optional(),
6230
+ maxLength: z.number().optional(),
6231
+ minimum: z.string().optional(),
6232
+ maximum: z.string().optional(),
6233
+ pattern: z.string().optional(),
6234
+ autocapitalization: autocapitalizationTypeSchema.optional(),
6235
+ autocorrect: z.boolean().optional(),
6236
+ $id: z.string().optional(),
6237
+ title: z.string().optional(),
6238
+ description: z.string().optional(),
6239
+ control: z.string().optional(),
6240
+ default: z.string().optional(),
6192
6241
  hidden: z.boolean().optional(),
6193
6242
  disabled: z.boolean().optional(),
6194
6243
  icon: iconSchema.optional(),
@@ -6201,14 +6250,16 @@ var integerSchemaSchema = z.lazy(
6201
6250
  validationAsync: validateAsyncSchema.optional(),
6202
6251
  validationMessages: z.record(z.string()).optional(),
6203
6252
  alert: alertLayoutSchema.optional(),
6253
+ cameraConfig: jsonElementSchema.optional(),
6254
+ accepts: z.array(z.string()).optional(),
6255
+ maxSize: z.number().optional(),
6256
+ source: uploadSourceSchema.optional(),
6204
6257
  autocompleteHint: z.array(autocompleteTokenSchema).optional(),
6205
6258
  autofillKey: z.string().optional(),
6206
- help: helpSchema.optional()
6259
+ help: helpSchema.optional(),
6260
+ suggestions: suggestionsSchema.optional()
6207
6261
  })
6208
6262
  );
6209
- var arraySchemaSchema = z.lazy(
6210
- () => z.union([arraySchemaListSchema, arraySchemaTupleSchema])
6211
- );
6212
6263
  var arraySchemaListSchema = z.lazy(
6213
6264
  () => z.object({
6214
6265
  type: z.literal("array"),
@@ -6236,71 +6287,32 @@ var arraySchemaListSchema = z.lazy(
6236
6287
  disabled: z.boolean().optional()
6237
6288
  })
6238
6289
  );
6239
- var allOfSchemaSchema = z.lazy(
6290
+ var persistAsyncSchema = z.lazy(
6240
6291
  () => z.object({
6241
- disabled: z.boolean().optional(),
6242
- promoted: z.boolean().optional(),
6243
- allOf: z.array(schemaSchema),
6244
- $id: z.string().optional(),
6245
- title: z.string().optional(),
6246
- description: z.string().optional(),
6247
- control: z.string().optional(),
6248
- hidden: z.boolean().optional(),
6249
- icon: iconSchema.optional(),
6250
- image: imageSchema.optional(),
6251
- keywords: z.array(z.string()).optional(),
6252
- summary: summaryProviderSchema.optional(),
6253
- analyticsId: z.string().optional(),
6254
- alert: alertLayoutSchema.optional()
6292
+ param: z.string(),
6293
+ idProperty: z.string(),
6294
+ schema: schemaSchema,
6295
+ url: z.string(),
6296
+ method: httpMethodSchema
6255
6297
  })
6256
6298
  );
6257
- var booleanSchemaSchema = z.lazy(
6299
+ var arraySchemaTupleSchema = z.lazy(
6258
6300
  () => z.object({
6259
- type: z.literal("boolean"),
6260
- autofillProvider: z.string().optional(),
6301
+ type: z.literal("array"),
6261
6302
  promoted: z.boolean().optional(),
6262
- refreshFormOnChange: z.boolean().optional(),
6263
- refreshUrl: z.string().optional(),
6264
- refreshFormUrl: z.string().optional(),
6265
6303
  $id: z.string().optional(),
6304
+ items: z.array(schemaSchema),
6266
6305
  title: z.string().optional(),
6267
6306
  description: z.string().optional(),
6268
6307
  control: z.string().optional(),
6269
- default: z.boolean().optional(),
6270
6308
  hidden: z.boolean().optional(),
6271
- disabled: z.boolean().optional(),
6272
6309
  icon: iconSchema.optional(),
6273
6310
  image: imageSchema.optional(),
6274
6311
  keywords: z.array(z.string()).optional(),
6275
6312
  summary: summaryProviderSchema.optional(),
6276
6313
  analyticsId: z.string().optional(),
6277
6314
  persistAsync: persistAsyncSchema.optional(),
6278
- refreshStepOnChange: z.boolean().optional(),
6279
6315
  validationAsync: validateAsyncSchema.optional(),
6280
- alert: alertLayoutSchema.optional(),
6281
- autofillKey: z.string().optional(),
6282
- help: helpSchema.optional()
6283
- })
6284
- );
6285
- var objectSchemaSchema = z.lazy(
6286
- () => z.object({
6287
- type: z.literal("object"),
6288
- disabled: z.boolean().optional(),
6289
- promoted: z.boolean().optional(),
6290
- help: helpSchema.optional(),
6291
- properties: z.record(schemaSchema),
6292
- displayOrder: z.array(z.string()),
6293
- required: z.array(z.string()).optional(),
6294
- $id: z.string().optional(),
6295
- title: z.string().optional(),
6296
- description: z.string().optional(),
6297
- control: z.string().optional(),
6298
- hidden: z.boolean().optional(),
6299
- icon: iconSchema.optional(),
6300
- image: imageSchema.optional(),
6301
- keywords: z.array(z.string()).optional(),
6302
- summary: summaryProviderSchema.optional(),
6303
- analyticsId: z.string().optional(),
6304
6316
  alert: alertLayoutSchema.optional()
6305
6317
  })
6306
6318
  );
@@ -6456,7 +6468,7 @@ var getInputUpdateFunction = (uid, updateComponent) => (updateFn) => {
6456
6468
 
6457
6469
  // src/revamp/domain/components/StepDomainComponent.ts
6458
6470
  var createStepComponent = (stepProps) => {
6459
- const _a = stepProps, { uid, stepPolling, updateComponent } = _a, rest = __objRest(_a, ["uid", "stepPolling", "updateComponent"]);
6471
+ const _a = stepProps, { uid, stepPolling, stepRefreshAfter, updateComponent } = _a, rest = __objRest(_a, ["uid", "stepPolling", "stepRefreshAfter", "updateComponent"]);
6460
6472
  const update = getInputUpdateFunction(uid, updateComponent);
6461
6473
  return __spreadProps(__spreadValues({
6462
6474
  uid
@@ -6487,9 +6499,7 @@ var createStepComponent = (stepProps) => {
6487
6499
  },
6488
6500
  stop() {
6489
6501
  stepPolling == null ? void 0 : stepPolling.stop();
6490
- },
6491
- getRefreshAfter() {
6492
- return this.step.refreshAfter;
6502
+ stepRefreshAfter == null ? void 0 : stepRefreshAfter.stop();
6493
6503
  }
6494
6504
  });
6495
6505
  };
@@ -7214,6 +7224,9 @@ var getComponentValidationAsync = (update, performValidationAsync) => (
7214
7224
  }
7215
7225
  );
7216
7226
 
7227
+ // src/revamp/domain/components/utils/isOrWasValid.ts
7228
+ var isOrWasValid = (getErrors, previous, current) => getErrors(previous).length === 0 || getErrors(current).length === 0;
7229
+
7217
7230
  // src/revamp/domain/components/NumberInputComponent.ts
7218
7231
  var createNumberInputComponent = (numberInputProps, updateComponent) => {
7219
7232
  const _a = numberInputProps, {
@@ -7257,12 +7270,15 @@ var createNumberInputComponent = (numberInputProps, updateComponent) => {
7257
7270
  },
7258
7271
  // Noop
7259
7272
  onChange(updatedValue) {
7273
+ const prevValue = this.value;
7260
7274
  update((draft) => {
7261
7275
  draft.errors = [];
7262
7276
  draft.validationAsyncState.messages = {};
7263
7277
  draft.value = updatedValue;
7264
7278
  });
7265
- performDebouncedRefresh == null ? void 0 : performDebouncedRefresh();
7279
+ if (isOrWasValid(getValidationErrors, prevValue, updatedValue)) {
7280
+ performDebouncedRefresh == null ? void 0 : performDebouncedRefresh();
7281
+ }
7266
7282
  onValueChange();
7267
7283
  },
7268
7284
  async getSubmittableValue() {
@@ -8046,12 +8062,15 @@ var createIntegerInputComponent = (integerInputProps, updateComponent) => {
8046
8062
  },
8047
8063
  // Noop
8048
8064
  onChange(updatedValue) {
8065
+ const prevValue = this.value;
8049
8066
  update((draft) => {
8050
8067
  draft.errors = [];
8051
8068
  draft.validationAsyncState.messages = {};
8052
8069
  draft.value = updatedValue;
8053
8070
  });
8054
- performDebouncedRefresh == null ? void 0 : performDebouncedRefresh();
8071
+ if (isOrWasValid(getValidationErrors, prevValue, updatedValue)) {
8072
+ performDebouncedRefresh == null ? void 0 : performDebouncedRefresh();
8073
+ }
8055
8074
  onValueChange();
8056
8075
  },
8057
8076
  async getSubmittableValue() {
@@ -8353,12 +8372,15 @@ var createDateInputComponent = (textInputProps, updateComponent) => {
8353
8372
  },
8354
8373
  // Noop
8355
8374
  onChange(updatedValue) {
8375
+ const prevValue = this.value;
8356
8376
  update((draft) => {
8357
8377
  draft.errors = [];
8358
8378
  draft.validationAsyncState.messages = {};
8359
8379
  draft.value = updatedValue;
8360
8380
  });
8361
- performRefresh == null ? void 0 : performRefresh();
8381
+ if (isOrWasValid(getValidationErrors, prevValue, updatedValue)) {
8382
+ performRefresh == null ? void 0 : performRefresh();
8383
+ }
8362
8384
  onValueChange();
8363
8385
  },
8364
8386
  async getSubmittableValue() {
@@ -8422,7 +8444,8 @@ var stringSchemaToDateInputComponent = (schemaMapperProps, mapperProps) => {
8422
8444
  autocompleteHint,
8423
8445
  default: defaultValue,
8424
8446
  minimum: minimumDate,
8425
- maximum: maximumDate
8447
+ maximum: maximumDate,
8448
+ suggestions
8426
8449
  } = schema;
8427
8450
  const { getErrorMessageFunctions, updateComponent, onRefresh, onValueChange } = mapperProps;
8428
8451
  const errorMessageFunctions = getErrorMessageFunctions(schema.validationMessages);
@@ -8447,6 +8470,11 @@ var stringSchemaToDateInputComponent = (schemaMapperProps, mapperProps) => {
8447
8470
  ],
8448
8471
  minimumDate,
8449
8472
  maximumDate,
8473
+ suggestions: suggestions ? {
8474
+ values: suggestions.values.map((suggestion) => __spreadProps(__spreadValues({}, suggestion), {
8475
+ image: mapSpecImage(suggestion.image)
8476
+ }))
8477
+ } : void 0,
8450
8478
  value,
8451
8479
  persistedState,
8452
8480
  validationAsyncState,
@@ -8667,12 +8695,15 @@ var createTextInputComponent = (textInputProps, updateComponent) => {
8667
8695
  },
8668
8696
  // Noop
8669
8697
  onChange(updatedValue) {
8698
+ const prevValue = this.value;
8670
8699
  update((draft) => {
8671
8700
  draft.errors = [];
8672
8701
  draft.validationAsyncState.messages = {};
8673
8702
  draft.value = updatedValue;
8674
8703
  });
8675
- performDebouncedRefresh == null ? void 0 : performDebouncedRefresh();
8704
+ if (isOrWasValid(getValidationErrors, prevValue, updatedValue)) {
8705
+ performDebouncedRefresh == null ? void 0 : performDebouncedRefresh();
8706
+ }
8676
8707
  onValueChange();
8677
8708
  },
8678
8709
  async getSubmittableValue() {
@@ -8739,6 +8770,7 @@ var stringSchemaToTextInputComponent = (schemaMapperProps, mapperProps) => {
8739
8770
  format,
8740
8771
  maxLength,
8741
8772
  minLength,
8773
+ suggestions,
8742
8774
  validationMessages
8743
8775
  } = schema;
8744
8776
  const { getErrorMessageFunctions, updateComponent, onRefresh, onValueChange, logEvent } = mapperProps;
@@ -8769,6 +8801,11 @@ var stringSchemaToTextInputComponent = (schemaMapperProps, mapperProps) => {
8769
8801
  displayFormat,
8770
8802
  maxLength,
8771
8803
  minLength,
8804
+ suggestions: suggestions ? {
8805
+ values: suggestions.values.map((suggestion) => __spreadProps(__spreadValues({}, suggestion), {
8806
+ image: mapSpecImage(suggestion.image)
8807
+ }))
8808
+ } : void 0,
8772
8809
  value,
8773
8810
  persistedState,
8774
8811
  validationAsyncState,
@@ -10447,6 +10484,22 @@ var getUnreferencedSchemas = (step) => {
10447
10484
  );
10448
10485
  };
10449
10486
 
10487
+ // src/revamp/domain/features/refreshAfter/getStepRefreshAfter.ts
10488
+ var ONE_SECOND = 1e3;
10489
+ var getStepRefreshAfter = ({ refreshAfter, onRefresh }) => {
10490
+ const targetTime = new Date(refreshAfter).getTime();
10491
+ if (typeof refreshAfter !== "string" || Number.isNaN(targetTime)) {
10492
+ throw new Error(`Invalid refreshAfter value: ${String(refreshAfter)}`);
10493
+ }
10494
+ const timeLeft = Math.max(targetTime - Date.now(), ONE_SECOND);
10495
+ const timeout = setTimeout(() => {
10496
+ void onRefresh("refreshAfter");
10497
+ }, timeLeft);
10498
+ return {
10499
+ stop: () => clearTimeout(timeout)
10500
+ };
10501
+ };
10502
+
10450
10503
  // src/revamp/domain/mappers/mapStepToComponent.ts
10451
10504
  var mapStepToComponent = (_a) => {
10452
10505
  var _b = _a, {
@@ -10474,6 +10527,7 @@ var mapStepToComponent = (_a) => {
10474
10527
  layout = [],
10475
10528
  navigation,
10476
10529
  polling,
10530
+ refreshAfter,
10477
10531
  title
10478
10532
  } = step;
10479
10533
  const backNavigation = (_a2 = navigation == null ? void 0 : navigation.back) != null ? _a2 : navigation == null ? void 0 : navigation.backButton;
@@ -10505,6 +10559,7 @@ var mapStepToComponent = (_a) => {
10505
10559
  };
10506
10560
  const onRefresh = async (schemaId, url) => restProps.onRefresh(schemaId, url != null ? url : refreshUrl);
10507
10561
  const stepPolling = polling ? getStepPolling({ pollingConfig: polling, onAction: restProps.onAction, onPoll }) : void 0;
10562
+ const stepRefreshAfter = refreshAfter ? getStepRefreshAfter({ refreshAfter, onRefresh }) : void 0;
10508
10563
  const mapperProps = __spreadProps(__spreadValues({}, restProps), { trackEvent, onAction, onRefresh });
10509
10564
  const unreferencedSchemaFormComponents = mapUnreferencedSchemas(mapperProps);
10510
10565
  const layoutComponents = layout.map(
@@ -10521,12 +10576,12 @@ var mapStepToComponent = (_a) => {
10521
10576
  external,
10522
10577
  loadingState,
10523
10578
  stepPolling,
10579
+ stepRefreshAfter,
10524
10580
  title: displayStepTitle ? title : void 0,
10525
10581
  step,
10526
10582
  updateComponent,
10527
10583
  trackEvent,
10528
- onAction,
10529
- onRefresh
10584
+ onAction
10530
10585
  });
10531
10586
  return stepComponent;
10532
10587
  };
@@ -10964,13 +11019,6 @@ function useStableCallback(handler) {
10964
11019
  return (0, import_react2.useCallback)((...args) => ref.current ? ref.current(...args) : null, []);
10965
11020
  }
10966
11021
 
10967
- // src/revamp/utils/time-utils.ts
10968
- var getTimeDiffInMs = (timestamp) => {
10969
- const targetTime = new Date(timestamp).getTime();
10970
- const currentTime = Date.now();
10971
- return targetTime - currentTime;
10972
- };
10973
-
10974
11022
  // src/revamp/useDynamicFlowCore.tsx
10975
11023
  function useDynamicFlowCore(props) {
10976
11024
  const _a = props, { flowId, initialAction, initialStep, displayStepTitle = true } = _a, rest = __objRest(_a, ["flowId", "initialAction", "initialStep", "displayStepTitle"]);
@@ -11007,20 +11055,6 @@ function useDynamicFlowCore(props) {
11007
11055
  trackCoreEvent("Step Shown", { isFirstStep: true });
11008
11056
  }
11009
11057
  }, []);
11010
- const refreshAfter = stepComponent == null ? void 0 : stepComponent.getRefreshAfter();
11011
- console.log({ refreshAfter });
11012
- (0, import_react3.useEffect)(() => {
11013
- if (!refreshAfter) return;
11014
- const timeLeft = getTimeDiffInMs(refreshAfter);
11015
- if (timeLeft <= 0) {
11016
- void (stepComponent == null ? void 0 : stepComponent.onRefresh(void 0));
11017
- return;
11018
- }
11019
- const timeout = setTimeout(() => {
11020
- void (stepComponent == null ? void 0 : stepComponent.onRefresh(void 0));
11021
- }, timeLeft);
11022
- return () => clearTimeout(timeout);
11023
- }, [refreshAfter]);
11024
11058
  const createStep = (0, import_react3.useCallback)((newStep, etag) => {
11025
11059
  if (stepComponentRef.current) {
11026
11060
  stepCount.current += 1;
@@ -11425,6 +11459,7 @@ var dateInputComponentToProps = (component, rendererMapperProps) => __spreadProp
11425
11459
  autoComplete: component.autoComplete,
11426
11460
  minimumDate: component.minimumDate,
11427
11461
  maximumDate: component.maximumDate,
11462
+ suggestions: component.suggestions,
11428
11463
  onChange: component.onChange.bind(component)
11429
11464
  });
11430
11465
 
@@ -11691,6 +11726,7 @@ var textInputComponentToProps = (component, rendererMapperProps) => __spreadProp
11691
11726
  displayFormat: component.displayFormat,
11692
11727
  maxLength: component.maxLength,
11693
11728
  minLength: component.minLength,
11729
+ suggestions: component.suggestions,
11694
11730
  onChange: component.onChange.bind(component)
11695
11731
  });
11696
11732
 
@@ -11748,8 +11784,10 @@ var stepComponentToProps = ({
11748
11784
  error,
11749
11785
  external,
11750
11786
  loadingState,
11787
+ step,
11751
11788
  title,
11752
- components
11789
+ components,
11790
+ onAction
11753
11791
  }, rendererMapperProps) => {
11754
11792
  const childrenProps = components.map((c) => componentToRendererProps(c, rendererMapperProps));
11755
11793
  return __spreadValues({
@@ -11761,9 +11799,11 @@ var stepComponentToProps = ({
11761
11799
  error,
11762
11800
  external,
11763
11801
  loadingState,
11802
+ step,
11764
11803
  title,
11765
11804
  children: childrenProps.map(rendererMapperProps.render),
11766
- childrenProps
11805
+ childrenProps,
11806
+ onAction
11767
11807
  }, rendererMapperProps);
11768
11808
  };
11769
11809
 
@@ -14869,10 +14909,9 @@ var getSafeStringValue = (value, options = {}) => {
14869
14909
  if (coerceValue) {
14870
14910
  logInvalidTypeCoercedWarning({ received: typeof value, expected: "string" });
14871
14911
  return String(value);
14872
- } else {
14873
- logInvalidTypeFallbackWarning({ received: typeof value, expected: "string" });
14874
- return void 0;
14875
14912
  }
14913
+ logInvalidTypeFallbackWarning({ received: typeof value, expected: "string" });
14914
+ return void 0;
14876
14915
  }
14877
14916
  return value;
14878
14917
  };
@@ -14893,10 +14932,9 @@ var getSafeStringOrNumberValue = (value, options = {}) => {
14893
14932
  if (coerceValue) {
14894
14933
  logInvalidTypeCoercedWarning(logProps);
14895
14934
  return String(value);
14896
- } else {
14897
- logInvalidTypeFallbackWarning(logProps);
14898
- return void 0;
14899
14935
  }
14936
+ logInvalidTypeFallbackWarning(logProps);
14937
+ return void 0;
14900
14938
  }
14901
14939
  return value;
14902
14940
  };
@@ -14909,10 +14947,9 @@ var getSafeBooleanValue = (value, options = {}) => {
14909
14947
  if (coerceValue) {
14910
14948
  logInvalidTypeCoercedWarning({ received: typeof value, expected: "boolean" });
14911
14949
  return Boolean(value);
14912
- } else {
14913
- logInvalidTypeFallbackWarning({ received: typeof value, expected: "boolean" });
14914
- return void 0;
14915
14950
  }
14951
+ logInvalidTypeFallbackWarning({ received: typeof value, expected: "boolean" });
14952
+ return void 0;
14916
14953
  }
14917
14954
  return value;
14918
14955
  };