@saasquatch/mint-components 1.14.6-11 → 1.14.6-12

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 (26) hide show
  1. package/dist/cjs/{ShadowViewAddon-d1dda2b0.js → ShadowViewAddon-c66bde05.js} +1 -5
  2. package/dist/cjs/sqm-big-stat_42.cjs.entry.js +11 -1
  3. package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -1
  4. package/dist/collection/components/sqm-lead-form/LeadForm.stories.js +1 -0
  5. package/dist/collection/components/sqm-lead-form/sqm-lead-form-view.js +1 -5
  6. package/dist/collection/components/sqm-lead-form/sqm-lead-form.js +1 -0
  7. package/dist/collection/components/sqm-lead-form/useLeadForm.js +9 -0
  8. package/dist/esm/{ShadowViewAddon-81771102.js → ShadowViewAddon-d75d8384.js} +1 -5
  9. package/dist/esm/sqm-big-stat_42.entry.js +11 -1
  10. package/dist/esm/sqm-stencilbook.entry.js +2 -1
  11. package/dist/esm-es5/{ShadowViewAddon-81771102.js → ShadowViewAddon-d75d8384.js} +1 -1
  12. package/dist/esm-es5/sqm-big-stat_42.entry.js +1 -1
  13. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  14. package/dist/mint-components/mint-components.esm.js +1 -1
  15. package/dist/mint-components/p-37996351.system.js +1 -1
  16. package/dist/mint-components/{p-59970cb1.system.entry.js → p-499527f0.system.entry.js} +1 -1
  17. package/dist/mint-components/{p-460974bf.js → p-6200bc0d.js} +3 -3
  18. package/dist/mint-components/p-a6bd2992.system.entry.js +1 -0
  19. package/dist/mint-components/{p-fa303868.entry.js → p-cff1ed19.entry.js} +2 -2
  20. package/dist/mint-components/{p-ba585a4b.entry.js → p-e703f269.entry.js} +2 -2
  21. package/dist/mint-components/{p-ad128614.system.js → p-e9a550bf.system.js} +1 -1
  22. package/dist/types/components/sqm-lead-form/sqm-lead-form-view.d.ts +1 -0
  23. package/dist/types/components/sqm-lead-form/useLeadForm.d.ts +1 -0
  24. package/docs/docs.docx +0 -0
  25. package/package.json +1 -1
  26. package/dist/mint-components/p-8d86d7e6.system.entry.js +0 -1
@@ -4114,11 +4114,7 @@ function LeadFormView(props) {
4114
4114
  index.h("b", null, content.submitSuccessHeader),
4115
4115
  index.h("br", null),
4116
4116
  index.h("div", { part: "successalert-text" }, content.submitSuccessDescription)),
4117
- index.h("sl-button", {
4118
- // AL: TODO add button to allow user to submit another form
4119
- class: sheet$d.classes.ContinueButton,
4120
- // onClick={callbacks.submitAnotherForm}
4121
- loading: states.loading, exportparts: "base: primarybutton-base", type: "default" }, content.resubmitFormLabel)));
4117
+ index.h("sl-button", { class: sheet$d.classes.ContinueButton, onClick: callbacks.resetForm, loading: states.loading, exportparts: "base: primarybutton-base", type: "default" }, content.resubmitFormLabel)));
4122
4118
  }
