@saasquatch/mint-components 1.11.0-1 → 1.11.0-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 (48) hide show
  1. package/dist/cjs/sqm-banking-info-form_16.cjs.entry.js +41 -32
  2. package/dist/cjs/{sqm-invoice-table-view-c26fb670.js → sqm-invoice-table-view-7739a5b4.js} +1 -0
  3. package/dist/cjs/{sqm-navigation-sidebar-view-dd53f947.js → sqm-navigation-sidebar-view-c7fb69d4.js} +7 -1
  4. package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +1 -1
  5. package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -2
  6. package/dist/collection/components/sqm-navigation-sidebar/sqm-navigation-sidebar-view.js +7 -1
  7. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +1 -0
  8. package/dist/collection/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.js +12 -6
  9. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +1 -5
  10. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +1 -0
  11. package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +8 -6
  12. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/data.js +14 -13
  13. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +3 -0
  14. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +2 -2
  15. package/dist/esm/sqm-banking-info-form_16.entry.js +41 -32
  16. package/dist/esm/{sqm-invoice-table-view-2175569f.js → sqm-invoice-table-view-fb2f95b9.js} +1 -0
  17. package/dist/esm/{sqm-navigation-sidebar-view-414bcb19.js → sqm-navigation-sidebar-view-4e8a6a8c.js} +7 -1
  18. package/dist/esm/sqm-navigation-sidebar.entry.js +1 -1
  19. package/dist/esm/sqm-stencilbook.entry.js +2 -2
  20. package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
  21. package/dist/esm-es5/sqm-invoice-table-view-fb2f95b9.js +1 -0
  22. package/dist/esm-es5/sqm-navigation-sidebar-view-4e8a6a8c.js +1 -0
  23. package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
  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-1b485560.system.entry.js +1 -0
  27. package/dist/mint-components/p-1f344065.entry.js +1 -0
  28. package/dist/mint-components/p-51721f6b.system.js +1 -0
  29. package/dist/mint-components/p-97198e2c.system.js +1 -1
  30. package/dist/mint-components/p-9873d3c6.js +1 -0
  31. package/dist/mint-components/{p-76b69493.entry.js → p-9dc3f592.entry.js} +19 -18
  32. package/dist/mint-components/p-bcccc284.system.js +1 -0
  33. package/dist/mint-components/{p-5301a2da.system.entry.js → p-c0de49e7.system.entry.js} +1 -1
  34. package/dist/mint-components/{p-05a9bc83.entry.js → p-d1d16808.entry.js} +1 -1
  35. package/dist/mint-components/p-e044bbf1.system.entry.js +1 -0
  36. package/dist/types/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.d.ts +1 -0
  37. package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +1 -0
  38. package/docs/docs.docx +0 -0
  39. package/package.json +1 -1
  40. package/dist/esm-es5/sqm-invoice-table-view-2175569f.js +0 -1
  41. package/dist/esm-es5/sqm-navigation-sidebar-view-414bcb19.js +0 -1
  42. package/dist/mint-components/p-0076de9e.js +0 -1
  43. package/dist/mint-components/p-3dbf752a.system.entry.js +0 -1
  44. package/dist/mint-components/p-41f15489.entry.js +0 -1
  45. package/dist/mint-components/p-482bf487.system.js +0 -1
  46. package/dist/mint-components/p-c06048c9.system.js +0 -1
  47. package/dist/mint-components/p-cfb48ad2.system.entry.js +0 -1
  48. /package/dist/mint-components/{p-227dec48.js → p-28b6106f.js} +0 -0
@@ -16,7 +16,7 @@ const useChildElements = require('./useChildElements-e0d44916.js');
16
16
  const luxon = require('./luxon-05098e19.js');
17
17
  const useReferralTable = require('./useReferralTable-a76adb0d.js');
18
18
  const utils = require('./utils-6847bc06.js');
19
- const sqmInvoiceTableView = require('./sqm-invoice-table-view-c26fb670.js');
19
+ const sqmInvoiceTableView = require('./sqm-invoice-table-view-7739a5b4.js');
20
20
 
21
21
  const TAX_CONTEXT_NAMESPACE = "sq:tax-and-cash";
22
22
  const TAX_FORM_CONTEXT_NAMESPACE = "sq:tax-form-context";
