@wise/dynamic-flow-client-internal 5.13.3 → 5.13.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/main.js CHANGED
@@ -138,6 +138,12 @@ var import_dynamic_flow_client6 = require("@wise/dynamic-flow-client");
138
138
  // src/dynamicFlow/DynamicFlow.tsx
139
139
  var import_dynamic_flow_client3 = require("@wise/dynamic-flow-client");
140
140
 
141
+ // src/dynamicFlow/telemetry/app-version.ts
142
+ var appVersion = (
143
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
144
+ typeof process !== "undefined" ? "5.13.5" : "0.0.0"
145
+ );
146
+
141
147
  // src/dynamicFlow/context-menu/useContextMenu.tsx
142
148
  var import_react = require("react");
143
149
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -190,16 +196,20 @@ var useMenuPosition = () => {
190
196
 
191
197
  // src/dynamicFlow/context-menu/useDFContextMenu.tsx
192
198
  var useDFContextMenu = (controller) => {
199
+ const getCurrentStep = () => {
200
+ const step = controller.getCurrentStep();
201
+ return step ? recursivelyRemoveNullish(step) : null;
202
+ };
193
203
  const getCurrentStepWithModel = async () => {
194
204
  const step = controller.getCurrentStep();
195
205
  if (!step) {
196
206
  return null;
197
207
  }
198
208
  const model = await controller.getSubmittableValue();
199
- return __spreadProps(__spreadValues({}, step), { model });
209
+ return recursivelyRemoveNullish(__spreadProps(__spreadValues({}, step), { model }));
200
210
  };
201
211
  const getEncodedCurrentStep = () => {
202
- const step = controller.getCurrentStep();
212
+ const step = getCurrentStep();
203
213
  return step ? toBase64(JSON.stringify(step, null, 2)) : null;
204
214
  };
205
215
  const getEncodedCurrentStepWithModel = async () => {
@@ -209,6 +219,12 @@ var useDFContextMenu = (controller) => {
209
219
  return useContextMenu({
210
220
  title: "DynamicFlow Menu (Dev/Staging only)",
211
221
  items: isDevOrStaging() ? [
222
+ {
223
+ label: `DF client version: ${appVersion}`,
224
+ onClick: () => {
225
+ openVersionPage(appVersion);
226
+ }
227
+ },
212
228
  {
213
229
  label: "Open in Sandbox",
214
230
  onClick: () => {
@@ -224,7 +240,7 @@ var useDFContextMenu = (controller) => {
224
240
  {
225
241
  label: "Copy step JSON",
226
242
  onClick: () => {
227
- copyToClipboard(controller.getCurrentStep());
243
+ copyToClipboard(getCurrentStep());
228
244
  }
229
245
  },
230
246
  {
@@ -243,12 +259,35 @@ var toBase64 = (str) => {
243
259
  };
244
260
  var openInSandbox = (base64Step) => {
245
261
  if (base64Step) {
246
- window.open(`https://df.wise.com/sandbox#${base64Step}`, "_blank");
262
+ window.open(`https://df.wise.com/sandbox#${base64Step}`, "_blank", "noopener,noreferrer");
247
263
  }
248
264
  };
249
- var copyToClipboard = (step) => {
250
- if (step) {
251
- void navigator.clipboard.writeText(JSON.stringify(step, null, 2));
265
+ var openVersionPage = (version) => {
266
+ const changelogUrl = getGitHubChangelogUrl(version);
267
+ if (changelogUrl) {
268
+ window.open(changelogUrl, "_blank", "noopener,noreferrer");
269
+ } else {
270
+ window.open(getNpmPackageUrl(version), "_blank", "noopener,noreferrer");
271
+ }
272
+ };
273
+ var getGitHubChangelogUrl = (version) => {
274
+ const semverRegex = /^\d+\.\d+\.\d+$/;
275
+ if (semverRegex.test(version)) {
276
+ const hash = version.replace(/\./g, "");
277
+ return `https://github.com/transferwise/dynamic-flow/blob/main/web/wise/CHANGELOG.md#${hash}`;
278
+ }
279
+ return void 0;
280
+ };
281
+ var getNpmPackageUrl = (version) => {
282
+ return `https://www.npmjs.com/package/@wise/dynamic-flow-client-internal/v/${version}`;
283
+ };
284
+ var copyToClipboard = (value) => {
285
+ if (typeof value === "string") {
286
+ void navigator.clipboard.writeText(value);
287
+ return;
288
+ }
289
+ if (value) {
290
+ void navigator.clipboard.writeText(JSON.stringify(value, null, 2));
252
291
  }
253
292
  };
254
293
  var isDevOrStaging = () => {
@@ -268,16 +307,24 @@ var isDevOrStaging = () => {
268
307
  return false;
269
308
  }
270
309
  };
310
+ var recursivelyRemoveNullish = (element) => {
311
+ if (Array.isArray(element)) {
312
+ return element.map(recursivelyRemoveNullish);
313
+ }
314
+ if (element !== null && typeof element === "object") {
315
+ return Object.entries(element).reduce((acc, [key, value]) => {
316
+ if (value !== null && value !== void 0) {
317
+ acc[key] = recursivelyRemoveNullish(value);
318
+ }
319
+ return acc;
320
+ }, {});
321
+ }
322
+ return element;
323
+ };
271
324
 
272
325
  // src/dynamicFlow/useWiseToCoreProps.tsx
273
326
  var import_react24 = require("react");
274
327
 
275
- // src/dynamicFlow/telemetry/app-version.ts
276
- var appVersion = (
277
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
278
- typeof process !== "undefined" ? "5.13.3" : "0.0.0"
279
- );
280
-
281
328
  // src/dynamicFlow/telemetry/getLogEvent.ts
282
329
  var getLogEvent = (onLog) => (level, message, extra) => {
283
330
  const extraWithVersion = __spreadProps(__spreadValues({}, extra), {
@@ -453,7 +500,7 @@ function AddressValidationButtonComponent(props) {
453
500
  block: true,
454
501
  disabled,
455
502
  priority: "primary",
456
- size: "md",
503
+ size: "lg",
457
504
  loading: spinny,
458
505
  onClick: () => {
459
506
  setSpinny(true);
@@ -3575,14 +3622,103 @@ var useCustomTheme = (theme, trackEvent) => {
3575
3622
  }, []);
3576
3623
  };
3577
3624
 
3578
- // ../renderers/src/step/topbar/BackButton.tsx
3625
+ // ../renderers/src/step/StepFooter.tsx
3579
3626
  var import_components53 = require("@transferwise/components");
3580
- var import_icons5 = require("@transferwise/icons");
3627
+ var import_react19 = require("react");
3581
3628
  var import_react_intl25 = require("react-intl");
3582
3629
 
3583
- // ../renderers/src/messages/back.messages.ts
3630
+ // ../renderers/src/messages/step.messages.ts
3584
3631
  var import_react_intl24 = require("react-intl");
3585
- var back_messages_default = (0, import_react_intl24.defineMessages)({
3632
+ var step_messages_default = (0, import_react_intl24.defineMessages)({
3633
+ scrollToBottom: {
3634
+ id: "df.wise.step.scrollToBottom",
3635
+ defaultMessage: "Scroll to bottom",
3636
+ description: "Label for a button that appears when the content of a step is too long and the user needs to scroll to the bottom to see all the content."
3637
+ }
3638
+ });
3639
+
3640
+ // ../renderers/src/step/StepFooter.tsx
3641
+ var import_jsx_runtime76 = require("react/jsx-runtime");
3642
+ var SCROLL_TO_BOTTOM = "scroll-to-bottom";
3643
+ var StepFooter = ({ footer, tags }) => {
3644
+ if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
3645
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(FooterWithScrollButton, { footer });
3646
+ }
3647
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(DefaultFooter, { footer });
3648
+ };
3649
+ var DefaultFooter = ({ footer }) => {
3650
+ const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
3651
+ return hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
3652
+ };
3653
+ var FooterWithScrollButton = ({ footer }) => {
3654
+ const { formatMessage } = (0, import_react_intl25.useIntl)();
3655
+ const endOfLayoutRef = (0, import_react19.useRef)(null);
3656
+ const isElementVisible = useIsElementVisible(endOfLayoutRef);
3657
+ const scrollButton = /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3658
+ import_components53.Button,
3659
+ {
3660
+ className: "m-b-1",
3661
+ v2: true,
3662
+ block: true,
3663
+ priority: "tertiary",
3664
+ onClick: () => {
3665
+ var _a;
3666
+ (_a = endOfLayoutRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth" });
3667
+ },
3668
+ children: formatMessage(step_messages_default.scrollToBottom)
3669
+ }
3670
+ );
3671
+ const hasStepFooterContent = footer && Array.isArray(footer) && footer.length > 0;
3672
+ if (isElementVisible && !hasStepFooterContent) {
3673
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
3674
+ }
3675
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
3676
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
3677
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "df-step-fixed__footer", children: [
3678
+ !isElementVisible && scrollButton,
3679
+ footer
3680
+ ] })
3681
+ ] });
3682
+ };
3683
+ var useIsElementVisible = (elementRef) => {
3684
+ const [isVisible, setIsVisible] = (0, import_react19.useState)(false);
3685
+ (0, import_react19.useEffect)(() => {
3686
+ const element = elementRef.current;
3687
+ if (!element) return;
3688
+ const observer = new IntersectionObserver(([entry]) => {
3689
+ setIsVisible(entry.isIntersecting);
3690
+ });
3691
+ observer.observe(element);
3692
+ return () => observer.disconnect();
3693
+ }, [elementRef]);
3694
+ return isVisible;
3695
+ };
3696
+
3697
+ // ../renderers/src/step/StepHeader.tsx
3698
+ var import_components54 = require("@transferwise/components");
3699
+ var import_jsx_runtime77 = require("react/jsx-runtime");
3700
+ var StepHeader = ({ title, description, tags }) => {
3701
+ const { titleType, alignmentClassName } = getHeaderStyle(tags);
3702
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
3703
+ title ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components54.Title, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
3704
+ description ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
3705
+ ] });
3706
+ };
3707
+ var getHeaderStyle = (tags) => {
3708
+ if (tags == null ? void 0 : tags.includes("root-screen")) {
3709
+ return { titleType: "title-screen", alignmentClassName: "text-xs-left" };
3710
+ }
3711
+ return { titleType: "title-section", alignmentClassName: "text-xs-center" };
3712
+ };
3713
+
3714
+ // ../renderers/src/step/topbar/BackButton.tsx
3715
+ var import_components55 = require("@transferwise/components");
3716
+ var import_icons5 = require("@transferwise/icons");
3717
+ var import_react_intl27 = require("react-intl");
3718
+
3719
+ // ../renderers/src/messages/back.messages.ts
3720
+ var import_react_intl26 = require("react-intl");
3721
+ var back_messages_default = (0, import_react_intl26.defineMessages)({
3586
3722
  back: {
3587
3723
  id: "df.wise.back.label",
3588
3724
  defaultMessage: "Back",
@@ -3591,31 +3727,31 @@ var back_messages_default = (0, import_react_intl24.defineMessages)({
3591
3727
  });
3592
3728
 
3593
3729
  // ../renderers/src/step/topbar/BackButton.tsx
3594
- var import_jsx_runtime76 = require("react/jsx-runtime");
3730
+ var import_jsx_runtime78 = require("react/jsx-runtime");
3595
3731
  function BackButton({ title, onClick }) {
3596
- const { formatMessage } = (0, import_react_intl25.useIntl)();
3597
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_components53.IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
3598
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
3599
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_icons5.ArrowLeft, {})
3732
+ const { formatMessage } = (0, import_react_intl27.useIntl)();
3733
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_components55.IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
3734
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
3735
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_icons5.ArrowLeft, {})
3600
3736
  ] });
3601
3737
  }
3602
3738
 
3603
3739
  // ../renderers/src/step/topbar/Toolbar.tsx
3604
- var import_components54 = require("@transferwise/components");
3605
- var import_jsx_runtime77 = require("react/jsx-runtime");
3740
+ var import_components56 = require("@transferwise/components");
3741
+ var import_jsx_runtime79 = require("react/jsx-runtime");
3606
3742
  var Toolbar = ({ items }) => {
3607
- return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
3743
+ return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
3608
3744
  };
3609
3745
  function ToolbarButton(props) {
3610
- return prefersMedia(props.control) ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(TextToolbarButton, __spreadValues({}, props));
3746
+ return prefersMedia(props.control) ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(TextToolbarButton, __spreadValues({}, props));
3611
3747
  }
3612
3748
  function MediaToolbarButton(props) {
3613
3749
  var _a;
3614
3750
  const { context, control, media, accessibilityDescription, disabled, onClick } = props;
3615
3751
  const priority = getIconButtonPriority(control);
3616
3752
  const type = getSentiment2(context);
3617
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
3618
- import_components54.IconButton,
3753
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
3754
+ import_components56.IconButton,
3619
3755
  {
3620
3756
  className: "df-toolbar-button",
3621
3757
  disabled,
@@ -3624,7 +3760,7 @@ function MediaToolbarButton(props) {
3624
3760
  type,
3625
3761
  onClick,
3626
3762
  children: [
3627
- accessibilityDescription ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "sr-only", children: accessibilityDescription }) : null,
3763
+ accessibilityDescription ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "sr-only", children: accessibilityDescription }) : null,
3628
3764
  media ? (_a = getAddonStartMedia(media)) == null ? void 0 : _a.value : null
3629
3765
  ]
3630
3766
  }
@@ -3635,8 +3771,8 @@ function TextToolbarButton(props) {
3635
3771
  const addonStart = media ? getAddonStartMedia(media) : void 0;
3636
3772
  const priority = getPriority2(control);
3637
3773
  const sentiment = getSentiment2(context);
3638
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
3639
- import_components54.Button,
3774
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
3775
+ import_components56.Button,
3640
3776
  {
3641
3777
  v2: true,
3642
3778
  size: "sm",
@@ -3665,140 +3801,51 @@ var getIconButtonPriority = (control) => {
3665
3801
  };
3666
3802
 
3667
3803
  // ../renderers/src/step/topbar/TopBar.tsx
3668
- var import_jsx_runtime78 = require("react/jsx-runtime");
3804
+ var import_jsx_runtime80 = require("react/jsx-runtime");
3669
3805
  function TopBar({ back, toolbar }) {
3670
- return back || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "d-flex m-b-2", children: [
3671
- back ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(BackButton, __spreadValues({}, back)) : null,
3672
- toolbar ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Toolbar, __spreadValues({}, toolbar)) : null
3806
+ return back || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "d-flex m-b-2", children: [
3807
+ back ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(BackButton, __spreadValues({}, back)) : null,
3808
+ toolbar ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Toolbar, __spreadValues({}, toolbar)) : null
3673
3809
  ] }) : null;
3674
3810
  }
3675
3811
 
3676
- // ../renderers/src/step/StepFooter.tsx
3677
- var import_components55 = require("@transferwise/components");
3678
- var import_react19 = require("react");
3679
- var import_react_intl27 = require("react-intl");
3680
-
3681
- // ../renderers/src/messages/step.messages.ts
3682
- var import_react_intl26 = require("react-intl");
3683
- var step_messages_default = (0, import_react_intl26.defineMessages)({
3684
- scrollToBottom: {
3685
- id: "df.wise.step.scrollToBottom",
3686
- defaultMessage: "Scroll to bottom",
3687
- description: "Label for a button that appears when the content of a step is too long and the user needs to scroll to the bottom to see all the content."
3688
- }
3689
- });
3690
-
3691
- // ../renderers/src/step/StepFooter.tsx
3692
- var import_jsx_runtime79 = require("react/jsx-runtime");
3693
- var SCROLL_TO_BOTTOM = "scroll-to-bottom";
3694
- var StepFooter = ({ footer, tags }) => {
3695
- if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
3696
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(FooterWithScrollButton, { footer });
3697
- }
3698
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(DefaultFooter, { footer });
3699
- };
3700
- var DefaultFooter = ({ footer }) => {
3701
- const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
3702
- return hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
3703
- };
3704
- var FooterWithScrollButton = ({ footer }) => {
3705
- const { formatMessage } = (0, import_react_intl27.useIntl)();
3706
- const endOfLayoutRef = (0, import_react19.useRef)(null);
3707
- const isElementVisible = useIsElementVisible(endOfLayoutRef);
3708
- const scrollButton = /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
3709
- import_components55.Button,
3710
- {
3711
- className: "m-b-1",
3712
- v2: true,
3713
- block: true,
3714
- priority: "tertiary",
3715
- onClick: () => {
3716
- var _a;
3717
- (_a = endOfLayoutRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth" });
3718
- },
3719
- children: formatMessage(step_messages_default.scrollToBottom)
3720
- }
3721
- );
3722
- const hasStepFooterContent = footer && Array.isArray(footer) && footer.length > 0;
3723
- if (isElementVisible && !hasStepFooterContent) {
3724
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
3725
- }
3726
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
3727
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
3728
- /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "df-step-fixed__footer", children: [
3729
- !isElementVisible && scrollButton,
3730
- footer
3731
- ] })
3732
- ] });
3733
- };
3734
- var useIsElementVisible = (elementRef) => {
3735
- const [isVisible, setIsVisible] = (0, import_react19.useState)(false);
3736
- (0, import_react19.useEffect)(() => {
3737
- const element = elementRef.current;
3738
- if (!element) return;
3739
- const observer = new IntersectionObserver(([entry]) => {
3740
- setIsVisible(entry.isIntersecting);
3741
- });
3742
- observer.observe(element);
3743
- return () => observer.disconnect();
3744
- }, [elementRef]);
3745
- return isVisible;
3746
- };
3747
-
3748
3812
  // ../renderers/src/step/SplashCelebrationStepRenderer.tsx
