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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tadcode-wpsjs",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "hot": "NODE_ENV=development bun --hot ignore/index.ts",
@@ -1,72 +1,72 @@
1
- declare module 'tadcode-wpsjs:global' {
2
- import type DBApplication from 'application:datatable'
3
- interface FileType {
4
- /**智能文档 */
5
- AP: 'o'
6
- /**智能表格 */
7
- KSheet: 'k'
8
- /**表格 */
9
- ET: 's'
10
- /**多维表 */
11
- DB: 'd'
12
- }
13
-
14
- /**
15
- * 文件类型
16
- * - 'o': 智能文档
17
- * - 'k': 智能表格
18
- * - 's': 表格
19
- * - 'd': 多维表
20
- */
21
- type FileTypeValue = FileType[keyof FileType]
22
-
23
- interface CreateOptions {
24
- /**是 新文件的文件名 */
25
- name: string
26
- /**否 新文件的文件目录 */
27
- dirUrl?: string
28
- /**否 将目标文件另存为新文件 */
29
- source?: string
30
- }
31
-
32
- interface FilesInfo {
33
- files: FileInfo[]
34
- nextOffset: number
35
- }
36
-
37
- interface FileInfo {
38
- /** 文件名 */
39
- fileName: string
40
- /** 加密后的文件 id */
41
- fileId: string
42
- /** 文件创建时间戳 */
43
- createTime: number
44
- /** 文件修改时间戳 */
45
- updateTime: number
46
- }
47
-
48
- interface KSDrive {
49
- FileType: FileType
50
- /**
51
- * 创建文件
52
- * @param type 新文件的类型
53
- * @param createOptions 新文件的参数选项
54
- * @returns 新文件url
55
- */
56
- createFile(type: FileTypeValue, createOptions: CreateOptions): string
57
-
58
- openFile(url: string): {
59
- Application: DB_Application
60
- close()
61
- }
62
-
63
- listFiles(options?: {
64
- dirUrl?: string
65
- offset?: number
66
- count?: number
67
- includeExts?: string[]
68
- }): FilesInfo
69
- }
70
-
71
- export type { KSDrive, FileTypeValue }
72
- }
1
+ declare module 'tadcode-wpsjs:global' {
2
+ import type DBApplication from 'application:datatable'
3
+ interface FileType {
4
+ /**智能文档 */
5
+ AP: 'o'
6
+ /**智能表格 */
7
+ KSheet: 'k'
8
+ /**表格 */
9
+ ET: 's'
10
+ /**多维表 */
11
+ DB: 'd'
12
+ }
13
+
14
+ /**
15
+ * 文件类型
16
+ * - 'o': 智能文档
17
+ * - 'k': 智能表格
18
+ * - 's': 表格
19
+ * - 'd': 多维表
20
+ */
21
+ type FileTypeValue = FileType[keyof FileType]
22
+
23
+ interface CreateOptions {
24
+ /**是 新文件的文件名 */
25
+ name: string
26
+ /**否 新文件的文件目录 */
27
+ dirUrl?: string
28
+ /**否 将目标文件另存为新文件 */
29
+ source?: string
30
+ }
31
+
32
+ interface FilesInfo {
33
+ files: FileInfo[]
34
+ nextOffset: number
35
+ }
36
+
37
+ interface FileInfo {
38
+ /** 文件名 */
39
+ fileName: string
40
+ /** 加密后的文件 id */
41
+ fileId: string
42
+ /** 文件创建时间戳 */
43
+ createTime: number
44
+ /** 文件修改时间戳 */
45
+ updateTime: number
46
+ }
47
+
48
+ interface KSDrive {
49
+ FileType: FileType
50
+ /**
51
+ * 创建文件
52
+ * @param type 新文件的类型
53
+ * @param createOptions 新文件的参数选项
54
+ * @returns 新文件url
55
+ */
56
+ createFile(type: FileTypeValue, createOptions: CreateOptions): string
57
+
58
+ openFile(url: string): {
59
+ Application: DBApplication
60
+ close()
61
+ }
62
+
63
+ listFiles(options?: {
64
+ dirUrl?: string
65
+ offset?: number
66
+ count?: number
67
+ includeExts?: string[]
68
+ }): FilesInfo
69
+ }
70
+
71
+ export type { KSDrive, FileTypeValue }
72
+ }
@@ -1,31 +1,31 @@
1
- declare module 'application:datatable' {
2
- // 基础类型定义
3
- type CriteriaOp =
4
- | 'Equals' | 'NotEqu' | 'Greater' | 'GreaterEqu' | 'Less' | 'LessEqu'
5
- | 'GreaterEquAndLessEqu' | 'LessOrGreater' | 'BeginWith' | 'EndWith'
6
- | 'Contains' | 'NotContains' | 'Intersected' | 'Empty' | 'NotEmpty';
7
-
8
- type DynamicType =
9
- | 'today' | 'yesterday' | 'tomorrow' | 'last7Days' | 'last30Days'
10
- | 'thisWeek' | 'lastWeek' | 'nextWeek' | 'thisMonth' | 'lastMonth' | 'nextMonth';
11
-
12
- // Criteria Value 类型
13
- interface CriteriaValue {
14
- type?: string;
15
- value?: any;
16
- dynamicType?: DynamicType;
17
- }
18
-
19
- // Criteria 接口
20
- interface Criteria {
21
- // 属性
22
- Field: number | string;
23
- Op: CriteriaOp;
24
- Values: CriteriaValue[];
25
-
26
- // 注意:文档中显示有 Criteria 构造函数/工厂方法,但这里是接口定义
27
- }
28
-
29
- // 导出 Criteria 类型
30
- export type { Criteria };
31
- }
1
+ declare module 'application:datatable' {
2
+ // 基础类型定义
3
+ type CriteriaOp =
4
+ | 'Equals' | 'NotEqu' | 'Greater' | 'GreaterEqu' | 'Less' | 'LessEqu'
5
+ | 'GreaterEquAndLessEqu' | 'LessOrGreater' | 'BeginWith' | 'EndWith'
6
+ | 'Contains' | 'NotContains' | 'Intersected' | 'Empty' | 'NotEmpty'
7
+
8
+ type DynamicType =
9
+ | 'today' | 'yesterday' | 'tomorrow' | 'last7Days' | 'last30Days'
10
+ | 'thisWeek' | 'lastWeek' | 'nextWeek' | 'thisMonth' | 'lastMonth' | 'nextMonth'
11
+
12
+ // Criteria Value 类型
13
+ interface CriteriaValue {
14
+ type?: string
15
+ value?: any
16
+ dynamicType?: DynamicType
17
+ }
18
+
19
+ // Criteria 接口
20
+ export interface Criteria {
21
+ // 属性
22
+ Field: number | string
23
+ Op: CriteriaOp
24
+ Values: CriteriaValue[]
25
+
26
+ // 注意:文档中显示有 Criteria 构造函数/工厂方法,但这里是接口定义
27
+ }
28
+
29
+ // 导出 Criteria 类型
30
+ export type { }
31
+ }
@@ -1,25 +1,25 @@
1
- declare module 'application:datatable' {
2
- // FieldDescriptor 接口(根据文档引用)
3
- interface FieldDescriptor {
4
- Name: string;
5
- // 其他FieldDescriptor属性
6
- }
7
-
8
- // Field 接口
9
- interface Field {
10
- // 属性
11
- readonly FieldDescriptor: FieldDescriptor;
12
- readonly Id: string;
13
- readonly Name: string;
14
- readonly Type: string;
15
- Visible: boolean;
16
- readonly Width: string;
17
-
18
- // 方法
19
- Copy(Before?: string | number, After?: string | number): Field;
20
- Move(Before?: string | number, After?: string | number): any; // ApiResult
21
- }
22
-
23
- // 导出 Field 类型
24
- export type { Field };
25
- }
1
+ declare module 'application:datatable' {
2
+ // FieldDescriptor 接口(根据文档引用)
3
+ interface FieldDescriptor {
4
+ Name: string
5
+ // 其他FieldDescriptor属性
6
+ }
7
+
8
+ // Field 接口
9
+ export interface Field {
10
+ // 属性
11
+ readonly FieldDescriptor: FieldDescriptor
12
+ readonly Id: string
13
+ readonly Name: string
14
+ readonly Type: string
15
+ Visible: boolean
16
+ readonly Width: string
17
+
18
+ // 方法
19
+ Copy(Before?: string | number, After?: string | number): Field
20
+ Move(Before?: string | number, After?: string | number): any // ApiResult
21
+ }
22
+
23
+ // 导出 Field 类型
24
+ export type { }
25
+ }
@@ -201,12 +201,12 @@ declare module 'application:datatable' {
201
201
  FieldIds: string[]
202
202
  }
