@etsoo/materialui 1.2.35 → 1.2.36

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.
@@ -27,7 +27,7 @@ export function UserAvatarEditor(props) {
27
27
  const labels = Labels.UserAvatarEditor;
28
28
  // Ref
29
29
  const ref = React.createRef();
30
- const [AE, setAE] = React.useState();
30
+ const [AE, setAvatarEditor] = React.useState();
31
31
  // Button ref
32
32
  const buttonRef = React.createRef();
33
33
  // Preview image state
@@ -112,7 +112,7 @@ export function UserAvatarEditor(props) {
112
112
  }
113
113
  };
114
114
  React.useEffect(() => {
115
- import("react-avatar-editor").then((result) => setAE(result.default));
115
+ import("react-avatar-editor").then((result) => setAvatarEditor(result.default));
116
116
  }, []);
117
117
  return (React.createElement(Stack, { direction: "column", spacing: 0.5, width: containerWidth },
118
118
  React.createElement(Button, { variant: "outlined", size: "medium", component: "label", startIcon: React.createElement(ComputerIcon, null), fullWidth: true },
@@ -96,7 +96,7 @@ export class CommonApp extends ReactApp {
96
96
  return;
97
97
  }
98
98
  // Set password for the action
99
- rq.pwd = await this.encrypt(await this.hash(pwd));
99
+ rq.pwd = this.encrypt(this.hash(pwd));
100
100
  // Submit again
101
101
  const result = await this.api.put("Auth/RefreshToken", rq, payload);
102
102
  if (result == null)
@@ -110,7 +110,7 @@ export class ServiceApp extends ReactApp {
110
110
  const userData = result.data;
111
111
  // Use core system access token to service api to exchange service access token
112
112
  const serviceResult = await this.serviceApi.put("Auth/ExchangeToken", {
113
- token: await this.encryptEnhanced(userData.token, this.settings.serviceId.toString())
113
+ token: this.encryptEnhanced(userData.token, this.settings.serviceId.toString())
114
114
  }, {
115
115
  showLoading,
116
116
  onError: (error) => {
@@ -154,7 +154,7 @@ export class ServiceApp extends ReactApp {
154
154
  return;
155
155
  }
156
156
  // Set password for the action
157
- rq.pwd = await this.encrypt(await this.hash(pwd));
157
+ rq.pwd = this.encrypt(this.hash(pwd));
158
158
  // Submit again
159
159
  const result = await this.api.put("Auth/RefreshToken", rq, payload);
160
160
  if (result == null)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.2.35",
3
+ "version": "1.2.36",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -50,9 +50,9 @@
50
50
  "@emotion/css": "^11.11.0",
51
51
  "@emotion/react": "^11.11.0",
52
52
  "@emotion/styled": "^11.11.0",
53
- "@etsoo/appscript": "^1.4.6",
53
+ "@etsoo/appscript": "^1.4.7",
54
54
  "@etsoo/notificationbase": "^1.1.25",
55
- "@etsoo/react": "^1.6.79",
55
+ "@etsoo/react": "^1.6.80",
56
56
  "@etsoo/shared": "^1.2.5",
57
57
  "@mui/icons-material": "^5.11.16",
58
58
  "@mui/material": "^5.12.3",
@@ -107,7 +107,7 @@ export function UserAvatarEditor(props: UserAvatarEditorProps) {
107
107
  // Ref
108
108
  const ref = React.createRef<AvatarEditor>();
109
109
 
110
- const [AE, setAE] = React.useState<typeof AvatarEditor>();
110
+ const [AE, setAvatarEditor] = React.useState<typeof AvatarEditor>();
111
111
 
112
112
  // Button ref
113
113
  const buttonRef = React.createRef<HTMLButtonElement>();
@@ -215,7 +215,9 @@ export function UserAvatarEditor(props: UserAvatarEditorProps) {
215
215
  };
216
216
 
217
217
  React.useEffect(() => {
218
- import("react-avatar-editor").then((result) => setAE(result.default));
218
+ import("react-avatar-editor").then((result) =>
219
+ setAvatarEditor(result.default)
220
+ );
219
221
  }, []);
220
222
 
221
223
  return (
@@ -144,7 +144,7 @@ export abstract class CommonApp<
144
144
  }
145
145
 
146
146
  // Set password for the action
147
- rq.pwd = await this.encrypt(await this.hash(pwd));
147
+ rq.pwd = this.encrypt(this.hash(pwd));
148
148
 
149
149
  // Submit again
150
150
  const result = await this.api.put<LoginResult>(
@@ -167,7 +167,7 @@ export class ServiceApp<
167
167
  const serviceResult = await this.serviceApi.put<ServiceLoginResult<U>>(
168
168
  "Auth/ExchangeToken",
169
169
  {
170
- token: await this.encryptEnhanced(
170
+ token: this.encryptEnhanced(
171
171
  userData.token,
172
172
  this.settings.serviceId.toString()
173
173
  )
@@ -226,7 +226,7 @@ export class ServiceApp<
226
226
  }
227
227
 
228
228
  // Set password for the action
229
- rq.pwd = await this.encrypt(await this.hash(pwd));
229
+ rq.pwd = this.encrypt(this.hash(pwd));
230
230
 
231
231
  // Submit again
232
232
  const result = await this.api.put<LoginResult>(