@wise/dynamic-flow-client-internal 5.30.1-experimental-1e1196b → 5.31.0-experimental-a2135d6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/main.css +0 -25
- package/build/main.js +167 -164
- package/build/main.mjs +160 -156
- package/build/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +4 -4
package/build/main.css
CHANGED
|
@@ -387,31 +387,6 @@
|
|
|
387
387
|
.df-prefer-container-queries {
|
|
388
388
|
container-type: inline-size;
|
|
389
389
|
}
|
|
390
|
-
|
|
391
|
-
.df-ssn-input-wrapper {
|
|
392
|
-
position: relative;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
.df-ssn-input {
|
|
396
|
-
padding-right: 3.5rem;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
.df-ssn-input-toggle {
|
|
400
|
-
align-items: center;
|
|
401
|
-
background: transparent;
|
|
402
|
-
border: 0;
|
|
403
|
-
color: inherit;
|
|
404
|
-
cursor: pointer;
|
|
405
|
-
display: flex;
|
|
406
|
-
height: 100%;
|
|
407
|
-
justify-content: center;
|
|
408
|
-
padding: 0;
|
|
409
|
-
position: absolute;
|
|
410
|
-
right: 0;
|
|
411
|
-
top: 0;
|
|
412
|
-
width: 3.5rem;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
390
|
.df-context-menu {
|
|
416
391
|
position: fixed;
|
|
417
392
|
z-index: 10;
|
package/build/main.js
CHANGED
|
@@ -336,7 +336,7 @@ var recursivelyRemoveNullish = (element) => {
|
|
|
336
336
|
};
|
|
337
337
|
|
|
338
338
|
// src/dynamicFlow/useWiseToCoreProps.tsx
|
|
339
|
-
var
|
|
339
|
+
var import_react32 = require("react");
|
|
340
340
|
|
|
341
341
|
// src/dynamicFlow/getMergedRenderers.tsx
|
|
342
342
|
var import_dynamic_flow_client2 = require("@wise/dynamic-flow-client");
|
|
@@ -6779,6 +6779,7 @@ function ChipsTabsRendererComponent({ margin, tabs, control, tags }) {
|
|
|
6779
6779
|
|
|
6780
6780
|
// ../renderers/src/TextInputRenderer.tsx
|
|
6781
6781
|
var import_components69 = require("@transferwise/components");
|
|
6782
|
+
var import_react28 = require("react");
|
|
6782
6783
|
|
|
6783
6784
|
// ../renderers/src/components/VariableTextInput.tsx
|
|
6784
6785
|
var import_components68 = require("@transferwise/components");
|
|
@@ -6806,7 +6807,7 @@ function formatSsnValue(rawValue, displayFormat, isVisible) {
|
|
|
6806
6807
|
if (!displayFormat) {
|
|
6807
6808
|
return isVisible ? rawValue : "\u2022".repeat(rawValue.length);
|
|
6808
6809
|
}
|
|
6809
|
-
|
|
6810
|
+
const formattedValue = displayFormat.split("").reduce(
|
|
6810
6811
|
({ display, digitsUsed }, character) => {
|
|
6811
6812
|
if (character === "*") {
|
|
6812
6813
|
return digitsUsed < rawValue.length ? {
|
|
@@ -6818,6 +6819,9 @@ function formatSsnValue(rawValue, displayFormat, isVisible) {
|
|
|
6818
6819
|
},
|
|
6819
6820
|
{ display: "", digitsUsed: 0 }
|
|
6820
6821
|
).display;
|
|
6822
|
+
const displayFormatDigitCount = displayFormat.split("").filter((character) => character === "*").length;
|
|
6823
|
+
const extraValue = rawValue.slice(displayFormatDigitCount);
|
|
6824
|
+
return `${formattedValue}${isVisible ? extraValue : "\u2022".repeat(extraValue.length)}`;
|
|
6821
6825
|
}
|
|
6822
6826
|
function getRawOffset(displayValue, displayOffset, rawValueLength) {
|
|
6823
6827
|
return Math.min(
|
|
@@ -6825,18 +6829,15 @@ function getRawOffset(displayValue, displayOffset, rawValueLength) {
|
|
|
6825
6829
|
rawValueLength
|
|
6826
6830
|
);
|
|
6827
6831
|
}
|
|
6828
|
-
function replaceSsnSelection(rawValue, displayValue, insertedValue, start, end
|
|
6832
|
+
function replaceSsnSelection(rawValue, displayValue, insertedValue, start, end) {
|
|
6829
6833
|
const startOffset = getRawOffset(displayValue, start, rawValue.length);
|
|
6830
6834
|
const endOffset = getRawOffset(displayValue, end, rawValue.length);
|
|
6831
|
-
|
|
6832
|
-
const availableCapacity = Math.max(0, maxDigits - (rawValue.length - selectedLength));
|
|
6833
|
-
const acceptedInsertedValue = insertedValue.slice(0, availableCapacity);
|
|
6834
|
-
if (!acceptedInsertedValue) {
|
|
6835
|
+
if (!insertedValue) {
|
|
6835
6836
|
return void 0;
|
|
6836
6837
|
}
|
|
6837
6838
|
return {
|
|
6838
|
-
value: `${rawValue.slice(0, startOffset)}${
|
|
6839
|
-
caret: startOffset +
|
|
6839
|
+
value: `${rawValue.slice(0, startOffset)}${insertedValue}${rawValue.slice(endOffset)}`,
|
|
6840
|
+
caret: startOffset + insertedValue.length
|
|
6840
6841
|
};
|
|
6841
6842
|
}
|
|
6842
6843
|
function deleteSsnSelection(rawValue, displayValue, start, end, backward) {
|
|
@@ -6888,16 +6889,15 @@ var commonKeys = [
|
|
|
6888
6889
|
"value"
|
|
6889
6890
|
];
|
|
6890
6891
|
function VariableTextInput(inputProps) {
|
|
6891
|
-
const { id, value, control, onChange } = inputProps;
|
|
6892
|
+
const { id, value, control, onChange, isSsnVisible } = inputProps;
|
|
6892
6893
|
const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
|
|
6893
|
-
if (control === "ssn-input") {
|
|
6894
|
-
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(SsnInput, __spreadProps(__spreadValues({}, commonProps), { maxLength: inputProps.maxLength, onChange }));
|
|
6895
|
-
}
|
|
6896
6894
|
switch (control) {
|
|
6897
6895
|
case "email":
|
|
6898
6896
|
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
|
|
6899
6897
|
case "password":
|
|
6900
6898
|
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
|
|
6899
|
+
case "ssn-input":
|
|
6900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(SsnInput, __spreadProps(__spreadValues({}, commonProps), { isVisible: isSsnVisible, onChange }));
|
|
6901
6901
|
case "numeric": {
|
|
6902
6902
|
const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
|
|
6903
6903
|
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
@@ -6917,6 +6917,23 @@ function VariableTextInput(inputProps) {
|
|
|
6917
6917
|
}
|
|
6918
6918
|
}
|
|
6919
6919
|
}
|
|
6920
|
+
function SsnInputToggle({
|
|
6921
|
+
isVisible,
|
|
6922
|
+
onClick
|
|
6923
|
+
}) {
|
|
6924
|
+
const { formatMessage } = (0, import_react_intl36.useIntl)();
|
|
6925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
6926
|
+
import_components68.IconButton,
|
|
6927
|
+
{
|
|
6928
|
+
priority: "minimal",
|
|
6929
|
+
size: 24,
|
|
6930
|
+
"aria-label": formatMessage(isVisible ? ssn_input_messages_default.hideValue : ssn_input_messages_default.showValue),
|
|
6931
|
+
"aria-pressed": isVisible,
|
|
6932
|
+
onClick,
|
|
6933
|
+
children: isVisible ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_icons7.EyeShut, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_icons7.Eye, { size: 24 })
|
|
6934
|
+
}
|
|
6935
|
+
);
|
|
6936
|
+
}
|
|
6920
6937
|
function TextInput(props) {
|
|
6921
6938
|
const _a = props, { control, displayFormat, onChange, type } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange", "type"]);
|
|
6922
6939
|
const InputWithPattern = control === "textarea" ? import_components68.TextareaWithDisplayFormat : import_components68.InputWithDisplayFormat;
|
|
@@ -6924,26 +6941,11 @@ function TextInput(props) {
|
|
|
6924
6941
|
return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { type, onChange: (e) => onChange(e.target.value) }));
|
|
6925
6942
|
}
|
|
6926
6943
|
function SsnInput(props) {
|
|
6927
|
-
const _a = props, {
|
|
6928
|
-
displayFormat = "",
|
|
6929
|
-
maxLength,
|
|
6930
|
-
onChange,
|
|
6931
|
-
type: _type,
|
|
6932
|
-
value = ""
|
|
6933
|
-
} = _a, commonProps = __objRest(_a, [
|
|
6934
|
-
"displayFormat",
|
|
6935
|
-
"maxLength",
|
|
6936
|
-
"onChange",
|
|
6937
|
-
"type",
|
|
6938
|
-
"value"
|
|
6939
|
-
]);
|
|
6940
|
-
const { formatMessage } = (0, import_react_intl36.useIntl)();
|
|
6941
|
-
const [isVisible, setIsVisible] = (0, import_react27.useState)(false);
|
|
6944
|
+
const _a = props, { displayFormat = "", isVisible = false, onChange, value = "" } = _a, commonProps = __objRest(_a, ["displayFormat", "isVisible", "onChange", "value"]);
|
|
6942
6945
|
const [editVersion, setEditVersion] = (0, import_react27.useState)(0);
|
|
6943
6946
|
const inputRef = (0, import_react27.useRef)(null);
|
|
6944
6947
|
const selection = (0, import_react27.useRef)({ start: 0, end: 0 });
|
|
6945
6948
|
const pendingCaret = (0, import_react27.useRef)(null);
|
|
6946
|
-
const maxDigits = displayFormat.split("").filter((character) => character === "*").length || maxLength || Infinity;
|
|
6947
6949
|
const rawValue = value.replace(/\D/g, "");
|
|
6948
6950
|
const formattedValue = formatSsnValue(rawValue, displayFormat, isVisible);
|
|
6949
6951
|
const scheduleCaret = (rawOffset) => {
|
|
@@ -6951,14 +6953,7 @@ function SsnInput(props) {
|
|
|
6951
6953
|
setEditVersion((version) => version + 1);
|
|
6952
6954
|
};
|
|
6953
6955
|
const replaceSelection = (insertedValue, start, end) => {
|
|
6954
|
-
const result = replaceSsnSelection(
|
|
6955
|
-
rawValue,
|
|
6956
|
-
formattedValue,
|
|
6957
|
-
insertedValue,
|
|
6958
|
-
start,
|
|
6959
|
-
end,
|
|
6960
|
-
maxDigits
|
|
6961
|
-
);
|
|
6956
|
+
const result = replaceSsnSelection(rawValue, formattedValue, insertedValue, start, end);
|
|
6962
6957
|
if (!result) {
|
|
6963
6958
|
return;
|
|
6964
6959
|
}
|
|
@@ -6980,134 +6975,140 @@ function SsnInput(props) {
|
|
|
6980
6975
|
);
|
|
6981
6976
|
pendingCaret.current = null;
|
|
6982
6977
|
}, [editVersion, formattedValue, rawValue]);
|
|
6983
|
-
return /* @__PURE__ */ (0, import_jsx_runtime100.
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
value
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
const
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
};
|
|
7022
|
-
if (/^\d$/.test(event.key)) {
|
|
7023
|
-
event.preventDefault();
|
|
7024
|
-
replaceSelection(event.key, selection.current.start, selection.current.end);
|
|
7025
|
-
} else if (event.key === "Backspace") {
|
|
7026
|
-
event.preventDefault();
|
|
7027
|
-
deleteSelection(selection.current.start, selection.current.end, true);
|
|
7028
|
-
} else if (event.key === "Delete") {
|
|
7029
|
-
event.preventDefault();
|
|
7030
|
-
deleteSelection(selection.current.start, selection.current.end, false);
|
|
7031
|
-
}
|
|
7032
|
-
},
|
|
7033
|
-
onPaste: (event) => {
|
|
7034
|
-
var _a2, _b;
|
|
6978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
6979
|
+
"input",
|
|
6980
|
+
__spreadProps(__spreadValues({
|
|
6981
|
+
ref: inputRef
|
|
6982
|
+
}, commonProps), {
|
|
6983
|
+
className: "form-control np-form-control np-input np-input--shape-rectangle",
|
|
6984
|
+
type: "text",
|
|
6985
|
+
inputMode: "numeric",
|
|
6986
|
+
value: formattedValue,
|
|
6987
|
+
onChange: (event) => {
|
|
6988
|
+
const nextValue = event.currentTarget.value;
|
|
6989
|
+
const inputType = event.nativeEvent.inputType;
|
|
6990
|
+
const start = selection.current.start;
|
|
6991
|
+
const end = selection.current.end;
|
|
6992
|
+
if (isVisible || /^\d+$/.test(nextValue)) {
|
|
6993
|
+
const nextRawValue = nextValue.replace(/\D/g, "");
|
|
6994
|
+
scheduleCaret(nextRawValue.length);
|
|
6995
|
+
onChange(nextRawValue);
|
|
6996
|
+
} else if ((inputType == null ? void 0 : inputType.startsWith("delete")) || nextValue.length < formattedValue.length) {
|
|
6997
|
+
deleteSelection(start, end, inputType === "deleteContentBackward");
|
|
6998
|
+
} else {
|
|
6999
|
+
replaceSelection(nextValue.replace(/\D/g, ""), start, end);
|
|
7000
|
+
}
|
|
7001
|
+
},
|
|
7002
|
+
onSelect: (event) => {
|
|
7003
|
+
var _a2, _b;
|
|
7004
|
+
selection.current = {
|
|
7005
|
+
start: (_a2 = event.currentTarget.selectionStart) != null ? _a2 : 0,
|
|
7006
|
+
end: (_b = event.currentTarget.selectionEnd) != null ? _b : 0
|
|
7007
|
+
};
|
|
7008
|
+
},
|
|
7009
|
+
onKeyDown: (event) => {
|
|
7010
|
+
var _a2, _b;
|
|
7011
|
+
selection.current = {
|
|
7012
|
+
start: (_a2 = event.currentTarget.selectionStart) != null ? _a2 : 0,
|
|
7013
|
+
end: (_b = event.currentTarget.selectionEnd) != null ? _b : 0
|
|
7014
|
+
};
|
|
7015
|
+
if (/^\d$/.test(event.key)) {
|
|
7035
7016
|
event.preventDefault();
|
|
7036
|
-
selection.current
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7017
|
+
replaceSelection(event.key, selection.current.start, selection.current.end);
|
|
7018
|
+
} else if (event.key === "Backspace") {
|
|
7019
|
+
event.preventDefault();
|
|
7020
|
+
deleteSelection(selection.current.start, selection.current.end, true);
|
|
7021
|
+
} else if (event.key === "Delete") {
|
|
7022
|
+
event.preventDefault();
|
|
7023
|
+
deleteSelection(selection.current.start, selection.current.end, false);
|
|
7042
7024
|
}
|
|
7043
|
-
}
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
"
|
|
7052
|
-
|
|
7053
|
-
children: isVisible ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_icons7.EyeShut, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_icons7.Eye, { size: 24 })
|
|
7025
|
+
},
|
|
7026
|
+
onPaste: (event) => {
|
|
7027
|
+
var _a2, _b;
|
|
7028
|
+
event.preventDefault();
|
|
7029
|
+
selection.current = {
|
|
7030
|
+
start: (_a2 = event.currentTarget.selectionStart) != null ? _a2 : 0,
|
|
7031
|
+
end: (_b = event.currentTarget.selectionEnd) != null ? _b : 0
|
|
7032
|
+
};
|
|
7033
|
+
const pastedValue = event.clipboardData.getData("text").replace(/\D/g, "");
|
|
7034
|
+
replaceSelection(pastedValue, selection.current.start, selection.current.end);
|
|
7054
7035
|
}
|
|
7055
|
-
)
|
|
7056
|
-
|
|
7036
|
+
})
|
|
7037
|
+
);
|
|
7057
7038
|
}
|
|
7058
7039
|
|
|
7059
7040
|
// ../renderers/src/TextInputRenderer.tsx
|
|
7060
7041
|
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
7061
7042
|
var TextInputRenderer = {
|
|
7062
7043
|
canRenderType: "input-text",
|
|
7063
|
-
render: (props) => {
|
|
7064
|
-
|
|
7044
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(TextInputRendererComponent, __spreadValues({}, props))
|
|
7045
|
+
};
|
|
7046
|
+
function TextInputRendererComponent(props) {
|
|
7047
|
+
const [isSsnVisible, setIsSsnVisible] = (0, import_react28.useState)(false);
|
|
7048
|
+
const _a = props, {
|
|
7049
|
+
id,
|
|
7050
|
+
title,
|
|
7051
|
+
description,
|
|
7052
|
+
help,
|
|
7053
|
+
media,
|
|
7054
|
+
validationState,
|
|
7055
|
+
value: initialValue,
|
|
7056
|
+
onChange
|
|
7057
|
+
} = _a, rest = __objRest(_a, [
|
|
7058
|
+
"id",
|
|
7059
|
+
"title",
|
|
7060
|
+
"description",
|
|
7061
|
+
"help",
|
|
7062
|
+
"media",
|
|
7063
|
+
"validationState",
|
|
7064
|
+
"value",
|
|
7065
|
+
"onChange"
|
|
7066
|
+
]);
|
|
7067
|
+
const value = initialValue != null ? initialValue : "";
|
|
7068
|
+
const isSsnInput = props.control === "ssn-input";
|
|
7069
|
+
const inputProps = __spreadProps(__spreadValues({}, rest), {
|
|
7070
|
+
value,
|
|
7071
|
+
id,
|
|
7072
|
+
isSsnVisible,
|
|
7073
|
+
onChange: (newValue) => {
|
|
7074
|
+
if ((value != null ? value : "") !== (newValue != null ? newValue : "")) {
|
|
7075
|
+
onChange(newValue);
|
|
7076
|
+
}
|
|
7077
|
+
}
|
|
7078
|
+
});
|
|
7079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
7080
|
+
FieldInput_default,
|
|
7081
|
+
{
|
|
7065
7082
|
id,
|
|
7066
|
-
title,
|
|
7083
|
+
label: title,
|
|
7067
7084
|
description,
|
|
7085
|
+
validation: validationState,
|
|
7086
|
+
inlineAlert: props.inlineAlert,
|
|
7087
|
+
loadingState: props.fieldLoadingState,
|
|
7068
7088
|
help,
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
onChange: (newValue) => {
|
|
7088
|
-
if ((value != null ? value : "") !== (newValue != null ? newValue : "")) {
|
|
7089
|
-
onChange(newValue);
|
|
7089
|
+
features: props.features,
|
|
7090
|
+
control: props.control,
|
|
7091
|
+
tags: props.tags,
|
|
7092
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
7093
|
+
import_components69.InputGroup,
|
|
7094
|
+
{
|
|
7095
|
+
addonStart: getInputGroupAddonStart(media),
|
|
7096
|
+
addonEnd: isSsnInput ? {
|
|
7097
|
+
interactive: true,
|
|
7098
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
7099
|
+
SsnInputToggle,
|
|
7100
|
+
{
|
|
7101
|
+
isVisible: isSsnVisible,
|
|
7102
|
+
onClick: () => setIsSsnVisible((visible) => !visible)
|
|
7103
|
+
}
|
|
7104
|
+
)
|
|
7105
|
+
} : void 0,
|
|
7106
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(VariableTextInput, __spreadValues({}, inputProps))
|
|
7090
7107
|
}
|
|
7091
|
-
|
|
7092
|
-
}
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
{
|
|
7096
|
-
id,
|
|
7097
|
-
label: title,
|
|
7098
|
-
description,
|
|
7099
|
-
validation: validationState,
|
|
7100
|
-
inlineAlert: props.inlineAlert,
|
|
7101
|
-
loadingState: props.fieldLoadingState,
|
|
7102
|
-
help,
|
|
7103
|
-
features: props.features,
|
|
7104
|
-
control: props.control,
|
|
7105
|
-
tags: props.tags,
|
|
7106
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_components69.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(VariableTextInput, __spreadValues({}, inputProps)) })
|
|
7107
|
-
}
|
|
7108
|
-
);
|
|
7109
|
-
}
|
|
7110
|
-
};
|
|
7108
|
+
)
|
|
7109
|
+
}
|
|
7110
|
+
);
|
|
7111
|
+
}
|
|
7111
7112
|
var TextInputRenderer_default = TextInputRenderer;
|
|
7112
7113
|
|
|
7113
7114
|
// ../renderers/src/UpdatableRenderer.tsx
|
|
@@ -7265,7 +7266,7 @@ var LargeUploadRenderer = {
|
|
|
7265
7266
|
// ../renderers/src/UpsellRenderer.tsx
|
|
7266
7267
|
var import_components71 = require("@transferwise/components");
|
|
7267
7268
|
var import_classnames35 = __toESM(require_classnames());
|
|
7268
|
-
var
|
|
7269
|
+
var import_react29 = require("react");
|
|
7269
7270
|
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
7270
7271
|
var UpsellRenderer = {
|
|
7271
7272
|
canRenderType: "upsell",
|
|
@@ -7273,7 +7274,7 @@ var UpsellRenderer = {
|
|
|
7273
7274
|
};
|
|
7274
7275
|
function UpsellRendererComponent(props) {
|
|
7275
7276
|
const { text, callToAction, media, margin, onDismiss, control, tags } = props;
|
|
7276
|
-
const [isVisible, setIsVisible] = (0,
|
|
7277
|
+
const [isVisible, setIsVisible] = (0, import_react29.useState)(true);
|
|
7277
7278
|
return isVisible ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
7278
7279
|
import_components71.Nudge,
|
|
7279
7280
|
{
|
|
@@ -7502,7 +7503,7 @@ var customEventsToAnalytics = {
|
|
|
7502
7503
|
};
|
|
7503
7504
|
|
|
7504
7505
|
// src/dynamicFlow/useOnCopy.tsx
|
|
7505
|
-
var
|
|
7506
|
+
var import_react30 = require("react");
|
|
7506
7507
|
var import_react_intl38 = require("react-intl");
|
|
7507
7508
|
|
|
7508
7509
|
// src/dynamicFlow/messages.ts
|
|
@@ -7524,7 +7525,7 @@ var messages_default = (0, import_react_intl37.defineMessages)({
|
|
|
7524
7525
|
var useOnCopy = () => {
|
|
7525
7526
|
const { formatMessage } = (0, import_react_intl38.useIntl)();
|
|
7526
7527
|
const createSnackBar = useSnackBarIfAvailable();
|
|
7527
|
-
return (0,
|
|
7528
|
+
return (0, import_react30.useCallback)(
|
|
7528
7529
|
(copiedContent) => {
|
|
7529
7530
|
if (copiedContent) {
|
|
7530
7531
|
createSnackBar({ text: formatMessage(messages_default.copied) });
|
|
@@ -7537,11 +7538,11 @@ var useOnCopy = () => {
|
|
|
7537
7538
|
};
|
|
7538
7539
|
|
|
7539
7540
|
// src/dynamicFlow/useWiseHttpClient.tsx
|
|
7540
|
-
var
|
|
7541
|
+
var import_react31 = require("react");
|
|
7541
7542
|
var import_react_intl39 = require("react-intl");
|
|
7542
7543
|
var useWiseHttpClient = (httpClient) => {
|
|
7543
7544
|
const { locale } = (0, import_react_intl39.useIntl)();
|
|
7544
|
-
return (0,
|
|
7545
|
+
return (0, import_react31.useCallback)(
|
|
7545
7546
|
async (input, init = {}) => {
|
|
7546
7547
|
const headers = new Headers(init.headers);
|
|
7547
7548
|
headers.set("accept-language", locale);
|
|
@@ -7582,10 +7583,10 @@ var useWiseToCoreProps = (props) => {
|
|
|
7582
7583
|
onLog
|
|
7583
7584
|
} = props;
|
|
7584
7585
|
const httpClient = useWiseHttpClient(customFetch);
|
|
7585
|
-
const mergedRenderers = (0,
|
|
7586
|
+
const mergedRenderers = (0, import_react32.useMemo)(() => getMergedRenderers(props), [renderers]);
|
|
7586
7587
|
const createSnackBar = useCreateSnackBar();
|
|
7587
|
-
const logEvent = (0,
|
|
7588
|
-
const trackEvent = (0,
|
|
7588
|
+
const logEvent = (0, import_react32.useMemo)(() => getLogEvent(onLog), [onLog]);
|
|
7589
|
+
const trackEvent = (0, import_react32.useMemo)(() => getTrackEvent(onEvent, onAnalytics), [onEvent, onAnalytics]);
|
|
7589
7590
|
const onCopy = useOnCopy();
|
|
7590
7591
|
return __spreadProps(__spreadValues({}, props), {
|
|
7591
7592
|
httpClient,
|
|
@@ -7633,14 +7634,14 @@ function DynamicFlow(props) {
|
|
|
7633
7634
|
}
|
|
7634
7635
|
|
|
7635
7636
|
// src/dynamicFlow/DynamicFlowWithRef.tsx
|
|
7636
|
-
var
|
|
7637
|
+
var import_react33 = require("react");
|
|
7637
7638
|
var import_dynamic_flow_client5 = require("@wise/dynamic-flow-client");
|
|
7638
7639
|
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
7639
|
-
var DynamicFlowWithRef = (0,
|
|
7640
|
+
var DynamicFlowWithRef = (0, import_react33.forwardRef)(function DynamicFlowWithRef2(props, ref) {
|
|
7640
7641
|
const { className = "" } = props;
|
|
7641
7642
|
const dfProps = useWiseToCoreProps(props);
|
|
7642
7643
|
const df = (0, import_dynamic_flow_client5.useDynamicFlow)(dfProps);
|
|
7643
|
-
(0,
|
|
7644
|
+
(0, import_react33.useImperativeHandle)(
|
|
7644
7645
|
ref,
|
|
7645
7646
|
() => ({
|
|
7646
7647
|
getValue: () => {
|
|
@@ -7813,6 +7814,8 @@ var en_default = {
|
|
|
7813
7814
|
"df.wise.group.currencies-with-account-details": "Currencies with account details",
|
|
7814
7815
|
"df.wise.group.popular": "Popular",
|
|
7815
7816
|
"df.wise.group.recent": "Recent",
|
|
7817
|
+
"df.wise.ssnInput.hideValue": "Hide value",
|
|
7818
|
+
"df.wise.ssnInput.showValue": "Show value",
|
|
7816
7819
|
"df.wise.step.scrollToBottom": "Scroll to bottom"
|
|
7817
7820
|
};
|
|
7818
7821
|
|