@saasquatch/mint-components 1.14.3-1 → 1.14.3-3

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 +144 -2
  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/sqm-banking-info-form-view.js +35 -1
  9. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +79 -1
  10. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +6 -0
  11. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +38 -0
  12. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +79 -1
  13. package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +4 -0
  14. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +174 -0
  15. package/dist/esm/loader.js +1 -1
  16. package/dist/esm/mint-components.js +1 -1
  17. package/dist/esm/sqm-banking-info-form_17.entry.js +144 -2
  18. package/dist/esm/{sqm-invoice-table-view-2c726568.js → sqm-invoice-table-view-7f376a75.js} +17 -0
  19. package/dist/esm/sqm-stencilbook.entry.js +15 -2
  20. package/dist/esm-es5/loader.js +1 -1
  21. package/dist/esm-es5/mint-components.js +1 -1
  22. package/dist/esm-es5/sqm-banking-info-form_17.entry.js +1 -1
  23. package/dist/esm-es5/sqm-invoice-table-view-7f376a75.js +1 -0
  24. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  25. package/dist/mint-components/mint-components.esm.js +1 -1
  26. package/dist/mint-components/p-12fd5498.system.entry.js +1 -0
  27. package/dist/mint-components/p-37996351.system.js +1 -1
  28. package/dist/mint-components/{p-ef6381d4.entry.js → p-805446b1.entry.js} +2 -2
  29. package/dist/mint-components/p-94bb2626.entry.js +205 -0
  30. package/dist/mint-components/p-9a1843cb.system.js +1 -0
  31. package/dist/mint-components/{p-1f089c3f.system.entry.js → p-c82859b2.system.entry.js} +1 -1
  32. package/dist/mint-components/p-ccd60c4b.js +1 -0
  33. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.d.ts +1 -1
  34. package/dist/types/components/tax-and-cash/BankingForm.stories.d.ts +1 -0
  35. package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +1 -0
  36. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +6 -0
  37. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +12 -0
  38. package/dist/types/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.d.ts +6 -0
  39. package/dist/types/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.d.ts +12 -0
  40. package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +3 -0
  41. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +30 -0
  42. package/dist/types/components.d.ts +108 -0
  43. package/dist/types/global/android.d.ts +7 -0
  44. package/dist/types/global/demo.d.ts +2 -0
  45. package/dist/types/stories/features.d.ts +4 -0
  46. package/dist/types/stories/templates.d.ts +4 -0
  47. package/docs/docs.docx +0 -0
  48. package/docs/raisins.json +1 -1
  49. package/grapesjs/grapesjs.js +1 -1
  50. package/package.json +1 -1
  51. package/dist/esm-es5/sqm-invoice-table-view-2c726568.js +0 -1
  52. package/dist/mint-components/p-070e5813.entry.js +0 -205
  53. package/dist/mint-components/p-3f067fd5.js +0 -1
  54. package/dist/mint-components/p-4df3526e.system.entry.js +0 -1
  55. package/dist/mint-components/p-a7746488.system.js +0 -1
@@ -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,6 +277,7 @@ 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;
@@ -292,6 +294,7 @@ export function useBankingInfoForm(props) {
292
294
  setShowVerification(false);
293
295
  }
294
296
  await runMutation(formData, token);
297
+ setShowModal(false);
295
298
  };
