@wise/dynamic-flow-client 3.28.4 → 3.28.6

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.16.3_@transferwise+neptune-css@14.20.0_@types+react@18.3.12_react-dom@18.3.1_reac_ybxnuulsvhsfhz3tk3mxo6vlti/node_modules/@wise/art/dist/index-a91e5689.esm.js
141
+ // ../../node_modules/.pnpm/@wise+art@2.17.0_@transferwise+neptune-css@14.20.1_@types+react@18.3.16_react-dom@18.3.1_reac_4hsljgguo7de2wpoipdhgf4kzi/node_modules/@wise/art/dist/index-213daaa3.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
- var init_index_a91e5689_esm = __esm({
146
- "../../node_modules/.pnpm/@wise+art@2.16.3_@transferwise+neptune-css@14.20.0_@types+react@18.3.12_react-dom@18.3.1_reac_ybxnuulsvhsfhz3tk3mxo6vlti/node_modules/@wise/art/dist/index-a91e5689.esm.js"() {
145
+ var init_index_213daaa3_esm = __esm({
146
+ "../../node_modules/.pnpm/@wise+art@2.17.0_@transferwise+neptune-css@14.20.1_@types+react@18.3.16_react-dom@18.3.1_reac_4hsljgguo7de2wpoipdhgf4kzi/node_modules/@wise/art/dist/index-213daaa3.esm.js"() {
147
147
  "use strict";
148
148
  init_clsx();
149
149
  unknownFlagName = "wise";
@@ -161,7 +161,7 @@ var init_index_a91e5689_esm = __esm({
161
161
  const name = fallback !== "unknown" ? `${code.toLowerCase()}${fallback == null && detailed ? "-detailed" : ""}` : unknownFlagName;
162
162
  return /* @__PURE__ */ jsx17("img", {
163
163
  className: clsx(`wds-flag wds-flag-${name}`, className),
164
- src: `https://wise.com/web-art/assets/flags/${name}.svg`,
164
+ src: false ? `${name}.svg` : `https://wise.com/web-art/assets/flags/${name}.svg`,
165
165
  loading,
166
166
  alt: "",
167
167
  width: intrinsicSize,
@@ -2262,6 +2262,9 @@ var quotelessJson = (obj) => {
2262
2262
  return json.replace(/"([^"]+)":/g, "$1:");
2263
2263
  };
2264
2264
  var ZodError = class _ZodError extends Error {
2265
+ get errors() {
2266
+ return this.issues;
2267
+ }
2265
2268
  constructor(issues) {
2266
2269
  super();
2267
2270
  this.issues = [];
@@ -2280,9 +2283,6 @@ var ZodError = class _ZodError extends Error {
2280
2283
  this.name = "ZodError";
2281
2284
  this.issues = issues;
2282
2285
  }
2283
- get errors() {
2284
- return this.issues;
2285
- }
2286
2286
  format(_mapper) {
2287
2287
  const mapper = _mapper || function(issue) {
2288
2288
  return issue.message;
@@ -2490,8 +2490,11 @@ function addIssueToContext(ctx, issueData) {
2490
2490
  path: ctx.path,
2491
2491
  errorMaps: [
2492
2492
  ctx.common.contextualErrorMap,
2493
+ // contextual error map is first priority
2493
2494
  ctx.schemaErrorMap,
2495
+ // then schema-bound map if available
2494
2496
  overrideMap,
2497
+ // then global override map
2495
2498
  overrideMap === errorMap ? void 0 : errorMap
2496
2499
  // then global default map
2497
2500
  ].filter((x) => !!x)
@@ -2642,34 +2645,6 @@ function processCreateParams(params) {
2642
2645
  return { errorMap: customMap, description };
2643
2646
  }
2644
2647
  var ZodType = class {
2645
- constructor(def) {
2646
- this.spa = this.safeParseAsync;
2647
- this._def = def;
2648
- this.parse = this.parse.bind(this);
2649
- this.safeParse = this.safeParse.bind(this);
2650
- this.parseAsync = this.parseAsync.bind(this);
2651
- this.safeParseAsync = this.safeParseAsync.bind(this);
2652
- this.spa = this.spa.bind(this);
2653
- this.refine = this.refine.bind(this);
2654
- this.refinement = this.refinement.bind(this);
2655
- this.superRefine = this.superRefine.bind(this);
2656
- this.optional = this.optional.bind(this);
2657
- this.nullable = this.nullable.bind(this);
2658
- this.nullish = this.nullish.bind(this);
2659
- this.array = this.array.bind(this);
2660
- this.promise = this.promise.bind(this);
2661
- this.or = this.or.bind(this);
2662
- this.and = this.and.bind(this);
2663
- this.transform = this.transform.bind(this);
2664
- this.brand = this.brand.bind(this);
2665
- this.default = this.default.bind(this);
2666
- this.catch = this.catch.bind(this);
2667
- this.describe = this.describe.bind(this);
2668
- this.pipe = this.pipe.bind(this);
2669
- this.readonly = this.readonly.bind(this);
2670
- this.isNullable = this.isNullable.bind(this);
2671
- this.isOptional = this.isOptional.bind(this);
2672
- }
2673
2648
  get description() {
2674
2649
  return this._def.description;
2675
2650
  }
@@ -2733,6 +2708,43 @@ var ZodType = class {
2733
2708
  const result = this._parseSync({ data, path: ctx.path, parent: ctx });
2734
2709
  return handleResult(ctx, result);
2735
2710
  }
2711
+ "~validate"(data) {
2712
+ var _a, _b;
2713
+ const ctx = {
2714
+ common: {
2715
+ issues: [],
2716
+ async: !!this["~standard"].async
2717
+ },
2718
+ path: [],
2719
+ schemaErrorMap: this._def.errorMap,
2720
+ parent: null,
2721
+ data,
2722
+ parsedType: getParsedType(data)
2723
+ };
2724
+ if (!this["~standard"].async) {
2725
+ try {
2726
+ const result = this._parseSync({ data, path: [], parent: ctx });
2727
+ return isValid(result) ? {
2728
+ value: result.value
2729
+ } : {
2730
+ issues: ctx.common.issues
2731
+ };
2732
+ } catch (err) {
2733
+ if ((_b = (_a = err === null || err === void 0 ? void 0 : err.message) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes("encountered")) {
2734
+ this["~standard"].async = true;
2735
+ }
2736
+ ctx.common = {
2737
+ issues: [],
2738
+ async: true
2739
+ };
2740
+ }
2741
+ }
2742
+ return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result) ? {
2743
+ value: result.value
2744
+ } : {
2745
+ issues: ctx.common.issues
2746
+ });
2747
+ }
2736
2748
  async parseAsync(data, params) {
2737
2749
  const result = await this.safeParseAsync(data, params);
2738
2750
  if (result.success)
@@ -2809,6 +2821,39 @@ var ZodType = class {
2809
2821
  superRefine(refinement) {
2810
2822
  return this._refinement(refinement);
2811
2823
  }
2824
+ constructor(def) {
2825
+ this.spa = this.safeParseAsync;
2826
+ this._def = def;
2827
+ this.parse = this.parse.bind(this);
2828
+ this.safeParse = this.safeParse.bind(this);
2829
+ this.parseAsync = this.parseAsync.bind(this);
2830
+ this.safeParseAsync = this.safeParseAsync.bind(this);
2831
+ this.spa = this.spa.bind(this);
2832
+ this.refine = this.refine.bind(this);
2833
+ this.refinement = this.refinement.bind(this);
2834
+ this.superRefine = this.superRefine.bind(this);
2835
+ this.optional = this.optional.bind(this);
2836
+ this.nullable = this.nullable.bind(this);
2837
+ this.nullish = this.nullish.bind(this);
2838
+ this.array = this.array.bind(this);
2839
+ this.promise = this.promise.bind(this);
2840
+ this.or = this.or.bind(this);
2841
+ this.and = this.and.bind(this);
2842
+ this.transform = this.transform.bind(this);
2843
+ this.brand = this.brand.bind(this);
2844
+ this.default = this.default.bind(this);
2845
+ this.catch = this.catch.bind(this);
2846
+ this.describe = this.describe.bind(this);
2847
+ this.pipe = this.pipe.bind(this);
2848
+ this.readonly = this.readonly.bind(this);
2849
+ this.isNullable = this.isNullable.bind(this);
2850
+ this.isOptional = this.isOptional.bind(this);
2851
+ this["~standard"] = {
2852
+ version: 1,
2853
+ vendor: "zod",
2854
+ validate: (data) => this["~validate"](data)
2855
+ };
2856
+ }
2812
2857
  optional() {
2813
2858
  return ZodOptional.create(this, this._def);
2814
2859
  }
@@ -2819,7 +2864,7 @@ var ZodType = class {
2819
2864
  return this.nullable().optional();
2820
2865
  }
2821
2866
  array() {
2822
- return ZodArray.create(this, this._def);
2867
+ return ZodArray.create(this);
2823
2868
  }
2824
2869
  promise() {
2825
2870
  return ZodPromise.create(this, this._def);
@@ -2880,16 +2925,20 @@ var ZodType = class {
2880
2925
  };
2881
2926
  var cuidRegex = /^c[^\s-]{8,}$/i;
2882
2927
  var cuid2Regex = /^[0-9a-z]+$/;
2883
- var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;
2928
+ var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;
2884
2929
  var uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
2885
2930
  var nanoidRegex = /^[a-z0-9_-]{21}$/i;
2931
+ var jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;
2886
2932
  var durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
2887
2933
  var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
2888
2934
  var _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
2889
2935
  var emojiRegex;
2890
2936
  var ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
2891
- var ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;
2937
+ var ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/;
2938
+ var ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
2939
+ var ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
2892
2940
  var base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
2941
+ var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;
2893
2942
  var dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
2894
2943
  var dateRegex = new RegExp(`^${dateRegexSource}$`);
2895
2944
  function timeRegexSource(args) {
@@ -2922,6 +2971,33 @@ function isValidIP(ip, version) {
2922
2971
  }
2923
2972
  return false;
2924
2973
  }
2974
+ function isValidJWT(jwt, alg) {
2975
+ if (!jwtRegex.test(jwt))
2976
+ return false;
2977
+ try {
2978
+ const [header] = jwt.split(".");
2979
+ const base64 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "=");
2980
+ const decoded = JSON.parse(atob(base64));
2981
+ if (typeof decoded !== "object" || decoded === null)
2982
+ return false;
2983
+ if (!decoded.typ || !decoded.alg)
2984
+ return false;
2985
+ if (alg && decoded.alg !== alg)
2986
+ return false;
2987
+ return true;
2988
+ } catch (_a) {
2989
+ return false;
2990
+ }
2991
+ }
2992
+ function isValidCidr(ip, version) {
2993
+ if ((version === "v4" || !version) && ipv4CidrRegex.test(ip)) {
2994
+ return true;
2995
+ }
2996
+ if ((version === "v6" || !version) && ipv6CidrRegex.test(ip)) {
2997
+ return true;
2998
+ }
2999
+ return false;
3000
+ }
2925
3001
  var ZodString = class _ZodString extends ZodType {
2926
3002
  _parse(input) {
2927
3003
  if (this._def.coerce) {
@@ -3178,6 +3254,26 @@ var ZodString = class _ZodString extends ZodType {
3178
3254
  });
3179
3255
  status.dirty();
3180
3256
  }
3257
+ } else if (check.kind === "jwt") {
3258
+ if (!isValidJWT(input.data, check.alg)) {
3259
+ ctx = this._getOrReturnCtx(input, ctx);
3260
+ addIssueToContext(ctx, {
3261
+ validation: "jwt",
3262
+ code: ZodIssueCode.invalid_string,
3263
+ message: check.message
3264
+ });
3265
+ status.dirty();
3266
+ }
3267
+ } else if (check.kind === "cidr") {
3268
+ if (!isValidCidr(input.data, check.version)) {
3269
+ ctx = this._getOrReturnCtx(input, ctx);
3270
+ addIssueToContext(ctx, {
3271
+ validation: "cidr",
3272
+ code: ZodIssueCode.invalid_string,
3273
+ message: check.message
3274
+ });
3275
+ status.dirty();
3276
+ }
3181
3277
  } else if (check.kind === "base64") {
3182
3278
  if (!base64Regex.test(input.data)) {
3183
3279
  ctx = this._getOrReturnCtx(input, ctx);
@@ -3188,6 +3284,16 @@ var ZodString = class _ZodString extends ZodType {
3188
3284
  });
3189
3285
  status.dirty();
3190
3286
  }
3287
+ } else if (check.kind === "base64url") {
3288
+ if (!base64urlRegex.test(input.data)) {
3289
+ ctx = this._getOrReturnCtx(input, ctx);
3290
+ addIssueToContext(ctx, {
3291
+ validation: "base64url",
3292
+ code: ZodIssueCode.invalid_string,
3293
+ message: check.message
3294
+ });
3295
+ status.dirty();
3296
+ }
3191
3297
  } else {
3192
3298
  util.assertNever(check);
3193
3299
  }
@@ -3232,9 +3338,20 @@ var ZodString = class _ZodString extends ZodType {
3232
3338
  base64(message) {
3233
3339
  return this._addCheck(__spreadValues2({ kind: "base64" }, errorUtil.errToObj(message)));
3234
3340
  }
3341
+ base64url(message) {
3342
+ return this._addCheck(__spreadValues2({
3343
+ kind: "base64url"
3344
+ }, errorUtil.errToObj(message)));
3345
+ }
3346
+ jwt(options) {
3347
+ return this._addCheck(__spreadValues2({ kind: "jwt" }, errorUtil.errToObj(options)));
3348
+ }
3235
3349
  ip(options) {
3236
3350
  return this._addCheck(__spreadValues2({ kind: "ip" }, errorUtil.errToObj(options)));
3237
3351
  }
3352
+ cidr(options) {
3353
+ return this._addCheck(__spreadValues2({ kind: "cidr" }, errorUtil.errToObj(options)));
3354
+ }
3238
3355
  datetime(options) {
3239
3356
  var _a, _b;
3240
3357
  if (typeof options === "string") {
@@ -3316,8 +3433,7 @@ var ZodString = class _ZodString extends ZodType {
3316
3433
  }, errorUtil.errToObj(message)));
3317
3434
  }
3318
3435
  /**
3319
- * @deprecated Use z.string().min(1) instead.
3320
- * @see {@link ZodString.min}
3436
+ * Equivalent to `.min(1)`
3321
3437
  */
3322
3438
  nonempty(message) {
3323
3439
  return this.min(1, errorUtil.errToObj(message));
@@ -3376,9 +3492,15 @@ var ZodString = class _ZodString extends ZodType {
3376
3492
  get isIP() {
3377
3493
  return !!this._def.checks.find((ch) => ch.kind === "ip");
3378
3494
  }
3495
+ get isCIDR() {
3496
+ return !!this._def.checks.find((ch) => ch.kind === "cidr");
3497
+ }
3379
3498
  get isBase64() {
3380
3499
  return !!this._def.checks.find((ch) => ch.kind === "base64");
3381
3500
  }
3501
+ get isBase64url() {
3502
+ return !!this._def.checks.find((ch) => ch.kind === "base64url");
3503
+ }
3382
3504
  get minLength() {
3383
3505
  let min = null;
3384
3506
  for (const ch of this._def.checks) {
@@ -3652,17 +3774,15 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
3652
3774
  }
3653
3775
  _parse(input) {
3654
3776
  if (this._def.coerce) {
3655
- input.data = BigInt(input.data);
3777
+ try {
3778
+ input.data = BigInt(input.data);
3779
+ } catch (_a) {
3780
+ return this._getInvalidInput(input);
3781
+ }
3656
3782
  }
3657
3783
  const parsedType = this._getType(input);
3658
3784
  if (parsedType !== ZodParsedType.bigint) {
3659
- const ctx2 = this._getOrReturnCtx(input);
3660
- addIssueToContext(ctx2, {
3661
- code: ZodIssueCode.invalid_type,
3662
- expected: ZodParsedType.bigint,
3663
- received: ctx2.parsedType
3664
- });
3665
- return INVALID;
3785
+ return this._getInvalidInput(input);
3666
3786
  }
3667
3787
  let ctx = void 0;
3668
3788
  const status = new ParseStatus();
@@ -3709,6 +3829,15 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
3709
3829
  }
3710
3830
  return { status: status.value, value: input.data };
3711
3831
  }
3832
+ _getInvalidInput(input) {
3833
+ const ctx = this._getOrReturnCtx(input);
3834
+ addIssueToContext(ctx, {
3835
+ code: ZodIssueCode.invalid_type,
3836
+ expected: ZodParsedType.bigint,
3837
+ received: ctx.parsedType
3838
+ });
3839
+ return INVALID;
3840
+ }
3712
3841
  gte(value, message) {
3713
3842
  return this.setLimit("min", value, true, errorUtil.toString(message));
3714
3843
  }
@@ -10375,7 +10504,7 @@ var createSearchComponent = (searchProps, performSearch, onAction, updateCompone
10375
10504
  draft.query = query;
10376
10505
  draft.isLoading = true;
10377
10506
  });
10378
- debouncedSearch(query);
10507
+ debouncedSearch(query.trim());
10379
10508
  };
10380
10509
  return {
10381
10510
  type: "search",
@@ -11855,8 +11984,8 @@ var DateInputRenderer_default = DateInputRenderer;
11855
11984
  // ../renderers/src/DecisionRenderer.tsx
11856
11985
  import { NavigationOptionsList, NavigationOption, Header } from "@transferwise/components";
11857
11986
 
11858
- // ../../node_modules/.pnpm/@wise+art@2.16.3_@transferwise+neptune-css@14.20.0_@types+react@18.3.12_react-dom@18.3.1_reac_ybxnuulsvhsfhz3tk3mxo6vlti/node_modules/@wise/art/dist/index.esm.js
11859
- init_index_a91e5689_esm();
11987
+ // ../../node_modules/.pnpm/@wise+art@2.17.0_@transferwise+neptune-css@14.20.1_@types+react@18.3.16_react-dom@18.3.1_reac_4hsljgguo7de2wpoipdhgf4kzi/node_modules/@wise/art/dist/index.esm.js
11988
+ init_index_213daaa3_esm();
11860
11989
  init_clsx();
11861
11990
  import "react";
11862
11991
  import "react/jsx-runtime";
@@ -18977,7 +19106,7 @@ function DynamicSearch({ component, onAction }) {
18977
19106
  };
18978
19107
  const onChange = (value) => {
18979
19108
  setQuery(value);
18980
- debouncedSearch(value);
19109
+ debouncedSearch(value.trim());
18981
19110
  };
18982
19111
  const onResultSelected = ({ type, value }) => {
18983
19112
  if (type === "action") {
@@ -18992,7 +19121,7 @@ function DynamicSearch({ component, onAction }) {
18992
19121
  setQuery(value.query);
18993
19122
  const { url: url2, method: method2, param: param2, query: query2 } = value;
18994
19123
  onEvent("Dynamic Flow - Search Result Selected", { type: "search" });
18995
- void search(query2, { url: url2, method: method2, param: param2 });
19124
+ void search(query2.trim(), { url: url2, method: method2, param: param2 });
18996
19125
  }
18997
19126
  };
18998
19127
  const onRetrySearch = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-client",
3
- "version": "3.28.4",
3
+ "version": "3.28.6",
4
4
  "description": "Dynamic Flow web client",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/main.min.js",
@@ -31,35 +31,35 @@
31
31
  "@babel/plugin-syntax-flow": "7.26.0",
32
32
  "@babel/plugin-transform-react-jsx": "7.25.9",
33
33
  "@babel/preset-env": "7.26.0",
34
- "@babel/preset-react": "7.25.9",
34
+ "@babel/preset-react": "7.26.3",
35
35
  "@babel/preset-typescript": "7.26.0",
36
36
  "@chromatic-com/storybook": "3.2.2",
37
- "@formatjs/cli": "^6.3.11",
38
- "@storybook/addon-a11y": "^8.4.6",
39
- "@storybook/addon-actions": "^8.4.6",
40
- "@storybook/addon-essentials": "^8.4.6",
41
- "@storybook/addon-interactions": "^8.4.6",
42
- "@storybook/addon-links": "^8.4.6",
37
+ "@formatjs/cli": "^6.3.14",
38
+ "@storybook/addon-a11y": "^8.4.7",
39
+ "@storybook/addon-actions": "^8.4.7",
40
+ "@storybook/addon-essentials": "^8.4.7",
41
+ "@storybook/addon-interactions": "^8.4.7",
42
+ "@storybook/addon-links": "^8.4.7",
43
43
  "@storybook/addon-webpack5-compiler-babel": "^3.0.3",
44
- "@storybook/manager-api": "^8.4.6",
45
- "@storybook/react": "^8.4.6",
46
- "@storybook/react-webpack5": "^8.4.6",
47
- "@storybook/test": "^8.4.6",
48
- "@storybook/types": "^8.4.6",
44
+ "@storybook/manager-api": "^8.4.7",
45
+ "@storybook/react": "^8.4.7",
46
+ "@storybook/react-webpack5": "^8.4.7",
47
+ "@storybook/test": "^8.4.7",
48
+ "@storybook/types": "^8.4.7",
49
49
  "@testing-library/dom": "10.4.0",
50
50
  "@testing-library/jest-dom": "6.6.3",
51
- "@testing-library/react": "16.0.1",
51
+ "@testing-library/react": "16.1.0",
52
52
  "@testing-library/user-event": "14.5.2",
53
- "@transferwise/components": "46.80.0",
53
+ "@transferwise/components": "46.84.0",
54
54
  "@transferwise/formatting": "^2.13.0",
55
55
  "@transferwise/icons": "3.15.0",
56
- "@transferwise/neptune-css": "14.20.0",
57
- "@types/node": "22.10.1",
56
+ "@transferwise/neptune-css": "14.20.1",
57
+ "@types/node": "22.10.2",
58
58
  "@types/jest": "29.5.14",
59
- "@types/react": "18.3.12",
60
- "@types/react-dom": "18.3.1",
59
+ "@types/react": "18.3.16",
60
+ "@types/react-dom": "18.3.5",
61
61
  "@types/react-intl": "3.0.0",
62
- "@wise/art": "2.16.3",
62
+ "@wise/art": "2.17.0",
63
63
  "@wise/components-theming": "^1.6.1",
64
64
  "babel-jest": "29.7.0",
65
65
  "esbuild": "0.24.0",
@@ -68,21 +68,21 @@
68
68
  "jest-fetch-mock": "^3.0.3",
69
69
  "jest-watch-typeahead": "^2.2.2",
70
70
  "nanoid": "5.0.9",
71
- "npm-run-all2": "6.2.6",
71
+ "npm-run-all2": "7.0.1",
72
72
  "postcss": "^8.4.49",
73
73
  "postcss-cli": "^11.0.0",
74
74
  "postcss-import": "^15.1.0",
75
75
  "react": "18.3.1",
76
76
  "react-dom": "18.3.1",
77
77
  "react-intl": "6.8.9",
78
- "storybook": "^8.4.6",
79
- "stylelint": "16.11.0",
78
+ "storybook": "^8.4.7",
79
+ "stylelint": "16.12.0",
80
80
  "stylelint-config-standard": "36.0.1",
81
81
  "stylelint-no-unsupported-browser-features": "8.0.2",
82
82
  "stylelint-value-no-unknown-custom-properties": "6.0.1",
83
83
  "tsx": "4.19.2",
84
84
  "typescript": "5.7.2",
85
- "webpack": "5.96.1",
85
+ "webpack": "5.97.1",
86
86
  "@wise/dynamic-flow-fixtures": "0.0.1",
87
87
  "@wise/dynamic-flow-renderers": "0.0.0"
88
88
  },
@@ -101,7 +101,7 @@
101
101
  "nanoid": "5.0.9",
102
102
  "react-webcam": "^7.2.0",
103
103
  "screenfull": "^5.2.0",
104
- "@wise/dynamic-flow-types": "2.28.1"
104
+ "@wise/dynamic-flow-types": "2.28.2"
105
105
  },
106
106
  "scripts": {
107
107
  "dev": "pnpm build:visual-tests && storybook dev -p 3003",