@elliemae/pui-app-sdk 2.12.3 → 2.13.2

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.
Files changed (231) hide show
  1. package/dist/cjs/analytics/appdynamics.js +36 -0
  2. package/dist/cjs/analytics/index.js +15 -13
  3. package/dist/cjs/analytics/page-view-event.js +16 -19
  4. package/dist/cjs/analytics/user-session-event.js +13 -14
  5. package/dist/cjs/analytics/user-wait-event.js +4 -4
  6. package/dist/cjs/analytics/{ba-event-parameters.js → web-analytics.js} +2 -2
  7. package/dist/cjs/api/auth/index.js +13 -20
  8. package/dist/cjs/api/helpers.js +4 -16
  9. package/dist/cjs/api/users/index.js +4 -5
  10. package/dist/cjs/communication/http-client/index.js +16 -21
  11. package/dist/cjs/communication/http-client/retry-axios.js +0 -2
  12. package/dist/cjs/communication/http-client/tests/index.test-disable.js +5 -6
  13. package/dist/cjs/data/auth/actions.js +22 -28
  14. package/dist/cjs/data/breakpoint/index.js +1 -3
  15. package/dist/cjs/data/live-message/index.js +8 -11
  16. package/dist/cjs/data/reducers.js +1 -2
  17. package/dist/cjs/data/store.js +4 -8
  18. package/dist/cjs/data/wait-message/actions.js +6 -9
  19. package/dist/cjs/data/wait-message/reducer.js +13 -17
  20. package/dist/cjs/index.js +21 -15
  21. package/dist/cjs/route/index.js +23 -12
  22. package/dist/cjs/route/{usePageView.js → page-view.js} +12 -22
  23. package/dist/cjs/route/private-route/index.js +9 -10
  24. package/dist/cjs/sideeffect/auth/index.js +6 -10
  25. package/dist/cjs/utils/app-config/config.js +3 -14
  26. package/dist/cjs/utils/app-config/index.js +11 -15
  27. package/dist/cjs/utils/app-host-integration/react.js +7 -10
  28. package/dist/cjs/utils/auth/index.js +40 -44
  29. package/dist/cjs/utils/font-size.js +1 -1
  30. package/dist/cjs/utils/helpers.js +0 -6
  31. package/dist/cjs/utils/log-records.js +7 -7
  32. package/dist/cjs/utils/micro-frontend/guest.js +31 -8
  33. package/dist/cjs/utils/micro-frontend/host.js +14 -7
  34. package/dist/cjs/utils/micro-frontend/index.js +2 -4
  35. package/dist/cjs/utils/redact-pii.js +39 -0
  36. package/dist/cjs/utils/service-worker.js +2 -5
  37. package/dist/cjs/utils/session.js +2 -8
  38. package/dist/cjs/utils/storybook/theme.js +9 -12
  39. package/dist/cjs/utils/testing/index.js +9 -18
  40. package/dist/cjs/utils/testing/render-with-redux.js +11 -14
  41. package/dist/cjs/utils/testing/render-with-router-redux.js +17 -20
  42. package/dist/cjs/utils/testing/render-with-router.js +13 -16
  43. package/dist/cjs/utils/testing/render-with-state-addons.js +7 -16
  44. package/dist/cjs/utils/url.js +0 -8
  45. package/dist/cjs/utils/web-storage.js +1 -7
  46. package/dist/cjs/utils/window.js +0 -2
  47. package/dist/cjs/view/app-root/hosted-app.js +5 -8
  48. package/dist/cjs/view/app-root/index.js +20 -23
  49. package/dist/cjs/view/app-root/stand-alone-app.js +5 -8
  50. package/dist/cjs/view/app-root/style.js +5 -12
  51. package/dist/cjs/view/error-toast/index.stories.js +22 -31
  52. package/dist/cjs/view/fetch-host-app-data/store.js +1 -5
  53. package/dist/cjs/view/fields/check-box/index.js +20 -32
  54. package/dist/cjs/view/fields/check-box/index.stories.js +20 -24
  55. package/dist/cjs/view/fields/check-box/set-value.stories.js +17 -21
  56. package/dist/cjs/view/fields/combo-box/index.js +22 -28
  57. package/dist/cjs/view/fields/connect-form.js +3 -4
  58. package/dist/cjs/view/fields/date-input/index.js +15 -21
  59. package/dist/cjs/view/fields/date-picker/index.js +15 -21
  60. package/dist/cjs/view/fields/form-item-layout/index.js +16 -20
  61. package/dist/cjs/view/fields/input-mask/index.js +16 -28
  62. package/dist/cjs/view/fields/large-text-box/index.js +15 -21
  63. package/dist/cjs/view/fields/radio/index.js +20 -26
  64. package/dist/cjs/view/fields/radio/index.stories.js +17 -21
  65. package/dist/cjs/view/fields/radio/set-value.stories.js +15 -19
  66. package/dist/cjs/view/fields/radio-group/index.js +16 -22
  67. package/dist/cjs/view/fields/radio-group/index.stories.js +37 -44
  68. package/dist/cjs/view/fields/text-box/index.js +15 -21
  69. package/dist/cjs/view/fields/watch-value.js +4 -5
  70. package/dist/cjs/view/form/index.js +9 -10
  71. package/dist/cjs/view/form/index.stories.js +3 -6
  72. package/dist/cjs/view/form/submit-button/index.js +2 -3
  73. package/dist/cjs/view/form/usecases.stories.js +3 -6
  74. package/dist/cjs/view/guest-unload-handlers/index.js +1 -2
  75. package/dist/cjs/view/header/center-region/index.js +8 -20
  76. package/dist/cjs/view/header/index.js +8 -11
  77. package/dist/cjs/view/host-binding-events/index.js +2 -2
  78. package/dist/cjs/view/live-message/index.stories.js +0 -6
  79. package/dist/cjs/view/loadable/index.js +1 -2
  80. package/dist/cjs/view/login/index.js +5 -6
  81. package/dist/cjs/view/media-breakpoint/index.js +1 -1
  82. package/dist/cjs/view/message-to-host-app/index.js +1 -2
  83. package/dist/cjs/view/micro-app/app-factory/index.js +30 -48
  84. package/dist/cjs/view/micro-app/index.js +1 -1
  85. package/dist/cjs/view/micro-app/resources/manifest.js +27 -39
  86. package/dist/cjs/view/micro-app/resources/script.js +22 -35
  87. package/dist/cjs/view/micro-app/resources/style.js +20 -33
  88. package/dist/cjs/view/micro-app/use-app-will-render.js +12 -12
  89. package/dist/cjs/view/micro-app/utils.js +0 -6
  90. package/dist/cjs/view/micro-iframe-app/app.js +6 -9
  91. package/dist/cjs/view/micro-iframe-app/iframe/index.js +8 -9
  92. package/dist/cjs/view/micro-iframe-app/index.js +4 -7
  93. package/dist/cjs/view/micro-iframe-app/use-frame-loaded.js +5 -12
  94. package/dist/cjs/view/modals/error/index.js +6 -13
  95. package/dist/cjs/view/modals/navigation-prompt/index.js +4 -11
  96. package/dist/cjs/view/modals/session-expiry/customHooks.js +3 -5
  97. package/dist/cjs/view/modals/session-expiry/index.js +6 -13
  98. package/dist/cjs/view/modals/wait-message/html-wait-message.js +3 -4
  99. package/dist/cjs/view/modals/wait-message/index.js +8 -9
  100. package/dist/cjs/view/modals/wait-message/index.stories.js +4 -5
  101. package/dist/cjs/view/render-with-delay/index.js +3 -6
  102. package/dist/cjs/view/render-with-host-data/index.js +0 -2
  103. package/dist/cjs/view/session-timeout/index.js +0 -2
  104. package/dist/cjs/view/useMediaBreakpoints/index.js +0 -12
  105. package/dist/es/analytics/appdynamics.js +18 -0
  106. package/dist/es/analytics/index.js +14 -13
  107. package/dist/es/analytics/page-view-event.js +16 -19
  108. package/dist/es/analytics/user-session-event.js +12 -13
  109. package/dist/es/analytics/user-wait-event.js +4 -4
  110. package/dist/es/analytics/{ba-event-parameters.js → web-analytics.js} +2 -2
  111. package/dist/es/api/auth/index.js +13 -18
  112. package/dist/es/api/helpers.js +4 -14
  113. package/dist/es/api/users/index.js +4 -5
  114. package/dist/es/communication/http-client/index.js +16 -20
  115. package/dist/es/communication/http-client/retry-axios.js +0 -2
  116. package/dist/es/communication/http-client/tests/index.test-disable.js +5 -6
  117. package/dist/es/data/auth/actions.js +22 -28
  118. package/dist/es/data/breakpoint/index.js +1 -3
  119. package/dist/es/data/live-message/index.js +8 -11
  120. package/dist/es/data/reducers.js +1 -2
  121. package/dist/es/data/store.js +4 -8
  122. package/dist/es/data/wait-message/actions.js +6 -9
  123. package/dist/es/data/wait-message/reducer.js +12 -16
  124. package/dist/es/index.js +4 -1
  125. package/dist/es/route/index.js +23 -13
  126. package/dist/es/route/page-view.js +15 -0
  127. package/dist/es/route/private-route/index.js +9 -10
  128. package/dist/es/sideeffect/auth/index.js +6 -10
  129. package/dist/es/utils/app-config/config.js +3 -14
  130. package/dist/es/utils/app-config/index.js +11 -15
  131. package/dist/es/utils/app-host-integration/react.js +7 -10
  132. package/dist/es/utils/auth/index.js +39 -41
  133. package/dist/es/utils/font-size.js +1 -1
  134. package/dist/es/utils/helpers.js +0 -3
  135. package/dist/es/utils/log-records.js +7 -7
  136. package/dist/es/utils/micro-frontend/guest.js +29 -6
  137. package/dist/es/utils/micro-frontend/host.js +13 -7
  138. package/dist/es/utils/micro-frontend/index.js +2 -3
  139. package/dist/es/utils/redact-pii.js +31 -0
  140. package/dist/es/utils/service-worker.js +2 -4
  141. package/dist/es/utils/session.js +2 -8
  142. package/dist/es/utils/storybook/theme.js +9 -12
  143. package/dist/es/utils/testing/index.js +9 -12
  144. package/dist/es/utils/testing/render-with-redux.js +11 -14
  145. package/dist/es/utils/testing/render-with-router-redux.js +17 -20
  146. package/dist/es/utils/testing/render-with-router.js +13 -16
  147. package/dist/es/utils/testing/render-with-state-addons.js +7 -12
  148. package/dist/es/utils/url.js +0 -4
  149. package/dist/es/utils/web-storage.js +1 -4
  150. package/dist/es/utils/window.js +0 -1
  151. package/dist/es/view/app-root/hosted-app.js +5 -8
  152. package/dist/es/view/app-root/index.js +20 -23
  153. package/dist/es/view/app-root/stand-alone-app.js +5 -8
  154. package/dist/es/view/app-root/style.js +5 -10
  155. package/dist/es/view/error-toast/index.stories.js +22 -30
  156. package/dist/es/view/fetch-host-app-data/store.js +1 -5
  157. package/dist/es/view/fields/check-box/index.js +20 -26
  158. package/dist/es/view/fields/check-box/index.stories.js +20 -24
  159. package/dist/es/view/fields/check-box/set-value.stories.js +17 -21
  160. package/dist/es/view/fields/combo-box/index.js +22 -28
  161. package/dist/es/view/fields/connect-form.js +3 -4
  162. package/dist/es/view/fields/date-input/index.js +15 -21
  163. package/dist/es/view/fields/date-picker/index.js +15 -21
  164. package/dist/es/view/fields/form-item-layout/index.js +16 -20
  165. package/dist/es/view/fields/input-mask/index.js +16 -22
  166. package/dist/es/view/fields/large-text-box/index.js +15 -21
  167. package/dist/es/view/fields/radio/index.js +20 -26
  168. package/dist/es/view/fields/radio/index.stories.js +17 -21
  169. package/dist/es/view/fields/radio/set-value.stories.js +15 -19
  170. package/dist/es/view/fields/radio-group/index.js +16 -22
  171. package/dist/es/view/fields/radio-group/index.stories.js +37 -44
  172. package/dist/es/view/fields/text-box/index.js +15 -21
  173. package/dist/es/view/fields/watch-value.js +4 -5
  174. package/dist/es/view/form/index.js +9 -10
  175. package/dist/es/view/form/index.stories.js +3 -6
  176. package/dist/es/view/form/submit-button/index.js +2 -3
  177. package/dist/es/view/form/usecases.stories.js +3 -6
  178. package/dist/es/view/guest-unload-handlers/index.js +1 -2
  179. package/dist/es/view/header/center-region/index.js +8 -17
  180. package/dist/es/view/header/index.js +8 -11
  181. package/dist/es/view/host-binding-events/index.js +2 -2
  182. package/dist/es/view/live-message/index.stories.js +0 -1
  183. package/dist/es/view/loadable/index.js +1 -2
  184. package/dist/es/view/login/index.js +5 -6
  185. package/dist/es/view/media-breakpoint/index.js +1 -1
  186. package/dist/es/view/message-to-host-app/index.js +1 -2
  187. package/dist/es/view/micro-app/app-factory/index.js +30 -42
  188. package/dist/es/view/micro-app/index.js +1 -1
  189. package/dist/es/view/micro-app/resources/manifest.js +26 -31
  190. package/dist/es/view/micro-app/resources/script.js +21 -31
  191. package/dist/es/view/micro-app/resources/style.js +20 -30
  192. package/dist/es/view/micro-app/use-app-will-render.js +12 -12
  193. package/dist/es/view/micro-app/utils.js +0 -3
  194. package/dist/es/view/micro-iframe-app/app.js +6 -8
  195. package/dist/es/view/micro-iframe-app/iframe/index.js +8 -9
  196. package/dist/es/view/micro-iframe-app/index.js +4 -6
  197. package/dist/es/view/micro-iframe-app/use-frame-loaded.js +5 -9
  198. package/dist/es/view/modals/error/index.js +6 -8
  199. package/dist/es/view/modals/navigation-prompt/index.js +4 -5
  200. package/dist/es/view/modals/session-expiry/customHooks.js +3 -4
  201. package/dist/es/view/modals/session-expiry/index.js +6 -8
  202. package/dist/es/view/modals/wait-message/html-wait-message.js +3 -4
  203. package/dist/es/view/modals/wait-message/index.js +8 -9
  204. package/dist/es/view/modals/wait-message/index.stories.js +4 -5
  205. package/dist/es/view/render-with-delay/index.js +3 -5
  206. package/dist/es/view/render-with-host-data/index.js +0 -1
  207. package/dist/es/view/session-timeout/index.js +0 -1
  208. package/dist/es/view/useMediaBreakpoints/index.js +0 -6
  209. package/dist/types/analytics/appdynamics.d.ts +9 -0
  210. package/dist/types/analytics/index.d.ts +2 -2
  211. package/dist/types/analytics/web-analytics.d.ts +8 -0
  212. package/dist/types/index.d.ts +3 -1
  213. package/dist/types/route/page-view.d.ts +1 -0
  214. package/dist/types/utils/micro-frontend/guest.d.ts +1 -0
  215. package/dist/types/utils/micro-frontend/host.d.ts +1 -1
  216. package/dist/types/utils/redact-pii.d.ts +1 -0
  217. package/dist/types/view/visually-hidden/index.d.ts +1 -1
  218. package/package.json +7 -3
  219. package/dist/es/route/usePageView.js +0 -18
  220. package/dist/public/app.config.json +0 -129
  221. package/dist/public/assets/index.ad459dcebaa616bff55e77d860405729.svg +0 -1
  222. package/dist/public/assets/index.dae17c8817fd9c5ab29e7c3a8925a1f4.svg +0 -1
  223. package/dist/public/assets/logo.0cbd33c5006f8ea6d106f8ab13f6e6dc.svg +0 -1
  224. package/dist/public/iframe.b3911eaf1a99a53ef7b10a1e1f0bdfc4.html +0 -8
  225. package/dist/public/index.html +0 -5
  226. package/dist/public/js/emuiAppSdk.e28a62497e211b4c6132.js +0 -3
  227. package/dist/public/js/emuiAppSdk.e28a62497e211b4c6132.js.LICENSE.txt +0 -95
  228. package/dist/public/js/emuiAppSdk.e28a62497e211b4c6132.js.gz +0 -0
  229. package/dist/public/js/emuiAppSdk.e28a62497e211b4c6132.js.map +0 -1
  230. package/dist/types/analytics/ba-event-parameters.d.ts +0 -8
  231. package/dist/types/route/usePageView.d.ts +0 -1
