@wise/dynamic-flow-client 3.11.4-experimental-node20-6554c5d → 3.11.4-experimental-node-20-46784b5

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 CHANGED
@@ -6725,7 +6725,9 @@ var compareLocalValue = (valueA, valueB) => {
6725
6725
  return valueA.length === valueB.length && valueA.every((value, index) => compareLocalValue(value, valueB[index]));
6726
6726
  }
6727
6727
  if (isObjectLocalValue(valueA) && isObjectLocalValue(valueB)) {
6728
- return Object.keys(valueA).every((key) => compareLocalValue(valueA[key], valueB[key]));
6728
+ const keysA = Object.keys(valueA);
6729
+ const keysB = Object.keys(valueB);
6730
+ return keysA.length === keysB.length && keysA.every((key) => compareLocalValue(valueA[key], valueB[key]));
6729
6731
  }
6730
6732
  return valueA === valueB;
6731
6733
  };
@@ -7792,17 +7794,20 @@ var isPartialLocalValueMatch = (partialValue, component) => {
7792
7794
  if (isObjectLocalValue(partialValue) && isObjectLocalValue(componentValue)) {
7793
7795
  return isPartialObjectMatch(partialValue, componentValue, component);
7794
7796
  }
7795
- return true;
7797
+ return null;
7796
7798
  };
7797
7799
  var isPartialObjectMatch = (partialValue, componentValue, component) => {
7798
- const resultByKey = getMatchingKeys(partialValue, componentValue).map((key) => {
7800
+ const results = getMatchingKeys(partialValue, componentValue).map((key) => {
7799
7801
  const componentForKey = getComponentForLocalValueKey(key, component);
7800
- if (componentForKey && componentForKey.type === "const") {
7801
- return isPartialLocalValueMatch(partialValue[key], componentForKey);
7802
- }
7803
- return null;
7802
+ return componentForKey && componentForKey.type === "const" ? isPartialLocalValueMatch(partialValue[key], componentForKey) : null;
7804
7803
  });
7805
- return resultByKey.includes(true) && !resultByKey.includes(false);
7804
+ if (results.includes(false)) {
7805
+ return false;
7806
+ }
7807
+ if (results.includes(true)) {
7808
+ return true;
7809
+ }
7810
+ return null;
7806
7811
  };
7807
7812
  var getMatchingKeys = (a, b) => {
7808
7813
  const allKeys = Array.from(/* @__PURE__ */ new Set([...Object.keys(a), ...Object.keys(b)]));
@@ -7917,7 +7922,7 @@ var createSelectInputComponent = (selectProps, updateComponent) => {
7917
7922
  }
7918
7923
  });
7919
7924
  };
7920
- var isTrue = (value) => value;
7925
+ var isTrue = (value) => value === true;
7921
7926
 
7922
7927
  // src/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.ts
7923
7928
  var oneOfSchemaToComponent = (schemaMapperProps, mapperProps) => {
@@ -10440,7 +10445,7 @@ function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
10440
10445
  return deterministicId || (id ? `radix-${id}` : "");
10441
10446
  }
10442
10447
 
10443
- // ../../node_modules/.pnpm/@wise+forms@0.3.4_@transferwise+components@46.35.0_@types+react@18.0.29_react@18.2.0/node_modules/@wise/forms/dist/index.mjs
10448
+ // ../../node_modules/.pnpm/@wise+forms@0.3.4_@transferwise+components@46.36.0_@types+react@18.0.29_react@18.2.0/node_modules/@wise/forms/dist/index.mjs
10444
10449
  var import_components3 = require("@transferwise/components");
10445
10450
  var import_classnames = __toESM(require_classnames(), 1);
10446
10451
  var import_react7 = require("react");
@@ -10734,7 +10739,16 @@ function VariableDateInput({
10734
10739
  control,
10735
10740
  inputProps
10736
10741
  }) {
10737
- const { minimumDate, maximumDate, placeholder, disabled, onBlur, onChange, onFocus } = inputProps;
10742
+ const {
10743
+ autoComplete,
10744
+ minimumDate,
10745
+ maximumDate,
10746
+ placeholder,
10747
+ disabled,
10748
+ onBlur,
10749
+ onChange,
10750
+ onFocus
10751
+ } = inputProps;
10738
10752
  if (control === "date-lookup") {
10739
10753
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
10740
10754
  import_components7.DateLookup,
@@ -10752,8 +10766,20 @@ function VariableDateInput({
10752
10766
  }
10753
10767
  );
10754
10768
  }
10755
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_components7.DateInput, __spreadValues({}, inputProps));
10769
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
10770
+ import_components7.DateInput,
10771
+ __spreadProps(__spreadValues({}, inputProps), {
10772
+ dayAutoComplete: getAutocompleteString2(autoComplete, "day"),
10773
+ yearAutoComplete: getAutocompleteString2(autoComplete, "year")
10774
+ })
10775
+ );
10756
10776
  }
10777
+ var getAutocompleteString2 = (value, suffix) => {
10778
+ if (value === "bday") {
10779
+ return `${value}-${suffix}`;
10780
+ }
10781
+ return void 0;
10782
+ };
10757
10783
  var VariableDateInput_default = VariableDateInput;
10758
10784
 
10759
10785
  // src/revamp/wise/renderers/DateInputRenderer.tsx
@@ -15448,7 +15474,7 @@ var logInvalidTypeFallbackWarning = ({
15448
15474
  };
15449
15475
 
15450
15476
  // src/legacy/formControl/utils/getAutocompleteString.ts
15451
- var getAutocompleteString2 = (hints, { prefix = "", suffix = "" } = {}) => {
15477
+ var getAutocompleteString3 = (hints, { prefix = "", suffix = "" } = {}) => {
15452
15478
  const autoCompleteString = hints.map((hint) => {
15453
15479
  const builtHint = `${prefix}${hint}${suffix}`;
15454
15480
  return isAutocompleteToken(builtHint) ? autocompleteTokenMap2[builtHint] : void 0;
@@ -15531,7 +15557,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
15531
15557
  this.getAutocompleteValue = ({ prefix = "", suffix = "" } = {}) => {
15532
15558
  const { autoComplete, autocompleteHint } = this.props;
15533
15559
  if (isArray2(autocompleteHint)) {
15534
- return getAutocompleteString2(autocompleteHint, { prefix, suffix });
15560
+ return getAutocompleteString3(autocompleteHint, { prefix, suffix });
15535
15561
  }
15536
15562
  return autoComplete ? "on" : "off";
15537
15563
  };