@elliemae/pui-app-sdk 4.12.0 → 5.0.0-next.1

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.
@@ -24,62 +24,62 @@ module.exports = __toCommonJS(log_records_exports);
24
24
  const logRecords = {
25
25
  ERR_TOAST_OPEN_FAILED: {
26
26
  code: "appsdk001",
27
- msg: "Unable to open Error Toast"
27
+ message: "Unable to open Error Toast"
28
28
  },
29
29
  WAIT_MSG_OPEN_FAILED: {
30
30
  code: "appsdk02",
31
- msg: "Unable to open Wait message"
31
+ message: "Unable to open Wait message"
32
32
  },
33
33
  WAIT_MSG_CLOSE_FAILED: {
34
34
  code: "appsdk03",
35
- msg: "Unable to close Wait message"
35
+ message: "Unable to close Wait message"
36
36
  },
37
37
  APP_CONFIG_LOAD_FAILED: {
38
38
  code: "appsdk04",
39
- msg: "Unable to load application configuration"
39
+ message: "Unable to load application configuration"
40
40
  },
41
41
  ASSET_NOT_FOUND_IN_MANIFEST: (assetName) => ({
42
42
  code: "appsdk05",
43
- msg: `Application load failed. unable to locate ${assetName} in the manifest`
43
+ message: `Application load failed. unable to locate ${assetName} in the manifest`
44
44
  }),
45
45
  APP_INIT_FAILED: (appId, errMsg) => ({
46
46
  code: "appsdk06",
47
- msg: `Application load failed. Unable to load one or more application resources for appId: ${appId}. ${errMsg}`
47
+ message: `Application load failed. Unable to load one or more application resources for appId: ${appId}. ${errMsg}`
48
48
  }),
49
49
  APP_LOADING: (appId) => ({
50
50
  code: "appsdk07",
51
- msg: `Application ${appId} is loading...`
51
+ message: `Application ${appId} is loading...`
52
52
  }),
53
53
  APP_LOADING_COMPLETE: (appId) => ({
54
54
  code: "appsdk08",
55
- msg: `Application ${appId} loaded`
55
+ message: `Application ${appId} loaded`
56
56
  }),
57
57
  APP_UNLOADING: (appId) => ({
58
58
  code: "appsdk09",
59
- msg: `Application ${appId} unloading...`
59
+ message: `Application ${appId} unloading...`
60
60
  }),
61
61
  APP_UNLOADING_COMPLETE: (appId) => ({
62
62
  code: "appsdk10",
63
- msg: `Application ${appId} unloaded`
63
+ message: `Application ${appId} unloaded`
64
64
  }),
65
65
  SSF_HOST_OBJECT_NOT_FOUND: (name) => ({
66
66
  code: "appsdk11",
67
- msg: `Parent window doesn't expose SSF Object named ${name}`
67
+ message: `Parent window doesn't expose SSF Object named ${name}`
68
68
  }),
69
69
  LOGIN_FAILED: {
70
70
  code: "appsdk12",
71
- msg: "Unable to login the user."
71
+ message: "Unable to login the user."
72
72
  },
73
73
  LOGOUT_FAILED: {
74
74
  code: "appsdk13",
75
- msg: "Unable to logout the user."
75
+ message: "Unable to logout the user."
76
76
  },
77
77
  SERVICE_WORKER_FAILED: {
78
78
  code: "appsdk14",
79
- msg: "Service Worker Registration Failed"
79
+ message: "Service Worker Registration Failed"
80
80
  },
81
81
  UNHANDLED_ERROR: {
82
82
  code: "appsdk15",
83
- msg: "Unhandled error in react component"
83
+ message: "Unhandled error in react component"
84
84
  }
85
85
  };
@@ -30,11 +30,10 @@ const logger = (() => {
30
30
  transport: (0, import_pui_diagnostics.Console)(),
31
31
  index: "app",
32
32
  environment: (0, import_config.getAppConfigValue)("activeEnv"),
33
- logger: "icemt.app.logger",
34
33
  team: "app team",
35
34
  appName: "ICEMT App",
36
35
  appVersion: "latest",
37
- tenantId: "",
36
+ instanceId: "",
38
37
  userId: ""
39
38
  });
40
39
  })();
