@etsoo/smarterp-core 1.0.16 → 1.0.17
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/org/OrgTiplist.d.ts +5 -0
- package/lib/cjs/components/org/OrgTiplist.js +2 -2
- package/lib/cjs/components/user/UserTiplist.d.ts +5 -0
- package/lib/cjs/components/user/UserTiplist.js +2 -2
- package/lib/cjs/rq/member/MemberListRQ.d.ts +10 -0
- package/lib/mjs/components/org/OrgTiplist.d.ts +5 -0
- package/lib/mjs/components/org/OrgTiplist.js +2 -2
- package/lib/mjs/components/user/UserTiplist.d.ts +5 -0
- package/lib/mjs/components/user/UserTiplist.js +2 -2
- package/lib/mjs/rq/member/MemberListRQ.d.ts +10 -0
- package/package.json +1 -1
- package/src/components/org/OrgTiplist.tsx +8 -1
- package/src/components/user/UserTiplist.tsx +8 -1
- package/src/rq/member/MemberListRQ.ts +12 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TiplistProps } from "@etsoo/materialui";
|
|
2
2
|
import { OrgListDto } from "../../dto/org/OrgListDto";
|
|
3
|
+
import { OrgListRQ } from "../../rq/org/OrgListRQ";
|
|
3
4
|
/**
|
|
4
5
|
* Organization tiplist properties
|
|
5
6
|
* 机构提示列表属性
|
|
@@ -13,6 +14,10 @@ export type OrgTiplistProps = Omit<TiplistProps<OrgListDto, "id">, "loadData" |
|
|
|
13
14
|
* Name
|
|
14
15
|
*/
|
|
15
16
|
name?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Default request data
|
|
19
|
+
*/
|
|
20
|
+
rq?: Partial<OrgListRQ>;
|
|
16
21
|
};
|
|
17
22
|
/**
|
|
18
23
|
* Organization tiplist
|
|
@@ -14,10 +14,10 @@ function OrgTiplist(props) {
|
|
|
14
14
|
// App
|
|
15
15
|
const app = (0, ICoreServiceApp_1.useRequiredAppContext)();
|
|
16
16
|
// Destruct
|
|
17
|
-
const { fullWidth = true, label = app.get("org"), maxItems = 10, getOptionLabel = (data) => data.name + "(" + data.pin + ")", name = "organizationId", ...rest } = props;
|
|
17
|
+
const { fullWidth = true, label = app.get("org"), maxItems = 10, getOptionLabel = (data) => data.name + "(" + data.pin + ")", name = "organizationId", rq = { enabled: true }, ...rest } = props;
|
|
18
18
|
// Layout
|
|
19
19
|
return ((0, jsx_runtime_1.jsx)(materialui_1.Tiplist, { label: label, getOptionLabel: getOptionLabel, name: name, fullWidth: fullWidth, maxItems: maxItems, loadData: (keyword, id, maxItems) => app.core.orgApi.list({
|
|
20
|
-
|
|
20
|
+
...rq,
|
|
21
21
|
keyword,
|
|
22
22
|
id,
|
|
23
23
|
queryPaging: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TiplistProps } from "@etsoo/materialui";
|
|
2
2
|
import { MemberListDto } from "../../dto/member/MemberListDto";
|
|
3
|
+
import { MemberListRQ } from "../../rq/member/MemberListRQ";
|
|
3
4
|
/**
|
|
4
5
|
* User tiplist properties
|
|
5
6
|
* 用户提示列表属性
|
|
@@ -13,6 +14,10 @@ export type UserTiplistProps = Omit<TiplistProps<MemberListDto, "id">, "loadData
|
|
|
13
14
|
* Name
|
|
14
15
|
*/
|
|
15
16
|
name?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Default request data
|
|
19
|
+
*/
|
|
20
|
+
rq?: Partial<MemberListRQ>;
|
|
16
21
|
};
|
|
17
22
|
/**
|
|
18
23
|
* User tiplist
|
|
@@ -14,10 +14,10 @@ function UserTiplist(props) {
|
|
|
14
14
|
// App
|
|
15
15
|
const app = (0, ICoreServiceApp_1.useRequiredAppContext)();
|
|
16
16
|
// Destruct
|
|
17
|
-
const { fullWidth = true, label = app.get("user"), maxItems = 10, getOptionLabel = (data) => data.name, name = "userId", ...rest } = props;
|
|
17
|
+
const { fullWidth = true, label = app.get("user"), maxItems = 10, getOptionLabel = (data) => data.name, name = "userId", rq = { enabled: true }, ...rest } = props;
|
|
18
18
|
// Layout
|
|
19
19
|
return ((0, jsx_runtime_1.jsx)(materialui_1.Tiplist, { label: label, getOptionLabel: getOptionLabel, name: name, fullWidth: fullWidth, maxItems: maxItems, loadData: (keyword, id, maxItems) => app.core.memberApi.list({
|
|
20
|
-
|
|
20
|
+
...rq,
|
|
21
21
|
keyword,
|
|
22
22
|
id,
|
|
23
23
|
queryPaging: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TiplistProps } from "@etsoo/materialui";
|
|
2
2
|
import { OrgListDto } from "../../dto/org/OrgListDto";
|
|
3
|
+
import { OrgListRQ } from "../../rq/org/OrgListRQ";
|
|
3
4
|
/**
|
|
4
5
|
* Organization tiplist properties
|
|
5
6
|
* 机构提示列表属性
|
|
@@ -13,6 +14,10 @@ export type OrgTiplistProps = Omit<TiplistProps<OrgListDto, "id">, "loadData" |
|
|
|
13
14
|
* Name
|
|
14
15
|
*/
|
|
15
16
|
name?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Default request data
|
|
19
|
+
*/
|
|
20
|
+
rq?: Partial<OrgListRQ>;
|
|
16
21
|
};
|
|
17
22
|
/**
|
|
18
23
|
* Organization tiplist
|
|
@@ -11,10 +11,10 @@ export function OrgTiplist(props) {
|
|
|
11
11
|
// App
|
|
12
12
|
const app = useRequiredAppContext();
|
|
13
13
|
// Destruct
|
|
14
|
-
const { fullWidth = true, label = app.get("org"), maxItems = 10, getOptionLabel = (data) => data.name + "(" + data.pin + ")", name = "organizationId", ...rest } = props;
|
|
14
|
+
const { fullWidth = true, label = app.get("org"), maxItems = 10, getOptionLabel = (data) => data.name + "(" + data.pin + ")", name = "organizationId", rq = { enabled: true }, ...rest } = props;
|
|
15
15
|
// Layout
|
|
16
16
|
return (_jsx(Tiplist, { label: label, getOptionLabel: getOptionLabel, name: name, fullWidth: fullWidth, maxItems: maxItems, loadData: (keyword, id, maxItems) => app.core.orgApi.list({
|
|
17
|
-
|
|
17
|
+
...rq,
|
|
18
18
|
keyword,
|
|
19
19
|
id,
|
|
20
20
|
queryPaging: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TiplistProps } from "@etsoo/materialui";
|
|
2
2
|
import { MemberListDto } from "../../dto/member/MemberListDto";
|
|
3
|
+
import { MemberListRQ } from "../../rq/member/MemberListRQ";
|
|
3
4
|
/**
|
|
4
5
|
* User tiplist properties
|
|
5
6
|
* 用户提示列表属性
|
|
@@ -13,6 +14,10 @@ export type UserTiplistProps = Omit<TiplistProps<MemberListDto, "id">, "loadData
|
|
|
13
14
|
* Name
|
|
14
15
|
*/
|
|
15
16
|
name?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Default request data
|
|
19
|
+
*/
|
|
20
|
+
rq?: Partial<MemberListRQ>;
|
|
16
21
|
};
|
|
17
22
|
/**
|
|
18
23
|
* User tiplist
|
|
@@ -11,10 +11,10 @@ export function UserTiplist(props) {
|
|
|
11
11
|
// App
|
|
12
12
|
const app = useRequiredAppContext();
|
|
13
13
|
// Destruct
|
|
14
|
-
const { fullWidth = true, label = app.get("user"), maxItems = 10, getOptionLabel = (data) => data.name, name = "userId", ...rest } = props;
|
|
14
|
+
const { fullWidth = true, label = app.get("user"), maxItems = 10, getOptionLabel = (data) => data.name, name = "userId", rq = { enabled: true }, ...rest } = props;
|
|
15
15
|
// Layout
|
|
16
16
|
return (_jsx(Tiplist, { label: label, getOptionLabel: getOptionLabel, name: name, fullWidth: fullWidth, maxItems: maxItems, loadData: (keyword, id, maxItems) => app.core.memberApi.list({
|
|
17
|
-
|
|
17
|
+
...rq,
|
|
18
18
|
keyword,
|
|
19
19
|
id,
|
|
20
20
|
queryPaging: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Tiplist, TiplistProps } from "@etsoo/materialui";
|
|
2
2
|
import { OrgListDto } from "../../dto/org/OrgListDto";
|
|
3
3
|
import { useRequiredAppContext } from "../../ICoreServiceApp";
|
|
4
|
+
import { OrgListRQ } from "../../rq/org/OrgListRQ";
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Organization tiplist properties
|
|
@@ -19,6 +20,11 @@ export type OrgTiplistProps = Omit<
|
|
|
19
20
|
* Name
|
|
20
21
|
*/
|
|
21
22
|
name?: string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Default request data
|
|
26
|
+
*/
|
|
27
|
+
rq?: Partial<OrgListRQ>;
|
|
22
28
|
};
|
|
23
29
|
|
|
24
30
|
/**
|
|
@@ -38,6 +44,7 @@ export function OrgTiplist(props: OrgTiplistProps) {
|
|
|
38
44
|
maxItems = 10,
|
|
39
45
|
getOptionLabel = (data) => data.name + "(" + data.pin + ")",
|
|
40
46
|
name = "organizationId",
|
|
47
|
+
rq = { enabled: true },
|
|
41
48
|
...rest
|
|
42
49
|
} = props;
|
|
43
50
|
|
|
@@ -52,7 +59,7 @@ export function OrgTiplist(props: OrgTiplistProps) {
|
|
|
52
59
|
loadData={(keyword, id, maxItems) =>
|
|
53
60
|
app.core.orgApi.list(
|
|
54
61
|
{
|
|
55
|
-
|
|
62
|
+
...rq,
|
|
56
63
|
keyword,
|
|
57
64
|
id,
|
|
58
65
|
queryPaging: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Tiplist, TiplistProps } from "@etsoo/materialui";
|
|
2
2
|
import { useRequiredAppContext } from "../../ICoreServiceApp";
|
|
3
3
|
import { MemberListDto } from "../../dto/member/MemberListDto";
|
|
4
|
+
import { MemberListRQ } from "../../rq/member/MemberListRQ";
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* User tiplist properties
|
|
@@ -19,6 +20,11 @@ export type UserTiplistProps = Omit<
|
|
|
19
20
|
* Name
|
|
20
21
|
*/
|
|
21
22
|
name?: string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Default request data
|
|
26
|
+
*/
|
|
27
|
+
rq?: Partial<MemberListRQ>;
|
|
22
28
|
};
|
|
23
29
|
|
|
24
30
|
/**
|
|
@@ -38,6 +44,7 @@ export function UserTiplist(props: UserTiplistProps) {
|
|
|
38
44
|
maxItems = 10,
|
|
39
45
|
getOptionLabel = (data) => data.name,
|
|
40
46
|
name = "userId",
|
|
47
|
+
rq = { enabled: true },
|
|
41
48
|
...rest
|
|
42
49
|
} = props;
|
|
43
50
|
|
|
@@ -52,7 +59,7 @@ export function UserTiplist(props: UserTiplistProps) {
|
|
|
52
59
|
loadData={(keyword, id, maxItems) =>
|
|
53
60
|
app.core.memberApi.list(
|
|
54
61
|
{
|
|
55
|
-
|
|
62
|
+
...rq,
|
|
56
63
|
keyword,
|
|
57
64
|
id,
|
|
58
65
|
queryPaging: {
|