@etsoo/materialui 1.6.84 → 1.6.85

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.
@@ -64,7 +64,7 @@ export declare class ServiceApp<U extends IServiceUser = IServiceUser, S extends
64
64
  * @param keep Keep in local storage or not
65
65
  * @param dispatch User state dispatch
66
66
  */
67
- userLoginEx(user: U & ServiceUserToken, core?: ApiRefreshTokenDto, dispatch?: boolean): void;
67
+ userLoginEx(user: U & ServiceUserToken, core?: ApiRefreshTokenDto, dispatch?: boolean): Promise<void>;
68
68
  /**
69
69
  * Save core system data
70
70
  * @param data Data
@@ -120,14 +120,14 @@ class ServiceApp extends ReactApp_1.ReactApp {
120
120
  * @param keep Keep in local storage or not
121
121
  * @param dispatch User state dispatch
122
122
  */
123
- userLoginEx(user, core, dispatch) {
123
+ async userLoginEx(user, core, dispatch) {
124
124
  if (user.clientDeviceId && user.passphrase) {
125
125
  // Save the passphrase
126
126
  // Interpolated string expressions are different between TypeScript and C# for the null value
127
- const passphrase = this.decrypt(user.passphrase, `${user.uid ?? ""}-${this.settings.appId}`);
127
+ const passphrase = await this.decrypt(user.passphrase, `${user.uid ?? ""}-${this.settings.appId}`);
128
128
  if (passphrase) {
129
129
  this.deviceId = user.clientDeviceId;
130
- this.updatePassphrase(passphrase);
130
+ await this.updatePassphrase(passphrase);
131
131
  }
132
132
  }
133
133
  // User login
@@ -203,7 +203,7 @@ class ServiceApp extends ReactApp_1.ReactApp {
203
203
  callback?.({ ok: false, type: "noData", title: "Core token is blank" });
204
204
  return;
205
205
  }
206
- const coreTokenDecrypted = this.decrypt(coreToken);
206
+ const coreTokenDecrypted = await this.decrypt(coreToken);
207
207
  if (!coreTokenDecrypted) {
208
208
  callback?.({
209
209
  ok: false,
@@ -64,7 +64,7 @@ export declare class ServiceApp<U extends IServiceUser = IServiceUser, S extends
64
64
  * @param keep Keep in local storage or not
65
65
  * @param dispatch User state dispatch
66
66
  */
67
- userLoginEx(user: U & ServiceUserToken, core?: ApiRefreshTokenDto, dispatch?: boolean): void;
67
+ userLoginEx(user: U & ServiceUserToken, core?: ApiRefreshTokenDto, dispatch?: boolean): Promise<void>;
68
68
  /**
69
69
  * Save core system data
70
70
  * @param data Data
@@ -117,14 +117,14 @@ export class ServiceApp extends ReactApp {
117
117
  * @param keep Keep in local storage or not
118
118
  * @param dispatch User state dispatch
119
119
  */
120
- userLoginEx(user, core, dispatch) {
120
+ async userLoginEx(user, core, dispatch) {
121
121
  if (user.clientDeviceId && user.passphrase) {
122
122
  // Save the passphrase
123
123
  // Interpolated string expressions are different between TypeScript and C# for the null value
124
- const passphrase = this.decrypt(user.passphrase, `${user.uid ?? ""}-${this.settings.appId}`);
124
+ const passphrase = await this.decrypt(user.passphrase, `${user.uid ?? ""}-${this.settings.appId}`);
125
125
  if (passphrase) {
126
126
  this.deviceId = user.clientDeviceId;
127
- this.updatePassphrase(passphrase);
127
+ await this.updatePassphrase(passphrase);
128
128
  }
129
129
  }
130
130
  // User login
@@ -200,7 +200,7 @@ export class ServiceApp extends ReactApp {
200
200
  callback?.({ ok: false, type: "noData", title: "Core token is blank" });
201
201
  return;
202
202
  }
203
- const coreTokenDecrypted = this.decrypt(coreToken);
203
+ const coreTokenDecrypted = await this.decrypt(coreToken);
204
204
  if (!coreTokenDecrypted) {
205
205
  callback?.({
206
206
  ok: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.6.84",
3
+ "version": "1.6.85",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -40,12 +40,12 @@
40
40
  "@dnd-kit/react": "^0.5.0",
41
41
  "@emotion/react": "^11.14.0",
42
42
  "@emotion/styled": "^11.14.1",
43
- "@etsoo/appscript": "^1.6.74",
43
+ "@etsoo/appscript": "^1.6.76",
44
44
  "@etsoo/notificationbase": "^1.1.75",
45
- "@etsoo/react": "^1.9.0",
45
+ "@etsoo/react": "^1.9.1",
46
46
  "@etsoo/shared": "^1.2.91",
47
- "@mui/icons-material": "^9.3.1",
48
- "@mui/material": "^9.3.1",
47
+ "@mui/icons-material": "^9.4.0",
48
+ "@mui/material": "^9.4.0",
49
49
  "@mui/x-data-grid": "^9.12.0",
50
50
  "chart.js": "^4.5.1",
51
51
  "chartjs-plugin-datalabels": "^2.2.0",
@@ -66,24 +66,18 @@
66
66
  "react-dom": "$react-dom"
67
67
  },
68
68
  "devDependencies": {
69
- "@babel/core": "^8.0.1",
70
- "@babel/plugin-transform-runtime": "^8.0.1",
71
- "@babel/preset-env": "^8.0.2",
72
- "@babel/preset-react": "^8.0.1",
73
- "@babel/preset-typescript": "^8.0.1",
74
- "@babel/runtime-corejs3": "^8.0.0",
75
69
  "@testing-library/jest-dom": "^7.0.1",
76
- "@testing-library/react": "^16.3.2",
70
+ "@testing-library/react": "^16.3.3",
77
71
  "@types/pica": "^9.0.5",
78
72
  "@types/pulltorefreshjs": "^0.1.7",
79
73
  "@types/react": "^19.2.18",
80
74
  "@types/react-avatar-editor": "^13.0.4",
81
- "@types/react-dom": "^19.2.5",
75
+ "@types/react-dom": "^19.2.7",
82
76
  "@types/react-input-mask": "^3.0.6",
83
- "@vitejs/plugin-react": "^6.1.0",
77
+ "@vitejs/plugin-react": "^6.1.1",
84
78
  "jsdom": "^30.0.1",
85
79
  "typescript": "^7.0.2",
86
- "vitest": "^4.1.11"
80
+ "vitest": "^5.0.0"
87
81
  },
88
82
  "allowScripts": {
89
83
  "core-js-pure@3.49.0": true
@@ -25,9 +25,9 @@ const tryLoginKey = "tryLogin";
25
25
  * Use the new acess token and refresh token to login
26
26
  */
27
27
  export class ServiceApp<
28
- U extends IServiceUser = IServiceUser,
29
- S extends IServiceAppSettings = IServiceAppSettings
30
- >
28
+ U extends IServiceUser = IServiceUser,
29
+ S extends IServiceAppSettings = IServiceAppSettings
30
+ >
31
31
  extends ReactApp<S, U>
32
32
  implements IServiceApp
33
33
  {
@@ -157,7 +157,7 @@ export class ServiceApp<
157
157
  * @param keep Keep in local storage or not
158
158
  * @param dispatch User state dispatch
159
159
  */
160
- userLoginEx(
160
+ async userLoginEx(
161
161
  user: U & ServiceUserToken,
162
162
  core?: ApiRefreshTokenDto,
163
163
  dispatch?: boolean
@@ -165,13 +165,13 @@ export class ServiceApp<
165
165
  if (user.clientDeviceId && user.passphrase) {
166
166
  // Save the passphrase
167
167
  // Interpolated string expressions are different between TypeScript and C# for the null value
168
- const passphrase = this.decrypt(
168
+ const passphrase = await this.decrypt(
169
169
  user.passphrase,
170
170
  `${user.uid ?? ""}-${this.settings.appId}`
171
171
  );
172
172
  if (passphrase) {
173
173
  this.deviceId = user.clientDeviceId;
174
- this.updatePassphrase(passphrase);
174
+ await this.updatePassphrase(passphrase);
175
175
  }
176
176
  }
177
177
 
@@ -278,7 +278,7 @@ export class ServiceApp<
278
278
  return;
279
279
  }
280
280
 
281
- const coreTokenDecrypted = this.decrypt(coreToken);
281
+ const coreTokenDecrypted = await this.decrypt(coreToken);
282
282
  if (!coreTokenDecrypted) {
283
283
  callback?.({
284
284
  ok: false,
package/babel.config.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "presets": [
3
- ["@babel/env"],
4
- "@babel/preset-typescript",
5
- "@babel/preset-react"
6
- ],
7
- "plugins": [
8
- [
9
- "@babel/plugin-transform-runtime",
10
- {
11
- "corejs": 3
12
- }
13
- ]
14
- ]
15
- }