@crystaldesign/diva-utils 25.7.0-beta.9 → 25.8.0-beta.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/build/cjs/index.js
CHANGED
|
@@ -405,7 +405,7 @@ var BusinessMetricsUtils = /*#__PURE__*/function () {
|
|
|
405
405
|
event = _objectSpread(_objectSpread({}, e), {}, {
|
|
406
406
|
organizationId: (_this$initEvent4 = this.initEvent) === null || _this$initEvent4 === void 0 || (_this$initEvent4 = _this$initEvent4.organization) === null || _this$initEvent4 === void 0 ? void 0 : _this$initEvent4.id
|
|
407
407
|
});
|
|
408
|
-
if (!
|
|
408
|
+
if (!this.isDevelopment) {
|
|
409
409
|
_context6.next = 10;
|
|
410
410
|
break;
|
|
411
411
|
}
|
|
@@ -1397,15 +1397,17 @@ var nanoid = nanoid$1.customAlphabet('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef
|
|
|
1397
1397
|
|
|
1398
1398
|
var UTMUtils = /*#__PURE__*/function () {
|
|
1399
1399
|
function UTMUtils(utm_source, utm_medium, utm_campaign, utm_content, utm_term) {
|
|
1400
|
+
var _params$get;
|
|
1400
1401
|
_classCallCheck__default["default"](this, UTMUtils);
|
|
1401
1402
|
_defineProperty__default["default"](this, "utm_source", void 0);
|
|
1402
1403
|
_defineProperty__default["default"](this, "utm_medium", void 0);
|
|
1403
1404
|
_defineProperty__default["default"](this, "utm_campaign", void 0);
|
|
1404
1405
|
_defineProperty__default["default"](this, "utm_content", void 0);
|
|
1405
1406
|
_defineProperty__default["default"](this, "utm_term", void 0);
|
|
1407
|
+
var params = new URLSearchParams(window.location.search);
|
|
1406
1408
|
this.utm_source = utm_source;
|
|
1407
1409
|
this.utm_medium = utm_medium;
|
|
1408
|
-
this.utm_campaign = utm_campaign;
|
|
1410
|
+
this.utm_campaign = (_params$get = params.get('utm_campaign')) !== null && _params$get !== void 0 ? _params$get : utm_campaign;
|
|
1409
1411
|
this.utm_content = utm_content;
|
|
1410
1412
|
this.utm_term = utm_term;
|
|
1411
1413
|
}
|
|
@@ -1424,11 +1426,8 @@ var UTMUtils = /*#__PURE__*/function () {
|
|
|
1424
1426
|
key: "addUtmParams",
|
|
1425
1427
|
value: function addUtmParams(url) {
|
|
1426
1428
|
var queryString = this.getQueryString();
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
return "".concat(url).concat(separator).concat(queryString);
|
|
1430
|
-
}
|
|
1431
|
-
return url;
|
|
1429
|
+
//the data prefix is because the message service also parses this as a template
|
|
1430
|
+
return url.replaceAll('${data.utmQueryString}', "".concat(queryString));
|
|
1432
1431
|
}
|
|
1433
1432
|
}]);
|
|
1434
1433
|
}();
|
|
@@ -1459,6 +1458,8 @@ var UtmCampaign = /*#__PURE__*/function (UtmCampaign) {
|
|
|
1459
1458
|
UtmCampaign["PLANNER_QR_SHARE"] = "planner_qr_share";
|
|
1460
1459
|
UtmCampaign["PRODUCT_QR_CODE"] = "product_qr_code";
|
|
1461
1460
|
UtmCampaign["PLANNER_SHARE"] = "planner_share";
|
|
1461
|
+
UtmCampaign["PLANNER_SAVE"] = "planner_save";
|
|
1462
|
+
UtmCampaign["PLANNER_CREATE_APPOINTMENT"] = "planner_create_appointment";
|
|
1462
1463
|
return UtmCampaign;
|
|
1463
1464
|
}({});
|
|
1464
1465
|
var UtmContent = /*#__PURE__*/function (UtmContent) {
|
package/build/esm/index.js
CHANGED
|
@@ -386,7 +386,7 @@ var BusinessMetricsUtils = /*#__PURE__*/function () {
|
|
|
386
386
|
event = _objectSpread(_objectSpread({}, e), {}, {
|
|
387
387
|
organizationId: (_this$initEvent4 = this.initEvent) === null || _this$initEvent4 === void 0 || (_this$initEvent4 = _this$initEvent4.organization) === null || _this$initEvent4 === void 0 ? void 0 : _this$initEvent4.id
|
|
388
388
|
});
|
|
389
|
-
if (!
|
|
389
|
+
if (!this.isDevelopment) {
|
|
390
390
|
_context6.next = 10;
|
|
391
391
|
break;
|
|
392
392
|
}
|
|
@@ -1378,15 +1378,17 @@ var nanoid = customAlphabet('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmno
|
|
|
1378
1378
|
|
|
1379
1379
|
var UTMUtils = /*#__PURE__*/function () {
|
|
1380
1380
|
function UTMUtils(utm_source, utm_medium, utm_campaign, utm_content, utm_term) {
|
|
1381
|
+
var _params$get;
|
|
1381
1382
|
_classCallCheck(this, UTMUtils);
|
|
1382
1383
|
_defineProperty(this, "utm_source", void 0);
|
|
1383
1384
|
_defineProperty(this, "utm_medium", void 0);
|
|
1384
1385
|
_defineProperty(this, "utm_campaign", void 0);
|
|
1385
1386
|
_defineProperty(this, "utm_content", void 0);
|
|
1386
1387
|
_defineProperty(this, "utm_term", void 0);
|
|
1388
|
+
var params = new URLSearchParams(window.location.search);
|
|
1387
1389
|
this.utm_source = utm_source;
|
|
1388
1390
|
this.utm_medium = utm_medium;
|
|
1389
|
-
this.utm_campaign = utm_campaign;
|
|
1391
|
+
this.utm_campaign = (_params$get = params.get('utm_campaign')) !== null && _params$get !== void 0 ? _params$get : utm_campaign;
|
|
1390
1392
|
this.utm_content = utm_content;
|
|
1391
1393
|
this.utm_term = utm_term;
|
|
1392
1394
|
}
|
|
@@ -1405,11 +1407,8 @@ var UTMUtils = /*#__PURE__*/function () {
|
|
|
1405
1407
|
key: "addUtmParams",
|
|
1406
1408
|
value: function addUtmParams(url) {
|
|
1407
1409
|
var queryString = this.getQueryString();
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
return "".concat(url).concat(separator).concat(queryString);
|
|
1411
|
-
}
|
|
1412
|
-
return url;
|
|
1410
|
+
//the data prefix is because the message service also parses this as a template
|
|
1411
|
+
return url.replaceAll('${data.utmQueryString}', "".concat(queryString));
|
|
1413
1412
|
}
|
|
1414
1413
|
}]);
|
|
1415
1414
|
}();
|
|
@@ -1440,6 +1439,8 @@ var UtmCampaign = /*#__PURE__*/function (UtmCampaign) {
|
|
|
1440
1439
|
UtmCampaign["PLANNER_QR_SHARE"] = "planner_qr_share";
|
|
1441
1440
|
UtmCampaign["PRODUCT_QR_CODE"] = "product_qr_code";
|
|
1442
1441
|
UtmCampaign["PLANNER_SHARE"] = "planner_share";
|
|
1442
|
+
UtmCampaign["PLANNER_SAVE"] = "planner_save";
|
|
1443
|
+
UtmCampaign["PLANNER_CREATE_APPOINTMENT"] = "planner_create_appointment";
|
|
1443
1444
|
return UtmCampaign;
|
|
1444
1445
|
}({});
|
|
1445
1446
|
var UtmContent = /*#__PURE__*/function (UtmContent) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/utils/UTMUtils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE3D,qBAAa,QAAQ;IACnB,OAAO,CAAC,UAAU,CAAY;IAC9B,OAAO,CAAC,UAAU,CAAC,CAAY;IAC/B,OAAO,CAAC,YAAY,CAAC,CAAS;IAC9B,OAAO,CAAC,WAAW,CAAC,CAAa;IACjC,OAAO,CAAC,QAAQ,CAAC,CAAS;gBAEd,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,SAAS,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/utils/UTMUtils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE3D,qBAAa,QAAQ;IACnB,OAAO,CAAC,UAAU,CAAY;IAC9B,OAAO,CAAC,UAAU,CAAC,CAAY;IAC/B,OAAO,CAAC,YAAY,CAAC,CAAS;IAC9B,OAAO,CAAC,WAAW,CAAC,CAAa;IACjC,OAAO,CAAC,QAAQ,CAAC,CAAS;gBAEd,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,SAAS,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,MAAM;IAStH,cAAc,IAAI,MAAM;IAUxB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;CAKzC"}
|
|
@@ -21,7 +21,9 @@ export declare enum UtmMedium {
|
|
|
21
21
|
export declare enum UtmCampaign {
|
|
22
22
|
PLANNER_QR_SHARE = "planner_qr_share",
|
|
23
23
|
PRODUCT_QR_CODE = "product_qr_code",
|
|
24
|
-
PLANNER_SHARE = "planner_share"
|
|
24
|
+
PLANNER_SHARE = "planner_share",
|
|
25
|
+
PLANNER_SAVE = "planner_save",
|
|
26
|
+
PLANNER_CREATE_APPOINTMENT = "planner_create_appointment"
|
|
25
27
|
}
|
|
26
28
|
export declare enum UtmContent {
|
|
27
29
|
PLANNER_SHARE_BUTTON = "share_button_planner_header",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/utils/UTMUtils/types.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS;IACnB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,CAAC,MAAM,CAAE,SAAS;IAClB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,GAAG,QAAQ;CACZ;AAED,oBAAY,SAAS;IACnB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,QAAQ,aAAa;CACtB;AAED,oBAAY,WAAW;IACrB,gBAAgB,qBAAqB;IACrC,eAAe,oBAAoB;IACnC,aAAa,kBAAkB;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/utils/UTMUtils/types.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS;IACnB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,CAAC,MAAM,CAAE,SAAS;IAClB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,GAAG,QAAQ;CACZ;AAED,oBAAY,SAAS;IACnB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,QAAQ,aAAa;CACtB;AAED,oBAAY,WAAW;IACrB,gBAAgB,qBAAqB;IACrC,eAAe,oBAAoB;IACnC,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;IAC7B,0BAA0B,+BAA+B;CAC1D;AAED,oBAAY,UAAU;IACpB,oBAAoB,gCAAgC;IACpD,6BAA6B,kCAAkC;CAChE;AAED,MAAM,WAAW,SAAS;IACxB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-utils",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.8.0-beta.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"module": "build/esm/index.js",
|
|
25
25
|
"types": "./build/types/utils/src/index.d.ts",
|
|
26
26
|
"main": "build/cjs/index.js",
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "eb2c58a5035d7f74e4909def24404af4a50ea8f3"
|
|
28
28
|
}
|