@saasquatch/mint-components 1.14.3 → 1.14.4

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 (55) 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 +158 -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 +509 -893
  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 +36 -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 +7 -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 +158 -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 +2494 -2878
  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-37996351.system.js +1 -1
  28. package/dist/mint-components/{p-b06add5c.entry.js → p-4d7108af.entry.js} +2 -2
  29. package/dist/mint-components/p-9a1843cb.system.js +1 -0
  30. package/dist/mint-components/{p-207da855.system.entry.js → p-caca540c.system.entry.js} +1 -1
  31. package/dist/mint-components/p-ccd60c4b.js +1 -0
  32. package/dist/mint-components/p-db7d2444.system.entry.js +1 -0
  33. package/dist/mint-components/p-ebb4922d.entry.js +205 -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
  53. package/dist/mint-components/sqm-stencilbook.entry.js +0 -18989
  54. package/dist/mint-components/sqm-stencilbook.system.entry.js +0 -1
  55. package/shoelace/assets/icons/twitter-x.svg +0 -4
@@ -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,
@@ -3,6 +3,11 @@ import { intl } from "../../../global/global";
3
3
  import { createStyleSheet } from "../../../styling/JSS";
4
4
  import { FORM_STEPS } from "../sqm-tax-and-cash/data";
5
5
  const style = {
6
+ ModalTitleContainer: {
7
+ display: "flex",
8
+ gap: "var(--sl-spacing-small)",
9
+ alignItems: "center",
10
+ },
6
11
  FormWrapper: {
7
12
  display: "flex",
8
13
  justifyContent: "flex-start",
@@ -142,6 +147,28 @@ const style = {
142
147
  height: "26px",
143
148
  width: "26px",
144
149
  },
150
+ Dialog: {
151
+ "&::part(panel)": {
152
+ maxWidth: "420px",
153
+ },
154
+ "&::part(title)": {
155
+ fontSize: "var(--sl-font-size-large)",
156
+ fontWeight: "600",
157
+ },
158
+ "&::part(body)": {
159
+ padding: "0 var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
160
+ fontSize: "var(--sl-font-size-small)",
161
+ },
162
+ "&::part(footer)": {
163
+ display: "flex",
164
+ flexDirection: "column",
165
+ gap: "var(--sl-spacing-small)",
166
+ marginBottom: "var(--sl-spacing-xx-small)",
167
+ alignItems: "center",
168
+ flex: "1",
169
+ },
170
+ },
171
+ DialogButton: { margin: "auto", width: "100%" },
145
172
  };
146
173
  const sheet = createStyleSheet(style);
147
174
  const styleString = sheet.toString();
@@ -211,6 +238,12 @@ export const BankingInfoFormView = (props) => {
211
238
  h("style", { type: "text/css" },
212
239
  styleString,
213
240
  vanillaStyle),
241
+ h("sl-dialog", { class: sheet.classes.Dialog, open: states.showModal, "onSl-hide": callbacks.onModalClose },
242
+ h("div", { class: classes.ModalTitleContainer, slot: "label" },
243
+ h("sl-icon", { name: "info-circle", style: { color: "var(--sl-color-info-500)" } }),
244
+ h("h2", { style: { fontSize: "var(--sl-font-size-large)" } }, text.modalTitle)),
245
+ h("p", null, text.modalDescription),
246
+ h("sl-button", { slot: "footer", type: "primary", class: sheet.classes.DialogButton, submit: true, exportparts: "base: primarybutton-base" }, text.modalButtonText)),
214
247
  h("div", { class: classes.TextContainer },
215
248
  h("div", null,
216
249
  !states.hideSteps && (h("p", null, intl.formatMessage({
@@ -270,6 +303,8 @@ export const BankingInfoFormView = (props) => {
270
303
  ? getLoadingSkeleton("toPayPalAccount")
271
304
  : slots.paymentFixedDaySelectSlot))))),
272
305
  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),
306
+ h("sl-button", Object.assign({ type: "primary", disabled: states.disabled || states.saveDisabled, loading: states.saveLoading }, (states.hideSteps
307
+ ? { onClick: callbacks.onModalOpen }
308
+ : { submit: "submit" }), { exportparts: "base: primarybutton-base" }), text.continueButton),
274
309
  !states.hideBackButton && (h("sl-button", { exportparts: "base: secondarybutton-base", class: classes.SecondaryBtn, type: "text", onClick: callbacks.onBack }, text.backButton))))));
