@wise/dynamic-flow-client-internal 5.16.0 → 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.0" : "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
@@ -3630,7 +3630,7 @@ var StatusListRenderer = {
3630
3630
  {
3631
3631
  title: itemTitle,
3632
3632
  subtitle: description,
3633
- media: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_components53.AvatarView, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(DynamicIcon_default, { name: icon.name }) }) : void 0,
3633
+ media: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(StatusListItemMedia, __spreadValues({}, item)),
3634
3634
  additionalInfo: callToAction ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3635
3635
  import_components53.ListItem.AdditionalInfo,
3636
3636
  {
@@ -3648,6 +3648,18 @@ var StatusListRenderer = {
3648
3648
  })
3649
3649
  ] })
3650
3650
  };
3651
+ var StatusListItemMedia = ({ icon, status }) => {
3652
+ if (!icon) {
3653
+ return void 0;
3654
+ }
3655
+ if ("name" in icon) {
3656
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_components53.AvatarView, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(DynamicIcon_default, { name: icon.name }) });
3657
+ }
3658
+ if ("text" in icon) {
3659
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_components53.AvatarView, { badge: { status: mapStatus(status) }, children: icon.text });
3660
+ }
3661
+ return void 0;
3662
+ };
3651
3663
  var mapStatus = (status) => {
3652
3664
  switch (status) {
3653
3665
  case "done":
@@ -3858,9 +3870,11 @@ var getIconButtonPriority = (control) => {
3858
3870
 
3859
3871
  // ../renderers/src/step/topbar/TopBar.tsx
3860
3872
  var import_jsx_runtime81 = require("react/jsx-runtime");
3861
- function TopBar({ back, toolbar }) {
3862
- return back || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "d-flex m-b-2", children: [
3863
- 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,
3864
3878
  toolbar ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Toolbar, __spreadValues({}, toolbar)) : null
3865
3879
  ] }) : null;
3866
3880
  }
@@ -3876,7 +3890,7 @@ function SplashCelebrationStepRendererComponent(props) {
3876
3890
  const { back, title, description, toolbar, children, footer, tags, trackEvent } = props;
3877
3891
  useCustomTheme("forest-green", trackEvent);
3878
3892
  return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "splash-screen m-t-5", children: [
3879
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TopBar, { back, toolbar }),
3893
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TopBar, { back, toolbar, tags }),
3880
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,
3881
3895
  children,
3882
3896
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(StepFooter, { footer, tags })
@@ -3893,7 +3907,7 @@ var SplashStepRenderer = {
3893
3907
  function SplashStepRendererComponent(props) {
3894
3908
  const { back, title, description, toolbar, children, footer, tags } = props;
3895
3909
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "splash-screen m-t-5", children: [
3896
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TopBar, { back, toolbar }),
3910
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TopBar, { back, toolbar, tags }),
3897
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,
3898
3912
  children,
3899
3913
  /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(StepFooter, { footer, tags })
@@ -3910,7 +3924,7 @@ var StepRenderer = {
3910
3924
  function StepRendererComponent(props) {
3911
3925
  const { back, description, error, title, children, toolbar, footer, tags } = props;
3912
3926
  return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { children: [
3913
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TopBar, { back, toolbar }),
3927
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TopBar, { back, toolbar, tags }),
3914
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,
3915
3929
  error ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components58.Alert, { type: "negative", className: "m-b-2", message: error }) : null,
3916
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.0" : "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
@@ -3615,7 +3615,7 @@ var StatusListRenderer = {
3615
3615
  {
3616
3616
  title: itemTitle,
3617
3617
  subtitle: description,
3618
- media: icon && "name" in icon ? /* @__PURE__ */ jsx76(AvatarView4, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ jsx76(DynamicIcon_default, { name: icon.name }) }) : void 0,
3618
+ media: /* @__PURE__ */ jsx76(StatusListItemMedia, __spreadValues({}, item)),
3619
3619
  additionalInfo: callToAction ? /* @__PURE__ */ jsx76(
3620
3620
  ListItem12.AdditionalInfo,
3621
3621
  {
@@ -3633,6 +3633,18 @@ var StatusListRenderer = {
3633
3633
  })
3634
3634
  ] })
3635
3635
  };