3749
- var import_jsx_runtime80 = require("react/jsx-runtime");
3813
+ var import_jsx_runtime81 = require("react/jsx-runtime");
3750
3814
  var SplashCelebrationStepRenderer = {
3751
3815
  canRenderType: "step",
3752
3816
  canRender: ({ control }) => control === "splash-celebration",
3753
3817
  render: SplashCelebrationStepRendererComponent
3754
3818
  };
3755
3819
  function SplashCelebrationStepRendererComponent(props) {
3756
- const { back, toolbar, children, footer, tags, trackEvent } = props;
3820
+ const { back, title, description, toolbar, children, footer, tags, trackEvent } = props;
3757
3821
  useCustomTheme("forest-green", trackEvent);
3758
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "splash-screen m-t-5", children: [
3759
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TopBar, { back, toolbar }),
3822
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "splash-screen m-t-5", children: [
3823
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(TopBar, { back, toolbar }),
3824
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(StepHeader, { title, description, tags }) }) : void 0,
3760
3825
  children,
3761
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(StepFooter, { footer, tags })
3826
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(StepFooter, { footer, tags })
3762
3827
  ] });
3763
3828
  }
3764
3829
 
3765
3830
  // ../renderers/src/step/SplashStepRenderer.tsx
3766
- var import_jsx_runtime81 = require("react/jsx-runtime");
3831
+ var import_jsx_runtime82 = require("react/jsx-runtime");
3767
3832
  var SplashStepRenderer = {
3768
3833
  canRenderType: "step",
3769
3834
  canRender: ({ control }) => control === "splash",
3770
3835
  render: SplashStepRendererComponent
3771
3836
  };
