@codebards/ik-embeddable-form 0.0.2730435737-qa → 0.0.2733668477-qa
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/embed.js +13 -10
- package/dist/embed.js.map +1 -1
- package/package.json +1 -1
package/dist/embed.js
CHANGED
|
@@ -443,10 +443,10 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
443
443
|
if (!(Sentry == null ? void 0 : Sentry.captureMessage)) return;
|
|
444
444
|
Sentry.captureMessage(message, { level, extra: context });
|
|
445
445
|
}
|
|
446
|
-
function setUserContext(userId,
|
|
446
|
+
function setUserContext(userId, email2) {
|
|
447
447
|
const Sentry = getSentry();
|
|
448
448
|
if (!(Sentry == null ? void 0 : Sentry.setUser)) return;
|
|
449
|
-
Sentry.setUser({ id: userId, email });
|
|
449
|
+
Sentry.setUser({ id: userId, email: email2 });
|
|
450
450
|
}
|
|
451
451
|
function addBreadcrumb(message, category, data) {
|
|
452
452
|
const Sentry = getSentry();
|
|
@@ -2140,9 +2140,9 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
2140
2140
|
* would otherwise leave the digest permanently unset.
|
|
2141
2141
|
*/
|
|
2142
2142
|
async ensureEmailDigest() {
|
|
2143
|
-
const
|
|
2144
|
-
if (!
|
|
2145
|
-
const digest = await sha256Hex(
|
|
2143
|
+
const email2 = String(this.state.formData.email ?? "").trim();
|
|
2144
|
+
if (!email2 || this.state.formData.emailSha256) return;
|
|
2145
|
+
const digest = await sha256Hex(email2);
|
|
2146
2146
|
if (digest) this.mergeFormData({ emailSha256: digest });
|
|
2147
2147
|
}
|
|
2148
2148
|
getOpenConfig() {
|
|
@@ -2863,6 +2863,9 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
2863
2863
|
function str(value) {
|
|
2864
2864
|
return value != null ? String(value) : "";
|
|
2865
2865
|
}
|
|
2866
|
+
function email(value) {
|
|
2867
|
+
return str(value).trim().replace(/\.+$/, "");
|
|
2868
|
+
}
|
|
2866
2869
|
function bool(value) {
|
|
2867
2870
|
return value === true || value === "true";
|
|
2868
2871
|
}
|
|
@@ -2915,7 +2918,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
2915
2918
|
...customerIdFields(context),
|
|
2916
2919
|
"First Name": firstName,
|
|
2917
2920
|
"Last Name": lastName,
|
|
2918
|
-
"Email Address":
|
|
2921
|
+
"Email Address": email(formData.email),
|
|
2919
2922
|
ByeCalendlyType: "NoPhoneInTheFirstStep",
|
|
2920
2923
|
"webinar-type": webinarType,
|
|
2921
2924
|
"Webinar Lead Type": webinarType,
|
|
@@ -2995,7 +2998,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
2995
2998
|
...customerIdFields(context),
|
|
2996
2999
|
"First Name": firstName,
|
|
2997
3000
|
"Last Name": lastName,
|
|
2998
|
-
"Email Address":
|
|
3001
|
+
"Email Address": email(formData.email),
|
|
2999
3002
|
...resolveProfileApiFields(formData, context),
|
|
3000
3003
|
"Interview Start Time": str(formData.interviewTimeline),
|
|
3001
3004
|
utm_source: resolveUtmSource(context),
|
|
@@ -3069,7 +3072,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
3069
3072
|
Page_URL: encodeURIComponent(context.pageUrl),
|
|
3070
3073
|
"First Name": firstName,
|
|
3071
3074
|
"Last Name": lastName,
|
|
3072
|
-
"Email Address":
|
|
3075
|
+
"Email Address": email(formData.email),
|
|
3073
3076
|
utm_source: resolveUtmSource(context),
|
|
3074
3077
|
utm_medium: resolveUtmMedium(context),
|
|
3075
3078
|
utm_campaign: str(utm.utm_campaign ?? ""),
|
|
@@ -19335,7 +19338,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
19335
19338
|
break;
|
|
19336
19339
|
case "email":
|
|
19337
19340
|
rules["pattern"] = {
|
|
19338
|
-
value: /^[
|
|
19341
|
+
value: /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,
|
|
19339
19342
|
message: rule.message
|
|
19340
19343
|
};
|
|
19341
19344
|
break;
|
|
@@ -21819,7 +21822,7 @@ ${intlTelStyles}`;
|
|
|
21819
21822
|
destroy();
|
|
21820
21823
|
},
|
|
21821
21824
|
getVersion() {
|
|
21822
|
-
return "1.0.
|
|
21825
|
+
return "1.0.35";
|
|
21823
21826
|
},
|
|
21824
21827
|
/**
|
|
21825
21828
|
* Allowlisted snapshot of everything the user has submitted so far.
|