@@ -69,19 +69,20 @@ const GET_USER = index_module.dist.gql `
69
69
  type
70
70
  dateCreated
71
71
  }
72
- withdrawalSettings {
73
- paymentMethod
74
- paypalEmailAddress
75
- bankCountry
76
- bankAccountNumber
77
- paymentSchedulingType
78
- paymentThreshold
79
- paymentDay
80
- }
81
- payoutsAccount {
82
- hold
83
- balance
84
- }
72
+ # !!!!! UNCOMMENT ME !!!!!!!!
73
+ # withdrawalSettings {
74
+ # paymentMethod
75
+ # paypalEmailAddress
76
+ # bankCountry
77
+ # bankAccountNumber
78
+ # paymentSchedulingType
79
+ # paymentThreshold
80
+ # paymentDay
81
+ # }
82
+ # payoutsAccount {
83
+ # hold
84
+ # balance
85
+ # }
85
86
  }
86
87
  }
87
88
  }
@@ -1718,17 +1719,11 @@ function useDocusignForm(props) {
1718
1719
  accountId: user.accountId,
1719
1720
  },
1720
1721
  });
1721
- console.log({ result });
1722
1722
  if (!result || result.message)
1723
1723
  throw new Error();
1724
1724
  // @ts-expect-error: no data type for result
1725
1725
  if (!result.completeImpactPublisherTaxDocument.success)
1726
1726
  throw new Error();
1727
- setStep(context.overrideNextStep ||
1728
- !!(publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) ||
1729
- !(publisher === null || publisher === void 0 ? void 0 : publisher.brandedSignup)
1730
- ? "/dashboard"
1731
- : "/4");
1732
1727
  }
1733
1728
  catch (e) {
1734
1729
  setErrors({ general: true });
@@ -1737,6 +1732,13 @@ function useDocusignForm(props) {
1737
1732
  setLoading(false);
1738
1733
  }
1739
1734
  };
1735
+ const progressStep = () => {
1736
+ setStep(context.overrideNextStep ||
1737
+ !!(publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) ||
1738
+ !(publisher === null || publisher === void 0 ? void 0 : publisher.brandedSignup)
1739
+ ? "/dashboard"
1740
+ : "/4");
1741
+ };
1740
1742
  const allLoading = userLoading || documentLoading || loading;
1741
1743
  return {
1742
1744
  states: {
@@ -1763,6 +1765,7 @@ function useDocusignForm(props) {
1763
1765
  callbacks: {
1764
1766
  setDocusignStatus,
1765
1767
  completeDocument,
1768
+ progressStep,
1766
1769
  setParticipantType,
1767
1770
  },
1768
1771
  text: props.getTextProps(),
@@ -1836,8 +1839,7 @@ const DocusignLoadingView = () => {
1836
1839
  index.h("sl-spinner", { style: { fontSize: "50px", margin: "40px" } }))));
1837
1840
  };
1838
1841
  const DocusignIframe = ({ states, data, callbacks, text, }) => {
1839
- if (states.urlLoading)
1840
- return index.h(DocusignLoadingView, null);
1842
+ const [iFrameHeight, setiFrameHeight] = stencilHooks_module.useState("100%");
1841
1843
  // TODO: Confirm impact domain before launch
1842
1844
  const allowedDomains = [
1843
1845
  "referralsaasquatch.com",
@@ -1847,9 +1849,15 @@ const DocusignIframe = ({ states, data, callbacks, text, }) => {
1847
1849
  const allowed = allowedDomains.some((d) => { var _a; return (_a = e.origin) === null || _a === void 0 ? void 0 : _a.includes(d); });
1848
1850
  if (!allowed)
1849
1851
  return;
1850
- if (e.data === "Complyexchange Thank you page Exit") {
1852
+ if (typeof e.data === "number") {
1853
+ setiFrameHeight(e.data + "px");
1854
+ }
1855
+ if (e.data === "Complyexchange Thank you page Load") {
1851
1856
  callbacks.completeDocument();
1852
1857
  }
1858
+ if (e.data == "Complyexchange Thank you page Exit") {
1859
+ callbacks.progressStep();
1860
+ }
1853
1861
  }, []);
1854
1862
  stencilHooks_module.useEffect(() => {
1855
1863
  window.addEventListener("message", callback, false);
@@ -1857,14 +1865,15 @@ const DocusignIframe = ({ states, data, callbacks, text, }) => {
1857
1865
  window.removeEventListener("message", callback, false);
1858
1866
  };
1859
1867
  }, []);
1868
+ if (states.urlLoading)
1869
+ return index.h(DocusignLoadingView, null);
1860
1870
  if (DOCUSIGN_ERROR_STATES.includes(states.status)) {
1861
1871
  return index.h(DocusignErrorView, { text: text });
1862
1872
  }
1863
1873
  if (DOCUSIGN_EXPIRED_STATES.includes(states.status))
1864
1874
  return index.h(DocusignExpiredView, { text: text });
1865
- return (index.h("iframe", { frameBorder: "0", src: data.documentUrl, width: "100%", height: "1000px" }));
1875
+ return (index.h("iframe", { scrolling: "yes", frameBorder: "0", src: data.documentUrl, width: "100%", height: iFrameHeight }));
1866
1876
  };
1867
- // NWH4QF
1868
1877
 
1869
1878
  const style$2 = {
1870
1879
  FormWrapper: {
@@ -2041,11 +2050,7 @@ const DocusignFormView = (props) => {
2041
2050
  ? text.taxFormDescriptionIndividualParticipant
2042
2051
  : text.taxFormDescriptionBusinessEntity,
2043
2052
  }, { documentType: documentTypeString }))),
2044
- index.h("div", null,
2045
- index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "primary", open: true, class: classes.InfoAlert },
2046
- index.h("sl-icon", { class: classes.InfoIcon, slot: "icon", name: "info-circle" }),
2047
- text.docusignSessionWarning),
2048
- slots.docusignIframeSlot))));
2053
+ index.h("div", null, slots.docusignIframeSlot))));
2049
2054
  };
2050
2055
 
2051
2056
  const DocusignForm = class {
@@ -2174,6 +2179,7 @@ const DocusignForm = class {
2174
2179
  }, data: {
2175
2180
  documentUrl: props.data.documentUrl,
2176
2181
  }, callbacks: {
2182
+ progressStep: props.callbacks.progressStep,
2177
2183
  completeDocument: props.callbacks.completeDocument,
2178
2184
  }, text: props.text }));
2179
2185
  return (index.h(index.Host, null, index.h(DocusignFormView, { callbacks: props.callbacks, states: props.states, text: props.text, slots: {
@@ -3771,6 +3777,9 @@ function useTaxAndCash() {
3771
3777
  namespace: USER_QUERY_NAMESPACE,
3772
3778
  query: GET_USER,
3773
3779
  skip: !user,
3780
+ options: {
3781
+ batch: false,
3782
+ },
3774
3783
  });
3775
3784
  const countryCode = ((_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher) === null || _c === void 0 ? void 0 : _c.countryCode) ||
3776
3785
  userFormContext.countryCode;
@@ -6704,8 +6713,8 @@ const UserInfoFormView = (props) => {
6704
6713
  } }), (_e = data === null || data === void 0 ? void 0 : data.countries) === null || _e === void 0 ? void 0 :
6705
6714
  _e.map((c) => (index.h("sl-menu-item", { value: c.countryCode }, c.displayName))), (_f = data === null || data === void 0 ? void 0 : data.allCountries) === null || _f === void 0 ? void 0 :
6706
6715
  _f.map((c) => (index.h("sl-menu-item", { value: c.countryCode, style: { display: "none" } }, c.displayName)))),
6707
- index.h("div", { style: { display: "flex", gap: "4px" } },
6708
- index.h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", label: text.phoneNumber, style: { minWidth: "140px" }, value: formState.phoneNumberCountryCode, disabled: states.disabled || states.isPartner, ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
6716
+ index.h("div", { style: { display: "flex", gap: "4px", alignItems: "flex-end" } },
6717
+ index.h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", label: text.phoneNumber, style: { minWidth: "120px" }, value: formState.phoneNumberCountryCode, disabled: states.disabled || states.isPartner, ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
6709
6718
  class: classes.ErrorInput,
6710
6719
  }
6711
6720
  : {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
@@ -740,6 +740,7 @@ const docusignFormProps = {
740
740
  },
741
741
  },
742
742
  callbacks: {
743
+ progressStep: () => { },
743
744
  completeDocument: async () => { },
744
745
  setParticipantType: (p) => console.log({ p }),
745
746
  setDocusignStatus: (status) => console.log(status),
@@ -17,7 +17,13 @@ const vanillaStyle = `
17
17
  100% {
18
18
  left: 0;
19
19
  }