203
203
 
204
- interface FieldApi {
204
+ export interface FieldApi {
205
205
  CreateFields(options: Pick<FieldFuncOptions, 'SheetId'> & { Fields: DistributiveOmit<OmitFieldSelectId<Field>, 'id'>[] }): Field[]
206
206
  GetFields(options: Pick<FieldFuncOptions, 'SheetId'>): Field[]
207
207
  UpdateFields(options: Pick<FieldFuncOptions, 'SheetId'> & { Fields: (DeepPartial<Field> & { id: string })[] }): Field[]
208
208
  DeleteFields(options: Pick<FieldFuncOptions, 'SheetId' | 'FieldIds'>): (Pick<FieldBase, 'id'> & { deleted: boolean })[]
209
209
  }
210
210
 
211
- export type { FieldApi }
211
+ export type { }
212
212
  }
@@ -1,88 +1,87 @@
1
- declare module 'application:datatable' {
2
- import { ViewType } from 'application:datatable'
3
- // 基础类型定义
4
- type FieldType =
5
- | 'SingleLineText'
6
- | 'MultiLineText'
7
- | 'Date'
8
- | 'SingleSelect'
9
- | 'Number'
10
- | 'Rating'
11
- | 'ID'
12
- | 'Phone'
13
- | 'Email'
14
- | 'Url'
15
- | 'Checkbox'
16
- | 'MultipleSelect'
17
- | 'Complete'
18
- | 'CellPicture'
19
- | 'Contact'
20
- | 'Attachment'
21
- | 'Note'
22
- | 'Link'
23
- | 'OneWayLink'
24
- | 'Lookup'
25
- | 'Address'
26
- | 'Cascade'
27
- | 'Automations'
28
- | 'AutoNumber'
29
- | 'CreatedBy'
30
- | 'CreatedTime'
31
- | 'LastModifiedBy'
32
- | 'LastModifiedTime'
33
- | 'Formula'
34
- | 'Button'
35
-
36
- interface EventContext {
37
- Destroy(): void
38
- }
39
-
40
- // 字段删除事件数据
41
- interface FieldDeleteEventData {
42
- sheetId: number
43
- fieldId: string
44
- fieldIds: string[]
45
- }
46
-
47
- // 字段描述符接口
48
- interface FieldDescriptor {
49
- // 属性
50
- Id: string
51
- Type: FieldType
52
- Name: string
53
- Description: string
54
- IsSyncField: boolean
55
- DefaultVal: string
56
- DefaultValType: any // Enum.DbFieldDefaultValueType
57
- NumberFormat: string
58
- IsValueUnique: boolean
59
-
60
- // 各字段类型的特有属性
61
- Button?: any
62
- Address?: any
63
- Cascade?: any
64
- Contact?: any
65
- Date?: any
66
- Watch?: any
67
- Formula?: any
68
- Lookup?: any
69
- Link?: any
70
- Automation?: any
71
- Attachment?: any
72
- Url?: any
73
- Number?: any
74
- Select?: any
75
- Rating?: any
76
-
77
- // 方法
78
- Apply(): any // ApiResult
79
- Delete(RemoveReversedLink?: boolean): boolean
80
-
81
- // 事件
82
- OnUpdate(callback: (data: FieldDescriptor) => void): EventContext
83
- OnDelete(callback: (data: FieldDeleteEventData) => void): EventContext
84
- }
85
-
86
- // 导出类型
87
- export type { FieldDescriptor, FieldType }
88
- }
1
+ declare module 'application:datatable' {
2
+ // 基础类型定义
3
+ export type FieldType =
4
+ | 'SingleLineText'
5
+ | 'MultiLineText'
6
+ | 'Date'
7
+ | 'SingleSelect'
8
+ | 'Number'
9
+ | 'Rating'
10
+ | 'ID'
11
+ | 'Phone'
12
+ | 'Email'
13
+ | 'Url'
14
+ | 'Checkbox'
15
+ | 'MultipleSelect'
16
+ | 'Complete'
17
+ | 'CellPicture'
18
+ | 'Contact'
19
+ | 'Attachment'
20
+ | 'Note'
21
+ | 'Link'
22
+ | 'OneWayLink'
23
+ | 'Lookup'
24
+ | 'Address'
25
+ | 'Cascade'
26
+ | 'Automations'
27
+ | 'AutoNumber'
28
+ | 'CreatedBy'
29
+ | 'CreatedTime'
30
+ | 'LastModifiedBy'
31
+ | 'LastModifiedTime'
32
+ | 'Formula'
33
+ | 'Button'
34
+
35
+ interface EventContext {
36
+ Destroy(): void
37
+ }
38
+
39
+ // 字段删除事件数据
40
+ interface FieldDeleteEventData {
41
+ sheetId: number
42
+ fieldId: string
43
+ fieldIds: string[]
44
+ }
45
+
46
+ // 字段描述符接口
47
+ export interface FieldDescriptor {
48
+ // 属性
49
+ Id: string
50
+ Type: FieldType
51
+ Name: string
52
+ Description: string
53
+ IsSyncField: boolean
54
+ DefaultVal: string
55
+ DefaultValType: any // Enum.DbFieldDefaultValueType
56
+ NumberFormat: string
57
+ IsValueUnique: boolean
58
+
59
+ // 各字段类型的特有属性
60
+ Button?: any
61
+ Address?: any
62
+ Cascade?: any
63
+ Contact?: any
64
+ Date?: any
65
+ Watch?: any
66
+ Formula?: any
67
+ Lookup?: any
68
+ Link?: any
69
+ Automation?: any
70
+ Attachment?: any
71
+ Url?: any
72
+ Number?: any
73
+ Select?: any
74
+ Rating?: any
75
+
76
+ // 方法
77
+ Apply(): any // ApiResult
78
+ Delete(RemoveReversedLink?: boolean): boolean
79
+
80
+ // 事件
81
+ OnUpdate(callback: (data: FieldDescriptor) => void): EventContext
82
+ OnDelete(callback: (data: FieldDeleteEventData) => void): EventContext
83
+ }
84
+
85
+ // 导出类型
86
+ export type { }
87
+ }
@@ -1,25 +1,25 @@
1
- declare module 'application:datatable' {
2
- import { ViewType, FieldType, FieldDescriptor } from 'application:datatable'
3
-
4
- interface EventContext {
5
- Destroy(): void
6
- }
7
-
8
- // 字段描述符集合接口
9
- interface FieldDescriptors {
10
- // 属性
11
- Count: number
12
-
13
- // 方法
14
- Item(Index: string | number): FieldDescriptor
15
- FieldDescriptor(Type: string, Name: string): FieldDescriptor
16
- AddField(FieldDescriptor: FieldDescriptor, Index?: string | number): any
17
- Delete(FieldId: string, RemoveReversedLink?: boolean): boolean
18
-
19
- // 事件
20
- OnCreate(callback: (data: FieldDescriptor) => void): EventContext
21
- }
22
-
23
- // 导出类型
24
- export type { FieldDescriptors }
25
- }
1
+ declare module 'application:datatable' {
2
+ import { ViewType, FieldType, FieldDescriptor } from 'application:datatable'
3
+
4
+ interface EventContext {
5
+ Destroy(): void
6
+ }
7
+
8
+ // 字段描述符集合接口
9
+ export interface FieldDescriptors {
10
+ // 属性
11
+ Count: number
12
+
13
+ // 方法
14
+ Item(Index: string | number): FieldDescriptor
15
+ FieldDescriptor(Type: string, Name: string): FieldDescriptor
16
+ AddField(FieldDescriptor: FieldDescriptor, Index?: string | number): any
17
+ Delete(FieldId: string, RemoveReversedLink?: boolean): boolean
18
+
19
+ // 事件
20
+ OnCreate(callback: (data: FieldDescriptor) => void): EventContext
21
+ }
22
+
23
+ // 导出类型
24
+ export type { }
25
+ }
@@ -1,20 +1,14 @@
1
- declare module 'application:datatable' {
2
- // Field 接口(根据文档引用)
3
- interface Field {
4
- readonly Id: string;
5
- Name: string;
6
- // 其他Field属性
7
- }
8
-
9
- // Fields 接口
10
- interface Fields {
11
- // 属性
12
- readonly Count: number;
13
-
14
- // 方法
15
- Item(Index: string | number): Field;
16
- }
17
-
18
- // 导出 Fields 类型
19
- export type { Fields };
20
- }
1
+ declare module 'application:datatable' {
2
+
3
+ // Fields 接口
4
+ export interface Fields {
5
+ // 属性
6
+ readonly Count: number
7
+
8
+ // 方法
9
+ Item(Index: string | number): Field
10
+ }
11
+
12
+ // 导出 Fields 类型
13
+ export type { }
14
+ }
@@ -1,10 +1,10 @@
1
- declare module 'application:datatable' {
2
- // Font 接口
3
- interface Font {
4
- // 属性
5
- Color: string;
6
- }
7
-
8
- // 导出 Font 类型
9
- export type { Font };
10
- }
1
+ declare module 'application:datatable' {
2
+ // Font 接口
3
+ export interface Font {
4
+ // 属性
5
+ Color: string
6
+ }
7
+
8
+ // 导出 Font 类型
9
+ export type { }
10
+ }
@@ -1,27 +1,25 @@
1
- declare module 'application:datatable' {
2
- import { ViewType, FieldType } from 'application:datatable'
3
-
4
- // 甘特图视图模式
5
- type GanttViewMode = 'Week' | 'Month' | 'Quarter' | 'Year'
6
-
7
- interface EventContext {
8
- Destroy(): void
9
- }
10
-
11
- // 甘特图视图UI接口
12
- interface GanttViewUI {
13
- // 属性
14
- GanttGridFold: boolean
15
- ViewMode: GanttViewMode
16
-
17
- // 方法
18
- Today(): boolean
19
- NextPage(): boolean
20
- PrevPage(): boolean
21
- FoldAll(): boolean
22
- UnFoldAll(): boolean
23
- }
24
-
25
- // 导出类型
26
- export type { GanttViewUI }
27
- }
1
+ declare module 'application:datatable' {
2
+ // 甘特图视图模式
3
+ type GanttViewMode = 'Week' | 'Month' | 'Quarter' | 'Year'
4
+
5
+ interface EventContext {
6
+ Destroy(): void
7
+ }
8
+
9
+ // 甘特图视图UI接口
10
+ export interface GanttViewUI {
11
+ // 属性
12
+ GanttGridFold: boolean
13
+ ViewMode: GanttViewMode
14
+
15
+ // 方法
16
+ Today(): boolean
17
+ NextPage(): boolean
18
+ PrevPage(): boolean
19
+ FoldAll(): boolean
20
+ UnFoldAll(): boolean
21
+ }
22
+
23
+ // 导出类型
24
+ export type { }
25
+ }
@@ -1,22 +1,22 @@
1
- declare module 'application:datatable' {
2
- // 基础类型定义
3
- interface Attachment {
4
- // Attachment类型
5
- }
6
-
7
- // Record 接口
8
- interface Record {
9
- // 属性
10
- readonly Id: string;
11
- readonly Text: string;
12
- Value: any; // 可读写的值,根据字段类型不同返回不同类型
13
-
14
- // 方法
15
- Item(Index: number | string): Record;
16
- Delete(): boolean;
17
- Select(): boolean;
18
- }
19
-
20
- // 导出 Record 类型
21
- export type { Record };
22
- }
1
+ declare module 'application:datatable' {
2
+ // 基础类型定义
3
+ interface Attachment {
4
+ // Attachment类型
5
+ }
6
+
7
+ // Record 接口
8
+ export interface Record {
9
+ // 属性
10
+ readonly Id: string
11
+ readonly Text: string
12
+ Value: any // 可读写的值,根据字段类型不同返回不同类型
13
+
14
+ // 方法
15
+ Item(Index: number | string): Record
16
+ Delete(): boolean
17
+ Select(): boolean
18
+ }
19
+
20
+ // 导出 Record 类型
21
+ export type { }
22
+ }