@saasquatch/mint-components 1.14.2 → 1.14.3-2

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 (52) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mint-components.cjs.js +1 -1
  3. package/dist/cjs/sqm-banking-info-form_17.cjs.entry.js +156 -5
  4. package/dist/cjs/{sqm-invoice-table-view-16ac73d0.js → sqm-invoice-table-view-0f7fa309.js} +17 -0
  5. package/dist/cjs/sqm-stencilbook.cjs.entry.js +15 -2
  6. package/dist/collection/components/tax-and-cash/BankingForm.stories.js +12 -0
  7. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +16 -0
  8. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +1 -1
  9. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +35 -1
  10. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +106 -3
  11. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +6 -0
  12. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +38 -0
  13. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +79 -1
  14. package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +4 -0
  15. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +205 -2
  16. package/dist/esm/loader.js +1 -1
  17. package/dist/esm/mint-components.js +1 -1
  18. package/dist/esm/sqm-banking-info-form_17.entry.js +156 -5
  19. package/dist/esm/{sqm-invoice-table-view-2c726568.js → sqm-invoice-table-view-7f376a75.js} +17 -0
  20. package/dist/esm/sqm-stencilbook.entry.js +15 -2
  21. package/dist/esm-es5/loader.js +1 -1
  22. package/dist/esm-es5/mint-components.js +1 -1
  23. package/dist/esm-es5/sqm-banking-info-form_17.entry.js +1 -1
  24. package/dist/esm-es5/sqm-invoice-table-view-7f376a75.js +1 -0
  25. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  26. package/dist/mint-components/mint-components.esm.js +1 -1
  27. package/dist/mint-components/p-1d30361f.entry.js +205 -0
  28. package/dist/mint-components/p-37996351.system.js +1 -1
  29. package/dist/mint-components/p-5acddbf2.system.entry.js +1 -0
  30. package/dist/mint-components/{p-ef6381d4.entry.js → p-805446b1.entry.js} +2 -2
  31. package/dist/mint-components/p-9a1843cb.system.js +1 -0
  32. package/dist/mint-components/{p-1f089c3f.system.entry.js → p-c82859b2.system.entry.js} +1 -1
  33. package/dist/mint-components/p-ccd60c4b.js +1 -0
  34. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.d.ts +1 -1
  35. package/dist/types/components/tax-and-cash/BankingForm.stories.d.ts +1 -0
  36. package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +1 -0
  37. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +6 -0
  38. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +16 -0
  39. package/dist/types/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.d.ts +6 -0
  40. package/dist/types/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.d.ts +12 -0
  41. package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +3 -0
  42. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +35 -0
  43. package/dist/types/components.d.ts +126 -0
  44. package/docs/docs.docx +0 -0
  45. package/docs/raisins.json +1 -1
  46. package/grapesjs/grapesjs.js +1 -1
  47. package/package.json +1 -1
  48. package/dist/esm-es5/sqm-invoice-table-view-2c726568.js +0 -1
  49. package/dist/mint-components/p-0d68b3b1.entry.js +0 -205
  50. package/dist/mint-components/p-3f067fd5.js +0 -1
  51. package/dist/mint-components/p-a6178052.system.entry.js +0 -1
  52. package/dist/mint-components/p-a7746488.system.js +0 -1
@@ -18,7 +18,7 @@ const luxon = require('./luxon-2926d85f.js');
18
18
  const useReferralTable = require('./useReferralTable-7c3f9600.js');
19
19
  const sqmTextSpanView = require('./sqm-text-span-view-0aa82125.js');
20
20
  const ErrorView = require('./ErrorView-b2fcf954.js');
21
- const sqmInvoiceTableView = require('./sqm-invoice-table-view-16ac73d0.js');
21
+ const sqmInvoiceTableView = require('./sqm-invoice-table-view-0f7fa309.js');
22
22
  const extractProps = require('./extractProps-fd93ba62.js');
23
23
  const keys = require('./keys-cff24974.js');
24
24
  const usePayoutStatus = require('./usePayoutStatus-feeac99b.js');
@@ -147,7 +147,7 @@ function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
147
147
  const { errors, ...formState } = props.states.formState;
