@wise/dynamic-flow-client 3.16.3 → 3.16.4

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.
Files changed (57) hide show
  1. package/build/main.js +80 -75
  2. package/build/main.min.js +1 -1
  3. package/build/main.mjs +58 -53
  4. package/build/types/common/httpClientContext/HttpClientContext.d.ts +0 -1
  5. package/build/types/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.d.ts +0 -1
  6. package/build/types/legacy/common/contexts/featureContext/FeatureContext.d.ts +0 -1
  7. package/build/types/legacy/common/contexts/logContext/LogContext.d.ts +0 -1
  8. package/build/types/legacy/common/utils/api-utils.d.ts +1 -1
  9. package/build/types/legacy/dynamicFlow/utils/responseParsers/response-parsers.d.ts +1 -1
  10. package/build/types/legacy/dynamicFlow/utils/useDynamicFlowState.d.ts +0 -1
  11. package/build/types/legacy/dynamicFlow/utils/useErrorResponse.d.ts +1 -1
  12. package/build/types/legacy/dynamicFlow/utils/useLoader.d.ts +0 -1
  13. package/build/types/legacy/formControl/FormControl.d.ts +1 -1
  14. package/build/types/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.d.ts +1 -1
  15. package/build/types/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.d.ts +0 -1
  16. package/build/types/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.d.ts +1 -1
  17. package/build/types/legacy/test-utils/log-utils.d.ts +0 -1
  18. package/build/types/revamp/DynamicFragmentCore.d.ts +2 -3
  19. package/build/types/revamp/DynamicFragmentWise.d.ts +2 -3
  20. package/build/types/revamp/domain/components/AlertComponent.d.ts +1 -1
  21. package/build/types/revamp/domain/components/AllOfComponent.d.ts +1 -1
  22. package/build/types/revamp/domain/components/BooleanInputComponent.d.ts +1 -1
  23. package/build/types/revamp/domain/components/BoxComponent.d.ts +1 -1
  24. package/build/types/revamp/domain/components/ButtonComponent.d.ts +1 -1
  25. package/build/types/revamp/domain/components/ColumnsComponent.d.ts +1 -1
  26. package/build/types/revamp/domain/components/ConstComponent.d.ts +1 -1
  27. package/build/types/revamp/domain/components/DateInputComponent.d.ts +1 -1
  28. package/build/types/revamp/domain/components/DecisionComponent.d.ts +1 -1
  29. package/build/types/revamp/domain/components/DividerComponent.d.ts +1 -1
  30. package/build/types/revamp/domain/components/FormComponent.d.ts +1 -1
  31. package/build/types/revamp/domain/components/HeadingComponent.d.ts +1 -1
  32. package/build/types/revamp/domain/components/ImageComponent.d.ts +1 -1
  33. package/build/types/revamp/domain/components/InstructionsComponent.d.ts +1 -1
  34. package/build/types/revamp/domain/components/IntegerInputComponent.d.ts +1 -1
  35. package/build/types/revamp/domain/components/LoadingIndicatorComponent.d.ts +1 -1
  36. package/build/types/revamp/domain/components/MarkdownComponent.d.ts +1 -1
  37. package/build/types/revamp/domain/components/ModalComponent.d.ts +1 -1
  38. package/build/types/revamp/domain/components/MultiSelectInputComponent.d.ts +1 -1
  39. package/build/types/revamp/domain/components/MultiUploadInputComponent.d.ts +1 -1
  40. package/build/types/revamp/domain/components/NumberInputComponent.d.ts +1 -1
  41. package/build/types/revamp/domain/components/ObjectComponent.d.ts +1 -1
  42. package/build/types/revamp/domain/components/ParagraphComponent.d.ts +1 -1
  43. package/build/types/revamp/domain/components/ReviewComponent.d.ts +1 -1
  44. package/build/types/revamp/domain/components/SelectInputComponent.d.ts +1 -1
  45. package/build/types/revamp/domain/components/StatusListComponent.d.ts +1 -1
  46. package/build/types/revamp/domain/components/StepDomainComponent.d.ts +1 -1
  47. package/build/types/revamp/domain/components/TextInputComponent.d.ts +1 -1
  48. package/build/types/revamp/domain/components/TupleComponent.d.ts +1 -1
  49. package/build/types/revamp/domain/components/UploadInputComponent.d.ts +1 -1
  50. package/build/types/revamp/domain/components/repeatableComponent/RepeatableComponent.d.ts +1 -1
  51. package/build/types/revamp/domain/components/searchComponent/SearchComponent.d.ts +1 -1
  52. package/build/types/revamp/domain/mappers/schema/tests/test-utils.d.ts +2 -3
  53. package/build/types/revamp/domain/mappers/schema/utils/mapCommonSchemaProps.d.ts +1 -1
  54. package/build/types/revamp/domain/mappers/utils/legacy-utils.d.ts +3 -3
  55. package/build/types/revamp/useDynamicFlowCore.d.ts +0 -1
  56. package/build/types/revamp/utils/type-utils.d.ts +2 -2
  57. package/package.json +26 -26
