@etsoo/react 1.5.45 → 1.5.48

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.
@@ -224,6 +224,8 @@ export class ServiceApp extends ReactApp {
224
224
  // Success
225
225
  if (result === true)
226
226
  return;
227
+ // Clear cache
228
+ this.clearCacheData();
227
229
  const message = this.formatRefreshTokenResult(result);
228
230
  if (message == null) {
229
231
  this.loginFailed();
package/lib/mu/RLink.js CHANGED
@@ -10,12 +10,10 @@ import { useDelayedExecutor } from '../uses/useDelayedExecutor';
10
10
  export const RLink = React.forwardRef((props, ref) => {
11
11
  // Destruct
12
12
  const { delay = 0, href, target, onClick, ...rest } = props;
13
- const delayed = delay > 0
14
- ? useDelayedExecutor((href) => {
15
- // Router push
16
- globalApp.history.push(href);
17
- }, delay)
18
- : null;
13
+ const delayed = useDelayedExecutor((href) => {
14
+ // Router push
15
+ globalApp.history.push(href);
16
+ }, delay);
19
17
  // Click handler
20
18
  const onClickLocl = (event) => {
21
19
  if (onClick)
@@ -26,14 +24,13 @@ export const RLink = React.forwardRef((props, ref) => {
26
24
  globalApp) {
27
25
  // Prevent href action
28
26
  event.preventDefault();
29
- if (delayed != null)
30
- delayed.call(undefined, href);
31
- else
32
- globalApp.history.push(href);
27
+ // Delayed excution
28
+ delayed.call(undefined, href);
33
29
  }
34
30
  };
31
+ // Clear when exit
35
32
  React.useEffect(() => {
36
- return () => delayed === null || delayed === void 0 ? void 0 : delayed.clear();
33
+ return () => delayed.clear();
37
34
  }, [delayed]);
38
35
  // Component
39
36
  return (React.createElement(Link, { ...rest, onClick: onClickLocl, href: href, target: target, ref: ref }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/react",
3
- "version": "1.5.45",
3
+ "version": "1.5.48",
4
4
  "description": "TypeScript ReactJs framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -47,51 +47,51 @@
47
47
  "homepage": "https://github.com/ETSOO/AppReact#readme",
48
48
  "dependencies": {
49
49
  "@emotion/css": "^11.9.0",
50
- "@emotion/react": "^11.9.0",
50
+ "@emotion/react": "^11.9.3",
51
51
  "@emotion/style": "^0.8.0",
52
- "@emotion/styled": "^11.8.1",
53
- "@etsoo/appscript": "^1.2.61",
52
+ "@emotion/styled": "^11.9.3",
53
+ "@etsoo/appscript": "^1.2.62",
54
54
  "@etsoo/notificationbase": "^1.1.4",
55
55
  "@etsoo/shared": "^1.1.40",
56
- "@mui/icons-material": "^5.8.0",
57
- "@mui/material": "^5.8.1",
58
- "@types/pica": "^9.0.0",
56
+ "@mui/icons-material": "^5.8.4",
57
+ "@mui/material": "^5.9.1",
58
+ "@types/pica": "^9.0.1",
59
59
  "@types/pulltorefreshjs": "^0.1.5",
60
- "@types/react": "^18.0.9",
60
+ "@types/react": "^18.0.15",
61
61
  "@types/react-avatar-editor": "^12.0.0",
62
62
  "@types/react-beautiful-dnd": "^13.1.2",
63
- "@types/react-dom": "^18.0.5",
63
+ "@types/react-dom": "^18.0.6",
64
64
  "@types/react-input-mask": "^3.0.1",
65
65
  "@types/react-window": "^1.8.5",
66
66
  "pica": "^9.0.1",
67
67
  "pulltorefreshjs": "^0.1.22",
68
- "react": "^18.1.0",
68
+ "react": "^18.2.0",
69
69
  "react-avatar-editor": "^13.0.0",
70
70
  "react-beautiful-dnd": "^13.1.0",
71
- "react-dom": "^18.1.0",
71
+ "react-dom": "^18.2.0",
72
72
  "react-draggable": "^4.4.5",
73
73
  "react-imask": "^6.4.2",
74
74
  "react-router-dom": "^6.3.0",
75
75
  "react-window": "^1.8.7"
76
76
  },
77
77
  "devDependencies": {
78
- "@babel/cli": "^7.17.10",
79
- "@babel/core": "^7.18.2",
80
- "@babel/plugin-transform-runtime": "^7.18.2",
81
- "@babel/preset-env": "^7.18.2",
82
- "@babel/runtime-corejs3": "^7.18.3",
83
- "@types/jest": "^27.5.1",
78
+ "@babel/cli": "^7.18.9",
79
+ "@babel/core": "^7.18.9",
80
+ "@babel/plugin-transform-runtime": "^7.18.9",
81
+ "@babel/preset-env": "^7.18.9",
82
+ "@babel/runtime-corejs3": "^7.18.9",
83
+ "@types/jest": "^28.1.6",
84
84
  "@types/react-test-renderer": "^18.0.0",
85
- "@typescript-eslint/eslint-plugin": "^5.26.0",
86
- "@typescript-eslint/parser": "^5.26.0",
87
- "eslint": "^8.16.0",
85
+ "@typescript-eslint/eslint-plugin": "^5.30.7",
86
+ "@typescript-eslint/parser": "^5.30.7",
87
+ "eslint": "^8.20.0",
88
88
  "eslint-config-airbnb-base": "^15.0.0",
89
89
  "eslint-plugin-import": "^2.26.0",
90
- "eslint-plugin-react": "^7.30.0",
91
- "jest": "^28.1.0",
92
- "jest-environment-jsdom": "^28.1.0",
93
- "react-test-renderer": "^18.1.0",
94
- "ts-jest": "^28.0.3",
95
- "typescript": "^4.7.2"
90
+ "eslint-plugin-react": "^7.30.1",
91
+ "jest": "^28.1.3",
92
+ "jest-environment-jsdom": "^28.1.3",
93
+ "react-test-renderer": "^18.2.0",
94
+ "ts-jest": "^28.0.7",
95
+ "typescript": "^4.7.4"
96
96
  }
97
97
  }
@@ -320,6 +320,9 @@ export class ServiceApp<
320
320
  // Success
321
321
  if (result === true) return;
322
322
 
323
+ // Clear cache
324
+ this.clearCacheData();
325
+
323
326
  const message = this.formatRefreshTokenResult(result);
324
327
  if (message == null) {
325
328
  this.loginFailed();
package/src/mu/RLink.tsx CHANGED
@@ -20,13 +20,10 @@ export const RLink = React.forwardRef<HTMLAnchorElement, RLinkProps>(
20
20
  // Destruct
21
21
  const { delay = 0, href, target, onClick, ...rest } = props;
22
22
 
23
- const delayed =
24
- delay > 0
25
- ? useDelayedExecutor((href: string) => {
26
- // Router push
27
- globalApp.history.push(href);
28
- }, delay)
29
- : null;
23
+ const delayed = useDelayedExecutor((href: string) => {
24
+ // Router push
25
+ globalApp.history.push(href);
26
+ }, delay);
30
27
 
31
28
  // Click handler
32
29
  const onClickLocl = (
@@ -43,13 +40,14 @@ export const RLink = React.forwardRef<HTMLAnchorElement, RLinkProps>(
43
40
  // Prevent href action
44
41
  event.preventDefault();
45
42
 
46
- if (delayed != null) delayed.call(undefined, href);
47
- else globalApp.history.push(href);
43
+ // Delayed excution
44
+ delayed.call(undefined, href);
48
45
  }
49
46
  };
50
47
 
48
+ // Clear when exit
51
49
  React.useEffect(() => {
52
- return () => delayed?.clear();
50
+ return () => delayed.clear();
53
51
  }, [delayed]);
54
52
 
55
53
  // Component