@wise/dynamic-flow-client-internal 4.10.1 → 4.11.1

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.
@@ -5,12 +5,12 @@
5
5
  "df.wise.ArraySchema.maxItemsError": "โปรดเพิ่ม {maxItems} หรือน้อยกว่า",
6
6
  "df.wise.ArraySchema.minItemsError": "โปรดเพิ่มอย่างน้อย {minItems}",
7
7
  "df.wise.ArraySchema.removeItem": "ลบ",
8
- "df.wise.ControlFeedback.maxLength": "โปรดป้อน {maxLength} อักขระหรือน้อยกว่า",
8
+ "df.wise.ControlFeedback.maxLength": "โปรดป้อน {maxLength} ตัวอักษรหรือน้อยกว่านั้น",
9
9
  "df.wise.ControlFeedback.maximum": "โปรดป้อนตัวเลข {maximum} หรือน้อยกว่า",
10
- "df.wise.ControlFeedback.maximumDate": "โปรดป้อนวันที่ที่อยู่ตรงพอดีหรือก่อน {maximum}",
11
- "df.wise.ControlFeedback.minLength": "โปรดป้อนอักขระอย่างน้อย {minLength} ตัว",
10
+ "df.wise.ControlFeedback.maximumDate": "โปรดใส่วันที่เป็น {maximum} หรือก่อนหน้านั้น",
11
+ "df.wise.ControlFeedback.minLength": "โปรดป้อนตัวอักษรอย่างน้อย {minLength} ตัว",
12
12
  "df.wise.ControlFeedback.minimum": "โปรดป้อนตัวเลข {minimum} หรือมากกว่า",
13
- "df.wise.ControlFeedback.minimumDate": "โปรดป้อนวันที่ที่อยู่ตรงพอดีหรือหลัง {minimum}",
13
+ "df.wise.ControlFeedback.minimumDate": "โปรดใส่วันที่เป็น {minimum} หรือหลังจากนั้น",
14
14
  "df.wise.ControlFeedback.pattern": "โปรดใส่ในรูปแบบที่ถูกต้อง",
15
15
  "df.wise.ControlFeedback.patternDate": "โปรดป้อนวันที่ในรูปแบบที่ถูกต้อง",
16
16
  "df.wise.ControlFeedback.required": "โปรดใส่ข้อมูลในช่องนี้",
package/build/main.css CHANGED
@@ -336,6 +336,3 @@ button.df-back-btn {
336
336
  display: flex;
337
337
  flex-direction: column;
338
338
  }
339
- .df-standard-heading {
340
- hyphens: auto;
341
- }
package/build/main.js CHANGED
@@ -503,12 +503,12 @@ var th_default = {
503
503
  "df.wise.ArraySchema.maxItemsError": "\u0E42\u0E1B\u0E23\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21 {maxItems} \u0E2B\u0E23\u0E37\u0E2D\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",
504
504
  "df.wise.ArraySchema.minItemsError": "\u0E42\u0E1B\u0E23\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22 {minItems}",
505
505
  "df.wise.ArraySchema.removeItem": "\u0E25\u0E1A",
506
- "df.wise.ControlFeedback.maxLength": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19 {maxLength} \u0E2D\u0E31\u0E01\u0E02\u0E23\u0E30\u0E2B\u0E23\u0E37\u0E2D\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",
506
+ "df.wise.ControlFeedback.maxLength": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19 {maxLength} \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23\u0E2B\u0E23\u0E37\u0E2D\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19",
507
507
  "df.wise.ControlFeedback.maximum": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 {maximum} \u0E2B\u0E23\u0E37\u0E2D\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",
508
- "df.wise.ControlFeedback.maximumDate": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E15\u0E23\u0E07\u0E1E\u0E2D\u0E14\u0E35\u0E2B\u0E23\u0E37\u0E2D\u0E01\u0E48\u0E2D\u0E19 {maximum}",
509
- "df.wise.ControlFeedback.minLength": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19\u0E2D\u0E31\u0E01\u0E02\u0E23\u0E30\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22 {minLength} \u0E15\u0E31\u0E27",
508
+ "df.wise.ControlFeedback.maximumDate": "\u0E42\u0E1B\u0E23\u0E14\u0E43\u0E2A\u0E48\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19 {maximum} \u0E2B\u0E23\u0E37\u0E2D\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E31\u0E49\u0E19",
509
+ "df.wise.ControlFeedback.minLength": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22 {minLength} \u0E15\u0E31\u0E27",
510
510
  "df.wise.ControlFeedback.minimum": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 {minimum} \u0E2B\u0E23\u0E37\u0E2D\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",
511
- "df.wise.ControlFeedback.minimumDate": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E15\u0E23\u0E07\u0E1E\u0E2D\u0E14\u0E35\u0E2B\u0E23\u0E37\u0E2D\u0E2B\u0E25\u0E31\u0E07 {minimum}",
511
+ "df.wise.ControlFeedback.minimumDate": "\u0E42\u0E1B\u0E23\u0E14\u0E43\u0E2A\u0E48\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19 {minimum} \u0E2B\u0E23\u0E37\u0E2D\u0E2B\u0E25\u0E31\u0E07\u0E08\u0E32\u0E01\u0E19\u0E31\u0E49\u0E19",
512
512
  "df.wise.ControlFeedback.pattern": "\u0E42\u0E1B\u0E23\u0E14\u0E43\u0E2A\u0E48\u0E43\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
513
513
  "df.wise.ControlFeedback.patternDate": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E43\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
514
514
  "df.wise.ControlFeedback.required": "\u0E42\u0E1B\u0E23\u0E14\u0E43\u0E2A\u0E48\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E43\u0E19\u0E0A\u0E48\u0E2D\u0E07\u0E19\u0E35\u0E49",
@@ -1243,26 +1243,11 @@ var HeadingRenderer = {
1243
1243
  function Heading(props) {
1244
1244
  const { text, size, align, margin, control } = props;
1245
1245
  const className = getTextAlignmentAndMargin({ align, margin });
1246
- return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StandardHeading, { size, text, className: `${className} df-standard-heading` });
1246
+ return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StandardHeading, { size, text, className });
1247
1247
  }
1248
1248
  function DisplayHeading({ size, text, className }) {
1249
1249
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components11.Display, { type: getDisplayType(size), className, children: text });
1250
1250
  }
