@etsoo/materialui 1.3.0 → 1.3.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.
@@ -116,6 +116,7 @@ export class ServiceApp extends ReactApp {
116
116
  };
117
117
  // Success callback
118
118
  const success = async (result, failCallback) => {
119
+ var _a;
119
120
  // Token
120
121
  const refreshToken = this.getResponseToken(payload.response);
121
122
  if (refreshToken == null || result.data == null) {
@@ -128,7 +129,7 @@ export class ServiceApp extends ReactApp {
128
129
  // Use core system access token to service api to exchange service access token
129
130
  const api = appApi ? appApi.api : this.serviceApi;
130
131
  const serviceResult = await api.put("Auth/ExchangeToken", {
131
- token: this.encryptEnhanced(userData.token, this.settings.serviceId.toString())
132
+ token: this.encryptEnhanced(userData.token, ((_a = appApi === null || appApi === void 0 ? void 0 : appApi.serviceId) !== null && _a !== void 0 ? _a : this.settings.serviceId).toString())
132
133
  }, {
133
134
  showLoading,
134
135
  onError: (error) => {
package/lib/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./app/CommonApp";
2
+ export * from "./app/IAppApi";
2
3
  export * from "./app/IServiceApp";
3
4
  export * from "./app/IServiceAppSettings";
4
5
  export * from "./app/IServicePage";
package/lib/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./app/CommonApp";
2
+ export * from "./app/IAppApi";
2
3
  export * from "./app/IServiceApp";
3
4
  export * from "./app/IServiceAppSettings";
4
5
  export * from "./app/IServicePage";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -201,7 +201,7 @@ export class ServiceApp<
201
201
  {
202
202
  token: this.encryptEnhanced(
203
203
  userData.token,
204
- this.settings.serviceId.toString()
204
+ (appApi?.serviceId ?? this.settings.serviceId).toString()
205
205
  )
206
206
  },
207
207
  {
package/src/index.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./app/CommonApp";
2
+ export * from "./app/IAppApi";
2
3
  export * from "./app/IServiceApp";
3
4
  export * from "./app/IServiceAppSettings";
4
5
  export * from "./app/IServicePage";