@saasquatch/mint-components 1.15.0-137 → 1.15.0-139

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 (25) hide show
  1. package/dist/cjs/{ShadowViewAddon-e56c90ab.js → ShadowViewAddon-4bdc20e8.js} +7 -8
  2. package/dist/cjs/sqm-big-stat_44.cjs.entry.js +40 -35
  3. package/dist/cjs/sqm-stencilbook.cjs.entry.js +1 -1
  4. package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeListData.js +1 -1
  5. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +6 -7
  6. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +43 -38
  7. package/dist/esm/{ShadowViewAddon-439a4d47.js → ShadowViewAddon-41dd2aeb.js} +7 -8
  8. package/dist/esm/sqm-big-stat_44.entry.js +40 -35
  9. package/dist/esm/sqm-stencilbook.entry.js +1 -1
  10. package/dist/esm-es5/{ShadowViewAddon-439a4d47.js → ShadowViewAddon-41dd2aeb.js} +1 -1
  11. package/dist/esm-es5/sqm-big-stat_44.entry.js +1 -1
  12. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  13. package/dist/mint-components/mint-components.esm.js +1 -1
  14. package/dist/mint-components/{p-019a2c63.system.js → p-05a307c7.system.js} +1 -1
  15. package/dist/mint-components/{p-bb295a46.system.entry.js → p-15f7b849.system.entry.js} +1 -1
  16. package/dist/mint-components/{p-7a47c86c.entry.js → p-588b7c45.entry.js} +1 -1
  17. package/dist/mint-components/{p-4a3fd23f.js → p-5aaa8cfc.js} +1 -1
  18. package/dist/mint-components/{p-9d8815bb.entry.js → p-bc7b703a.entry.js} +6 -6
  19. package/dist/mint-components/p-cb39dc04.system.js +1 -1
  20. package/dist/mint-components/{p-6a05eb09.system.entry.js → p-f0476abd.system.entry.js} +1 -1
  21. package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list.d.ts +4 -4
  22. package/dist/types/components.d.ts +8 -8
  23. package/docs/docs.docx +0 -0
  24. package/docs/raisins.json +1 -1
  25. package/package.json +1 -1
@@ -3605,7 +3605,7 @@ function RewardExchangeView(props) {
3605
3605
  index.h("sl-button", { exportparts: "base: primarybutton-base", class: "continue", size: "large", type: "primary", onClick: () => callbacks.setStage("confirmation"), disabled: isDisabled }, states.content.text.continueToConfirmationText)))));
3606
3606
  }
3607
3607
  function confirmation() {
3608
- const cost = (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || selectedItem.prettySourceValue;
3608
+ const cost = (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.prettySourceValue);
3609
3609
  const amount = selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettyDestinationValue;
3610
3610
  return (index.h("div", null,
3611
3611
  index.h("div", { class: sheet$8.classes.Confirmation, part: "confirmation-container" },
@@ -3613,7 +3613,7 @@ function RewardExchangeView(props) {
3613
3613
  index.h("div", { class: "wrapper" },
3614
3614
  index.h("div", { class: "field" }, states.content.text.rewardNameTitle),
3615
3615
  index.h("div", { class: "reward-item-container" },
3616
- index.h("div", { class: "reward-title" }, selectedItem.name),
3616
+ index.h("div", { class: "reward-title" }, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.name),
3617
3617
  index.h("img", { class: "image", src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
3618
3618
  index.getAssetPath("./assets/Reward-image.png") }))),
3619
3619
  index.h("div", { class: "wrapper padding" },
@@ -3629,7 +3629,7 @@ function RewardExchangeView(props) {
3629
3629
  index.h("sl-button", { class: "continue", size: "large", type: "primary", loading: states.loading, onClick: callbacks.exchangeReward }, states.content.text.redeemText)))));
3630
3630
  }
3631
3631
  function success() {
3632
- var _a, _b, _c, _d, _e, _f;
3632
+ var _a, _b, _c, _d, _e, _f, _g, _h;
3633
3633
  return (index.h("div", { class: sheet$8.classes.Success, part: "success-container" },
3634
3634
  index.h(Gift$1, null),
3635
3635
  index.h(Confetti, null),
@@ -3638,13 +3638,12 @@ function RewardExchangeView(props) {
3638
3638
  id: "successMessage",
3639
3639
  defaultMessage: states.content.text.redemptionSuccessText,
3640
3640
  }, {
3641
- sourceValue: (_b = states.selectedItem.prettySourceValue) !== null && _b !== void 0 ? _b : (_c = states.selectedStep) === null || _c === void 0 ? void 0 : _c.prettySourceValue,
3642
- destinationValue: ((_d = states.selectedStep) === null || _d === void 0 ? void 0 : _d.prettyDestinationValue) || ((_e = states.selectedItem) === null || _e === void 0 ? void 0 : _e.name) ||
3643
- states.selectedItem.globalRewardKey,
3641
+ sourceValue: (_c = (_b = states.selectedItem) === null || _b === void 0 ? void 0 : _b.prettySourceValue) !== null && _c !== void 0 ? _c : (_d = states.selectedStep) === null || _d === void 0 ? void 0 : _d.prettySourceValue,
3642
+ destinationValue: ((_e = states.selectedStep) === null || _e === void 0 ? void 0 : _e.prettyDestinationValue) || ((_f = states.selectedItem) === null || _f === void 0 ? void 0 : _f.name) || ((_g = states.selectedItem) === null || _g === void 0 ? void 0 : _g.globalRewardKey),
3644
3643
  })),
3645
3644
  (data === null || data === void 0 ? void 0 : data.fuelTankCode) && (index.h("div", { class: "promo" },
3646
3645
  states.content.text.promoCode,
3647
- index.h(copyTextView.CopyTextView, { copyString: data.fuelTankCode, tooltiptext: (_f = states === null || states === void 0 ? void 0 : states.content) === null || _f === void 0 ? void 0 : _f.text.tooltipText, open: states.open, onClick: callbacks.copyFuelTankCode }))),
3646
+ index.h(copyTextView.CopyTextView, { copyString: data.fuelTankCode, tooltiptext: (_h = states === null || states === void 0 ? void 0 : states.content) === null || _h === void 0 ? void 0 : _h.text.tooltipText, open: states.open, onClick: callbacks.copyFuelTankCode }))),
3648
3647
  index.h("div", { class: sheet$8.classes.Button },
3649
3648
  index.h("sl-button", { class: "continue center", type: "primary", size: "large", onClick: () => callbacks.resetState(true) }, states.content.text.doneText))));