1251
- function StandardHeading({ size, text, className }) {
1252
- switch (size) {
1253
- case "xs":
1254
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h5", { className, children: text });
1255
- case "sm":
1256
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h4", { className, children: text });
1257
- case "lg":
1258
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h2", { className, children: text });
1259
- case "xl":
1260
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h1", { className, children: text });
1261
- case "md":
1262
- default:
1263
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h3", { className, children: text });
1264
- }
1265
- }
1266
1251
  var getDisplayType = (size) => {
1267
1252
  switch (size) {
1268
1253
  case "xs":
@@ -1276,6 +1261,20 @@ var getDisplayType = (size) => {
1276
1261
  return "display-medium";
1277
1262
  }
1278
1263
  };
1264
+ function StandardHeading({ size, text, className }) {
1265
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components11.Title, { type: getTitleTypeBySize(size), className, children: text });
1266
+ }
1267
+ var getTitleTypeBySize = (size) => {
1268
+ var _a;
1269
+ const titleTypes = {
1270
+ xs: "title-group",
1271
+ sm: "title-body",
1272
+ md: "title-subsection",
1273
+ lg: "title-section",
1274
+ xl: "title-screen"
1275
+ };
1276
+ return (_a = titleTypes[size]) != null ? _a : "title-subsection";
1277
+ };
1279
1278
  var HeadingRenderer_default = HeadingRenderer;
1280
1279
 
1281
1280
  // ../renderers/src/ImageRenderer/UrlImage.tsx
@@ -2886,7 +2885,7 @@ var getReviewAction = (callToAction) => {
2886
2885
  };
2887
2886
 
2888
2887
  // ../renderers/src/step/StepRenderer.tsx
2889
- var import_components40 = require("@transferwise/components");
2888
+ var import_components39 = require("@transferwise/components");
2890
2889
 
2891
2890
  // ../renderers/src/step/BackButton.tsx
2892
2891
  var import_components38 = require("@transferwise/components");
@@ -2910,147 +2909,60 @@ function BackButton({ title, onClick }) {
2910
2909
  }
2911
2910
  var BackButton_default = BackButton;
2912
2911
 
2913
- // ../renderers/src/step/ExternalConfirmationDialog.tsx
2914
- var import_react_intl15 = require("react-intl");
2915
-
2916
- // ../renderers/src/messages/external-confirmation.messages.ts
2917
- var import_react_intl14 = require("react-intl");
2918
- var external_confirmation_messages_default = (0, import_react_intl14.defineMessages)({
2919
- title: {
2920
- id: "df.wise.ExternalConfirmation.title",
2921
- defaultMessage: "Please confirm",
2922
- description: "Heading for the confirmation screen."
2923
- },
2924
- description: {
2925
- id: "df.wise.ExternalConfirmation.description",
2926
- defaultMessage: "Please confirm you want to open **{origin}** in a new browser tab.",
2927
- description: "Description for the confirmation screen."
2928
- },
2929
- open: {
2930
- id: "df.wise.ExternalConfirmation.open",
2931
- defaultMessage: "Open in new tab",
2932
- description: "Button text confirming opening a new browser tab."
2933
- },
2934
- cancel: {
2935
- id: "df.wise.ExternalConfirmation.cancel",
2936
- defaultMessage: "Cancel",
2937
- description: "Button text rejecting opening a new browser tab."
2938
- }
2939
- });
2940
-
2941
- // ../renderers/src/step/ExternalConfirmationDialog.tsx
2942
- var import_components39 = require("@transferwise/components");
2943
- var import_jsx_runtime54 = require("react/jsx-runtime");
2944
- function ExternalConfirmationDialog({
2945
- external,
2946
- onClose
2947
- }) {
2948
- const { formatMessage } = (0, import_react_intl15.useIntl)();
2949
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
2950
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h2", { className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.title) }),
2951
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components39.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(external.url) }) }),
2952
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
2953
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
2954
- import_components39.Button,
2955
- {
2956
- block: true,
2957
- className: "m-b-2",
2958
- priority: "primary",
2959
- size: "md",
2960
- onClick: () => {
2961
- window.open(external.url);
2962
- onClose();
2963
- },
2964
- children: formatMessage(external_confirmation_messages_default.open)
2965
- }
2966
- ),
2967
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components39.Button, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onClose, children: formatMessage(external_confirmation_messages_default.cancel) })
2968
- ] }) })
2969
- ] }) });
2970
- }
2971
- function getOrigin(url) {
2972
- try {
2973
- return new URL(url).origin;
2974
- } catch (e) {
2975
- return url;
2976
- }
2977
- }
2978
-
2979
- // ../renderers/src/step/useExternal.tsx
2980
- var import_react10 = require("react");
2981
- function useExternal(url) {
2982
- const [externalWindow, setExternalWindow] = (0, import_react10.useState)(null);
2983
- const [hasDismissed, setHasDismissed] = (0, import_react10.useState)(false);
2984
- const dismissConfirmation = () => setHasDismissed(true);
2985
- (0, import_react10.useEffect)(() => {
2986
- if (url) {
2987
- setHasDismissed(false);
2988
- setExternalWindow(window.open(url, "_blank"));
2989
- }
2990
- }, [url]);
2991
- const requiresUserConfirmation = Boolean(url && !externalWindow && !hasDismissed);
2992
- return { requiresUserConfirmation, dismissConfirmation };
2993
- }
2994
-
2995
2912
  // ../renderers/src/step/StepRenderer.tsx
2996
- var import_jsx_runtime55 = require("react/jsx-runtime");
2913
+ var import_jsx_runtime54 = require("react/jsx-runtime");
2997
2914
  var StepRenderer = {
2998
2915
  canRenderType: "step",
2999
2916
  render: StepRendererComponent
3000
2917
  };
3001
2918
  function StepRendererComponent(props) {
3002
- const { back, description, error, external, title, children } = props;
3003
- const { requiresUserConfirmation, dismissConfirmation } = useExternal(external == null ? void 0 : external.url);
3004
- if ((external == null ? void 0 : external.url) && requiresUserConfirmation) {
3005
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ExternalConfirmationDialog, { external, onClose: dismissConfirmation });
3006
- }
3007
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
3008
- back ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(BackButton_default, __spreadValues({}, back)) : null,
3009
- title || description ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "m-b-4", children: [
3010
- title ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components40.Title, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
3011
- description ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
2919
+ const { back, description, error, title, children } = props;
2920
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
2921
+ back ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(BackButton_default, __spreadValues({}, back)) : null,
2922
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "m-b-4", children: [
2923
+ title ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components39.Title, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
2924
+ description ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
3012
2925
  ] }) : void 0,
3013
- error ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components40.Alert, { type: "negative", className: "m-b-2", message: error }) : void 0,
2926
+ error ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components39.Alert, { type: "negative", className: "m-b-2", message: error }) : void 0,
3014
2927
  children
3015
2928
  ] });
3016
2929
  }
3017
2930
 
3018
2931
  // ../renderers/src/ListRenderer.tsx
3019
- var import_components41 = require("@transferwise/components");
2932
+ var import_components40 = require("@transferwise/components");
3020
2933
  var import_classnames6 = __toESM(require("classnames"));
