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.
@@ -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 { RecordApi }
177
+ export type { }
178
178
  }
@@ -1,73 +1,72 @@
1
- declare module 'application:datatable' {
2
- import type { Criteria, Patch } from 'application:datatable'
3
- // 基础类型定义
4
- type FilterOp = 'And' | 'Or'
5
-
6
- type CriteriaOperator =
7
- | 'Equals' | 'NotEqu' | 'Greater' | 'GreaterEqu' | 'Less' | 'LessEqu'
8
- | 'GreaterEquAndLessEqu' | 'LessOrGreater' | 'BeginWith' | 'EndWith'
9
- | 'Contains' | 'NotContains' | 'Intersected' | 'Empty' | 'NotEmpty'
10
-
11
- type DynamicType =
12
- | 'today' | 'yesterday' | 'tomorrow' | 'last7Days' | 'last30Days'
13
- | 'thisWeek' | 'lastWeek' | 'nextWeek' | 'thisMonth' | 'lastMonth' | 'nextMonth'
14
-
15
- interface EventContext {
16
- Destroy(): void
17
- }
18
-
19
- interface ApiResult {
20
- code: number
21
- Message?: string
22
- }
23
-
24
- interface Font {
25
- Color: string
26
- }
27
-
28
- interface Interior {
29
- Color: string
30
- }
31
-
32
- interface DBCellValue {
33
- // DBCellValue类型
34
- }
35
-
36
- interface Filter {
37
- Criterias: Criteria[]
38
- Op?: FilterOp
39
- }
40
-
41
- interface OnDeleteRecordEventData {
42
- sheetId: number
43
- recordIds: string[]
44
- }
45
-
46
- // RecordRange 接口
47
- interface RecordRange extends Patch.RecordRange2 {
48
- // 属性
49
- readonly Count: number
50
- FieldId: any[] // 返回Array
51
- readonly Font: Font
52
- Id: any[] // 返回Array
53
- Index: any[] // 返回Array
54
- readonly Interior: Interior
55
- readonly Text: string | any[][]
56
- Value: any
57
-
58
- // 方法
59
- Item(Index?: number | string | any[], Field?: number | string | any[]): RecordRange
60
- Add(Before?: number | string, After?: number | string, Count?: number): RecordRange
61
- Condition(Filters: Filter[], FilterOp?: FilterOp): RecordRange
62
- Delete(): ApiResult
63
- Select(): boolean
64
- SetValues(Values: any[], ignoreErr?: boolean): ApiResult
65
-
66
- // 事件
67
- OnDeleteRecord(callback: (data: OnDeleteRecordEventData) => void): EventContext
68
- OnUpdate(callback: (data: RecordRange) => void): EventContext
69
- }
70
-
71
- // 导出 RecordRange 类型
72
- export type { RecordRange }
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
- import type { Record, Patch } from 'application:datatable'
3
- // 基础类型定义
4
- type ViewType = 'Grid' | 'Kanban' | 'Gallery' | 'Form' | 'Query' | 'Gantt'
5
-
6
- interface EventContext {
7
- Destroy(): void
8
- }
9
-
10
- // Records 接口
11
- interface Records extends Patch.Records {
12
- // 属性
13
- readonly Count: number
14
-
15
- // 方法
16
- Item(Index: number | string): Record
17
- Add(Before?: number | string, After?: number | string, Count?: number): Records
18
- Delete(Index: number | string): any // ApiResult
19
- FindNext(What: string): Record | null
20
- FindPrevious(What: string): Record | null
21
- }
22
-
23
- // 导出 Records 类型
24
- export type { Records }
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 { SelectionApi }
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
- import type { RecordRange, View, Views, FieldDescriptors } from 'application:datatable'
3
- // 基础类型定义
4
- type FieldType =
5
- | 'SingleLineText'
6
- | 'MultiLineText'
7
- | 'Date'
8
- | 'SingleSelect'
9
- | 'Number'
10
- | 'Rating'
11
-
12
- type ViewType = 'Grid' | 'Kanban' | 'Gallery' | 'Form' | 'Query' | 'Gantt'
13
-
14
- interface EventContext {
15
- Destroy(): void
16
- }
17
-
18
- interface OnDeleteEventData {
19
- sheetId: number
20
- }
21
-
22
- interface OnRenameEventData {
23
- Sheet: Sheet
24
- originValue: string
25
- value: string
26
- }
27
-
28
-
29
- // Sheet 接口
30
- interface Sheet {
31
- // 属性
32
- FieldDescriptors: FieldDescriptors
33
- Icon: string
34
- readonly Id: number
35
- Name: string
36
- readonly RecordRange: RecordRange
37
- readonly Views: Views
38
-
39
- // 方法
40
- AddDescription(Value: string): boolean
41
- AppendFromCloud(FileId: string): boolean
42
- AppendFromLocal(File: File): boolean
43
- Copy(Value?: boolean): Sheet
44
- CreateFields(Fields: Array<{ name: string; type: FieldType; max?: number }>): void
45
- Delete(HideTip?: boolean): boolean
46
- DeleteFields(FiledIds: string[]): void
47
- FieldId(Name: string): string
48
- GetFields(): any // Fields类型
49
- Share(): boolean
50
- UpdateFields(Fields: Array<{ id: string; name: string; type: FieldType }>): any // Fields类型
51
-
52
- // 事件
53
- OnCreateRecord(callback: (data: RecordRange) => void): EventContext
54
- OnDelete(callback: (data: OnDeleteEventData) => void): EventContext
55
- OnRename(callback: (data: OnRenameEventData) => void): EventContext
56
- }
57
-
58
- // 导出 Sheet 类型
59
- export type { Sheet }
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 { SheetApi }
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 extends Patch.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 { Sheets }
87
+ export type { }
89
88
  }
