tadcode-wpsjs 1.5.0 → 1.5.1
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/package.json +1 -1
- package/types/KSDrive.d.ts +72 -72
- package/types/application/Criteria.d.ts +31 -31
- package/types/application/Field.d.ts +25 -25
- package/types/application/FieldApi.d.ts +2 -2
- package/types/application/FieldDescriptor.d.ts +87 -88
- package/types/application/FieldDescriptors.d.ts +25 -25
- package/types/application/Fields.d.ts +14 -20
- package/types/application/Font.d.ts +10 -10
- package/types/application/GanttViewUI.d.ts +25 -27
- package/types/application/Record.d.ts +22 -22
- package/types/application/RecordApi.d.ts +2 -2
- package/types/application/RecordRange.d.ts +72 -73
- package/types/application/Records.d.ts +24 -25
- package/types/application/SelectionApi.d.ts +29 -29
- package/types/application/Sheet.d.ts +59 -60
- package/types/application/SheetApi.d.ts +2 -2
- package/types/application/Sheets.d.ts +2 -3
- package/types/application/View.d.ts +50 -51
- package/types/application/ViewApi.d.ts +26 -26
- package/types/application/Views.d.ts +25 -35
- package/types/application/Window.d.ts +52 -53
- package/types/application/global.d.ts +0 -2
- package/types/application/index.d.ts +18 -29
- package/types/application/patch.d.ts +46 -50
- package/types/global.d.ts +1 -1
- package/types/index.d.ts +4 -4
|
@@ -166,7 +166,7 @@ declare module 'application:datatable' {
|
|
|
166
166
|
Filter: RecordsFuncOptionsFilter
|
|
167
167
|
}
|
|
168
168
|
/* 行记录 */
|
|
169
|
-
interface RecordApi {
|
|
169
|
+
export interface RecordApi {
|
|
170
170
|
CreateRecords(options: Pick<RecordFuncOptions, 'SheetId'> & { Records: { fields: Record<string, any> }[] }): RecordItem[]
|
|
171
171
|
GetRecord(options: Pick<RecordFuncOptions, 'SheetId' | 'RecordId'>): RecordItem
|
|
172
172
|
GetRecords(options: Pick<RecordFuncOptions, 'SheetId'> & Partial<Pick<RecordFuncOptions, 'ViewId' | 'PageSize' | 'Offset' | 'MaxRecords' | 'Fields' | 'Filter'>>): { records: RecordItem[] }
|
|
@@ -174,5 +174,5 @@ declare module 'application:datatable' {
|
|
|
174
174
|
DeleteRecords(options: Pick<RecordFuncOptions, 'SheetId' | 'RecordIds'>): (Pick<RecordItem, 'id'> & { deleted: boolean })[]
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
export type {
|
|
177
|
+
export type { }
|
|
178
178
|
}
|
|
@@ -1,73 +1,72 @@
|
|
|
1
|
-
declare module 'application:datatable' {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
| '
|
|
8
|
-
| '
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
| '
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
readonly
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
1
|
+
declare module 'application:datatable' {
|
|
2
|
+
// 基础类型定义
|
|
3
|
+
type FilterOp = 'And' | 'Or'
|
|
4
|
+
|
|
5
|
+
type CriteriaOperator =
|
|
6
|
+
| 'Equals' | 'NotEqu' | 'Greater' | 'GreaterEqu' | 'Less' | 'LessEqu'
|
|
7
|
+
| 'GreaterEquAndLessEqu' | 'LessOrGreater' | 'BeginWith' | 'EndWith'
|
|
8
|
+
| 'Contains' | 'NotContains' | 'Intersected' | 'Empty' | 'NotEmpty'
|
|
9
|
+
|
|
10
|
+
type DynamicType =
|
|
11
|
+
| 'today' | 'yesterday' | 'tomorrow' | 'last7Days' | 'last30Days'
|
|
12
|
+
| 'thisWeek' | 'lastWeek' | 'nextWeek' | 'thisMonth' | 'lastMonth' | 'nextMonth'
|
|
13
|
+
|
|
14
|
+
interface EventContext {
|
|
15
|
+
Destroy(): void
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface ApiResult {
|
|
19
|
+
code: number
|
|
20
|
+
Message?: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface Font {
|
|
24
|
+
Color: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface Interior {
|
|
28
|
+
Color: string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface DBCellValue {
|
|
32
|
+
// DBCellValue类型
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface Filter {
|
|
36
|
+
Criterias: Criteria[]
|
|
37
|
+
Op?: FilterOp
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface OnDeleteRecordEventData {
|
|
41
|
+
sheetId: number
|
|
42
|
+
recordIds: string[]
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// RecordRange 接口
|
|
46
|
+
export interface RecordRange {
|
|
47
|
+
// 属性
|
|
48
|
+
readonly Count: number
|
|
49
|
+
FieldId: any[] // 返回Array
|
|
50
|
+
readonly Font: Font
|
|
51
|
+
Id: any[] // 返回Array
|
|
52
|
+
Index: any[] // 返回Array
|
|
53
|
+
readonly Interior: Interior
|
|
54
|
+
readonly Text: string | any[][]
|
|
55
|
+
Value: any
|
|
56
|
+
|
|
57
|
+
// 方法
|
|
58
|
+
Item(Index?: number | string | any[], Field?: number | string | any[]): RecordRange
|
|
59
|
+
Add(Before?: number | string, After?: number | string, Count?: number): RecordRange
|
|
60
|
+
Condition(Filters: Filter[], FilterOp?: FilterOp): RecordRange
|
|
61
|
+
Delete(): ApiResult
|
|
62
|
+
Select(): boolean
|
|
63
|
+
SetValues(Values: any[], ignoreErr?: boolean): ApiResult
|
|
64
|
+
|
|
65
|
+
// 事件
|
|
66
|
+
OnDeleteRecord(callback: (data: OnDeleteRecordEventData) => void): EventContext
|
|
67
|
+
OnUpdate(callback: (data: RecordRange) => void): EventContext
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// 导出 RecordRange 类型
|
|
71
|
+
export type { }
|
|
72
|
+
}
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
declare module 'application:datatable' {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
1
|
+
declare module 'application:datatable' {
|
|
2
|
+
// 基础类型定义
|
|
3
|
+
type ViewType = 'Grid' | 'Kanban' | 'Gallery' | 'Form' | 'Query' | 'Gantt'
|
|
4
|
+
|
|
5
|
+
interface EventContext {
|
|
6
|
+
Destroy(): void
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// Records 接口
|
|
10
|
+
export interface Records {
|
|
11
|
+
// 属性
|
|
12
|
+
readonly Count: number
|
|
13
|
+
|
|
14
|
+
// 方法
|
|
15
|
+
Item(Index: number | string): Record
|
|
16
|
+
Add(Before?: number | string, After?: number | string, Count?: number): Records
|
|
17
|
+
Delete(Index: number | string): any // ApiResult
|
|
18
|
+
FindNext(What: string): Record | null
|
|
19
|
+
FindPrevious(What: string): Record | null
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// 导出 Records 类型
|
|
23
|
+
export type { }
|
|
24
|
+
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
declare module 'application:datatable' {
|
|
2
|
-
interface ActiveViewInfo {
|
|
3
|
-
"sheetId": number
|
|
4
|
-
"viewId": string
|
|
5
|
-
"name": string
|
|
6
|
-
"type": string
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface ActiveSheetInfo {
|
|
10
|
-
"sheetId": number
|
|
11
|
-
"name": string
|
|
12
|
-
"description": string
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
interface Field {
|
|
16
|
-
"type": FieldTypeKeys
|
|
17
|
-
"name": string
|
|
18
|
-
"id": string
|
|
19
|
-
"value": any
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
interface SelectionApi {
|
|
23
|
-
GetActiveView(): ActiveViewInfo
|
|
24
|
-
GetSelectionRecords(): { id: string, fields: Field[] }[][]
|
|
25
|
-
GetActiveSheet(): ActiveSheetInfo
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export type {
|
|
29
|
-
}
|
|
1
|
+
declare module 'application:datatable' {
|
|
2
|
+
interface ActiveViewInfo {
|
|
3
|
+
"sheetId": number
|
|
4
|
+
"viewId": string
|
|
5
|
+
"name": string
|
|
6
|
+
"type": string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface ActiveSheetInfo {
|
|
10
|
+
"sheetId": number
|
|
11
|
+
"name": string
|
|
12
|
+
"description": string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface Field {
|
|
16
|
+
"type": FieldTypeKeys
|
|
17
|
+
"name": string
|
|
18
|
+
"id": string
|
|
19
|
+
"value": any
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface SelectionApi {
|
|
23
|
+
GetActiveView(): ActiveViewInfo
|
|
24
|
+
GetSelectionRecords(): { id: string, fields: Field[] }[][]
|
|
25
|
+
GetActiveSheet(): ActiveSheetInfo
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type { }
|
|
29
|
+
}
|
|
@@ -1,60 +1,59 @@
|
|
|
1
|
-
declare module 'application:datatable' {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
| '
|
|
6
|
-
| '
|
|
7
|
-
| '
|
|
8
|
-
| '
|
|
9
|
-
| '
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
readonly
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
1
|
+
declare module 'application:datatable' {
|
|
2
|
+
// 基础类型定义
|
|
3
|
+
type FieldType =
|
|
4
|
+
| 'SingleLineText'
|
|
5
|
+
| 'MultiLineText'
|
|
6
|
+
| 'Date'
|
|
7
|
+
| 'SingleSelect'
|
|
8
|
+
| 'Number'
|
|
9
|
+
| 'Rating'
|
|
10
|
+
|
|
11
|
+
type ViewType = 'Grid' | 'Kanban' | 'Gallery' | 'Form' | 'Query' | 'Gantt'
|
|
12
|
+
|
|
13
|
+
interface EventContext {
|
|
14
|
+
Destroy(): void
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface OnDeleteEventData {
|
|
18
|
+
sheetId: number
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface OnRenameEventData {
|
|
22
|
+
Sheet: Sheet
|
|
23
|
+
originValue: string
|
|
24
|
+
value: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
// Sheet 接口
|
|
29
|
+
export interface Sheet {
|
|
30
|
+
// 属性
|
|
31
|
+
FieldDescriptors: FieldDescriptors
|
|
32
|
+
Icon: string
|
|
33
|
+
readonly Id: number
|
|
34
|
+
Name: string
|
|
35
|
+
readonly RecordRange: RecordRange
|
|
36
|
+
readonly Views: Views
|
|
37
|
+
|
|
38
|
+
// 方法
|
|
39
|
+
AddDescription(Value: string): boolean
|
|
40
|
+
AppendFromCloud(FileId: string): boolean
|
|
41
|
+
AppendFromLocal(File: File): boolean
|
|
42
|
+
Copy(Value?: boolean): Sheet
|
|
43
|
+
CreateFields(Fields: Array<{ name: string; type: FieldType; max?: number }>): void
|
|
44
|
+
Delete(HideTip?: boolean): boolean
|
|
45
|
+
DeleteFields(FiledIds: string[]): void
|
|
46
|
+
FieldId(Name: string): string
|
|
47
|
+
GetFields(): any // Fields类型
|
|
48
|
+
Share(): boolean
|
|
49
|
+
UpdateFields(Fields: Array<{ id: string; name: string; type: FieldType }>): any // Fields类型
|
|
50
|
+
|
|
51
|
+
// 事件
|
|
52
|
+
OnCreateRecord(callback: (data: RecordRange) => void): EventContext
|
|
53
|
+
OnDelete(callback: (data: OnDeleteEventData) => void): EventContext
|
|
54
|
+
OnRename(callback: (data: OnRenameEventData) => void): EventContext
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// 导出 Sheet 类型
|
|
58
|
+
export type { }
|
|
59
|
+
}
|
|
@@ -51,12 +51,12 @@ declare module 'application:datatable' {
|
|
|
51
51
|
Fields: { name: string, type: FieldTypeKeys }[]
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
interface SheetApi {
|
|
54
|
+
export interface SheetApi {
|
|
55
55
|
CreateSheet(options: Omit<SheetFuncOptions, SheetId>): Sheet
|
|
56
56
|
GetSheets(): Sheet[]
|
|
57
57
|
UpdateSheet(options: Pick<SheetFuncOptions, SheetId | Name>): boolean
|
|
58
58
|
DeleteSheet(options: Pick<SheetFuncOptions, SheetId>): Pick<Sheet, id>
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
export type {
|
|
61
|
+
export type { }
|
|
62
62
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
declare module 'application:datatable' {
|
|
2
|
-
import { Patch } from 'application:datatable'
|
|
3
2
|
// 基础类型定义
|
|
4
3
|
type SheetType = 'xlEtFlexPaperSheet' | 'xlEtDataBaseSheet' | 'xlDbDashBoardSheet'
|
|
5
4
|
|
|
@@ -60,7 +59,7 @@ declare module 'application:datatable' {
|
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
// Sheets 接口
|
|
63
|
-
interface Sheets
|
|
62
|
+
export interface Sheets {
|
|
64
63
|
// 属性
|
|
65
64
|
readonly Count: number
|
|
66
65
|
|
|
@@ -85,5 +84,5 @@ declare module 'application:datatable' {
|
|
|
85
84
|
}
|
|
86
85
|
|
|
87
86
|
// 只导出 Sheets 类型
|
|
88
|
-
export type {
|
|
87
|
+
export type { }
|
|
89
88
|
}
|
|
@@ -1,51 +1,50 @@
|
|
|
1
|
-
declare module 'application:datatable' {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
readonly
|
|
26
|
-
readonly
|
|
27
|
-
readonly
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
readonly
|
|
33
|
-
readonly
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
readonly
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
1
|
+
declare module 'application:datatable' {
|
|
2
|
+
// 基础类型定义
|
|
3
|
+
export type ViewType = 'Grid' | 'Kanban' | 'Gallery' | 'Form' | 'Query' | 'Gantt' | 'Calendar'
|
|
4
|
+
|
|
5
|
+
interface EventContext {
|
|
6
|
+
Destroy(): void
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface OnDeleteViewEventData {
|
|
10
|
+
sheetId: number
|
|
11
|
+
viewId: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface OnRenameViewEventData {
|
|
15
|
+
View: View
|
|
16
|
+
originValue: string
|
|
17
|
+
value: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// View 接口
|
|
21
|
+
export interface View {
|
|
22
|
+
// 属性
|
|
23
|
+
Description: string
|
|
24
|
+
readonly Fields: any
|
|
25
|
+
readonly Filters: any
|
|
26
|
+
readonly Groups: any
|
|
27
|
+
readonly Id: string
|
|
28
|
+
IsFavView: boolean
|
|
29
|
+
IsPersonal: boolean
|
|
30
|
+
Name: string
|
|
31
|
+
readonly RecordRange: RecordRange
|
|
32
|
+
readonly Records: Records
|
|
33
|
+
readonly Selection: any
|
|
34
|
+
Sorts: any
|
|
35
|
+
readonly Type: ViewType
|
|
36
|
+
readonly ViewShare: any
|
|
37
|
+
|
|
38
|
+
// 方法
|
|
39
|
+
Activate(): void
|
|
40
|
+
Copy(): View
|
|
41
|
+
Delete(): boolean
|
|
42
|
+
|
|
43
|
+
// 事件
|
|
44
|
+
OnDelete(callback: (data: OnDeleteViewEventData) => void): EventContext
|
|
45
|
+
OnRename(callback: (data: OnRenameViewEventData) => void): EventContext
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// 导出 View 类型
|
|
49
|
+
export type { }
|
|
50
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
declare module 'application:datatable' {
|
|
2
|
-
type ViewType = 'Grid' | 'Kanban' | 'Gallery' | 'Form' | 'Gantt'
|
|
3
|
-
|
|
4
|
-
interface View {
|
|
5
|
-
id: string
|
|
6
|
-
name: string
|
|
7
|
-
recordsCount: number
|
|
8
|
-
type: ViewType
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
interface ViewFuncOptions {
|
|
12
|
-
SheetId: number
|
|
13
|
-
ViewId: string
|
|
14
|
-
Name: string
|
|
15
|
-
ViewType: ViewType
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
interface ViewApi {
|
|
19
|
-
CreateView(options: Pick<ViewFuncOptions, 'SheetId' | 'Name' | 'ViewType'>): View
|
|
20
|
-
GetViews(options: Pick<ViewFuncOptions, 'SheetId'>): View[]
|
|
21
|
-
UpdateView(options: Pick<ViewFuncOptions, 'SheetId' | 'Name' | 'ViewId'>): View
|
|
22
|
-
DeleteView(options: Pick<ViewFuncOptions, 'SheetId' | 'ViewId'>): Pick<View, 'id'>
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export type {
|
|
26
|
-
}
|
|
1
|
+
declare module 'application:datatable' {
|
|
2
|
+
type ViewType = 'Grid' | 'Kanban' | 'Gallery' | 'Form' | 'Gantt'
|
|
3
|
+
|
|
4
|
+
interface View {
|
|
5
|
+
id: string
|
|
6
|
+
name: string
|
|
7
|
+
recordsCount: number
|
|
8
|
+
type: ViewType
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface ViewFuncOptions {
|
|
12
|
+
SheetId: number
|
|
13
|
+
ViewId: string
|
|
14
|
+
Name: string
|
|
15
|
+
ViewType: ViewType
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface ViewApi {
|
|
19
|
+
CreateView(options: Pick<ViewFuncOptions, 'SheetId' | 'Name' | 'ViewType'>): View
|
|
20
|
+
GetViews(options: Pick<ViewFuncOptions, 'SheetId'>): View[]
|
|
21
|
+
UpdateView(options: Pick<ViewFuncOptions, 'SheetId' | 'Name' | 'ViewId'>): View
|
|
22
|
+
DeleteView(options: Pick<ViewFuncOptions, 'SheetId' | 'ViewId'>): Pick<View, 'id'>
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type { }
|
|
26
|
+
}
|
|
@@ -1,35 +1,25 @@
|
|
|
1
|
-
declare module 'application:datatable' {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
readonly
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
//
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
Item(Index: number | string): View
|
|
27
|
-
ItemById(Id: string): View
|
|
28
|
-
|
|
29
|
-
// 事件
|
|
30
|
-
OnCreate(callback: (data: View) => void): EventContext
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// 导出 Views 类型
|
|
34
|
-
export type { Views }
|
|
35
|
-
}
|
|
1
|
+
declare module 'application:datatable' {
|
|
2
|
+
|
|
3
|
+
interface EventContext {
|
|
4
|
+
Destroy(): void
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// Views 接口
|
|
8
|
+
export interface Views {
|
|
9
|
+
// 属性
|
|
10
|
+
readonly ActiveView: View
|
|
11
|
+
readonly Count: number
|
|
12
|
+
|
|
13
|
+
// 方法
|
|
14
|
+
Add(Type: ViewType, Name: string): View
|
|
15
|
+
Delete(Index: number | string): void
|
|
16
|
+
Item(Index: number | string): View
|
|
17
|
+
ItemById(Id: string): View
|
|
18
|
+
|
|
19
|
+
// 事件
|
|
20
|
+
OnCreate(callback: (data: View) => void): EventContext
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// 导出 Views 类型
|
|
24
|
+
export type { }
|
|
25
|
+
}
|