@wise/dynamic-flow-client-internal 5.15.0 → 5.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/build/i18n/zh_HK.json +1 -1
- package/build/main.js +26 -50
- package/build/main.mjs +13 -37
- package/build/tsconfig.types.tsbuildinfo +1 -1
- package/build/types/dynamicFlow/getMergedRenderers.d.ts.map +1 -1
- package/package.json +5 -6
package/README.md
CHANGED
|
@@ -19,20 +19,20 @@ npm install @wise/dynamic-flow-client-internal
|
|
|
19
19
|
pnpm install @wise/dynamic-flow-client-internal
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
2. Install required peer dependencies (if not already installed). Please refer to setup instructions for `@transferwise/components`
|
|
22
|
+
2. Install required peer dependencies (if not already installed). Please refer to setup instructions for `@transferwise/components` if installing for the first time.
|
|
23
23
|
|
|
24
24
|
```
|
|
25
25
|
# yarn
|
|
26
26
|
yarn add prop-types react react-dom react-intl
|
|
27
|
-
yarn add @transferwise/components @transferwise/formatting @transferwise/icons
|
|
27
|
+
yarn add @transferwise/components @transferwise/formatting @transferwise/icons
|
|
28
28
|
|
|
29
29
|
# npm
|
|
30
30
|
npm install prop-types react react-dom react-intl
|
|
31
|
-
npm install @transferwise/components @transferwise/formatting @transferwise/icons
|
|
31
|
+
npm install @transferwise/components @transferwise/formatting @transferwise/icons
|
|
32
32
|
|
|
33
33
|
# pnpm
|
|
34
34
|
pnpm install prop-types react react-dom react-intl
|
|
35
|
-
pnpm install @transferwise/components @transferwise/formatting @transferwise/icons
|
|
35
|
+
pnpm install @transferwise/components @transferwise/formatting @transferwise/icons
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
**Note:** Keep in mind that some of these dependencies have their own peer dependencies. Don't forget to install those, for instance: `@transferwise/components` needs `@wise/art` and `@wise/components-theming`.
|
package/build/i18n/zh_HK.json
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"df.wise.filter.placeholder": "開始輸入以搜尋",
|
|
39
39
|
"df.wise.filter.results": "搜尋結果",
|
|
40
40
|
"df.wise.group.all": "全部",
|
|
41
|
-
"df.wise.group.currencies-with-account-details": "
|
|
41
|
+
"df.wise.group.currencies-with-account-details": "提供帳戶資料的貨幣",
|
|
42
42
|
"df.wise.group.popular": "熱門",
|
|
43
43
|
"df.wise.group.recent": "最近的",
|
|
44
44
|
"df.wise.step.scrollToBottom": "滑動到最底部"
|
package/build/main.js
CHANGED
|
@@ -127,21 +127,21 @@ __export(index_exports, {
|
|
|
127
127
|
DynamicFlowWithRef: () => DynamicFlowWithRef,
|
|
128
128
|
Header: () => Header10,
|
|
129
129
|
Media: () => Media2,
|
|
130
|
-
findRendererPropsByType: () =>
|
|
130
|
+
findRendererPropsByType: () => import_dynamic_flow_client8.findRendererPropsByType,
|
|
131
131
|
getMargin: () => getMargin2,
|
|
132
|
-
makeCustomFetch: () =>
|
|
132
|
+
makeCustomFetch: () => import_dynamic_flow_client7.makeHttpClient,
|
|
133
133
|
translations: () => i18n_default
|
|
134
134
|
});
|
|
135
135
|
module.exports = __toCommonJS(index_exports);
|
|
136
|
-
var
|
|
136
|
+
var import_dynamic_flow_client7 = require("@wise/dynamic-flow-client");
|
|
137
137
|
|
|
138
138
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
139
|
-
var
|
|
139
|
+
var import_dynamic_flow_client4 = require("@wise/dynamic-flow-client");
|
|
140
140
|
|
|
141
141
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
142
142
|
var appVersion = (
|
|
143
143
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
144
|
-
typeof process !== "undefined" ? "5.
|
|
144
|
+
typeof process !== "undefined" ? "5.16.0" : "0.0.0"
|
|
145
145
|
);
|
|
146
146
|
|
|
147
147
|
// src/dynamicFlow/context-menu/useContextMenu.tsx
|
|
@@ -4368,33 +4368,6 @@ var InitialLoadingStateRenderer = {
|
|
|
4368
4368
|
)
|
|
4369
4369
|
};
|
|
4370
4370
|
|
|
4371
|
-
// ../renderers/src/subflow/getSubflowRenderer.tsx
|
|
4372
|
-
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
4373
|
-
var getSubflowRenderer = ({
|
|
4374
|
-
Component: Component2,
|
|
4375
|
-
canRender
|
|
4376
|
-
}) => {
|
|
4377
|
-
return {
|
|
4378
|
-
canRenderType: "subflow",
|
|
4379
|
-
canRender,
|
|
4380
|
-
render: (props) => {
|
|
4381
|
-
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
4382
|
-
Component2,
|
|
4383
|
-
{
|
|
4384
|
-
presentation: props.presentation,
|
|
4385
|
-
requestCache: props.requestCache,
|
|
4386
|
-
initialRequest: props.initialRequest,
|
|
4387
|
-
onCompletion: props.onCompletion,
|
|
4388
|
-
onError: props.onError,
|
|
4389
|
-
onCancellation: props.onCancellation,
|
|
4390
|
-
onEvent: props.onEvent
|
|
4391
|
-
},
|
|
4392
|
-
props.uid
|
|
4393
|
-
);
|
|
4394
|
-
}
|
|
4395
|
-
};
|
|
4396
|
-
};
|
|
4397
|
-
|
|
4398
4371
|
// src/dynamicFlow/useOnCopy.tsx
|
|
4399
4372
|
var import_react22 = require("react");
|
|
4400
4373
|
var import_react_intl29 = require("react-intl");
|
|
@@ -4456,33 +4429,36 @@ var handleRejection = (error) => {
|
|
|
4456
4429
|
throw error;
|
|
4457
4430
|
};
|
|
4458
4431
|
|
|
4432
|
+
// src/dynamicFlow/getMergedRenderers.tsx
|
|
4433
|
+
var import_dynamic_flow_client3 = require("@wise/dynamic-flow-client");
|
|
4434
|
+
|
|
4459
4435
|
// src/dynamicFlow/DynamicFlowModal.tsx
|
|
4460
4436
|
var import_dynamic_flow_client2 = require("@wise/dynamic-flow-client");
|
|
4461
4437
|
var import_components66 = require("@transferwise/components");
|
|
4462
|
-
var
|
|
4438
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
4463
4439
|
function DynamicFlowModal(props) {
|
|
4464
4440
|
const _a = props, { className = "" } = _a, rest = __objRest(_a, ["className"]);
|
|
4465
4441
|
const dfProps = useWiseToCoreProps(rest);
|
|
4466
4442
|
const df = (0, import_dynamic_flow_client2.useDynamicFlowModal)(dfProps);
|
|
4467
|
-
return /* @__PURE__ */ (0,
|
|
4443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
4468
4444
|
import_components66.Modal,
|
|
4469
4445
|
__spreadProps(__spreadValues({
|
|
4470
4446
|
className: `dynamic-flow-modal ${className}`,
|
|
4471
4447
|
disableDimmerClickToClose: true
|
|
4472
4448
|
}, df.modal), {
|
|
4473
|
-
body: /* @__PURE__ */ (0,
|
|
4449
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "dynamic-flow-modal", children: df.modal.body })
|
|
4474
4450
|
})
|
|
4475
4451
|
);
|
|
4476
4452
|
}
|
|
4477
4453
|
|
|
4478
4454
|
// src/dynamicFlow/getMergedRenderers.tsx
|
|
4479
|
-
var
|
|
4455
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
4480
4456
|
var wiseRenderers = getWiseRenderers();
|
|
4481
4457
|
var getMergedRenderers = (props) => {
|
|
4482
4458
|
var _d, _e;
|
|
4483
4459
|
const _a = props, { initialAction, initialStep } = _a, restProps = __objRest(_a, ["initialAction", "initialStep"]);
|
|
4484
4460
|
const subflowFeatures = __spreadProps(__spreadValues({}, props.features), { nativeBack: true });
|
|
4485
|
-
const subflowRenderer =
|
|
4461
|
+
const subflowRenderer = (0, import_dynamic_flow_client3.getDynamicSubflowRenderer)({
|
|
4486
4462
|
Component: (_b) => {
|
|
4487
4463
|
var _c = _b, { presentation, initialRequest } = _c, rest = __objRest(_c, ["presentation", "initialRequest"]);
|
|
4488
4464
|
const action = {
|
|
@@ -4490,7 +4466,7 @@ var getMergedRenderers = (props) => {
|
|
|
4490
4466
|
method: initialRequest.method,
|
|
4491
4467
|
data: initialRequest.body
|
|
4492
4468
|
};
|
|
4493
|
-
return presentation.type === "push" ? /* @__PURE__ */ (0,
|
|
4469
|
+
return presentation.type === "push" ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
4494
4470
|
DynamicFlowModal,
|
|
4495
4471
|
__spreadProps(__spreadValues(__spreadValues({}, restProps), rest), {
|
|
4496
4472
|
features: subflowFeatures,
|
|
@@ -4549,13 +4525,13 @@ var openLinkInNewTab = (url) => {
|
|
|
4549
4525
|
};
|
|
4550
4526
|
|
|
4551
4527
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
4552
|
-
var
|
|
4528
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
4553
4529
|
function DynamicFlow(props) {
|
|
4554
4530
|
const { className = "" } = props;
|
|
4555
4531
|
const dfProps = useWiseToCoreProps(props);
|
|
4556
|
-
const df = (0,
|
|
4532
|
+
const df = (0, import_dynamic_flow_client4.useDynamicFlow)(dfProps);
|
|
4557
4533
|
const { onContextMenu, contextMenu } = useDFContextMenu(df.controller);
|
|
4558
|
-
return /* @__PURE__ */ (0,
|
|
4534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className, onContextMenu, children: [
|
|
4559
4535
|
df.view,
|
|
4560
4536
|
contextMenu
|
|
4561
4537
|
] });
|
|
@@ -4563,12 +4539,12 @@ function DynamicFlow(props) {
|
|
|
4563
4539
|
|
|
4564
4540
|
// src/dynamicFlow/DynamicFlowWithRef.tsx
|
|
4565
4541
|
var import_react25 = require("react");
|
|
4566
|
-
var
|
|
4567
|
-
var
|
|
4542
|
+
var import_dynamic_flow_client5 = require("@wise/dynamic-flow-client");
|
|
4543
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
4568
4544
|
var DynamicFlowWithRef = (0, import_react25.forwardRef)(function DynamicFlowWithRef2(props, ref) {
|
|
4569
4545
|
const { className = "" } = props;
|
|
4570
4546
|
const dfProps = useWiseToCoreProps(props);
|
|
4571
|
-
const df = (0,
|
|
4547
|
+
const df = (0, import_dynamic_flow_client5.useDynamicFlow)(dfProps);
|
|
4572
4548
|
(0, import_react25.useImperativeHandle)(
|
|
4573
4549
|
ref,
|
|
4574
4550
|
() => ({
|
|
@@ -4580,11 +4556,11 @@ var DynamicFlowWithRef = (0, import_react25.forwardRef)(function DynamicFlowWith
|
|
|
4580
4556
|
}),
|
|
4581
4557
|
[df]
|
|
4582
4558
|
);
|
|
4583
|
-
return /* @__PURE__ */ (0,
|
|
4559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className, children: df.view });
|
|
4584
4560
|
});
|
|
4585
4561
|
|
|
4586
4562
|
// src/index.ts
|
|
4587
|
-
var
|
|
4563
|
+
var import_dynamic_flow_client8 = require("@wise/dynamic-flow-client");
|
|
4588
4564
|
|
|
4589
4565
|
// src/dynamicFlow/renderers.tsx
|
|
4590
4566
|
var Header10 = Header5;
|
|
@@ -4592,7 +4568,7 @@ var Media2 = Media;
|
|
|
4592
4568
|
var getMargin2 = getMargin;
|
|
4593
4569
|
|
|
4594
4570
|
// src/i18n/index.ts
|
|
4595
|
-
var
|
|
4571
|
+
var import_dynamic_flow_client6 = require("@wise/dynamic-flow-client");
|
|
4596
4572
|
|
|
4597
4573
|
// src/i18n/cs.json
|
|
4598
4574
|
var cs_default = {
|
|
@@ -5434,7 +5410,7 @@ var zh_HK_default = {
|
|
|
5434
5410
|
"df.wise.filter.placeholder": "\u958B\u59CB\u8F38\u5165\u4EE5\u641C\u5C0B",
|
|
5435
5411
|
"df.wise.filter.results": "\u641C\u5C0B\u7D50\u679C",
|
|
5436
5412
|
"df.wise.group.all": "\u5168\u90E8",
|
|
5437
|
-
"df.wise.group.currencies-with-account-details": "\u63D0\u4F9B\
|
|
5413
|
+
"df.wise.group.currencies-with-account-details": "\u63D0\u4F9B\u5E33\u6236\u8CC7\u6599\u7684\u8CA8\u5E63",
|
|
5438
5414
|
"df.wise.group.popular": "\u71B1\u9580",
|
|
5439
5415
|
"df.wise.group.recent": "\u6700\u8FD1\u7684",
|
|
5440
5416
|
"df.wise.step.scrollToBottom": "\u6ED1\u52D5\u5230\u6700\u5E95\u90E8"
|
|
@@ -5463,10 +5439,10 @@ var wiseTranslations = {
|
|
|
5463
5439
|
"zh-HK": zh_HK_default
|
|
5464
5440
|
};
|
|
5465
5441
|
var languages = Array.from(
|
|
5466
|
-
/* @__PURE__ */ new Set([...Object.keys(
|
|
5442
|
+
/* @__PURE__ */ new Set([...Object.keys(import_dynamic_flow_client6.translations), ...Object.keys(wiseTranslations)])
|
|
5467
5443
|
);
|
|
5468
5444
|
var translations = languages.reduce(
|
|
5469
|
-
(acc, lang) => __spreadProps(__spreadValues({}, acc), { [lang]: __spreadValues(__spreadValues({},
|
|
5445
|
+
(acc, lang) => __spreadProps(__spreadValues({}, acc), { [lang]: __spreadValues(__spreadValues({}, import_dynamic_flow_client6.translations[lang]), wiseTranslations[lang]) }),
|
|
5470
5446
|
{}
|
|
5471
5447
|
);
|
|
5472
5448
|
var i18n_default = translations;
|
package/build/main.mjs
CHANGED
|
@@ -123,7 +123,7 @@ import { useDynamicFlow } from "@wise/dynamic-flow-client";
|
|
|
123
123
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
124
124
|
var appVersion = (
|
|
125
125
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
126
|
-
typeof process !== "undefined" ? "5.
|
|
126
|
+
typeof process !== "undefined" ? "5.16.0" : "0.0.0"
|
|
127
127
|
);
|
|
128
128
|
|
|
129
129
|
// src/dynamicFlow/context-menu/useContextMenu.tsx
|
|
@@ -4359,33 +4359,6 @@ var InitialLoadingStateRenderer = {
|
|
|
4359
4359
|
)
|
|
4360
4360
|
};
|
|
4361
4361
|
|
|
4362
|
-
// ../renderers/src/subflow/getSubflowRenderer.tsx
|
|
4363
|
-
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
4364
|
-
var getSubflowRenderer = ({
|
|
4365
|
-
Component: Component2,
|
|
4366
|
-
canRender
|
|
4367
|
-
}) => {
|
|
4368
|
-
return {
|
|
4369
|
-
canRenderType: "subflow",
|
|
4370
|
-
canRender,
|
|
4371
|
-
render: (props) => {
|
|
4372
|
-
return /* @__PURE__ */ jsx92(
|
|
4373
|
-
Component2,
|
|
4374
|
-
{
|
|
4375
|
-
presentation: props.presentation,
|
|
4376
|
-
requestCache: props.requestCache,
|
|
4377
|
-
initialRequest: props.initialRequest,
|
|
4378
|
-
onCompletion: props.onCompletion,
|
|
4379
|
-
onError: props.onError,
|
|
4380
|
-
onCancellation: props.onCancellation,
|
|
4381
|
-
onEvent: props.onEvent
|
|
4382
|
-
},
|
|
4383
|
-
props.uid
|
|
4384
|
-
);
|
|
4385
|
-
}
|
|
4386
|
-
};
|
|
4387
|
-
};
|
|
4388
|
-
|
|
4389
4362
|
// src/dynamicFlow/useOnCopy.tsx
|
|
4390
4363
|
import { useCallback as useCallback2 } from "react";
|
|
4391
4364
|
import { useIntl as useIntl16 } from "react-intl";
|
|
@@ -4447,33 +4420,36 @@ var handleRejection = (error) => {
|
|
|
4447
4420
|
throw error;
|
|
4448
4421
|
};
|
|
4449
4422
|
|
|
4423
|
+
// src/dynamicFlow/getMergedRenderers.tsx
|
|
4424
|
+
import { getDynamicSubflowRenderer } from "@wise/dynamic-flow-client";
|
|
4425
|
+
|
|
4450
4426
|
// src/dynamicFlow/DynamicFlowModal.tsx
|
|
4451
4427
|
import { useDynamicFlowModal } from "@wise/dynamic-flow-client";
|
|
4452
4428
|
import { Modal as Modal5 } from "@transferwise/components";
|
|
4453
|
-
import { jsx as
|
|
4429
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
4454
4430
|
function DynamicFlowModal(props) {
|
|
4455
4431
|
const _a = props, { className = "" } = _a, rest = __objRest(_a, ["className"]);
|
|
4456
4432
|
const dfProps = useWiseToCoreProps(rest);
|
|
4457
4433
|
const df = useDynamicFlowModal(dfProps);
|
|
4458
|
-
return /* @__PURE__ */
|
|
4434
|
+
return /* @__PURE__ */ jsx92(
|
|
4459
4435
|
Modal5,
|
|
4460
4436
|
__spreadProps(__spreadValues({
|
|
4461
4437
|
className: `dynamic-flow-modal ${className}`,
|
|
4462
4438
|
disableDimmerClickToClose: true
|
|
4463
4439
|
}, df.modal), {
|
|
4464
|
-
body: /* @__PURE__ */
|
|
4440
|
+
body: /* @__PURE__ */ jsx92("div", { className: "dynamic-flow-modal", children: df.modal.body })
|
|
4465
4441
|
})
|
|
4466
4442
|
);
|
|
4467
4443
|
}
|
|
4468
4444
|
|
|
4469
4445
|
// src/dynamicFlow/getMergedRenderers.tsx
|
|
4470
|
-
import { jsx as
|
|
4446
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
4471
4447
|
var wiseRenderers = getWiseRenderers();
|
|
4472
4448
|
var getMergedRenderers = (props) => {
|
|
4473
4449
|
var _d, _e;
|
|
4474
4450
|
const _a = props, { initialAction, initialStep } = _a, restProps = __objRest(_a, ["initialAction", "initialStep"]);
|
|
4475
4451
|
const subflowFeatures = __spreadProps(__spreadValues({}, props.features), { nativeBack: true });
|
|
4476
|
-
const subflowRenderer =
|
|
4452
|
+
const subflowRenderer = getDynamicSubflowRenderer({
|
|
4477
4453
|
Component: (_b) => {
|
|
4478
4454
|
var _c = _b, { presentation, initialRequest } = _c, rest = __objRest(_c, ["presentation", "initialRequest"]);
|
|
4479
4455
|
const action = {
|
|
@@ -4481,7 +4457,7 @@ var getMergedRenderers = (props) => {
|
|
|
4481
4457
|
method: initialRequest.method,
|
|
4482
4458
|
data: initialRequest.body
|
|
4483
4459
|
};
|
|
4484
|
-
return presentation.type === "push" ? /* @__PURE__ */
|
|
4460
|
+
return presentation.type === "push" ? /* @__PURE__ */ jsx93(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ jsx93(
|
|
4485
4461
|
DynamicFlowModal,
|
|
4486
4462
|
__spreadProps(__spreadValues(__spreadValues({}, restProps), rest), {
|
|
4487
4463
|
features: subflowFeatures,
|
|
@@ -4558,7 +4534,7 @@ import {
|
|
|
4558
4534
|
useImperativeHandle
|
|
4559
4535
|
} from "react";
|
|
4560
4536
|
import { useDynamicFlow as useDynamicFlow2 } from "@wise/dynamic-flow-client";
|
|
4561
|
-
import { jsx as
|
|
4537
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
4562
4538
|
var DynamicFlowWithRef = forwardRef(function DynamicFlowWithRef2(props, ref) {
|
|
4563
4539
|
const { className = "" } = props;
|
|
4564
4540
|
const dfProps = useWiseToCoreProps(props);
|
|
@@ -4574,7 +4550,7 @@ var DynamicFlowWithRef = forwardRef(function DynamicFlowWithRef2(props, ref) {
|
|
|
4574
4550
|
}),
|
|
4575
4551
|
[df]
|
|
4576
4552
|
);
|
|
4577
|
-
return /* @__PURE__ */
|
|
4553
|
+
return /* @__PURE__ */ jsx94("div", { className, children: df.view });
|
|
4578
4554
|
});
|
|
4579
4555
|
|
|
4580
4556
|
// src/index.ts
|
|
@@ -5428,7 +5404,7 @@ var zh_HK_default = {
|
|
|
5428
5404
|
"df.wise.filter.placeholder": "\u958B\u59CB\u8F38\u5165\u4EE5\u641C\u5C0B",
|
|
5429
5405
|
"df.wise.filter.results": "\u641C\u5C0B\u7D50\u679C",
|
|
5430
5406
|
"df.wise.group.all": "\u5168\u90E8",
|
|
5431
|
-
"df.wise.group.currencies-with-account-details": "\u63D0\u4F9B\
|
|
5407
|
+
"df.wise.group.currencies-with-account-details": "\u63D0\u4F9B\u5E33\u6236\u8CC7\u6599\u7684\u8CA8\u5E63",
|
|
5432
5408
|
"df.wise.group.popular": "\u71B1\u9580",
|
|
5433
5409
|
"df.wise.group.recent": "\u6700\u8FD1\u7684",
|
|
5434
5410
|
"df.wise.step.scrollToBottom": "\u6ED1\u52D5\u5230\u6700\u5E95\u90E8"
|