@@ -116,7 +116,7 @@ const waitAndInitApplication = (appConfig, requests) => (
116
116
  Promise.all(requests).then(addAppToActiveAppList.bind(null, appConfig.id)).then(initApplication.bind(null, appConfig)).catch((err) => {
117
117
  const logRecord = import_log_records.logRecords.APP_INIT_FAILED(appConfig.id, err.message);
118
118
  (0, import_micro_frontend.getLogger)().error({ ...logRecord, exception: err });
119
- throw new Error(logRecord.msg);
119
+ throw new Error(logRecord.message);
120
120
  })
121
121
  );
122
122
  const removeAssetsFromDOM = (id, documentEle = document) => {
@@ -61,7 +61,7 @@ const getFullFileNameofAssetsFromManifest = (manifest, assetNames = []) => asset
61
61
  else {
62
62
  const logRecord = import_log_records.logRecords.ASSET_NOT_FOUND_IN_MANIFEST(assetName);
63
63
  (0, import_micro_frontend.getLogger)().error(logRecord);
64
- throw new Error(logRecord.msg);
64
+ throw new Error(logRecord.message);
65
65
  }
66
66
  return assets;
67
67
  }, []);
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
  var wait_message_exports = {};
20
30
  __export(wait_message_exports, {
@@ -23,14 +33,25 @@ __export(wait_message_exports, {
23
33
  module.exports = __toCommonJS(wait_message_exports);
24
34
  var import_jsx_runtime = require("react/jsx-runtime");
25
35
  var import_react = require("react");
26
- var import_ds_loading_indicator = require("@elliemae/ds-loading-indicator");
36
+ var import_styled_components = __toESM(require("styled-components"));
37
+ var import_ds_backdrop = require("@elliemae/ds-backdrop");
38
+ var import_ds_circular_progress_indicator = require("@elliemae/ds-circular-progress-indicator");
27
39
  var import_react2 = require("../../data/react.js");
28
40
  var import_use_html_wait_message = require("./use-html-wait-message.js");
29
41
  var import_user_wait_event = require("../../analytics/user-wait-event.js");
42
+ const StyledCircularIndicator = (0, import_styled_components.default)(import_ds_circular_progress_indicator.DSCircularIndeterminateIndicator)`
43
+ position: absolute;
44
+ left: 50%;
45
+ top: 50%;
46
+ transform: translate(-50%, -50%);
47
+ `;
30
48
  const WaitMessage = (0, import_react.memo)(
31
49
  ({
32
- size = "m",
33
- style = { color: "white", fontSize: "1.25rem" },
50
+ size = "xl",
51
+ color = "light",
52
+ showText = true,
53
+ withTooltip = false,
54
+ tooltipStartPlacementPreference = "center",
34
55
  ...rest
35
56
  }) => {
36
57
  const isOpen = (0, import_react2.useAppSelector)((state) => state.waitMessage?.isOpen);
@@ -42,16 +63,21 @@ const WaitMessage = (0, import_react.memo)(
42
63
  (0, import_user_wait_event.waitEndEvent)();
43
64
  }, [isOpen]);
44
65
  (0, import_use_html_wait_message.useHTMLWaitMessage)(isOpen !== null);
45
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
46
- import_ds_loading_indicator.DSLoadingIndicator,
47
- {
48
- id: "em-loading",
49
- size,
50
- style,
51
- ...rest,
52
- loading: isOpen,
53
- message
54
- }
55
- );
66
+ return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
67
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_backdrop.DSBackdrop, {}),
68
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
69
+ StyledCircularIndicator,
70
+ {
71
+ id: "em-loading",
72
+ size,
73
+ color,
74
+ showText,
75
+ withTooltip,
76
+ tooltipStartPlacementPreference,
77
+ ...rest,
78
+ text: message
79
+ }
80
+ )
81
+ ] }) : null;
56
82
  }
57
83
  );
