@etsoo/materialui 1.2.85 → 1.2.87

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.
package/lib/SearchBar.js CHANGED
@@ -14,11 +14,12 @@ const resetForm = (form) => {
14
14
  continue;
15
15
  // All non hidden inputs
16
16
  if (input instanceof HTMLInputElement) {
17
- // Ignore hidden input
18
- if (input.type === "hidden")
17
+ // Ignore hidden and data-reset=false input
18
+ var reset = input.dataset.reset;
19
+ if (input.type === "hidden" || reset === "false")
19
20
  continue;
20
21
  // Ignore readOnly without data-reset=true inputs
21
- if (!input.readOnly || input.dataset.reset === "true") {
22
+ if (!input.readOnly || reset === "true") {
22
23
  ReactUtils.triggerChange(input, "", true);
23
24
  }
24
25
  continue;
@@ -216,8 +216,9 @@ export declare class ReactApp<S extends IAppSettings, D extends IUser, P extends
216
216
  /**
217
217
  * User logout
218
218
  * @param clearToken Clear refresh token or not
219
+ * @param noTrigger No trigger for state change
219
220
  */
220
- userLogout(clearToken?: boolean): void;
221
+ userLogout(clearToken?: boolean, noTrigger?: boolean): void;
221
222
  /**
222
223
  * User unauthorized
223
224
  */
@@ -271,12 +271,13 @@ export class ReactApp extends CoreApp {
271
271
  /**
272
272
  * User logout
273
273
  * @param clearToken Clear refresh token or not
274
+ * @param noTrigger No trigger for state change
274
275
  */
275
- userLogout(clearToken = true) {
276
+ userLogout(clearToken = true, noTrigger = false) {
276
277
  // Super call
277
278
  super.userLogout(clearToken);
278
279
  // Dispatch action
279
- if (this.userStateDispatch != null)
280
+ if (!noTrigger && this.userStateDispatch != null)
280
281
  this.userStateDispatch({
281
282
  type: UserActionType.Logout
282
283
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.2.85",
3
+ "version": "1.2.87",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -50,20 +50,20 @@
50
50
  "@emotion/css": "^11.11.2",
51
51
  "@emotion/react": "^11.11.1",
52
52
  "@emotion/styled": "^11.11.0",
53
- "@etsoo/appscript": "^1.4.31",
53
+ "@etsoo/appscript": "^1.4.32",
54
54
  "@etsoo/notificationbase": "^1.1.26",
55
- "@etsoo/react": "^1.7.2",
55
+ "@etsoo/react": "^1.7.3",
56
56
  "@etsoo/shared": "^1.2.8",
57
- "@mui/icons-material": "^5.14.3",
58
- "@mui/material": "^5.14.5",
57
+ "@mui/icons-material": "^5.14.6",
58
+ "@mui/material": "^5.14.6",
59
59
  "@mui/x-data-grid": "^6.11.2",
60
60
  "@types/pica": "^9.0.1",
61
61
  "@types/pulltorefreshjs": "^0.1.5",
62
- "@types/react": "^18.2.20",
62
+ "@types/react": "^18.2.21",
63
63
  "@types/react-avatar-editor": "^13.0.0",
64
64
  "@types/react-dom": "^18.2.7",
65
65
  "@types/react-input-mask": "^3.0.2",
66
- "chart.js": "^4.3.3",
66
+ "chart.js": "^4.4.0",
67
67
  "chartjs-plugin-datalabels": "^2.2.0",
68
68
  "pica": "^9.0.1",
69
69
  "pulltorefreshjs": "^0.1.22",
@@ -76,19 +76,19 @@
76
76
  },
77
77
  "devDependencies": {
78
78
  "@babel/cli": "^7.22.10",
79
- "@babel/core": "^7.22.10",
79
+ "@babel/core": "^7.22.11",
80
80
  "@babel/plugin-transform-runtime": "^7.22.10",
81
81
  "@babel/preset-env": "^7.22.10",
82
82
  "@babel/preset-react": "^7.22.5",
83
- "@babel/preset-typescript": "^7.22.5",
84
- "@babel/runtime-corejs3": "^7.22.10",
85
- "@testing-library/jest-dom": "^6.0.1",
83
+ "@babel/preset-typescript": "^7.22.11",
84
+ "@babel/runtime-corejs3": "^7.22.11",
85
+ "@testing-library/jest-dom": "^6.1.2",
86
86
  "@testing-library/react": "^14.0.0",
87
- "@types/jest": "^29.5.3",
88
- "@typescript-eslint/eslint-plugin": "^6.4.0",
89
- "@typescript-eslint/parser": "^6.4.0",
90
- "jest": "^29.6.2",
91
- "jest-environment-jsdom": "^29.6.2",
92
- "typescript": "^5.1.6"
87
+ "@types/jest": "^29.5.4",
88
+ "@typescript-eslint/eslint-plugin": "^6.4.1",
89
+ "@typescript-eslint/parser": "^6.4.1",
90
+ "jest": "^29.6.4",
91
+ "jest-environment-jsdom": "^29.6.4",
92
+ "typescript": "^5.2.2"
93
93
  }
94
94
  }
package/src/SearchBar.tsx CHANGED
@@ -41,11 +41,12 @@ const resetForm = (form: HTMLFormElement) => {
41
41
 
42
42
  // All non hidden inputs
43
43
  if (input instanceof HTMLInputElement) {
44
- // Ignore hidden input
45
- if (input.type === "hidden") continue;
44
+ // Ignore hidden and data-reset=false input
45
+ var reset = input.dataset.reset;
46
+ if (input.type === "hidden" || reset === "false") continue;
46
47
 
47
48
  // Ignore readOnly without data-reset=true inputs
48
- if (!input.readOnly || input.dataset.reset === "true") {
49
+ if (!input.readOnly || reset === "true") {
49
50
  ReactUtils.triggerChange(input, "", true);
50
51
  }
51
52
  continue;
@@ -512,13 +512,17 @@ export class ReactApp<
512
512
  /**
513
513
  * User logout
514
514
  * @param clearToken Clear refresh token or not
515
+ * @param noTrigger No trigger for state change
515
516
  */
516
- override userLogout(clearToken: boolean = true): void {
517
+ override userLogout(
518
+ clearToken: boolean = true,
519
+ noTrigger: boolean = false
520
+ ): void {
517
521
  // Super call
518
522
  super.userLogout(clearToken);
519
523
 
520
524
  // Dispatch action
521
- if (this.userStateDispatch != null)
525
+ if (!noTrigger && this.userStateDispatch != null)
522
526
  this.userStateDispatch({
523
527
  type: UserActionType.Logout
524
528
  });