bhl-forms 0.0.16 → 0.0.19
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/bhl-forms.es.js +20 -2
- package/dist/bhl-forms.iife.js +3 -3
- package/dist/bhl-forms.umd.js +3 -3
- package/dist/main.css +1 -1
- package/package.json +3 -3
package/dist/bhl-forms.es.js
CHANGED
|
@@ -10638,6 +10638,15 @@ function dbg() {
|
|
|
10638
10638
|
return;
|
|
10639
10639
|
console.debug(...arguments);
|
|
10640
10640
|
}
|
|
10641
|
+
function rollbar(type, msg) {
|
|
10642
|
+
if (window.Rollbar) {
|
|
10643
|
+
try {
|
|
10644
|
+
window.Rollbar[type](msg);
|
|
10645
|
+
} catch (err) {
|
|
10646
|
+
console.warn("error calling rollbar:", err);
|
|
10647
|
+
}
|
|
10648
|
+
}
|
|
10649
|
+
}
|
|
10641
10650
|
function chooseVariant(exp) {
|
|
10642
10651
|
let variant = null, active = {}, fromCache = false;
|
|
10643
10652
|
active = C(EXPERIMENT_KEY) || {};
|
|
@@ -10689,10 +10698,17 @@ function prepData(formData) {
|
|
|
10689
10698
|
};
|
|
10690
10699
|
return data;
|
|
10691
10700
|
}
|
|
10701
|
+
const isMobile = window.matchMedia("only screen and (max-width: 480px)").matches;
|
|
10692
10702
|
const fireStepEvent = (formNode) => (stepResult, stepHistory2, stepQueue2) => {
|
|
10693
10703
|
if (!stepResult) {
|
|
10694
10704
|
return;
|
|
10695
10705
|
}
|
|
10706
|
+
if (formNode.id) {
|
|
10707
|
+
const form2 = document.getElementById(formNode.id);
|
|
10708
|
+
const toTop = isMobile ? true : false;
|
|
10709
|
+
if (form2)
|
|
10710
|
+
form2.scrollIntoView(toTop);
|
|
10711
|
+
}
|
|
10696
10712
|
const form_id = formNode.attrs.formId || window.location.hostname + "-" + formNode.id;
|
|
10697
10713
|
if (typeof window._analytics !== "undefined") {
|
|
10698
10714
|
try {
|
|
@@ -10707,7 +10723,9 @@ const fireStepEvent = (formNode) => (stepResult, stepHistory2, stepQueue2) => {
|
|
|
10707
10723
|
}
|
|
10708
10724
|
});
|
|
10709
10725
|
} catch (err) {
|
|
10710
|
-
|
|
10726
|
+
const msg = "failed to fire step event: " + err.toString();
|
|
10727
|
+
console.warn(msg);
|
|
10728
|
+
rollbar("warning", msg);
|
|
10711
10729
|
}
|
|
10712
10730
|
}
|
|
10713
10731
|
};
|
|
@@ -10734,7 +10752,7 @@ const boxClassification = {
|
|
|
10734
10752
|
};
|
|
10735
10753
|
const buttonClassification = {
|
|
10736
10754
|
wrapper: "t-mb-1",
|
|
10737
|
-
input: "t-bg-red-500 hover:t-bg-
|
|
10755
|
+
input: "t-bg-red-500 hover:t-bg-red-600 t-text-white t-text-lg t-font-normal t-py-4 t-px-7 sm:t-px-10 t-rounded",
|
|
10738
10756
|
outer: "t-mb-0"
|
|
10739
10757
|
};
|
|
10740
10758
|
var theme = {
|