3650
3649
  }
@@ -3942,7 +3941,7 @@ const rewardExchange = {
3942
3941
  ...baseResponse(data),
3943
3942
  };
3944
3943
  const demoRewardExchange = {
3945
- ...baseResponse(demoData),
3944
+ ...baseResponse(demoData, "chooseReward", baseReward),
3946
3945
  };
3947
3946
  const rewardExchangeLongText = {
3948
3947
  ...baseResponse([
@@ -25,7 +25,7 @@ const sqmPortalLoginView = require('./sqm-portal-login-view-bb50304c.js');
25
25
  const usePortalLogin = require('./usePortalLogin-6aa864ef.js');
26
26
  const AsYouType = require('./AsYouType-6788393a.js');
27
27
  const utilities = require('./utilities-9a0c5e91.js');
28
- const ShadowViewAddon = require('./ShadowViewAddon-e56c90ab.js');
28
+ const ShadowViewAddon = require('./ShadowViewAddon-4bdc20e8.js');
29
29
  require('./sqm-portal-container-view-07e4343f.js');
30
30
  const parseStates = require('./parseStates-d1effc19.js');
31
31
  const usePayoutStatus = require('./usePayoutStatus-3b34dab1.js');
@@ -5279,10 +5279,10 @@ const SqmRewardExchangeList = class {
5279
5279
  */
5280
5280
  this.costTitle = "Cost to Redeem";
5281
5281
  /**
5282
- * @componentState { "title": "Choose reward", "props": { "redeemStage": "chooseReward" }, "dependencies": ["sqm-reward-exchange-list"] }
5283
- * @componentState { "title": "Reward details", "props": { "redeemStage": "chooseAmount" }, "dependencies": ["sqm-reward-exchange-list"] }
5284
- * @componentState { "title": "Confirm exchange", "props": { "redeemStage": "confirmation" }, "dependencies": ["sqm-reward-exchange-list"] }
5285
- * @componentState { "title": "Exchange successful", "props": { "redeemStage": "success" }, "dependencies": ["sqm-reward-exchange-list"] }
5282
+ * @componentState { "title": "Choose reward", "props": { "states": { "redeemStage": "chooseReward" } }, "dependencies": ["sqm-reward-exchange-list"] }
5283
+ * @componentState { "title": "Reward details", "props": { "states": { "redeemStage": "chooseAmount" } }, "dependencies": ["sqm-reward-exchange-list"] }
5284
+ * @componentState { "title": "Confirm exchange", "props": { "states": { "redeemStage": "confirmation" } }, "dependencies": ["sqm-reward-exchange-list"] }
5285
+ * @componentState { "title": "Exchange successful", "props": { "states": { "redeemStage": "success" } }, "dependencies": ["sqm-reward-exchange-list"] }
5286
5286
  */
5287
5287
  this.stateController = "{}";
5288
5288
  domContextHooks_module.h$1(this);
@@ -5308,36 +5308,41 @@ function useRewardExchangeListDemo(props) {
5308
5308
  const formatted = Object.keys(states).reduce((prev, key) => key === "sqm-reward-exchange-list"
5309
5309
  ? { ...prev, ...states[key] }
5310
5310
  : { ...prev, [`${key}_stateController`]: states[key] }, {});
5311
- return cjs.cjs({
5312
- states: {
5313
- content: {
5314
- text: props,
5315
- },
5316
- redeemStage: "chooseReward",
5317
- amount: 0,
5318
- selectedStep: undefined,
5319
- selectedItem: undefined,
5320
- open: false,
5321
- exchangeError: false,
5322
- queryError: false,
5323
- loading: false,
5324
- noExchangeOptions: false,
5325
- },
5326
- data: {
5327
- // shareCode: "SHARECODE123",
5328
- exchangeList: ShadowViewAddon.demoRewardExchange.data.exchangeList,
5329
- },
5330
- callbacks: {
5331
- exchangeReward: () => { },
5332
- setExchangeState: (_) => { },
5333
- setStage: (_) => { },
5334
- resetState: () => { },
5335
- copyFuelTankCode: () => { },
5336
- },
5337
- refs: {
5338
- canvasRef: {},
5339
- },
5340
- }, props.demoData || formatted || {}, { arrayMerge: (_, a) => a });
5311
+ const finalProps = cjs.cjs({ ...ShadowViewAddon.demoRewardExchange, content: { text: props } },
5312
+ // {
5313
+ // states: {
5314
+ // content: {
5315
+ // text: props,
5316
+ // },
5317
+ // redeemStage: "chooseReward",
5318
+ // amount: 0,
5319
+ // selectedStep: undefined,
5320
+ // selectedItem: undefined,
5321
+ // open: false,
5322
+ // exchangeError: false,
5323
+ // queryError: false,
5324
+ // loading: false,
5325
+ // noExchangeOptions: false,
5326
+ // // empty: EmptySlot(),
5327
+ // },
5328
+ // data: {
5329
+ // // shareCode: "SHARECODE123",
5330
+ // exchangeList: demoRewardExchange.data.exchangeList,
5331
+ // },
5332
+ // callbacks: {
5333
+ // exchangeReward: () => {},
5334
+ // setExchangeState: (_: ExchangeState) => {},
5335
+ // setStage: (_: Stages) => {},
5336
+ // resetState: () => {},
5337
+ // copyFuelTankCode: () => {},
5338
+ // },
5339
+ // refs: {
5340
+ // canvasRef: {},
5341
+ // },
5342
+ // },
5343
+ props.demoData || formatted || {}, { arrayMerge: (_, a) => a });
5344
+ console.log({ finalProps });
5345
+ return finalProps;
5341
5346
  }
5342
5347
 
5343
5348
  const debug$1 = domContextHooks_module.browser("sq:useRouter");
@@ -32,7 +32,7 @@ require('./utilities-9a0c5e91.js');
32
32
  const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-25eb2099.js');
33
33
  const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-1c4e781f.js');
34
34
  const sqmQrCodeView = require('./sqm-qr-code-view-0c3b2f48.js');
35
- const ShadowViewAddon = require('./ShadowViewAddon-e56c90ab.js');
35
+ const ShadowViewAddon = require('./ShadowViewAddon-4bdc20e8.js');
36
36
  const sqmPortalContainerView = require('./sqm-portal-container-view-07e4343f.js');
37
37
  const IndirectTaxDetailsView = require('./IndirectTaxDetailsView-92481647.js');
38
38
  const utils = require('./utils-ba8fc342.js');
@@ -223,7 +223,7 @@ export const rewardExchange = {
223
223
  ...baseResponse(data),
224
224
  };
225
225
  export const demoRewardExchange = {
226
- ...baseResponse(demoData),
226
+ ...baseResponse(demoData, "chooseReward", baseReward),
227
227
  };
228
228
  export const rewardExchangeLongText = {
229
229
  ...baseResponse([
@@ -496,7 +496,7 @@ export function RewardExchangeView(props) {
496
496
  h("sl-button", { exportparts: "base: primarybutton-base", class: "continue", size: "large", type: "primary", onClick: () => callbacks.setStage("confirmation"), disabled: isDisabled }, states.content.text.continueToConfirmationText)))));
497
497
  }
498
498
  function confirmation() {
499
- const cost = (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || selectedItem.prettySourceValue;
499
+ const cost = (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.prettySourceValue);
500
500
  const amount = selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettyDestinationValue;
501
501
  return (h("div", null,
502
502
  h("div", { class: sheet.classes.Confirmation, part: "confirmation-container" },
@@ -504,7 +504,7 @@ export function RewardExchangeView(props) {
504
504
  h("div", { class: "wrapper" },
505
505
  h("div", { class: "field" }, states.content.text.rewardNameTitle),
506
506
  h("div", { class: "reward-item-container" },
507
- h("div", { class: "reward-title" }, selectedItem.name),
507
+ h("div", { class: "reward-title" }, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.name),
508
508
  h("img", { class: "image", src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
509
509
  getAssetPath("./assets/Reward-image.png") }))),
510
510
  h("div", { class: "wrapper padding" },
@@ -520,7 +520,7 @@ export function RewardExchangeView(props) {
520
520
  h("sl-button", { class: "continue", size: "large", type: "primary", loading: states.loading, onClick: callbacks.exchangeReward }, states.content.text.redeemText)))));
521
521
  }
522
522
  function success() {
523
- var _a, _b, _c, _d, _e, _f;
523
+ var _a, _b, _c, _d, _e, _f, _g, _h;
524
524
  return (h("div", { class: sheet.classes.Success, part: "success-container" },
525
525
  h(Gift, null),
526
526
  h(Confetti, null),
@@ -529,13 +529,12 @@ export function RewardExchangeView(props) {
529
529
  id: "successMessage",
530
530
  defaultMessage: states.content.text.redemptionSuccessText,
531
531
  }, {
532
- sourceValue: (_b = states.selectedItem.prettySourceValue) !== null && _b !== void 0 ? _b : (_c = states.selectedStep) === null || _c === void 0 ? void 0 : _c.prettySourceValue,
533
- destinationValue: ((_d = states.selectedStep) === null || _d === void 0 ? void 0 : _d.prettyDestinationValue) || ((_e = states.selectedItem) === null || _e === void 0 ? void 0 : _e.name) ||
534
- states.selectedItem.globalRewardKey,
532
+ sourceValue: (_c = (_b = states.selectedItem) === null || _b === void 0 ? void 0 : _b.prettySourceValue) !== null && _c !== void 0 ? _c : (_d = states.selectedStep) === null || _d === void 0 ? void 0 : _d.prettySourceValue,
533
+ destinationValue: ((_e = states.selectedStep) === null || _e === void 0 ? void 0 : _e.prettyDestinationValue) || ((_f = states.selectedItem) === null || _f === void 0 ? void 0 : _f.name) || ((_g = states.selectedItem) === null || _g === void 0 ? void 0 : _g.globalRewardKey),
535
534
  })),
536
535
  (data === null || data === void 0 ? void 0 : data.fuelTankCode) && (h("div", { class: "promo" },
537
536
  states.content.text.promoCode,
538
- h(CopyTextView, { copyString: data.fuelTankCode, tooltiptext: (_f = states === null || states === void 0 ? void 0 : states.content) === null || _f === void 0 ? void 0 : _f.text.tooltipText, open: states.open, onClick: callbacks.copyFuelTankCode }))),
537
+ h(CopyTextView, { copyString: data.fuelTankCode, tooltiptext: (_h = states === null || states === void 0 ? void 0 : states.content) === null || _h === void 0 ? void 0 : _h.text.tooltipText, open: states.open, onClick: callbacks.copyFuelTankCode }))),
539
538
  h("div", { class: sheet.classes.Button },
540
539
  h("sl-button", { class: "continue center", type: "primary", size: "large", onClick: () => callbacks.resetState(true) }, states.content.text.doneText))));
541
540
  }
@@ -149,10 +149,10 @@ export class SqmRewardExchangeList {
149
149
  */
150
150
  this.costTitle = "Cost to Redeem";
151
151
  /**
152
- * @componentState { "title": "Choose reward", "props": { "redeemStage": "chooseReward" }, "dependencies": ["sqm-reward-exchange-list"] }
153
- * @componentState { "title": "Reward details", "props": { "redeemStage": "chooseAmount" }, "dependencies": ["sqm-reward-exchange-list"] }
154
- * @componentState { "title": "Confirm exchange", "props": { "redeemStage": "confirmation" }, "dependencies": ["sqm-reward-exchange-list"] }
155
- * @componentState { "title": "Exchange successful", "props": { "redeemStage": "success" }, "dependencies": ["sqm-reward-exchange-list"] }
152
+ * @componentState { "title": "Choose reward", "props": { "states": { "redeemStage": "chooseReward" } }, "dependencies": ["sqm-reward-exchange-list"] }
153
+ * @componentState { "title": "Reward details", "props": { "states": { "redeemStage": "chooseAmount" } }, "dependencies": ["sqm-reward-exchange-list"] }
154
+ * @componentState { "title": "Confirm exchange", "props": { "states": { "redeemStage": "confirmation" } }, "dependencies": ["sqm-reward-exchange-list"] }
155
+ * @componentState { "title": "Exchange successful", "props": { "states": { "redeemStage": "success" } }, "dependencies": ["sqm-reward-exchange-list"] }
156
156
  */
157
157
  this.stateController = "{}";
158
158
  withHooks(this);
@@ -731,16 +731,16 @@ export class SqmRewardExchangeList {
731
731
  "optional": false,
732
732
  "docs": {
733
733
  "tags": [{
734
- "text": "{ \"title\": \"Choose reward\", \"props\": { \"redeemStage\": \"chooseReward\" }, \"dependencies\": [\"sqm-reward-exchange-list\"] }",
734
+ "text": "{ \"title\": \"Choose reward\", \"props\": { \"states\": { \"redeemStage\": \"chooseReward\" } }, \"dependencies\": [\"sqm-reward-exchange-list\"] }",
735
735
  "name": "componentState"
736
736
  }, {
737
- "text": "{ \"title\": \"Reward details\", \"props\": { \"redeemStage\": \"chooseAmount\" }, \"dependencies\": [\"sqm-reward-exchange-list\"] }",
737
+ "text": "{ \"title\": \"Reward details\", \"props\": { \"states\": { \"redeemStage\": \"chooseAmount\" } }, \"dependencies\": [\"sqm-reward-exchange-list\"] }",
738
738
  "name": "componentState"
739
739
  }, {
740
- "text": "{ \"title\": \"Confirm exchange\", \"props\": { \"redeemStage\": \"confirmation\" }, \"dependencies\": [\"sqm-reward-exchange-list\"] }",
740
+ "text": "{ \"title\": \"Confirm exchange\", \"props\": { \"states\": { \"redeemStage\": \"confirmation\" } }, \"dependencies\": [\"sqm-reward-exchange-list\"] }",
741
741
  "name": "componentState"
742
742
  }, {
743
- "text": "{ \"title\": \"Exchange successful\", \"props\": { \"redeemStage\": \"success\" }, \"dependencies\": [\"sqm-reward-exchange-list\"] }",
743
+ "text": "{ \"title\": \"Exchange successful\", \"props\": { \"states\": { \"redeemStage\": \"success\" } }, \"dependencies\": [\"sqm-reward-exchange-list\"] }",
744
744
  "name": "componentState"
745
745
  }],
746
746
  "text": ""
@@ -793,34 +793,39 @@ function useRewardExchangeListDemo(props) {
793
793
  const formatted = Object.keys(states).reduce((prev, key) => key === "sqm-reward-exchange-list"
794
794
  ? { ...prev, ...states[key] }
795
795
  : { ...prev, [`${key}_stateController`]: states[key] }, {});
796
- return deepmerge({
797
- states: {
798
- content: {
799
- text: props,
800
- },
801
- redeemStage: "chooseReward",
802
- amount: 0,
803
- selectedStep: undefined,
804
- selectedItem: undefined,
805
- open: false,
806
- exchangeError: false,
807
- queryError: false,
808
- loading: false,
809
- noExchangeOptions: false,
810
- },
811
- data: {
812
- // shareCode: "SHARECODE123",
813
- exchangeList: demoRewardExchange.data.exchangeList,
814
- },
815
- callbacks: {
816
- exchangeReward: () => { },
817
- setExchangeState: (_) => { },
818
- setStage: (_) => { },
819
- resetState: () => { },
820
- copyFuelTankCode: () => { },
821
- },
822
- refs: {
823
- canvasRef: {},
824
- },
825
- }, props.demoData || formatted || {}, { arrayMerge: (_, a) => a });
796
+ const finalProps = deepmerge({ ...demoRewardExchange, content: { text: props } },
797
+ // {
798
+ // states: {
799
+ // content: {
800
+ // text: props,
801
+ // },
802
+ // redeemStage: "chooseReward",
803
+ // amount: 0,
804
+ // selectedStep: undefined,
805
+ // selectedItem: undefined,
806
+ // open: false,
807
+ // exchangeError: false,
808
+ // queryError: false,
809
+ // loading: false,
810
+ // noExchangeOptions: false,
811
+ // // empty: EmptySlot(),
812
+ // },
813
+ // data: {
814
+ // // shareCode: "SHARECODE123",
815
+ // exchangeList: demoRewardExchange.data.exchangeList,
816
+ // },
817
+ // callbacks: {
818
+ // exchangeReward: () => {},
819
+ // setExchangeState: (_: ExchangeState) => {},
820
+ // setStage: (_: Stages) => {},
821
+ // resetState: () => {},
822
+ // copyFuelTankCode: () => {},
823
+ // },
824
+ // refs: {
825
+ // canvasRef: {},
826
+ // },
827
+ // },
828
+ props.demoData || formatted || {}, { arrayMerge: (_, a) => a });
829
+ console.log({ finalProps });
830
+ return finalProps;
826
831
  }
@@ -3603,7 +3603,7 @@ function RewardExchangeView(props) {
3603
3603
  h("sl-button", { exportparts: "base: primarybutton-base", class: "continue", size: "large", type: "primary", onClick: () => callbacks.setStage("confirmation"), disabled: isDisabled }, states.content.text.continueToConfirmationText)))));
3604
3604
  }
3605
3605
  function confirmation() {
3606
- const cost = (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || selectedItem.prettySourceValue;
3606
+ const cost = (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.prettySourceValue);
3607
3607
  const amount = selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettyDestinationValue;
3608
3608
  return (h("div", null,
3609
3609
  h("div", { class: sheet$8.classes.Confirmation, part: "confirmation-container" },
@@ -3611,7 +3611,7 @@ function RewardExchangeView(props) {
3611
3611
  h("div", { class: "wrapper" },
3612
3612
  h("div", { class: "field" }, states.content.text.rewardNameTitle),
3613
3613
  h("div", { class: "reward-item-container" },
3614
- h("div", { class: "reward-title" }, selectedItem.name),
3614
+ h("div", { class: "reward-title" }, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.name),
3615
3615
  h("img", { class: "image", src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
3616
3616
  getAssetPath("./assets/Reward-image.png") }))),
3617
3617
  h("div", { class: "wrapper padding" },
@@ -3627,7 +3627,7 @@ function RewardExchangeView(props) {
3627
3627
  h("sl-button", { class: "continue", size: "large", type: "primary", loading: states.loading, onClick: callbacks.exchangeReward }, states.content.text.redeemText)))));
3628
3628
  }
3629
3629
  function success() {
3630
- var _a, _b, _c, _d, _e, _f;
3630
+ var _a, _b, _c, _d, _e, _f, _g, _h;
3631
3631
  return (h("div", { class: sheet$8.classes.Success, part: "success-container" },
3632
3632
  h(Gift$1, null),
3633
3633
  h(Confetti, null),
@@ -3636,13 +3636,12 @@ function RewardExchangeView(props) {
3636
3636
  id: "successMessage",
3637
3637
  defaultMessage: states.content.text.redemptionSuccessText,
3638
3638
  }, {
3639
- sourceValue: (_b = states.selectedItem.prettySourceValue) !== null && _b !== void 0 ? _b : (_c = states.selectedStep) === null || _c === void 0 ? void 0 : _c.prettySourceValue,
3640
- destinationValue: ((_d = states.selectedStep) === null || _d === void 0 ? void 0 : _d.prettyDestinationValue) || ((_e = states.selectedItem) === null || _e === void 0 ? void 0 : _e.name) ||
3641
- states.selectedItem.globalRewardKey,
3639
+ sourceValue: (_c = (_b = states.selectedItem) === null || _b === void 0 ? void 0 : _b.prettySourceValue) !== null && _c !== void 0 ? _c : (_d = states.selectedStep) === null || _d === void 0 ? void 0 : _d.prettySourceValue,
3640
+ destinationValue: ((_e = states.selectedStep) === null || _e === void 0 ? void 0 : _e.prettyDestinationValue) || ((_f = states.selectedItem) === null || _f === void 0 ? void 0 : _f.name) || ((_g = states.selectedItem) === null || _g === void 0 ? void 0 : _g.globalRewardKey),
3642
3641
  })),
3643
3642
  (data === null || data === void 0 ? void 0 : data.fuelTankCode) && (h("div", { class: "promo" },
3644
3643
  states.content.text.promoCode,
3645
- h(CopyTextView, { copyString: data.fuelTankCode, tooltiptext: (_f = states === null || states === void 0 ? void 0 : states.content) === null || _f === void 0 ? void 0 : _f.text.tooltipText, open: states.open, onClick: callbacks.copyFuelTankCode }))),
3644
+ h(CopyTextView, { copyString: data.fuelTankCode, tooltiptext: (_h = states === null || states === void 0 ? void 0 : states.content) === null || _h === void 0 ? void 0 : _h.text.tooltipText, open: states.open, onClick: callbacks.copyFuelTankCode }))),
3646
3645
  h("div", { class: sheet$8.classes.Button },
3647
3646
  h("sl-button", { class: "continue center", type: "primary", size: "large", onClick: () => callbacks.resetState(true) }, states.content.text.doneText))));
3648
3647
  }
