@wise/dynamic-flow-client-internal 5.31.0 → 5.33.0-experimental-f7c2300
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 +2 -0
- package/build/i18n/cs.json +2 -0
- package/build/i18n/de.json +2 -0
- package/build/i18n/en.json +4 -0
- package/build/i18n/es.json +2 -0
- package/build/i18n/fr.json +2 -0
- package/build/i18n/hu.json +2 -0
- package/build/i18n/id.json +2 -0
- package/build/i18n/it.json +2 -0
- package/build/i18n/ja.json +2 -0
- package/build/i18n/ko.json +2 -0
- package/build/i18n/nl.json +2 -0
- package/build/i18n/pl.json +2 -0
- package/build/i18n/pt.json +2 -0
- package/build/i18n/ro.json +2 -0
- package/build/i18n/ru.json +2 -0
- package/build/i18n/sv.json +2 -0
- package/build/i18n/th.json +2 -0
- package/build/i18n/tr.json +2 -0
- package/build/i18n/uk.json +2 -0
- package/build/i18n/zh_CN.json +2 -0
- package/build/i18n/zh_HK.json +2 -0
- package/build/main.css +24 -0
- package/build/main.js +1515 -887
- package/build/main.mjs +1339 -705
- package/build/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +8 -7
- package/build/dynamicFlow/DynamicFlow.js +0 -11
- package/build/dynamicFlow/DynamicFlowModal.js +0 -21
- package/build/dynamicFlow/DynamicFlowWiseProps.js +0 -1
- package/build/dynamicFlow/DynamicFlowWithRef.js +0 -19
- package/build/dynamicFlow/context-menu/useContextMenu.js +0 -33
- package/build/dynamicFlow/context-menu/useDFContextMenu.js +0 -135
- package/build/dynamicFlow/context-menu/useDFContextMenu.test.js +0 -101
- package/build/dynamicFlow/getMergedRenderers.js +0 -36
- package/build/dynamicFlow/messages.js +0 -13
- package/build/dynamicFlow/renderers.js +0 -10
- package/build/dynamicFlow/telemetry/app-version.js +0 -4
- package/build/dynamicFlow/telemetry/dispatchAnalyticsEvent.js +0 -8
- package/build/dynamicFlow/telemetry/getLogEvent.js +0 -22
- package/build/dynamicFlow/telemetry/getTrackEvent.js +0 -39
- package/build/dynamicFlow/telemetry/index.js +0 -2
- package/build/dynamicFlow/useCreateSnackBar.js +0 -9
- package/build/dynamicFlow/useOnCopy.js +0 -16
- package/build/dynamicFlow/useWiseHttpClient.js +0 -24
- package/build/dynamicFlow/useWiseToCoreProps.js +0 -42
- package/build/i18n/index.js +0 -43
- package/build/index.js +0 -6
- package/build/stories/ButtonLoader.story.js +0 -109
- package/build/stories/ContainerQueries.story.js +0 -74
- package/build/stories/DynamicFlow.story.js +0 -37
- package/build/stories/DynamicFlowWithRef.story.js +0 -72
- package/build/stories/Editable.story.js +0 -58
- package/build/stories/Initialisation.story.js +0 -33
- package/build/stories/PinnedButtons.story.js +0 -94
- package/build/stories/SCAIntegration.story.js +0 -67
- package/build/stories/utils/fixtureHttpClient.js +0 -59
- package/build/test-utils/NeptuneProviders.js +0 -11
- package/build/test-utils/index.js +0 -4
- package/build/test-utils/respond-with.js +0 -6
- package/build/test-utils/rtl-utils.js +0 -7
- package/build/test-utils/wait.js +0 -3
- package/build/tests/DynamicFlow.test.js +0 -177
- package/build/tests/HideStepTitle.test.js +0 -58
- package/build/tests/RequestCache.test.js +0 -34
- package/build/tests/SCARejectionHandling.test.js +0 -71
- package/build/tests/Subflow.Wise.test.js +0 -650
- package/build/tests/events.test.js +0 -124
- package/build/tests/logging.test.js +0 -12
- package/build/tests/onNotification.test.js +0 -96
- package/build/tests/renderers/ControlAndTags.test.js +0 -225
- package/build/tests/renderers/ImageRenderer.test.js +0 -129
- package/build/tests/renderers/RadioInputRendererComponent.test.js +0 -89
- package/build/tests/renderers/ReviewRenderer.test.js +0 -41
- package/build/tests/renderers/TextInputRenderer.test.js +0 -44
- package/build/tests/renderers/TimeZoneHeader.test.js +0 -19
- package/build/tests/renderers/UploadInputRenderer.maxSize.test.js +0 -22
- package/build/tests/renderers/value-utils.test.js +0 -24
package/build/main.js
CHANGED
|
@@ -70,7 +70,7 @@ var require_classnames = __commonJS({
|
|
|
70
70
|
(function() {
|
|
71
71
|
"use strict";
|
|
72
72
|
var hasOwn = {}.hasOwnProperty;
|
|
73
|
-
function
|
|
73
|
+
function classNames38() {
|
|
74
74
|
var classes = "";
|
|
75
75
|
for (var i = 0; i < arguments.length; i++) {
|
|
76
76
|
var arg = arguments[i];
|
|
@@ -88,7 +88,7 @@ var require_classnames = __commonJS({
|
|
|
88
88
|
return "";
|
|
89
89
|
}
|
|
90
90
|
if (Array.isArray(arg)) {
|
|
91
|
-
return
|
|
91
|
+
return classNames38.apply(null, arg);
|
|
92
92
|
}
|
|
93
93
|
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
|
|
94
94
|
return arg.toString();
|
|
@@ -111,14 +111,14 @@ var require_classnames = __commonJS({
|
|
|
111
111
|
return value + newClass;
|
|
112
112
|
}
|
|
113
113
|
if (typeof module2 !== "undefined" && module2.exports) {
|
|
114
|
-
|
|
115
|
-
module2.exports =
|
|
114
|
+
classNames38.default = classNames38;
|
|
115
|
+
module2.exports = classNames38;
|
|
116
116
|
} else if (typeof define === "function" && typeof define.amd === "object" && define.amd) {
|
|
117
117
|
define("classnames", [], function() {
|
|
118
|
-
return
|
|
118
|
+
return classNames38;
|
|
119
119
|
});
|
|
120
120
|
} else {
|
|
121
|
-
window.classNames =
|
|
121
|
+
window.classNames = classNames38;
|
|
122
122
|
}
|
|
123
123
|
})();
|
|
124
124
|
}
|
|
@@ -146,7 +146,7 @@ var import_dynamic_flow_client4 = require("@wise/dynamic-flow-client");
|
|
|
146
146
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
147
147
|
var appVersion = (
|
|
148
148
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
149
|
-
typeof process !== "undefined" ? "5.
|
|
149
|
+
typeof process !== "undefined" ? "5.32.0" : "0.0.0"
|
|
150
150
|
);
|
|
151
151
|
|
|
152
152
|
// src/dynamicFlow/context-menu/useContextMenu.tsx
|
|
@@ -336,7 +336,7 @@ var recursivelyRemoveNullish = (element) => {
|
|
|
336
336
|
};
|
|
337
337
|
|
|
338
338
|
// src/dynamicFlow/useWiseToCoreProps.tsx
|
|
339
|
-
var
|
|
339
|
+
var import_react36 = require("react");
|
|
340
340
|
|
|
341
341
|
// src/dynamicFlow/getMergedRenderers.tsx
|
|
342
342
|
var import_dynamic_flow_client2 = require("@wise/dynamic-flow-client");
|
|
@@ -1551,6 +1551,7 @@ var getSupportingValues = (supportingValues) => {
|
|
|
1551
1551
|
};
|
|
1552
1552
|
|
|
1553
1553
|
// ../renderers/src/CheckboxInputRenderer.tsx
|
|
1554
|
+
var import_classnames11 = __toESM(require_classnames());
|
|
1554
1555
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1555
1556
|
var CheckboxInputRenderer = {
|
|
1556
1557
|
canRenderType: "input-checkbox",
|
|
@@ -1605,36 +1606,26 @@ var CheckboxComponent = (props) => {
|
|
|
1605
1606
|
);
|
|
1606
1607
|
};
|
|
1607
1608
|
var CheckboxItemComponent = (props) => {
|
|
1608
|
-
const {
|
|
1609
|
-
additionalText,
|
|
1610
|
-
description,
|
|
1611
|
-
disabled,
|
|
1612
|
-
inlineAlert,
|
|
1613
|
-
media,
|
|
1614
|
-
supportingValues,
|
|
1615
|
-
title,
|
|
1616
|
-
validationState,
|
|
1617
|
-
value,
|
|
1618
|
-
features,
|
|
1619
|
-
onChange
|
|
1620
|
-
} = props;
|
|
1609
|
+
const { validationState, value, features, onChange } = props;
|
|
1621
1610
|
const { ref } = useScrollToError(validationState, features);
|
|
1622
1611
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ref, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1623
1612
|
import_components14.ListItem,
|
|
1624
|
-
__spreadProps(__spreadValues({
|
|
1625
|
-
title,
|
|
1626
|
-
subtitle: description,
|
|
1627
|
-
additionalInfo: getAdditionalText(additionalText),
|
|
1628
|
-
media: getMedia(media, false),
|
|
1629
|
-
disabled,
|
|
1630
|
-
prompt: getInlineAlertOrValidation(validationState, inlineAlert),
|
|
1613
|
+
__spreadProps(__spreadValues({}, getListItemProps(props)), {
|
|
1631
1614
|
control: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components14.ListItem.Checkbox, { checked: value, onChange: () => onChange(!value) })
|
|
1632
|
-
}, getSupportingValues(supportingValues)), {
|
|
1633
|
-
className: controlAndTagsToCSSClass(props)
|
|
1634
1615
|
})
|
|
1635
1616
|
) });
|
|
1636
1617
|
};
|
|
1637
1618
|
var SwitchItemComponent = (props) => {
|
|
1619
|
+
const { validationState, value, features, onChange } = props;
|
|
1620
|
+
const { ref } = useScrollToError(validationState, features);
|
|
1621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ref, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1622
|
+
import_components14.ListItem,
|
|
1623
|
+
__spreadProps(__spreadValues({}, getListItemProps(props)), {
|
|
1624
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components14.ListItem.Switch, { checked: value, onClick: () => onChange(!value) })
|
|
1625
|
+
})
|
|
1626
|
+
) });
|
|
1627
|
+
};
|
|
1628
|
+
var getListItemProps = (props) => {
|
|
1638
1629
|
const {
|
|
1639
1630
|
additionalText,
|
|
1640
1631
|
description,
|
|
@@ -1642,27 +1633,23 @@ var SwitchItemComponent = (props) => {
|
|
|
1642
1633
|
inlineAlert,
|
|
1643
1634
|
media,
|
|
1644
1635
|
supportingValues,
|
|
1636
|
+
tags,
|
|
1645
1637
|
title,
|
|
1646
|
-
validationState
|
|
1647
|
-
value,
|
|
1648
|
-
features,
|
|
1649
|
-
onChange
|
|
1638
|
+
validationState
|
|
1650
1639
|
} = props;
|
|
1651
|
-
const
|
|
1652
|
-
return
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
})
|
|
1665
|
-
) });
|
|
1640
|
+
const spotlight = (tags == null ? void 0 : tags.includes("spotlight-active")) ? "active" : (tags == null ? void 0 : tags.includes("spotlight-inactive")) ? "inactive" : void 0;
|
|
1641
|
+
return __spreadValues({
|
|
1642
|
+
additionalInfo: getAdditionalText(additionalText),
|
|
1643
|
+
className: (0, import_classnames11.default)(controlAndTagsToCSSClass(props), {
|
|
1644
|
+
"m-b-1": spotlight
|
|
1645
|
+
}),
|
|
1646
|
+
disabled,
|
|
1647
|
+
media: getMedia(media, false),
|
|
1648
|
+
prompt: getInlineAlertOrValidation(validationState, inlineAlert),
|
|
1649
|
+
spotlight,
|
|
1650
|
+
subtitle: description,
|
|
1651
|
+
title
|
|
1652
|
+
}, getSupportingValues(supportingValues));
|
|
1666
1653
|
};
|
|
1667
1654
|
var getInlineAlertOrValidation = (validationState, inlineAlert) => {
|
|
1668
1655
|
if ((validationState == null ? void 0 : validationState.status) === "invalid") {
|
|
@@ -1672,8 +1659,9 @@ var getInlineAlertOrValidation = (validationState, inlineAlert) => {
|
|
|
1672
1659
|
};
|
|
1673
1660
|
var CheckboxInputRenderer_default = CheckboxInputRenderer;
|
|
1674
1661
|
|
|
1675
|
-
// ../renderers/src/CollectionRenderer/
|
|
1676
|
-
var
|
|
1662
|
+
// ../renderers/src/CollectionRenderer/CollectionRendererComponent.tsx
|
|
1663
|
+
var import_components15 = require("@transferwise/components");
|
|
1664
|
+
var import_react8 = require("motion/react");
|
|
1677
1665
|
|
|
1678
1666
|
// ../renderers/src/messages/generic-error.messages.ts
|
|
1679
1667
|
var import_react_intl5 = require("react-intl");
|
|
@@ -1695,6 +1683,58 @@ var generic_error_messages_default = (0, import_react_intl5.defineMessages)({
|
|
|
1695
1683
|
}
|
|
1696
1684
|
});
|
|
1697
1685
|
|
|
1686
|
+
// ../renderers/src/CollectionRenderer/CollectionRendererComponent.tsx
|
|
1687
|
+
var import_react_intl6 = require("react-intl");
|
|
1688
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1689
|
+
var CollectionRendererComponent = (props) => {
|
|
1690
|
+
const { state, depth, pop, Search: Search5, Filters, Results, FocusedResults } = props;
|
|
1691
|
+
const { status, search } = state;
|
|
1692
|
+
const isForked = depth > 0;
|
|
1693
|
+
const isError = status.type === "error" && (status.reason === "search" || status.reason === "filter");
|
|
1694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1695
|
+
"div",
|
|
1696
|
+
{
|
|
1697
|
+
role: "presentation",
|
|
1698
|
+
onBlur: (event) => {
|
|
1699
|
+
const { target, relatedTarget, currentTarget } = event;
|
|
1700
|
+
const lostFocus = relatedTarget === null && (!target.isConnected || target.matches(":disabled"));
|
|
1701
|
+
if (isForked && !(search == null ? void 0 : search.query) && !lostFocus && !currentTarget.contains(relatedTarget)) {
|
|
1702
|
+
pop();
|
|
1703
|
+
}
|
|
1704
|
+
},
|
|
1705
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react8.MotionConfig, { reducedMotion: "user", children: [
|
|
1706
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Search5, __spreadValues({}, props)),
|
|
1707
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Filters, __spreadValues({}, props)),
|
|
1708
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react8.AnimatePresence, { mode: "wait", initial: false, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1709
|
+
import_react8.motion.div,
|
|
1710
|
+
{
|
|
1711
|
+
variants: contentVariants,
|
|
1712
|
+
initial: "enter",
|
|
1713
|
+
animate: "visible",
|
|
1714
|
+
exit: "exit",
|
|
1715
|
+
transition: { duration: 0.15, ease: "easeOut" },
|
|
1716
|
+
children: isError ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SearchError, { retry: status.retry }) : isForked ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(FocusedResults, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Results, __spreadValues({}, props))
|
|
1717
|
+
},
|
|
1718
|
+
isForked ? "forked" : "root"
|
|
1719
|
+
) })
|
|
1720
|
+
] })
|
|
1721
|
+
}
|
|
1722
|
+
);
|
|
1723
|
+
};
|
|
1724
|
+
var contentVariants = {
|
|
1725
|
+
enter: () => ({ opacity: 0, y: 12 }),
|
|
1726
|
+
visible: { opacity: 1, y: 0 },
|
|
1727
|
+
exit: () => ({ opacity: 0, y: -12 })
|
|
1728
|
+
};
|
|
1729
|
+
var SearchError = ({ retry }) => {
|
|
1730
|
+
const { formatMessage } = (0, import_react_intl6.useIntl)();
|
|
1731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_components15.InlinePrompt, { width: "full", sentiment: "negative", children: [
|
|
1732
|
+
formatMessage(generic_error_messages_default.genericError),
|
|
1733
|
+
"\xA0",
|
|
1734
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components15.Link, { onClick: retry, children: formatMessage(generic_error_messages_default.retry) })
|
|
1735
|
+
] });
|
|
1736
|
+
};
|
|
1737
|
+
|
|
1698
1738
|
// ../../node_modules/.pnpm/@tanstack+react-virtual@3.14.10_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-virtual/dist/esm/index.js
|
|
1699
1739
|
var React = __toESM(require("react"), 1);
|
|
1700
1740
|
var import_react_dom = require("react-dom");
|
|
@@ -3231,18 +3271,18 @@ function useWindowVirtualizer(options) {
|
|
|
3231
3271
|
}, options));
|
|
3232
3272
|
}
|
|
3233
3273
|
|
|
3234
|
-
// ../renderers/src/CollectionRenderer/components/
|
|
3235
|
-
var
|
|
3236
|
-
var
|
|
3274
|
+
// ../renderers/src/CollectionRenderer/components/VirtualisedContentComponent.tsx
|
|
3275
|
+
var import_components17 = require("@transferwise/components");
|
|
3276
|
+
var import_react10 = require("react");
|
|
3237
3277
|
|
|
3238
3278
|
// ../renderers/src/step/StepFooter.tsx
|
|
3239
|
-
var
|
|
3240
|
-
var
|
|
3241
|
-
var
|
|
3279
|
+
var import_components16 = require("@transferwise/components");
|
|
3280
|
+
var import_react9 = require("react");
|
|
3281
|
+
var import_react_intl8 = require("react-intl");
|
|
3242
3282
|
|
|
3243
3283
|
// ../renderers/src/messages/step.messages.ts
|
|
3244
|
-
var
|
|
3245
|
-
var step_messages_default = (0,
|
|
3284
|
+
var import_react_intl7 = require("react-intl");
|
|
3285
|
+
var step_messages_default = (0, import_react_intl7.defineMessages)({
|
|
3246
3286
|
scrollToBottom: {
|
|
3247
3287
|
id: "df.wise.step.scrollToBottom",
|
|
3248
3288
|
defaultMessage: "Scroll to bottom",
|
|
@@ -3251,24 +3291,24 @@ var step_messages_default = (0, import_react_intl6.defineMessages)({
|
|
|
3251
3291
|
});
|
|
3252
3292
|
|
|
3253
3293
|
// ../renderers/src/step/StepFooter.tsx
|
|
3254
|
-
var
|
|
3294
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3255
3295
|
var SCROLL_TO_BOTTOM = "scroll-to-bottom";
|
|
3256
3296
|
var StepFooter = ({ footer, tags }) => {
|
|
3257
3297
|
if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
|
|
3258
|
-
return /* @__PURE__ */ (0,
|
|
3298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(FooterWithScrollButton, { footer });
|
|
3259
3299
|
}
|
|
3260
|
-
return /* @__PURE__ */ (0,
|
|
3300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DefaultFooter, { footer });
|
|
3261
3301
|
};
|
|
3262
3302
|
var DefaultFooter = ({ footer }) => {
|
|
3263
3303
|
const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
|
|
3264
|
-
return hasFooter ? /* @__PURE__ */ (0,
|
|
3304
|
+
return hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
|
|
3265
3305
|
};
|
|
3266
3306
|
var FooterWithScrollButton = ({ footer }) => {
|
|
3267
|
-
const { formatMessage } = (0,
|
|
3268
|
-
const endOfLayoutRef = (0,
|
|
3307
|
+
const { formatMessage } = (0, import_react_intl8.useIntl)();
|
|
3308
|
+
const endOfLayoutRef = (0, import_react9.useRef)(null);
|
|
3269
3309
|
const isElementVisible = useIsElementVisible(endOfLayoutRef);
|
|
3270
|
-
const scrollButton = /* @__PURE__ */ (0,
|
|
3271
|
-
|
|
3310
|
+
const scrollButton = /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3311
|
+
import_components16.Button,
|
|
3272
3312
|
{
|
|
3273
3313
|
className: "m-b-1",
|
|
3274
3314
|
v2: true,
|
|
@@ -3283,19 +3323,19 @@ var FooterWithScrollButton = ({ footer }) => {
|
|
|
3283
3323
|
);
|
|
3284
3324
|
const hasStepFooterContent = footer && Array.isArray(footer) && footer.length > 0;
|
|
3285
3325
|
if (isElementVisible && !hasStepFooterContent) {
|
|
3286
|
-
return /* @__PURE__ */ (0,
|
|
3326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
|
|
3287
3327
|
}
|
|
3288
|
-
return /* @__PURE__ */ (0,
|
|
3289
|
-
/* @__PURE__ */ (0,
|
|
3290
|
-
/* @__PURE__ */ (0,
|
|
3328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
3329
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
|
|
3330
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "df-step-fixed__footer", children: [
|
|
3291
3331
|
!isElementVisible && scrollButton,
|
|
3292
3332
|
footer
|
|
3293
3333
|
] })
|
|
3294
3334
|
] });
|
|
3295
3335
|
};
|
|
3296
3336
|
var useIsElementVisible = (elementRef, root = null) => {
|
|
3297
|
-
const [isVisible, setIsVisible] = (0,
|
|
3298
|
-
(0,
|
|
3337
|
+
const [isVisible, setIsVisible] = (0, import_react9.useState)(false);
|
|
3338
|
+
(0, import_react9.useEffect)(() => {
|
|
3299
3339
|
const element = elementRef.current;
|
|
3300
3340
|
if (!element) return;
|
|
3301
3341
|
const observer = new IntersectionObserver(
|
|
@@ -3310,12 +3350,12 @@ var useIsElementVisible = (elementRef, root = null) => {
|
|
|
3310
3350
|
return isVisible;
|
|
3311
3351
|
};
|
|
3312
3352
|
|
|
3313
|
-
// ../renderers/src/CollectionRenderer/components/
|
|
3314
|
-
var
|
|
3353
|
+
// ../renderers/src/CollectionRenderer/components/VirtualisedContentComponent.tsx
|
|
3354
|
+
var import_react_intl10 = require("react-intl");
|
|
3315
3355
|
|
|
3316
3356
|
// ../renderers/src/messages/collection.messages.ts
|
|
3317
|
-
var
|
|
3318
|
-
var collection_messages_default = (0,
|
|
3357
|
+
var import_react_intl9 = require("react-intl");
|
|
3358
|
+
var collection_messages_default = (0, import_react_intl9.defineMessages)({
|
|
3319
3359
|
loadMoreButton: {
|
|
3320
3360
|
id: "df.wise.Collection.loadMoreMessage",
|
|
3321
3361
|
defaultMessage: "Load more",
|
|
@@ -3325,6 +3365,16 @@ var collection_messages_default = (0, import_react_intl8.defineMessages)({
|
|
|
3325
3365
|
id: "df.wise.Collection.clearText",
|
|
3326
3366
|
defaultMessage: "Clear text",
|
|
3327
3367
|
description: "A message shown at the edge of the search bar to clear the users query"
|
|
3368
|
+
},
|
|
3369
|
+
showMoreResultsButton: {
|
|
3370
|
+
id: "df.wise.Collection.showMoreResultsButton",
|
|
3371
|
+
defaultMessage: "Show all {count} results",
|
|
3372
|
+
description: "A message shown at the bottom of a truncated list of items, clicking will expand to show more"
|
|
3373
|
+
},
|
|
3374
|
+
showLessResultsButton: {
|
|
3375
|
+
id: "df.wise.Collection.showLessResultsButton",
|
|
3376
|
+
defaultMessage: "Show less results",
|
|
3377
|
+
description: "A message shown at the bottom of an expanded list of items, clicking will truncate to show only a few"
|
|
3328
3378
|
}
|
|
3329
3379
|
});
|
|
3330
3380
|
|
|
@@ -3348,54 +3398,78 @@ var getScrollableAncestor = (element) => {
|
|
|
3348
3398
|
return null;
|
|
3349
3399
|
};
|
|
3350
3400
|
|
|
3351
|
-
// ../renderers/src/CollectionRenderer/components/
|
|
3352
|
-
var
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3401
|
+
// ../renderers/src/CollectionRenderer/components/flattenCollectionItems.ts
|
|
3402
|
+
var flattenCollectionItems = (sections) => {
|
|
3403
|
+
return sections.flatMap((section) => {
|
|
3404
|
+
if (section.type === "items") {
|
|
3405
|
+
return flattenItemsBody(section);
|
|
3406
|
+
}
|
|
3407
|
+
if (section.type === "layout") {
|
|
3408
|
+
return flattenLayoutBody(section);
|
|
3409
|
+
}
|
|
3410
|
+
return [];
|
|
3411
|
+
});
|
|
3412
|
+
};
|
|
3413
|
+
var flattenItemsBody = (section) => {
|
|
3414
|
+
return [
|
|
3415
|
+
...flattenSectionHeader(section),
|
|
3416
|
+
...section.items.map((item) => ({
|
|
3417
|
+
item,
|
|
3418
|
+
type: "item"
|
|
3419
|
+
}))
|
|
3420
|
+
];
|
|
3421
|
+
};
|
|
3422
|
+
var flattenLayoutBody = (section) => [
|
|
3423
|
+
...flattenSectionHeader(section),
|
|
3424
|
+
__spreadProps(__spreadValues({}, section), {
|
|
3425
|
+
type: "layout"
|
|
3426
|
+
})
|
|
3427
|
+
];
|
|
3428
|
+
var flattenSectionHeader = (section) => section.title ? [
|
|
3429
|
+
{
|
|
3430
|
+
type: "header",
|
|
3431
|
+
title: section.title,
|
|
3432
|
+
items: section.type === "items" ? section.items : void 0,
|
|
3433
|
+
id: section.id,
|
|
3434
|
+
callToAction: section.callToAction
|
|
3435
|
+
}
|
|
3436
|
+
] : [];
|
|
3437
|
+
|
|
3438
|
+
// ../renderers/src/CollectionRenderer/components/VirtualisedContentComponent.tsx
|
|
3439
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3440
|
+
var VirtualisedContentComponent = (props) => {
|
|
3441
|
+
const { state, SectionHeader, Item } = props;
|
|
3442
|
+
const { status } = state;
|
|
3443
|
+
const contentRef = (0, import_react10.useRef)(null);
|
|
3444
|
+
const [scrollElement, setScrollElement] = (0, import_react10.useState)(null);
|
|
3445
|
+
(0, import_react10.useLayoutEffect)(() => {
|
|
3358
3446
|
const nextScrollElement = getScrollableAncestor(contentRef.current);
|
|
3359
3447
|
setScrollElement(
|
|
3360
3448
|
(currentScrollElement) => currentScrollElement === nextScrollElement ? currentScrollElement : nextScrollElement
|
|
3361
3449
|
);
|
|
3362
3450
|
}, []);
|
|
3363
|
-
const endOfContentRef = (0,
|
|
3451
|
+
const endOfContentRef = (0, import_react10.useRef)(null);
|
|
3364
3452
|
const isBottomVisible = useIsElementVisible(endOfContentRef, scrollElement);
|
|
3365
|
-
(0,
|
|
3453
|
+
(0, import_react10.useEffect)(() => {
|
|
3366
3454
|
const shouldAutoLoad = isBottomVisible && status.type === "idle" && state.afterSectionsProps.length === 0;
|
|
3367
3455
|
if (shouldAutoLoad && status.loadMore) {
|
|
3368
3456
|
status.loadMore();
|
|
3369
3457
|
}
|
|
3370
3458
|
}, [isBottomVisible, state.afterSectionsProps.length, status]);
|
|
3371
|
-
const stateCount = state.sections.reduce(
|
|
3372
|
-
|
|
3373
|
-
0
|
|
3374
|
-
);
|
|
3375
|
-
const items = state.sections
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
title: section.title,
|
|
3380
|
-
items: section.items,
|
|
3381
|
-
id: section.id,
|
|
3382
|
-
callToAction: section.callToAction
|
|
3383
|
-
}
|
|
3384
|
-
] : [],
|
|
3385
|
-
...section.items.map((item) => ({
|
|
3386
|
-
item,
|
|
3387
|
-
type: "item"
|
|
3388
|
-
}))
|
|
3389
|
-
]);
|
|
3390
|
-
const listRef = (0, import_react9.useRef)(null);
|
|
3391
|
-
const listOffsetRef = (0, import_react9.useRef)(0);
|
|
3392
|
-
(0, import_react9.useLayoutEffect)(() => {
|
|
3459
|
+
const stateCount = state.sections.reduce((total, section) => {
|
|
3460
|
+
const count = section.type === "items" ? section.items.length : 1;
|
|
3461
|
+
return count + total + (section.title ? 1 : 0);
|
|
3462
|
+
}, 0);
|
|
3463
|
+
const items = flattenCollectionItems(state.sections);
|
|
3464
|
+
const listRef = (0, import_react10.useRef)(null);
|
|
3465
|
+
const listOffsetRef = (0, import_react10.useRef)(0);
|
|
3466
|
+
(0, import_react10.useLayoutEffect)(() => {
|
|
3393
3467
|
var _a, _b;
|
|
3394
3468
|
listOffsetRef.current = (_b = (_a = listRef.current) == null ? void 0 : _a.offsetTop) != null ? _b : 0;
|
|
3395
3469
|
});
|
|
3396
|
-
return /* @__PURE__ */ (0,
|
|
3470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { ref: contentRef, children: [
|
|
3397
3471
|
state.beforeSections,
|
|
3398
|
-
scrollElement ? /* @__PURE__ */ (0,
|
|
3472
|
+
scrollElement ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3399
3473
|
ElementVirtualizedItems,
|
|
3400
3474
|
{
|
|
3401
3475
|
Item,
|
|
@@ -3404,7 +3478,7 @@ var ContentComponent = (props) => {
|
|
|
3404
3478
|
scrollElement,
|
|
3405
3479
|
stateCount
|
|
3406
3480
|
}
|
|
3407
|
-
) : /* @__PURE__ */ (0,
|
|
3481
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3408
3482
|
WindowVirtualizedItems,
|
|
3409
3483
|
{
|
|
3410
3484
|
Item,
|
|
@@ -3413,30 +3487,30 @@ var ContentComponent = (props) => {
|
|
|
3413
3487
|
stateCount
|
|
3414
3488
|
}
|
|
3415
3489
|
),
|
|
3416
|
-
/* @__PURE__ */ (0,
|
|
3490
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { ref: endOfContentRef, className: "d-flex m-x-auto m-y-2", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(PaginationComponent, { state }) }),
|
|
3417
3491
|
state.afterSections
|
|
3418
3492
|
] });
|
|
3419
3493
|
};
|
|
3420
3494
|
var WindowVirtualizedItems = (props) => {
|
|
3421
3495
|
const { stateCount } = props;
|
|
3422
|
-
const virtualItemsRef = (0,
|
|
3496
|
+
const virtualItemsRef = (0, import_react10.useRef)(null);
|
|
3423
3497
|
const virtualizer = useWindowVirtualizer({
|
|
3424
3498
|
count: stateCount,
|
|
3425
3499
|
estimateSize: () => 120,
|
|
3426
3500
|
overscan: 10
|
|
3427
3501
|
});
|
|
3428
|
-
return /* @__PURE__ */ (0,
|
|
3502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(VirtualizedItems, __spreadProps(__spreadValues({}, props), { virtualItemsRef, virtualizer }));
|
|
3429
3503
|
};
|
|
3430
3504
|
var ElementVirtualizedItems = (props) => {
|
|
3431
3505
|
const { scrollElement, stateCount } = props;
|
|
3432
|
-
const virtualItemsRef = (0,
|
|
3506
|
+
const virtualItemsRef = (0, import_react10.useRef)(null);
|
|
3433
3507
|
const virtualizer = useVirtualizer({
|
|
3434
3508
|
count: stateCount,
|
|
3435
3509
|
getScrollElement: () => scrollElement,
|
|
3436
3510
|
estimateSize: () => 120,
|
|
3437
3511
|
overscan: 10
|
|
3438
3512
|
});
|
|
3439
|
-
return /* @__PURE__ */ (0,
|
|
3513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(VirtualizedItems, __spreadProps(__spreadValues({}, props), { virtualItemsRef, virtualizer }));
|
|
3440
3514
|
};
|
|
3441
3515
|
var VirtualizedItems = ({
|
|
3442
3516
|
Item,
|
|
@@ -3444,7 +3518,7 @@ var VirtualizedItems = ({
|
|
|
3444
3518
|
items,
|
|
3445
3519
|
virtualItemsRef,
|
|
3446
3520
|
virtualizer
|
|
3447
|
-
}) => /* @__PURE__ */ (0,
|
|
3521
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3448
3522
|
"div",
|
|
3449
3523
|
{
|
|
3450
3524
|
ref: virtualItemsRef,
|
|
@@ -3458,7 +3532,7 @@ var VirtualizedItems = ({
|
|
|
3458
3532
|
if (!i) {
|
|
3459
3533
|
return null;
|
|
3460
3534
|
}
|
|
3461
|
-
return /* @__PURE__ */ (0,
|
|
3535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3462
3536
|
"div",
|
|
3463
3537
|
{
|
|
3464
3538
|
ref: virtualizer.measureElement,
|
|
@@ -3470,17 +3544,19 @@ var VirtualizedItems = ({
|
|
|
3470
3544
|
width: "100%",
|
|
3471
3545
|
transform: `translateY(${item.start - virtualizer.options.scrollMargin}px)`
|
|
3472
3546
|
},
|
|
3473
|
-
children:
|
|
3547
|
+
children: [
|
|
3548
|
+
i.type === "header" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SectionHeader, __spreadValues({}, i)),
|
|
3549
|
+
i.type === "item" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Item, __spreadValues({}, i.item)),
|
|
3550
|
+
i.type === "layout" && i.children
|
|
3551
|
+
]
|
|
3474
3552
|
},
|
|
3475
3553
|
item.key
|
|
3476
3554
|
);
|
|
3477
3555
|
})
|
|
3478
3556
|
}
|
|
3479
3557
|
);
|
|
3480
|
-
var PaginationComponent = ({
|
|
3481
|
-
status
|
|
3482
|
-
state
|
|
3483
|
-
}) => {
|
|
3558
|
+
var PaginationComponent = ({ state }) => {
|
|
3559
|
+
const { status } = state;
|
|
3484
3560
|
const isPaginationError = status.type === "error" && status.reason === "pagination";
|
|
3485
3561
|
const isPaginationLoading = status.type === "loading" && status.reason === "pagination";
|
|
3486
3562
|
const loadMore = status.type === "idle" ? status.loadMore : void 0;
|
|
@@ -3488,35 +3564,42 @@ var PaginationComponent = ({
|
|
|
3488
3564
|
return null;
|
|
3489
3565
|
}
|
|
3490
3566
|
if (isPaginationError) {
|
|
3491
|
-
return /* @__PURE__ */ (0,
|
|
3567
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(LoadMoreButton, { onClick: status.retry });
|
|
3492
3568
|
}
|
|
3493
3569
|
if (state.afterSectionsProps.length > 0 && loadMore) {
|
|
3494
|
-
return /* @__PURE__ */ (0,
|
|
3570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(LoadMoreButton, { onClick: loadMore });
|
|
3495
3571
|
}
|
|
3496
|
-
return /* @__PURE__ */ (0,
|
|
3572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components17.ProcessIndicator, { size: "xs", "data-testid": "collection-pagination-loader" });
|
|
3497
3573
|
};
|
|
3498
3574
|
var LoadMoreButton = ({ onClick }) => {
|
|
3499
|
-
const { formatMessage } = (0,
|
|
3500
|
-
return /* @__PURE__ */ (0,
|
|
3575
|
+
const { formatMessage } = (0, import_react_intl10.useIntl)();
|
|
3576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "d-flex m-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components17.Button, { v2: true, size: "sm", priority: "secondary-neutral", onClick, children: formatMessage(collection_messages_default.loadMoreButton) }) });
|
|
3501
3577
|
};
|
|
3502
3578
|
|
|
3503
|
-
// ../renderers/src/CollectionRenderer/
|
|
3504
|
-
var
|
|
3505
|
-
var
|
|
3506
|
-
var FiltersComponent = (
|
|
3507
|
-
const {
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3579
|
+
// ../renderers/src/CollectionRenderer/v1/FilterComponent.tsx
|
|
3580
|
+
var import_components18 = require("@transferwise/components");
|
|
3581
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3582
|
+
var FiltersComponent = (props) => {
|
|
3583
|
+
const _a = props, { Filter } = _a, collectionProps = __objRest(_a, ["Filter"]);
|
|
3584
|
+
const { filters } = collectionProps.state;
|
|
3585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "df-filters-container", children: filters.map((filter) => {
|
|
3586
|
+
var _a2;
|
|
3587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3588
|
+
Filter,
|
|
3589
|
+
__spreadProps(__spreadValues({}, collectionProps), {
|
|
3590
|
+
filter
|
|
3591
|
+
}),
|
|
3592
|
+
JSON.stringify((_a2 = filter.options) == null ? void 0 : _a2.map((o) => o.value))
|
|
3593
|
+
);
|
|
3511
3594
|
}) });
|
|
3512
3595
|
};
|
|
3513
|
-
var FilterComponent = (filter) => {
|
|
3596
|
+
var FilterComponent = ({ filter }) => {
|
|
3514
3597
|
const { multiSelect, options } = filter;
|
|
3515
3598
|
if (!options) {
|
|
3516
3599
|
return null;
|
|
3517
3600
|
}
|
|
3518
|
-
return /* @__PURE__ */ (0,
|
|
3519
|
-
|
|
3601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3602
|
+
import_components18.Chips,
|
|
3520
3603
|
{
|
|
3521
3604
|
className: "m-b-1",
|
|
3522
3605
|
multiple: multiSelect,
|
|
@@ -3541,11 +3624,11 @@ var FilterComponent = (filter) => {
|
|
|
3541
3624
|
};
|
|
3542
3625
|
|
|
3543
3626
|
// ../renderers/src/CollectionRenderer/components/ItemComponent.tsx
|
|
3544
|
-
var
|
|
3627
|
+
var import_components21 = require("@transferwise/components");
|
|
3545
3628
|
|
|
3546
3629
|
// ../renderers/src/utils/listItem/getAdditionalInfo.tsx
|
|
3547
|
-
var
|
|
3548
|
-
var
|
|
3630
|
+
var import_components19 = require("@transferwise/components");
|
|
3631
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3549
3632
|
var getAdditionalInfo = (additionalInfo) => {
|
|
3550
3633
|
var _a, _b;
|
|
3551
3634
|
if (!additionalInfo) {
|
|
@@ -3553,8 +3636,8 @@ var getAdditionalInfo = (additionalInfo) => {
|
|
|
3553
3636
|
}
|
|
3554
3637
|
const { href, text, onClick } = additionalInfo;
|
|
3555
3638
|
if (href || onClick) {
|
|
3556
|
-
return /* @__PURE__ */ (0,
|
|
3557
|
-
|
|
3639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3640
|
+
import_components19.ListItem.AdditionalInfo,
|
|
3558
3641
|
{
|
|
3559
3642
|
action: __spreadValues({
|
|
3560
3643
|
label: text
|
|
@@ -3562,20 +3645,20 @@ var getAdditionalInfo = (additionalInfo) => {
|
|
|
3562
3645
|
}
|
|
3563
3646
|
);
|
|
3564
3647
|
}
|
|
3565
|
-
return /* @__PURE__ */ (0,
|
|
3648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components19.ListItem.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
|
|
3566
3649
|
};
|
|
3567
3650
|
|
|
3568
3651
|
// ../renderers/src/utils/listItem/getCTAControl.tsx
|
|
3569
|
-
var
|
|
3570
|
-
var
|
|
3652
|
+
var import_components20 = require("@transferwise/components");
|
|
3653
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3571
3654
|
var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
|
|
3572
3655
|
if (!callToAction) {
|
|
3573
3656
|
return void 0;
|
|
3574
3657
|
}
|
|
3575
3658
|
const { accessibilityDescription, title, context } = callToAction;
|
|
3576
3659
|
const { priority, sentiment } = getPriorityAndSentiment(ctaSecondary, context);
|
|
3577
|
-
return /* @__PURE__ */ (0,
|
|
3578
|
-
|
|
3660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3661
|
+
import_components20.ListItem.Button,
|
|
3579
3662
|
__spreadProps(__spreadValues({}, callToAction.getAnchorProps()), {
|
|
3580
3663
|
partiallyInteractive: !fullyInteractive,
|
|
3581
3664
|
priority,
|
|
@@ -3599,7 +3682,7 @@ var shouldUseAvatar = (control, tags) => {
|
|
|
3599
3682
|
};
|
|
3600
3683
|
|
|
3601
3684
|
// ../renderers/src/CollectionRenderer/components/ItemComponent.tsx
|
|
3602
|
-
var
|
|
3685
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3603
3686
|
var ItemComponent = (props) => {
|
|
3604
3687
|
var _a, _b;
|
|
3605
3688
|
const {
|
|
@@ -3621,8 +3704,8 @@ var ItemComponent = (props) => {
|
|
|
3621
3704
|
ctaSecondary: (_a = tags == null ? void 0 : tags.includes("cta-secondary")) != null ? _a : false,
|
|
3622
3705
|
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
3623
3706
|
};
|
|
3624
|
-
return /* @__PURE__ */ (0,
|
|
3625
|
-
|
|
3707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3708
|
+
import_components21.ListItem,
|
|
3626
3709
|
{
|
|
3627
3710
|
title,
|
|
3628
3711
|
subtitle: description,
|
|
@@ -3638,57 +3721,52 @@ var ItemComponent = (props) => {
|
|
|
3638
3721
|
};
|
|
3639
3722
|
var getNavigationControl = (onClick, href) => {
|
|
3640
3723
|
if (href) {
|
|
3641
|
-
return /* @__PURE__ */ (0,
|
|
3724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components21.ListItem.Navigation, { href });
|
|
3642
3725
|
}
|
|
3643
3726
|
if (onClick) {
|
|
3644
|
-
return /* @__PURE__ */ (0,
|
|
3727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components21.ListItem.Navigation, { onClick });
|
|
3645
3728
|
}
|
|
3646
3729
|
return null;
|
|
3647
3730
|
};
|
|
3648
3731
|
|
|
3649
|
-
// ../renderers/src/CollectionRenderer/
|
|
3650
|
-
var
|
|
3732
|
+
// ../renderers/src/CollectionRenderer/v1/SearchComponent.tsx
|
|
3733
|
+
var import_components22 = require("@transferwise/components");
|
|
3651
3734
|
var import_icons = require("@transferwise/icons");
|
|
3652
|
-
var
|
|
3653
|
-
var
|
|
3654
|
-
var SearchComponent = ({
|
|
3655
|
-
|
|
3656
|
-
status,
|
|
3657
|
-
features,
|
|
3658
|
-
control,
|
|
3659
|
-
tags
|
|
3660
|
-
}) => {
|
|
3735
|
+
var import_react_intl11 = require("react-intl");
|
|
3736
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3737
|
+
var SearchComponent = ({ state, features, control, tags }) => {
|
|
3738
|
+
var _a;
|
|
3661
3739
|
const { search } = state;
|
|
3662
|
-
const { formatMessage } = (0,
|
|
3740
|
+
const { formatMessage } = (0, import_react_intl11.useIntl)();
|
|
3663
3741
|
if (!search) {
|
|
3664
3742
|
return;
|
|
3665
3743
|
}
|
|
3666
3744
|
const getAddon = () => {
|
|
3667
|
-
var
|
|
3668
|
-
if (status.type === "loading") {
|
|
3669
|
-
return { content: /* @__PURE__ */ (0,
|
|
3745
|
+
var _a2;
|
|
3746
|
+
if (state.status.type === "loading") {
|
|
3747
|
+
return { content: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components22.ProcessIndicator, { size: "xs", "data-testid": "collection-search-loader" }) };
|
|
3670
3748
|
}
|
|
3671
|
-
if ((
|
|
3749
|
+
if ((_a2 = state.search) == null ? void 0 : _a2.query) {
|
|
3672
3750
|
return {
|
|
3673
3751
|
interactive: true,
|
|
3674
|
-
content: /* @__PURE__ */ (0,
|
|
3675
|
-
|
|
3752
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3753
|
+
import_components22.IconButton,
|
|
3676
3754
|
{
|
|
3677
3755
|
priority: "minimal",
|
|
3678
3756
|
size: 24,
|
|
3679
3757
|
"aria-label": formatMessage(collection_messages_default.clearTextLabel),
|
|
3680
3758
|
onClick: () => {
|
|
3681
|
-
var
|
|
3682
|
-
return (
|
|
3759
|
+
var _a3;
|
|
3760
|
+
return (_a3 = state.search) == null ? void 0 : _a3.onChange("");
|
|
3683
3761
|
},
|
|
3684
|
-
children: /* @__PURE__ */ (0,
|
|
3762
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_icons.CrossCircleFill, {})
|
|
3685
3763
|
}
|
|
3686
3764
|
)
|
|
3687
3765
|
};
|
|
3688
3766
|
}
|
|
3689
3767
|
return void 0;
|
|
3690
3768
|
};
|
|
3691
|
-
return /* @__PURE__ */ (0,
|
|
3769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3692
3770
|
FieldInput_default,
|
|
3693
3771
|
{
|
|
3694
3772
|
id: "search",
|
|
@@ -3699,13 +3777,13 @@ var SearchComponent = ({
|
|
|
3699
3777
|
features,
|
|
3700
3778
|
control,
|
|
3701
3779
|
tags,
|
|
3702
|
-
children: /* @__PURE__ */ (0,
|
|
3703
|
-
|
|
3780
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components22.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_icons.Search, { size: 24 }) }, addonEnd: getAddon(), children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3781
|
+
import_components22.Input,
|
|
3704
3782
|
{
|
|
3705
3783
|
id: "search",
|
|
3706
3784
|
name: "search",
|
|
3707
3785
|
shape: "pill",
|
|
3708
|
-
placeholder: search.
|
|
3786
|
+
placeholder: (_a = search.hints) == null ? void 0 : _a[0],
|
|
3709
3787
|
type: "text",
|
|
3710
3788
|
value: search.query,
|
|
3711
3789
|
onChange: ({ currentTarget: { value } }) => {
|
|
@@ -3718,14 +3796,74 @@ var SearchComponent = ({
|
|
|
3718
3796
|
};
|
|
3719
3797
|
|
|
3720
3798
|
// ../renderers/src/CollectionRenderer/components/SectionHeaderComponent.tsx
|
|
3721
|
-
var
|
|
3799
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3722
3800
|
var SectionHeaderComponent = ({
|
|
3723
3801
|
title,
|
|
3724
3802
|
callToAction
|
|
3725
|
-
}) => /* @__PURE__ */ (0,
|
|
3803
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Header, { title, callToAction });
|
|
3804
|
+
|
|
3805
|
+
// ../renderers/src/CollectionRenderer/components/CollapsibleContentComponent.tsx
|
|
3806
|
+
var import_react11 = require("react");
|
|
3807
|
+
var import_components23 = require("@transferwise/components");
|
|
3808
|
+
var import_react_intl12 = require("react-intl");
|
|
3809
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3810
|
+
var CollapsibleContentComponent = (props) => {
|
|
3811
|
+
var _a;
|
|
3812
|
+
const { state, SectionHeader, Item } = props;
|
|
3813
|
+
const { search, status } = state;
|
|
3814
|
+
const [isShowingInitialState, setIsShowingInitialState] = (0, import_react11.useState)(true);
|
|
3815
|
+
const isSearchRunning = status.type === "loading" && status.reason === "search";
|
|
3816
|
+
const shouldShowInitialState = !(search == null ? void 0 : search.query) || isSearchRunning && isShowingInitialState;
|
|
3817
|
+
if (shouldShowInitialState !== isShowingInitialState) {
|
|
3818
|
+
setIsShowingInitialState(shouldShowInitialState);
|
|
3819
|
+
}
|
|
3820
|
+
const sections = shouldShowInitialState ? (_a = search == null ? void 0 : search.initialSections) != null ? _a : state.sections : state.sections;
|
|
3821
|
+
return (
|
|
3822
|
+
// keep focus in the search input when clicking the results, so clicking doesn't blur it and
|
|
3823
|
+
// pop the collection before the click is handled
|
|
3824
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { role: "presentation", onMouseDown: (event) => event.preventDefault(), children: sections.map((section) => {
|
|
3825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Section, { section, SectionHeader, Item }, section.id);
|
|
3826
|
+
}) })
|
|
3827
|
+
);
|
|
3828
|
+
};
|
|
3829
|
+
var Section = ({ section, SectionHeader, Item }) => {
|
|
3830
|
+
const { formatMessage } = (0, import_react_intl12.useIntl)();
|
|
3831
|
+
const [expanded, setExpanded] = (0, import_react11.useState)(false);
|
|
3832
|
+
const itemIds = section.type === "items" ? section.items.map(({ id }) => id).join("") : section.id;
|
|
3833
|
+
const [prevItemIds, setPrevItemIds] = (0, import_react11.useState)(itemIds);
|
|
3834
|
+
if (itemIds !== prevItemIds) {
|
|
3835
|
+
setExpanded(false);
|
|
3836
|
+
setPrevItemIds(itemIds);
|
|
3837
|
+
}
|
|
3838
|
+
const showLoadMore = section.type === "items" && section.items.some((item) => {
|
|
3839
|
+
var _a;
|
|
3840
|
+
return (_a = item.tags) == null ? void 0 : _a.includes("hidden");
|
|
3841
|
+
});
|
|
3842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
3843
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(SectionHeader, __spreadValues({}, section)),
|
|
3844
|
+
section.type === "items" && section.items.filter((item) => {
|
|
3845
|
+
var _a;
|
|
3846
|
+
return expanded || !((_a = item.tags) == null ? void 0 : _a.includes("hidden"));
|
|
3847
|
+
}).map((item) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Item, __spreadValues({}, item), item.id)),
|
|
3848
|
+
section.type === "layout" && section.children,
|
|
3849
|
+
showLoadMore ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3850
|
+
import_components23.Button,
|
|
3851
|
+
{
|
|
3852
|
+
priority: "tertiary",
|
|
3853
|
+
onClick: () => {
|
|
3854
|
+
setExpanded(!expanded);
|
|
3855
|
+
},
|
|
3856
|
+
children: expanded ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { children: [
|
|
3857
|
+
formatMessage(collection_messages_default.showLessResultsButton),
|
|
3858
|
+
" "
|
|
3859
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { children: formatMessage(collection_messages_default.showMoreResultsButton, { count: section.items.length }) })
|
|
3860
|
+
}
|
|
3861
|
+
) : void 0
|
|
3862
|
+
] });
|
|
3863
|
+
};
|
|
3726
3864
|
|
|
3727
3865
|
// ../renderers/src/CollectionRenderer/createCollectionRenderer.tsx
|
|
3728
|
-
var
|
|
3866
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3729
3867
|
var createCollectionRenderer = (canRender, components) => {
|
|
3730
3868
|
const componentsWithDefaults = __spreadValues({
|
|
3731
3869
|
Search: SearchComponent,
|
|
@@ -3733,64 +3871,219 @@ var createCollectionRenderer = (canRender, components) => {
|
|
|
3733
3871
|
Filter: FilterComponent,
|
|
3734
3872
|
Item: ItemComponent,
|
|
3735
3873
|
SectionHeader: SectionHeaderComponent,
|
|
3736
|
-
Results:
|
|
3874
|
+
Results: VirtualisedContentComponent,
|
|
3875
|
+
FocusedResults: CollapsibleContentComponent
|
|
3737
3876
|
}, components);
|
|
3738
3877
|
return {
|
|
3739
3878
|
canRenderType: "collection",
|
|
3740
3879
|
canRender,
|
|
3741
3880
|
render: (props) => {
|
|
3742
|
-
return /* @__PURE__ */ (0,
|
|
3881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(CollectionRendererComponent, __spreadValues(__spreadValues({}, props), componentsWithDefaults));
|
|
3743
3882
|
}
|
|
3744
3883
|
};
|
|
3745
3884
|
};
|
|
3746
3885
|
|
|
3747
|
-
// ../renderers/src/CollectionRenderer/
|
|
3748
|
-
var
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3886
|
+
// ../renderers/src/CollectionRenderer/v1/CollectionRendererV1.tsx
|
|
3887
|
+
var CollectionRendererV1 = createCollectionRenderer(
|
|
3888
|
+
() => true
|
|
3889
|
+
);
|
|
3890
|
+
var CollectionRendererV1_default = CollectionRendererV1;
|
|
3891
|
+
|
|
3892
|
+
// ../renderers/src/CollectionRenderer/v2/FilterComponent.tsx
|
|
3893
|
+
var import_components24 = require("@transferwise/components");
|
|
3894
|
+
var import_classnames12 = __toESM(require_classnames());
|
|
3895
|
+
var import_react12 = require("motion/react");
|
|
3896
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3897
|
+
var FiltersComponent2 = (props) => {
|
|
3898
|
+
var _b;
|
|
3899
|
+
const _a = props, { Filter } = _a, collectionProps = __objRest(_a, ["Filter"]);
|
|
3900
|
+
const { state, depth } = collectionProps;
|
|
3901
|
+
const { filters, status } = state;
|
|
3902
|
+
const isHidden = depth > 0 && !((_b = state.search) == null ? void 0 : _b.query);
|
|
3903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react12.AnimatePresence, { initial: false, children: !isHidden && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3904
|
+
import_react12.motion.div,
|
|
3905
|
+
{
|
|
3906
|
+
variants: filtersVariants,
|
|
3907
|
+
initial: "collapsed",
|
|
3908
|
+
animate: "expanded",
|
|
3909
|
+
exit: "collapsed",
|
|
3910
|
+
transition: { duration: 0.15, ease: "easeOut" },
|
|
3911
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3912
|
+
"div",
|
|
3913
|
+
{
|
|
3914
|
+
className: (0, import_classnames12.default)("df-filters-container", {
|
|
3915
|
+
"df-filter-loader": status.type === "loading" && status.reason === "search"
|
|
3916
|
+
}),
|
|
3917
|
+
children: filters.map((filter) => {
|
|
3918
|
+
var _a2;
|
|
3919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3920
|
+
Filter,
|
|
3921
|
+
__spreadProps(__spreadValues({}, collectionProps), {
|
|
3922
|
+
filter
|
|
3923
|
+
}),
|
|
3924
|
+
JSON.stringify((_a2 = filter.options) == null ? void 0 : _a2.map((o) => o.value))
|
|
3925
|
+
);
|
|
3926
|
+
})
|
|
3927
|
+
}
|
|
3928
|
+
)
|
|
3929
|
+
},
|
|
3930
|
+
"filters"
|
|
3931
|
+
) });
|
|
3757
3932
|
};
|
|
3758
|
-
var
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
formatMessage(generic_error_messages_default.genericError),
|
|
3762
|
-
"\xA0",
|
|
3763
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components22.Link, { onClick: retry, children: formatMessage(generic_error_messages_default.retry) })
|
|
3764
|
-
] });
|
|
3933
|
+
var filtersVariants = {
|
|
3934
|
+
collapsed: { height: 0, opacity: 0, overflow: "hidden" },
|
|
3935
|
+
expanded: { height: "auto", opacity: 1, transitionEnd: { overflow: "visible" } }
|
|
3765
3936
|
};
|
|
3766
|
-
var
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3937
|
+
var FilterComponent2 = ({
|
|
3938
|
+
filter,
|
|
3939
|
+
state
|
|
3940
|
+
}) => {
|
|
3941
|
+
const { multiSelect, options } = filter;
|
|
3942
|
+
const { status } = state;
|
|
3943
|
+
const disabled = status.type === "loading" && status.reason === "search";
|
|
3944
|
+
if (!options) {
|
|
3945
|
+
return null;
|
|
3946
|
+
}
|
|
3947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3948
|
+
import_components24.Chips,
|
|
3949
|
+
{
|
|
3950
|
+
className: "m-b-1",
|
|
3951
|
+
multiple: multiSelect,
|
|
3952
|
+
selected: options.some((option) => option.selected) ? options.filter((option) => option.selected).map((option) => option.value) : multiSelect ? [] : "",
|
|
3953
|
+
chips: [
|
|
3954
|
+
...options.map((option) => ({
|
|
3955
|
+
value: option.value,
|
|
3956
|
+
label: option.title
|
|
3957
|
+
}))
|
|
3958
|
+
],
|
|
3959
|
+
onChange: (value) => {
|
|
3960
|
+
var _a;
|
|
3961
|
+
if (disabled) {
|
|
3962
|
+
return;
|
|
3963
|
+
}
|
|
3964
|
+
if (value.selectedValue === "") {
|
|
3965
|
+
options == null ? void 0 : options.filter((option) => option.selected).map((option) => option == null ? void 0 : option.onSelect());
|
|
3966
|
+
return;
|
|
3967
|
+
}
|
|
3968
|
+
(_a = options == null ? void 0 : options.find((option) => value.selectedValue === option.value)) == null ? void 0 : _a.onSelect();
|
|
3969
|
+
}
|
|
3970
|
+
},
|
|
3971
|
+
JSON.stringify(options)
|
|
3779
3972
|
);
|
|
3780
|
-
(0, import_react10.useEffect)(() => {
|
|
3781
|
-
if (supportsMatchMedia()) {
|
|
3782
|
-
const mql = window.matchMedia(COLLAPSE_QUERY);
|
|
3783
|
-
const update = () => setCollapsed(mql.matches);
|
|
3784
|
-
mql.addEventListener("change", update);
|
|
3785
|
-
return () => mql.removeEventListener("change", update);
|
|
3786
|
-
}
|
|
3787
|
-
return void 0;
|
|
3788
|
-
}, []);
|
|
3789
|
-
return collapsed;
|
|
3790
3973
|
};
|
|
3791
3974
|
|
|
3975
|
+
// ../renderers/src/CollectionRenderer/v2/SearchComponent.tsx
|
|
3976
|
+
var import_components25 = require("@transferwise/components");
|
|
3977
|
+
var import_icons2 = require("@transferwise/icons");
|
|
3978
|
+
var import_react13 = require("react");
|
|
3979
|
+
var import_react_intl13 = require("react-intl");
|
|
3980
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3981
|
+
var SearchComponent2 = ({
|
|
3982
|
+
state,
|
|
3983
|
+
depth,
|
|
3984
|
+
fork,
|
|
3985
|
+
features,
|
|
3986
|
+
control,
|
|
3987
|
+
tags
|
|
3988
|
+
}) => {
|
|
3989
|
+
var _a;
|
|
3990
|
+
const { search } = state;
|
|
3991
|
+
const { formatMessage } = (0, import_react_intl13.useIntl)();
|
|
3992
|
+
const inputRef = (0, import_react13.useRef)(null);
|
|
3993
|
+
if (!search) {
|
|
3994
|
+
return;
|
|
3995
|
+
}
|
|
3996
|
+
const isForked = depth > 0;
|
|
3997
|
+
const getAddon = () => {
|
|
3998
|
+
if (state.status.type === "loading") {
|
|
3999
|
+
return { content: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components25.ProcessIndicator, { size: "xs", "data-testid": "collection-search-loader" }) };
|
|
4000
|
+
}
|
|
4001
|
+
if (search.query) {
|
|
4002
|
+
return {
|
|
4003
|
+
interactive: true,
|
|
4004
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4005
|
+
import_components25.IconButton,
|
|
4006
|
+
{
|
|
4007
|
+
priority: "minimal",
|
|
4008
|
+
size: 24,
|
|
4009
|
+
"aria-label": formatMessage(collection_messages_default.clearTextLabel),
|
|
4010
|
+
onClick: () => {
|
|
4011
|
+
var _a2;
|
|
4012
|
+
search.onChange("");
|
|
4013
|
+
(_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
4014
|
+
},
|
|
4015
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons2.CrossCircleFill, {})
|
|
4016
|
+
}
|
|
4017
|
+
)
|
|
4018
|
+
};
|
|
4019
|
+
}
|
|
4020
|
+
return void 0;
|
|
4021
|
+
};
|
|
4022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4023
|
+
FieldInput_default,
|
|
4024
|
+
{
|
|
4025
|
+
id: "search",
|
|
4026
|
+
description: "",
|
|
4027
|
+
validation: void 0,
|
|
4028
|
+
help: "",
|
|
4029
|
+
label: search.title,
|
|
4030
|
+
features,
|
|
4031
|
+
control,
|
|
4032
|
+
tags,
|
|
4033
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components25.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons2.Search, { size: 24 }) }, addonEnd: getAddon(), children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4034
|
+
import_components25.Input,
|
|
4035
|
+
{
|
|
4036
|
+
ref: inputRef,
|
|
4037
|
+
id: "search",
|
|
4038
|
+
name: "search",
|
|
4039
|
+
shape: "pill",
|
|
4040
|
+
placeholder: (_a = search.hints) == null ? void 0 : _a[0],
|
|
4041
|
+
type: "text",
|
|
4042
|
+
value: search.query,
|
|
4043
|
+
onFocus: () => {
|
|
4044
|
+
if (!isForked) {
|
|
4045
|
+
fork();
|
|
4046
|
+
}
|
|
4047
|
+
},
|
|
4048
|
+
onChange: ({ currentTarget: { value } }) => search.onChange(value)
|
|
4049
|
+
}
|
|
4050
|
+
) })
|
|
4051
|
+
}
|
|
4052
|
+
);
|
|
4053
|
+
};
|
|
4054
|
+
|
|
4055
|
+
// ../renderers/src/CollectionRenderer/v2/CollectionRendererV2.tsx
|
|
4056
|
+
var CollectionRendererV2 = createCollectionRenderer(
|
|
4057
|
+
({ control }) => control === "contacts-collection-v2",
|
|
4058
|
+
{ Search: SearchComponent2, Filters: FiltersComponent2, Filter: FilterComponent2 }
|
|
4059
|
+
);
|
|
4060
|
+
var CollectionRendererV2_default = CollectionRendererV2;
|
|
4061
|
+
|
|
3792
4062
|
// ../renderers/src/ColumnsRenderer.tsx
|
|
3793
|
-
var
|
|
4063
|
+
var import_classnames13 = __toESM(require_classnames());
|
|
4064
|
+
|
|
4065
|
+
// ../renderers/src/utils/useIsCollapsed.ts
|
|
4066
|
+
var import_react14 = require("react");
|
|
4067
|
+
var COLLAPSE_QUERY = "(max-width: 767.98px)";
|
|
4068
|
+
var supportsMatchMedia = () => typeof window !== "undefined" && !!window.matchMedia;
|
|
4069
|
+
var useIsCollapsed = () => {
|
|
4070
|
+
const [collapsed, setCollapsed] = (0, import_react14.useState)(
|
|
4071
|
+
() => supportsMatchMedia() && window.matchMedia(COLLAPSE_QUERY).matches
|
|
4072
|
+
);
|
|
4073
|
+
(0, import_react14.useEffect)(() => {
|
|
4074
|
+
if (supportsMatchMedia()) {
|
|
4075
|
+
const mql = window.matchMedia(COLLAPSE_QUERY);
|
|
4076
|
+
const update = () => setCollapsed(mql.matches);
|
|
4077
|
+
mql.addEventListener("change", update);
|
|
4078
|
+
return () => mql.removeEventListener("change", update);
|
|
4079
|
+
}
|
|
4080
|
+
return void 0;
|
|
4081
|
+
}, []);
|
|
4082
|
+
return collapsed;
|
|
4083
|
+
};
|
|
4084
|
+
|
|
4085
|
+
// ../renderers/src/ColumnsRenderer.tsx
|
|
4086
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3794
4087
|
var RIGHT_FIRST_STACKING = "right-first-stacking";
|
|
3795
4088
|
var ColumnsRenderer = {
|
|
3796
4089
|
canRenderType: "columns",
|
|
@@ -3801,12 +4094,12 @@ function ColumnsRendererComponent(props) {
|
|
|
3801
4094
|
const { bias, margin, startChildren, endChildren, tags } = props;
|
|
3802
4095
|
const isCollapsed = useIsCollapsed();
|
|
3803
4096
|
const reverse = isCollapsed && ((_a = tags == null ? void 0 : tags.includes(RIGHT_FIRST_STACKING)) != null ? _a : false);
|
|
3804
|
-
const startColumn = /* @__PURE__ */ (0,
|
|
3805
|
-
const endColumn = /* @__PURE__ */ (0,
|
|
3806
|
-
return /* @__PURE__ */ (0,
|
|
4097
|
+
const startColumn = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "df-columns-renderer-column", children: startChildren });
|
|
4098
|
+
const endColumn = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "df-columns-renderer-column", children: endChildren });
|
|
4099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
3807
4100
|
"div",
|
|
3808
4101
|
{
|
|
3809
|
-
className: (0,
|
|
4102
|
+
className: (0, import_classnames13.default)(
|
|
3810
4103
|
"df-columns-renderer-container",
|
|
3811
4104
|
getMargin(margin),
|
|
3812
4105
|
{
|
|
@@ -3824,23 +4117,6 @@ function ColumnsRendererComponent(props) {
|
|
|
3824
4117
|
}
|
|
3825
4118
|
var ColumnsRenderer_default = ColumnsRenderer;
|
|
3826
4119
|
|
|
3827
|
-
// ../renderers/src/components/VariableDateInput.tsx
|
|
3828
|
-
var import_components23 = require("@transferwise/components");
|
|
3829
|
-
|
|
3830
|
-
// ../renderers/src/hooks/useAvailabilityRules.ts
|
|
3831
|
-
var import_react11 = require("react");
|
|
3832
|
-
var import_react_intl13 = require("react-intl");
|
|
3833
|
-
|
|
3834
|
-
// ../renderers/src/messages/date-input.messages.ts
|
|
3835
|
-
var import_react_intl12 = require("react-intl");
|
|
3836
|
-
var date_input_messages_default = (0, import_react_intl12.defineMessages)({
|
|
3837
|
-
unavailableDates: {
|
|
3838
|
-
id: "df.wise.DateInput.unavailableDates",
|
|
3839
|
-
defaultMessage: "Some dates are unavailable.",
|
|
3840
|
-
description: "General explanation shown below a calendar containing unavailable dates"
|
|
3841
|
-
}
|
|
3842
|
-
});
|
|
3843
|
-
|
|
3844
4120
|
// ../renderers/src/validators/type-validators.ts
|
|
3845
4121
|
var isNumber = (value) => typeof value === "number" && !Number.isNaN(value);
|
|
3846
4122
|
|
|
@@ -3869,14 +4145,31 @@ var dateToDateString = (date) => {
|
|
|
3869
4145
|
return [year, formattedMonth, formattedDay].join("-");
|
|
3870
4146
|
};
|
|
3871
4147
|
|
|
4148
|
+
// ../renderers/src/DateInputRenderer/DateLookupControl.tsx
|
|
4149
|
+
var import_components26 = require("@transferwise/components");
|
|
4150
|
+
|
|
4151
|
+
// ../renderers/src/hooks/useAvailabilityRules.ts
|
|
4152
|
+
var import_react15 = require("react");
|
|
4153
|
+
var import_react_intl15 = require("react-intl");
|
|
4154
|
+
|
|
4155
|
+
// ../renderers/src/messages/date-input.messages.ts
|
|
4156
|
+
var import_react_intl14 = require("react-intl");
|
|
4157
|
+
var date_input_messages_default = (0, import_react_intl14.defineMessages)({
|
|
4158
|
+
unavailableDates: {
|
|
4159
|
+
id: "df.wise.DateInput.unavailableDates",
|
|
4160
|
+
defaultMessage: "Some dates are unavailable.",
|
|
4161
|
+
description: "General explanation shown below a calendar containing unavailable dates"
|
|
4162
|
+
}
|
|
4163
|
+
});
|
|
4164
|
+
|
|
3872
4165
|
// ../renderers/src/hooks/useAvailabilityRules.ts
|
|
3873
4166
|
var useAvailabilityRules = (availability) => {
|
|
3874
4167
|
var _a, _b;
|
|
3875
|
-
const { formatMessage } = (0,
|
|
3876
|
-
const [focusedDate, setFocusedDate] = (0,
|
|
4168
|
+
const { formatMessage } = (0, import_react_intl15.useIntl)();
|
|
4169
|
+
const [focusedDate, setFocusedDate] = (0, import_react15.useState)(null);
|
|
3877
4170
|
const unavailableMessage = (_b = (_a = focusedDate ? getUnavailableDateReason(focusedDate, availability) : null) != null ? _a : availability == null ? void 0 : availability.message) != null ? _b : formatMessage(date_input_messages_default.unavailableDates);
|
|
3878
4171
|
const onDateSelect = ({ date }) => {
|
|
3879
|
-
setFocusedDate(date);
|
|
4172
|
+
setFocusedDate((current) => (current == null ? void 0 : current.getTime()) === date.getTime() ? current : date);
|
|
3880
4173
|
};
|
|
3881
4174
|
return {
|
|
3882
4175
|
disabledRules: mapAvailabilityToDisabledRules(availability, unavailableMessage),
|
|
@@ -3924,64 +4217,124 @@ var matchesDateRule = (date, weekday, rule) => {
|
|
|
3924
4217
|
};
|
|
3925
4218
|
var isDate = (date) => date !== null;
|
|
3926
4219
|
|
|
3927
|
-
// ../renderers/src/
|
|
3928
|
-
var
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
onBlur,
|
|
3941
|
-
onChange,
|
|
3942
|
-
onFocus
|
|
3943
|
-
} = inputProps;
|
|
4220
|
+
// ../renderers/src/DateInputRenderer/DateLookupControl.tsx
|
|
4221
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4222
|
+
var DateLookupControl = ({
|
|
4223
|
+
value,
|
|
4224
|
+
minimumDate,
|
|
4225
|
+
maximumDate,
|
|
4226
|
+
placeholder,
|
|
4227
|
+
disabled,
|
|
4228
|
+
availability,
|
|
4229
|
+
onChange,
|
|
4230
|
+
onBlur,
|
|
4231
|
+
onFocus
|
|
4232
|
+
}) => {
|
|
3944
4233
|
const { disabledRules, onDateSelect, resetFocusedDate } = useAvailabilityRules(availability);
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
4234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4235
|
+
import_components26.DateLookup,
|
|
4236
|
+
{
|
|
4237
|
+
value: dateStringToDateOrNull(value),
|
|
4238
|
+
min: dateStringToDateOrNull(minimumDate),
|
|
4239
|
+
max: dateStringToDateOrNull(maximumDate),
|
|
4240
|
+
placeholder,
|
|
4241
|
+
disabled,
|
|
4242
|
+
disabledRules,
|
|
4243
|
+
onChange: (date) => {
|
|
4244
|
+
onChange(date !== null ? dateToDateString(date) : null);
|
|
4245
|
+
},
|
|
4246
|
+
onDateSelect,
|
|
4247
|
+
onBlur,
|
|
4248
|
+
onFocus: () => {
|
|
4249
|
+
resetFocusedDate();
|
|
4250
|
+
onFocus();
|
|
4251
|
+
}
|
|
4252
|
+
}
|
|
4253
|
+
);
|
|
4254
|
+
};
|
|
4255
|
+
|
|
4256
|
+
// ../renderers/src/DateInputRenderer/CalendarControl.tsx
|
|
4257
|
+
var import_components27 = require("@transferwise/components");
|
|
4258
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4259
|
+
var CalendarControl = ({
|
|
4260
|
+
id,
|
|
4261
|
+
title,
|
|
4262
|
+
value,
|
|
4263
|
+
minimumDate,
|
|
4264
|
+
maximumDate,
|
|
4265
|
+
validationState,
|
|
4266
|
+
availability,
|
|
4267
|
+
onChange,
|
|
4268
|
+
onFocus,
|
|
4269
|
+
onBlur
|
|
4270
|
+
}) => {
|
|
4271
|
+
const { disabledRules, onDateSelect, resetFocusedDate } = useAvailabilityRules(availability);
|
|
4272
|
+
const handleDateFocus = (date, { isEnabled }) => {
|
|
4273
|
+
if (date === null) {
|
|
4274
|
+
resetFocusedDate();
|
|
4275
|
+
return;
|
|
4276
|
+
}
|
|
4277
|
+
onDateSelect({ date, isEnabled });
|
|
4278
|
+
};
|
|
4279
|
+
return (
|
|
4280
|
+
// Wrapping in a <fieldset> to address some a11y gaps in the current inline Calendar component
|
|
4281
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4282
|
+
"fieldset",
|
|
3948
4283
|
{
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
4284
|
+
id,
|
|
4285
|
+
"aria-label": title,
|
|
4286
|
+
"aria-invalid": (validationState == null ? void 0 : validationState.status) === "invalid",
|
|
4287
|
+
onFocus: (event) => {
|
|
4288
|
+
if (!event.currentTarget.contains(event.relatedTarget)) {
|
|
4289
|
+
resetFocusedDate();
|
|
4290
|
+
onFocus();
|
|
4291
|
+
}
|
|
3957
4292
|
},
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
4293
|
+
onBlur: (event) => {
|
|
4294
|
+
if (!event.currentTarget.contains(event.relatedTarget)) {
|
|
4295
|
+
onBlur();
|
|
4296
|
+
}
|
|
4297
|
+
},
|
|
4298
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4299
|
+
import_components27.Calendar,
|
|
4300
|
+
{
|
|
4301
|
+
value: dateStringToDateOrNull(value),
|
|
4302
|
+
min: dateStringToDateOrNull(minimumDate),
|
|
4303
|
+
max: dateStringToDateOrNull(maximumDate),
|
|
4304
|
+
disabledRules,
|
|
4305
|
+
onChange: (date) => {
|
|
4306
|
+
onChange(date !== null ? dateToDateString(date) : null);
|
|
4307
|
+
},
|
|
4308
|
+
onDateFocus: handleDateFocus
|
|
4309
|
+
}
|
|
4310
|
+
)
|
|
3964
4311
|
}
|
|
3965
|
-
)
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
4312
|
+
)
|
|
4313
|
+
);
|
|
4314
|
+
};
|
|
4315
|
+
|
|
4316
|
+
// ../renderers/src/DateInputRenderer/DateInputControl.tsx
|
|
4317
|
+
var import_components28 = require("@transferwise/components");
|
|
4318
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4319
|
+
var DateInputControl = (_a) => {
|
|
4320
|
+
var _b = _a, { autoComplete } = _b, props = __objRest(_b, ["autoComplete"]);
|
|
4321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4322
|
+
import_components28.DateInput,
|
|
4323
|
+
__spreadProps(__spreadValues({}, props), {
|
|
3970
4324
|
dayAutoComplete: getAutocompleteString(autoComplete, "day"),
|
|
3971
4325
|
yearAutoComplete: getAutocompleteString(autoComplete, "year")
|
|
3972
4326
|
})
|
|
3973
4327
|
);
|
|
3974
|
-
}
|
|
4328
|
+
};
|
|
3975
4329
|
var getAutocompleteString = (value, suffix) => {
|
|
3976
4330
|
if (value === "bday") {
|
|
3977
4331
|
return `${value}-${suffix}`;
|
|
3978
4332
|
}
|
|
3979
4333
|
return void 0;
|
|
3980
4334
|
};
|
|
3981
|
-
var VariableDateInput_default = VariableDateInput;
|
|
3982
4335
|
|
|
3983
|
-
// ../renderers/src/DateInputRenderer.tsx
|
|
3984
|
-
var
|
|
4336
|
+
// ../renderers/src/DateInputRenderer/DateInputRenderer.tsx
|
|
4337
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3985
4338
|
var DateInputRenderer = {
|
|
3986
4339
|
canRenderType: "input-date",
|
|
3987
4340
|
render: (props) => {
|
|
@@ -4005,8 +4358,17 @@ var DateInputRenderer = {
|
|
|
4005
4358
|
"value"
|
|
4006
4359
|
]);
|
|
4007
4360
|
const value = initialValue != null ? initialValue : "";
|
|
4008
|
-
const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
|
|
4009
|
-
|
|
4361
|
+
const inputProps = __spreadProps(__spreadValues({}, rest), { value, id, title, validationState });
|
|
4362
|
+
const UIComponent = (() => {
|
|
4363
|
+
if (control === "calendar") {
|
|
4364
|
+
return !props.disabled ? CalendarControl : DateLookupControl;
|
|
4365
|
+
}
|
|
4366
|
+
if (control === "date-lookup") {
|
|
4367
|
+
return DateLookupControl;
|
|
4368
|
+
}
|
|
4369
|
+
return DateInputControl;
|
|
4370
|
+
})();
|
|
4371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4010
4372
|
FieldInput_default,
|
|
4011
4373
|
{
|
|
4012
4374
|
id,
|
|
@@ -4019,7 +4381,7 @@ var DateInputRenderer = {
|
|
|
4019
4381
|
features: props.features,
|
|
4020
4382
|
control,
|
|
4021
4383
|
tags: props.tags,
|
|
4022
|
-
children: /* @__PURE__ */ (0,
|
|
4384
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(UIComponent, __spreadValues({}, inputProps))
|
|
4023
4385
|
}
|
|
4024
4386
|
);
|
|
4025
4387
|
}
|
|
@@ -4027,16 +4389,16 @@ var DateInputRenderer = {
|
|
|
4027
4389
|
var DateInputRenderer_default = DateInputRenderer;
|
|
4028
4390
|
|
|
4029
4391
|
// ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
|
|
4030
|
-
var
|
|
4392
|
+
var import_components31 = require("@transferwise/components");
|
|
4031
4393
|
|
|
4032
4394
|
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
4033
|
-
var
|
|
4034
|
-
var
|
|
4035
|
-
var
|
|
4395
|
+
var import_components30 = require("@transferwise/components");
|
|
4396
|
+
var import_react16 = require("react");
|
|
4397
|
+
var import_react_intl19 = require("react-intl");
|
|
4036
4398
|
|
|
4037
4399
|
// ../renderers/src/messages/filter.messages.ts
|
|
4038
|
-
var
|
|
4039
|
-
var filter_messages_default = (0,
|
|
4400
|
+
var import_react_intl16 = require("react-intl");
|
|
4401
|
+
var filter_messages_default = (0, import_react_intl16.defineMessages)({
|
|
4040
4402
|
placeholder: {
|
|
4041
4403
|
id: "df.wise.filter.placeholder",
|
|
4042
4404
|
defaultMessage: "Start typing to search",
|
|
@@ -4102,12 +4464,12 @@ function filterAndSortItems(options, query) {
|
|
|
4102
4464
|
var normalizeAndRemoveAccents = (text) => text.trim().toLowerCase().normalize("NFKD").replace(new RegExp("\\p{Diacritic}", "gu"), "");
|
|
4103
4465
|
|
|
4104
4466
|
// ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
|
|
4105
|
-
var
|
|
4106
|
-
var
|
|
4467
|
+
var import_components29 = require("@transferwise/components");
|
|
4468
|
+
var import_react_intl18 = require("react-intl");
|
|
4107
4469
|
|
|
4108
4470
|
// ../renderers/src/messages/group.messages.ts
|
|
4109
|
-
var
|
|
4110
|
-
var group_messages_default = (0,
|
|
4471
|
+
var import_react_intl17 = require("react-intl");
|
|
4472
|
+
var group_messages_default = (0, import_react_intl17.defineMessages)({
|
|
4111
4473
|
all: {
|
|
4112
4474
|
id: "df.wise.group.all",
|
|
4113
4475
|
defaultMessage: "All",
|
|
@@ -4141,19 +4503,19 @@ var getGroupsFromTags = (knownTags, items) => {
|
|
|
4141
4503
|
};
|
|
4142
4504
|
|
|
4143
4505
|
// ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
|
|
4144
|
-
var
|
|
4506
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4145
4507
|
var groupingTags = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
4146
4508
|
var isGroupedDecision = (options) => {
|
|
4147
4509
|
return getGroupsFromTags(groupingTags, options).length > 0;
|
|
4148
4510
|
};
|
|
4149
4511
|
var GroupedDecisionList = (_a) => {
|
|
4150
4512
|
var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
|
|
4151
|
-
const { formatMessage } = (0,
|
|
4513
|
+
const { formatMessage } = (0, import_react_intl18.useIntl)();
|
|
4152
4514
|
const { options } = rest;
|
|
4153
4515
|
const itemsByTag = [...getGroupsFromTags(groupingTags, options), { tag: "all", items: options }];
|
|
4154
|
-
return /* @__PURE__ */ (0,
|
|
4155
|
-
/* @__PURE__ */ (0,
|
|
4156
|
-
|
|
4516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_jsx_runtime53.Fragment, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_components29.Section, { children: [
|
|
4517
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4518
|
+
import_components29.Header,
|
|
4157
4519
|
{
|
|
4158
4520
|
as: "h2",
|
|
4159
4521
|
title: tag in group_messages_default ? formatMessage(group_messages_default[tag]) : tag
|
|
@@ -4164,28 +4526,28 @@ var GroupedDecisionList = (_a) => {
|
|
|
4164
4526
|
};
|
|
4165
4527
|
|
|
4166
4528
|
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
4167
|
-
var
|
|
4168
|
-
var
|
|
4529
|
+
var import_classnames14 = __toESM(require_classnames());
|
|
4530
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4169
4531
|
var DecisionWrapper = (props) => {
|
|
4170
4532
|
const { margin, control, title, tags } = props;
|
|
4171
|
-
return /* @__PURE__ */ (0,
|
|
4172
|
-
title && /* @__PURE__ */ (0,
|
|
4173
|
-
control === "filtered" ? /* @__PURE__ */ (0,
|
|
4533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: (0, import_classnames14.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
4534
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components30.Header, { as: "h2", title }),
|
|
4535
|
+
control === "filtered" ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(UnfilteredDecisionList, __spreadValues({}, props))
|
|
4174
4536
|
] });
|
|
4175
4537
|
};
|
|
4176
4538
|
var UnfilteredDecisionList = (_a) => {
|
|
4177
4539
|
var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
|
|
4178
|
-
return isGroupedDecision(rest.options) ? /* @__PURE__ */ (0,
|
|
4540
|
+
return isGroupedDecision(rest.options) ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
|
|
4179
4541
|
};
|
|
4180
4542
|
var FilteredDecisionList = (props) => {
|
|
4181
|
-
const { formatMessage } = (0,
|
|
4182
|
-
const [query, setQuery] = (0,
|
|
4543
|
+
const { formatMessage } = (0, import_react_intl19.useIntl)();
|
|
4544
|
+
const [query, setQuery] = (0, import_react16.useState)("");
|
|
4183
4545
|
const { control, options, renderDecisionList: renderDecisionList2 } = props;
|
|
4184
4546
|
const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortItems(options, query) : options;
|
|
4185
4547
|
const isGrouped = isGroupedDecision(options);
|
|
4186
|
-
return /* @__PURE__ */ (0,
|
|
4187
|
-
/* @__PURE__ */ (0,
|
|
4188
|
-
|
|
4548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
4549
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4550
|
+
import_components30.SearchInput,
|
|
4189
4551
|
{
|
|
4190
4552
|
placeholder: formatMessage(filter_messages_default.placeholder),
|
|
4191
4553
|
value: query,
|
|
@@ -4196,25 +4558,25 @@ var FilteredDecisionList = (props) => {
|
|
|
4196
4558
|
}
|
|
4197
4559
|
}
|
|
4198
4560
|
),
|
|
4199
|
-
isGrouped && query.length === 0 ? /* @__PURE__ */ (0,
|
|
4200
|
-
query.length > 0 && /* @__PURE__ */ (0,
|
|
4561
|
+
isGrouped && query.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
4562
|
+
query.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components30.Header, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
|
|
4201
4563
|
filteredOptions.length > 0 ? renderDecisionList2({
|
|
4202
4564
|
control,
|
|
4203
4565
|
className: query.length === 0 ? "m-t-3" : "",
|
|
4204
4566
|
options: filteredOptions
|
|
4205
|
-
}) : /* @__PURE__ */ (0,
|
|
4567
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { children: formatMessage(filter_messages_default.noResults) })
|
|
4206
4568
|
] })
|
|
4207
4569
|
] });
|
|
4208
4570
|
};
|
|
4209
4571
|
|
|
4210
4572
|
// ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
|
|
4211
|
-
var
|
|
4573
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4212
4574
|
var DecisionRenderer = {
|
|
4213
4575
|
canRenderType: "decision",
|
|
4214
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
4576
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
|
|
4215
4577
|
};
|
|
4216
4578
|
var renderDecisionList = ({ options, control }) => {
|
|
4217
|
-
return /* @__PURE__ */ (0,
|
|
4579
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_jsx_runtime55.Fragment, { children: options.map((_a) => {
|
|
4218
4580
|
var _b = _a, { onClick } = _b, rest = __objRest(_b, ["onClick"]);
|
|
4219
4581
|
const {
|
|
4220
4582
|
description,
|
|
@@ -4227,8 +4589,8 @@ var renderDecisionList = ({ options, control }) => {
|
|
|
4227
4589
|
supportingValues,
|
|
4228
4590
|
tags
|
|
4229
4591
|
} = rest;
|
|
4230
|
-
return /* @__PURE__ */ (0,
|
|
4231
|
-
|
|
4592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
4593
|
+
import_components31.ListItem,
|
|
4232
4594
|
{
|
|
4233
4595
|
title: itemTitle,
|
|
4234
4596
|
subtitle: description,
|
|
@@ -4239,7 +4601,7 @@ var renderDecisionList = ({ options, control }) => {
|
|
|
4239
4601
|
media: getMedia(media, shouldUseAvatar(control, tags)),
|
|
4240
4602
|
prompt: getInlineAlert(inlineAlert),
|
|
4241
4603
|
additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
|
|
4242
|
-
control: /* @__PURE__ */ (0,
|
|
4604
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components31.ListItem.Navigation, __spreadValues({}, getAnchorProps()))
|
|
4243
4605
|
},
|
|
4244
4606
|
JSON.stringify(rest)
|
|
4245
4607
|
);
|
|
@@ -4248,9 +4610,9 @@ var renderDecisionList = ({ options, control }) => {
|
|
|
4248
4610
|
var DecisionRenderer_default = DecisionRenderer;
|
|
4249
4611
|
|
|
4250
4612
|
// ../renderers/src/DividerRenderer.tsx
|
|
4251
|
-
var
|
|
4252
|
-
var
|
|
4253
|
-
var
|
|
4613
|
+
var import_components32 = require("@transferwise/components");
|
|
4614
|
+
var import_classnames15 = __toESM(require_classnames());
|
|
4615
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4254
4616
|
var mapControlToLevel = (control) => {
|
|
4255
4617
|
switch (control) {
|
|
4256
4618
|
case "section":
|
|
@@ -4263,10 +4625,10 @@ var mapControlToLevel = (control) => {
|
|
|
4263
4625
|
};
|
|
4264
4626
|
var DividerRenderer = {
|
|
4265
4627
|
canRenderType: "divider",
|
|
4266
|
-
render: ({ margin, control, tags }) => /* @__PURE__ */ (0,
|
|
4267
|
-
|
|
4628
|
+
render: ({ margin, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4629
|
+
import_components32.Divider,
|
|
4268
4630
|
{
|
|
4269
|
-
className: (0,
|
|
4631
|
+
className: (0, import_classnames15.default)(
|
|
4270
4632
|
"m-t-0",
|
|
4271
4633
|
"d-block",
|
|
4272
4634
|
getMargin(margin),
|
|
@@ -4279,11 +4641,11 @@ var DividerRenderer = {
|
|
|
4279
4641
|
var DividerRenderer_default = DividerRenderer;
|
|
4280
4642
|
|
|
4281
4643
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
4282
|
-
var
|
|
4644
|
+
var import_components33 = require("@transferwise/components");
|
|
4283
4645
|
|
|
4284
4646
|
// ../renderers/src/messages/external-confirmation.messages.ts
|
|
4285
|
-
var
|
|
4286
|
-
var external_confirmation_messages_default = (0,
|
|
4647
|
+
var import_react_intl20 = require("react-intl");
|
|
4648
|
+
var external_confirmation_messages_default = (0, import_react_intl20.defineMessages)({
|
|
4287
4649
|
title: {
|
|
4288
4650
|
id: "df.wise.ExternalConfirmation.title",
|
|
4289
4651
|
defaultMessage: "Please confirm",
|
|
@@ -4307,9 +4669,9 @@ var external_confirmation_messages_default = (0, import_react_intl18.defineMessa
|
|
|
4307
4669
|
});
|
|
4308
4670
|
|
|
4309
4671
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
4310
|
-
var
|
|
4311
|
-
var
|
|
4312
|
-
var
|
|
4672
|
+
var import_react_intl21 = require("react-intl");
|
|
4673
|
+
var import_react17 = require("react");
|
|
4674
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
4313
4675
|
var ExternalConfirmationRenderer = {
|
|
4314
4676
|
canRenderType: "external-confirmation",
|
|
4315
4677
|
render: ExternalConfirmationRendererComponent
|
|
@@ -4322,20 +4684,20 @@ function ExternalConfirmationRendererComponent({
|
|
|
4322
4684
|
control,
|
|
4323
4685
|
tags
|
|
4324
4686
|
}) {
|
|
4325
|
-
const { formatMessage } = (0,
|
|
4326
|
-
(0,
|
|
4687
|
+
const { formatMessage } = (0, import_react_intl21.useIntl)();
|
|
4688
|
+
(0, import_react17.useEffect)(() => {
|
|
4327
4689
|
open();
|
|
4328
4690
|
}, []);
|
|
4329
|
-
return /* @__PURE__ */ (0,
|
|
4330
|
-
|
|
4691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4692
|
+
import_components33.Modal,
|
|
4331
4693
|
{
|
|
4332
4694
|
open: visible,
|
|
4333
4695
|
title: formatMessage(external_confirmation_messages_default.title),
|
|
4334
|
-
body: /* @__PURE__ */ (0,
|
|
4335
|
-
/* @__PURE__ */ (0,
|
|
4336
|
-
/* @__PURE__ */ (0,
|
|
4337
|
-
/* @__PURE__ */ (0,
|
|
4338
|
-
|
|
4696
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
|
|
4697
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components33.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
|
|
4698
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
|
|
4699
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4700
|
+
import_components33.Button,
|
|
4339
4701
|
{
|
|
4340
4702
|
v2: true,
|
|
4341
4703
|
block: true,
|
|
@@ -4348,7 +4710,7 @@ function ExternalConfirmationRendererComponent({
|
|
|
4348
4710
|
children: formatMessage(external_confirmation_messages_default.open)
|
|
4349
4711
|
}
|
|
4350
4712
|
),
|
|
4351
|
-
/* @__PURE__ */ (0,
|
|
4713
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components33.Button, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
|
|
4352
4714
|
] }) })
|
|
4353
4715
|
] }),
|
|
4354
4716
|
className: controlAndTagsToCSSClass({ control, tags }),
|
|
@@ -4366,51 +4728,51 @@ function getOrigin(url) {
|
|
|
4366
4728
|
var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
|
|
4367
4729
|
|
|
4368
4730
|
// ../renderers/src/FormRenderer.tsx
|
|
4369
|
-
var
|
|
4370
|
-
var
|
|
4731
|
+
var import_classnames16 = __toESM(require_classnames());
|
|
4732
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4371
4733
|
var FormRenderer = {
|
|
4372
4734
|
canRenderType: "form",
|
|
4373
|
-
render: ({ children, margin, control, tags }) => /* @__PURE__ */ (0,
|
|
4735
|
+
render: ({ children, margin, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: (0, import_classnames16.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children })
|
|
4374
4736
|
};
|
|
4375
4737
|
var FormRenderer_default = FormRenderer;
|
|
4376
4738
|
|
|
4377
4739
|
// ../renderers/src/FormSectionRenderer.tsx
|
|
4378
|
-
var
|
|
4379
|
-
var
|
|
4740
|
+
var import_components34 = require("@transferwise/components");
|
|
4741
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4380
4742
|
var FormSectionRenderer = {
|
|
4381
4743
|
canRenderType: "form-section",
|
|
4382
|
-
render: ({ title, description, children, control, tags }) => /* @__PURE__ */ (0,
|
|
4383
|
-
title && /* @__PURE__ */ (0,
|
|
4384
|
-
|
|
4744
|
+
render: ({ title, description, children, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("fieldset", { className: controlAndTagsToCSSClass({ control, tags }), children: [
|
|
4745
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4746
|
+
import_components34.Header,
|
|
4385
4747
|
{
|
|
4386
4748
|
as: "h2",
|
|
4387
4749
|
title
|
|
4388
4750
|
}
|
|
4389
4751
|
),
|
|
4390
|
-
description && /* @__PURE__ */ (0,
|
|
4752
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { children: description }),
|
|
4391
4753
|
children
|
|
4392
4754
|
] })
|
|
4393
4755
|
};
|
|
4394
4756
|
var FormSectionRenderer_default = FormSectionRenderer;
|
|
4395
4757
|
|
|
4396
4758
|
// ../renderers/src/HeadingRenderer.tsx
|
|
4397
|
-
var
|
|
4398
|
-
var
|
|
4399
|
-
var
|
|
4759
|
+
var import_components35 = require("@transferwise/components");
|
|
4760
|
+
var import_classnames17 = __toESM(require_classnames());
|
|
4761
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
4400
4762
|
var HeadingRenderer = {
|
|
4401
4763
|
canRenderType: "heading",
|
|
4402
4764
|
render: Heading
|
|
4403
4765
|
};
|
|
4404
4766
|
function Heading(props) {
|
|
4405
4767
|
const { text, size, align, margin, control } = props;
|
|
4406
|
-
const className = (0,
|
|
4768
|
+
const className = (0, import_classnames17.default)(
|
|
4407
4769
|
getTextAlignmentAndMargin({ align, margin }),
|
|
4408
4770
|
controlAndTagsToCSSClass(props)
|
|
4409
4771
|
);
|
|
4410
|
-
return control === "display" ? /* @__PURE__ */ (0,
|
|
4772
|
+
return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(StandardHeading, { size, text, className });
|
|
4411
4773
|
}
|
|
4412
4774
|
function DisplayHeading({ size, text, className }) {
|
|
4413
|
-
return /* @__PURE__ */ (0,
|
|
4775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components35.Display, { type: getDisplayType(size), className, children: text });
|
|
4414
4776
|
}
|
|
4415
4777
|
var getDisplayType = (size) => {
|
|
4416
4778
|
switch (size) {
|
|
@@ -4426,7 +4788,7 @@ var getDisplayType = (size) => {
|
|
|
4426
4788
|
}
|
|
4427
4789
|
};
|
|
4428
4790
|
function StandardHeading({ size, text, className }) {
|
|
4429
|
-
return /* @__PURE__ */ (0,
|
|
4791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components35.Title, { type: getTitleTypeBySize(size), className, children: text });
|
|
4430
4792
|
}
|
|
4431
4793
|
var getTitleTypeBySize = (size) => {
|
|
4432
4794
|
var _a;
|
|
@@ -4442,9 +4804,9 @@ var getTitleTypeBySize = (size) => {
|
|
|
4442
4804
|
var HeadingRenderer_default = HeadingRenderer;
|
|
4443
4805
|
|
|
4444
4806
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
4445
|
-
var
|
|
4446
|
-
var
|
|
4447
|
-
var
|
|
4807
|
+
var import_components36 = require("@transferwise/components");
|
|
4808
|
+
var import_classnames18 = __toESM(require_classnames());
|
|
4809
|
+
var import_react18 = require("react");
|
|
4448
4810
|
|
|
4449
4811
|
// ../renderers/src/utils/api-utils.ts
|
|
4450
4812
|
function isRelativePath(url = "") {
|
|
@@ -4454,7 +4816,7 @@ function isRelativePath(url = "") {
|
|
|
4454
4816
|
}
|
|
4455
4817
|
|
|
4456
4818
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
4457
|
-
var
|
|
4819
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
4458
4820
|
function UrlImage({
|
|
4459
4821
|
accessibilityDescription,
|
|
4460
4822
|
align,
|
|
@@ -4465,24 +4827,24 @@ function UrlImage({
|
|
|
4465
4827
|
uri,
|
|
4466
4828
|
httpClient
|
|
4467
4829
|
}) {
|
|
4468
|
-
const [imageSource, setImageSource] = (0,
|
|
4469
|
-
(0,
|
|
4830
|
+
const [imageSource, setImageSource] = (0, import_react18.useState)("");
|
|
4831
|
+
(0, import_react18.useEffect)(() => {
|
|
4470
4832
|
if (!uri.startsWith("urn:")) {
|
|
4471
4833
|
void getImageSource(httpClient, uri).then(setImageSource);
|
|
4472
4834
|
}
|
|
4473
4835
|
}, [uri, httpClient]);
|
|
4474
|
-
return /* @__PURE__ */ (0,
|
|
4836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
4475
4837
|
"div",
|
|
4476
4838
|
{
|
|
4477
|
-
className: (0,
|
|
4839
|
+
className: (0, import_classnames18.default)(
|
|
4478
4840
|
"df-image",
|
|
4479
4841
|
align,
|
|
4480
4842
|
size || "md",
|
|
4481
4843
|
getMargin(margin),
|
|
4482
4844
|
controlAndTagsToCSSClass({ control, tags })
|
|
4483
4845
|
),
|
|
4484
|
-
children: /* @__PURE__ */ (0,
|
|
4485
|
-
|
|
4846
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
4847
|
+
import_components36.Image,
|
|
4486
4848
|
{
|
|
4487
4849
|
className: "df-reserve-space",
|
|
4488
4850
|
alt: accessibilityDescription != null ? accessibilityDescription : "",
|
|
@@ -4527,19 +4889,19 @@ var getImageSource = async (httpClient, imageUrl) => {
|
|
|
4527
4889
|
};
|
|
4528
4890
|
|
|
4529
4891
|
// ../renderers/src/ImageRenderer/ImageRenderer.tsx
|
|
4530
|
-
var
|
|
4892
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
4531
4893
|
var ImageRenderer = {
|
|
4532
4894
|
canRenderType: "image",
|
|
4533
|
-
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0,
|
|
4895
|
+
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(UrlImage, __spreadValues({}, props))
|
|
4534
4896
|
};
|
|
4535
4897
|
|
|
4536
4898
|
// ../renderers/src/ImageRenderer/index.tsx
|
|
4537
4899
|
var ImageRenderer_default = ImageRenderer;
|
|
4538
4900
|
|
|
4539
4901
|
// ../renderers/src/InstructionsRenderer.tsx
|
|
4540
|
-
var
|
|
4541
|
-
var
|
|
4542
|
-
var
|
|
4902
|
+
var import_components37 = require("@transferwise/components");
|
|
4903
|
+
var import_classnames19 = __toESM(require_classnames());
|
|
4904
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4543
4905
|
var doContext = ["positive", "neutral", "proposition"];
|
|
4544
4906
|
var dontContext = ["warning", "negative"];
|
|
4545
4907
|
var InstructionsRenderer = {
|
|
@@ -4547,16 +4909,16 @@ var InstructionsRenderer = {
|
|
|
4547
4909
|
render: ({ items, margin, title, control, tags }) => {
|
|
4548
4910
|
const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
|
|
4549
4911
|
const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
|
|
4550
|
-
return /* @__PURE__ */ (0,
|
|
4551
|
-
title ? /* @__PURE__ */ (0,
|
|
4552
|
-
/* @__PURE__ */ (0,
|
|
4912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: (0, import_classnames19.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
4913
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_components37.Header, { title }) : null,
|
|
4914
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_components37.InstructionsList, { dos, donts })
|
|
4553
4915
|
] });
|
|
4554
4916
|
}
|
|
4555
4917
|
};
|
|
4556
4918
|
var InstructionsRenderer_default = InstructionsRenderer;
|
|
4557
4919
|
|
|
4558
4920
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
4559
|
-
var
|
|
4921
|
+
var import_components38 = require("@transferwise/components");
|
|
4560
4922
|
|
|
4561
4923
|
// ../renderers/src/utils/input-utils.ts
|
|
4562
4924
|
var onWheel = (event) => {
|
|
@@ -4581,7 +4943,7 @@ function pick(obj, ...keys) {
|
|
|
4581
4943
|
}
|
|
4582
4944
|
|
|
4583
4945
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
4584
|
-
var
|
|
4946
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4585
4947
|
var IntegerInputRenderer = {
|
|
4586
4948
|
canRenderType: "input-integer",
|
|
4587
4949
|
render: (props) => {
|
|
@@ -4596,7 +4958,7 @@ var IntegerInputRenderer = {
|
|
|
4596
4958
|
"maximum",
|
|
4597
4959
|
"minimum"
|
|
4598
4960
|
);
|
|
4599
|
-
return /* @__PURE__ */ (0,
|
|
4961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
4600
4962
|
FieldInput_default,
|
|
4601
4963
|
{
|
|
4602
4964
|
id,
|
|
@@ -4609,8 +4971,8 @@ var IntegerInputRenderer = {
|
|
|
4609
4971
|
features: props.features,
|
|
4610
4972
|
control: props.control,
|
|
4611
4973
|
tags: props.tags,
|
|
4612
|
-
children: /* @__PURE__ */ (0,
|
|
4613
|
-
|
|
4974
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components38.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
4975
|
+
import_components38.Input,
|
|
4614
4976
|
__spreadValues({
|
|
4615
4977
|
id,
|
|
4616
4978
|
name: id,
|
|
@@ -4632,13 +4994,13 @@ var IntegerInputRenderer = {
|
|
|
4632
4994
|
var IntegerInputRenderer_default = IntegerInputRenderer;
|
|
4633
4995
|
|
|
4634
4996
|
// ../renderers/src/ListRenderer.tsx
|
|
4635
|
-
var
|
|
4636
|
-
var
|
|
4997
|
+
var import_components40 = require("@transferwise/components");
|
|
4998
|
+
var import_classnames20 = __toESM(require_classnames());
|
|
4637
4999
|
|
|
4638
5000
|
// ../renderers/src/components/Header.tsx
|
|
4639
|
-
var
|
|
4640
|
-
var
|
|
4641
|
-
var Header = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ (0,
|
|
5001
|
+
var import_components39 = require("@transferwise/components");
|
|
5002
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
5003
|
+
var Header = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components39.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
|
|
4642
5004
|
var getHeaderAction = (callToAction) => {
|
|
4643
5005
|
if (!callToAction) {
|
|
4644
5006
|
return void 0;
|
|
@@ -4650,11 +5012,11 @@ var getHeaderAction = (callToAction) => {
|
|
|
4650
5012
|
};
|
|
4651
5013
|
|
|
4652
5014
|
// ../renderers/src/ListRenderer.tsx
|
|
4653
|
-
var
|
|
5015
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4654
5016
|
var ListRenderer = {
|
|
4655
5017
|
canRenderType: "list",
|
|
4656
|
-
render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ (0,
|
|
4657
|
-
/* @__PURE__ */ (0,
|
|
5018
|
+
render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: (0, import_classnames20.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
5019
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Header, { title, callToAction }),
|
|
4658
5020
|
items.map((item) => {
|
|
4659
5021
|
var _a, _b;
|
|
4660
5022
|
const {
|
|
@@ -4671,8 +5033,8 @@ var ListRenderer = {
|
|
|
4671
5033
|
ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
|
|
4672
5034
|
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
4673
5035
|
};
|
|
4674
|
-
return /* @__PURE__ */ (0,
|
|
4675
|
-
|
|
5036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5037
|
+
import_components40.ListItem,
|
|
4676
5038
|
{
|
|
4677
5039
|
title: itemTitle,
|
|
4678
5040
|
subtitle: description,
|
|
@@ -4691,17 +5053,17 @@ var ListRenderer = {
|
|
|
4691
5053
|
var ListRenderer_default = ListRenderer;
|
|
4692
5054
|
|
|
4693
5055
|
// ../renderers/src/LoadingIndicatorRenderer.tsx
|
|
4694
|
-
var
|
|
4695
|
-
var
|
|
4696
|
-
var
|
|
5056
|
+
var import_components41 = require("@transferwise/components");
|
|
5057
|
+
var import_classnames21 = __toESM(require_classnames());
|
|
5058
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
4697
5059
|
var LoadingIndicatorRenderer = {
|
|
4698
5060
|
canRenderType: "loading-indicator",
|
|
4699
|
-
render: ({ size, margin, control, tags }) => /* @__PURE__ */ (0,
|
|
4700
|
-
|
|
5061
|
+
render: ({ size, margin, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5062
|
+
import_components41.Loader,
|
|
4701
5063
|
{
|
|
4702
5064
|
size,
|
|
4703
5065
|
classNames: {
|
|
4704
|
-
"tw-loader": (0,
|
|
5066
|
+
"tw-loader": (0, import_classnames21.default)(
|
|
4705
5067
|
"tw-loader",
|
|
4706
5068
|
"m-x-auto",
|
|
4707
5069
|
getMargin(margin),
|
|
@@ -4715,24 +5077,24 @@ var LoadingIndicatorRenderer = {
|
|
|
4715
5077
|
var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
|
|
4716
5078
|
|
|
4717
5079
|
// ../renderers/src/MarkdownRenderer.tsx
|
|
4718
|
-
var
|
|
4719
|
-
var
|
|
4720
|
-
var
|
|
5080
|
+
var import_components42 = require("@transferwise/components");
|
|
5081
|
+
var import_classnames22 = __toESM(require_classnames());
|
|
5082
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
4721
5083
|
var MarkdownRenderer = {
|
|
4722
5084
|
canRenderType: "markdown",
|
|
4723
5085
|
render: ({ content, align, margin, size, control, tags }) => {
|
|
4724
5086
|
const isLarge = !["xs", "sm"].includes(size);
|
|
4725
|
-
return /* @__PURE__ */ (0,
|
|
5087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
4726
5088
|
"div",
|
|
4727
5089
|
{
|
|
4728
|
-
className: (0,
|
|
5090
|
+
className: (0, import_classnames22.default)(
|
|
4729
5091
|
getTextAlignmentAndMargin({ align, margin }),
|
|
4730
5092
|
controlAndTagsToCSSClass({ control, tags })
|
|
4731
5093
|
),
|
|
4732
|
-
children: /* @__PURE__ */ (0,
|
|
4733
|
-
|
|
5094
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5095
|
+
import_components42.Markdown,
|
|
4734
5096
|
{
|
|
4735
|
-
className: (0,
|
|
5097
|
+
className: (0, import_classnames22.default)("df-markdown", {
|
|
4736
5098
|
"np-text-body-large": isLarge,
|
|
4737
5099
|
"np-text-body-default": !isLarge
|
|
4738
5100
|
}),
|
|
@@ -4747,17 +5109,17 @@ var MarkdownRenderer = {
|
|
|
4747
5109
|
var MarkdownRenderer_default = MarkdownRenderer;
|
|
4748
5110
|
|
|
4749
5111
|
// ../renderers/src/MediaRenderer.tsx
|
|
4750
|
-
var
|
|
4751
|
-
var
|
|
5112
|
+
var import_classnames23 = __toESM(require_classnames());
|
|
5113
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
4752
5114
|
var MediaRenderer = {
|
|
4753
5115
|
canRenderType: "media",
|
|
4754
5116
|
render: (_a) => {
|
|
4755
5117
|
var _b = _a, { media } = _b, rest = __objRest(_b, ["media"]);
|
|
4756
5118
|
switch (media.type) {
|
|
4757
5119
|
case "avatar":
|
|
4758
|
-
return /* @__PURE__ */ (0,
|
|
5120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(AvatarMediaRendererComponent, __spreadValues({ media }, rest));
|
|
4759
5121
|
case "image":
|
|
4760
|
-
return /* @__PURE__ */ (0,
|
|
5122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ImageMediaRendererComponent, __spreadValues({ media }, rest));
|
|
4761
5123
|
case "legacy":
|
|
4762
5124
|
return null;
|
|
4763
5125
|
}
|
|
@@ -4771,16 +5133,16 @@ var AvatarMediaRendererComponent = ({
|
|
|
4771
5133
|
control,
|
|
4772
5134
|
tags
|
|
4773
5135
|
}) => {
|
|
4774
|
-
return /* @__PURE__ */ (0,
|
|
5136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
4775
5137
|
"div",
|
|
4776
5138
|
{
|
|
4777
|
-
className: (0,
|
|
5139
|
+
className: (0, import_classnames23.default)(
|
|
4778
5140
|
"df-media-layout-avatar",
|
|
4779
5141
|
align,
|
|
4780
5142
|
getMargin(margin),
|
|
4781
5143
|
controlAndTagsToCSSClass({ control, tags })
|
|
4782
5144
|
),
|
|
4783
|
-
children: /* @__PURE__ */ (0,
|
|
5145
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Media, { media, size: mapAvatarMediaSize(size) })
|
|
4784
5146
|
}
|
|
4785
5147
|
);
|
|
4786
5148
|
};
|
|
@@ -4793,14 +5155,14 @@ var ImageMediaRendererComponent = (_a) => {
|
|
|
4793
5155
|
"size"
|
|
4794
5156
|
]);
|
|
4795
5157
|
var _a2, _b2;
|
|
4796
|
-
return isUrnImage(media.uri) ? /* @__PURE__ */ (0,
|
|
5158
|
+
return isUrnImage(media.uri) ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
4797
5159
|
UrnImage,
|
|
4798
5160
|
__spreadValues({
|
|
4799
5161
|
uri: media.uri,
|
|
4800
5162
|
size: (_a2 = media.size) != null ? _a2 : size,
|
|
4801
5163
|
accessibilityDescription: media.accessibilityDescription
|
|
4802
5164
|
}, rest)
|
|
4803
|
-
) : /* @__PURE__ */ (0,
|
|
5165
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
4804
5166
|
UrlImage,
|
|
4805
5167
|
__spreadValues({
|
|
4806
5168
|
uri: media.uri,
|
|
@@ -4825,22 +5187,22 @@ var mapAvatarMediaSize = (size) => {
|
|
|
4825
5187
|
};
|
|
4826
5188
|
|
|
4827
5189
|
// ../renderers/src/ModalLayoutRenderer.tsx
|
|
4828
|
-
var
|
|
4829
|
-
var
|
|
4830
|
-
var
|
|
4831
|
-
var
|
|
5190
|
+
var import_components43 = require("@transferwise/components");
|
|
5191
|
+
var import_classnames24 = __toESM(require_classnames());
|
|
5192
|
+
var import_react19 = require("react");
|
|
5193
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
4832
5194
|
var ModalLayoutRenderer = {
|
|
4833
5195
|
canRenderType: "modal-layout",
|
|
4834
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
5196
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(DFModal, __spreadValues({}, props))
|
|
4835
5197
|
};
|
|
4836
5198
|
var ModalLayoutRenderer_default = ModalLayoutRenderer;
|
|
4837
5199
|
function DFModal({ content, margin, trigger, control, tags }) {
|
|
4838
|
-
const [visible, setVisible] = (0,
|
|
5200
|
+
const [visible, setVisible] = (0, import_react19.useState)(false);
|
|
4839
5201
|
const { children, title } = content;
|
|
4840
|
-
return /* @__PURE__ */ (0,
|
|
4841
|
-
/* @__PURE__ */ (0,
|
|
4842
|
-
/* @__PURE__ */ (0,
|
|
4843
|
-
|
|
5202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: (0, import_classnames24.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
5203
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components43.Button, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
|
|
5204
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
5205
|
+
import_components43.Modal,
|
|
4844
5206
|
{
|
|
4845
5207
|
scroll: "content",
|
|
4846
5208
|
open: visible,
|
|
@@ -4854,13 +5216,13 @@ function DFModal({ content, margin, trigger, control, tags }) {
|
|
|
4854
5216
|
}
|
|
4855
5217
|
|
|
4856
5218
|
// ../renderers/src/ModalRenderer.tsx
|
|
4857
|
-
var
|
|
4858
|
-
var
|
|
5219
|
+
var import_components44 = require("@transferwise/components");
|
|
5220
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
4859
5221
|
var ModalRenderer = {
|
|
4860
5222
|
canRenderType: "modal",
|
|
4861
5223
|
render: ({ title, children, open, onClose, control, tags }) => {
|
|
4862
|
-
return /* @__PURE__ */ (0,
|
|
4863
|
-
|
|
5224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
5225
|
+
import_components44.Modal,
|
|
4864
5226
|
{
|
|
4865
5227
|
open,
|
|
4866
5228
|
title,
|
|
@@ -4873,10 +5235,10 @@ var ModalRenderer = {
|
|
|
4873
5235
|
};
|
|
4874
5236
|
|
|
4875
5237
|
// ../renderers/src/MoneyInputRenderer.tsx
|
|
4876
|
-
var
|
|
4877
|
-
var
|
|
4878
|
-
var
|
|
4879
|
-
var
|
|
5238
|
+
var import_components45 = require("@transferwise/components");
|
|
5239
|
+
var import_react20 = require("react");
|
|
5240
|
+
var import_react_intl22 = require("react-intl");
|
|
5241
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
4880
5242
|
var groupingTags2 = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
4881
5243
|
var MoneyInputRenderer = {
|
|
4882
5244
|
canRenderType: "money-input",
|
|
@@ -4900,13 +5262,13 @@ function MoneyInputRendererComponent(props) {
|
|
|
4900
5262
|
onAmountChange,
|
|
4901
5263
|
onCurrencyChange
|
|
4902
5264
|
} = props;
|
|
4903
|
-
(0,
|
|
5265
|
+
(0, import_react20.useEffect)(() => {
|
|
4904
5266
|
if (!isValidIndex(selectedCurrencyIndex, currencies.length)) {
|
|
4905
5267
|
onCurrencyChange(0);
|
|
4906
5268
|
}
|
|
4907
5269
|
}, [selectedCurrencyIndex, onCurrencyChange, currencies.length]);
|
|
4908
|
-
const { formatMessage } = (0,
|
|
4909
|
-
return /* @__PURE__ */ (0,
|
|
5270
|
+
const { formatMessage } = (0, import_react_intl22.useIntl)();
|
|
5271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
4910
5272
|
FieldInput_default,
|
|
4911
5273
|
{
|
|
4912
5274
|
id: uid,
|
|
@@ -4917,8 +5279,8 @@ function MoneyInputRendererComponent(props) {
|
|
|
4917
5279
|
features,
|
|
4918
5280
|
control,
|
|
4919
5281
|
tags,
|
|
4920
|
-
children: /* @__PURE__ */ (0,
|
|
4921
|
-
|
|
5282
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
5283
|
+
import_components45.MoneyInput,
|
|
4922
5284
|
{
|
|
4923
5285
|
amount: parseFloatOrNull(amountValue),
|
|
4924
5286
|
searchPlaceholder: "",
|
|
@@ -4979,9 +5341,9 @@ function assertCurrencyCodeIsString(currencyCode) {
|
|
|
4979
5341
|
}
|
|
4980
5342
|
|
|
4981
5343
|
// ../renderers/src/MultiSelectInputRenderer/InlineComponent.tsx
|
|
4982
|
-
var
|
|
4983
|
-
var
|
|
4984
|
-
var
|
|
5344
|
+
var import_components46 = require("@transferwise/components");
|
|
5345
|
+
var import_react21 = require("react");
|
|
5346
|
+
var import_react_intl23 = require("react-intl");
|
|
4985
5347
|
|
|
4986
5348
|
// ../renderers/src/utils/items-with-index.ts
|
|
4987
5349
|
var zipWithIndex = (items) => items.map((item, index) => __spreadProps(__spreadValues({}, item), {
|
|
@@ -4989,7 +5351,7 @@ var zipWithIndex = (items) => items.map((item, index) => __spreadProps(__spreadV
|
|
|
4989
5351
|
}));
|
|
4990
5352
|
|
|
4991
5353
|
// ../renderers/src/MultiSelectInputRenderer/InlineComponent.tsx
|
|
4992
|
-
var
|
|
5354
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
4993
5355
|
function InlineComponent(props) {
|
|
4994
5356
|
const {
|
|
4995
5357
|
id,
|
|
@@ -5006,13 +5368,13 @@ function InlineComponent(props) {
|
|
|
5006
5368
|
onSelect
|
|
5007
5369
|
} = props;
|
|
5008
5370
|
const optionsWithIndex = zipWithIndex(options);
|
|
5009
|
-
const [query, setQuery] = (0,
|
|
5010
|
-
const { formatMessage } = (0,
|
|
5371
|
+
const [query, setQuery] = (0, import_react21.useState)("");
|
|
5372
|
+
const { formatMessage } = (0, import_react_intl23.useIntl)();
|
|
5011
5373
|
const filtered = tags == null ? void 0 : tags.includes("filtered");
|
|
5012
5374
|
const filteredOptions = query ? filterAndSortItems(optionsWithIndex, filtered ? query : "") : optionsWithIndex;
|
|
5013
|
-
return /* @__PURE__ */ (0,
|
|
5014
|
-
filtered && /* @__PURE__ */ (0,
|
|
5015
|
-
|
|
5375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
5376
|
+
filtered && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5377
|
+
import_components46.SearchInput,
|
|
5016
5378
|
{
|
|
5017
5379
|
placeholder: formatMessage(filter_messages_default.placeholder),
|
|
5018
5380
|
disabled,
|
|
@@ -5024,7 +5386,7 @@ function InlineComponent(props) {
|
|
|
5024
5386
|
}
|
|
5025
5387
|
}
|
|
5026
5388
|
),
|
|
5027
|
-
/* @__PURE__ */ (0,
|
|
5389
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5028
5390
|
FieldInput_default,
|
|
5029
5391
|
{
|
|
5030
5392
|
id,
|
|
@@ -5049,8 +5411,8 @@ function InlineComponent(props) {
|
|
|
5049
5411
|
childrenProps
|
|
5050
5412
|
} = option;
|
|
5051
5413
|
const key = (_a = childrenProps == null ? void 0 : childrenProps.uid) != null ? _a : index;
|
|
5052
|
-
return /* @__PURE__ */ (0,
|
|
5053
|
-
|
|
5414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5415
|
+
import_components46.ListItem,
|
|
5054
5416
|
{
|
|
5055
5417
|
title: itemTitle,
|
|
5056
5418
|
subtitle,
|
|
@@ -5058,10 +5420,10 @@ function InlineComponent(props) {
|
|
|
5058
5420
|
valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
|
|
5059
5421
|
media: getMedia(media, false),
|
|
5060
5422
|
prompt: getInlineAlert(inlineAlert),
|
|
5061
|
-
additionalInfo: additionalText ? /* @__PURE__ */ (0,
|
|
5423
|
+
additionalInfo: additionalText ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_components46.ListItem.AdditionalInfo, { children: additionalText }) : void 0,
|
|
5062
5424
|
disabled: disabled || optionDisabled,
|
|
5063
|
-
control: /* @__PURE__ */ (0,
|
|
5064
|
-
|
|
5425
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5426
|
+
import_components46.ListItem.Checkbox,
|
|
5065
5427
|
{
|
|
5066
5428
|
checked: selectedIndices.includes(index),
|
|
5067
5429
|
onChange: (e) => {
|
|
@@ -5080,13 +5442,13 @@ function InlineComponent(props) {
|
|
|
5080
5442
|
}
|
|
5081
5443
|
|
|
5082
5444
|
// ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
|
|
5083
|
-
var
|
|
5084
|
-
var
|
|
5085
|
-
var
|
|
5445
|
+
var import_components47 = require("@transferwise/components");
|
|
5446
|
+
var import_react22 = require("react");
|
|
5447
|
+
var import_react_intl25 = require("react-intl");
|
|
5086
5448
|
|
|
5087
5449
|
// ../renderers/src/messages/multi-select.messages.ts
|
|
5088
|
-
var
|
|
5089
|
-
var multi_select_messages_default = (0,
|
|
5450
|
+
var import_react_intl24 = require("react-intl");
|
|
5451
|
+
var multi_select_messages_default = (0, import_react_intl24.defineMessages)({
|
|
5090
5452
|
summary: {
|
|
5091
5453
|
id: "df.wise.MultiSelect.summary",
|
|
5092
5454
|
defaultMessage: "{first} and {count} more",
|
|
@@ -5095,10 +5457,10 @@ var multi_select_messages_default = (0, import_react_intl22.defineMessages)({
|
|
|
5095
5457
|
});
|
|
5096
5458
|
|
|
5097
5459
|
// ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
|
|
5098
|
-
var
|
|
5460
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
5099
5461
|
function DefaultComponent(props) {
|
|
5100
|
-
const { formatMessage } = (0,
|
|
5101
|
-
const [stagedIndices, setStagedIndices] = (0,
|
|
5462
|
+
const { formatMessage } = (0, import_react_intl25.useIntl)();
|
|
5463
|
+
const [stagedIndices, setStagedIndices] = (0, import_react22.useState)();
|
|
5102
5464
|
const {
|
|
5103
5465
|
id,
|
|
5104
5466
|
autoComplete,
|
|
@@ -5139,12 +5501,12 @@ function DefaultComponent(props) {
|
|
|
5139
5501
|
const contentProps = {
|
|
5140
5502
|
title: option.title,
|
|
5141
5503
|
description: option.description,
|
|
5142
|
-
icon: /* @__PURE__ */ (0,
|
|
5504
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
5143
5505
|
};
|
|
5144
|
-
return /* @__PURE__ */ (0,
|
|
5506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components47.SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
5145
5507
|
};
|
|
5146
5508
|
const extraProps = { autoComplete };
|
|
5147
|
-
return /* @__PURE__ */ (0,
|
|
5509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
5148
5510
|
FieldInput_default,
|
|
5149
5511
|
{
|
|
5150
5512
|
id,
|
|
@@ -5155,8 +5517,8 @@ function DefaultComponent(props) {
|
|
|
5155
5517
|
features,
|
|
5156
5518
|
control,
|
|
5157
5519
|
tags,
|
|
5158
|
-
children: /* @__PURE__ */ (0,
|
|
5159
|
-
|
|
5520
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
5521
|
+
import_components47.SelectInput,
|
|
5160
5522
|
__spreadValues({
|
|
5161
5523
|
id,
|
|
5162
5524
|
items: options.map((option, index) => {
|
|
@@ -5194,8 +5556,8 @@ function DefaultComponent(props) {
|
|
|
5194
5556
|
}
|
|
5195
5557
|
|
|
5196
5558
|
// ../renderers/src/MultiSelectInputRenderer/InlineCheckboxComponent.tsx
|
|
5197
|
-
var
|
|
5198
|
-
var
|
|
5559
|
+
var import_components48 = require("@transferwise/components");
|
|
5560
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
5199
5561
|
function InlineCheckboxComponent(props) {
|
|
5200
5562
|
const {
|
|
5201
5563
|
id,
|
|
@@ -5211,7 +5573,7 @@ function InlineCheckboxComponent(props) {
|
|
|
5211
5573
|
tags,
|
|
5212
5574
|
onSelect
|
|
5213
5575
|
} = props;
|
|
5214
|
-
return /* @__PURE__ */ (0,
|
|
5576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
5215
5577
|
FieldInput_default,
|
|
5216
5578
|
{
|
|
5217
5579
|
id,
|
|
@@ -5242,35 +5604,35 @@ function InlineCheckboxComponent(props) {
|
|
|
5242
5604
|
onSelect(newSelectedIndices);
|
|
5243
5605
|
}
|
|
5244
5606
|
};
|
|
5245
|
-
return /* @__PURE__ */ (0,
|
|
5607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components48.Checkbox, __spreadProps(__spreadValues({}, checkboxProps), { className: "m-t-1" }), key);
|
|
5246
5608
|
})
|
|
5247
5609
|
}
|
|
5248
5610
|
);
|
|
5249
5611
|
}
|
|
5250
5612
|
|
|
5251
5613
|
// ../renderers/src/MultiSelectInputRenderer/MultiSelectInputRenderer.tsx
|
|
5252
|
-
var
|
|
5614
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
5253
5615
|
var MultiSelectInputRenderer = {
|
|
5254
5616
|
canRenderType: "input-multi-select",
|
|
5255
5617
|
render: (props) => {
|
|
5256
5618
|
switch (props.control) {
|
|
5257
5619
|
case "inline":
|
|
5258
|
-
return /* @__PURE__ */ (0,
|
|
5620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(InlineComponent, __spreadValues({}, props));
|
|
5259
5621
|
case "inline-checkbox-group":
|
|
5260
|
-
return /* @__PURE__ */ (0,
|
|
5622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(InlineCheckboxComponent, __spreadValues({}, props));
|
|
5261
5623
|
default:
|
|
5262
|
-
return /* @__PURE__ */ (0,
|
|
5624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(DefaultComponent, __spreadValues({}, props));
|
|
5263
5625
|
}
|
|
5264
5626
|
}
|
|
5265
5627
|
};
|
|
5266
5628
|
|
|
5267
5629
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
5268
|
-
var
|
|
5630
|
+
var import_components50 = require("@transferwise/components");
|
|
5269
5631
|
|
|
5270
5632
|
// ../renderers/src/components/UploadFieldInput.tsx
|
|
5271
|
-
var
|
|
5272
|
-
var
|
|
5273
|
-
var
|
|
5633
|
+
var import_components49 = require("@transferwise/components");
|
|
5634
|
+
var import_classnames25 = __toESM(require_classnames());
|
|
5635
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
5274
5636
|
function UploadFieldInput({
|
|
5275
5637
|
id,
|
|
5276
5638
|
children,
|
|
@@ -5282,14 +5644,14 @@ function UploadFieldInput({
|
|
|
5282
5644
|
control,
|
|
5283
5645
|
tags
|
|
5284
5646
|
}) {
|
|
5285
|
-
const labelContent = label && help ? /* @__PURE__ */ (0,
|
|
5647
|
+
const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(LabelContentWithHelp, { text: label, help }) : label;
|
|
5286
5648
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
5287
5649
|
const { ref } = useScrollToError(validation, features);
|
|
5288
|
-
return /* @__PURE__ */ (0,
|
|
5650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
5289
5651
|
"div",
|
|
5290
5652
|
{
|
|
5291
5653
|
ref,
|
|
5292
|
-
className: (0,
|
|
5654
|
+
className: (0, import_classnames25.default)(
|
|
5293
5655
|
"form-group d-block",
|
|
5294
5656
|
{
|
|
5295
5657
|
"has-error": (validation == null ? void 0 : validation.status) === "invalid"
|
|
@@ -5297,9 +5659,9 @@ function UploadFieldInput({
|
|
|
5297
5659
|
controlAndTagsToCSSClass({ control, tags })
|
|
5298
5660
|
),
|
|
5299
5661
|
children: [
|
|
5300
|
-
/* @__PURE__ */ (0,
|
|
5662
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
|
|
5301
5663
|
children,
|
|
5302
|
-
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0,
|
|
5664
|
+
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components49.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
|
|
5303
5665
|
]
|
|
5304
5666
|
}
|
|
5305
5667
|
);
|
|
@@ -5334,7 +5696,7 @@ var getSizeLimit = (maxSize) => {
|
|
|
5334
5696
|
};
|
|
5335
5697
|
|
|
5336
5698
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
5337
|
-
var
|
|
5699
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
5338
5700
|
var MultiUploadInputRenderer = {
|
|
5339
5701
|
canRenderType: "input-upload-multi",
|
|
5340
5702
|
render: (props) => {
|
|
@@ -5362,7 +5724,7 @@ var MultiUploadInputRenderer = {
|
|
|
5362
5724
|
};
|
|
5363
5725
|
const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
|
|
5364
5726
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
5365
|
-
return /* @__PURE__ */ (0,
|
|
5727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
5366
5728
|
UploadFieldInput_default,
|
|
5367
5729
|
{
|
|
5368
5730
|
id,
|
|
@@ -5373,8 +5735,8 @@ var MultiUploadInputRenderer = {
|
|
|
5373
5735
|
features,
|
|
5374
5736
|
control,
|
|
5375
5737
|
tags,
|
|
5376
|
-
children: /* @__PURE__ */ (0,
|
|
5377
|
-
|
|
5738
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
5739
|
+
import_components50.UploadInput,
|
|
5378
5740
|
{
|
|
5379
5741
|
id,
|
|
5380
5742
|
"aria-describedby": descriptionId,
|
|
@@ -5383,7 +5745,7 @@ var MultiUploadInputRenderer = {
|
|
|
5383
5745
|
files: value.map(({ id: fileId, file, validationState: fileValidationState }) => ({
|
|
5384
5746
|
id: fileId,
|
|
5385
5747
|
filename: file.name,
|
|
5386
|
-
status: (fileValidationState == null ? void 0 : fileValidationState.status) === "invalid" ?
|
|
5748
|
+
status: (fileValidationState == null ? void 0 : fileValidationState.status) === "invalid" ? import_components50.Status.FAILED : import_components50.Status.SUCCEEDED
|
|
5387
5749
|
})),
|
|
5388
5750
|
fileTypes: acceptsToFileTypes(accepts),
|
|
5389
5751
|
maxFiles: maxItems,
|
|
@@ -5401,8 +5763,8 @@ var MultiUploadInputRenderer = {
|
|
|
5401
5763
|
var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
|
|
5402
5764
|
|
|
5403
5765
|
// ../renderers/src/NumberInputRenderer.tsx
|
|
5404
|
-
var
|
|
5405
|
-
var
|
|
5766
|
+
var import_components51 = require("@transferwise/components");
|
|
5767
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
5406
5768
|
var NumberInputRenderer = {
|
|
5407
5769
|
canRenderType: "input-number",
|
|
5408
5770
|
render: (props) => {
|
|
@@ -5416,7 +5778,7 @@ var NumberInputRenderer = {
|
|
|
5416
5778
|
"maximum",
|
|
5417
5779
|
"minimum"
|
|
5418
5780
|
);
|
|
5419
|
-
return /* @__PURE__ */ (0,
|
|
5781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
5420
5782
|
FieldInput_default,
|
|
5421
5783
|
{
|
|
5422
5784
|
id,
|
|
@@ -5429,8 +5791,8 @@ var NumberInputRenderer = {
|
|
|
5429
5791
|
features: props.features,
|
|
5430
5792
|
control: props.control,
|
|
5431
5793
|
tags: props.tags,
|
|
5432
|
-
children: /* @__PURE__ */ (0,
|
|
5433
|
-
|
|
5794
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components51.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
5795
|
+
import_components51.Input,
|
|
5434
5796
|
__spreadValues({
|
|
5435
5797
|
id,
|
|
5436
5798
|
name: id,
|
|
@@ -5450,22 +5812,22 @@ var NumberInputRenderer = {
|
|
|
5450
5812
|
var NumberInputRenderer_default = NumberInputRenderer;
|
|
5451
5813
|
|
|
5452
5814
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
5453
|
-
var
|
|
5454
|
-
var
|
|
5455
|
-
var
|
|
5815
|
+
var import_components53 = require("@transferwise/components");
|
|
5816
|
+
var import_classnames26 = __toESM(require_classnames());
|
|
5817
|
+
var import_react_intl27 = require("react-intl");
|
|
5456
5818
|
|
|
5457
5819
|
// ../renderers/src/hooks/useSnackBarIfAvailable.ts
|
|
5458
|
-
var
|
|
5459
|
-
var
|
|
5820
|
+
var import_components52 = require("@transferwise/components");
|
|
5821
|
+
var import_react23 = require("react");
|
|
5460
5822
|
function useSnackBarIfAvailable() {
|
|
5461
|
-
const context = (0,
|
|
5823
|
+
const context = (0, import_react23.useContext)(import_components52.SnackbarContext);
|
|
5462
5824
|
return context ? context.createSnackbar : () => {
|
|
5463
5825
|
};
|
|
5464
5826
|
}
|
|
5465
5827
|
|
|
5466
5828
|
// ../renderers/src/messages/paragraph.messages.ts
|
|
5467
|
-
var
|
|
5468
|
-
var paragraph_messages_default = (0,
|
|
5829
|
+
var import_react_intl26 = require("react-intl");
|
|
5830
|
+
var paragraph_messages_default = (0, import_react_intl26.defineMessages)({
|
|
5469
5831
|
copy: {
|
|
5470
5832
|
id: "df.wise.DynamicParagraph.copy",
|
|
5471
5833
|
defaultMessage: "Copy",
|
|
@@ -5479,18 +5841,18 @@ var paragraph_messages_default = (0, import_react_intl24.defineMessages)({
|
|
|
5479
5841
|
});
|
|
5480
5842
|
|
|
5481
5843
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
5482
|
-
var
|
|
5844
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
5483
5845
|
var ParagraphRenderer = {
|
|
5484
5846
|
canRenderType: "paragraph",
|
|
5485
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
5847
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Paragraph, __spreadValues({}, props))
|
|
5486
5848
|
};
|
|
5487
5849
|
function Paragraph(props) {
|
|
5488
5850
|
const { align, control, margin, size, text } = props;
|
|
5489
|
-
const className = (0,
|
|
5851
|
+
const className = (0, import_classnames26.default)(
|
|
5490
5852
|
getTextAlignmentAndMargin({ align, margin }),
|
|
5491
5853
|
controlAndTagsToCSSClass(props)
|
|
5492
5854
|
);
|
|
5493
|
-
return control === "copyable" ? /* @__PURE__ */ (0,
|
|
5855
|
+
return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
5494
5856
|
"p",
|
|
5495
5857
|
{
|
|
5496
5858
|
className: `${["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large"} ${className}`,
|
|
@@ -5503,41 +5865,41 @@ function CopyableParagraph({
|
|
|
5503
5865
|
align,
|
|
5504
5866
|
className
|
|
5505
5867
|
}) {
|
|
5506
|
-
const { formatMessage } = (0,
|
|
5868
|
+
const { formatMessage } = (0, import_react_intl27.useIntl)();
|
|
5507
5869
|
const createSnackbar = useSnackBarIfAvailable();
|
|
5508
5870
|
const copy = () => {
|
|
5509
5871
|
navigator.clipboard.writeText(text).then(() => createSnackbar({ text: formatMessage(paragraph_messages_default.copied) })).catch(() => {
|
|
5510
5872
|
});
|
|
5511
5873
|
};
|
|
5512
5874
|
const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
|
|
5513
|
-
return /* @__PURE__ */ (0,
|
|
5514
|
-
/* @__PURE__ */ (0,
|
|
5515
|
-
|
|
5875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className, children: [
|
|
5876
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
5877
|
+
import_components53.Input,
|
|
5516
5878
|
{
|
|
5517
5879
|
type: "text",
|
|
5518
5880
|
value: text,
|
|
5519
5881
|
readOnly: true,
|
|
5520
|
-
className: (0,
|
|
5882
|
+
className: (0, import_classnames26.default)("text-ellipsis", inputAlignmentClasses)
|
|
5521
5883
|
}
|
|
5522
5884
|
),
|
|
5523
|
-
/* @__PURE__ */ (0,
|
|
5885
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components53.Button, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
|
|
5524
5886
|
] });
|
|
5525
5887
|
}
|
|
5526
5888
|
var ParagraphRenderer_default = ParagraphRenderer;
|
|
5527
5889
|
|
|
5528
5890
|
// ../renderers/src/ProgressRenderer.tsx
|
|
5529
|
-
var
|
|
5530
|
-
var
|
|
5531
|
-
var
|
|
5891
|
+
var import_components54 = require("@transferwise/components");
|
|
5892
|
+
var import_classnames27 = __toESM(require_classnames());
|
|
5893
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
5532
5894
|
var ProgressRenderer = {
|
|
5533
5895
|
canRenderType: "progress",
|
|
5534
5896
|
render: ({ uid, title, help, progress, progressText, margin, description, control, tags }) => {
|
|
5535
|
-
return /* @__PURE__ */ (0,
|
|
5536
|
-
|
|
5897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
5898
|
+
import_components54.ProgressBar,
|
|
5537
5899
|
{
|
|
5538
5900
|
id: uid,
|
|
5539
|
-
className: (0,
|
|
5540
|
-
title: title && help ? /* @__PURE__ */ (0,
|
|
5901
|
+
className: (0, import_classnames27.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
|
|
5902
|
+
title: title && help ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(LabelContentWithHelp, { text: title, help }) : title,
|
|
5541
5903
|
description,
|
|
5542
5904
|
progress: {
|
|
5543
5905
|
max: 1,
|
|
@@ -5550,15 +5912,15 @@ var ProgressRenderer = {
|
|
|
5550
5912
|
};
|
|
5551
5913
|
|
|
5552
5914
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
5553
|
-
var
|
|
5554
|
-
var
|
|
5555
|
-
var
|
|
5556
|
-
var
|
|
5557
|
-
var
|
|
5915
|
+
var import_components55 = require("@transferwise/components");
|
|
5916
|
+
var import_icons3 = require("@transferwise/icons");
|
|
5917
|
+
var import_classnames28 = __toESM(require_classnames());
|
|
5918
|
+
var import_react24 = require("react");
|
|
5919
|
+
var import_react_intl29 = require("react-intl");
|
|
5558
5920
|
|
|
5559
5921
|
// ../renderers/src/messages/repeatable.messages.ts
|
|
5560
|
-
var
|
|
5561
|
-
var repeatable_messages_default = (0,
|
|
5922
|
+
var import_react_intl28 = require("react-intl");
|
|
5923
|
+
var repeatable_messages_default = (0, import_react_intl28.defineMessages)({
|
|
5562
5924
|
addItemTitle: {
|
|
5563
5925
|
id: "df.wise.ArraySchema.addItemTitle",
|
|
5564
5926
|
defaultMessage: "Add Item",
|
|
@@ -5582,10 +5944,10 @@ var repeatable_messages_default = (0, import_react_intl26.defineMessages)({
|
|
|
5582
5944
|
});
|
|
5583
5945
|
|
|
5584
5946
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
5585
|
-
var
|
|
5947
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
5586
5948
|
var RepeatableRenderer = {
|
|
5587
5949
|
canRenderType: "repeatable",
|
|
5588
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
5950
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Repeatable, __spreadValues({}, props))
|
|
5589
5951
|
};
|
|
5590
5952
|
function Repeatable(props) {
|
|
5591
5953
|
const {
|
|
@@ -5602,8 +5964,8 @@ function Repeatable(props) {
|
|
|
5602
5964
|
onSave,
|
|
5603
5965
|
onRemove
|
|
5604
5966
|
} = props;
|
|
5605
|
-
const { formatMessage } = (0,
|
|
5606
|
-
const [openModalType, setOpenModalType] = (0,
|
|
5967
|
+
const { formatMessage } = (0, import_react_intl29.useIntl)();
|
|
5968
|
+
const [openModalType, setOpenModalType] = (0, import_react24.useState)(null);
|
|
5607
5969
|
const { ref } = useScrollToError(validationState, features);
|
|
5608
5970
|
const onAddItem = () => {
|
|
5609
5971
|
onAdd();
|
|
@@ -5626,43 +5988,43 @@ function Repeatable(props) {
|
|
|
5626
5988
|
const onCancelEdit = () => {
|
|
5627
5989
|
setOpenModalType(null);
|
|
5628
5990
|
};
|
|
5629
|
-
return /* @__PURE__ */ (0,
|
|
5630
|
-
/* @__PURE__ */ (0,
|
|
5631
|
-
title && /* @__PURE__ */ (0,
|
|
5632
|
-
description && /* @__PURE__ */ (0,
|
|
5633
|
-
/* @__PURE__ */ (0,
|
|
5991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
|
|
5992
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { ref, className: controlAndTagsToCSSClass(props), children: [
|
|
5993
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components55.Header, { title }),
|
|
5994
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { children: description }),
|
|
5995
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
5634
5996
|
"div",
|
|
5635
5997
|
{
|
|
5636
|
-
className: (0,
|
|
5998
|
+
className: (0, import_classnames28.default)("form-group", {
|
|
5637
5999
|
"has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
|
|
5638
6000
|
}),
|
|
5639
6001
|
children: [
|
|
5640
|
-
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0,
|
|
5641
|
-
/* @__PURE__ */ (0,
|
|
5642
|
-
|
|
6002
|
+
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
|
|
6003
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
6004
|
+
import_components55.NavigationOption,
|
|
5643
6005
|
{
|
|
5644
|
-
media: /* @__PURE__ */ (0,
|
|
6006
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_icons3.Plus, {}),
|
|
5645
6007
|
title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
|
|
5646
6008
|
showMediaAtAllSizes: true,
|
|
5647
6009
|
onClick: () => onAddItem()
|
|
5648
6010
|
}
|
|
5649
6011
|
),
|
|
5650
|
-
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0,
|
|
6012
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components55.InlineAlert, { type: "negative", children: validationState.message })
|
|
5651
6013
|
]
|
|
5652
6014
|
}
|
|
5653
6015
|
)
|
|
5654
6016
|
] }),
|
|
5655
|
-
/* @__PURE__ */ (0,
|
|
5656
|
-
|
|
6017
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
6018
|
+
import_components55.Modal,
|
|
5657
6019
|
{
|
|
5658
6020
|
open: openModalType !== null,
|
|
5659
6021
|
title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
|
|
5660
|
-
body: /* @__PURE__ */ (0,
|
|
5661
|
-
/* @__PURE__ */ (0,
|
|
5662
|
-
/* @__PURE__ */ (0,
|
|
5663
|
-
/* @__PURE__ */ (0,
|
|
5664
|
-
/* @__PURE__ */ (0,
|
|
5665
|
-
|
|
6022
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
|
|
6023
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "m-b-2", children: editableItem }),
|
|
6024
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { children: [
|
|
6025
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components55.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
|
|
6026
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
6027
|
+
import_components55.Button,
|
|
5666
6028
|
{
|
|
5667
6029
|
v2: true,
|
|
5668
6030
|
priority: "secondary",
|
|
@@ -5683,10 +6045,10 @@ function ItemSummaryOption({
|
|
|
5683
6045
|
item,
|
|
5684
6046
|
onClick
|
|
5685
6047
|
}) {
|
|
5686
|
-
return /* @__PURE__ */ (0,
|
|
5687
|
-
|
|
6048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
6049
|
+
import_components55.NavigationOption,
|
|
5688
6050
|
{
|
|
5689
|
-
media: /* @__PURE__ */ (0,
|
|
6051
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(OptionMedia, { media: item.media, preferAvatar: false }),
|
|
5690
6052
|
title: item.title,
|
|
5691
6053
|
content: item.description,
|
|
5692
6054
|
showMediaAtAllSizes: true,
|
|
@@ -5698,17 +6060,17 @@ function ItemSummaryOption({
|
|
|
5698
6060
|
var RepeatableRenderer_default = RepeatableRenderer;
|
|
5699
6061
|
|
|
5700
6062
|
// ../renderers/src/ReviewLegacyRenderer.tsx
|
|
5701
|
-
var
|
|
5702
|
-
var
|
|
5703
|
-
var
|
|
6063
|
+
var import_components56 = require("@transferwise/components");
|
|
6064
|
+
var import_classnames29 = __toESM(require_classnames());
|
|
6065
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
5704
6066
|
var ReviewRenderer = {
|
|
5705
6067
|
canRenderType: "review",
|
|
5706
6068
|
render: ({ callToAction, control, fields, margin, title, trackEvent, tags }) => {
|
|
5707
6069
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
5708
|
-
return /* @__PURE__ */ (0,
|
|
5709
|
-
/* @__PURE__ */ (0,
|
|
5710
|
-
/* @__PURE__ */ (0,
|
|
5711
|
-
|
|
6070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: (0, import_classnames29.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
6071
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Header, { title, callToAction }),
|
|
6072
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
6073
|
+
import_components56.DefinitionList,
|
|
5712
6074
|
{
|
|
5713
6075
|
layout: orientation,
|
|
5714
6076
|
definitions: fields.map(
|
|
@@ -5745,21 +6107,21 @@ var mapControlToDefinitionListLayout = (control) => {
|
|
|
5745
6107
|
};
|
|
5746
6108
|
var getFieldLabel = (label, help, onClick) => {
|
|
5747
6109
|
if (help) {
|
|
5748
|
-
return /* @__PURE__ */ (0,
|
|
6110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
|
|
5749
6111
|
label,
|
|
5750
6112
|
" ",
|
|
5751
|
-
/* @__PURE__ */ (0,
|
|
6113
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Help_default, { help, onClick })
|
|
5752
6114
|
] });
|
|
5753
6115
|
}
|
|
5754
6116
|
return label;
|
|
5755
6117
|
};
|
|
5756
6118
|
|
|
5757
6119
|
// ../renderers/src/ReviewRenderer.tsx
|
|
5758
|
-
var
|
|
5759
|
-
var
|
|
5760
|
-
var
|
|
5761
|
-
var
|
|
5762
|
-
var
|
|
6120
|
+
var import_components57 = require("@transferwise/components");
|
|
6121
|
+
var import_icons4 = require("@transferwise/icons");
|
|
6122
|
+
var import_classnames30 = __toESM(require_classnames());
|
|
6123
|
+
var import_react_intl30 = require("react-intl");
|
|
6124
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
5763
6125
|
var IGNORED_CONTROLS = [
|
|
5764
6126
|
"horizontal",
|
|
5765
6127
|
"horizontal-end-aligned",
|
|
@@ -5769,7 +6131,7 @@ var IGNORED_CONTROLS = [
|
|
|
5769
6131
|
var ReviewRenderer2 = {
|
|
5770
6132
|
canRenderType: "review",
|
|
5771
6133
|
canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
|
|
5772
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
6134
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Review, __spreadValues({}, props))
|
|
5773
6135
|
};
|
|
5774
6136
|
var Review = ({
|
|
5775
6137
|
callToAction,
|
|
@@ -5780,9 +6142,9 @@ var Review = ({
|
|
|
5780
6142
|
title,
|
|
5781
6143
|
trackEvent
|
|
5782
6144
|
}) => {
|
|
5783
|
-
const intl = (0,
|
|
5784
|
-
return /* @__PURE__ */ (0,
|
|
5785
|
-
/* @__PURE__ */ (0,
|
|
6145
|
+
const intl = (0, import_react_intl30.useIntl)();
|
|
6146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: (0, import_classnames30.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
6147
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Header, { title, callToAction }),
|
|
5786
6148
|
fields.map((field) => {
|
|
5787
6149
|
var _a, _b, _c;
|
|
5788
6150
|
const {
|
|
@@ -5800,8 +6162,8 @@ var Review = ({
|
|
|
5800
6162
|
ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
|
|
5801
6163
|
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
5802
6164
|
};
|
|
5803
|
-
return /* @__PURE__ */ (0,
|
|
5804
|
-
|
|
6165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6166
|
+
import_components57.ListItem,
|
|
5805
6167
|
{
|
|
5806
6168
|
title: value,
|
|
5807
6169
|
subtitle: label,
|
|
@@ -5821,18 +6183,18 @@ var Review = ({
|
|
|
5821
6183
|
] });
|
|
5822
6184
|
};
|
|
5823
6185
|
var getHelpControl = (help, ariaLabel, onClick) => {
|
|
5824
|
-
return /* @__PURE__ */ (0,
|
|
6186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components57.Popover, { content: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components57.Markdown, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components57.ListItem.IconButton, { partiallyInteractive: true, "aria-label": ariaLabel, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_icons4.QuestionMarkCircle, {}) }) });
|
|
5825
6187
|
};
|
|
5826
6188
|
var ReviewRenderer_default = ReviewRenderer2;
|
|
5827
6189
|
|
|
5828
6190
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
5829
|
-
var
|
|
5830
|
-
var
|
|
5831
|
-
var
|
|
6191
|
+
var import_components59 = require("@transferwise/components");
|
|
6192
|
+
var import_react25 = require("react");
|
|
6193
|
+
var import_react_intl33 = require("react-intl");
|
|
5832
6194
|
|
|
5833
6195
|
// ../renderers/src/messages/search.messages.ts
|
|
5834
|
-
var
|
|
5835
|
-
var search_messages_default = (0,
|
|
6196
|
+
var import_react_intl31 = require("react-intl");
|
|
6197
|
+
var search_messages_default = (0, import_react_intl31.defineMessages)({
|
|
5836
6198
|
loading: {
|
|
5837
6199
|
id: "df.wise.SearchLayout.loading",
|
|
5838
6200
|
defaultMessage: "Loading...",
|
|
@@ -5841,21 +6203,21 @@ var search_messages_default = (0, import_react_intl29.defineMessages)({
|
|
|
5841
6203
|
});
|
|
5842
6204
|
|
|
5843
6205
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
5844
|
-
var
|
|
5845
|
-
var
|
|
5846
|
-
var
|
|
6206
|
+
var import_react_intl32 = require("react-intl");
|
|
6207
|
+
var import_components58 = require("@transferwise/components");
|
|
6208
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
5847
6209
|
function ErrorResult({ state }) {
|
|
5848
|
-
const intl = (0,
|
|
5849
|
-
return /* @__PURE__ */ (0,
|
|
6210
|
+
const intl = (0, import_react_intl32.useIntl)();
|
|
6211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("p", { className: "m-t-2", children: [
|
|
5850
6212
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
5851
6213
|
"\xA0",
|
|
5852
|
-
/* @__PURE__ */ (0,
|
|
6214
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_components58.Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
|
|
5853
6215
|
] });
|
|
5854
6216
|
}
|
|
5855
6217
|
|
|
5856
6218
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
5857
|
-
var
|
|
5858
|
-
var
|
|
6219
|
+
var import_icons5 = require("@transferwise/icons");
|
|
6220
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
5859
6221
|
function BlockSearchRendererComponent({
|
|
5860
6222
|
id,
|
|
5861
6223
|
hint,
|
|
@@ -5870,10 +6232,10 @@ function BlockSearchRendererComponent({
|
|
|
5870
6232
|
trackEvent,
|
|
5871
6233
|
onChange
|
|
5872
6234
|
}) {
|
|
5873
|
-
const [hasSearched, setHasSearched] = (0,
|
|
5874
|
-
const { formatMessage } = (0,
|
|
5875
|
-
return /* @__PURE__ */ (0,
|
|
5876
|
-
/* @__PURE__ */ (0,
|
|
6235
|
+
const [hasSearched, setHasSearched] = (0, import_react25.useState)(false);
|
|
6236
|
+
const { formatMessage } = (0, import_react_intl33.useIntl)();
|
|
6237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: getMargin(margin), children: [
|
|
6238
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5877
6239
|
FieldInput_default,
|
|
5878
6240
|
{
|
|
5879
6241
|
id,
|
|
@@ -5884,8 +6246,8 @@ function BlockSearchRendererComponent({
|
|
|
5884
6246
|
features,
|
|
5885
6247
|
control,
|
|
5886
6248
|
tags,
|
|
5887
|
-
children: /* @__PURE__ */ (0,
|
|
5888
|
-
|
|
6249
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_components59.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_icons5.Search, { size: 24 }) }, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6250
|
+
import_components59.Input,
|
|
5889
6251
|
{
|
|
5890
6252
|
id,
|
|
5891
6253
|
name: id,
|
|
@@ -5904,7 +6266,7 @@ function BlockSearchRendererComponent({
|
|
|
5904
6266
|
) })
|
|
5905
6267
|
}
|
|
5906
6268
|
),
|
|
5907
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
6269
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(SearchResultContent, { state, trackEvent })
|
|
5908
6270
|
] });
|
|
5909
6271
|
}
|
|
5910
6272
|
function SearchResultContent({
|
|
@@ -5913,39 +6275,39 @@ function SearchResultContent({
|
|
|
5913
6275
|
}) {
|
|
5914
6276
|
switch (state.type) {
|
|
5915
6277
|
case "error":
|
|
5916
|
-
return /* @__PURE__ */ (0,
|
|
6278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ErrorResult, { state });
|
|
5917
6279
|
case "results":
|
|
5918
|
-
return /* @__PURE__ */ (0,
|
|
6280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(SearchResults, { state, trackEvent });
|
|
5919
6281
|
case "layout":
|
|
5920
|
-
return /* @__PURE__ */ (0,
|
|
6282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
|
|
5921
6283
|
" ",
|
|
5922
6284
|
state.layout,
|
|
5923
6285
|
" "
|
|
5924
6286
|
] });
|
|
5925
6287
|
case "noResults":
|
|
5926
|
-
return /* @__PURE__ */ (0,
|
|
6288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(EmptySearchResult, { state });
|
|
5927
6289
|
case "pending":
|
|
5928
6290
|
default:
|
|
5929
6291
|
return null;
|
|
5930
6292
|
}
|
|
5931
6293
|
}
|
|
5932
6294
|
function EmptySearchResult({ state }) {
|
|
5933
|
-
return /* @__PURE__ */ (0,
|
|
6295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_components59.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
5934
6296
|
}
|
|
5935
6297
|
function SearchResults({
|
|
5936
6298
|
state,
|
|
5937
6299
|
trackEvent
|
|
5938
6300
|
}) {
|
|
5939
|
-
return /* @__PURE__ */ (0,
|
|
6301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_components59.List, { children: state.results.map((result) => {
|
|
5940
6302
|
const { media } = result;
|
|
5941
|
-
return /* @__PURE__ */ (0,
|
|
5942
|
-
|
|
6303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6304
|
+
import_components59.ListItem,
|
|
5943
6305
|
{
|
|
5944
6306
|
title: result.title,
|
|
5945
6307
|
subtitle: result.description,
|
|
5946
|
-
media: media ? /* @__PURE__ */ (0,
|
|
5947
|
-
control: /* @__PURE__ */ (0,
|
|
5948
|
-
|
|
6308
|
+
media: media ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(OptionMedia, { media, preferAvatar: false }) : void 0,
|
|
6309
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6310
|
+
import_components59.ListItem.Navigation,
|
|
5949
6311
|
{
|
|
5950
6312
|
onClick: () => {
|
|
5951
6313
|
trackEvent("Search Result Selected", __spreadValues({
|
|
@@ -5961,13 +6323,13 @@ function SearchResults({
|
|
|
5961
6323
|
}) });
|
|
5962
6324
|
}
|
|
5963
6325
|
var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
|
|
5964
|
-
|
|
5965
|
-
// ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
|
|
5966
|
-
var
|
|
5967
|
-
var
|
|
5968
|
-
var
|
|
5969
|
-
var
|
|
5970
|
-
var
|
|
6326
|
+
|
|
6327
|
+
// ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
|
|
6328
|
+
var import_components60 = require("@transferwise/components");
|
|
6329
|
+
var import_icons6 = require("@transferwise/icons");
|
|
6330
|
+
var import_react26 = require("react");
|
|
6331
|
+
var import_react_intl34 = require("react-intl");
|
|
6332
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
5971
6333
|
function InlineSearchRenderer({
|
|
5972
6334
|
id,
|
|
5973
6335
|
hint,
|
|
@@ -5981,9 +6343,9 @@ function InlineSearchRenderer({
|
|
|
5981
6343
|
onChange,
|
|
5982
6344
|
trackEvent
|
|
5983
6345
|
}) {
|
|
5984
|
-
const [hasSearched, setHasSearched] = (0,
|
|
5985
|
-
const intl = (0,
|
|
5986
|
-
return /* @__PURE__ */ (0,
|
|
6346
|
+
const [hasSearched, setHasSearched] = (0, import_react26.useState)(false);
|
|
6347
|
+
const intl = (0, import_react_intl34.useIntl)();
|
|
6348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
5987
6349
|
FieldInput_default,
|
|
5988
6350
|
{
|
|
5989
6351
|
id,
|
|
@@ -5994,8 +6356,8 @@ function InlineSearchRenderer({
|
|
|
5994
6356
|
features,
|
|
5995
6357
|
control,
|
|
5996
6358
|
tags,
|
|
5997
|
-
children: /* @__PURE__ */ (0,
|
|
5998
|
-
|
|
6359
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6360
|
+
import_components60.Typeahead,
|
|
5999
6361
|
{
|
|
6000
6362
|
id: "typeahead-input-id",
|
|
6001
6363
|
intl,
|
|
@@ -6003,10 +6365,10 @@ function InlineSearchRenderer({
|
|
|
6003
6365
|
size: "md",
|
|
6004
6366
|
placeholder: hint,
|
|
6005
6367
|
maxHeight: 100,
|
|
6006
|
-
footer: /* @__PURE__ */ (0,
|
|
6368
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(TypeaheadFooter, { state, isLoading }),
|
|
6007
6369
|
multiple: false,
|
|
6008
6370
|
clearable: false,
|
|
6009
|
-
addon: /* @__PURE__ */ (0,
|
|
6371
|
+
addon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_icons6.Search, { size: 24 }),
|
|
6010
6372
|
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
6011
6373
|
minQueryLength: 1,
|
|
6012
6374
|
onChange: (values) => {
|
|
@@ -6043,34 +6405,34 @@ function mapResultToTypeaheadOption(result) {
|
|
|
6043
6405
|
};
|
|
6044
6406
|
}
|
|
6045
6407
|
function TypeaheadFooter({ state, isLoading }) {
|
|
6046
|
-
const { formatMessage } = (0,
|
|
6408
|
+
const { formatMessage } = (0, import_react_intl34.useIntl)();
|
|
6047
6409
|
if (state.type === "layout") {
|
|
6048
|
-
return /* @__PURE__ */ (0,
|
|
6410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "m-x-1 m-y-1", children: state.layout });
|
|
6049
6411
|
}
|
|
6050
6412
|
if (state.type === "noResults") {
|
|
6051
|
-
return /* @__PURE__ */ (0,
|
|
6413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_components60.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
6052
6414
|
}
|
|
6053
6415
|
if (state.type === "error") {
|
|
6054
|
-
return /* @__PURE__ */ (0,
|
|
6416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ErrorResult, { state }) });
|
|
6055
6417
|
}
|
|
6056
6418
|
if (state.type === "pending" || isLoading) {
|
|
6057
|
-
return /* @__PURE__ */ (0,
|
|
6419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
|
|
6058
6420
|
}
|
|
6059
6421
|
return null;
|
|
6060
6422
|
}
|
|
6061
6423
|
var InlineSearchRendererComponent_default = InlineSearchRenderer;
|
|
6062
6424
|
|
|
6063
6425
|
// ../renderers/src/SearchRenderer/SearchRenderer.tsx
|
|
6064
|
-
var
|
|
6426
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
6065
6427
|
var SearchRenderer = {
|
|
6066
6428
|
canRenderType: "search",
|
|
6067
|
-
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0,
|
|
6429
|
+
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
|
|
6068
6430
|
};
|
|
6069
6431
|
var SearchRenderer_default = SearchRenderer;
|
|
6070
6432
|
|
|
6071
6433
|
// ../renderers/src/SectionRenderer.tsx
|
|
6072
|
-
var
|
|
6073
|
-
var
|
|
6434
|
+
var import_components61 = require("@transferwise/components");
|
|
6435
|
+
var import_classnames31 = __toESM(require_classnames());
|
|
6074
6436
|
|
|
6075
6437
|
// ../renderers/src/utils/getHeaderAction.tsx
|
|
6076
6438
|
var getHeaderAction2 = (callToAction) => {
|
|
@@ -6094,16 +6456,16 @@ var getHeaderAction2 = (callToAction) => {
|
|
|
6094
6456
|
};
|
|
6095
6457
|
|
|
6096
6458
|
// ../renderers/src/SectionRenderer.tsx
|
|
6097
|
-
var
|
|
6459
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
6098
6460
|
var SectionRenderer = {
|
|
6099
6461
|
canRenderType: "section",
|
|
6100
6462
|
render: ({ children, callToAction, margin, title, control, tags }) => {
|
|
6101
|
-
return /* @__PURE__ */ (0,
|
|
6463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
6102
6464
|
"section",
|
|
6103
6465
|
{
|
|
6104
|
-
className: (0,
|
|
6466
|
+
className: (0, import_classnames31.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
|
|
6105
6467
|
children: [
|
|
6106
|
-
(title || callToAction) && /* @__PURE__ */ (0,
|
|
6468
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_components61.Header, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
|
|
6107
6469
|
children
|
|
6108
6470
|
]
|
|
6109
6471
|
}
|
|
@@ -6113,8 +6475,8 @@ var SectionRenderer = {
|
|
|
6113
6475
|
var SectionRenderer_default = SectionRenderer;
|
|
6114
6476
|
|
|
6115
6477
|
// ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
6116
|
-
var
|
|
6117
|
-
var
|
|
6478
|
+
var import_components62 = require("@transferwise/components");
|
|
6479
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
6118
6480
|
function RadioInputRendererComponent(props) {
|
|
6119
6481
|
const {
|
|
6120
6482
|
id,
|
|
@@ -6131,8 +6493,8 @@ function RadioInputRendererComponent(props) {
|
|
|
6131
6493
|
tags,
|
|
6132
6494
|
onSelect
|
|
6133
6495
|
} = props;
|
|
6134
|
-
return /* @__PURE__ */ (0,
|
|
6135
|
-
/* @__PURE__ */ (0,
|
|
6496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_jsx_runtime90.Fragment, { children: [
|
|
6497
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
6136
6498
|
FieldInput_default,
|
|
6137
6499
|
{
|
|
6138
6500
|
id,
|
|
@@ -6143,8 +6505,8 @@ function RadioInputRendererComponent(props) {
|
|
|
6143
6505
|
features,
|
|
6144
6506
|
control,
|
|
6145
6507
|
tags,
|
|
6146
|
-
children: /* @__PURE__ */ (0,
|
|
6147
|
-
|
|
6508
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
6509
|
+
import_components62.RadioGroup,
|
|
6148
6510
|
{
|
|
6149
6511
|
name: id,
|
|
6150
6512
|
radios: options.map((option, index) => ({
|
|
@@ -6152,7 +6514,7 @@ function RadioInputRendererComponent(props) {
|
|
|
6152
6514
|
value: index,
|
|
6153
6515
|
secondary: option.description,
|
|
6154
6516
|
disabled: option.disabled || disabled,
|
|
6155
|
-
avatar: /* @__PURE__ */ (0,
|
|
6517
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
6156
6518
|
})),
|
|
6157
6519
|
selectedValue: selectedIndex != null ? selectedIndex : void 0,
|
|
6158
6520
|
onChange: onSelect
|
|
@@ -6166,9 +6528,9 @@ function RadioInputRendererComponent(props) {
|
|
|
6166
6528
|
}
|
|
6167
6529
|
|
|
6168
6530
|
// ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
6169
|
-
var
|
|
6170
|
-
var
|
|
6171
|
-
var
|
|
6531
|
+
var import_components63 = require("@transferwise/components");
|
|
6532
|
+
var import_react27 = require("react");
|
|
6533
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
6172
6534
|
function TabInputRendererComponent(props) {
|
|
6173
6535
|
const {
|
|
6174
6536
|
id,
|
|
@@ -6185,13 +6547,13 @@ function TabInputRendererComponent(props) {
|
|
|
6185
6547
|
tags,
|
|
6186
6548
|
onSelect
|
|
6187
6549
|
} = props;
|
|
6188
|
-
(0,
|
|
6550
|
+
(0, import_react27.useEffect)(() => {
|
|
6189
6551
|
if (!isValidIndex2(selectedIndex, options.length)) {
|
|
6190
6552
|
onSelect(0);
|
|
6191
6553
|
}
|
|
6192
6554
|
}, [selectedIndex, onSelect, options.length]);
|
|
6193
|
-
return /* @__PURE__ */ (0,
|
|
6194
|
-
/* @__PURE__ */ (0,
|
|
6555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_jsx_runtime91.Fragment, { children: [
|
|
6556
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6195
6557
|
FieldInput_default,
|
|
6196
6558
|
{
|
|
6197
6559
|
id,
|
|
@@ -6202,8 +6564,8 @@ function TabInputRendererComponent(props) {
|
|
|
6202
6564
|
features,
|
|
6203
6565
|
control,
|
|
6204
6566
|
tags,
|
|
6205
|
-
children: /* @__PURE__ */ (0,
|
|
6206
|
-
|
|
6567
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6568
|
+
import_components63.Tabs,
|
|
6207
6569
|
{
|
|
6208
6570
|
name: id,
|
|
6209
6571
|
selected: selectedIndex != null ? selectedIndex : 0,
|
|
@@ -6211,7 +6573,7 @@ function TabInputRendererComponent(props) {
|
|
|
6211
6573
|
title: option.title,
|
|
6212
6574
|
// if we pass null, we get some props-types console errors
|
|
6213
6575
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
6214
|
-
content: /* @__PURE__ */ (0,
|
|
6576
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_jsx_runtime91.Fragment, {}),
|
|
6215
6577
|
disabled: option.disabled || disabled
|
|
6216
6578
|
})),
|
|
6217
6579
|
onTabSelect: onSelect
|
|
@@ -6225,8 +6587,8 @@ function TabInputRendererComponent(props) {
|
|
|
6225
6587
|
var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
|
|
6226
6588
|
|
|
6227
6589
|
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
6228
|
-
var
|
|
6229
|
-
var
|
|
6590
|
+
var import_components64 = require("@transferwise/components");
|
|
6591
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
6230
6592
|
function SelectInputRendererComponent(props) {
|
|
6231
6593
|
const {
|
|
6232
6594
|
id,
|
|
@@ -6269,13 +6631,13 @@ function SelectInputRendererComponent(props) {
|
|
|
6269
6631
|
} : {
|
|
6270
6632
|
title: option.title,
|
|
6271
6633
|
description: option.description,
|
|
6272
|
-
icon: /* @__PURE__ */ (0,
|
|
6634
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
6273
6635
|
};
|
|
6274
|
-
return /* @__PURE__ */ (0,
|
|
6636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_components64.SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
6275
6637
|
};
|
|
6276
6638
|
const extraProps = { autoComplete };
|
|
6277
|
-
return /* @__PURE__ */ (0,
|
|
6278
|
-
/* @__PURE__ */ (0,
|
|
6639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
|
|
6640
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
6279
6641
|
FieldInput_default,
|
|
6280
6642
|
{
|
|
6281
6643
|
id,
|
|
@@ -6286,8 +6648,8 @@ function SelectInputRendererComponent(props) {
|
|
|
6286
6648
|
features,
|
|
6287
6649
|
control,
|
|
6288
6650
|
tags,
|
|
6289
|
-
children: /* @__PURE__ */ (0,
|
|
6290
|
-
|
|
6651
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
6652
|
+
import_components64.SelectInput,
|
|
6291
6653
|
__spreadValues({
|
|
6292
6654
|
name: id,
|
|
6293
6655
|
placeholder,
|
|
@@ -6307,9 +6669,9 @@ function SelectInputRendererComponent(props) {
|
|
|
6307
6669
|
}
|
|
6308
6670
|
|
|
6309
6671
|
// ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
6310
|
-
var
|
|
6311
|
-
var
|
|
6312
|
-
var
|
|
6672
|
+
var import_react28 = require("react");
|
|
6673
|
+
var import_components65 = require("@transferwise/components");
|
|
6674
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
6313
6675
|
function SegmentedInputRendererComponent(props) {
|
|
6314
6676
|
const {
|
|
6315
6677
|
id,
|
|
@@ -6325,13 +6687,13 @@ function SegmentedInputRendererComponent(props) {
|
|
|
6325
6687
|
tags,
|
|
6326
6688
|
onSelect
|
|
6327
6689
|
} = props;
|
|
6328
|
-
(0,
|
|
6690
|
+
(0, import_react28.useEffect)(() => {
|
|
6329
6691
|
if (!isValidIndex3(selectedIndex, options.length)) {
|
|
6330
6692
|
onSelect(0);
|
|
6331
6693
|
}
|
|
6332
6694
|
}, [selectedIndex, onSelect, options.length]);
|
|
6333
|
-
return /* @__PURE__ */ (0,
|
|
6334
|
-
/* @__PURE__ */ (0,
|
|
6695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
6696
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
6335
6697
|
FieldInput_default,
|
|
6336
6698
|
{
|
|
6337
6699
|
id,
|
|
@@ -6342,8 +6704,8 @@ function SegmentedInputRendererComponent(props) {
|
|
|
6342
6704
|
features,
|
|
6343
6705
|
control,
|
|
6344
6706
|
tags,
|
|
6345
|
-
children: /* @__PURE__ */ (0,
|
|
6346
|
-
|
|
6707
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
6708
|
+
import_components65.SegmentedControl,
|
|
6347
6709
|
{
|
|
6348
6710
|
name: `${id}-segmented-control`,
|
|
6349
6711
|
value: String(selectedIndex),
|
|
@@ -6359,14 +6721,14 @@ function SegmentedInputRendererComponent(props) {
|
|
|
6359
6721
|
)
|
|
6360
6722
|
}
|
|
6361
6723
|
),
|
|
6362
|
-
/* @__PURE__ */ (0,
|
|
6724
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { id: `${id}-children`, children })
|
|
6363
6725
|
] });
|
|
6364
6726
|
}
|
|
6365
6727
|
var isValidIndex3 = (index, options) => index !== null && index >= 0 && index < options;
|
|
6366
6728
|
|
|
6367
6729
|
// ../renderers/src/SelectInputRenderer/RadioItemRendererComponent.tsx
|
|
6368
|
-
var
|
|
6369
|
-
var
|
|
6730
|
+
var import_components66 = require("@transferwise/components");
|
|
6731
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
6370
6732
|
function RadioItemRendererComponent(props) {
|
|
6371
6733
|
const {
|
|
6372
6734
|
id,
|
|
@@ -6382,23 +6744,23 @@ function RadioItemRendererComponent(props) {
|
|
|
6382
6744
|
onSelect
|
|
6383
6745
|
} = props;
|
|
6384
6746
|
const { ref } = useScrollToError(validationState, features);
|
|
6385
|
-
return /* @__PURE__ */ (0,
|
|
6386
|
-
rootTitle && /* @__PURE__ */ (0,
|
|
6387
|
-
|
|
6747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { ref, className: controlAndTagsToCSSClass(props), children: [
|
|
6748
|
+
rootTitle && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
6749
|
+
import_components66.Header,
|
|
6388
6750
|
{
|
|
6389
6751
|
as: "h2",
|
|
6390
|
-
title: help ? /* @__PURE__ */ (0,
|
|
6752
|
+
title: help ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
|
|
6391
6753
|
}
|
|
6392
6754
|
),
|
|
6393
|
-
rootDescription && /* @__PURE__ */ (0,
|
|
6394
|
-
/* @__PURE__ */ (0,
|
|
6395
|
-
({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ (0,
|
|
6396
|
-
|
|
6755
|
+
rootDescription && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { children: rootDescription }),
|
|
6756
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_components66.List, { children: options.map(
|
|
6757
|
+
({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
6758
|
+
import_components66.ListItem,
|
|
6397
6759
|
__spreadValues({
|
|
6398
6760
|
title,
|
|
6399
6761
|
subtitle: description,
|
|
6400
|
-
control: /* @__PURE__ */ (0,
|
|
6401
|
-
|
|
6762
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
6763
|
+
import_components66.ListItem.Radio,
|
|
6402
6764
|
{
|
|
6403
6765
|
name: title,
|
|
6404
6766
|
checked: selectedIndex === index,
|
|
@@ -6413,51 +6775,51 @@ function RadioItemRendererComponent(props) {
|
|
|
6413
6775
|
title
|
|
6414
6776
|
)
|
|
6415
6777
|
) }, `${id}-${selectedIndex}`),
|
|
6416
|
-
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0,
|
|
6778
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_components66.InlineAlert, { type: "negative", children: validationState.message }),
|
|
6417
6779
|
children
|
|
6418
6780
|
] });
|
|
6419
6781
|
}
|
|
6420
6782
|
|
|
6421
6783
|
// ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
|
|
6422
|
-
var
|
|
6784
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
6423
6785
|
var SelectInputRenderer = {
|
|
6424
6786
|
canRenderType: "input-select",
|
|
6425
6787
|
render: (props) => {
|
|
6426
6788
|
switch (props.control) {
|
|
6427
6789
|
case "radio":
|
|
6428
|
-
return /* @__PURE__ */ (0,
|
|
6790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
|
|
6429
6791
|
case "radio-item":
|
|
6430
|
-
return /* @__PURE__ */ (0,
|
|
6792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(RadioItemRendererComponent, __spreadValues({}, props));
|
|
6431
6793
|
case "tab":
|
|
6432
|
-
return props.options.length > 3 ? /* @__PURE__ */ (0,
|
|
6794
|
+
return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(TabInputRendererComponent, __spreadValues({}, props));
|
|
6433
6795
|
case "segmented":
|
|
6434
|
-
return props.options.length > 3 ? /* @__PURE__ */ (0,
|
|
6796
|
+
return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
|
|
6435
6797
|
case "select":
|
|
6436
6798
|
default:
|
|
6437
|
-
return /* @__PURE__ */ (0,
|
|
6799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
|
|
6438
6800
|
}
|
|
6439
6801
|
}
|
|
6440
6802
|
};
|
|
6441
6803
|
var SelectInputRenderer_default = SelectInputRenderer;
|
|
6442
6804
|
|
|
6443
6805
|
// ../renderers/src/StatusListRenderer.tsx
|
|
6444
|
-
var
|
|
6445
|
-
var
|
|
6446
|
-
var
|
|
6806
|
+
var import_components67 = require("@transferwise/components");
|
|
6807
|
+
var import_classnames32 = __toESM(require_classnames());
|
|
6808
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
6447
6809
|
var StatusListRenderer = {
|
|
6448
6810
|
canRenderType: "status-list",
|
|
6449
|
-
render: ({ margin, items, title, control, tags }) => /* @__PURE__ */ (0,
|
|
6450
|
-
title ? /* @__PURE__ */ (0,
|
|
6811
|
+
render: ({ margin, items, title, control, tags }) => /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: (0, import_classnames32.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
6812
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_components67.Header, { title }) : null,
|
|
6451
6813
|
items.map((item) => {
|
|
6452
6814
|
const { callToAction, description, title: itemTitle } = item;
|
|
6453
|
-
return /* @__PURE__ */ (0,
|
|
6454
|
-
|
|
6815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
6816
|
+
import_components67.ListItem,
|
|
6455
6817
|
{
|
|
6456
6818
|
title: itemTitle,
|
|
6457
6819
|
subtitle: description,
|
|
6458
|
-
media: /* @__PURE__ */ (0,
|
|
6459
|
-
additionalInfo: callToAction ? /* @__PURE__ */ (0,
|
|
6460
|
-
|
|
6820
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(StatusListItemMedia, __spreadValues({}, item)),
|
|
6821
|
+
additionalInfo: callToAction ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
6822
|
+
import_components67.ListItem.AdditionalInfo,
|
|
6461
6823
|
{
|
|
6462
6824
|
action: __spreadValues({
|
|
6463
6825
|
label: callToAction.title
|
|
@@ -6475,10 +6837,10 @@ var StatusListItemMedia = ({ icon, status }) => {
|
|
|
6475
6837
|
return void 0;
|
|
6476
6838
|
}
|
|
6477
6839
|
if ("name" in icon) {
|
|
6478
|
-
return /* @__PURE__ */ (0,
|
|
6840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_components67.AvatarView, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(DynamicIcon_default, { name: icon.name }) });
|
|
6479
6841
|
}
|
|
6480
6842
|
if ("text" in icon) {
|
|
6481
|
-
return /* @__PURE__ */ (0,
|
|
6843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_components67.AvatarView, { badge: { status: mapStatus(status) }, children: icon.text });
|
|
6482
6844
|
}
|
|
6483
6845
|
return void 0;
|
|
6484
6846
|
};
|
|
@@ -6495,16 +6857,16 @@ var mapStatus = (status) => {
|
|
|
6495
6857
|
var StatusListRenderer_default = StatusListRenderer;
|
|
6496
6858
|
|
|
6497
6859
|
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
6498
|
-
var
|
|
6860
|
+
var import_classnames33 = __toESM(require_classnames());
|
|
6499
6861
|
|
|
6500
6862
|
// ../renderers/src/utils/useCustomTheme.ts
|
|
6501
6863
|
var import_components_theming = require("@wise/components-theming");
|
|
6502
|
-
var
|
|
6864
|
+
var import_react29 = require("react");
|
|
6503
6865
|
var ThemeRequiredEventName = "Theme Required";
|
|
6504
6866
|
var useCustomTheme = (theme, trackEvent) => {
|
|
6505
6867
|
const theming = (0, import_components_theming.useTheme)();
|
|
6506
|
-
const previousTheme = (0,
|
|
6507
|
-
(0,
|
|
6868
|
+
const previousTheme = (0, import_react29.useMemo)(() => theming.theme, []);
|
|
6869
|
+
(0, import_react29.useEffect)(() => {
|
|
6508
6870
|
theming.setTheme(theme);
|
|
6509
6871
|
trackEvent(ThemeRequiredEventName, { theme });
|
|
6510
6872
|
return theme !== previousTheme ? () => {
|
|
@@ -6516,13 +6878,13 @@ var useCustomTheme = (theme, trackEvent) => {
|
|
|
6516
6878
|
};
|
|
6517
6879
|
|
|
6518
6880
|
// ../renderers/src/step/StepHeader.tsx
|
|
6519
|
-
var
|
|
6520
|
-
var
|
|
6881
|
+
var import_components68 = require("@transferwise/components");
|
|
6882
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
6521
6883
|
var StepHeader = ({ title, description, tags }) => {
|
|
6522
6884
|
const { titleType, alignmentClassName } = getHeaderStyle(tags);
|
|
6523
|
-
return /* @__PURE__ */ (0,
|
|
6524
|
-
title ? /* @__PURE__ */ (0,
|
|
6525
|
-
description ? /* @__PURE__ */ (0,
|
|
6885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_jsx_runtime97.Fragment, { children: [
|
|
6886
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_components68.Title, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
|
|
6887
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
|
|
6526
6888
|
] });
|
|
6527
6889
|
};
|
|
6528
6890
|
var getHeaderStyle = (tags) => {
|
|
@@ -6533,13 +6895,13 @@ var getHeaderStyle = (tags) => {
|
|
|
6533
6895
|
};
|
|
6534
6896
|
|
|
6535
6897
|
// ../renderers/src/step/topbar/BackButton.tsx
|
|
6536
|
-
var
|
|
6537
|
-
var
|
|
6538
|
-
var
|
|
6898
|
+
var import_components69 = require("@transferwise/components");
|
|
6899
|
+
var import_icons7 = require("@transferwise/icons");
|
|
6900
|
+
var import_react_intl36 = require("react-intl");
|
|
6539
6901
|
|
|
6540
6902
|
// ../renderers/src/messages/back.messages.ts
|
|
6541
|
-
var
|
|
6542
|
-
var back_messages_default = (0,
|
|
6903
|
+
var import_react_intl35 = require("react-intl");
|
|
6904
|
+
var back_messages_default = (0, import_react_intl35.defineMessages)({
|
|
6543
6905
|
back: {
|
|
6544
6906
|
id: "df.wise.back.label",
|
|
6545
6907
|
defaultMessage: "Back",
|
|
@@ -6548,31 +6910,31 @@ var back_messages_default = (0, import_react_intl33.defineMessages)({
|
|
|
6548
6910
|
});
|
|
6549
6911
|
|
|
6550
6912
|
// ../renderers/src/step/topbar/BackButton.tsx
|
|
6551
|
-
var
|
|
6913
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
6552
6914
|
function BackButton({ title, onClick }) {
|
|
6553
|
-
const { formatMessage } = (0,
|
|
6554
|
-
return /* @__PURE__ */ (0,
|
|
6555
|
-
/* @__PURE__ */ (0,
|
|
6556
|
-
/* @__PURE__ */ (0,
|
|
6915
|
+
const { formatMessage } = (0, import_react_intl36.useIntl)();
|
|
6916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_components69.IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
|
|
6917
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
|
|
6918
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_icons7.ArrowLeft, {})
|
|
6557
6919
|
] });
|
|
6558
6920
|
}
|
|
6559
6921
|
|
|
6560
6922
|
// ../renderers/src/step/topbar/Toolbar.tsx
|
|
6561
|
-
var
|
|
6562
|
-
var
|
|
6923
|
+
var import_components70 = require("@transferwise/components");
|
|
6924
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
6563
6925
|
var Toolbar = ({ items }) => {
|
|
6564
|
-
return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0,
|
|
6926
|
+
return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
|
|
6565
6927
|
};
|
|
6566
6928
|
function ToolbarButton(props) {
|
|
6567
|
-
return prefersMedia(props.control) ? /* @__PURE__ */ (0,
|
|
6929
|
+
return prefersMedia(props.control) ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(TextToolbarButton, __spreadValues({}, props));
|
|
6568
6930
|
}
|
|
6569
6931
|
function MediaToolbarButton(props) {
|
|
6570
6932
|
var _a;
|
|
6571
6933
|
const { context, control, media, accessibilityDescription, disabled, onClick } = props;
|
|
6572
6934
|
const priority = getIconButtonPriority(control);
|
|
6573
6935
|
const type = getSentiment2(context);
|
|
6574
|
-
return /* @__PURE__ */ (0,
|
|
6575
|
-
|
|
6936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
6937
|
+
import_components70.IconButton,
|
|
6576
6938
|
{
|
|
6577
6939
|
className: "df-toolbar-button",
|
|
6578
6940
|
disabled,
|
|
@@ -6581,7 +6943,7 @@ function MediaToolbarButton(props) {
|
|
|
6581
6943
|
type,
|
|
6582
6944
|
onClick,
|
|
6583
6945
|
children: [
|
|
6584
|
-
accessibilityDescription ? /* @__PURE__ */ (0,
|
|
6946
|
+
accessibilityDescription ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "sr-only", children: accessibilityDescription }) : null,
|
|
6585
6947
|
media ? (_a = getAddonStartMedia(media)) == null ? void 0 : _a.value : null
|
|
6586
6948
|
]
|
|
6587
6949
|
}
|
|
@@ -6592,8 +6954,8 @@ function TextToolbarButton(props) {
|
|
|
6592
6954
|
const addonStart = media ? getAddonStartMedia(media) : void 0;
|
|
6593
6955
|
const priority = getPriority2(control);
|
|
6594
6956
|
const sentiment = getSentiment2(context);
|
|
6595
|
-
return /* @__PURE__ */ (0,
|
|
6596
|
-
|
|
6957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
6958
|
+
import_components70.Button,
|
|
6597
6959
|
{
|
|
6598
6960
|
v2: true,
|
|
6599
6961
|
size: "sm",
|
|
@@ -6622,18 +6984,18 @@ var getIconButtonPriority = (control) => {
|
|
|
6622
6984
|
};
|
|
6623
6985
|
|
|
6624
6986
|
// ../renderers/src/step/topbar/TopBar.tsx
|
|
6625
|
-
var
|
|
6987
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
6626
6988
|
function TopBar({ back, toolbar, tags }) {
|
|
6627
6989
|
const isBackAllowed = !(tags == null ? void 0 : tags.includes("non-dismissible"));
|
|
6628
6990
|
const backCTA = isBackAllowed ? back : void 0;
|
|
6629
|
-
return backCTA || toolbar ? /* @__PURE__ */ (0,
|
|
6630
|
-
backCTA ? /* @__PURE__ */ (0,
|
|
6631
|
-
toolbar ? /* @__PURE__ */ (0,
|
|
6991
|
+
return backCTA || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "d-flex m-b-2", children: [
|
|
6992
|
+
backCTA ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(BackButton, __spreadValues({}, backCTA)) : null,
|
|
6993
|
+
toolbar ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Toolbar, __spreadValues({}, toolbar)) : null
|
|
6632
6994
|
] }) : null;
|
|
6633
6995
|
}
|
|
6634
6996
|
|
|
6635
6997
|
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
6636
|
-
var
|
|
6998
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
6637
6999
|
var SplashCelebrationStepRenderer = {
|
|
6638
7000
|
canRenderType: "step",
|
|
6639
7001
|
canRender: ({ control }) => control === "splash-celebration",
|
|
@@ -6642,23 +7004,23 @@ var SplashCelebrationStepRenderer = {
|
|
|
6642
7004
|
function SplashCelebrationStepRendererComponent(props) {
|
|
6643
7005
|
const { back, title, description, toolbar, children, footer, control, tags, trackEvent } = props;
|
|
6644
7006
|
useCustomTheme("forest-green", trackEvent);
|
|
6645
|
-
return /* @__PURE__ */ (0,
|
|
7007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
|
|
6646
7008
|
"div",
|
|
6647
7009
|
{
|
|
6648
|
-
className: (0,
|
|
7010
|
+
className: (0, import_classnames33.default)("splash-screen", "m-t-5", controlAndTagsToCSSClass({ control, tags })),
|
|
6649
7011
|
children: [
|
|
6650
|
-
/* @__PURE__ */ (0,
|
|
6651
|
-
title || description ? /* @__PURE__ */ (0,
|
|
7012
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(TopBar, { back, toolbar, tags }),
|
|
7013
|
+
title || description ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(StepHeader, { title, description, tags }) }) : void 0,
|
|
6652
7014
|
children,
|
|
6653
|
-
/* @__PURE__ */ (0,
|
|
7015
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(StepFooter, { footer, tags })
|
|
6654
7016
|
]
|
|
6655
7017
|
}
|
|
6656
7018
|
);
|
|
6657
7019
|
}
|
|
6658
7020
|
|
|
6659
7021
|
// ../renderers/src/step/SplashStepRenderer.tsx
|
|
6660
|
-
var
|
|
6661
|
-
var
|
|
7022
|
+
var import_classnames34 = __toESM(require_classnames());
|
|
7023
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
6662
7024
|
var SplashStepRenderer = {
|
|
6663
7025
|
canRenderType: "step",
|
|
6664
7026
|
canRender: ({ control }) => control === "splash",
|
|
@@ -6666,70 +7028,70 @@ var SplashStepRenderer = {
|
|
|
6666
7028
|
};
|
|
6667
7029
|
function SplashStepRendererComponent(props) {
|
|
6668
7030
|
const { back, title, description, toolbar, children, footer, control, tags } = props;
|
|
6669
|
-
return /* @__PURE__ */ (0,
|
|
7031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
|
|
6670
7032
|
"div",
|
|
6671
7033
|
{
|
|
6672
|
-
className: (0,
|
|
7034
|
+
className: (0, import_classnames34.default)("splash-screen", "m-t-5", controlAndTagsToCSSClass({ control, tags })),
|
|
6673
7035
|
children: [
|
|
6674
|
-
/* @__PURE__ */ (0,
|
|
6675
|
-
title || description ? /* @__PURE__ */ (0,
|
|
7036
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(TopBar, { back, toolbar, tags }),
|
|
7037
|
+
title || description ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(StepHeader, { title, description, tags }) }) : void 0,
|
|
6676
7038
|
children,
|
|
6677
|
-
/* @__PURE__ */ (0,
|
|
7039
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(StepFooter, { footer, tags })
|
|
6678
7040
|
]
|
|
6679
7041
|
}
|
|
6680
7042
|
);
|
|
6681
7043
|
}
|
|
6682
7044
|
|
|
6683
7045
|
// ../renderers/src/step/StepRenderer.tsx
|
|
6684
|
-
var
|
|
6685
|
-
var
|
|
7046
|
+
var import_components71 = require("@transferwise/components");
|
|
7047
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
6686
7048
|
var StepRenderer = {
|
|
6687
7049
|
canRenderType: "step",
|
|
6688
7050
|
render: StepRendererComponent
|
|
6689
7051
|
};
|
|
6690
7052
|
function StepRendererComponent(props) {
|
|
6691
7053
|
const { back, description, error, title, children, toolbar, footer, control, tags } = props;
|
|
6692
|
-
return /* @__PURE__ */ (0,
|
|
6693
|
-
/* @__PURE__ */ (0,
|
|
6694
|
-
title || description ? /* @__PURE__ */ (0,
|
|
6695
|
-
error ? /* @__PURE__ */ (0,
|
|
7054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: controlAndTagsToCSSClass({ control, tags }), children: [
|
|
7055
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(TopBar, { back, toolbar, tags }),
|
|
7056
|
+
title || description ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(StepHeader, { title, description, tags }) }) : void 0,
|
|
7057
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_components71.Alert, { type: "negative", className: "m-b-2", message: error }) : null,
|
|
6696
7058
|
children,
|
|
6697
|
-
/* @__PURE__ */ (0,
|
|
7059
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(StepFooter, { footer, tags })
|
|
6698
7060
|
] });
|
|
6699
7061
|
}
|
|
6700
7062
|
|
|
6701
7063
|
// ../renderers/src/TabsRenderer.tsx
|
|
6702
|
-
var
|
|
6703
|
-
var
|
|
6704
|
-
var
|
|
6705
|
-
var
|
|
7064
|
+
var import_components72 = require("@transferwise/components");
|
|
7065
|
+
var import_classnames35 = __toESM(require_classnames());
|
|
7066
|
+
var import_react30 = require("react");
|
|
7067
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
6706
7068
|
var TabsRenderer = {
|
|
6707
7069
|
canRenderType: "tabs",
|
|
6708
7070
|
render: (props) => {
|
|
6709
7071
|
switch (props.control) {
|
|
6710
7072
|
case "segmented":
|
|
6711
7073
|
if (props.tabs.length > 3) {
|
|
6712
|
-
return /* @__PURE__ */ (0,
|
|
7074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(TabsRendererComponent, __spreadValues({}, props));
|
|
6713
7075
|
}
|
|
6714
|
-
return /* @__PURE__ */ (0,
|
|
7076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
|
|
6715
7077
|
case "chips":
|
|
6716
|
-
return /* @__PURE__ */ (0,
|
|
7078
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
|
|
6717
7079
|
default:
|
|
6718
|
-
return /* @__PURE__ */ (0,
|
|
7080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(TabsRendererComponent, __spreadValues({}, props));
|
|
6719
7081
|
}
|
|
6720
7082
|
}
|
|
6721
7083
|
};
|
|
6722
7084
|
function TabsRendererComponent({ uid, margin, tabs, control, tags }) {
|
|
6723
|
-
const [selectedIndex, setSelectedIndex] = (0,
|
|
6724
|
-
return /* @__PURE__ */ (0,
|
|
6725
|
-
|
|
7085
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react30.useState)(0);
|
|
7086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: (0, import_classnames35.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
7087
|
+
import_components72.Tabs,
|
|
6726
7088
|
{
|
|
6727
7089
|
name: uid,
|
|
6728
7090
|
selected: selectedIndex != null ? selectedIndex : 0,
|
|
6729
7091
|
tabs: tabs.map((option) => ({
|
|
6730
7092
|
title: option.title,
|
|
6731
7093
|
disabled: false,
|
|
6732
|
-
content: /* @__PURE__ */ (0,
|
|
7094
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "m-t-2", children: [
|
|
6733
7095
|
" ",
|
|
6734
7096
|
option.children,
|
|
6735
7097
|
" "
|
|
@@ -6741,10 +7103,10 @@ function TabsRendererComponent({ uid, margin, tabs, control, tags }) {
|
|
|
6741
7103
|
}
|
|
6742
7104
|
function SegmentedTabsRendererComponent({ uid, margin, tabs, control, tags }) {
|
|
6743
7105
|
var _a;
|
|
6744
|
-
const [selectedIndex, setSelectedIndex] = (0,
|
|
6745
|
-
return /* @__PURE__ */ (0,
|
|
6746
|
-
/* @__PURE__ */ (0,
|
|
6747
|
-
|
|
7106
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react30.useState)(0);
|
|
7107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: (0, import_classnames35.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
7108
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
7109
|
+
import_components72.SegmentedControl,
|
|
6748
7110
|
{
|
|
6749
7111
|
name: uid,
|
|
6750
7112
|
value: String(selectedIndex),
|
|
@@ -6758,31 +7120,123 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs, control, tags }) {
|
|
|
6758
7120
|
onChange: (value) => setSelectedIndex(Number(value))
|
|
6759
7121
|
}
|
|
6760
7122
|
),
|
|
6761
|
-
/* @__PURE__ */ (0,
|
|
7123
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
6762
7124
|
] });
|
|
6763
7125
|
}
|
|
6764
7126
|
function ChipsTabsRendererComponent({ margin, tabs, control, tags }) {
|
|
6765
7127
|
var _a;
|
|
6766
|
-
const [selectedIndex, setSelectedIndex] = (0,
|
|
6767
|
-
return /* @__PURE__ */ (0,
|
|
6768
|
-
/* @__PURE__ */ (0,
|
|
6769
|
-
|
|
7128
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react30.useState)(0);
|
|
7129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: (0, import_classnames35.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
7130
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
7131
|
+
import_components72.Chips,
|
|
6770
7132
|
{
|
|
6771
7133
|
chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
|
|
6772
7134
|
selected: selectedIndex,
|
|
6773
7135
|
onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
|
|
6774
7136
|
}
|
|
6775
7137
|
) }),
|
|
6776
|
-
/* @__PURE__ */ (0,
|
|
7138
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
6777
7139
|
] });
|
|
6778
7140
|
}
|
|
6779
7141
|
|
|
6780
7142
|
// ../renderers/src/TextInputRenderer.tsx
|
|
6781
|
-
var
|
|
7143
|
+
var import_components74 = require("@transferwise/components");
|
|
7144
|
+
var import_react32 = require("react");
|
|
6782
7145
|
|
|
6783
7146
|
// ../renderers/src/components/VariableTextInput.tsx
|
|
6784
|
-
var
|
|
6785
|
-
var
|
|
7147
|
+
var import_components73 = require("@transferwise/components");
|
|
7148
|
+
var import_icons8 = require("@transferwise/icons");
|
|
7149
|
+
var import_react_intl38 = require("react-intl");
|
|
7150
|
+
var import_react31 = require("react");
|
|
7151
|
+
|
|
7152
|
+
// ../renderers/src/messages/ssn-input.messages.ts
|
|
7153
|
+
var import_react_intl37 = require("react-intl");
|
|
7154
|
+
var ssn_input_messages_default = (0, import_react_intl37.defineMessages)({
|
|
7155
|
+
showValue: {
|
|
7156
|
+
id: "df.wise.ssnInput.showValue",
|
|
7157
|
+
defaultMessage: "Show value",
|
|
7158
|
+
description: "Accessible label for showing a masked SSN or SIN value"
|
|
7159
|
+
},
|
|
7160
|
+
hideValue: {
|
|
7161
|
+
id: "df.wise.ssnInput.hideValue",
|
|
7162
|
+
defaultMessage: "Hide value",
|
|
7163
|
+
description: "Accessible label for hiding an SSN or SIN value"
|
|
7164
|
+
}
|
|
7165
|
+
});
|
|
7166
|
+
|
|
7167
|
+
// ../renderers/src/components/ssnInputUtils.ts
|
|
7168
|
+
function formatSsnValue(rawValue, displayFormat, isVisible) {
|
|
7169
|
+
if (!displayFormat) {
|
|
7170
|
+
return isVisible ? rawValue : "\u2022".repeat(rawValue.length);
|
|
7171
|
+
}
|
|
7172
|
+
const formattedValue = displayFormat.split("").reduce(
|
|
7173
|
+
({ display, digitsUsed }, character) => {
|
|
7174
|
+
if (character === "*") {
|
|
7175
|
+
return digitsUsed < rawValue.length ? {
|
|
7176
|
+
display: `${display}${isVisible ? rawValue[digitsUsed] : "\u2022"}`,
|
|
7177
|
+
digitsUsed: digitsUsed + 1
|
|
7178
|
+
} : { display, digitsUsed };
|
|
7179
|
+
}
|
|
7180
|
+
return digitsUsed > 0 && digitsUsed < rawValue.length ? { display: `${display}${character}`, digitsUsed } : { display, digitsUsed };
|
|
7181
|
+
},
|
|
7182
|
+
{ display: "", digitsUsed: 0 }
|
|
7183
|
+
).display;
|
|
7184
|
+
const displayFormatDigitCount = displayFormat.split("").filter((character) => character === "*").length;
|
|
7185
|
+
const extraValue = rawValue.slice(displayFormatDigitCount);
|
|
7186
|
+
return `${formattedValue}${isVisible ? extraValue : "\u2022".repeat(extraValue.length)}`;
|
|
7187
|
+
}
|
|
7188
|
+
function getRawOffset(displayValue, displayOffset, rawValueLength) {
|
|
7189
|
+
return Math.min(
|
|
7190
|
+
displayValue.slice(0, displayOffset).split("").filter((character) => character === "\u2022" || /\d/.test(character)).length,
|
|
7191
|
+
rawValueLength
|
|
7192
|
+
);
|
|
7193
|
+
}
|
|
7194
|
+
function replaceSsnSelection(rawValue, displayValue, insertedValue, start, end) {
|
|
7195
|
+
const startOffset = getRawOffset(displayValue, start, rawValue.length);
|
|
7196
|
+
const endOffset = getRawOffset(displayValue, end, rawValue.length);
|
|
7197
|
+
if (!insertedValue) {
|
|
7198
|
+
return void 0;
|
|
7199
|
+
}
|
|
7200
|
+
return {
|
|
7201
|
+
value: `${rawValue.slice(0, startOffset)}${insertedValue}${rawValue.slice(endOffset)}`,
|
|
7202
|
+
caret: startOffset + insertedValue.length
|
|
7203
|
+
};
|
|
7204
|
+
}
|
|
7205
|
+
function deleteSsnSelection(rawValue, displayValue, start, end, backward) {
|
|
7206
|
+
let startOffset = getRawOffset(displayValue, start, rawValue.length);
|
|
7207
|
+
let endOffset = getRawOffset(displayValue, end, rawValue.length);
|
|
7208
|
+
if (startOffset === endOffset) {
|
|
7209
|
+
if (backward) {
|
|
7210
|
+
startOffset = Math.max(0, startOffset - 1);
|
|
7211
|
+
} else {
|
|
7212
|
+
endOffset = Math.min(rawValue.length, endOffset + 1);
|
|
7213
|
+
}
|
|
7214
|
+
}
|
|
7215
|
+
return {
|
|
7216
|
+
value: `${rawValue.slice(0, startOffset)}${rawValue.slice(endOffset)}`,
|
|
7217
|
+
caret: startOffset
|
|
7218
|
+
};
|
|
7219
|
+
}
|
|
7220
|
+
function getDisplayOffset(displayValue, rawOffset) {
|
|
7221
|
+
if (rawOffset === 0) {
|
|
7222
|
+
return 0;
|
|
7223
|
+
}
|
|
7224
|
+
let displayOffset = 0;
|
|
7225
|
+
let digitsSeen = 0;
|
|
7226
|
+
for (const character of displayValue) {
|
|
7227
|
+
if (character === "\u2022" || /\d/.test(character)) {
|
|
7228
|
+
digitsSeen += 1;
|
|
7229
|
+
if (digitsSeen === rawOffset) {
|
|
7230
|
+
return displayOffset + 1;
|
|
7231
|
+
}
|
|
7232
|
+
}
|
|
7233
|
+
displayOffset += 1;
|
|
7234
|
+
}
|
|
7235
|
+
return displayOffset;
|
|
7236
|
+
}
|
|
7237
|
+
|
|
7238
|
+
// ../renderers/src/components/VariableTextInput.tsx
|
|
7239
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
6786
7240
|
var commonKeys = [
|
|
6787
7241
|
"autoComplete",
|
|
6788
7242
|
"autoCapitalize",
|
|
@@ -6797,16 +7251,18 @@ var commonKeys = [
|
|
|
6797
7251
|
"value"
|
|
6798
7252
|
];
|
|
6799
7253
|
function VariableTextInput(inputProps) {
|
|
6800
|
-
const { id, value, control, onChange } = inputProps;
|
|
7254
|
+
const { id, value, control, onChange, isSsnVisible } = inputProps;
|
|
6801
7255
|
const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
|
|
6802
7256
|
switch (control) {
|
|
6803
7257
|
case "email":
|
|
6804
|
-
return /* @__PURE__ */ (0,
|
|
7258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
|
|
6805
7259
|
case "password":
|
|
6806
|
-
return /* @__PURE__ */ (0,
|
|
7260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
|
|
7261
|
+
case "ssn-input":
|
|
7262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(SsnInput, __spreadProps(__spreadValues({}, commonProps), { isVisible: isSsnVisible, onChange }));
|
|
6807
7263
|
case "numeric": {
|
|
6808
7264
|
const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
|
|
6809
|
-
return /* @__PURE__ */ (0,
|
|
7265
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
6810
7266
|
TextInput,
|
|
6811
7267
|
__spreadProps(__spreadValues({}, numericProps), {
|
|
6812
7268
|
onChange: (newValue) => {
|
|
@@ -6817,91 +7273,224 @@ function VariableTextInput(inputProps) {
|
|
|
6817
7273
|
);
|
|
6818
7274
|
}
|
|
6819
7275
|
case "phone-number":
|
|
6820
|
-
return /* @__PURE__ */ (0,
|
|
7276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_components73.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
|
|
6821
7277
|
default: {
|
|
6822
|
-
return /* @__PURE__ */ (0,
|
|
7278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
|
|
6823
7279
|
}
|
|
6824
7280
|
}
|
|
6825
7281
|
}
|
|
7282
|
+
function SsnInputToggle({
|
|
7283
|
+
isVisible,
|
|
7284
|
+
onClick
|
|
7285
|
+
}) {
|
|
7286
|
+
const { formatMessage } = (0, import_react_intl38.useIntl)();
|
|
7287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
7288
|
+
import_components73.IconButton,
|
|
7289
|
+
{
|
|
7290
|
+
priority: "minimal",
|
|
7291
|
+
size: 24,
|
|
7292
|
+
"aria-label": formatMessage(isVisible ? ssn_input_messages_default.hideValue : ssn_input_messages_default.showValue),
|
|
7293
|
+
"aria-pressed": isVisible,
|
|
7294
|
+
onClick,
|
|
7295
|
+
children: isVisible ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_icons8.EyeShut, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_icons8.Eye, { size: 24 })
|
|
7296
|
+
}
|
|
7297
|
+
);
|
|
7298
|
+
}
|
|
6826
7299
|
function TextInput(props) {
|
|
6827
|
-
const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
|
|
6828
|
-
const InputWithPattern = control === "textarea" ?
|
|
6829
|
-
const InputWithoutPattern = control === "textarea" ?
|
|
6830
|
-
return displayFormat ? /* @__PURE__ */ (0,
|
|
7300
|
+
const _a = props, { control, displayFormat, onChange, type } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange", "type"]);
|
|
7301
|
+
const InputWithPattern = control === "textarea" ? import_components73.TextareaWithDisplayFormat : import_components73.InputWithDisplayFormat;
|
|
7302
|
+
const InputWithoutPattern = control === "textarea" ? import_components73.TextArea : import_components73.Input;
|
|
7303
|
+
return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { type, onChange: (e) => onChange(e.target.value) }));
|
|
7304
|
+
}
|
|
7305
|
+
function SsnInput(props) {
|
|
7306
|
+
const _a = props, { displayFormat = "", isVisible = false, onChange, value = "" } = _a, commonProps = __objRest(_a, ["displayFormat", "isVisible", "onChange", "value"]);
|
|
7307
|
+
const [editVersion, setEditVersion] = (0, import_react31.useState)(0);
|
|
7308
|
+
const inputRef = (0, import_react31.useRef)(null);
|
|
7309
|
+
const selection = (0, import_react31.useRef)({ start: 0, end: 0 });
|
|
7310
|
+
const pendingCaret = (0, import_react31.useRef)(null);
|
|
7311
|
+
const rawValue = value.replace(/\D/g, "");
|
|
7312
|
+
const formattedValue = formatSsnValue(rawValue, displayFormat, isVisible);
|
|
7313
|
+
const scheduleCaret = (rawOffset) => {
|
|
7314
|
+
pendingCaret.current = rawOffset;
|
|
7315
|
+
setEditVersion((version) => version + 1);
|
|
7316
|
+
};
|
|
7317
|
+
const replaceSelection = (insertedValue, start, end) => {
|
|
7318
|
+
const result = replaceSsnSelection(rawValue, formattedValue, insertedValue, start, end);
|
|
7319
|
+
if (!result) {
|
|
7320
|
+
return;
|
|
7321
|
+
}
|
|
7322
|
+
scheduleCaret(result.caret);
|
|
7323
|
+
onChange(result.value);
|
|
7324
|
+
};
|
|
7325
|
+
const deleteSelection = (start, end, backward) => {
|
|
7326
|
+
const result = deleteSsnSelection(rawValue, formattedValue, start, end, backward);
|
|
7327
|
+
scheduleCaret(result.caret);
|
|
7328
|
+
onChange(result.value);
|
|
7329
|
+
};
|
|
7330
|
+
(0, import_react31.useLayoutEffect)(() => {
|
|
7331
|
+
if (pendingCaret.current === null || !inputRef.current) {
|
|
7332
|
+
return;
|
|
7333
|
+
}
|
|
7334
|
+
inputRef.current.setSelectionRange(
|
|
7335
|
+
getDisplayOffset(formattedValue, pendingCaret.current),
|
|
7336
|
+
getDisplayOffset(formattedValue, pendingCaret.current)
|
|
7337
|
+
);
|
|
7338
|
+
pendingCaret.current = null;
|
|
7339
|
+
}, [editVersion, formattedValue, rawValue]);
|
|
7340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
7341
|
+
"input",
|
|
7342
|
+
__spreadProps(__spreadValues({
|
|
7343
|
+
ref: inputRef
|
|
7344
|
+
}, commonProps), {
|
|
7345
|
+
className: "form-control np-form-control np-input np-input--shape-rectangle",
|
|
7346
|
+
type: "text",
|
|
7347
|
+
inputMode: "numeric",
|
|
7348
|
+
value: formattedValue,
|
|
7349
|
+
onChange: (event) => {
|
|
7350
|
+
const nextValue = event.currentTarget.value;
|
|
7351
|
+
const inputType = event.nativeEvent.inputType;
|
|
7352
|
+
const start = selection.current.start;
|
|
7353
|
+
const end = selection.current.end;
|
|
7354
|
+
if (isVisible || /^\d+$/.test(nextValue)) {
|
|
7355
|
+
const nextRawValue = nextValue.replace(/\D/g, "");
|
|
7356
|
+
scheduleCaret(nextRawValue.length);
|
|
7357
|
+
onChange(nextRawValue);
|
|
7358
|
+
} else if ((inputType == null ? void 0 : inputType.startsWith("delete")) || nextValue.length < formattedValue.length) {
|
|
7359
|
+
deleteSelection(start, end, inputType === "deleteContentBackward");
|
|
7360
|
+
} else {
|
|
7361
|
+
replaceSelection(nextValue.replace(/\D/g, ""), start, end);
|
|
7362
|
+
}
|
|
7363
|
+
},
|
|
7364
|
+
onSelect: (event) => {
|
|
7365
|
+
var _a2, _b;
|
|
7366
|
+
selection.current = {
|
|
7367
|
+
start: (_a2 = event.currentTarget.selectionStart) != null ? _a2 : 0,
|
|
7368
|
+
end: (_b = event.currentTarget.selectionEnd) != null ? _b : 0
|
|
7369
|
+
};
|
|
7370
|
+
},
|
|
7371
|
+
onKeyDown: (event) => {
|
|
7372
|
+
var _a2, _b;
|
|
7373
|
+
selection.current = {
|
|
7374
|
+
start: (_a2 = event.currentTarget.selectionStart) != null ? _a2 : 0,
|
|
7375
|
+
end: (_b = event.currentTarget.selectionEnd) != null ? _b : 0
|
|
7376
|
+
};
|
|
7377
|
+
if (/^\d$/.test(event.key)) {
|
|
7378
|
+
event.preventDefault();
|
|
7379
|
+
replaceSelection(event.key, selection.current.start, selection.current.end);
|
|
7380
|
+
} else if (event.key === "Backspace") {
|
|
7381
|
+
event.preventDefault();
|
|
7382
|
+
deleteSelection(selection.current.start, selection.current.end, true);
|
|
7383
|
+
} else if (event.key === "Delete") {
|
|
7384
|
+
event.preventDefault();
|
|
7385
|
+
deleteSelection(selection.current.start, selection.current.end, false);
|
|
7386
|
+
}
|
|
7387
|
+
},
|
|
7388
|
+
onPaste: (event) => {
|
|
7389
|
+
var _a2, _b;
|
|
7390
|
+
event.preventDefault();
|
|
7391
|
+
selection.current = {
|
|
7392
|
+
start: (_a2 = event.currentTarget.selectionStart) != null ? _a2 : 0,
|
|
7393
|
+
end: (_b = event.currentTarget.selectionEnd) != null ? _b : 0
|
|
7394
|
+
};
|
|
7395
|
+
const pastedValue = event.clipboardData.getData("text").replace(/\D/g, "");
|
|
7396
|
+
replaceSelection(pastedValue, selection.current.start, selection.current.end);
|
|
7397
|
+
}
|
|
7398
|
+
})
|
|
7399
|
+
);
|
|
6831
7400
|
}
|
|
6832
7401
|
|
|
6833
7402
|
// ../renderers/src/TextInputRenderer.tsx
|
|
6834
|
-
var
|
|
7403
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
6835
7404
|
var TextInputRenderer = {
|
|
6836
7405
|
canRenderType: "input-text",
|
|
6837
|
-
render: (props) => {
|
|
6838
|
-
|
|
7406
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(TextInputRendererComponent, __spreadValues({}, props))
|
|
7407
|
+
};
|
|
7408
|
+
function TextInputRendererComponent(props) {
|
|
7409
|
+
const [isSsnVisible, setIsSsnVisible] = (0, import_react32.useState)(false);
|
|
7410
|
+
const _a = props, {
|
|
7411
|
+
id,
|
|
7412
|
+
title,
|
|
7413
|
+
description,
|
|
7414
|
+
help,
|
|
7415
|
+
media,
|
|
7416
|
+
validationState,
|
|
7417
|
+
value: initialValue,
|
|
7418
|
+
onChange
|
|
7419
|
+
} = _a, rest = __objRest(_a, [
|
|
7420
|
+
"id",
|
|
7421
|
+
"title",
|
|
7422
|
+
"description",
|
|
7423
|
+
"help",
|
|
7424
|
+
"media",
|
|
7425
|
+
"validationState",
|
|
7426
|
+
"value",
|
|
7427
|
+
"onChange"
|
|
7428
|
+
]);
|
|
7429
|
+
const value = initialValue != null ? initialValue : "";
|
|
7430
|
+
const isSsnInput = props.control === "ssn-input";
|
|
7431
|
+
const inputProps = __spreadProps(__spreadValues({}, rest), {
|
|
7432
|
+
value,
|
|
7433
|
+
id,
|
|
7434
|
+
isSsnVisible,
|
|
7435
|
+
onChange: (newValue) => {
|
|
7436
|
+
if ((value != null ? value : "") !== (newValue != null ? newValue : "")) {
|
|
7437
|
+
onChange(newValue);
|
|
7438
|
+
}
|
|
7439
|
+
}
|
|
7440
|
+
});
|
|
7441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
7442
|
+
FieldInput_default,
|
|
7443
|
+
{
|
|
6839
7444
|
id,
|
|
6840
|
-
title,
|
|
7445
|
+
label: title,
|
|
6841
7446
|
description,
|
|
7447
|
+
validation: validationState,
|
|
7448
|
+
inlineAlert: props.inlineAlert,
|
|
7449
|
+
loadingState: props.fieldLoadingState,
|
|
6842
7450
|
help,
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
onChange: (newValue) => {
|
|
6862
|
-
if ((value != null ? value : "") !== (newValue != null ? newValue : "")) {
|
|
6863
|
-
onChange(newValue);
|
|
7451
|
+
features: props.features,
|
|
7452
|
+
control: props.control,
|
|
7453
|
+
tags: props.tags,
|
|
7454
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
7455
|
+
import_components74.InputGroup,
|
|
7456
|
+
{
|
|
7457
|
+
addonStart: getInputGroupAddonStart(media),
|
|
7458
|
+
addonEnd: isSsnInput ? {
|
|
7459
|
+
interactive: true,
|
|
7460
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
7461
|
+
SsnInputToggle,
|
|
7462
|
+
{
|
|
7463
|
+
isVisible: isSsnVisible,
|
|
7464
|
+
onClick: () => setIsSsnVisible((visible) => !visible)
|
|
7465
|
+
}
|
|
7466
|
+
)
|
|
7467
|
+
} : void 0,
|
|
7468
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(VariableTextInput, __spreadValues({}, inputProps))
|
|
6864
7469
|
}
|
|
6865
|
-
|
|
6866
|
-
}
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
{
|
|
6870
|
-
id,
|
|
6871
|
-
label: title,
|
|
6872
|
-
description,
|
|
6873
|
-
validation: validationState,
|
|
6874
|
-
inlineAlert: props.inlineAlert,
|
|
6875
|
-
loadingState: props.fieldLoadingState,
|
|
6876
|
-
help,
|
|
6877
|
-
features: props.features,
|
|
6878
|
-
control: props.control,
|
|
6879
|
-
tags: props.tags,
|
|
6880
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_components69.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(VariableTextInput, __spreadValues({}, inputProps)) })
|
|
6881
|
-
}
|
|
6882
|
-
);
|
|
6883
|
-
}
|
|
6884
|
-
};
|
|
7470
|
+
)
|
|
7471
|
+
}
|
|
7472
|
+
);
|
|
7473
|
+
}
|
|
6885
7474
|
var TextInputRenderer_default = TextInputRenderer;
|
|
6886
7475
|
|
|
6887
7476
|
// ../renderers/src/UpdatableRenderer.tsx
|
|
6888
|
-
var
|
|
6889
|
-
var
|
|
7477
|
+
var import_classnames36 = __toESM(require_classnames());
|
|
7478
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
6890
7479
|
var UpdatableRenderer = {
|
|
6891
7480
|
canRenderType: "updatable",
|
|
6892
7481
|
render: ({ children, control, margin, tags }) => {
|
|
6893
|
-
return /* @__PURE__ */ (0,
|
|
7482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: (0, import_classnames36.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children });
|
|
6894
7483
|
}
|
|
6895
7484
|
};
|
|
6896
7485
|
|
|
6897
7486
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
6898
|
-
var
|
|
7487
|
+
var import_components75 = require("@transferwise/components");
|
|
6899
7488
|
|
|
6900
7489
|
// ../renderers/src/utils/getRandomId.ts
|
|
6901
7490
|
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
6902
7491
|
|
|
6903
7492
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
6904
|
-
var
|
|
7493
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
6905
7494
|
var UploadInputRenderer = {
|
|
6906
7495
|
canRenderType: "input-upload",
|
|
6907
7496
|
render: (props) => {
|
|
@@ -6930,7 +7519,7 @@ var UploadInputRenderer = {
|
|
|
6930
7519
|
};
|
|
6931
7520
|
return (
|
|
6932
7521
|
// We don't pass help here as there is no sensible place to display it
|
|
6933
|
-
/* @__PURE__ */ (0,
|
|
7522
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
6934
7523
|
UploadFieldInput_default,
|
|
6935
7524
|
{
|
|
6936
7525
|
id,
|
|
@@ -6940,8 +7529,8 @@ var UploadInputRenderer = {
|
|
|
6940
7529
|
features,
|
|
6941
7530
|
control,
|
|
6942
7531
|
tags,
|
|
6943
|
-
children: /* @__PURE__ */ (0,
|
|
6944
|
-
|
|
7532
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
7533
|
+
import_components75.UploadInput,
|
|
6945
7534
|
{
|
|
6946
7535
|
id,
|
|
6947
7536
|
description,
|
|
@@ -6951,7 +7540,7 @@ var UploadInputRenderer = {
|
|
|
6951
7540
|
{
|
|
6952
7541
|
id: "my-file",
|
|
6953
7542
|
filename: value.name,
|
|
6954
|
-
status: (validationState == null ? void 0 : validationState.status) === "invalid" ?
|
|
7543
|
+
status: (validationState == null ? void 0 : validationState.status) === "invalid" ? import_components75.Status.FAILED : import_components75.Status.SUCCEEDED
|
|
6955
7544
|
}
|
|
6956
7545
|
] : void 0,
|
|
6957
7546
|
fileTypes: acceptsToFileTypes(accepts),
|
|
@@ -7010,7 +7599,7 @@ var LargeUploadRenderer = {
|
|
|
7010
7599
|
};
|
|
7011
7600
|
const filetypes = acceptsToFileTypes(accepts);
|
|
7012
7601
|
const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
|
|
7013
|
-
return /* @__PURE__ */ (0,
|
|
7602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
7014
7603
|
FieldInput_default,
|
|
7015
7604
|
{
|
|
7016
7605
|
id,
|
|
@@ -7021,8 +7610,8 @@ var LargeUploadRenderer = {
|
|
|
7021
7610
|
features,
|
|
7022
7611
|
control,
|
|
7023
7612
|
tags,
|
|
7024
|
-
children: /* @__PURE__ */ (0,
|
|
7025
|
-
|
|
7613
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
7614
|
+
import_components75.Upload,
|
|
7026
7615
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
7027
7616
|
usAccept,
|
|
7028
7617
|
usDisabled: disabled,
|
|
@@ -7037,21 +7626,21 @@ var LargeUploadRenderer = {
|
|
|
7037
7626
|
};
|
|
7038
7627
|
|
|
7039
7628
|
// ../renderers/src/UpsellRenderer.tsx
|
|
7040
|
-
var
|
|
7041
|
-
var
|
|
7042
|
-
var
|
|
7043
|
-
var
|
|
7629
|
+
var import_components76 = require("@transferwise/components");
|
|
7630
|
+
var import_classnames37 = __toESM(require_classnames());
|
|
7631
|
+
var import_react33 = require("react");
|
|
7632
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
7044
7633
|
var UpsellRenderer = {
|
|
7045
7634
|
canRenderType: "upsell",
|
|
7046
7635
|
render: UpsellRendererComponent
|
|
7047
7636
|
};
|
|
7048
7637
|
function UpsellRendererComponent(props) {
|
|
7049
7638
|
const { text, callToAction, media, margin, onDismiss, control, tags } = props;
|
|
7050
|
-
const [isVisible, setIsVisible] = (0,
|
|
7051
|
-
return isVisible ? /* @__PURE__ */ (0,
|
|
7052
|
-
|
|
7639
|
+
const [isVisible, setIsVisible] = (0, import_react33.useState)(true);
|
|
7640
|
+
return isVisible ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
7641
|
+
import_components76.Nudge,
|
|
7053
7642
|
{
|
|
7054
|
-
className: (0,
|
|
7643
|
+
className: (0, import_classnames37.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
|
|
7055
7644
|
mediaName: getMediaName(media),
|
|
7056
7645
|
title: text,
|
|
7057
7646
|
action: __spreadValues({
|
|
@@ -7102,7 +7691,8 @@ var getWiseRenderers = () => [
|
|
|
7102
7691
|
CircularButtonRenderer,
|
|
7103
7692
|
BorderedBackgroundColoredBoxRenderer,
|
|
7104
7693
|
BoxRenderer_default,
|
|
7105
|
-
|
|
7694
|
+
CollectionRendererV2_default,
|
|
7695
|
+
CollectionRendererV1_default,
|
|
7106
7696
|
ButtonRenderer,
|
|
7107
7697
|
ColumnsRenderer_default,
|
|
7108
7698
|
DateInputRenderer_default,
|
|
@@ -7148,13 +7738,13 @@ var getWiseRenderers = () => [
|
|
|
7148
7738
|
];
|
|
7149
7739
|
|
|
7150
7740
|
// ../renderers/src/InitialLoadingStateRenderer.tsx
|
|
7151
|
-
var
|
|
7152
|
-
var
|
|
7741
|
+
var import_components77 = require("@transferwise/components");
|
|
7742
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
7153
7743
|
var InitialLoadingStateRenderer = {
|
|
7154
7744
|
canRenderType: "loading-state",
|
|
7155
7745
|
canRender: ({ stepLoadingState }) => stepLoadingState === "initial",
|
|
7156
|
-
render: () => /* @__PURE__ */ (0,
|
|
7157
|
-
|
|
7746
|
+
render: () => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
7747
|
+
import_components77.Loader,
|
|
7158
7748
|
{
|
|
7159
7749
|
size: "md",
|
|
7160
7750
|
classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin("md")}` },
|
|
@@ -7165,25 +7755,25 @@ var InitialLoadingStateRenderer = {
|
|
|
7165
7755
|
|
|
7166
7756
|
// src/dynamicFlow/DynamicFlowModal.tsx
|
|
7167
7757
|
var import_dynamic_flow_client = require("@wise/dynamic-flow-client");
|
|
7168
|
-
var
|
|
7169
|
-
var
|
|
7758
|
+
var import_components78 = require("@transferwise/components");
|
|
7759
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
7170
7760
|
function DynamicFlowModal(props) {
|
|
7171
7761
|
const _a = props, { className = "" } = _a, rest = __objRest(_a, ["className"]);
|
|
7172
7762
|
const dfProps = useWiseToCoreProps(rest);
|
|
7173
7763
|
const df = (0, import_dynamic_flow_client.useDynamicFlowModal)(dfProps);
|
|
7174
|
-
return /* @__PURE__ */ (0,
|
|
7175
|
-
|
|
7764
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
7765
|
+
import_components78.Modal,
|
|
7176
7766
|
__spreadProps(__spreadValues({
|
|
7177
7767
|
className: `dynamic-flow-modal ${className}`,
|
|
7178
7768
|
disableDimmerClickToClose: true
|
|
7179
7769
|
}, df.modal), {
|
|
7180
|
-
body: /* @__PURE__ */ (0,
|
|
7770
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: "dynamic-flow-modal", children: df.modal.body })
|
|
7181
7771
|
})
|
|
7182
7772
|
);
|
|
7183
7773
|
}
|
|
7184
7774
|
|
|
7185
7775
|
// src/dynamicFlow/getMergedRenderers.tsx
|
|
7186
|
-
var
|
|
7776
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
7187
7777
|
var wiseRenderers = getWiseRenderers();
|
|
7188
7778
|
var getMergedRenderers = (props) => {
|
|
7189
7779
|
var _d, _e;
|
|
@@ -7197,7 +7787,7 @@ var getMergedRenderers = (props) => {
|
|
|
7197
7787
|
method: initialRequest.method,
|
|
7198
7788
|
data: initialRequest.body
|
|
7199
7789
|
};
|
|
7200
|
-
return presentation.type === "push" ? /* @__PURE__ */ (0,
|
|
7790
|
+
return presentation.type === "push" ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
7201
7791
|
DynamicFlowModal,
|
|
7202
7792
|
__spreadProps(__spreadValues(__spreadValues({}, restProps), rest), {
|
|
7203
7793
|
features: subflowFeatures,
|
|
@@ -7276,12 +7866,12 @@ var customEventsToAnalytics = {
|
|
|
7276
7866
|
};
|
|
7277
7867
|
|
|
7278
7868
|
// src/dynamicFlow/useOnCopy.tsx
|
|
7279
|
-
var
|
|
7280
|
-
var
|
|
7869
|
+
var import_react34 = require("react");
|
|
7870
|
+
var import_react_intl40 = require("react-intl");
|
|
7281
7871
|
|
|
7282
7872
|
// src/dynamicFlow/messages.ts
|
|
7283
|
-
var
|
|
7284
|
-
var messages_default = (0,
|
|
7873
|
+
var import_react_intl39 = require("react-intl");
|
|
7874
|
+
var messages_default = (0, import_react_intl39.defineMessages)({
|
|
7285
7875
|
copied: {
|
|
7286
7876
|
id: "df.wise.CopyFeedback.copy",
|
|
7287
7877
|
defaultMessage: "Copied to clipboard",
|
|
@@ -7296,9 +7886,9 @@ var messages_default = (0, import_react_intl35.defineMessages)({
|
|
|
7296
7886
|
|
|
7297
7887
|
// src/dynamicFlow/useOnCopy.tsx
|
|
7298
7888
|
var useOnCopy = () => {
|
|
7299
|
-
const { formatMessage } = (0,
|
|
7889
|
+
const { formatMessage } = (0, import_react_intl40.useIntl)();
|
|
7300
7890
|
const createSnackBar = useSnackBarIfAvailable();
|
|
7301
|
-
return (0,
|
|
7891
|
+
return (0, import_react34.useCallback)(
|
|
7302
7892
|
(copiedContent) => {
|
|
7303
7893
|
if (copiedContent) {
|
|
7304
7894
|
createSnackBar({ text: formatMessage(messages_default.copied) });
|
|
@@ -7311,11 +7901,11 @@ var useOnCopy = () => {
|
|
|
7311
7901
|
};
|
|
7312
7902
|
|
|
7313
7903
|
// src/dynamicFlow/useWiseHttpClient.tsx
|
|
7314
|
-
var
|
|
7315
|
-
var
|
|
7904
|
+
var import_react35 = require("react");
|
|
7905
|
+
var import_react_intl41 = require("react-intl");
|
|
7316
7906
|
var useWiseHttpClient = (httpClient) => {
|
|
7317
|
-
const { locale } = (0,
|
|
7318
|
-
return (0,
|
|
7907
|
+
const { locale } = (0, import_react_intl41.useIntl)();
|
|
7908
|
+
return (0, import_react35.useCallback)(
|
|
7319
7909
|
async (input, init = {}) => {
|
|
7320
7910
|
const headers = new Headers(init.headers);
|
|
7321
7911
|
headers.set("accept-language", locale);
|
|
@@ -7356,10 +7946,10 @@ var useWiseToCoreProps = (props) => {
|
|
|
7356
7946
|
onLog
|
|
7357
7947
|
} = props;
|
|
7358
7948
|
const httpClient = useWiseHttpClient(customFetch);
|
|
7359
|
-
const mergedRenderers = (0,
|
|
7949
|
+
const mergedRenderers = (0, import_react36.useMemo)(() => getMergedRenderers(props), [renderers]);
|
|
7360
7950
|
const createSnackBar = useCreateSnackBar();
|
|
7361
|
-
const logEvent = (0,
|
|
7362
|
-
const trackEvent = (0,
|
|
7951
|
+
const logEvent = (0, import_react36.useMemo)(() => getLogEvent(onLog), [onLog]);
|
|
7952
|
+
const trackEvent = (0, import_react36.useMemo)(() => getTrackEvent(onEvent, onAnalytics), [onEvent, onAnalytics]);
|
|
7363
7953
|
const onCopy = useOnCopy();
|
|
7364
7954
|
return __spreadProps(__spreadValues({}, props), {
|
|
7365
7955
|
httpClient,
|
|
@@ -7394,27 +7984,27 @@ var openLinkInNewTab = (url) => {
|
|
|
7394
7984
|
};
|
|
7395
7985
|
|
|
7396
7986
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
7397
|
-
var
|
|
7987
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
7398
7988
|
function DynamicFlow(props) {
|
|
7399
7989
|
const { className = "" } = props;
|
|
7400
7990
|
const dfProps = useWiseToCoreProps(props);
|
|
7401
7991
|
const df = (0, import_dynamic_flow_client4.useDynamicFlow)(dfProps);
|
|
7402
7992
|
const { onContextMenu, contextMenu } = useDFContextMenu(df.controller);
|
|
7403
|
-
return /* @__PURE__ */ (0,
|
|
7993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className, onContextMenu, children: [
|
|
7404
7994
|
df.view,
|
|
7405
7995
|
contextMenu
|
|
7406
7996
|
] });
|
|
7407
7997
|
}
|
|
7408
7998
|
|
|
7409
7999
|
// src/dynamicFlow/DynamicFlowWithRef.tsx
|
|
7410
|
-
var
|
|
8000
|
+
var import_react37 = require("react");
|
|
7411
8001
|
var import_dynamic_flow_client5 = require("@wise/dynamic-flow-client");
|
|
7412
|
-
var
|
|
7413
|
-
var DynamicFlowWithRef = (0,
|
|
8002
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
8003
|
+
var DynamicFlowWithRef = (0, import_react37.forwardRef)(function DynamicFlowWithRef2(props, ref) {
|
|
7414
8004
|
const { className = "" } = props;
|
|
7415
8005
|
const dfProps = useWiseToCoreProps(props);
|
|
7416
8006
|
const df = (0, import_dynamic_flow_client5.useDynamicFlow)(dfProps);
|
|
7417
|
-
(0,
|
|
8007
|
+
(0, import_react37.useImperativeHandle)(
|
|
7418
8008
|
ref,
|
|
7419
8009
|
() => ({
|
|
7420
8010
|
getValue: () => {
|
|
@@ -7425,7 +8015,7 @@ var DynamicFlowWithRef = (0, import_react31.forwardRef)(function DynamicFlowWith
|
|
|
7425
8015
|
}),
|
|
7426
8016
|
[df]
|
|
7427
8017
|
);
|
|
7428
|
-
return /* @__PURE__ */ (0,
|
|
8018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className, children: df.view });
|
|
7429
8019
|
});
|
|
7430
8020
|
|
|
7431
8021
|
// src/index.ts
|
|
@@ -7487,6 +8077,8 @@ var cs_default = {
|
|
|
7487
8077
|
"df.wise.group.currencies-with-account-details": "M\u011Bny s detaily \xFA\u010Dtu",
|
|
7488
8078
|
"df.wise.group.popular": "Popul\xE1rn\xED",
|
|
7489
8079
|
"df.wise.group.recent": "Ned\xE1vn\xE9",
|
|
8080
|
+
"df.wise.ssnInput.hideValue": "Skr\xFDt hodnotu",
|
|
8081
|
+
"df.wise.ssnInput.showValue": "Zobrazit hodnotu",
|
|
7490
8082
|
"df.wise.step.scrollToBottom": "P\u0159ej\xEDt na konec"
|
|
7491
8083
|
};
|
|
7492
8084
|
|
|
@@ -7537,6 +8129,8 @@ var de_default = {
|
|
|
7537
8129
|
"df.wise.group.currencies-with-account-details": "W\xE4hrungen mit Bankverbindung",
|
|
7538
8130
|
"df.wise.group.popular": "Beliebt",
|
|
7539
8131
|
"df.wise.group.recent": "K\xFCrzlich verwendet",
|
|
8132
|
+
"df.wise.ssnInput.hideValue": "Hide value",
|
|
8133
|
+
"df.wise.ssnInput.showValue": "Show value",
|
|
7540
8134
|
"df.wise.step.scrollToBottom": "Nach unten scrollen"
|
|
7541
8135
|
};
|
|
7542
8136
|
|
|
@@ -7551,6 +8145,8 @@ var en_default = {
|
|
|
7551
8145
|
"df.wise.ButtonLayout.buttonLoadingMessage": "This might take a few seconds",
|
|
7552
8146
|
"df.wise.Collection.clearText": "Clear text",
|
|
7553
8147
|
"df.wise.Collection.loadMoreMessage": "Load more",
|
|
8148
|
+
"df.wise.Collection.showLessResultsButton": "Show less results",
|
|
8149
|
+
"df.wise.Collection.showMoreResultsButton": "Show all {count} results",
|
|
7554
8150
|
"df.wise.ControlFeedback.maxLength": "Please enter {maxLength} or fewer characters.",
|
|
7555
8151
|
"df.wise.ControlFeedback.maximum": "Please enter a number that's {maximum} or less.",
|
|
7556
8152
|
"df.wise.ControlFeedback.maximumDate": "Please enter a date that's on or before {maximum}.",
|
|
@@ -7587,6 +8183,8 @@ var en_default = {
|
|
|
7587
8183
|
"df.wise.group.currencies-with-account-details": "Currencies with account details",
|
|
7588
8184
|
"df.wise.group.popular": "Popular",
|
|
7589
8185
|
"df.wise.group.recent": "Recent",
|
|
8186
|
+
"df.wise.ssnInput.hideValue": "Hide value",
|
|
8187
|
+
"df.wise.ssnInput.showValue": "Show value",
|
|
7590
8188
|
"df.wise.step.scrollToBottom": "Scroll to bottom"
|
|
7591
8189
|
};
|
|
7592
8190
|
|
|
@@ -7637,6 +8235,8 @@ var es_default = {
|
|
|
7637
8235
|
"df.wise.group.currencies-with-account-details": "Divisas con datos de cuenta",
|
|
7638
8236
|
"df.wise.group.popular": "Populares",
|
|
7639
8237
|
"df.wise.group.recent": "Recientes",
|
|
8238
|
+
"df.wise.ssnInput.hideValue": "Ocultar valor",
|
|
8239
|
+
"df.wise.ssnInput.showValue": "Mostrar valor",
|
|
7640
8240
|
"df.wise.step.scrollToBottom": "Despl\xE1zate hasta abajo"
|
|
7641
8241
|
};
|
|
7642
8242
|
|
|
@@ -7687,6 +8287,8 @@ var fr_default = {
|
|
|
7687
8287
|
"df.wise.group.currencies-with-account-details": "Devises avec num\xE9ros de compte",
|
|
7688
8288
|
"df.wise.group.popular": "Populaires",
|
|
7689
8289
|
"df.wise.group.recent": "R\xE9cents",
|
|
8290
|
+
"df.wise.ssnInput.hideValue": "Hide value",
|
|
8291
|
+
"df.wise.ssnInput.showValue": "Show value",
|
|
7690
8292
|
"df.wise.step.scrollToBottom": "Faire d\xE9filer vers le bas"
|
|
7691
8293
|
};
|
|
7692
8294
|
|
|
@@ -7737,6 +8339,8 @@ var hu_default = {
|
|
|
7737
8339
|
"df.wise.group.currencies-with-account-details": "P\xE9nznemek sz\xE1mlaadatokkal",
|
|
7738
8340
|
"df.wise.group.popular": "N\xE9pszer\u0171",
|
|
7739
8341
|
"df.wise.group.recent": "Legut\xF3bbi",
|
|
8342
|
+
"df.wise.ssnInput.hideValue": "\xC9rt\xE9k elrejt\xE9se",
|
|
8343
|
+
"df.wise.ssnInput.showValue": "\xC9rt\xE9k megjelen\xEDt\xE9se",
|
|
7740
8344
|
"df.wise.step.scrollToBottom": "G\xF6rgess legalulra"
|
|
7741
8345
|
};
|
|
7742
8346
|
|
|
@@ -7787,6 +8391,8 @@ var id_default = {
|
|
|
7787
8391
|
"df.wise.group.currencies-with-account-details": "Mata uang dengan detail rekening",
|
|
7788
8392
|
"df.wise.group.popular": "Populer",
|
|
7789
8393
|
"df.wise.group.recent": "Terbaru",
|
|
8394
|
+
"df.wise.ssnInput.hideValue": "Sembunyikan nilai",
|
|
8395
|
+
"df.wise.ssnInput.showValue": "Tampilkan nilai",
|
|
7790
8396
|
"df.wise.step.scrollToBottom": "Gulir ke bawah"
|
|
7791
8397
|
};
|
|
7792
8398
|
|
|
@@ -7837,6 +8443,8 @@ var it_default = {
|
|
|
7837
8443
|
"df.wise.group.currencies-with-account-details": "Valute con estremi del conto",
|
|
7838
8444
|
"df.wise.group.popular": "Popolari",
|
|
7839
8445
|
"df.wise.group.recent": "Recenti",
|
|
8446
|
+
"df.wise.ssnInput.hideValue": "Nascondi valore",
|
|
8447
|
+
"df.wise.ssnInput.showValue": "Mostra valore",
|
|
7840
8448
|
"df.wise.step.scrollToBottom": "Scorri fino in fondo"
|
|
7841
8449
|
};
|
|
7842
8450
|
|
|
@@ -7887,6 +8495,8 @@ var ja_default = {
|
|
|
7887
8495
|
"df.wise.group.currencies-with-account-details": "\u53E3\u5EA7\u60C5\u5831\u3092\u53D6\u5F97\u3067\u304D\u308B\u901A\u8CA8",
|
|
7888
8496
|
"df.wise.group.popular": "\u4EBA\u6C17",
|
|
7889
8497
|
"df.wise.group.recent": "\u6700\u8FD1",
|
|
8498
|
+
"df.wise.ssnInput.hideValue": "\u756A\u53F7\u3092\u975E\u8868\u793A",
|
|
8499
|
+
"df.wise.ssnInput.showValue": "\u756A\u53F7\u3092\u8868\u793A",
|
|
7890
8500
|
"df.wise.step.scrollToBottom": "\u4E0B\u307E\u3067\u30B9\u30AF\u30ED\u30FC\u30EB\u3059\u308B"
|
|
7891
8501
|
};
|
|
7892
8502
|
|
|
@@ -7937,6 +8547,8 @@ var nl_default = {
|
|
|
7937
8547
|
"df.wise.group.currencies-with-account-details": "Valuta's met rekeninggegevens",
|
|
7938
8548
|
"df.wise.group.popular": "Populair",
|
|
7939
8549
|
"df.wise.group.recent": "Recent",
|
|
8550
|
+
"df.wise.ssnInput.hideValue": "Waarde verbergen",
|
|
8551
|
+
"df.wise.ssnInput.showValue": "Waarde weergeven",
|
|
7940
8552
|
"df.wise.step.scrollToBottom": "Scrol omlaag"
|
|
7941
8553
|
};
|
|
7942
8554
|
|
|
@@ -7987,6 +8599,8 @@ var pl_default = {
|
|
|
7987
8599
|
"df.wise.group.currencies-with-account-details": "Waluty z danymi bankowymi",
|
|
7988
8600
|
"df.wise.group.popular": "Popularne",
|
|
7989
8601
|
"df.wise.group.recent": "Ostatnie",
|
|
8602
|
+
"df.wise.ssnInput.hideValue": "Ukryj warto\u015B\u0107",
|
|
8603
|
+
"df.wise.ssnInput.showValue": "Poka\u017C warto\u015B\u0107",
|
|
7990
8604
|
"df.wise.step.scrollToBottom": "Przewi\u0144 w d\xF3\u0142"
|
|
7991
8605
|
};
|
|
7992
8606
|
|
|
@@ -8037,6 +8651,8 @@ var pt_default = {
|
|
|
8037
8651
|
"df.wise.group.currencies-with-account-details": "Moedas com dados de conta",
|
|
8038
8652
|
"df.wise.group.popular": "Popular",
|
|
8039
8653
|
"df.wise.group.recent": "Recente",
|
|
8654
|
+
"df.wise.ssnInput.hideValue": "Ocultar valor",
|
|
8655
|
+
"df.wise.ssnInput.showValue": "Exibir valor",
|
|
8040
8656
|
"df.wise.step.scrollToBottom": "Descer at\xE9 o final da p\xE1gina"
|
|
8041
8657
|
};
|
|
8042
8658
|
|
|
@@ -8087,6 +8703,8 @@ var ro_default = {
|
|
|
8087
8703
|
"df.wise.group.currencies-with-account-details": "Monede cu detalii de cont",
|
|
8088
8704
|
"df.wise.group.popular": "Populare",
|
|
8089
8705
|
"df.wise.group.recent": "Recente",
|
|
8706
|
+
"df.wise.ssnInput.hideValue": "Ascunde valoarea",
|
|
8707
|
+
"df.wise.ssnInput.showValue": "Arat\u0103 valoarea",
|
|
8090
8708
|
"df.wise.step.scrollToBottom": "Deruleaz\u0103 \xEEn jos"
|
|
8091
8709
|
};
|
|
8092
8710
|
|
|
@@ -8137,6 +8755,8 @@ var ru_default = {
|
|
|
8137
8755
|
"df.wise.group.currencies-with-account-details": "\u0412\u0430\u043B\u044E\u0442\u044B \u0441 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u0430\u043C\u0438 \u0441\u0447\u0435\u0442\u0430",
|
|
8138
8756
|
"df.wise.group.popular": "\u041F\u043E\u043F\u0443\u043B\u044F\u0440\u043D\u044B\u0435",
|
|
8139
8757
|
"df.wise.group.recent": "\u041D\u0435\u0434\u0430\u0432\u043D\u0438\u0435",
|
|
8758
|
+
"df.wise.ssnInput.hideValue": "\u0421\u043A\u0440\u044B\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435",
|
|
8759
|
+
"df.wise.ssnInput.showValue": "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435",
|
|
8140
8760
|
"df.wise.step.scrollToBottom": "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0439\u0442\u0435 \u0432\u043D\u0438\u0437"
|
|
8141
8761
|
};
|
|
8142
8762
|
|
|
@@ -8187,6 +8807,8 @@ var th_default = {
|
|
|
8187
8807
|
"df.wise.group.currencies-with-account-details": "\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19\u0E15\u0E48\u0E32\u0E07\u0E46 \u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E1A\u0E31\u0E0D\u0E0A\u0E35",
|
|
8188
8808
|
"df.wise.group.popular": "\u0E2A\u0E01\u0E38\u0E25\u0E22\u0E2D\u0E14\u0E19\u0E34\u0E22\u0E21",
|
|
8189
8809
|
"df.wise.group.recent": "\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14",
|
|
8810
|
+
"df.wise.ssnInput.hideValue": "\u0E0B\u0E48\u0E2D\u0E19\u0E04\u0E48\u0E32",
|
|
8811
|
+
"df.wise.ssnInput.showValue": "\u0E41\u0E2A\u0E14\u0E07\u0E04\u0E48\u0E32",
|
|
8190
8812
|
"df.wise.step.scrollToBottom": "\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E44\u0E1B\u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07"
|
|
8191
8813
|
};
|
|
8192
8814
|
|
|
@@ -8237,6 +8859,8 @@ var tr_default = {
|
|
|
8237
8859
|
"df.wise.group.currencies-with-account-details": "Hesap bilgileri olan bakiyeler",
|
|
8238
8860
|
"df.wise.group.popular": "Pop\xFCler",
|
|
8239
8861
|
"df.wise.group.recent": "Yak\u0131n zamanl\u0131",
|
|
8862
|
+
"df.wise.ssnInput.hideValue": "Hide value",
|
|
8863
|
+
"df.wise.ssnInput.showValue": "Show value",
|
|
8240
8864
|
"df.wise.step.scrollToBottom": "A\u015Fa\u011F\u0131 kayd\u0131r"
|
|
8241
8865
|
};
|
|
8242
8866
|
|
|
@@ -8287,6 +8911,8 @@ var zh_CN_default = {
|
|
|
8287
8911
|
"df.wise.group.currencies-with-account-details": "\u5E26\u6709\u8D26\u6237\u8BE6\u7EC6\u4FE1\u606F\u7684\u8D27\u5E01",
|
|
8288
8912
|
"df.wise.group.popular": "\u70ED\u95E8",
|
|
8289
8913
|
"df.wise.group.recent": "\u6700\u8FD1",
|
|
8914
|
+
"df.wise.ssnInput.hideValue": "Hide value",
|
|
8915
|
+
"df.wise.ssnInput.showValue": "Show value",
|
|
8290
8916
|
"df.wise.step.scrollToBottom": "\u6EDA\u52A8\u5230\u5E95\u90E8"
|
|
8291
8917
|
};
|
|
8292
8918
|
|
|
@@ -8337,6 +8963,8 @@ var zh_HK_default = {
|
|
|
8337
8963
|
"df.wise.group.currencies-with-account-details": "\u63D0\u4F9B\u5E33\u6236\u8CC7\u6599\u7684\u8CA8\u5E63",
|
|
8338
8964
|
"df.wise.group.popular": "\u71B1\u9580",
|
|
8339
8965
|
"df.wise.group.recent": "\u6700\u8FD1\u7684",
|
|
8966
|
+
"df.wise.ssnInput.hideValue": "\u96B1\u85CF\u503C",
|
|
8967
|
+
"df.wise.ssnInput.showValue": "\u986F\u793A\u503C",
|
|
8340
8968
|
"df.wise.step.scrollToBottom": "\u6ED1\u52D5\u5230\u6700\u5E95\u90E8"
|
|
8341
8969
|
};
|
|
8342
8970
|
|