@etsoo/smarterp-core 1.0.40 → 1.0.41

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.
@@ -1,14 +1,20 @@
1
- import type { CommonPageProps, ResponsePageProps } from "@etsoo/materialui";
1
+ import type { CommonPageProps, ResponsePageProps, TabBoxProps } from "@etsoo/materialui";
2
2
  /**
3
3
  * Default UI namespace
4
4
  */
5
5
  export declare namespace DefaultUI {
6
6
  /**
7
- * Create response page props
7
+ * Default response page props
8
8
  * @param page Page props
9
9
  * @returns Response page props
10
10
  */
11
- function createProps(page: CommonPageProps): Pick<ResponsePageProps<any, any>, "adjustHeight" | "searchBarTop" | "pageProps">;
11
+ function pageProps(page: CommonPageProps): Pick<ResponsePageProps<any, any>, "adjustHeight" | "searchBarTop" | "pageProps">;
12
+ /**
13
+ * Default TabBox props
14
+ * @param isMobile Whether is mobile
15
+ * @returns Result
16
+ */
17
+ function tabsProps(isMobile: boolean): Partial<TabBoxProps>;
12
18
  /**
13
19
  * Widths of icon columns
14
20
  */
@@ -7,11 +7,11 @@ exports.DefaultUI = void 0;
7
7
  var DefaultUI;
8
8
  (function (DefaultUI) {
9
9
  /**
10
- * Create response page props
10
+ * Default response page props
11
11
  * @param page Page props
12
12
  * @returns Response page props
13
13
  */
14
- function createProps(page) {
14
+ function pageProps(page) {
15
15
  return {
16
16
  adjustHeight: 24,
17
17
  searchBarTop: true,
@@ -21,7 +21,25 @@ var DefaultUI;
21
21
  }
22
22
  };
23
23
  }
24
- DefaultUI.createProps = createProps;
24
+ DefaultUI.pageProps = pageProps;
25
+ /**
26
+ * Default TabBox props
27
+ * @param isMobile Whether is mobile
28
+ * @returns Result
29
+ */
30
+ function tabsProps(isMobile) {
31
+ const props = isMobile
32
+ ? {
33
+ sx: { maxWidth: { xs: 320, sm: 480 } },
34
+ variant: "scrollable",
35
+ scrollButtons: "auto",
36
+ allowScrollButtonsMobile: true,
37
+ centered: true
38
+ }
39
+ : {};
40
+ return props;
41
+ }
42
+ DefaultUI.tabsProps = tabsProps;
25
43
  /**
26
44
  * Widths of icon columns
27
45
  */
@@ -1,14 +1,20 @@
1
- import type { CommonPageProps, ResponsePageProps } from "@etsoo/materialui";
1
+ import type { CommonPageProps, ResponsePageProps, TabBoxProps } from "@etsoo/materialui";
2
2
  /**
3
3
  * Default UI namespace
4
4
  */
5
5
  export declare namespace DefaultUI {
6
6
  /**
7
- * Create response page props
7
+ * Default response page props
8
8
  * @param page Page props
9
9
  * @returns Response page props
10
10
  */
11
- function createProps(page: CommonPageProps): Pick<ResponsePageProps<any, any>, "adjustHeight" | "searchBarTop" | "pageProps">;
11
+ function pageProps(page: CommonPageProps): Pick<ResponsePageProps<any, any>, "adjustHeight" | "searchBarTop" | "pageProps">;
12
+ /**
13
+ * Default TabBox props
14
+ * @param isMobile Whether is mobile
15
+ * @returns Result
16
+ */
17
+ function tabsProps(isMobile: boolean): Partial<TabBoxProps>;
12
18
  /**
13
19
  * Widths of icon columns
14
20
  */
@@ -4,11 +4,11 @@
4
4
  export var DefaultUI;
5
5
  (function (DefaultUI) {
6
6
  /**
7
- * Create response page props
7
+ * Default response page props
8
8
  * @param page Page props
9
9
  * @returns Response page props
10
10
  */
11
- function createProps(page) {
11
+ function pageProps(page) {
12
12
  return {
13
13
  adjustHeight: 24,
14
14
  searchBarTop: true,
@@ -18,7 +18,25 @@ export var DefaultUI;
18
18
  }
19
19
  };
20
20
  }
21
- DefaultUI.createProps = createProps;
21
+ DefaultUI.pageProps = pageProps;
22
+ /**
23
+ * Default TabBox props
24
+ * @param isMobile Whether is mobile
25
+ * @returns Result
26
+ */
27
+ function tabsProps(isMobile) {
28
+ const props = isMobile
29
+ ? {
30
+ sx: { maxWidth: { xs: 320, sm: 480 } },
31
+ variant: "scrollable",
32
+ scrollButtons: "auto",
33
+ allowScrollButtonsMobile: true,
34
+ centered: true
35
+ }
36
+ : {};
37
+ return props;
38
+ }
39
+ DefaultUI.tabsProps = tabsProps;
22
40
  /**
23
41
  * Widths of icon columns
24
42
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/smarterp-core",
3
- "version": "1.0.40",
3
+ "version": "1.0.41",
4
4
  "description": "TypeScript APIs for SmartERP Core",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -48,15 +48,15 @@
48
48
  "@types/react": "^18.3.20",
49
49
  "@types/react-dom": "^18.3.6",
50
50
  "@vitejs/plugin-react": "^4.3.4",
51
- "jsdom": "^26.0.0",
51
+ "jsdom": "^26.1.0",
52
52
  "typescript": "^5.8.3",
53
53
  "vitest": "^3.1.1"
54
54
  },
55
55
  "dependencies": {
56
56
  "@etsoo/appscript": "^1.6.22",
57
- "@etsoo/materialui": "^1.5.20",
57
+ "@etsoo/materialui": "^1.5.27",
58
58
  "@etsoo/react": "^1.8.38",
59
- "@etsoo/shared": "^1.2.66",
59
+ "@etsoo/shared": "^1.2.68",
60
60
  "@etsoo/toolpad": "^1.0.26",
61
61
  "@mui/material": "^7.0.2",
62
62
  "react": "^18.3.1",
@@ -1,15 +1,19 @@
1
- import type { CommonPageProps, ResponsePageProps } from "@etsoo/materialui";
1
+ import type {
2
+ CommonPageProps,
3
+ ResponsePageProps,
4
+ TabBoxProps
5
+ } from "@etsoo/materialui";
2
6
 
3
7
  /**
4
8
  * Default UI namespace
5
9
  */
6
10
  export namespace DefaultUI {
7
11
  /**
8
- * Create response page props
12
+ * Default response page props
9
13
  * @param page Page props
10
14
  * @returns Response page props
11
15
  */
12
- export function createProps(
16
+ export function pageProps(
13
17
  page: CommonPageProps
14
18
  ): Pick<
15
19
  ResponsePageProps<any, any>,
@@ -25,6 +29,25 @@ export namespace DefaultUI {
25
29
  };
26
30
  }
27
31
 
32
+ /**
33
+ * Default TabBox props
34
+ * @param isMobile Whether is mobile
35
+ * @returns Result
36
+ */
37
+ export function tabsProps(isMobile: boolean) {
38
+ const props: Partial<TabBoxProps> = isMobile
39
+ ? {
40
+ sx: { maxWidth: { xs: 320, sm: 480 } },
41
+ variant: "scrollable",
42
+ scrollButtons: "auto",
43
+ allowScrollButtonsMobile: true,
44
+ centered: true
45
+ }
46
+ : {};
47
+
48
+ return props;
49
+ }
50
+
28
51
  /**
29
52
  * Widths of icon columns
30
53
  */