3021
- var import_jsx_runtime56 = require("react/jsx-runtime");
2934
+ var import_jsx_runtime55 = require("react/jsx-runtime");
3022
2935
  var ListRenderer = {
3023
2936
  canRenderType: "list",
3024
- render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: getMargin(margin), children: [
3025
- (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components41.Header, { as: "h2", title: title != null ? title : "", action: getListAction(callToAction) }),
3026
- items.map((props) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DesignSystemListItem, __spreadProps(__spreadValues({}, props), { control }), props.title))
2937
+ render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: getMargin(margin), children: [
2938
+ (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components40.Header, { as: "h2", title: title != null ? title : "", action: getListAction(callToAction) }),
2939
+ items.map((props) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(DesignSystemListItem, __spreadProps(__spreadValues({}, props), { control }), props.title))
3027
2940
  ] })
3028
2941
  };
3029
2942
  var DesignSystemListItem = ({
3030
2943
  title,
3031
- subtitle,
3032
- value,
3033
- subvalue,
2944
+ description,
2945
+ supportingValues,
3034
2946
  icon,
3035
2947
  image,
3036
2948
  control
3037
- }) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
2949
+ }) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
3038
2950
  "label",
3039
2951
  {
3040
2952
  className: (0, import_classnames6.default)("np-option p-a-2", {
3041
2953
  "np-option__sm-media": true,
3042
2954
  "np-option__container-aligned": true
3043
2955
  }),
3044
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "media", children: [
3045
- icon || image ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "media-left", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ListItemMedia, { image, icon, preferAvatar: control === "with-avatar" }) }) : null,
3046
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "media-body", children: [
3047
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "d-flex justify-content-between", children: [
3048
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: title }),
3049
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: value })
2956
+ children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "media", children: [
2957
+ icon || image ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "media-left", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ListItemMedia, { image, icon, preferAvatar: control === "with-avatar" }) }) : null,
2958
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "media-body", children: [
2959
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "d-flex justify-content-between", children: [
2960
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: title }),
2961
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: supportingValues == null ? void 0 : supportingValues.value })
3050
2962
  ] }),
3051
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "d-flex justify-content-between", children: [
3052
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components41.Body, { className: "d-block np-option__body", children: subtitle }),
3053
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components41.Body, { className: "d-block np-option__body", children: subvalue })
2963
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "d-flex justify-content-between", children: [
2964
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components40.Body, { className: "d-block np-option__body", children: description }),
2965
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components40.Body, { className: "d-block np-option__body", children: supportingValues == null ? void 0 : supportingValues.subvalue })
3054
2966
  ] })
3055
2967
  ] })
3056
2968
  ] })
@@ -3063,10 +2975,10 @@ var ListItemMedia = ({
3063
2975
  preferAvatar
3064
2976
  }) => {
3065
2977
  if (icon) {
3066
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "circle circle-sm text-primary circle-inverse", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(OptionMedia, { icon, image, preferAvatar }) });
2978
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "circle circle-sm text-primary circle-inverse", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(OptionMedia, { icon, image, preferAvatar }) });
3067
2979
  }
3068
2980
  if (image) {
3069
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(OptionMedia, { icon, image, preferAvatar }) });
2981
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(OptionMedia, { icon, image, preferAvatar }) });
3070
2982
  }
3071
2983
  };
3072
2984
  var getListAction = (callToAction) => {
@@ -3082,32 +2994,28 @@ var getListAction = (callToAction) => {
3082
2994
  var ListRenderer_default = ListRenderer;
3083
2995
 
3084
2996
  // ../renderers/src/step/SplashStepRenderer.tsx
3085
- var import_jsx_runtime57 = require("react/jsx-runtime");
2997
+ var import_jsx_runtime56 = require("react/jsx-runtime");
3086
2998
  var SplashStepRenderer = {
3087
2999
  canRenderType: "step",
3088
3000
  canRender: ({ control }) => control === "splash",
3089
3001
  render: SplashStepRendererComponent
3090
3002
  };
3091
3003
  function SplashStepRendererComponent(props) {
3092
- const { back, children, external } = props;
3093
- const { requiresUserConfirmation, dismissConfirmation } = useExternal(external == null ? void 0 : external.url);
3094
- if ((external == null ? void 0 : external.url) && requiresUserConfirmation) {
3095
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ExternalConfirmationDialog, { external, onClose: dismissConfirmation });
3096
- }
3097
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "splash-screen m-t-5", children: [
3098
- back ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(BackButton_default, __spreadValues({}, back)) : null,
3004
+ const { back, children } = props;
3005
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "splash-screen m-t-5", children: [
3006
+ back ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(BackButton_default, __spreadValues({}, back)) : null,
3099
3007
  children
3100
3008
  ] });
3101
3009
  }
3102
3010
 
3103
3011
  // ../renderers/src/utils/useCustomTheme.ts
3104
3012
  var import_components_theming = require("@wise/components-theming");
3105
- var import_react11 = require("react");
3013
+ var import_react10 = require("react");
3106
3014
  var ThemeRequiredEventName = "Theme Required";