275
310
  };
@@ -92,7 +92,11 @@ export class BankingInfoForm {
92
92
  /**
93
93
  * @uiName Beneficiary account field label
94
94
  */
95
- this.beneficiaryAccountNameLabel = "Beneficiary account name";
95
+ this.beneficiaryAccountNameLabel = "Account holder name";
96
+ /**
97
+ * @uiName Beneficiary account field description
98
+ */
99
+ this.beneficiaryAccountNameDescription = "The beneficiary name of your bank account. Ensure this matches the name on your tax form.";
96
100
  /**
97
101
  * @uiName Bank account type field label
98
102
  */
@@ -271,6 +275,18 @@ export class BankingInfoForm {
271
275
  * @uiWidget textArea
272
276
  */
273
277
  this.loadingErrorAlertDescription = "Please refresh the page and try again. If this problem continues, contact Support.";
278
+ /**
279
+ * @uiName Information modal title
280
+ */
281
+ this.modalTitle = "Important Note";
282
+ /**
283
+ * @uiName Information modal description text
284
+ */
285
+ this.modalDescription = "Updating payment information places your account and payouts on hold for up to 48 hours while we verify your change. Payments scheduled during the hold period are skipped.";
286
+ /**
287
+ * @uiName Information modal button text
288
+ */
289
+ this.modalButtonText = "I understand, update my information";
274
290
  withHooks(this);
275
291
  }
276
292
  disconnectedCallback() { }
@@ -768,7 +784,28 @@ export class BankingInfoForm {
768
784
  },
769
785
  "attribute": "beneficiary-account-name-label",
770
786
  "reflect": false,
771
- "defaultValue": "\"Beneficiary account name\""
787
+ "defaultValue": "\"Account holder name\""
788
+ },
789
+ "beneficiaryAccountNameDescription": {
790
+ "type": "string",
791
+ "mutable": false,
792
+ "complexType": {
793
+ "original": "string",
794
+ "resolved": "string",
795
+ "references": {}
796
+ },
797
+ "required": false,
798
+ "optional": false,
799
+ "docs": {
800
+ "tags": [{
801
+ "text": "Beneficiary account field description",
802
+ "name": "uiName"
803
+ }],
804
+ "text": ""
805
+ },
806
+ "attribute": "beneficiary-account-name-description",
807
+ "reflect": false,
808
+ "defaultValue": "\"The beneficiary name of your bank account. Ensure this matches the name on your tax form.\""
772
809
  },