148
148
  return {
149
149
  0: {
150
- input: (index.h("sl-input", Object.assign({ required: true, label: props.text.beneficiaryAccountNameLabel, name: "/beneficiaryAccountName", id: "beneficiaryAccountName", key: "beneficiaryAccountName", type: "text" }, (((_a = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _a === void 0 ? void 0 : _a.beneficiaryAccountName) && {
150
+ input: (index.h("sl-input", Object.assign({ required: true, label: props.text.beneficiaryAccountNameLabel, name: "/beneficiaryAccountName", id: "beneficiaryAccountName", key: "beneficiaryAccountName", type: "text", "help-text": props.text.beneficiaryAccountNameDescription }, (((_a = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _a === void 0 ? void 0 : _a.beneficiaryAccountName) && {
151
151
  class: "error-input",
152
152
  helpText: getValidationErrorMessage({
153
153
  type: (_c = (_b = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _b === void 0 ? void 0 : _b.beneficiaryAccountName) === null || _c === void 0 ? void 0 : _c.type,
@@ -788,6 +788,31 @@ const style = {
788
788
  height: "26px",
789
789
  width: "26px",
790
790
  },
791
+ Dialog: {
792
+ "&::part(panel)": {
793
+ maxWidth: "420px",
794
+ },
795
+ "&::part(close-button)": {
796
+ marginBottom: "var(--sl-spacing-xx-large)",
797
+ },
798
+ "&::part(title)": {
799
+ fontSize: "var(--sl-font-size-x-large)",
800
+ fontWeight: "600",
801
+ },
802
+ "&::part(body)": {
803
+ padding: "0 var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
804
+ fontSize: "var(--sl-font-size-small)",
805
+ },
806
+ "&::part(footer)": {
807
+ display: "flex",
808
+ flexDirection: "column",
809
+ gap: "var(--sl-spacing-small)",
810
+ marginBottom: "var(--sl-spacing-xx-small)",
811
+ alignItems: "center",
812
+ flex: "1",
813
+ },
814
+ },
815
+ DialogButton: { margin: "auto", width: "100%" },
791
816
  };
792
817
  const sheet = JSS.createStyleSheet(style);
793
818
  const styleString = sheet.toString();
@@ -857,6 +882,13 @@ const BankingInfoFormView = (props) => {
857
882
  index.h("style", { type: "text/css" },
858
883
  styleString,
859
884
  vanillaStyle),
885
+ index.h("sl-dialog", { class: sheet.classes.Dialog, open: states.showModal, "onSl-hide": callbacks.onModalClose },
886
+ index.h("div", { slot: "label" },
887
+ index.h("div", { color: "red" },
888
+ index.h("sl-icon", { name: "info-circle" })),
889
+ text.modalTitle),
890
+ index.h("p", null, text.modalDescription),
891
+ index.h("sl-button", { slot: "footer", type: "primary", class: sheet.classes.DialogButton, onClick: callbacks.onSubmit }, text.modalButtonText)),
860
892
  index.h("div", { class: classes.TextContainer },
861
893
  index.h("div", null,
862
894
  !states.hideSteps && (index.h("p", null, global.intl.formatMessage({
@@ -916,7 +948,9 @@ const BankingInfoFormView = (props) => {
916
948
  ? getLoadingSkeleton("toPayPalAccount")
917
949
  : slots.paymentFixedDaySelectSlot))))),
918
950
  index.h("div", { class: classes.BtnContainer },
919
- index.h("sl-button", { type: "primary", disabled: states.disabled || states.saveDisabled, loading: states.saveLoading, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton),
951
+ index.h("sl-button", Object.assign({ type: "primary", disabled: states.disabled || states.saveDisabled, loading: states.saveLoading }, (states.hideSteps
952
+ ? { onClick: callbacks.onModalOpen }
953
+ : { submit: "submit" }), { exportparts: "base: primarybutton-base" }), text.continueButton),
920
954
  !states.hideBackButton && (index.h("sl-button", { exportparts: "base: secondarybutton-base", class: classes.SecondaryBtn, type: "text", onClick: callbacks.onBack }, text.backButton))))));
921
955
  };
922
956
 
@@ -1019,6 +1053,7 @@ function useBankingInfoForm(props) {
1019
1053
  const [paymentScheduleChecked, setPaymentScheduleChecked] = stencilHooks_module.useState(undefined);
1020
1054
  const [countrySearch, setCountrySearch] = stencilHooks_module.useState("");
1021
1055
  const [filteredCountries, setFilteredCountries] = stencilHooks_module.useState(countries || []);
1056
+ const [showModal, setShowModal] = stencilHooks_module.useState(false);
1022
1057
  const currency = ((_c = (_b = (_a = userData === null || userData === void 0 ? void 0 : userData.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher) === null || _c === void 0 ? void 0 : _c.currency) || "";
1023
1058
  const isPartner = !!((_f = (_e = (_d = userData === null || userData === void 0 ? void 0 : userData.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher) === null || _f === void 0 ? void 0 : _f.withdrawalSettings);
1024
1059
  const feeCap = paypalFeeMap[currency] || "";
@@ -1190,6 +1225,7 @@ function useBankingInfoForm(props) {
1190
1225
  });
1191
1226
  setErrors({ inputErrors: validationErrors });
1192
1227
  if (Object.keys(validationErrors).length) {
1228
+ setShowModal(false);
1193
1229
  return;
1194
1230
  }
1195
1231
  let token = undefined;
@@ -1206,6 +1242,7 @@ function useBankingInfoForm(props) {
1206
1242
  setShowVerification(false);
1207
1243
  }
1208
1244
  await runMutation(formData, token);
1245
+ setShowModal(false);
1209
1246
  };
1210
1247
  const onVerification = async (token) => {
1211
1248
  host.dispatchEvent(new CustomEvent(keys.VERIFICATION_EVENT_KEY, {
@@ -1239,6 +1276,8 @@ function useBankingInfoForm(props) {
1239
1276
  setCountrySearch,
1240
1277
  onVerification,
1241
1278
  onVerificationHide: () => onVerification(null),
1279
+ onModalClose: () => setShowModal(false),
1280
+ onModalOpen: () => setShowModal(true),
1242
1281
  },
1243
1282
  states: {
1244
1283
  showVerification,
@@ -1272,6 +1311,7 @@ function useBankingInfoForm(props) {
1272
1311
  bankCountry: formState.bankCountry,
1273
1312
  countrySearch,
1274
1313
  email: (_j = userData === null || userData === void 0 ? void 0 : userData.user) === null || _j === void 0 ? void 0 : _j.email,
1314
+ showModal,
1275
1315
  },
1276
1316
  refs: {
1277
1317
  formRef,
@@ -1356,7 +1396,11 @@ const BankingInfoForm = class {
1356
1396
  /**
1357
1397
  * @uiName Beneficiary account field label
1358
1398
  */
1359
- this.beneficiaryAccountNameLabel = "Beneficiary account name";
1399
+ this.beneficiaryAccountNameLabel = "Account holder name";
1400
+ /**
1401
+ * @uiName Beneficiary account field description
1402
+ */
1403
+ this.beneficiaryAccountNameDescription = "The beneficiary name of your bank account. Ensure this matches the name on your tax form.";
1360
1404
  /**
1361
1405
  * @uiName Bank account type field label
1362
1406
  */
@@ -1535,6 +1579,18 @@ const BankingInfoForm = class {
1535
1579
  * @uiWidget textArea
1536
1580
  */
1537
1581
  this.loadingErrorAlertDescription = "Please refresh the page and try again. If this problem continues, contact Support.";
1582
+ /**
1583
+ * @uiName Information modal title
1584
+ */
1585
+ this.modalTitle = "Important Note";
1586
+ /**
1587
+ * @uiName Information modal description text
1588
+ */
1589
+ this.modalDescription = "By changing your bank account information, your account and payouts will be placed on hold for up to 48 hours until your change is verified.";
1590
+ /**
1591
+ * @uiName Information modal button text
1592
+ */
1593
+ this.modalButtonText = "I understand, update my information";
1538
1594
  stencilHooks_module.h$1(this);
1539
1595
  }
1540
1596
  disconnectedCallback() { }
@@ -1748,6 +1804,7 @@ function useDemoBankingInfoForm(props) {
1748
1804
  currency,
1749
1805
  setCurrency,
1750
1806
  hasPayPal: true,
1807
+ showModal: false,
1751
1808
  },
1752
1809
  callbacks: {
1753
1810
  onVerificationHide: () => { },
@@ -1760,6 +1817,8 @@ function useDemoBankingInfoForm(props) {
1760
1817
  setCountrySearch: () => { },
1761
1818
  onBack: async () => setStep("/dashboard"),
1762
1819
  onVerification: () => { },
1820
+ onModalOpen: () => { },
1821
+ onModalClose: () => { },
1763
1822
  },
1764
1823
  text: props.getTextProps(),
1765
1824
  refs: {
@@ -2132,6 +2191,7 @@ function useDocusignForm(props) {
2132
2191
  const [errors, setErrors] = stencilHooks_module.useState({});
2133
2192
  const [loading, setLoading] = stencilHooks_module.useState(false);
2134
2193
  const [showExitButton, setShowExitButton] = stencilHooks_module.useState(false);
2194
+ const [showModal, setShowModal] = stencilHooks_module.useState(true);
2135
2195
  // Only look at current document if it's valid (same as required type)
2136
2196
  const existingDocumentType = sqmInvoiceTableView.validTaxDocument(publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType) && (publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument)
2137
2197
  ? publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType : undefined;
@@ -2227,6 +2287,7 @@ function useDocusignForm(props) {
2227
2287
  documentType: actualDocumentType,
2228
2288
  documentTypeString: sqmInvoiceTableView.taxTypeToName(actualDocumentType),
2229
2289
  showExitButton,
2290
+ showModal,
2230
2291
  },
2231
2292
  data: {
2232
2293
  taxForm: actualDocumentType,
@@ -2237,6 +2298,8 @@ function useDocusignForm(props) {
2237
2298
  completeDocument,
2238
2299
  onExit: progressStep,
2239
2300
  setParticipantType,
2301
+ onModalClose: () => setShowModal(false),
2302
+ onModalOpen: () => setShowModal(true),
2240
2303
  },
2241
2304
  text: props.getTextProps(),
2242
2305
  };
@@ -2467,6 +2530,31 @@ const style$3 = {
2467
2530
  color: "var(--sl-color-neutral-500)",
2468
2531
  fontSize: "var(--sl-font-size-medium)",
2469
2532
  },
2533
+ Dialog: {
2534
+ "&::part(panel)": {
2535
+ maxWidth: "420px",
2536
+ },
2537
+ "&::part(close-button)": {
2538
+ marginBottom: "var(--sl-spacing-xx-large)",
2539
+ },
2540
+ "&::part(title)": {
2541
+ fontSize: "var(--sl-font-size-x-large)",
2542
+ fontWeight: "600",
2543
+ },
2544
+ "&::part(body)": {
2545
+ padding: "0 var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
2546
+ fontSize: "var(--sl-font-size-small)",
2547
+ },
2548
+ "&::part(footer)": {
2549
+ display: "flex",
2550
+ flexDirection: "column",
2551
+ gap: "var(--sl-spacing-small)",
2552
+ marginBottom: "var(--sl-spacing-xx-small)",
2553
+ alignItems: "center",
2554
+ flex: "1",
2555
+ },
2556
+ },
2557
+ DialogButton: { margin: "auto", width: "100%" },
2470
2558
  };
2471
2559
  const sheet$3 = JSS.createStyleSheet(style$3);
2472
2560
  const styleString$3 = sheet$3.toString();
@@ -2496,10 +2584,23 @@ const DocusignFormView = (props) => {
2496
2584
  var _a;
2497
2585
  const { states, states: { formState, documentTypeString }, callbacks, text, slots, } = props;
2498
2586
  const { classes } = sheet$3;
2587
+ console.log({ states });
2499
2588
  return (index.h("div", { class: classes.Container },
2500
2589
  index.h("style", { type: "text/css" },
2501
2590
  styleString$3,
2502
2591
  vanillaStyle$2),
2592
+ index.h("sl-dialog", { class: sheet$3.classes.Dialog, open: states.showModal, "onSl-hide": callbacks.onModalClose },
2593
+ index.h("div", { slot: "label" },
2594
+ index.h("div", { color: "red" },
2595
+ index.h("sl-icon", { name: "info-circle" })),
2596
+ text.modalTitle),
2597
+ index.h("p", null, global.intl.formatMessage({
2598
+ id: "modalText",
2599
+ defaultMessage: text.modalDescription,
2600
+ }, {
2601
+ br: index.h("br", null),
2602
+ })),
2603
+ index.h("sl-button", { slot: "footer", type: "primary", class: sheet$3.classes.DialogButton, onClick: callbacks.onModalClose }, text.modalButtonText)),
2503
2604
  index.h("div", { class: classes.TextContainer },
2504
2605
  index.h("div", null,
2505
2606
  !states.hideSteps && (index.h("p", null, global.intl.formatMessage({
@@ -2653,6 +2754,18 @@ const DocusignForm = class {
2653
2754
  * @uiName Exit button text
2654
2755
  */
2655
2756
  this.exitButton = "Exit";
2757
+ /**
2758
+ * @uiName Information modal title
2759
+ */
2760
+ this.modalTitle = "Important Note";
2761
+ /**
2762
+ * @uiName Information modal description text
2763
+ */
2764
+ this.modalDescription = "Ensure the name you enter in your tax form matches the name on your bank account, also known as the beneficiary name.{br}{br}Otherwise you will have to resubmit your form again and there will be delays receiving your payout.";
2765
+ /**
2766
+ * @uiName Information modal button text
2767
+ */
2768
+ this.modalButtonText = "I understand";
2656
2769
  stencilHooks_module.h$1(this);
2657
2770
  }
2658
2771
  disconnectedCallback() { }
@@ -2707,6 +2820,7 @@ function useDocusignFormDemo(props) {
2707
2820
  errors: {},
2708
2821
  },
2709
2822
  documentType: "W9",
2823
+ showModal: false,
2710
2824
  },
2711
2825
  data: {
2712
2826
  taxForm: "W9",
@@ -2717,6 +2831,8 @@ function useDocusignFormDemo(props) {
2717
2831
  demo: {
2718
2832
  onSubmit: () => setStep("/4"),
2719
2833
  onBack: () => setStep("/3"),
2834
+ onModalOpen: () => { },
2835
+ onModalClose: () => { },
2720
2836
  },
2721
2837
  setParticipantType: (p) => console.log({ p }),
2722
2838
  setDocusignStatus: (status) => console.log(status),
@@ -4657,6 +4773,21 @@ const TaxAndCashMonolith = class {
4657
4773
  * @uiGroup Step 3 Properties
4658
4774
  */
4659
4775
  this.step3_exitButton = "Exit";
4776
+ /**
4777
+ * @uiName Information modal title
4778
+ * @uiGroup Step 3 Properties
4779
+ */
4780
+ this.step3_modalTitle = "Important Note";
4781
+ /**
4782
+ * @uiName Information modal description text
4783
+ * @uiGroup Step 3 Properties
4784
+ */
4785
+ this.step3_modalDescription = "Ensure the name you enter in your tax form matches the name on your bank account, also known as the beneficiary name.{br}{br}Otherwise you will have to resubmit your form again and there will be delays receiving your payout.";
4786
+ /**
4787
+ * @uiName Information modal button text
4788
+ * @uiGroup Step 3 Properties
4789
+ */
4790
+ this.step3_modalButtonText = "I understand";
4660
4791
  /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4661
4792
  STEP 4 PROPS:
4662
4793
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
@@ -4739,7 +4870,12 @@ const TaxAndCashMonolith = class {
4739
4870
  * @uiName Beneficiary account field label
4740
4871
  * @uiGroup Step 4 Properties
4741
4872
  */
4742
- this.step4_beneficiaryAccountNameLabel = "Beneficiary account name";
4873
+ this.step4_beneficiaryAccountNameLabel = "Account holder name";
4874
+ /**
4875
+ * @uiName Beneficiary account field description
4876
+ * @uiGroup Step 4 Properties
4877
+ */
4878
+ this.step4_beneficiaryAccountNameDescription = "The beneficiary name of your bank account. Ensure this matches the name on your tax form.";
4743
4879
  /**
4744
4880
  * @uiName Bank account type field label
4745
4881
  * @uiGroup Step 4 Properties
@@ -4881,6 +5017,21 @@ const TaxAndCashMonolith = class {
4881
5017
  * @uiGroup Step 4 Properties
4882
5018
  */
4883
5019
  this.step4_verifyEmailDescriptionText = "Verify your email to update your payment settings. Enter the code sent to {email} from our referral provider, impact.com.";
5020
+ /**
5021
+ * @uiName Information modal title
5022
+ * @uiGroup Step 4 Properties
5023
+ */
5024
+ this.step4_modalTitle = "Important Note";
5025
+ /**
5026
+ * @uiName Information modal description text
5027
+ * @uiGroup Step 4 Properties
5028
+ */
5029
+ this.step4_modalDescription = "By changing your bank account information, your account and payouts will be placed on hold for up to 48 hours until your change is verified.";
5030
+ /**
5031
+ * @uiName Information modal button text
5032
+ * @uiGroup Step 4 Properties
5033
+ */
5034
+ this.step4_modalButtonText = "I understand, update my information";
4884
5035
  /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4885
5036
  DASHBOARD PROPS:
4886
5037
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
@@ -685,6 +685,7 @@ const stepFourProps = {
685
685
  formState: {
686
686
  paymentMethodChecked: "toBankAccount",
687
687
  },
688
+ showModal: false,
688
689
  },
689
690
  callbacks: {
690
691
  onVerificationHide: () => { },
@@ -694,6 +695,8 @@ const stepFourProps = {
694
695
  setPaymentScheduleChecked: () => { },
695
696
  onBack: async () => console.log("back"),
696
697
  setCountrySearch: () => { },
698
+ onModalOpen: () => { },
699
+ onModalClose: () => { },
697
700
  },
698
701
  refs: { formRef: { current: null } },
699
702
  };
@@ -715,12 +718,15 @@ const docusignFormProps = {
715
718
  errors: {},
716
719
  taxFormExpired: false,
717
720
  },
721
+ showModal: false,
718
722
  },
719
723
  callbacks: {
720
724
  onExit: () => { },
721
725
  completeDocument: async () => { },
722
726
  setParticipantType: (p) => console.log({ p }),
723
727
  setDocusignStatus: (status) => console.log(status),
728
+ onModalOpen: () => { },
729
+ onModalClose: () => { },
724
730
  },
725
731
  };
726
732
  const dashboardProps = {
@@ -1197,6 +1203,16 @@ const StepThreeDocusignDisabled = () => {
1197
1203
  },
1198
1204
  } }));
1199
1205
  };
1206
+ const StepThreeWithDocusignModalOpen = () => {
1207
+ return (index.h("sqm-docusign-form", { demoData: {
1208
+ states: {
1209
+ documentType: "W9",
1210
+ documentTypeString: taxTypeToName("W9"),
1211
+ ...docusignFormProps.states,
1212
+ showModal: true,
1213
+ },
1214
+ } }));
1215
+ };
1200
1216
  // STEP 4
1201
1217
  const StepFourDefault = () => {
1202
1218
  return index.h("sqm-banking-info-form", null);
@@ -1739,6 +1755,7 @@ const TaxForm = /*#__PURE__*/Object.freeze({
1739
1755
  StepThreeDocusignWithLoadingError: StepThreeDocusignWithLoadingError,
1740
1756
  StepThreeDocusignLoading: StepThreeDocusignLoading,
1741
1757
  StepThreeDocusignDisabled: StepThreeDocusignDisabled,
1758
+ StepThreeWithDocusignModalOpen: StepThreeWithDocusignModalOpen,
1742
1759
  StepFourDefault: StepFourDefault,
1743
1760
  StepFourIsPartner: StepFourIsPartner,
1744
1761
  StepFourDirectToBankChecked: StepFourDirectToBankChecked,
@@ -37,7 +37,7 @@ require('./ErrorView-b2fcf954.js');
37
37
  const sqmQrCodeView = require('./sqm-qr-code-view-15dfc0b6.js');
38
38
  const ShadowViewAddon = require('./ShadowViewAddon-787391f7.js');
39
39
  const sqmPortalContainerView = require('./sqm-portal-container-view-4f15143a.js');
40
- const sqmInvoiceTableView = require('./sqm-invoice-table-view-16ac73d0.js');
40
+ const sqmInvoiceTableView = require('./sqm-invoice-table-view-0f7fa309.js');
41
41
 
42
42
  /**
43
43
  * lodash (Custom Build) <https://lodash.com/>
@@ -14770,6 +14770,7 @@ const bankingFormProps = {
14770
14770
  currency: "USD",
14771
14771
  loadingError: false,
14772
14772
  email: "test@example.com",
14773
+ showModal: false,
14773
14774
  },
14774
14775
  callbacks: {
14775
14776
  onVerificationHide: () => { },
@@ -14779,6 +14780,8 @@ const bankingFormProps = {
14779
14780
  setPaymentScheduleChecked: () => { },
14780
14781
  setCountrySearch: () => { },
14781
14782
  onBack: async () => console.log("back"),
14783
+ onModalOpen: () => { },
14784
+ onModalClose: () => { },
14782
14785
  },
14783
14786
  refs: { formRef: { current: null } },
14784
14787
  };
@@ -15099,6 +15102,15 @@ const BankingInfoFormVerififyIdentityModal = () => {
15099
15102
  },
15100
15103
  } }));
15101
15104
  };
15105
+ const BankingInfoFormModalOpen = () => {
15106
+ return (index.h("sqm-banking-info-form", { demoData: {
15107
+ ...bankingFormProps,
15108
+ states: {
15109
+ ...bankingFormProps.states,
15110
+ showModal: true,
15111
+ },
15112
+ } }));
15113
+ };
15102
15114
 
15103
15115
  const BankingInfoForm = /*#__PURE__*/Object.freeze({
15104
15116
  __proto__: null,
@@ -15125,7 +15137,8 @@ const BankingInfoForm = /*#__PURE__*/Object.freeze({
15125
15137
  BankingInfoFormWithFixedDayPaymentSchedule: BankingInfoFormWithFixedDayPaymentSchedule,
15126
15138
  BankingInfoFormWithFixedDayPaymentScheduleWithError: BankingInfoFormWithFixedDayPaymentScheduleWithError,
15127
15139
  BankingInfoFormWithFixedDayPaymentScheduleLoading: BankingInfoFormWithFixedDayPaymentScheduleLoading,
15128
- BankingInfoFormVerififyIdentityModal: BankingInfoFormVerififyIdentityModal
15140
+ BankingInfoFormVerififyIdentityModal: BankingInfoFormVerififyIdentityModal,
15141
+ BankingInfoFormModalOpen: BankingInfoFormModalOpen
15129
15142
  });
15130
15143
 
15131
15144
  const InvoiceTableCell_stories = {
@@ -20,6 +20,7 @@ const bankingFormProps = {
20
20
  currency: "USD",
21
21
  loadingError: false,
22
22
  email: "test@example.com",
23
+ showModal: false,
23
24
  },
24
25
  callbacks: {
25
26
  onVerificationHide: () => { },
@@ -29,6 +30,8 @@ const bankingFormProps = {
29
30
  setPaymentScheduleChecked: () => { },
30
31
  setCountrySearch: () => { },
31
32
  onBack: async () => console.log("back"),
33
+ onModalOpen: () => { },
34
+ onModalClose: () => { },
32
35
  },
33
36
  refs: { formRef: { current: null } },
34
37
  };
@@ -349,3 +352,12 @@ export const BankingInfoFormVerififyIdentityModal = () => {
349
352
  },
350
353
  } }));
351
354
  };
355
+ export const BankingInfoFormModalOpen = () => {
356
+ return (h("sqm-banking-info-form", { demoData: {
357
+ ...bankingFormProps,
358
+ states: {
359
+ ...bankingFormProps.states,
360
+ showModal: true,
361
+ },
362
+ } }));
363
+ };
@@ -209,6 +209,7 @@ const stepFourProps = {
209
209
  formState: {
210
210
  paymentMethodChecked: "toBankAccount",
211
211
  },
212
+ showModal: false,
212
213
  },
213
214
  callbacks: {
214
215
  onVerificationHide: () => { },
@@ -218,6 +219,8 @@ const stepFourProps = {
218
219
  setPaymentScheduleChecked: () => { },
219
220
  onBack: async () => console.log("back"),
220
221
  setCountrySearch: () => { },
222
+ onModalOpen: () => { },
223
+ onModalClose: () => { },
221
224
  },
222
225
  refs: { formRef: { current: null } },
223
226
  };
@@ -239,12 +242,15 @@ const docusignFormProps = {
239
242
  errors: {},
240
243
  taxFormExpired: false,
241
244
  },
245
+ showModal: false,
242
246
  },
243
247
  callbacks: {
244
248
  onExit: () => { },
245
249
  completeDocument: async () => { },
246
250
  setParticipantType: (p) => console.log({ p }),
247
251
  setDocusignStatus: (status) => console.log(status),
252
+ onModalOpen: () => { },
253
+ onModalClose: () => { },
248
254
  },
249
255
  };
250
256
  const dashboardProps = {
@@ -721,6 +727,16 @@ export const StepThreeDocusignDisabled = () => {
721
727
  },
722
728
  } }));
723
729
  };
730
+ export const StepThreeWithDocusignModalOpen = () => {
731
+ return (h("sqm-docusign-form", { demoData: {
732
+ states: {
733
+ documentType: "W9",
734
+ documentTypeString: taxTypeToName("W9"),
735
+ ...docusignFormProps.states,
736
+ showModal: true,
737
+ },
738
+ } }));
739
+ };
724
740
  // STEP 4
725
741
  export const StepFourDefault = () => {
726
742
  return h("sqm-banking-info-form", null);
@@ -5,7 +5,7 @@ export function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
5
5
  const { errors, ...formState } = props.states.formState;
6
6
  return {
7
7
  0: {
8
- input: (h("sl-input", Object.assign({ required: true, label: props.text.beneficiaryAccountNameLabel, name: "/beneficiaryAccountName", id: "beneficiaryAccountName", key: "beneficiaryAccountName", type: "text" }, (((_a = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _a === void 0 ? void 0 : _a.beneficiaryAccountName) && {
8
+ input: (h("sl-input", Object.assign({ required: true, label: props.text.beneficiaryAccountNameLabel, name: "/beneficiaryAccountName", id: "beneficiaryAccountName", key: "beneficiaryAccountName", type: "text", "help-text": props.text.beneficiaryAccountNameDescription }, (((_a = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _a === void 0 ? void 0 : _a.beneficiaryAccountName) && {
9
9
  class: "error-input",
10
10
  helpText: getValidationErrorMessage({
11
11
  type: (_c = (_b = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _b === void 0 ? void 0 : _b.beneficiaryAccountName) === null || _c === void 0 ? void 0 : _c.type,
@@ -142,6 +142,31 @@ const style = {
142
142
  height: "26px",
143
143
  width: "26px",
144
144
  },
145
+ Dialog: {
146
+ "&::part(panel)": {
147
+ maxWidth: "420px",
148
+ },
149
+ "&::part(close-button)": {
150
+ marginBottom: "var(--sl-spacing-xx-large)",
151
+ },
152
+ "&::part(title)": {
153
+ fontSize: "var(--sl-font-size-x-large)",
154
+ fontWeight: "600",
155
+ },
156
+ "&::part(body)": {
157
+ padding: "0 var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
158
+ fontSize: "var(--sl-font-size-small)",
159
+ },
160
+ "&::part(footer)": {
161
+ display: "flex",
162
+ flexDirection: "column",
163
+ gap: "var(--sl-spacing-small)",
164
+ marginBottom: "var(--sl-spacing-xx-small)",
165
+ alignItems: "center",
166
+ flex: "1",
167
+ },
168
+ },
169
+ DialogButton: { margin: "auto", width: "100%" },
145
170
  };
146
171
  const sheet = createStyleSheet(style);
147
172
  const styleString = sheet.toString();
@@ -211,6 +236,13 @@ export const BankingInfoFormView = (props) => {
211
236
  h("style", { type: "text/css" },
212
237
  styleString,
213
238
  vanillaStyle),
239
+ h("sl-dialog", { class: sheet.classes.Dialog, open: states.showModal, "onSl-hide": callbacks.onModalClose },
240
+ h("div", { slot: "label" },
241
+ h("div", { color: "red" },
242
+ h("sl-icon", { name: "info-circle" })),
243
+ text.modalTitle),
244
+ h("p", null, text.modalDescription),
245
+ h("sl-button", { slot: "footer", type: "primary", class: sheet.classes.DialogButton, onClick: callbacks.onSubmit }, text.modalButtonText)),
214
246
  h("div", { class: classes.TextContainer },
215
247
  h("div", null,
216
248
  !states.hideSteps && (h("p", null, intl.formatMessage({
@@ -270,6 +302,8 @@ export const BankingInfoFormView = (props) => {
270
302
  ? getLoadingSkeleton("toPayPalAccount")
271
303
  : slots.paymentFixedDaySelectSlot))))),
272
304
  h("div", { class: classes.BtnContainer },
273
- h("sl-button", { type: "primary", disabled: states.disabled || states.saveDisabled, loading: states.saveLoading, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton),
305
+ h("sl-button", Object.assign({ type: "primary", disabled: states.disabled || states.saveDisabled, loading: states.saveLoading }, (states.hideSteps
306
+ ? { onClick: callbacks.onModalOpen }
307
+ : { submit: "submit" }), { exportparts: "base: primarybutton-base" }), text.continueButton),
274
308
  !states.hideBackButton && (h("sl-button", { exportparts: "base: secondarybutton-base", class: classes.SecondaryBtn, type: "text", onClick: callbacks.onBack }, text.backButton))))));
275
309
  };