@elliemae/pui-app-sdk 2.14.0 → 2.16.0

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.
@@ -12,7 +12,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
12
12
  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; }
13
13
 
14
14
  let userData = {
15
- subAppId: '',
15
+ envName: 'localhost',
16
+ appId: '',
16
17
  instanceId: '',
17
18
  userId: ''
18
19
  };
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.updateBAEventParameters = exports.getBAEventParameters = void 0;
7
7
  let baEventParameters = {
8
+ envName: 'localhost',
9
+ appId: '',
8
10
  instanceId: '',
9
11
  userId: ''
10
12
  };
@@ -13,6 +13,10 @@ var _index = require("../../communication/http-client/index.js");
13
13
 
14
14
  var _config = require("./config.js");
15
15
 
16
+ var _appdynamics = require("../../analytics/appdynamics.js");
17
+
18
+ var _webAnalytics = require("../../analytics/web-analytics.js");
19
+
16
20
  const parseAppConfig = data => {
17
21
  const {
18
22
  activeEnv
@@ -22,6 +26,13 @@ const parseAppConfig = data => {
22
26
 
23
27
  if (data.env) delete data.env;
24
28
  (0, _config.setAppConfig)((0, _merge2.default)(data, activeEnvConfig));
29
+ sessionStorage.setItem('envName', activeEnv);
30
+ (0, _appdynamics.setAppDynamicsUserData)({
31
+ envName: activeEnv
32
+ });
33
+ (0, _webAnalytics.updateBAEventParameters)({
34
+ envName: activeEnv
35
+ });
25
36
  };
26
37
 
27
38
  const loadAppConfig = (hostUrl = './') => new Promise((resolve, reject) => {
@@ -163,21 +163,20 @@ class CMicroAppGuest {
163
163
 
164
164
  __webpack_public_path__ = __webpack_public_path__.replace(/\/?$/, '/');
165
165
  return (0, _index.loadAppConfig)(__webpack_public_path__).then(() => {
166
+ const instanceId = this.getSessionStorageItem('instanceId') || '';
167
+ const userId = this.getSessionStorageItem('userId') || '';
168
+ (0, _webAnalytics.updateBAEventParameters)({
169
+ appId: this.appId,
170
+ instanceId,
171
+ userId
172
+ });
173
+ (0, _appdynamics.setAppDynamicsUserData)({
174
+ appId: this.appId,
175
+ instanceId,
176
+ userId
177
+ });
166
178
  if (this.onInit) this.onInit(this.props);
167
179
  });
168
- /* eslint-enable camelcase, no-undef */
169
-
170
- const instanceId = this.getSessionStorageItem('instanceId') || '';
171
- const userId = this.getSessionStorageItem('userId') || '';
172
- (0, _webAnalytics.updateBAEventParameters)({
173
- instanceId,
174
- userId
175
- });
176
- (0, _appdynamics.setAppDynamicsUserData)({
177
- subAppId: this.appId,
178
- instanceId,
179
- userId
180
- });
181
180
  }
182
181
 
183
182
  mount(options = {
@@ -39,6 +39,8 @@ var _index3 = require("../../analytics/index.js");
39
39
 
40
40
  var _appdynamics = require("../../analytics/appdynamics.js");
41
41
 
42
+ var _webAnalytics = require("../../analytics/web-analytics.js");
43
+
42
44
  class CMicroAppHost {
43
45
  constructor(params) {
44
46
  (0, _defineProperty2.default)(this, "logger", void 0);
@@ -68,12 +70,11 @@ class CMicroAppHost {
68
70
  (0, _index2.loadAppConfig)(__webpack_public_path__).then(() => {
69
71
  if (this.onInit) this.onInit(this.props);
70
72
  }).catch(() => {});
71
- /* eslint-enable camelcase, no-undef */
72
-
73
+ (0, _webAnalytics.updateBAEventParameters)({
74
+ appId: this.appId
75
+ });
73
76
  (0, _appdynamics.setAppDynamicsUserData)({
74
- subAppId: this.appId,
75
- instanceId: '',
76
- userId: ''
77
+ appId: this.appId
77
78
  });
78
79
  }
79
80
 
@@ -1,6 +1,7 @@
1
1
  import * as brum from '@elliemae/pui-user-monitoring';
2
2
  let userData = {
3
- subAppId: '',
3
+ envName: 'localhost',
4
+ appId: '',
4
5
  instanceId: '',
5
6
  userId: ''
6
7
  };
@@ -1,4 +1,6 @@
1
1
  let baEventParameters = {
2
+ envName: 'localhost',
3
+ appId: '',
2
4
  instanceId: '',
3
5
  userId: ''
4
6
  };
@@ -1,2 +1 @@
1
- // import original module declarations
2
1
  import 'styled-components';
@@ -1,6 +1,8 @@
1
1
  import _merge from "lodash/merge";
2
2
  import { getHTTPClient } from "../../communication/http-client/index.js";
3
3
  import { setAppConfig } from "./config.js";
4
+ import { setAppDynamicsUserData } from "../../analytics/appdynamics.js";
5
+ import { updateBAEventParameters } from "../../analytics/web-analytics.js";
4
6
 
5
7
  const parseAppConfig = data => {
6
8
  const {
@@ -11,6 +13,13 @@ const parseAppConfig = data => {
11
13
 
12
14
  if (data.env) delete data.env;
13
15
  setAppConfig(_merge(data, activeEnvConfig));
16
+ sessionStorage.setItem('envName', activeEnv);
17
+ setAppDynamicsUserData({
18
+ envName: activeEnv
19
+ });
20
+ updateBAEventParameters({
21
+ envName: activeEnv
22
+ });
14
23
  };
15
24
 
16
25
  export const loadAppConfig = (hostUrl = './') => new Promise((resolve, reject) => {
@@ -149,21 +149,20 @@ export class CMicroAppGuest {
149
149
 
150
150
  __webpack_public_path__ = __webpack_public_path__.replace(/\/?$/, '/');
151
151
  return loadAppConfig(__webpack_public_path__).then(() => {
152
+ const instanceId = this.getSessionStorageItem('instanceId') || '';
153
+ const userId = this.getSessionStorageItem('userId') || '';
154
+ updateBAEventParameters({
155
+ appId: this.appId,
156
+ instanceId,
157
+ userId
158
+ });
159
+ setAppDynamicsUserData({
160
+ appId: this.appId,
161
+ instanceId,
162
+ userId
163
+ });
152
164
  if (this.onInit) this.onInit(this.props);
153
165
  });
154
- /* eslint-enable camelcase, no-undef */
155
-
156
- const instanceId = this.getSessionStorageItem('instanceId') || '';
157
- const userId = this.getSessionStorageItem('userId') || '';
158
- updateBAEventParameters({
159
- instanceId,
160
- userId
161
- });
162
- setAppDynamicsUserData({
163
- subAppId: this.appId,
164
- instanceId,
165
- userId
166
- });
167
166
  }
168
167
 
169
168
  mount(options = {
@@ -14,6 +14,7 @@ import { HOST_WINDOW_RESIZED, HOST_WINDOW_BREAKPOINT_CHANGED } from "../constant
14
14
  import { getCurrentBreakpoint, getViewportSize as getWindowViewportSize } from "../window.js";
15
15
  import { sendBAEvent } from "../../analytics/index.js";
16
16
  import { setAppDynamicsUserData } from "../../analytics/appdynamics.js";
17
+ import { updateBAEventParameters } from "../../analytics/web-analytics.js";
17
18
  export class CMicroAppHost {
18
19
  constructor(params) {
19
20
  _defineProperty(this, "logger", void 0);
@@ -49,12 +50,11 @@ export class CMicroAppHost {
49
50
  loadAppConfig(__webpack_public_path__).then(() => {
50
51
  if (this.onInit) this.onInit(this.props);
51
52
  }).catch(() => {});
52
- /* eslint-enable camelcase, no-undef */
53
-
53
+ updateBAEventParameters({
54
+ appId: this.appId
55
+ });
54
56
  setAppDynamicsUserData({
55
- subAppId: this.appId,
56
- instanceId: '',
57
- userId: ''
57
+ appId: this.appId
58
58
  });
59
59
  }
60
60
 
@@ -1,5 +1,6 @@
1
1
  interface AppDynamicsUserData {
2
- subAppId: string;
2
+ envName: string;
3
+ appId: string;
3
4
  instanceId?: string;
4
5
  userId?: string;
5
6
  [key: string]: any;
@@ -1,4 +1,6 @@
1
1
  interface BAEventParameters {
2
+ envName?: string;
3
+ appId?: string;
2
4
  instanceId?: string;
3
5
  userId?: string;
4
6
  [key: string]: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-app-sdk",
3
- "version": "2.14.0",
3
+ "version": "2.16.0",
4
4
  "description": "ICE MT UI Platform Application SDK ",
5
5
  "sideEffects": [
6
6
  "*.css",
@@ -102,16 +102,16 @@
102
102
  "devDependencies": {
103
103
  "@elliemae/app-react-dependencies": "~2.10.0",
104
104
  "@elliemae/browserslist-config-elliemae-latest-browsers": "~1.2.1",
105
- "@elliemae/ds-basic": "~1.59.5",
106
- "@elliemae/ds-date-picker": "~1.59.5",
107
- "@elliemae/ds-modal": "~1.59.5",
108
- "@elliemae/ds-popperjs": "~1.59.5",
105
+ "@elliemae/ds-basic": "~1.59.6",
106
+ "@elliemae/ds-date-picker": "~1.59.6",
107
+ "@elliemae/ds-modal": "~1.59.6",
108
+ "@elliemae/ds-popperjs": "~1.59.6",
109
109
  "@elliemae/em-ssf-guest": "~1.11.1",
110
- "@elliemae/pui-cli": "~5.16.1",
111
- "@elliemae/pui-diagnostics": "~2.7.0",
110
+ "@elliemae/pui-cli": "~5.17.0",
111
+ "@elliemae/pui-diagnostics": "~2.7.1",
112
112
  "@elliemae/pui-e2e-test-sdk": "~6.6.0",
113
113
  "@elliemae/pui-micro-frontend-base": "~1.9.0",
114
- "@elliemae/pui-theme": "~2.2.5",
115
- "@elliemae/pui-user-monitoring": "~1.10.0"
114
+ "@elliemae/pui-theme": "~2.2.6",
115
+ "@elliemae/pui-user-monitoring": "~1.11.1"
116
116
  }
117
117
  }