@saasquatch/mint-components 1.14.6-10 → 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.
- package/dist/cjs/{ShadowViewAddon-d1dda2b0.js → ShadowViewAddon-c66bde05.js} +1 -5
- package/dist/cjs/sqm-big-stat_42.cjs.entry.js +13 -9
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -1
- package/dist/collection/components/sqm-lead-form/LeadForm.stories.js +1 -0
- package/dist/collection/components/sqm-lead-form/sqm-lead-form-view.js +1 -5
- package/dist/collection/components/sqm-lead-form/sqm-lead-form.js +1 -0
- package/dist/collection/components/sqm-lead-form/useLeadForm.js +11 -8
- package/dist/esm/{ShadowViewAddon-81771102.js → ShadowViewAddon-d75d8384.js} +1 -5
- package/dist/esm/sqm-big-stat_42.entry.js +13 -9
- package/dist/esm/sqm-stencilbook.entry.js +2 -1
- package/dist/esm-es5/{ShadowViewAddon-81771102.js → ShadowViewAddon-d75d8384.js} +1 -1
- package/dist/esm-es5/sqm-big-stat_42.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-37996351.system.js +1 -1
- package/dist/mint-components/{p-59970cb1.system.entry.js → p-499527f0.system.entry.js} +1 -1
- package/dist/mint-components/{p-460974bf.js → p-6200bc0d.js} +3 -3
- package/dist/mint-components/p-a6bd2992.system.entry.js +1 -0
- package/dist/mint-components/{p-79e1a189.entry.js → p-cff1ed19.entry.js} +2 -2
- package/dist/mint-components/{p-ba585a4b.entry.js → p-e703f269.entry.js} +2 -2
- package/dist/mint-components/{p-ad128614.system.js → p-e9a550bf.system.js} +1 -1
- package/dist/types/components/sqm-lead-form/sqm-lead-form-view.d.ts +1 -0
- package/dist/types/components/sqm-lead-form/useLeadForm.d.ts +1 -0
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/mint-components/p-10343b27.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-
|
|
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
|
|
|
@@ -1329,7 +1329,7 @@ function useLeadForm(props) {
|
|
|
1329
1329
|
};
|
|
1330
1330
|
}, [formRef.current]);
|
|
1331
1331
|
const submit = async (event) => {
|
|
1332
|
-
var _a
|
|
1332
|
+
var _a;
|
|
1333
1333
|
let formControls = event.target.getFormControls();
|
|
1334
1334
|
let formData = {};
|
|
1335
1335
|
let validationErrors = {};
|
|
@@ -1368,11 +1368,6 @@ function useLeadForm(props) {
|
|
|
1368
1368
|
};
|
|
1369
1369
|
try {
|
|
1370
1370
|
const result = await submitLead({ formSubmissionInput: variables });
|
|
1371
|
-
console.log({
|
|
1372
|
-
result,
|
|
1373
|
-
success: (_a = result === null || result === void 0 ? void 0 : result.submitForm) === null || _a === void 0 ? void 0 : _a.success,
|
|
1374
|
-
isError: result instanceof Error,
|
|
1375
|
-
});
|
|
1376
1371
|
if (result instanceof Error) {
|
|
1377
1372
|
throw result;
|
|
1378
1373
|
}
|
|
@@ -1381,12 +1376,11 @@ function useLeadForm(props) {
|
|
|
1381
1376
|
error: "",
|
|
1382
1377
|
validationErrors: {},
|
|
1383
1378
|
});
|
|
1384
|
-
if ((
|
|
1379
|
+
if ((_a = result === null || result === void 0 ? void 0 : result.submitForm) === null || _a === void 0 ? void 0 : _a.success) {
|
|
1385
1380
|
setSuccess(true);
|
|
1386
1381
|
}
|
|
1387
1382
|
}
|
|
1388
1383
|
catch (error) {
|
|
1389
|
-
console.log({ error });
|
|
1390
1384
|
setLeadFormState({
|
|
1391
1385
|
loading: false,
|
|
1392
1386
|
error: props.networkErrorMessage,
|
|
@@ -1402,6 +1396,14 @@ function useLeadForm(props) {
|
|
|
1402
1396
|
const asYouType = new AsYouType.AsYouType("US");
|
|
1403
1397
|
e.target.value = asYouType.input(e.target.value);
|
|
1404
1398
|
}, []);
|
|
1399
|
+
function resetForm() {
|
|
1400
|
+
setLeadFormState({
|
|
1401
|
+
loading: false,
|
|
1402
|
+
error: "",
|
|
1403
|
+
validationErrors: {},
|
|
1404
|
+
});
|
|
1405
|
+
setSuccess(false);
|
|
1406
|
+
}
|
|
1405
1407
|
let errorMessage = "";
|
|
1406
1408
|
if ((_a = errors === null || errors === void 0 ? void 0 : errors.response) === null || _a === void 0 ? void 0 : _a["error"]) {
|
|
1407
1409
|
errorMessage = props.networkErrorMessage;
|
|
@@ -1425,6 +1427,7 @@ function useLeadForm(props) {
|
|
|
1425
1427
|
callbacks: {
|
|
1426
1428
|
submit,
|
|
1427
1429
|
inputFunction,
|
|
1430
|
+
resetForm,
|
|
1428
1431
|
},
|
|
1429
1432
|
refs: {
|
|
1430
1433
|
formRef,
|
|
@@ -1538,6 +1541,7 @@ function useRegisterDemo(props) {
|
|
|
1538
1541
|
console.log("submit");
|
|
1539
1542
|
},
|
|
1540
1543
|
inputFunction: () => { },
|
|
1544
|
+
resetForm: () => { },
|
|
1541
1545
|
},
|
|
1542
1546
|
refs: {
|
|
1543
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-
|
|
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: {},
|
|
@@ -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" },
|
|
@@ -40,7 +40,7 @@ export function useLeadForm(props) {
|
|
|
40
40
|
};
|
|
41
41
|
}, [formRef.current]);
|
|
42
42
|
const submit = async (event) => {
|
|
43
|
-
var _a
|
|
43
|
+
var _a;
|
|
44
44
|
let formControls = event.target.getFormControls();
|
|
45
45
|
let formData = {};
|
|
46
46
|
let validationErrors = {};
|
|
@@ -79,11 +79,6 @@ export function useLeadForm(props) {
|
|
|
79
79
|
};
|
|
80
80
|
try {
|
|
81
81
|
const result = await submitLead({ formSubmissionInput: variables });
|
|
82
|
-
console.log({
|
|
83
|
-
result,
|
|
84
|
-
success: (_a = result === null || result === void 0 ? void 0 : result.submitForm) === null || _a === void 0 ? void 0 : _a.success,
|
|
85
|
-
isError: result instanceof Error,
|
|
86
|
-
});
|
|
87
82
|
if (result instanceof Error) {
|
|
88
83
|
throw result;
|
|
89
84
|
}
|
|
@@ -92,12 +87,11 @@ export function useLeadForm(props) {
|
|
|
92
87
|
error: "",
|
|
93
88
|
validationErrors: {},
|
|
94
89
|
});
|
|
95
|
-
if ((
|
|
90
|
+
if ((_a = result === null || result === void 0 ? void 0 : result.submitForm) === null || _a === void 0 ? void 0 : _a.success) {
|
|
96
91
|
setSuccess(true);
|
|
97
92
|
}
|
|
98
93
|
}
|
|
99
94
|
catch (error) {
|
|
100
|
-
console.log({ error });
|
|
101
95
|
setLeadFormState({
|
|
102
96
|
loading: false,
|
|
103
97
|
error: props.networkErrorMessage,
|
|
@@ -113,6 +107,14 @@ export function useLeadForm(props) {
|
|
|
113
107
|
const asYouType = new AsYouType("US");
|
|
114
108
|
e.target.value = asYouType.input(e.target.value);
|
|
115
109
|
}, []);
|
|
110
|
+
function resetForm() {
|
|
111
|
+
setLeadFormState({
|
|
112
|
+
loading: false,
|
|
113
|
+
error: "",
|
|
114
|
+
validationErrors: {},
|
|
115
|
+
});
|
|
116
|
+
setSuccess(false);
|
|
117
|
+
}
|
|
116
118
|
let errorMessage = "";
|
|
117
119
|
if ((_a = errors === null || errors === void 0 ? void 0 : errors.response) === null || _a === void 0 ? void 0 : _a["error"]) {
|
|
118
120
|
errorMessage = props.networkErrorMessage;
|
|
@@ -136,6 +138,7 @@ export function useLeadForm(props) {
|
|
|
136
138
|
callbacks: {
|
|
137
139
|
submit,
|
|
138
140
|
inputFunction,
|
|
141
|
+
resetForm,
|
|
139
142
|
},
|
|
140
143
|
refs: {
|
|
141
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-
|
|
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
|
|
|
@@ -1325,7 +1325,7 @@ function useLeadForm(props) {
|
|
|
1325
1325
|
};
|
|
1326
1326
|
}, [formRef.current]);
|
|
1327
1327
|
const submit = async (event) => {
|
|
1328
|
-
var _a
|
|
1328
|
+
var _a;
|
|
1329
1329
|
let formControls = event.target.getFormControls();
|
|
1330
1330
|
let formData = {};
|
|
1331
1331
|
let validationErrors = {};
|
|
@@ -1364,11 +1364,6 @@ function useLeadForm(props) {
|
|
|
1364
1364
|
};
|
|
1365
1365
|
try {
|
|
1366
1366
|
const result = await submitLead({ formSubmissionInput: variables });
|
|
1367
|
-
console.log({
|
|
1368
|
-
result,
|
|
1369
|
-
success: (_a = result === null || result === void 0 ? void 0 : result.submitForm) === null || _a === void 0 ? void 0 : _a.success,
|
|
1370
|
-
isError: result instanceof Error,
|
|
1371
|
-
});
|
|
1372
1367
|
if (result instanceof Error) {
|
|
1373
1368
|
throw result;
|
|
1374
1369
|
}
|
|
@@ -1377,12 +1372,11 @@ function useLeadForm(props) {
|
|
|
1377
1372
|
error: "",
|
|
1378
1373
|
validationErrors: {},
|
|
1379
1374
|
});
|
|
1380
|
-
if ((
|
|
1375
|
+
if ((_a = result === null || result === void 0 ? void 0 : result.submitForm) === null || _a === void 0 ? void 0 : _a.success) {
|
|
1381
1376
|
setSuccess(true);
|
|
1382
1377
|
}
|
|
1383
1378
|
}
|
|
1384
1379
|
catch (error) {
|
|
1385
|
-
console.log({ error });
|
|
1386
1380
|
setLeadFormState({
|
|
1387
1381
|
loading: false,
|
|
1388
1382
|
error: props.networkErrorMessage,
|
|
@@ -1398,6 +1392,14 @@ function useLeadForm(props) {
|
|
|
1398
1392
|
const asYouType = new AsYouType("US");
|
|
1399
1393
|
e.target.value = asYouType.input(e.target.value);
|
|
1400
1394
|
}, []);
|
|
1395
|
+
function resetForm() {
|
|
1396
|
+
setLeadFormState({
|
|
1397
|
+
loading: false,
|
|
1398
|
+
error: "",
|
|
1399
|
+
validationErrors: {},
|
|
1400
|
+
});
|
|
1401
|
+
setSuccess(false);
|
|
1402
|
+
}
|
|
1401
1403
|
let errorMessage = "";
|
|
1402
1404
|
if ((_a = errors === null || errors === void 0 ? void 0 : errors.response) === null || _a === void 0 ? void 0 : _a["error"]) {
|
|
1403
1405
|
errorMessage = props.networkErrorMessage;
|
|
@@ -1421,6 +1423,7 @@ function useLeadForm(props) {
|
|
|
1421
1423
|
callbacks: {
|
|
1422
1424
|
submit,
|
|
1423
1425
|
inputFunction,
|
|
1426
|
+
resetForm,
|
|
1424
1427
|
},
|
|
1425
1428
|
refs: {
|
|
1426
1429
|
formRef,
|
|
@@ -1534,6 +1537,7 @@ function useRegisterDemo(props) {
|
|
|
1534
1537
|
console.log("submit");
|
|
1535
1538
|
},
|
|
1536
1539
|
inputFunction: () => { },
|
|
1540
|
+
resetForm: () => { },
|
|
1537
1541
|
},
|
|
1538
1542
|
refs: {
|
|
1539
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-
|
|
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: {},
|