@saasquatch/mint-components 1.14.6-23 → 1.14.6-25
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-51fa2542.js → ShadowViewAddon-619fee6d.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-big-stat_43.cjs.entry.js +21 -12
- package/dist/cjs/{sqm-lead-input-field-view-4282a4bc.js → sqm-lead-input-field-view-f479309f.js} +1 -1
- package/dist/cjs/sqm-lead-input-field.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -2
- package/dist/collection/components/sqm-lead-form/sqm-lead-dropdown-field-view.js +1 -1
- package/dist/collection/components/sqm-lead-form/sqm-lead-form-view.js +2 -2
- package/dist/collection/components/sqm-lead-form/sqm-lead-form.js +56 -29
- package/dist/collection/components/sqm-lead-form/sqm-lead-input-field-view.js +1 -1
- package/dist/esm/{ShadowViewAddon-26b492b4.js → ShadowViewAddon-56d647fd.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-big-stat_43.entry.js +21 -12
- package/dist/esm/{sqm-lead-input-field-view-83573f5d.js → sqm-lead-input-field-view-2ec63b75.js} +1 -1
- package/dist/esm/sqm-lead-input-field.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +2 -2
- package/dist/esm-es5/{ShadowViewAddon-26b492b4.js → ShadowViewAddon-56d647fd.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_43.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-input-field-view-83573f5d.js → sqm-lead-input-field-view-2ec63b75.js} +1 -1
- package/dist/esm-es5/sqm-lead-input-field.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-c6af33f9.entry.js → p-19374011.entry.js} +9 -9
- package/dist/mint-components/p-22a19728.system.js +1 -0
- package/dist/mint-components/{p-5eba2962.js → p-280c0f3c.js} +1 -1
- package/dist/mint-components/p-33188345.system.entry.js +1 -0
- package/dist/mint-components/p-37996351.system.js +1 -1
- package/dist/mint-components/{p-0fc23547.system.entry.js → p-4369a684.system.entry.js} +1 -1
- package/dist/mint-components/{p-2c0dc5cc.entry.js → p-46e1dc91.entry.js} +1 -1
- package/dist/mint-components/{p-d96346f1.system.entry.js → p-5ed5fc3c.system.entry.js} +1 -1
- package/dist/mint-components/{p-bd7cce14.js → p-8c182b08.js} +1 -1
- package/dist/mint-components/{p-76816aab.system.js → p-c6ea304a.system.js} +1 -1
- package/dist/mint-components/{p-567d7e8d.entry.js → p-d6e65124.entry.js} +1 -1
- package/dist/types/components/sqm-lead-form/sqm-lead-form-view.d.ts +1 -1
- package/dist/types/components/sqm-lead-form/sqm-lead-form.d.ts +18 -9
- package/dist/types/components.d.ts +24 -18
- 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-292284bb.system.js +0 -1
- package/dist/mint-components/p-c197c1b8.system.entry.js +0 -1
- package/shoelace/assets/icons/twitter-x.svg +0 -4
|
@@ -35,43 +35,52 @@ export class LeadForm {
|
|
|
35
35
|
* @uiName Header text
|
|
36
36
|
*/
|
|
37
37
|
this.pageLabel = "Refer your friend";
|
|
38
|
+
/**
|
|
39
|
+
* @uiName Form key
|
|
40
|
+
* Key of the form to connect to. Create and manage forms in the /advocate dashboard under Data > Forms.
|
|
41
|
+
*/
|
|
38
42
|
this.formKey = "lead-form";
|
|
39
43
|
/**
|
|
40
|
-
*
|
|
44
|
+
* @uiName Support link text
|
|
45
|
+
* Optional support link text for error messages.
|
|
41
46
|
*/
|
|
42
|
-
this.
|
|
47
|
+
this.supportLinkText = "Support";
|
|
43
48
|
/**
|
|
44
|
-
*
|
|
49
|
+
* @uiName Submit success header
|
|
50
|
+
* Header text shown on successful lead submission.
|
|
45
51
|
*/
|
|
46
|
-
this.submitSuccessHeader = "
|
|
52
|
+
this.submitSuccessHeader = "Lead submitted";
|
|
47
53
|
/**
|
|
48
|
-
*
|
|
54
|
+
* @uiName Submit success description
|
|
55
|
+
* Description text shown on successful lead submission.
|
|
49
56
|
*/
|
|
50
57
|
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.";
|
|
51
58
|
/**
|
|
52
|
-
*
|
|
59
|
+
* @uiName Submit error header
|
|
60
|
+
* Header text shown if an error occurs.
|
|
53
61
|
*/
|
|
54
62
|
this.submitErrorHeader = "An error occurred while submitting";
|
|
55
63
|
/**
|
|
56
|
-
*
|
|
64
|
+
* @uiName Submit error description
|
|
65
|
+
* Description text shown if an error occurs.
|
|
57
66
|
*/
|
|
58
67
|
this.submitErrorDescription = "Please try again later. If the problem continues, contact {supportLink}";
|
|
59
68
|
/**
|
|
60
|
-
* The message to be displayed
|
|
69
|
+
* The message to be displayed if a required field is not filled.
|
|
61
70
|
*
|
|
62
71
|
* @uiName Required field message
|
|
63
72
|
* @uiWidget textArea
|
|
64
73
|
*/
|
|
65
74
|
this.requiredFieldErrorMessage = "Please enter a valid {fieldLabel}";
|
|
66
75
|
/**
|
|
67
|
-
* The message to be displayed
|
|
76
|
+
* The message to be displayed if a the form submission fails unexpectedly.
|
|
68
77
|
*
|
|
69
78
|
* @uiName Network error message
|
|
70
79
|
* @uiWidget textArea
|
|
71
80
|
*/
|
|
72
81
|
this.networkErrorMessage = "Network request failed.";
|
|
73
82
|
/**
|
|
74
|
-
* The message to be displayed
|
|
83
|
+
* The message to be displayed if the email used is invalid.
|
|
75
84
|
*
|
|
76
85
|
* @uiName Invalid email message
|
|
77
86
|
* @uiWidget textArea
|
|
@@ -90,7 +99,7 @@ export class LeadForm {
|
|
|
90
99
|
submitLabel: this.submitLabel,
|
|
91
100
|
resubmitFormLabel: this.resubmitFormLabel,
|
|
92
101
|
pageLabel: this.pageLabel,
|
|
93
|
-
|
|
102
|
+
supportLinkText: this.supportLinkText,
|
|
94
103
|
submitSuccessHeader: this.submitSuccessHeader,
|
|
95
104
|
submitSuccessDescription: this.submitSuccessDescription,
|
|
96
105
|
submitErrorHeader: this.submitErrorHeader,
|
|
@@ -242,14 +251,17 @@ export class LeadForm {
|
|
|
242
251
|
"required": false,
|
|
243
252
|
"optional": false,
|
|
244
253
|
"docs": {
|
|
245
|
-
"tags": [
|
|
254
|
+
"tags": [{
|
|
255
|
+
"text": "Form key\nKey of the form to connect to. Create and manage forms in the /advocate dashboard under Data > Forms.",
|
|
256
|
+
"name": "uiName"
|
|
257
|
+
}],
|
|
246
258
|
"text": ""
|
|
247
259
|
},
|
|
248
260
|
"attribute": "form-key",
|
|
249
261
|
"reflect": false,
|
|
250
262
|
"defaultValue": "\"lead-form\""
|
|
251
263
|
},
|
|
252
|
-
"
|
|
264
|
+
"supportLinkText": {
|
|
253
265
|
"type": "string",
|
|
254
266
|
"mutable": false,
|
|
255
267
|
"complexType": {
|
|
@@ -260,10 +272,13 @@ export class LeadForm {
|
|
|
260
272
|
"required": false,
|
|
261
273
|
"optional": false,
|
|
262
274
|
"docs": {
|
|
263
|
-
"tags": [
|
|
264
|
-
|
|
275
|
+
"tags": [{
|
|
276
|
+
"text": "Support link text\nOptional support link text for error messages.",
|
|
277
|
+
"name": "uiName"
|
|
278
|
+
}],
|
|
279
|
+
"text": ""
|
|
265
280
|
},
|
|
266
|
-
"attribute": "support-link",
|
|
281
|
+
"attribute": "support-link-text",
|
|
267
282
|
"reflect": false,
|
|
268
283
|
"defaultValue": "\"Support\""
|
|
269
284
|
},
|
|
@@ -278,12 +293,15 @@ export class LeadForm {
|
|
|
278
293
|
"required": false,
|
|
279
294
|
"optional": false,
|
|
280
295
|
"docs": {
|
|
281
|
-
"tags": [
|
|
282
|
-
|
|
296
|
+
"tags": [{
|
|
297
|
+
"text": "Submit success header\nHeader text shown on successful lead submission.",
|
|
298
|
+
"name": "uiName"
|
|
299
|
+
}],
|
|
300
|
+
"text": ""
|
|
283
301
|
},
|
|
284
302
|
"attribute": "submit-success-header",
|
|
285
303
|
"reflect": false,
|
|
286
|
-
"defaultValue": "\"
|
|
304
|
+
"defaultValue": "\"Lead submitted\""
|
|
287
305
|
},
|
|
288
306
|
"submitSuccessDescription": {
|
|
289
307
|
"type": "string",
|
|
@@ -296,8 +314,11 @@ export class LeadForm {
|
|
|
296
314
|
"required": false,
|
|
297
315
|
"optional": false,
|
|
298
316
|
"docs": {
|
|
299
|
-
"tags": [
|
|
300
|
-
|
|
317
|
+
"tags": [{
|
|
318
|
+
"text": "Submit success description\nDescription text shown on successful lead submission.",
|
|
319
|
+
"name": "uiName"
|
|
320
|
+
}],
|
|
321
|
+
"text": ""
|
|
301
322
|
},
|
|
302
323
|
"attribute": "submit-success-description",
|
|
303
324
|
"reflect": false,
|
|
@@ -314,8 +335,11 @@ export class LeadForm {
|
|
|
314
335
|
"required": false,
|
|
315
336
|
"optional": false,
|
|
316
337
|
"docs": {
|
|
317
|
-
"tags": [
|
|
318
|
-
|
|
338
|
+
"tags": [{
|
|
339
|
+
"text": "Submit error header\nHeader text shown if an error occurs.",
|
|
340
|
+
"name": "uiName"
|
|
341
|
+
}],
|
|
342
|
+
"text": ""
|
|
319
343
|
},
|
|
320
344
|
"attribute": "submit-error-header",
|
|
321
345
|
"reflect": false,
|
|
@@ -332,8 +356,11 @@ export class LeadForm {
|
|
|
332
356
|
"required": false,
|
|
333
357
|
"optional": false,
|
|
334
358
|
"docs": {
|
|
335
|
-
"tags": [
|
|
336
|
-
|
|
359
|
+
"tags": [{
|
|
360
|
+
"text": "Submit error description\nDescription text shown if an error occurs.",
|
|
361
|
+
"name": "uiName"
|
|
362
|
+
}],
|
|
363
|
+
"text": ""
|
|
337
364
|
},
|
|
338
365
|
"attribute": "submit-error-description",
|
|
339
366
|
"reflect": false,
|
|
@@ -357,7 +384,7 @@ export class LeadForm {
|
|
|
357
384
|
"text": "textArea",
|
|
358
385
|
"name": "uiWidget"
|
|
359
386
|
}],
|
|
360
|
-
"text": "The message to be displayed
|
|
387
|
+
"text": "The message to be displayed if a required field is not filled."
|
|
361
388
|
},
|
|
362
389
|
"attribute": "required-field-error-message",
|
|
363
390
|
"reflect": false,
|
|
@@ -381,7 +408,7 @@ export class LeadForm {
|
|
|
381
408
|
"text": "textArea",
|
|
382
409
|
"name": "uiWidget"
|
|
383
410
|
}],
|
|
384
|
-
"text": "The message to be displayed
|
|
411
|
+
"text": "The message to be displayed if a the form submission fails unexpectedly."
|
|
385
412
|
},
|
|
386
413
|
"attribute": "network-error-message",
|
|
387
414
|
"reflect": false,
|
|
@@ -405,7 +432,7 @@ export class LeadForm {
|
|
|
405
432
|
"text": "textArea",
|
|
406
433
|
"name": "uiWidget"
|
|
407
434
|
}],
|
|
408
|
-
"text": "The message to be displayed
|
|
435
|
+
"text": "The message to be displayed if the email used is invalid."
|
|
409
436
|
},
|
|
410
437
|
"attribute": "invalid-email-error-message",
|
|
411
438
|
"reflect": false,
|
|
@@ -416,7 +443,7 @@ export class LeadForm {
|
|
|
416
443
|
"mutable": false,
|
|
417
444
|
"complexType": {
|
|
418
445
|
"original": "DemoData<LeadFormViewProps>",
|
|
419
|
-
"resolved": "{ states?: { error: string; success: boolean; loading: boolean; leadFormState: LeadFormState; referralCode: string; }; refs?: { formRef: any; }; content?: { formData?: VNode; emailLabel?: string; firstNameLabel?: string; lastNameLabel?: string; submitLabel?: string; resubmitFormLabel?: string; pageLabel?: string;
|
|
446
|
+
"resolved": "{ states?: { error: string; success: boolean; loading: boolean; leadFormState: LeadFormState; referralCode: string; }; refs?: { formRef: any; }; content?: { formData?: VNode; emailLabel?: string; firstNameLabel?: string; lastNameLabel?: string; submitLabel?: string; resubmitFormLabel?: string; pageLabel?: string; supportLinkText?: string; submitSuccessHeader?: string; submitSuccessDescription?: string; submitErrorHeader?: string; submitErrorDescription?: string; requiredFieldErrorMessage: string; invalidEmailErrorMessage: string; }; }",
|
|
420
447
|
"references": {
|
|
421
448
|
"DemoData": {
|
|
422
449
|
"location": "import",
|
|
@@ -33,7 +33,7 @@ export function LeadInputFieldView(props) {
|
|
|
33
33
|
vanillaStyle,
|
|
34
34
|
styleString),
|
|
35
35
|
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.fieldName}`, type: content.fieldType, label: content.fieldLabel }, (!content.fieldOptional ? { required: true } : []), { disabled: ((_a = states.leadFormState) === null || _a === void 0 ? void 0 : _a.loading) || ((_b = states.leadFormState) === null || _b === void 0 ? void 0 : _b.disabled), validationError: ({ value }) => {
|
|
36
|
-
if (!value) {
|
|
36
|
+
if (!value && !content.fieldOptional) {
|
|
37
37
|
return getRequiredFieldErrorMessage({
|
|
38
38
|
fieldLabel: content.fieldLabel,
|
|
39
39
|
});
|
|
@@ -4137,7 +4137,7 @@ function LeadFormView(props) {
|
|
|
4137
4137
|
id: "submitErrorDescription",
|
|
4138
4138
|
defaultMessage: content.submitErrorDescription,
|
|
4139
4139
|
}, {
|
|
4140
|
-
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, content.
|
|
4140
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, content.supportLinkText)),
|
|
4141
4141
|
}))),
|
|
4142
4142
|
h("div", { class: sheet$d.classes.NameFieldWrapper },
|
|
4143
4143
|
h("sqm-lead-input-field", { class: sheet$d.classes.NameInput, "field-label": content.firstNameLabel || "First Name", "field-name": "firstName" }),
|
|
@@ -4210,7 +4210,7 @@ function LeadDropdownFieldView(props) {
|
|
|
4210
4210
|
vanillaStyle$9,
|
|
4211
4211
|
styleString$e),
|
|
4212
4212
|
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 }) => {
|
|
4213
|
-
if (!value) {
|
|
4213
|
+
if (!value && !content.dropdownOptional) {
|
|
4214
4214
|
return getRequiredFieldErrorMessage({
|
|
4215
4215
|
dropdownLabel: content.dropdownLabel,
|
|
4216
4216
|
});
|