@@ -1,63 +1,63 @@
1
1
  const logRecords = {
2
2
  ERR_TOAST_OPEN_FAILED: {
3
3
  code: "appsdk001",
4
- msg: "Unable to open Error Toast"
4
+ message: "Unable to open Error Toast"
5
5
  },
6
6
  WAIT_MSG_OPEN_FAILED: {
7
7
  code: "appsdk02",
8
- msg: "Unable to open Wait message"
8
+ message: "Unable to open Wait message"
9
9
  },
10
10
  WAIT_MSG_CLOSE_FAILED: {
11
11
  code: "appsdk03",
12
- msg: "Unable to close Wait message"
12
+ message: "Unable to close Wait message"
13
13
  },
14
14
  APP_CONFIG_LOAD_FAILED: {
15
15
  code: "appsdk04",
16
- msg: "Unable to load application configuration"
16
+ message: "Unable to load application configuration"
17
17
  },
18
18
  ASSET_NOT_FOUND_IN_MANIFEST: (assetName) => ({
19
19
  code: "appsdk05",
20
- msg: `Application load failed. unable to locate ${assetName} in the manifest`
20
+ message: `Application load failed. unable to locate ${assetName} in the manifest`
21
21
  }),
22
22
  APP_INIT_FAILED: (appId, errMsg) => ({
23
23
  code: "appsdk06",
24
- msg: `Application load failed. Unable to load one or more application resources for appId: ${appId}. ${errMsg}`
24
+ message: `Application load failed. Unable to load one or more application resources for appId: ${appId}. ${errMsg}`
25
25
  }),
26
26
  APP_LOADING: (appId) => ({
27
27
  code: "appsdk07",
28
- msg: `Application ${appId} is loading...`
28
+ message: `Application ${appId} is loading...`
29
29
  }),
30
30
  APP_LOADING_COMPLETE: (appId) => ({
31
31
  code: "appsdk08",
32
- msg: `Application ${appId} loaded`
32
+ message: `Application ${appId} loaded`
33
33
  }),
34
34
  APP_UNLOADING: (appId) => ({
35
35
  code: "appsdk09",
36
- msg: `Application ${appId} unloading...`
36
+ message: `Application ${appId} unloading...`
37
37
  }),
38
38
  APP_UNLOADING_COMPLETE: (appId) => ({
39
39
  code: "appsdk10",
40
- msg: `Application ${appId} unloaded`
40
+ message: `Application ${appId} unloaded`
41
41
  }),
42
42
  SSF_HOST_OBJECT_NOT_FOUND: (name) => ({
43
43
  code: "appsdk11",
44
- msg: `Parent window doesn't expose SSF Object named ${name}`
44
+ message: `Parent window doesn't expose SSF Object named ${name}`
45
45
  }),
46
46
  LOGIN_FAILED: {
47
47
  code: "appsdk12",
48
- msg: "Unable to login the user."
48
+ message: "Unable to login the user."
49
49
  },
50
50
  LOGOUT_FAILED: {
51
51
  code: "appsdk13",
52
- msg: "Unable to logout the user."
52
+ message: "Unable to logout the user."
53
53
  },
54
54
  SERVICE_WORKER_FAILED: {
55
55
  code: "appsdk14",
56
- msg: "Service Worker Registration Failed"
56
+ message: "Service Worker Registration Failed"
57
57
  },
58
58
  UNHANDLED_ERROR: {
59
59
  code: "appsdk15",
60
- msg: "Unhandled error in react component"
60
+ message: "Unhandled error in react component"
61
61
  }
62
62
  };
63
63
  export {
@@ -7,11 +7,10 @@ const logger = (() => {
7
7
  transport: Console(),
8
8
  index: "app",
9
9
  environment: getAppConfigValue("activeEnv"),
10
- logger: "icemt.app.logger",
11
10
  team: "app team",
12
11
  appName: "ICEMT App",
13
12
  appVersion: "latest",
14
- tenantId: "",
13
+ instanceId: "",
15
14
  userId: ""
16
15
  });
17
16
  })();
@@ -103,7 +103,7 @@ const waitAndInitApplication = (appConfig, requests) => (
103
103
  Promise.all(requests).then(addAppToActiveAppList.bind(null, appConfig.id)).then(initApplication.bind(null, appConfig)).catch((err) => {
104
104
  const logRecord = logRecords.APP_INIT_FAILED(appConfig.id, err.message);
105
105
  getLogger().error({ ...logRecord, exception: err });
106
- throw new Error(logRecord.msg);
106
+ throw new Error(logRecord.message);
107
107
  })
108
108
  );
109
109
  const removeAssetsFromDOM = (id, documentEle = document) => {
@@ -37,7 +37,7 @@ const getFullFileNameofAssetsFromManifest = (manifest, assetNames = []) => asset
37
37
  else {
38
38
  const logRecord = logRecords.ASSET_NOT_FOUND_IN_MANIFEST(assetName);
39
39
  getLogger().error(logRecord);
40
- throw new Error(logRecord.msg);
40
+ throw new Error(logRecord.message);
41
41
  }
42
42
  return assets;
43
43
  }, []);
@@ -1,16 +1,27 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { memo, useEffect } from "react";
3
- import { DSLoadingIndicator } from "@elliemae/ds-loading-indicator";
3
+ import styled from "styled-components";
4
+ import { DSBackdrop } from "@elliemae/ds-backdrop";
5
+ import { DSCircularIndeterminateIndicator } from "@elliemae/ds-circular-progress-indicator";
4
6
  import { useAppSelector } from "../../data/react.js";
