@wise/dynamic-flow-client-internal 5.25.2 → 5.25.3
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.css +7 -0
- package/build/main.js +394 -342
- package/build/main.mjs +367 -315
- package/build/tsconfig.types.tsbuildinfo +1 -1
- package/build/types/dynamicFlow/context-menu/useContextMenu.d.ts +2 -1
- package/build/types/dynamicFlow/context-menu/useContextMenu.d.ts.map +1 -1
- package/build/types/dynamicFlow/context-menu/useDFContextMenu.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/build/main.mjs
CHANGED
|
@@ -127,22 +127,27 @@ import { useDynamicFlow } from "@wise/dynamic-flow-client";
|
|
|
127
127
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
128
128
|
var appVersion = (
|
|
129
129
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
130
|
-
typeof process !== "undefined" ? "5.25.
|
|
130
|
+
typeof process !== "undefined" ? "5.25.3" : "0.0.0"
|
|
131
131
|
);
|
|
132
132
|
|
|
133
133
|
// src/dynamicFlow/context-menu/useContextMenu.tsx
|
|
134
134
|
import { useCallback, useEffect, useState } from "react";
|
|
135
135
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
136
|
-
function useContextMenu({
|
|
136
|
+
function useContextMenu({
|
|
137
|
+
title,
|
|
138
|
+
subtitle,
|
|
139
|
+
items
|
|
140
|
+
}) {
|
|
137
141
|
const { menuPosition, openMenuAt, closeMenu } = useMenuPosition();
|
|
138
142
|
const onContextMenu = (event) => {
|
|
139
|
-
if (items.length > 0) {
|
|
143
|
+
if (items.length > 0 && !event.shiftKey) {
|
|
140
144
|
event.preventDefault();
|
|
141
145
|
openMenuAt({ x: event.clientX, y: event.clientY });
|
|
142
146
|
}
|
|
143
147
|
};
|
|
144
148
|
const contextMenu = menuPosition ? /* @__PURE__ */ jsxs("div", { className: "df-context-menu", style: { top: menuPosition.y, left: menuPosition.x }, children: [
|
|
145
149
|
/* @__PURE__ */ jsx("div", { className: "menu-header", children: title }),
|
|
150
|
+
/* @__PURE__ */ jsx("div", { className: "menu-subtitle", children: subtitle }),
|
|
146
151
|
items.map(({ label, onClick }) => /* @__PURE__ */ jsx(
|
|
147
152
|
"button",
|
|
148
153
|
{
|
|
@@ -204,6 +209,7 @@ var useDFContextMenu = (controller) => {
|
|
|
204
209
|
};
|
|
205
210
|
return useContextMenu({
|
|
206
211
|
title: "DynamicFlow Menu (Dev/Staging only)",
|
|
212
|
+
subtitle: "Shift + right-click for browser menu",
|
|
207
213
|
items: isDevOrStaging() ? [
|
|
208
214
|
{
|
|
209
215
|
label: `DF client version: ${appVersion}`,
|
|
@@ -317,7 +323,7 @@ import { useMemo as useMemo3 } from "react";
|
|
|
317
323
|
import { getDynamicSubflowRenderer } from "@wise/dynamic-flow-client";
|
|
318
324
|
|
|
319
325
|
// ../renderers/src/AlertRenderer/AlertRenderer.tsx
|
|
320
|
-
import { useState as
|
|
326
|
+
import { useState as useState3 } from "react";
|
|
321
327
|
|
|
322
328
|
// ../renderers/src/AlertRenderer/ActionPromptComponent.tsx
|
|
323
329
|
import { ActionPrompt } from "@transferwise/components";
|
|
@@ -354,13 +360,13 @@ var isNamedIcon = (name) => {
|
|
|
354
360
|
const iconName = toCapitalisedCamelCase(name);
|
|
355
361
|
return Object.keys(icons).includes(iconName);
|
|
356
362
|
};
|
|
357
|
-
function NamedIcon({ name }) {
|
|
363
|
+
function NamedIcon({ name, size }) {
|
|
358
364
|
if (!isNamedIcon(name)) {
|
|
359
365
|
return null;
|
|
360
366
|
}
|
|
361
367
|
const iconName = toCapitalisedCamelCase(name);
|
|
362
368
|
const Icon = icons[iconName];
|
|
363
|
-
return /* @__PURE__ */ jsx4(Icon, { size: 24 });
|
|
369
|
+
return /* @__PURE__ */ jsx4(Icon, { size: size != null ? size : 24 });
|
|
364
370
|
}
|
|
365
371
|
var toCapitalisedCamelCase = (value) => value.split("-").map(capitaliseFirstChar).join("");
|
|
366
372
|
var capitaliseFirstChar = (value) => value.length === 0 ? "" : `${value[0].toUpperCase()}${value.slice(1)}`;
|
|
@@ -380,11 +386,14 @@ function isValidIconName(name) {
|
|
|
380
386
|
return isNamedIcon(name) || isFlagIcon(name);
|
|
381
387
|
}
|
|
382
388
|
function isValidIconUrn(uri) {
|
|
389
|
+
const name = extractIconNameFromUri(uri);
|
|
390
|
+
return !!name && isValidIconName(name);
|
|
391
|
+
}
|
|
392
|
+
function extractIconNameFromUri(uri) {
|
|
383
393
|
if (!uri.startsWith("urn:wise:icons:")) {
|
|
384
|
-
return
|
|
394
|
+
return void 0;
|
|
385
395
|
}
|
|
386
|
-
|
|
387
|
-
return isValidIconName(name);
|
|
396
|
+
return uri.replace("urn:wise:icons:", "").split("?")[0];
|
|
388
397
|
}
|
|
389
398
|
var DynamicIcon_default = DynamicIcon;
|
|
390
399
|
|
|
@@ -455,23 +464,23 @@ var formatColor = (color) => {
|
|
|
455
464
|
// ../renderers/src/components/Media/AvatarMedia.tsx
|
|
456
465
|
import { AvatarLayout, AvatarView } from "@transferwise/components";
|
|
457
466
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
467
|
+
var getRenderableAvatar = (avatar, size) => {
|
|
468
|
+
if (avatar.type === "text") {
|
|
469
|
+
return {
|
|
470
|
+
asset: avatar.text,
|
|
471
|
+
badge: avatar.badgeUri ? resolveMediaFromUri(avatar.badgeUri, 16) : void 0
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
return __spreadProps(__spreadValues({}, resolveMediaFromUri(avatar.uri, size)), {
|
|
475
|
+
badge: avatar.badgeUri ? resolveMediaFromUri(avatar.badgeUri, 16) : void 0
|
|
476
|
+
});
|
|
477
|
+
};
|
|
458
478
|
var AvatarMedia = ({
|
|
459
479
|
accessibilityDescription,
|
|
460
480
|
content,
|
|
461
481
|
size
|
|
462
482
|
}) => {
|
|
463
|
-
const
|
|
464
|
-
if (avatar.type === "text") {
|
|
465
|
-
return {
|
|
466
|
-
asset: avatar.text,
|
|
467
|
-
badge: avatar.badgeUri ? resolveMediaFromUri(avatar.badgeUri, 16) : void 0
|
|
468
|
-
};
|
|
469
|
-
}
|
|
470
|
-
return __spreadProps(__spreadValues({}, resolveMediaFromUri(avatar.uri, size)), {
|
|
471
|
-
badge: avatar.badgeUri ? resolveMediaFromUri(avatar.badgeUri, 16) : void 0
|
|
472
|
-
});
|
|
473
|
-
};
|
|
474
|
-
const avatars = content.map(getRenderableAvatar);
|
|
483
|
+
const avatars = content.map((avatar) => getRenderableAvatar(avatar, size));
|
|
475
484
|
if (avatars.length === 1) {
|
|
476
485
|
const { badge, backgroundColor, color, asset, icon } = avatars[0];
|
|
477
486
|
if (!asset && !icon) {
|
|
@@ -482,7 +491,7 @@ var AvatarMedia = ({
|
|
|
482
491
|
{
|
|
483
492
|
"aria-label": accessibilityDescription,
|
|
484
493
|
size,
|
|
485
|
-
badge: badge
|
|
494
|
+
badge: badge && getAvatarBadgeAsset(badge),
|
|
486
495
|
style: { backgroundColor, color },
|
|
487
496
|
children: icon != null ? icon : asset
|
|
488
497
|
}
|
|
@@ -503,7 +512,7 @@ var AvatarMedia = ({
|
|
|
503
512
|
);
|
|
504
513
|
};
|
|
505
514
|
var DEFAULT_BADGE_BACKGROUND_COLOR = "var(--color-background-neutral)";
|
|
506
|
-
var
|
|
515
|
+
var getAvatarBadgeAsset = ({
|
|
507
516
|
backgroundColor,
|
|
508
517
|
color,
|
|
509
518
|
asset,
|
|
@@ -523,12 +532,14 @@ var getBadge = ({
|
|
|
523
532
|
},
|
|
524
533
|
children: icon || asset
|
|
525
534
|
}
|
|
526
|
-
)
|
|
535
|
+
),
|
|
536
|
+
type: "reference"
|
|
527
537
|
};
|
|
528
538
|
}
|
|
529
539
|
return {
|
|
530
540
|
icon,
|
|
531
|
-
asset
|
|
541
|
+
asset,
|
|
542
|
+
type: "reference"
|
|
532
543
|
};
|
|
533
544
|
};
|
|
534
545
|
|
|
@@ -594,20 +605,12 @@ var LegacyMedia = ({ image, icon, preferAvatar, size }) => {
|
|
|
594
605
|
|
|
595
606
|
// ../renderers/src/components/Media/Media.tsx
|
|
596
607
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
597
|
-
var Media = ({
|
|
598
|
-
media,
|
|
599
|
-
preferAvatar = false,
|
|
600
|
-
size
|
|
601
|
-
}) => {
|
|
608
|
+
var Media = ({ media, preferAvatar = false, size }) => {
|
|
602
609
|
switch (media == null ? void 0 : media.type) {
|
|
603
610
|
case "avatar":
|
|
604
611
|
return /* @__PURE__ */ jsx10(AvatarMedia, __spreadProps(__spreadValues({}, media), { size }));
|
|
605
612
|
case "image": {
|
|
606
|
-
const { asset, icon } = resolveMediaFromUri(
|
|
607
|
-
media.uri,
|
|
608
|
-
size,
|
|
609
|
-
media.accessibilityDescription
|
|
610
|
-
);
|
|
613
|
+
const { asset, icon } = resolveMediaFromUri(media.uri, size, media.accessibilityDescription);
|
|
611
614
|
return icon != null ? icon : asset;
|
|
612
615
|
}
|
|
613
616
|
case "legacy": {
|
|
@@ -617,7 +620,26 @@ var Media = ({
|
|
|
617
620
|
return null;
|
|
618
621
|
}
|
|
619
622
|
};
|
|
620
|
-
|
|
623
|
+
function extractFirstImage(media) {
|
|
624
|
+
switch (media.type) {
|
|
625
|
+
case "image":
|
|
626
|
+
return media;
|
|
627
|
+
case "avatar":
|
|
628
|
+
return extractFirstImageFromAvatar(media);
|
|
629
|
+
default:
|
|
630
|
+
return void 0;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
function extractFirstImageFromAvatar(avatar) {
|
|
634
|
+
if (!avatar.content.length) return void 0;
|
|
635
|
+
const firstItem = avatar.content[0];
|
|
636
|
+
if (firstItem.type !== "uri") return void 0;
|
|
637
|
+
return {
|
|
638
|
+
type: "image",
|
|
639
|
+
uri: firstItem.uri,
|
|
640
|
+
accessibilityDescription: avatar.accessibilityDescription
|
|
641
|
+
};
|
|
642
|
+
}
|
|
621
643
|
|
|
622
644
|
// ../renderers/src/components/Media/OptionMedia.tsx
|
|
623
645
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
@@ -630,27 +652,6 @@ function OptionMedia(props) {
|
|
|
630
652
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
631
653
|
var getInlineMedia = (media) => media ? /* @__PURE__ */ jsx12(Media, { media, preferAvatar: false, size: 24 }) : null;
|
|
632
654
|
|
|
633
|
-
// ../renderers/src/components/Media/getPromptMedia.tsx
|
|
634
|
-
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
635
|
-
var getPromptMedia = (media) => {
|
|
636
|
-
if (!media || media.type === "legacy") {
|
|
637
|
-
return void 0;
|
|
638
|
-
}
|
|
639
|
-
if (media.type === "image" && !media.uri.startsWith("urn:")) {
|
|
640
|
-
return {
|
|
641
|
-
imgSrc: media.uri,
|
|
642
|
-
"aria-label": media.accessibilityDescription
|
|
643
|
-
};
|
|
644
|
-
}
|
|
645
|
-
const _a = media, { accessibilityDescription: ariaLabel } = _a, sansAriaLabel = __objRest(_a, ["accessibilityDescription"]);
|
|
646
|
-
return {
|
|
647
|
-
avatar: {
|
|
648
|
-
asset: /* @__PURE__ */ jsx13(Media, { media: sansAriaLabel, size: 48 })
|
|
649
|
-
},
|
|
650
|
-
"aria-label": ariaLabel
|
|
651
|
-
};
|
|
652
|
-
};
|
|
653
|
-
|
|
654
655
|
// ../renderers/src/utils/layout-utils.ts
|
|
655
656
|
var getMargin = (size) => {
|
|
656
657
|
switch (size) {
|
|
@@ -681,12 +682,176 @@ var getTextAlignment = (align) => {
|
|
|
681
682
|
};
|
|
682
683
|
var getTextAlignmentAndMargin = (component) => `${getTextAlignment(component.align)} ${getMargin(component.margin)}`;
|
|
683
684
|
|
|
685
|
+
// ../renderers/src/ImageRenderer/UrnFlagImage.tsx
|
|
686
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
687
|
+
var maxFlagSize = 600;
|
|
688
|
+
function UrnFlagImage({
|
|
689
|
+
accessibilityDescription,
|
|
690
|
+
align,
|
|
691
|
+
margin,
|
|
692
|
+
size,
|
|
693
|
+
uri
|
|
694
|
+
}) {
|
|
695
|
+
return /* @__PURE__ */ jsx13("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx13(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
699
|
+
import {
|
|
700
|
+
Illustration,
|
|
701
|
+
isIllustrationSupport3D
|
|
702
|
+
} from "@wise/art";
|
|
703
|
+
import { useState as useState2 } from "react";
|
|
704
|
+
|
|
705
|
+
// ../renderers/src/ImageRenderer/isAnimated.ts
|
|
706
|
+
var isAnimated = (uri) => {
|
|
707
|
+
const { rComponents } = stringToURN(uri);
|
|
708
|
+
return rComponents.type === "animated";
|
|
709
|
+
};
|
|
710
|
+
|
|
711
|
+
// ../renderers/src/ImageRenderer/SafeIllustration3D.tsx
|
|
712
|
+
import { Illustration3D } from "@wise/art";
|
|
713
|
+
import { Component } from "react";
|
|
714
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
715
|
+
var Illustration3DErrorBoundary = class extends Component {
|
|
716
|
+
constructor(props) {
|
|
717
|
+
super(props);
|
|
718
|
+
this.state = { hasError: false };
|
|
719
|
+
}
|
|
720
|
+
static getDerivedStateFromError() {
|
|
721
|
+
return { hasError: true };
|
|
722
|
+
}
|
|
723
|
+
componentDidCatch() {
|
|
724
|
+
this.props.onError();
|
|
725
|
+
}
|
|
726
|
+
render() {
|
|
727
|
+
if (this.state.hasError) {
|
|
728
|
+
return null;
|
|
729
|
+
}
|
|
730
|
+
return this.props.children;
|
|
731
|
+
}
|
|
732
|
+
};
|
|
733
|
+
var SafeIllustration3D = ({
|
|
734
|
+
name,
|
|
735
|
+
size,
|
|
736
|
+
onError
|
|
737
|
+
}) => {
|
|
738
|
+
return /* @__PURE__ */ jsx14(Illustration3DErrorBoundary, { onError, children: /* @__PURE__ */ jsx14(Illustration3D, { name, size }) });
|
|
739
|
+
};
|
|
740
|
+
var SafeIllustration3D_default = SafeIllustration3D;
|
|
741
|
+
|
|
742
|
+
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
743
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
744
|
+
var urnPrefix = "urn:wise:illustrations:";
|
|
745
|
+
var isUrnIllustration = (uri) => uri.startsWith(urnPrefix);
|
|
746
|
+
function UrnIllustration({
|
|
747
|
+
accessibilityDescription,
|
|
748
|
+
align,
|
|
749
|
+
margin,
|
|
750
|
+
size,
|
|
751
|
+
uri
|
|
752
|
+
}) {
|
|
753
|
+
const [has3DFailed, setHas3DFailed] = useState2(false);
|
|
754
|
+
const illustrationSize = getIllustrationSize(size);
|
|
755
|
+
const illustrationName = getIllustrationName(uri);
|
|
756
|
+
const illustration3DName = getIllustration3DName(uri);
|
|
757
|
+
if (illustration3DName && isAnimated(uri) && !has3DFailed) {
|
|
758
|
+
return /* @__PURE__ */ jsx15("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx15(
|
|
759
|
+
SafeIllustration3D_default,
|
|
760
|
+
{
|
|
761
|
+
name: illustration3DName,
|
|
762
|
+
size: illustrationSize,
|
|
763
|
+
onError: () => setHas3DFailed(true)
|
|
764
|
+
}
|
|
765
|
+
) });
|
|
766
|
+
}
|
|
767
|
+
return /* @__PURE__ */ jsx15("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx15(
|
|
768
|
+
Illustration,
|
|
769
|
+
{
|
|
770
|
+
className: "df-illustration",
|
|
771
|
+
name: illustrationName,
|
|
772
|
+
size: illustrationSize,
|
|
773
|
+
alt: accessibilityDescription
|
|
774
|
+
}
|
|
775
|
+
) });
|
|
776
|
+
}
|
|
777
|
+
var getIllustrationSize = (size) => ({ xs: "small", sm: "small", md: "medium", lg: "large", xl: "large" })[size] || "medium";
|
|
778
|
+
var getIllustrationName = (uri) => {
|
|
779
|
+
return uri.replace(urnPrefix, "").split("?")[0];
|
|
780
|
+
};
|
|
781
|
+
var getIllustration3DName = (uri) => {
|
|
782
|
+
const illustrationName = getIllustrationName(uri);
|
|
783
|
+
return isIllustrationSupport3D(illustrationName) ? illustrationName : null;
|
|
784
|
+
};
|
|
785
|
+
|
|
786
|
+
// ../renderers/src/ImageRenderer/UrnImage.tsx
|
|
787
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
788
|
+
var isUrnImage = (uri) => uri.startsWith("urn:");
|
|
789
|
+
function UrnImage(props) {
|
|
790
|
+
const { uri } = props;
|
|
791
|
+
if (isUrnIllustration(uri)) {
|
|
792
|
+
return /* @__PURE__ */ jsx16(UrnIllustration, __spreadValues({}, props));
|
|
793
|
+
}
|
|
794
|
+
if (isUrnFlag(uri)) {
|
|
795
|
+
return /* @__PURE__ */ jsx16(UrnFlagImage, __spreadValues({}, props));
|
|
796
|
+
}
|
|
797
|
+
return null;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
// ../renderers/src/components/Media/getPromptMedia.tsx
|
|
801
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
802
|
+
var getInfoPromptMedia = (media) => {
|
|
803
|
+
const image = extractFirstImage(media);
|
|
804
|
+
const iconName = (image == null ? void 0 : image.uri) && extractIconNameFromUri(image == null ? void 0 : image.uri);
|
|
805
|
+
if (!iconName || !isNamedIcon(iconName)) return void 0;
|
|
806
|
+
return { asset: /* @__PURE__ */ jsx17(NamedIcon, { name: iconName, size: 24 }) };
|
|
807
|
+
};
|
|
808
|
+
var getActionPromptMedia = (media) => {
|
|
809
|
+
var _a;
|
|
810
|
+
if (media.type === "legacy") {
|
|
811
|
+
return void 0;
|
|
812
|
+
}
|
|
813
|
+
if (media.type === "image" && !isUrnImage(media.uri)) {
|
|
814
|
+
return {
|
|
815
|
+
imgSrc: media.uri,
|
|
816
|
+
"aria-label": media.accessibilityDescription
|
|
817
|
+
};
|
|
818
|
+
}
|
|
819
|
+
const content = extractFirstAvatarContent(media);
|
|
820
|
+
const avatar = content && getRenderableAvatar(content, 48);
|
|
821
|
+
if (!avatar || !avatar.asset && !avatar.icon) {
|
|
822
|
+
return void 0;
|
|
823
|
+
}
|
|
824
|
+
return {
|
|
825
|
+
avatar: {
|
|
826
|
+
asset: (_a = avatar.icon) != null ? _a : avatar.asset,
|
|
827
|
+
badge: avatar.badge && getAvatarBadgeAsset(avatar.badge),
|
|
828
|
+
style: { backgroundColor: avatar.backgroundColor, color: avatar.color }
|
|
829
|
+
},
|
|
830
|
+
"aria-label": media.accessibilityDescription
|
|
831
|
+
};
|
|
832
|
+
};
|
|
833
|
+
var extractFirstAvatarContent = (media) => {
|
|
834
|
+
switch (media.type) {
|
|
835
|
+
case "avatar":
|
|
836
|
+
if (!media.content) return void 0;
|
|
837
|
+
return media.content[0];
|
|
838
|
+
case "image":
|
|
839
|
+
if (!isUrnImage(media.uri)) return void 0;
|
|
840
|
+
return {
|
|
841
|
+
type: "uri",
|
|
842
|
+
uri: media.uri
|
|
843
|
+
};
|
|
844
|
+
default:
|
|
845
|
+
return void 0;
|
|
846
|
+
}
|
|
847
|
+
};
|
|
848
|
+
|
|
684
849
|
// ../renderers/src/AlertRenderer/mappers.tsx
|
|
685
850
|
import {
|
|
686
851
|
Markdown,
|
|
687
852
|
MarkdownNodeType
|
|
688
853
|
} from "@transferwise/components";
|
|
689
|
-
import { jsx as
|
|
854
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
690
855
|
var mapCallToAction = (callToAction) => __spreadValues({
|
|
691
856
|
label: callToAction.title,
|
|
692
857
|
"aria-label": callToAction.accessibilityDescription
|
|
@@ -696,7 +861,7 @@ var promptMarkdownAllowList = [
|
|
|
696
861
|
MarkdownNodeType.PARAGRAPH,
|
|
697
862
|
MarkdownNodeType.STRONG
|
|
698
863
|
];
|
|
699
|
-
var mapPromptDescription = (markdown) => /* @__PURE__ */
|
|
864
|
+
var mapPromptDescription = (markdown) => /* @__PURE__ */ jsx18(
|
|
700
865
|
Markdown,
|
|
701
866
|
{
|
|
702
867
|
as: "span",
|
|
@@ -710,7 +875,7 @@ var mapPromptDescription = (markdown) => /* @__PURE__ */ jsx14(
|
|
|
710
875
|
var mapPromptSentiment = (context) => context === "positive" ? "success" : context;
|
|
711
876
|
|
|
712
877
|
// ../renderers/src/AlertRenderer/ActionPromptComponent.tsx
|
|
713
|
-
import { jsx as
|
|
878
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
714
879
|
function ActionPromptComponent({
|
|
715
880
|
callToAction,
|
|
716
881
|
context,
|
|
@@ -721,14 +886,14 @@ function ActionPromptComponent({
|
|
|
721
886
|
secondaryCallToAction,
|
|
722
887
|
title
|
|
723
888
|
}) {
|
|
724
|
-
return /* @__PURE__ */
|
|
889
|
+
return /* @__PURE__ */ jsx19(
|
|
725
890
|
ActionPrompt,
|
|
726
891
|
{
|
|
727
892
|
title: title != null ? title : "",
|
|
728
893
|
description: mapPromptDescription(markdown),
|
|
729
894
|
sentiment: mapPromptSentiment(context),
|
|
730
895
|
className: getMargin(margin),
|
|
731
|
-
media:
|
|
896
|
+
media: media && getActionPromptMedia(media),
|
|
732
897
|
action: mapCallToAction(callToAction),
|
|
733
898
|
actionSecondary: secondaryCallToAction ? mapCallToAction(secondaryCallToAction) : void 0,
|
|
734
899
|
onDismiss
|
|
@@ -738,7 +903,7 @@ function ActionPromptComponent({
|
|
|
738
903
|
|
|
739
904
|
// ../renderers/src/AlertRenderer/InfoPromptComponent.tsx
|
|
740
905
|
import { InfoPrompt } from "@transferwise/components";
|
|
741
|
-
import { jsx as
|
|
906
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
742
907
|
function InfoPromptComponent({
|
|
743
908
|
callToAction,
|
|
744
909
|
context,
|
|
@@ -748,14 +913,14 @@ function InfoPromptComponent({
|
|
|
748
913
|
onDismiss,
|
|
749
914
|
title
|
|
750
915
|
}) {
|
|
751
|
-
return /* @__PURE__ */
|
|
916
|
+
return /* @__PURE__ */ jsx20(
|
|
752
917
|
InfoPrompt,
|
|
753
918
|
{
|
|
754
919
|
title,
|
|
755
920
|
description: mapPromptDescription(markdown),
|
|
756
921
|
sentiment: mapPromptSentiment(context),
|
|
757
922
|
className: getMargin(margin),
|
|
758
|
-
media:
|
|
923
|
+
media: media && getInfoPromptMedia(media),
|
|
759
924
|
action: callToAction ? mapCallToAction(callToAction) : void 0,
|
|
760
925
|
onDismiss
|
|
761
926
|
}
|
|
@@ -763,13 +928,13 @@ function InfoPromptComponent({
|
|
|
763
928
|
}
|
|
764
929
|
|
|
765
930
|
// ../renderers/src/AlertRenderer/AlertRenderer.tsx
|
|
766
|
-
import { jsx as
|
|
931
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
767
932
|
var AlertRenderer = {
|
|
768
933
|
canRenderType: "alert",
|
|
769
934
|
render: AlertRendererComponent
|
|
770
935
|
};
|
|
771
936
|
function AlertRendererComponent(props) {
|
|
772
|
-
const [isVisible, setIsVisible] =
|
|
937
|
+
const [isVisible, setIsVisible] = useState3(true);
|
|
773
938
|
const { onDismiss: dismiss } = props;
|
|
774
939
|
if (!isVisible) {
|
|
775
940
|
return null;
|
|
@@ -779,9 +944,9 @@ function AlertRendererComponent(props) {
|
|
|
779
944
|
dismiss();
|
|
780
945
|
} : void 0;
|
|
781
946
|
if (shouldRenderActionPrompt(props)) {
|
|
782
|
-
return /* @__PURE__ */
|
|
947
|
+
return /* @__PURE__ */ jsx21(ActionPromptComponent, __spreadProps(__spreadValues({}, props), { onDismiss }));
|
|
783
948
|
}
|
|
784
|
-
return /* @__PURE__ */
|
|
949
|
+
return /* @__PURE__ */ jsx21(InfoPromptComponent, __spreadProps(__spreadValues({}, props), { onDismiss }));
|
|
785
950
|
}
|
|
786
951
|
var shouldRenderActionPrompt = (props) => {
|
|
787
952
|
var _a, _b;
|
|
@@ -793,13 +958,13 @@ var AlertRenderer_default = AlertRenderer;
|
|
|
793
958
|
|
|
794
959
|
// ../renderers/src/BoxRenderer.tsx
|
|
795
960
|
var import_classnames = __toESM(require_classnames());
|
|
796
|
-
import { jsx as
|
|
961
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
797
962
|
var BoxRenderer = {
|
|
798
963
|
canRenderType: "box",
|
|
799
964
|
render: ({ children, control, margin, width }) => {
|
|
800
965
|
const hasFixedWidth = width !== "xl";
|
|
801
966
|
const hasBorder = control === "bordered" || control === "bordered-web";
|
|
802
|
-
const contents = /* @__PURE__ */
|
|
967
|
+
const contents = /* @__PURE__ */ jsx22(
|
|
803
968
|
"div",
|
|
804
969
|
{
|
|
805
970
|
className: (0, import_classnames.default)("df-box-renderer", {
|
|
@@ -810,7 +975,7 @@ var BoxRenderer = {
|
|
|
810
975
|
children
|
|
811
976
|
}
|
|
812
977
|
);
|
|
813
|
-
return hasFixedWidth ? /* @__PURE__ */
|
|
978
|
+
return hasFixedWidth ? /* @__PURE__ */ jsx22("div", { className: (0, import_classnames.default)("df-box-renderer-fixed-width", getMargin(margin)), children: contents }) : contents;
|
|
814
979
|
}
|
|
815
980
|
};
|
|
816
981
|
var BoxRenderer_default = BoxRenderer;
|
|
@@ -830,8 +995,8 @@ var loading_button_messages_default = defineMessages({
|
|
|
830
995
|
});
|
|
831
996
|
|
|
832
997
|
// ../renderers/src/ButtonRenderer/AddressValidationButtonRenderer.tsx
|
|
833
|
-
import { useEffect as useEffect2, useState as
|
|
834
|
-
import { jsx as
|
|
998
|
+
import { useEffect as useEffect2, useState as useState4 } from "react";
|
|
999
|
+
import { jsx as jsx23, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
835
1000
|
var AddressValidationButtonRenderer = {
|
|
836
1001
|
canRenderType: "button",
|
|
837
1002
|
canRender: ({ control }) => control === "address-validation",
|
|
@@ -840,7 +1005,7 @@ var AddressValidationButtonRenderer = {
|
|
|
840
1005
|
function AddressValidationButtonComponent(props) {
|
|
841
1006
|
const { disabled, margin, title, stepLoadingState, onClick } = props;
|
|
842
1007
|
const { formatMessage } = useIntl();
|
|
843
|
-
const [spinny, setSpinny] =
|
|
1008
|
+
const [spinny, setSpinny] = useState4(false);
|
|
844
1009
|
useEffect2(() => {
|
|
845
1010
|
if (stepLoadingState === "idle") {
|
|
846
1011
|
setSpinny(false);
|
|
@@ -852,7 +1017,7 @@ function AddressValidationButtonComponent(props) {
|
|
|
852
1017
|
}
|
|
853
1018
|
};
|
|
854
1019
|
return /* @__PURE__ */ jsxs3("div", { className: `d-flex flex-column ${getMargin(margin)}`, children: [
|
|
855
|
-
/* @__PURE__ */
|
|
1020
|
+
/* @__PURE__ */ jsx23(
|
|
856
1021
|
Button,
|
|
857
1022
|
{
|
|
858
1023
|
v2: true,
|
|
@@ -869,7 +1034,7 @@ function AddressValidationButtonComponent(props) {
|
|
|
869
1034
|
children: title
|
|
870
1035
|
}
|
|
871
1036
|
),
|
|
872
|
-
spinny && /* @__PURE__ */
|
|
1037
|
+
spinny && /* @__PURE__ */ jsx23(InlineAlert, { type: "warning", className: "m-x-auto", children: formatMessage(loading_button_messages_default.buttonLoadingMessage) })
|
|
873
1038
|
] });
|
|
874
1039
|
}
|
|
875
1040
|
var AddressValidationButtonRenderer_default = AddressValidationButtonRenderer;
|
|
@@ -900,7 +1065,7 @@ var mapLegacyButtonSize = (size) => {
|
|
|
900
1065
|
};
|
|
901
1066
|
|
|
902
1067
|
// ../renderers/src/ButtonRenderer/ButtonRenderer.tsx
|
|
903
|
-
import { useEffect as useEffect3, useState as
|
|
1068
|
+
import { useEffect as useEffect3, useState as useState5 } from "react";
|
|
904
1069
|
|
|
905
1070
|
// ../renderers/src/components/Media/getAddonStartMedia.ts
|
|
906
1071
|
var getAddonStartMedia = (media) => {
|
|
@@ -921,7 +1086,7 @@ var getAddonStartMedia = (media) => {
|
|
|
921
1086
|
|
|
922
1087
|
// ../renderers/src/ButtonRenderer/ButtonRenderer.tsx
|
|
923
1088
|
var import_classnames2 = __toESM(require_classnames());
|
|
924
|
-
import { jsx as
|
|
1089
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
925
1090
|
var ButtonRenderer = {
|
|
926
1091
|
canRenderType: "button",
|
|
927
1092
|
render: ButtonComponent
|
|
@@ -939,7 +1104,7 @@ function ButtonComponent(props) {
|
|
|
939
1104
|
stepLoadingState,
|
|
940
1105
|
onClick
|
|
941
1106
|
} = props;
|
|
942
|
-
const [spinny, setSpinny] =
|
|
1107
|
+
const [spinny, setSpinny] = useState5(false);
|
|
943
1108
|
useEffect3(() => {
|
|
944
1109
|
if (stepLoadingState === "idle") {
|
|
945
1110
|
setSpinny(false);
|
|
@@ -970,7 +1135,7 @@ function ButtonComponent(props) {
|
|
|
970
1135
|
onClick();
|
|
971
1136
|
}
|
|
972
1137
|
};
|
|
973
|
-
return /* @__PURE__ */
|
|
1138
|
+
return /* @__PURE__ */ jsx24(Button2, __spreadProps(__spreadValues({}, buttonProps), { children: title }));
|
|
974
1139
|
}
|
|
975
1140
|
var getSentiment = (context) => context === "negative" ? "negative" : "default";
|
|
976
1141
|
var getPriority = (control, tags) => {
|
|
@@ -1024,13 +1189,13 @@ var help_messages_default = defineMessages2({
|
|
|
1024
1189
|
});
|
|
1025
1190
|
|
|
1026
1191
|
// ../renderers/src/components/Help.tsx
|
|
1027
|
-
import { jsx as
|
|
1192
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1028
1193
|
function Help({ help, onClick }) {
|
|
1029
1194
|
const intl = useIntl2();
|
|
1030
|
-
return /* @__PURE__ */
|
|
1195
|
+
return /* @__PURE__ */ jsx25(
|
|
1031
1196
|
Info,
|
|
1032
1197
|
{
|
|
1033
|
-
content: /* @__PURE__ */
|
|
1198
|
+
content: /* @__PURE__ */ jsx25(Markdown2, { config: { link: { target: "_blank" } }, children: help }),
|
|
1034
1199
|
presentation: "POPOVER",
|
|
1035
1200
|
size: "sm",
|
|
1036
1201
|
"aria-label": intl.formatMessage(help_messages_default.helpAria),
|
|
@@ -1041,16 +1206,16 @@ function Help({ help, onClick }) {
|
|
|
1041
1206
|
var Help_default = Help;
|
|
1042
1207
|
|
|
1043
1208
|
// ../renderers/src/components/LabelContentWithHelp.tsx
|
|
1044
|
-
import { jsx as
|
|
1209
|
+
import { jsx as jsx26, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1045
1210
|
function LabelContentWithHelp({ text, help }) {
|
|
1046
1211
|
return /* @__PURE__ */ jsxs4("div", { children: [
|
|
1047
1212
|
text,
|
|
1048
|
-
/* @__PURE__ */
|
|
1213
|
+
/* @__PURE__ */ jsx26(Help_default, { help })
|
|
1049
1214
|
] });
|
|
1050
1215
|
}
|
|
1051
1216
|
|
|
1052
1217
|
// ../renderers/src/components/FieldInput.tsx
|
|
1053
|
-
import { jsx as
|
|
1218
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1054
1219
|
function FieldInput({
|
|
1055
1220
|
id,
|
|
1056
1221
|
children,
|
|
@@ -1063,9 +1228,9 @@ function FieldInput({
|
|
|
1063
1228
|
features
|
|
1064
1229
|
}) {
|
|
1065
1230
|
var _a;
|
|
1066
|
-
const labelContent = label && help ? /* @__PURE__ */
|
|
1231
|
+
const labelContent = label && help ? /* @__PURE__ */ jsx27(LabelContentWithHelp, { text: label, help }) : label;
|
|
1067
1232
|
const { ref } = useScrollToError(validation, features);
|
|
1068
|
-
return /* @__PURE__ */
|
|
1233
|
+
return /* @__PURE__ */ jsx27("div", { ref, children: /* @__PURE__ */ jsx27(
|
|
1069
1234
|
Field,
|
|
1070
1235
|
{
|
|
1071
1236
|
id,
|
|
@@ -1093,22 +1258,22 @@ var FieldInput_default = FieldInput;
|
|
|
1093
1258
|
|
|
1094
1259
|
// ../renderers/src/utils/listItem/getAdditionalText.tsx
|
|
1095
1260
|
import { ListItem } from "@transferwise/components";
|
|
1096
|
-
import { jsx as
|
|
1261
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1097
1262
|
var getAdditionalText = (additionalText) => {
|
|
1098
1263
|
if (!additionalText) {
|
|
1099
1264
|
return void 0;
|
|
1100
1265
|
}
|
|
1101
|
-
return /* @__PURE__ */
|
|
1266
|
+
return /* @__PURE__ */ jsx28(ListItem.AdditionalInfo, { children: additionalText });
|
|
1102
1267
|
};
|
|
1103
1268
|
|
|
1104
1269
|
// ../renderers/src/utils/listItem/getInlineAlert.tsx
|
|
1105
1270
|
import { ListItem as ListItem2 } from "@transferwise/components";
|
|
1106
|
-
import { jsx as
|
|
1107
|
-
var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */
|
|
1271
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1272
|
+
var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ jsx29(ListItem2.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
|
|
1108
1273
|
|
|
1109
1274
|
// ../renderers/src/utils/listItem/getMedia.tsx
|
|
1110
|
-
import { jsx as
|
|
1111
|
-
var getMedia = (media, preferAvatar) => media ? /* @__PURE__ */
|
|
1275
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1276
|
+
var getMedia = (media, preferAvatar) => media ? /* @__PURE__ */ jsx30(OptionMedia, { media, preferAvatar }) : void 0;
|
|
1112
1277
|
|
|
1113
1278
|
// ../renderers/src/utils/listItem/getSupportingValues.ts
|
|
1114
1279
|
var getSupportingValues = (supportingValues) => {
|
|
@@ -1116,18 +1281,18 @@ var getSupportingValues = (supportingValues) => {
|
|
|
1116
1281
|
};
|
|
1117
1282
|
|
|
1118
1283
|
// ../renderers/src/CheckboxInputRenderer.tsx
|
|
1119
|
-
import { jsx as
|
|
1284
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1120
1285
|
var CheckboxInputRenderer = {
|
|
1121
1286
|
canRenderType: "input-checkbox",
|
|
1122
1287
|
render: (props) => {
|
|
1123
1288
|
switch (props.control) {
|
|
1124
1289
|
case "switch-item":
|
|
1125
|
-
return /* @__PURE__ */
|
|
1290
|
+
return /* @__PURE__ */ jsx31(SwitchItemComponent, __spreadValues({}, props));
|
|
1126
1291
|
case "checkbox-item":
|
|
1127
|
-
return /* @__PURE__ */
|
|
1292
|
+
return /* @__PURE__ */ jsx31(CheckboxItemComponent, __spreadValues({}, props));
|
|
1128
1293
|
case "checkbox":
|
|
1129
1294
|
default:
|
|
1130
|
-
return /* @__PURE__ */
|
|
1295
|
+
return /* @__PURE__ */ jsx31(CheckboxComponent, __spreadValues({}, props));
|
|
1131
1296
|
}
|
|
1132
1297
|
}
|
|
1133
1298
|
};
|
|
@@ -1152,7 +1317,7 @@ var CheckboxComponent = (props) => {
|
|
|
1152
1317
|
"value"
|
|
1153
1318
|
]);
|
|
1154
1319
|
const checkboxProps = __spreadProps(__spreadValues({}, rest), { label: title, secondary: description, checked: value });
|
|
1155
|
-
return /* @__PURE__ */
|
|
1320
|
+
return /* @__PURE__ */ jsx31(
|
|
1156
1321
|
FieldInput_default,
|
|
1157
1322
|
{
|
|
1158
1323
|
id,
|
|
@@ -1163,7 +1328,7 @@ var CheckboxComponent = (props) => {
|
|
|
1163
1328
|
inlineAlert: rest.inlineAlert,
|
|
1164
1329
|
loadingState: rest.fieldLoadingState,
|
|
1165
1330
|
features: rest.features,
|
|
1166
|
-
children: /* @__PURE__ */
|
|
1331
|
+
children: /* @__PURE__ */ jsx31(Checkbox, __spreadValues({ id }, checkboxProps))
|
|
1167
1332
|
}
|
|
1168
1333
|
);
|
|
1169
1334
|
};
|
|
@@ -1182,7 +1347,7 @@ var CheckboxItemComponent = (props) => {
|
|
|
1182
1347
|
onChange
|
|
1183
1348
|
} = props;
|
|
1184
1349
|
const { ref } = useScrollToError(validationState, features);
|
|
1185
|
-
return /* @__PURE__ */
|
|
1350
|
+
return /* @__PURE__ */ jsx31("div", { ref, children: /* @__PURE__ */ jsx31(
|
|
1186
1351
|
ListItem3,
|
|
1187
1352
|
__spreadValues({
|
|
1188
1353
|
title,
|
|
@@ -1191,7 +1356,7 @@ var CheckboxItemComponent = (props) => {
|
|
|
1191
1356
|
media: getMedia(media, false),
|
|
1192
1357
|
disabled,
|
|
1193
1358
|
prompt: getInlineAlertOrValidation(validationState, inlineAlert),
|
|
1194
|
-
control: /* @__PURE__ */
|
|
1359
|
+
control: /* @__PURE__ */ jsx31(ListItem3.Checkbox, { checked: value, onChange: () => onChange(!value) })
|
|
1195
1360
|
}, getSupportingValues(supportingValues))
|
|
1196
1361
|
) });
|
|
1197
1362
|
};
|
|
@@ -1210,7 +1375,7 @@ var SwitchItemComponent = (props) => {
|
|
|
1210
1375
|
onChange
|
|
1211
1376
|
} = props;
|
|
1212
1377
|
const { ref } = useScrollToError(validationState, features);
|
|
1213
|
-
return /* @__PURE__ */
|
|
1378
|
+
return /* @__PURE__ */ jsx31("div", { ref, children: /* @__PURE__ */ jsx31(
|
|
1214
1379
|
ListItem3,
|
|
1215
1380
|
__spreadValues({
|
|
1216
1381
|
title,
|
|
@@ -1219,13 +1384,13 @@ var SwitchItemComponent = (props) => {
|
|
|
1219
1384
|
media: getMedia(media, false),
|
|
1220
1385
|
disabled,
|
|
1221
1386
|
prompt: getInlineAlertOrValidation(validationState, inlineAlert),
|
|
1222
|
-
control: /* @__PURE__ */
|
|
1387
|
+
control: /* @__PURE__ */ jsx31(ListItem3.Switch, { checked: value, onClick: () => onChange(!value) })
|
|
1223
1388
|
}, getSupportingValues(supportingValues))
|
|
1224
1389
|
) });
|
|
1225
1390
|
};
|
|
1226
1391
|
var getInlineAlertOrValidation = (validationState, inlineAlert) => {
|
|
1227
1392
|
if ((validationState == null ? void 0 : validationState.status) === "invalid") {
|
|
1228
|
-
return /* @__PURE__ */
|
|
1393
|
+
return /* @__PURE__ */ jsx31(ListItem3.Prompt, { sentiment: "negative", children: validationState.message });
|
|
1229
1394
|
}
|
|
1230
1395
|
return getInlineAlert(inlineAlert);
|
|
1231
1396
|
};
|
|
@@ -2203,7 +2368,7 @@ import { useRef as useRef3, useEffect as useEffect7, useLayoutEffect as useLayou
|
|
|
2203
2368
|
|
|
2204
2369
|
// ../renderers/src/step/StepFooter.tsx
|
|
2205
2370
|
import { Button as Button3 } from "@transferwise/components";
|
|
2206
|
-
import { useEffect as useEffect6, useRef as useRef2, useState as
|
|
2371
|
+
import { useEffect as useEffect6, useRef as useRef2, useState as useState7 } from "react";
|
|
2207
2372
|
import { useIntl as useIntl3 } from "react-intl";
|
|
2208
2373
|
|
|
2209
2374
|
// ../renderers/src/messages/step.messages.ts
|
|
@@ -2217,23 +2382,23 @@ var step_messages_default = defineMessages3({
|
|
|
2217
2382
|
});
|
|
2218
2383
|
|
|
2219
2384
|
// ../renderers/src/step/StepFooter.tsx
|
|
2220
|
-
import { Fragment as Fragment2, jsx as
|
|
2385
|
+
import { Fragment as Fragment2, jsx as jsx32, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2221
2386
|
var SCROLL_TO_BOTTOM = "scroll-to-bottom";
|
|
2222
2387
|
var StepFooter = ({ footer, tags }) => {
|
|
2223
2388
|
if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
|
|
2224
|
-
return /* @__PURE__ */
|
|
2389
|
+
return /* @__PURE__ */ jsx32(FooterWithScrollButton, { footer });
|
|
2225
2390
|
}
|
|
2226
|
-
return /* @__PURE__ */
|
|
2391
|
+
return /* @__PURE__ */ jsx32(DefaultFooter, { footer });
|
|
2227
2392
|
};
|
|
2228
2393
|
var DefaultFooter = ({ footer }) => {
|
|
2229
2394
|
const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
|
|
2230
|
-
return hasFooter ? /* @__PURE__ */
|
|
2395
|
+
return hasFooter ? /* @__PURE__ */ jsx32("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
|
|
2231
2396
|
};
|
|
2232
2397
|
var FooterWithScrollButton = ({ footer }) => {
|
|
2233
2398
|
const { formatMessage } = useIntl3();
|
|
2234
2399
|
const endOfLayoutRef = useRef2(null);
|
|
2235
2400
|
const isElementVisible = useIsElementVisible(endOfLayoutRef);
|
|
2236
|
-
const scrollButton = /* @__PURE__ */
|
|
2401
|
+
const scrollButton = /* @__PURE__ */ jsx32(
|
|
2237
2402
|
Button3,
|
|
2238
2403
|
{
|
|
2239
2404
|
className: "m-b-1",
|
|
@@ -2249,10 +2414,10 @@ var FooterWithScrollButton = ({ footer }) => {
|
|
|
2249
2414
|
);
|
|
2250
2415
|
const hasStepFooterContent = footer && Array.isArray(footer) && footer.length > 0;
|
|
2251
2416
|
if (isElementVisible && !hasStepFooterContent) {
|
|
2252
|
-
return /* @__PURE__ */
|
|
2417
|
+
return /* @__PURE__ */ jsx32("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
|
|
2253
2418
|
}
|
|
2254
2419
|
return /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
2255
|
-
/* @__PURE__ */
|
|
2420
|
+
/* @__PURE__ */ jsx32("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
|
|
2256
2421
|
/* @__PURE__ */ jsxs5("div", { className: "df-step-fixed__footer", children: [
|
|
2257
2422
|
!isElementVisible && scrollButton,
|
|
2258
2423
|
footer
|
|
@@ -2260,7 +2425,7 @@ var FooterWithScrollButton = ({ footer }) => {
|
|
|
2260
2425
|
] });
|
|
2261
2426
|
};
|
|
2262
2427
|
var useIsElementVisible = (elementRef) => {
|
|
2263
|
-
const [isVisible, setIsVisible] =
|
|
2428
|
+
const [isVisible, setIsVisible] = useState7(false);
|
|
2264
2429
|
useEffect6(() => {
|
|
2265
2430
|
const element = elementRef.current;
|
|
2266
2431
|
if (!element) return;
|
|
@@ -2274,7 +2439,7 @@ var useIsElementVisible = (elementRef) => {
|
|
|
2274
2439
|
};
|
|
2275
2440
|
|
|
2276
2441
|
// ../renderers/src/CollectionRenderer/components/ContentComponent.tsx
|
|
2277
|
-
import { jsx as
|
|
2442
|
+
import { jsx as jsx33, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2278
2443
|
var ContentComponent = (props) => {
|
|
2279
2444
|
const { state, status, SectionHeader, Item } = props;
|
|
2280
2445
|
const endOfContentRef = useRef3(null);
|
|
@@ -2318,7 +2483,7 @@ var ContentComponent = (props) => {
|
|
|
2318
2483
|
});
|
|
2319
2484
|
return /* @__PURE__ */ jsxs6("div", { ref: listRef, children: [
|
|
2320
2485
|
state.beforeSections,
|
|
2321
|
-
/* @__PURE__ */
|
|
2486
|
+
/* @__PURE__ */ jsx33(
|
|
2322
2487
|
"div",
|
|
2323
2488
|
{
|
|
2324
2489
|
style: {
|
|
@@ -2331,7 +2496,7 @@ var ContentComponent = (props) => {
|
|
|
2331
2496
|
if (!i) {
|
|
2332
2497
|
return null;
|
|
2333
2498
|
}
|
|
2334
|
-
return /* @__PURE__ */
|
|
2499
|
+
return /* @__PURE__ */ jsx33(
|
|
2335
2500
|
"div",
|
|
2336
2501
|
{
|
|
2337
2502
|
ref: virtualizer.measureElement,
|
|
@@ -2343,7 +2508,7 @@ var ContentComponent = (props) => {
|
|
|
2343
2508
|
width: "100%",
|
|
2344
2509
|
transform: `translateY(${item.start - virtualizer.options.scrollMargin}px)`
|
|
2345
2510
|
},
|
|
2346
|
-
children: i.type === "header" ? /* @__PURE__ */
|
|
2511
|
+
children: i.type === "header" ? /* @__PURE__ */ jsx33(SectionHeader, __spreadValues({}, i)) : /* @__PURE__ */ jsx33(Item, __spreadValues({}, i.item))
|
|
2347
2512
|
},
|
|
2348
2513
|
item.key
|
|
2349
2514
|
);
|
|
@@ -2351,8 +2516,8 @@ var ContentComponent = (props) => {
|
|
|
2351
2516
|
}
|
|
2352
2517
|
),
|
|
2353
2518
|
/* @__PURE__ */ jsxs6("div", { ref: endOfContentRef, className: "d-flex m-x-auto m-y-2", children: [
|
|
2354
|
-
status.type === "idle" && status.loadMore || status.type === "loading" && status.reason === "pagination" ? /* @__PURE__ */
|
|
2355
|
-
status.type === "error" && status.reason === "pagination" ? /* @__PURE__ */
|
|
2519
|
+
status.type === "idle" && status.loadMore || status.type === "loading" && status.reason === "pagination" ? /* @__PURE__ */ jsx33(ProcessIndicator, { size: "xs" }) : null,
|
|
2520
|
+
status.type === "error" && status.reason === "pagination" ? /* @__PURE__ */ jsx33("div", { className: "d-flex m-x-auto", children: /* @__PURE__ */ jsx33(Button4, { v2: true, size: "sm", priority: "secondary-neutral", onClick: status.retry, children: "Load more" }) }) : null
|
|
2356
2521
|
] }),
|
|
2357
2522
|
state.afterSections
|
|
2358
2523
|
] });
|
|
@@ -2360,12 +2525,12 @@ var ContentComponent = (props) => {
|
|
|
2360
2525
|
|
|
2361
2526
|
// ../renderers/src/CollectionRenderer/components/FilterComponent.tsx
|
|
2362
2527
|
import { Chips } from "@transferwise/components";
|
|
2363
|
-
import { jsx as
|
|
2528
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2364
2529
|
var FiltersComponent = ({ state }) => {
|
|
2365
2530
|
const { filters } = state;
|
|
2366
|
-
return /* @__PURE__ */
|
|
2531
|
+
return /* @__PURE__ */ jsx34("div", { className: "df-filters-container", children: filters.map((filter) => {
|
|
2367
2532
|
var _a;
|
|
2368
|
-
return /* @__PURE__ */
|
|
2533
|
+
return /* @__PURE__ */ jsx34(FilterComponent, __spreadValues({}, filter), JSON.stringify((_a = filter.options) == null ? void 0 : _a.map((o) => o.value)));
|
|
2369
2534
|
}) });
|
|
2370
2535
|
};
|
|
2371
2536
|
var FilterComponent = (filter) => {
|
|
@@ -2373,7 +2538,7 @@ var FilterComponent = (filter) => {
|
|
|
2373
2538
|
if (!options) {
|
|
2374
2539
|
return null;
|
|
2375
2540
|
}
|
|
2376
|
-
return /* @__PURE__ */
|
|
2541
|
+
return /* @__PURE__ */ jsx34(
|
|
2377
2542
|
Chips,
|
|
2378
2543
|
{
|
|
2379
2544
|
className: "m-b-1",
|
|
@@ -2403,7 +2568,7 @@ import { ListItem as ListItem6 } from "@transferwise/components";
|
|
|
2403
2568
|
|
|
2404
2569
|
// ../renderers/src/utils/listItem/getAdditionalInfo.tsx
|
|
2405
2570
|
import { ListItem as ListItem4 } from "@transferwise/components";
|
|
2406
|
-
import { jsx as
|
|
2571
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
2407
2572
|
var getAdditionalInfo = (additionalInfo) => {
|
|
2408
2573
|
var _a, _b;
|
|
2409
2574
|
if (!additionalInfo) {
|
|
@@ -2411,7 +2576,7 @@ var getAdditionalInfo = (additionalInfo) => {
|
|
|
2411
2576
|
}
|
|
2412
2577
|
const { href, text, onClick } = additionalInfo;
|
|
2413
2578
|
if (href || onClick) {
|
|
2414
|
-
return /* @__PURE__ */
|
|
2579
|
+
return /* @__PURE__ */ jsx35(
|
|
2415
2580
|
ListItem4.AdditionalInfo,
|
|
2416
2581
|
{
|
|
2417
2582
|
action: __spreadValues({
|
|
@@ -2420,19 +2585,19 @@ var getAdditionalInfo = (additionalInfo) => {
|
|
|
2420
2585
|
}
|
|
2421
2586
|
);
|
|
2422
2587
|
}
|
|
2423
|
-
return /* @__PURE__ */
|
|
2588
|
+
return /* @__PURE__ */ jsx35(ListItem4.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
|
|
2424
2589
|
};
|
|
2425
2590
|
|
|
2426
2591
|
// ../renderers/src/utils/listItem/getCTAControl.tsx
|
|
2427
2592
|
import { ListItem as ListItem5 } from "@transferwise/components";
|
|
2428
|
-
import { jsx as
|
|
2593
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2429
2594
|
var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
|
|
2430
2595
|
if (!callToAction) {
|
|
2431
2596
|
return void 0;
|
|
2432
2597
|
}
|
|
2433
2598
|
const { accessibilityDescription, title, context } = callToAction;
|
|
2434
2599
|
const { priority, sentiment } = getPriorityAndSentiment(ctaSecondary, context);
|
|
2435
|
-
return /* @__PURE__ */
|
|
2600
|
+
return /* @__PURE__ */ jsx36(
|
|
2436
2601
|
ListItem5.Button,
|
|
2437
2602
|
__spreadProps(__spreadValues({}, callToAction.getAnchorProps()), {
|
|
2438
2603
|
partiallyInteractive: !fullyInteractive,
|
|
@@ -2457,7 +2622,7 @@ var shouldUseAvatar = (control, tags) => {
|
|
|
2457
2622
|
};
|
|
2458
2623
|
|
|
2459
2624
|
// ../renderers/src/CollectionRenderer/components/ItemComponent.tsx
|
|
2460
|
-
import { jsx as
|
|
2625
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
2461
2626
|
var ItemComponent = (props) => {
|
|
2462
2627
|
var _a, _b;
|
|
2463
2628
|
const {
|
|
@@ -2478,7 +2643,7 @@ var ItemComponent = (props) => {
|
|
|
2478
2643
|
ctaSecondary: (_a = tags == null ? void 0 : tags.includes("cta-secondary")) != null ? _a : false,
|
|
2479
2644
|
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
2480
2645
|
};
|
|
2481
|
-
return /* @__PURE__ */
|
|
2646
|
+
return /* @__PURE__ */ jsx37(
|
|
2482
2647
|
ListItem6,
|
|
2483
2648
|
{
|
|
2484
2649
|
title,
|
|
@@ -2495,10 +2660,10 @@ var ItemComponent = (props) => {
|
|
|
2495
2660
|
};
|
|
2496
2661
|
var getNavigationControl = (onClick, href) => {
|
|
2497
2662
|
if (href) {
|
|
2498
|
-
return /* @__PURE__ */
|
|
2663
|
+
return /* @__PURE__ */ jsx37(ListItem6.Navigation, { href });
|
|
2499
2664
|
}
|
|
2500
2665
|
if (onClick) {
|
|
2501
|
-
return /* @__PURE__ */
|
|
2666
|
+
return /* @__PURE__ */ jsx37(ListItem6.Navigation, { onClick });
|
|
2502
2667
|
}
|
|
2503
2668
|
return null;
|
|
2504
2669
|
};
|
|
@@ -2506,13 +2671,13 @@ var getNavigationControl = (onClick, href) => {
|
|
|
2506
2671
|
// ../renderers/src/CollectionRenderer/components/SearchComponent.tsx
|
|
2507
2672
|
import { InputGroup, Input, ProcessIndicator as ProcessIndicator2 } from "@transferwise/components";
|
|
2508
2673
|
import { Search } from "@transferwise/icons";
|
|
2509
|
-
import { jsx as
|
|
2674
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
2510
2675
|
var SearchComponent = ({ state, status, features }) => {
|
|
2511
2676
|
const { search } = state;
|
|
2512
2677
|
if (!search) {
|
|
2513
2678
|
return;
|
|
2514
2679
|
}
|
|
2515
|
-
return /* @__PURE__ */
|
|
2680
|
+
return /* @__PURE__ */ jsx38(
|
|
2516
2681
|
FieldInput_default,
|
|
2517
2682
|
{
|
|
2518
2683
|
id: "search",
|
|
@@ -2521,12 +2686,12 @@ var SearchComponent = ({ state, status, features }) => {
|
|
|
2521
2686
|
help: "",
|
|
2522
2687
|
label: search.title,
|
|
2523
2688
|
features,
|
|
2524
|
-
children: /* @__PURE__ */
|
|
2689
|
+
children: /* @__PURE__ */ jsx38(
|
|
2525
2690
|
InputGroup,
|
|
2526
2691
|
{
|
|
2527
|
-
addonStart: { content: /* @__PURE__ */
|
|
2528
|
-
addonEnd: status.type === "loading" ? { content: /* @__PURE__ */
|
|
2529
|
-
children: /* @__PURE__ */
|
|
2692
|
+
addonStart: { content: /* @__PURE__ */ jsx38(Search, { size: 24 }) },
|
|
2693
|
+
addonEnd: status.type === "loading" ? { content: /* @__PURE__ */ jsx38(ProcessIndicator2, { size: "xs" }) } : void 0,
|
|
2694
|
+
children: /* @__PURE__ */ jsx38(
|
|
2530
2695
|
Input,
|
|
2531
2696
|
{
|
|
2532
2697
|
id: "search",
|
|
@@ -2547,14 +2712,14 @@ var SearchComponent = ({ state, status, features }) => {
|
|
|
2547
2712
|
};
|
|
2548
2713
|
|
|
2549
2714
|
// ../renderers/src/CollectionRenderer/components/SectionHeaderComponent.tsx
|
|
2550
|
-
import { jsx as
|
|
2715
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2551
2716
|
var SectionHeaderComponent = ({
|
|
2552
2717
|
title,
|
|
2553
2718
|
callToAction
|
|
2554
|
-
}) => /* @__PURE__ */
|
|
2719
|
+
}) => /* @__PURE__ */ jsx39(Header, { title, callToAction });
|
|
2555
2720
|
|
|
2556
2721
|
// ../renderers/src/CollectionRenderer/createCollectionRenderer.tsx
|
|
2557
|
-
import { jsx as
|
|
2722
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
2558
2723
|
var createCollectionRenderer = (canRender, components) => {
|
|
2559
2724
|
const componentsWithDefaults = __spreadValues({
|
|
2560
2725
|
Search: SearchComponent,
|
|
@@ -2568,22 +2733,22 @@ var createCollectionRenderer = (canRender, components) => {
|
|
|
2568
2733
|
canRenderType: "collection",
|
|
2569
2734
|
canRender,
|
|
2570
2735
|
render: (props) => {
|
|
2571
|
-
return /* @__PURE__ */
|
|
2736
|
+
return /* @__PURE__ */ jsx40(CollectionRendererComponent, __spreadValues(__spreadValues({}, props), componentsWithDefaults));
|
|
2572
2737
|
}
|
|
2573
2738
|
};
|
|
2574
2739
|
};
|
|
2575
2740
|
|
|
2576
2741
|
// ../renderers/src/CollectionRenderer/CollectionRenderer.tsx
|
|
2577
|
-
import { Fragment as Fragment3, jsx as
|
|
2742
|
+
import { Fragment as Fragment3, jsx as jsx41, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2578
2743
|
var CollectionRendererComponent = (props) => {
|
|
2579
2744
|
const { status, Search: Search4, Filters, Results } = props;
|
|
2580
2745
|
return /* @__PURE__ */ jsxs7(Fragment3, { children: [
|
|
2581
|
-
/* @__PURE__ */
|
|
2582
|
-
/* @__PURE__ */
|
|
2583
|
-
status.type === "idle" || status.type === "loading" ? /* @__PURE__ */
|
|
2746
|
+
/* @__PURE__ */ jsx41(Search4, __spreadValues({}, props)),
|
|
2747
|
+
/* @__PURE__ */ jsx41(Filters, __spreadValues({}, props)),
|
|
2748
|
+
status.type === "idle" || status.type === "loading" ? /* @__PURE__ */ jsx41(Results, __spreadValues({}, props)) : void 0,
|
|
2584
2749
|
status.type === "error" && status.reason === "search" && /* @__PURE__ */ jsxs7(InlinePrompt, { width: "full", sentiment: "negative", children: [
|
|
2585
2750
|
"Something went wrong,\xA0",
|
|
2586
|
-
/* @__PURE__ */
|
|
2751
|
+
/* @__PURE__ */ jsx41(DSLink, { onClick: status.retry, children: "click here to retry" })
|
|
2587
2752
|
] })
|
|
2588
2753
|
] });
|
|
2589
2754
|
};
|
|
@@ -2594,11 +2759,11 @@ var CollectionRenderer_default = CollectionRenderer;
|
|
|
2594
2759
|
var import_classnames3 = __toESM(require_classnames());
|
|
2595
2760
|
|
|
2596
2761
|
// ../renderers/src/utils/useIsCollapsed.ts
|
|
2597
|
-
import { useEffect as useEffect8, useState as
|
|
2762
|
+
import { useEffect as useEffect8, useState as useState8 } from "react";
|
|
2598
2763
|
var COLLAPSE_QUERY = "(max-width: 767.98px)";
|
|
2599
2764
|
var supportsMatchMedia = () => typeof window !== "undefined" && !!window.matchMedia;
|
|
2600
2765
|
var useIsCollapsed = () => {
|
|
2601
|
-
const [collapsed, setCollapsed] =
|
|
2766
|
+
const [collapsed, setCollapsed] = useState8(
|
|
2602
2767
|
() => supportsMatchMedia() && window.matchMedia(COLLAPSE_QUERY).matches
|
|
2603
2768
|
);
|
|
2604
2769
|
useEffect8(() => {
|
|
@@ -2614,7 +2779,7 @@ var useIsCollapsed = () => {
|
|
|
2614
2779
|
};
|
|
2615
2780
|
|
|
2616
2781
|
// ../renderers/src/ColumnsRenderer.tsx
|
|
2617
|
-
import { jsx as
|
|
2782
|
+
import { jsx as jsx42, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2618
2783
|
var RIGHT_FIRST_STACKING = "right-first-stacking";
|
|
2619
2784
|
var ColumnsRenderer = {
|
|
2620
2785
|
canRenderType: "columns",
|
|
@@ -2630,8 +2795,8 @@ function ColumnsRendererComponent({
|
|
|
2630
2795
|
var _a;
|
|
2631
2796
|
const isCollapsed = useIsCollapsed();
|
|
2632
2797
|
const reverse = isCollapsed && ((_a = tags == null ? void 0 : tags.includes(RIGHT_FIRST_STACKING)) != null ? _a : false);
|
|
2633
|
-
const startColumn = /* @__PURE__ */
|
|
2634
|
-
const endColumn = /* @__PURE__ */
|
|
2798
|
+
const startColumn = /* @__PURE__ */ jsx42("div", { className: "df-columns-renderer-column", children: startChildren });
|
|
2799
|
+
const endColumn = /* @__PURE__ */ jsx42("div", { className: "df-columns-renderer-column", children: endChildren });
|
|
2635
2800
|
return /* @__PURE__ */ jsxs8(
|
|
2636
2801
|
"div",
|
|
2637
2802
|
{
|
|
@@ -2676,7 +2841,7 @@ var dateToDateString = (date) => {
|
|
|
2676
2841
|
};
|
|
2677
2842
|
|
|
2678
2843
|
// ../renderers/src/components/VariableDateInput.tsx
|
|
2679
|
-
import { jsx as
|
|
2844
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
2680
2845
|
function VariableDateInput({
|
|
2681
2846
|
control,
|
|
2682
2847
|
inputProps
|
|
@@ -2692,7 +2857,7 @@ function VariableDateInput({
|
|
|
2692
2857
|
onFocus
|
|
2693
2858
|
} = inputProps;
|
|
2694
2859
|
if (control === "date-lookup") {
|
|
2695
|
-
return /* @__PURE__ */
|
|
2860
|
+
return /* @__PURE__ */ jsx43(
|
|
2696
2861
|
DateLookup,
|
|
2697
2862
|
{
|
|
2698
2863
|
value: dateStringToDateOrNull(inputProps.value),
|
|
@@ -2708,7 +2873,7 @@ function VariableDateInput({
|
|
|
2708
2873
|
}
|
|
2709
2874
|
);
|
|
2710
2875
|
}
|
|
2711
|
-
return /* @__PURE__ */
|
|
2876
|
+
return /* @__PURE__ */ jsx43(
|
|
2712
2877
|
DateInput,
|
|
2713
2878
|
__spreadProps(__spreadValues({}, inputProps), {
|
|
2714
2879
|
dayAutoComplete: getAutocompleteString(autoComplete, "day"),
|
|
@@ -2725,7 +2890,7 @@ var getAutocompleteString = (value, suffix) => {
|
|
|
2725
2890
|
var VariableDateInput_default = VariableDateInput;
|
|
2726
2891
|
|
|
2727
2892
|
// ../renderers/src/DateInputRenderer.tsx
|
|
2728
|
-
import { jsx as
|
|
2893
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
2729
2894
|
var DateInputRenderer = {
|
|
2730
2895
|
canRenderType: "input-date",
|
|
2731
2896
|
render: (props) => {
|
|
@@ -2750,7 +2915,7 @@ var DateInputRenderer = {
|
|
|
2750
2915
|
]);
|
|
2751
2916
|
const value = initialValue != null ? initialValue : "";
|
|
2752
2917
|
const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
|
|
2753
|
-
return /* @__PURE__ */
|
|
2918
|
+
return /* @__PURE__ */ jsx44(
|
|
2754
2919
|
FieldInput_default,
|
|
2755
2920
|
{
|
|
2756
2921
|
id,
|
|
@@ -2761,7 +2926,7 @@ var DateInputRenderer = {
|
|
|
2761
2926
|
loadingState: props.fieldLoadingState,
|
|
2762
2927
|
help,
|
|
2763
2928
|
features: props.features,
|
|
2764
|
-
children: /* @__PURE__ */
|
|
2929
|
+
children: /* @__PURE__ */ jsx44(VariableDateInput_default, { control, inputProps })
|
|
2765
2930
|
}
|
|
2766
2931
|
);
|
|
2767
2932
|
}
|
|
@@ -2773,7 +2938,7 @@ import { ListItem as ListItem7 } from "@transferwise/components";
|
|
|
2773
2938
|
|
|
2774
2939
|
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
2775
2940
|
import { Header as Header3, SearchInput } from "@transferwise/components";
|
|
2776
|
-
import { useState as
|
|
2941
|
+
import { useState as useState9 } from "react";
|
|
2777
2942
|
import { useIntl as useIntl5 } from "react-intl";
|
|
2778
2943
|
|
|
2779
2944
|
// ../renderers/src/messages/filter.messages.ts
|
|
@@ -2883,7 +3048,7 @@ var getGroupsFromTags = (knownTags, items) => {
|
|
|
2883
3048
|
};
|
|
2884
3049
|
|
|
2885
3050
|
// ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
|
|
2886
|
-
import { Fragment as Fragment4, jsx as
|
|
3051
|
+
import { Fragment as Fragment4, jsx as jsx45, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2887
3052
|
var groupingTags = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
2888
3053
|
var isGroupedDecision = (options) => {
|
|
2889
3054
|
return getGroupsFromTags(groupingTags, options).length > 0;
|
|
@@ -2893,8 +3058,8 @@ var GroupedDecisionList = (_a) => {
|
|
|
2893
3058
|
const { formatMessage } = useIntl4();
|
|
2894
3059
|
const { options } = rest;
|
|
2895
3060
|
const itemsByTag = [...getGroupsFromTags(groupingTags, options), { tag: "all", items: options }];
|
|
2896
|
-
return /* @__PURE__ */
|
|
2897
|
-
/* @__PURE__ */
|
|
3061
|
+
return /* @__PURE__ */ jsx45(Fragment4, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ jsxs9(Section, { children: [
|
|
3062
|
+
/* @__PURE__ */ jsx45(
|
|
2898
3063
|
Header2,
|
|
2899
3064
|
{
|
|
2900
3065
|
as: "h2",
|
|
@@ -2906,26 +3071,26 @@ var GroupedDecisionList = (_a) => {
|
|
|
2906
3071
|
};
|
|
2907
3072
|
|
|
2908
3073
|
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
2909
|
-
import { Fragment as Fragment5, jsx as
|
|
3074
|
+
import { Fragment as Fragment5, jsx as jsx46, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2910
3075
|
var DecisionWrapper = (props) => {
|
|
2911
3076
|
const { title, control, margin } = props;
|
|
2912
3077
|
return /* @__PURE__ */ jsxs10("div", { className: getMargin(margin), children: [
|
|
2913
|
-
title && /* @__PURE__ */
|
|
2914
|
-
control === "filtered" ? /* @__PURE__ */
|
|
3078
|
+
title && /* @__PURE__ */ jsx46(Header3, { as: "h2", title }),
|
|
3079
|
+
control === "filtered" ? /* @__PURE__ */ jsx46(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsx46(UnfilteredDecisionList, __spreadValues({}, props))
|
|
2915
3080
|
] });
|
|
2916
3081
|
};
|
|
2917
3082
|
var UnfilteredDecisionList = (_a) => {
|
|
2918
3083
|
var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
|
|
2919
|
-
return isGroupedDecision(rest.options) ? /* @__PURE__ */
|
|
3084
|
+
return isGroupedDecision(rest.options) ? /* @__PURE__ */ jsx46(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
|
|
2920
3085
|
};
|
|
2921
3086
|
var FilteredDecisionList = (props) => {
|
|
2922
3087
|
const { formatMessage } = useIntl5();
|
|
2923
|
-
const [query, setQuery] =
|
|
3088
|
+
const [query, setQuery] = useState9("");
|
|
2924
3089
|
const { control, options, renderDecisionList: renderDecisionList2 } = props;
|
|
2925
3090
|
const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortItems(options, query) : options;
|
|
2926
3091
|
const isGrouped = isGroupedDecision(options);
|
|
2927
3092
|
return /* @__PURE__ */ jsxs10(Fragment5, { children: [
|
|
2928
|
-
/* @__PURE__ */
|
|
3093
|
+
/* @__PURE__ */ jsx46(
|
|
2929
3094
|
SearchInput,
|
|
2930
3095
|
{
|
|
2931
3096
|
placeholder: formatMessage(filter_messages_default.placeholder),
|
|
@@ -2937,25 +3102,25 @@ var FilteredDecisionList = (props) => {
|
|
|
2937
3102
|
}
|
|
2938
3103
|
}
|
|
2939
3104
|
),
|
|
2940
|
-
isGrouped && query.length === 0 ? /* @__PURE__ */
|
|
2941
|
-
query.length > 0 && /* @__PURE__ */
|
|
3105
|
+
isGrouped && query.length === 0 ? /* @__PURE__ */ jsx46(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsxs10(Fragment5, { children: [
|
|
3106
|
+
query.length > 0 && /* @__PURE__ */ jsx46(Header3, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
|
|
2942
3107
|
filteredOptions.length > 0 ? renderDecisionList2({
|
|
2943
3108
|
control,
|
|
2944
3109
|
className: query.length === 0 ? "m-t-3" : "",
|
|
2945
3110
|
options: filteredOptions
|
|
2946
|
-
}) : /* @__PURE__ */
|
|
3111
|
+
}) : /* @__PURE__ */ jsx46("p", { children: formatMessage(filter_messages_default.noResults) })
|
|
2947
3112
|
] })
|
|
2948
3113
|
] });
|
|
2949
3114
|
};
|
|
2950
3115
|
|
|
2951
3116
|
// ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
|
|
2952
|
-
import { Fragment as Fragment6, jsx as
|
|
3117
|
+
import { Fragment as Fragment6, jsx as jsx47 } from "react/jsx-runtime";
|
|
2953
3118
|
var DecisionRenderer = {
|
|
2954
3119
|
canRenderType: "decision",
|
|
2955
|
-
render: (props) => /* @__PURE__ */
|
|
3120
|
+
render: (props) => /* @__PURE__ */ jsx47(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
|
|
2956
3121
|
};
|
|
2957
3122
|
var renderDecisionList = ({ options, control }) => {
|
|
2958
|
-
return /* @__PURE__ */
|
|
3123
|
+
return /* @__PURE__ */ jsx47(Fragment6, { children: options.map((_a) => {
|
|
2959
3124
|
var _b = _a, { onClick } = _b, rest = __objRest(_b, ["onClick"]);
|
|
2960
3125
|
const {
|
|
2961
3126
|
description,
|
|
@@ -2968,7 +3133,7 @@ var renderDecisionList = ({ options, control }) => {
|
|
|
2968
3133
|
supportingValues,
|
|
2969
3134
|
tags
|
|
2970
3135
|
} = rest;
|
|
2971
|
-
return /* @__PURE__ */
|
|
3136
|
+
return /* @__PURE__ */ jsx47(
|
|
2972
3137
|
ListItem7,
|
|
2973
3138
|
{
|
|
2974
3139
|
title: itemTitle,
|
|
@@ -2980,7 +3145,7 @@ var renderDecisionList = ({ options, control }) => {
|
|
|
2980
3145
|
media: getMedia(media, shouldUseAvatar(control, tags)),
|
|
2981
3146
|
prompt: getInlineAlert(inlineAlert),
|
|
2982
3147
|
additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
|
|
2983
|
-
control: /* @__PURE__ */
|
|
3148
|
+
control: /* @__PURE__ */ jsx47(ListItem7.Navigation, __spreadValues({}, getAnchorProps()))
|
|
2984
3149
|
},
|
|
2985
3150
|
JSON.stringify(rest)
|
|
2986
3151
|
);
|
|
@@ -2990,7 +3155,7 @@ var DecisionRenderer_default = DecisionRenderer;
|
|
|
2990
3155
|
|
|
2991
3156
|
// ../renderers/src/DividerRenderer.tsx
|
|
2992
3157
|
import { Divider } from "@transferwise/components";
|
|
2993
|
-
import { jsx as
|
|
3158
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
2994
3159
|
var mapControlToLevel = (control) => {
|
|
2995
3160
|
switch (control) {
|
|
2996
3161
|
case "section":
|
|
@@ -3003,7 +3168,7 @@ var mapControlToLevel = (control) => {
|
|
|
3003
3168
|
};
|
|
3004
3169
|
var DividerRenderer = {
|
|
3005
3170
|
canRenderType: "divider",
|
|
3006
|
-
render: ({ margin, control }) => /* @__PURE__ */
|
|
3171
|
+
render: ({ margin, control }) => /* @__PURE__ */ jsx48(Divider, { className: `m-t-0 d-block ${getMargin(margin)}`, level: mapControlToLevel(control) })
|
|
3007
3172
|
};
|
|
3008
3173
|
var DividerRenderer_default = DividerRenderer;
|
|
3009
3174
|
|
|
@@ -3038,7 +3203,7 @@ var external_confirmation_messages_default = defineMessages6({
|
|
|
3038
3203
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
3039
3204
|
import { useIntl as useIntl6 } from "react-intl";
|
|
3040
3205
|
import { useEffect as useEffect9 } from "react";
|
|
3041
|
-
import { Fragment as Fragment7, jsx as
|
|
3206
|
+
import { Fragment as Fragment7, jsx as jsx49, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3042
3207
|
var ExternalConfirmationRenderer = {
|
|
3043
3208
|
canRenderType: "external-confirmation",
|
|
3044
3209
|
render: ExternalConfirmationRendererComponent
|
|
@@ -3053,15 +3218,15 @@ function ExternalConfirmationRendererComponent({
|
|
|
3053
3218
|
useEffect9(() => {
|
|
3054
3219
|
open();
|
|
3055
3220
|
}, []);
|
|
3056
|
-
return /* @__PURE__ */
|
|
3221
|
+
return /* @__PURE__ */ jsx49(
|
|
3057
3222
|
Modal,
|
|
3058
3223
|
{
|
|
3059
3224
|
open: visible,
|
|
3060
3225
|
title: formatMessage(external_confirmation_messages_default.title),
|
|
3061
3226
|
body: /* @__PURE__ */ jsxs11(Fragment7, { children: [
|
|
3062
|
-
/* @__PURE__ */
|
|
3063
|
-
/* @__PURE__ */
|
|
3064
|
-
/* @__PURE__ */
|
|
3227
|
+
/* @__PURE__ */ jsx49(Markdown3, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
|
|
3228
|
+
/* @__PURE__ */ jsx49("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs11("div", { className: "df-box-renderer-width-lg", children: [
|
|
3229
|
+
/* @__PURE__ */ jsx49(
|
|
3065
3230
|
Button5,
|
|
3066
3231
|
{
|
|
3067
3232
|
v2: true,
|
|
@@ -3075,7 +3240,7 @@ function ExternalConfirmationRendererComponent({
|
|
|
3075
3240
|
children: formatMessage(external_confirmation_messages_default.open)
|
|
3076
3241
|
}
|
|
3077
3242
|
),
|
|
3078
|
-
/* @__PURE__ */
|
|
3243
|
+
/* @__PURE__ */ jsx49(Button5, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
|
|
3079
3244
|
] }) })
|
|
3080
3245
|
] }),
|
|
3081
3246
|
onClose: onCancel
|
|
@@ -3092,27 +3257,27 @@ function getOrigin(url) {
|
|
|
3092
3257
|
var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
|
|
3093
3258
|
|
|
3094
3259
|
// ../renderers/src/FormRenderer.tsx
|
|
3095
|
-
import { jsx as
|
|
3260
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
3096
3261
|
var FormRenderer = {
|
|
3097
3262
|
canRenderType: "form",
|
|
3098
|
-
render: ({ children, margin }) => /* @__PURE__ */
|
|
3263
|
+
render: ({ children, margin }) => /* @__PURE__ */ jsx50("div", { className: getMargin(margin), children })
|
|
3099
3264
|
};
|
|
3100
3265
|
var FormRenderer_default = FormRenderer;
|
|
3101
3266
|
|
|
3102
3267
|
// ../renderers/src/FormSectionRenderer.tsx
|
|
3103
3268
|
import { Header as Header4 } from "@transferwise/components";
|
|
3104
|
-
import { jsx as
|
|
3269
|
+
import { jsx as jsx51, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3105
3270
|
var FormSectionRenderer = {
|
|
3106
3271
|
canRenderType: "form-section",
|
|
3107
3272
|
render: ({ title, description, children }) => /* @__PURE__ */ jsxs12("fieldset", { children: [
|
|
3108
|
-
title && /* @__PURE__ */
|
|
3273
|
+
title && /* @__PURE__ */ jsx51(
|
|
3109
3274
|
Header4,
|
|
3110
3275
|
{
|
|
3111
3276
|
as: "h2",
|
|
3112
3277
|
title
|
|
3113
3278
|
}
|
|
3114
3279
|
),
|
|
3115
|
-
description && /* @__PURE__ */
|
|
3280
|
+
description && /* @__PURE__ */ jsx51("p", { children: description }),
|
|
3116
3281
|
children
|
|
3117
3282
|
] })
|
|
3118
3283
|
};
|
|
@@ -3120,18 +3285,18 @@ var FormSectionRenderer_default = FormSectionRenderer;
|
|
|
3120
3285
|
|
|
3121
3286
|
// ../renderers/src/HeadingRenderer.tsx
|
|
3122
3287
|
import { Display, Title } from "@transferwise/components";
|
|
3123
|
-
import { jsx as
|
|
3288
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
3124
3289
|
var HeadingRenderer = {
|
|
3125
3290
|
canRenderType: "heading",
|
|
3126
|
-
render: (props) => /* @__PURE__ */
|
|
3291
|
+
render: (props) => /* @__PURE__ */ jsx52(Heading, __spreadValues({}, props))
|
|
3127
3292
|
};
|
|
3128
3293
|
function Heading(props) {
|
|
3129
3294
|
const { text, size, align, margin, control } = props;
|
|
3130
3295
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
3131
|
-
return control === "display" ? /* @__PURE__ */
|
|
3296
|
+
return control === "display" ? /* @__PURE__ */ jsx52(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx52(StandardHeading, { size, text, className });
|
|
3132
3297
|
}
|
|
3133
3298
|
function DisplayHeading({ size, text, className }) {
|
|
3134
|
-
return /* @__PURE__ */
|
|
3299
|
+
return /* @__PURE__ */ jsx52(Display, { type: getDisplayType(size), className, children: text });
|
|
3135
3300
|
}
|
|
3136
3301
|
var getDisplayType = (size) => {
|
|
3137
3302
|
switch (size) {
|
|
@@ -3147,7 +3312,7 @@ var getDisplayType = (size) => {
|
|
|
3147
3312
|
}
|
|
3148
3313
|
};
|
|
3149
3314
|
function StandardHeading({ size, text, className }) {
|
|
3150
|
-
return /* @__PURE__ */
|
|
3315
|
+
return /* @__PURE__ */ jsx52(Title, { type: getTitleTypeBySize(size), className, children: text });
|
|
3151
3316
|
}
|
|
3152
3317
|
var getTitleTypeBySize = (size) => {
|
|
3153
3318
|
var _a;
|
|
@@ -3164,7 +3329,7 @@ var HeadingRenderer_default = HeadingRenderer;
|
|
|
3164
3329
|
|
|
3165
3330
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
3166
3331
|
import { Image } from "@transferwise/components";
|
|
3167
|
-
import { useEffect as useEffect10, useState as
|
|
3332
|
+
import { useEffect as useEffect10, useState as useState10 } from "react";
|
|
3168
3333
|
|
|
3169
3334
|
// ../renderers/src/utils/api-utils.ts
|
|
3170
3335
|
function isRelativePath(url = "") {
|
|
@@ -3174,7 +3339,7 @@ function isRelativePath(url = "") {
|
|
|
3174
3339
|
}
|
|
3175
3340
|
|
|
3176
3341
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
3177
|
-
import { jsx as
|
|
3342
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
3178
3343
|
function UrlImage({
|
|
3179
3344
|
accessibilityDescription,
|
|
3180
3345
|
align,
|
|
@@ -3183,13 +3348,13 @@ function UrlImage({
|
|
|
3183
3348
|
uri,
|
|
3184
3349
|
httpClient
|
|
3185
3350
|
}) {
|
|
3186
|
-
const [imageSource, setImageSource] =
|
|
3351
|
+
const [imageSource, setImageSource] = useState10("");
|
|
3187
3352
|
useEffect10(() => {
|
|
3188
3353
|
if (!uri.startsWith("urn:")) {
|
|
3189
3354
|
void getImageSource(httpClient, uri).then(setImageSource);
|
|
3190
3355
|
}
|
|
3191
3356
|
}, [uri, httpClient]);
|
|
3192
|
-
return /* @__PURE__ */
|
|
3357
|
+
return /* @__PURE__ */ jsx53("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx53(
|
|
3193
3358
|
Image,
|
|
3194
3359
|
{
|
|
3195
3360
|
className: "df-reserve-space",
|
|
@@ -3232,121 +3397,6 @@ var getImageSource = async (httpClient, imageUrl) => {
|
|
|
3232
3397
|
}
|
|
3233
3398
|
};
|
|
3234
3399
|
|
|
3235
|
-
// ../renderers/src/ImageRenderer/UrnFlagImage.tsx
|
|
3236
|
-
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
3237
|
-
var maxFlagSize = 600;
|
|
3238
|
-
function UrnFlagImage({
|
|
3239
|
-
accessibilityDescription,
|
|
3240
|
-
align,
|
|
3241
|
-
margin,
|
|
3242
|
-
size,
|
|
3243
|
-
uri
|
|
3244
|
-
}) {
|
|
3245
|
-
return /* @__PURE__ */ jsx50("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx50(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
|
|
3246
|
-
}
|
|
3247
|
-
|
|
3248
|
-
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
3249
|
-
import {
|
|
3250
|
-
Illustration,
|
|
3251
|
-
isIllustrationSupport3D
|
|
3252
|
-
} from "@wise/art";
|
|
3253
|
-
import { useState as useState10 } from "react";
|
|
3254
|
-
|
|
3255
|
-
// ../renderers/src/ImageRenderer/isAnimated.ts
|
|
3256
|
-
var isAnimated = (uri) => {
|
|
3257
|
-
const { rComponents } = stringToURN(uri);
|
|
3258
|
-
return rComponents.type === "animated";
|
|
3259
|
-
};
|
|
3260
|
-
|
|
3261
|
-
// ../renderers/src/ImageRenderer/SafeIllustration3D.tsx
|
|
3262
|
-
import { Illustration3D } from "@wise/art";
|
|
3263
|
-
import { Component } from "react";
|
|
3264
|
-
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
3265
|
-
var Illustration3DErrorBoundary = class extends Component {
|
|
3266
|
-
constructor(props) {
|
|
3267
|
-
super(props);
|
|
3268
|
-
this.state = { hasError: false };
|
|
3269
|
-
}
|
|
3270
|
-
static getDerivedStateFromError() {
|
|
3271
|
-
return { hasError: true };
|
|
3272
|
-
}
|
|
3273
|
-
componentDidCatch() {
|
|
3274
|
-
this.props.onError();
|
|
3275
|
-
}
|
|
3276
|
-
render() {
|
|
3277
|
-
if (this.state.hasError) {
|
|
3278
|
-
return null;
|
|
3279
|
-
}
|
|
3280
|
-
return this.props.children;
|
|
3281
|
-
}
|
|
3282
|
-
};
|
|
3283
|
-
var SafeIllustration3D = ({
|
|
3284
|
-
name,
|
|
3285
|
-
size,
|
|
3286
|
-
onError
|
|
3287
|
-
}) => {
|
|
3288
|
-
return /* @__PURE__ */ jsx51(Illustration3DErrorBoundary, { onError, children: /* @__PURE__ */ jsx51(Illustration3D, { name, size }) });
|
|
3289
|
-
};
|
|
3290
|
-
var SafeIllustration3D_default = SafeIllustration3D;
|
|
3291
|
-
|
|
3292
|
-
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
3293
|
-
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
3294
|
-
var urnPrefix = "urn:wise:illustrations:";
|
|
3295
|
-
var isUrnIllustration = (uri) => uri.startsWith(urnPrefix);
|
|
3296
|
-
function UrnIllustration({
|
|
3297
|
-
accessibilityDescription,
|
|
3298
|
-
align,
|
|
3299
|
-
margin,
|
|
3300
|
-
size,
|
|
3301
|
-
uri
|
|
3302
|
-
}) {
|
|
3303
|
-
const [has3DFailed, setHas3DFailed] = useState10(false);
|
|
3304
|
-
const illustrationSize = getIllustrationSize(size);
|
|
3305
|
-
const illustrationName = getIllustrationName(uri);
|
|
3306
|
-
const illustration3DName = getIllustration3DName(uri);
|
|
3307
|
-
if (illustration3DName && isAnimated(uri) && !has3DFailed) {
|
|
3308
|
-
return /* @__PURE__ */ jsx52("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx52(
|
|
3309
|
-
SafeIllustration3D_default,
|
|
3310
|
-
{
|
|
3311
|
-
name: illustration3DName,
|
|
3312
|
-
size: illustrationSize,
|
|
3313
|
-
onError: () => setHas3DFailed(true)
|
|
3314
|
-
}
|
|
3315
|
-
) });
|
|
3316
|
-
}
|
|
3317
|
-
return /* @__PURE__ */ jsx52("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx52(
|
|
3318
|
-
Illustration,
|
|
3319
|
-
{
|
|
3320
|
-
className: "df-illustration",
|
|
3321
|
-
name: illustrationName,
|
|
3322
|
-
size: illustrationSize,
|
|
3323
|
-
alt: accessibilityDescription
|
|
3324
|
-
}
|
|
3325
|
-
) });
|
|
3326
|
-
}
|
|
3327
|
-
var getIllustrationSize = (size) => ({ xs: "small", sm: "small", md: "medium", lg: "large", xl: "large" })[size] || "medium";
|
|
3328
|
-
var getIllustrationName = (uri) => {
|
|
3329
|
-
return uri.replace(urnPrefix, "").split("?")[0];
|
|
3330
|
-
};
|
|
3331
|
-
var getIllustration3DName = (uri) => {
|
|
3332
|
-
const illustrationName = getIllustrationName(uri);
|
|
3333
|
-
return isIllustrationSupport3D(illustrationName) ? illustrationName : null;
|
|
3334
|
-
};
|
|
3335
|
-
|
|
3336
|
-
// ../renderers/src/ImageRenderer/UrnImage.tsx
|
|
3337
|
-
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
3338
|
-
var isUrnImage = (uri) => uri.startsWith("urn:");
|
|
3339
|
-
function UrnImage(props) {
|
|
3340
|
-
const { uri } = props;
|
|
3341
|
-
if (isUrnIllustration(uri)) {
|
|
3342
|
-
return /* @__PURE__ */ jsx53(UrnIllustration, __spreadValues({}, props));
|
|
3343
|
-
}
|
|
3344
|
-
if (isUrnFlag(uri)) {
|
|
3345
|
-
return /* @__PURE__ */ jsx53(UrnFlagImage, __spreadValues({}, props));
|
|
3346
|
-
}
|
|
3347
|
-
return null;
|
|
3348
|
-
}
|
|
3349
|
-
|
|
3350
3400
|
// ../renderers/src/ImageRenderer/ImageRenderer.tsx
|
|
3351
3401
|
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
3352
3402
|
var ImageRenderer = {
|
|
@@ -6142,6 +6192,7 @@ import { findRendererPropsByType } from "@wise/dynamic-flow-client";
|
|
|
6142
6192
|
var Header10 = Header;
|
|
6143
6193
|
var Media2 = Media;
|
|
6144
6194
|
var getMargin2 = getMargin;
|
|
6195
|
+
var createCollectionRenderer2 = createCollectionRenderer;
|
|
6145
6196
|
|
|
6146
6197
|
// src/i18n/index.ts
|
|
6147
6198
|
import { translations as coreTranslations } from "@wise/dynamic-flow-client";
|
|
@@ -7027,6 +7078,7 @@ export {
|
|
|
7027
7078
|
DynamicFlowWithRef,
|
|
7028
7079
|
Header10 as Header,
|
|
7029
7080
|
Media2 as Media,
|
|
7081
|
+
createCollectionRenderer2 as createCollectionRenderer,
|
|
7030
7082
|
findRendererPropsByType,
|
|
7031
7083
|
getMargin2 as getMargin,
|
|
7032
7084
|
makeHttpClient as makeCustomFetch,
|