authscape 1.0.588 → 1.0.592
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 -5
- package/package.json +2 -1
- package/src/components/AuthScapeApp.js +11 -13
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) {
|
|
@@ -440,11 +449,7 @@ function AuthScapeApp(_ref) {
|
|
|
440
449
|
setSuccessToastMessage: setSuccessToastMessage,
|
|
441
450
|
setWarnToastMessage: setWarnToastMessage,
|
|
442
451
|
setErrorToastMessage: setErrorToastMessage
|
|
443
|
-
}))), /*#__PURE__*/_react["default"].createElement(_reactToastify.ToastContainer, null)), loadingLayout && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, loadingLayout(isLoadingShow))
|
|
444
|
-
dangerouslySetInnerHTML: {
|
|
445
|
-
__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
|
-
}
|
|
447
|
-
}));
|
|
452
|
+
}))), /*#__PURE__*/_react["default"].createElement(_reactToastify.ToastContainer, null)), loadingLayout && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, loadingLayout(isLoadingShow)));
|
|
448
453
|
}
|
|
449
454
|
"use strict";
|
|
450
455
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "authscape",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.592",
|
|
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
|
|
|
@@ -444,19 +455,6 @@ export function AuthScapeApp ({Component, layout, loadingLayout, pageProps, muiT
|
|
|
444
455
|
{loadingLayout(isLoadingShow)}
|
|
445
456
|
</>
|
|
446
457
|
}
|
|
447
|
-
|
|
448
|
-
{(frontEndLoadedState && process.env.microsoftClarityTrackingCode != null) &&
|
|
449
|
-
<script
|
|
450
|
-
dangerouslySetInnerHTML={{
|
|
451
|
-
__html:
|
|
452
|
-
`(function(c,l,a,r,i,t,y){
|
|
453
|
-
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
|
|
454
|
-
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
|
|
455
|
-
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
|
|
456
|
-
})(window, document, "clarity", "script", "` + process.env.microsoftClarityTrackingCode + `");`
|
|
457
|
-
}}
|
|
458
|
-
/>
|
|
459
|
-
}
|
|
460
458
|
</>
|
|
461
459
|
)
|
|
462
460
|
}
|