@wise/dynamic-flow-client 3.17.0 → 3.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/main.mjs
CHANGED
|
@@ -138,12 +138,12 @@ var init_clsx = __esm({
|
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
140
|
|
|
141
|
-
// ../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.
|
|
141
|
+
// ../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.18.0_@types+react@18.3.4_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index-93a0c34e.esm.js
|
|
142
142
|
import { useState as useState2, useEffect as useEffect2, forwardRef, Suspense, lazy } from "react";
|
|
143
143
|
import { jsx as jsx17, jsxs as jsxs4, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
144
144
|
var unknownFlagName, Flag, Sizes, ImageSizes, imageSizes, Assets, RenderMode;
|
|
145
145
|
var init_index_93a0c34e_esm = __esm({
|
|
146
|
-
"../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.
|
|
146
|
+
"../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.18.0_@types+react@18.3.4_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index-93a0c34e.esm.js"() {
|
|
147
147
|
"use strict";
|
|
148
148
|
init_clsx();
|
|
149
149
|
unknownFlagName = "wise";
|
|
@@ -1628,9 +1628,9 @@ var markdownComponentToProps = ({
|
|
|
1628
1628
|
});
|
|
1629
1629
|
|
|
1630
1630
|
// src/revamp/renderers/mappers/modalComponentToProps.ts
|
|
1631
|
-
var modalComponentToProps = ({ control, margin, trigger }, components) => ({
|
|
1631
|
+
var modalComponentToProps = ({ content, control, margin, trigger }, components) => ({
|
|
1632
1632
|
type: "modal",
|
|
1633
|
-
content: { components },
|
|
1633
|
+
content: { components, title: content.title },
|
|
1634
1634
|
control,
|
|
1635
1635
|
margin,
|
|
1636
1636
|
trigger
|
|
@@ -9916,13 +9916,14 @@ var createModalComponent = (modalProps) => __spreadProps(__spreadValues({
|
|
|
9916
9916
|
|
|
9917
9917
|
// src/revamp/domain/mappers/layout/modalLayoutToComponent.ts
|
|
9918
9918
|
var modalLayoutToComponent = (uid, { content, control, margin = "md", trigger }, mapperProps) => {
|
|
9919
|
-
const { components } = content;
|
|
9919
|
+
const { components, title } = content;
|
|
9920
9920
|
return createModalComponent({
|
|
9921
9921
|
uid,
|
|
9922
9922
|
content: {
|
|
9923
9923
|
components: components.map(
|
|
9924
9924
|
(component, index) => mapLayoutToComponent(`${uid}.modal-${index}`, component, mapperProps)
|
|
9925
|
-
)
|
|
9925
|
+
),
|
|
9926
|
+
title
|
|
9926
9927
|
},
|
|
9927
9928
|
control,
|
|
9928
9929
|
margin,
|
|
@@ -11286,7 +11287,7 @@ var DateInputRenderer_default = DateInputRenderer;
|
|
|
11286
11287
|
// ../renderers/src/DecisionRenderer.tsx
|
|
11287
11288
|
import { NavigationOptionsList, NavigationOption, Header } from "@transferwise/components";
|
|
11288
11289
|
|
|
11289
|
-
// ../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.
|
|
11290
|
+
// ../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.18.0_@types+react@18.3.4_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index.esm.js
|
|
11290
11291
|
init_index_93a0c34e_esm();
|
|
11291
11292
|
init_clsx();
|
|
11292
11293
|
import "react";
|
|
@@ -11623,6 +11624,7 @@ var ModalRenderer = {
|
|
|
11623
11624
|
var ModalRenderer_default = ModalRenderer;
|
|
11624
11625
|
function DFModal({ content, margin, trigger }) {
|
|
11625
11626
|
const [visible, setVisible] = useState4(false);
|
|
11627
|
+
const { components, title } = content;
|
|
11626
11628
|
return /* @__PURE__ */ jsxs8("div", { className: getMargin(margin), children: [
|
|
11627
11629
|
/* @__PURE__ */ jsx32(Button2, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
|
|
11628
11630
|
/* @__PURE__ */ jsx32(
|
|
@@ -11631,7 +11633,8 @@ function DFModal({ content, margin, trigger }) {
|
|
|
11631
11633
|
scroll: "content",
|
|
11632
11634
|
open: visible,
|
|
11633
11635
|
size: "lg",
|
|
11634
|
-
|
|
11636
|
+
title,
|
|
11637
|
+
body: components,
|
|
11635
11638
|
onClose: () => setVisible(false)
|
|
11636
11639
|
}
|
|
11637
11640
|
)
|
|
@@ -18084,6 +18087,7 @@ function DynamicModal(props) {
|
|
|
18084
18087
|
scroll: "content",
|
|
18085
18088
|
open: visible,
|
|
18086
18089
|
size: "lg",
|
|
18090
|
+
title: component.content.title,
|
|
18087
18091
|
body: /* @__PURE__ */ jsx115(
|
|
18088
18092
|
DynamicLayout_default,
|
|
18089
18093
|
__spreadProps(__spreadValues({}, props), {
|
|
@@ -8,5 +8,6 @@ export type ModalComponent = LayoutComponent & {
|
|
|
8
8
|
};
|
|
9
9
|
export type ModalContent = {
|
|
10
10
|
components: DomainComponent[];
|
|
11
|
+
title?: string;
|
|
11
12
|
};
|
|
12
13
|
export declare const createModalComponent: (modalProps: Pick<ModalComponent, "uid" | "content" | "control" | "margin" | "trigger">) => ModalComponent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { ModalComponent } from '../../domain/components/ModalComponent';
|
|
3
3
|
import type { ModalRendererProps } from '@wise/dynamic-flow-renderers';
|
|
4
|
-
export declare const modalComponentToProps: ({ control, margin, trigger }: ModalComponent, components: ReactNode) => ModalRendererProps;
|
|
4
|
+
export declare const modalComponentToProps: ({ content, control, margin, trigger }: ModalComponent, components: ReactNode) => ModalRendererProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-client",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.18.0",
|
|
4
4
|
"description": "Dynamic Flow web client",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/main.min.js",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"@babel/core": "7.25.2",
|
|
31
31
|
"@babel/plugin-syntax-flow": "7.24.7",
|
|
32
32
|
"@babel/plugin-transform-react-jsx": "7.25.2",
|
|
33
|
-
"@babel/preset-env": "7.25.
|
|
33
|
+
"@babel/preset-env": "7.25.4",
|
|
34
34
|
"@babel/preset-react": "7.24.7",
|
|
35
35
|
"@babel/preset-typescript": "7.24.7",
|
|
36
36
|
"@cfaester/enzyme-adapter-react-18": "0.8.0",
|
|
37
|
-
"@chromatic-com/storybook": "1.
|
|
37
|
+
"@chromatic-com/storybook": "1.7.0",
|
|
38
38
|
"@formatjs/cli": "^6.2.12",
|
|
39
39
|
"@storybook/addon-a11y": "^8.2.9",
|
|
40
40
|
"@storybook/addon-actions": "^8.2.9",
|
|
@@ -48,24 +48,24 @@
|
|
|
48
48
|
"@storybook/test": "^8.2.9",
|
|
49
49
|
"@storybook/types": "^8.2.9",
|
|
50
50
|
"@testing-library/dom": "10.4.0",
|
|
51
|
-
"@testing-library/jest-dom": "6.
|
|
51
|
+
"@testing-library/jest-dom": "6.5.0",
|
|
52
52
|
"@testing-library/react": "16.0.0",
|
|
53
53
|
"@testing-library/react-hooks": "8.0.1",
|
|
54
54
|
"@testing-library/user-event": "14.5.2",
|
|
55
|
-
"@transferwise/components": "46.
|
|
55
|
+
"@transferwise/components": "46.70.2",
|
|
56
56
|
"@transferwise/formatting": "^2.13.0",
|
|
57
57
|
"@transferwise/icons": "3.13.0",
|
|
58
|
-
"@transferwise/neptune-css": "14.
|
|
58
|
+
"@transferwise/neptune-css": "14.18.0",
|
|
59
59
|
"@types/enzyme": "^3.10.18",
|
|
60
60
|
"@types/jest": "29.5.12",
|
|
61
|
-
"@types/react": "18.3.
|
|
61
|
+
"@types/react": "18.3.4",
|
|
62
62
|
"@types/react-dom": "18.3.0",
|
|
63
63
|
"@types/react-intl": "3.0.0",
|
|
64
64
|
"@wise/art": "2.14.0",
|
|
65
65
|
"@wise/components-theming": "^1.6.0",
|
|
66
66
|
"babel-jest": "29.7.0",
|
|
67
67
|
"enzyme": "^3.11.0",
|
|
68
|
-
"esbuild": "0.23.
|
|
68
|
+
"esbuild": "0.23.1",
|
|
69
69
|
"jest": "29.7.0",
|
|
70
70
|
"jest-environment-jsdom": "29.7.0",
|
|
71
71
|
"jest-fetch-mock": "^3.0.3",
|
|
@@ -83,9 +83,9 @@
|
|
|
83
83
|
"stylelint-config-standard": "36.0.1",
|
|
84
84
|
"stylelint-no-unsupported-browser-features": "8.0.1",
|
|
85
85
|
"stylelint-value-no-unknown-custom-properties": "6.0.1",
|
|
86
|
-
"tsx": "4.
|
|
86
|
+
"tsx": "4.18.0",
|
|
87
87
|
"typescript": "5.5.4",
|
|
88
|
-
"webpack": "5.
|
|
88
|
+
"webpack": "5.94.0",
|
|
89
89
|
"@wise/dynamic-flow-fixtures": "0.0.1",
|
|
90
90
|
"@wise/dynamic-flow-renderers": "0.0.0"
|
|
91
91
|
},
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"nanoid": "5.0.7",
|
|
105
105
|
"react-webcam": "^7.2.0",
|
|
106
106
|
"screenfull": "^5.2.0",
|
|
107
|
-
"@wise/dynamic-flow-types": "2.
|
|
107
|
+
"@wise/dynamic-flow-types": "2.21.0"
|
|
108
108
|
},
|
|
109
109
|
"scripts": {
|
|
110
110
|
"dev": "pnpm build:visual-tests && storybook dev -p 3003",
|