@getcredify/credify-insurance-widget 1.42.0 → 1.43.0
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/README.md +18 -0
- package/dist/{address-BEVwov8q-C8G87tij.js → address-BEVwov8q-Cgvd-ydq.js} +1 -1
- package/dist/{api-C7f0dnt7.js → api-BGeBevot.js} +15 -15
- package/dist/{car-B0hJrE0Z.js → car-BQXTRajZ.js} +1 -1
- package/dist/{check-Dfh9u4c0.js → check-04Hiu_0S.js} +1 -1
- package/dist/{copy-applicant-offer-B-BIN2o5-BX-QE7Ao.js → copy-applicant-offer-CqzfNhkJ-CXzGxES4.js} +3 -3
- package/dist/{copy-from-record-BNP6CFFR-Bcb9EW-a.js → copy-from-record-BNP6CFFR-Ea4bf4lq.js} +8 -8
- package/dist/{core-Po4qPIof-fZL0sXdW.js → core-CrEw_I-E-B6agkb7g.js} +1 -1
- package/dist/{coverageDerivation-CV2ORogj-CAthw76f.js → coverageDerivation-CV2ORogj-B42UJhMa.js} +1 -1
- package/dist/{fixtures-ijbZ16Zg-Csnryzo8.js → fixtures-ijbZ16Zg-Bmt9N4zO.js} +1 -1
- package/dist/{household-prefill-DVLBBva1-GGgzEdDL.js → household-prefill-CmtB9R3R-DaQcDYh7.js} +8 -8
- package/dist/{householdPrefill-DLm3pxFH-B34UGBGP.js → householdPrefill-DLm3pxFH-CqqJoa0N.js} +1 -1
- package/dist/iframe/assets/{address-BEVwov8q-BpbNiia-.js → address-BEVwov8q-Bqt4jr_e.js} +1 -1
- package/dist/iframe/assets/{car-DkfXVYz0.js → car-B0PQzDYj.js} +1 -1
- package/dist/iframe/assets/{check-l6TGSrXO.js → check-bC0Zibyh.js} +1 -1
- package/dist/iframe/assets/{copy-applicant-offer-B-BIN2o5-cs-SCWuH.js → copy-applicant-offer-CqzfNhkJ-D6mTQGjz.js} +1 -1
- package/dist/iframe/assets/{copy-from-record-BNP6CFFR-BtCRUQRw.js → copy-from-record-BNP6CFFR-D3zdAXXN.js} +1 -1
- package/dist/iframe/assets/{core-Po4qPIof-jDmdAxP7.js → core-CrEw_I-E-ecektrnv.js} +1 -1
- package/dist/iframe/assets/{coverageDerivation-CV2ORogj-DhQFAhwv.js → coverageDerivation-CV2ORogj-CA4KQiLs.js} +1 -1
- package/dist/iframe/assets/{dob-calendar-RIJ5S6YU-DO_r0-z3.js → dob-calendar-RIJ5S6YU-1oIu3-0M.js} +1 -1
- package/dist/iframe/assets/{fixtures-ijbZ16Zg-CUQxYANz.js → fixtures-ijbZ16Zg-Dif2LDkg.js} +1 -1
- package/dist/iframe/assets/{household-prefill-DVLBBva1-DTK1EHT0.js → household-prefill-CmtB9R3R-CrgN1qav.js} +1 -1
- package/dist/iframe/assets/{householdPrefill-DLm3pxFH-BM54Rqyd.js → householdPrefill-DLm3pxFH-B3K_XX2k.js} +1 -1
- package/dist/iframe/assets/iframe-BsUmazO0.js +107 -0
- package/dist/iframe/assets/{index-CNb9AhPB.js → index-BipROEB3.js} +2 -2
- package/dist/iframe/assets/{intake-review-panel-B7rXvRvm-wNGntinn.js → intake-review-panel-D27t8CZO-UOfbb2gR.js} +1 -1
- package/dist/iframe/assets/{mockJump-DpXrnQUq-DKyp2H5R.js → mockJump-hNzgzUmO-Dd1MY0fT.js} +1 -1
- package/dist/iframe/assets/payload-DrGFAxms-DeQGFkZt.js +1 -0
- package/dist/iframe/assets/{question-list-ChcBzofd-D5ZVofFR.js → question-list-DFjWa8ZA--GTrxgeK.js} +3 -3
- package/dist/iframe/assets/{rates-panel-BaIzEqX6-GSsykLkc.js → rates-panel-BSFiWEZX-Bw7hcmIi.js} +3 -3
- package/dist/iframe/assets/{review-panel-DYCuhwdo-CyBebe6T.js → review-panel-C_WxX33U-BxLq8fbL.js} +2 -2
- package/dist/iframe/assets/{stage-Bpq1A5xB-CwZgWOhp.js → stage-knShj71W-BctzWtx2.js} +1 -1
- package/dist/iframe/assets/{validation-DRqHT-u7-pY2KjHw4.js → validation-D42QXxck-CI1J_zUB.js} +1 -1
- package/dist/iframe/assets/{vehicleCoverage-BPJaWQyg-DBJ_jL3e.js → vehicleCoverage-CBWORI1l-D_NVJvjm.js} +1 -1
- package/dist/iframe/assets/{visibility-hEdBjgi7-_AUGO8E2.js → visibility-CKRGC3Il-CzwGG4Rt.js} +1 -1
- package/dist/iframe/iframe.html +1 -1
- package/dist/{index-CQXR1Un8.js → index-C9szcdxC.js} +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +103 -103
- package/dist/{intake-review-panel-B7rXvRvm-CDyR-rVg.js → intake-review-panel-D27t8CZO-BprNqAxn.js} +11 -11
- package/dist/{mockJump-DpXrnQUq-BaitU9aZ.js → mockJump-hNzgzUmO-DdKPcdjz.js} +1 -1
- package/dist/{payload-JXpCaeS6-pjITtvlm.js → payload-DrGFAxms-4aJBixaL.js} +4 -4
- package/dist/{question-list-ChcBzofd-fVRN9fTl.js → question-list-DFjWa8ZA-DqUPEU4a.js} +13 -13
- package/dist/{rates-panel-BaIzEqX6-BULjKxqz.js → rates-panel-BSFiWEZX-poz1p0rK.js} +36 -36
- package/dist/{review-panel-DYCuhwdo-BImR4S06.js → review-panel-C_WxX33U-DAqsW53a.js} +16 -16
- package/dist/{stage-Bpq1A5xB-Cphc07aC.js → stage-knShj71W-DkbEgye4.js} +15 -15
- package/dist/utils/prefill.d.ts +18 -0
- package/dist/{validation-DRqHT-u7-CL2m7f4k.js → validation-D42QXxck-6HA5X_Ql.js} +1 -1
- package/dist/{vehicleCoverage-BPJaWQyg-g7bBFmro.js → vehicleCoverage-CBWORI1l-Cy7XD_03.js} +3 -3
- package/dist/{visibility-hEdBjgi7-WW4BVjmf.js → visibility-CKRGC3Il-v2xplFmb.js} +1 -1
- package/dist/{widget-BUAzkBEK.js → widget-wgT55Lu5.js} +2817 -2769
- package/package.json +2 -2
- package/dist/iframe/assets/iframe-BImWklE9.js +0 -107
- package/dist/iframe/assets/payload-JXpCaeS6-CcfrGvLo.js +0 -1
package/README.md
CHANGED
|
@@ -429,6 +429,24 @@ configureApi({
|
|
|
429
429
|
});
|
|
430
430
|
```
|
|
431
431
|
|
|
432
|
+
## Skipping questions you have already asked
|
|
433
|
+
|
|
434
|
+
If your page collects a ZIP or an email of its own, hand them over and the flow
|
|
435
|
+
starts on the first question the visitor has not seen:
|
|
436
|
+
|
|
437
|
+
```js
|
|
438
|
+
CredifyInsuranceWidget.init({
|
|
439
|
+
partner: { id: 'cp_live_...' },
|
|
440
|
+
prefill: { zip: '78701', email: 'sam@example.com' }
|
|
441
|
+
});
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
Both are optional and independently applied. A value the flow cannot use — a
|
|
445
|
+
four-digit ZIP, something that is not an address — is dropped and that one
|
|
446
|
+
question is asked as usual, so a bad value costs the shortcut and never the
|
|
447
|
+
quote. A visitor resuming a saved quote is never overwritten: their own answers
|
|
448
|
+
win.
|
|
449
|
+
|
|
432
450
|
## Test Mode (internal)
|
|
433
451
|
|
|
434
452
|
Test mode is for walking the **live** flow — real API, real carriers, real SMS —
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Z as i, e as o, X as t, A as r, D as l, c as u, H as n, z as d, K as f, F as p, q as g, W as c, V as m, d as S, T, j as h, O as y, k, E as A, J as E, C as Q, p as v, _ as P, S as R, w as C, B as _, a as O, m as V, Y as b, v as D, N as I, b as F, s as K, x as U, I as B, y as L, f as M, g as Y, L as Z, P as q, M as x, h as G, i as H, l as N } from "./widget-wgT55Lu5.js";
|
|
2
2
|
(function() {
|
|
3
3
|
if (typeof e > "u")
|
|
4
4
|
var e = { env: {} };
|
|
@@ -21,10 +21,10 @@ export {
|
|
|
21
21
|
T as decodeVin,
|
|
22
22
|
h as dismissDriverPrefill,
|
|
23
23
|
y as dismissVehiclePrefill,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
k as fetchDriverPrefillSuggestions,
|
|
25
|
+
A as fetchVehiclePrefillSuggestions,
|
|
26
|
+
E as getApiConfig,
|
|
27
|
+
Q as getQuestionsByStage,
|
|
28
28
|
v as getQuote,
|
|
29
29
|
P as getRates,
|
|
30
30
|
R as getStagesForQuote,
|
|
@@ -35,17 +35,17 @@ export {
|
|
|
35
35
|
b as isTestModeEnabled,
|
|
36
36
|
D as issueResumeLink,
|
|
37
37
|
I as loadAuthToken,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
F as loadQuoteId,
|
|
39
|
+
K as post,
|
|
40
|
+
U as prefillProperty,
|
|
41
|
+
B as prefillSuggestions,
|
|
42
42
|
L as redeemResumeToken,
|
|
43
43
|
M as requestBind,
|
|
44
44
|
Y as resetApiConfig,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
Z as resetPrefillSuggestions,
|
|
46
|
+
q as saveAuthToken,
|
|
47
|
+
x as saveQuoteId,
|
|
48
|
+
G as sendSmsCode,
|
|
49
|
+
H as updateQuote,
|
|
50
|
+
N as verifySmsCode
|
|
51
51
|
};
|
package/dist/{copy-applicant-offer-B-BIN2o5-BX-QE7Ao.js → copy-applicant-offer-CqzfNhkJ-CXzGxES4.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as d } from "./widget-
|
|
2
|
-
import { k as y, j as h } from "./visibility-
|
|
3
|
-
import { u as m, l as f, s as c } from "./copy-from-record-BNP6CFFR-
|
|
1
|
+
import { t as d } from "./widget-wgT55Lu5.js";
|
|
2
|
+
import { k as y, j as h } from "./visibility-CKRGC3Il-v2xplFmb.js";
|
|
3
|
+
import { u as m, l as f, s as c } from "./copy-from-record-BNP6CFFR-Ea4bf4lq.js";
|
|
4
4
|
import { useMemo as p, useCallback as b } from "react";
|
|
5
5
|
import { jsx as g } from "react/jsx-runtime";
|
|
6
6
|
(function() {
|
package/dist/{copy-from-record-BNP6CFFR-Bcb9EW-a.js → copy-from-record-BNP6CFFR-Ea4bf4lq.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a4 as x, a5 as b,
|
|
2
|
-
import { j as N } from "./visibility-
|
|
3
|
-
import { O as f } from "./validation-
|
|
1
|
+
import { a4 as x, a5 as b, r as v } from "./widget-wgT55Lu5.js";
|
|
2
|
+
import { j as N } from "./visibility-CKRGC3Il-v2xplFmb.js";
|
|
3
|
+
import { O as f } from "./validation-D42QXxck-6HA5X_Ql.js";
|
|
4
4
|
import { useState as y } from "react";
|
|
5
5
|
import { jsxs as p, jsx as n, Fragment as k } from "react/jsx-runtime";
|
|
6
|
-
import { C as K } from "./check-
|
|
6
|
+
import { C as K } from "./check-04Hiu_0S.js";
|
|
7
7
|
(function() {
|
|
8
8
|
if (typeof t > "u")
|
|
9
9
|
var t = { env: {} };
|
|
@@ -78,7 +78,7 @@ var A = {
|
|
|
78
78
|
index: i,
|
|
79
79
|
name: a || `Driver ${i + 1}`
|
|
80
80
|
}] : [];
|
|
81
|
-
}),
|
|
81
|
+
}), I = ({ kind: t, source: c, targetQuestions: e }) => {
|
|
82
82
|
let i = new Map(e.map((d) => [d.key, d])), a = {};
|
|
83
83
|
for (let [d, o] of Object.entries(A[t])) {
|
|
84
84
|
let m = i.get(d);
|
|
@@ -90,7 +90,7 @@ var A = {
|
|
|
90
90
|
}
|
|
91
91
|
let r = $[t];
|
|
92
92
|
return r && a[r.occupationKey] !== void 0 && (b(a[r.industryKey])?.includes(String(a[r.occupationKey])) || delete a[r.occupationKey]), a;
|
|
93
|
-
},
|
|
93
|
+
}, Q = ({ heading: t, body: c, candidates: e, applyLabel: i = "Use these details", onApply: a }) => {
|
|
94
94
|
let [r, d] = y(e[0]?.index ?? 0), [o, m] = y(null);
|
|
95
95
|
if (!e.length) return null;
|
|
96
96
|
if (o) return /* @__PURE__ */ p("p", {
|
|
@@ -184,6 +184,6 @@ export {
|
|
|
184
184
|
w as U,
|
|
185
185
|
O as c,
|
|
186
186
|
B as l,
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
Q as s,
|
|
188
|
+
I as u
|
|
189
189
|
};
|
package/dist/{household-prefill-DVLBBva1-GGgzEdDL.js → household-prefill-CmtB9R3R-DaQcDYh7.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as U, j as z, A as D, I as p, O as E, D as L,
|
|
2
|
-
import { U as q, y as
|
|
3
|
-
import { j as J } from "./visibility-
|
|
1
|
+
import { t as U, j as z, A as D, I as p, O as E, D as L, r as w } from "./widget-wgT55Lu5.js";
|
|
2
|
+
import { U as q, y as H, h as R, m as T, d as B, u as F, l as G } from "./householdPrefill-DLm3pxFH-CqqJoa0N.js";
|
|
3
|
+
import { j as J } from "./visibility-CKRGC3Il-v2xplFmb.js";
|
|
4
4
|
import { useState as u, useRef as C, useEffect as I } from "react";
|
|
5
5
|
import { jsx as d, jsxs as r } from "react/jsx-runtime";
|
|
6
|
-
import { C as K } from "./car-
|
|
6
|
+
import { C as K } from "./car-BQXTRajZ.js";
|
|
7
7
|
(function() {
|
|
8
8
|
if (typeof t > "u")
|
|
9
9
|
var t = { env: {} };
|
|
@@ -14,7 +14,7 @@ var de = /* @__PURE__ */ U({ HouseholdPrefill: () => Q }), M = {
|
|
|
14
14
|
peek: p.vehicle.peek,
|
|
15
15
|
apply: L,
|
|
16
16
|
dismiss: E,
|
|
17
|
-
mergeInto:
|
|
17
|
+
mergeInto: T,
|
|
18
18
|
skip: () => !1,
|
|
19
19
|
alreadyPresent: () => !1,
|
|
20
20
|
icon: K,
|
|
@@ -28,9 +28,9 @@ var de = /* @__PURE__ */ U({ HouseholdPrefill: () => Q }), M = {
|
|
|
28
28
|
peek: p.driver.peek,
|
|
29
29
|
apply: D,
|
|
30
30
|
dismiss: z,
|
|
31
|
-
mergeInto:
|
|
32
|
-
skip:
|
|
33
|
-
alreadyPresent: (t, c) => J(t, "drivers").some((i) =>
|
|
31
|
+
mergeInto: R,
|
|
32
|
+
skip: H,
|
|
33
|
+
alreadyPresent: (t, c) => J(t, "drivers").some((i) => B(G(i), F(c.label))),
|
|
34
34
|
icon: q,
|
|
35
35
|
heading: (t) => t === 1 ? "We found another driver in your household" : `We found ${t} drivers in your household`,
|
|
36
36
|
body: "Add anyone who drives these vehicles. We already have you.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as _}from"./iframe-
|
|
1
|
+
import{t as _}from"./iframe-BsUmazO0.js";var u=_({ADDRESS_COLUMN_PREFIXES:()=>m,addressFromColumns:()=>p,addressToColumns:()=>c,composeAddress:()=>n,normalizeStateCode:()=>a,parseAddress:()=>i}),a=r=>{let t=r.trim();return/^[A-Za-z]{2}$/.test(t)?t.toUpperCase():t},i=r=>{let[t="",e="",o=""]=r.split(",").map(d=>d.trim()).filter(Boolean),l=/^([A-Za-z .]{2,})\s+(\d{5})(?:-\d{4})?$/.exec(o);return{line_1:t,city:e,state:a(l?.[1]?.trim()??""),postal_code:l?.[2]??""}},n=r=>{let t=[r.line_1.trim(),r.line_2.trim()].filter(Boolean).join(" ");if(!t)return"";let e=a(r.state.trim());return`${t}, ${r.city.trim()}, ${e} ${r.postal_code.trim()}`.replace(/\s+/g," ").trim()},m={address:"",prior_address:"prior_",garaging_address:"garaging_address_"},s=(r,t)=>{let e=r[t];return e==null?"":String(e)},p=(r,t)=>n({line_1:s(r,`${t}line_1`),line_2:s(r,`${t}line_2`),city:s(r,`${t}city`),state:s(r,`${t}state`),postal_code:s(r,`${t}postal_code`)}),c=(r,t)=>{let e=i(r);return{[`${t}line_1`]:e.line_1||null,[`${t}city`]:e.city||null,[`${t}state`]:e.state||null,[`${t}postal_code`]:e.postal_code||null}};export{n as a,u as i,p as n,a as o,c as r,i as s,m as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as y,r as s,
|
|
1
|
+
import{t as y,r as s,a as d}from"./iframe-BsUmazO0.js";import{k as h,j as m}from"./visibility-CKRGC3Il-CzwGG4Rt.js";import{u as c,l as b,s as g}from"./copy-from-record-BNP6CFFR-D3zdAXXN.js";import"./types-LUGvo5ic-CB-wcgK3.js";import"./validation-D42QXxck-CI1J_zUB.js";import"./check-bC0Zibyh.js";var O=y({CopyApplicantOffer:()=>k}),f={Demographics:{kind:"applicant",heading:"Are you one of the drivers?",body:"We'll reuse the details you already gave for them, so you don't type them twice.",applyLabel:"Use these details"},Ssn:{kind:"applicantSsn",heading:"Are you one of the drivers?",body:"We can reuse the Social Security number you already entered for them.",applyLabel:"Use the SSN"}},k=({stage:r,questions:n,values:t,onPatch:u})=>{let e=f[r],i=s.useMemo(()=>e?h(n,t,r):[],[e,n,t,r]),o=s.useCallback(a=>e?c({kind:e.kind,source:m(t,"drivers")[a]??{},targetQuestions:i}):{},[e,t,i]),l=s.useMemo(()=>e?b(t).filter(a=>Object.keys(o(a.index)).length>0):[],[e,t,o]);return!e||!l.length?null:d.jsx(g,{heading:e.heading,body:e.body,applyLabel:e.applyLabel,candidates:l,onApply:a=>{let p=o(a);return u(p),Object.keys(p).length}})};export{O as n,k as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{l as f,N as g,r as _,a as t,f as b}from"./iframe-BsUmazO0.js";import{j}from"./visibility-CKRGC3Il-CzwGG4Rt.js";import{O as y}from"./validation-D42QXxck-CI1J_zUB.js";import{C as N}from"./check-bC0Zibyh.js";/**
|
|
2
2
|
* @license lucide-react v0.562.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as E}from"./iframe-
|
|
1
|
+
import{t as E}from"./iframe-BsUmazO0.js";var b=E({COVERAGE_EDITED_KEY:()=>o,COVERAGE_SHARE_OF_DWELLING:()=>i,DWELLING_KEY:()=>s,PURCHASE_PRICE_KEY:()=>d,backfillRelatedCoverages:()=>g,coverageSharePercent:()=>p,deriveRelatedCoverages:()=>C,derivedCoverageAmount:()=>u,isCoverageEdited:()=>f,markCoverageEdited:()=>m,seedHomeCoverages:()=>A}),i={other_structures_coverage:.1,personal_property_coverage:.5,loss_of_use_coverage:.2},s="dwelling_replacement_cost",d="sale_price_cents",o="__coverage_edited",_=500,u=(r,e)=>Math.round(r*e/_)*_,p=r=>{let e=i[r];return e===void 0?null:Math.round(e*100)},c=r=>{let e=r[o];return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]},f=(r,e)=>c(r).includes(e),a=r=>{let e=String(r??"").replace(/\D/g,"");if(!e)return null;let t=Number(e);return Number.isFinite(t)&&t>0?t:null},m=(r,e,t)=>{if(i[e]===void 0)return{};let l=c(r);return a(t)===null?l.includes(e)?{[o]:l.filter(n=>n!==e)}:{}:l.includes(e)?{}:{[o]:[...l,e]}},C=(r,e)=>{let t=a(e);if(t===null)return{};let l={};for(let[n,v]of Object.entries(i))f(r,n)||(l[n]=u(t,v));return l},g=r=>{let e=a(r[s]);if(e===null)return{};let t={};for(let[l,n]of Object.entries(i))a(r[l])===null&&(t[l]=u(e,n));return t},A=r=>{let e={};if(a(r.dwelling_replacement_cost)===null){let t=a(r[d]);t!==null&&(e[s]=t)}return{...e,...g({...r,...e})}};export{g as a,C as c,m as d,A as f,d as i,u as l,i as n,b as o,s as r,p as s,o as t,f as u};
|