@etsoo/smarterp-core 1.0.56 → 1.0.58

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.
@@ -13,7 +13,7 @@ export declare function useRequiredAppContext(): ICoreServiceApp;
13
13
  * @param pageTitle Page title or true for reset
14
14
  * @param deps Dependencies
15
15
  */
16
- export declare function usePageData(app: ICoreServiceApp, pageTitle?: string | true, deps?: DependencyList): void;
16
+ export declare function usePageData(app: ICoreServiceApp, pageTitle?: string, deps?: DependencyList): void;
17
17
  /**
18
18
  * Use page data
19
19
  * @param app Application
@@ -26,9 +26,7 @@ function usePageData(app, pageDataOrTitle, deps) {
26
26
  // Page title
27
27
  dispatch(typeof pageDataOrTitle === "object"
28
28
  ? pageDataOrTitle
29
- : typeof pageDataOrTitle === "boolean"
30
- ? pageDataOrTitle
31
- : { page: pageDataOrTitle });
29
+ : { page: pageDataOrTitle });
32
30
  return () => {
33
31
  app.pageExit();
34
32
  };
@@ -13,7 +13,7 @@ export declare function useRequiredAppContext(): ICoreServiceApp;
13
13
  * @param pageTitle Page title or true for reset
14
14
  * @param deps Dependencies
15
15
  */
16
- export declare function usePageData(app: ICoreServiceApp, pageTitle?: string | true, deps?: DependencyList): void;
16
+ export declare function usePageData(app: ICoreServiceApp, pageTitle?: string, deps?: DependencyList): void;
17
17
  /**
18
18
  * Use page data
19
19
  * @param app Application
@@ -18,9 +18,7 @@ export function usePageData(app, pageDataOrTitle, deps) {
18
18
  // Page title
19
19
  dispatch(typeof pageDataOrTitle === "object"
20
20
  ? pageDataOrTitle
21
- : typeof pageDataOrTitle === "boolean"
22
- ? pageDataOrTitle
23
- : { page: pageDataOrTitle });
21
+ : { page: pageDataOrTitle });
24
22
  return () => {
25
23
  app.pageExit();
26
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/smarterp-core",
3
- "version": "1.0.56",
3
+ "version": "1.0.58",
4
4
  "description": "TypeScript APIs for SmartERP Core",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -54,10 +54,10 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "@etsoo/appscript": "^1.6.32",
57
- "@etsoo/materialui": "^1.5.38",
58
- "@etsoo/react": "^1.8.40",
57
+ "@etsoo/materialui": "^1.5.43",
58
+ "@etsoo/react": "^1.8.43",
59
59
  "@etsoo/shared": "^1.2.70",
60
- "@etsoo/toolpad": "^1.0.26",
60
+ "@etsoo/toolpad": "^1.0.29",
61
61
  "@mui/material": "^7.0.2",
62
62
  "react": "^18.3.1",
63
63
  "react-dom": "^18.3.1"
@@ -24,7 +24,7 @@ export function useRequiredAppContext(): ICoreServiceApp {
24
24
  */
25
25
  export function usePageData(
26
26
  app: ICoreServiceApp,
27
- pageTitle?: string | true,
27
+ pageTitle?: string,
28
28
  deps?: DependencyList
29
29
  ): void;
30
30
 
@@ -42,7 +42,7 @@ export function usePageData(
42
42
 
43
43
  export function usePageData(
44
44
  app: ICoreServiceApp,
45
- pageDataOrTitle?: string | true | PageData,
45
+ pageDataOrTitle?: string | PageData,
46
46
  deps?: DependencyList
47
47
  ) {
48
48
  const { dispatch } = React.useContext(PageDataContext);
@@ -50,8 +50,6 @@ export function usePageData(
50
50
  // Page title
51
51
  dispatch(
52
52
  typeof pageDataOrTitle === "object"
53
- ? pageDataOrTitle
54
- : typeof pageDataOrTitle === "boolean"
55
53
  ? pageDataOrTitle
56
54
  : { page: pageDataOrTitle }
57
55
  );