3107
3015
  var useCustomTheme = (theme, trackEvent) => {
3108
3016
  const previousThemeHookValue = (0, import_components_theming.useTheme)();
3109
- const previousTheme = (0, import_react11.useMemo)(() => previousThemeHookValue.theme, []);
3110
- (0, import_react11.useEffect)(() => {
3017
+ const previousTheme = (0, import_react10.useMemo)(() => previousThemeHookValue.theme, []);
3018
+ (0, import_react10.useEffect)(() => {
3111
3019
  trackEvent(ThemeRequiredEventName, { theme });
3112
3020
  return theme !== previousTheme ? () => {
3113
3021
  trackEvent(ThemeRequiredEventName, { theme: previousTheme });
@@ -3117,25 +3025,113 @@ var useCustomTheme = (theme, trackEvent) => {
3117
3025
  };
3118
3026
 
3119
3027
  // ../renderers/src/step/SplashCelebrationStepRenderer.tsx
3120
- var import_jsx_runtime58 = require("react/jsx-runtime");
3028
+ var import_jsx_runtime57 = require("react/jsx-runtime");
3121
3029
  var SplashCelebrationStepRenderer = {
3122
3030
  canRenderType: "step",
3123
3031
  canRender: ({ control }) => control === "splash-celebration",
3124
3032
  render: SplashCelebrationStepRendererComponent
3125
3033
  };
3126
3034
  function SplashCelebrationStepRendererComponent(props) {
3127
- const { back, children, external, trackEvent } = props;
3035
+ const { back, children, trackEvent } = props;
3128
3036
  useCustomTheme("forest-green", trackEvent);
3129
- const { requiresUserConfirmation, dismissConfirmation } = useExternal(external == null ? void 0 : external.url);
3130
- if ((external == null ? void 0 : external.url) && requiresUserConfirmation) {
3131
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ExternalConfirmationDialog, { external, onClose: dismissConfirmation });
3132
- }
3133
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "splash-screen m-t-5", children: [
3134
- back ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(BackButton_default, __spreadValues({}, back)) : null,
3037
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "splash-screen m-t-5", children: [
3038
+ back ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(BackButton_default, __spreadValues({}, back)) : null,
3135
3039
  children
3136
3040
  ] });
3137
3041
  }
3138
3042
 
3043
+ // ../renderers/src/ExternalConfirmationRenderer.tsx
3044
+ var import_components41 = require("@transferwise/components");
3045
+
3046
+ // ../renderers/src/messages/external-confirmation.messages.ts
3047
+ var import_react_intl14 = require("react-intl");
3048
+ var external_confirmation_messages_default = (0, import_react_intl14.defineMessages)({
3049
+ title: {
3050
+ id: "df.wise.ExternalConfirmation.title",
3051
+ defaultMessage: "Please confirm",
3052
+ description: "Heading for the confirmation screen."
3053
+ },
3054
+ description: {
3055
+ id: "df.wise.ExternalConfirmation.description",
3056
+ defaultMessage: "Please confirm you want to open **{origin}** in a new browser tab.",
3057
+ description: "Description for the confirmation screen."
3058
+ },
3059
+ open: {
3060
+ id: "df.wise.ExternalConfirmation.open",
3061
+ defaultMessage: "Open in new tab",
3062
+ description: "Button text confirming opening a new browser tab."
3063
+ },
3064
+ cancel: {
3065
+ id: "df.wise.ExternalConfirmation.cancel",
3066
+ defaultMessage: "Cancel",
3067
+ description: "Button text rejecting opening a new browser tab."
3068
+ }
3069
+ });
3070
+
3071
+ // ../renderers/src/ExternalConfirmationRenderer.tsx
3072
+ var import_react_intl15 = require("react-intl");
3073
+ var import_react11 = require("react");
3074
+ var import_jsx_runtime58 = require("react/jsx-runtime");
3075
+ var ExternalConfirmationRenderer = {
3076
+ canRenderType: "external-confirmation",
3077
+ render: ExternalConfirmationRendererComponent
3078
+ };
3079
+ function ExternalConfirmationRendererComponent({
3080
+ url,
3081
+ status,
3082
+ onSuccess,
3083
+ onFailure,
3084
+ onCancel
3085
+ }) {
3086
+ const { formatMessage } = (0, import_react_intl15.useIntl)();
3087
+ (0, import_react11.useEffect)(() => {
3088
+ if (url) {
3089
+ const w = window.open(url, "_blank");
3090
+ if (w) {
3091
+ onSuccess();
3092
+ } else {
3093
+ onFailure();
3094
+ }
3095
+ }
3096
+ }, []);
3097
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
3098
+ import_components41.Modal,
3099
+ {
3100
+ open: status === "failure",
3101
+ title: formatMessage(external_confirmation_messages_default.title),
3102
+ body: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
3103
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components41.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
3104
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
3105
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
3106
+ import_components41.Button,
3107
+ {
3108
+ block: true,
3109
+ className: "m-b-2",
3110
+ priority: "primary",
3111
+ size: "md",
3112
+ onClick: () => {
3113
+ window.open(url);
3114
+ onCancel();
3115
+ },
3116
+ children: formatMessage(external_confirmation_messages_default.open)
3117
+ }
3118
+ ),
3119
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components41.Button, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
3120
+ ] }) })
3121
+ ] }),
3122
+ onClose: onCancel
3123
+ }
3124
+ );
3125
+ }
3126
+ function getOrigin(url) {
3127
+ try {
3128
+ return new URL(url).origin;
3129
+ } catch (e) {
3130
+ return url;
3131
+ }
3132
+ }
3133
+ var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
3134
+
3139
3135
  // ../renderers/src/getWiseRenderers.ts