5
7
  import { useHTMLWaitMessage } from "./use-html-wait-message.js";
6
8
  import {
7
9
  waitStartEvent,
8
10
  waitEndEvent
9
11
  } from "../../analytics/user-wait-event.js";
12
+ const StyledCircularIndicator = styled(DSCircularIndeterminateIndicator)`
13
+ position: absolute;
14
+ left: 50%;
15
+ top: 50%;
16
+ transform: translate(-50%, -50%);
17
+ `;
10
18
  const WaitMessage = memo(
11
19
  ({
12
- size = "m",
13
- style = { color: "white", fontSize: "1.25rem" },
20
+ size = "xl",
21
+ color = "light",
22
+ showText = true,
23
+ withTooltip = false,
24
+ tooltipStartPlacementPreference = "center",
14
25
  ...rest
15
26
  }) => {
16
27
  const isOpen = useAppSelector((state) => state.waitMessage?.isOpen);
@@ -22,17 +33,22 @@ const WaitMessage = memo(
22
33
  waitEndEvent();
23
34
  }, [isOpen]);
24
35
  useHTMLWaitMessage(isOpen !== null);
25
- return /* @__PURE__ */ jsx(
26
- DSLoadingIndicator,
27
- {
28
- id: "em-loading",
29
- size,
30
- style,
31
- ...rest,
32
- loading: isOpen,
33
- message
34
- }
35
- );
36
+ return isOpen ? /* @__PURE__ */ jsxs(Fragment, { children: [
37
+ /* @__PURE__ */ jsx(DSBackdrop, {}),
38
+ /* @__PURE__ */ jsx(
39
+ StyledCircularIndicator,
40
+ {
41
+ id: "em-loading",
42
+ size,
43
+ color,
44
+ showText,
45
+ withTooltip,
46
+ tooltipStartPlacementPreference,
47
+ ...rest,
48
+ text: message
49
+ }
50
+ )
51
+ ] }) : null;
36
52
  }
37
53
  );
