@wise/dynamic-flow-client 3.22.2-experimental-b24c473 → 3.22.2

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.mjs CHANGED
@@ -138,12 +138,12 @@ var init_clsx = __esm({
138
138
  }
139
139
  });
140
140
 
141
- // ../../node_modules/.pnpm/@wise+art@2.15.0_@transferwise+neptune-css@14.18.0_@types+react@18.3.11_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index-a91e5689.esm.js
141
+ // ../../node_modules/.pnpm/@wise+art@2.15.0_@transferwise+neptune-css@14.19.0_@types+react@18.3.11_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index-a91e5689.esm.js
142
142
  import { useState as useState2, useEffect as useEffect2, forwardRef, Suspense, lazy } from "react";
143
143
  import { jsx as jsx17, jsxs as jsxs4, Fragment as Fragment3 } from "react/jsx-runtime";
144
144
  var unknownFlagName, Flag, Sizes, ImageSizes, imageSizes, Assets, RenderMode;
145
145
  var init_index_a91e5689_esm = __esm({
146
- "../../node_modules/.pnpm/@wise+art@2.15.0_@transferwise+neptune-css@14.18.0_@types+react@18.3.11_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index-a91e5689.esm.js"() {
146
+ "../../node_modules/.pnpm/@wise+art@2.15.0_@transferwise+neptune-css@14.19.0_@types+react@18.3.11_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index-a91e5689.esm.js"() {
147
147
  "use strict";
148
148
  init_clsx();
149
149
  unknownFlagName = "wise";
@@ -756,7 +756,7 @@ var id_default = {
756
756
  "dynamicFlows.PersistAsyncSchema.genericError": "Terjadi kesalahan, mohon coba lagi.",
757
757
  "dynamicFlows.ReadOnlySchema.no": "Tidak",
758
758
  "dynamicFlows.ReadOnlySchema.yes": "Ya",
759
- "dynamicFlows.SearchLayout.loading": "Memuat..."
759
+ "dynamicFlows.SearchLayout.loading": "Memuat ..."
760
760
  };
761
761
 
762
762
  // src/i18n/it.json
@@ -909,7 +909,7 @@ var pl_default = {
909
909
  "dynamicFlows.PersistAsyncSchema.genericError": "Wyst\u0105pi\u0142 b\u0142\u0105d, prosimy spr\xF3bowa\u0107 ponownie.",
910
910
  "dynamicFlows.ReadOnlySchema.no": "Nie",
911
911
  "dynamicFlows.ReadOnlySchema.yes": "Tak",
912
- "dynamicFlows.SearchLayout.loading": "Trwa \u0142adowanie..."
912
+ "dynamicFlows.SearchLayout.loading": "\u0141adowanie..."
913
913
  };
914
914
 
915
915
  // src/i18n/pt.json
@@ -5867,13 +5867,21 @@ var z = /* @__PURE__ */ Object.freeze({
5867
5867
  quotelessJson,
5868
5868
  ZodError
5869
5869
  });
5870
- var sizeSchema = z.union([
5871
- z.literal("xs"),
5872
- z.literal("sm"),
5873
- z.literal("md"),
5874
- z.literal("lg"),
5875
- z.literal("xl")
5870
+ var imageSchema = z.object({
5871
+ text: z.string().optional(),
5872
+ url: z.string(),
5873
+ accessibilityDescription: z.string().optional()
5874
+ });
5875
+ var httpMethodSchema = z.union([
5876
+ z.literal("GET"),
5877
+ z.literal("POST"),
5878
+ z.literal("PUT"),
5879
+ z.literal("PATCH"),
5880
+ z.literal("DELETE")
5876
5881
  ]);
5882
+ var iconNamedSchema = z.object({
5883
+ name: z.string()
5884
+ });
5877
5885
  var contextSchema = z.union([
5878
5886
  z.literal("positive"),
5879
5887
  z.literal("neutral"),
@@ -5884,107 +5892,18 @@ var contextSchema = z.union([
5884
5892
  z.literal("info"),
5885
5893
  z.literal("primary")
5886
5894
  ]);
5887
- var columnsLayoutBiasSchema = z.union([
5888
- z.literal("none"),
5889
- z.literal("left"),
5890
- z.literal("right")
5891
- ]);
5892
- var statusListLayoutStatusSchema = z.union([
5893
- z.literal("not-done"),
5894
- z.literal("pending"),
5895
- z.literal("done")
5896
- ]);
5897
- var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
5898
- var formLayoutSchemaReferenceSchema = z.object({
5899
- $ref: z.string()
5900
- });
5901
- var modalLayoutTriggerSchema = z.object({
5902
- title: z.string()
5903
- });
5904
- var httpMethodSchema = z.union([
5905
- z.literal("GET"),
5906
- z.literal("POST"),
5907
- z.literal("PUT"),
5908
- z.literal("PATCH"),
5909
- z.literal("DELETE")
5910
- ]);
5911
- var dividerLayoutSchema = z.object({
5912
- type: z.literal("divider"),
5913
- control: z.string().optional(),
5914
- margin: sizeSchema.optional()
5895
+ var iconTextSchema = z.object({
5896
+ text: z.string()
5915
5897
  });
5916
- var listLayoutStatusSchema = z.union([
5917
- z.literal("warning"),
5918
- z.literal("neutral"),
5919
- z.literal("positive")
5898
+ var sizeSchema = z.union([
5899
+ z.literal("xs"),
5900
+ z.literal("sm"),
5901
+ z.literal("md"),
5902
+ z.literal("lg"),
5903
+ z.literal("xl")
5920
5904
  ]);
5921
- var headingLayoutSchema = z.object({
5922
- type: z.literal("heading"),
5923
- text: z.string(),
5924
- size: sizeSchema.optional(),
5925
- align: alignSchema.optional(),
5926
- control: z.string().optional(),
5927
- margin: sizeSchema.optional()
5928
- });
5929
- var formLayoutSchema = z.object({
5930
- type: z.literal("form"),
5931
- schema: formLayoutSchemaReferenceSchema.optional(),
5932
- schemaId: z.string(),
5933
- control: z.string().optional(),
5934
- margin: sizeSchema.optional()
5935
- });
5936
- var imageLayoutSchema = z.object({
5937
- type: z.literal("image"),
5938
- text: z.string().optional(),
5939
- url: z.string(),
5940
- size: sizeSchema.optional(),
5941
- accessibilityDescription: z.string().optional(),
5942
- control: z.string().optional(),
5943
- margin: sizeSchema.optional()
5944
- });
5945
- var infoLayoutSchema = z.object({
5946
- type: z.literal("info"),
5947
- markdown: z.string(),
5948
- align: alignSchema.optional(),
5949
- control: z.string().optional(),
5950
- margin: sizeSchema.optional()
5951
- });
5952
- var loadingIndicatorLayoutSchema = z.object({
5953
- type: z.literal("loading-indicator"),
5954
- size: sizeSchema.optional(),
5955
- control: z.string().optional(),
5956
- margin: sizeSchema.optional()
5957
- });
5958
- var paragraphLayoutSchema = z.object({
5959
- type: z.literal("paragraph"),
5960
- text: z.string(),
5961
- align: alignSchema.optional(),
5962
- control: z.string().optional(),
5963
- margin: sizeSchema.optional()
5964
- });
5965
- var instructionsLayoutItemSchema = z.object({
5966
- text: z.string(),
5967
- context: contextSchema
5968
- });
5969
- var helpSchema = z.object({
5970
- markdown: z.string()
5971
- });
5972
- var imageSchema = z.object({
5973
- text: z.string().optional(),
5974
- url: z.string(),
5975
- accessibilityDescription: z.string().optional()
5976
- });
5977
- var summaryProviderSchema = z.object({
5978
- providesTitle: z.boolean().optional(),
5979
- providesDescription: z.boolean().optional(),
5980
- providesIcon: z.boolean().optional(),
5981
- providesImage: z.boolean().optional()
5982
- });
5983
- var validateAsyncSchema = z.object({
5984
- param: z.string(),
5985
- method: httpMethodSchema,
5986
- url: z.string()
5987
- });
5905
+ var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
5906
+ var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
5988
5907
  var autocompleteTokenSchema = z.union([
5989
5908
  z.literal("on"),
5990
5909
  z.literal("name"),
@@ -6050,14 +5969,106 @@ var autocompleteTokenSchema = z.union([
6050
5969
  z.literal("fax"),
6051
5970
  z.literal("pager")
6052
5971
  ]);
6053
- var stringSchemaFormatSchema = z.union([
6054
- z.literal("date"),
6055
- z.literal("email"),
6056
- z.literal("numeric"),
6057
- z.literal("password"),
6058
- z.literal("phone-number"),
6059
- z.literal("base64url")
5972
+ var loadingIndicatorLayoutSchema = z.object({
5973
+ type: z.literal("loading-indicator"),
5974
+ size: sizeSchema.optional(),
5975
+ control: z.string().optional(),
5976
+ margin: sizeSchema.optional()
5977
+ });
5978
+ var paragraphLayoutSchema = z.object({
5979
+ type: z.literal("paragraph"),
5980
+ text: z.string(),
5981
+ align: alignSchema.optional(),
5982
+ control: z.string().optional(),
5983
+ margin: sizeSchema.optional()
5984
+ });
5985
+ var dividerLayoutSchema = z.object({
5986
+ type: z.literal("divider"),
5987
+ control: z.string().optional(),
5988
+ margin: sizeSchema.optional()
5989
+ });
5990
+ var listLayoutStatusSchema = z.union([
5991
+ z.literal("warning"),
5992
+ z.literal("neutral"),
5993
+ z.literal("positive")
5994
+ ]);
5995
+ var formLayoutSchemaReferenceSchema = z.object({
5996
+ $ref: z.string()
5997
+ });
5998
+ var imageLayoutSchema = z.object({
5999
+ type: z.literal("image"),
6000
+ text: z.string().optional(),
6001
+ url: z.string(),
6002
+ size: sizeSchema.optional(),
6003
+ accessibilityDescription: z.string().optional(),
6004
+ control: z.string().optional(),
6005
+ margin: sizeSchema.optional()
6006
+ });
6007
+ var statusListLayoutStatusSchema = z.union([
6008
+ z.literal("not-done"),
6009
+ z.literal("pending"),
6010
+ z.literal("done")
6060
6011
  ]);
6012
+ var instructionsLayoutItemSchema = z.object({
6013
+ text: z.string(),
6014
+ context: contextSchema
6015
+ });
6016
+ var modalLayoutTriggerSchema = z.object({
6017
+ title: z.string()
6018
+ });
6019
+ var searchLayoutSchema = z.object({
6020
+ type: z.literal("search"),
6021
+ title: z.string(),
6022
+ method: httpMethodSchema,
6023
+ url: z.string(),
6024
+ param: z.string(),
6025
+ emptyMessage: z.string().optional(),
6026
+ control: z.string().optional(),
6027
+ margin: sizeSchema.optional()
6028
+ });
6029
+ var infoLayoutSchema = z.object({
6030
+ type: z.literal("info"),
6031
+ markdown: z.string(),
6032
+ align: alignSchema.optional(),
6033
+ control: z.string().optional(),
6034
+ margin: sizeSchema.optional()
6035
+ });
6036
+ var formLayoutSchema = z.object({
6037
+ type: z.literal("form"),
6038
+ schema: formLayoutSchemaReferenceSchema.optional(),
6039
+ schemaId: z.string(),
6040
+ control: z.string().optional(),
6041
+ margin: sizeSchema.optional()
6042
+ });
6043
+ var headingLayoutSchema = z.object({
6044
+ type: z.literal("heading"),
6045
+ text: z.string(),
6046
+ size: sizeSchema.optional(),
6047
+ align: alignSchema.optional(),
6048
+ control: z.string().optional(),
6049
+ margin: sizeSchema.optional()
6050
+ });
6051
+ var markdownLayoutSchema = z.object({
6052
+ type: z.literal("markdown"),
6053
+ content: z.string(),
6054
+ align: alignSchema.optional(),
6055
+ control: z.string().optional(),
6056
+ margin: sizeSchema.optional()
6057
+ });
6058
+ var columnsLayoutBiasSchema = z.union([
6059
+ z.literal("none"),
6060
+ z.literal("left"),
6061
+ z.literal("right")
6062
+ ]);
6063
+ var helpSchema = z.object({
6064
+ markdown: z.string()
6065
+ });
6066
+ var searchSearchRequestSchema = z.object({
6067
+ url: z.string(),
6068
+ method: httpMethodSchema,
6069
+ param: z.string(),
6070
+ query: z.string()
6071
+ });
6061
6072
  var jsonElementSchema = z.lazy(
6062
6073
  () => z.union([
6063
6074
  z.string(),
@@ -6067,7 +6078,6 @@ var jsonElementSchema = z.lazy(
6067
6078
  z.array(jsonElementSchema)
6068
6079
  ]).nullable()
6069
6080
  );
6070
- var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
6071
6081
  var externalSchema = z.object({
6072
6082
  url: z.string()
6073
6083
  });
@@ -6075,28 +6085,42 @@ var stepErrorSchema = z.object({
6075
6085
  error: z.string().optional(),
6076
6086
  validation: jsonElementSchema.optional()
6077
6087
  });
6078
- var errorResponseBodySchema = z.object({
6079
- refreshFormUrl: z.string().optional(),
6080
- analytics: z.record(z.string()).optional(),
6081
- error: z.string().optional(),
6082
- validation: jsonElementSchema.optional(),
6083
- refreshUrl: z.string().optional()
6088
+ var stringSchemaFormatSchema = z.union([
6089
+ z.literal("date"),
6090
+ z.literal("email"),
6091
+ z.literal("numeric"),
6092
+ z.literal("password"),
6093
+ z.literal("phone-number"),
6094
+ z.literal("base64url")
6095
+ ]);
6096
+ var summarySummariserSchema = z.object({
6097
+ defaultTitle: z.string().optional(),
6098
+ defaultDescription: z.string().optional(),
6099
+ defaultIcon: iconSchema.optional(),
6100
+ defaultImage: imageLayoutSchema.optional(),
6101
+ providesTitle: z.boolean().optional(),
6102
+ providesDescription: z.boolean().optional(),
6103
+ providesIcon: z.boolean().optional(),
6104
+ providesImage: z.boolean().optional()
6084
6105
  });
6085
- var searchSearchRequestSchema = z.object({
6086
- url: z.string(),
6087
- method: httpMethodSchema,
6106
+ var validateAsyncSchema = z.object({
6088
6107
  param: z.string(),
6089
- query: z.string()
6108
+ method: httpMethodSchema,
6109
+ url: z.string()
6110
+ });
6111
+ var summaryProviderSchema = z.object({
6112
+ providesTitle: z.boolean().optional(),
6113
+ providesDescription: z.boolean().optional(),
6114
+ providesIcon: z.boolean().optional(),
6115
+ providesImage: z.boolean().optional()
6090
6116
  });
6117
+ var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
6091
6118
  var navigationStackBehaviorSchema = z.union([
6092
6119
  z.literal("default"),
6093
6120
  z.literal("remove-previous"),
6094
6121
  z.literal("remove-all"),
6095
6122
  z.literal("replace-current")
6096
6123
  ]);
6097
- var linkSchema = z.object({
6098
- url: z.string()
6099
- });
6100
6124
  var actionTypeSchema = z.union([
6101
6125
  z.literal("primary"),
6102
6126
  z.literal("secondary"),
@@ -6104,11 +6128,9 @@ var actionTypeSchema = z.union([
6104
6128
  z.literal("positive"),
6105
6129
  z.literal("negative")
6106
6130
  ]);
6107
- var iconNamedSchema = z.object({
6108
- name: z.string()
6109
- });
6110
- var iconTextSchema = z.object({
6111
- text: z.string()
6131
+ var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
6132
+ var linkSchema = z.object({
6133
+ url: z.string()
6112
6134
  });
6113
6135
  var actionSchema = z.object({
6114
6136
  title: z.string().optional(),
@@ -6125,26 +6147,19 @@ var actionSchema = z.object({
6125
6147
  timeout: z.number().optional(),
6126
6148
  skipValidation: z.boolean().optional()
6127
6149
  });
6128
- var markdownLayoutSchema = z.object({
6129
- type: z.literal("markdown"),
6130
- content: z.string(),
6131
- align: alignSchema.optional(),
6132
- control: z.string().optional(),
6133
- margin: sizeSchema.optional()
6134
- });
6135
- var searchLayoutSchema = z.object({
6136
- type: z.literal("search"),
6150
+ var listLayoutItemSchema = z.object({
6137
6151
  title: z.string(),
6138
- method: httpMethodSchema,
6139
- url: z.string(),
6140
- param: z.string(),
6141
- emptyMessage: z.string().optional(),
6142
- control: z.string().optional(),
6143
- margin: sizeSchema.optional()
6152
+ description: z.string().optional(),
6153
+ icon: iconSchema,
6154
+ status: listLayoutStatusSchema.optional()
6144
6155
  });
6145
- var reviewLayoutCallToActionSchema = z.object({
6156
+ var decisionLayoutOptionSchema = z.object({
6157
+ action: actionSchema,
6146
6158
  title: z.string(),
6147
- action: actionSchema
6159
+ description: z.string().optional(),
6160
+ disabled: z.boolean().optional(),
6161
+ icon: iconSchema.optional(),
6162
+ image: imageLayoutSchema.optional()
6148
6163
  });
6149
6164
  var instructionsLayoutSchema = z.object({
6150
6165
  type: z.literal("instructions"),
@@ -6153,38 +6168,26 @@ var instructionsLayoutSchema = z.object({
6153
6168
  control: z.string().optional(),
6154
6169
  margin: sizeSchema.optional()
6155
6170
  });
6156
- var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
6157
6171
  var behaviorSchema = z.object({
6158
6172
  action: actionSchema.optional(),
6159
6173
  link: linkSchema.optional()
6160
6174
  });
6175
+ var buttonLayoutSchema = z.object({
6176
+ type: z.literal("button"),
6177
+ size: sizeSchema.optional(),
6178
+ title: z.string().optional(),
6179
+ action: actionSchema,
6180
+ context: contextSchema.optional(),
6181
+ disabled: z.boolean().optional(),
6182
+ pinOrder: z.number().optional(),
6183
+ control: z.string().optional(),
6184
+ margin: sizeSchema.optional()
6185
+ });
6161
6186
  var reviewLayoutFieldSchema = z.object({
6162
6187
  label: z.string(),
6163
6188
  value: z.string(),
6164
6189
  help: helpSchema.optional()
6165
6190
  });
6166
- var alertLayoutCallToActionSchema = z.object({
6167
- title: z.string(),
6168
- accessibilityDescription: z.string().optional(),
6169
- behavior: behaviorSchema
6170
- });
6171
- var summarySummariserSchema = z.object({
6172
- defaultTitle: z.string().optional(),
6173
- defaultDescription: z.string().optional(),
6174
- defaultIcon: iconSchema.optional(),
6175
- defaultImage: imageLayoutSchema.optional(),
6176
- providesTitle: z.boolean().optional(),
6177
- providesDescription: z.boolean().optional(),
6178
- providesIcon: z.boolean().optional(),
6179
- providesImage: z.boolean().optional()
6180
- });
6181
- var linkHandlerSchema = z.object({
6182
- regexPattern: z.string(),
6183
- action: actionSchema
6184
- });
6185
- var actionResponseBodySchema = z.object({
6186
- action: actionSchema
6187
- });
6188
6191
  var searchResultSearchSchema = z.object({
6189
6192
  type: z.literal("search"),
6190
6193
  title: z.string(),
@@ -6201,6 +6204,20 @@ var searchResultActionSchema = z.object({
6201
6204
  image: imageLayoutSchema.optional(),
6202
6205
  value: actionSchema
6203
6206
  });
6207
+ var actionResponseBodySchema = z.object({
6208
+ action: actionSchema
6209
+ });
6210
+ var errorResponseBodySchema = z.object({
6211
+ refreshFormUrl: z.string().optional(),
6212
+ analytics: z.record(z.string()).optional(),
6213
+ error: z.string().optional(),
6214
+ validation: jsonElementSchema.optional(),
6215
+ refreshUrl: z.string().optional()
6216
+ });
6217
+ var linkHandlerSchema = z.object({
6218
+ regexPattern: z.string(),
6219
+ action: actionSchema
6220
+ });
6204
6221
  var pollingOnErrorSchema = z.object({
6205
6222
  action: actionSchema
6206
6223
  });
@@ -6208,25 +6225,57 @@ var navigationBackBehaviorSchema = z.object({
6208
6225
  title: z.string().optional(),
6209
6226
  action: actionSchema
6210
6227
  });
6211
- var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
6212
- var buttonLayoutSchema = z.object({
6213
- type: z.literal("button"),
6214
- size: sizeSchema.optional(),
6228
+ var reviewLayoutCallToActionSchema = z.object({
6229
+ title: z.string(),
6230
+ action: actionSchema
6231
+ });
6232
+ var alertLayoutCallToActionSchema = z.object({
6233
+ title: z.string(),
6234
+ accessibilityDescription: z.string().optional(),
6235
+ behavior: behaviorSchema
6236
+ });
6237
+ var listLayoutSchema = z.object({
6238
+ type: z.literal("list"),
6239
+ items: z.array(listLayoutItemSchema),
6215
6240
  title: z.string().optional(),
6216
- action: actionSchema,
6217
- context: contextSchema.optional(),
6218
- disabled: z.boolean().optional(),
6219
- pinOrder: z.number().optional(),
6220
6241
  control: z.string().optional(),
6221
6242
  margin: sizeSchema.optional()
6222
6243
  });
6223
- var decisionLayoutOptionSchema = z.object({
6224
- action: actionSchema,
6244
+ var decisionLayoutSchema = z.object({
6245
+ type: z.literal("decision"),
6246
+ title: z.string().optional(),
6247
+ options: z.array(decisionLayoutOptionSchema),
6248
+ control: z.string().optional(),
6249
+ margin: sizeSchema.optional()
6250
+ });
6251
+ var itemCallToActionSchema = z.object({
6225
6252
  title: z.string(),
6226
- description: z.string().optional(),
6227
- disabled: z.boolean().optional(),
6228
- icon: iconSchema.optional(),
6229
- image: imageLayoutSchema.optional()
6253
+ accessibilityDescription: z.string().optional(),
6254
+ behavior: behaviorSchema
6255
+ });
6256
+ var reviewLayoutSchema = z.object({
6257
+ type: z.literal("review"),
6258
+ orientation: z.string().optional(),
6259
+ action: actionSchema.optional(),
6260
+ fields: z.array(reviewLayoutFieldSchema),
6261
+ title: z.string().optional(),
6262
+ callToAction: reviewLayoutCallToActionSchema.optional(),
6263
+ control: z.string().optional(),
6264
+ margin: sizeSchema.optional()
6265
+ });
6266
+ var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
6267
+ var pollingSchema = z.object({
6268
+ url: z.string(),
6269
+ interval: z.number().optional(),
6270
+ delay: z.number().optional(),
6271
+ timeout: z.number().optional(),
6272
+ maxAttempts: z.number(),
6273
+ onError: pollingOnErrorSchema
6274
+ });
6275
+ var navigationSchema = z.object({
6276
+ backButton: navigationBackBehaviorSchema.optional(),
6277
+ back: navigationBackBehaviorSchema.optional(),
6278
+ stackBehavior: navigationStackBehaviorSchema.optional()
6230
6279
  });
6231
6280
  var alertLayoutSchema = z.object({
6232
6281
  type: z.literal("alert"),
@@ -6236,27 +6285,6 @@ var alertLayoutSchema = z.object({
6236
6285
  margin: sizeSchema.optional(),
6237
6286
  callToAction: alertLayoutCallToActionSchema.optional()
6238
6287
  });
6239
- var reviewLayoutSchema = z.object({
6240
- type: z.literal("review"),
6241
- orientation: z.string().optional(),
6242
- action: actionSchema.optional(),
6243
- fields: z.array(reviewLayoutFieldSchema),
6244
- title: z.string().optional(),
6245
- callToAction: reviewLayoutCallToActionSchema.optional(),
6246
- control: z.string().optional(),
6247
- margin: sizeSchema.optional()
6248
- });
6249
- var listLayoutItemSchema = z.object({
6250
- title: z.string(),
6251
- description: z.string().optional(),
6252
- icon: iconSchema,
6253
- status: listLayoutStatusSchema.optional()
6254
- });
6255
- var itemCallToActionSchema = z.object({
6256
- title: z.string(),
6257
- accessibilityDescription: z.string().optional(),
6258
- behavior: behaviorSchema
6259
- });
6260
6288
  var statusListLayoutItemSchema = z.object({
6261
6289
  title: z.string(),
6262
6290
  description: z.string().optional(),
@@ -6264,6 +6292,9 @@ var statusListLayoutItemSchema = z.object({
6264
6292
  status: statusListLayoutStatusSchema.optional(),
6265
6293
  callToAction: itemCallToActionSchema.optional()
6266
6294
  });
6295
+ var searchResponseBodySchema = z.object({
6296
+ results: z.array(searchResultSchema)
6297
+ });
6267
6298
  var blobSchemaSchema = z.object({
6268
6299
  type: z.literal("blob"),
6269
6300
  promoted: z.boolean().optional(),
@@ -6302,34 +6333,6 @@ var constSchemaSchema = z.object({
6302
6333
  analyticsId: z.string().optional(),
6303
6334
  disabled: z.boolean().optional()
6304
6335
  });
6305
- var pollingSchema = z.object({
6306
- url: z.string(),
6307
- interval: z.number().optional(),
6308
- delay: z.number().optional(),
6309
- timeout: z.number().optional(),
6310
- maxAttempts: z.number(),
6311
- onError: pollingOnErrorSchema
6312
- });
6313
- var navigationSchema = z.object({
6314
- backButton: navigationBackBehaviorSchema.optional(),
6315
- back: navigationBackBehaviorSchema.optional(),
6316
- stackBehavior: navigationStackBehaviorSchema.optional()
6317
- });
6318
- var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
6319
- var decisionLayoutSchema = z.object({
6320
- type: z.literal("decision"),
6321
- title: z.string().optional(),
6322
- options: z.array(decisionLayoutOptionSchema),
6323
- control: z.string().optional(),
6324
- margin: sizeSchema.optional()
6325
- });
6326
- var listLayoutSchema = z.object({
6327
- type: z.literal("list"),
6328
- items: z.array(listLayoutItemSchema),
6329
- title: z.string().optional(),
6330
- control: z.string().optional(),
6331
- margin: sizeSchema.optional()
6332
- });
6333
6336
  var statusListLayoutSchema = z.object({
6334
6337
  type: z.literal("status-list"),
6335
6338
  items: z.array(statusListLayoutItemSchema),
@@ -6337,19 +6340,6 @@ var statusListLayoutSchema = z.object({
6337
6340
  control: z.string().optional(),
6338
6341
  margin: sizeSchema.optional()
6339
6342
  });
6340
- var searchResponseBodySchema = z.object({
6341
- results: z.array(searchResultSchema)
6342
- });
6343
- var columnsLayoutSchema = z.lazy(
6344
- () => z.object({
6345
- type: z.literal("columns"),
6346
- left: z.array(layoutSchema),
6347
- right: z.array(layoutSchema),
6348
- bias: columnsLayoutBiasSchema.optional(),
6349
- control: z.string().optional(),
6350
- margin: sizeSchema.optional()
6351
- })
6352
- );
6353
6343
  var layoutSchema = z.lazy(
6354
6344
  () => z.union([
6355
6345
  alertLayoutSchema,
@@ -6373,6 +6363,26 @@ var layoutSchema = z.lazy(
6373
6363
  statusListLayoutSchema
6374
6364
  ])
6375
6365
  );
6366
+ var boxLayoutSchema = z.lazy(
6367
+ () => z.object({
6368
+ type: z.literal("box"),
6369
+ components: z.array(layoutSchema),
6370
+ width: sizeSchema.optional(),
6371
+ border: z.boolean().optional(),
6372
+ control: z.string().optional(),
6373
+ margin: sizeSchema.optional()
6374
+ })
6375
+ );
6376
+ var columnsLayoutSchema = z.lazy(
6377
+ () => z.object({
6378
+ type: z.literal("columns"),
6379
+ left: z.array(layoutSchema),
6380
+ right: z.array(layoutSchema),
6381
+ bias: columnsLayoutBiasSchema.optional(),
6382
+ control: z.string().optional(),
6383
+ margin: sizeSchema.optional()
6384
+ })
6385
+ );
6376
6386
  var modalLayoutSchema = z.lazy(
6377
6387
  () => z.object({
6378
6388
  type: z.literal("modal"),
@@ -6388,14 +6398,25 @@ var modalLayoutContentSchema = z.lazy(
6388
6398
  components: z.array(layoutSchema)
6389
6399
  })
6390
6400
  );
6391
- var boxLayoutSchema = z.lazy(
6401
+ var stepSchema = z.lazy(
6392
6402
  () => z.object({
6393
- type: z.literal("box"),
6394
- components: z.array(layoutSchema),
6395
- width: sizeSchema.optional(),
6396
- border: z.boolean().optional(),
6397
- control: z.string().optional(),
6398
- margin: sizeSchema.optional()
6403
+ key: z.string().optional(),
6404
+ type: z.string().optional(),
6405
+ actions: z.array(actionSchema).optional(),
6406
+ refreshFormUrl: z.string().optional(),
6407
+ id: z.string(),
6408
+ title: z.string(),
6409
+ schemas: z.array(schemaSchema),
6410
+ layout: z.array(layoutSchema),
6411
+ description: z.string().optional(),
6412
+ model: jsonElementSchema.optional(),
6413
+ external: externalSchema.optional(),
6414
+ polling: pollingSchema.optional(),
6415
+ linkHandlers: z.array(linkHandlerSchema).optional(),
6416
+ analytics: z.record(z.string()).optional(),
6417
+ errors: stepErrorSchema.optional(),
6418
+ navigation: navigationSchema.optional(),
6419
+ refreshUrl: z.string().optional()
6399
6420
  })
6400
6421
  );
6401
6422
  var schemaSchema = z.lazy(
@@ -6621,21 +6642,17 @@ var stringSchemaSchema = z.lazy(
6621
6642
  help: helpSchema.optional()
6622
6643
  })
6623
6644
  );
6624
- var persistAsyncSchema = z.lazy(
6625
- () => z.object({
6626
- param: z.string(),
6627
- idProperty: z.string(),
6628
- schema: schemaSchema,
6629
- url: z.string(),
6630
- method: httpMethodSchema
6631
- })
6632
- );
6633
- var arraySchemaTupleSchema = z.lazy(
6645
+ var arraySchemaListSchema = z.lazy(
6634
6646
  () => z.object({
6635
6647
  type: z.literal("array"),
6636
6648
  promoted: z.boolean().optional(),
6637
6649
  $id: z.string().optional(),
6638
- items: z.array(schemaSchema),
6650
+ items: schemaSchema,
6651
+ addItemTitle: z.string(),
6652
+ editItemTitle: z.string(),
6653
+ minItems: z.number().optional(),
6654
+ maxItems: z.number().optional(),
6655
+ placeholder: z.string().optional(),
6639
6656
  title: z.string().optional(),
6640
6657
  description: z.string().optional(),
6641
6658
  control: z.string().optional(),
@@ -6643,24 +6660,30 @@ var arraySchemaTupleSchema = z.lazy(
6643
6660
  icon: iconSchema.optional(),
6644
6661
  image: imageSchema.optional(),
6645
6662
  keywords: z.array(z.string()).optional(),
6646
- summary: summaryProviderSchema.optional(),
6663
+ summary: summarySummariserSchema.optional(),
6647
6664
  analyticsId: z.string().optional(),
6648
6665
  persistAsync: persistAsyncSchema.optional(),
6649
6666
  validationAsync: validateAsyncSchema.optional(),
6650
- alert: alertLayoutSchema.optional()
6667
+ alert: alertLayoutSchema.optional(),
6668
+ validationMessages: z.record(z.string()).optional(),
6669
+ disabled: z.boolean().optional()
6651
6670
  })
6652
6671
  );
6653
- var arraySchemaListSchema = z.lazy(
6672
+ var persistAsyncSchema = z.lazy(
6673
+ () => z.object({
6674
+ param: z.string(),
6675
+ idProperty: z.string(),
6676
+ schema: schemaSchema,
6677
+ url: z.string(),
6678
+ method: httpMethodSchema
6679
+ })
6680
+ );
6681
+ var arraySchemaTupleSchema = z.lazy(
6654
6682
  () => z.object({
6655
6683
  type: z.literal("array"),
6656
6684
  promoted: z.boolean().optional(),
6657
6685
  $id: z.string().optional(),
6658
- items: schemaSchema,
6659
- addItemTitle: z.string(),
6660
- editItemTitle: z.string(),
6661
- minItems: z.number().optional(),
6662
- maxItems: z.number().optional(),
6663
- placeholder: z.string().optional(),
6686
+ items: z.array(schemaSchema),
6664
6687
  title: z.string().optional(),
6665
6688
  description: z.string().optional(),
6666
6689
  control: z.string().optional(),
@@ -6668,34 +6691,11 @@ var arraySchemaListSchema = z.lazy(
6668
6691
  icon: iconSchema.optional(),
6669
6692
  image: imageSchema.optional(),
6670
6693
  keywords: z.array(z.string()).optional(),
6671
- summary: summarySummariserSchema.optional(),
6694
+ summary: summaryProviderSchema.optional(),
6672
6695
  analyticsId: z.string().optional(),
6673
6696
  persistAsync: persistAsyncSchema.optional(),
6674
6697
  validationAsync: validateAsyncSchema.optional(),
6675
- alert: alertLayoutSchema.optional(),
6676
- validationMessages: z.record(z.string()).optional(),
6677
- disabled: z.boolean().optional()
6678
- })
6679
- );
6680
- var stepSchema = z.lazy(
6681
- () => z.object({
6682
- key: z.string().optional(),
6683
- type: z.string().optional(),
6684
- actions: z.array(actionSchema).optional(),
6685
- refreshFormUrl: z.string().optional(),
6686
- id: z.string(),
6687
- title: z.string(),
6688
- schemas: z.array(schemaSchema),
6689
- layout: z.array(layoutSchema),
6690
- description: z.string().optional(),
6691
- model: jsonElementSchema.optional(),
6692
- external: externalSchema.optional(),
6693
- polling: pollingSchema.optional(),
6694
- linkHandlers: z.array(linkHandlerSchema).optional(),
6695
- analytics: z.record(z.string()).optional(),
6696
- errors: stepErrorSchema.optional(),
6697
- navigation: navigationSchema.optional(),
6698
- refreshUrl: z.string().optional()
6698
+ alert: alertLayoutSchema.optional()
6699
6699
  })
6700
6700
  );
6701
6701
  var validateStep = (step) => validate(step, stepSchema);
@@ -11546,7 +11546,7 @@ var DateInputRenderer_default = DateInputRenderer;
11546
11546
  // ../renderers/src/DecisionRenderer.tsx
11547
11547
  import { NavigationOptionsList, NavigationOption, Header } from "@transferwise/components";
11548
11548
 
11549
- // ../../node_modules/.pnpm/@wise+art@2.15.0_@transferwise+neptune-css@14.18.0_@types+react@18.3.11_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index.esm.js
11549
+ // ../../node_modules/.pnpm/@wise+art@2.15.0_@transferwise+neptune-css@14.19.0_@types+react@18.3.11_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index.esm.js
11550
11550
  init_index_a91e5689_esm();
11551
11551
  init_clsx();
11552
11552
  import "react";
@@ -15860,102 +15860,6 @@ function RepeatableSchemaStep({
15860
15860
  }
15861
15861
  var RepeatableSchemaStep_default = RepeatableSchemaStep;
15862
15862
 
15863
- // src/legacy/common/validators/schemas/one-of-preselection.ts
15864
- function isValidStringSchema2(value, schema) {
15865
- return !getStringValidationFailures(value, schema).length;
15866
- }
15867
- function isValidNumberSchema2(value, schema) {
15868
- return !getNumberValidationFailures(value, schema).length;
15869
- }
15870
- function isValidIntegerSchema2(value, schema) {
15871
- return !getIntegerValidationFailures(value, schema).length;
15872
- }
15873
- function isValidBooleanSchema2(value, schema) {
15874
- return !getBooleanValidationFailures(value, schema).length;
15875
- }
15876
- function isValidConstSchema2(value, schema) {
15877
- return !getConstValidationFailures(value, schema).length;
15878
- }
15879
- function isValidObjectSchema2(value, schema) {
15880
- if (!isObject2(value) || schema.type !== "object" || !isObject2(schema.properties)) {
15881
- return false;
15882
- }
15883
- const checks = Object.keys(schema.properties).map((propertyName) => {
15884
- if (value[propertyName] === void 0) {
15885
- return null;
15886
- }
15887
- return isObjectPropertyValid2(
15888
- value[propertyName],
15889
- schema.properties[propertyName],
15890
- schema.required && schema.required.includes(propertyName)
15891
- );
15892
- });
15893
- return !checks.some((check) => check === false) && checks.some((check) => check === true);
15894
- }
15895
- function isObjectPropertyValid2(propertyValue, propertySchema, isRequired) {
15896
- if (propertySchema.hidden) {
15897
- return true;
15898
- }
15899
- if (typeof propertyValue === "undefined") {
15900
- return !isRequired;
15901
- }
15902
- return isValidSchemaForPreselection(propertyValue, propertySchema);
15903
- }
15904
- function isValidArraySchema2(value, schema) {
15905
- if (schema.type !== "array" || !isObject2(schema.items)) {
15906
- return false;
15907
- }
15908
- if (getArrayValidationFailures(value, schema).length > 0) {
15909
- return false;
15910
- }
15911
- return Array.isArray(value) && isListArraySchema(schema) && // TupleArraySchema not yet supported
15912
- value.map((item) => isValidSchemaForPreselection(item, schema.items)).every((valid) => valid);
15913
- }
15914
- function isValidOneOfSchema2(value, schema) {
15915
- if (!isArray2(schema.oneOf)) {
15916
- return false;
15917
- }
15918
- return schema.oneOf.some((childSchema) => isValidSchemaForPreselection(value, childSchema));
15919
- }
15920
- function isValidAllOfSchema2(value, schema) {
15921
- if (!isArray2(schema.allOf)) {
15922
- return false;
15923
- }
15924
- return schema.allOf.map((childSchema) => isValidSchemaForPreselection(value, childSchema)).every((valid) => valid);
15925
- }
15926
- function isValidBlobSchema2(value, schema) {
15927
- return !getBlobValidationFailures(value, schema).length;
15928
- }
15929
- function isValidSchemaForPreselection(value, schema) {
15930
- if (schema.oneOf) {
15931
- return isValidOneOfSchema2(value, schema);
15932
- }
15933
- if (schema.allOf) {
15934
- return isValidAllOfSchema2(value, schema);
15935
- }
15936
- if (schema.const) {
15937
- return isValidConstSchema2(value, schema);
15938
- }
15939
- switch (schema.type) {
15940
- case "string":
15941
- return isValidStringSchema2(value, schema);
15942
- case "number":
15943
- return isValidNumberSchema2(value, schema);
15944
- case "integer":
15945
- return isValidIntegerSchema2(value, schema);
15946
- case "boolean":
15947
- return isValidBooleanSchema2(value, schema);
15948
- case "array":
15949
- return isValidArraySchema2(value, schema);
15950
- case "object":
15951
- return isValidObjectSchema2(value, schema);
15952
- case "blob":
15953
- return isValidBlobSchema2(value, schema);
15954
- default:
15955
- return false;
15956
- }
15957
- }
15958
-
15959
15863
  // src/legacy/jsonSchemaForm/oneOfSchema/utils.ts
15960
15864
  var getActiveSchemaIndex = (schema, model) => {
15961
15865
  const indexFromModel = getValidIndexFromValue(schema, model);
@@ -15977,18 +15881,8 @@ var getActiveSchemaIndex = (schema, model) => {
15977
15881
  if (isOneOfObjectSchema(schema) && !isUndefined3(schema.default) && isObjectModel2(schema.default) && Object.keys(schema.default).length >= 1) {
15978
15882
  return getBestMatchingSchemaIndexForValue(schema, schema.default);
15979
15883
  }
15980
- if (schema.oneOf.every((s) => isOneOfObjectSchema(s) || isObjectSchema2(s) || isAllOfSchema2(s)) && isObjectModel2(model) && Object.keys(model).length >= 1) {
15981
- return getValidIndexFromValueForPreselection(schema, model);
15982
- }
15983
15884
  return null;
15984
15885
  };
15985
- var getValidIndexFromValueForPreselection = (schema, value) => {
15986
- const predicate = (childSchema) => !isUndefined3(value) && isValidSchemaForPreselection(value, childSchema);
15987
- if (schema.oneOf.filter(predicate).length === 1) {
15988
- return schema.oneOf.findIndex(predicate);
15989
- }
15990
- return -1;
15991
- };
15992
15886
  var getValidIndexFromValue = (schema, value) => {
15993
15887
  const predicate = (childSchema) => !isUndefined3(value) && isValidSchema(value, childSchema);
15994
15888
  if (schema.oneOf.filter(predicate).length === 1) {