3140
3136
  var getWiseRenderers = () => [
3141
3137
  AlertRenderer_default,
@@ -3146,6 +3142,7 @@ var getWiseRenderers = () => [
3146
3142
  DateInputRenderer_default,
3147
3143
  DecisionRenderer_default,
3148
3144
  DividerRenderer_default,
3145
+ ExternalConfirmationRenderer_default,
3149
3146
  FormRenderer_default,
3150
3147
  FormSectionRenderer_default,
3151
3148
  HeadingRenderer_default,
@@ -3184,7 +3181,7 @@ var ModalContentRenderer = {
3184
3181
  };
3185
3182
 
3186
3183
  // src/dynamicFlow/telemetry/app-version.ts
3187
- var appVersion = "4.10.1";
3184
+ var appVersion = "4.11.1";
3188
3185
 
3189
3186
  // src/dynamicFlow/telemetry/getLogEvent.ts
3190
3187
  var getLogEvent = (onLog) => (level, message, extra) => {
package/build/main.mjs CHANGED
@@ -465,12 +465,12 @@ var th_default = {
465
465
  "df.wise.ArraySchema.maxItemsError": "\u0E42\u0E1B\u0E23\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21 {maxItems} \u0E2B\u0E23\u0E37\u0E2D\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",
466
466
  "df.wise.ArraySchema.minItemsError": "\u0E42\u0E1B\u0E23\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22 {minItems}",
467
467
  "df.wise.ArraySchema.removeItem": "\u0E25\u0E1A",
468
- "df.wise.ControlFeedback.maxLength": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19 {maxLength} \u0E2D\u0E31\u0E01\u0E02\u0E23\u0E30\u0E2B\u0E23\u0E37\u0E2D\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",
468
+ "df.wise.ControlFeedback.maxLength": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19 {maxLength} \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23\u0E2B\u0E23\u0E37\u0E2D\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19",
469
469
  "df.wise.ControlFeedback.maximum": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 {maximum} \u0E2B\u0E23\u0E37\u0E2D\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",
470
- "df.wise.ControlFeedback.maximumDate": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E15\u0E23\u0E07\u0E1E\u0E2D\u0E14\u0E35\u0E2B\u0E23\u0E37\u0E2D\u0E01\u0E48\u0E2D\u0E19 {maximum}",
471
- "df.wise.ControlFeedback.minLength": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19\u0E2D\u0E31\u0E01\u0E02\u0E23\u0E30\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22 {minLength} \u0E15\u0E31\u0E27",
470
+ "df.wise.ControlFeedback.maximumDate": "\u0E42\u0E1B\u0E23\u0E14\u0E43\u0E2A\u0E48\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19 {maximum} \u0E2B\u0E23\u0E37\u0E2D\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E31\u0E49\u0E19",
471
+ "df.wise.ControlFeedback.minLength": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22 {minLength} \u0E15\u0E31\u0E27",
472
472
  "df.wise.ControlFeedback.minimum": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 {minimum} \u0E2B\u0E23\u0E37\u0E2D\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",
473
- "df.wise.ControlFeedback.minimumDate": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E15\u0E23\u0E07\u0E1E\u0E2D\u0E14\u0E35\u0E2B\u0E23\u0E37\u0E2D\u0E2B\u0E25\u0E31\u0E07 {minimum}",
473
+ "df.wise.ControlFeedback.minimumDate": "\u0E42\u0E1B\u0E23\u0E14\u0E43\u0E2A\u0E48\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19 {minimum} \u0E2B\u0E23\u0E37\u0E2D\u0E2B\u0E25\u0E31\u0E07\u0E08\u0E32\u0E01\u0E19\u0E31\u0E49\u0E19",
474
474
  "df.wise.ControlFeedback.pattern": "\u0E42\u0E1B\u0E23\u0E14\u0E43\u0E2A\u0E48\u0E43\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
475
475
  "df.wise.ControlFeedback.patternDate": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E43\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
476
476
  "df.wise.ControlFeedback.required": "\u0E42\u0E1B\u0E23\u0E14\u0E43\u0E2A\u0E48\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E43\u0E19\u0E0A\u0E48\u0E2D\u0E07\u0E19\u0E35\u0E49",
@@ -1200,7 +1200,7 @@ var FormSectionRenderer = {
1200
1200
  var FormSectionRenderer_default = FormSectionRenderer;
1201
1201
 
1202
1202
  // ../renderers/src/HeadingRenderer.tsx
1203
- import { Display } from "@transferwise/components";
1203
+ import { Display, Title } from "@transferwise/components";
1204
1204
  import { jsx as jsx21 } from "react/jsx-runtime";
1205
1205
  var HeadingRenderer = {
1206
1206
  canRenderType: "heading",
@@ -1209,26 +1209,11 @@ var HeadingRenderer = {
1209
1209
  function Heading(props) {
1210
1210
  const { text, size, align, margin, control } = props;
1211
1211
  const className = getTextAlignmentAndMargin({ align, margin });
1212
- return control === "display" ? /* @__PURE__ */ jsx21(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx21(StandardHeading, { size, text, className: `${className} df-standard-heading` });
1212
+ return control === "display" ? /* @__PURE__ */ jsx21(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx21(StandardHeading, { size, text, className });
1213
1213
  }
1214
1214
  function DisplayHeading({ size, text, className }) {
1215
1215
  return /* @__PURE__ */ jsx21(Display, { type: getDisplayType(size), className, children: text });
1216
1216
  }
1217
- function StandardHeading({ size, text, className }) {
1218
- switch (size) {
1219
- case "xs":
1220
- return /* @__PURE__ */ jsx21("h5", { className, children: text });
1221
- case "sm":
1222
- return /* @__PURE__ */ jsx21("h4", { className, children: text });
1223
- case "lg":
1224
- return /* @__PURE__ */ jsx21("h2", { className, children: text });
1225
- case "xl":
1226
- return /* @__PURE__ */ jsx21("h1", { className, children: text });
1227
- case "md":
1228
- default:
1229
- return /* @__PURE__ */ jsx21("h3", { className, children: text });
1230
- }
1231
- }
1232
1217
  var getDisplayType = (size) => {
1233
1218
  switch (size) {
1234
1219
  case "xs":
@@ -1242,6 +1227,20 @@ var getDisplayType = (size) => {
1242
1227
  return "display-medium";
1243
1228
  }
1244
1229
  };
1230
+ function StandardHeading({ size, text, className }) {
1231
+ return /* @__PURE__ */ jsx21(Title, { type: getTitleTypeBySize(size), className, children: text });
1232
+ }
1233
+ var getTitleTypeBySize = (size) => {
1234
+ var _a;
1235
+ const titleTypes = {
1236
+ xs: "title-group",
1237
+ sm: "title-body",
1238
+ md: "title-subsection",
1239
+ lg: "title-section",
1240
+ xl: "title-screen"
1241
+ };
1242
+ return (_a = titleTypes[size]) != null ? _a : "title-subsection";
1243
+ };
1245
1244
  var HeadingRenderer_default = HeadingRenderer;
1246
1245
 
1247
1246
  // ../renderers/src/ImageRenderer/UrlImage.tsx
@@ -2862,7 +2861,7 @@ var getReviewAction = (callToAction) => {
2862
2861
  };
2863
2862
 
2864
2863
  // ../renderers/src/step/StepRenderer.tsx
2865
- import { Alert as Alert2, Title } from "@transferwise/components";
2864
+ import { Alert as Alert2, Title as Title2 } from "@transferwise/components";
2866
2865
 
2867
2866
  // ../renderers/src/step/BackButton.tsx
2868
2867
  import { AvatarView as AvatarView4 } from "@transferwise/components";
@@ -2886,107 +2885,21 @@ function BackButton({ title, onClick }) {
2886
2885
  }
2887
2886
  var BackButton_default = BackButton;
2888
2887
 
2889
- // ../renderers/src/step/ExternalConfirmationDialog.tsx
2890
- import { useIntl as useIntl8 } from "react-intl";
2891
-
2892
- // ../renderers/src/messages/external-confirmation.messages.ts
2893
- import { defineMessages as defineMessages7 } from "react-intl";
2894
- var external_confirmation_messages_default = defineMessages7({
2895
- title: {
2896
- id: "df.wise.ExternalConfirmation.title",
2897
- defaultMessage: "Please confirm",
2898
- description: "Heading for the confirmation screen."
2899
- },
2900
- description: {
2901
- id: "df.wise.ExternalConfirmation.description",
2902
- defaultMessage: "Please confirm you want to open **{origin}** in a new browser tab.",
2903
- description: "Description for the confirmation screen."
2904
- },
2905
- open: {
2906
- id: "df.wise.ExternalConfirmation.open",
2907
- defaultMessage: "Open in new tab",
2908
- description: "Button text confirming opening a new browser tab."
2909
- },
2910
- cancel: {
2911
- id: "df.wise.ExternalConfirmation.cancel",
2912
- defaultMessage: "Cancel",
2913
- description: "Button text rejecting opening a new browser tab."
2914
- }
2915
- });
2916
-
2917
- // ../renderers/src/step/ExternalConfirmationDialog.tsx
2918
- import { Button as Button6, Markdown as Markdown5 } from "@transferwise/components";
2919
- import { jsx as jsx54, jsxs as jsxs19 } from "react/jsx-runtime";
2920
- function ExternalConfirmationDialog({
2921
- external,
2922
- onClose
2923
- }) {
2924
- const { formatMessage } = useIntl8();
2925
- return /* @__PURE__ */ jsx54("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs19("div", { className: "df-box-renderer-width-lg", children: [
2926
- /* @__PURE__ */ jsx54("h2", { className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.title) }),
2927
- /* @__PURE__ */ jsx54(Markdown5, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(external.url) }) }),
2928
- /* @__PURE__ */ jsx54("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs19("div", { className: "df-box-renderer-width-lg", children: [
2929
- /* @__PURE__ */ jsx54(
2930
- Button6,
2931
- {
2932
- block: true,
2933
- className: "m-b-2",
2934
- priority: "primary",
2935
- size: "md",
2936
- onClick: () => {
2937
- window.open(external.url);
2938
- onClose();
2939
- },
2940
- children: formatMessage(external_confirmation_messages_default.open)
2941
- }
2942
- ),
2943
- /* @__PURE__ */ jsx54(Button6, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onClose, children: formatMessage(external_confirmation_messages_default.cancel) })
2944
- ] }) })
2945
- ] }) });
2946
- }
2947
- function getOrigin(url) {
2948
- try {
2949
- return new URL(url).origin;
2950
- } catch (e) {
2951
- return url;
2952
- }
2953
- }
2954
-
2955
- // ../renderers/src/step/useExternal.tsx
2956
- import { useEffect as useEffect4, useState as useState7 } from "react";
2957
- function useExternal(url) {
2958
- const [externalWindow, setExternalWindow] = useState7(null);
2959
- const [hasDismissed, setHasDismissed] = useState7(false);
2960
- const dismissConfirmation = () => setHasDismissed(true);
2961
- useEffect4(() => {
2962
- if (url) {
2963
- setHasDismissed(false);
2964
- setExternalWindow(window.open(url, "_blank"));
2965
- }
2966
- }, [url]);
2967
- const requiresUserConfirmation = Boolean(url && !externalWindow && !hasDismissed);
2968
- return { requiresUserConfirmation, dismissConfirmation };
2969
- }
2970
-
2971
2888
  // ../renderers/src/step/StepRenderer.tsx
