@saasquatch/mint-components 1.14.6-1 → 1.14.6-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.
- package/dist/cjs/{ShadowViewAddon-c0a5fdf8.js → ShadowViewAddon-40f0bc74.js} +58 -26
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-big-stat_42.cjs.entry.js +85 -117
- package/dist/cjs/sqm-lead-dropdown-field-view-03a3e03f.js +69 -0
- package/dist/cjs/sqm-lead-dropdown-field.cjs.entry.js +75 -0
- package/dist/cjs/sqm-lead-input-field-view-6344cd93.js +51 -0
- package/dist/cjs/sqm-lead-input-field.cjs.entry.js +78 -0
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +166 -49
- package/dist/cjs/useLeadFormState-c83d2034.js +72 -0
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/sqm-lead-form/LeadForm.stories.js +34 -46
- package/dist/collection/components/sqm-lead-form/LeadFormDropdownField.stories.js +59 -0
- package/dist/collection/components/sqm-lead-form/LeadInputField.stories.js +48 -0
- package/dist/collection/components/sqm-lead-form/sqm-lead-dropdown-field-view.js +65 -0
- package/dist/collection/components/sqm-lead-form/sqm-lead-dropdown-field.js +193 -0
- package/dist/collection/components/sqm-lead-form/sqm-lead-form-view.js +59 -26
- package/dist/collection/components/sqm-lead-form/sqm-lead-form.js +147 -36
- package/dist/collection/components/sqm-lead-form/sqm-lead-input-field-view.js +47 -0
- package/dist/collection/components/sqm-lead-form/sqm-lead-input-field.js +222 -0
- package/dist/collection/components/sqm-lead-form/useLeadDropdownField.js +10 -0
- package/dist/collection/components/sqm-lead-form/useLeadForm.js +9 -6
- package/dist/collection/components/sqm-lead-form/useLeadInputField.js +10 -0
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +4 -0
- package/dist/esm/{ShadowViewAddon-aa7177fe.js → ShadowViewAddon-8a0d9e83.js} +58 -26
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-big-stat_42.entry.js +82 -114
- package/dist/esm/sqm-lead-dropdown-field-view-4c85fe20.js +67 -0
- package/dist/esm/sqm-lead-dropdown-field.entry.js +71 -0
- package/dist/esm/sqm-lead-input-field-view-f1dd4b77.js +49 -0
- package/dist/esm/sqm-lead-input-field.entry.js +74 -0
- package/dist/esm/sqm-stencilbook.entry.js +166 -49
- package/dist/esm/useLeadFormState-9016d812.js +68 -0
- package/dist/esm-es5/{ShadowViewAddon-aa7177fe.js → ShadowViewAddon-8a0d9e83.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-big-stat_42.entry.js +1 -1
- package/dist/esm-es5/sqm-lead-dropdown-field-view-4c85fe20.js +1 -0
- package/dist/esm-es5/sqm-lead-dropdown-field.entry.js +1 -0
- package/dist/esm-es5/sqm-lead-input-field-view-f1dd4b77.js +1 -0
- package/dist/esm-es5/sqm-lead-input-field.entry.js +1 -0
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/useLeadFormState-9016d812.js +1 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-13c67985.system.entry.js +1 -0
- package/dist/mint-components/p-15f1ff1d.system.js +1 -0
- package/dist/mint-components/p-1d704c40.system.js +1 -0
- package/dist/mint-components/p-26da31c6.js +1 -0
- package/dist/mint-components/p-37996351.system.js +1 -1
- package/dist/mint-components/{p-373a92a2.js → p-4139feb5.js} +3 -3
- package/dist/mint-components/p-4d5b02af.js +1 -0
- package/dist/mint-components/p-87384d9e.system.js +1 -0
- package/dist/mint-components/p-875861d7.system.entry.js +1 -0
- package/dist/mint-components/p-8af8ab01.system.entry.js +1 -0
- package/dist/mint-components/p-9e1570bf.system.entry.js +1 -0
- package/dist/mint-components/{p-72e5e84f.system.js → p-ad6420a2.system.js} +1 -1
- package/dist/mint-components/p-b8c15858.entry.js +1 -0
- package/dist/mint-components/{p-8dc110b0.entry.js → p-cd1c6113.entry.js} +2 -2
- package/dist/mint-components/p-e358f0c1.entry.js +265 -0
- package/dist/mint-components/p-f59d6012.entry.js +1 -0
- package/dist/mint-components/p-f98a4354.js +1 -0
- package/dist/types/components/sqm-lead-form/LeadForm.stories.d.ts +1 -0
- package/dist/types/components/sqm-lead-form/LeadFormDropdownField.stories.d.ts +9 -0
- package/dist/types/components/sqm-lead-form/LeadInputField.stories.d.ts +8 -0
- package/dist/types/components/sqm-lead-form/sqm-lead-dropdown-field-view.d.ts +15 -0
- package/dist/types/components/sqm-lead-form/sqm-lead-dropdown-field.d.ts +42 -0
- package/dist/types/components/sqm-lead-form/sqm-lead-form-view.d.ts +7 -0
- package/dist/types/components/sqm-lead-form/sqm-lead-form.d.ts +24 -7
- package/dist/types/components/sqm-lead-form/sqm-lead-input-field-view.d.ts +14 -0
- package/dist/types/components/sqm-lead-form/sqm-lead-input-field.d.ts +49 -0
- package/dist/types/components/sqm-lead-form/useLeadDropdownField.d.ts +6 -0
- package/dist/types/components/sqm-lead-form/useLeadForm.d.ts +4 -0
- package/dist/types/components/sqm-lead-form/useLeadInputField.d.ts +6 -0
- package/dist/types/components.d.ts +194 -12
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/mint-components/p-02a6e0df.system.entry.js +0 -1
- package/dist/mint-components/p-cde11800.system.entry.js +0 -1
- package/dist/mint-components/p-ede3d2f9.entry.js +0 -265
- package/dist/types/global/android.d.ts +0 -7
- package/dist/types/global/demo.d.ts +0 -2
- package/dist/types/stories/features.d.ts +0 -4
- package/dist/types/stories/templates.d.ts +0 -4
|
@@ -19,11 +19,12 @@ require('./luxon-2926d85f.js');
|
|
|
19
19
|
require('./sqm-text-span-view-0aa82125.js');
|
|
20
20
|
const index$1 = require('./index-8c6255f5.js');
|
|
21
21
|
const useRegistrationFormState = require('./useRegistrationFormState-7b820f0c.js');
|
|
22
|
+
const useLeadFormState = require('./useLeadFormState-c83d2034.js');
|
|
22
23
|
const sqmPortalLoginView = require('./sqm-portal-login-view-761a4d8e.js');
|
|
23
24
|
const usePortalLogin = require('./usePortalLogin-63d896d1.js');
|
|
24
25
|
const AsYouType = require('./AsYouType-6788393a.js');
|
|
25
26
|
const utilities = require('./utilities-78f5e169.js');
|
|
26
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
27
|
+
const ShadowViewAddon = require('./ShadowViewAddon-40f0bc74.js');
|
|
27
28
|
require('./sqm-portal-container-view-4f15143a.js');
|
|
28
29
|
const usePayoutStatus = require('./usePayoutStatus-feeac99b.js');
|
|
29
30
|
|
|
@@ -141,58 +142,6 @@ const CardFeed = class {
|
|
|
141
142
|
}
|
|
142
143
|
};
|
|
143
144
|
|
|
144
|
-
const style = {
|
|
145
|
-
IconStyle: {
|
|
146
|
-
display: "block",
|
|
147
|
-
position: "absolute",
|
|
148
|
-
top: "23px",
|
|
149
|
-
},
|
|
150
|
-
DivStyle: {
|
|
151
|
-
marginLeft: "28px",
|
|
152
|
-
},
|
|
153
|
-
Details: {
|
|
154
|
-
marginLeft: "28px",
|
|
155
|
-
},
|
|
156
|
-
Heading: {
|
|
157
|
-
display: "inline-block",
|
|
158
|
-
},
|
|
159
|
-
Children: {
|
|
160
|
-
display: "none",
|
|
161
|
-
},
|
|
162
|
-
};
|
|
163
|
-
const sheet = JSS.createStyleSheet(style);
|
|
164
|
-
const styleString = sheet.toString();
|
|
165
|
-
function RequiredPropsError({ missingProps, heading = "There was a problem loading this section", subheading = "There was a technical problem that prevented this section from loading. Please contact us with the link to this page.", description = "Error occured while loading <{tagName}>. Values for the following attributes are missing:", }, children) {
|
|
166
|
-
if (!missingProps)
|
|
167
|
-
return false;
|
|
168
|
-
const host = index_module._();
|
|
169
|
-
const [detailsOpen, setDetailsOpen] = stencilHooks_module.useState(false);
|
|
170
|
-
return (index.h("sl-alert", { type: "danger", open: true },
|
|
171
|
-
index.h("style", { type: "text/css" }, styleString),
|
|
172
|
-
index.h("div", { slot: "icon", class: sheet.classes.IconStyle },
|
|
173
|
-
index.h("sl-icon", { name: "exclamation-octagon" })),
|
|
174
|
-
index.h("div", { class: sheet.classes.DivStyle },
|
|
175
|
-
index.h("h2", { class: sheet.classes.Heading }, global.intl.formatMessage({
|
|
176
|
-
id: `error-heading`,
|
|
177
|
-
defaultMessage: heading,
|
|
178
|
-
})),
|
|
179
|
-
index.h("p", null, global.intl.formatMessage({
|
|
180
|
-
id: `error-subheading`,
|
|
181
|
-
defaultMessage: subheading,
|
|
182
|
-
}))),
|
|
183
|
-
index.h("details", { class: sheet.classes.Details },
|
|
184
|
-
index.h("summary", { onClick: () => setDetailsOpen(!detailsOpen) },
|
|
185
|
-
detailsOpen ? "Less" : "More",
|
|
186
|
-
" details"),
|
|
187
|
-
index.h("p", null, global.intl.formatMessage({
|
|
188
|
-
id: `error-description`,
|
|
189
|
-
defaultMessage: description,
|
|
190
|
-
}, { tagName: host.tagName.toLowerCase() })),
|
|
191
|
-
index.h("ul", null, missingProps.map((prop) => (index.h("li", null,
|
|
192
|
-
index.h("strong", null, prop.attribute)))))),
|
|
193
|
-
index.h("div", { class: sheet.classes.Children }, children)));
|
|
194
|
-
}
|
|
195
|
-
|
|
196
145
|
function useCheckboxField(props) {
|
|
197
146
|
var _a;
|
|
198
147
|
const registrationFormState = stencilHooks_module.d(useRegistrationFormState.REGISTRATION_FORM_STATE_CONTEXT);
|
|
@@ -252,7 +201,7 @@ const CheckboxField = class {
|
|
|
252
201
|
},
|
|
253
202
|
]);
|
|
254
203
|
if (!index_module.isDemo() && missingProps) {
|
|
255
|
-
return (index.h(RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this form", subheading: "A technical problem prevented this checkbox field from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" }));
|
|
204
|
+
return (index.h(useLeadFormState.RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this form", subheading: "A technical problem prevented this checkbox field from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" }));
|
|
256
205
|
}
|
|
257
206
|
const content = {
|
|
258
207
|
...utils.getProps(this),
|
|
@@ -718,7 +667,7 @@ const DropdownField = class {
|
|
|
718
667
|
},
|
|
719
668
|
]);
|
|
720
669
|
if (!index_module.isDemo() && missingProps) {
|
|
721
|
-
return (index.h(RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this form", subheading: "A technical problem prevented this drop down field from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" }, index.h("slot", null)));
|
|
670
|
+
return (index.h(useLeadFormState.RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this form", subheading: "A technical problem prevented this drop down field from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" }, index.h("slot", null)));
|
|
722
671
|
}
|
|
723
672
|
const content = {
|
|
724
673
|
...utils.getProps(this),
|
|
@@ -1330,7 +1279,7 @@ const InputField = class {
|
|
|
1330
1279
|
},
|
|
1331
1280
|
]);
|
|
1332
1281
|
if (!index_module.isDemo() && missingProps) {
|
|
1333
|
-
return (index.h(RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this form", subheading: "A technical problem prevented this input field from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" }));
|
|
1282
|
+
return (index.h(useLeadFormState.RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this form", subheading: "A technical problem prevented this input field from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" }));
|
|
1334
1283
|
}
|
|
1335
1284
|
const { states } = index_module.isDemo() ? useInputFieldDemo(this) : useInputField();
|
|
1336
1285
|
return index.h(ShadowViewAddon.InputFieldView, { states: states, content: content });
|
|
@@ -1344,17 +1293,8 @@ function useInputFieldDemo(props) {
|
|
|
1344
1293
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
1345
1294
|
}
|
|
1346
1295
|
|
|
1347
|
-
const LEAD_FORM_STATE_CONTEXT = "sq:lead-form-state";
|
|
1348
|
-
const LEAD_FORM_STATE_CONTEXT_INTERNAL = "sq:lead-form-state-internal";
|
|
1349
|
-
function useLeadFormState(formState) {
|
|
1350
|
-
const host = index_module._();
|
|
1351
|
-
const [leadFormState, setLeadFormState] = stencilHooks_module.y(host, LEAD_FORM_STATE_CONTEXT, formState);
|
|
1352
|
-
stencilHooks_module.y(host, LEAD_FORM_STATE_CONTEXT_INTERNAL, [leadFormState, setLeadFormState]);
|
|
1353
|
-
return { leadFormState, setLeadFormState };
|
|
1354
|
-
}
|
|
1355
|
-
|
|
1356
1296
|
const SUBMIT_LEAD = index_module.dist.gql `
|
|
1357
|
-
mutation submitForm($formSubmissionInput: FormSubmissionInput) {
|
|
1297
|
+
mutation submitForm($formSubmissionInput: FormSubmissionInput!) {
|
|
1358
1298
|
submitForm(formSubmissionInput: $formSubmissionInput) {
|
|
1359
1299
|
success
|
|
1360
1300
|
}
|
|
@@ -1363,8 +1303,9 @@ const SUBMIT_LEAD = index_module.dist.gql `
|
|
|
1363
1303
|
function useLeadForm(props) {
|
|
1364
1304
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1365
1305
|
const formRef = stencilHooks_module.useRef(null);
|
|
1366
|
-
const { leadFormState, setLeadFormState } = useLeadFormState({});
|
|
1306
|
+
const { leadFormState, setLeadFormState } = useLeadFormState.useLeadFormState({});
|
|
1367
1307
|
const [submitLead, { loading, errors, data }] = index_module.$e(SUBMIT_LEAD);
|
|
1308
|
+
const [success, setSuccess] = stencilHooks_module.useState(false);
|
|
1368
1309
|
stencilHooks_module.useEffect(() => {
|
|
1369
1310
|
if (!formRef.current)
|
|
1370
1311
|
return;
|
|
@@ -1375,6 +1316,7 @@ function useLeadForm(props) {
|
|
|
1375
1316
|
};
|
|
1376
1317
|
}, [formRef.current]);
|
|
1377
1318
|
const submit = async (event) => {
|
|
1319
|
+
var _a, _b;
|
|
1378
1320
|
let formControls = event.target.getFormControls();
|
|
1379
1321
|
let formData = {};
|
|
1380
1322
|
let validationErrors = {};
|
|
@@ -1421,8 +1363,9 @@ function useLeadForm(props) {
|
|
|
1421
1363
|
error: "",
|
|
1422
1364
|
validationErrors: {},
|
|
1423
1365
|
});
|
|
1424
|
-
|
|
1425
|
-
|
|
1366
|
+
console.log({ success: result.data.submitForm.success });
|
|
1367
|
+
if ((_b = (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.submitForm) === null || _b === void 0 ? void 0 : _b.success) {
|
|
1368
|
+
setSuccess(true);
|
|
1426
1369
|
}
|
|
1427
1370
|
}
|
|
1428
1371
|
catch (error) {
|
|
@@ -1456,6 +1399,7 @@ function useLeadForm(props) {
|
|
|
1456
1399
|
states: {
|
|
1457
1400
|
loading,
|
|
1458
1401
|
error: errorMessage,
|
|
1402
|
+
success,
|
|
1459
1403
|
leadFormState,
|
|
1460
1404
|
referralCode: "ABC123",
|
|
1461
1405
|
},
|
|
@@ -1473,13 +1417,6 @@ const LeadForm = class {
|
|
|
1473
1417
|
constructor(hostRef) {
|
|
1474
1418
|
index.registerInstance(this, hostRef);
|
|
1475
1419
|
this.ignored = true;
|
|
1476
|
-
/**
|
|
1477
|
-
* Redirect participants to this page from their verification email
|
|
1478
|
-
*
|
|
1479
|
-
* @uiName Submission redirect
|
|
1480
|
-
* @uiWidget pageSelect
|
|
1481
|
-
*/
|
|
1482
|
-
this.nextPage = "/";
|
|
1483
1420
|
/**
|
|
1484
1421
|
* @uiName Email field label
|
|
1485
1422
|
*/
|
|
@@ -1496,18 +1433,42 @@ const LeadForm = class {
|
|
|
1496
1433
|
* @uiName Submit button text
|
|
1497
1434
|
*/
|
|
1498
1435
|
this.submitLabel = "Submit";
|
|
1436
|
+
/**
|
|
1437
|
+
* @uiName Submit another form button label
|
|
1438
|
+
*/
|
|
1439
|
+
this.resubmitFormLabel = "Refer Another Friend";
|
|
1499
1440
|
/**
|
|
1500
1441
|
* @uiName Header text
|
|
1501
1442
|
*/
|
|
1502
|
-
this.pageLabel = "
|
|
1443
|
+
this.pageLabel = "Refer your friend";
|
|
1503
1444
|
this.formKey = "lead-form";
|
|
1445
|
+
/**
|
|
1446
|
+
* Optional support link for error messages.
|
|
1447
|
+
*/
|
|
1448
|
+
this.supportLink = "Support";
|
|
1449
|
+
/**
|
|
1450
|
+
* Header text shown on successful submission.
|
|
1451
|
+
*/
|
|
1452
|
+
this.submitSuccessHeader = "Referral submitted";
|
|
1453
|
+
/**
|
|
1454
|
+
* Description text shown on successful submission.
|
|
1455
|
+
*/
|
|
1456
|
+
this.submitSuccessDescription = "Our team will contact your friend to see if they’re a good fit. In the meantime, you can track this referral on Activity page.";
|
|
1457
|
+
/**
|
|
1458
|
+
* Header text shown when an error occurs.
|
|
1459
|
+
*/
|
|
1460
|
+
this.submitErrorHeader = "An error occurred while submitting";
|
|
1461
|
+
/**
|
|
1462
|
+
* Description text shown when an error occurs.
|
|
1463
|
+
*/
|
|
1464
|
+
this.submitErrorDescription = "Please try again later. If the problem continues, contact {supportLink}";
|
|
1504
1465
|
/**
|
|
1505
1466
|
* The message to be displayed when a required field is not filled.
|
|
1506
1467
|
*
|
|
1507
1468
|
* @uiName Required field message
|
|
1508
1469
|
* @uiWidget textArea
|
|
1509
1470
|
*/
|
|
1510
|
-
this.requiredFieldErrorMessage = "
|
|
1471
|
+
this.requiredFieldErrorMessage = "Please enter a valid {fieldLabel}";
|
|
1511
1472
|
/**
|
|
1512
1473
|
* The message to be displayed when a the form submission fails unexpectedly.
|
|
1513
1474
|
*
|
|
@@ -1533,7 +1494,13 @@ const LeadForm = class {
|
|
|
1533
1494
|
formData: index.h("slot", { name: "formData" }),
|
|
1534
1495
|
emailLabel: this.emailLabel,
|
|
1535
1496
|
submitLabel: this.submitLabel,
|
|
1497
|
+
resubmitFormLabel: this.resubmitFormLabel,
|
|
1536
1498
|
pageLabel: this.pageLabel,
|
|
1499
|
+
supportLink: this.supportLink,
|
|
1500
|
+
submitSuccessHeader: this.submitSuccessHeader,
|
|
1501
|
+
submitSuccessDescription: this.submitSuccessDescription,
|
|
1502
|
+
submitErrorHeader: this.submitErrorHeader,
|
|
1503
|
+
submitErrorDescription: this.submitErrorDescription,
|
|
1537
1504
|
invalidEmailErrorMessage: this.invalidEmailErrorMessage,
|
|
1538
1505
|
requiredFieldErrorMessage: this.requiredFieldErrorMessage,
|
|
1539
1506
|
};
|
|
@@ -1545,6 +1512,7 @@ function useRegisterDemo(props) {
|
|
|
1545
1512
|
states: {
|
|
1546
1513
|
error: "",
|
|
1547
1514
|
loading: false,
|
|
1515
|
+
success: false,
|
|
1548
1516
|
},
|
|
1549
1517
|
callbacks: {
|
|
1550
1518
|
submit: async (_event) => {
|
|
@@ -1855,7 +1823,7 @@ function useLeaderboardDemo(props) {
|
|
|
1855
1823
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
1856
1824
|
}
|
|
1857
1825
|
|
|
1858
|
-
const style
|
|
1826
|
+
const style = {
|
|
1859
1827
|
Container: { display: "contents" },
|
|
1860
1828
|
Link: {
|
|
1861
1829
|
textDecoration: "none",
|
|
@@ -1867,16 +1835,16 @@ const vanillaStyle = `
|
|
|
1867
1835
|
display: inline;
|
|
1868
1836
|
}
|
|
1869
1837
|
`;
|
|
1870
|
-
const sheet
|
|
1871
|
-
const styleString
|
|
1838
|
+
const sheet = JSS.createStyleSheet(style);
|
|
1839
|
+
const styleString = sheet.toString();
|
|
1872
1840
|
function LinkButtonView(props) {
|
|
1873
1841
|
const { onClick, buttonText } = props;
|
|
1874
|
-
return (index.h("span", { class: sheet
|
|
1842
|
+
return (index.h("span", { class: sheet.classes.Container, part: "sqm-base" },
|
|
1875
1843
|
index.h("style", { type: "text/css" },
|
|
1876
|
-
styleString
|
|
1844
|
+
styleString,
|
|
1877
1845
|
vanillaStyle),
|
|
1878
1846
|
index.h("sl-button", { onClick: onClick, type: "primary", exportparts: "base: primarybutton-base" },
|
|
1879
|
-
index.h("a", { class: sheet
|
|
1847
|
+
index.h("a", { class: sheet.classes.Link, part: "sqm-link" }, buttonText))));
|
|
1880
1848
|
}
|
|
1881
1849
|
|
|
1882
1850
|
const LinkButton = class {
|
|
@@ -2057,7 +2025,7 @@ function useNavigationMenuDemo(props) {
|
|
|
2057
2025
|
}
|
|
2058
2026
|
NavigationMenu.style = sqmNavigationMenuCss;
|
|
2059
2027
|
|
|
2060
|
-
const style$
|
|
2028
|
+
const style$1 = {
|
|
2061
2029
|
Wrapper: {
|
|
2062
2030
|
maxWidth: "200px",
|
|
2063
2031
|
marginLeft: "auto",
|
|
@@ -2068,16 +2036,16 @@ const style$2 = {
|
|
|
2068
2036
|
margin: "0",
|
|
2069
2037
|
},
|
|
2070
2038
|
};
|
|
2071
|
-
const sheet$
|
|
2072
|
-
const styleString$
|
|
2039
|
+
const sheet$1 = JSS.createStyleSheet(style$1);
|
|
2040
|
+
const styleString$1 = sheet$1.toString();
|
|
2073
2041
|
function PayoutButtonScrollView(props) {
|
|
2074
2042
|
const { text, states } = props;
|
|
2075
2043
|
if (!states.payoutSettingsComplete)
|
|
2076
2044
|
return index.h("div", null);
|
|
2077
|
-
return (index.h("div", { class: sheet$
|
|
2078
|
-
index.h("style", { type: "text/css" }, styleString$
|
|
2045
|
+
return (index.h("div", { class: sheet$1.classes.Wrapper },
|
|
2046
|
+
index.h("style", { type: "text/css" }, styleString$1),
|
|
2079
2047
|
index.h("sqm-scroll", { "scroll-tag-name": "sqm-tabs", "button-text": text.payoutButtonText, "scroll-animation": "smooth" }),
|
|
2080
|
-
index.h("p", { class: sheet$
|
|
2048
|
+
index.h("p", { class: sheet$1.classes.PayoutButtonDescription }, text.payoutButtonDescription)));
|
|
2081
2049
|
}
|
|
2082
2050
|
|
|
2083
2051
|
const GET_PAYOUT_DETAILS = index_module.dist.gql `
|
|
@@ -2150,7 +2118,7 @@ function useDemoPayoutButtonScroll(props) {
|
|
|
2150
2118
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
2151
2119
|
}
|
|
2152
2120
|
|
|
2153
|
-
const style$
|
|
2121
|
+
const style$2 = {
|
|
2154
2122
|
SkeletonOne: {
|
|
2155
2123
|
width: "50%",
|
|
2156
2124
|
height: "16px",
|
|
@@ -2201,8 +2169,8 @@ const style$3 = {
|
|
|
2201
2169
|
"&::part(footer)": {},
|
|
2202
2170
|
},
|
|
2203
2171
|
};
|
|
2204
|
-
const sheet$
|
|
2205
|
-
const styleString$
|
|
2172
|
+
const sheet$2 = JSS.createStyleSheet(style$2);
|
|
2173
|
+
const styleString$2 = sheet$2.toString();
|
|
2206
2174
|
function PayoutStatusAlertView(props) {
|
|
2207
2175
|
const { text, states, data, callbacks } = props;
|
|
2208
2176
|
function getAlert(status) {
|
|
@@ -2213,7 +2181,7 @@ function PayoutStatusAlertView(props) {
|
|
|
2213
2181
|
buttonText: null,
|
|
2214
2182
|
alertType: "critical",
|
|
2215
2183
|
icon: "exclamation-triangle",
|
|
2216
|
-
class: sheet$
|
|
2184
|
+
class: sheet$2.classes.ErrorAlertContainer,
|
|
2217
2185
|
};
|
|
2218
2186
|
switch (status) {
|
|
2219
2187
|
case "INFORMATION_REQUIRED":
|
|
@@ -2223,7 +2191,7 @@ function PayoutStatusAlertView(props) {
|
|
|
2223
2191
|
buttonText: text.informationRequiredButtonText,
|
|
2224
2192
|
alertType: "info",
|
|
2225
2193
|
icon: "info-circle",
|
|
2226
|
-
class: sheet$
|
|
2194
|
+
class: sheet$2.classes.InfoAlertContainer,
|
|
2227
2195
|
};
|
|
2228
2196
|
case "VERIFICATION:REQUIRED":
|
|
2229
2197
|
return {
|
|
@@ -2237,7 +2205,7 @@ function PayoutStatusAlertView(props) {
|
|
|
2237
2205
|
buttonText: text.verificationRequiredButtonText,
|
|
2238
2206
|
alertType: "warning",
|
|
2239
2207
|
icon: "exclamation-triangle",
|
|
2240
|
-
class: sheet$
|
|
2208
|
+
class: sheet$2.classes.WarningAlertContainer,
|
|
2241
2209
|
};
|
|
2242
2210
|
case "VERIFICATION:INTERNAL":
|
|
2243
2211
|
return {
|
|
@@ -2250,7 +2218,7 @@ function PayoutStatusAlertView(props) {
|
|
|
2250
2218
|
}),
|
|
2251
2219
|
alertType: "warning",
|
|
2252
2220
|
icon: "exclamation-triangle",
|
|
2253
|
-
class: sheet$
|
|
2221
|
+
class: sheet$2.classes.WarningAlertContainer,
|
|
2254
2222
|
};
|
|
2255
2223
|
case "VERIFICATION:REVIEW":
|
|
2256
2224
|
return {
|
|
@@ -2263,7 +2231,7 @@ function PayoutStatusAlertView(props) {
|
|
|
2263
2231
|
}),
|
|
2264
2232
|
alertType: "warning",
|
|
2265
2233
|
icon: "exclamation-triangle",
|
|
2266
|
-
class: sheet$
|
|
2234
|
+
class: sheet$2.classes.WarningAlertContainer,
|
|
2267
2235
|
};
|
|
2268
2236
|
case "VERIFICATION:FAILED":
|
|
2269
2237
|
return {
|
|
@@ -2276,7 +2244,7 @@ function PayoutStatusAlertView(props) {
|
|
|
2276
2244
|
}),
|
|
2277
2245
|
alertType: "critical",
|
|
2278
2246
|
icon: "exclamation-octagon",
|
|
2279
|
-
class: sheet$
|
|
2247
|
+
class: sheet$2.classes.ErrorAlertContainer,
|
|
2280
2248
|
};
|
|
2281
2249
|
case "HOLD":
|
|
2282
2250
|
return {
|
|
@@ -2290,7 +2258,7 @@ function PayoutStatusAlertView(props) {
|
|
|
2290
2258
|
buttonText: null,
|
|
2291
2259
|
alertType: "warning",
|
|
2292
2260
|
icon: "exclamation-triangle",
|
|
2293
|
-
class: sheet$
|
|
2261
|
+
class: sheet$2.classes.WarningAlertContainer,
|
|
2294
2262
|
};
|
|
2295
2263
|
default:
|
|
2296
2264
|
return;
|
|
@@ -2309,18 +2277,18 @@ function PayoutStatusAlertView(props) {
|
|
|
2309
2277
|
}
|
|
2310
2278
|
}
|
|
2311
2279
|
if (states.loading) {
|
|
2312
|
-
return index.h("sl-skeleton", { class: sheet$
|
|
2280
|
+
return index.h("sl-skeleton", { class: sheet$2.classes.SkeletonOne });
|
|
2313
2281
|
}
|
|
2314
2282
|
const alertDetails = getAlert(states.status);
|
|
2315
2283
|
if (states.status === "DONE" || !alertDetails) {
|
|
2316
2284
|
return index.h("div", null);
|
|
2317
2285
|
}
|
|
2318
2286
|
return (index.h("div", { part: "sqm-base" },
|
|
2319
|
-
index.h("style", { type: "text/css" }, styleString$
|
|
2287
|
+
index.h("style", { type: "text/css" }, styleString$2),
|
|
2320
2288
|
index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: alertDetails.alertType, class: alertDetails.class, open: true },
|
|
2321
2289
|
index.h("sl-icon", { slot: "icon", name: alertDetails.icon }),
|
|
2322
2290
|
index.h("strong", null, alertDetails.header),
|
|
2323
|
-
index.h("p", { class: sheet$
|
|
2291
|
+
index.h("p", { class: sheet$2.classes.AlertDescriptionText }, alertDetails.description),
|
|
2324
2292
|
getButton(states.status))));
|
|
2325
2293
|
}
|
|
2326
2294
|
|
|
@@ -3474,7 +3442,7 @@ const ProgramMenu = class {
|
|
|
3474
3442
|
}
|
|
3475
3443
|
};
|
|
3476
3444
|
|
|
3477
|
-
const style$
|
|
3445
|
+
const style$3 = {
|
|
3478
3446
|
Container: {
|
|
3479
3447
|
borderRadius: "var(--sl-border-radius-large)",
|
|
3480
3448
|
color: "var(--sl-color-neutral-900)",
|
|
@@ -3502,15 +3470,15 @@ const style$4 = {
|
|
|
3502
3470
|
},
|
|
3503
3471
|
},
|
|
3504
3472
|
};
|
|
3505
|
-
const sheet$
|
|
3506
|
-
const styleString$
|
|
3473
|
+
const sheet$3 = JSS.createStyleSheet(style$3);
|
|
3474
|
+
const styleString$3 = sheet$3.toString();
|
|
3507
3475
|
const vanillaStyle$1 = `
|
|
3508
3476
|
:host{
|
|
3509
3477
|
display: block;
|
|
3510
3478
|
}
|
|
3511
3479
|
`;
|
|
3512
3480
|
function ReferralCardView(props) {
|
|
3513
|
-
return (index.h("div", { part: "sqm-base", class: sheet$
|
|
3481
|
+
return (index.h("div", { part: "sqm-base", class: sheet$3.classes.Container, style: {
|
|
3514
3482
|
border: `${props.hideBorder ? "none" : "1px solid var(--sl-color-neutral-300)"}`,
|
|
3515
3483
|
"padding-top": `var(--sl-spacing-${props.paddingTop})`,
|
|
3516
3484
|
"padding-right": `var(--sl-spacing-${props.paddingRight})`,
|
|
@@ -3521,15 +3489,15 @@ function ReferralCardView(props) {
|
|
|
3521
3489
|
margin: `${props.limitWidth ? "auto" : "none"}`,
|
|
3522
3490
|
} },
|
|
3523
3491
|
index.h("style", { type: "text/css" },
|
|
3524
|
-
styleString$
|
|
3492
|
+
styleString$3,
|
|
3525
3493
|
vanillaStyle$1),
|
|
3526
|
-
props.hasHeader && (index.h("div", { class: sheet$
|
|
3527
|
-
index.h("div", { part: "sqm-column-container", class: sheet$
|
|
3494
|
+
props.hasHeader && (index.h("div", { class: sheet$3.classes.EndContainer }, props.slots.header)),
|
|
3495
|
+
index.h("div", { part: "sqm-column-container", class: sheet$3.classes.ColumnContainer, style: {
|
|
3528
3496
|
alignItems: props.verticalAlignment,
|
|
3529
3497
|
} },
|
|
3530
3498
|
props.slots.left,
|
|
3531
3499
|
props.slots.right),
|
|
3532
|
-
props.hasFooter && (index.h("div", { class: sheet$
|
|
3500
|
+
props.hasFooter && (index.h("div", { class: sheet$3.classes.EndContainer }, props.slots.footer))));
|
|
3533
3501
|
}
|
|
3534
3502
|
|
|
3535
3503
|
const ReferralCard = class {
|
|
@@ -3653,7 +3621,7 @@ const SqmReferralIframe = class {
|
|
|
3653
3621
|
},
|
|
3654
3622
|
]);
|
|
3655
3623
|
if (missingProps) {
|
|
3656
|
-
return (index.h(RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this page", subheading: "A technical problem prevented this iframe from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" }));
|
|
3624
|
+
return (index.h(useLeadFormState.RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this page", subheading: "A technical problem prevented this iframe from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" }));
|
|
3657
3625
|
}
|
|
3658
3626
|
const { states, data } = index_module.isDemo()
|
|
3659
3627
|
? useReferralIframeDemo(utils.getProps(this))
|
|
@@ -5252,7 +5220,7 @@ const Gift = () => (index.h("svg", { width: "24", height: "24", viewBox: "0 0 24
|
|
|
5252
5220
|
const Circle = () => (index.h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
5253
5221
|
index.h("circle", { cx: "12", cy: "12", r: "9", fill: "currentColor", stroke: "currentColor", "stroke-width": "2" })));
|
|
5254
5222
|
|
|
5255
|
-
const style$
|
|
5223
|
+
const style$4 = {
|
|
5256
5224
|
TimelineReward: {
|
|
5257
5225
|
color: "var(--sl-color-neutral-900)",
|
|
5258
5226
|
lineHeight: "var(--sl-line-height-dense)",
|
|
@@ -5295,8 +5263,8 @@ const style$5 = {
|
|
|
5295
5263
|
},
|
|
5296
5264
|
},
|
|
5297
5265
|
};
|
|
5298
|
-
const sheet$
|
|
5299
|
-
const styleString$
|
|
5266
|
+
const sheet$4 = JSS.createStyleSheet(style$4);
|
|
5267
|
+
const styleString$4 = sheet$4.toString();
|
|
5300
5268
|
const vanillaStyle$2 = `
|
|
5301
5269
|
:host{
|
|
5302
5270
|
display: block;
|
|
@@ -5309,9 +5277,9 @@ const vanillaStyle$2 = `
|
|
|
5309
5277
|
function TimelineEntryView(props) {
|
|
5310
5278
|
var _a;
|
|
5311
5279
|
const timeline_icon = (_a = props.icon) !== null && _a !== void 0 ? _a : props.iconState;
|
|
5312
|
-
return (index.h("div", { class: sheet$
|
|
5280
|
+
return (index.h("div", { class: sheet$4.classes.TimelineReward, part: "sqm-base" },
|
|
5313
5281
|
index.h("style", { type: "text/css" },
|
|
5314
|
-
styleString$
|
|
5282
|
+
styleString$4,
|
|
5315
5283
|
vanillaStyle$2),
|
|
5316
5284
|
index.h("div", { class: "container", part: "sqm-entry-container" },
|
|
5317
5285
|
index.h("div", { class: "line" }, "/"),
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-a29c60ef.js');
|
|
4
|
+
const global = require('./global-e31dc4f5.js');
|
|
5
|
+
const JSS = require('./JSS-8503a151.js');
|
|
6
|
+
|
|
7
|
+
const style = {
|
|
8
|
+
ErrorStyle: {
|
|
9
|
+
"--sl-input-border-color": "var(--sl-color-danger-500)",
|
|
10
|
+
"--sl-input-background-color": "var(--sl-color-danger-10)",
|
|
11
|
+
"--sl-input-border-color-focus": "var(--sl-color-danger-500)",
|
|
12
|
+
"--sl-input-border-color-hover": "var(--sl-color-danger-500)",
|
|
13
|
+
},
|
|
14
|
+
ErrorMessageStyle: {
|
|
15
|
+
margin: 0,
|
|
16
|
+
color: "var(--sl-color-danger-500)",
|
|
17
|
+
fontSize: "var(--sl-input-help-text-font-size-medium)",
|
|
18
|
+
},
|
|
19
|
+
FieldContainer: {
|
|
20
|
+
"margin-bottom": "var(--sl-spacing-large)",
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
const vanillaStyle = `
|
|
24
|
+
:host {
|
|
25
|
+
margin: 0 auto;
|
|
26
|
+
width: 100%;
|
|
27
|
+
display: block;
|
|
28
|
+
}
|
|
29
|
+
sl-select::part(label){
|
|
30
|
+
font-size: var(--sl-input-label-font-size-small);
|
|
31
|
+
font-weight: var(--sl-font-weight-semibold);
|
|
32
|
+
}
|
|
33
|
+
`;
|
|
34
|
+
JSS.jss.setup(JSS.create());
|
|
35
|
+
const sheet = JSS.jss.createStyleSheet(style);
|
|
36
|
+
const styleString = sheet.toString();
|
|
37
|
+
function LeadDropdownFieldView(props) {
|
|
38
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
39
|
+
const { states, content } = props;
|
|
40
|
+
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.leadFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
41
|
+
const getRequiredFieldErrorMessage = ({ dropdownLabel, }) => global.intl.formatMessage({
|
|
42
|
+
id: "requiredFieldErrorMessage",
|
|
43
|
+
defaultMessage: content.requiredFieldErrorMessage,
|
|
44
|
+
}, {
|
|
45
|
+
dropdownLabel,
|
|
46
|
+
});
|
|
47
|
+
return (index.h("div", { class: sheet.classes.FieldContainer, part: "sqm-base" },
|
|
48
|
+
index.h("style", { type: "text/css" },
|
|
49
|
+
vanillaStyle,
|
|
50
|
+
styleString),
|
|
51
|
+
index.h("sl-select", Object.assign({ exportparts: "label: input-label, base: input-base", label: content.dropdownLabel, name: `/${content.dropdownName}` }, (!content.dropdownOptional ? { required: true } : []), { disabled: ((_b = states.leadFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.leadFormState) === null || _c === void 0 ? void 0 : _c.disabled), validationError: ({ value }) => {
|
|
52
|
+
if (!value) {
|
|
53
|
+
return getRequiredFieldErrorMessage({
|
|
54
|
+
dropdownLabel: content.dropdownLabel,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
} }, (((_e = (_d = states.leadFormState) === null || _d === void 0 ? void 0 : _d.validationErrors) === null || _e === void 0 ? void 0 : _e.firstName) ? {
|
|
58
|
+
class: sheet.classes.ErrorStyle,
|
|
59
|
+
helpText: ((_g = (_f = states.leadFormState) === null || _f === void 0 ? void 0 : _f.validationErrors) === null || _g === void 0 ? void 0 : _g.firstName) ||
|
|
60
|
+
content.requiredFieldErrorMessage,
|
|
61
|
+
}
|
|
62
|
+
: [])), content.selectOptions),
|
|
63
|
+
(validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) && (index.h("p", { class: sheet.classes.ErrorMessageStyle }, global.intl.formatMessage({
|
|
64
|
+
id: `errorMessage-${content.dropdownName}`,
|
|
65
|
+
defaultMessage: content.requiredFieldErrorMessage,
|
|
66
|
+
})))));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
exports.LeadDropdownFieldView = LeadDropdownFieldView;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-a29c60ef.js');
|
|
6
|
+
const stencilHooks_module = require('./stencil-hooks.module-3a336b0f.js');
|
|
7
|
+
require('./global-e31dc4f5.js');
|
|
8
|
+
const index_module = require('./index.module-ee84433d.js');
|
|
9
|
+
const cjs = require('./cjs-1066ec21.js');
|
|
10
|
+
const utils = require('./utils-6847bc06.js');
|
|
11
|
+
require('./JSS-8503a151.js');
|
|
12
|
+
const useLeadFormState = require('./useLeadFormState-c83d2034.js');
|
|
13
|
+
const sqmLeadDropdownFieldView = require('./sqm-lead-dropdown-field-view-03a3e03f.js');
|
|
14
|
+
|
|
15
|
+
function useLeadDropdownField() {
|
|
16
|
+
const leadFormState = stencilHooks_module.d(useLeadFormState.LEAD_FORM_STATE_CONTEXT);
|
|
17
|
+
return {
|
|
18
|
+
states: {
|
|
19
|
+
leadFormState,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const LeadDropdownField = class {
|
|
25
|
+
constructor(hostRef) {
|
|
26
|
+
index.registerInstance(this, hostRef);
|
|
27
|
+
this.ignored = true;
|
|
28
|
+
/**
|
|
29
|
+
* @uiName Dropdown label
|
|
30
|
+
*/
|
|
31
|
+
this.dropdownLabel = "Select an option";
|
|
32
|
+
/**
|
|
33
|
+
* The message to be displayed when a required field is not filled.
|
|
34
|
+
*
|
|
35
|
+
* @uiName Required field message
|
|
36
|
+
* @uiWidget textArea
|
|
37
|
+
*/
|
|
38
|
+
this.requiredFieldErrorMessage = "Please select a {dropdownLabel}";
|
|
39
|
+
/**
|
|
40
|
+
* @uiName Optional
|
|
41
|
+
* @default
|
|
42
|
+
*/
|
|
43
|
+
this.dropdownOptional = false;
|
|
44
|
+
stencilHooks_module.h$1(this);
|
|
45
|
+
}
|
|
46
|
+
disconnectedCallback() { }
|
|
47
|
+
render() {
|
|
48
|
+
const missingProps = utils.getMissingProps([
|
|
49
|
+
{
|
|
50
|
+
attribute: "dropdown-name",
|
|
51
|
+
value: this.dropdownName,
|
|
52
|
+
},
|
|
53
|
+
]);
|
|
54
|
+
if (!index_module.isDemo() && missingProps) {
|
|
55
|
+
return (index.h(useLeadFormState.RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this form", subheading: "A technical problem prevented this drop down field from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" }, index.h("slot", null)));
|
|
56
|
+
}
|
|
57
|
+
const content = {
|
|
58
|
+
...utils.getProps(this),
|
|
59
|
+
selectOptions: index.h("slot", null),
|
|
60
|
+
};
|
|
61
|
+
const { states } = index_module.isDemo()
|
|
62
|
+
? useLeadDropdownFieldDemo(this)
|
|
63
|
+
: useLeadDropdownField();
|
|
64
|
+
return (index.h(sqmLeadDropdownFieldView.LeadDropdownFieldView, { states: states, content: content }));
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
function useLeadDropdownFieldDemo(props) {
|
|
68
|
+
return cjs.cjs({
|
|
69
|
+
states: {
|
|
70
|
+
leadFormState: {},
|
|
71
|
+
},
|
|
72
|
+
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
exports.sqm_lead_dropdown_field = LeadDropdownField;
|