bhl-forms 0.13.0 → 0.13.2
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 +35 -35
- package/dist/bhl-forms.iife.js +4 -4
- package/dist/bhl-forms.modern.es.js +524 -522
- package/dist/bhl-forms.modern.iife.js +7 -7
- package/dist/bhl-forms.modern.umd.js +7 -7
- package/dist/bhl-forms.umd.js +4 -4
- package/dist/forms/applianceRepair.es.js +6 -6
- package/dist/forms/applianceRepair.iife.js +1 -1
- package/dist/forms/applianceRepairMinimal.es.js +6 -6
- package/dist/forms/applianceRepairMinimal.iife.js +1 -1
- package/dist/forms/applianceRepairMinimal.json +1 -1
- package/dist/forms/electrical.es.js +49 -291
- package/dist/forms/electrical.iife.js +1 -1
- package/dist/forms/electrical.json +1 -1
- package/dist/forms/generalContractors.es.js +6 -6
- package/dist/forms/generalContractors.iife.js +1 -1
- package/dist/forms/generalContractors.json +1 -1
- package/dist/forms/generalHomeImprovement.es.js +6 -6
- package/dist/forms/generalHomeImprovement.iife.js +1 -1
- package/dist/forms/generalHomeImprovement.json +1 -1
- package/dist/forms/generalHomeImprovementThankYou.es.js +6 -6
- package/dist/forms/generalHomeImprovementThankYou.iife.js +1 -1
- package/dist/forms/generalHomeImprovementThankYou.json +1 -1
- package/dist/forms/painting.es.js +6 -6
- package/dist/forms/painting.iife.js +1 -1
- package/dist/forms/painting.json +1 -1
- package/dist/forms/plumbing.es.js +50 -291
- package/dist/forms/plumbing.iife.js +1 -1
- package/dist/forms/plumbing.json +1 -1
- package/dist/forms/remodeling.es.js +6 -6
- package/dist/forms/remodeling.iife.js +1 -1
- package/dist/forms/remodeling.json +1 -1
- package/dist/forms/restoration.es.js +1553 -0
- package/dist/forms/restoration.iife.js +1 -0
- package/dist/forms/restoration.json +1 -0
- package/dist/forms/restorationCall.es.js +6 -6
- package/dist/forms/restorationCall.iife.js +1 -1
- package/dist/forms/restorationCall.json +1 -1
- package/dist/forms/roofing.es.js +49 -286
- package/dist/forms/roofing.iife.js +1 -1
- package/dist/forms/roofing.json +1 -1
- package/dist/forms/windows.es.js +6 -6
- package/dist/forms/windows.iife.js +1 -1
- package/dist/forms/windows.json +1 -1
- package/dist/main.css +1 -1
- package/package.json +1 -1
package/dist/bhl-forms.es.js
CHANGED
|
@@ -12609,63 +12609,63 @@ const ul = () => {
|
|
|
12609
12609
|
if (Ee("Mounting form:", r), r.schema && r.experiment)
|
|
12610
12610
|
throw Error("Only one of schema and experiment allowed");
|
|
12611
12611
|
const n = r.data || {};
|
|
12612
|
-
n.submitUrl = n.submitUrl || yc, n.prepData = n.prepData || tg, n.preStepFunc = n.preStepFunc || lg, n.prevStepFunc = n.prevStepFunc || og, n.fireStepEvent = n.fireStepEvent || ug, n.handleRedirect = n.handleRedirect || tc, n.scrollAnchor = n.scrollAnchor || Cs, n.hideFormShowOther = (
|
|
12613
|
-
if (
|
|
12614
|
-
if (!(
|
|
12612
|
+
n.submitUrl = n.submitUrl || yc, n.prepData = n.prepData || tg, n.preStepFunc = n.preStepFunc || lg, n.prevStepFunc = n.prevStepFunc || og, n.fireStepEvent = n.fireStepEvent || ug, n.handleRedirect = n.handleRedirect || tc, n.scrollAnchor = n.scrollAnchor || Cs, n.hideFormShowOther = (l = null) => (u, c) => Ie(this, null, function* () {
|
|
12613
|
+
if (l && l != "null") {
|
|
12614
|
+
if (!(l instanceof Function))
|
|
12615
12615
|
throw "prepData must be a function";
|
|
12616
|
-
|
|
12617
|
-
const
|
|
12618
|
-
Object.entries(
|
|
12619
|
-
([
|
|
12616
|
+
u = l(u, c);
|
|
12617
|
+
const p = Object.fromEntries(
|
|
12618
|
+
Object.entries(u.properties || {}).filter(
|
|
12619
|
+
([y]) => !["vid", "Domain_Abbrev", "form_id"].includes(y)
|
|
12620
12620
|
)
|
|
12621
12621
|
);
|
|
12622
|
-
window.zarPoolDataLayer = window.zarPoolDataLayer || [], window.zarPoolDataLayer.push(
|
|
12622
|
+
window.zarPoolDataLayer = window.zarPoolDataLayer || [], window.zarPoolDataLayer.push(p);
|
|
12623
12623
|
}
|
|
12624
|
-
const
|
|
12625
|
-
!
|
|
12626
|
-
}), n.getVal = (
|
|
12627
|
-
if (
|
|
12624
|
+
const f = window.bhlFormsHideElemId || "form", b = window.bhlFormsShowElemId || "phone-number", v = document.getElementById(f), T = document.getElementById(b);
|
|
12625
|
+
!v || !T || (v.style.display = "none", T.style.display = "block");
|
|
12626
|
+
}), n.getVal = (l, u) => !l || !u ? void 0 : sn(l.value)[u], n.onEnter = (l) => (u) => {
|
|
12627
|
+
if (u.key === "Enter" || u.keyCode === 13)
|
|
12628
12628
|
try {
|
|
12629
|
-
|
|
12630
|
-
} catch (
|
|
12631
|
-
const
|
|
12632
|
-
console.warn(
|
|
12629
|
+
l(), u.preventDefault();
|
|
12630
|
+
} catch (c) {
|
|
12631
|
+
const f = "onEnter failed: " + c.toString();
|
|
12632
|
+
console.warn(f), tt("warning", f);
|
|
12633
12633
|
}
|
|
12634
|
-
}, n.onInput = (
|
|
12635
|
-
const
|
|
12636
|
-
if (!
|
|
12637
|
-
console.warn("onInput: no element found for id:",
|
|
12634
|
+
}, n.onInput = (l) => (u, c) => Ie(this, null, function* () {
|
|
12635
|
+
const f = document.getElementById(c.props.id);
|
|
12636
|
+
if (!f) {
|
|
12637
|
+
console.warn("onInput: no element found for id:", c.props.id);
|
|
12638
12638
|
return;
|
|
12639
12639
|
}
|
|
12640
|
-
if (!(
|
|
12640
|
+
if (!(f && f.offsetParent === null))
|
|
12641
12641
|
try {
|
|
12642
|
-
yield new Promise((
|
|
12643
|
-
} catch (
|
|
12644
|
-
const
|
|
12645
|
-
console.warn(
|
|
12642
|
+
yield new Promise((b) => setTimeout(b, 50)), l();
|
|
12643
|
+
} catch (b) {
|
|
12644
|
+
const v = "onInput failed: " + b.toString();
|
|
12645
|
+
console.warn(v), tt("warning", v);
|
|
12646
12646
|
}
|
|
12647
|
-
}), n.getCrossSellOptions = function(
|
|
12648
|
-
const
|
|
12649
|
-
return
|
|
12650
|
-
}, n.buildData = function(
|
|
12651
|
-
return $u([{ type: "meta", data:
|
|
12647
|
+
}), n.getCrossSellOptions = function(l, u) {
|
|
12648
|
+
const c = l.attrs.crossSellOptionMap, f = c[u];
|
|
12649
|
+
return f || c["*"];
|
|
12650
|
+
}, n.buildData = function(l) {
|
|
12651
|
+
return $u([{ type: "meta", data: l }], n);
|
|
12652
12652
|
};
|
|
12653
12653
|
let i;
|
|
12654
12654
|
if (r.schema)
|
|
12655
12655
|
i = r.schema;
|
|
12656
12656
|
else if (r.experiment) {
|
|
12657
|
-
const
|
|
12658
|
-
i =
|
|
12657
|
+
const l = Gv(r.experiment);
|
|
12658
|
+
i = l.variant.schema, r.experimentCallback && (Ee("form.experimentCallback", r.experimentCallback), r.experimentCallback === !0 ? cg(r, l.variant, l.fromCache) : r.experimentCallback(r, l.variant, l.fromCache));
|
|
12659
12659
|
}
|
|
12660
12660
|
let a = i;
|
|
12661
|
-
i instanceof Function ? a = i(n) : typeof i == "string" && (a = yield Zv(i));
|
|
12662
|
-
const
|
|
12661
|
+
i instanceof Function ? a = i(n) : typeof i == "string" && (a = yield Zv(i)), document.querySelector("#" + r.target).classList.add("bhl-form");
|
|
12662
|
+
const o = Zd(Qh, { schema: a, data: n }).use(cv, {
|
|
12663
12663
|
config: {
|
|
12664
12664
|
classes: e
|
|
12665
12665
|
},
|
|
12666
12666
|
plugins: M0()
|
|
12667
12667
|
});
|
|
12668
|
-
|
|
12668
|
+
o.mount("#" + r.target), ll[r.target] = o;
|
|
12669
12669
|
});
|
|
12670
12670
|
}), Ee("Apps:", ll);
|
|
12671
12671
|
}, mn = window.bhlFormsInitStrategy || "immediate";
|