@wise/dynamic-flow-client 4.14.2-experimental-e343995 → 4.15.0-experimental-1ff696a
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.js +3 -6
- package/build/main.mjs +3 -6
- package/build/types/revamp/domain/types.d.ts +1 -0
- package/package.json +4 -4
package/build/main.js
CHANGED
|
@@ -2515,8 +2515,9 @@ var mapAdditionalInfo = (info, onBehavior) => {
|
|
|
2515
2515
|
const behavior = getDomainLayerBehavior(info, []);
|
|
2516
2516
|
return {
|
|
2517
2517
|
text: info.text,
|
|
2518
|
+
href: behavior.type === "link" ? behavior.url : void 0,
|
|
2518
2519
|
accessibilityDescription: info.accessibilityDescription,
|
|
2519
|
-
onClick: () => {
|
|
2520
|
+
onClick: behavior.type === "none" ? void 0 : () => {
|
|
2520
2521
|
void onBehavior(behavior);
|
|
2521
2522
|
}
|
|
2522
2523
|
};
|
|
@@ -2567,11 +2568,7 @@ var createStatusListComponent = (statusListProps) => __spreadValues({
|
|
|
2567
2568
|
|
|
2568
2569
|
// src/revamp/domain/mappers/layout/deprecatedListLayoutToComponent.ts
|
|
2569
2570
|
var isDeprecatedListLayout = (layout) => {
|
|
2570
|
-
|
|
2571
|
-
const usesNewProperties = layout.items.some(
|
|
2572
|
-
(item) => item.additionalInfo != null || item.inlineAlert != null || item.supportingValues != null || item.subtitle != null || item.value != null || item.subvalue != null
|
|
2573
|
-
);
|
|
2574
|
-
return !usesCallToAction && !usesNewProperties;
|
|
2571
|
+
return layout.items.some((item) => item.status);
|
|
2575
2572
|
};
|
|
2576
2573
|
var deprecatedListLayoutToComponent = (uid, { analyticsId, control, items, margin = "md", title }) => createStatusListComponent({
|
|
2577
2574
|
uid,
|
package/build/main.mjs
CHANGED
|
@@ -2472,8 +2472,9 @@ var mapAdditionalInfo = (info, onBehavior) => {
|
|
|
2472
2472
|
const behavior = getDomainLayerBehavior(info, []);
|
|
2473
2473
|
return {
|
|
2474
2474
|
text: info.text,
|
|
2475
|
+
href: behavior.type === "link" ? behavior.url : void 0,
|
|
2475
2476
|
accessibilityDescription: info.accessibilityDescription,
|
|
2476
|
-
onClick: () => {
|
|
2477
|
+
onClick: behavior.type === "none" ? void 0 : () => {
|
|
2477
2478
|
void onBehavior(behavior);
|
|
2478
2479
|
}
|
|
2479
2480
|
};
|
|
@@ -2524,11 +2525,7 @@ var createStatusListComponent = (statusListProps) => __spreadValues({
|
|
|
2524
2525
|
|
|
2525
2526
|
// src/revamp/domain/mappers/layout/deprecatedListLayoutToComponent.ts
|
|
2526
2527
|
var isDeprecatedListLayout = (layout) => {
|
|
2527
|
-
|
|
2528
|
-
const usesNewProperties = layout.items.some(
|
|
2529
|
-
(item) => item.additionalInfo != null || item.inlineAlert != null || item.supportingValues != null || item.subtitle != null || item.value != null || item.subvalue != null
|
|
2530
|
-
);
|
|
2531
|
-
return !usesCallToAction && !usesNewProperties;
|
|
2528
|
+
return layout.items.some((item) => item.status);
|
|
2532
2529
|
};
|
|
2533
2530
|
var deprecatedListLayoutToComponent = (uid, { analyticsId, control, items, margin = "md", title }) => createStatusListComponent({
|
|
2534
2531
|
uid,
|
|
@@ -193,6 +193,7 @@ export type ValidationAsyncState = {
|
|
|
193
193
|
};
|
|
194
194
|
export type LoadingState = 'idle' | 'initial' | 'submitting' | 'refreshing';
|
|
195
195
|
export type AdditionalInfo = {
|
|
196
|
+
href?: string;
|
|
196
197
|
text: string;
|
|
197
198
|
accessibilityDescription?: string;
|
|
198
199
|
onClick?: () => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-client",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.15.0-experimental-1ff696a",
|
|
4
4
|
"description": "Dynamic Flow web client",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/main.js",
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
"stylelint-value-no-unknown-custom-properties": "6.0.1",
|
|
79
79
|
"tsx": "4.20.4",
|
|
80
80
|
"typescript": "5.9.2",
|
|
81
|
-
"@wise/dynamic-flow-
|
|
82
|
-
"@wise/dynamic-flow-
|
|
81
|
+
"@wise/dynamic-flow-fixtures": "0.0.1",
|
|
82
|
+
"@wise/dynamic-flow-renderers": "0.0.0"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"@transferwise/components": "^46.92.0",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"classnames": "2.5.1",
|
|
96
96
|
"react-webcam": "^7.2.0",
|
|
97
97
|
"screenfull": "^5.2.0",
|
|
98
|
-
"@wise/dynamic-flow-types": "3.
|
|
98
|
+
"@wise/dynamic-flow-types": "3.12.0-experimental-1ff696a"
|
|
99
99
|
},
|
|
100
100
|
"scripts": {
|
|
101
101
|
"dev": "pnpm build:visual-tests && storybook dev -p 3003",
|