@wise/dynamic-flow-client-internal 5.16.1 → 5.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/main.js CHANGED
@@ -141,7 +141,7 @@ var import_dynamic_flow_client4 = require("@wise/dynamic-flow-client");
141
141
  // src/dynamicFlow/telemetry/app-version.ts
142
142
  var appVersion = (
143
143
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
144
- typeof process !== "undefined" ? "5.16.1" : "0.0.0"
144
+ typeof process !== "undefined" ? "5.17.0" : "0.0.0"
145
145
  );
146
146
 
147
147
  // src/dynamicFlow/context-menu/useContextMenu.tsx
@@ -3870,9 +3870,11 @@ var getIconButtonPriority = (control) => {
3870
3870
 
3871
3871
  // ../renderers/src/step/topbar/TopBar.tsx
3872
3872
  var import_jsx_runtime81 = require("react/jsx-runtime");
3873
- function TopBar({ back, toolbar }) {
3874
- return back || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "d-flex m-b-2", children: [
3875
- back ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(BackButton, __spreadValues({}, back)) : null,
3873
+ function TopBar({ back, toolbar, tags }) {
3874
+ const isBackAllowed = !(tags == null ? void 0 : tags.includes("non-dismissible"));
3875
+ const backCTA = isBackAllowed ? back : void 0;
3876
+ return backCTA || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "d-flex m-b-2", children: [
3877
+ backCTA ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(BackButton, __spreadValues({}, backCTA)) : null,
3876
3878
  toolbar ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Toolbar, __spreadValues({}, toolbar)) : null
3877
3879
  ] }) : null;
3878
3880
  }
@@ -3888,7 +3890,7 @@ function SplashCelebrationStepRendererComponent(props) {
3888
3890
  const { back, title, description, toolbar, children, footer, tags, trackEvent } = props;
3889
3891
  useCustomTheme("forest-green", trackEvent);
3890
3892
  return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "splash-screen m-t-5", children: [
3891
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TopBar, { back, toolbar }),
3893
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TopBar, { back, toolbar, tags }),
3892
3894
  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,
3893
3895
  children,
3894
3896
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(StepFooter, { footer, tags })
@@ -3905,7 +3907,7 @@ var SplashStepRenderer = {
3905
3907
  function SplashStepRendererComponent(props) {
3906
3908
  const { back, title, description, toolbar, children, footer, tags } = props;
3907
3909
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "splash-screen m-t-5", children: [
3908
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TopBar, { back, toolbar }),
3910
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TopBar, { back, toolbar, tags }),
3909
3911
  title || description ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(StepHeader, { title, description, tags }) }) : void 0,
3910
3912
  children,
3911
3913
  /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(StepFooter, { footer, tags })
@@ -3922,7 +3924,7 @@ var StepRenderer = {
3922
3924
  function StepRendererComponent(props) {
3923
3925
  const { back, description, error, title, children, toolbar, footer, tags } = props;
3924
3926
  return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { children: [
3925
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TopBar, { back, toolbar }),
3927
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TopBar, { back, toolbar, tags }),
3926
3928
  title || description ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(StepHeader, { title, description, tags }) }) : void 0,
3927
3929
  error ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components58.Alert, { type: "negative", className: "m-b-2", message: error }) : null,
3928
3930
  children,
package/build/main.mjs CHANGED
@@ -123,7 +123,7 @@ import { useDynamicFlow } from "@wise/dynamic-flow-client";
123
123
  // src/dynamicFlow/telemetry/app-version.ts
124
124
  var appVersion = (
125
125
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
126
- typeof process !== "undefined" ? "5.16.1" : "0.0.0"
126
+ typeof process !== "undefined" ? "5.17.0" : "0.0.0"
127
127
  );
128
128
 
129
129
  // src/dynamicFlow/context-menu/useContextMenu.tsx
@@ -3855,9 +3855,11 @@ var getIconButtonPriority = (control) => {
3855
3855
 
3856
3856
  // ../renderers/src/step/topbar/TopBar.tsx
3857
3857
  import { jsx as jsx81, jsxs as jsxs30 } from "react/jsx-runtime";
3858
- function TopBar({ back, toolbar }) {
3859
- return back || toolbar ? /* @__PURE__ */ jsxs30("div", { className: "d-flex m-b-2", children: [
3860
- back ? /* @__PURE__ */ jsx81(BackButton, __spreadValues({}, back)) : null,
3858
+ function TopBar({ back, toolbar, tags }) {
3859
+ const isBackAllowed = !(tags == null ? void 0 : tags.includes("non-dismissible"));
3860
+ const backCTA = isBackAllowed ? back : void 0;
3861
+ return backCTA || toolbar ? /* @__PURE__ */ jsxs30("div", { className: "d-flex m-b-2", children: [
3862
+ backCTA ? /* @__PURE__ */ jsx81(BackButton, __spreadValues({}, backCTA)) : null,
3861
3863
  toolbar ? /* @__PURE__ */ jsx81(Toolbar, __spreadValues({}, toolbar)) : null
3862
3864
  ] }) : null;
3863
3865
  }
@@ -3873,7 +3875,7 @@ function SplashCelebrationStepRendererComponent(props) {
3873
3875
  const { back, title, description, toolbar, children, footer, tags, trackEvent } = props;
3874
3876
  useCustomTheme("forest-green", trackEvent);
3875
3877
  return /* @__PURE__ */ jsxs31("div", { className: "splash-screen m-t-5", children: [
3876
- /* @__PURE__ */ jsx82(TopBar, { back, toolbar }),
3878
+ /* @__PURE__ */ jsx82(TopBar, { back, toolbar, tags }),
3877
3879
  title || description ? /* @__PURE__ */ jsx82("div", { className: "m-b-4", children: /* @__PURE__ */ jsx82(StepHeader, { title, description, tags }) }) : void 0,
3878
3880
  children,
3879
3881
  /* @__PURE__ */ jsx82(StepFooter, { footer, tags })
@@ -3890,7 +3892,7 @@ var SplashStepRenderer = {
3890
3892
  function SplashStepRendererComponent(props) {
3891
3893
  const { back, title, description, toolbar, children, footer, tags } = props;
3892
3894
  return /* @__PURE__ */ jsxs32("div", { className: "splash-screen m-t-5", children: [
3893
- /* @__PURE__ */ jsx83(TopBar, { back, toolbar }),
3895
+ /* @__PURE__ */ jsx83(TopBar, { back, toolbar, tags }),
3894
3896
  title || description ? /* @__PURE__ */ jsx83("div", { className: "m-b-4", children: /* @__PURE__ */ jsx83(StepHeader, { title, description, tags }) }) : void 0,
3895
3897
  children,
3896
3898
  /* @__PURE__ */ jsx83(StepFooter, { footer, tags })
@@ -3907,7 +3909,7 @@ var StepRenderer = {
3907
3909
  function StepRendererComponent(props) {
3908
3910
  const { back, description, error, title, children, toolbar, footer, tags } = props;
3909
3911
  return /* @__PURE__ */ jsxs33("div", { children: [
3910
- /* @__PURE__ */ jsx84(TopBar, { back, toolbar }),
3912
+ /* @__PURE__ */ jsx84(TopBar, { back, toolbar, tags }),
3911
3913
  title || description ? /* @__PURE__ */ jsx84("div", { className: "m-b-4", children: /* @__PURE__ */ jsx84(StepHeader, { title, description, tags }) }) : void 0,
3912
3914
  error ? /* @__PURE__ */ jsx84(Alert2, { type: "negative", className: "m-b-2", message: error }) : null,
3913
3915
  children,