2972
- import { Fragment as Fragment8, jsx as jsx55, jsxs as jsxs20 } from "react/jsx-runtime";
2889
+ import { Fragment as Fragment8, jsx as jsx54, jsxs as jsxs19 } from "react/jsx-runtime";
2973
2890
  var StepRenderer = {
2974
2891
  canRenderType: "step",
2975
2892
  render: StepRendererComponent
2976
2893
  };
2977
2894
  function StepRendererComponent(props) {
2978
- const { back, description, error, external, title, children } = props;
2979
- const { requiresUserConfirmation, dismissConfirmation } = useExternal(external == null ? void 0 : external.url);
2980
- if ((external == null ? void 0 : external.url) && requiresUserConfirmation) {
2981
- return /* @__PURE__ */ jsx55(ExternalConfirmationDialog, { external, onClose: dismissConfirmation });
2982
- }
2983
- return /* @__PURE__ */ jsxs20(Fragment8, { children: [
2984
- back ? /* @__PURE__ */ jsx55(BackButton_default, __spreadValues({}, back)) : null,
2985
- title || description ? /* @__PURE__ */ jsxs20("div", { className: "m-b-4", children: [
2986
- title ? /* @__PURE__ */ jsx55(Title, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
2987
- description ? /* @__PURE__ */ jsx55("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
2895
+ const { back, description, error, title, children } = props;
2896
+ return /* @__PURE__ */ jsxs19(Fragment8, { children: [
2897
+ back ? /* @__PURE__ */ jsx54(BackButton_default, __spreadValues({}, back)) : null,
2898
+ title || description ? /* @__PURE__ */ jsxs19("div", { className: "m-b-4", children: [
2899
+ title ? /* @__PURE__ */ jsx54(Title2, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
2900
+ description ? /* @__PURE__ */ jsx54("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
2988
2901
  ] }) : void 0,
2989
- error ? /* @__PURE__ */ jsx55(Alert2, { type: "negative", className: "m-b-2", message: error }) : void 0,
2902
+ error ? /* @__PURE__ */ jsx54(Alert2, { type: "negative", className: "m-b-2", message: error }) : void 0,
2990
2903
  children
2991
2904
  ] });
2992
2905
  }
@@ -2994,39 +2907,38 @@ function StepRendererComponent(props) {
2994
2907
  // ../renderers/src/ListRenderer.tsx
2995
2908
  import { Body, Header as Header7 } from "@transferwise/components";
2996
2909
  import classNames6 from "classnames";
2997
- import { jsx as jsx56, jsxs as jsxs21 } from "react/jsx-runtime";
2910
+ import { jsx as jsx55, jsxs as jsxs20 } from "react/jsx-runtime";
2998
2911
  var ListRenderer = {
2999
2912
  canRenderType: "list",
3000
- render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ jsxs21("div", { className: getMargin(margin), children: [
3001
- (title || callToAction) && /* @__PURE__ */ jsx56(Header7, { as: "h2", title: title != null ? title : "", action: getListAction(callToAction) }),
3002
- items.map((props) => /* @__PURE__ */ jsx56(DesignSystemListItem, __spreadProps(__spreadValues({}, props), { control }), props.title))
2913
+ render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ jsxs20("div", { className: getMargin(margin), children: [
2914
+ (title || callToAction) && /* @__PURE__ */ jsx55(Header7, { as: "h2", title: title != null ? title : "", action: getListAction(callToAction) }),
2915
+ items.map((props) => /* @__PURE__ */ jsx55(DesignSystemListItem, __spreadProps(__spreadValues({}, props), { control }), props.title))
3003
2916
  ] })
3004
2917
  };
3005
2918
  var DesignSystemListItem = ({
3006
2919
  title,
3007
- subtitle,
3008
- value,
3009
- subvalue,
2920
+ description,
2921
+ supportingValues,
3010
2922
  icon,
3011
2923
  image,
3012
2924
  control
3013
- }) => /* @__PURE__ */ jsx56(
2925
+ }) => /* @__PURE__ */ jsx55(
3014
2926
  "label",
3015
2927
  {
3016
2928
  className: classNames6("np-option p-a-2", {
3017
2929
  "np-option__sm-media": true,
3018
2930
  "np-option__container-aligned": true
3019
2931
  }),
3020
- children: /* @__PURE__ */ jsxs21("div", { className: "media", children: [
3021
- icon || image ? /* @__PURE__ */ jsx56("div", { className: "media-left", children: /* @__PURE__ */ jsx56(ListItemMedia, { image, icon, preferAvatar: control === "with-avatar" }) }) : null,
3022
- /* @__PURE__ */ jsxs21("div", { className: "media-body", children: [
3023
- /* @__PURE__ */ jsxs21("div", { className: "d-flex justify-content-between", children: [
3024
- /* @__PURE__ */ jsx56("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: title }),
3025
- /* @__PURE__ */ jsx56("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: value })
2932
+ children: /* @__PURE__ */ jsxs20("div", { className: "media", children: [
2933
+ icon || image ? /* @__PURE__ */ jsx55("div", { className: "media-left", children: /* @__PURE__ */ jsx55(ListItemMedia, { image, icon, preferAvatar: control === "with-avatar" }) }) : null,
2934
+ /* @__PURE__ */ jsxs20("div", { className: "media-body", children: [
2935
+ /* @__PURE__ */ jsxs20("div", { className: "d-flex justify-content-between", children: [
2936
+ /* @__PURE__ */ jsx55("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: title }),
2937
+ /* @__PURE__ */ jsx55("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: supportingValues == null ? void 0 : supportingValues.value })
3026
2938
  ] }),
3027
- /* @__PURE__ */ jsxs21("div", { className: "d-flex justify-content-between", children: [
3028
- /* @__PURE__ */ jsx56(Body, { className: "d-block np-option__body", children: subtitle }),
3029
- /* @__PURE__ */ jsx56(Body, { className: "d-block np-option__body", children: subvalue })
2939
+ /* @__PURE__ */ jsxs20("div", { className: "d-flex justify-content-between", children: [
2940
+ /* @__PURE__ */ jsx55(Body, { className: "d-block np-option__body", children: description }),
2941
+ /* @__PURE__ */ jsx55(Body, { className: "d-block np-option__body", children: supportingValues == null ? void 0 : supportingValues.subvalue })
3030
2942
  ] })
3031
2943
  ] })
3032
2944
  ] })
@@ -3039,10 +2951,10 @@ var ListItemMedia = ({
3039
2951
  preferAvatar
3040
2952
  }) => {
3041
2953
  if (icon) {
3042
- return /* @__PURE__ */ jsx56("div", { className: "circle circle-sm text-primary circle-inverse", children: /* @__PURE__ */ jsx56(OptionMedia, { icon, image, preferAvatar }) });
2954
+ return /* @__PURE__ */ jsx55("div", { className: "circle circle-sm text-primary circle-inverse", children: /* @__PURE__ */ jsx55(OptionMedia, { icon, image, preferAvatar }) });
3043
2955
  }
3044
2956
  if (image) {
3045
- return /* @__PURE__ */ jsx56("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ jsx56(OptionMedia, { icon, image, preferAvatar }) });
2957
+ return /* @__PURE__ */ jsx55("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ jsx55(OptionMedia, { icon, image, preferAvatar }) });
3046
2958
  }
3047
2959
  };
3048
2960
  var getListAction = (callToAction) => {
@@ -3058,32 +2970,28 @@ var getListAction = (callToAction) => {
3058
2970
  var ListRenderer_default = ListRenderer;
3059
2971
 
3060
2972
  // ../renderers/src/step/SplashStepRenderer.tsx
3061
- import { jsx as jsx57, jsxs as jsxs22 } from "react/jsx-runtime";
2973
+ import { jsx as jsx56, jsxs as jsxs21 } from "react/jsx-runtime";
3062
2974
  var SplashStepRenderer = {
3063
2975
  canRenderType: "step",
3064
2976
  canRender: ({ control }) => control === "splash",
3065
2977
  render: SplashStepRendererComponent
3066
2978
  };
3067
2979
  function SplashStepRendererComponent(props) {
3068
- const { back, children, external } = props;
3069
- const { requiresUserConfirmation, dismissConfirmation } = useExternal(external == null ? void 0 : external.url);
3070
- if ((external == null ? void 0 : external.url) && requiresUserConfirmation) {
3071
- return /* @__PURE__ */ jsx57(ExternalConfirmationDialog, { external, onClose: dismissConfirmation });
3072
- }
3073
- return /* @__PURE__ */ jsxs22("div", { className: "splash-screen m-t-5", children: [
3074
- back ? /* @__PURE__ */ jsx57(BackButton_default, __spreadValues({}, back)) : null,
2980
+ const { back, children } = props;
2981
+ return /* @__PURE__ */ jsxs21("div", { className: "splash-screen m-t-5", children: [
2982
+ back ? /* @__PURE__ */ jsx56(BackButton_default, __spreadValues({}, back)) : null,
3075
2983
  children
3076
2984
  ] });
3077
2985
  }
3078
2986
 
3079
2987
  // ../renderers/src/utils/useCustomTheme.ts
3080
2988
  import { useTheme } from "@wise/components-theming";
3081
- import { useEffect as useEffect5, useMemo } from "react";
2989
+ import { useEffect as useEffect4, useMemo } from "react";
3082
2990
  var ThemeRequiredEventName = "Theme Required";
3083
2991
  var useCustomTheme = (theme, trackEvent) => {
3084
2992
  const previousThemeHookValue = useTheme();
3085
2993
  const previousTheme = useMemo(() => previousThemeHookValue.theme, []);
3086
- useEffect5(() => {
2994
+ useEffect4(() => {
3087
2995
  trackEvent(ThemeRequiredEventName, { theme });
3088
2996
  return theme !== previousTheme ? () => {
3089
2997
  trackEvent(ThemeRequiredEventName, { theme: previousTheme });
@@ -3093,25 +3001,113 @@ var useCustomTheme = (theme, trackEvent) => {
3093
3001
  };
3094
3002
 
3095
3003
  // ../renderers/src/step/SplashCelebrationStepRenderer.tsx
3096
- import { jsx as jsx58, jsxs as jsxs23 } from "react/jsx-runtime";
3004
+ import { jsx as jsx57, jsxs as jsxs22 } from "react/jsx-runtime";
3097
3005
  var SplashCelebrationStepRenderer = {
3098
3006
  canRenderType: "step",
3099
3007
  canRender: ({ control }) => control === "splash-celebration",
3100
3008
  render: SplashCelebrationStepRendererComponent
3101
3009
  };
3102
3010
  function SplashCelebrationStepRendererComponent(props) {
3103
- const { back, children, external, trackEvent } = props;
3011
+ const { back, children, trackEvent } = props;
3104
3012
  useCustomTheme("forest-green", trackEvent);
3105
- const { requiresUserConfirmation, dismissConfirmation } = useExternal(external == null ? void 0 : external.url);
3106
- if ((external == null ? void 0 : external.url) && requiresUserConfirmation) {
3107
- return /* @__PURE__ */ jsx58(ExternalConfirmationDialog, { external, onClose: dismissConfirmation });
3108
- }
3109
- return /* @__PURE__ */ jsxs23("div", { className: "splash-screen m-t-5", children: [
3110
- back ? /* @__PURE__ */ jsx58(BackButton_default, __spreadValues({}, back)) : null,
3013
+ return /* @__PURE__ */ jsxs22("div", { className: "splash-screen m-t-5", children: [
3014
+ back ? /* @__PURE__ */ jsx57(BackButton_default, __spreadValues({}, back)) : null,
3111
3015
  children
3112
3016
  ] });
3113
3017
  }
3114
3018
 
3019
+ // ../renderers/src/ExternalConfirmationRenderer.tsx
3020
+ import { Button as Button6, Markdown as Markdown5, Modal as Modal3 } from "@transferwise/components";
3021
+
3022
+ // ../renderers/src/messages/external-confirmation.messages.ts
3023
+ import { defineMessages as defineMessages7 } from "react-intl";
3024
+ var external_confirmation_messages_default = defineMessages7({
3025
+ title: {
3026
+ id: "df.wise.ExternalConfirmation.title",
3027
+ defaultMessage: "Please confirm",
3028
+ description: "Heading for the confirmation screen."
3029
+ },
3030
+ description: {
3031
+ id: "df.wise.ExternalConfirmation.description",
3032
+ defaultMessage: "Please confirm you want to open **{origin}** in a new browser tab.",
3033
+ description: "Description for the confirmation screen."
3034
+ },
3035
+ open: {
3036
+ id: "df.wise.ExternalConfirmation.open",
3037
+ defaultMessage: "Open in new tab",
3038
+ description: "Button text confirming opening a new browser tab."
3039
+ },
3040
+ cancel: {
3041
+ id: "df.wise.ExternalConfirmation.cancel",
3042
+ defaultMessage: "Cancel",
3043
+ description: "Button text rejecting opening a new browser tab."
3044
+ }
3045
+ });
3046
+
3047
+ // ../renderers/src/ExternalConfirmationRenderer.tsx
3048
+ import { useIntl as useIntl8 } from "react-intl";
3049
+ import { useEffect as useEffect5 } from "react";
3050
+ import { Fragment as Fragment9, jsx as jsx58, jsxs as jsxs23 } from "react/jsx-runtime";
3051
+ var ExternalConfirmationRenderer = {
3052
+ canRenderType: "external-confirmation",
3053
+ render: ExternalConfirmationRendererComponent
3054
+ };
3055
+ function ExternalConfirmationRendererComponent({
3056
+ url,
3057
+ status,
3058
+ onSuccess,
3059
+ onFailure,
3060
+ onCancel
3061
+ }) {
3062
+ const { formatMessage } = useIntl8();
3063
+ useEffect5(() => {
3064
+ if (url) {
3065
+ const w = window.open(url, "_blank");
3066
+ if (w) {
3067
+ onSuccess();
3068
+ } else {
3069
+ onFailure();
3070
+ }
3071
+ }
3072
+ }, []);
3073
+ return /* @__PURE__ */ jsx58(
3074
+ Modal3,
3075
+ {
3076
+ open: status === "failure",
3077
+ title: formatMessage(external_confirmation_messages_default.title),
3078
+ body: /* @__PURE__ */ jsxs23(Fragment9, { children: [
3079
+ /* @__PURE__ */ jsx58(Markdown5, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
3080
+ /* @__PURE__ */ jsx58("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs23("div", { className: "df-box-renderer-width-lg", children: [
3081
+ /* @__PURE__ */ jsx58(
3082
+ Button6,
3083
+ {
3084
+ block: true,
3085
+ className: "m-b-2",
3086
+ priority: "primary",
3087
+ size: "md",
3088
+ onClick: () => {
3089
+ window.open(url);
3090
+ onCancel();
3091
+ },
3092
+ children: formatMessage(external_confirmation_messages_default.open)
3093
+ }
3094
+ ),
3095
+ /* @__PURE__ */ jsx58(Button6, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
3096
+ ] }) })
3097
+ ] }),
3098
+ onClose: onCancel
3099
+ }
3100
+ );
3101
+ }
3102
+ function getOrigin(url) {
3103
+ try {
3104
+ return new URL(url).origin;
3105
+ } catch (e) {
3106
+ return url;
3107
+ }
3108
+ }
3109
+ var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
3110
+
3115
3111
  // ../renderers/src/getWiseRenderers.ts
3116
3112
  var getWiseRenderers = () => [
3117
3113
  AlertRenderer_default,
@@ -3122,6 +3118,7 @@ var getWiseRenderers = () => [
3122
3118
  DateInputRenderer_default,
3123
3119
  DecisionRenderer_default,
3124
3120
  DividerRenderer_default,
3121
+ ExternalConfirmationRenderer_default,
3125
3122
  FormRenderer_default,
3126
3123
  FormSectionRenderer_default,
3127
3124
  HeadingRenderer_default,
@@ -3150,17 +3147,17 @@ var getWiseRenderers = () => [
3150
3147
  ];
3151
3148
 
3152
3149
  // ../renderers/src/ModalContentRenderer.tsx
3153
- import { Modal as Modal3 } from "@transferwise/components";
3150
+ import { Modal as Modal4 } from "@transferwise/components";
3154
3151
  import { jsx as jsx59 } from "react/jsx-runtime";
3155
3152
  var ModalContentRenderer = {
3156
3153
  canRenderType: "modal-content",
3157
3154
  render: ({ title, children, open, onClose }) => {
3158
- return /* @__PURE__ */ jsx59(Modal3, { open, title, body: children, onClose });
3155
+ return /* @__PURE__ */ jsx59(Modal4, { open, title, body: children, onClose });
3159
3156
  }
3160
3157
  };
3161
3158
 
3162
3159
  // src/dynamicFlow/telemetry/app-version.ts
3163
- var appVersion = "4.10.1";
3160
+ var appVersion = "4.11.1";
3164
3161
 
3165
3162
  // src/dynamicFlow/telemetry/getLogEvent.ts
3166
3163
  var getLogEvent = (onLog) => (level, message, extra) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-client-internal",
3
- "version": "4.10.1",
3
+ "version": "4.11.1",
4
4
  "description": "Dynamic Flow web client for Wise",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/main.js",
@@ -51,10 +51,10 @@
51
51
  "@testing-library/jest-dom": "6.6.3",
52
52
  "@testing-library/react": "16.3.0",
53
53
  "@testing-library/user-event": "14.6.1",
54
- "@transferwise/components": "46.96.0",
54
+ "@transferwise/components": "46.96.1",
55
55
  "@transferwise/formatting": "^2.13.1",
56
- "@transferwise/icons": "3.20.0",
57
- "@transferwise/neptune-css": "14.24.2",
56
+ "@transferwise/icons": "3.21.0",
57
+ "@transferwise/neptune-css": "14.24.3",
58
58
  "@types/jest": "29.5.14",
59
59
  "@types/react": "18.3.20",
60
60
  "@types/react-dom": "18.3.6",
@@ -82,9 +82,9 @@
82
82
  "tsx": "4.19.3",
83
83
  "typescript": "5.8.3",
84
84
  "webpack": "5.99.7",
85
+ "@wise/dynamic-flow-types": "3.3.0",
85
86
  "@wise/dynamic-flow-fixtures": "0.0.1",
86
- "@wise/dynamic-flow-renderers": "0.0.0",
87
- "@wise/dynamic-flow-types": "3.2.0"
87
+ "@wise/dynamic-flow-renderers": "0.0.0"
88
88
  },
89
89
  "peerDependencies": {
90
90
  "@transferwise/components": "^46.92.0",
@@ -99,8 +99,8 @@
99
99
  },
100
100
  "dependencies": {
101
101
  "classnames": "2.5.1",
102
- "@wise/dynamic-flow-client": "4.4.0",
103
- "@wise/dynamic-flow-types": "3.2.0"
102
+ "@wise/dynamic-flow-client": "4.5.1",
103
+ "@wise/dynamic-flow-types": "3.3.0"
104
104
  },
105
105
  "scripts": {
106
106
  "dev": "pnpm build:visual-tests && storybook dev -p 3005",