@etsoo/smarterp-core 1.1.44 → 1.1.46
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/CoreApp.d.ts +11 -0
- package/lib/cjs/CoreApp.js +9 -0
- package/lib/cjs/DocumentApi.d.ts +29 -0
- package/lib/cjs/DocumentApi.js +36 -0
- package/lib/cjs/components/document/SystemDocumentTiplist.d.ts +33 -0
- package/lib/cjs/components/document/SystemDocumentTiplist.js +27 -0
- package/lib/cjs/components/index.d.ts +1 -0
- package/lib/cjs/components/index.js +2 -0
- package/lib/cjs/dto/document/SystemDocumentListData.d.ts +16 -0
- package/lib/cjs/dto/document/SystemDocumentListData.js +2 -0
- package/lib/cjs/dto/document/SystemDocumentViewData.d.ts +41 -0
- package/lib/cjs/dto/document/SystemDocumentViewData.js +2 -0
- package/lib/cjs/i18n/en.json +7 -0
- package/lib/cjs/i18n/zh-Hans.json +7 -0
- package/lib/cjs/i18n/zh-Hant.json +7 -0
- package/lib/cjs/index.d.ts +3 -0
- package/lib/cjs/index.js +3 -0
- package/lib/cjs/rq/document/SystemDocumentListRQ.d.ts +17 -0
- package/lib/cjs/rq/document/SystemDocumentListRQ.js +2 -0
- package/lib/mjs/CoreApp.d.ts +11 -0
- package/lib/mjs/CoreApp.js +9 -0
- package/lib/mjs/DocumentApi.d.ts +29 -0
- package/lib/mjs/DocumentApi.js +32 -0
- package/lib/mjs/components/document/SystemDocumentTiplist.d.ts +33 -0
- package/lib/mjs/components/document/SystemDocumentTiplist.js +24 -0
- package/lib/mjs/components/index.d.ts +1 -0
- package/lib/mjs/components/index.js +2 -0
- package/lib/mjs/dto/document/SystemDocumentListData.d.ts +16 -0
- package/lib/mjs/dto/document/SystemDocumentListData.js +1 -0
- package/lib/mjs/dto/document/SystemDocumentViewData.d.ts +41 -0
- package/lib/mjs/dto/document/SystemDocumentViewData.js +1 -0
- package/lib/mjs/i18n/en.json +7 -0
- package/lib/mjs/i18n/zh-Hans.json +7 -0
- package/lib/mjs/i18n/zh-Hant.json +7 -0
- package/lib/mjs/index.d.ts +3 -0
- package/lib/mjs/index.js +3 -0
- package/lib/mjs/rq/document/SystemDocumentListRQ.d.ts +17 -0
- package/lib/mjs/rq/document/SystemDocumentListRQ.js +1 -0
- package/package.json +1 -1
- package/src/CoreApp.ts +15 -0
- package/src/DocumentApi.ts +41 -0
- package/src/components/document/SystemDocumentTiplist.tsx +82 -0
- package/src/components/index.ts +3 -0
- package/src/dto/document/SystemDocumentListData.ts +16 -0
- package/src/dto/document/SystemDocumentViewData.ts +42 -0
- package/src/i18n/en.json +7 -0
- package/src/i18n/zh-Hans.json +7 -0
- package/src/i18n/zh-Hant.json +7 -0
- package/src/index.ts +5 -0
- package/src/rq/document/SystemDocumentListRQ.ts +19 -0
package/lib/cjs/CoreApp.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { AuthApi, IApp, IdentityType, IdentityTypeFlags, UserIdentifierType } fr
|
|
|
8
8
|
import { AuthCodeApi } from "./AuthCodeApi";
|
|
9
9
|
import { ListType } from "@etsoo/shared";
|
|
10
10
|
import { CoreApiService } from "./dto/org/CoreApiService";
|
|
11
|
+
import { DocumentApi } from "./DocumentApi";
|
|
11
12
|
type AppData = {
|
|
12
13
|
id: number;
|
|
13
14
|
appId?: number;
|
|
@@ -31,6 +32,10 @@ export interface ICoreApp {
|
|
|
31
32
|
* Auth code API
|
|
32
33
|
*/
|
|
33
34
|
readonly authCodeApi: AuthCodeApi;
|
|
35
|
+
/**
|
|
36
|
+
* Document API
|
|
37
|
+
*/
|
|
38
|
+
readonly documentApi: DocumentApi;
|
|
34
39
|
/**
|
|
35
40
|
* Member API
|
|
36
41
|
*/
|
|
@@ -130,6 +135,12 @@ export declare class CoreApp implements ICoreApp {
|
|
|
130
135
|
* 认证接口
|
|
131
136
|
*/
|
|
132
137
|
get authCodeApi(): AuthCodeApi;
|
|
138
|
+
private _documentApi?;
|
|
139
|
+
/**
|
|
140
|
+
* Document API
|
|
141
|
+
* 文档接口
|
|
142
|
+
*/
|
|
143
|
+
get documentApi(): DocumentApi;
|
|
133
144
|
private _memberApi?;
|
|
134
145
|
/**
|
|
135
146
|
* Member API
|
package/lib/cjs/CoreApp.js
CHANGED
|
@@ -10,6 +10,7 @@ const appscript_1 = require("@etsoo/appscript");
|
|
|
10
10
|
const AuthCodeApi_1 = require("./AuthCodeApi");
|
|
11
11
|
const shared_1 = require("@etsoo/shared");
|
|
12
12
|
const CoreApiService_1 = require("./dto/org/CoreApiService");
|
|
13
|
+
const DocumentApi_1 = require("./DocumentApi");
|
|
13
14
|
/**
|
|
14
15
|
* Core application
|
|
15
16
|
* 核心应用程序
|
|
@@ -41,6 +42,14 @@ class CoreApp {
|
|
|
41
42
|
get authCodeApi() {
|
|
42
43
|
return (this._authCodeApi ??= new AuthCodeApi_1.AuthCodeApi(this.app, this.api));
|
|
43
44
|
}
|
|
45
|
+
_documentApi;
|
|
46
|
+
/**
|
|
47
|
+
* Document API
|
|
48
|
+
* 文档接口
|
|
49
|
+
*/
|
|
50
|
+
get documentApi() {
|
|
51
|
+
return (this._documentApi ??= new DocumentApi_1.DocumentApi(this.app, this.api));
|
|
52
|
+
}
|
|
44
53
|
_memberApi;
|
|
45
54
|
/**
|
|
46
55
|
* Member API
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EntityApi, IApi, IApiPayload, IApp } from "@etsoo/appscript";
|
|
2
|
+
import { SystemDocumentListRQ } from "./rq/document/SystemDocumentListRQ";
|
|
3
|
+
import { SystemDocumentListData } from "./dto/document/SystemDocumentListData";
|
|
4
|
+
import { SystemDocumentViewData } from "./dto/document/SystemDocumentViewData";
|
|
5
|
+
/**
|
|
6
|
+
* Document API
|
|
7
|
+
*/
|
|
8
|
+
export declare class DocumentApi extends EntityApi {
|
|
9
|
+
/**
|
|
10
|
+
* Constructor
|
|
11
|
+
* @param app Application
|
|
12
|
+
* @param api API
|
|
13
|
+
*/
|
|
14
|
+
constructor(app: IApp, api?: IApi);
|
|
15
|
+
/**
|
|
16
|
+
* List
|
|
17
|
+
* @param rq Request data
|
|
18
|
+
* @param payload Payload
|
|
19
|
+
* @returns Result
|
|
20
|
+
*/
|
|
21
|
+
list(rq: SystemDocumentListRQ, payload: IApiPayload<SystemDocumentListData[]>): Promise<SystemDocumentListData[] | undefined>;
|
|
22
|
+
/**
|
|
23
|
+
* Read
|
|
24
|
+
* @param id Id
|
|
25
|
+
* @param payload Payload
|
|
26
|
+
* @returns Result
|
|
27
|
+
*/
|
|
28
|
+
read(id: number, payload?: IApiPayload<SystemDocumentViewData>): Promise<SystemDocumentViewData | undefined>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DocumentApi = void 0;
|
|
4
|
+
const appscript_1 = require("@etsoo/appscript");
|
|
5
|
+
/**
|
|
6
|
+
* Document API
|
|
7
|
+
*/
|
|
8
|
+
class DocumentApi extends appscript_1.EntityApi {
|
|
9
|
+
/**
|
|
10
|
+
* Constructor
|
|
11
|
+
* @param app Application
|
|
12
|
+
* @param api API
|
|
13
|
+
*/
|
|
14
|
+
constructor(app, api = app.api) {
|
|
15
|
+
super("Document", app, api);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* List
|
|
19
|
+
* @param rq Request data
|
|
20
|
+
* @param payload Payload
|
|
21
|
+
* @returns Result
|
|
22
|
+
*/
|
|
23
|
+
list(rq, payload) {
|
|
24
|
+
return this.listBase(rq, payload);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Read
|
|
28
|
+
* @param id Id
|
|
29
|
+
* @param payload Payload
|
|
30
|
+
* @returns Result
|
|
31
|
+
*/
|
|
32
|
+
read(id, payload) {
|
|
33
|
+
return this.readBase(id, payload);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.DocumentApi = DocumentApi;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { TiplistProps } from "@etsoo/materialui";
|
|
2
|
+
import { SystemDocumentListData } from "../../dto/document/SystemDocumentListData";
|
|
3
|
+
import { SystemDocumentListRQ } from "../../rq/document/SystemDocumentListRQ";
|
|
4
|
+
/**
|
|
5
|
+
* System document tiplist properties
|
|
6
|
+
* 系统文档提示列表属性
|
|
7
|
+
*/
|
|
8
|
+
export type SystemDocumentTiplistProps = Omit<TiplistProps<SystemDocumentListData, "id">, "loadData" | "label" | "name"> & {
|
|
9
|
+
/**
|
|
10
|
+
* Label
|
|
11
|
+
*/
|
|
12
|
+
label?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Name
|
|
15
|
+
*/
|
|
16
|
+
name?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Default request data
|
|
19
|
+
*/
|
|
20
|
+
rq?: Partial<SystemDocumentListRQ>;
|
|
21
|
+
/**
|
|
22
|
+
* Load data handler
|
|
23
|
+
* @param rq Request data
|
|
24
|
+
*/
|
|
25
|
+
onLoadData?: (rq: SystemDocumentListRQ) => SystemDocumentListRQ;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* System document tiplist
|
|
29
|
+
* 系统文档提示列表
|
|
30
|
+
* @param props Properties
|
|
31
|
+
* @returns Component
|
|
32
|
+
*/
|
|
33
|
+
export declare function SystemDocumentTiplist(props: SystemDocumentTiplistProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SystemDocumentTiplist = SystemDocumentTiplist;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const materialui_1 = require("@etsoo/materialui");
|
|
6
|
+
const ICoreServiceApp_1 = require("../../ICoreServiceApp");
|
|
7
|
+
/**
|
|
8
|
+
* System document tiplist
|
|
9
|
+
* 系统文档提示列表
|
|
10
|
+
* @param props Properties
|
|
11
|
+
* @returns Component
|
|
12
|
+
*/
|
|
13
|
+
function SystemDocumentTiplist(props) {
|
|
14
|
+
// App
|
|
15
|
+
const app = (0, ICoreServiceApp_1.useRequiredAppContext)();
|
|
16
|
+
// Destruct
|
|
17
|
+
const { fullWidth = true, label = app.get("systemTemplate"), maxItems = 10, getOptionLabel = (data) => data.title, onLoadData = (rq) => rq, name = "systemDocumentId", rq = { enabled: true }, ...rest } = props;
|
|
18
|
+
// Layout
|
|
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.documentApi.list(onLoadData({
|
|
20
|
+
...rq,
|
|
21
|
+
keyword,
|
|
22
|
+
id,
|
|
23
|
+
queryPaging: {
|
|
24
|
+
batchSize: maxItems
|
|
25
|
+
}
|
|
26
|
+
}), { showLoading: false, defaultValue: [] }), ...rest }));
|
|
27
|
+
}
|
|
@@ -6,6 +6,7 @@ export * from "./app/IdentityTypeList";
|
|
|
6
6
|
export * from "./app/SearchDays";
|
|
7
7
|
export * from "./app/StatusList";
|
|
8
8
|
export * from "./app/UserRoleList";
|
|
9
|
+
export * from "./document/SystemDocumentTiplist";
|
|
9
10
|
export * from "./org/ButtonApiServices";
|
|
10
11
|
export * from "./org/OrgSwitchPopover";
|
|
11
12
|
export * from "./org/OrgTiplist";
|
|
@@ -24,6 +24,8 @@ __exportStar(require("./app/IdentityTypeList"), exports);
|
|
|
24
24
|
__exportStar(require("./app/SearchDays"), exports);
|
|
25
25
|
__exportStar(require("./app/StatusList"), exports);
|
|
26
26
|
__exportStar(require("./app/UserRoleList"), exports);
|
|
27
|
+
// document
|
|
28
|
+
__exportStar(require("./document/SystemDocumentTiplist"), exports);
|
|
27
29
|
// org
|
|
28
30
|
__exportStar(require("./org/ButtonApiServices"), exports);
|
|
29
31
|
__exportStar(require("./org/OrgSwitchPopover"), exports);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* System document view data
|
|
3
|
+
* 系统文档浏览数据
|
|
4
|
+
*/
|
|
5
|
+
export type SystemDocumentViewData = {
|
|
6
|
+
/**
|
|
7
|
+
* Id
|
|
8
|
+
* 编号
|
|
9
|
+
*/
|
|
10
|
+
id: number;
|
|
11
|
+
/**
|
|
12
|
+
* Kind
|
|
13
|
+
* 类型
|
|
14
|
+
*/
|
|
15
|
+
kind: string;
|
|
16
|
+
/**
|
|
17
|
+
* Title
|
|
18
|
+
* 标题
|
|
19
|
+
*/
|
|
20
|
+
title: string;
|
|
21
|
+
/**
|
|
22
|
+
* Parameters
|
|
23
|
+
* 参数
|
|
24
|
+
*/
|
|
25
|
+
parameters?: unknown;
|
|
26
|
+
/**
|
|
27
|
+
* Template
|
|
28
|
+
* 模板
|
|
29
|
+
*/
|
|
30
|
+
template: string;
|
|
31
|
+
/**
|
|
32
|
+
* Refresh time
|
|
33
|
+
* 刷新时间
|
|
34
|
+
*/
|
|
35
|
+
refreshTime: Date | string;
|
|
36
|
+
/**
|
|
37
|
+
* Cultures
|
|
38
|
+
* 文化
|
|
39
|
+
*/
|
|
40
|
+
cultures?: string[];
|
|
41
|
+
};
|
package/lib/cjs/i18n/en.json
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"buy": "Buy",
|
|
26
26
|
"collapseMenu": "Collapse menu",
|
|
27
27
|
"collapseNavMenuAriaLabel": "Collapse navigation menu",
|
|
28
|
+
"cultures": "Cultures",
|
|
28
29
|
"companyNo": "Company No.",
|
|
29
30
|
"completeExecution": "Complete execution",
|
|
30
31
|
"currentOrg": "Current organization",
|
|
@@ -33,11 +34,14 @@
|
|
|
33
34
|
"days": "Days",
|
|
34
35
|
"details": "Details",
|
|
35
36
|
"directReports": "Direct reports",
|
|
37
|
+
"documentPreview": "Document preview",
|
|
38
|
+
"documentTemplates": "Document templates",
|
|
36
39
|
"editAvatar": "Edit avatar",
|
|
37
40
|
"editLogo": "Edit logo",
|
|
38
41
|
"editResource": "Edit resource",
|
|
39
42
|
"expandMenu": "Expand menu",
|
|
40
43
|
"expandNavMenuAriaLabel": "Expand navigation menu",
|
|
44
|
+
"exportDocument": "Export document",
|
|
41
45
|
"externalApis": "External APIs",
|
|
42
46
|
"fileName": "File name",
|
|
43
47
|
"fullName": "Full name",
|
|
@@ -75,6 +79,7 @@
|
|
|
75
79
|
"orgPin": "Org No.",
|
|
76
80
|
"orgs": "Organizations",
|
|
77
81
|
"owner": "Owner",
|
|
82
|
+
"parameters": "Parameters",
|
|
78
83
|
"parentOrg": "Parent org",
|
|
79
84
|
"pin": "ID",
|
|
80
85
|
"preferredName": "Preferred name",
|
|
@@ -114,8 +119,10 @@
|
|
|
114
119
|
"switchToLightModeAriaLabel": "Switch to light mode",
|
|
115
120
|
"switchOrg": "Switch organization",
|
|
116
121
|
"subscribed": "Subscribed",
|
|
122
|
+
"systemTemplate": "System template",
|
|
117
123
|
"target": "Target",
|
|
118
124
|
"targetId": "Target id",
|
|
125
|
+
"template": "Template",
|
|
119
126
|
"years5": ["1 year", "2 years", "3 years", "4 years", "5 years"],
|
|
120
127
|
"uiTypeEmail": "Email",
|
|
121
128
|
"uiTypeMobile": "Mobile",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"buy": "购买",
|
|
26
26
|
"collapseMenu": "折叠菜单",
|
|
27
27
|
"collapseNavMenuAriaLabel": "折叠导航菜单",
|
|
28
|
+
"cultures": "语言/文化",
|
|
28
29
|
"companyNo": "机构编号",
|
|
29
30
|
"completeExecution": "完成执行",
|
|
30
31
|
"currentOrg": "当前机构",
|
|
@@ -33,11 +34,14 @@
|
|
|
33
34
|
"days": "天数",
|
|
34
35
|
"details": "细节",
|
|
35
36
|
"directReports": "直接下属",
|
|
37
|
+
"documentPreview": "文档预览",
|
|
38
|
+
"documentTemplates": "文档模板",
|
|
36
39
|
"editAvatar": "修改头像",
|
|
37
40
|
"editLogo": "修改图标",
|
|
38
41
|
"editResource": "编辑资源",
|
|
39
42
|
"expandMenu": "展开菜单",
|
|
40
43
|
"expandNavMenuAriaLabel": "展开导航菜单",
|
|
44
|
+
"exportDocument": "导出文档",
|
|
41
45
|
"externalApis": "外部接口",
|
|
42
46
|
"fileName": "文件名",
|
|
43
47
|
"fullName": "全称",
|
|
@@ -75,6 +79,7 @@
|
|
|
75
79
|
"orgPin": "机构编号",
|
|
76
80
|
"orgs": "机构",
|
|
77
81
|
"owner": "所有者",
|
|
82
|
+
"parameters": "参数",
|
|
78
83
|
"parentOrg": "上级机构",
|
|
79
84
|
"pin": "身份证号码",
|
|
80
85
|
"preferredName": "首选名称",
|
|
@@ -114,8 +119,10 @@
|
|
|
114
119
|
"switchToLightModeAriaLabel": "切换到浅色模式",
|
|
115
120
|
"switchOrg": "切换机构",
|
|
116
121
|
"subscribed": "已订阅",
|
|
122
|
+
"systemTemplate": "系统模板",
|
|
117
123
|
"target": "目标",
|
|
118
124
|
"targetId": "目标编号",
|
|
125
|
+
"template": "模板",
|
|
119
126
|
"years5": ["1年", "2年", "3年", "4年", "5年"],
|
|
120
127
|
"uiTypeEmail": "电子邮箱",
|
|
121
128
|
"uiTypeMobile": "手机号",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"buy": "購買",
|
|
26
26
|
"collapseMenu": "折疊菜單",
|
|
27
27
|
"collapseNavMenuAriaLabel": "折疊導航菜單",
|
|
28
|
+
"cultures": "語言/文化",
|
|
28
29
|
"companyNo": "機構編號",
|
|
29
30
|
"completeExecution": "完成執行",
|
|
30
31
|
"currentOrg": "當前機構",
|
|
@@ -33,11 +34,14 @@
|
|
|
33
34
|
"days": "天數",
|
|
34
35
|
"details": "細節",
|
|
35
36
|
"directReports": "直接下屬",
|
|
37
|
+
"documentPreview": "文檔預覽",
|
|
38
|
+
"documentTemplates": "文檔模板",
|
|
36
39
|
"editAvatar": "修改頭像",
|
|
37
40
|
"editLogo": "修改圖標",
|
|
38
41
|
"editResource": "編輯資源",
|
|
39
42
|
"expandMenu": "展開菜單",
|
|
40
43
|
"expandNavMenuAriaLabel": "展開導航菜單",
|
|
44
|
+
"exportDocument": "導出文檔",
|
|
41
45
|
"externalApis": "外部接口",
|
|
42
46
|
"fileName": "文件名",
|
|
43
47
|
"fullName": "全稱",
|
|
@@ -75,6 +79,7 @@
|
|
|
75
79
|
"orgPin": "機構編號",
|
|
76
80
|
"orgs": "機構",
|
|
77
81
|
"owner": "所有者",
|
|
82
|
+
"parameters": "參數",
|
|
78
83
|
"parentOrg": "上級機構",
|
|
79
84
|
"pin": "身份證號碼",
|
|
80
85
|
"preferredName": "首選名稱",
|
|
@@ -114,8 +119,10 @@
|
|
|
114
119
|
"switchToLightModeAriaLabel": "切換到淺色模式",
|
|
115
120
|
"switchOrg": "切換機構",
|
|
116
121
|
"subscribed": "已訂閱",
|
|
122
|
+
"systemTemplate": "系統模板",
|
|
117
123
|
"target": "目標",
|
|
118
124
|
"targetId": "目標編號",
|
|
125
|
+
"template": "模板",
|
|
119
126
|
"years5": ["1年", "2年", "3年", "4年", "5年"],
|
|
120
127
|
"uiTypeEmail": "電子郵件",
|
|
121
128
|
"uiTypeMobile": "手機號碼",
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -6,6 +6,9 @@ export * from "./dto/app/AppReadDto";
|
|
|
6
6
|
export * from "./dto/app/AppUpdateReadDto";
|
|
7
7
|
export * from "./dto/app/CreateApiKeyData";
|
|
8
8
|
export * from "./dto/authCode/AuthCodeAction";
|
|
9
|
+
export * from "./rq/document/SystemDocumentListRQ";
|
|
10
|
+
export * from "./dto/document/SystemDocumentListData";
|
|
11
|
+
export * from "./dto/document/SystemDocumentViewData";
|
|
9
12
|
export * from "./dto/member/MemberListDto";
|
|
10
13
|
export * from "./dto/member/MemberQueryDto";
|
|
11
14
|
export * from "./dto/member/MemberReadDto";
|
package/lib/cjs/index.js
CHANGED
|
@@ -23,6 +23,9 @@ __exportStar(require("./dto/app/AppReadDto"), exports);
|
|
|
23
23
|
__exportStar(require("./dto/app/AppUpdateReadDto"), exports);
|
|
24
24
|
__exportStar(require("./dto/app/CreateApiKeyData"), exports);
|
|
25
25
|
__exportStar(require("./dto/authCode/AuthCodeAction"), exports);
|
|
26
|
+
__exportStar(require("./rq/document/SystemDocumentListRQ"), exports);
|
|
27
|
+
__exportStar(require("./dto/document/SystemDocumentListData"), exports);
|
|
28
|
+
__exportStar(require("./dto/document/SystemDocumentViewData"), exports);
|
|
26
29
|
__exportStar(require("./dto/member/MemberListDto"), exports);
|
|
27
30
|
__exportStar(require("./dto/member/MemberQueryDto"), exports);
|
|
28
31
|
__exportStar(require("./dto/member/MemberReadDto"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { QueryRQ } from "@etsoo/appscript";
|
|
2
|
+
/**
|
|
3
|
+
* System Document list request data
|
|
4
|
+
* 系统文档列表请求数据
|
|
5
|
+
*/
|
|
6
|
+
export type SystemDocumentListRQ = QueryRQ<number> & {
|
|
7
|
+
/**
|
|
8
|
+
* Kind
|
|
9
|
+
* 类型
|
|
10
|
+
*/
|
|
11
|
+
kind?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Culture
|
|
14
|
+
* 语言文化
|
|
15
|
+
*/
|
|
16
|
+
culture?: string;
|
|
17
|
+
};
|
package/lib/mjs/CoreApp.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { AuthApi, IApp, IdentityType, IdentityTypeFlags, UserIdentifierType } fr
|
|
|
8
8
|
import { AuthCodeApi } from "./AuthCodeApi";
|
|
9
9
|
import { ListType } from "@etsoo/shared";
|
|
10
10
|
import { CoreApiService } from "./dto/org/CoreApiService";
|
|
11
|
+
import { DocumentApi } from "./DocumentApi";
|
|
11
12
|
type AppData = {
|
|
12
13
|
id: number;
|
|
13
14
|
appId?: number;
|
|
@@ -31,6 +32,10 @@ export interface ICoreApp {
|
|
|
31
32
|
* Auth code API
|
|
32
33
|
*/
|
|
33
34
|
readonly authCodeApi: AuthCodeApi;
|
|
35
|
+
/**
|
|
36
|
+
* Document API
|
|
37
|
+
*/
|
|
38
|
+
readonly documentApi: DocumentApi;
|
|
34
39
|
/**
|
|
35
40
|
* Member API
|
|
36
41
|
*/
|
|
@@ -130,6 +135,12 @@ export declare class CoreApp implements ICoreApp {
|
|
|
130
135
|
* 认证接口
|
|
131
136
|
*/
|
|
132
137
|
get authCodeApi(): AuthCodeApi;
|
|
138
|
+
private _documentApi?;
|
|
139
|
+
/**
|
|
140
|
+
* Document API
|
|
141
|
+
* 文档接口
|
|
142
|
+
*/
|
|
143
|
+
get documentApi(): DocumentApi;
|
|
133
144
|
private _memberApi?;
|
|
134
145
|
/**
|
|
135
146
|
* Member API
|
package/lib/mjs/CoreApp.js
CHANGED
|
@@ -7,6 +7,7 @@ import { AuthApi, IdentityType, IdentityTypeFlags, UserIdentifierType } from "@e
|
|
|
7
7
|
import { AuthCodeApi } from "./AuthCodeApi";
|
|
8
8
|
import { DataTypes } from "@etsoo/shared";
|
|
9
9
|
import { CoreApiService } from "./dto/org/CoreApiService";
|
|
10
|
+
import { DocumentApi } from "./DocumentApi";
|
|
10
11
|
/**
|
|
11
12
|
* Core application
|
|
12
13
|
* 核心应用程序
|
|
@@ -38,6 +39,14 @@ export class CoreApp {
|
|
|
38
39
|
get authCodeApi() {
|
|
39
40
|
return (this._authCodeApi ??= new AuthCodeApi(this.app, this.api));
|
|
40
41
|
}
|
|
42
|
+
_documentApi;
|
|
43
|
+
/**
|
|
44
|
+
* Document API
|
|
45
|
+
* 文档接口
|
|
46
|
+
*/
|
|
47
|
+
get documentApi() {
|
|
48
|
+
return (this._documentApi ??= new DocumentApi(this.app, this.api));
|
|
49
|
+
}
|
|
41
50
|
_memberApi;
|
|
42
51
|
/**
|
|
43
52
|
* Member API
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EntityApi, IApi, IApiPayload, IApp } from "@etsoo/appscript";
|
|
2
|
+
import { SystemDocumentListRQ } from "./rq/document/SystemDocumentListRQ";
|
|
3
|
+
import { SystemDocumentListData } from "./dto/document/SystemDocumentListData";
|
|
4
|
+
import { SystemDocumentViewData } from "./dto/document/SystemDocumentViewData";
|
|
5
|
+
/**
|
|
6
|
+
* Document API
|
|
7
|
+
*/
|
|
8
|
+
export declare class DocumentApi extends EntityApi {
|
|
9
|
+
/**
|
|
10
|
+
* Constructor
|
|
11
|
+
* @param app Application
|
|
12
|
+
* @param api API
|
|
13
|
+
*/
|
|
14
|
+
constructor(app: IApp, api?: IApi);
|
|
15
|
+
/**
|
|
16
|
+
* List
|
|
17
|
+
* @param rq Request data
|
|
18
|
+
* @param payload Payload
|
|
19
|
+
* @returns Result
|
|
20
|
+
*/
|
|
21
|
+
list(rq: SystemDocumentListRQ, payload: IApiPayload<SystemDocumentListData[]>): Promise<SystemDocumentListData[] | undefined>;
|
|
22
|
+
/**
|
|
23
|
+
* Read
|
|
24
|
+
* @param id Id
|
|
25
|
+
* @param payload Payload
|
|
26
|
+
* @returns Result
|
|
27
|
+
*/
|
|
28
|
+
read(id: number, payload?: IApiPayload<SystemDocumentViewData>): Promise<SystemDocumentViewData | undefined>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { EntityApi } from "@etsoo/appscript";
|
|
2
|
+
/**
|
|
3
|
+
* Document API
|
|
4
|
+
*/
|
|
5
|
+
export class DocumentApi extends EntityApi {
|
|
6
|
+
/**
|
|
7
|
+
* Constructor
|
|
8
|
+
* @param app Application
|
|
9
|
+
* @param api API
|
|
10
|
+
*/
|
|
11
|
+
constructor(app, api = app.api) {
|
|
12
|
+
super("Document", app, api);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* List
|
|
16
|
+
* @param rq Request data
|
|
17
|
+
* @param payload Payload
|
|
18
|
+
* @returns Result
|
|
19
|
+
*/
|
|
20
|
+
list(rq, payload) {
|
|
21
|
+
return this.listBase(rq, payload);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Read
|
|
25
|
+
* @param id Id
|
|
26
|
+
* @param payload Payload
|
|
27
|
+
* @returns Result
|
|
28
|
+
*/
|
|
29
|
+
read(id, payload) {
|
|
30
|
+
return this.readBase(id, payload);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { TiplistProps } from "@etsoo/materialui";
|
|
2
|
+
import { SystemDocumentListData } from "../../dto/document/SystemDocumentListData";
|
|
3
|
+
import { SystemDocumentListRQ } from "../../rq/document/SystemDocumentListRQ";
|
|
4
|
+
/**
|
|
5
|
+
* System document tiplist properties
|
|
6
|
+
* 系统文档提示列表属性
|
|
7
|
+
*/
|
|
8
|
+
export type SystemDocumentTiplistProps = Omit<TiplistProps<SystemDocumentListData, "id">, "loadData" | "label" | "name"> & {
|
|
9
|
+
/**
|
|
10
|
+
* Label
|
|
11
|
+
*/
|
|
12
|
+
label?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Name
|
|
15
|
+
*/
|
|
16
|
+
name?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Default request data
|
|
19
|
+
*/
|
|
20
|
+
rq?: Partial<SystemDocumentListRQ>;
|
|
21
|
+
/**
|
|
22
|
+
* Load data handler
|
|
23
|
+
* @param rq Request data
|
|
24
|
+
*/
|
|
25
|
+
onLoadData?: (rq: SystemDocumentListRQ) => SystemDocumentListRQ;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* System document tiplist
|
|
29
|
+
* 系统文档提示列表
|
|
30
|
+
* @param props Properties
|
|
31
|
+
* @returns Component
|
|
32
|
+
*/
|
|
33
|
+
export declare function SystemDocumentTiplist(props: SystemDocumentTiplistProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Tiplist } from "@etsoo/materialui";
|
|
3
|
+
import { useRequiredAppContext } from "../../ICoreServiceApp";
|
|
4
|
+
/**
|
|
5
|
+
* System document tiplist
|
|
6
|
+
* 系统文档提示列表
|
|
7
|
+
* @param props Properties
|
|
8
|
+
* @returns Component
|
|
9
|
+
*/
|
|
10
|
+
export function SystemDocumentTiplist(props) {
|
|
11
|
+
// App
|
|
12
|
+
const app = useRequiredAppContext();
|
|
13
|
+
// Destruct
|
|
14
|
+
const { fullWidth = true, label = app.get("systemTemplate"), maxItems = 10, getOptionLabel = (data) => data.title, onLoadData = (rq) => rq, name = "systemDocumentId", rq = { enabled: true }, ...rest } = props;
|
|
15
|
+
// Layout
|
|
16
|
+
return (_jsx(Tiplist, { label: label, getOptionLabel: getOptionLabel, name: name, fullWidth: fullWidth, maxItems: maxItems, loadData: (keyword, id, maxItems) => app.core.documentApi.list(onLoadData({
|
|
17
|
+
...rq,
|
|
18
|
+
keyword,
|
|
19
|
+
id,
|
|
20
|
+
queryPaging: {
|
|
21
|
+
batchSize: maxItems
|
|
22
|
+
}
|
|
23
|
+
}), { showLoading: false, defaultValue: [] }), ...rest }));
|
|
24
|
+
}
|
|
@@ -6,6 +6,7 @@ export * from "./app/IdentityTypeList";
|
|
|
6
6
|
export * from "./app/SearchDays";
|
|
7
7
|
export * from "./app/StatusList";
|
|
8
8
|
export * from "./app/UserRoleList";
|
|
9
|
+
export * from "./document/SystemDocumentTiplist";
|
|
9
10
|
export * from "./org/ButtonApiServices";
|
|
10
11
|
export * from "./org/OrgSwitchPopover";
|
|
11
12
|
export * from "./org/OrgTiplist";
|
|
@@ -8,6 +8,8 @@ export * from "./app/IdentityTypeList";
|
|
|
8
8
|
export * from "./app/SearchDays";
|
|
9
9
|
export * from "./app/StatusList";
|
|
10
10
|
export * from "./app/UserRoleList";
|
|
11
|
+
// document
|
|
12
|
+
export * from "./document/SystemDocumentTiplist";
|
|
11
13
|
// org
|
|
12
14
|
export * from "./org/ButtonApiServices";
|
|
13
15
|
export * from "./org/OrgSwitchPopover";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|