@saasquatch/mint-components 2.0.0-12 → 2.0.0-14

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.
@@ -3207,14 +3207,14 @@ const PayoutStatusAlert = class {
3207
3207
  }
3208
3208
  };
3209
3209
  function useDemoPayoutStatusAlert(props) {
3210
- const parsed = parseStates.parseStates(props.stateController);
3211
- const stateControllerData = parsed["sqm-payout-status-alert"]
3212
- ? { states: parsed["sqm-payout-status-alert"] }
3213
- : {};
3210
+ const states = parseStates.parseStates(props.stateController);
3211
+ const formatted = Object.keys(states).reduce((prev, key) => key === "sqm-payout-status-alert"
3212
+ ? { ...prev, ...states[key] }
3213
+ : { ...prev, [`${key}_stateController`]: states[key] }, {});
3214
3214
  const base = {
3215
3215
  states: {
3216
3216
  error: false,
3217
- status: "INFORMATION_REQUIRED",
3217
+ status: states.status || "INFORMATION_REQUIRED",
3218
3218
  loading: false,
3219
3219
  veriffLoading: false,
3220
3220
  },
@@ -3228,7 +3228,7 @@ function useDemoPayoutStatusAlert(props) {
3228
3228
  return cjs.cjs.all([
3229
3229
  base,
3230
3230
  props.demoData || {},
3231
- stateControllerData,
3231
+ formatted,
3232
3232
  ], { arrayMerge: (_, a) => a });
3233
3233
  }
3234
3234
 
@@ -704,14 +704,14 @@ export class PayoutStatusAlert {
704
704
  }; }
705
705
  }
706
706
  function useDemoPayoutStatusAlert(props) {
707
- const parsed = parseStates(props.stateController);
708
- const stateControllerData = parsed["sqm-payout-status-alert"]
709
- ? { states: parsed["sqm-payout-status-alert"] }
710
- : {};
707
+ const states = parseStates(props.stateController);
708
+ const formatted = Object.keys(states).reduce((prev, key) => key === "sqm-payout-status-alert"
709
+ ? { ...prev, ...states[key] }
710
+ : { ...prev, [`${key}_stateController`]: states[key] }, {});
711
711
  const base = {
712
712
  states: {
713
713
  error: false,
714
- status: "INFORMATION_REQUIRED",
714
+ status: states.status || "INFORMATION_REQUIRED",
715
715
  loading: false,
716
716
  veriffLoading: false,
717
717
  },
@@ -725,6 +725,6 @@ function useDemoPayoutStatusAlert(props) {
725
725
  return deepmerge.all([
726
726
  base,
727
727
  props.demoData || {},
728
- stateControllerData,
728
+ formatted,
729
729
  ], { arrayMerge: (_, a) => a });
730
730
  }
@@ -3203,14 +3203,14 @@ const PayoutStatusAlert = class {
3203
3203
  }
3204
3204
  };
3205
3205
  function useDemoPayoutStatusAlert(props) {
3206
- const parsed = parseStates(props.stateController);
3207
- const stateControllerData = parsed["sqm-payout-status-alert"]
3208
- ? { states: parsed["sqm-payout-status-alert"] }
3209
- : {};
3206
+ const states = parseStates(props.stateController);
3207
+ const formatted = Object.keys(states).reduce((prev, key) => key === "sqm-payout-status-alert"
3208
+ ? { ...prev, ...states[key] }
3209
+ : { ...prev, [`${key}_stateController`]: states[key] }, {});
3210
3210
  const base = {
3211
3211
  states: {
3212
3212
  error: false,
3213
- status: "INFORMATION_REQUIRED",
3213
+ status: states.status || "INFORMATION_REQUIRED",
3214
3214
  loading: false,
3215
3215
  veriffLoading: false,
3216
3216
  },
@@ -3224,7 +3224,7 @@ function useDemoPayoutStatusAlert(props) {
3224
3224
  return cjs.all([
3225
3225
  base,
3226
3226
  props.demoData || {},
3227
- stateControllerData,
3227
+ formatted,
3228
3228
  ], { arrayMerge: (_, a) => a });
3229
3229
  }
3230
3230