3636
+ var StatusListItemMedia = ({ icon, status }) => {
3637
+ if (!icon) {
3638
+ return void 0;
3639
+ }
3640
+ if ("name" in icon) {
3641
+ return /* @__PURE__ */ jsx76(AvatarView4, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ jsx76(DynamicIcon_default, { name: icon.name }) });
3642
+ }
3643
+ if ("text" in icon) {
3644
+ return /* @__PURE__ */ jsx76(AvatarView4, { badge: { status: mapStatus(status) }, children: icon.text });
3645
+ }
3646
+ return void 0;
3647
+ };
3636
3648
  var mapStatus = (status) => {
3637
3649
  switch (status) {
3638
3650
  case "done":
@@ -3843,9 +3855,11 @@ var getIconButtonPriority = (control) => {
3843
3855
 
3844
3856
  // ../renderers/src/step/topbar/TopBar.tsx
3845
3857
  import { jsx as jsx81, jsxs as jsxs30 } from "react/jsx-runtime";
3846
- function TopBar({ back, toolbar }) {
3847
- return back || toolbar ? /* @__PURE__ */ jsxs30("div", { className: "d-flex m-b-2", children: [
3848
- 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,
3849
3863
  toolbar ? /* @__PURE__ */ jsx81(Toolbar, __spreadValues({}, toolbar)) : null
3850
3864
  ] }) : null;
3851
3865
  }
@@ -3861,7 +3875,7 @@ function SplashCelebrationStepRendererComponent(props) {
3861
3875
  const { back, title, description, toolbar, children, footer, tags, trackEvent } = props;
3862
3876
  useCustomTheme("forest-green", trackEvent);
3863
3877
  return /* @__PURE__ */ jsxs31("div", { className: "splash-screen m-t-5", children: [
3864
- /* @__PURE__ */ jsx82(TopBar, { back, toolbar }),
3878
+ /* @__PURE__ */ jsx82(TopBar, { back, toolbar, tags }),
3865
3879
  title || description ? /* @__PURE__ */ jsx82("div", { className: "m-b-4", children: /* @__PURE__ */ jsx82(StepHeader, { title, description, tags }) }) : void 0,
3866
3880
  children,
3867
3881
  /* @__PURE__ */ jsx82(StepFooter, { footer, tags })
@@ -3878,7 +3892,7 @@ var SplashStepRenderer = {
3878
3892
  function SplashStepRendererComponent(props) {
3879
3893
  const { back, title, description, toolbar, children, footer, tags } = props;
3880
3894
  return /* @__PURE__ */ jsxs32("div", { className: "splash-screen m-t-5", children: [
3881
- /* @__PURE__ */ jsx83(TopBar, { back, toolbar }),
3895
+ /* @__PURE__ */ jsx83(TopBar, { back, toolbar, tags }),
3882
3896
  title || description ? /* @__PURE__ */ jsx83("div", { className: "m-b-4", children: /* @__PURE__ */ jsx83(StepHeader, { title, description, tags }) }) : void 0,
3883
3897
  children,
3884
3898
  /* @__PURE__ */ jsx83(StepFooter, { footer, tags })
@@ -3895,7 +3909,7 @@ var StepRenderer = {
3895
3909
  function StepRendererComponent(props) {
3896
3910
  const { back, description, error, title, children, toolbar, footer, tags } = props;
3897
3911
  return /* @__PURE__ */ jsxs33("div", { children: [
3898
- /* @__PURE__ */ jsx84(TopBar, { back, toolbar }),
3912
+ /* @__PURE__ */ jsx84(TopBar, { back, toolbar, tags }),
3899
3913
  title || description ? /* @__PURE__ */ jsx84("div", { className: "m-b-4", children: /* @__PURE__ */ jsx84(StepHeader, { title, description, tags }) }) : void 0,
3900
3914
  error ? /* @__PURE__ */ jsx84(Alert2, { type: "negative", className: "m-b-2", message: error }) : null,
3901
3915
  children,