@wise/dynamic-flow-client-internal 4.24.1-experimental-5566f24 → 4.25.0-experimental-5356389

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.mjs CHANGED
@@ -272,7 +272,6 @@ function Help({ help, onClick }) {
272
272
  return /* @__PURE__ */ jsx5(
273
273
  Info,
274
274
  {
275
- className: "m-l-1",
276
275
  content: /* @__PURE__ */ jsx5(Markdown, { config: { link: { target: "_blank" } }, children: help }),
277
276
  presentation: "POPOVER",
278
277
  size: "sm",
@@ -489,86 +488,6 @@ var DateInputRenderer = {
489
488
  var DateInputRenderer_default = DateInputRenderer;
490
489
 
491
490
  // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
492
- import { Header as Header2, SearchInput } from "@transferwise/components";
493
- import { useIntl as useIntl4 } from "react-intl";
494
-
495
- // ../renderers/src/messages/decision.messages.ts
496
- import { defineMessages as defineMessages3 } from "react-intl";
497
- var decision_messages_default = defineMessages3({
498
- all: {
499
- id: "df.wise.Decision.all",
500
- defaultMessage: "All",
501
- description: "Label for the group of options that encompasses all options"
502
- },
503
- popular: {
504
- id: "df.wise.Decision.popular",
505
- defaultMessage: "Popular",
506
- description: "Label for the group of options that are tagged as popular"
507
- },
508
- recent: {
509
- id: "df.wise.Decision.recent",
510
- defaultMessage: "Recent",
511
- description: "Label for the group of options that are tagged as recent"
512
- },
513
- filterPlaceholder: {
514
- id: "df.wise.Decision.filterPlaceholder",
515
- defaultMessage: "Start typing to search",
516
- description: "Placeholder for the filter input"
517
- },
518
- results: {
519
- id: "df.wise.Decision.results",
520
- defaultMessage: "Search results",
521
- description: "Label for the results section"
522
- },
523
- noResults: {
524
- id: "df.wise.Decision.noResults",
525
- defaultMessage: "No results",
526
- description: "Message for if there are no results"
527
- }
528
- });
529
-
530
- // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
531
- import { useState as useState3 } from "react";
532
-
533
- // ../renderers/src/DecisionRenderer/filter-and-sort-decision-options.ts
534
- function filterAndSortDecisionOptions(selectOptions, query) {
535
- const upperQuery = query.toUpperCase().trim();
536
- const filteredItems = selectOptions.filter((option) => {
537
- var _a, _b, _c, _d;
538
- const searchableWords = [
539
- option.title,
540
- option.description,
541
- option.additionalText,
542
- (_a = option.supportingValues) == null ? void 0 : _a.value,
543
- (_b = option.supportingValues) == null ? void 0 : _b.subvalue,
544
- ...(_c = option.keywords) != null ? _c : []
545
- ];
546
- return (_d = searchableWords.some((word) => word == null ? void 0 : word.toUpperCase().includes(upperQuery))) != null ? _d : false;
547
- });
548
- return [...filteredItems].sort((a, b) => {
549
- const aTitleUpper = a.title.toUpperCase();
550
- const bTitleUpper = b.title.toUpperCase();
551
- const aTitleStarts = aTitleUpper.startsWith(upperQuery);
552
- const bTitleStarts = bTitleUpper.startsWith(upperQuery);
553
- if (aTitleStarts && !bTitleStarts) {
554
- return -1;
555
- }
556
- if (!aTitleStarts && bTitleStarts) {
557
- return 1;
558
- }
559
- const aWordStarts = aTitleUpper.split(" ").some((word) => word.startsWith(upperQuery));
560
- const bWordStarts = bTitleUpper.split(" ").some((word) => word.startsWith(upperQuery));
561
- if (aWordStarts && !bWordStarts) {
562
- return -1;
563
- }
564
- if (!aWordStarts && bWordStarts) {
565
- return 1;
566
- }
567
- return a.title.localeCompare(b.title);
568
- });
569
- }
570
-
571
- // ../renderers/src/DecisionRenderer/DecisionList.tsx
572
491
  import { NavigationOption, NavigationOptionsList } from "@transferwise/components";
573
492
 
574
493
  // ../renderers/src/utils/UrnFlag.tsx
@@ -834,64 +753,71 @@ import { jsx as jsx22 } from "react/jsx-runtime";
834
753
  var getInlineMedia = (media) => media ? /* @__PURE__ */ jsx22(Media, { media, preferAvatar: false, size: 24 }) : null;
835
754
 
836
755
  // ../renderers/src/DecisionRenderer/DecisionList.tsx
837
- import { jsx as jsx23 } from "react/jsx-runtime";
838
- var DecisionList = ({
839
- options,
840
- control,
841
- className
842
- }) => {
843
- return /* @__PURE__ */ jsx23("div", { className, children: /* @__PURE__ */ jsx23(NavigationOptionsList, { children: options.map((option) => {
844
- const { description, disabled, media, title: itemTitle, tag, onClick } = option;
845
- return /* @__PURE__ */ jsx23(
846
- NavigationOption,
847
- {
848
- title: itemTitle,
849
- content: description,
850
- disabled,
851
- media: media ? /* @__PURE__ */ jsx23(
852
- OptionMedia,
853
- {
854
- media,
855
- preferAvatar: control === "with-avatar" || tag === "with-avatar"
856
- }
857
- ) : null,
858
- showMediaCircle: false,
859
- showMediaAtAllSizes: true,
860
- onClick
861
- },
862
- JSON.stringify(option)
863
- );
864
- }) }) });
865
- };
866
- var DecisionList_default = DecisionList;
756
+ import { Header as Header2, SearchInput } from "@transferwise/components";
867
757
 
868
758
  // ../renderers/src/DecisionRenderer/GroupedList.tsx
869
759
  import { Header, Section } from "@transferwise/components";
870
760
  import { useIntl as useIntl3 } from "react-intl";
871
- import { Fragment, jsx as jsx24, jsxs as jsxs4 } from "react/jsx-runtime";
761
+
762
+ // ../renderers/src/messages/decision.messages.ts
763
+ import { defineMessages as defineMessages3 } from "react-intl";
764
+ var decision_messages_default = defineMessages3({
765
+ all: {
766
+ id: "df.wise.Decision.all",
767
+ defaultMessage: "All",
768
+ description: "Label for the group of options that encompasses all options"
769
+ },
770
+ popular: {
771
+ id: "df.wise.Decision.popular",
772
+ defaultMessage: "Popular",
773
+ description: "Label for the group of options that are tagged as popular"
774
+ },
775
+ recent: {
776
+ id: "df.wise.Decision.recent",
777
+ defaultMessage: "Recent",
778
+ description: "Label for the group of options that are tagged as recent"
779
+ },
780
+ filterPlaceholder: {
781
+ id: "df.wise.Decision.filterPlaceholder",
782
+ defaultMessage: "Start typing to search",
783
+ description: "Placeholder for the filter input"
784
+ },
785
+ results: {
786
+ id: "df.wise.Decision.results",
787
+ defaultMessage: "Search results",
788
+ description: "Label for the results section"
789
+ },
790
+ noResults: {
791
+ id: "df.wise.Decision.noResults",
792
+ defaultMessage: "No results",
793
+ description: "Message for if there are no results"
794
+ }
795
+ });
796
+
797
+ // ../renderers/src/DecisionRenderer/GroupedList.tsx
798
+ import { Fragment, jsx as jsx23, jsxs as jsxs4 } from "react/jsx-runtime";
872
799
  var OPTION_GROUPS = {
873
800
  popular: "popular",
874
801
  recent: "recent"
875
802
  };
876
- var GroupedList = ({
877
- options,
878
- control
879
- }) => {
803
+ var GroupedList = (_a) => {
804
+ var _b = _a, { renderDecisionList: renderDecisionList3 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
880
805
  const { formatMessage } = useIntl3();
806
+ const { options } = rest;
881
807
  const popularOptions = options.filter((option) => option.tag === OPTION_GROUPS.popular);
882
808
  const recentOptions = options.filter((option) => option.tag === OPTION_GROUPS.recent);
883
809
  return /* @__PURE__ */ jsxs4(Fragment, { children: [
884
810
  popularOptions.length > 0 ? /* @__PURE__ */ jsxs4(Section, { children: [
885
- /* @__PURE__ */ jsx24(Header, { as: "h2", title: formatMessage(decision_messages_default.popular) }),
886
- /* @__PURE__ */ jsx24(DecisionList_default, { options: popularOptions, control })
811
+ /* @__PURE__ */ jsx23(Header, { as: "h2", title: formatMessage(decision_messages_default.popular) }),
812
+ renderDecisionList3(__spreadProps(__spreadValues({}, rest), { options: popularOptions }))
887
813
  ] }) : null,
888
814
  recentOptions.length > 0 ? /* @__PURE__ */ jsxs4(Section, { children: [
889
- /* @__PURE__ */ jsx24(Header, { as: "h2", title: formatMessage(decision_messages_default.recent) }),
890
- /* @__PURE__ */ jsx24(DecisionList_default, { options: recentOptions, control })
815
+ /* @__PURE__ */ jsx23(Header, { as: "h2", title: formatMessage(decision_messages_default.recent) }),
816
+ renderDecisionList3(__spreadProps(__spreadValues({}, rest), { options: recentOptions }))
891
817
  ] }) : null,
892
818
  /* @__PURE__ */ jsxs4(Section, { children: [
893
- /* @__PURE__ */ jsx24(Header, { as: "h2", title: formatMessage(decision_messages_default.all) }),
894
- /* @__PURE__ */ jsx24(DecisionList_default, { options, control })
819
+ /* @__PURE__ */ jsx23(Header, { as: "h2", title: formatMessage(decision_messages_default.all) }),
820
+ renderDecisionList3(rest)
895
821
  ] })
896
822
  ] });
897
823
  };
@@ -900,25 +826,68 @@ var isGroupedDecision = (options) => {
900
826
  return options.some(({ tag }) => tag && possibleGroups.includes(tag));
901
827
  };
902
828
 
903
- // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
904
- import { Fragment as Fragment2, jsx as jsx25, jsxs as jsxs5 } from "react/jsx-runtime";
905
- var DecisionRenderer = {
906
- canRenderType: "decision",
907
- render: (props) => {
908
- return /* @__PURE__ */ jsxs5("div", { className: getMargin(props.margin), children: [
909
- props.title && /* @__PURE__ */ jsx25(Header2, { as: "h2", title: props.title }),
910
- props.control === "filtered" ? /* @__PURE__ */ jsx25(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsx25(UnfilteredDecisionList, __spreadValues({}, props))
911
- ] });
912
- }
829
+ // ../renderers/src/DecisionRenderer/DecisionList.tsx
830
+ import { useIntl as useIntl4 } from "react-intl";
831
+ import { useState as useState3 } from "react";
832
+
833
+ // ../renderers/src/DecisionRenderer/filter-and-sort-decision-options.ts
834
+ function filterAndSortDecisionOptions(selectOptions, query) {
835
+ const upperQuery = query.toUpperCase().trim();
836
+ const filteredItems = selectOptions.filter((option) => {
837
+ var _a, _b, _c, _d;
838
+ const searchableWords = [
839
+ option.title,
840
+ option.description,
841
+ option.additionalText,
842
+ (_a = option.supportingValues) == null ? void 0 : _a.value,
843
+ (_b = option.supportingValues) == null ? void 0 : _b.subvalue,
844
+ ...(_c = option.keywords) != null ? _c : []
845
+ ];
846
+ return (_d = searchableWords.some((word) => word == null ? void 0 : word.toUpperCase().includes(upperQuery))) != null ? _d : false;
847
+ });
848
+ return [...filteredItems].sort((a, b) => {
849
+ const aTitleUpper = a.title.toUpperCase();
850
+ const bTitleUpper = b.title.toUpperCase();
851
+ const aTitleStarts = aTitleUpper.startsWith(upperQuery);
852
+ const bTitleStarts = bTitleUpper.startsWith(upperQuery);
853
+ if (aTitleStarts && !bTitleStarts) {
854
+ return -1;
855
+ }
856
+ if (!aTitleStarts && bTitleStarts) {
857
+ return 1;
858
+ }
859
+ const aWordStarts = aTitleUpper.split(" ").some((word) => word.startsWith(upperQuery));
860
+ const bWordStarts = bTitleUpper.split(" ").some((word) => word.startsWith(upperQuery));
861
+ if (aWordStarts && !bWordStarts) {
862
+ return -1;
863
+ }
864
+ if (!aWordStarts && bWordStarts) {
865
+ return 1;
866
+ }
867
+ return a.title.localeCompare(b.title);
868
+ });
869
+ }
870
+
871
+ // ../renderers/src/DecisionRenderer/DecisionList.tsx
872
+ import { Fragment as Fragment2, jsx as jsx24, jsxs as jsxs5 } from "react/jsx-runtime";
873
+ var DecisionWrapper = (props) => {
874
+ return /* @__PURE__ */ jsxs5("div", { className: getMargin(props.margin), children: [
875
+ props.title && /* @__PURE__ */ jsx24(Header2, { as: "h2", title: props.title }),
876
+ props.control === "filtered" ? /* @__PURE__ */ jsx24(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsx24(UnfilteredDecisionList, __spreadValues({}, props))
877
+ ] });
878
+ };
879
+ var UnfilteredDecisionList = (_a) => {
880
+ var _b = _a, { renderDecisionList: renderDecisionList3 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
881
+ return isGroupedDecision(rest.options) ? /* @__PURE__ */ jsx24(GroupedList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList3 })) : renderDecisionList3(rest);
913
882
  };
914
- var UnfilteredDecisionList = ({ control, options }) => isGroupedDecision(options) ? /* @__PURE__ */ jsx25(GroupedList, { options, control }) : /* @__PURE__ */ jsx25(DecisionList_default, { options, control });
915
- var FilteredDecisionList = ({ options, control }) => {
883
+ var FilteredDecisionList = (props) => {
916
884
  const { formatMessage } = useIntl4();
917
885
  const [query, setQuery] = useState3("");
886
+ const { control, options, renderDecisionList: renderDecisionList3 } = props;
918
887
  const filteredOptions = filterAndSortDecisionOptions(options, query);
919
888
  const isGrouped = isGroupedDecision(options);
920
889
  return /* @__PURE__ */ jsxs5(Fragment2, { children: [
921
- /* @__PURE__ */ jsx25(
890
+ /* @__PURE__ */ jsx24(
922
891
  SearchInput,
923
892
  {
924
893
  placeholder: formatMessage(decision_messages_default.filterPlaceholder),
@@ -929,19 +898,49 @@ var FilteredDecisionList = ({ options, control }) => {
929
898
  }
930
899
  }
931
900
  ),
932
- isGrouped && query.length === 0 ? /* @__PURE__ */ jsx25(GroupedList, { options, control }) : /* @__PURE__ */ jsxs5(Fragment2, { children: [
933
- query.length > 0 && /* @__PURE__ */ jsx25(Header2, { as: "h2", title: formatMessage(decision_messages_default.results), className: "m-t-4" }),
934
- filteredOptions.length > 0 ? /* @__PURE__ */ jsx25(
935
- DecisionList_default,
936
- {
937
- options: filteredOptions,
938
- control,
939
- className: query.length === 0 ? "m-t-3" : ""
940
- }
941
- ) : /* @__PURE__ */ jsx25("p", { children: formatMessage(decision_messages_default.noResults) })
901
+ isGrouped && query.length === 0 ? /* @__PURE__ */ jsx24(GroupedList, __spreadValues({}, props)) : /* @__PURE__ */ jsxs5(Fragment2, { children: [
902
+ query.length > 0 && /* @__PURE__ */ jsx24(Header2, { as: "h2", title: formatMessage(decision_messages_default.results), className: "m-t-4" }),
903
+ filteredOptions.length > 0 ? renderDecisionList3({
904
+ control,
905
+ className: query.length === 0 ? "m-t-3" : "",
906
+ options: filteredOptions
907
+ }) : /* @__PURE__ */ jsx24("p", { children: formatMessage(decision_messages_default.noResults) })
942
908
  ] })
943
909
  ] });
944
910
  };
911
+
912
+ // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
913
+ import { jsx as jsx25 } from "react/jsx-runtime";
914
+ var DecisionRenderer = {
915
+ canRenderType: "decision",
916
+ render: (props) => {
917
+ return /* @__PURE__ */ jsx25(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }));
918
+ }
919
+ };
920
+ var renderDecisionList = ({ options, className, control }) => {
921
+ return /* @__PURE__ */ jsx25("div", { className, children: /* @__PURE__ */ jsx25(NavigationOptionsList, { children: options.map((option) => {
922
+ const { description, disabled, media, title: itemTitle, tag, onClick } = option;
923
+ return /* @__PURE__ */ jsx25(
924
+ NavigationOption,
925
+ {
926
+ title: itemTitle,
927
+ content: description,
928
+ disabled,
929
+ media: media ? /* @__PURE__ */ jsx25(
930
+ OptionMedia,
931
+ {
932
+ media,
933
+ preferAvatar: control === "with-avatar" || tag === "with-avatar"
934
+ }
935
+ ) : null,
936
+ showMediaCircle: false,
937
+ showMediaAtAllSizes: true,
938
+ onClick
939
+ },
940
+ JSON.stringify(option)
941
+ );
942
+ }) }) });
943
+ };
945
944
  var DecisionRenderer_default = DecisionRenderer;
946
945
 
947
946
  // ../renderers/src/DividerRenderer.tsx
@@ -2065,11 +2064,10 @@ var ReviewRenderer = {
2065
2064
  definitions: fields.map(
2066
2065
  ({ label, value, help, analyticsId: fieldAnalyticsId }, index) => ({
2067
2066
  key: String(index),
2068
- title: label,
2069
- value: getFieldValue(
2070
- value,
2067
+ value,
2068
+ title: getFieldLabel(
2069
+ label,
2071
2070
  help,
2072
- orientation,
2073
2071
  () => trackEvent("Help Pressed", { layoutItemId: fieldAnalyticsId })
2074
2072
  )
2075
2073
  })
@@ -2095,19 +2093,15 @@ var mapControlToDefinitionListLayout = (control) => {
2095
2093
  return "VERTICAL_ONE_COLUMN";
2096
2094
  }
2097
2095
  };
2098
- var getFieldValue = (value, help, orientation, onClick) => {
2096
+ var getFieldLabel = (label, help, onClick) => {
2099
2097
  if (help) {
2100
- return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs14(Fragment5, { children: [
2101
- /* @__PURE__ */ jsx51(Help_default, { help, onClick }),
2102
- " ",
2103
- value
2104
- ] }) : /* @__PURE__ */ jsxs14(Fragment5, { children: [
2105
- value,
2098
+ return /* @__PURE__ */ jsxs14(Fragment5, { children: [
2099
+ label,
2106
2100
  " ",
2107
2101
  /* @__PURE__ */ jsx51(Help_default, { help, onClick })
2108
2102
  ] });
2109
2103
  }
2110
- return value;
2104
+ return label;
2111
2105
  };
2112
2106
 
2113
2107
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
@@ -3121,7 +3115,237 @@ var LargeUploadRenderer = {
3121
3115
  }
3122
3116
  };
3123
3117
 
3118
+ // ../renderers/src/NewListItem/NewDecisionRenderer.tsx
3119
+ import { ListItem as ListItem3 } from "@transferwise/components";
3120
+
3121
+ // ../renderers/src/NewListItem/getInlineAlert.tsx
3122
+ import { ListItem } from "@transferwise/components";
3123
+ import { jsx as jsx73 } from "react/jsx-runtime";
3124
+ var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ jsx73(ListItem.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
3125
+
3126
+ // ../renderers/src/NewListItem/getMedia.tsx
3127
+ import { jsx as jsx74 } from "react/jsx-runtime";
3128
+ var getMedia = (media, preferAvatar) => media ? /* @__PURE__ */ jsx74(OptionMedia, { media, preferAvatar }) : void 0;
3129
+
3130
+ // ../renderers/src/NewListItem/getAdditionalInfo.tsx
3131
+ import { ListItem as ListItem2 } from "@transferwise/components";
3132
+ import { jsx as jsx75 } from "react/jsx-runtime";
3133
+ var getAdditionalInfo = (additionalInfo) => {
3134
+ if (!additionalInfo) {
3135
+ return void 0;
3136
+ }
3137
+ const { href, text, onClick } = additionalInfo;
3138
+ if (href || onClick) {
3139
+ return /* @__PURE__ */ jsx75(
3140
+ ListItem2.AdditionalInfo,
3141
+ {
3142
+ action: {
3143
+ label: text,
3144
+ href,
3145
+ onClick,
3146
+ target: "_blank"
3147
+ }
3148
+ }
3149
+ );
3150
+ }
3151
+ return /* @__PURE__ */ jsx75(ListItem2.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
3152
+ };
3153
+
3154
+ // ../renderers/src/NewListItem/NewDecisionRenderer.tsx
3155
+ import { Fragment as Fragment12, jsx as jsx76 } from "react/jsx-runtime";
3156
+ var DecisionRenderer2 = {
3157
+ canRenderType: "decision",
3158
+ render: (props) => /* @__PURE__ */ jsx76(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList: renderDecisionList2 }))
3159
+ };
3160
+ var renderDecisionList2 = ({ options, control }) => {
3161
+ return /* @__PURE__ */ jsx76(Fragment12, { children: options.map((option) => {
3162
+ const {
3163
+ description,
3164
+ disabled,
3165
+ media,
3166
+ title: itemTitle,
3167
+ tag,
3168
+ href,
3169
+ additionalText,
3170
+ inlineAlert,
3171
+ supportingValues,
3172
+ onClick
3173
+ } = option;
3174
+ return /* @__PURE__ */ jsx76(
3175
+ ListItem3,
3176
+ {
3177
+ title: itemTitle,
3178
+ subtitle: description,
3179
+ spotlight: control === "spotlight" ? tag === "spotlight-active" ? "active" : "inactive" : void 0,
3180
+ disabled,
3181
+ valueTitle: supportingValues == null ? void 0 : supportingValues.value,
3182
+ valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
3183
+ media: getMedia(media, control === "with-avatar" || tag === "with-avatar"),
3184
+ prompt: getInlineAlert(inlineAlert),
3185
+ additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
3186
+ control: href ? /* @__PURE__ */ jsx76(ListItem3.Navigation, { href, target: "_blank" }) : /* @__PURE__ */ jsx76(ListItem3.Navigation, { onClick })
3187
+ },
3188
+ JSON.stringify(option)
3189
+ );
3190
+ }) });
3191
+ };
3192
+ var NewDecisionRenderer_default = DecisionRenderer2;
3193
+
3194
+ // ../renderers/src/NewListItem/NewListRenderer.tsx
3195
+ import { ListItem as ListItem4 } from "@transferwise/components";
3196
+ import { jsx as jsx77, jsxs as jsxs30 } from "react/jsx-runtime";
3197
+ var ListRenderer2 = {
3198
+ canRenderType: "list",
3199
+ render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ jsxs30("div", { className: getMargin(margin), children: [
3200
+ /* @__PURE__ */ jsx77(Header7, { title, callToAction }),
3201
+ items.map((item) => {
3202
+ const {
3203
+ title: itemTitle,
3204
+ description,
3205
+ supportingValues,
3206
+ media,
3207
+ tag,
3208
+ additionalInfo,
3209
+ inlineAlert
3210
+ } = item;
3211
+ return /* @__PURE__ */ jsx77(
3212
+ ListItem4,
3213
+ {
3214
+ title: itemTitle,
3215
+ subtitle: description,
3216
+ valueTitle: supportingValues == null ? void 0 : supportingValues.value,
3217
+ valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
3218
+ media: getMedia(media, control === "with-avatar" || tag === "with-avatar"),
3219
+ prompt: getInlineAlert(inlineAlert),
3220
+ additionalInfo: getAdditionalInfo(additionalInfo)
3221
+ },
3222
+ itemTitle
3223
+ );
3224
+ })
3225
+ ] })
3226
+ };
3227
+ var NewListRenderer_default = ListRenderer2;
3228
+
3229
+ // ../renderers/src/NewListItem/NewReviewRenderer.tsx
3230
+ import { ListItem as ListItem5, Popover } from "@transferwise/components";
3231
+ import { QuestionMarkCircle } from "@transferwise/icons";
3232
+ import { jsx as jsx78, jsxs as jsxs31 } from "react/jsx-runtime";
3233
+ var IGNORED_CONTROLS = [
3234
+ "horizontal",
3235
+ "horizontal-end-aligned",
3236
+ "horizontal-start-aligned",
3237
+ "vertical-two-column"
3238
+ ];
3239
+ var ReviewRenderer2 = {
3240
+ canRenderType: "review",
3241
+ canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
3242
+ render: ({ callToAction, control, margin, fields, title }) => /* @__PURE__ */ jsxs31("div", { className: getMargin(margin), children: [
3243
+ /* @__PURE__ */ jsx78(Header7, { title, callToAction }),
3244
+ fields.map((field) => {
3245
+ var _a;
3246
+ const {
3247
+ label,
3248
+ value,
3249
+ media,
3250
+ tag,
3251
+ additionalInfo,
3252
+ inlineAlert,
3253
+ help,
3254
+ callToAction: itemCallToAction
3255
+ } = field;
3256
+ return /* @__PURE__ */ jsx78(
3257
+ ListItem5,
3258
+ {
3259
+ title: value,
3260
+ subtitle: label,
3261
+ inverted: true,
3262
+ media: getMedia(media, control === "with-avatar" || tag === "with-avatar"),
3263
+ control: (_a = getCTAControl(itemCallToAction)) != null ? _a : getHelpControl(help),
3264
+ prompt: getInlineAlert(inlineAlert),
3265
+ additionalInfo: getAdditionalInfo(additionalInfo)
3266
+ },
3267
+ JSON.stringify(field)
3268
+ );
3269
+ })
3270
+ ] })
3271
+ };
3272
+ var getCTAControl = (callToAction) => {
3273
+ if (!callToAction) {
3274
+ return void 0;
3275
+ }
3276
+ const { accessibilityDescription, href, title, onClick } = callToAction;
3277
+ if (href) {
3278
+ return /* @__PURE__ */ jsx78(ListItem5.Button, { href, partiallyInteractive: true, "aria-description": accessibilityDescription, children: title });
3279
+ }
3280
+ return /* @__PURE__ */ jsx78(
3281
+ ListItem5.Button,
3282
+ {
3283
+ "aria-description": accessibilityDescription,
3284
+ partiallyInteractive: true,
3285
+ onClick,
3286
+ children: title
3287
+ }
3288
+ );
3289
+ };
3290
+ var getHelpControl = (help) => {
3291
+ if (!help) {
3292
+ return void 0;
3293
+ }
3294
+ return /* @__PURE__ */ jsx78(Popover, { content: help, children: /* @__PURE__ */ jsx78(ListItem5.IconButton, { partiallyInteractive: true, children: /* @__PURE__ */ jsx78(QuestionMarkCircle, {}) }) });
3295
+ };
3296
+ var NewReviewRenderer_default = ReviewRenderer2;
3297
+
3298
+ // ../renderers/src/NewListItem/NewStatusListRenderer.tsx
3299
+ import { AvatarView as AvatarView5, Header as Header10, ListItem as ListItem6 } from "@transferwise/components";
3300
+ import { jsx as jsx79, jsxs as jsxs32 } from "react/jsx-runtime";
3301
+ var NewStatusListRenderer = {
3302
+ canRenderType: "status-list",
3303
+ render: ({ margin, items, title }) => /* @__PURE__ */ jsxs32("div", { className: getMargin(margin), children: [
3304
+ title ? /* @__PURE__ */ jsx79(Header10, { title, className: "m-b-2" }) : null,
3305
+ items.map((item) => {
3306
+ const { callToAction, description, icon, status, title: itemTitle } = item;
3307
+ return /* @__PURE__ */ jsx79(
3308
+ ListItem6,
3309
+ {
3310
+ title: itemTitle,
3311
+ subtitle: description,
3312
+ media: icon && "name" in icon ? /* @__PURE__ */ jsx79(AvatarView5, { badge: { status: mapStatus2(status) }, children: /* @__PURE__ */ jsx79(DynamicIcon_default, { name: icon.name }) }) : void 0,
3313
+ additionalInfo: callToAction ? /* @__PURE__ */ jsx79(
3314
+ ListItem6.AdditionalInfo,
3315
+ {
3316
+ action: {
3317
+ href: callToAction.href,
3318
+ onClick: callToAction.href ? void 0 : callToAction.onClick,
3319
+ label: callToAction.title,
3320
+ target: "_blank"
3321
+ }
3322
+ }
3323
+ ) : void 0
3324
+ },
3325
+ JSON.stringify(item)
3326
+ );
3327
+ })
3328
+ ] })
3329
+ };
3330
+ var mapStatus2 = (status) => {
3331
+ switch (status) {
3332
+ case "done":
3333
+ return "positive";
3334
+ case "pending":
3335
+ return "pending";
3336
+ default:
3337
+ return void 0;
3338
+ }
3339
+ };
3340
+ var NewStatusListRenderer_default = NewStatusListRenderer;
3341
+
3124
3342
  // ../renderers/src/getWiseRenderers.ts
3343
+ var listItemRenderers = [
3344
+ NewDecisionRenderer_default,
3345
+ NewListRenderer_default,
3346
+ NewReviewRenderer_default,
3347
+ NewStatusListRenderer_default
3348
+ ];
3125
3349
  var getWiseRenderers = () => [
3126
3350
  AddressValidationButtonRenderer_default,
3127
3351
  AlertRenderer_default,
@@ -3166,7 +3390,12 @@ var getWiseRenderers = () => [
3166
3390
  // ../renderers/src/ButtonRenderer/ButtonRendererV2.tsx
3167
3391
  import { Button as Button8 } from "@transferwise/components";
3168
3392
  import { useEffect as useEffect8, useState as useState12 } from "react";
3169
- import { jsx as jsx73 } from "react/jsx-runtime";
3393
+ import { jsx as jsx80 } from "react/jsx-runtime";
3394
+
3395
+ // src/dynamicFlow/renderers.ts
3396
+ var Header11 = Header7;
3397
+ var getMargin2 = getMargin;
3398
+ var getListItemRenderers = () => listItemRenderers;
3170
3399
 
3171
3400
  // src/i18n/index.ts
3172
3401
  import { translations as coreTranslations } from "@wise/dynamic-flow-client";
@@ -4061,12 +4290,12 @@ var messages_default = defineMessages10({
4061
4290
  });
4062
4291
 
4063
4292
  // src/dynamicFlow/DynamicFlow.tsx
4064
- import { jsx as jsx74 } from "react/jsx-runtime";
4293
+ import { jsx as jsx81 } from "react/jsx-runtime";
4065
4294
  var wiseRenderers = getWiseRenderers();
4066
4295
  function DynamicFlowLegacy(props) {
4067
4296
  const { customFetch = globalThis.fetch } = props;
4068
4297
  const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
4069
- return /* @__PURE__ */ jsx74(DynamicFlowCoreLegacy, __spreadValues({}, coreProps));
4298
+ return /* @__PURE__ */ jsx81(DynamicFlowCoreLegacy, __spreadValues({}, coreProps));
4070
4299
  }
4071
4300
  function DynamicFlowRevamp(props) {
4072
4301
  const {
@@ -4103,7 +4332,7 @@ function DynamicFlowRevamp(props) {
4103
4332
  onLink,
4104
4333
  onCopy
4105
4334
  });
4106
- return /* @__PURE__ */ jsx74("div", { className, children: /* @__PURE__ */ jsx74(DynamicFlowCoreRevamp, __spreadValues({}, coreProps)) });
4335
+ return /* @__PURE__ */ jsx81("div", { className, children: /* @__PURE__ */ jsx81(DynamicFlowCoreRevamp, __spreadValues({}, coreProps)) });
4107
4336
  }
4108
4337
  var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
4109
4338
  const {
@@ -4140,7 +4369,7 @@ var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
4140
4369
  onLink,
4141
4370
  onCopy
4142
4371
  });
4143
- return /* @__PURE__ */ jsx74("div", { className, children: /* @__PURE__ */ jsx74(DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref })) });
4372
+ return /* @__PURE__ */ jsx81("div", { className, children: /* @__PURE__ */ jsx81(DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref })) });
4144
4373
  });
4145
4374
  var useWiseHttpClient = (httpClient) => {
4146
4375
  const { locale } = useIntl12();
@@ -4171,10 +4400,11 @@ export {
4171
4400
  DynamicFlowLegacy,
4172
4401
  DynamicFlowRevamp,
4173
4402
  DynamicForm,
4174
- Header7 as Header,
4403
+ Header11 as Header,
4175
4404
  JsonSchemaForm,
4176
4405
  findRendererPropsByType,
4177
- getMargin,
4406
+ getListItemRenderers,
4407
+ getMargin2 as getMargin,
4178
4408
  isValidSchema,
4179
4409
  makeHttpClient as makeCustomFetch,
4180
4410
  i18n_default as translations