@visitscotland/component-library 5.1.0 → 5.1.1
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/client/manifest.json +2 -2
- package/dist/client/scripts/0b527189990321607b75.js +1 -0
- package/dist/components/components/form/Form.vue.d.ts +38 -17
- package/dist/components/vs-component-library.js +1 -1
- package/dist/components/vs-component-library.mjs +17 -5
- package/dist/ssr/index.js +1 -1
- package/dist/ssr/manifest.json +1 -1
- package/package.json +1 -1
- package/dist/client/scripts/e1d08375d60e1ad4b8ad.js +0 -1
- /package/dist/client/styles/{e1d08375d60e1ad4b8ad.css → 0b527189990321607b75.css} +0 -0
- /package/dist/ssr/styles/{d18d1d1542152349aa2a.css → 430493a130f3478012ad.css} +0 -0
|
@@ -24896,6 +24896,18 @@ const VsTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_ren
|
|
|
24896
24896
|
type: Boolean,
|
|
24897
24897
|
default: !0
|
|
24898
24898
|
},
|
|
24899
|
+
/**
|
|
24900
|
+
* For non-marketo forms this dictates which data processing layer the form uses - 'breg',
|
|
24901
|
+
* 'fepl', or 'dp'. This adjusts certain behaviour, for example the `exponea.identify()`
|
|
24902
|
+
* tracking is only desirable for breg forms.
|
|
24903
|
+
*
|
|
24904
|
+
* Defaults to breg as it is by far the most common form type, and from within the
|
|
24905
|
+
* freemarker sites we don't currently have access to the information to distinguish them.
|
|
24906
|
+
*/
|
|
24907
|
+
submissionType: {
|
|
24908
|
+
type: String,
|
|
24909
|
+
default: "breg"
|
|
24910
|
+
},
|
|
24899
24911
|
/**
|
|
24900
24912
|
* The target url for the form, if not marketo
|
|
24901
24913
|
*/
|
|
@@ -25219,7 +25231,7 @@ const VsTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_ren
|
|
|
25219
25231
|
e.addHiddenFields(this.form), window.grecaptcha && e.addHiddenFields({
|
|
25220
25232
|
lastReCAPTCHAUserFingerprint: window.grecaptcha.getResponse(),
|
|
25221
25233
|
lastRecaptchaEnabledFormID: this.formId
|
|
25222
|
-
}), e.onSuccess(() => (this.submitting = !1, this.submitted = !0,
|
|
25234
|
+
}), e.onSuccess(() => (this.submitting = !1, this.submitted = !0, !1)), e.onSubmit(() => {
|
|
25223
25235
|
this.submitting = !0;
|
|
25224
25236
|
}), e.submit();
|
|
25225
25237
|
},
|
|
@@ -25242,11 +25254,11 @@ const VsTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_ren
|
|
|
25242
25254
|
).then(() => (this.submitting = !1, this.submitted = !0, this.attachEmail(), !1)).catch(() => (this.submitError = !0, !1));
|
|
25243
25255
|
},
|
|
25244
25256
|
/**
|
|
25245
|
-
* If exponea is present in the window (via gtm with accepted cookies),
|
|
25246
|
-
* current user to the record associated with their email address
|
|
25257
|
+
* If exponea is present in the window (via gtm with accepted cookies), and the form uses
|
|
25258
|
+
* BREG, attach the current user to the record associated with their email address
|
|
25247
25259
|
*/
|
|
25248
25260
|
attachEmail() {
|
|
25249
|
-
this.formData.fields.forEach((e) => {
|
|
25261
|
+
this.submissionType && this.submissionType === "breg" && (this.formData.fields.forEach((e) => {
|
|
25250
25262
|
e.type === "email" && !this.emailFieldName && (this.emailFieldName = e.name);
|
|
25251
25263
|
}), this.emailFieldName && typeof exponea < "u" && exponea.identify(
|
|
25252
25264
|
{
|
|
@@ -25258,7 +25270,7 @@ const VsTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_ren
|
|
|
25258
25270
|
() => {
|
|
25259
25271
|
},
|
|
25260
25272
|
!0
|
|
25261
|
-
);
|
|
25273
|
+
));
|
|
25262
25274
|
},
|
|
25263
25275
|
/**
|
|
25264
25276
|
* Checks recaptcha response from the server
|