20
- }
20
+ }
21
+
22
+ @media screen and (max-width: 570px) {
23
+ :host {
24
+ width: 0;
25
+ }
26
+ }
21
27
 
22
28
  @media screen and (min-width: 800px) {
23
29
  :host {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-72742a0b.js');
7
7
  const index_module = require('./index.module-df530553.js');
8
- const sqmNavigationSidebarView = require('./sqm-navigation-sidebar-view-dd53f947.js');
8
+ const sqmNavigationSidebarView = require('./sqm-navigation-sidebar-view-c7fb69d4.js');
9
9
 
10
10
  const NavigationSidebar = class {
11
11
  constructor(hostRef) {
@@ -20,7 +20,7 @@ require('./index-8c6255f5.js');
20
20
  const emailRegistrationView = require('./email-registration-view-5170d9f1.js');
21
21
  const sqmLeaderboardRankView = require('./sqm-leaderboard-rank-view-5a3d4a88.js');
22
22
  const sqmLogoutCurrentUserView = require('./sqm-logout-current-user-view-c9f18d96.js');
23
- const sqmNavigationSidebarView = require('./sqm-navigation-sidebar-view-dd53f947.js');
23
+ const sqmNavigationSidebarView = require('./sqm-navigation-sidebar-view-c7fb69d4.js');
24
24
  const sqmNavigationSidebarItemView = require('./sqm-navigation-sidebar-item-view-a125ec5f.js');
25
25
  const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-07161940.js');
26
26
  const sqmPortalForgotPasswordView = require('./sqm-portal-forgot-password-view-969c49ed.js');
@@ -30,7 +30,7 @@ const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-96f
30
30
  const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-7ffcc0d4.js');
31
31
  const ShadowViewAddon = require('./ShadowViewAddon-21aa34f8.js');
32
32
  const sqmPortalContainerView = require('./sqm-portal-container-view-5fb2ad49.js');
33
- const sqmInvoiceTableView = require('./sqm-invoice-table-view-c26fb670.js');
33
+ const sqmInvoiceTableView = require('./sqm-invoice-table-view-7739a5b4.js');
34
34
 
35
35
  /**
36
36
  * lodash (Custom Build) <https://lodash.com/>
@@ -14,7 +14,13 @@ const vanillaStyle = `
14
14
  100% {
15
15
  left: 0;
16
16
  }
17
- }
17
+ }
18
+
19
+ @media screen and (max-width: 570px) {
20
+ :host {
21
+ width: 0;
22
+ }
23
+ }
18
24
 
19
25
  @media screen and (min-width: 800px) {
20
26
  :host {
@@ -236,6 +236,7 @@ const docusignFormProps = {
236
236
  },
237
237
  },
238
238
  callbacks: {
239
+ progressStep: () => { },
239
240
  completeDocument: async () => { },
240
241
  setParticipantType: (p) => console.log({ p }),
241
242
  setDocusignStatus: (status) => console.log(status),
@@ -1,6 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { createStyleSheet } from "../../../../styling/JSS";
3
- import { useCallback, useEffect, } from "@saasquatch/universal-hooks";
3
+ import { useCallback, useEffect, useState, } from "@saasquatch/universal-hooks";
4
4
  import { DOCUSIGN_EXPIRED_STATES, DOCUSIGN_ERROR_STATES, } from "../useDocusignForm";
5
5
  const style = {
6
6
  DocusignStatusContainer: {
@@ -61,8 +61,7 @@ export const DocusignLoadingView = () => {
61
61
  h("sl-spinner", { style: { fontSize: "50px", margin: "40px" } }))));
62
62
  };
63
63
  export const DocusignIframe = ({ states, data, callbacks, text, }) => {
64
- if (states.urlLoading)
65
- return h(DocusignLoadingView, null);
64
+ const [iFrameHeight, setiFrameHeight] = useState("100%");
66
65
  // TODO: Confirm impact domain before launch
67
66
  const allowedDomains = [
68
67
  "referralsaasquatch.com",
@@ -72,9 +71,15 @@ export const DocusignIframe = ({ states, data, callbacks, text, }) => {
72
71
  const allowed = allowedDomains.some((d) => { var _a; return (_a = e.origin) === null || _a === void 0 ? void 0 : _a.includes(d); });
73
72
  if (!allowed)
74
73
  return;
75
- if (e.data === "Complyexchange Thank you page Exit") {
74
+ if (typeof e.data === "number") {
75
+ setiFrameHeight(e.data + "px");
76
+ }
77
+ if (e.data === "Complyexchange Thank you page Load") {
76
78
  callbacks.completeDocument();
77
79
  }
80
+ if (e.data == "Complyexchange Thank you page Exit") {
81
+ callbacks.progressStep();
82
+ }
78
83
  }, []);
79
84
  useEffect(() => {
80
85
  window.addEventListener("message", callback, false);
@@ -82,11 +87,12 @@ export const DocusignIframe = ({ states, data, callbacks, text, }) => {
82
87
  window.removeEventListener("message", callback, false);
83
88
  };
84
89
  }, []);
90
+ if (states.urlLoading)
91
+ return h(DocusignLoadingView, null);
85
92
  if (DOCUSIGN_ERROR_STATES.includes(states.status)) {
86
93
  return h(DocusignErrorView, { text: text });
87
94
  }
88
95
  if (DOCUSIGN_EXPIRED_STATES.includes(states.status))
89
96
  return h(DocusignExpiredView, { text: text });
90
- return (h("iframe", { frameBorder: "0", src: data.documentUrl, width: "100%", height: "1000px" }));
97
+ return (h("iframe", { scrolling: "yes", frameBorder: "0", src: data.documentUrl, width: "100%", height: iFrameHeight }));
91
98
  };
92
- // NWH4QF
@@ -177,9 +177,5 @@ export const DocusignFormView = (props) => {
177
177
  ? text.taxFormDescriptionIndividualParticipant
178
178
  : text.taxFormDescriptionBusinessEntity,
179
179
  }, { documentType: documentTypeString }))),
180
- h("div", null,
181
- h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "primary", open: true, class: classes.InfoAlert },
182
- h("sl-icon", { class: classes.InfoIcon, slot: "icon", name: "info-circle" }),
183
- text.docusignSessionWarning),
184
- slots.docusignIframeSlot))));
180
+ h("div", null, slots.docusignIframeSlot))));
185
181
  };
@@ -137,6 +137,7 @@ export class DocusignForm {
137
137
  }, data: {
138
138
  documentUrl: props.data.documentUrl,
139
139
  }, callbacks: {
140
+ progressStep: props.callbacks.progressStep,
140
141
  completeDocument: props.callbacks.completeDocument,
141
142
  }, text: props.text }));
142
143
  return (h(Host, null,
@@ -95,17 +95,11 @@ export function useDocusignForm(props) {
95
95
  accountId: user.accountId,
96
96
  },
97
97
  });
98
- console.log({ result });
99
98
  if (!result || result.message)
100
99
  throw new Error();
101
100
  // @ts-expect-error: no data type for result
102
101
  if (!result.completeImpactPublisherTaxDocument.success)
103
102
  throw new Error();
104
- setStep(context.overrideNextStep ||
105
- !!(publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) ||
106
- !(publisher === null || publisher === void 0 ? void 0 : publisher.brandedSignup)
107
- ? "/dashboard"
108
- : "/4");
109
103
  }
110
104
  catch (e) {
111
105
  setErrors({ general: true });
@@ -114,6 +108,13 @@ export function useDocusignForm(props) {
114
108
  setLoading(false);
115
109
  }
116
110
  };
111
+ const progressStep = () => {
112
+ setStep(context.overrideNextStep ||
113
+ !!(publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) ||
114
+ !(publisher === null || publisher === void 0 ? void 0 : publisher.brandedSignup)
115
+ ? "/dashboard"
116
+ : "/4");
117
+ };
117
118
  const allLoading = userLoading || documentLoading || loading;
118
119
  return {
119
120
  states: {
@@ -140,6 +141,7 @@ export function useDocusignForm(props) {
140
141
  callbacks: {
141
142
  setDocusignStatus,
142
143
  completeDocument,
144
+ progressStep,
143
145
  setParticipantType,
144
146
  },
145
147
  text: props.getTextProps(),
@@ -50,19 +50,20 @@ export const GET_USER = gql `
50
50
  type
51
51
  dateCreated
52
52
  }
53
- withdrawalSettings {
54
- paymentMethod
55
- paypalEmailAddress
56
- bankCountry
57
- bankAccountNumber
58
- paymentSchedulingType
59
- paymentThreshold
60
- paymentDay
61
- }
62
- payoutsAccount {
63
- hold
64
- balance
65
- }
53
+ # !!!!! UNCOMMENT ME !!!!!!!!
54
+ # withdrawalSettings {
55
+ # paymentMethod
56
+ # paypalEmailAddress
57
+ # bankCountry
58
+ # bankAccountNumber
59
+ # paymentSchedulingType
60
+ # paymentThreshold
61
+ # paymentDay
62
+ # }
63
+ # payoutsAccount {
64
+ # hold
65
+ # balance
66
+ # }
66
67
  }
67
68
  }
68
69
  }
@@ -57,6 +57,9 @@ export function useTaxAndCash() {
57
57
  namespace: USER_QUERY_NAMESPACE,
58
58
  query: GET_USER,
59
59
  skip: !user,
60
+ options: {
61
+ batch: false,
62
+ },
60
63
  });
61
64
  const countryCode = ((_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher) === null || _c === void 0 ? void 0 : _c.countryCode) ||
62
65
  userFormContext.countryCode;
@@ -191,8 +191,8 @@ export const UserInfoFormView = (props) => {
191
191
  } }), (_e = data === null || data === void 0 ? void 0 : data.countries) === null || _e === void 0 ? void 0 :
192
192
  _e.map((c) => (h("sl-menu-item", { value: c.countryCode }, c.displayName))), (_f = data === null || data === void 0 ? void 0 : data.allCountries) === null || _f === void 0 ? void 0 :
193
193
  _f.map((c) => (h("sl-menu-item", { value: c.countryCode, style: { display: "none" } }, c.displayName)))),
194
- h("div", { style: { display: "flex", gap: "4px" } },
195
- h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", label: text.phoneNumber, style: { minWidth: "140px" }, value: formState.phoneNumberCountryCode, disabled: states.disabled || states.isPartner, ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
194
+ h("div", { style: { display: "flex", gap: "4px", alignItems: "flex-end" } },
195
+ h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", label: text.phoneNumber, style: { minWidth: "120px" }, value: formState.phoneNumberCountryCode, disabled: states.disabled || states.isPartner, ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
196
196
  class: classes.ErrorInput,
197
197
  }
198
198
  : {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
@@ -12,7 +12,7 @@ import { u as useChildElements } from './useChildElements-32e1bda1.js';
12
12
  import { l as luxon } from './luxon-7600be8d.js';
13
13
  import { g as generateUserError } from './useReferralTable-f4de0650.js';
14
14
  import { g as getProps, l as luxonLocale } from './utils-334c1e34.js';
15
- import { t as taxTypeToName, v as validTaxDocument, a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, g as getCountryObj, O as OtherRegionSlotView, I as InvoiceTableView, E as ErrorView, L as LoadingView, c as vatLabels, G as GeneralLoadingView, f as formatErrorMessage, d as validateBillingField, o as objectIsFull, A as ADDRESS_REGIONS } from './sqm-invoice-table-view-2175569f.js';
15
+ import { t as taxTypeToName, v as validTaxDocument, a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, g as getCountryObj, O as OtherRegionSlotView, I as InvoiceTableView, E as ErrorView, L as LoadingView, c as vatLabels, G as GeneralLoadingView, f as formatErrorMessage, d as validateBillingField, o as objectIsFull, A as ADDRESS_REGIONS } from './sqm-invoice-table-view-fb2f95b9.js';
16
16
 
17
17
  const TAX_CONTEXT_NAMESPACE = "sq:tax-and-cash";
18
18
  const TAX_FORM_CONTEXT_NAMESPACE = "sq:tax-form-context";
@@ -65,19 +65,20 @@ const GET_USER = dist.gql `
65
65
  type
66
66
  dateCreated
67
67
  }
68
- withdrawalSettings {
69
- paymentMethod
70
- paypalEmailAddress
71
- bankCountry
72
- bankAccountNumber
73
- paymentSchedulingType
74
- paymentThreshold
75
- paymentDay
76
- }
77
- payoutsAccount {
78
- hold
79
- balance
80
- }
68
+ # !!!!! UNCOMMENT ME !!!!!!!!
69
+ # withdrawalSettings {
70
+ # paymentMethod
71
+ # paypalEmailAddress
72
+ # bankCountry
73
+ # bankAccountNumber
74
+ # paymentSchedulingType
75
+ # paymentThreshold
76
+ # paymentDay
77
+ # }
78
+ # payoutsAccount {
79
+ # hold
80
+ # balance
81
+ # }
81
82
  }
82
83
  }
83
84
  }
@@ -1714,17 +1715,11 @@ function useDocusignForm(props) {
1714
1715
  accountId: user.accountId,
1715
1716
  },
1716
1717
  });
1717
- console.log({ result });
1718
1718
  if (!result || result.message)
1719
1719
  throw new Error();
1720
1720
  // @ts-expect-error: no data type for result
1721
1721
  if (!result.completeImpactPublisherTaxDocument.success)
1722
1722
  throw new Error();
1723
- setStep(context.overrideNextStep ||
1724
- !!(publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) ||
1725
- !(publisher === null || publisher === void 0 ? void 0 : publisher.brandedSignup)
1726
- ? "/dashboard"
1727
- : "/4");
1728
1723
  }
1729
1724
  catch (e) {
1730
1725
  setErrors({ general: true });
@@ -1733,6 +1728,13 @@ function useDocusignForm(props) {
1733
1728
  setLoading(false);
1734
1729
  }
1735
1730
  };
1731
+ const progressStep = () => {
1732
+ setStep(context.overrideNextStep ||
1733
+ !!(publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) ||
1734
+ !(publisher === null || publisher === void 0 ? void 0 : publisher.brandedSignup)
1735
+ ? "/dashboard"
1736
+ : "/4");
1737
+ };
1736
1738
  const allLoading = userLoading || documentLoading || loading;
1737
1739
  return {
1738
1740
  states: {
@@ -1759,6 +1761,7 @@ function useDocusignForm(props) {
1759
1761
  callbacks: {
1760
1762
  setDocusignStatus,
1761
1763
  completeDocument,
1764
+ progressStep,
1762
1765
  setParticipantType,
1763
1766
  },
1764
1767
  text: props.getTextProps(),
@@ -1832,8 +1835,7 @@ const DocusignLoadingView = () => {
1832
1835
  h("sl-spinner", { style: { fontSize: "50px", margin: "40px" } }))));
1833
1836
  };
1834
1837
  const DocusignIframe = ({ states, data, callbacks, text, }) => {
1835
- if (states.urlLoading)
1836
- return h(DocusignLoadingView, null);
1838
+ const [iFrameHeight, setiFrameHeight] = useState("100%");
1837
1839
  // TODO: Confirm impact domain before launch
1838
1840
  const allowedDomains = [
1839
1841
  "referralsaasquatch.com",
@@ -1843,9 +1845,15 @@ const DocusignIframe = ({ states, data, callbacks, text, }) => {
1843
1845
  const allowed = allowedDomains.some((d) => { var _a; return (_a = e.origin) === null || _a === void 0 ? void 0 : _a.includes(d); });
1844
1846
  if (!allowed)
1845
1847
  return;
1846
- if (e.data === "Complyexchange Thank you page Exit") {
1848
+ if (typeof e.data === "number") {
1849
+ setiFrameHeight(e.data + "px");
1850
+ }
1851
+ if (e.data === "Complyexchange Thank you page Load") {
1847
1852
  callbacks.completeDocument();
1848
1853
  }
1854
+ if (e.data == "Complyexchange Thank you page Exit") {
1855
+ callbacks.progressStep();
1856
+ }
1849
1857
  }, []);
1850
1858
  useEffect(() => {
1851
1859
  window.addEventListener("message", callback, false);
@@ -1853,14 +1861,15 @@ const DocusignIframe = ({ states, data, callbacks, text, }) => {
1853
1861
  window.removeEventListener("message", callback, false);
1854
1862
  };
1855
1863
  }, []);
1864
+ if (states.urlLoading)
1865
+ return h(DocusignLoadingView, null);
1856
1866
  if (DOCUSIGN_ERROR_STATES.includes(states.status)) {
1857
1867
  return h(DocusignErrorView, { text: text });
1858
1868
  }
1859
1869
  if (DOCUSIGN_EXPIRED_STATES.includes(states.status))
1860
1870
  return h(DocusignExpiredView, { text: text });
1861
- return (h("iframe", { frameBorder: "0", src: data.documentUrl, width: "100%", height: "1000px" }));
1871
+ return (h("iframe", { scrolling: "yes", frameBorder: "0", src: data.documentUrl, width: "100%", height: iFrameHeight }));
1862
1872
  };
1863
- // NWH4QF
1864
1873
 
1865
1874
  const style$2 = {
1866
1875
  FormWrapper: {
@@ -2037,11 +2046,7 @@ const DocusignFormView = (props) => {
2037
2046
  ? text.taxFormDescriptionIndividualParticipant
2038
2047
  : text.taxFormDescriptionBusinessEntity,
2039
2048
  }, { documentType: documentTypeString }))),
2040
- h("div", null,
2041
- h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "primary", open: true, class: classes.InfoAlert },
2042
- h("sl-icon", { class: classes.InfoIcon, slot: "icon", name: "info-circle" }),
2043
- text.docusignSessionWarning),
2044
- slots.docusignIframeSlot))));
2049
+ h("div", null, slots.docusignIframeSlot))));
2045
2050
  };
2046
2051
 
2047
2052
  const DocusignForm = class {
@@ -2170,6 +2175,7 @@ const DocusignForm = class {
2170
2175
  }, data: {
2171
2176
  documentUrl: props.data.documentUrl,
2172
2177
  }, callbacks: {
2178
+ progressStep: props.callbacks.progressStep,
2173
2179
  completeDocument: props.callbacks.completeDocument,
2174
2180
  }, text: props.text }));
2175
2181
  return (h(Host, null, h(DocusignFormView, { callbacks: props.callbacks, states: props.states, text: props.text, slots: {
@@ -3767,6 +3773,9 @@ function useTaxAndCash() {
3767
3773
  namespace: USER_QUERY_NAMESPACE,
3768
3774
  query: GET_USER,
3769
3775
  skip: !user,
3776
+ options: {
3777
+ batch: false,
3778
+ },
3770
3779
  });
3771
3780
  const countryCode = ((_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher) === null || _c === void 0 ? void 0 : _c.countryCode) ||
3772
3781
  userFormContext.countryCode;
@@ -6700,8 +6709,8 @@ const UserInfoFormView = (props) => {
6700
6709
  } }), (_e = data === null || data === void 0 ? void 0 : data.countries) === null || _e === void 0 ? void 0 :
6701
6710
  _e.map((c) => (h("sl-menu-item", { value: c.countryCode }, c.displayName))), (_f = data === null || data === void 0 ? void 0 : data.allCountries) === null || _f === void 0 ? void 0 :
6702
6711
  _f.map((c) => (h("sl-menu-item", { value: c.countryCode, style: { display: "none" } }, c.displayName)))),
6703
- h("div", { style: { display: "flex", gap: "4px" } },
6704
- h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", label: text.phoneNumber, style: { minWidth: "140px" }, value: formState.phoneNumberCountryCode, disabled: states.disabled || states.isPartner, ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
6712
+ h("div", { style: { display: "flex", gap: "4px", alignItems: "flex-end" } },
6713
+ h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", label: text.phoneNumber, style: { minWidth: "120px" }, value: formState.phoneNumberCountryCode, disabled: states.disabled || states.isPartner, ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
6705
6714
  class: classes.ErrorInput,
6706
6715
  }
6707
6716
  : {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
@@ -738,6 +738,7 @@ const docusignFormProps = {
738
738
  },
739
739
  },
740
740
  callbacks: {
741
+ progressStep: () => { },
741
742
  completeDocument: async () => { },
742
743
  setParticipantType: (p) => console.log({ p }),
743
744
  setDocusignStatus: (status) => console.log(status),
@@ -15,7 +15,13 @@ const vanillaStyle = `
15
15
  100% {
16
16
  left: 0;
17
17
  }
18
- }
18
+ }
19
+
20
+ @media screen and (max-width: 570px) {
21
+ :host {
22
+ width: 0;
23
+ }
24
+ }
19
25
 
20
26
  @media screen and (min-width: 800px) {
21
27
  :host {
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
2
2
  import { n as h, k as useState, f as useEffect } from './stencil-hooks.module-ac12ca1c.js';
3
3
  import { S as Sn, H } from './index.module-def4aec5.js';
4
- import { N as NavigationSidebarView } from './sqm-navigation-sidebar-view-414bcb19.js';
4
+ import { N as NavigationSidebarView } from './sqm-navigation-sidebar-view-4e8a6a8c.js';
5
5
 
6
6
  const NavigationSidebar = class {
7
7
  constructor(hostRef) {
@@ -16,7 +16,7 @@ import './index-ffa26b43.js';
16
16
  import { E as EmailRegistrationView } from './email-registration-view-07d80492.js';
17
17
  import { L as LeaderboardRankView } from './sqm-leaderboard-rank-view-10657658.js';
18
18
  import { L as LogoutCurrentUserView } from './sqm-logout-current-user-view-2c6122cd.js';
19
- import { N as NavigationSidebarView } from './sqm-navigation-sidebar-view-414bcb19.js';
19
+ import { N as NavigationSidebarView } from './sqm-navigation-sidebar-view-4e8a6a8c.js';
20
20
  import { N as NavigationSidebarItemView } from './sqm-navigation-sidebar-item-view-60ef06cc.js';
21
21
  import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-0b32261f.js';
22
22
  import { P as PortalForgotPasswordView } from './sqm-portal-forgot-password-view-c2ed8fed.js';
@@ -26,7 +26,7 @@ import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-7
26
26
  import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-d7ea2c56.js';
27
27
  import { S as ShareButtonView, L as LeaderboardView, C as CopyTextView, B as BigStatView, P as PortalFrameView, E as EditProfileView, u as useShareLink, a as useShareButton, b as useDemoBigStat, c as StatContainerView, d as PortalChangePasswordView, e as PortalLoginView, f as PortalRegisterView, T as TaskCardView, g as ProgressBarView, h as PoweredByImg$1, i as PortalFooterView, H as HeroView, R as ReferralIframeView, N as NameFieldsView, j as CheckboxFieldView, D as DropdownFieldView, I as InputFieldView, k as RewardExchangeView, r as rewardExchangeCustomErrorMsg, l as rewardExchangeLongText, m as rewardExchangeSelected, n as chooseAmountFixed, o as chooseAmountFixedNoDescription, p as chooseAmountVariable, q as chooseAmountVariableNoDescription, s as chooseAmountVariableDisabled, t as chooseAmountVariableUnavailable, v as confirmFixed, w as confirmVariable, x as redemptionError, y as queryError, z as success, A as successVariable, F as loading, G as empty$1, J as rewardExchange, K as CardFeedView, M as CouponCodeView, O as ProgressBar$2, Q as autoColorScaleCss, U as ShadowViewAddon } from './ShadowViewAddon-90897c22.js';
28
28
  import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-ab89c6cc.js';
29
- import { O as OtherRegionSlotView, I as InvoiceTableView, T as TaxForm } from './sqm-invoice-table-view-2175569f.js';
29
+ import { O as OtherRegionSlotView, I as InvoiceTableView, T as TaxForm } from './sqm-invoice-table-view-fb2f95b9.js';
30
30
 
31
31
  /**
32
32
  * lodash (Custom Build) <https://lodash.com/>