@elliemae/pui-app-sdk 3.3.1 → 3.4.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.
@@ -57,7 +57,7 @@ class CMicroAppGuest {
57
57
  host: null,
58
58
  hostUrl: null,
59
59
  prevState: null,
60
- history: import_history2.browserHistory,
60
+ history: params?.history || import_history2.browserHistory,
61
61
  theme: (0, import_pui_theme.getDefaultTheme)(),
62
62
  manifestPath: "./latest"
63
63
  };
@@ -67,7 +67,21 @@ const AppRouter = (_a) => {
67
67
  action: history.action,
68
68
  location: history.location
69
69
  });
70
- (0, import_react.useLayoutEffect)(() => history.listen(setState), [history]);
70
+ (0, import_react.useLayoutEffect)(() => {
71
+ const unlisten = history.listen((...args) => {
72
+ if (args.length === 2) {
73
+ setState({
74
+ location: args[0],
75
+ action: args[1]
76
+ });
77
+ } else {
78
+ setState(args[0]);
79
+ }
80
+ });
81
+ return () => {
82
+ unlisten();
83
+ };
84
+ }, [history]);
71
85
  return /* @__PURE__ */ React.createElement(import_react_router_dom.Router, __spreadProps(__spreadValues({}, props), {
72
86
  location: state.location,
73
87
  navigationType: state.action,
@@ -26,7 +26,7 @@ class CMicroAppGuest {
26
26
  host: null,
27
27
  hostUrl: null,
28
28
  prevState: null,
29
- history: browserHistory,
29
+ history: params?.history || browserHistory,
30
30
  theme: getDefaultTheme(),
31
31
  manifestPath: "./latest"
32
32
  };
@@ -38,7 +38,21 @@ const AppRouter = (_a) => {
38
38
  action: history.action,
39
39
  location: history.location
40
40
  });
41
- useLayoutEffect(() => history.listen(setState), [history]);
41
+ useLayoutEffect(() => {
42
+ const unlisten = history.listen((...args) => {
43
+ if (args.length === 2) {
44
+ setState({
45
+ location: args[0],
46
+ action: args[1]
47
+ });
48
+ } else {
49
+ setState(args[0]);
50
+ }
51
+ });
52
+ return () => {
53
+ unlisten();
54
+ };
55
+ }, [history]);
42
56
  return /* @__PURE__ */ React.createElement(Router, __spreadProps(__spreadValues({}, props), {
43
57
  location: state.location,
44
58
  navigationType: state.action,
@@ -18,6 +18,7 @@ interface ConstructorParams {
18
18
  onMount?: OnMountCallback;
19
19
  onUnmount?: OnUnMountCallback;
20
20
  onGetRef?: OnGetRefCallback;
21
+ history?: History;
21
22
  }
22
23
  export declare class CMicroAppGuest implements IMicroAppGuest {
23
24
  private static instance;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-app-sdk",
3
- "version": "3.3.1",
3
+ "version": "3.4.2",
4
4
  "description": "ICE MT UI Platform Application SDK ",
5
5
  "sideEffects": [
6
6
  "*.css",
@@ -104,47 +104,47 @@
104
104
  },
105
105
  "peerDependencies": {
106
106
  "@elliemae/app-react-dependencies": "^3.2.0",
107
- "@elliemae/ds-basic": "^2.4.0",
108
- "@elliemae/ds-button": "^2.4.0",
109
- "@elliemae/ds-controlled-form": "^2.4.0",
110
- "@elliemae/ds-date-picker": "^2.4.0",
111
- "@elliemae/ds-date-range-picker": "^2.4.0",
112
- "@elliemae/ds-dialog": "^2.4.0",
113
- "@elliemae/ds-form": "^2.4.0",
114
- "@elliemae/ds-form-layout-blocks": "^2.4.0",
115
- "@elliemae/ds-grid": "^2.4.0",
116
- "@elliemae/ds-loading-indicator": "^2.4.0",
117
- "@elliemae/ds-modal": "^2.4.0",
118
- "@elliemae/ds-popperjs": "^2.4.0",
119
- "@elliemae/ds-toast": "^2.4.0",
107
+ "@elliemae/ds-basic": "^2.4.1",
108
+ "@elliemae/ds-button": "^2.4.1",
109
+ "@elliemae/ds-controlled-form": "^2.4.1",
110
+ "@elliemae/ds-date-picker": "^2.4.1",
111
+ "@elliemae/ds-date-range-picker": "^2.4.1",
112
+ "@elliemae/ds-dialog": "^2.4.1",
113
+ "@elliemae/ds-form": "^2.4.1",
114
+ "@elliemae/ds-form-layout-blocks": "^2.4.1",
115
+ "@elliemae/ds-grid": "^2.4.1",
116
+ "@elliemae/ds-loading-indicator": "^2.4.1",
117
+ "@elliemae/ds-modal": "^2.4.1",
118
+ "@elliemae/ds-popperjs": "^2.4.1",
119
+ "@elliemae/ds-toast": "^2.4.1",
120
120
  "@elliemae/em-ssf-guest": "^1.11.1",
121
121
  "@elliemae/pui-diagnostics": "^2.7.3",
122
122
  "@elliemae/pui-micro-frontend-base": "^1.10.1",
123
- "@elliemae/pui-theme": "^2.3.0",
124
- "@elliemae/pui-user-monitoring": "^1.13.0"
123
+ "@elliemae/pui-theme": "^2.4.1",
124
+ "@elliemae/pui-user-monitoring": "^1.14.0"
125
125
  },
126
126
  "devDependencies": {
127
127
  "@elliemae/app-react-dependencies": "~3.2.0",
128
128
  "@elliemae/browserslist-config-elliemae-latest-browsers": "~1.3.0",
129
- "@elliemae/ds-basic": "~2.4.0",
130
- "@elliemae/ds-button": "~2.4.0",
131
- "@elliemae/ds-controlled-form": "~2.4.0",
132
- "@elliemae/ds-date-picker": "~2.4.0",
133
- "@elliemae/ds-date-range-picker": "~2.4.0",
134
- "@elliemae/ds-dialog": "~2.4.0",
135
- "@elliemae/ds-form": "~2.4.0",
136
- "@elliemae/ds-form-layout-blocks": "~2.4.0",
137
- "@elliemae/ds-grid": "~2.4.0",
138
- "@elliemae/ds-loading-indicator": "~2.4.0",
139
- "@elliemae/ds-modal": "~2.4.0",
140
- "@elliemae/ds-popperjs": "~2.4.0",
141
- "@elliemae/ds-toast": "~2.4.0",
129
+ "@elliemae/ds-basic": "2.4.1",
130
+ "@elliemae/ds-button": "2.4.1",
131
+ "@elliemae/ds-controlled-form": "2.4.1",
132
+ "@elliemae/ds-date-picker": "2.4.1",
133
+ "@elliemae/ds-date-range-picker": "2.4.1",
134
+ "@elliemae/ds-dialog": "2.4.1",
135
+ "@elliemae/ds-form": "2.4.1",
136
+ "@elliemae/ds-form-layout-blocks": "2.4.1",
137
+ "@elliemae/ds-grid": "2.4.1",
138
+ "@elliemae/ds-loading-indicator": "2.4.1",
139
+ "@elliemae/ds-modal": "2.4.1",
140
+ "@elliemae/ds-popperjs": "2.4.1",
141
+ "@elliemae/ds-toast": "2.4.1",
142
142
  "@elliemae/em-ssf-guest": "~1.11.1",
143
- "@elliemae/pui-cli": "~6.5.2",
143
+ "@elliemae/pui-cli": "~6.9.0",
144
144
  "@elliemae/pui-diagnostics": "~2.7.3",
145
- "@elliemae/pui-e2e-test-sdk": "~7.0.0",
145
+ "@elliemae/pui-e2e-test-sdk": "~7.1.0",
146
146
  "@elliemae/pui-micro-frontend-base": "~1.10.1",
147
- "@elliemae/pui-theme": "~2.3.0",
148
- "@elliemae/pui-user-monitoring": "~1.13.0"
147
+ "@elliemae/pui-theme": "2.4.1",
148
+ "@elliemae/pui-user-monitoring": "~1.14.0"
149
149
  }
150
150
  }