@wise/dynamic-flow-client-internal 4.33.4 → 4.34.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.
Files changed (3) hide show
  1. package/build/main.js +23 -14
  2. package/build/main.mjs +23 -14
  3. package/package.json +10 -10
package/build/main.js CHANGED
@@ -3306,18 +3306,18 @@ var import_components55 = require("@transferwise/components");
3306
3306
  // ../renderers/src/NewListItem/getCTAControl.tsx
3307
3307
  var import_components54 = require("@transferwise/components");
3308
3308
  var import_jsx_runtime77 = require("react/jsx-runtime");
3309
- var getCTAControl = (callToAction, tags) => {
3309
+ var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
3310
3310
  if (!callToAction) {
3311
3311
  return void 0;
3312
3312
  }
3313
3313
  const { accessibilityDescription, href, title, onClick } = callToAction;
3314
- const priority = (tags == null ? void 0 : tags.includes("cta-secondary")) ? "secondary" : "secondary-neutral";
3314
+ const priority = ctaSecondary ? "secondary" : "secondary-neutral";
3315
3315
  if (href) {
3316
3316
  return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
3317
3317
  import_components54.ListItem.Button,
3318
3318
  {
3319
3319
  href,
3320
- partiallyInteractive: true,
3320
+ partiallyInteractive: !fullyInteractive,
3321
3321
  priority,
3322
3322
  "aria-description": accessibilityDescription,
3323
3323
  children: title
@@ -3328,7 +3328,7 @@ var getCTAControl = (callToAction, tags) => {
3328
3328
  import_components54.ListItem.Button,
3329
3329
  {
3330
3330
  "aria-description": accessibilityDescription,
3331
- partiallyInteractive: true,
3331
+ partiallyInteractive: !fullyInteractive,
3332
3332
  priority,
3333
3333
  onClick,
3334
3334
  children: title
@@ -3340,9 +3340,10 @@ var getCTAControl = (callToAction, tags) => {
3340
3340
  var import_jsx_runtime78 = require("react/jsx-runtime");
3341
3341
  var ListRenderer2 = {
3342
3342
  canRenderType: "list",
3343
- render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: getMargin(margin), children: [
3343
+ render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: getMargin(margin), children: [
3344
3344
  /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Header7, { title, callToAction }),
3345
3345
  items.map((item) => {
3346
+ var _a, _b;
3346
3347
  const {
3347
3348
  title: itemTitle,
3348
3349
  description,
@@ -3351,8 +3352,12 @@ var ListRenderer2 = {
3351
3352
  additionalInfo,
3352
3353
  inlineAlert,
3353
3354
  callToAction: itemCallToAction,
3354
- tags
3355
+ tags: itemTags
3355
3356
  } = item;
3357
+ const controlOptions = {
3358
+ ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
3359
+ fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
3360
+ };
3356
3361
  return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
3357
3362
  import_components55.ListItem,
3358
3363
  {
@@ -3360,10 +3365,10 @@ var ListRenderer2 = {
3360
3365
  subtitle: description,
3361
3366
  valueTitle: supportingValues == null ? void 0 : supportingValues.value,
3362
3367
  valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
3363
- media: getMedia(media, shouldUseAvatar(control, tags)),
3368
+ media: getMedia(media, shouldUseAvatar(control, itemTags)),
3364
3369
  prompt: getInlineAlert(inlineAlert),
3365
3370
  additionalInfo: getAdditionalInfo(additionalInfo),
3366
- control: getCTAControl(itemCallToAction, tags)
3371
+ control: getCTAControl(itemCallToAction, controlOptions)
3367
3372
  },
3368
3373
  itemTitle
3369
3374
  );
@@ -3385,10 +3390,10 @@ var IGNORED_CONTROLS = [
3385
3390
  var ReviewRenderer2 = {
3386
3391
  canRenderType: "review",
3387
3392
  canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
3388
- render: ({ callToAction, control, margin, fields, title }) => /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: getMargin(margin), children: [
3393
+ render: ({ callToAction, control, margin, fields, tags, title }) => /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: getMargin(margin), children: [
3389
3394
  /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Header7, { title, callToAction }),
3390
3395
  fields.map((field) => {
3391
- var _a;
3396
+ var _a, _b, _c;
3392
3397
  const {
3393
3398
  label,
3394
3399
  value,
@@ -3397,16 +3402,20 @@ var ReviewRenderer2 = {
3397
3402
  inlineAlert,
3398
3403
  help,
3399
3404
  callToAction: itemCallToAction,
3400
- tags
3405
+ tags: itemTags
3401
3406
  } = field;
3407
+ const controlOptions = {
3408
+ ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
3409
+ fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
3410
+ };
3402
3411
  return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
3403
3412
  import_components56.ListItem,
3404
3413
  {
3405
3414
  title: value,
3406
3415
  subtitle: label,
3407
3416
  inverted: true,
3408
- media: getMedia(media, shouldUseAvatar(control, tags)),
3409
- control: (_a = getCTAControl(itemCallToAction, tags)) != null ? _a : getHelpControl(help),
3417
+ media: getMedia(media, shouldUseAvatar(control, itemTags)),
3418
+ control: (_c = getCTAControl(itemCallToAction, controlOptions)) != null ? _c : getHelpControl(help),
3410
3419
  prompt: getInlineAlert(inlineAlert),
3411
3420
  additionalInfo: getAdditionalInfo(additionalInfo)
3412
3421
  },
@@ -4444,7 +4453,7 @@ var import_dynamic_flow_client2 = require("@wise/dynamic-flow-client");
4444
4453
  // src/dynamicFlow/telemetry/app-version.ts
4445
4454
  var appVersion = (
4446
4455
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
4447
- typeof process !== "undefined" ? "4.33.4" : "0.0.0"
4456
+ typeof process !== "undefined" ? "4.34.0" : "0.0.0"
4448
4457
  );
4449
4458
 
4450
4459
  // src/dynamicFlow/telemetry/getLogEvent.ts
package/build/main.mjs CHANGED
@@ -3272,18 +3272,18 @@ import { ListItem as ListItem6 } from "@transferwise/components";
3272
3272
  // ../renderers/src/NewListItem/getCTAControl.tsx
3273
3273
  import { ListItem as ListItem5 } from "@transferwise/components";
3274
3274
  import { jsx as jsx77 } from "react/jsx-runtime";
3275
- var getCTAControl = (callToAction, tags) => {
3275
+ var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
3276
3276
  if (!callToAction) {
3277
3277
  return void 0;
3278
3278
  }
3279
3279
  const { accessibilityDescription, href, title, onClick } = callToAction;
3280
- const priority = (tags == null ? void 0 : tags.includes("cta-secondary")) ? "secondary" : "secondary-neutral";
3280
+ const priority = ctaSecondary ? "secondary" : "secondary-neutral";
3281
3281
  if (href) {
3282
3282
  return /* @__PURE__ */ jsx77(
3283
3283
  ListItem5.Button,
3284
3284
  {
3285
3285
  href,
3286
- partiallyInteractive: true,
3286
+ partiallyInteractive: !fullyInteractive,
3287
3287
  priority,
3288
3288
  "aria-description": accessibilityDescription,
3289
3289
  children: title
@@ -3294,7 +3294,7 @@ var getCTAControl = (callToAction, tags) => {
3294
3294
  ListItem5.Button,
3295
3295
  {
3296
3296
  "aria-description": accessibilityDescription,
3297
- partiallyInteractive: true,
3297
+ partiallyInteractive: !fullyInteractive,
3298
3298
  priority,
3299
3299
  onClick,
3300
3300
  children: title
@@ -3306,9 +3306,10 @@ var getCTAControl = (callToAction, tags) => {
3306
3306
  import { jsx as jsx78, jsxs as jsxs30 } from "react/jsx-runtime";
3307
3307
  var ListRenderer2 = {
3308
3308
  canRenderType: "list",
3309
- render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ jsxs30("div", { className: getMargin(margin), children: [
3309
+ render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ jsxs30("div", { className: getMargin(margin), children: [
3310
3310
  /* @__PURE__ */ jsx78(Header7, { title, callToAction }),
3311
3311
  items.map((item) => {
3312
+ var _a, _b;
3312
3313
  const {
3313
3314
  title: itemTitle,
3314
3315
  description,
@@ -3317,8 +3318,12 @@ var ListRenderer2 = {
3317
3318
  additionalInfo,
3318
3319
  inlineAlert,
3319
3320
  callToAction: itemCallToAction,
3320
- tags
3321
+ tags: itemTags
3321
3322
  } = item;
3323
+ const controlOptions = {
3324
+ ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
3325
+ fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
3326
+ };
3322
3327
  return /* @__PURE__ */ jsx78(
3323
3328
  ListItem6,
3324
3329
  {
@@ -3326,10 +3331,10 @@ var ListRenderer2 = {
3326
3331
  subtitle: description,
3327
3332
  valueTitle: supportingValues == null ? void 0 : supportingValues.value,
3328
3333
  valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
3329
- media: getMedia(media, shouldUseAvatar(control, tags)),
3334
+ media: getMedia(media, shouldUseAvatar(control, itemTags)),
3330
3335
  prompt: getInlineAlert(inlineAlert),
3331
3336
  additionalInfo: getAdditionalInfo(additionalInfo),
3332
- control: getCTAControl(itemCallToAction, tags)
3337
+ control: getCTAControl(itemCallToAction, controlOptions)
3333
3338
  },
3334
3339
  itemTitle
3335
3340
  );
@@ -3351,10 +3356,10 @@ var IGNORED_CONTROLS = [
3351
3356
  var ReviewRenderer2 = {
3352
3357
  canRenderType: "review",
3353
3358
  canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
3354
- render: ({ callToAction, control, margin, fields, title }) => /* @__PURE__ */ jsxs31("div", { className: getMargin(margin), children: [
3359
+ render: ({ callToAction, control, margin, fields, tags, title }) => /* @__PURE__ */ jsxs31("div", { className: getMargin(margin), children: [
3355
3360
  /* @__PURE__ */ jsx79(Header7, { title, callToAction }),
3356
3361
  fields.map((field) => {
3357
- var _a;
3362
+ var _a, _b, _c;
3358
3363
  const {
3359
3364
  label,
3360
3365
  value,
@@ -3363,16 +3368,20 @@ var ReviewRenderer2 = {
3363
3368
  inlineAlert,
3364
3369
  help,
3365
3370
  callToAction: itemCallToAction,
3366
- tags
3371
+ tags: itemTags
3367
3372
  } = field;
3373
+ const controlOptions = {
3374
+ ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
3375
+ fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
3376
+ };
3368
3377
  return /* @__PURE__ */ jsx79(
3369
3378
  ListItem7,
3370
3379
  {
3371
3380
  title: value,
3372
3381
  subtitle: label,
3373
3382
  inverted: true,
3374
- media: getMedia(media, shouldUseAvatar(control, tags)),
3375
- control: (_a = getCTAControl(itemCallToAction, tags)) != null ? _a : getHelpControl(help),
3383
+ media: getMedia(media, shouldUseAvatar(control, itemTags)),
3384
+ control: (_c = getCTAControl(itemCallToAction, controlOptions)) != null ? _c : getHelpControl(help),
3376
3385
  prompt: getInlineAlert(inlineAlert),
3377
3386
  additionalInfo: getAdditionalInfo(additionalInfo)
3378
3387
  },
@@ -4414,7 +4423,7 @@ import {
4414
4423
  // src/dynamicFlow/telemetry/app-version.ts
4415
4424
  var appVersion = (
4416
4425
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
4417
- typeof process !== "undefined" ? "4.33.4" : "0.0.0"
4426
+ typeof process !== "undefined" ? "4.34.0" : "0.0.0"
4418
4427
  );
4419
4428
 
4420
4429
  // src/dynamicFlow/telemetry/getLogEvent.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-client-internal",
3
- "version": "4.33.4",
3
+ "version": "4.34.0",
4
4
  "description": "Dynamic Flow web client for Wise",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/main.js",
@@ -38,15 +38,15 @@
38
38
  "@babel/preset-typescript": "7.27.1",
39
39
  "@chromatic-com/storybook": "4.1.1",
40
40
  "@formatjs/cli": "^6.7.4",
41
- "@storybook/react-vite": "9.1.10",
41
+ "@storybook/react-vite": "9.1.13",
42
42
  "@testing-library/dom": "10.4.1",
43
43
  "@testing-library/jest-dom": "6.9.1",
44
44
  "@testing-library/react": "16.3.0",
45
45
  "@testing-library/user-event": "14.6.1",
46
- "@transferwise/components": "46.112.0",
46
+ "@transferwise/components": "46.112.1",
47
47
  "@transferwise/formatting": "^2.13.4",
48
48
  "@transferwise/icons": "3.22.4",
49
- "@transferwise/neptune-css": "14.25.0",
49
+ "@transferwise/neptune-css": "14.25.1",
50
50
  "@types/jest": "30.0.0",
51
51
  "@types/react": "18.3.26",
52
52
  "@types/react-dom": "18.3.7",
@@ -55,7 +55,7 @@
55
55
  "babel-jest": "30.2.0",
56
56
  "currency-flags": "4.0.7",
57
57
  "esbuild": "0.25.9",
58
- "eslint-plugin-storybook": "9.1.10",
58
+ "eslint-plugin-storybook": "9.1.13",
59
59
  "jest": "30.2.0",
60
60
  "jest-environment-jsdom": "30.2.0",
61
61
  "jest-fetch-mock": "^3.0.3",
@@ -67,15 +67,15 @@
67
67
  "react": "18.3.1",
68
68
  "react-dom": "18.3.1",
69
69
  "react-intl": "6.8.9",
70
- "storybook": "^9.1.10",
70
+ "storybook": "^9.1.13",
71
71
  "stylelint": "16.25.0",
72
72
  "stylelint-config-standard": "36.0.1",
73
- "stylelint-no-unsupported-browser-features": "8.0.4",
73
+ "stylelint-no-unsupported-browser-features": "8.0.5",
74
74
  "stylelint-value-no-unknown-custom-properties": "6.0.1",
75
75
  "tsx": "4.20.6",
76
76
  "typescript": "5.9.3",
77
+ "@wise/dynamic-flow-types": "3.17.0",
77
78
  "@wise/dynamic-flow-renderers": "0.0.0",
78
- "@wise/dynamic-flow-types": "3.16.0",
79
79
  "@wise/dynamic-flow-fixtures": "0.0.1"
80
80
  },
81
81
  "peerDependencies": {
@@ -91,8 +91,8 @@
91
91
  },
92
92
  "dependencies": {
93
93
  "classnames": "2.5.1",
94
- "@wise/dynamic-flow-client": "4.19.3",
95
- "@wise/dynamic-flow-types": "3.16.0"
94
+ "@wise/dynamic-flow-types": "3.17.0",
95
+ "@wise/dynamic-flow-client": "4.19.4"
96
96
  },
97
97
  "scripts": {
98
98
  "dev": "pnpm build:visual-tests && storybook dev -p 3005",