@@ -3940,7 +3939,7 @@ const rewardExchange = {
3940
3939
  ...baseResponse(data),
3941
3940
  };
3942
3941
  const demoRewardExchange = {
3943
- ...baseResponse(demoData),
3942
+ ...baseResponse(demoData, "chooseReward", baseReward),
3944
3943
  };
3945
3944
  const rewardExchangeLongText = {
3946
3945
  ...baseResponse([
@@ -21,7 +21,7 @@ import { P as PortalLoginView } from './sqm-portal-login-view-7670cd86.js';
21
21
  import { u as usePortalLogin } from './usePortalLogin-e95df3c3.js';
22
22
  import { A as AsYouType } from './AsYouType-46f67d0d.js';
23
23
  import { i as isEmpty } from './utilities-72c07b09.js';
24
- import { u as useDemoBigStat, U as useBigStat, B as BigStatView, C as CardFeedView, c as CheckboxFieldView, e as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, V as withShadowView, L as LeaderboardView, N as NameFieldsView, f as ChangeMarktingView, P as PortalChangePasswordView, g as PortalFooterView, h as PortalForgotPasswordView, i as PortalFrameView, d as PortalRegisterView, R as ReferralIframeView, j as RewardExchangeView, W as demoRewardExchange, J as useShareButton, a as ShareButtonView, K as useShareLink, S as StatContainerView, T as TaskCardView } from './ShadowViewAddon-439a4d47.js';
24
+ import { u as useDemoBigStat, U as useBigStat, B as BigStatView, C as CardFeedView, c as CheckboxFieldView, e as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, V as withShadowView, L as LeaderboardView, N as NameFieldsView, f as ChangeMarktingView, P as PortalChangePasswordView, g as PortalFooterView, h as PortalForgotPasswordView, i as PortalFrameView, d as PortalRegisterView, R as ReferralIframeView, j as RewardExchangeView, W as demoRewardExchange, J as useShareButton, a as ShareButtonView, K as useShareLink, S as StatContainerView, T as TaskCardView } from './ShadowViewAddon-41dd2aeb.js';
25
25
  import './sqm-portal-container-view-176e92e3.js';
26
26
  import { p as parseStates } from './parseStates-ed75e224.js';
27
27
  import { u as usePayoutStatus } from './usePayoutStatus-93462be3.js';
@@ -5275,10 +5275,10 @@ const SqmRewardExchangeList = class {
5275
5275
  */
5276
5276
  this.costTitle = "Cost to Redeem";
5277
5277
  /**
5278
- * @componentState { "title": "Choose reward", "props": { "redeemStage": "chooseReward" }, "dependencies": ["sqm-reward-exchange-list"] }
5279
- * @componentState { "title": "Reward details", "props": { "redeemStage": "chooseAmount" }, "dependencies": ["sqm-reward-exchange-list"] }
5280
- * @componentState { "title": "Confirm exchange", "props": { "redeemStage": "confirmation" }, "dependencies": ["sqm-reward-exchange-list"] }
5281
- * @componentState { "title": "Exchange successful", "props": { "redeemStage": "success" }, "dependencies": ["sqm-reward-exchange-list"] }
5278
+ * @componentState { "title": "Choose reward", "props": { "states": { "redeemStage": "chooseReward" } }, "dependencies": ["sqm-reward-exchange-list"] }
5279
+ * @componentState { "title": "Reward details", "props": { "states": { "redeemStage": "chooseAmount" } }, "dependencies": ["sqm-reward-exchange-list"] }
5280
+ * @componentState { "title": "Confirm exchange", "props": { "states": { "redeemStage": "confirmation" } }, "dependencies": ["sqm-reward-exchange-list"] }
5281
+ * @componentState { "title": "Exchange successful", "props": { "states": { "redeemStage": "success" } }, "dependencies": ["sqm-reward-exchange-list"] }
5282
5282
  */
5283
5283
  this.stateController = "{}";
5284
5284
  h(this);
@@ -5304,36 +5304,41 @@ function useRewardExchangeListDemo(props) {
5304
5304
  const formatted = Object.keys(states).reduce((prev, key) => key === "sqm-reward-exchange-list"
5305
5305
  ? { ...prev, ...states[key] }
5306
5306
  : { ...prev, [`${key}_stateController`]: states[key] }, {});
5307
- return cjs({
5308
- states: {
5309
- content: {
5310
- text: props,
5311
- },
5312
- redeemStage: "chooseReward",
5313
- amount: 0,
5314
- selectedStep: undefined,
5315
- selectedItem: undefined,
5316
- open: false,
5317
- exchangeError: false,
5318
- queryError: false,
5319
- loading: false,
5320
- noExchangeOptions: false,
5321
- },
5322
- data: {
5323
- // shareCode: "SHARECODE123",
5324
- exchangeList: demoRewardExchange.data.exchangeList,
5325
- },
5326
- callbacks: {
5327
- exchangeReward: () => { },
5328
- setExchangeState: (_) => { },
5329
- setStage: (_) => { },
5330
- resetState: () => { },
5331
- copyFuelTankCode: () => { },
5332
- },
5333
- refs: {
5334
- canvasRef: {},
5335
- },
5336
- }, props.demoData || formatted || {}, { arrayMerge: (_, a) => a });
5307
+ const finalProps = cjs({ ...demoRewardExchange, content: { text: props } },
5308
+ // {
5309
+ // states: {
5310
+ // content: {
5311
+ // text: props,
5312
+ // },
5313
+ // redeemStage: "chooseReward",
5314
+ // amount: 0,
5315
+ // selectedStep: undefined,
5316
+ // selectedItem: undefined,
5317
+ // open: false,
5318
+ // exchangeError: false,
5319
+ // queryError: false,
5320
+ // loading: false,
5321
+ // noExchangeOptions: false,
5322
+ // // empty: EmptySlot(),
5323
+ // },
5324
+ // data: {
5325
+ // // shareCode: "SHARECODE123",
5326
+ // exchangeList: demoRewardExchange.data.exchangeList,
5327
+ // },
5328
+ // callbacks: {
5329
+ // exchangeReward: () => {},
5330
+ // setExchangeState: (_: ExchangeState) => {},
5331
+ // setStage: (_: Stages) => {},
5332
+ // resetState: () => {},
5333
+ // copyFuelTankCode: () => {},
5334
+ // },
5335
+ // refs: {
5336
+ // canvasRef: {},
5337
+ // },
5338
+ // },
5339
+ props.demoData || formatted || {}, { arrayMerge: (_, a) => a });
5340
+ console.log({ finalProps });
5341
+ return finalProps;
5337
5342
  }
5338
5343
 
5339
5344
  const debug$1 = browser("sq:useRouter");
@@ -28,7 +28,7 @@ import './utilities-72c07b09.js';
28
28
  import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-abef7286.js';
29
29
  import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-33805220.js';
30
30
  import { Q as QrCodeView } from './sqm-qr-code-view-97124a66.js';
31
- import { S as StatContainerView, B as BigStatView, a as ShareButtonView, P as PortalChangePasswordView, b as PoweredByImg$1, u as useDemoBigStat, T as TaskCardView, C as CardFeedView, c as CheckboxFieldView, d as PortalRegisterView, e as CouponCodeView, D as DropdownFieldView, E as EditProfileView, L as LeaderboardView, H as HeroView, I as InputFieldView, N as NameFieldsView, f as ChangeMarktingView, g as PortalFooterView, h as PortalForgotPasswordView, i as PortalFrameView, R as ReferralIframeView, j as RewardExchangeView, r as rewardExchangeCustomErrorMsg, k as rewardExchangeLongText, l as rewardExchangeSelected, m as chooseAmountFixed, n as chooseAmountFixedNoDescription, o as chooseAmountVariable, p as chooseAmountVariableNoDescription, q as chooseAmountVariableDisabled, s as chooseAmountVariableUnavailable, t as confirmFixed, v as confirmVariable, w as redemptionError, x as queryError, y as success, z as successVariable, A as loading, F as empty$1, G as rewardExchange, J as useShareButton, K as useShareLink, M as ProgressBarView, O as ProgressBar$2, Q as ShadowViewAddon } from './ShadowViewAddon-439a4d47.js';
31
+ import { S as StatContainerView, B as BigStatView, a as ShareButtonView, P as PortalChangePasswordView, b as PoweredByImg$1, u as useDemoBigStat, T as TaskCardView, C as CardFeedView, c as CheckboxFieldView, d as PortalRegisterView, e as CouponCodeView, D as DropdownFieldView, E as EditProfileView, L as LeaderboardView, H as HeroView, I as InputFieldView, N as NameFieldsView, f as ChangeMarktingView, g as PortalFooterView, h as PortalForgotPasswordView, i as PortalFrameView, R as ReferralIframeView, j as RewardExchangeView, r as rewardExchangeCustomErrorMsg, k as rewardExchangeLongText, l as rewardExchangeSelected, m as chooseAmountFixed, n as chooseAmountFixedNoDescription, o as chooseAmountVariable, p as chooseAmountVariableNoDescription, q as chooseAmountVariableDisabled, s as chooseAmountVariableUnavailable, t as confirmFixed, v as confirmVariable, w as redemptionError, x as queryError, y as success, z as successVariable, A as loading, F as empty$1, G as rewardExchange, J as useShareButton, K as useShareLink, M as ProgressBarView, O as ProgressBar$2, Q as ShadowViewAddon } from './ShadowViewAddon-41dd2aeb.js';
32
32
  import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-176e92e3.js';
33
33
  import { I as InvoiceTableView, a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, O as OtherRegionSlotView } from './IndirectTaxDetailsView-67deb1d0.js';
34
34
  import { t as taxTypeToName, L as LoadingView } from './utils-325c4849.js';