773
810
  "bankAccountTypeLabel": {
774
811
  "type": "string",
@@ -1607,12 +1644,75 @@ export class BankingInfoForm {
1607
1644
  "reflect": false,
1608
1645
  "defaultValue": "\"Please refresh the page and try again. If this problem continues, contact Support.\""
1609
1646
  },
1647
+ "modalTitle": {
1648
+ "type": "string",
1649
+ "mutable": false,
1650
+ "complexType": {
1651
+ "original": "string",
1652
+ "resolved": "string",
1653
+ "references": {}
1654
+ },
1655
+ "required": false,
1656
+ "optional": false,
1657
+ "docs": {
1658
+ "tags": [{
1659
+ "text": "Information modal title",
1660
+ "name": "uiName"
1661
+ }],
1662
+ "text": ""
1663
+ },
1664
+ "attribute": "modal-title",
1665
+ "reflect": false,
1666
+ "defaultValue": "\"Important Note\""
1667
+ },
1668
+ "modalDescription": {
1669
+ "type": "string",
1670
+ "mutable": false,
1671
+ "complexType": {
1672
+ "original": "string",
1673
+ "resolved": "string",
1674
+ "references": {}
1675
+ },
1676
+ "required": false,
1677
+ "optional": false,
1678
+ "docs": {
1679
+ "tags": [{
1680
+ "text": "Information modal description text",
1681
+ "name": "uiName"
1682
+ }],
1683
+ "text": ""
1684
+ },
1685
+ "attribute": "modal-description",
1686
+ "reflect": false,
1687
+ "defaultValue": "\"Updating payment information places your account and payouts on hold for up to 48 hours while we verify your change. Payments scheduled during the hold period are skipped.\""
1688
+ },
1689
+ "modalButtonText": {
1690
+ "type": "string",
1691
+ "mutable": false,
1692
+ "complexType": {
1693
+ "original": "string",
1694
+ "resolved": "string",
1695
+ "references": {}
1696
+ },
1697
+ "required": false,
1698
+ "optional": false,
1699
+ "docs": {
1700
+ "tags": [{
1701
+ "text": "Information modal button text",
1702
+ "name": "uiName"
1703
+ }],
1704
+ "text": ""
1705
+ },
1706
+ "attribute": "modal-button-text",
1707
+ "reflect": false,
1708
+ "defaultValue": "\"I understand, update my information\""
1709
+ },
1610
1710
  "demoData": {
1611
1711
  "type": "unknown",
1612
1712
  "mutable": false,
1613
1713
  "complexType": {
1614
1714
  "original": "DemoData<BankingInfoFormViewProps>",
1615
- "resolved": "{ states?: { showVerification: boolean; step?: string; locale?: string; loading: boolean; saveLoading?: boolean; disabled: boolean; saveDisabled: boolean; hideSteps?: boolean; hasPayPal: boolean; hideBanking?: boolean; hidePayPal?: boolean; hideBalanceThreshold?: boolean; hideFixedDay?: boolean; hideBackButton: boolean; feeCap?: string; isPartner: boolean; paymentMethodFeeLabel?: string; loadingError: boolean; formState: BankingInfoFormData & { paymentMethodChecked?: \"toBankAccount\" | \"toPayPalAccount\"; paymentScheduleChecked?: \"BALANCE_THRESHOLD\" | \"FIXED_DAY\"; errors?: { general?: boolean; inputErrors?: { [field: string]: { type: \"required\" | \"invalid\"; }; }; }; }; bitset?: number; currency?: string; thresholds: string[]; countries?: { countryCode: string; displayName: string; }[]; allCountries?: { countryCode: string; displayName: string; }[]; currentPaymentOption?: any; showInputs?: boolean; bankCountry?: string; countrySearch?: string; email?: string; }; slots?: { verificationDialogSlot?: VNode; formInputsSlot?: VNode[]; countryInputSlot?: VNode; paymentMethodSlot?: VNode; paymentThresholdSelectSlot?: VNode; paymentFixedDaySelectSlot?: VNode; paypalInputSlot?: VNode; }; refs?: { formRef: any; }; }",
1715
+ "resolved": "{ states?: { showVerification: boolean; step?: string; locale?: string; loading: boolean; saveLoading?: boolean; disabled: boolean; saveDisabled: boolean; hideSteps?: boolean; hasPayPal: boolean; hideBanking?: boolean; hidePayPal?: boolean; hideBalanceThreshold?: boolean; hideFixedDay?: boolean; hideBackButton: boolean; feeCap?: string; isPartner: boolean; paymentMethodFeeLabel?: string; loadingError: boolean; formState: BankingInfoFormData & { paymentMethodChecked?: \"toBankAccount\" | \"toPayPalAccount\"; paymentScheduleChecked?: \"BALANCE_THRESHOLD\" | \"FIXED_DAY\"; errors?: { general?: boolean; inputErrors?: { [field: string]: { type: \"required\" | \"invalid\"; }; }; }; }; bitset?: number; currency?: string; thresholds: string[]; countries?: { countryCode: string; displayName: string; }[]; allCountries?: { countryCode: string; displayName: string; }[]; currentPaymentOption?: any; showInputs?: boolean; bankCountry?: string; countrySearch?: string; email?: string; showModal: boolean; }; slots?: { verificationDialogSlot?: VNode; formInputsSlot?: VNode[]; countryInputSlot?: VNode; paymentMethodSlot?: VNode; paymentThresholdSelectSlot?: VNode; paymentFixedDaySelectSlot?: VNode; paypalInputSlot?: VNode; }; refs?: { formRef: any; }; }",
1616
1716
  "references": {
1617
1717
  "DemoData": {
1618
1718
  "location": "import",
@@ -1721,6 +1821,7 @@ function useDemoBankingInfoForm(props) {
1721
1821
  currency,
1722
1822
  setCurrency,
1723
1823
  hasPayPal: true,
1824
+ showModal: false,
1724
1825
  },
1725
1826
  callbacks: {
1726
1827
  onVerificationHide: () => { },
@@ -1733,6 +1834,8 @@ function useDemoBankingInfoForm(props) {
1733
1834
  setCountrySearch: () => { },
1734
1835
  onBack: async () => setStep("/dashboard"),
1735
1836
  onVerification: () => { },
1837
+ onModalOpen: () => { },
1838
+ onModalClose: () => { },
1736
1839
  },
1737
1840
  text: props.getTextProps(),
1738
1841
  refs: {
@@ -105,6 +105,7 @@ export function useBankingInfoForm(props) {
105
105
  const [paymentScheduleChecked, setPaymentScheduleChecked] = useState(undefined);
106
106
  const [countrySearch, setCountrySearch] = useState("");
107
107
  const [filteredCountries, setFilteredCountries] = useState(countries || []);
108
+ const [showModal, setShowModal] = useState(false);
108
109
  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) || "";
109
110
  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);
110
111
  const feeCap = paypalFeeMap[currency] || "";
@@ -276,10 +277,12 @@ export function useBankingInfoForm(props) {
276
277
  });
277
278
  setErrors({ inputErrors: validationErrors });
278
279
  if (Object.keys(validationErrors).length) {
280
+ setShowModal(false);
279
281
  return;
280
282
  }
281
283
  let token = undefined;
282
284
  if (isPartner) {
285
+ setShowModal(false);
283
286
  setShowVerification(true);
284
287
  token = await new Promise((res) => {
285
288
  const cb = (e) => {
@@ -292,6 +295,7 @@ export function useBankingInfoForm(props) {
292
295
  setShowVerification(false);
293
296
  }
294
297
  await runMutation(formData, token);
298
+ setShowModal(false);
295
299
  };
296
300
  const onVerification = async (token) => {
297
301
  host.dispatchEvent(new CustomEvent(VERIFICATION_EVENT_KEY, {
@@ -325,6 +329,8 @@ export function useBankingInfoForm(props) {
325
329
  setCountrySearch,
326
330
  onVerification,
327
331
  onVerificationHide: () => onVerification(null),
332
+ onModalClose: () => setShowModal(false),
333
+ onModalOpen: () => setShowModal(true),
328
334
  },
329
335
  states: {
330
336
  showVerification,
@@ -358,6 +364,7 @@ export function useBankingInfoForm(props) {
358
364
  bankCountry: formState.bankCountry,
359
365
  countrySearch,
360
366
  email: (_j = userData === null || userData === void 0 ? void 0 : userData.user) === null || _j === void 0 ? void 0 : _j.email,
367
+ showModal,
361
368
  },
362
369
  refs: {
363
370
  formRef,
@@ -3,6 +3,11 @@ import { intl } from "../../../global/global";
3
3
  import { createStyleSheet } from "../../../styling/JSS";
4
4
  import { FORM_STEPS } from "../sqm-tax-and-cash/data";
5
5
  const style = {
6
+ ModalTitleContainer: {
7
+ display: "flex",
8
+ gap: "var(--sl-spacing-small)",
9
+ alignItems: "center",
10
+ },
6
11
  FormWrapper: {
7
12
  display: "flex",
8
13
  justifyContent: "flex-start",
@@ -114,6 +119,28 @@ const style = {
114
119
  color: "var(--sl-color-neutral-500)",
115
120
  fontSize: "var(--sl-font-size-medium)",
116
121
  },
122
+ Dialog: {
123
+ "&::part(panel)": {
124
+ maxWidth: "420px",
125
+ },
126
+ "&::part(title)": {
127
+ fontSize: "var(--sl-font-size-large)",
128
+ fontWeight: "600",
129
+ },
130
+ "&::part(body)": {
131
+ padding: "0 var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
132
+ fontSize: "var(--sl-font-size-small)",
133
+ },
134
+ "&::part(footer)": {
135
+ display: "flex",
136
+ flexDirection: "column",
137
+ gap: "var(--sl-spacing-small)",
138
+ marginBottom: "var(--sl-spacing-xx-small)",
139
+ alignItems: "center",
140
+ flex: "1",
141
+ },
142
+ },
143
+ DialogButton: { margin: "auto", width: "100%" },
117
144
  };
118
145
  const sheet = createStyleSheet(style);
119
146
  const styleString = sheet.toString();
@@ -147,6 +174,17 @@ export const DocusignFormView = (props) => {
147
174
  h("style", { type: "text/css" },
148
175
  styleString,
149
176
  vanillaStyle),
177
+ h("sl-dialog", { class: sheet.classes.Dialog, open: states.showModal, "onSl-hide": callbacks.onModalClose },
178
+ h("div", { class: classes.ModalTitleContainer, slot: "label" },
179
+ h("sl-icon", { name: "info-circle", style: { color: "var(--sl-color-info-500)" } }),
180
+ h("h2", { style: { fontSize: "var(--sl-font-size-large)" } }, text.modalTitle)),
181
+ h("p", null, intl.formatMessage({
182
+ id: "modalText",
183
+ defaultMessage: text.modalDescription,
184
+ }, {
185
+ br: h("br", null),
186
+ })),
187
+ h("sl-button", { slot: "footer", type: "primary", class: sheet.classes.DialogButton, onClick: callbacks.onModalClose, exportparts: "base: primarybutton-base" }, text.modalButtonText)),
150
188
  h("div", { class: classes.TextContainer },
151
189
  h("div", null,
152
190
  !states.hideSteps && (h("p", null, intl.formatMessage({
@@ -120,6 +120,18 @@ export class DocusignForm {
120
120
  * @uiName Exit button text
121
121
  */
122
122
  this.exitButton = "Exit";
123
+ /**
124
+ * @uiName Information modal title
125
+ */
126
+ this.modalTitle = "Important Note";
127
+ /**
128
+ * @uiName Information modal description text
129
+ */
130
+ this.modalDescription = "Remember the name you enter in your tax form. It must exactly match the bank account holder name configured in the next step. {br}{br}Otherwise you will have to resubmit your form again and there will be delays receiving your payout.";
131
+ /**
132
+ * @uiName Information modal button text
133
+ */
134
+ this.modalButtonText = "I understand";
123
135
  withHooks(this);
124
136
  }
125
137
  disconnectedCallback() { }
@@ -607,12 +619,75 @@ export class DocusignForm {
607
619
  "reflect": false,
608
620
  "defaultValue": "\"Exit\""
609
621
  },
622
+ "modalTitle": {
623
+ "type": "string",
624
+ "mutable": false,
625
+ "complexType": {
626
+ "original": "string",
627
+ "resolved": "string",
628
+ "references": {}
629
+ },
630
+ "required": false,
631
+ "optional": false,
632
+ "docs": {
633
+ "tags": [{
634
+ "text": "Information modal title",
635
+ "name": "uiName"
636
+ }],
637
+ "text": ""
638
+ },
639
+ "attribute": "modal-title",
640
+ "reflect": false,
641
+ "defaultValue": "\"Important Note\""
642
+ },
643
+ "modalDescription": {
644
+ "type": "string",
645
+ "mutable": false,
646
+ "complexType": {
647
+ "original": "string",
648
+ "resolved": "string",
649
+ "references": {}
650
+ },
651
+ "required": false,
652
+ "optional": false,
653
+ "docs": {
654
+ "tags": [{
655
+ "text": "Information modal description text",
656
+ "name": "uiName"
657
+ }],
658
+ "text": ""
659
+ },
660
+ "attribute": "modal-description",
661
+ "reflect": false,
662
+ "defaultValue": "\"Remember the name you enter in your tax form. It must exactly match the bank account holder name configured in the next step. {br}{br}Otherwise you will have to resubmit your form again and there will be delays receiving your payout.\""
663
+ },
664
+ "modalButtonText": {
665
+ "type": "string",
666
+ "mutable": false,
667
+ "complexType": {
668
+ "original": "string",
669
+ "resolved": "string",
670
+ "references": {}
671
+ },
672
+ "required": false,
673
+ "optional": false,
674
+ "docs": {
675
+ "tags": [{
676
+ "text": "Information modal button text",
677
+ "name": "uiName"
678
+ }],
679
+ "text": ""
680
+ },
681
+ "attribute": "modal-button-text",
682
+ "reflect": false,
683
+ "defaultValue": "\"I understand\""
684
+ },
610
685
  "demoData": {
611
686
  "type": "unknown",
612
687
  "mutable": false,
613
688
  "complexType": {
614
689
  "original": "DemoData<UseDocusignFormResult>",
615
- "resolved": "{ states?: { step: string; hideSteps: boolean; disabled: boolean; participantTypeDisabled: boolean; loading: boolean; urlLoading: boolean; loadingError: boolean; formState: { participantType: ParticipantType; taxFormExpired: boolean; errors: {}; }; docusignStatus: DocusignStatus; documentType: TaxDocumentType; documentTypeString: string; showExitButton: boolean; }; data?: { taxForm: TaxDocumentType; documentUrl: string; }; }",
690
+ "resolved": "{ states?: { step: string; hideSteps: boolean; disabled: boolean; participantTypeDisabled: boolean; loading: boolean; urlLoading: boolean; loadingError: boolean; formState: { participantType: ParticipantType; taxFormExpired: boolean; errors: {}; }; docusignStatus: DocusignStatus; documentType: TaxDocumentType; documentTypeString: string; showExitButton: boolean; showModal: boolean; }; data?: { taxForm: TaxDocumentType; documentUrl: string; }; }",
616
691
  "references": {
617
692
  "DemoData": {
618
693
  "location": "import",
@@ -661,6 +736,7 @@ function useDocusignFormDemo(props) {
661
736
  errors: {},
662
737
  },
663
738
  documentType: "W9",
739
+ showModal: false,
664
740
  },
665
741
  data: {
666
742
  taxForm: "W9",
@@ -671,6 +747,8 @@ function useDocusignFormDemo(props) {
671
747
  demo: {
672
748
  onSubmit: () => setStep("/4"),
673
749
  onBack: () => setStep("/3"),
750
+ onModalOpen: () => { },
751
+ onModalClose: () => { },
674
752
  },
675
753
  setParticipantType: (p) => console.log({ p }),
676
754
  setDocusignStatus: (status) => console.log(status),
@@ -44,6 +44,7 @@ export function useDocusignForm(props) {
44
44
  const [errors, setErrors] = useState({});
45
45
  const [loading, setLoading] = useState(false);
46
46
  const [showExitButton, setShowExitButton] = useState(false);
47
+ const [showModal, setShowModal] = useState(true);
47
48
  // Only look at current document if it's valid (same as required type)
48
49
  const existingDocumentType = validTaxDocument(publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType) && (publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument)
49
50
  ? publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType : undefined;
@@ -139,6 +140,7 @@ export function useDocusignForm(props) {
139
140
  documentType: actualDocumentType,
140
141
  documentTypeString: taxTypeToName(actualDocumentType),
141
142
  showExitButton,
143
+ showModal,
142
144
  },
143
145
  data: {
144
146
  taxForm: actualDocumentType,
@@ -149,6 +151,8 @@ export function useDocusignForm(props) {
149
151
  completeDocument,
150
152
  onExit: progressStep,
151
153
  setParticipantType,
154
+ onModalClose: () => setShowModal(false),
155
+ onModalOpen: () => setShowModal(true),
152
156
  },
153
157
  text: props.getTextProps(),
154
158
  };