@ombori/ga-settings
Advanced tools
Comparing version 2.116.0 to 2.116.5
@@ -6,2 +6,13 @@ # Change Log | ||
## [2.116.5](https://github.com/ombori/gridapp/compare/v2.116.4...v2.116.5) (2021-11-26) | ||
### Bug Fixes | ||
* ga-settings session manager hook ([7fe284e](https://github.com/ombori/gridapp/commit/7fe284e880ab137b870b23526b3f4f40153ff195)) | ||
# [2.116.0](https://github.com/ombori/gridapp/compare/v2.115.1...v2.116.0) (2021-11-25) | ||
@@ -8,0 +19,0 @@ |
@@ -23,6 +23,10 @@ var __assign = (this && this.__assign) || function () { | ||
globalSettings = __assign(__assign({}, settings.app.gridApp.settings), { _general: settings.general, _buildInfo: { | ||
id: 'development', | ||
buildId: 'development', | ||
name: 'development', | ||
iconUrl: 'development', | ||
appName: 'DEVELOPMENT', | ||
buildId: 'DEVELOPMENT', | ||
bootVersion: 'DEVELOPMENT', | ||
}, _gridapp: { | ||
id: 'DEVELOPMENT', | ||
buildId: 'DEVELOPMENT', | ||
name: 'DEVELOPMENT', | ||
iconUrl: 'DEVELOPMENT', | ||
} }); | ||
@@ -87,27 +91,25 @@ globalInfo = settings.general; | ||
export var useSessionManagerInitProps = function () { | ||
var _a, _b, _c, _d; | ||
var settings = useSettings(); | ||
return useMemo(function () { | ||
var _a, _b, _c, _d; | ||
if (!settings || !settings._general || !settings._gridapp) | ||
return null; | ||
var device = getDeviceInfo(); | ||
return { | ||
tenantId: settings._general.organizationId, | ||
environment: ((device === null || device === void 0 ? void 0 : device.env) || '').toUpperCase(), | ||
dataResidency: settings._general.dataResidency, | ||
country: settings._general.country, | ||
// TODO: Add support with env later. this is supported in the analytics service out-of-the-box | ||
// locationAccuracy: 10, | ||
// latitude: 0, | ||
// longitude: 0, | ||
spaceId: '', | ||
appId: ((_a = settings._gridapp) === null || _a === void 0 ? void 0 : _a.id) || '', | ||
appVersion: ((_b = settings._gridapp) === null || _b === void 0 ? void 0 : _b.buildId) || '', | ||
installationId: ((_c = settings._general) === null || _c === void 0 ? void 0 : _c.appId) || '', | ||
installationVersion: ((_d = settings._buildInfo) === null || _d === void 0 ? void 0 : _d.buildId) || '', | ||
deviceId: (device === null || device === void 0 ? void 0 : device.id) || '', | ||
clientUserAgent: navigator.userAgent, | ||
}; | ||
}, [settings]); | ||
if (!settings || !settings._general || !settings._gridapp) | ||
return null; | ||
var device = getDeviceInfo(); | ||
return { | ||
tenantId: settings._general.organizationId, | ||
environment: (isDev ? 'development' : (device === null || device === void 0 ? void 0 : device.env) || '').toUpperCase(), | ||
dataResidency: settings._general.dataResidency, | ||
country: settings._general.country, | ||
// TODO: Add support with env later. this is supported in the analytics service out-of-the-box | ||
// locationAccuracy: 10, | ||
// latitude: 0, | ||
// longitude: 0, | ||
spaceId: '', | ||
appId: ((_a = settings._gridapp) === null || _a === void 0 ? void 0 : _a.id) || '', | ||
appVersion: ((_b = settings._gridapp) === null || _b === void 0 ? void 0 : _b.buildId) || '', | ||
installationId: ((_c = settings._general) === null || _c === void 0 ? void 0 : _c.appId) || '', | ||
installationVersion: ((_d = settings._buildInfo) === null || _d === void 0 ? void 0 : _d.buildId) || '', | ||
deviceId: (device === null || device === void 0 ? void 0 : device.id) || '', | ||
clientUserAgent: navigator.userAgent, | ||
}; | ||
}; | ||
export default { useSettings: useSettings, useAppInfo: useAppInfo, useSessionManagerInitProps: useSessionManagerInitProps }; |
{ | ||
"name": "@ombori/ga-settings", | ||
"version": "2.116.0", | ||
"version": "2.116.5", | ||
"main": "dist/index.js", | ||
@@ -19,3 +19,3 @@ "license": "UNLICENSED", | ||
}, | ||
"gitHead": "760406a206619f0bfaebf6970f345685c7b239d5" | ||
"gitHead": "9d46bad4a21de96803dd16359fd2ff616c5e801d" | ||
} |
@@ -75,7 +75,12 @@ import { useEffect, useMemo, useState } from 'react'; | ||
_buildInfo: { | ||
id: 'development', | ||
buildId: 'development', | ||
name: 'development', | ||
iconUrl: 'development', | ||
appName: 'DEVELOPMENT', | ||
buildId: 'DEVELOPMENT', | ||
bootVersion: 'DEVELOPMENT', | ||
}, | ||
_gridapp: { | ||
id: 'DEVELOPMENT', | ||
buildId: 'DEVELOPMENT', | ||
name: 'DEVELOPMENT', | ||
iconUrl: 'DEVELOPMENT', | ||
}, | ||
}; | ||
@@ -151,27 +156,25 @@ globalInfo = settings.general; | ||
return useMemo(() => { | ||
if (!settings || !settings._general || !settings._gridapp) return null; | ||
if (!settings || !settings._general || !settings._gridapp) return null; | ||
const device = getDeviceInfo(); | ||
const device = getDeviceInfo(); | ||
return { | ||
tenantId: settings._general.organizationId, | ||
environment: (device?.env || '').toUpperCase(), | ||
dataResidency: settings._general.dataResidency, | ||
country: settings._general.country, | ||
// TODO: Add support with env later. this is supported in the analytics service out-of-the-box | ||
// locationAccuracy: 10, | ||
// latitude: 0, | ||
// longitude: 0, | ||
spaceId: '', | ||
appId: settings._gridapp?.id || '', | ||
appVersion: settings._gridapp?.buildId || '', | ||
installationId: settings._general?.appId || '', | ||
installationVersion: settings._buildInfo?.buildId || '', | ||
deviceId: device?.id || '', | ||
clientUserAgent: navigator.userAgent, | ||
}; | ||
}, [settings]); | ||
return { | ||
tenantId: settings._general.organizationId, | ||
environment: (isDev ? 'development' : device?.env || '').toUpperCase(), | ||
dataResidency: settings._general.dataResidency, | ||
country: settings._general.country, | ||
// TODO: Add support with env later. this is supported in the analytics service out-of-the-box | ||
// locationAccuracy: 10, | ||
// latitude: 0, | ||
// longitude: 0, | ||
spaceId: '', | ||
appId: settings._gridapp?.id || '', | ||
appVersion: settings._gridapp?.buildId || '', | ||
installationId: settings._general?.appId || '', | ||
installationVersion: settings._buildInfo?.buildId || '', | ||
deviceId: device?.id || '', | ||
clientUserAgent: navigator.userAgent, | ||
}; | ||
}; | ||
export default { useSettings, useAppInfo, useSessionManagerInitProps }; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24352
492