authscape 1.0.586 → 1.0.590
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/index.js +10 -1
- package/package.json +2 -1
- package/src/components/AuthScapeApp.js +17 -9
package/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var _nookies = require("nookies");
|
|
|
16
16
|
var _router = _interopRequireDefault(require("next/router"));
|
|
17
17
|
var _ga4React = _interopRequireDefault(require("ga-4-react"));
|
|
18
18
|
var _zustand = require("zustand");
|
|
19
|
+
var _reactMicrosoftClarity = require("react-microsoft-clarity");
|
|
19
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
20
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -240,6 +241,14 @@ function AuthScapeApp(_ref) {
|
|
|
240
241
|
if (process.env.googleAnalytics4 != "") {
|
|
241
242
|
initGA(process.env.googleAnalytics4);
|
|
242
243
|
}
|
|
244
|
+
if (process.env.microsoftClarityTrackingCode != "") {
|
|
245
|
+
_reactMicrosoftClarity.clarity.init(process.env.microsoftClarityTrackingCode);
|
|
246
|
+
if (signedInUser.current != null && _reactMicrosoftClarity.clarity.hasStarted()) {
|
|
247
|
+
_reactMicrosoftClarity.clarity.identify('USER_ID', {
|
|
248
|
+
userProperty: signedInUser.current.id.toString()
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
}
|
|
243
252
|
databaseDrivenPageView(window.location.pathname);
|
|
244
253
|
_router["default"].events.on('routeChangeComplete', function () {
|
|
245
254
|
if (ga4React != null) {
|
|
@@ -442,7 +451,7 @@ function AuthScapeApp(_ref) {
|
|
|
442
451
|
setErrorToastMessage: setErrorToastMessage
|
|
443
452
|
}))), /*#__PURE__*/_react["default"].createElement(_reactToastify.ToastContainer, null)), loadingLayout && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, loadingLayout(isLoadingShow)), frontEndLoadedState && process.env.microsoftClarityTrackingCode != null && /*#__PURE__*/_react["default"].createElement("script", {
|
|
444
453
|
dangerouslySetInnerHTML: {
|
|
445
|
-
__html: "
|
|
454
|
+
__html: "(function(c,l,a,r,i,t,y){\n c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};\n t=l.createElement(r);t.async=1;t.src=\"https://www.clarity.ms/tag/\"+i;\n y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);\n })(window, document, \"clarity\", \"script\", \"" + process.env.microsoftClarityTrackingCode + "\");"
|
|
446
455
|
}
|
|
447
456
|
}));
|
|
448
457
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "authscape",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.590",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"react-device-detect": "^2.2.3",
|
|
52
52
|
"react-draft-wysiwyg": "^1.15.0",
|
|
53
53
|
"react-hook-form": "^7.50.1",
|
|
54
|
+
"react-microsoft-clarity": "^1.2.0",
|
|
54
55
|
"react-toastify": "^9.1.3",
|
|
55
56
|
"styled-components": "^5.3.6",
|
|
56
57
|
"use-places-autocomplete": "^4.0.0",
|
|
@@ -9,6 +9,7 @@ import { setCookie } from 'nookies';
|
|
|
9
9
|
import Router from 'next/router';
|
|
10
10
|
import GA4React from 'ga-4-react';
|
|
11
11
|
import { create } from 'zustand'
|
|
12
|
+
import { clarity } from 'react-microsoft-clarity';
|
|
12
13
|
|
|
13
14
|
// comment this out
|
|
14
15
|
// import { authService, apiService, setupOEMProps, OEMStyleSheet } from 'authscape';
|
|
@@ -202,6 +203,16 @@ export function AuthScapeApp ({Component, layout, loadingLayout, pageProps, muiT
|
|
|
202
203
|
initGA(process.env.googleAnalytics4);
|
|
203
204
|
}
|
|
204
205
|
|
|
206
|
+
if (process.env.microsoftClarityTrackingCode != "")
|
|
207
|
+
{
|
|
208
|
+
clarity.init(process.env.microsoftClarityTrackingCode);
|
|
209
|
+
|
|
210
|
+
if (signedInUser.current != null && clarity.hasStarted())
|
|
211
|
+
{
|
|
212
|
+
clarity.identify('USER_ID', { userProperty: signedInUser.current.id.toString() });
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
205
216
|
databaseDrivenPageView(window.location.pathname);
|
|
206
217
|
Router.events.on('routeChangeComplete', () => {
|
|
207
218
|
|
|
@@ -448,15 +459,12 @@ export function AuthScapeApp ({Component, layout, loadingLayout, pageProps, muiT
|
|
|
448
459
|
{(frontEndLoadedState && process.env.microsoftClarityTrackingCode != null) &&
|
|
449
460
|
<script
|
|
450
461
|
dangerouslySetInnerHTML={{
|
|
451
|
-
__html:
|
|
452
|
-
(function(c,l,a,r,i,t,y){
|
|
453
|
-
c[a]
|
|
454
|
-
t=l.createElement(r);
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
y=l.getElementsByTagName(r)[0];
|
|
458
|
-
y.parentNode.insertBefore(t,y);
|
|
459
|
-
})(window, document, "clarity", "script", "` + process.env.microsoftClarityTrackingCode + `");`,
|
|
462
|
+
__html:
|
|
463
|
+
`(function(c,l,a,r,i,t,y){
|
|
464
|
+
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
|
|
465
|
+
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
|
|
466
|
+
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
|
|
467
|
+
})(window, document, "clarity", "script", "` + process.env.microsoftClarityTrackingCode + `");`
|
|
460
468
|
}}
|
|
461
469
|
/>
|
|
462
470
|
}
|