package/dist/cjs/index.js CHANGED
@@ -1,17 +1,5 @@
1
1
  "use strict";
2
2
 
3
- require("core-js/modules/esnext.weak-map.delete-all.js");
4
-
5
- require("core-js/modules/esnext.weak-map.emplace.js");
6
-
7
- require("core-js/modules/web.dom-collections.iterator.js");
8
-
9
- require("core-js/modules/esnext.async-iterator.for-each.js");
10
-
11
- require("core-js/modules/esnext.iterator.constructor.js");
12
-
13
- require("core-js/modules/esnext.iterator.for-each.js");
14
-
15
3
  Object.defineProperty(exports, "__esModule", {
16
4
  value: true
17
5
  });
@@ -103,8 +91,10 @@ var _exportNames = {
103
91
  MicroIFrameApp: true,
104
92
  getNavigationLinks: true,
105
93
  RegisterService: true,
94
+ setAppDynamicsUserData: true,
106
95
  sendBAEvent: true,
107
- updateBAEventParameters: true
96
+ updateBAEventParameters: true,
97
+ redactPii: true
108
98
  };
109
99
  Object.defineProperty(exports, "AppRoot", {
110
100
  enumerable: true,
@@ -502,6 +492,12 @@ Object.defineProperty(exports, "onGuestUnloadStart", {
502
492
  return _index13.onGuestUnloadStart;
503
493
  }
504
494
  });
495
+ Object.defineProperty(exports, "redactPii", {
496
+ enumerable: true,
497
+ get: function () {
498
+ return _redactPii.redactPii;
499
+ }
500
+ });
505
501
  Object.defineProperty(exports, "removeDoubleSlash", {
506
502
  enumerable: true,
507
503
  get: function () {
@@ -568,6 +564,12 @@ Object.defineProperty(exports, "setAppConfigValue", {
568
564
  return _config.setAppConfigValue;
569
565
  }
570
566
  });
567
+ Object.defineProperty(exports, "setAppDynamicsUserData", {
568
+ enumerable: true,
569
+ get: function () {
570
+ return _appdynamics.setAppDynamicsUserData;
571
+ }
572
+ });
571
573
  Object.defineProperty(exports, "setHostAppData", {
572
574
  enumerable: true,
573
575
  get: function () {
@@ -595,7 +597,7 @@ Object.defineProperty(exports, "trackActivity", {
595
597
  Object.defineProperty(exports, "updateBAEventParameters", {
596
598
  enumerable: true,
597
599
  get: function () {
598
- return _baEventParameters.updateBAEventParameters;
600
+ return _webAnalytics.updateBAEventParameters;
599
601
  }
600
602
  });
601
603
  Object.defineProperty(exports, "useAppDispatch", {
@@ -787,9 +789,13 @@ var _utils = require("./view/micro-app/utils.js");
787
789
 
788
790
  var _guestWithService = require("./utils/guest-with-service.js");
789
791
 
792
+ var _appdynamics = require("./analytics/appdynamics.js");
793
+
790
794
  var _index38 = require("./analytics/index.js");
791
795
 
792
- var _baEventParameters = require("./analytics/ba-event-parameters.js");
796
+ var _webAnalytics = require("./analytics/web-analytics.js");
797
+
798
+ var _redactPii = require("./utils/redact-pii.js");
793
799
 
794
800
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
795
801
 
@@ -9,23 +9,34 @@ exports.AppRoute = void 0;
9
9
 
10
10
  var _jsx3 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
11
11
 
12
- var _reactRouterDom = require("react-router-dom");
13
-
14
12
  var _reactHelmet = require("react-helmet");
15
13
 
16
- var _usePageView = require("./usePageView.js");
14
+ var _react = require("react");
15
+
16
+ var _reactRouterDom = require("react-router-dom");
17
+
18
+ var _pageView = require("./page-view.js");
17
19
 
18
20
  var _jsxRuntime = require("react/jsx-runtime");
19
21
 
20
- const AppRoute = _ref => {
21
- let {
22
- pageTitle = 'ICE Mortgage Technology',
23
- ...rest
24
- } = _ref;
25
- (0, _usePageView.usePageView)(pageTitle);
26
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
27
- children: [/*#__PURE__*/(0, _jsx3.default)(_reactHelmet.Helmet, {}, void 0, /*#__PURE__*/(0, _jsx3.default)("title", {}, void 0, pageTitle)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Route, { ...rest
28
- })]
22
+ const AppRoute = ({
23
+ component: Component,
24
+ render,
25
+ children,
26
+ pageTitle = 'ICE',
27
+ ...rest
28
+ }) => {
29
+ var _Helmet;
30
+
31
+ const memoizedRender = (0, _react.useCallback)(routeProps => render && typeof render === 'function' ? render(routeProps) : Component && /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, { ...routeProps
32
+ }), [Component, render]);
33
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Route, { ...rest,
34
+ render: routeProps => {
35
+ (0, _pageView.onPageView)(pageTitle);
36
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
37
+ children: [_Helmet || (_Helmet = /*#__PURE__*/(0, _jsx3.default)(_reactHelmet.Helmet, {}, void 0, /*#__PURE__*/(0, _jsx3.default)("title", {}, void 0, pageTitle))), children || memoizedRender(routeProps)]
38
+ });
39
+ }
29
40
  });
30
41
  };
31
42
 
@@ -1,17 +1,9 @@
1
1
  "use strict";
2
2
 
3
- require("core-js/modules/esnext.weak-map.delete-all.js");
4
-
5
- require("core-js/modules/esnext.weak-map.emplace.js");
6
-
7
- require("core-js/modules/web.dom-collections.iterator.js");
8
-
9
3
  Object.defineProperty(exports, "__esModule", {
10
4
  value: true
11
5
  });
12
- exports.usePageView = void 0;
13
-
14
- var _react = require("react");
6
+ exports.onPageView = void 0;
15
7
 
16
8
  var brum = _interopRequireWildcard(require("@elliemae/pui-user-monitoring"));
17
9
 
@@ -21,20 +13,18 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
21
13
 
22
14
  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; }
23
15
 
24
- const usePageView = title => {
25
- (0, _react.useEffect)(() => {
26
- try {
27
- if (brum && title) {
28
- brum.setCustomVirtualPageName(title);
29
- brum.startVirtualPageMonitoringWithAutoEnd(title);
30
- }
31
- } catch {// eslint-disable-next-line no-empty
16
+ const onPageView = pageTitle => {
17
+ try {
18
+ if (brum && pageTitle) {
19
+ brum.setCustomVirtualPageName(pageTitle);
20
+ brum.startVirtualPageMonitoringWithAutoEnd(pageTitle);
32
21
  }
22
+ } catch {// eslint-disable-next-line no-empty
23
+ }
33
24
 
34
- (0, _pageViewEvent.pageViewEvent)({
35
- pageTitle: title
36
- });
37
- }, [title]);
25
+ (0, _pageViewEvent.pageViewEvent)({
26
+ pageTitle
27
+ });
38
28
  };
39
29
 
40
- exports.usePageView = usePageView;
30
+ exports.onPageView = onPageView;
@@ -31,18 +31,17 @@ var _jsxRuntime = require("react/jsx-runtime");
31
31
 
32
32
  const key = 'auth';
33
33
 
34
- const PrivateRoute = _ref => {
34
+ const PrivateRoute = ({
35
+ component: Component,
36
+ render,
37
+ children,
38
+ clientId = _constants.default.CLIENT_ID,
39
+ scope = 'loc',
40
+ responseType = 'code',
41
+ ...rest
42
+ }) => {
35
43
  var _Login;
36
44
 
37
- let {
38
- component: Component,
39
- render,
40
- children,
41
- clientId = _constants.default.CLIENT_ID,
42
- scope = 'loc',
43
- responseType = 'code',
44
- ...rest
45
- } = _ref;
46
45
  (0, _reduxInjectors.useInjectReducer)({
47
46
  key,
48
47
  reducer: _reducer.authReducer
@@ -17,11 +17,9 @@ var _index2 = require("../../utils/micro-frontend/index.js");
17
17
 
18
18
  var _logRecords = require("../../utils/log-records.js");
19
19
 
20
- function* login(_ref) {
21
- let {
22
- payload
23
- } = _ref;
24
-
20
+ function* login({
21
+ payload
22
+ }) {
25
23
  try {
26
24
  yield (0, _effects.call)(_index.authorize, payload);
27
25
  yield (0, _effects.put)({
@@ -34,11 +32,9 @@ function* login(_ref) {
34
32
  }
35
33
  }
36
34
 
37
- function* logout(_ref2) {
38
- let {
39
- payload
40
- } = _ref2;
41
-
35
+ function* logout({
36
+ payload
37
+ }) {
42
38
  try {
43
39
  yield (0, _effects.call)(_index.endSession, payload);
44
40
  } catch (err) {
@@ -24,25 +24,14 @@ const setAppConfig = config => {
24
24
 
25
25
  exports.setAppConfig = setAppConfig;
26
26
 
27
- const getAppConfigValue = function () {
28
- let key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
29
- let defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
30
- return (0, _clone2.default)((0, _get2.default)(gAppConfig, key, defaultValue));
31
- };
27
+ const getAppConfigValue = (key = '', defaultValue = null) => (0, _clone2.default)((0, _get2.default)(gAppConfig, key, defaultValue));
32
28
 
33
29
  exports.getAppConfigValue = getAppConfigValue;
34
30
 
35
- const setAppConfigValue = function () {
36
- let key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
37
- let value = arguments.length > 1 ? arguments[1] : undefined;
38
- return (0, _set2.default)(gAppConfig, key, value);
39
- };
31
+ const setAppConfigValue = (key = '', value) => (0, _set2.default)(gAppConfig, key, value);
40
32
 
41
33
  exports.setAppConfigValue = setAppConfigValue;
42
34
 
43
- const hasItem = function () {
44
- let key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
45
- return (0, _has2.default)(gAppConfig, key);
46
- };
35
+ const hasItem = (key = '') => (0, _has2.default)(gAppConfig, key);
47
36
 
48
37
  exports.hasItem = hasItem;
@@ -24,21 +24,17 @@ const parseAppConfig = data => {
24
24
  (0, _config.setAppConfig)((0, _merge2.default)(data, activeEnvConfig));
25
25
  };
26
26
 
27
- const loadAppConfig = function () {
28
- let hostUrl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : './';
29
- return new Promise((resolve, reject) => {
30
- (0, _index.getHTTPClient)({
31
- baseURL: hostUrl
32
- }).get('app.config.json').then(_ref => {
33
- let {
34
- data
35
- } = _ref;
36
- parseAppConfig(data);
37
- resolve();
38
- }).catch(err => {
39
- reject(new Error("Unable to load application configurtion file. ".concat(err.Message)));
40
- });
27
+ const loadAppConfig = (hostUrl = './') => new Promise((resolve, reject) => {
28
+ (0, _index.getHTTPClient)({
29
+ baseURL: hostUrl
30
+ }).get('app.config.json').then(({
31
+ data
32
+ }) => {
33
+ parseAppConfig(data);
34
+ resolve();
35
+ }).catch(err => {
36
+ reject(new Error(`Unable to load application configurtion file. ${err.Message}`));
41
37
  });
42
- };
38
+ });
43
39
 
44
40
  exports.loadAppConfig = loadAppConfig;
@@ -7,15 +7,12 @@ exports.enableReactAppForHostIntegration = void 0;
7
7
 
8
8
  var _guest = require("../micro-frontend/guest.js");
9
9
 
10
- const enableReactAppForHostIntegration = _ref => {
11
- let {
12
- onInit,
13
- onMount
14
- } = _ref;
15
- return _guest.CMicroAppGuest.getInstance({
16
- onInit,
17
- onMount
18
- });
19
- };
10
+ const enableReactAppForHostIntegration = ({
11
+ onInit,
12
+ onMount
13
+ }) => _guest.CMicroAppGuest.getInstance({
14
+ onInit,
15
+ onMount
16
+ });
20
17
 
21
18
  exports.enableReactAppForHostIntegration = enableReactAppForHostIntegration;
@@ -5,14 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.navigateToLoginPage = exports.login = exports.isUserAuthorized = exports.getIDPInfoFromUrl = exports.endSession = exports.authorize = void 0;
7
7
 
8
- require("core-js/modules/web.dom-collections.iterator.js");
9
-
10
- require("core-js/modules/web.url.js");
11
-
12
- require("core-js/modules/web.url-search-params.js");
13
-
14
- require("core-js/modules/es.string.replace.js");
15
-
16
8
  var _history = require("../history.js");
17
9
 
18
10
  var _index = require("../../api/auth/index.js");
@@ -21,6 +13,8 @@ var _index2 = require("../../api/users/index.js");
21
13
 
22
14
  var _userSessionEvent = require("../../analytics/user-session-event.js");
23
15
 
16
+ var _appdynamics = require("../../analytics/appdynamics.js");
17
+
24
18
  var _helper = require("./helper.js");
25
19
 
26
20
  var _config = require("../app-config/config.js");
@@ -50,15 +44,14 @@ const getIDPInfoFromUrl = () => {
50
44
 
51
45
  exports.getIDPInfoFromUrl = getIDPInfoFromUrl;
52
46
 
53
- const navigateToLoginPage = _ref => {
54
- let {
55
- clientId,
56
- redirectUri,
57
- idpErrorCode,
58
- scope,
59
- // eslint-disable-next-line camelcase
60
- responseType
61
- } = _ref;
47
+ const navigateToLoginPage = ({
48
+ clientId,
49
+ redirectUri,
50
+ idpErrorCode,
51
+ scope,
52
+ // eslint-disable-next-line camelcase
53
+ responseType
54
+ }) => {
62
55
  const idpHost = (0, _config.getAppConfigValue)(IDP_ENDPOINT_CONFIG_KEY, '');
63
56
  const idpUrl = new URL('/authorize', idpHost);
64
57
  const idpOptions = {
@@ -76,15 +69,13 @@ const navigateToLoginPage = _ref => {
76
69
 
77
70
  exports.navigateToLoginPage = navigateToLoginPage;
78
71
 
79
- const endSession = async _ref2 => {
80
- let {
81
- clientId,
82
- redirectUri,
83
- responseType,
84
- scope,
85
- code = '1004'
86
- } = _ref2;
87
-
72
+ const endSession = async ({
73
+ clientId,
74
+ redirectUri,
75
+ responseType,
76
+ scope,
77
+ code = '1004'
78
+ }) => {
88
79
  try {
89
80
  const authorization = (0, _helper.getAuthorizationHeader)();
90
81
  sessionStorage.clear();
@@ -93,7 +84,11 @@ const endSession = async _ref2 => {
93
84
  clientId,
94
85
  token
95
86
  });
96
- (0, _userSessionEvent.logoutEvent)(); // redirect
87
+ (0, _userSessionEvent.logoutEvent)();
88
+ (0, _appdynamics.setAppDynamicsUserData)({
89
+ instanceId: '',
90
+ userId: ''
91
+ }); // redirect
97
92
 
98
93
  const idpHost = (0, _config.getAppConfigValue)(IDP_ENDPOINT_CONFIG_KEY, '');
99
94
  const logoutUrl = new URL('/authorize', idpHost);
@@ -116,15 +111,13 @@ const endSession = async _ref2 => {
116
111
 
117
112
  exports.endSession = endSession;
118
113
 
119
- const authorize = async _ref3 => {
120
- let {
121
- idpCode,
122
- redirectUri,
123
- clientId,
124
- scope,
125
- responseType
126
- } = _ref3;
127
-
114
+ const authorize = async ({
115
+ idpCode,
116
+ redirectUri,
117
+ clientId,
118
+ scope,
119
+ responseType
120
+ }) => {
128
121
  try {
129
122
  const {
130
123
  tokenType,
@@ -134,7 +127,7 @@ const authorize = async _ref3 => {
134
127
  redirectUri,
135
128
  clientId
136
129
  });
137
- const authorizationToken = "".concat(tokenType, " ").concat(accessToken);
130
+ const authorizationToken = `${tokenType} ${accessToken}`;
138
131
  (0, _helper.setAuthorizationHeader)(authorizationToken); // get user introspect data
139
132
 
140
133
  const introspectResponse = await (0, _index.introspectToken)({
@@ -151,7 +144,7 @@ const authorize = async _ref3 => {
151
144
  bearerToken,
152
145
  realm: instanceId,
153
146
  userName,
154
- sessionId: bearerToken.replace("".concat(instanceId, " "), '')
147
+ sessionId: bearerToken.replace(`${instanceId} `, '')
155
148
  };
156
149
  sessionStorage.setItem('cred', JSON.stringify(cred));
157
150
  sessionStorage.setItem('instanceId', instanceId);
@@ -159,6 +152,10 @@ const authorize = async _ref3 => {
159
152
  (0, _userSessionEvent.loginEvent)({
160
153
  instanceId,
161
154
  userId: userName
155
+ });
156
+ (0, _appdynamics.setAppDynamicsUserData)({
157
+ instanceId,
158
+ userId: userName
162
159
  }); // get user info
163
160
 
164
161
  const data = await (0, _index2.getUser)({
@@ -186,12 +183,11 @@ const authorize = async _ref3 => {
186
183
 
187
184
  exports.authorize = authorize;
188
185
 
189
- const login = async _ref4 => {
190
- let {
191
- clientId,
192
- scope,
193
- responseType
194
- } = _ref4;
186
+ const login = async ({
187
+ clientId,
188
+ scope,
189
+ responseType
190
+ }) => {
195
191
  const {
196
192
  idpCode,
197
193
  idpErrorCode,
@@ -10,6 +10,6 @@ const remToPx = rem => rem * parseFloat(docFontSize);
10
10
 
11
11
  exports.remToPx = remToPx;
12
12
 
13
- const pxToRem = px => "".concat(px / parseFloat(docFontSize), "rem");
13
+ const pxToRem = px => `${px / parseFloat(docFontSize)}rem`;
14
14
 
15
15
  exports.pxToRem = pxToRem;
@@ -5,12 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.isProd = exports.isCIBuild = exports.convertRelativeToAbsoluteUrl = void 0;
7
7
 
8
- require("core-js/modules/web.dom-collections.iterator.js");
9
-
10
- require("core-js/modules/web.url.js");
11
-
12
- require("core-js/modules/web.url-search-params.js");
13
-
14
8
  const isProd = () => process.env.NODE_ENV === 'production';
15
9
 
16
10
  exports.isProd = isProd;
@@ -23,31 +23,31 @@ const logRecords = {
23
23
  },
24
24
  ASSET_NOT_FOUND_IN_MANIFEST: assetName => ({
25
25
  code: 'appsdk05',
26
- msg: "Application load failed. unable to locate ".concat(assetName, " in the manifest")
26
+ msg: `Application load failed. unable to locate ${assetName} in the manifest`
27
27
  }),
28
28
  APP_INIT_FAILED: (appId, errMsg) => ({
29
29
  code: 'appsdk06',
30
- msg: "Application load failed. Unable to load one or more application resources for appId: ".concat(appId, ". ").concat(errMsg)
30
+ msg: `Application load failed. Unable to load one or more application resources for appId: ${appId}. ${errMsg}`
31
31
  }),
32
32
  APP_LOADING: appId => ({
33
33
  code: 'appsdk07',
34
- msg: "Application ".concat(appId, " is loading...")
34
+ msg: `Application ${appId} is loading...`
35
35
  }),
36
36
  APP_LOADING_COMPLETE: appId => ({
37
37
  code: 'appsdk08',
38
- msg: "Application ".concat(appId, " loaded")
38
+ msg: `Application ${appId} loaded`
39
39
  }),
40
40
  APP_UNLOADING: appId => ({
41
41
  code: 'appsdk09',
42
- msg: "Application ".concat(appId, " unloading...")
42
+ msg: `Application ${appId} unloading...`
43
43
  }),
44
44
  APP_UNLOADING_COMPLETE: appId => ({
45
45
  code: 'appsdk10',
46
- msg: "Application ".concat(appId, " unloaded")
46
+ msg: `Application ${appId} unloaded`
47
47
  }),
48
48
  SSF_HOST_OBJECT_NOT_FOUND: name => ({
49
49
  code: 'appsdk11',
50
- msg: "Parent window doesn't expose SSF Object named ".concat(name)
50
+ msg: `Parent window doesn't expose SSF Object named ${name}`
51
51
  }),
52
52
  LOGIN_FAILED: {
53
53
  code: 'appsdk12',
@@ -7,10 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.CMicroAppGuest = void 0;
9
9
 
10
- require("core-js/modules/web.dom-collections.iterator.js");
11
-
12
- require("core-js/modules/es.string.replace.js");
13
-
14
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
11
 
16
12
  var _merge2 = _interopRequireDefault(require("lodash/merge"));
@@ -33,6 +29,10 @@ var _consoleLogger = require("./console-logger.js");
33
29
 
34
30
  var _webStorage = require("../web-storage.js");
35
31
 
32
+ var _webAnalytics = require("../../analytics/web-analytics.js");
33
+
34
+ var _appdynamics = require("../../analytics/appdynamics.js");
35
+
36
36
  const isCrossDomain = () => {
37
37
  try {
38
38
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
@@ -117,6 +117,18 @@ class CMicroAppGuest {
117
117
  return this.props;
118
118
  }
119
119
 
120
+ getSessionStorageItem(key) {
121
+ var _this$props$host;
122
+
123
+ let value = sessionStorage.getItem(key);
124
+
125
+ if (!value && (_this$props$host = this.props.host) !== null && _this$props$host !== void 0 && _this$props$host.getItem) {
126
+ value = this.props.host.getItem(key);
127
+ }
128
+
129
+ return value;
130
+ }
131
+
120
132
  async getSSFHost() {
121
133
  let host = null;
122
134
 
@@ -154,12 +166,23 @@ class CMicroAppGuest {
154
166
  if (this.onInit) this.onInit(this.props);
155
167
  });
156
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
+ });
157
181
  }
158
182
 
159
- mount() {
160
- let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
161
- containerId: 'app-container'
162
- };
183
+ mount(options = {
184
+ containerId: 'app-container'
185
+ }) {
163
186
  this.containerId = options === null || options === void 0 ? void 0 : options.containerId;
164
187
  return Promise.resolve().then(() => {
165
188
  if (this.onMount) this.onMount(options);
@@ -37,6 +37,8 @@ var _window = require("../window.js");
37
37
 
38
38
  var _index3 = require("../../analytics/index.js");
39
39
 
40
+ var _appdynamics = require("../../analytics/appdynamics.js");
41
+
40
42
  class CMicroAppHost {
41
43
  constructor(params) {
42
44
  (0, _defineProperty2.default)(this, "logger", void 0);
@@ -67,6 +69,12 @@ class CMicroAppHost {
67
69
  if (this.onInit) this.onInit(this.props);
68
70
  }).catch(() => {});
69
71
  /* eslint-enable camelcase, no-undef */
72
+
73
+ (0, _appdynamics.setAppDynamicsUserData)({
74
+ subAppId: this.appId,
75
+ instanceId: '',
76
+ userId: ''
77
+ });
70
78
  }
71
79
 
72
80
  static getInstance(params) {
@@ -173,19 +181,18 @@ class CMicroAppHost {
173
181
  return (0, _pubsubJs.subscribe)(_constants.HOST_WINDOW_BREAKPOINT_CHANGED, (msg, data) => eventHandler(data));
174
182
  }
175
183
 
176
- setSystemVersion() {
177
- let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'latest';
184
+ setSystemVersion(version = 'latest') {
178
185
  window.emui.version = version;
179
186
  this.props.systemVersion = version;
180
- }
187
+ } // eslint-disable-next-line max-lines
181
188
 
182
- sendBAEvent(event) {
189
+
190
+ sendBAEvent(data) {
183
191
  (0, _index3.sendBAEvent)({
184
- event,
192
+ data,
185
193
  self: true
186
194
  });
187
- } // eslint-disable-next-line max-lines
188
-
195
+ }
189
196
 
190
197
  }
191
198
 
@@ -7,8 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.isStandAloneGuest = exports.isHost = exports.isGuest = exports.getMicroFrontEndAppConfig = exports.getLogger = void 0;
9
9
 
10
- require("core-js/modules/es.string.replace.js");
11
-
12
10
  var _merge2 = _interopRequireDefault(require("lodash/merge"));
13
11
 
14
12
  var _guest = require("./guest.js");
@@ -51,8 +49,8 @@ const getVersionedPath = path => {
51
49
  };
52
50
 
53
51
  const getMicroFrontEndAppConfig = appInfo => {
54
- const microFEAppConfig = (0, _config.getAppConfigValue)("microFrontendApps.".concat(appInfo.id));
55
- if (!microFEAppConfig) throw new Error("unable to locate application configuraiton for ".concat(appInfo.id, " under microFrontendApps section of app.config.json"));
52
+ const microFEAppConfig = (0, _config.getAppConfigValue)(`microFrontendApps.${appInfo.id}`);
53
+ if (!microFEAppConfig) throw new Error(`unable to locate application configuraiton for ${appInfo.id} under microFrontendApps section of app.config.json`);
56
54
  const {
57
55
  mode = 'production'
58
56
  } = microFEAppConfig;