296
299
  const onVerification = async (token) => {
297
300
  host.dispatchEvent(new CustomEvent(VERIFICATION_EVENT_KEY, {
@@ -325,6 +328,8 @@ export function useBankingInfoForm(props) {
325
328
  setCountrySearch,
326
329
  onVerification,
327
330
  onVerificationHide: () => onVerification(null),
331
+ onModalClose: () => setShowModal(false),
332
+ onModalOpen: () => setShowModal(true),
328
333
  },
329
334
  states: {
330
335
  showVerification,
@@ -358,6 +363,7 @@ export function useBankingInfoForm(props) {
358
363
  bankCountry: formState.bankCountry,
359
364
  countrySearch,
360
365
  email: (_j = userData === null || userData === void 0 ? void 0 : userData.user) === null || _j === void 0 ? void 0 : _j.email,
366
+ showModal,
361
367
  },
362
368
  refs: {
363
369
  formRef,
@@ -114,6 +114,31 @@ const style = {
114
114
  color: "var(--sl-color-neutral-500)",
115
115
  fontSize: "var(--sl-font-size-medium)",
116
116
  },
117
+ Dialog: {
118
+ "&::part(panel)": {
119
+ maxWidth: "420px",
120
+ },
121
+ "&::part(close-button)": {
122
+ marginBottom: "var(--sl-spacing-xx-large)",
123
+ },
124
+ "&::part(title)": {
125
+ fontSize: "var(--sl-font-size-x-large)",
126
+ fontWeight: "600",
127
+ },
128
+ "&::part(body)": {
129
+ padding: "0 var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
130
+ fontSize: "var(--sl-font-size-small)",
131
+ },
132
+ "&::part(footer)": {
133
+ display: "flex",
134
+ flexDirection: "column",
135
+ gap: "var(--sl-spacing-small)",
136
+ marginBottom: "var(--sl-spacing-xx-small)",
137
+ alignItems: "center",
138
+ flex: "1",
139
+ },
140
+ },
141
+ DialogButton: { margin: "auto", width: "100%" },
117
142
  };
118
143
  const sheet = createStyleSheet(style);
119
144
  const styleString = sheet.toString();
@@ -143,10 +168,23 @@ export const DocusignFormView = (props) => {
143
168
  var _a;
144
169
  const { states, states: { formState, documentTypeString }, callbacks, text, slots, } = props;
145
170
  const { classes } = sheet;
171
+ console.log({ states });
146
172
  return (h("div", { class: classes.Container },
147
173
  h("style", { type: "text/css" },
148
174
  styleString,
149
175
  vanillaStyle),
176
+ h("sl-dialog", { class: sheet.classes.Dialog, open: states.showModal, "onSl-hide": callbacks.onModalClose },
177
+ h("div", { slot: "label" },
178
+ h("div", { color: "red" },
179
+ h("sl-icon", { name: "info-circle" })),
180
+ 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 }, 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 = "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.";
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": "\"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.\""
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
  };
@@ -304,6 +304,21 @@ export class TaxAndCashMonolith {
304
304
  * @uiGroup Step 3 Properties
305
305
  */
306
306
  this.step3_exitButton = "Exit";
307
+ /**
308
+ * @uiName Information modal title
309
+ * @uiGroup Step 3 Properties
310
+ */
311
+ this.step3_modalTitle = "Important Note";
312
+ /**
313
+ * @uiName Information modal description text
314
+ * @uiGroup Step 3 Properties
315
+ */
316
+ 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.";
317
+ /**
318
+ * @uiName Information modal button text
319
+ * @uiGroup Step 3 Properties
320
+ */
321
+ this.step3_modalButtonText = "I understand";
307
322
  /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
308
323
  STEP 4 PROPS:
309
324
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
@@ -533,6 +548,21 @@ export class TaxAndCashMonolith {
533
548
  * @uiGroup Step 4 Properties
534
549
  */
535
550
  this.step4_verifyEmailDescriptionText = "Verify your email to update your payment settings. Enter the code sent to {email} from our referral provider, impact.com.";
551
+ /**
552
+ * @uiName Information modal title
553
+ * @uiGroup Step 4 Properties
554
+ */
555
+ this.step4_modalTitle = "Important Note";
556
+ /**
557
+ * @uiName Information modal description text
558
+ * @uiGroup Step 4 Properties
559
+ */
560
+ 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.";
561
+ /**
562
+ * @uiName Information modal button text
563
+ * @uiGroup Step 4 Properties
564
+ */
565
+ this.step4_modalButtonText = "I understand, update my information";
536
566
  /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
537
567
  DASHBOARD PROPS:
538
568
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
@@ -2229,6 +2259,78 @@ export class TaxAndCashMonolith {
2229
2259
  "reflect": false,
2230
2260
  "defaultValue": "\"Exit\""
2231
2261
  },
2262
+ "step3_modalTitle": {
2263
+ "type": "string",
2264
+ "mutable": false,
2265
+ "complexType": {
2266
+ "original": "string",
2267
+ "resolved": "string",
2268
+ "references": {}
2269
+ },
2270
+ "required": false,
2271
+ "optional": false,
2272
+ "docs": {
2273
+ "tags": [{
2274
+ "text": "Information modal title",
2275
+ "name": "uiName"
2276
+ }, {
2277
+ "text": "Step 3 Properties",
2278
+ "name": "uiGroup"
2279
+ }],
2280
+ "text": ""
2281
+ },
2282
+ "attribute": "step-3_modal-title",
2283
+ "reflect": false,
2284
+ "defaultValue": "\"Important Note\""
2285
+ },
2286
+ "step3_modalDescription": {
2287
+ "type": "string",
2288
+ "mutable": false,
2289
+ "complexType": {
2290
+ "original": "string",
2291
+ "resolved": "string",
2292
+ "references": {}
2293
+ },
2294
+ "required": false,
2295
+ "optional": false,
2296
+ "docs": {
2297
+ "tags": [{
2298
+ "text": "Information modal description text",
2299
+ "name": "uiName"
2300
+ }, {
2301
+ "text": "Step 3 Properties",
2302
+ "name": "uiGroup"
2303
+ }],
2304
+ "text": ""
2305
+ },
2306
+ "attribute": "step-3_modal-description",
2307
+ "reflect": false,
2308
+ "defaultValue": "\"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.\""
2309
+ },
2310
+ "step3_modalButtonText": {
2311
+ "type": "string",
2312
+ "mutable": false,
2313
+ "complexType": {
2314
+ "original": "string",
2315
+ "resolved": "string",
2316
+ "references": {}
2317
+ },
2318
+ "required": false,
2319
+ "optional": false,
2320
+ "docs": {
2321
+ "tags": [{
2322
+ "text": "Information modal button text",
2323
+ "name": "uiName"
2324
+ }, {
2325
+ "text": "Step 3 Properties",
2326
+ "name": "uiGroup"
2327
+ }],
2328
+ "text": ""
2329
+ },
2330
+ "attribute": "step-3_modal-button-text",
2331
+ "reflect": false,
2332
+ "defaultValue": "\"I understand\""
2333
+ },
2232
2334
  "step4_taxAndPayouts": {
2233
2335
  "type": "string",
2234
2336
  "mutable": false,
@@ -3261,6 +3363,78 @@ export class TaxAndCashMonolith {
3261
3363
  "reflect": false,
3262
3364
  "defaultValue": "\"Verify your email to update your payment settings. Enter the code sent to {email} from our referral provider, impact.com.\""
3263
3365
  },
3366
+ "step4_modalTitle": {
3367
+ "type": "string",
3368
+ "mutable": false,
3369
+ "complexType": {
3370
+ "original": "string",
3371
+ "resolved": "string",
3372
+ "references": {}
3373
+ },
3374
+ "required": false,
3375
+ "optional": false,
3376
+ "docs": {
3377
+ "tags": [{
3378
+ "text": "Information modal title",
3379
+ "name": "uiName"
3380
+ }, {
3381
+ "text": "Step 4 Properties",
3382
+ "name": "uiGroup"
3383
+ }],
3384
+ "text": ""
3385
+ },
3386
+ "attribute": "step-4_modal-title",
3387
+ "reflect": false,
3388
+ "defaultValue": "\"Important Note\""
3389
+ },
3390
+ "step4_modalDescription": {
3391
+ "type": "string",
3392
+ "mutable": false,
3393
+ "complexType": {
3394
+ "original": "string",
3395
+ "resolved": "string",
3396
+ "references": {}
3397
+ },
3398
+ "required": false,
3399
+ "optional": false,
3400
+ "docs": {
3401
+ "tags": [{
3402
+ "text": "Information modal description text",
3403
+ "name": "uiName"
3404
+ }, {
3405
+ "text": "Step 4 Properties",
3406
+ "name": "uiGroup"
3407
+ }],
3408
+ "text": ""
3409
+ },
3410
+ "attribute": "step-4_modal-description",
3411
+ "reflect": false,
3412
+ "defaultValue": "\"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.\""
3413
+ },
3414
+ "step4_modalButtonText": {
3415
+ "type": "string",
3416
+ "mutable": false,
3417
+ "complexType": {
3418
+ "original": "string",
3419
+ "resolved": "string",
3420
+ "references": {}
3421
+ },
3422
+ "required": false,
3423
+ "optional": false,
3424
+ "docs": {
3425
+ "tags": [{
3426
+ "text": "Information modal button text",
3427
+ "name": "uiName"
3428
+ }, {
3429
+ "text": "Step 4 Properties",
3430
+ "name": "uiGroup"
3431
+ }],
3432
+ "text": ""
3433
+ },
3434
+ "attribute": "step-4_modal-button-text",
3435
+ "reflect": false,
3436
+ "defaultValue": "\"I understand, update my information\""
3437
+ },
3264
3438
  "dashboard_statusTextActive": {
3265
3439
  "type": "string",
3266
3440
  "mutable": false,