package/build/main.js CHANGED
@@ -144,10 +144,10 @@ var init_clsx = __esm({
144
144
  }
145
145
  });
146
146
 
147
- // ../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.12.1_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index-93a0c34e.esm.js
147
+ // ../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.14.0_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index-93a0c34e.esm.js
148
148
  var import_react7, import_jsx_runtime17, unknownFlagName, Flag, Sizes, ImageSizes, imageSizes, Assets, RenderMode;
149
149
  var init_index_93a0c34e_esm = __esm({
150
- "../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.12.1_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index-93a0c34e.esm.js"() {
150
+ "../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.14.0_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index-93a0c34e.esm.js"() {
151
151
  "use strict";
152
152
  init_clsx();
153
153
  import_react7 = require("react");
@@ -6199,7 +6199,7 @@ var linkHandlerSchema = z.object({
6199
6199
  var pollingOnErrorSchema = z.object({
6200
6200
  action: actionSchema
6201
6201
  });
6202
- var navigationBackBehaviourSchema = z.object({
6202
+ var navigationBackBehaviorSchema = z.object({
6203
6203
  title: z.string().optional(),
6204
6204
  action: actionSchema
6205
6205
  });
@@ -6251,8 +6251,8 @@ var pollingSchema = z.object({
6251
6251
  onError: pollingOnErrorSchema
6252
6252
  });
6253
6253
  var navigationSchema = z.object({
6254
- backButton: navigationBackBehaviourSchema.optional(),
6255
- back: navigationBackBehaviourSchema.optional(),
6254
+ backButton: navigationBackBehaviorSchema.optional(),
6255
+ back: navigationBackBehaviorSchema.optional(),
6256
6256
  stackBehavior: navigationStackBehaviorSchema.optional()
6257
6257
  });
6258
6258
  var alertLayoutSchema = z.object({
@@ -6369,9 +6369,9 @@ var stepSchema = z.lazy(
6369
6369
  refreshFormUrl: z.string().optional(),
6370
6370
  id: z.string(),
6371
6371
  title: z.string(),
6372
- description: z.string().optional(),
6373
6372
  schemas: z.array(schemaSchema),
6374
6373
  layout: z.array(layoutSchema),
6374
+ description: z.string().optional(),
6375
6375
  model: jsonElementSchema.optional(),
6376
6376
  external: externalSchema.optional(),
6377
6377
  polling: pollingSchema.optional(),
@@ -11265,7 +11265,7 @@ var DateInputRenderer_default = DateInputRenderer;
11265
11265
  // ../renderers/src/DecisionRenderer.tsx
11266
11266
  var import_components9 = require("@transferwise/components");
11267
11267
 
11268
- // ../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.12.1_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index.esm.js
11268
+ // ../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.14.0_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index.esm.js
11269
11269
  init_index_93a0c34e_esm();
11270
11270
  init_clsx();
11271
11271
  var import_react8 = require("react");
@@ -12202,6 +12202,7 @@ var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
12202
12202
  var import_components27 = require("@transferwise/components");
12203
12203
  var import_icons2 = require("@transferwise/icons");
12204
12204
  var import_react15 = require("react");
12205
+ var import_react_intl17 = require("react-intl");
12205
12206
  var import_jsx_runtime43 = require("react/jsx-runtime");
12206
12207
  function InlineSearchRenderer({
12207
12208
  id,
@@ -12213,10 +12214,12 @@ function InlineSearchRenderer({
12213
12214
  }) {
12214
12215
  const [hasSearched, setHasSearched] = (0, import_react15.useState)(false);
12215
12216
  const trackEvent = useTrackEvent();
12217
+ const intl = (0, import_react_intl17.useIntl)();
12216
12218
  return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12217
12219
  import_components27.Typeahead,
12218
12220
  {
12219
12221
  id: "typeahead-input-id",
12222
+ intl,
12220
12223
  name: "typeahead-input-name",
12221
12224
  size: "md",
12222
12225
  maxHeight: 100,
@@ -12771,11 +12774,11 @@ var getFieldValue = (value, help, orientation) => {
12771
12774
  var import_react19 = require("react");
12772
12775
 
12773
12776
  // ../renderers/src/step/ExternalConfirmationDialog.tsx
12774
- var import_react_intl18 = require("react-intl");
12777
+ var import_react_intl19 = require("react-intl");
12775
12778
 
12776
12779
  // ../renderers/src/messages/external-confirmation.messages.ts
12777
- var import_react_intl17 = require("react-intl");
12778
- var external_confirmation_messages_default = (0, import_react_intl17.defineMessages)({
12780
+ var import_react_intl18 = require("react-intl");
12781
+ var external_confirmation_messages_default = (0, import_react_intl18.defineMessages)({
12779
12782
  title: {
12780
12783
  id: "df.wise.ExternalConfirmation.title",
12781
12784
  defaultMessage: "Please confirm",
@@ -12805,7 +12808,7 @@ function ExternalConfirmationDialog({
12805
12808
  external,
12806
12809
  onClose
12807
12810
  }) {
12808
- const { formatMessage } = (0, import_react_intl18.useIntl)();
12811
+ const { formatMessage } = (0, import_react_intl19.useIntl)();
12809
12812
  return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
12810
12813
  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("h2", { className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.title) }),
12811
12814
  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components37.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(external.url) }) }),
@@ -12892,8 +12895,10 @@ function StepRendererComponent(props) {
12892
12895
  }
12893
12896
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(StepRendererContextProvider, { value, children: [
12894
12897
  back ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(BackButton_default, __spreadValues({}, back)) : null,
12895
- title ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components39.Title, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
12896
- description ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-xs-center m-b-2", children: description }) : void 0,
12898
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "m-b-4", children: [
12899
+ title ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components39.Title, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
12900
+ description ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-xs-center", children: description }) : void 0
12901
+ ] }) : void 0,
12897
12902
  error ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components39.Alert, { type: "negative", className: "m-b-2", message: error }) : void 0,
12898
12903
  children
12899
12904
  ] });
@@ -13350,7 +13355,7 @@ function isReference(block) {
13350
13355
 
13351
13356
  // src/legacy/dynamicFlow/DynamicFlow.tsx
13352
13357
  var import_react67 = require("react");
13353
- var import_react_intl49 = require("react-intl");
13358
+ var import_react_intl50 = require("react-intl");
13354
13359
 
13355
13360
  // src/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.tsx
13356
13361
  var import_react25 = require("react");
@@ -14271,11 +14276,11 @@ function useExternalStepPolling(polling, onAction) {
14271
14276
 
14272
14277
  // src/legacy/common/hooks/usePersistAsync/usePersistAsync.ts
14273
14278
  var import_react55 = require("react");
14274
- var import_react_intl40 = require("react-intl");
14279
+ var import_react_intl41 = require("react-intl");
14275
14280
 
14276
14281
  // src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.tsx
14277
14282
  var import_react54 = require("react");
14278
- var import_react_intl39 = require("react-intl");
14283
+ var import_react_intl40 = require("react-intl");
14279
14284
 
14280
14285
  // src/legacy/common/constants/DateMode.ts
14281
14286
  var DateMode = {
@@ -14694,11 +14699,11 @@ var DynamicDivider_default = DynamicDivider;
14694
14699
  // src/legacy/layout/external/DynamicExternal.tsx
14695
14700
  var import_components44 = require("@transferwise/components");
14696
14701
  var import_react32 = require("react");
14697
- var import_react_intl20 = require("react-intl");
14702
+ var import_react_intl21 = require("react-intl");
14698
14703
 
14699
14704
  // src/legacy/layout/external/DynamicExternal.messages.ts
14700
- var import_react_intl19 = require("react-intl");
14701
- var DynamicExternal_messages_default = (0, import_react_intl19.defineMessages)({
14705
+ var import_react_intl20 = require("react-intl");
14706
+ var DynamicExternal_messages_default = (0, import_react_intl20.defineMessages)({
14702
14707
  retryTitle: {
14703
14708
  id: "dynamicFlows.DynamicExternal.retryTitle",
14704
14709
  defaultMessage: "Reopen window",
@@ -14710,7 +14715,7 @@ var DynamicExternal_messages_default = (0, import_react_intl19.defineMessages)({
14710
14715
  var import_jsx_runtime77 = require("react/jsx-runtime");
14711
14716
  var DynamicExternal = ({ component, onAction }) => {
14712
14717
  const { requestUrl, responseHandlers, polling, retryTitle } = component;
14713
- const intl = (0, import_react_intl20.useIntl)();
14718
+ const intl = (0, import_react_intl21.useIntl)();
14714
14719
  const openExternalUrl = (0, import_react32.useCallback)(
14715
14720
  () => window.open(requestUrl, "df-external-window"),
14716
14721
  [requestUrl]
@@ -14789,7 +14794,7 @@ var import_react34 = require("react");
14789
14794
  // src/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.tsx
14790
14795
  var import_components46 = require("@transferwise/components");
14791
14796
  var import_formatting2 = require("@transferwise/formatting");
14792
- var import_react_intl21 = require("react-intl");
14797
+ var import_react_intl22 = require("react-intl");
14793
14798
  var import_jsx_runtime79 = require("react/jsx-runtime");
14794
14799
  function ControlFeedback(props) {
14795
14800
  var _a;
@@ -14815,7 +14820,7 @@ ControlFeedback.defaultProps = {
14815
14820
  validationAsyncSuccessMessage: null
14816
14821
  };
14817
14822
  function useDefaultValidationMessages(schema) {
14818
- const { formatMessage, locale } = (0, import_react_intl21.useIntl)();
14823
+ const { formatMessage, locale } = (0, import_react_intl22.useIntl)();
14819
14824
  const formattedMessages = {
14820
14825
  type: formatMessage(validation_messages_default.type),
14821
14826
  minimum: formatMessage(validation_messages_default.minimum, {
@@ -14902,11 +14907,11 @@ function constructUploadError(response) {
14902
14907
  }
14903
14908
 
14904
14909
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.tsx
14905
- var import_react_intl23 = require("react-intl");
14910
+ var import_react_intl24 = require("react-intl");
14906
14911
 
14907
14912
  // src/legacy/common/messages.ts
14908
- var import_react_intl22 = require("react-intl");
14909
- var messages_default = (0, import_react_intl22.defineMessages)({
14913
+ var import_react_intl23 = require("react-intl");
14914
+ var messages_default = (0, import_react_intl23.defineMessages)({
14910
14915
  required: {
14911
14916
  id: "dynamicFlows.DefaultErrorMessages.required",
14912
14917
  defaultMessage: "Please fill out this field.",
@@ -14919,7 +14924,7 @@ function useFormattedDefaultErrorMessages({
14919
14924
  maxItems,
14920
14925
  minItems
14921
14926
  }) {
14922
- const { formatMessage } = (0, import_react_intl23.useIntl)();
14927
+ const { formatMessage } = (0, import_react_intl24.useIntl)();
14923
14928
  const { maxFileSizeError, maxItemsError, minItemsError } = multi_file_upload_messages_default;
14924
14929
  return {
14925
14930
  maxFileSizeErrorMessage: formatMessage(maxFileSizeError),
@@ -15039,7 +15044,7 @@ function getValidationMessages(schema, required, defaultErrorMessages) {
15039
15044
  var import_components49 = require("@transferwise/components");
15040
15045
  var import_classnames8 = __toESM(require_classnames());
15041
15046
  var import_react35 = require("react");
15042
- var import_react_intl25 = require("react-intl");
15047
+ var import_react_intl26 = require("react-intl");
15043
15048
 
15044
15049
  // src/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.tsx
15045
15050
  var import_components48 = require("@transferwise/components");
@@ -15133,8 +15138,8 @@ var getDisabled = (disabled) => {
15133
15138
  };
15134
15139
 
15135
15140
  // src/common/messages/multi-select.messages.ts
15136
- var import_react_intl24 = require("react-intl");
15137
- var multi_select_messages_default2 = (0, import_react_intl24.defineMessages)({
15141
+ var import_react_intl25 = require("react-intl");
15142
+ var multi_select_messages_default2 = (0, import_react_intl25.defineMessages)({
15138
15143
  summary: {
15139
15144
  id: "dynamicFlows.MultiSelect.summary",
15140
15145
  defaultMessage: "{first} and {count} more",
@@ -15152,7 +15157,7 @@ function MultiSelectSchema({
15152
15157
  errors,
15153
15158
  onChange
15154
15159
  }) {
15155
- const { formatMessage, locale } = (0, import_react_intl25.useIntl)();
15160
+ const { formatMessage, locale } = (0, import_react_intl26.useIntl)();
15156
15161
  const { disabled, items, validationMessages, placeholder } = schema;
15157
15162
  const options = items.oneOf.map((item) => mapConstSchemaToOption(item, "select"));
15158
15163
  const id = (0, import_react35.useMemo)(() => schema.$id || generateRandomId(), [schema.$id]);
@@ -15256,7 +15261,7 @@ var getInitialModelIndices2 = (model, options) => {
15256
15261
  var import_components51 = require("@transferwise/components");
15257
15262
  var import_icons4 = require("@transferwise/icons");
15258
15263
  var import_react37 = require("react");
15259
- var import_react_intl28 = require("react-intl");
15264
+ var import_react_intl29 = require("react-intl");
15260
15265
 
15261
15266
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.tsx
15262
15267
  var import_components50 = require("@transferwise/components");
@@ -15275,8 +15280,8 @@ function ItemSummaryOption2({ item, onClick }) {
15275
15280
  }
15276
15281
 
15277
15282
  // src/common/messages/repeatable.messages.ts
15278
- var import_react_intl26 = require("react-intl");
15279
- var repeatable_messages_default2 = (0, import_react_intl26.defineMessages)({
15283
+ var import_react_intl27 = require("react-intl");
15284
+ var repeatable_messages_default2 = (0, import_react_intl27.defineMessages)({
15280
15285
  addItemTitle: {
15281
15286
  id: "dynamicFlows.ArraySchema.addItemTitle",
15282
15287
  defaultMessage: "Add Item",
@@ -15301,7 +15306,7 @@ var repeatable_messages_default2 = (0, import_react_intl26.defineMessages)({
15301
15306
 
15302
15307
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.tsx
15303
15308
  var import_react36 = require("react");
15304
- var import_react_intl27 = require("react-intl");
15309
+ var import_react_intl28 = require("react-intl");
15305
15310
  var import_jsx_runtime84 = require("react/jsx-runtime");
15306
15311
  function RepeatableSchemaStep({
15307
15312
  type,
@@ -15312,7 +15317,7 @@ function RepeatableSchemaStep({
15312
15317
  onModelChange,
15313
15318
  onAction
15314
15319
  }) {
15315
- const { formatMessage } = (0, import_react_intl27.useIntl)();
15320
+ const { formatMessage } = (0, import_react_intl28.useIntl)();
15316
15321
  const [filename, setFilename] = (0, import_react36.useState)(void 0);
15317
15322
  const step = {
15318
15323
  layout: [
@@ -15619,7 +15624,7 @@ function RepeatableSchema({
15619
15624
  setEditableItem({ item: null, model: null });
15620
15625
  setOpenModalType(null);
15621
15626
  };
15622
- const { formatMessage } = (0, import_react_intl28.useIntl)();
15627
+ const { formatMessage } = (0, import_react_intl29.useIntl)();
15623
15628
  const validations = getValidationFailures(model, schema, required);
15624
15629
  const base64ValidationMessages = useFormattedDefaultErrorMessages({
15625
15630
  minItems: schema.minItems,
@@ -15835,11 +15840,11 @@ var import_react41 = require("react");
15835
15840
 
15836
15841
  // src/legacy/jsonSchemaForm/help/Help.tsx
15837
15842
  var import_components53 = require("@transferwise/components");
15838
- var import_react_intl30 = require("react-intl");
15843
+ var import_react_intl31 = require("react-intl");
15839
15844
 
15840
15845
  // src/common/messages/help.messages.ts
15841
- var import_react_intl29 = require("react-intl");
15842
- var help_messages_default2 = (0, import_react_intl29.defineMessages)({
15846
+ var import_react_intl30 = require("react-intl");
15847
+ var help_messages_default2 = (0, import_react_intl30.defineMessages)({
15843
15848
  helpAria: {
15844
15849
  id: "dynamicFlows.Help.ariaLabel",
15845
15850
  defaultMessage: "Click here for more info.",
@@ -15850,7 +15855,7 @@ var help_messages_default2 = (0, import_react_intl29.defineMessages)({
15850
15855
  // src/legacy/jsonSchemaForm/help/Help.tsx
15851
15856
  var import_jsx_runtime89 = require("react/jsx-runtime");
15852
15857
  function Help2(props) {
15853
- const intl = (0, import_react_intl30.useIntl)();
15858
+ const intl = (0, import_react_intl31.useIntl)();
15854
15859
  return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
15855
15860
  import_components53.Info,
15856
15861
  {
@@ -15866,7 +15871,7 @@ var Help_default2 = Help2;
15866
15871
 
15867
15872
  // src/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.tsx
15868
15873
  var import_react40 = require("react");
15869
- var import_react_intl31 = require("react-intl");
15874
+ var import_react_intl32 = require("react-intl");
15870
15875
 
15871
15876
  // src/legacy/formControl/FormControl.tsx
15872
15877
  var import_components54 = require("@transferwise/components");
@@ -16572,7 +16577,7 @@ function SchemaFormControl(props) {
16572
16577
  labelledBy
16573
16578
  } = props;
16574
16579
  const log = useLogger();
16575
- const intl = (0, import_react_intl31.useIntl)();
16580
+ const intl = (0, import_react_intl32.useIntl)();
16576
16581
  const getSanitisedValue = (value2) => isNativeInput(schema.type) && (isNull3(value2) || isUndefined3(value2)) ? "" : value2;
16577
16582
  const onModelChange = (value2, type, metadata) => {
16578
16583
  onChange(getValidBasicModelOrNull(value2, schema), type, metadata);
@@ -16815,7 +16820,7 @@ var OneOfSchema_default = OneOfSchema;
16815
16820
  // src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.tsx
16816
16821
  var import_classnames12 = __toESM(require_classnames());
16817
16822
  var import_react43 = require("react");
16818
- var import_react_intl32 = require("react-intl");
16823
+ var import_react_intl33 = require("react-intl");
16819
16824
 
16820
16825
  // src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.tsx
16821
16826
  var import_components56 = require("@transferwise/components");
@@ -16882,7 +16887,7 @@ function PersistAsyncBlobSchema(props) {
16882
16887
  const [persistAsyncValidations, setPersistAsyncValidations] = (0, import_react43.useState)(null);
16883
16888
  const [validations, setValidations] = (0, import_react43.useState)([]);
16884
16889
  const [changed, setChanged] = (0, import_react43.useState)(false);
16885
- const intl = (0, import_react_intl32.useIntl)();
16890
+ const intl = (0, import_react_intl33.useIntl)();
16886
16891
  const httpClient = useHttpClient();
16887
16892
  const onEvent = useEventDispatcher();
16888
16893
  (0, import_react43.useEffect)(() => {
@@ -17128,11 +17133,11 @@ var PromotedOneOfSchema_default = PromotedOneOfSchema;
17128
17133
 
17129
17134
  // src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.tsx
17130
17135
  var import_components59 = require("@transferwise/components");
17131
- var import_react_intl34 = require("react-intl");
17136
+ var import_react_intl35 = require("react-intl");
17132
17137
 
17133
17138
  // src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.ts
17134
- var import_react_intl33 = require("react-intl");
17135
- var ReadOnlySchema_messages_default = (0, import_react_intl33.defineMessages)({
17139
+ var import_react_intl34 = require("react-intl");
17140
+ var ReadOnlySchema_messages_default = (0, import_react_intl34.defineMessages)({
17136
17141
  yes: {
17137
17142
  id: "dynamicFlows.ReadOnlySchema.yes",
17138
17143
  defaultMessage: "Yes",
@@ -17149,7 +17154,7 @@ var ReadOnlySchema_messages_default = (0, import_react_intl33.defineMessages)({
17149
17154
  var import_jsx_runtime100 = require("react/jsx-runtime");
17150
17155
  function ReadOnlySchema({ schema, model }) {
17151
17156
  const { title = "" } = schema;
17152
- const { formatMessage } = (0, import_react_intl34.useIntl)();
17157
+ const { formatMessage } = (0, import_react_intl35.useIntl)();
17153
17158
  const value = getValueForSchema({ schema, model, formatMessage });
17154
17159
  return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_components59.DefinitionList, { layout: import_components59.Layout.VERTICAL_ONE_COLUMN, definitions: [{ title, value, key: "" }] });
17155
17160
  }
@@ -17650,11 +17655,11 @@ var DynamicLoadingIndicator_default = DynamicLoadingIndicator;
17650
17655
 
17651
17656
  // src/legacy/layout/paragraph/DynamicParagraph.tsx
17652
17657
  var import_components67 = require("@transferwise/components");
17653
- var import_react_intl36 = require("react-intl");
17658
+ var import_react_intl37 = require("react-intl");
17654
17659
 
17655
17660
  // src/common/messages/paragraph.messages.ts
17656
- var import_react_intl35 = require("react-intl");
17657
- var paragraph_messages_default2 = (0, import_react_intl35.defineMessages)({
17661
+ var import_react_intl36 = require("react-intl");
17662
+ var paragraph_messages_default2 = (0, import_react_intl36.defineMessages)({
17658
17663
  copy: {
17659
17664
  id: "dynamicFlows.DynamicParagraph.copy",
17660
17665
  defaultMessage: "Copy",
@@ -17690,7 +17695,7 @@ function BasicDynamicParagraph({ component }) {
17690
17695
  ] });
17691
17696
  }
17692
17697
  function CopyableDynamicParagraph({ component }) {
17693
- const { formatMessage } = (0, import_react_intl36.useIntl)();
17698
+ const { formatMessage } = (0, import_react_intl37.useIntl)();
17694
17699
  const createSnackbar = useSnackBarIfAvailable2();
17695
17700
  const { text } = component;
17696
17701
  const copy = () => {
@@ -17805,7 +17810,7 @@ var SearchInput = ({ title, value, onFocus, onChange }) => {
17805
17810
 
17806
17811
  // src/legacy/layout/search/SearchResults.tsx
17807
17812
  var import_components70 = require("@transferwise/components");
17808
- var import_react_intl37 = require("react-intl");
17813
+ var import_react_intl38 = require("react-intl");
17809
17814
  var import_jsx_runtime114 = require("react/jsx-runtime");
17810
17815
  function SearchResults2({ results, emptyMessage, onSelect }) {
17811
17816
  if (results.length === 0) {
@@ -17825,7 +17830,7 @@ function SearchResults2({ results, emptyMessage, onSelect }) {
17825
17830
  )) });
17826
17831
  }
17827
17832
  function ErrorResult2({ onRetrySearch }) {
17828
- const intl = (0, import_react_intl37.useIntl)();
17833
+ const intl = (0, import_react_intl38.useIntl)();
17829
17834
  return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("p", { className: "m-t-2", children: [
17830
17835
  intl.formatMessage(generic_error_messages_default.genericError),
17831
17836
  "\xA0",
@@ -17915,12 +17920,12 @@ var addQueryParameter2 = (url, key, value) => {
17915
17920
  // src/legacy/layout/search/DynamicSearch.tsx
17916
17921
  var import_components71 = require("@transferwise/components");
17917
17922
  var import_classnames14 = __toESM(require_classnames());
17918
- var import_react_intl38 = require("react-intl");
17923
+ var import_react_intl39 = require("react-intl");
17919
17924
  var import_jsx_runtime115 = require("react/jsx-runtime");
17920
17925
  var DEBOUNCE_TIME2 = 400;
17921
17926
  function DynamicSearch({ component, onAction }) {
17922
17927
  const [query, setQuery] = (0, import_react51.useState)("");
17923
- const intl = (0, import_react_intl38.useIntl)();
17928
+ const intl = (0, import_react_intl39.useIntl)();
17924
17929
  const { control, title, margin, url, method, param, emptyMessage } = component;
17925
17930
  const { status, results, search } = useSearch({ url, method, param });
17926
17931
  const onEvent = useEventDispatcher();
@@ -18197,7 +18202,7 @@ var controlTypesWithPersistOnChange = /* @__PURE__ */ new Set([
18197
18202
  ]);
18198
18203
  function PersistAsyncBasicSchema(props) {
18199
18204
  const { schema, required, submitted, errors, onChange, onPersistAsync } = props;
18200
- const intl = (0, import_react_intl39.useIntl)();
18205
+ const intl = (0, import_react_intl40.useIntl)();
18201
18206
  const httpClient = useHttpClient();
18202
18207
  const onEvent = useEventDispatcher();
18203
18208
  const [persistAsyncModel, setPersistAsyncModel] = (0, import_react54.useState)(null);
@@ -18295,7 +18300,7 @@ var PersistAsyncBasicSchema_default = PersistAsyncBasicSchema;
18295
18300
  var usePersistAsync = (persistAsync) => {
18296
18301
  const [abortController, setAbortController] = (0, import_react55.useState)(null);
18297
18302
  const httpClient = useHttpClient();
18298
- const intl = (0, import_react_intl40.useIntl)();
18303
+ const intl = (0, import_react_intl41.useIntl)();
18299
18304
  const { schema } = persistAsync;
18300
18305
  async function handlePersistAsync(model) {
18301
18306
  const isInvalidSchema = model instanceof Blob ? !isBlobSchema2(schema) : !isValidSchema(model, schema);
@@ -18526,12 +18531,12 @@ var import_react63 = require("react");
18526
18531
 
18527
18532
  // src/common/cameraCapture/CameraCapture.tsx
18528
18533
  var import_react62 = require("react");
18529
- var import_react_intl45 = require("react-intl");
18534
+ var import_react_intl46 = require("react-intl");
18530
18535
  var import_react_webcam = __toESM(require("react-webcam"));
18531
18536
 
18532
18537
  // src/common/cameraCapture/CameraCapture.messages.ts
18533
- var import_react_intl41 = require("react-intl");
18534
- var CameraCapture_messages_default = (0, import_react_intl41.defineMessages)({
18538
+ var import_react_intl42 = require("react-intl");
18539
+ var CameraCapture_messages_default = (0, import_react_intl42.defineMessages)({
18535
18540
  reviewSubmit: {
18536
18541
  id: "dynamicFlows.CameraCapture.reviewSubmit",
18537
18542
  defaultMessage: "Yes, submit",
@@ -18591,14 +18596,14 @@ var CameraCapture_messages_default = (0, import_react_intl41.defineMessages)({
18591
18596
 
18592
18597
  // src/common/cameraCapture/components/bottomBar/BottomBar.tsx
18593
18598
  var import_components73 = require("@transferwise/components");
18594
- var import_react_intl42 = require("react-intl");
18599
+ var import_react_intl43 = require("react-intl");
18595
18600
  var import_jsx_runtime120 = require("react/jsx-runtime");
18596
18601
  var CaptureBottomBar = ({ onCapture }) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "bottom-bar", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(CaptureButton, { onClick: onCapture }) });
18597
18602
  var ReviewBottomBar = ({
18598
18603
  onSubmit,
18599
18604
  onRetry
18600
18605
  }) => {
18601
- const intl = (0, import_react_intl42.useIntl)();
18606
+ const intl = (0, import_react_intl43.useIntl)();
18602
18607
  return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "bottom-bar p-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [
18603
18608
  /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
18604
18609
  import_components73.Button,
@@ -18637,11 +18642,11 @@ var CaptureButton = ({ onClick }) => /* @__PURE__ */ (0, import_jsx_runtime120.j
18637
18642
  );
18638
18643
 
18639
18644
  // src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
18640
- var import_react_intl44 = require("react-intl");
18645
+ var import_react_intl45 = require("react-intl");
18641
18646
 
18642
18647
  // src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.ts
18643
- var import_react_intl43 = require("react-intl");
18644
- var OrientationLockOverlay_messages_default = (0, import_react_intl43.defineMessages)({
18648
+ var import_react_intl44 = require("react-intl");
18649
+ var OrientationLockOverlay_messages_default = (0, import_react_intl44.defineMessages)({
18645
18650
  text: {
18646
18651
  id: "dynamicFlows.CameraCapture.rotatePhone.text",
18647
18652
  defaultMessage: "Rotate your phone to portrait view to take a photo",
@@ -18652,7 +18657,7 @@ var OrientationLockOverlay_messages_default = (0, import_react_intl43.defineMess
18652
18657
  // src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
18653
18658
  var import_jsx_runtime121 = require("react/jsx-runtime");
18654
18659
  function OrientationLockOverlay() {
18655
- const intl = (0, import_react_intl44.useIntl)();
18660
+ const intl = (0, import_react_intl45.useIntl)();
18656
18661
  return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "orientation-lock-overlay", children: [
18657
18662
  /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
18658
18663
  "img",
@@ -18942,7 +18947,7 @@ function CameraCapture({
18942
18947
  shouldLockOrientation,
18943
18948
  onEvent
18944
18949
  );
18945
- const intl = (0, import_react_intl45.useIntl)();
18950
+ const intl = (0, import_react_intl46.useIntl)();
18946
18951
  const handleCapture = (0, import_react62.useCallback)(async () => {
18947
18952
  var _a, _b, _c, _d, _e, _f;
18948
18953
  if (((_a = webcamReference == null ? void 0 : webcamReference.current) == null ? void 0 : _a.video) && ((_c = (_b = webcamReference == null ? void 0 : webcamReference.current) == null ? void 0 : _b.video) == null ? void 0 : _c.readyState) >= 3) {
@@ -19165,11 +19170,11 @@ function getFirstAction(step) {
19165
19170
  }
19166
19171
 
19167
19172
  // src/legacy/step/externalConfirmationStep/ExternalConfirmationStep.tsx
19168
- var import_react_intl47 = require("react-intl");
19173
+ var import_react_intl48 = require("react-intl");
19169
19174
 
19170
19175
  // src/common/messages/external-confirmation.messages.ts
19171
- var import_react_intl46 = require("react-intl");
19172
- var external_confirmation_messages_default2 = (0, import_react_intl46.defineMessages)({
19176
+ var import_react_intl47 = require("react-intl");
19177
+ var external_confirmation_messages_default2 = (0, import_react_intl47.defineMessages)({
19173
19178
  title: {
19174
19179
  id: "dynamicFlows.ExternalConfirmation.title",
19175
19180
  defaultMessage: "Please confirm",
@@ -19197,7 +19202,7 @@ var import_jsx_runtime126 = require("react/jsx-runtime");
19197
19202
  var noop6 = () => {
19198
19203
  };
19199
19204
  function ExternalConfirmationStep({ url, onClose }) {
19200
- const { formatMessage } = (0, import_react_intl47.useIntl)();
19205
+ const { formatMessage } = (0, import_react_intl48.useIntl)();
19201
19206
  return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
19202
19207
  DynamicLayout_default,
19203
19208
  {
@@ -19570,9 +19575,9 @@ var assertResponseIsValid2 = (response) => {
19570
19575
  var isResponse2 = (response) => typeof response === "object" && response !== null && "clone" in response && "bodyUsed" in response;
19571
19576
 
19572
19577
  // src/legacy/dynamicFlow/utils/useErrorResponse.tsx
19573
- var import_react_intl48 = require("react-intl");
19578
+ var import_react_intl49 = require("react-intl");
19574
19579
  var useErrorResponse = () => {
19575
- const { formatMessage } = (0, import_react_intl48.useIntl)();
19580
+ const { formatMessage } = (0, import_react_intl49.useIntl)();
19576
19581
  return async (response, fetchType, isInitialRequest) => {
19577
19582
  try {
19578
19583
  const errorResponse = await parseErrorResponse(response);
@@ -19616,7 +19621,7 @@ var DynamicFlowComponent = ({
19616
19621
  setSchemaModel
19617
19622
  } = useDynamicFlowState(initialStep);
19618
19623
  const [submitted, setSubmitted] = (0, import_react67.useState)(false);
19619
- const { locale } = (0, import_react_intl49.useIntl)();
19624
+ const { locale } = (0, import_react_intl50.useIntl)();
19620
19625
  const { isLoading, loader, setLoadingState } = useLoader(
19621
19626
  loaderConfig,
19622
19627
  initialStep ? "idle" : "initial"