@etsoo/react 1.8.82 → 1.8.84
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/cjs/app/EventWatcher.js +1 -3
- package/lib/cjs/notifier/Notifier.js +6 -0
- package/lib/cjs/states/CultureState.js +8 -0
- package/lib/cjs/states/PageState.js +8 -0
- package/lib/cjs/states/UserState.js +8 -0
- package/lib/cjs/uses/useSearchParamsWithCache.js +1 -1
- package/lib/mjs/app/EventWatcher.js +1 -3
- package/lib/mjs/notifier/Notifier.js +6 -0
- package/lib/mjs/states/CultureState.js +8 -0
- package/lib/mjs/states/PageState.js +8 -0
- package/lib/mjs/states/UserState.js +8 -0
- package/lib/mjs/uses/useSearchParamsWithCache.js +1 -1
- package/package.json +7 -7
- package/tsconfig.cjs.json +2 -1
- package/tsconfig.json +3 -2
|
@@ -17,6 +17,8 @@ exports.NotificationReact = NotificationReact;
|
|
|
17
17
|
* Notifier for React
|
|
18
18
|
*/
|
|
19
19
|
class NotifierReact extends notificationbase_1.NotificationContainer {
|
|
20
|
+
// Instance
|
|
21
|
+
static _instance;
|
|
20
22
|
/**
|
|
21
23
|
* Singleton instance
|
|
22
24
|
*/
|
|
@@ -44,6 +46,10 @@ class NotifierReact extends notificationbase_1.NotificationContainer {
|
|
|
44
46
|
this.stateUpdate({ notification, dismiss });
|
|
45
47
|
});
|
|
46
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* State update
|
|
51
|
+
*/
|
|
52
|
+
stateUpdate;
|
|
47
53
|
/**
|
|
48
54
|
* Create state provider
|
|
49
55
|
* @param className Style class name
|
|
@@ -11,7 +11,7 @@ const react_router_dom_1 = require("react-router-dom");
|
|
|
11
11
|
function useSearchParamsWithCache(cacheKey, storage) {
|
|
12
12
|
const data = {};
|
|
13
13
|
if (cacheKey) {
|
|
14
|
-
storage
|
|
14
|
+
storage ??= new shared_1.WindowStorage();
|
|
15
15
|
const paras = storage.getObject(cacheKey);
|
|
16
16
|
if (paras) {
|
|
17
17
|
Object.assign(data, paras);
|
|
@@ -10,6 +10,8 @@ export class NotificationReact extends Notification {
|
|
|
10
10
|
* Notifier for React
|
|
11
11
|
*/
|
|
12
12
|
export class NotifierReact extends NotificationContainer {
|
|
13
|
+
// Instance
|
|
14
|
+
static _instance;
|
|
13
15
|
/**
|
|
14
16
|
* Singleton instance
|
|
15
17
|
*/
|
|
@@ -37,6 +39,10 @@ export class NotifierReact extends NotificationContainer {
|
|
|
37
39
|
this.stateUpdate({ notification, dismiss });
|
|
38
40
|
});
|
|
39
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* State update
|
|
44
|
+
*/
|
|
45
|
+
stateUpdate;
|
|
40
46
|
/**
|
|
41
47
|
* Create state provider
|
|
42
48
|
* @param className Style class name
|
|
@@ -8,7 +8,7 @@ import { useInRouterContext, useSearchParams } from "react-router-dom";
|
|
|
8
8
|
export function useSearchParamsWithCache(cacheKey, storage) {
|
|
9
9
|
const data = {};
|
|
10
10
|
if (cacheKey) {
|
|
11
|
-
storage
|
|
11
|
+
storage ??= new WindowStorage();
|
|
12
12
|
const paras = storage.getObject(cacheKey);
|
|
13
13
|
if (paras) {
|
|
14
14
|
Object.assign(data, paras);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/react",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.84",
|
|
4
4
|
"description": "TypeScript ReactJs UI Independent Framework",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
"@emotion/css": "^11.13.5",
|
|
39
39
|
"@emotion/react": "^11.14.0",
|
|
40
40
|
"@emotion/styled": "^11.14.1",
|
|
41
|
-
"@etsoo/appscript": "^1.6.
|
|
42
|
-
"@etsoo/notificationbase": "^1.1.
|
|
43
|
-
"@etsoo/shared": "^1.2.
|
|
41
|
+
"@etsoo/appscript": "^1.6.60",
|
|
42
|
+
"@etsoo/notificationbase": "^1.1.69",
|
|
43
|
+
"@etsoo/shared": "^1.2.82",
|
|
44
44
|
"react": "^19.2.4",
|
|
45
45
|
"react-dom": "^19.2.4",
|
|
46
|
-
"react-router-dom": "^7.
|
|
46
|
+
"react-router-dom": "^7.14.0",
|
|
47
47
|
"react-window": "^2.2.7"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@types/react-dom": "^19.2.3",
|
|
58
58
|
"@vitejs/plugin-react": "^6.0.1",
|
|
59
59
|
"jsdom": "^29.0.1",
|
|
60
|
-
"typescript": "^
|
|
61
|
-
"vitest": "^4.1.
|
|
60
|
+
"typescript": "^6.0.2",
|
|
61
|
+
"vitest": "^4.1.2"
|
|
62
62
|
}
|
|
63
63
|
}
|
package/tsconfig.cjs.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
|
4
|
-
"target": "
|
|
4
|
+
"target": "ES2025",
|
|
5
5
|
"allowJs": false,
|
|
6
6
|
"module": "NodeNext",
|
|
7
7
|
"moduleResolution": "NodeNext",
|
|
8
8
|
"resolveJsonModule": true,
|
|
9
9
|
"isolatedModules": true,
|
|
10
|
+
"rootDir": "./src",
|
|
10
11
|
"outDir": "./lib/cjs",
|
|
11
12
|
"noEmit": false,
|
|
12
13
|
"declaration": true,
|
package/tsconfig.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
|
4
|
-
"target": "
|
|
5
|
-
"module": "
|
|
4
|
+
"target": "ES2025",
|
|
5
|
+
"module": "ESNext",
|
|
6
6
|
"moduleResolution": "bundler",
|
|
7
7
|
"allowJs": false,
|
|
8
8
|
"isolatedModules": true,
|
|
9
|
+
"rootDir": "./src",
|
|
9
10
|
"outDir": "./lib/mjs",
|
|
10
11
|
"noEmit": false,
|
|
11
12
|
"declaration": true,
|