@@ -1,51 +1,50 @@
1
- declare module 'application:datatable' {
2
- import type { RecordRange, Records, Patch } from 'application:datatable'
3
- // 基础类型定义
4
- type ViewType = 'Grid' | 'Kanban' | 'Gallery' | 'Form' | 'Query' | 'Gantt' | 'Calendar'
5
-
6
- interface EventContext {
7
- Destroy(): void
8
- }
9
-
10
- interface OnDeleteViewEventData {
11
- sheetId: number
12
- viewId: string
13
- }
14
-
15
- interface OnRenameViewEventData {
16
- View: View
17
- originValue: string
18
- value: string
19
- }
20
-
21
- // View 接口
22
- interface View extends Patch.View2 {
23
- // 属性
24
- Description: string
25
- readonly Fields: any
26
- readonly Filters: any
27
- readonly Groups: any
28
- readonly Id: string
29
- IsFavView: boolean
30
- IsPersonal: boolean
31
- Name: string
32
- readonly RecordRange: RecordRange
33
- readonly Records: Records
34
- readonly Selection: any
35
- Sorts: any
36
- readonly Type: ViewType
37
- readonly ViewShare: any
38
-
39
- // 方法
40
- Activate(): void
41
- Copy(): View
42
- Delete(): boolean
43
-
44
- // 事件
45
- OnDelete(callback: (data: OnDeleteViewEventData) => void): EventContext
46
- OnRename(callback: (data: OnRenameViewEventData) => void): EventContext
47
- }
48
-
49
- // 导出 View 类型
50
- export type { View, ViewType }
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 { ViewApi }
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
- import { View, Patch, ViewType } from 'application:datatable'
3
-
4
- interface EventContext {
5
- Destroy(): void
6
- }
7
-
8
- // View 接口(根据之前View文档)
9
- interface View {
10
- readonly Id: string
11
- Name: string
12
- Type: ViewType
13
- RowHeight?: number // GridView特有
14
- // 其他属性根据View文档
15
- }
16
-
17
- // Views 接口
18
- interface Views extends Patch.Views {
19
- // 属性
20
- readonly ActiveView: View
21
- readonly Count: number
22
-
23
- // 方法
24
- Add(Type: ViewType, Name: string): View
25
- Delete(Index: number | string): void
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
+ }