@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.
@@ -5,9 +5,7 @@ exports.EventWatcher = void 0;
5
5
  * Event watcher
6
6
  */
7
7
  class EventWatcher {
8
- constructor() {
9
- this.actions = [];
10
- }
8
+ actions = [];
11
9
  /**
12
10
  * Add action
13
11
  * @param action Action
@@ -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
@@ -22,6 +22,14 @@ const calls = {
22
22
  * Cannot update a component (`provider`) while rendering a different component
23
23
  */
24
24
  class CultureState {
25
+ /**
26
+ * Context
27
+ */
28
+ context;
29
+ /**
30
+ * Provider
31
+ */
32
+ provider;
25
33
  /**
26
34
  * Constructor
27
35
  */
@@ -16,6 +16,14 @@ var PageActionType;
16
16
  * User state
17
17
  */
18
18
  class PageState {
19
+ /**
20
+ * Context
21
+ */
22
+ context;
23
+ /**
24
+ * Provider
25
+ */
26
+ provider;
19
27
  /**
20
28
  * Constructor
21
29
  */
@@ -22,6 +22,14 @@ var UserActionType;
22
22
  * User state
23
23
  */
24
24
  class UserState {
25
+ /**
26
+ * Context
27
+ */
28
+ context;
29
+ /**
30
+ * Provider
31
+ */
32
+ provider;
25
33
  /**
26
34
  * Constructor
27
35
  */
@@ -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 ?? (storage = new shared_1.WindowStorage());
14
+ storage ??= new shared_1.WindowStorage();
15
15
  const paras = storage.getObject(cacheKey);
16
16
  if (paras) {
17
17
  Object.assign(data, paras);
@@ -2,9 +2,7 @@
2
2
  * Event watcher
3
3
  */
4
4
  export class EventWatcher {
5
- constructor() {
6
- this.actions = [];
7
- }
5
+ actions = [];
8
6
  /**
9
7
  * Add action
10
8
  * @param action Action
@@ -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
@@ -19,6 +19,14 @@ const calls = {
19
19
  * Cannot update a component (`provider`) while rendering a different component
20
20
  */
21
21
  export class CultureState {
22
+ /**
23
+ * Context
24
+ */
25
+ context;
26
+ /**
27
+ * Provider
28
+ */
29
+ provider;
22
30
  /**
23
31
  * Constructor
24
32
  */
@@ -13,6 +13,14 @@ export var PageActionType;
13
13
  * User state
14
14
  */
15
15
  export class PageState {
16
+ /**
17
+ * Context
18
+ */
19
+ context;
20
+ /**
21
+ * Provider
22
+ */
23
+ provider;
16
24
  /**
17
25
  * Constructor
18
26
  */
@@ -19,6 +19,14 @@ export var UserActionType;
19
19
  * User state
20
20
  */
21
21
  export class UserState {
22
+ /**
23
+ * Context
24
+ */
25
+ context;
26
+ /**
27
+ * Provider
28
+ */
29
+ provider;
22
30
  /**
23
31
  * Constructor
24
32
  */
@@ -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 ?? (storage = new WindowStorage());
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.82",
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.58",
42
- "@etsoo/notificationbase": "^1.1.67",
43
- "@etsoo/shared": "^1.2.80",
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.13.1",
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": "^5.9.3",
61
- "vitest": "^4.1.0"
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": "ES2020",
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": "ES2020",
5
- "module": "ES2020",
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,