3772
3837
  function SplashStepRendererComponent(props) {
3773
- const { back, toolbar, children, footer, tags } = props;
3774
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "splash-screen m-t-5", children: [
3775
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(TopBar, { back, toolbar }),
3838
+ const { back, title, description, toolbar, children, footer, tags } = props;
3839
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "splash-screen m-t-5", children: [
3840
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TopBar, { back, toolbar }),
3841
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(StepHeader, { title, description, tags }) }) : void 0,
3776
3842
  children,
3777
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(StepFooter, { footer, tags })
3843
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(StepFooter, { footer, tags })
3778
3844
  ] });
3779
3845
  }
3780
3846
 
3781
3847
  // ../renderers/src/step/StepRenderer.tsx
3782
3848
  var import_components57 = require("@transferwise/components");
3783
-
3784
- // ../renderers/src/step/StepHeader.tsx
3785
- var import_components56 = require("@transferwise/components");
3786
- var import_jsx_runtime82 = require("react/jsx-runtime");
3787
- var StepHeader = ({ title, description, tags }) => {
3788
- const { titleType, alignmentClassName } = getHeaderStyle(tags);
3789
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
3790
- title ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components56.Title, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
3791
- description ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
3792
- ] });
3793
- };
3794
- var getHeaderStyle = (tags) => {
3795
- if (tags == null ? void 0 : tags.includes("root-screen")) {
3796
- return { titleType: "title-screen", alignmentClassName: "text-xs-left" };
3797
- }
3798
- return { titleType: "title-section", alignmentClassName: "text-xs-center" };
3799
- };
3800
-
3801
- // ../renderers/src/step/StepRenderer.tsx
3802
3849
  var import_jsx_runtime83 = require("react/jsx-runtime");
3803
3850
  var StepRenderer = {
3804
3851
  canRenderType: "step",