@etsoo/smarterp-core 1.0.53 → 1.0.55
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/components/index.d.ts +1 -0
- package/lib/cjs/components/index.js +1 -0
- package/lib/cjs/components/public/CultureList.d.ts +8 -0
- package/lib/cjs/components/public/CultureList.js +22 -0
- package/lib/cjs/i18n/en.json +1 -0
- package/lib/cjs/i18n/zh-Hans.json +1 -0
- package/lib/cjs/i18n/zh-Hant.json +1 -0
- package/lib/cjs/rq/org/OrgCreateResourceRQ.d.ts +9 -1
- package/lib/mjs/components/index.d.ts +1 -0
- package/lib/mjs/components/index.js +1 -0
- package/lib/mjs/components/public/CultureList.d.ts +8 -0
- package/lib/mjs/components/public/CultureList.js +19 -0
- package/lib/mjs/i18n/en.json +1 -0
- package/lib/mjs/i18n/zh-Hans.json +1 -0
- package/lib/mjs/i18n/zh-Hant.json +1 -0
- package/lib/mjs/rq/org/OrgCreateResourceRQ.d.ts +9 -1
- package/package.json +3 -3
- package/src/components/index.ts +1 -0
- package/src/components/public/CultureList.tsx +29 -0
- package/src/i18n/en.json +1 -0
- package/src/i18n/zh-Hans.json +1 -0
- package/src/i18n/zh-Hant.json +1 -0
- package/src/rq/org/OrgCreateResourceRQ.ts +9 -1
|
@@ -29,5 +29,6 @@ __exportStar(require("./org/OrgTiplist"), exports);
|
|
|
29
29
|
// public
|
|
30
30
|
__exportStar(require("./public/ButtonCultures"), exports);
|
|
31
31
|
__exportStar(require("./public/ButtonCurrencies"), exports);
|
|
32
|
+
__exportStar(require("./public/CultureList"), exports);
|
|
32
33
|
// user
|
|
33
34
|
__exportStar(require("./user/UserTiplist"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SelectExProps } from "@etsoo/materialui";
|
|
2
|
+
import { ListType1 } from "@etsoo/shared";
|
|
3
|
+
/**
|
|
4
|
+
* Supported cultures list component
|
|
5
|
+
* @param props Props
|
|
6
|
+
* @returns Component
|
|
7
|
+
*/
|
|
8
|
+
export declare function CultureList(props: Omit<SelectExProps<ListType1>, "options">): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CultureList = CultureList;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const materialui_1 = require("@etsoo/materialui");
|
|
6
|
+
const ICoreServiceApp_1 = require("../../ICoreServiceApp");
|
|
7
|
+
/**
|
|
8
|
+
* Supported cultures list component
|
|
9
|
+
* @param props Props
|
|
10
|
+
* @returns Component
|
|
11
|
+
*/
|
|
12
|
+
function CultureList(props) {
|
|
13
|
+
// App
|
|
14
|
+
const app = (0, ICoreServiceApp_1.useRequiredAppContext)();
|
|
15
|
+
// Destruct
|
|
16
|
+
const { label = app.get("culture"), name = "culture", ...rest } = props;
|
|
17
|
+
// Layout
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)(materialui_1.SelectEx, { label: label, name: name, options: app.settings.cultures.map((c) => ({
|
|
19
|
+
id: c.name,
|
|
20
|
+
label: c.label
|
|
21
|
+
})), ...rest }));
|
|
22
|
+
}
|
package/lib/cjs/i18n/en.json
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { OrgResourceItem } from "../../dto/org/OrgResourceItem";
|
|
2
|
+
type OrgResourceItemUpdate = OrgResourceItem & {
|
|
3
|
+
/**
|
|
4
|
+
* Updated flag
|
|
5
|
+
* 更新标记
|
|
6
|
+
*/
|
|
7
|
+
updatedFlag: number;
|
|
8
|
+
};
|
|
2
9
|
/**
|
|
3
10
|
* Create resource request data
|
|
4
11
|
* 创建资源请求数据
|
|
@@ -23,5 +30,6 @@ export type OrgCreateResourceRQ = {
|
|
|
23
30
|
* Resource items
|
|
24
31
|
* 资源项
|
|
25
32
|
*/
|
|
26
|
-
items?:
|
|
33
|
+
items?: OrgResourceItemUpdate[];
|
|
27
34
|
};
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SelectExProps } from "@etsoo/materialui";
|
|
2
|
+
import { ListType1 } from "@etsoo/shared";
|
|
3
|
+
/**
|
|
4
|
+
* Supported cultures list component
|
|
5
|
+
* @param props Props
|
|
6
|
+
* @returns Component
|
|
7
|
+
*/
|
|
8
|
+
export declare function CultureList(props: Omit<SelectExProps<ListType1>, "options">): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { SelectEx } from "@etsoo/materialui";
|
|
3
|
+
import { useRequiredAppContext } from "../../ICoreServiceApp";
|
|
4
|
+
/**
|
|
5
|
+
* Supported cultures list component
|
|
6
|
+
* @param props Props
|
|
7
|
+
* @returns Component
|
|
8
|
+
*/
|
|
9
|
+
export function CultureList(props) {
|
|
10
|
+
// App
|
|
11
|
+
const app = useRequiredAppContext();
|
|
12
|
+
// Destruct
|
|
13
|
+
const { label = app.get("culture"), name = "culture", ...rest } = props;
|
|
14
|
+
// Layout
|
|
15
|
+
return (_jsx(SelectEx, { label: label, name: name, options: app.settings.cultures.map((c) => ({
|
|
16
|
+
id: c.name,
|
|
17
|
+
label: c.label
|
|
18
|
+
})), ...rest }));
|
|
19
|
+
}
|
package/lib/mjs/i18n/en.json
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { OrgResourceItem } from "../../dto/org/OrgResourceItem";
|
|
2
|
+
type OrgResourceItemUpdate = OrgResourceItem & {
|
|
3
|
+
/**
|
|
4
|
+
* Updated flag
|
|
5
|
+
* 更新标记
|
|
6
|
+
*/
|
|
7
|
+
updatedFlag: number;
|
|
8
|
+
};
|
|
2
9
|
/**
|
|
3
10
|
* Create resource request data
|
|
4
11
|
* 创建资源请求数据
|
|
@@ -23,5 +30,6 @@ export type OrgCreateResourceRQ = {
|
|
|
23
30
|
* Resource items
|
|
24
31
|
* 资源项
|
|
25
32
|
*/
|
|
26
|
-
items?:
|
|
33
|
+
items?: OrgResourceItemUpdate[];
|
|
27
34
|
};
|
|
35
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/smarterp-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"description": "TypeScript APIs for SmartERP Core",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"vitest": "^3.1.2"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@etsoo/appscript": "^1.6.
|
|
57
|
-
"@etsoo/materialui": "^1.5.
|
|
56
|
+
"@etsoo/appscript": "^1.6.32",
|
|
57
|
+
"@etsoo/materialui": "^1.5.38",
|
|
58
58
|
"@etsoo/react": "^1.8.40",
|
|
59
59
|
"@etsoo/shared": "^1.2.70",
|
|
60
60
|
"@etsoo/toolpad": "^1.0.26",
|
package/src/components/index.ts
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SelectEx, SelectExProps } from "@etsoo/materialui";
|
|
2
|
+
import { useRequiredAppContext } from "../../ICoreServiceApp";
|
|
3
|
+
import { ListType1 } from "@etsoo/shared";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Supported cultures list component
|
|
7
|
+
* @param props Props
|
|
8
|
+
* @returns Component
|
|
9
|
+
*/
|
|
10
|
+
export function CultureList(props: Omit<SelectExProps<ListType1>, "options">) {
|
|
11
|
+
// App
|
|
12
|
+
const app = useRequiredAppContext();
|
|
13
|
+
|
|
14
|
+
// Destruct
|
|
15
|
+
const { label = app.get("culture"), name = "culture", ...rest } = props;
|
|
16
|
+
|
|
17
|
+
// Layout
|
|
18
|
+
return (
|
|
19
|
+
<SelectEx
|
|
20
|
+
label={label}
|
|
21
|
+
name={name}
|
|
22
|
+
options={app.settings.cultures.map((c) => ({
|
|
23
|
+
id: c.name,
|
|
24
|
+
label: c.label
|
|
25
|
+
}))}
|
|
26
|
+
{...rest}
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
29
|
+
}
|
package/src/i18n/en.json
CHANGED
package/src/i18n/zh-Hans.json
CHANGED
package/src/i18n/zh-Hant.json
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { OrgResourceItem } from "../../dto/org/OrgResourceItem";
|
|
2
2
|
|
|
3
|
+
type OrgResourceItemUpdate = OrgResourceItem & {
|
|
4
|
+
/**
|
|
5
|
+
* Updated flag
|
|
6
|
+
* 更新标记
|
|
7
|
+
*/
|
|
8
|
+
updatedFlag: number;
|
|
9
|
+
};
|
|
10
|
+
|
|
3
11
|
/**
|
|
4
12
|
* Create resource request data
|
|
5
13
|
* 创建资源请求数据
|
|
@@ -27,5 +35,5 @@ export type OrgCreateResourceRQ = {
|
|
|
27
35
|
* Resource items
|
|
28
36
|
* 资源项
|
|
29
37
|
*/
|
|
30
|
-
items?:
|
|
38
|
+
items?: OrgResourceItemUpdate[];
|
|
31
39
|
};
|