4123
4119
  return (index.h("div", { class: sheet$d.classes.Wrapper, part: "sqm-base" },
4124
4120
  index.h("style", { type: "text/css" },
@@ -24,7 +24,7 @@ const sqmPortalLoginView = require('./sqm-portal-login-view-761a4d8e.js');
24
24
  const usePortalLogin = require('./usePortalLogin-63d896d1.js');
25
25
  const AsYouType = require('./AsYouType-6788393a.js');
26
26
  const utilities = require('./utilities-78f5e169.js');
27
- const ShadowViewAddon = require('./ShadowViewAddon-d1dda2b0.js');
27
+ const ShadowViewAddon = require('./ShadowViewAddon-c66bde05.js');
28
28
  require('./sqm-portal-container-view-4f15143a.js');
29
29
  const usePayoutStatus = require('./usePayoutStatus-feeac99b.js');
30
30
 
@@ -1396,6 +1396,14 @@ function useLeadForm(props) {
1396
1396
  const asYouType = new AsYouType.AsYouType("US");
1397
1397
  e.target.value = asYouType.input(e.target.value);
1398
1398
  }, []);
1399
+ function resetForm() {
1400
+ setLeadFormState({
1401
+ loading: false,
1402
+ error: "",
1403
+ validationErrors: {},
1404
+ });
1405
+ setSuccess(false);
1406
+ }
1399
1407
  let errorMessage = "";
1400
1408
  if ((_a = errors === null || errors === void 0 ? void 0 : errors.response) === null || _a === void 0 ? void 0 : _a["error"]) {
1401
1409
  errorMessage = props.networkErrorMessage;
@@ -1419,6 +1427,7 @@ function useLeadForm(props) {
1419
1427
  callbacks: {
1420
1428
  submit,
1421
1429
  inputFunction,
1430
+ resetForm,
1422
1431
  },
1423
1432
  refs: {
1424
1433
  formRef,
@@ -1532,6 +1541,7 @@ function useRegisterDemo(props) {
1532
1541
  console.log("submit");
1533
1542
  },
1534
1543
  inputFunction: () => { },
1544
+ resetForm: () => { },
1535
1545
  },
1536
1546
  refs: {
1537
1547
  formRef: {},
@@ -36,7 +36,7 @@ const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-fe6
36
36
  const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-7b678f34.js');
37
37
  require('./ErrorView-b2fcf954.js');
38
38
  const sqmQrCodeView = require('./sqm-qr-code-view-15dfc0b6.js');
39
- const ShadowViewAddon = require('./ShadowViewAddon-d1dda2b0.js');
39
+ const ShadowViewAddon = require('./ShadowViewAddon-c66bde05.js');
40
40
  const sqmPortalContainerView = require('./sqm-portal-container-view-4f15143a.js');
41
41
  const sqmInvoiceTableView = require('./sqm-invoice-table-view-0f7fa309.js');
42
42
  const sqmLeadInputFieldView = require('./sqm-lead-input-field-view-6344cd93.js');
@@ -15847,6 +15847,7 @@ const defaultProps$t = {
15847
15847
  callbacks: {
15848
15848
  submit: () => console.log("Submit!"),
15849
15849
  inputFunction: () => { },
15850
+ resetForm: () => { },
15850
15851
  },
15851
15852
  refs: {
15852
15853
  formRef: {},
@@ -14,6 +14,7 @@ const defaultProps = {
14
14
  callbacks: {
15
15
  submit: () => console.log("Submit!"),
16
16
  inputFunction: () => { },
17
+ resetForm: () => { },
17
18
  },
18
19
  refs: {
19
20
  formRef: {},
@@ -71,11 +71,7 @@ export function LeadFormView(props) {
71
71
  h("b", null, content.submitSuccessHeader),
72
72
  h("br", null),
73
73
  h("div", { part: "successalert-text" }, content.submitSuccessDescription)),
74
- h("sl-button", {
75
- // AL: TODO add button to allow user to submit another form
76
- class: sheet.classes.ContinueButton,
77
- // onClick={callbacks.submitAnotherForm}
78
- loading: states.loading, exportparts: "base: primarybutton-base", type: "default" }, content.resubmitFormLabel)));
74
+ h("sl-button", { class: sheet.classes.ContinueButton, onClick: callbacks.resetForm, loading: states.loading, exportparts: "base: primarybutton-base", type: "default" }, content.resubmitFormLabel)));
79
75
  }
80
76
  return (h("div", { class: sheet.classes.Wrapper, part: "sqm-base" },
81
77
  h("style", { type: "text/css" },
@@ -456,6 +456,7 @@ function useRegisterDemo(props) {
456
456
  console.log("submit");
457
457
  },
458
458
  inputFunction: () => { },
459
+ resetForm: () => { },
459
460
  },
460
461
  refs: {
461
462
  formRef: {},
@@ -107,6 +107,14 @@ export function useLeadForm(props) {
107
107
  const asYouType = new AsYouType("US");
108
108
  e.target.value = asYouType.input(e.target.value);
109
109
  }, []);
110
+ function resetForm() {
111
+ setLeadFormState({
112
+ loading: false,
113
+ error: "",
114
+ validationErrors: {},
115
+ });
116
+ setSuccess(false);
117
+ }
110
118
  let errorMessage = "";
111
119
  if ((_a = errors === null || errors === void 0 ? void 0 : errors.response) === null || _a === void 0 ? void 0 : _a["error"]) {
112
120
  errorMessage = props.networkErrorMessage;
@@ -130,6 +138,7 @@ export function useLeadForm(props) {
130
138
  callbacks: {
131
139
  submit,
132
140
  inputFunction,
141
+ resetForm,
133
142
  },
134
143
  refs: {
135
144
  formRef,
@@ -4112,11 +4112,7 @@ function LeadFormView(props) {
4112
4112
  h("b", null, content.submitSuccessHeader),
4113
4113
  h("br", null),
4114
4114
  h("div", { part: "successalert-text" }, content.submitSuccessDescription)),
4115
- h("sl-button", {
4116
- // AL: TODO add button to allow user to submit another form
4117
- class: sheet$d.classes.ContinueButton,
4118
- // onClick={callbacks.submitAnotherForm}
4119
- loading: states.loading, exportparts: "base: primarybutton-base", type: "default" }, content.resubmitFormLabel)));
4115
+ h("sl-button", { class: sheet$d.classes.ContinueButton, onClick: callbacks.resetForm, loading: states.loading, exportparts: "base: primarybutton-base", type: "default" }, content.resubmitFormLabel)));
4120
4116
  }
4121
4117
  return (h("div", { class: sheet$d.classes.Wrapper, part: "sqm-base" },
4122
4118
  h("style", { type: "text/css" },
@@ -20,7 +20,7 @@ import { P as PortalLoginView } from './sqm-portal-login-view-7e49609a.js';
20
20
  import { u as usePortalLogin } from './usePortalLogin-ef647a50.js';
21
21
  import { A as AsYouType } from './AsYouType-46f67d0d.js';
22
22
  import { i as isEmpty } from './utilities-5b0ca040.js';
23
- import { b as useDemoBigStat, V as useBigStat, B as BigStatView, Q as autoColorScaleCss, J as CardFeedView, i as CheckboxFieldView, K as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, O as LeadFormView, W as withShadowView, L as LeaderboardView, N as NameFieldsView, C as ChangeMarktingView, d as PortalChangePasswordView, h as PortalFooterView, P as PortalFrameView, e as PortalRegisterView, R as ReferralIframeView, X as demoRewardExchange, j as RewardExchangeView, a as useShareButton, S as ShareButtonView, u as useShareLink, c as StatContainerView, T as TaskCardView } from './ShadowViewAddon-81771102.js';
23
+ import { b as useDemoBigStat, V as useBigStat, B as BigStatView, Q as autoColorScaleCss, J as CardFeedView, i as CheckboxFieldView, K as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, O as LeadFormView, W as withShadowView, L as LeaderboardView, N as NameFieldsView, C as ChangeMarktingView, d as PortalChangePasswordView, h as PortalFooterView, P as PortalFrameView, e as PortalRegisterView, R as ReferralIframeView, X as demoRewardExchange, j as RewardExchangeView, a as useShareButton, S as ShareButtonView, u as useShareLink, c as StatContainerView, T as TaskCardView } from './ShadowViewAddon-d75d8384.js';
24
24
  import './sqm-portal-container-view-1683ae32.js';
25
25
  import { u as usePayoutStatus } from './usePayoutStatus-fed17fc9.js';
26
26
 
@@ -1392,6 +1392,14 @@ function useLeadForm(props) {
1392
1392
  const asYouType = new AsYouType("US");
1393
1393
  e.target.value = asYouType.input(e.target.value);
1394
1394
  }, []);
1395
+ function resetForm() {
1396
+ setLeadFormState({
1397
+ loading: false,
1398
+ error: "",
1399
+ validationErrors: {},
1400
+ });
1401
+ setSuccess(false);
1402
+ }
1395
1403
  let errorMessage = "";
1396
1404
  if ((_a = errors === null || errors === void 0 ? void 0 : errors.response) === null || _a === void 0 ? void 0 : _a["error"]) {
1397
1405
  errorMessage = props.networkErrorMessage;
@@ -1415,6 +1423,7 @@ function useLeadForm(props) {
1415
1423
  callbacks: {
1416
1424
  submit,
1417
1425
  inputFunction,
1426
+ resetForm,
1418
1427
  },
1419
1428
  refs: {
1420
1429
  formRef,
@@ -1528,6 +1537,7 @@ function useRegisterDemo(props) {
1528
1537
  console.log("submit");
1529
1538
  },
1530
1539
  inputFunction: () => { },
1540
+ resetForm: () => { },
1531
1541
  },
1532
1542
  refs: {
1533
1543
  formRef: {},
@@ -32,7 +32,7 @@ import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-5
32
32
  import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-b12cb894.js';
33
33
  import './ErrorView-48e2b969.js';
34
34
  import { Q as QrCodeView } from './sqm-qr-code-view-f1d0763b.js';
35
- import { S as ShareButtonView, L as LeaderboardView, 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 PortalRegisterView, C as ChangeMarktingView, T as TaskCardView, f as ProgressBarView, g as PoweredByImg$1, h as PortalFooterView, H as HeroView, R as ReferralIframeView, N as NameFieldsView, i as CheckboxFieldView, D as DropdownFieldView, I as InputFieldView, j as RewardExchangeView, r as rewardExchangeCustomErrorMsg, k as rewardExchangeLongText, l as rewardExchangeSelected, m as chooseAmountFixed, n as chooseAmountFixedNoDescription, o as chooseAmountVariable, p as chooseAmountVariableNoDescription, q as chooseAmountVariableDisabled, s as chooseAmountVariableUnavailable, t as confirmFixed, v as confirmVariable, w as redemptionError, x as queryError, y as success, z as successVariable, A as loading, F as empty$1, G as rewardExchange, J as CardFeedView, K as CouponCodeView, M as ProgressBar$2, O as LeadFormView, Q as autoColorScaleCss, U as ShadowViewAddon } from './ShadowViewAddon-81771102.js';
35
+ import { S as ShareButtonView, L as LeaderboardView, 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 PortalRegisterView, C as ChangeMarktingView, T as TaskCardView, f as ProgressBarView, g as PoweredByImg$1, h as PortalFooterView, H as HeroView, R as ReferralIframeView, N as NameFieldsView, i as CheckboxFieldView, D as DropdownFieldView, I as InputFieldView, j as RewardExchangeView, r as rewardExchangeCustomErrorMsg, k as rewardExchangeLongText, l as rewardExchangeSelected, m as chooseAmountFixed, n as chooseAmountFixedNoDescription, o as chooseAmountVariable, p as chooseAmountVariableNoDescription, q as chooseAmountVariableDisabled, s as chooseAmountVariableUnavailable, t as confirmFixed, v as confirmVariable, w as redemptionError, x as queryError, y as success, z as successVariable, A as loading, F as empty$1, G as rewardExchange, J as CardFeedView, K as CouponCodeView, M as ProgressBar$2, O as LeadFormView, Q as autoColorScaleCss, U as ShadowViewAddon } from './ShadowViewAddon-d75d8384.js';
36
36
  import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-1683ae32.js';
37
37
  import { O as OtherRegionSlotView, I as InvoiceTableView, T as TaxForm } from './sqm-invoice-table-view-7f376a75.js';
38
38
  import { L as LeadInputFieldView } from './sqm-lead-input-field-view-f1dd4b77.js';
@@ -15843,6 +15843,7 @@ const defaultProps$t = {
15843
15843
  callbacks: {
15844
15844
  submit: () => console.log("Submit!"),
15845
15845
  inputFunction: () => { },
15846
+ resetForm: () => { },
15846
15847
  },
15847
15848
  refs: {
15848
15849
  formRef: {},