38
54
  export {
@@ -1,42 +1,62 @@
1
- import { InputLogRecord } from '@elliemae/pui-diagnostics';
2
1
  export declare const logRecords: {
3
2
  ERR_TOAST_OPEN_FAILED: {
4
3
  code: string;
5
- msg: string;
4
+ message: string;
6
5
  };
7
6
  WAIT_MSG_OPEN_FAILED: {
8
7
  code: string;
9
- msg: string;
8
+ message: string;
10
9
  };
11
10
  WAIT_MSG_CLOSE_FAILED: {
12
11
  code: string;
13
- msg: string;
12
+ message: string;
14
13
  };
15
14
  APP_CONFIG_LOAD_FAILED: {
16
15
  code: string;
17
- msg: string;
16
+ message: string;
17
+ };
18
+ ASSET_NOT_FOUND_IN_MANIFEST: (assetName: string) => {
19
+ code: string;
20
+ message: string;
21
+ };
22
+ APP_INIT_FAILED: (appId: string, errMsg: string) => {
23
+ code: string;
24
+ message: string;
25
+ };
26
+ APP_LOADING: (appId: string) => {
27
+ code: string;
28
+ message: string;
29
+ };
30
+ APP_LOADING_COMPLETE: (appId: string) => {
31
+ code: string;
32
+ message: string;
33
+ };
34
+ APP_UNLOADING: (appId: string) => {
35
+ code: string;
36
+ message: string;
37
+ };
38
+ APP_UNLOADING_COMPLETE: (appId: string) => {
39
+ code: string;
40
+ message: string;
41
+ };
42
+ SSF_HOST_OBJECT_NOT_FOUND: (name: string) => {
43
+ code: string;
44
+ message: string;
18
45
  };
19
- ASSET_NOT_FOUND_IN_MANIFEST: (assetName: string) => InputLogRecord;
20
- APP_INIT_FAILED: (appId: string, errMsg: string) => InputLogRecord;
21
- APP_LOADING: (appId: string) => InputLogRecord;
22
- APP_LOADING_COMPLETE: (appId: string) => InputLogRecord;
23
- APP_UNLOADING: (appId: string) => InputLogRecord;
24
- APP_UNLOADING_COMPLETE: (appId: string) => InputLogRecord;
25
- SSF_HOST_OBJECT_NOT_FOUND: (name: string) => InputLogRecord;
26
46
  LOGIN_FAILED: {
27
47
  code: string;
28
- msg: string;
48
+ message: string;
29
49
  };
30
50
  LOGOUT_FAILED: {
31
51
  code: string;
32
- msg: string;
52
+ message: string;
33
53
  };
34
54
  SERVICE_WORKER_FAILED: {
35
55
  code: string;
36
- msg: string;
56
+ message: string;
37
57
  };
38
58
  UNHANDLED_ERROR: {
39
59
  code: string;
40
- msg: string;
60
+ message: string;
41
61
  };
42
62
  };
@@ -1,7 +1,13 @@
1
1
  /// <reference types="react" />
2
+ import { DSCircularIndeterminateIndicator } from '@elliemae/ds-circular-progress-indicator';
3
+ type CircularIndicatorProps = React.ComponentProps<typeof DSCircularIndeterminateIndicator>;
2
4
  export interface WaitMessageProps {
3
- size?: string;
4
- style?: React.CSSProperties;
5
+ size?: CircularIndicatorProps['size'];
6
+ color?: CircularIndicatorProps['color'];
7
+ showText?: CircularIndicatorProps['showText'];
8
+ withTooltip?: CircularIndicatorProps['withTooltip'];
9
+ tooltipStartPlacementPreference?: CircularIndicatorProps['tooltipStartPlacementPreference'];
5
10
  [x: string]: any;
6
11
  }
7
12
  export declare const WaitMessage: import("react").NamedExoticComponent<WaitMessageProps>;
13
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-app-sdk",
3
- "version": "4.12.0",
3
+ "version": "5.0.0-next.1",
4
4
  "description": "ICE MT UI Platform Application SDK ",
5
5
  "sideEffects": [
6
6
  "*.css",
@@ -123,16 +123,15 @@
123
123
  "@elliemae/ds-form": "^3.13.2",
124
124
  "@elliemae/ds-form-layout-blocks": "^3.13.2",
125
125
  "@elliemae/ds-grid": "^3.13.2",
126
- "@elliemae/ds-loading-indicator": "^3.13.2",
127
126
  "@elliemae/ds-modal": "^3.13.2",
128
127
  "@elliemae/ds-popperjs": "^3.13.2",
129
128
  "@elliemae/ds-toast": "^3.13.2",
130
129
  "@elliemae/em-ssf-guest": "^1.11.2",
131
- "@elliemae/pui-diagnostics": "^2.7.5",
130
+ "@elliemae/pui-diagnostics": "^3.0.1",
132
131
  "@elliemae/pui-micro-frontend-base": "^1.14.0",
133
132
  "@elliemae/pui-scripting-object": "^1.19.0",
134
133
  "@elliemae/pui-theme": "^2.6.0",
135
- "@elliemae/pui-user-monitoring": "^1.18.1"
134
+ "@elliemae/pui-user-monitoring": "^1.19.0"
136
135
  },
137
136
  "devDependencies": {
138
137
  "@elliemae/app-react-dependencies": "~4.6.1",
@@ -148,19 +147,18 @@
148
147
  "@elliemae/ds-form": "~3.13.2",
149
148
  "@elliemae/ds-form-layout-blocks": "~3.13.2",
150
149
  "@elliemae/ds-grid": "~3.13.2",
151
- "@elliemae/ds-loading-indicator": "~3.13.2",
152
150
  "@elliemae/ds-modal": "~3.13.2",
153
151
  "@elliemae/ds-popperjs": "~3.13.2",
154
152
  "@elliemae/ds-toast": "~3.13.2",
155
153
  "@elliemae/em-ssf-guest": "~1.11.2",
156
154
  "@elliemae/pui-cli": "~7.27.1",
157
- "@elliemae/pui-diagnostics": "~2.7.5",
155
+ "@elliemae/pui-diagnostics": "~3.0.1",
158
156
  "@elliemae/pui-doc-gen": "~1.4.1",
159
157
  "@elliemae/pui-e2e-test-sdk": "~7.7.1",
160
158
  "@elliemae/pui-micro-frontend-base": "~1.14.0",
161
159
  "@elliemae/pui-scripting-object": "~1.19.0",
162
160
  "@elliemae/pui-theme": "~2.6.0",
163
- "@elliemae/pui-user-monitoring": "~1.18.1",
161
+ "@elliemae/pui-user-monitoring": "~1.19.0",
164
162
  "@types/react-aria-live": "~2.0.2"
165
163
  }
166
164
  }