@wise/dynamic-flow-client-internal 5.25.2 → 5.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/i18n/ar.json +1 -0
- package/build/i18n/cs.json +1 -0
- package/build/i18n/de.json +1 -0
- package/build/i18n/en.json +1 -0
- package/build/i18n/es.json +1 -0
- package/build/i18n/fr.json +1 -0
- package/build/i18n/hu.json +1 -0
- package/build/i18n/id.json +1 -0
- package/build/i18n/it.json +1 -0
- package/build/i18n/ja.json +1 -0
- package/build/i18n/ko.json +1 -0
- package/build/i18n/nl.json +1 -0
- package/build/i18n/pl.json +1 -0
- package/build/i18n/pt.json +1 -0
- package/build/i18n/ro.json +1 -0
- package/build/i18n/ru.json +1 -0
- package/build/i18n/sv.json +1 -0
- package/build/i18n/th.json +1 -0
- package/build/i18n/tr.json +1 -0
- package/build/i18n/uk.json +1 -0
- package/build/i18n/zh_CN.json +1 -0
- package/build/i18n/zh_HK.json +1 -0
- package/build/main.css +7 -0
- package/build/main.js +554 -427
- package/build/main.mjs +533 -406
- 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 +5 -5
package/build/main.js
CHANGED
|
@@ -131,6 +131,7 @@ __export(index_exports, {
|
|
|
131
131
|
DynamicFlowWithRef: () => DynamicFlowWithRef,
|
|
132
132
|
Header: () => Header10,
|
|
133
133
|
Media: () => Media2,
|
|
134
|
+
createCollectionRenderer: () => createCollectionRenderer2,
|
|
134
135
|
findRendererPropsByType: () => import_dynamic_flow_client8.findRendererPropsByType,
|
|
135
136
|
getMargin: () => getMargin2,
|
|
136
137
|
makeCustomFetch: () => import_dynamic_flow_client7.makeHttpClient,
|
|
@@ -145,22 +146,27 @@ var import_dynamic_flow_client4 = require("@wise/dynamic-flow-client");
|
|
|
145
146
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
146
147
|
var appVersion = (
|
|
147
148
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
148
|
-
typeof process !== "undefined" ? "5.
|
|
149
|
+
typeof process !== "undefined" ? "5.26.0" : "0.0.0"
|
|
149
150
|
);
|
|
150
151
|
|
|
151
152
|
// src/dynamicFlow/context-menu/useContextMenu.tsx
|
|
152
153
|
var import_react = require("react");
|
|
153
154
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
154
|
-
function useContextMenu({
|
|
155
|
+
function useContextMenu({
|
|
156
|
+
title,
|
|
157
|
+
subtitle,
|
|
158
|
+
items
|
|
159
|
+
}) {
|
|
155
160
|
const { menuPosition, openMenuAt, closeMenu } = useMenuPosition();
|
|
156
161
|
const onContextMenu = (event) => {
|
|
157
|
-
if (items.length > 0) {
|
|
162
|
+
if (items.length > 0 && !event.shiftKey) {
|
|
158
163
|
event.preventDefault();
|
|
159
164
|
openMenuAt({ x: event.clientX, y: event.clientY });
|
|
160
165
|
}
|
|
161
166
|
};
|
|
162
167
|
const contextMenu = menuPosition ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "df-context-menu", style: { top: menuPosition.y, left: menuPosition.x }, children: [
|
|
163
168
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "menu-header", children: title }),
|
|
169
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "menu-subtitle", children: subtitle }),
|
|
164
170
|
items.map(({ label, onClick }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
165
171
|
"button",
|
|
166
172
|
{
|
|
@@ -222,6 +228,7 @@ var useDFContextMenu = (controller) => {
|
|
|
222
228
|
};
|
|
223
229
|
return useContextMenu({
|
|
224
230
|
title: "DynamicFlow Menu (Dev/Staging only)",
|
|
231
|
+
subtitle: "Shift + right-click for browser menu",
|
|
225
232
|
items: isDevOrStaging() ? [
|
|
226
233
|
{
|
|
227
234
|
label: `DF client version: ${appVersion}`,
|
|
@@ -335,7 +342,7 @@ var import_react29 = require("react");
|
|
|
335
342
|
var import_dynamic_flow_client2 = require("@wise/dynamic-flow-client");
|
|
336
343
|
|
|
337
344
|
// ../renderers/src/AlertRenderer/AlertRenderer.tsx
|
|
338
|
-
var
|
|
345
|
+
var import_react4 = require("react");
|
|
339
346
|
|
|
340
347
|
// ../renderers/src/AlertRenderer/ActionPromptComponent.tsx
|
|
341
348
|
var import_components5 = require("@transferwise/components");
|
|
@@ -372,13 +379,13 @@ var isNamedIcon = (name) => {
|
|
|
372
379
|
const iconName = toCapitalisedCamelCase(name);
|
|
373
380
|
return Object.keys(icons).includes(iconName);
|
|
374
381
|
};
|
|
375
|
-
function NamedIcon({ name }) {
|
|
382
|
+
function NamedIcon({ name, title, size }) {
|
|
376
383
|
if (!isNamedIcon(name)) {
|
|
377
384
|
return null;
|
|
378
385
|
}
|
|
379
386
|
const iconName = toCapitalisedCamelCase(name);
|
|
380
387
|
const Icon = icons[iconName];
|
|
381
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { size: 24 });
|
|
388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { size: size != null ? size : 24, title: title != null ? title : iconName });
|
|
382
389
|
}
|
|
383
390
|
var toCapitalisedCamelCase = (value) => value.split("-").map(capitaliseFirstChar).join("");
|
|
384
391
|
var capitaliseFirstChar = (value) => value.length === 0 ? "" : `${value[0].toUpperCase()}${value.slice(1)}`;
|
|
@@ -398,11 +405,14 @@ function isValidIconName(name) {
|
|
|
398
405
|
return isNamedIcon(name) || isFlagIcon(name);
|
|
399
406
|
}
|
|
400
407
|
function isValidIconUrn(uri) {
|
|
408
|
+
const name = extractIconNameFromUri(uri);
|
|
409
|
+
return !!name && isValidIconName(name);
|
|
410
|
+
}
|
|
411
|
+
function extractIconNameFromUri(uri) {
|
|
401
412
|
if (!uri.startsWith("urn:wise:icons:")) {
|
|
402
|
-
return
|
|
413
|
+
return void 0;
|
|
403
414
|
}
|
|
404
|
-
|
|
405
|
-
return isValidIconName(name);
|
|
415
|
+
return uri.replace("urn:wise:icons:", "").split("?")[0];
|
|
406
416
|
}
|
|
407
417
|
var DynamicIcon_default = DynamicIcon;
|
|
408
418
|
|
|
@@ -473,23 +483,23 @@ var formatColor = (color) => {
|
|
|
473
483
|
// ../renderers/src/components/Media/AvatarMedia.tsx
|
|
474
484
|
var import_components = require("@transferwise/components");
|
|
475
485
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
486
|
+
var getRenderableAvatar = (avatar, size) => {
|
|
487
|
+
if (avatar.type === "text") {
|
|
488
|
+
return {
|
|
489
|
+
asset: avatar.text,
|
|
490
|
+
badge: avatar.badgeUri ? resolveMediaFromUri(avatar.badgeUri, 16) : void 0
|
|
491
|
+
};
|
|
492
|
+
}
|
|
493
|
+
return __spreadProps(__spreadValues({}, resolveMediaFromUri(avatar.uri, size)), {
|
|
494
|
+
badge: avatar.badgeUri ? resolveMediaFromUri(avatar.badgeUri, 16) : void 0
|
|
495
|
+
});
|
|
496
|
+
};
|
|
476
497
|
var AvatarMedia = ({
|
|
477
498
|
accessibilityDescription,
|
|
478
499
|
content,
|
|
479
500
|
size
|
|
480
501
|
}) => {
|
|
481
|
-
const
|
|
482
|
-
if (avatar.type === "text") {
|
|
483
|
-
return {
|
|
484
|
-
asset: avatar.text,
|
|
485
|
-
badge: avatar.badgeUri ? resolveMediaFromUri(avatar.badgeUri, 16) : void 0
|
|
486
|
-
};
|
|
487
|
-
}
|
|
488
|
-
return __spreadProps(__spreadValues({}, resolveMediaFromUri(avatar.uri, size)), {
|
|
489
|
-
badge: avatar.badgeUri ? resolveMediaFromUri(avatar.badgeUri, 16) : void 0
|
|
490
|
-
});
|
|
491
|
-
};
|
|
492
|
-
const avatars = content.map(getRenderableAvatar);
|
|
502
|
+
const avatars = content.map((avatar) => getRenderableAvatar(avatar, size));
|
|
493
503
|
if (avatars.length === 1) {
|
|
494
504
|
const { badge, backgroundColor, color, asset, icon } = avatars[0];
|
|
495
505
|
if (!asset && !icon) {
|
|
@@ -500,7 +510,7 @@ var AvatarMedia = ({
|
|
|
500
510
|
{
|
|
501
511
|
"aria-label": accessibilityDescription,
|
|
502
512
|
size,
|
|
503
|
-
badge: badge
|
|
513
|
+
badge: badge && getAvatarBadgeAsset(badge),
|
|
504
514
|
style: { backgroundColor, color },
|
|
505
515
|
children: icon != null ? icon : asset
|
|
506
516
|
}
|
|
@@ -521,7 +531,7 @@ var AvatarMedia = ({
|
|
|
521
531
|
);
|
|
522
532
|
};
|
|
523
533
|
var DEFAULT_BADGE_BACKGROUND_COLOR = "var(--color-background-neutral)";
|
|
524
|
-
var
|
|
534
|
+
var getAvatarBadgeAsset = ({
|
|
525
535
|
backgroundColor,
|
|
526
536
|
color,
|
|
527
537
|
asset,
|
|
@@ -541,12 +551,14 @@ var getBadge = ({
|
|
|
541
551
|
},
|
|
542
552
|
children: icon || asset
|
|
543
553
|
}
|
|
544
|
-
)
|
|
554
|
+
),
|
|
555
|
+
type: "reference"
|
|
545
556
|
};
|
|
546
557
|
}
|
|
547
558
|
return {
|
|
548
559
|
icon,
|
|
549
|
-
asset
|
|
560
|
+
asset,
|
|
561
|
+
type: "reference"
|
|
550
562
|
};
|
|
551
563
|
};
|
|
552
564
|
|
|
@@ -612,20 +624,12 @@ var LegacyMedia = ({ image, icon, preferAvatar, size }) => {
|
|
|
612
624
|
|
|
613
625
|
// ../renderers/src/components/Media/Media.tsx
|
|
614
626
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
615
|
-
var Media = ({
|
|
616
|
-
media,
|
|
617
|
-
preferAvatar = false,
|
|
618
|
-
size
|
|
619
|
-
}) => {
|
|
627
|
+
var Media = ({ media, preferAvatar = false, size }) => {
|
|
620
628
|
switch (media == null ? void 0 : media.type) {
|
|
621
629
|
case "avatar":
|
|
622
630
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(AvatarMedia, __spreadProps(__spreadValues({}, media), { size }));
|
|
623
631
|
case "image": {
|
|
624
|
-
const { asset, icon } = resolveMediaFromUri(
|
|
625
|
-
media.uri,
|
|
626
|
-
size,
|
|
627
|
-
media.accessibilityDescription
|
|
628
|
-
);
|
|
632
|
+
const { asset, icon } = resolveMediaFromUri(media.uri, size, media.accessibilityDescription);
|
|
629
633
|
return icon != null ? icon : asset;
|
|
630
634
|
}
|
|
631
635
|
case "legacy": {
|
|
@@ -635,7 +639,35 @@ var Media = ({
|
|
|
635
639
|
return null;
|
|
636
640
|
}
|
|
637
641
|
};
|
|
638
|
-
|
|
642
|
+
function getAccessibilityDescription(media) {
|
|
643
|
+
switch (media.type) {
|
|
644
|
+
case "avatar":
|
|
645
|
+
case "image":
|
|
646
|
+
return media.accessibilityDescription;
|
|
647
|
+
default:
|
|
648
|
+
return void 0;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
function extractFirstImage(media) {
|
|
652
|
+
switch (media.type) {
|
|
653
|
+
case "image":
|
|
654
|
+
return media;
|
|
655
|
+
case "avatar":
|
|
656
|
+
return extractFirstImageFromAvatar(media);
|
|
657
|
+
default:
|
|
658
|
+
return void 0;
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
function extractFirstImageFromAvatar(avatar) {
|
|
662
|
+
if (!avatar.content.length) return void 0;
|
|
663
|
+
const firstItem = avatar.content[0];
|
|
664
|
+
if (firstItem.type !== "uri") return void 0;
|
|
665
|
+
return {
|
|
666
|
+
type: "image",
|
|
667
|
+
uri: firstItem.uri,
|
|
668
|
+
accessibilityDescription: avatar.accessibilityDescription
|
|
669
|
+
};
|
|
670
|
+
}
|
|
639
671
|
|
|
640
672
|
// ../renderers/src/components/Media/OptionMedia.tsx
|
|
641
673
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
@@ -648,27 +680,6 @@ function OptionMedia(props) {
|
|
|
648
680
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
649
681
|
var getInlineMedia = (media) => media ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Media, { media, preferAvatar: false, size: 24 }) : null;
|
|
650
682
|
|
|
651
|
-
// ../renderers/src/components/Media/getPromptMedia.tsx
|
|
652
|
-
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
653
|
-
var getPromptMedia = (media) => {
|
|
654
|
-
if (!media || media.type === "legacy") {
|
|
655
|
-
return void 0;
|
|
656
|
-
}
|
|
657
|
-
if (media.type === "image" && !media.uri.startsWith("urn:")) {
|
|
658
|
-
return {
|
|
659
|
-
imgSrc: media.uri,
|
|
660
|
-
"aria-label": media.accessibilityDescription
|
|
661
|
-
};
|
|
662
|
-
}
|
|
663
|
-
const _a = media, { accessibilityDescription: ariaLabel } = _a, sansAriaLabel = __objRest(_a, ["accessibilityDescription"]);
|
|
664
|
-
return {
|
|
665
|
-
avatar: {
|
|
666
|
-
asset: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Media, { media: sansAriaLabel, size: 48 })
|
|
667
|
-
},
|
|
668
|
-
"aria-label": ariaLabel
|
|
669
|
-
};
|
|
670
|
-
};
|
|
671
|
-
|
|
672
683
|
// ../renderers/src/utils/layout-utils.ts
|
|
673
684
|
var getMargin = (size) => {
|
|
674
685
|
switch (size) {
|
|
@@ -699,9 +710,177 @@ var getTextAlignment = (align) => {
|
|
|
699
710
|
};
|
|
700
711
|
var getTextAlignmentAndMargin = (component) => `${getTextAlignment(component.align)} ${getMargin(component.margin)}`;
|
|
701
712
|
|
|
713
|
+
// ../renderers/src/ImageRenderer/UrnFlagImage.tsx
|
|
714
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
715
|
+
var maxFlagSize = 600;
|
|
716
|
+
function UrnFlagImage({
|
|
717
|
+
accessibilityDescription,
|
|
718
|
+
align,
|
|
719
|
+
margin,
|
|
720
|
+
size,
|
|
721
|
+
uri
|
|
722
|
+
}) {
|
|
723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
727
|
+
var import_art4 = require("@wise/art");
|
|
728
|
+
var import_react3 = require("react");
|
|
729
|
+
|
|
730
|
+
// ../renderers/src/ImageRenderer/isAnimated.ts
|
|
731
|
+
var isAnimated = (uri) => {
|
|
732
|
+
const { rComponents } = stringToURN(uri);
|
|
733
|
+
return rComponents.type === "animated";
|
|
734
|
+
};
|
|
735
|
+
|
|
736
|
+
// ../renderers/src/ImageRenderer/SafeIllustration3D.tsx
|
|
737
|
+
var import_art3 = require("@wise/art");
|
|
738
|
+
var import_react2 = require("react");
|
|
739
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
740
|
+
var Illustration3DErrorBoundary = class extends import_react2.Component {
|
|
741
|
+
constructor(props) {
|
|
742
|
+
super(props);
|
|
743
|
+
this.state = { hasError: false };
|
|
744
|
+
}
|
|
745
|
+
static getDerivedStateFromError() {
|
|
746
|
+
return { hasError: true };
|
|
747
|
+
}
|
|
748
|
+
componentDidCatch() {
|
|
749
|
+
this.props.onError();
|
|
750
|
+
}
|
|
751
|
+
render() {
|
|
752
|
+
if (this.state.hasError) {
|
|
753
|
+
return null;
|
|
754
|
+
}
|
|
755
|
+
return this.props.children;
|
|
756
|
+
}
|
|
757
|
+
};
|
|
758
|
+
var SafeIllustration3D = ({
|
|
759
|
+
name,
|
|
760
|
+
size,
|
|
761
|
+
onError
|
|
762
|
+
}) => {
|
|
763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Illustration3DErrorBoundary, { onError, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_art3.Illustration3D, { name, size }) });
|
|
764
|
+
};
|
|
765
|
+
var SafeIllustration3D_default = SafeIllustration3D;
|
|
766
|
+
|
|
767
|
+
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
768
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
769
|
+
var urnPrefix = "urn:wise:illustrations:";
|
|
770
|
+
var isUrnIllustration = (uri) => uri.startsWith(urnPrefix);
|
|
771
|
+
function UrnIllustration({
|
|
772
|
+
accessibilityDescription,
|
|
773
|
+
align,
|
|
774
|
+
margin,
|
|
775
|
+
size,
|
|
776
|
+
uri
|
|
777
|
+
}) {
|
|
778
|
+
const [has3DFailed, setHas3DFailed] = (0, import_react3.useState)(false);
|
|
779
|
+
const illustrationSize = getIllustrationSize(size);
|
|
780
|
+
const illustrationName = getIllustrationName(uri);
|
|
781
|
+
const illustration3DName = getIllustration3DName(uri);
|
|
782
|
+
if (illustration3DName && isAnimated(uri) && !has3DFailed) {
|
|
783
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
784
|
+
SafeIllustration3D_default,
|
|
785
|
+
{
|
|
786
|
+
name: illustration3DName,
|
|
787
|
+
size: illustrationSize,
|
|
788
|
+
onError: () => setHas3DFailed(true)
|
|
789
|
+
}
|
|
790
|
+
) });
|
|
791
|
+
}
|
|
792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
793
|
+
import_art4.Illustration,
|
|
794
|
+
{
|
|
795
|
+
className: "df-illustration",
|
|
796
|
+
name: illustrationName,
|
|
797
|
+
size: illustrationSize,
|
|
798
|
+
alt: accessibilityDescription
|
|
799
|
+
}
|
|
800
|
+
) });
|
|
801
|
+
}
|
|
802
|
+
var getIllustrationSize = (size) => ({ xs: "small", sm: "small", md: "medium", lg: "large", xl: "large" })[size] || "medium";
|
|
803
|
+
var getIllustrationName = (uri) => {
|
|
804
|
+
return uri.replace(urnPrefix, "").split("?")[0];
|
|
805
|
+
};
|
|
806
|
+
var getIllustration3DName = (uri) => {
|
|
807
|
+
const illustrationName = getIllustrationName(uri);
|
|
808
|
+
return (0, import_art4.isIllustrationSupport3D)(illustrationName) ? illustrationName : null;
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
// ../renderers/src/ImageRenderer/UrnImage.tsx
|
|
812
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
813
|
+
var isUrnImage = (uri) => uri.startsWith("urn:");
|
|
814
|
+
function UrnImage(props) {
|
|
815
|
+
const { uri } = props;
|
|
816
|
+
if (isUrnIllustration(uri)) {
|
|
817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(UrnIllustration, __spreadValues({}, props));
|
|
818
|
+
}
|
|
819
|
+
if (isUrnFlag(uri)) {
|
|
820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(UrnFlagImage, __spreadValues({}, props));
|
|
821
|
+
}
|
|
822
|
+
return null;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
// ../renderers/src/components/Media/getPromptMedia.tsx
|
|
826
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
827
|
+
var getInfoPromptMedia = (media) => {
|
|
828
|
+
const asset = getPromptIcon(media, 24);
|
|
829
|
+
return asset && { asset };
|
|
830
|
+
};
|
|
831
|
+
var getInlinePromptMedia = (media) => {
|
|
832
|
+
return getPromptIcon(media, 16);
|
|
833
|
+
};
|
|
834
|
+
var getPromptIcon = (media, size) => {
|
|
835
|
+
const image = extractFirstImage(media);
|
|
836
|
+
const iconName = (image == null ? void 0 : image.uri) && extractIconNameFromUri(image == null ? void 0 : image.uri);
|
|
837
|
+
if (!iconName || !isNamedIcon(iconName)) return void 0;
|
|
838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(NamedIcon, { name: iconName, size, title: getAccessibilityDescription(media) });
|
|
839
|
+
};
|
|
840
|
+
var getActionPromptMedia = (media) => {
|
|
841
|
+
var _a;
|
|
842
|
+
if (media.type === "legacy") {
|
|
843
|
+
return void 0;
|
|
844
|
+
}
|
|
845
|
+
if (media.type === "image" && !isUrnImage(media.uri)) {
|
|
846
|
+
return {
|
|
847
|
+
imgSrc: media.uri,
|
|
848
|
+
"aria-label": media.accessibilityDescription
|
|
849
|
+
};
|
|
850
|
+
}
|
|
851
|
+
const content = extractFirstAvatarContent(media);
|
|
852
|
+
const avatar = content && getRenderableAvatar(content, 48);
|
|
853
|
+
if (!avatar || !avatar.asset && !avatar.icon) {
|
|
854
|
+
return void 0;
|
|
855
|
+
}
|
|
856
|
+
return {
|
|
857
|
+
avatar: {
|
|
858
|
+
asset: (_a = avatar.icon) != null ? _a : avatar.asset,
|
|
859
|
+
badge: avatar.badge && getAvatarBadgeAsset(avatar.badge),
|
|
860
|
+
style: { backgroundColor: avatar.backgroundColor, color: avatar.color }
|
|
861
|
+
},
|
|
862
|
+
"aria-label": media.accessibilityDescription
|
|
863
|
+
};
|
|
864
|
+
};
|
|
865
|
+
var extractFirstAvatarContent = (media) => {
|
|
866
|
+
switch (media.type) {
|
|
867
|
+
case "avatar":
|
|
868
|
+
if (!media.content) return void 0;
|
|
869
|
+
return media.content[0];
|
|
870
|
+
case "image":
|
|
871
|
+
if (!isUrnImage(media.uri)) return void 0;
|
|
872
|
+
return {
|
|
873
|
+
type: "uri",
|
|
874
|
+
uri: media.uri
|
|
875
|
+
};
|
|
876
|
+
default:
|
|
877
|
+
return void 0;
|
|
878
|
+
}
|
|
879
|
+
};
|
|
880
|
+
|
|
702
881
|
// ../renderers/src/AlertRenderer/mappers.tsx
|
|
703
882
|
var import_components4 = require("@transferwise/components");
|
|
704
|
-
var
|
|
883
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
705
884
|
var mapCallToAction = (callToAction) => __spreadValues({
|
|
706
885
|
label: callToAction.title,
|
|
707
886
|
"aria-label": callToAction.accessibilityDescription
|
|
@@ -711,7 +890,7 @@ var promptMarkdownAllowList = [
|
|
|
711
890
|
import_components4.MarkdownNodeType.PARAGRAPH,
|
|
712
891
|
import_components4.MarkdownNodeType.STRONG
|
|
713
892
|
];
|
|
714
|
-
var mapPromptDescription = (markdown) => /* @__PURE__ */ (0,
|
|
893
|
+
var mapPromptDescription = (markdown) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
715
894
|
import_components4.Markdown,
|
|
716
895
|
{
|
|
717
896
|
as: "span",
|
|
@@ -725,7 +904,7 @@ var mapPromptDescription = (markdown) => /* @__PURE__ */ (0, import_jsx_runtime1
|
|
|
725
904
|
var mapPromptSentiment = (context) => context === "positive" ? "success" : context;
|
|
726
905
|
|
|
727
906
|
// ../renderers/src/AlertRenderer/ActionPromptComponent.tsx
|
|
728
|
-
var
|
|
907
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
729
908
|
function ActionPromptComponent({
|
|
730
909
|
callToAction,
|
|
731
910
|
context,
|
|
@@ -736,14 +915,14 @@ function ActionPromptComponent({
|
|
|
736
915
|
secondaryCallToAction,
|
|
737
916
|
title
|
|
738
917
|
}) {
|
|
739
|
-
return /* @__PURE__ */ (0,
|
|
918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
740
919
|
import_components5.ActionPrompt,
|
|
741
920
|
{
|
|
742
921
|
title: title != null ? title : "",
|
|
743
922
|
description: mapPromptDescription(markdown),
|
|
744
923
|
sentiment: mapPromptSentiment(context),
|
|
745
924
|
className: getMargin(margin),
|
|
746
|
-
media:
|
|
925
|
+
media: media && getActionPromptMedia(media),
|
|
747
926
|
action: mapCallToAction(callToAction),
|
|
748
927
|
actionSecondary: secondaryCallToAction ? mapCallToAction(secondaryCallToAction) : void 0,
|
|
749
928
|
onDismiss
|
|
@@ -753,7 +932,7 @@ function ActionPromptComponent({
|
|
|
753
932
|
|
|
754
933
|
// ../renderers/src/AlertRenderer/InfoPromptComponent.tsx
|
|
755
934
|
var import_components6 = require("@transferwise/components");
|
|
756
|
-
var
|
|
935
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
757
936
|
function InfoPromptComponent({
|
|
758
937
|
callToAction,
|
|
759
938
|
context,
|
|
@@ -763,14 +942,14 @@ function InfoPromptComponent({
|
|
|
763
942
|
onDismiss,
|
|
764
943
|
title
|
|
765
944
|
}) {
|
|
766
|
-
return /* @__PURE__ */ (0,
|
|
945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
767
946
|
import_components6.InfoPrompt,
|
|
768
947
|
{
|
|
769
948
|
title,
|
|
770
949
|
description: mapPromptDescription(markdown),
|
|
771
950
|
sentiment: mapPromptSentiment(context),
|
|
772
951
|
className: getMargin(margin),
|
|
773
|
-
media:
|
|
952
|
+
media: media && getInfoPromptMedia(media),
|
|
774
953
|
action: callToAction ? mapCallToAction(callToAction) : void 0,
|
|
775
954
|
onDismiss
|
|
776
955
|
}
|
|
@@ -778,13 +957,13 @@ function InfoPromptComponent({
|
|
|
778
957
|
}
|
|
779
958
|
|
|
780
959
|
// ../renderers/src/AlertRenderer/AlertRenderer.tsx
|
|
781
|
-
var
|
|
960
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
782
961
|
var AlertRenderer = {
|
|
783
962
|
canRenderType: "alert",
|
|
784
963
|
render: AlertRendererComponent
|
|
785
964
|
};
|
|
786
965
|
function AlertRendererComponent(props) {
|
|
787
|
-
const [isVisible, setIsVisible] = (0,
|
|
966
|
+
const [isVisible, setIsVisible] = (0, import_react4.useState)(true);
|
|
788
967
|
const { onDismiss: dismiss } = props;
|
|
789
968
|
if (!isVisible) {
|
|
790
969
|
return null;
|
|
@@ -794,9 +973,9 @@ function AlertRendererComponent(props) {
|
|
|
794
973
|
dismiss();
|
|
795
974
|
} : void 0;
|
|
796
975
|
if (shouldRenderActionPrompt(props)) {
|
|
797
|
-
return /* @__PURE__ */ (0,
|
|
976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ActionPromptComponent, __spreadProps(__spreadValues({}, props), { onDismiss }));
|
|
798
977
|
}
|
|
799
|
-
return /* @__PURE__ */ (0,
|
|
978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(InfoPromptComponent, __spreadProps(__spreadValues({}, props), { onDismiss }));
|
|
800
979
|
}
|
|
801
980
|
var shouldRenderActionPrompt = (props) => {
|
|
802
981
|
var _a, _b;
|
|
@@ -808,13 +987,13 @@ var AlertRenderer_default = AlertRenderer;
|
|
|
808
987
|
|
|
809
988
|
// ../renderers/src/BoxRenderer.tsx
|
|
810
989
|
var import_classnames = __toESM(require_classnames());
|
|
811
|
-
var
|
|
990
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
812
991
|
var BoxRenderer = {
|
|
813
992
|
canRenderType: "box",
|
|
814
993
|
render: ({ children, control, margin, width }) => {
|
|
815
994
|
const hasFixedWidth = width !== "xl";
|
|
816
995
|
const hasBorder = control === "bordered" || control === "bordered-web";
|
|
817
|
-
const contents = /* @__PURE__ */ (0,
|
|
996
|
+
const contents = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
818
997
|
"div",
|
|
819
998
|
{
|
|
820
999
|
className: (0, import_classnames.default)("df-box-renderer", {
|
|
@@ -825,7 +1004,7 @@ var BoxRenderer = {
|
|
|
825
1004
|
children
|
|
826
1005
|
}
|
|
827
1006
|
);
|
|
828
|
-
return hasFixedWidth ? /* @__PURE__ */ (0,
|
|
1007
|
+
return hasFixedWidth ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: (0, import_classnames.default)("df-box-renderer-fixed-width", getMargin(margin)), children: contents }) : contents;
|
|
829
1008
|
}
|
|
830
1009
|
};
|
|
831
1010
|
var BoxRenderer_default = BoxRenderer;
|
|
@@ -845,8 +1024,8 @@ var loading_button_messages_default = (0, import_react_intl.defineMessages)({
|
|
|
845
1024
|
});
|
|
846
1025
|
|
|
847
1026
|
// ../renderers/src/ButtonRenderer/AddressValidationButtonRenderer.tsx
|
|
848
|
-
var
|
|
849
|
-
var
|
|
1027
|
+
var import_react5 = require("react");
|
|
1028
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
850
1029
|
var AddressValidationButtonRenderer = {
|
|
851
1030
|
canRenderType: "button",
|
|
852
1031
|
canRender: ({ control }) => control === "address-validation",
|
|
@@ -855,8 +1034,8 @@ var AddressValidationButtonRenderer = {
|
|
|
855
1034
|
function AddressValidationButtonComponent(props) {
|
|
856
1035
|
const { disabled, margin, title, stepLoadingState, onClick } = props;
|
|
857
1036
|
const { formatMessage } = (0, import_react_intl2.useIntl)();
|
|
858
|
-
const [spinny, setSpinny] = (0,
|
|
859
|
-
(0,
|
|
1037
|
+
const [spinny, setSpinny] = (0, import_react5.useState)(false);
|
|
1038
|
+
(0, import_react5.useEffect)(() => {
|
|
860
1039
|
if (stepLoadingState === "idle") {
|
|
861
1040
|
setSpinny(false);
|
|
862
1041
|
}
|
|
@@ -866,8 +1045,8 @@ function AddressValidationButtonComponent(props) {
|
|
|
866
1045
|
setSpinny(false);
|
|
867
1046
|
}
|
|
868
1047
|
};
|
|
869
|
-
return /* @__PURE__ */ (0,
|
|
870
|
-
/* @__PURE__ */ (0,
|
|
1048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: `d-flex flex-column ${getMargin(margin)}`, children: [
|
|
1049
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
871
1050
|
import_components7.Button,
|
|
872
1051
|
{
|
|
873
1052
|
v2: true,
|
|
@@ -884,7 +1063,7 @@ function AddressValidationButtonComponent(props) {
|
|
|
884
1063
|
children: title
|
|
885
1064
|
}
|
|
886
1065
|
),
|
|
887
|
-
spinny && /* @__PURE__ */ (0,
|
|
1066
|
+
spinny && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components7.InlineAlert, { type: "warning", className: "m-x-auto", children: formatMessage(loading_button_messages_default.buttonLoadingMessage) })
|
|
888
1067
|
] });
|
|
889
1068
|
}
|
|
890
1069
|
var AddressValidationButtonRenderer_default = AddressValidationButtonRenderer;
|
|
@@ -915,7 +1094,7 @@ var mapLegacyButtonSize = (size) => {
|
|
|
915
1094
|
};
|
|
916
1095
|
|
|
917
1096
|
// ../renderers/src/ButtonRenderer/ButtonRenderer.tsx
|
|
918
|
-
var
|
|
1097
|
+
var import_react6 = require("react");
|
|
919
1098
|
|
|
920
1099
|
// ../renderers/src/components/Media/getAddonStartMedia.ts
|
|
921
1100
|
var getAddonStartMedia = (media) => {
|
|
@@ -936,7 +1115,7 @@ var getAddonStartMedia = (media) => {
|
|
|
936
1115
|
|
|
937
1116
|
// ../renderers/src/ButtonRenderer/ButtonRenderer.tsx
|
|
938
1117
|
var import_classnames2 = __toESM(require_classnames());
|
|
939
|
-
var
|
|
1118
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
940
1119
|
var ButtonRenderer = {
|
|
941
1120
|
canRenderType: "button",
|
|
942
1121
|
render: ButtonComponent
|
|
@@ -954,8 +1133,8 @@ function ButtonComponent(props) {
|
|
|
954
1133
|
stepLoadingState,
|
|
955
1134
|
onClick
|
|
956
1135
|
} = props;
|
|
957
|
-
const [spinny, setSpinny] = (0,
|
|
958
|
-
(0,
|
|
1136
|
+
const [spinny, setSpinny] = (0, import_react6.useState)(false);
|
|
1137
|
+
(0, import_react6.useEffect)(() => {
|
|
959
1138
|
if (stepLoadingState === "idle") {
|
|
960
1139
|
setSpinny(false);
|
|
961
1140
|
}
|
|
@@ -985,7 +1164,7 @@ function ButtonComponent(props) {
|
|
|
985
1164
|
onClick();
|
|
986
1165
|
}
|
|
987
1166
|
};
|
|
988
|
-
return /* @__PURE__ */ (0,
|
|
1167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components8.Button, __spreadProps(__spreadValues({}, buttonProps), { children: title }));
|
|
989
1168
|
}
|
|
990
1169
|
var getSentiment = (context) => context === "negative" ? "negative" : "default";
|
|
991
1170
|
var getPriority = (control, tags) => {
|
|
@@ -1003,11 +1182,11 @@ var import_components13 = require("@transferwise/components");
|
|
|
1003
1182
|
var import_components10 = require("@transferwise/components");
|
|
1004
1183
|
|
|
1005
1184
|
// ../renderers/src/utils/useScrollToError.ts
|
|
1006
|
-
var
|
|
1185
|
+
var import_react7 = require("react");
|
|
1007
1186
|
var useScrollToError = (validationState, features) => {
|
|
1008
|
-
const ref = (0,
|
|
1187
|
+
const ref = (0, import_react7.useRef)(null);
|
|
1009
1188
|
const enabled = (features == null ? void 0 : features.scrollToError) !== false;
|
|
1010
|
-
(0,
|
|
1189
|
+
(0, import_react7.useEffect)(() => {
|
|
1011
1190
|
if ((validationState == null ? void 0 : validationState.status) === "invalid" && (validationState == null ? void 0 : validationState.message) && enabled) {
|
|
1012
1191
|
scrollToIfNotVisible(ref.current);
|
|
1013
1192
|
}
|
|
@@ -1039,13 +1218,13 @@ var help_messages_default = (0, import_react_intl3.defineMessages)({
|
|
|
1039
1218
|
});
|
|
1040
1219
|
|
|
1041
1220
|
// ../renderers/src/components/Help.tsx
|
|
1042
|
-
var
|
|
1221
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1043
1222
|
function Help({ help, onClick }) {
|
|
1044
1223
|
const intl = (0, import_react_intl4.useIntl)();
|
|
1045
|
-
return /* @__PURE__ */ (0,
|
|
1224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1046
1225
|
import_components9.Info,
|
|
1047
1226
|
{
|
|
1048
|
-
content: /* @__PURE__ */ (0,
|
|
1227
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_components9.Markdown, { config: { link: { target: "_blank" } }, children: help }),
|
|
1049
1228
|
presentation: "POPOVER",
|
|
1050
1229
|
size: "sm",
|
|
1051
1230
|
"aria-label": intl.formatMessage(help_messages_default.helpAria),
|
|
@@ -1056,16 +1235,16 @@ function Help({ help, onClick }) {
|
|
|
1056
1235
|
var Help_default = Help;
|
|
1057
1236
|
|
|
1058
1237
|
// ../renderers/src/components/LabelContentWithHelp.tsx
|
|
1059
|
-
var
|
|
1238
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1060
1239
|
function LabelContentWithHelp({ text, help }) {
|
|
1061
|
-
return /* @__PURE__ */ (0,
|
|
1240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { children: [
|
|
1062
1241
|
text,
|
|
1063
|
-
/* @__PURE__ */ (0,
|
|
1242
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Help_default, { help })
|
|
1064
1243
|
] });
|
|
1065
1244
|
}
|
|
1066
1245
|
|
|
1067
1246
|
// ../renderers/src/components/FieldInput.tsx
|
|
1068
|
-
var
|
|
1247
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1069
1248
|
function FieldInput({
|
|
1070
1249
|
id,
|
|
1071
1250
|
children,
|
|
@@ -1078,9 +1257,9 @@ function FieldInput({
|
|
|
1078
1257
|
features
|
|
1079
1258
|
}) {
|
|
1080
1259
|
var _a;
|
|
1081
|
-
const labelContent = label && help ? /* @__PURE__ */ (0,
|
|
1260
|
+
const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(LabelContentWithHelp, { text: label, help }) : label;
|
|
1082
1261
|
const { ref } = useScrollToError(validation, features);
|
|
1083
|
-
return /* @__PURE__ */ (0,
|
|
1262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { ref, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1084
1263
|
import_components10.Field,
|
|
1085
1264
|
{
|
|
1086
1265
|
id,
|
|
@@ -1108,22 +1287,26 @@ var FieldInput_default = FieldInput;
|
|
|
1108
1287
|
|
|
1109
1288
|
// ../renderers/src/utils/listItem/getAdditionalText.tsx
|
|
1110
1289
|
var import_components11 = require("@transferwise/components");
|
|
1111
|
-
var
|
|
1290
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1112
1291
|
var getAdditionalText = (additionalText) => {
|
|
1113
1292
|
if (!additionalText) {
|
|
1114
1293
|
return void 0;
|
|
1115
1294
|
}
|
|
1116
|
-
return /* @__PURE__ */ (0,
|
|
1295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components11.ListItem.AdditionalInfo, { children: additionalText });
|
|
1117
1296
|
};
|
|
1118
1297
|
|
|
1119
1298
|
// ../renderers/src/utils/listItem/getInlineAlert.tsx
|
|
1120
1299
|
var import_components12 = require("@transferwise/components");
|
|
1121
|
-
var
|
|
1122
|
-
var getInlineAlert = (inlineAlert) =>
|
|
1300
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1301
|
+
var getInlineAlert = (inlineAlert) => {
|
|
1302
|
+
if (!inlineAlert) return void 0;
|
|
1303
|
+
const { context, media, content } = inlineAlert;
|
|
1304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components12.ListItem.Prompt, { sentiment: context, media: media && getInlinePromptMedia(media), children: content });
|
|
1305
|
+
};
|
|
1123
1306
|
|
|
1124
1307
|
// ../renderers/src/utils/listItem/getMedia.tsx
|
|
1125
|
-
var
|
|
1126
|
-
var getMedia = (media, preferAvatar) => media ? /* @__PURE__ */ (0,
|
|
1308
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1309
|
+
var getMedia = (media, preferAvatar) => media ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(OptionMedia, { media, preferAvatar }) : void 0;
|
|
1127
1310
|
|
|
1128
1311
|
// ../renderers/src/utils/listItem/getSupportingValues.ts
|
|
1129
1312
|
var getSupportingValues = (supportingValues) => {
|
|
@@ -1131,18 +1314,18 @@ var getSupportingValues = (supportingValues) => {
|
|
|
1131
1314
|
};
|
|
1132
1315
|
|
|
1133
1316
|
// ../renderers/src/CheckboxInputRenderer.tsx
|
|
1134
|
-
var
|
|
1317
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1135
1318
|
var CheckboxInputRenderer = {
|
|
1136
1319
|
canRenderType: "input-checkbox",
|
|
1137
1320
|
render: (props) => {
|
|
1138
1321
|
switch (props.control) {
|
|
1139
1322
|
case "switch-item":
|
|
1140
|
-
return /* @__PURE__ */ (0,
|
|
1323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SwitchItemComponent, __spreadValues({}, props));
|
|
1141
1324
|
case "checkbox-item":
|
|
1142
|
-
return /* @__PURE__ */ (0,
|
|
1325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CheckboxItemComponent, __spreadValues({}, props));
|
|
1143
1326
|
case "checkbox":
|
|
1144
1327
|
default:
|
|
1145
|
-
return /* @__PURE__ */ (0,
|
|
1328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CheckboxComponent, __spreadValues({}, props));
|
|
1146
1329
|
}
|
|
1147
1330
|
}
|
|
1148
1331
|
};
|
|
@@ -1167,7 +1350,7 @@ var CheckboxComponent = (props) => {
|
|
|
1167
1350
|
"value"
|
|
1168
1351
|
]);
|
|
1169
1352
|
const checkboxProps = __spreadProps(__spreadValues({}, rest), { label: title, secondary: description, checked: value });
|
|
1170
|
-
return /* @__PURE__ */ (0,
|
|
1353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1171
1354
|
FieldInput_default,
|
|
1172
1355
|
{
|
|
1173
1356
|
id,
|
|
@@ -1178,7 +1361,7 @@ var CheckboxComponent = (props) => {
|
|
|
1178
1361
|
inlineAlert: rest.inlineAlert,
|
|
1179
1362
|
loadingState: rest.fieldLoadingState,
|
|
1180
1363
|
features: rest.features,
|
|
1181
|
-
children: /* @__PURE__ */ (0,
|
|
1364
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components13.Checkbox, __spreadValues({ id }, checkboxProps))
|
|
1182
1365
|
}
|
|
1183
1366
|
);
|
|
1184
1367
|
};
|
|
@@ -1197,7 +1380,7 @@ var CheckboxItemComponent = (props) => {
|
|
|
1197
1380
|
onChange
|
|
1198
1381
|
} = props;
|
|
1199
1382
|
const { ref } = useScrollToError(validationState, features);
|
|
1200
|
-
return /* @__PURE__ */ (0,
|
|
1383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { ref, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1201
1384
|
import_components13.ListItem,
|
|
1202
1385
|
__spreadValues({
|
|
1203
1386
|
title,
|
|
@@ -1206,7 +1389,7 @@ var CheckboxItemComponent = (props) => {
|
|
|
1206
1389
|
media: getMedia(media, false),
|
|
1207
1390
|
disabled,
|
|
1208
1391
|
prompt: getInlineAlertOrValidation(validationState, inlineAlert),
|
|
1209
|
-
control: /* @__PURE__ */ (0,
|
|
1392
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components13.ListItem.Checkbox, { checked: value, onChange: () => onChange(!value) })
|
|
1210
1393
|
}, getSupportingValues(supportingValues))
|
|
1211
1394
|
) });
|
|
1212
1395
|
};
|
|
@@ -1225,7 +1408,7 @@ var SwitchItemComponent = (props) => {
|
|
|
1225
1408
|
onChange
|
|
1226
1409
|
} = props;
|
|
1227
1410
|
const { ref } = useScrollToError(validationState, features);
|
|
1228
|
-
return /* @__PURE__ */ (0,
|
|
1411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { ref, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1229
1412
|
import_components13.ListItem,
|
|
1230
1413
|
__spreadValues({
|
|
1231
1414
|
title,
|
|
@@ -1234,13 +1417,13 @@ var SwitchItemComponent = (props) => {
|
|
|
1234
1417
|
media: getMedia(media, false),
|
|
1235
1418
|
disabled,
|
|
1236
1419
|
prompt: getInlineAlertOrValidation(validationState, inlineAlert),
|
|
1237
|
-
control: /* @__PURE__ */ (0,
|
|
1420
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components13.ListItem.Switch, { checked: value, onClick: () => onChange(!value) })
|
|
1238
1421
|
}, getSupportingValues(supportingValues))
|
|
1239
1422
|
) });
|
|
1240
1423
|
};
|
|
1241
1424
|
var getInlineAlertOrValidation = (validationState, inlineAlert) => {
|
|
1242
1425
|
if ((validationState == null ? void 0 : validationState.status) === "invalid") {
|
|
1243
|
-
return /* @__PURE__ */ (0,
|
|
1426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components13.ListItem.Prompt, { sentiment: "negative", children: validationState.message });
|
|
1244
1427
|
}
|
|
1245
1428
|
return getInlineAlert(inlineAlert);
|
|
1246
1429
|
};
|
|
@@ -1249,6 +1432,26 @@ var CheckboxInputRenderer_default = CheckboxInputRenderer;
|
|
|
1249
1432
|
// ../renderers/src/CollectionRenderer/CollectionRenderer.tsx
|
|
1250
1433
|
var import_components21 = require("@transferwise/components");
|
|
1251
1434
|
|
|
1435
|
+
// ../renderers/src/messages/generic-error.messages.ts
|
|
1436
|
+
var import_react_intl5 = require("react-intl");
|
|
1437
|
+
var generic_error_messages_default = (0, import_react_intl5.defineMessages)({
|
|
1438
|
+
genericErrorRetryHint: {
|
|
1439
|
+
id: "df.wise.PersistAsyncSchema.genericError",
|
|
1440
|
+
defaultMessage: "Something went wrong, please try again.",
|
|
1441
|
+
description: "Generic error message for persist async schema"
|
|
1442
|
+
},
|
|
1443
|
+
genericError: {
|
|
1444
|
+
id: "df.wise.ErrorBoundary.errorAlert",
|
|
1445
|
+
defaultMessage: "Something went wrong.",
|
|
1446
|
+
description: "Generic error message for when something has gone wrong."
|
|
1447
|
+
},
|
|
1448
|
+
retry: {
|
|
1449
|
+
id: "df.wise.ErrorBoundary.retry",
|
|
1450
|
+
defaultMessage: "Retry",
|
|
1451
|
+
description: "Usually this follows the generic error and contains a link."
|
|
1452
|
+
}
|
|
1453
|
+
});
|
|
1454
|
+
|
|
1252
1455
|
// ../../node_modules/.pnpm/@tanstack+react-virtual@3.13.24_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-virtual/dist/esm/index.js
|
|
1253
1456
|
var React = __toESM(require("react"), 1);
|
|
1254
1457
|
var import_react_dom = require("react-dom");
|
|
@@ -2214,16 +2417,16 @@ function useWindowVirtualizer(options) {
|
|
|
2214
2417
|
|
|
2215
2418
|
// ../renderers/src/CollectionRenderer/components/ContentComponent.tsx
|
|
2216
2419
|
var import_components15 = require("@transferwise/components");
|
|
2217
|
-
var
|
|
2420
|
+
var import_react9 = require("react");
|
|
2218
2421
|
|
|
2219
2422
|
// ../renderers/src/step/StepFooter.tsx
|
|
2220
2423
|
var import_components14 = require("@transferwise/components");
|
|
2221
|
-
var
|
|
2222
|
-
var
|
|
2424
|
+
var import_react8 = require("react");
|
|
2425
|
+
var import_react_intl7 = require("react-intl");
|
|
2223
2426
|
|
|
2224
2427
|
// ../renderers/src/messages/step.messages.ts
|
|
2225
|
-
var
|
|
2226
|
-
var step_messages_default = (0,
|
|
2428
|
+
var import_react_intl6 = require("react-intl");
|
|
2429
|
+
var step_messages_default = (0, import_react_intl6.defineMessages)({
|
|
2227
2430
|
scrollToBottom: {
|
|
2228
2431
|
id: "df.wise.step.scrollToBottom",
|
|
2229
2432
|
defaultMessage: "Scroll to bottom",
|
|
@@ -2232,23 +2435,23 @@ var step_messages_default = (0, import_react_intl5.defineMessages)({
|
|
|
2232
2435
|
});
|
|
2233
2436
|
|
|
2234
2437
|
// ../renderers/src/step/StepFooter.tsx
|
|
2235
|
-
var
|
|
2438
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2236
2439
|
var SCROLL_TO_BOTTOM = "scroll-to-bottom";
|
|
2237
2440
|
var StepFooter = ({ footer, tags }) => {
|
|
2238
2441
|
if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
|
|
2239
|
-
return /* @__PURE__ */ (0,
|
|
2442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(FooterWithScrollButton, { footer });
|
|
2240
2443
|
}
|
|
2241
|
-
return /* @__PURE__ */ (0,
|
|
2444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DefaultFooter, { footer });
|
|
2242
2445
|
};
|
|
2243
2446
|
var DefaultFooter = ({ footer }) => {
|
|
2244
2447
|
const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
|
|
2245
|
-
return hasFooter ? /* @__PURE__ */ (0,
|
|
2448
|
+
return hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
|
|
2246
2449
|
};
|
|
2247
2450
|
var FooterWithScrollButton = ({ footer }) => {
|
|
2248
|
-
const { formatMessage } = (0,
|
|
2249
|
-
const endOfLayoutRef = (0,
|
|
2451
|
+
const { formatMessage } = (0, import_react_intl7.useIntl)();
|
|
2452
|
+
const endOfLayoutRef = (0, import_react8.useRef)(null);
|
|
2250
2453
|
const isElementVisible = useIsElementVisible(endOfLayoutRef);
|
|
2251
|
-
const scrollButton = /* @__PURE__ */ (0,
|
|
2454
|
+
const scrollButton = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2252
2455
|
import_components14.Button,
|
|
2253
2456
|
{
|
|
2254
2457
|
className: "m-b-1",
|
|
@@ -2264,19 +2467,19 @@ var FooterWithScrollButton = ({ footer }) => {
|
|
|
2264
2467
|
);
|
|
2265
2468
|
const hasStepFooterContent = footer && Array.isArray(footer) && footer.length > 0;
|
|
2266
2469
|
if (isElementVisible && !hasStepFooterContent) {
|
|
2267
|
-
return /* @__PURE__ */ (0,
|
|
2470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
|
|
2268
2471
|
}
|
|
2269
|
-
return /* @__PURE__ */ (0,
|
|
2270
|
-
/* @__PURE__ */ (0,
|
|
2271
|
-
/* @__PURE__ */ (0,
|
|
2472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
2473
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
|
|
2474
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "df-step-fixed__footer", children: [
|
|
2272
2475
|
!isElementVisible && scrollButton,
|
|
2273
2476
|
footer
|
|
2274
2477
|
] })
|
|
2275
2478
|
] });
|
|
2276
2479
|
};
|
|
2277
2480
|
var useIsElementVisible = (elementRef) => {
|
|
2278
|
-
const [isVisible, setIsVisible] = (0,
|
|
2279
|
-
(0,
|
|
2481
|
+
const [isVisible, setIsVisible] = (0, import_react8.useState)(false);
|
|
2482
|
+
(0, import_react8.useEffect)(() => {
|
|
2280
2483
|
const element = elementRef.current;
|
|
2281
2484
|
if (!element) return;
|
|
2282
2485
|
const observer = new IntersectionObserver(([entry]) => {
|
|
@@ -2289,17 +2492,30 @@ var useIsElementVisible = (elementRef) => {
|
|
|
2289
2492
|
};
|
|
2290
2493
|
|
|
2291
2494
|
// ../renderers/src/CollectionRenderer/components/ContentComponent.tsx
|
|
2292
|
-
var
|
|
2495
|
+
var import_react_intl9 = require("react-intl");
|
|
2496
|
+
|
|
2497
|
+
// ../renderers/src/messages/collection.messages.ts
|
|
2498
|
+
var import_react_intl8 = require("react-intl");
|
|
2499
|
+
var collection_messages_default = (0, import_react_intl8.defineMessages)({
|
|
2500
|
+
loadMoreButton: {
|
|
2501
|
+
id: "df.wise.Collection.loadMoreMessage",
|
|
2502
|
+
defaultMessage: "Load more",
|
|
2503
|
+
description: "A message shown on a button to load more items in a list."
|
|
2504
|
+
}
|
|
2505
|
+
});
|
|
2506
|
+
|
|
2507
|
+
// ../renderers/src/CollectionRenderer/components/ContentComponent.tsx
|
|
2508
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2293
2509
|
var ContentComponent = (props) => {
|
|
2294
2510
|
const { state, status, SectionHeader, Item } = props;
|
|
2295
|
-
const endOfContentRef = (0,
|
|
2511
|
+
const endOfContentRef = (0, import_react9.useRef)(null);
|
|
2296
2512
|
const isBottomVisible = useIsElementVisible(endOfContentRef);
|
|
2297
|
-
(0,
|
|
2298
|
-
|
|
2299
|
-
if (
|
|
2300
|
-
|
|
2513
|
+
(0, import_react9.useEffect)(() => {
|
|
2514
|
+
const shouldAutoLoad = isBottomVisible && status.type === "idle" && !state.afterSections;
|
|
2515
|
+
if (shouldAutoLoad && status.loadMore) {
|
|
2516
|
+
status.loadMore();
|
|
2301
2517
|
}
|
|
2302
|
-
}, [isBottomVisible, status]);
|
|
2518
|
+
}, [isBottomVisible, state.afterSections, status]);
|
|
2303
2519
|
const stateCount = state.sections.reduce(
|
|
2304
2520
|
(total, section) => section.items.length + total + (section.title ? 1 : 0),
|
|
2305
2521
|
0
|
|
@@ -2310,7 +2526,8 @@ var ContentComponent = (props) => {
|
|
|
2310
2526
|
type: "header",
|
|
2311
2527
|
title: section.title,
|
|
2312
2528
|
items: section.items,
|
|
2313
|
-
id: section.id
|
|
2529
|
+
id: section.id,
|
|
2530
|
+
callToAction: section.callToAction
|
|
2314
2531
|
}
|
|
2315
2532
|
] : [],
|
|
2316
2533
|
...section.items.map((item) => ({
|
|
@@ -2318,9 +2535,9 @@ var ContentComponent = (props) => {
|
|
|
2318
2535
|
type: "item"
|
|
2319
2536
|
}))
|
|
2320
2537
|
]);
|
|
2321
|
-
const listRef = (0,
|
|
2322
|
-
const listOffsetRef = (0,
|
|
2323
|
-
(0,
|
|
2538
|
+
const listRef = (0, import_react9.useRef)(null);
|
|
2539
|
+
const listOffsetRef = (0, import_react9.useRef)(0);
|
|
2540
|
+
(0, import_react9.useLayoutEffect)(() => {
|
|
2324
2541
|
var _a, _b;
|
|
2325
2542
|
listOffsetRef.current = (_b = (_a = listRef.current) == null ? void 0 : _a.offsetTop) != null ? _b : 0;
|
|
2326
2543
|
});
|
|
@@ -2331,9 +2548,9 @@ var ContentComponent = (props) => {
|
|
|
2331
2548
|
// eslint-disable-next-line react-hooks/refs
|
|
2332
2549
|
scrollMargin: listOffsetRef.current
|
|
2333
2550
|
});
|
|
2334
|
-
return /* @__PURE__ */ (0,
|
|
2551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { ref: listRef, children: [
|
|
2335
2552
|
state.beforeSections,
|
|
2336
|
-
/* @__PURE__ */ (0,
|
|
2553
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2337
2554
|
"div",
|
|
2338
2555
|
{
|
|
2339
2556
|
style: {
|
|
@@ -2346,7 +2563,7 @@ var ContentComponent = (props) => {
|
|
|
2346
2563
|
if (!i) {
|
|
2347
2564
|
return null;
|
|
2348
2565
|
}
|
|
2349
|
-
return /* @__PURE__ */ (0,
|
|
2566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2350
2567
|
"div",
|
|
2351
2568
|
{
|
|
2352
2569
|
ref: virtualizer.measureElement,
|
|
@@ -2358,29 +2575,48 @@ var ContentComponent = (props) => {
|
|
|
2358
2575
|
width: "100%",
|
|
2359
2576
|
transform: `translateY(${item.start - virtualizer.options.scrollMargin}px)`
|
|
2360
2577
|
},
|
|
2361
|
-
children: i.type === "header" ? /* @__PURE__ */ (0,
|
|
2578
|
+
children: i.type === "header" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SectionHeader, __spreadValues({}, i)) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Item, __spreadValues({}, i.item))
|
|
2362
2579
|
},
|
|
2363
2580
|
item.key
|
|
2364
2581
|
);
|
|
2365
2582
|
})
|
|
2366
2583
|
}
|
|
2367
2584
|
),
|
|
2368
|
-
/* @__PURE__ */ (0,
|
|
2369
|
-
status.type === "idle" && status.loadMore || status.type === "loading" && status.reason === "pagination" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components15.ProcessIndicator, { size: "xs" }) : null,
|
|
2370
|
-
status.type === "error" && status.reason === "pagination" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "d-flex m-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components15.Button, { v2: true, size: "sm", priority: "secondary-neutral", onClick: status.retry, children: "Load more" }) }) : null
|
|
2371
|
-
] }),
|
|
2585
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ref: endOfContentRef, className: "d-flex m-x-auto m-y-2", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PaginationComponent, { status, state }) }),
|
|
2372
2586
|
state.afterSections
|
|
2373
2587
|
] });
|
|
2374
2588
|
};
|
|
2589
|
+
var PaginationComponent = ({
|
|
2590
|
+
status,
|
|
2591
|
+
state
|
|
2592
|
+
}) => {
|
|
2593
|
+
const isPaginationError = status.type === "error" && status.reason === "pagination";
|
|
2594
|
+
const isPaginationLoading = status.type === "loading" && status.reason === "pagination";
|
|
2595
|
+
const loadMore = status.type === "idle" ? status.loadMore : void 0;
|
|
2596
|
+
if (!isPaginationError && !isPaginationLoading && !loadMore) {
|
|
2597
|
+
return null;
|
|
2598
|
+
}
|
|
2599
|
+
if (isPaginationError) {
|
|
2600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(LoadMoreButton, { onClick: status.retry });
|
|
2601
|
+
}
|
|
2602
|
+
if (state.afterSections && loadMore) {
|
|
2603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(LoadMoreButton, { onClick: loadMore });
|
|
2604
|
+
}
|
|
2605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components15.ProcessIndicator, { size: "xs", "data-testid": "collection-pagination-loader" });
|
|
2606
|
+
};
|
|
2607
|
+
var LoadMoreButton = ({ onClick }) => {
|
|
2608
|
+
const { formatMessage } = (0, import_react_intl9.useIntl)();
|
|
2609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "d-flex m-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components15.Button, { v2: true, size: "sm", priority: "secondary-neutral", onClick, children: formatMessage(collection_messages_default.loadMoreButton) }) });
|
|
2610
|
+
};
|
|
2375
2611
|
|
|
2376
2612
|
// ../renderers/src/CollectionRenderer/components/FilterComponent.tsx
|
|
2377
2613
|
var import_components16 = require("@transferwise/components");
|
|
2378
|
-
var
|
|
2614
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2379
2615
|
var FiltersComponent = ({ state }) => {
|
|
2380
2616
|
const { filters } = state;
|
|
2381
|
-
return /* @__PURE__ */ (0,
|
|
2617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "df-filters-container", children: filters.map((filter) => {
|
|
2382
2618
|
var _a;
|
|
2383
|
-
return /* @__PURE__ */ (0,
|
|
2619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(FilterComponent, __spreadValues({}, filter), JSON.stringify((_a = filter.options) == null ? void 0 : _a.map((o) => o.value)));
|
|
2384
2620
|
}) });
|
|
2385
2621
|
};
|
|
2386
2622
|
var FilterComponent = (filter) => {
|
|
@@ -2388,7 +2624,7 @@ var FilterComponent = (filter) => {
|
|
|
2388
2624
|
if (!options) {
|
|
2389
2625
|
return null;
|
|
2390
2626
|
}
|
|
2391
|
-
return /* @__PURE__ */ (0,
|
|
2627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2392
2628
|
import_components16.Chips,
|
|
2393
2629
|
{
|
|
2394
2630
|
className: "m-b-1",
|
|
@@ -2418,7 +2654,7 @@ var import_components19 = require("@transferwise/components");
|
|
|
2418
2654
|
|
|
2419
2655
|
// ../renderers/src/utils/listItem/getAdditionalInfo.tsx
|
|
2420
2656
|
var import_components17 = require("@transferwise/components");
|
|
2421
|
-
var
|
|
2657
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2422
2658
|
var getAdditionalInfo = (additionalInfo) => {
|
|
2423
2659
|
var _a, _b;
|
|
2424
2660
|
if (!additionalInfo) {
|
|
@@ -2426,7 +2662,7 @@ var getAdditionalInfo = (additionalInfo) => {
|
|
|
2426
2662
|
}
|
|
2427
2663
|
const { href, text, onClick } = additionalInfo;
|
|
2428
2664
|
if (href || onClick) {
|
|
2429
|
-
return /* @__PURE__ */ (0,
|
|
2665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2430
2666
|
import_components17.ListItem.AdditionalInfo,
|
|
2431
2667
|
{
|
|
2432
2668
|
action: __spreadValues({
|
|
@@ -2435,19 +2671,19 @@ var getAdditionalInfo = (additionalInfo) => {
|
|
|
2435
2671
|
}
|
|
2436
2672
|
);
|
|
2437
2673
|
}
|
|
2438
|
-
return /* @__PURE__ */ (0,
|
|
2674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components17.ListItem.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
|
|
2439
2675
|
};
|
|
2440
2676
|
|
|
2441
2677
|
// ../renderers/src/utils/listItem/getCTAControl.tsx
|
|
2442
2678
|
var import_components18 = require("@transferwise/components");
|
|
2443
|
-
var
|
|
2679
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2444
2680
|
var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
|
|
2445
2681
|
if (!callToAction) {
|
|
2446
2682
|
return void 0;
|
|
2447
2683
|
}
|
|
2448
2684
|
const { accessibilityDescription, title, context } = callToAction;
|
|
2449
2685
|
const { priority, sentiment } = getPriorityAndSentiment(ctaSecondary, context);
|
|
2450
|
-
return /* @__PURE__ */ (0,
|
|
2686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2451
2687
|
import_components18.ListItem.Button,
|
|
2452
2688
|
__spreadProps(__spreadValues({}, callToAction.getAnchorProps()), {
|
|
2453
2689
|
partiallyInteractive: !fullyInteractive,
|
|
@@ -2472,7 +2708,7 @@ var shouldUseAvatar = (control, tags) => {
|
|
|
2472
2708
|
};
|
|
2473
2709
|
|
|
2474
2710
|
// ../renderers/src/CollectionRenderer/components/ItemComponent.tsx
|
|
2475
|
-
var
|
|
2711
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2476
2712
|
var ItemComponent = (props) => {
|
|
2477
2713
|
var _a, _b;
|
|
2478
2714
|
const {
|
|
@@ -2480,6 +2716,7 @@ var ItemComponent = (props) => {
|
|
|
2480
2716
|
description,
|
|
2481
2717
|
supportingValues,
|
|
2482
2718
|
media,
|
|
2719
|
+
disabled,
|
|
2483
2720
|
additionalInfo,
|
|
2484
2721
|
inlineAlert,
|
|
2485
2722
|
href,
|
|
@@ -2493,27 +2730,27 @@ var ItemComponent = (props) => {
|
|
|
2493
2730
|
ctaSecondary: (_a = tags == null ? void 0 : tags.includes("cta-secondary")) != null ? _a : false,
|
|
2494
2731
|
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
2495
2732
|
};
|
|
2496
|
-
return /* @__PURE__ */ (0,
|
|
2733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2497
2734
|
import_components19.ListItem,
|
|
2498
2735
|
{
|
|
2499
2736
|
title,
|
|
2500
2737
|
subtitle: description,
|
|
2738
|
+
disabled,
|
|
2501
2739
|
valueTitle: supportingValues == null ? void 0 : supportingValues.value,
|
|
2502
2740
|
valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
|
|
2503
2741
|
media: getMedia(media, shouldUseAvatar(control, parentTags)),
|
|
2504
2742
|
prompt: getInlineAlert(inlineAlert),
|
|
2505
2743
|
additionalInfo: getAdditionalInfo(additionalInfo),
|
|
2506
2744
|
control: onClick || href ? getNavigationControl(onClick, href) : getCTAControl(callToAction, controlOptions)
|
|
2507
|
-
}
|
|
2508
|
-
title
|
|
2745
|
+
}
|
|
2509
2746
|
);
|
|
2510
2747
|
};
|
|
2511
2748
|
var getNavigationControl = (onClick, href) => {
|
|
2512
2749
|
if (href) {
|
|
2513
|
-
return /* @__PURE__ */ (0,
|
|
2750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components19.ListItem.Navigation, { href });
|
|
2514
2751
|
}
|
|
2515
2752
|
if (onClick) {
|
|
2516
|
-
return /* @__PURE__ */ (0,
|
|
2753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components19.ListItem.Navigation, { onClick });
|
|
2517
2754
|
}
|
|
2518
2755
|
return null;
|
|
2519
2756
|
};
|
|
@@ -2521,13 +2758,13 @@ var getNavigationControl = (onClick, href) => {
|
|
|
2521
2758
|
// ../renderers/src/CollectionRenderer/components/SearchComponent.tsx
|
|
2522
2759
|
var import_components20 = require("@transferwise/components");
|
|
2523
2760
|
var import_icons = require("@transferwise/icons");
|
|
2524
|
-
var
|
|
2761
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2525
2762
|
var SearchComponent = ({ state, status, features }) => {
|
|
2526
2763
|
const { search } = state;
|
|
2527
2764
|
if (!search) {
|
|
2528
2765
|
return;
|
|
2529
2766
|
}
|
|
2530
|
-
return /* @__PURE__ */ (0,
|
|
2767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2531
2768
|
FieldInput_default,
|
|
2532
2769
|
{
|
|
2533
2770
|
id: "search",
|
|
@@ -2536,12 +2773,12 @@ var SearchComponent = ({ state, status, features }) => {
|
|
|
2536
2773
|
help: "",
|
|
2537
2774
|
label: search.title,
|
|
2538
2775
|
features,
|
|
2539
|
-
children: /* @__PURE__ */ (0,
|
|
2776
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2540
2777
|
import_components20.InputGroup,
|
|
2541
2778
|
{
|
|
2542
|
-
addonStart: { content: /* @__PURE__ */ (0,
|
|
2543
|
-
addonEnd: status.type === "loading" ? { content: /* @__PURE__ */ (0,
|
|
2544
|
-
children: /* @__PURE__ */ (0,
|
|
2779
|
+
addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons.Search, { size: 24 }) },
|
|
2780
|
+
addonEnd: status.type === "loading" ? { content: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components20.ProcessIndicator, { size: "xs", "data-testid": "collection-search-loader" }) } : void 0,
|
|
2781
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2545
2782
|
import_components20.Input,
|
|
2546
2783
|
{
|
|
2547
2784
|
id: "search",
|
|
@@ -2562,14 +2799,14 @@ var SearchComponent = ({ state, status, features }) => {
|
|
|
2562
2799
|
};
|
|
2563
2800
|
|
|
2564
2801
|
// ../renderers/src/CollectionRenderer/components/SectionHeaderComponent.tsx
|
|
2565
|
-
var
|
|
2802
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2566
2803
|
var SectionHeaderComponent = ({
|
|
2567
2804
|
title,
|
|
2568
2805
|
callToAction
|
|
2569
|
-
}) => /* @__PURE__ */ (0,
|
|
2806
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Header, { title, callToAction });
|
|
2570
2807
|
|
|
2571
2808
|
// ../renderers/src/CollectionRenderer/createCollectionRenderer.tsx
|
|
2572
|
-
var
|
|
2809
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2573
2810
|
var createCollectionRenderer = (canRender, components) => {
|
|
2574
2811
|
const componentsWithDefaults = __spreadValues({
|
|
2575
2812
|
Search: SearchComponent,
|
|
@@ -2583,23 +2820,28 @@ var createCollectionRenderer = (canRender, components) => {
|
|
|
2583
2820
|
canRenderType: "collection",
|
|
2584
2821
|
canRender,
|
|
2585
2822
|
render: (props) => {
|
|
2586
|
-
return /* @__PURE__ */ (0,
|
|
2823
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CollectionRendererComponent, __spreadValues(__spreadValues({}, props), componentsWithDefaults));
|
|
2587
2824
|
}
|
|
2588
2825
|
};
|
|
2589
2826
|
};
|
|
2590
2827
|
|
|
2591
2828
|
// ../renderers/src/CollectionRenderer/CollectionRenderer.tsx
|
|
2592
|
-
var
|
|
2829
|
+
var import_react_intl10 = require("react-intl");
|
|
2830
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2593
2831
|
var CollectionRendererComponent = (props) => {
|
|
2594
2832
|
const { status, Search: Search4, Filters, Results } = props;
|
|
2595
|
-
return /* @__PURE__ */ (0,
|
|
2596
|
-
/* @__PURE__ */ (0,
|
|
2597
|
-
/* @__PURE__ */ (0,
|
|
2598
|
-
status.type === "
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
2834
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Search4, __spreadValues({}, props)),
|
|
2835
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Filters, __spreadValues({}, props)),
|
|
2836
|
+
status.type === "error" && status.reason === "search" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SearchError, { retry: status.retry }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Results, __spreadValues({}, props))
|
|
2837
|
+
] });
|
|
2838
|
+
};
|
|
2839
|
+
var SearchError = ({ retry }) => {
|
|
2840
|
+
const { formatMessage } = (0, import_react_intl10.useIntl)();
|
|
2841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_components21.InlinePrompt, { width: "full", sentiment: "negative", children: [
|
|
2842
|
+
formatMessage(generic_error_messages_default.genericError),
|
|
2843
|
+
"\xA0",
|
|
2844
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components21.Link, { onClick: retry, children: formatMessage(generic_error_messages_default.retry) })
|
|
2603
2845
|
] });
|
|
2604
2846
|
};
|
|
2605
2847
|
var CollectionRenderer = createCollectionRenderer(() => true);
|
|
@@ -2609,14 +2851,14 @@ var CollectionRenderer_default = CollectionRenderer;
|
|
|
2609
2851
|
var import_classnames3 = __toESM(require_classnames());
|
|
2610
2852
|
|
|
2611
2853
|
// ../renderers/src/utils/useIsCollapsed.ts
|
|
2612
|
-
var
|
|
2854
|
+
var import_react10 = require("react");
|
|
2613
2855
|
var COLLAPSE_QUERY = "(max-width: 767.98px)";
|
|
2614
2856
|
var supportsMatchMedia = () => typeof window !== "undefined" && !!window.matchMedia;
|
|
2615
2857
|
var useIsCollapsed = () => {
|
|
2616
|
-
const [collapsed, setCollapsed] = (0,
|
|
2858
|
+
const [collapsed, setCollapsed] = (0, import_react10.useState)(
|
|
2617
2859
|
() => supportsMatchMedia() && window.matchMedia(COLLAPSE_QUERY).matches
|
|
2618
2860
|
);
|
|
2619
|
-
(0,
|
|
2861
|
+
(0, import_react10.useEffect)(() => {
|
|
2620
2862
|
if (supportsMatchMedia()) {
|
|
2621
2863
|
const mql = window.matchMedia(COLLAPSE_QUERY);
|
|
2622
2864
|
const update = () => setCollapsed(mql.matches);
|
|
@@ -2629,7 +2871,7 @@ var useIsCollapsed = () => {
|
|
|
2629
2871
|
};
|
|
2630
2872
|
|
|
2631
2873
|
// ../renderers/src/ColumnsRenderer.tsx
|
|
2632
|
-
var
|
|
2874
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2633
2875
|
var RIGHT_FIRST_STACKING = "right-first-stacking";
|
|
2634
2876
|
var ColumnsRenderer = {
|
|
2635
2877
|
canRenderType: "columns",
|
|
@@ -2645,9 +2887,9 @@ function ColumnsRendererComponent({
|
|
|
2645
2887
|
var _a;
|
|
2646
2888
|
const isCollapsed = useIsCollapsed();
|
|
2647
2889
|
const reverse = isCollapsed && ((_a = tags == null ? void 0 : tags.includes(RIGHT_FIRST_STACKING)) != null ? _a : false);
|
|
2648
|
-
const startColumn = /* @__PURE__ */ (0,
|
|
2649
|
-
const endColumn = /* @__PURE__ */ (0,
|
|
2650
|
-
return /* @__PURE__ */ (0,
|
|
2890
|
+
const startColumn = /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "df-columns-renderer-column", children: startChildren });
|
|
2891
|
+
const endColumn = /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "df-columns-renderer-column", children: endChildren });
|
|
2892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2651
2893
|
"div",
|
|
2652
2894
|
{
|
|
2653
2895
|
className: (0, import_classnames3.default)("df-columns-renderer-container", getMargin(margin), {
|
|
@@ -2691,7 +2933,7 @@ var dateToDateString = (date) => {
|
|
|
2691
2933
|
};
|
|
2692
2934
|
|
|
2693
2935
|
// ../renderers/src/components/VariableDateInput.tsx
|
|
2694
|
-
var
|
|
2936
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2695
2937
|
function VariableDateInput({
|
|
2696
2938
|
control,
|
|
2697
2939
|
inputProps
|
|
@@ -2707,7 +2949,7 @@ function VariableDateInput({
|
|
|
2707
2949
|
onFocus
|
|
2708
2950
|
} = inputProps;
|
|
2709
2951
|
if (control === "date-lookup") {
|
|
2710
|
-
return /* @__PURE__ */ (0,
|
|
2952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2711
2953
|
import_components22.DateLookup,
|
|
2712
2954
|
{
|
|
2713
2955
|
value: dateStringToDateOrNull(inputProps.value),
|
|
@@ -2723,7 +2965,7 @@ function VariableDateInput({
|
|
|
2723
2965
|
}
|
|
2724
2966
|
);
|
|
2725
2967
|
}
|
|
2726
|
-
return /* @__PURE__ */ (0,
|
|
2968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2727
2969
|
import_components22.DateInput,
|
|
2728
2970
|
__spreadProps(__spreadValues({}, inputProps), {
|
|
2729
2971
|
dayAutoComplete: getAutocompleteString(autoComplete, "day"),
|
|
@@ -2740,7 +2982,7 @@ var getAutocompleteString = (value, suffix) => {
|
|
|
2740
2982
|
var VariableDateInput_default = VariableDateInput;
|
|
2741
2983
|
|
|
2742
2984
|
// ../renderers/src/DateInputRenderer.tsx
|
|
2743
|
-
var
|
|
2985
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2744
2986
|
var DateInputRenderer = {
|
|
2745
2987
|
canRenderType: "input-date",
|
|
2746
2988
|
render: (props) => {
|
|
@@ -2765,7 +3007,7 @@ var DateInputRenderer = {
|
|
|
2765
3007
|
]);
|
|
2766
3008
|
const value = initialValue != null ? initialValue : "";
|
|
2767
3009
|
const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
|
|
2768
|
-
return /* @__PURE__ */ (0,
|
|
3010
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2769
3011
|
FieldInput_default,
|
|
2770
3012
|
{
|
|
2771
3013
|
id,
|
|
@@ -2776,7 +3018,7 @@ var DateInputRenderer = {
|
|
|
2776
3018
|
loadingState: props.fieldLoadingState,
|
|
2777
3019
|
help,
|
|
2778
3020
|
features: props.features,
|
|
2779
|
-
children: /* @__PURE__ */ (0,
|
|
3021
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(VariableDateInput_default, { control, inputProps })
|
|
2780
3022
|
}
|
|
2781
3023
|
);
|
|
2782
3024
|
}
|
|
@@ -2788,12 +3030,12 @@ var import_components25 = require("@transferwise/components");
|
|
|
2788
3030
|
|
|
2789
3031
|
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
2790
3032
|
var import_components24 = require("@transferwise/components");
|
|
2791
|
-
var
|
|
2792
|
-
var
|
|
3033
|
+
var import_react11 = require("react");
|
|
3034
|
+
var import_react_intl14 = require("react-intl");
|
|
2793
3035
|
|
|
2794
3036
|
// ../renderers/src/messages/filter.messages.ts
|
|
2795
|
-
var
|
|
2796
|
-
var filter_messages_default = (0,
|
|
3037
|
+
var import_react_intl11 = require("react-intl");
|
|
3038
|
+
var filter_messages_default = (0, import_react_intl11.defineMessages)({
|
|
2797
3039
|
placeholder: {
|
|
2798
3040
|
id: "df.wise.filter.placeholder",
|
|
2799
3041
|
defaultMessage: "Start typing to search",
|
|
@@ -2860,11 +3102,11 @@ var normalizeAndRemoveAccents = (text) => text.trim().toLowerCase().normalize("N
|
|
|
2860
3102
|
|
|
2861
3103
|
// ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
|
|
2862
3104
|
var import_components23 = require("@transferwise/components");
|
|
2863
|
-
var
|
|
3105
|
+
var import_react_intl13 = require("react-intl");
|
|
2864
3106
|
|
|
2865
3107
|
// ../renderers/src/messages/group.messages.ts
|
|
2866
|
-
var
|
|
2867
|
-
var group_messages_default = (0,
|
|
3108
|
+
var import_react_intl12 = require("react-intl");
|
|
3109
|
+
var group_messages_default = (0, import_react_intl12.defineMessages)({
|
|
2868
3110
|
all: {
|
|
2869
3111
|
id: "df.wise.group.all",
|
|
2870
3112
|
defaultMessage: "All",
|
|
@@ -2898,18 +3140,18 @@ var getGroupsFromTags = (knownTags, items) => {
|
|
|
2898
3140
|
};
|
|
2899
3141
|
|
|
2900
3142
|
// ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
|
|
2901
|
-
var
|
|
3143
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2902
3144
|
var groupingTags = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
2903
3145
|
var isGroupedDecision = (options) => {
|
|
2904
3146
|
return getGroupsFromTags(groupingTags, options).length > 0;
|
|
2905
3147
|
};
|
|
2906
3148
|
var GroupedDecisionList = (_a) => {
|
|
2907
3149
|
var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
|
|
2908
|
-
const { formatMessage } = (0,
|
|
3150
|
+
const { formatMessage } = (0, import_react_intl13.useIntl)();
|
|
2909
3151
|
const { options } = rest;
|
|
2910
3152
|
const itemsByTag = [...getGroupsFromTags(groupingTags, options), { tag: "all", items: options }];
|
|
2911
|
-
return /* @__PURE__ */ (0,
|
|
2912
|
-
/* @__PURE__ */ (0,
|
|
3153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_components23.Section, { children: [
|
|
3154
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2913
3155
|
import_components23.Header,
|
|
2914
3156
|
{
|
|
2915
3157
|
as: "h2",
|
|
@@ -2921,26 +3163,26 @@ var GroupedDecisionList = (_a) => {
|
|
|
2921
3163
|
};
|
|
2922
3164
|
|
|
2923
3165
|
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
2924
|
-
var
|
|
3166
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2925
3167
|
var DecisionWrapper = (props) => {
|
|
2926
3168
|
const { title, control, margin } = props;
|
|
2927
|
-
return /* @__PURE__ */ (0,
|
|
2928
|
-
title && /* @__PURE__ */ (0,
|
|
2929
|
-
control === "filtered" ? /* @__PURE__ */ (0,
|
|
3169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: getMargin(margin), children: [
|
|
3170
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_components24.Header, { as: "h2", title }),
|
|
3171
|
+
control === "filtered" ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(UnfilteredDecisionList, __spreadValues({}, props))
|
|
2930
3172
|
] });
|
|
2931
3173
|
};
|
|
2932
3174
|
var UnfilteredDecisionList = (_a) => {
|
|
2933
3175
|
var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
|
|
2934
|
-
return isGroupedDecision(rest.options) ? /* @__PURE__ */ (0,
|
|
3176
|
+
return isGroupedDecision(rest.options) ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
|
|
2935
3177
|
};
|
|
2936
3178
|
var FilteredDecisionList = (props) => {
|
|
2937
|
-
const { formatMessage } = (0,
|
|
2938
|
-
const [query, setQuery] = (0,
|
|
3179
|
+
const { formatMessage } = (0, import_react_intl14.useIntl)();
|
|
3180
|
+
const [query, setQuery] = (0, import_react11.useState)("");
|
|
2939
3181
|
const { control, options, renderDecisionList: renderDecisionList2 } = props;
|
|
2940
3182
|
const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortItems(options, query) : options;
|
|
2941
3183
|
const isGrouped = isGroupedDecision(options);
|
|
2942
|
-
return /* @__PURE__ */ (0,
|
|
2943
|
-
/* @__PURE__ */ (0,
|
|
3184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
3185
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2944
3186
|
import_components24.SearchInput,
|
|
2945
3187
|
{
|
|
2946
3188
|
placeholder: formatMessage(filter_messages_default.placeholder),
|
|
@@ -2952,25 +3194,25 @@ var FilteredDecisionList = (props) => {
|
|
|
2952
3194
|
}
|
|
2953
3195
|
}
|
|
2954
3196
|
),
|
|
2955
|
-
isGrouped && query.length === 0 ? /* @__PURE__ */ (0,
|
|
2956
|
-
query.length > 0 && /* @__PURE__ */ (0,
|
|
3197
|
+
isGrouped && query.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
3198
|
+
query.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_components24.Header, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
|
|
2957
3199
|
filteredOptions.length > 0 ? renderDecisionList2({
|
|
2958
3200
|
control,
|
|
2959
3201
|
className: query.length === 0 ? "m-t-3" : "",
|
|
2960
3202
|
options: filteredOptions
|
|
2961
|
-
}) : /* @__PURE__ */ (0,
|
|
3203
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { children: formatMessage(filter_messages_default.noResults) })
|
|
2962
3204
|
] })
|
|
2963
3205
|
] });
|
|
2964
3206
|
};
|
|
2965
3207
|
|
|
2966
3208
|
// ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
|
|
2967
|
-
var
|
|
3209
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2968
3210
|
var DecisionRenderer = {
|
|
2969
3211
|
canRenderType: "decision",
|
|
2970
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
3212
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
|
|
2971
3213
|
};
|
|
2972
3214
|
var renderDecisionList = ({ options, control }) => {
|
|
2973
|
-
return /* @__PURE__ */ (0,
|
|
3215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children: options.map((_a) => {
|
|
2974
3216
|
var _b = _a, { onClick } = _b, rest = __objRest(_b, ["onClick"]);
|
|
2975
3217
|
const {
|
|
2976
3218
|
description,
|
|
@@ -2983,7 +3225,7 @@ var renderDecisionList = ({ options, control }) => {
|
|
|
2983
3225
|
supportingValues,
|
|
2984
3226
|
tags
|
|
2985
3227
|
} = rest;
|
|
2986
|
-
return /* @__PURE__ */ (0,
|
|
3228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2987
3229
|
import_components25.ListItem,
|
|
2988
3230
|
{
|
|
2989
3231
|
title: itemTitle,
|
|
@@ -2995,7 +3237,7 @@ var renderDecisionList = ({ options, control }) => {
|
|
|
2995
3237
|
media: getMedia(media, shouldUseAvatar(control, tags)),
|
|
2996
3238
|
prompt: getInlineAlert(inlineAlert),
|
|
2997
3239
|
additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
|
|
2998
|
-
control: /* @__PURE__ */ (0,
|
|
3240
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components25.ListItem.Navigation, __spreadValues({}, getAnchorProps()))
|
|
2999
3241
|
},
|
|
3000
3242
|
JSON.stringify(rest)
|
|
3001
3243
|
);
|
|
@@ -3005,7 +3247,7 @@ var DecisionRenderer_default = DecisionRenderer;
|
|
|
3005
3247
|
|
|
3006
3248
|
// ../renderers/src/DividerRenderer.tsx
|
|
3007
3249
|
var import_components26 = require("@transferwise/components");
|
|
3008
|
-
var
|
|
3250
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3009
3251
|
var mapControlToLevel = (control) => {
|
|
3010
3252
|
switch (control) {
|
|
3011
3253
|
case "section":
|
|
@@ -3018,7 +3260,7 @@ var mapControlToLevel = (control) => {
|
|
|
3018
3260
|
};
|
|
3019
3261
|
var DividerRenderer = {
|
|
3020
3262
|
canRenderType: "divider",
|
|
3021
|
-
render: ({ margin, control }) => /* @__PURE__ */ (0,
|
|
3263
|
+
render: ({ margin, control }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components26.Divider, { className: `m-t-0 d-block ${getMargin(margin)}`, level: mapControlToLevel(control) })
|
|
3022
3264
|
};
|
|
3023
3265
|
var DividerRenderer_default = DividerRenderer;
|
|
3024
3266
|
|
|
@@ -3026,8 +3268,8 @@ var DividerRenderer_default = DividerRenderer;
|
|
|
3026
3268
|
var import_components27 = require("@transferwise/components");
|
|
3027
3269
|
|
|
3028
3270
|
// ../renderers/src/messages/external-confirmation.messages.ts
|
|
3029
|
-
var
|
|
3030
|
-
var external_confirmation_messages_default = (0,
|
|
3271
|
+
var import_react_intl15 = require("react-intl");
|
|
3272
|
+
var external_confirmation_messages_default = (0, import_react_intl15.defineMessages)({
|
|
3031
3273
|
title: {
|
|
3032
3274
|
id: "df.wise.ExternalConfirmation.title",
|
|
3033
3275
|
defaultMessage: "Please confirm",
|
|
@@ -3051,9 +3293,9 @@ var external_confirmation_messages_default = (0, import_react_intl11.defineMessa
|
|
|
3051
3293
|
});
|
|
3052
3294
|
|
|
3053
3295
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
3054
|
-
var
|
|
3055
|
-
var
|
|
3056
|
-
var
|
|
3296
|
+
var import_react_intl16 = require("react-intl");
|
|
3297
|
+
var import_react12 = require("react");
|
|
3298
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3057
3299
|
var ExternalConfirmationRenderer = {
|
|
3058
3300
|
canRenderType: "external-confirmation",
|
|
3059
3301
|
render: ExternalConfirmationRendererComponent
|
|
@@ -3064,19 +3306,19 @@ function ExternalConfirmationRendererComponent({
|
|
|
3064
3306
|
open,
|
|
3065
3307
|
onCancel
|
|
3066
3308
|
}) {
|
|
3067
|
-
const { formatMessage } = (0,
|
|
3068
|
-
(0,
|
|
3309
|
+
const { formatMessage } = (0, import_react_intl16.useIntl)();
|
|
3310
|
+
(0, import_react12.useEffect)(() => {
|
|
3069
3311
|
open();
|
|
3070
3312
|
}, []);
|
|
3071
|
-
return /* @__PURE__ */ (0,
|
|
3313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3072
3314
|
import_components27.Modal,
|
|
3073
3315
|
{
|
|
3074
3316
|
open: visible,
|
|
3075
3317
|
title: formatMessage(external_confirmation_messages_default.title),
|
|
3076
|
-
body: /* @__PURE__ */ (0,
|
|
3077
|
-
/* @__PURE__ */ (0,
|
|
3078
|
-
/* @__PURE__ */ (0,
|
|
3079
|
-
/* @__PURE__ */ (0,
|
|
3318
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
3319
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components27.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
|
|
3320
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
|
|
3321
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3080
3322
|
import_components27.Button,
|
|
3081
3323
|
{
|
|
3082
3324
|
v2: true,
|
|
@@ -3090,7 +3332,7 @@ function ExternalConfirmationRendererComponent({
|
|
|
3090
3332
|
children: formatMessage(external_confirmation_messages_default.open)
|
|
3091
3333
|
}
|
|
3092
3334
|
),
|
|
3093
|
-
/* @__PURE__ */ (0,
|
|
3335
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components27.Button, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
|
|
3094
3336
|
] }) })
|
|
3095
3337
|
] }),
|
|
3096
3338
|
onClose: onCancel
|
|
@@ -3107,27 +3349,27 @@ function getOrigin(url) {
|
|
|
3107
3349
|
var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
|
|
3108
3350
|
|
|
3109
3351
|
// ../renderers/src/FormRenderer.tsx
|
|
3110
|
-
var
|
|
3352
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3111
3353
|
var FormRenderer = {
|
|
3112
3354
|
canRenderType: "form",
|
|
3113
|
-
render: ({ children, margin }) => /* @__PURE__ */ (0,
|
|
3355
|
+
render: ({ children, margin }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: getMargin(margin), children })
|
|
3114
3356
|
};
|
|
3115
3357
|
var FormRenderer_default = FormRenderer;
|
|
3116
3358
|
|
|
3117
3359
|
// ../renderers/src/FormSectionRenderer.tsx
|
|
3118
3360
|
var import_components28 = require("@transferwise/components");
|
|
3119
|
-
var
|
|
3361
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3120
3362
|
var FormSectionRenderer = {
|
|
3121
3363
|
canRenderType: "form-section",
|
|
3122
|
-
render: ({ title, description, children }) => /* @__PURE__ */ (0,
|
|
3123
|
-
title && /* @__PURE__ */ (0,
|
|
3364
|
+
render: ({ title, description, children }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("fieldset", { children: [
|
|
3365
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
3124
3366
|
import_components28.Header,
|
|
3125
3367
|
{
|
|
3126
3368
|
as: "h2",
|
|
3127
3369
|
title
|
|
3128
3370
|
}
|
|
3129
3371
|
),
|
|
3130
|
-
description && /* @__PURE__ */ (0,
|
|
3372
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { children: description }),
|
|
3131
3373
|
children
|
|
3132
3374
|
] })
|
|
3133
3375
|
};
|
|
@@ -3135,18 +3377,18 @@ var FormSectionRenderer_default = FormSectionRenderer;
|
|
|
3135
3377
|
|
|
3136
3378
|
// ../renderers/src/HeadingRenderer.tsx
|
|
3137
3379
|
var import_components29 = require("@transferwise/components");
|
|
3138
|
-
var
|
|
3380
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3139
3381
|
var HeadingRenderer = {
|
|
3140
3382
|
canRenderType: "heading",
|
|
3141
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
3383
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Heading, __spreadValues({}, props))
|
|
3142
3384
|
};
|
|
3143
3385
|
function Heading(props) {
|
|
3144
3386
|
const { text, size, align, margin, control } = props;
|
|
3145
3387
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
3146
|
-
return control === "display" ? /* @__PURE__ */ (0,
|
|
3388
|
+
return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(StandardHeading, { size, text, className });
|
|
3147
3389
|
}
|
|
3148
3390
|
function DisplayHeading({ size, text, className }) {
|
|
3149
|
-
return /* @__PURE__ */ (0,
|
|
3391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components29.Display, { type: getDisplayType(size), className, children: text });
|
|
3150
3392
|
}
|
|
3151
3393
|
var getDisplayType = (size) => {
|
|
3152
3394
|
switch (size) {
|
|
@@ -3162,7 +3404,7 @@ var getDisplayType = (size) => {
|
|
|
3162
3404
|
}
|
|
3163
3405
|
};
|
|
3164
3406
|
function StandardHeading({ size, text, className }) {
|
|
3165
|
-
return /* @__PURE__ */ (0,
|
|
3407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components29.Title, { type: getTitleTypeBySize(size), className, children: text });
|
|
3166
3408
|
}
|
|
3167
3409
|
var getTitleTypeBySize = (size) => {
|
|
3168
3410
|
var _a;
|
|
@@ -3179,7 +3421,7 @@ var HeadingRenderer_default = HeadingRenderer;
|
|
|
3179
3421
|
|
|
3180
3422
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
3181
3423
|
var import_components30 = require("@transferwise/components");
|
|
3182
|
-
var
|
|
3424
|
+
var import_react13 = require("react");
|
|
3183
3425
|
|
|
3184
3426
|
// ../renderers/src/utils/api-utils.ts
|
|
3185
3427
|
function isRelativePath(url = "") {
|
|
@@ -3189,7 +3431,7 @@ function isRelativePath(url = "") {
|
|
|
3189
3431
|
}
|
|
3190
3432
|
|
|
3191
3433
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
3192
|
-
var
|
|
3434
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3193
3435
|
function UrlImage({
|
|
3194
3436
|
accessibilityDescription,
|
|
3195
3437
|
align,
|
|
@@ -3198,13 +3440,13 @@ function UrlImage({
|
|
|
3198
3440
|
uri,
|
|
3199
3441
|
httpClient
|
|
3200
3442
|
}) {
|
|
3201
|
-
const [imageSource, setImageSource] = (0,
|
|
3202
|
-
(0,
|
|
3443
|
+
const [imageSource, setImageSource] = (0, import_react13.useState)("");
|
|
3444
|
+
(0, import_react13.useEffect)(() => {
|
|
3203
3445
|
if (!uri.startsWith("urn:")) {
|
|
3204
3446
|
void getImageSource(httpClient, uri).then(setImageSource);
|
|
3205
3447
|
}
|
|
3206
3448
|
}, [uri, httpClient]);
|
|
3207
|
-
return /* @__PURE__ */ (0,
|
|
3449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3208
3450
|
import_components30.Image,
|
|
3209
3451
|
{
|
|
3210
3452
|
className: "df-reserve-space",
|
|
@@ -3247,118 +3489,6 @@ var getImageSource = async (httpClient, imageUrl) => {
|
|
|
3247
3489
|
}
|
|
3248
3490
|
};
|
|
3249
3491
|
|
|
3250
|
-
// ../renderers/src/ImageRenderer/UrnFlagImage.tsx
|
|
3251
|
-
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3252
|
-
var maxFlagSize = 600;
|
|
3253
|
-
function UrnFlagImage({
|
|
3254
|
-
accessibilityDescription,
|
|
3255
|
-
align,
|
|
3256
|
-
margin,
|
|
3257
|
-
size,
|
|
3258
|
-
uri
|
|
3259
|
-
}) {
|
|
3260
|
-
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
|
|
3261
|
-
}
|
|
3262
|
-
|
|
3263
|
-
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
3264
|
-
var import_art4 = require("@wise/art");
|
|
3265
|
-
var import_react13 = require("react");
|
|
3266
|
-
|
|
3267
|
-
// ../renderers/src/ImageRenderer/isAnimated.ts
|
|
3268
|
-
var isAnimated = (uri) => {
|
|
3269
|
-
const { rComponents } = stringToURN(uri);
|
|
3270
|
-
return rComponents.type === "animated";
|
|
3271
|
-
};
|
|
3272
|
-
|
|
3273
|
-
// ../renderers/src/ImageRenderer/SafeIllustration3D.tsx
|
|
3274
|
-
var import_art3 = require("@wise/art");
|
|
3275
|
-
var import_react12 = require("react");
|
|
3276
|
-
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3277
|
-
var Illustration3DErrorBoundary = class extends import_react12.Component {
|
|
3278
|
-
constructor(props) {
|
|
3279
|
-
super(props);
|
|
3280
|
-
this.state = { hasError: false };
|
|
3281
|
-
}
|
|
3282
|
-
static getDerivedStateFromError() {
|
|
3283
|
-
return { hasError: true };
|
|
3284
|
-
}
|
|
3285
|
-
componentDidCatch() {
|
|
3286
|
-
this.props.onError();
|
|
3287
|
-
}
|
|
3288
|
-
render() {
|
|
3289
|
-
if (this.state.hasError) {
|
|
3290
|
-
return null;
|
|
3291
|
-
}
|
|
3292
|
-
return this.props.children;
|
|
3293
|
-
}
|
|
3294
|
-
};
|
|
3295
|
-
var SafeIllustration3D = ({
|
|
3296
|
-
name,
|
|
3297
|
-
size,
|
|
3298
|
-
onError
|
|
3299
|
-
}) => {
|
|
3300
|
-
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Illustration3DErrorBoundary, { onError, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_art3.Illustration3D, { name, size }) });
|
|
3301
|
-
};
|
|
3302
|
-
var SafeIllustration3D_default = SafeIllustration3D;
|
|
3303
|
-
|
|
3304
|
-
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
3305
|
-
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3306
|
-
var urnPrefix = "urn:wise:illustrations:";
|
|
3307
|
-
var isUrnIllustration = (uri) => uri.startsWith(urnPrefix);
|
|
3308
|
-
function UrnIllustration({
|
|
3309
|
-
accessibilityDescription,
|
|
3310
|
-
align,
|
|
3311
|
-
margin,
|
|
3312
|
-
size,
|
|
3313
|
-
uri
|
|
3314
|
-
}) {
|
|
3315
|
-
const [has3DFailed, setHas3DFailed] = (0, import_react13.useState)(false);
|
|
3316
|
-
const illustrationSize = getIllustrationSize(size);
|
|
3317
|
-
const illustrationName = getIllustrationName(uri);
|
|
3318
|
-
const illustration3DName = getIllustration3DName(uri);
|
|
3319
|
-
if (illustration3DName && isAnimated(uri) && !has3DFailed) {
|
|
3320
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3321
|
-
SafeIllustration3D_default,
|
|
3322
|
-
{
|
|
3323
|
-
name: illustration3DName,
|
|
3324
|
-
size: illustrationSize,
|
|
3325
|
-
onError: () => setHas3DFailed(true)
|
|
3326
|
-
}
|
|
3327
|
-
) });
|
|
3328
|
-
}
|
|
3329
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3330
|
-
import_art4.Illustration,
|
|
3331
|
-
{
|
|
3332
|
-
className: "df-illustration",
|
|
3333
|
-
name: illustrationName,
|
|
3334
|
-
size: illustrationSize,
|
|
3335
|
-
alt: accessibilityDescription
|
|
3336
|
-
}
|
|
3337
|
-
) });
|
|
3338
|
-
}
|
|
3339
|
-
var getIllustrationSize = (size) => ({ xs: "small", sm: "small", md: "medium", lg: "large", xl: "large" })[size] || "medium";
|
|
3340
|
-
var getIllustrationName = (uri) => {
|
|
3341
|
-
return uri.replace(urnPrefix, "").split("?")[0];
|
|
3342
|
-
};
|
|
3343
|
-
var getIllustration3DName = (uri) => {
|
|
3344
|
-
const illustrationName = getIllustrationName(uri);
|
|
3345
|
-
return (0, import_art4.isIllustrationSupport3D)(illustrationName) ? illustrationName : null;
|
|
3346
|
-
};
|
|
3347
|
-
|
|
3348
|
-
// ../renderers/src/ImageRenderer/UrnImage.tsx
|
|
3349
|
-
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3350
|
-
var isUrnImage = (uri) => uri.startsWith("urn:");
|
|
3351
|
-
function UrnImage(props) {
|
|
3352
|
-
const { uri } = props;
|
|
3353
|
-
if (isUrnIllustration(uri)) {
|
|
3354
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(UrnIllustration, __spreadValues({}, props));
|
|
3355
|
-
}
|
|
3356
|
-
if (isUrnFlag(uri)) {
|
|
3357
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(UrnFlagImage, __spreadValues({}, props));
|
|
3358
|
-
}
|
|
3359
|
-
return null;
|
|
3360
|
-
}
|
|
3361
|
-
|
|
3362
3492
|
// ../renderers/src/ImageRenderer/ImageRenderer.tsx
|
|
3363
3493
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3364
3494
|
var ImageRenderer = {
|
|
@@ -3643,7 +3773,7 @@ var ModalRenderer = {
|
|
|
3643
3773
|
// ../renderers/src/MoneyInputRenderer.tsx
|
|
3644
3774
|
var import_components39 = require("@transferwise/components");
|
|
3645
3775
|
var import_react15 = require("react");
|
|
3646
|
-
var
|
|
3776
|
+
var import_react_intl17 = require("react-intl");
|
|
3647
3777
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3648
3778
|
var groupingTags2 = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
3649
3779
|
var MoneyInputRenderer = {
|
|
@@ -3670,7 +3800,7 @@ function MoneyInputRendererComponent(props) {
|
|
|
3670
3800
|
onCurrencyChange(0);
|
|
3671
3801
|
}
|
|
3672
3802
|
}, [selectedCurrencyIndex, onCurrencyChange, currencies.length]);
|
|
3673
|
-
const { formatMessage } = (0,
|
|
3803
|
+
const { formatMessage } = (0, import_react_intl17.useIntl)();
|
|
3674
3804
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3675
3805
|
FieldInput_default,
|
|
3676
3806
|
{
|
|
@@ -3744,7 +3874,7 @@ function assertCurrencyCodeIsString(currencyCode) {
|
|
|
3744
3874
|
// ../renderers/src/MultiSelectInputRenderer/InlineComponent.tsx
|
|
3745
3875
|
var import_components40 = require("@transferwise/components");
|
|
3746
3876
|
var import_react16 = require("react");
|
|
3747
|
-
var
|
|
3877
|
+
var import_react_intl18 = require("react-intl");
|
|
3748
3878
|
|
|
3749
3879
|
// ../renderers/src/utils/items-with-index.ts
|
|
3750
3880
|
var zipWithIndex = (items) => items.map((item, index) => __spreadProps(__spreadValues({}, item), {
|
|
@@ -3769,7 +3899,7 @@ function InlineComponent(props) {
|
|
|
3769
3899
|
} = props;
|
|
3770
3900
|
const optionsWithIndex = zipWithIndex(options);
|
|
3771
3901
|
const [query, setQuery] = (0, import_react16.useState)("");
|
|
3772
|
-
const { formatMessage } = (0,
|
|
3902
|
+
const { formatMessage } = (0, import_react_intl18.useIntl)();
|
|
3773
3903
|
const filtered = tags == null ? void 0 : tags.includes("filtered");
|
|
3774
3904
|
const filteredOptions = query ? filterAndSortItems(optionsWithIndex, filtered ? query : "") : optionsWithIndex;
|
|
3775
3905
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
|
@@ -3842,11 +3972,11 @@ function InlineComponent(props) {
|
|
|
3842
3972
|
// ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
|
|
3843
3973
|
var import_components41 = require("@transferwise/components");
|
|
3844
3974
|
var import_react17 = require("react");
|
|
3845
|
-
var
|
|
3975
|
+
var import_react_intl20 = require("react-intl");
|
|
3846
3976
|
|
|
3847
3977
|
// ../renderers/src/messages/multi-select.messages.ts
|
|
3848
|
-
var
|
|
3849
|
-
var multi_select_messages_default = (0,
|
|
3978
|
+
var import_react_intl19 = require("react-intl");
|
|
3979
|
+
var multi_select_messages_default = (0, import_react_intl19.defineMessages)({
|
|
3850
3980
|
summary: {
|
|
3851
3981
|
id: "df.wise.MultiSelect.summary",
|
|
3852
3982
|
defaultMessage: "{first} and {count} more",
|
|
@@ -3857,7 +3987,7 @@ var multi_select_messages_default = (0, import_react_intl15.defineMessages)({
|
|
|
3857
3987
|
// ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
|
|
3858
3988
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
3859
3989
|
function DefaultComponent(props) {
|
|
3860
|
-
const { formatMessage } = (0,
|
|
3990
|
+
const { formatMessage } = (0, import_react_intl20.useIntl)();
|
|
3861
3991
|
const [stagedIndices, setStagedIndices] = (0, import_react17.useState)();
|
|
3862
3992
|
const {
|
|
3863
3993
|
id,
|
|
@@ -4190,7 +4320,7 @@ var NumberInputRenderer = {
|
|
|
4190
4320
|
var NumberInputRenderer_default = NumberInputRenderer;
|
|
4191
4321
|
|
|
4192
4322
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
4193
|
-
var
|
|
4323
|
+
var import_react_intl22 = require("react-intl");
|
|
4194
4324
|
|
|
4195
4325
|
// ../renderers/src/hooks/useSnackBarIfAvailable.ts
|
|
4196
4326
|
var import_components46 = require("@transferwise/components");
|
|
@@ -4206,8 +4336,8 @@ var import_components47 = require("@transferwise/components");
|
|
|
4206
4336
|
var import_classnames6 = __toESM(require_classnames());
|
|
4207
4337
|
|
|
4208
4338
|
// ../renderers/src/messages/paragraph.messages.ts
|
|
4209
|
-
var
|
|
4210
|
-
var paragraph_messages_default = (0,
|
|
4339
|
+
var import_react_intl21 = require("react-intl");
|
|
4340
|
+
var paragraph_messages_default = (0, import_react_intl21.defineMessages)({
|
|
4211
4341
|
copy: {
|
|
4212
4342
|
id: "df.wise.DynamicParagraph.copy",
|
|
4213
4343
|
defaultMessage: "Copy",
|
|
@@ -4241,7 +4371,7 @@ function CopyableParagraph({
|
|
|
4241
4371
|
align,
|
|
4242
4372
|
className
|
|
4243
4373
|
}) {
|
|
4244
|
-
const { formatMessage } = (0,
|
|
4374
|
+
const { formatMessage } = (0, import_react_intl22.useIntl)();
|
|
4245
4375
|
const createSnackbar = useSnackBarIfAvailable();
|
|
4246
4376
|
const copy = () => {
|
|
4247
4377
|
navigator.clipboard.writeText(text).then(() => createSnackbar({ text: formatMessage(paragraph_messages_default.copied) })).catch(() => {
|
|
@@ -4291,11 +4421,11 @@ var import_components49 = require("@transferwise/components");
|
|
|
4291
4421
|
var import_icons2 = require("@transferwise/icons");
|
|
4292
4422
|
var import_classnames7 = __toESM(require_classnames());
|
|
4293
4423
|
var import_react19 = require("react");
|
|
4294
|
-
var
|
|
4424
|
+
var import_react_intl24 = require("react-intl");
|
|
4295
4425
|
|
|
4296
4426
|
// ../renderers/src/messages/repeatable.messages.ts
|
|
4297
|
-
var
|
|
4298
|
-
var repeatable_messages_default = (0,
|
|
4427
|
+
var import_react_intl23 = require("react-intl");
|
|
4428
|
+
var repeatable_messages_default = (0, import_react_intl23.defineMessages)({
|
|
4299
4429
|
addItemTitle: {
|
|
4300
4430
|
id: "df.wise.ArraySchema.addItemTitle",
|
|
4301
4431
|
defaultMessage: "Add Item",
|
|
@@ -4339,7 +4469,7 @@ function Repeatable(props) {
|
|
|
4339
4469
|
onSave,
|
|
4340
4470
|
onRemove
|
|
4341
4471
|
} = props;
|
|
4342
|
-
const { formatMessage } = (0,
|
|
4472
|
+
const { formatMessage } = (0, import_react_intl24.useIntl)();
|
|
4343
4473
|
const [openModalType, setOpenModalType] = (0, import_react19.useState)(null);
|
|
4344
4474
|
const { ref } = useScrollToError(validationState, features);
|
|
4345
4475
|
const onAddItem = () => {
|
|
@@ -4493,7 +4623,7 @@ var getFieldLabel = (label, help, onClick) => {
|
|
|
4493
4623
|
// ../renderers/src/ReviewRenderer.tsx
|
|
4494
4624
|
var import_components51 = require("@transferwise/components");
|
|
4495
4625
|
var import_icons3 = require("@transferwise/icons");
|
|
4496
|
-
var
|
|
4626
|
+
var import_react_intl25 = require("react-intl");
|
|
4497
4627
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
4498
4628
|
var IGNORED_CONTROLS = [
|
|
4499
4629
|
"horizontal",
|
|
@@ -4515,7 +4645,7 @@ var Review = ({
|
|
|
4515
4645
|
title,
|
|
4516
4646
|
trackEvent
|
|
4517
4647
|
}) => {
|
|
4518
|
-
const intl = (0,
|
|
4648
|
+
const intl = (0, import_react_intl25.useIntl)();
|
|
4519
4649
|
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: getMargin(margin), children: [
|
|
4520
4650
|
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Header, { title, callToAction }),
|
|
4521
4651
|
fields.map((field) => {
|
|
@@ -4563,11 +4693,11 @@ var ReviewRenderer_default = ReviewRenderer2;
|
|
|
4563
4693
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
4564
4694
|
var import_components53 = require("@transferwise/components");
|
|
4565
4695
|
var import_react20 = require("react");
|
|
4566
|
-
var
|
|
4696
|
+
var import_react_intl28 = require("react-intl");
|
|
4567
4697
|
|
|
4568
4698
|
// ../renderers/src/messages/search.messages.ts
|
|
4569
|
-
var
|
|
4570
|
-
var search_messages_default = (0,
|
|
4699
|
+
var import_react_intl26 = require("react-intl");
|
|
4700
|
+
var search_messages_default = (0, import_react_intl26.defineMessages)({
|
|
4571
4701
|
loading: {
|
|
4572
4702
|
id: "df.wise.SearchLayout.loading",
|
|
4573
4703
|
defaultMessage: "Loading...",
|
|
@@ -4576,33 +4706,11 @@ var search_messages_default = (0, import_react_intl22.defineMessages)({
|
|
|
4576
4706
|
});
|
|
4577
4707
|
|
|
4578
4708
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
4579
|
-
var
|
|
4580
|
-
|
|
4581
|
-
// ../renderers/src/messages/generic-error.messages.ts
|
|
4582
|
-
var import_react_intl23 = require("react-intl");
|
|
4583
|
-
var generic_error_messages_default = (0, import_react_intl23.defineMessages)({
|
|
4584
|
-
genericErrorRetryHint: {
|
|
4585
|
-
id: "df.wise.PersistAsyncSchema.genericError",
|
|
4586
|
-
defaultMessage: "Something went wrong, please try again.",
|
|
4587
|
-
description: "Generic error message for persist async schema"
|
|
4588
|
-
},
|
|
4589
|
-
genericError: {
|
|
4590
|
-
id: "df.wise.ErrorBoundary.errorAlert",
|
|
4591
|
-
defaultMessage: "Something went wrong.",
|
|
4592
|
-
description: "Generic error message for when something has gone wrong."
|
|
4593
|
-
},
|
|
4594
|
-
retry: {
|
|
4595
|
-
id: "df.wise.ErrorBoundary.retry",
|
|
4596
|
-
defaultMessage: "Retry",
|
|
4597
|
-
description: "Usually this follows the generic error and contains a link."
|
|
4598
|
-
}
|
|
4599
|
-
});
|
|
4600
|
-
|
|
4601
|
-
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
4709
|
+
var import_react_intl27 = require("react-intl");
|
|
4602
4710
|
var import_components52 = require("@transferwise/components");
|
|
4603
4711
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4604
4712
|
function ErrorResult({ state }) {
|
|
4605
|
-
const intl = (0,
|
|
4713
|
+
const intl = (0, import_react_intl27.useIntl)();
|
|
4606
4714
|
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("p", { className: "m-t-2", children: [
|
|
4607
4715
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
4608
4716
|
"\xA0",
|
|
@@ -4626,7 +4734,7 @@ function BlockSearchRendererComponent({
|
|
|
4626
4734
|
onChange
|
|
4627
4735
|
}) {
|
|
4628
4736
|
const [hasSearched, setHasSearched] = (0, import_react20.useState)(false);
|
|
4629
|
-
const { formatMessage } = (0,
|
|
4737
|
+
const { formatMessage } = (0, import_react_intl28.useIntl)();
|
|
4630
4738
|
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: getMargin(margin), children: [
|
|
4631
4739
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4632
4740
|
FieldInput_default,
|
|
@@ -4719,7 +4827,7 @@ var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
|
|
|
4719
4827
|
var import_components54 = require("@transferwise/components");
|
|
4720
4828
|
var import_icons5 = require("@transferwise/icons");
|
|
4721
4829
|
var import_react21 = require("react");
|
|
4722
|
-
var
|
|
4830
|
+
var import_react_intl29 = require("react-intl");
|
|
4723
4831
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
4724
4832
|
function InlineSearchRenderer({
|
|
4725
4833
|
id,
|
|
@@ -4733,7 +4841,7 @@ function InlineSearchRenderer({
|
|
|
4733
4841
|
trackEvent
|
|
4734
4842
|
}) {
|
|
4735
4843
|
const [hasSearched, setHasSearched] = (0, import_react21.useState)(false);
|
|
4736
|
-
const intl = (0,
|
|
4844
|
+
const intl = (0, import_react_intl29.useIntl)();
|
|
4737
4845
|
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4738
4846
|
FieldInput_default,
|
|
4739
4847
|
{
|
|
@@ -4792,7 +4900,7 @@ function mapResultToTypeaheadOption(result) {
|
|
|
4792
4900
|
};
|
|
4793
4901
|
}
|
|
4794
4902
|
function TypeaheadFooter({ state, isLoading }) {
|
|
4795
|
-
const { formatMessage } = (0,
|
|
4903
|
+
const { formatMessage } = (0, import_react_intl29.useIntl)();
|
|
4796
4904
|
if (state.type === "layout") {
|
|
4797
4905
|
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "m-x-1 m-y-1", children: state.layout });
|
|
4798
4906
|
}
|
|
@@ -5257,11 +5365,11 @@ var getHeaderStyle = (tags) => {
|
|
|
5257
5365
|
// ../renderers/src/step/topbar/BackButton.tsx
|
|
5258
5366
|
var import_components63 = require("@transferwise/components");
|
|
5259
5367
|
var import_icons6 = require("@transferwise/icons");
|
|
5260
|
-
var
|
|
5368
|
+
var import_react_intl31 = require("react-intl");
|
|
5261
5369
|
|
|
5262
5370
|
// ../renderers/src/messages/back.messages.ts
|
|
5263
|
-
var
|
|
5264
|
-
var back_messages_default = (0,
|
|
5371
|
+
var import_react_intl30 = require("react-intl");
|
|
5372
|
+
var back_messages_default = (0, import_react_intl30.defineMessages)({
|
|
5265
5373
|
back: {
|
|
5266
5374
|
id: "df.wise.back.label",
|
|
5267
5375
|
defaultMessage: "Back",
|
|
@@ -5272,7 +5380,7 @@ var back_messages_default = (0, import_react_intl27.defineMessages)({
|
|
|
5272
5380
|
// ../renderers/src/step/topbar/BackButton.tsx
|
|
5273
5381
|
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
5274
5382
|
function BackButton({ title, onClick }) {
|
|
5275
|
-
const { formatMessage } = (0,
|
|
5383
|
+
const { formatMessage } = (0, import_react_intl31.useIntl)();
|
|
5276
5384
|
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_components63.IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
|
|
5277
5385
|
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
|
|
5278
5386
|
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_icons6.ArrowLeft, {})
|
|
@@ -5987,11 +6095,11 @@ var customEventsToAnalytics = {
|
|
|
5987
6095
|
|
|
5988
6096
|
// src/dynamicFlow/useOnCopy.tsx
|
|
5989
6097
|
var import_react27 = require("react");
|
|
5990
|
-
var
|
|
6098
|
+
var import_react_intl33 = require("react-intl");
|
|
5991
6099
|
|
|
5992
6100
|
// src/dynamicFlow/messages.ts
|
|
5993
|
-
var
|
|
5994
|
-
var messages_default = (0,
|
|
6101
|
+
var import_react_intl32 = require("react-intl");
|
|
6102
|
+
var messages_default = (0, import_react_intl32.defineMessages)({
|
|
5995
6103
|
copied: {
|
|
5996
6104
|
id: "df.wise.CopyFeedback.copy",
|
|
5997
6105
|
defaultMessage: "Copied to clipboard",
|
|
@@ -6006,7 +6114,7 @@ var messages_default = (0, import_react_intl29.defineMessages)({
|
|
|
6006
6114
|
|
|
6007
6115
|
// src/dynamicFlow/useOnCopy.tsx
|
|
6008
6116
|
var useOnCopy = () => {
|
|
6009
|
-
const { formatMessage } = (0,
|
|
6117
|
+
const { formatMessage } = (0, import_react_intl33.useIntl)();
|
|
6010
6118
|
const createSnackBar = useSnackBarIfAvailable();
|
|
6011
6119
|
return (0, import_react27.useCallback)(
|
|
6012
6120
|
(copiedContent) => {
|
|
@@ -6022,9 +6130,9 @@ var useOnCopy = () => {
|
|
|
6022
6130
|
|
|
6023
6131
|
// src/dynamicFlow/useWiseHttpClient.tsx
|
|
6024
6132
|
var import_react28 = require("react");
|
|
6025
|
-
var
|
|
6133
|
+
var import_react_intl34 = require("react-intl");
|
|
6026
6134
|
var useWiseHttpClient = (httpClient) => {
|
|
6027
|
-
const { locale } = (0,
|
|
6135
|
+
const { locale } = (0, import_react_intl34.useIntl)();
|
|
6028
6136
|
return (0, import_react28.useCallback)(
|
|
6029
6137
|
async (input, init = {}) => {
|
|
6030
6138
|
const headers = new Headers(init.headers);
|
|
@@ -6145,6 +6253,7 @@ var import_dynamic_flow_client8 = require("@wise/dynamic-flow-client");
|
|
|
6145
6253
|
var Header10 = Header;
|
|
6146
6254
|
var Media2 = Media;
|
|
6147
6255
|
var getMargin2 = getMargin;
|
|
6256
|
+
var createCollectionRenderer2 = createCollectionRenderer;
|
|
6148
6257
|
|
|
6149
6258
|
// src/i18n/index.ts
|
|
6150
6259
|
var import_dynamic_flow_client6 = require("@wise/dynamic-flow-client");
|
|
@@ -6158,6 +6267,7 @@ var cs_default = {
|
|
|
6158
6267
|
"df.wise.ArraySchema.minItemsError": "P\u0159idejte alespo\u0148 {minItems}.",
|
|
6159
6268
|
"df.wise.ArraySchema.removeItem": "Odebrat",
|
|
6160
6269
|
"df.wise.ButtonLayout.buttonLoadingMessage": "M\u016F\u017Ee to trvat p\xE1r sekund",
|
|
6270
|
+
"df.wise.Collection.loadMoreMessage": "Na\u010D\xEDst v\xEDce",
|
|
6161
6271
|
"df.wise.ControlFeedback.maxLength": "Zadejte {maxLength} nebo m\xE9n\u011B znak\u016F.",
|
|
6162
6272
|
"df.wise.ControlFeedback.maximum": "Zadejte \u010D\xEDslo, kter\xE9 je {maximum} nebo men\u0161\xED.",
|
|
6163
6273
|
"df.wise.ControlFeedback.maximumDate": "Zadejte datum, kter\xE9 je {maximum} nebo p\u0159edt\xEDm.",
|
|
@@ -6205,6 +6315,7 @@ var de_default = {
|
|
|
6205
6315
|
"df.wise.ArraySchema.minItemsError": "Bitte f\xFCge mindestens {minItems} hinzu.",
|
|
6206
6316
|
"df.wise.ArraySchema.removeItem": "Entfernen",
|
|
6207
6317
|
"df.wise.ButtonLayout.buttonLoadingMessage": "Dies kann ein paar Sekunden dauern",
|
|
6318
|
+
"df.wise.Collection.loadMoreMessage": "Mehr laden",
|
|
6208
6319
|
"df.wise.ControlFeedback.maxLength": "Bitte gib nicht mehr als {maxLength} Zeichen ein.",
|
|
6209
6320
|
"df.wise.ControlFeedback.maximum": "Bitte gib eine Zahl ein, die {maximum} oder weniger betr\xE4gt.",
|
|
6210
6321
|
"df.wise.ControlFeedback.maximumDate": "Bitte gib ein Datum ein, das am oder vor dem {maximum} liegt.",
|
|
@@ -6252,6 +6363,7 @@ var en_default = {
|
|
|
6252
6363
|
"df.wise.ArraySchema.minItemsError": "Please add at least {minItems}.",
|
|
6253
6364
|
"df.wise.ArraySchema.removeItem": "Remove",
|
|
6254
6365
|
"df.wise.ButtonLayout.buttonLoadingMessage": "This might take a few seconds",
|
|
6366
|
+
"df.wise.Collection.loadMoreMessage": "Load more",
|
|
6255
6367
|
"df.wise.ControlFeedback.maxLength": "Please enter {maxLength} or fewer characters.",
|
|
6256
6368
|
"df.wise.ControlFeedback.maximum": "Please enter a number that's {maximum} or less.",
|
|
6257
6369
|
"df.wise.ControlFeedback.maximumDate": "Please enter a date that's on or before {maximum}.",
|
|
@@ -6299,6 +6411,7 @@ var es_default = {
|
|
|
6299
6411
|
"df.wise.ArraySchema.minItemsError": "A\xF1ade al menos {minItems}.",
|
|
6300
6412
|
"df.wise.ArraySchema.removeItem": "Eliminar",
|
|
6301
6413
|
"df.wise.ButtonLayout.buttonLoadingMessage": "Esto puede tardar unos segundos",
|
|
6414
|
+
"df.wise.Collection.loadMoreMessage": "Cargar m\xE1s",
|
|
6302
6415
|
"df.wise.ControlFeedback.maxLength": "Introduce {maxLength} caracteres o menos.",
|
|
6303
6416
|
"df.wise.ControlFeedback.maximum": "Introduce una cifra igual o inferior a {maximum}.",
|
|
6304
6417
|
"df.wise.ControlFeedback.maximumDate": "Introduce una fecha que sea igual o anterior al {maximum}.",
|
|
@@ -6346,6 +6459,7 @@ var fr_default = {
|
|
|
6346
6459
|
"df.wise.ArraySchema.minItemsError": "Veuillez ajouter au moins {minItems}.",
|
|
6347
6460
|
"df.wise.ArraySchema.removeItem": "Supprimer",
|
|
6348
6461
|
"df.wise.ButtonLayout.buttonLoadingMessage": "Un instant, s'il vous pla\xEEt...",
|
|
6462
|
+
"df.wise.Collection.loadMoreMessage": "Charger plus",
|
|
6349
6463
|
"df.wise.ControlFeedback.maxLength": "Veuillez saisir {maxLength} caract\xE8res ou moins.",
|
|
6350
6464
|
"df.wise.ControlFeedback.maximum": "Veuillez saisir un nombre inf\xE9rieur ou \xE9gal \xE0 {maximum}.",
|
|
6351
6465
|
"df.wise.ControlFeedback.maximumDate": "Veuillez saisir une date \xE9gale ou ant\xE9rieure au {maximum}.",
|
|
@@ -6393,6 +6507,7 @@ var hu_default = {
|
|
|
6393
6507
|
"df.wise.ArraySchema.minItemsError": "K\xE9r\xFCnk, legal\xE1bb {minItems} t\xE9telt adj meg.",
|
|
6394
6508
|
"df.wise.ArraySchema.removeItem": "Elt\xE1vol\xEDt\xE1s",
|
|
6395
6509
|
"df.wise.ButtonLayout.buttonLoadingMessage": "Ez eltarthat n\xE9h\xE1ny m\xE1sodpercig",
|
|
6510
|
+
"df.wise.Collection.loadMoreMessage": "Tov\xE1bbiak bet\xF6lt\xE9se",
|
|
6396
6511
|
"df.wise.ControlFeedback.maxLength": "K\xE9r\xFCnk, legfeljebb {maxLength} karaktert adj meg.",
|
|
6397
6512
|
"df.wise.ControlFeedback.maximum": "K\xE9r\xFCnk, add meg ezt vagy egy enn\xE9l kisebb sz\xE1mot: {maximum}.",
|
|
6398
6513
|
"df.wise.ControlFeedback.maximumDate": "K\xE9r\xFCnk, adj meg egy d\xE1tumot, ami megegyezik {maximum} napj\xE1val, vagy egy enn\xE9l kor\xE1bbit.",
|
|
@@ -6440,6 +6555,7 @@ var id_default = {
|
|
|
6440
6555
|
"df.wise.ArraySchema.minItemsError": "Harap tambahkan setidaknya {minItems}.",
|
|
6441
6556
|
"df.wise.ArraySchema.removeItem": "Hapus",
|
|
6442
6557
|
"df.wise.ButtonLayout.buttonLoadingMessage": "Ini mungkin memakan waktu beberapa detik",
|
|
6558
|
+
"df.wise.Collection.loadMoreMessage": "Muat lebih banyak",
|
|
6443
6559
|
"df.wise.ControlFeedback.maxLength": "Harap masukkan {maxLength} karakter atau kurang.",
|
|
6444
6560
|
"df.wise.ControlFeedback.maximum": "Harap masukkan angka paling besar {maximum} atau kurang dari itu.",
|
|
6445
6561
|
"df.wise.ControlFeedback.maximumDate": "Harap masukkan tanggal pada atau sebelum {maximum}.",
|
|
@@ -6487,6 +6603,7 @@ var it_default = {
|
|
|
6487
6603
|
"df.wise.ArraySchema.minItemsError": "Aggiungi almeno {minItems}.",
|
|
6488
6604
|
"df.wise.ArraySchema.removeItem": "Rimuovi",
|
|
6489
6605
|
"df.wise.ButtonLayout.buttonLoadingMessage": "Potrebbero volerci un paio di secondi",
|
|
6606
|
+
"df.wise.Collection.loadMoreMessage": "Carica altro",
|
|
6490
6607
|
"df.wise.ControlFeedback.maxLength": "Inserisci un massimo di {maxLength} caratteri.",
|
|
6491
6608
|
"df.wise.ControlFeedback.maximum": "Inserisci un numero uguale o inferiore a {maximum}.",
|
|
6492
6609
|
"df.wise.ControlFeedback.maximumDate": "Inserisci una data corrispondente o precedente al {maximum}.",
|
|
@@ -6534,6 +6651,7 @@ var ja_default = {
|
|
|
6534
6651
|
"df.wise.ArraySchema.minItemsError": "{minItems}\u30A2\u30A4\u30C6\u30E0\u4EE5\u4E0A\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
6535
6652
|
"df.wise.ArraySchema.removeItem": "\u524A\u9664\u3059\u308B",
|
|
6536
6653
|
"df.wise.ButtonLayout.buttonLoadingMessage": "\u6570\u79D2\u304B\u304B\u308B\u5834\u5408\u304C\u3042\u308A\u307E\u3059",
|
|
6654
|
+
"df.wise.Collection.loadMoreMessage": "\u3082\u3063\u3068\u898B\u308B",
|
|
6537
6655
|
"df.wise.ControlFeedback.maxLength": "{maxLength}\u6587\u5B57\u4EE5\u4E0B\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
6538
6656
|
"df.wise.ControlFeedback.maximum": "{maximum}\u4EE5\u4E0B\u306E\u6570\u5B57\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
6539
6657
|
"df.wise.ControlFeedback.maximumDate": "{maximum}\u307E\u305F\u306F\u305D\u308C\u4EE5\u524D\u306E\u65E5\u4ED8\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
@@ -6581,6 +6699,7 @@ var nl_default = {
|
|
|
6581
6699
|
"df.wise.ArraySchema.minItemsError": "Voeg minimaal {minItems} toe.",
|
|
6582
6700
|
"df.wise.ArraySchema.removeItem": "Verwijderen",
|
|
6583
6701
|
"df.wise.ButtonLayout.buttonLoadingMessage": "Dit kan enkele seconden duren",
|
|
6702
|
+
"df.wise.Collection.loadMoreMessage": "Meer laden",
|
|
6584
6703
|
"df.wise.ControlFeedback.maxLength": "Voer {maxLength} of minder tekens in.",
|
|
6585
6704
|
"df.wise.ControlFeedback.maximum": "Voer een getal in dat {maximum} of lager is.",
|
|
6586
6705
|
"df.wise.ControlFeedback.maximumDate": "Voer een datum in die op of voor {maximum} is.",
|
|
@@ -6628,6 +6747,7 @@ var pl_default = {
|
|
|
6628
6747
|
"df.wise.ArraySchema.minItemsError": "Prosimy doda\u0107 co najmniej {minItems}.",
|
|
6629
6748
|
"df.wise.ArraySchema.removeItem": "Usu\u0144",
|
|
6630
6749
|
"df.wise.ButtonLayout.buttonLoadingMessage": "To mo\u017Ce potrwa\u0107 kilka sekund",
|
|
6750
|
+
"df.wise.Collection.loadMoreMessage": "Za\u0142aduj wi\u0119cej",
|
|
6631
6751
|
"df.wise.ControlFeedback.maxLength": "Prosimy wprowadzi\u0107 do {maxLength} znak\xF3w.",
|
|
6632
6752
|
"df.wise.ControlFeedback.maximum": "Wprowad\u017A liczb\u0119 r\xF3wn\u0105 lub mniejsz\u0105 ni\u017C {maximum}.",
|
|
6633
6753
|
"df.wise.ControlFeedback.maximumDate": "Wprowad\u017A dat\u0119 nie p\xF3\u017Aniejsz\u0105 ni\u017C {maximum}.",
|
|
@@ -6675,6 +6795,7 @@ var pt_default = {
|
|
|
6675
6795
|
"df.wise.ArraySchema.minItemsError": "Adicione pelo menos {minItems}.",
|
|
6676
6796
|
"df.wise.ArraySchema.removeItem": "Remover",
|
|
6677
6797
|
"df.wise.ButtonLayout.buttonLoadingMessage": "Isso pode levar alguns segundos",
|
|
6798
|
+
"df.wise.Collection.loadMoreMessage": "Carregar mais",
|
|
6678
6799
|
"df.wise.ControlFeedback.maxLength": "Por favor, insira {maxLength} caracteres ou menos.",
|
|
6679
6800
|
"df.wise.ControlFeedback.maximum": "Por favor, insira um n\xFAmero que seja {maximum} ou menos.",
|
|
6680
6801
|
"df.wise.ControlFeedback.maximumDate": "Por favor, insira uma data que seja em ou antes de {maximum}.",
|
|
@@ -6722,6 +6843,7 @@ var ro_default = {
|
|
|
6722
6843
|
"df.wise.ArraySchema.minItemsError": "Te rug\u0103m s\u0103 adaugi cel pu\u021Bin {minItems}.",
|
|
6723
6844
|
"df.wise.ArraySchema.removeItem": "Elimin\u0103",
|
|
6724
6845
|
"df.wise.ButtonLayout.buttonLoadingMessage": "Acest lucru ar putea dura c\xE2teva secunde",
|
|
6846
|
+
"df.wise.Collection.loadMoreMessage": "\xCEncarc\u0103 mai multe",
|
|
6725
6847
|
"df.wise.ControlFeedback.maxLength": "Te rug\u0103m s\u0103 introduci {maxLength} sau mai pu\u021Bine caractere.",
|
|
6726
6848
|
"df.wise.ControlFeedback.maximum": "Te rug\u0103m s\u0103 introduci un num\u0103r egal cu {maximum} sau mai mic.",
|
|
6727
6849
|
"df.wise.ControlFeedback.maximumDate": "Te rug\u0103m s\u0103 introduci o dat\u0103 de \xEEnainte de sau egal\u0103 cu {maximum}.",
|
|
@@ -6769,6 +6891,7 @@ var ru_default = {
|
|
|
6769
6891
|
"df.wise.ArraySchema.minItemsError": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0434\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u043F\u043E \u043A\u0440\u0430\u0439\u043D\u0435\u0439 \u043C\u0435\u0440\u0435 {minItems}.",
|
|
6770
6892
|
"df.wise.ArraySchema.removeItem": "\u0423\u0434\u0430\u043B\u0438\u0442\u044C",
|
|
6771
6893
|
"df.wise.ButtonLayout.buttonLoadingMessage": "\u042D\u0442\u043E \u043C\u043E\u0436\u0435\u0442 \u0437\u0430\u043D\u044F\u0442\u044C \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0435\u043A\u0443\u043D\u0434",
|
|
6894
|
+
"df.wise.Collection.loadMoreMessage": "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0431\u043E\u043B\u044C\u0448\u0435",
|
|
6772
6895
|
"df.wise.ControlFeedback.maxLength": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 {maxLength} \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0438\u043B\u0438 \u043C\u0435\u043D\u044C\u0448\u0435.",
|
|
6773
6896
|
"df.wise.ControlFeedback.maximum": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0447\u0438\u0441\u043B\u043E, \u0440\u0430\u0432\u043D\u043E\u0435 {maximum} \u0438\u043B\u0438 \u043C\u0435\u043D\u044C\u0448\u0435.",
|
|
6774
6897
|
"df.wise.ControlFeedback.maximumDate": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u0430\u0442\u0443, \u0440\u0430\u0432\u043D\u0443\u044E {maximum} \u0438\u043B\u0438 \u0431\u043E\u043B\u0435\u0435 \u0440\u0430\u043D\u043D\u044E\u044E.",
|
|
@@ -6816,6 +6939,7 @@ var th_default = {
|
|
|
6816
6939
|
"df.wise.ArraySchema.minItemsError": "\u0E42\u0E1B\u0E23\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22 {minItems}",
|
|
6817
6940
|
"df.wise.ArraySchema.removeItem": "\u0E25\u0E1A",
|
|
6818
6941
|
"df.wise.ButtonLayout.buttonLoadingMessage": "\u0E2D\u0E32\u0E08\u0E43\u0E0A\u0E49\u0E40\u0E27\u0E25\u0E32\u0E2A\u0E31\u0E01\u0E2A\u0E2D\u0E07\u0E2A\u0E32\u0E21\u0E27\u0E34\u0E19\u0E32\u0E17\u0E35",
|
|
6942
|
+
"df.wise.Collection.loadMoreMessage": "\u0E42\u0E2B\u0E25\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",
|
|
6819
6943
|
"df.wise.ControlFeedback.maxLength": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19 {maxLength} \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23\u0E2B\u0E23\u0E37\u0E2D\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19",
|
|
6820
6944
|
"df.wise.ControlFeedback.maximum": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 {maximum} \u0E2B\u0E23\u0E37\u0E2D\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",
|
|
6821
6945
|
"df.wise.ControlFeedback.maximumDate": "\u0E42\u0E1B\u0E23\u0E14\u0E43\u0E2A\u0E48\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19 {maximum} \u0E2B\u0E23\u0E37\u0E2D\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E31\u0E49\u0E19",
|
|
@@ -6863,6 +6987,7 @@ var tr_default = {
|
|
|
6863
6987
|
"df.wise.ArraySchema.minItemsError": "L\xFCtfen en az {minItems} ekleme yap\u0131n.",
|
|
6864
6988
|
"df.wise.ArraySchema.removeItem": "Kald\u0131r",
|
|
6865
6989
|
"df.wise.ButtonLayout.buttonLoadingMessage": "Bu birka\xE7 saniye s\xFCrebilir",
|
|
6990
|
+
"df.wise.Collection.loadMoreMessage": "Daha fazla y\xFCkle",
|
|
6866
6991
|
"df.wise.ControlFeedback.maxLength": "L\xFCtfen {maxLength} veya daha az karakter girin.",
|
|
6867
6992
|
"df.wise.ControlFeedback.maximum": "L\xFCtfen {maximum} veya daha d\xFC\u015F\xFCk bir say\u0131 girin.",
|
|
6868
6993
|
"df.wise.ControlFeedback.maximumDate": "L\xFCtfen {maximum} veya daha erken bir tarih girin.",
|
|
@@ -6910,6 +7035,7 @@ var zh_CN_default = {
|
|
|
6910
7035
|
"df.wise.ArraySchema.minItemsError": "\u8BF7\u81F3\u5C11\u6DFB\u52A0 {minItems} \u9879\u3002",
|
|
6911
7036
|
"df.wise.ArraySchema.removeItem": "\u79FB\u9664",
|
|
6912
7037
|
"df.wise.ButtonLayout.buttonLoadingMessage": "\u6B64\u8FC7\u7A0B\u53EF\u80FD\u9700\u8981\u51E0\u79D2\u949F",
|
|
7038
|
+
"df.wise.Collection.loadMoreMessage": "\u52A0\u8F7D\u66F4\u591A",
|
|
6913
7039
|
"df.wise.ControlFeedback.maxLength": "\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC7 {maxLength} \u4E2A\u5B57\u7B26\u3002",
|
|
6914
7040
|
"df.wise.ControlFeedback.maximum": "\u8BF7\u8F93\u5165\u4E00\u4E2A\u5C0F\u4E8E\u6216\u7B49\u4E8E {maximum} \u7684\u6570\u5B57\u3002",
|
|
6915
7041
|
"df.wise.ControlFeedback.maximumDate": "\u8BF7\u8F93\u5165 {maximum} \u6216\u4E4B\u524D\u7684\u65E5\u671F",
|
|
@@ -6957,6 +7083,7 @@ var zh_HK_default = {
|
|
|
6957
7083
|
"df.wise.ArraySchema.minItemsError": "\u8ACB\u81F3\u5C11\u6DFB\u52A0{minItems}\u9805\u3002",
|
|
6958
7084
|
"df.wise.ArraySchema.removeItem": "\u79FB\u9664",
|
|
6959
7085
|
"df.wise.ButtonLayout.buttonLoadingMessage": "\u6B64\u7A0B\u5E8F\u53EF\u80FD\u9700\u6642\u5E7E\u79D2",
|
|
7086
|
+
"df.wise.Collection.loadMoreMessage": "\u8F09\u5165\u66F4\u591A",
|
|
6960
7087
|
"df.wise.ControlFeedback.maxLength": "\u8ACB\u8F38\u5165\u6700\u591A{maxLength}\u500B\u5B57\u5143\u3002",
|
|
6961
7088
|
"df.wise.ControlFeedback.maximum": "\u8ACB\u8F38\u5165\u4E00\u500B\u5C0F\u65BC\u6216\u7B49\u65BC{maximum}\u7684\u6578\u5B57\u3002",
|
|
6962
7089
|
"df.wise.ControlFeedback.maximumDate": "\u8ACB\u8F38\u5165{maximum}\u6216\u4E4B\u524D\u7684\u65E5\u671F\u3002",
|