@jlceda/pro-api-types 0.2.43 → 0.2.45
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/index.d.ts +550 -21
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as React__default from 'react';
|
|
2
|
+
import React__default__default, { CSSProperties, ReactNode, ReactElement } from 'react';
|
|
1
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import React$1 from 'react';
|
|
3
4
|
|
|
4
5
|
declare global {
|
|
5
6
|
/**
|
|
@@ -498,7 +499,7 @@ declare global {
|
|
|
498
499
|
* 搜索符号
|
|
499
500
|
*
|
|
500
501
|
* @beta
|
|
501
|
-
* @param key -
|
|
502
|
+
* @param key - 搜索关键字
|
|
502
503
|
* @param libraryUuid - 库 UUID,默认为系统库,可以使用 {@link LIB_LibrariesList} 内的接口获取
|
|
503
504
|
* @param classification - 分类,默认为全部
|
|
504
505
|
* @param symbolType - 符号类型,默认为全部
|
|
@@ -962,7 +963,7 @@ declare global {
|
|
|
962
963
|
*
|
|
963
964
|
* @public
|
|
964
965
|
* @param documentUuid - 文档 UUID,此处支持 {@link IDMT_SchematicItem.uuid}、{@link IDMT_SchematicPageItem.uuid}、{@link IDMT_PcbItem.uuid}、{@link IDMT_PanelItem.uuid} 作为输入
|
|
965
|
-
* @param splitScreenId -
|
|
966
|
+
* @param splitScreenId - 分��� ID,即 {@link DMT_EditorControl.getSplitScreenTree} 方法获取到的 {@link IDMT_EditorSplitScreenItem.id}
|
|
966
967
|
* @returns 标签页 ID,如若为 `undefined`,则打开文档失败
|
|
967
968
|
*/
|
|
968
969
|
openDocument(documentUuid: string, splitScreenId?: string): Promise<string | undefined>;
|
|
@@ -1872,7 +1873,7 @@ declare global {
|
|
|
1872
1873
|
*/
|
|
1873
1874
|
copy(modelUuid: string, libraryUuid: string, targetLibraryUuid: string, targetClassification?: ILIB_ClassificationIndex | Array<string>, newModelName?: string): Promise<string | undefined>;
|
|
1874
1875
|
/**
|
|
1875
|
-
*
|
|
1876
|
+
* 搜索 3D 模型
|
|
1876
1877
|
*
|
|
1877
1878
|
* @beta
|
|
1878
1879
|
* @param key - 搜索关键字
|
|
@@ -4374,7 +4375,7 @@ declare global {
|
|
|
4374
4375
|
* 本接口在前端画布上定位到指定的区域,区域数据为相对于数据原点的偏移;
|
|
4375
4376
|
*
|
|
4376
4377
|
* 例如:传入数据为 `{left: 0, right: 60, top: 100, bottom: -20}` =\> `navigateToRegion(0, 60, 100, -20)`,
|
|
4377
|
-
* 则画布将会定位到以 `[30, 40]`
|
|
4378
|
+
* 则画布将会定位到以 `[30, 40]` 为中心的,`x` 轴方向长度为 `60`,`y` 轴方向长度为 `120` 的矩形范围;
|
|
4378
4379
|
*
|
|
4379
4380
|
* 本接口不进行缩放操作,但会生成指示定位中心及表示区域范围的矩形框;
|
|
4380
4381
|
*
|
|
@@ -7669,7 +7670,7 @@ declare global {
|
|
|
7669
7670
|
*/
|
|
7670
7671
|
setState_Reverse(reverse: boolean): IPCB_PrimitiveString;
|
|
7671
7672
|
/**
|
|
7672
|
-
*
|
|
7673
|
+
* 设置属性状态:反相扩展
|
|
7673
7674
|
*
|
|
7674
7675
|
* @beta
|
|
7675
7676
|
* @param expansion - 反相扩展
|
|
@@ -8267,7 +8268,7 @@ declare global {
|
|
|
8267
8268
|
* 在 PCB 画布中创建图元
|
|
8268
8269
|
*
|
|
8269
8270
|
* @internal
|
|
8270
|
-
* @remarks
|
|
8271
|
+
* @remarks 覆铜填充图元不支持新建,本接口调用将不会��任何效果
|
|
8271
8272
|
* @returns 覆铜填充图元对象
|
|
8272
8273
|
*/
|
|
8273
8274
|
create(): IPCB_PrimitivePoured;
|
|
@@ -10414,7 +10415,7 @@ declare global {
|
|
|
10414
10415
|
* @remarks
|
|
10415
10416
|
* 本接口模拟前端点击放置按钮,指定的器件将绑定到当前鼠标,并在用户后续点击时放置于画布
|
|
10416
10417
|
*
|
|
10417
|
-
*
|
|
10418
|
+
* 本接口的返回时机并���会等待用户的放置操作,一旦器件被绑定到鼠标,本接口将立即返回 `true` 的结果
|
|
10418
10419
|
* @param component - 关联库器件
|
|
10419
10420
|
* @returns 是否找到器件
|
|
10420
10421
|
*/
|
|
@@ -12160,7 +12161,7 @@ declare global {
|
|
|
12160
12161
|
*
|
|
12161
12162
|
* 此处的单位跨度为 0.01inch
|
|
12162
12163
|
* @param x - 坐标 X
|
|
12163
|
-
* @param y -
|
|
12164
|
+
* @param y - 坐标 Y
|
|
12164
12165
|
* @returns 操作是否成功
|
|
12165
12166
|
*/
|
|
12166
12167
|
navigateToCoordinates(x: number, y: number): Promise<boolean>;
|
|
@@ -12583,7 +12584,7 @@ declare global {
|
|
|
12583
12584
|
*
|
|
12584
12585
|
* 如果设置为 `true`,将会忽略所有检查警告项并尽可能生成下单资料;
|
|
12585
12586
|
*
|
|
12586
|
-
* 如果设置为 `false`,存在任意警告将中断执行并返回 `false`
|
|
12587
|
+
* 如果设置为 `false`,存在任意警告将中断执行并返回 `false` 的结果
|
|
12587
12588
|
* @returns 是否通过下单检查
|
|
12588
12589
|
*/
|
|
12589
12590
|
placeComponentsOrder(interactive?: boolean, ignoreWarning?: boolean): Promise<boolean>;
|
|
@@ -17552,7 +17553,7 @@ declare global {
|
|
|
17552
17553
|
*/
|
|
17553
17554
|
setState_LineWidth(lineWidth: number | null): ISCH_PrimitiveWire;
|
|
17554
17555
|
/**
|
|
17555
|
-
*
|
|
17556
|
+
* 设置属性状态:线型
|
|
17556
17557
|
*
|
|
17557
17558
|
* @beta
|
|
17558
17559
|
* @param lineType - 线型
|
|
@@ -17786,6 +17787,530 @@ declare global {
|
|
|
17786
17787
|
}, succeedCallFn?: (data: Response) => void | Promise<void>): Promise<Response>;
|
|
17787
17788
|
}
|
|
17788
17789
|
|
|
17790
|
+
/**
|
|
17791
|
+
* @fileoverview Table 组件类型定义
|
|
17792
|
+
* @description 整合 Table 和 ExcelTable 所有功能的类型声明
|
|
17793
|
+
*/
|
|
17794
|
+
|
|
17795
|
+
/** 表格对齐方式 */
|
|
17796
|
+
type TableCellAlign = 'left' | 'center' | 'right';
|
|
17797
|
+
/** 列固定位置 */
|
|
17798
|
+
type TableColFixed = 'left' | 'right';
|
|
17799
|
+
/** 排序状态 */
|
|
17800
|
+
type SortStatus = 'asc' | 'desc' | 'unset';
|
|
17801
|
+
/** 表格数据变更类型 */
|
|
17802
|
+
enum ETableDataChangeType {
|
|
17803
|
+
NORMAL = "NORMAL",
|
|
17804
|
+
CHECKED = "checked",
|
|
17805
|
+
ASC_SORT = "ASC_SORT",
|
|
17806
|
+
DESC_SORT = "DESC_SORT"
|
|
17807
|
+
}
|
|
17808
|
+
/** 单元格类型枚举 */
|
|
17809
|
+
enum CellType {
|
|
17810
|
+
/** 表头单元格 */
|
|
17811
|
+
TH = "th",
|
|
17812
|
+
/** 数据单元格 */
|
|
17813
|
+
TD = "td"
|
|
17814
|
+
}
|
|
17815
|
+
/** 单元格内容类型枚举 */
|
|
17816
|
+
enum CellContentType {
|
|
17817
|
+
/** 纯文本 */
|
|
17818
|
+
TEXT = "TEXT",
|
|
17819
|
+
/** 输入框 */
|
|
17820
|
+
INPUT = "INPUT",
|
|
17821
|
+
/** 文本域 */
|
|
17822
|
+
TEXTAREA = "TEXTAREA",
|
|
17823
|
+
/** 下拉框 */
|
|
17824
|
+
SELECT = "SELECT",
|
|
17825
|
+
/** 勾选框 */
|
|
17826
|
+
CHECKBOX = "CHECKBOX",
|
|
17827
|
+
/** 自定义单元格 */
|
|
17828
|
+
CUSTOM = "CUSTOM",
|
|
17829
|
+
/** 未定义单元格 */
|
|
17830
|
+
UNDEFINED = "UNDEFINED"
|
|
17831
|
+
}
|
|
17832
|
+
/** 单元格属性 */
|
|
17833
|
+
interface CellAttributes {
|
|
17834
|
+
/** 列跨度 */
|
|
17835
|
+
colSpan?: number;
|
|
17836
|
+
/** 行跨度 */
|
|
17837
|
+
rowSpan?: number;
|
|
17838
|
+
/** 样式 */
|
|
17839
|
+
style?: CSSProperties;
|
|
17840
|
+
/** 类名 */
|
|
17841
|
+
className?: string;
|
|
17842
|
+
}
|
|
17843
|
+
/** 有禁用状态的单元格参数 */
|
|
17844
|
+
interface HasDisabledCellParams {
|
|
17845
|
+
disabled?: boolean;
|
|
17846
|
+
}
|
|
17847
|
+
/** 有子类型的单元格参数 */
|
|
17848
|
+
interface HasSubTypeCellParams {
|
|
17849
|
+
/** 指定类型单元格下仍然可以再细分类型 */
|
|
17850
|
+
type?: string;
|
|
17851
|
+
}
|
|
17852
|
+
interface TextContentCellParams {
|
|
17853
|
+
value?: string;
|
|
17854
|
+
content?: string;
|
|
17855
|
+
}
|
|
17856
|
+
/** 输入框内容单元格参数 */
|
|
17857
|
+
interface InputContentCellParams extends HasDisabledCellParams {
|
|
17858
|
+
value?: string;
|
|
17859
|
+
onChange: (value: string) => void;
|
|
17860
|
+
onConfirm: (cell: any) => void;
|
|
17861
|
+
children?: ReactElement;
|
|
17862
|
+
}
|
|
17863
|
+
/** 下拉框选项 */
|
|
17864
|
+
interface SelectOption {
|
|
17865
|
+
text: string;
|
|
17866
|
+
value: string | number;
|
|
17867
|
+
disabled?: boolean;
|
|
17868
|
+
}
|
|
17869
|
+
/** 下拉框内容单元格参数 */
|
|
17870
|
+
interface SelectContentCellParams extends HasDisabledCellParams {
|
|
17871
|
+
value?: string | number;
|
|
17872
|
+
onChange: (value: string | number | Array<string | number>) => void;
|
|
17873
|
+
options?: SelectOption[];
|
|
17874
|
+
children?: ReactElement;
|
|
17875
|
+
}
|
|
17876
|
+
/** 勾选框内容单元格参数 */
|
|
17877
|
+
interface CheckBoxContentCellParams extends HasDisabledCellParams {
|
|
17878
|
+
checked?: boolean;
|
|
17879
|
+
onChange: (checked: boolean) => void;
|
|
17880
|
+
}
|
|
17881
|
+
/** 文本域内容单元格参数 */
|
|
17882
|
+
interface TextareaContentCellParams extends HasDisabledCellParams {
|
|
17883
|
+
value?: string;
|
|
17884
|
+
onChange: (value: string) => void;
|
|
17885
|
+
children?: ReactElement;
|
|
17886
|
+
}
|
|
17887
|
+
/** 自定义内容单元格参数 */
|
|
17888
|
+
interface CustomContentCellParams<T = any, K = any> extends HasSubTypeCellParams {
|
|
17889
|
+
/** 自定义节点 */
|
|
17890
|
+
element: ReactElement | {
|
|
17891
|
+
Element: (props: K) => ReactElement;
|
|
17892
|
+
elementProps: K;
|
|
17893
|
+
};
|
|
17894
|
+
/** 遮罩层样式 */
|
|
17895
|
+
maskStyle?: CSSProperties;
|
|
17896
|
+
/** 是否允许编辑 */
|
|
17897
|
+
canEdit?: (instance: any) => boolean;
|
|
17898
|
+
/** 是否允许粘贴 */
|
|
17899
|
+
canPaste?: (instance: any) => boolean;
|
|
17900
|
+
/** 是否置灰 */
|
|
17901
|
+
isDisabled?: (instance: any) => boolean;
|
|
17902
|
+
/** 获取value */
|
|
17903
|
+
getValue?: (instance: any) => T;
|
|
17904
|
+
/** 获取展示text */
|
|
17905
|
+
getText?: (instance: any) => string;
|
|
17906
|
+
/** 设置value */
|
|
17907
|
+
setValue?: (instance: any, value: T) => void;
|
|
17908
|
+
/** 进入编辑状态回调 */
|
|
17909
|
+
onEdit?: (instance: any, value?: T) => void;
|
|
17910
|
+
/** 确认回调 */
|
|
17911
|
+
onConfirm?: (cell: any) => void;
|
|
17912
|
+
/** 额外数据 */
|
|
17913
|
+
data?: {
|
|
17914
|
+
[key: string]: any;
|
|
17915
|
+
};
|
|
17916
|
+
}
|
|
17917
|
+
/** 单元格内容类型映射 */
|
|
17918
|
+
interface CellContentReflect {
|
|
17919
|
+
[CellContentType.CHECKBOX]: CheckBoxContentCellParams;
|
|
17920
|
+
[CellContentType.TEXT]: TextContentCellParams;
|
|
17921
|
+
[CellContentType.INPUT]: InputContentCellParams;
|
|
17922
|
+
[CellContentType.SELECT]: SelectContentCellParams;
|
|
17923
|
+
[CellContentType.TEXTAREA]: TextareaContentCellParams;
|
|
17924
|
+
[CellContentType.CUSTOM]: CustomContentCellParams;
|
|
17925
|
+
[CellContentType.UNDEFINED]: undefined;
|
|
17926
|
+
}
|
|
17927
|
+
/** 单元格内容参数泛型 */
|
|
17928
|
+
type CellContentParams<T extends CellContentType = CellContentType> = CellContentReflect[T];
|
|
17929
|
+
/** 单元格配置 */
|
|
17930
|
+
interface TableCellConfig<T extends CellContentType = CellContentType> {
|
|
17931
|
+
/** 单元格类型 */
|
|
17932
|
+
cellType?: CellType;
|
|
17933
|
+
/** 单元格属性 */
|
|
17934
|
+
cellAttributes?: CellAttributes;
|
|
17935
|
+
/** 内容类型 */
|
|
17936
|
+
contentType?: T;
|
|
17937
|
+
/** 内容参数 */
|
|
17938
|
+
content?: CellContentParams<T>;
|
|
17939
|
+
/** 是否支持排序(仅表头有效) */
|
|
17940
|
+
sortable?: boolean;
|
|
17941
|
+
/** 排序字段名(仅表头有效) */
|
|
17942
|
+
sortKey?: string;
|
|
17943
|
+
}
|
|
17944
|
+
/** 单元格属性 */
|
|
17945
|
+
type TableCellProps = string | TableCellConfig;
|
|
17946
|
+
|
|
17947
|
+
/** 表格行数据 */
|
|
17948
|
+
interface TableRow {
|
|
17949
|
+
/** 自定义行背景颜色 */
|
|
17950
|
+
bgColor?: string;
|
|
17951
|
+
/** 错误行标识 */
|
|
17952
|
+
isError?: boolean;
|
|
17953
|
+
/** 不显示复选框 */
|
|
17954
|
+
noCheckbox?: boolean;
|
|
17955
|
+
/** 固定状态 */
|
|
17956
|
+
fixed?: boolean;
|
|
17957
|
+
/** 禁止选中当前行 */
|
|
17958
|
+
disabledRow?: boolean;
|
|
17959
|
+
/** 禁用复选框 */
|
|
17960
|
+
disabledCheckbox?: boolean;
|
|
17961
|
+
/** 允许事件传递 */
|
|
17962
|
+
propagationClickHandle?: boolean;
|
|
17963
|
+
/** 数据唯一索引值 */
|
|
17964
|
+
[key: string]: any;
|
|
17965
|
+
}
|
|
17966
|
+
/** 表格列配置 */
|
|
17967
|
+
interface TableColumn {
|
|
17968
|
+
/** 列key值 */
|
|
17969
|
+
key: string;
|
|
17970
|
+
/** 列名 */
|
|
17971
|
+
name: string;
|
|
17972
|
+
/** 列宽 */
|
|
17973
|
+
width?: number;
|
|
17974
|
+
/** 是否开启排序 */
|
|
17975
|
+
sortable?: boolean;
|
|
17976
|
+
/** 排序字段 */
|
|
17977
|
+
sortKey?: string | string[];
|
|
17978
|
+
/** 是否允许编辑 */
|
|
17979
|
+
editable?: boolean | 1 | 2;
|
|
17980
|
+
/** 是否带过滤搜索功能 */
|
|
17981
|
+
filter?: boolean;
|
|
17982
|
+
/** 单元格对齐方式 */
|
|
17983
|
+
align?: TableCellAlign;
|
|
17984
|
+
/** 下拉框列表 */
|
|
17985
|
+
selectList?: SelectOption[];
|
|
17986
|
+
/** 当前列单元格是否开启溢出省略 */
|
|
17987
|
+
ellipsis?: boolean;
|
|
17988
|
+
/** 固定列位置 */
|
|
17989
|
+
fixed?: TableColFixed;
|
|
17990
|
+
/** 列宽固定 */
|
|
17991
|
+
fixedWidth?: boolean;
|
|
17992
|
+
/** 是否悬浮显示列bodytitle */
|
|
17993
|
+
showBodyTitle?: boolean;
|
|
17994
|
+
/** 样式 */
|
|
17995
|
+
style?: CSSProperties;
|
|
17996
|
+
/** 点击事件 */
|
|
17997
|
+
onClick?: (colKey: string, ev: React.MouseEvent<HTMLTableHeaderCellElement>) => void;
|
|
17998
|
+
/** 设置单元格属性 */
|
|
17999
|
+
onCell?: (row: TableRow, index: number, colKey: string) => CellAttributes | void;
|
|
18000
|
+
/** 设置列头单元格属性 */
|
|
18001
|
+
onHeadCell?: (col: TableColumn) => CellAttributes | void;
|
|
18002
|
+
/** 自定义cell渲染 */
|
|
18003
|
+
render?: (params: RenderParam) => ReactNode;
|
|
18004
|
+
/** 自定义headerCell渲染 */
|
|
18005
|
+
nameRender?: () => ReactNode;
|
|
18006
|
+
}
|
|
18007
|
+
/** 渲染参数 */
|
|
18008
|
+
interface RenderParam {
|
|
18009
|
+
/** 点击对象 */
|
|
18010
|
+
clickObj: TableClickObj;
|
|
18011
|
+
/** 行号 */
|
|
18012
|
+
rowNumber: number;
|
|
18013
|
+
/** 列key */
|
|
18014
|
+
colKey: string;
|
|
18015
|
+
/** 行数据 */
|
|
18016
|
+
row: TableRow;
|
|
18017
|
+
/** 单元格数据 */
|
|
18018
|
+
cellData: any;
|
|
18019
|
+
/** 表格数据 */
|
|
18020
|
+
tableData: TableRow[];
|
|
18021
|
+
/** 编辑行号数组 */
|
|
18022
|
+
editingRowNumbers: number[];
|
|
18023
|
+
/** 选中行号数组 */
|
|
18024
|
+
selectedRowNumbers: number[];
|
|
18025
|
+
/** 设置单元格样式 */
|
|
18026
|
+
setCellStyle: (style: CSSProperties) => void;
|
|
18027
|
+
/** 设置行样式 */
|
|
18028
|
+
setRowStyle: (style: CSSProperties) => void;
|
|
18029
|
+
/** 设置所有单元格样式 */
|
|
18030
|
+
setAllCellStyle: (style: CSSProperties) => void;
|
|
18031
|
+
/** 设置行数据 */
|
|
18032
|
+
setRowData: (data: {
|
|
18033
|
+
rowIndex: number;
|
|
18034
|
+
colKey: string;
|
|
18035
|
+
value: string | number;
|
|
18036
|
+
}) => void;
|
|
18037
|
+
/** 设置表格数据 */
|
|
18038
|
+
setTableData: (data: TableRow[]) => void;
|
|
18039
|
+
/** 折叠展开回调 */
|
|
18040
|
+
onToggleExpand?: (action: 'Expand' | 'Collapse', rows: Array<TableRow>, opIndex: number) => void;
|
|
18041
|
+
/** 高亮字符串 */
|
|
18042
|
+
heightLightStr?: string;
|
|
18043
|
+
}
|
|
18044
|
+
/** 表格点击对象 */
|
|
18045
|
+
interface TableClickObj {
|
|
18046
|
+
/** 行号 */
|
|
18047
|
+
rowNumber: number;
|
|
18048
|
+
/** 列key */
|
|
18049
|
+
colKey?: string;
|
|
18050
|
+
/** 点击次数 */
|
|
18051
|
+
clickCount: number;
|
|
18052
|
+
/** 是否Ctrl按下 */
|
|
18053
|
+
isCtrl?: boolean;
|
|
18054
|
+
/** 是否Shift按下 */
|
|
18055
|
+
isShift?: boolean;
|
|
18056
|
+
/** 是否选中 */
|
|
18057
|
+
checked?: boolean;
|
|
18058
|
+
/** 鼠标事件 */
|
|
18059
|
+
e: React.MouseEvent<HTMLTableDataCellElement> | null;
|
|
18060
|
+
}
|
|
18061
|
+
/** 表格点击参数 */
|
|
18062
|
+
interface TableOnClickParam {
|
|
18063
|
+
/** 点击对象 */
|
|
18064
|
+
clickObj?: TableClickObj;
|
|
18065
|
+
/** 行数据 */
|
|
18066
|
+
row: TableRow;
|
|
18067
|
+
/** 表格数据 */
|
|
18068
|
+
tableData?: TableRow[];
|
|
18069
|
+
/** 编辑行号数组 */
|
|
18070
|
+
editingRowNumbers?: number[];
|
|
18071
|
+
/** 选中行号数组 */
|
|
18072
|
+
selectedRowNumbers?: number[];
|
|
18073
|
+
/** 所有选中索引值 */
|
|
18074
|
+
allSelectedRowIndexValues?: Set<string | number>;
|
|
18075
|
+
/** 是否Ctrl按下 */
|
|
18076
|
+
isCtrl?: boolean;
|
|
18077
|
+
/** 是否Shift按下 */
|
|
18078
|
+
isShift?: boolean;
|
|
18079
|
+
/** 来源 */
|
|
18080
|
+
from?: string;
|
|
18081
|
+
/** 设置单元格样式 */
|
|
18082
|
+
setCellStyle?: (style: CSSProperties) => void;
|
|
18083
|
+
}
|
|
18084
|
+
/** 复选框变更可选参数 */
|
|
18085
|
+
interface CheckedOptionalParams {
|
|
18086
|
+
/** 是否由行更新触发 */
|
|
18087
|
+
isTriggerByRowsUpdate: boolean;
|
|
18088
|
+
/** 是否由选中列表更新触发 */
|
|
18089
|
+
isTriggerByCheckListUpdate?: boolean;
|
|
18090
|
+
/** 行数据 */
|
|
18091
|
+
row?: TableRow;
|
|
18092
|
+
}
|
|
18093
|
+
/** 排序信息 */
|
|
18094
|
+
interface SortInfo {
|
|
18095
|
+
/** 列key */
|
|
18096
|
+
colKey: string;
|
|
18097
|
+
/** 排序字�� */
|
|
18098
|
+
key: string | string[];
|
|
18099
|
+
/** 排序状态 */
|
|
18100
|
+
status: SortStatus;
|
|
18101
|
+
}
|
|
18102
|
+
/** 移动行信息 */
|
|
18103
|
+
interface MoveRowIndex {
|
|
18104
|
+
/** 当前索引 */
|
|
18105
|
+
curIndex: number;
|
|
18106
|
+
/** 新索引 */
|
|
18107
|
+
newIndex: number;
|
|
18108
|
+
}
|
|
18109
|
+
/** 删除行信息 */
|
|
18110
|
+
interface DelRowInfo {
|
|
18111
|
+
/** 索引值 */
|
|
18112
|
+
indexValue: string;
|
|
18113
|
+
/** 刷新次数 */
|
|
18114
|
+
refreshCount: number;
|
|
18115
|
+
}
|
|
18116
|
+
/** 增加行数据 */
|
|
18117
|
+
interface AddRowData {
|
|
18118
|
+
[key: number]: TableRow;
|
|
18119
|
+
}
|
|
18120
|
+
/** 拖拽配置参数 */
|
|
18121
|
+
interface DragConfigParams {
|
|
18122
|
+
/** 上限索引 */
|
|
18123
|
+
upperLimitIndex: number;
|
|
18124
|
+
/** 下限索引 */
|
|
18125
|
+
lowerLimitIndex: number;
|
|
18126
|
+
}
|
|
18127
|
+
/** Table 组件属性 */
|
|
18128
|
+
interface TableProps {
|
|
18129
|
+
/** 表格ID */
|
|
18130
|
+
id?: string;
|
|
18131
|
+
/** 数据唯一索引值字段 */
|
|
18132
|
+
index: string;
|
|
18133
|
+
/** 表格名称 */
|
|
18134
|
+
name?: string;
|
|
18135
|
+
/** 表格宽度 */
|
|
18136
|
+
width?: number;
|
|
18137
|
+
/** 表格高度 */
|
|
18138
|
+
height?: number;
|
|
18139
|
+
/** 列配置 */
|
|
18140
|
+
columns: TableColumn[];
|
|
18141
|
+
/** 行数据 */
|
|
18142
|
+
rows: TableRow[];
|
|
18143
|
+
/** 表格头部数据 */
|
|
18144
|
+
head?: Array<Array<TableCellProps>>;
|
|
18145
|
+
/** 表格内容数据 */
|
|
18146
|
+
body?: Array<Array<TableCellProps>>;
|
|
18147
|
+
/** 表格尾部数据 */
|
|
18148
|
+
foot?: Array<Array<TableCellProps>>;
|
|
18149
|
+
/** 是否显示序号 */
|
|
18150
|
+
number?: boolean;
|
|
18151
|
+
/** 是否显示边框 */
|
|
18152
|
+
border?: boolean;
|
|
18153
|
+
/** 是否显示表头边框 */
|
|
18154
|
+
headerBorder?: boolean;
|
|
18155
|
+
/** 表格行栅栏显示效果 */
|
|
18156
|
+
stockade?: boolean;
|
|
18157
|
+
/** 是否带复选框 */
|
|
18158
|
+
checkbox?: boolean;
|
|
18159
|
+
/** 需要选中的行 */
|
|
18160
|
+
checkedList?: TableRow[];
|
|
18161
|
+
/** 是否固定表头 */
|
|
18162
|
+
fixedHeader?: boolean;
|
|
18163
|
+
/** 是否显示表头 */
|
|
18164
|
+
showHeader?: boolean;
|
|
18165
|
+
/** 行上下移动的下标信息 */
|
|
18166
|
+
moveRowIndex?: MoveRowIndex;
|
|
18167
|
+
/** 要删除行的信息 */
|
|
18168
|
+
delRowInfo?: DelRowInfo;
|
|
18169
|
+
/** 增加行数据 */
|
|
18170
|
+
addRowData?: AddRowData;
|
|
18171
|
+
/** 是否开启虚拟滚动 */
|
|
18172
|
+
openVirtualScroll?: boolean;
|
|
18173
|
+
/** 表格搜索值 */
|
|
18174
|
+
searchValue?: string;
|
|
18175
|
+
/** 外部控制选中行 */
|
|
18176
|
+
selectedRowNumbers?: number[];
|
|
18177
|
+
/** 外部控制编辑行 */
|
|
18178
|
+
editingRowNumbers?: number[];
|
|
18179
|
+
/** 行选中背景颜色 */
|
|
18180
|
+
openRowSelectedBgColor?: boolean;
|
|
18181
|
+
/** 是否在表格头右键菜单中显示"自定义表头"设置项 */
|
|
18182
|
+
showCustomHeadSettingOnHeadContextmenu?: boolean;
|
|
18183
|
+
/** 是否改变表头排序的状态 */
|
|
18184
|
+
isChangeSortStatus?: boolean;
|
|
18185
|
+
/** 是否显示表格状态提示词 */
|
|
18186
|
+
showStatus?: boolean;
|
|
18187
|
+
/** 状态提示内容 */
|
|
18188
|
+
statusNode?: ReactNode;
|
|
18189
|
+
/** 是否高亮多行 */
|
|
18190
|
+
multiSelect?: boolean;
|
|
18191
|
+
/** 是否开启上下键移动高亮行 */
|
|
18192
|
+
moveAble?: boolean;
|
|
18193
|
+
/** 是否仅高亮文本 */
|
|
18194
|
+
isOnlyHighlightText?: boolean;
|
|
18195
|
+
/** 行高 */
|
|
18196
|
+
rowHeight?: number;
|
|
18197
|
+
/** 头高 */
|
|
18198
|
+
headHeight?: number;
|
|
18199
|
+
/** 表头行高 */
|
|
18200
|
+
headLineHeight?: number;
|
|
18201
|
+
/** 是否允许鼠标滑过时选中该行 */
|
|
18202
|
+
enableSelectRowByHover?: boolean;
|
|
18203
|
+
/** 重置表格内部数据 */
|
|
18204
|
+
resetTableDataCount?: number;
|
|
18205
|
+
/** 数据变化时是否重置滚动位置到顶部 */
|
|
18206
|
+
resetScrollOnDataChange?: boolean;
|
|
18207
|
+
/** 是否允许拖拽排序 */
|
|
18208
|
+
enableDragSort?: boolean;
|
|
18209
|
+
/** 是否显示拖拽图标 */
|
|
18210
|
+
showDragIcon?: boolean;
|
|
18211
|
+
/** 拖拽配置 */
|
|
18212
|
+
dragConfig?: DragConfigParams;
|
|
18213
|
+
/** 是否开启多行拖拽 */
|
|
18214
|
+
openMultiDrag?: boolean;
|
|
18215
|
+
/** 是否跟随高亮 */
|
|
18216
|
+
followHeightLight?: boolean;
|
|
18217
|
+
/** 是否开启拖动列宽 */
|
|
18218
|
+
resize?: boolean;
|
|
18219
|
+
/** 是否开启点击时按住ctrl自动操作行 */
|
|
18220
|
+
isCtrlSelect?: boolean;
|
|
18221
|
+
/** 是否开启点击时按住shift自动操作行 */
|
|
18222
|
+
isShiftSelect?: boolean;
|
|
18223
|
+
/** 开启虚拟滚动,在高度变更后是否滚动到第一个勾选项或顶部 */
|
|
18224
|
+
virtualScrollAutoFirst?: boolean;
|
|
18225
|
+
/** 滚动X基底部距离 */
|
|
18226
|
+
scrollXBaseBottom?: number;
|
|
18227
|
+
/** 额外高度 */
|
|
18228
|
+
extraHeight?: number;
|
|
18229
|
+
/** 自定义th样式 */
|
|
18230
|
+
headerStyle?: CSSProperties;
|
|
18231
|
+
/** 是否启用横向滚动 */
|
|
18232
|
+
enableScrollX?: boolean;
|
|
18233
|
+
/** 是否双击 */
|
|
18234
|
+
doubleClick?: boolean;
|
|
18235
|
+
/** 使用指针拖拽 */
|
|
18236
|
+
usePointerDrag?: boolean;
|
|
18237
|
+
/** 高亮搜索的正则 */
|
|
18238
|
+
highLightRegexpFn?: (v: any) => RegExp;
|
|
18239
|
+
/** 是否启用表头竖向显示功能 */
|
|
18240
|
+
enableVerticalHeader?: boolean;
|
|
18241
|
+
/** 指定忽略竖向显示的表头键 */
|
|
18242
|
+
verticalHeaderIgnoreKeys?: string[];
|
|
18243
|
+
/** 复选框改变事件回调 */
|
|
18244
|
+
onCheckRow?: (rows: TableRow[], rowNumbers: number[], optional: CheckedOptionalParams) => void;
|
|
18245
|
+
/** 全选回调 */
|
|
18246
|
+
onAllChecked?: (data: TableRow[], checked: boolean) => void;
|
|
18247
|
+
/** 选中行回调 */
|
|
18248
|
+
onClick?: (props: TableOnClickParam) => void;
|
|
18249
|
+
/** 表格数据变动的事件回调 */
|
|
18250
|
+
onChange?: (data: TableRow[], row?: TableRow, type?: ETableDataChangeType, optional?: PlainObject) => void;
|
|
18251
|
+
/** 表格行右键回调 */
|
|
18252
|
+
onContextMenu?: (rows: TableRow, ev: React.MouseEvent<HTMLTableCellElement>) => void;
|
|
18253
|
+
/** 行鼠标离开 */
|
|
18254
|
+
onRowMouseLeave?: (row: TableRow, rowIndex: number) => void;
|
|
18255
|
+
/** 行鼠标进入 */
|
|
18256
|
+
onRowMouseEnter?: (row: TableRow, rowIndex: number) => void;
|
|
18257
|
+
/** 行鼠标移动 */
|
|
18258
|
+
onRowMouseMove?: (row: TableRow, rowIndex: number) => void;
|
|
18259
|
+
/** 拖拽移动结束回调 */
|
|
18260
|
+
onDragMoveEnd?: (handlerInitialIndex: number | number[], insertedRealtimeIndex: number, handlerRealtimeIndex: number | number[]) => void;
|
|
18261
|
+
/** 表格滚动回调 */
|
|
18262
|
+
onTableScroll?: (tableScrollHeight: number, currentTableHeight: number, scrollTop: number) => void;
|
|
18263
|
+
/** 把searchValue搜索到的高亮数据返回 */
|
|
18264
|
+
searchValueCB?: (a: any) => void;
|
|
18265
|
+
/** 列尺寸变化回调 */
|
|
18266
|
+
onColSizeChange?: (col: TableColumn, cols: TableColumn[]) => void;
|
|
18267
|
+
/** 排序触发后的回调 */
|
|
18268
|
+
onSort?: (info: SortInfo) => void;
|
|
18269
|
+
/** 表格样式 */
|
|
18270
|
+
style?: CSSProperties;
|
|
18271
|
+
/** 表格body样式 */
|
|
18272
|
+
tableBodyStyle?: CSSProperties;
|
|
18273
|
+
}
|
|
18274
|
+
/** 普通对象类型 */
|
|
18275
|
+
type PlainObject = {
|
|
18276
|
+
[key: string]: any;
|
|
18277
|
+
};
|
|
18278
|
+
/** Table 实例方法类型 */
|
|
18279
|
+
interface TableInstance {
|
|
18280
|
+
/** 全选 */
|
|
18281
|
+
checkAll: () => void;
|
|
18282
|
+
/** 选中某一行 */
|
|
18283
|
+
checkedRow: ({ row, checked }: {
|
|
18284
|
+
row: TableRow;
|
|
18285
|
+
checked: boolean;
|
|
18286
|
+
}) => void;
|
|
18287
|
+
/** 选择某一行 */
|
|
18288
|
+
toSelectRow: (row: TableRow, option?: {
|
|
18289
|
+
isCtrl?: boolean;
|
|
18290
|
+
isShift?: boolean;
|
|
18291
|
+
}, from?: string) => void;
|
|
18292
|
+
/** 向下移动高亮行 */
|
|
18293
|
+
downMove: (rowNumber?: number) => void;
|
|
18294
|
+
/** 向上移动高亮行 */
|
|
18295
|
+
upMove: (rowNumber?: number) => void;
|
|
18296
|
+
/** 滚动到选中行 */
|
|
18297
|
+
scrollSelectedRowIntoView: () => void;
|
|
18298
|
+
/** 滚动到指定行 */
|
|
18299
|
+
scrollRowIntoView: (rowIndex: string) => void;
|
|
18300
|
+
/** 根据滚动位置处理表格滚动 */
|
|
18301
|
+
handleTableScrollByScrollTop: (scrollTop: number) => void;
|
|
18302
|
+
/** 刷新表格 */
|
|
18303
|
+
refresh: () => void;
|
|
18304
|
+
/** 取消排序状态 */
|
|
18305
|
+
cancelSortStatus: () => void;
|
|
18306
|
+
/** 表格体 DOM 引用 */
|
|
18307
|
+
tableBodyDiv: HTMLDivElement | null;
|
|
18308
|
+
/** 恢复选中 */
|
|
18309
|
+
revertSelect: () => void;
|
|
18310
|
+
/** 虚拟滚动行索引到视图 */
|
|
18311
|
+
virtualScrollRowIndexIntoView: (rowIdx: number) => void;
|
|
18312
|
+
}
|
|
18313
|
+
|
|
17789
18314
|
type IconProps = {
|
|
17790
18315
|
/** 模板名称 */
|
|
17791
18316
|
iconClass: string;
|
|
@@ -17806,6 +18331,7 @@ declare global {
|
|
|
17806
18331
|
|
|
17807
18332
|
interface ListChildren$1 {
|
|
17808
18333
|
title: string;
|
|
18334
|
+
id?: string;
|
|
17809
18335
|
value?: string;
|
|
17810
18336
|
clearBtn?: boolean;
|
|
17811
18337
|
children?: ListChildren$1[];
|
|
@@ -17867,14 +18393,14 @@ declare global {
|
|
|
17867
18393
|
alignY?: 'start' | 'center' | 'end' | 'stretch';
|
|
17868
18394
|
gap?: number;
|
|
17869
18395
|
classes?: string[];
|
|
17870
|
-
children?:
|
|
18396
|
+
children?: React__default__default.ReactNode;
|
|
17871
18397
|
onClick?: () => void;
|
|
17872
18398
|
}
|
|
17873
18399
|
function Flex({ direction, alignX, alignY, gap, classes, children, onClick, ...styleProps }: FlexProps): react_jsx_runtime.JSX.Element;
|
|
17874
18400
|
|
|
17875
18401
|
interface FlexItemProps extends ContainerStyleProps {
|
|
17876
18402
|
flexRatio?: number;
|
|
17877
|
-
children?:
|
|
18403
|
+
children?: React__default__default.ReactNode;
|
|
17878
18404
|
onClick?: () => void;
|
|
17879
18405
|
}
|
|
17880
18406
|
function FlexItem({ flexRatio, children, onClick, ...styleProps }: FlexItemProps): react_jsx_runtime.JSX.Element;
|
|
@@ -17883,7 +18409,7 @@ declare global {
|
|
|
17883
18409
|
columns: number;
|
|
17884
18410
|
rowGap?: number;
|
|
17885
18411
|
colGap?: number;
|
|
17886
|
-
children?:
|
|
18412
|
+
children?: React__default__default.ReactNode;
|
|
17887
18413
|
}
|
|
17888
18414
|
function Grid({ columns, rowGap, colGap, children, ...styleProps }: GridProps): react_jsx_runtime.JSX.Element;
|
|
17889
18415
|
|
|
@@ -17891,13 +18417,14 @@ declare global {
|
|
|
17891
18417
|
colSpan?: number;
|
|
17892
18418
|
rowSpan?: number;
|
|
17893
18419
|
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
17894
|
-
children?:
|
|
18420
|
+
children?: React__default__default.ReactNode;
|
|
17895
18421
|
}
|
|
17896
18422
|
function GridItem({ colSpan, rowSpan, align, children, ...styleProps }: GridItemProps): react_jsx_runtime.JSX.Element;
|
|
17897
18423
|
|
|
17898
18424
|
interface ListChildren {
|
|
17899
18425
|
title: string;
|
|
17900
18426
|
id?: string;
|
|
18427
|
+
value?: string;
|
|
17901
18428
|
clearBtn?: boolean;
|
|
17902
18429
|
children?: ListChildren[];
|
|
17903
18430
|
childrenCollapse?: boolean;
|
|
@@ -17911,7 +18438,7 @@ declare global {
|
|
|
17911
18438
|
itemHeight?: number;
|
|
17912
18439
|
border?: boolean;
|
|
17913
18440
|
expandEnable?: boolean;
|
|
17914
|
-
onItemClick?: (id: string) => void;
|
|
18441
|
+
onItemClick?: (id: string, item: ListChildren) => void;
|
|
17915
18442
|
onItemDblclick?: (id: string) => void;
|
|
17916
18443
|
onItemContextmenu?: (id: string) => void;
|
|
17917
18444
|
}
|
|
@@ -17969,7 +18496,7 @@ declare global {
|
|
|
17969
18496
|
hide?: boolean;
|
|
17970
18497
|
resizeX?: boolean;
|
|
17971
18498
|
resizeY?: boolean;
|
|
17972
|
-
children?:
|
|
18499
|
+
children?: React__default__default.ReactNode;
|
|
17973
18500
|
onMoved?: (top: number, left: number) => void;
|
|
17974
18501
|
}
|
|
17975
18502
|
function Modal({ top, left, width, height, maxDragX, maxDragY, hide, overlay, resizeX, resizeY, children, onMoved, }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
@@ -17988,14 +18515,15 @@ declare global {
|
|
|
17988
18515
|
resizeY?: boolean;
|
|
17989
18516
|
buttons?: ButtonProps[];
|
|
17990
18517
|
onClose?: () => void;
|
|
17991
|
-
children?:
|
|
17992
|
-
footer?:
|
|
18518
|
+
children?: React__default__default.ReactNode;
|
|
18519
|
+
footer?: React__default__default.ReactNode;
|
|
17993
18520
|
}
|
|
17994
18521
|
function Dialog(props: DialogProps): react_jsx_runtime.JSX.Element;
|
|
17995
18522
|
|
|
17996
18523
|
interface SelectListItem {
|
|
17997
18524
|
title: string;
|
|
17998
18525
|
value?: string;
|
|
18526
|
+
selected?: boolean;
|
|
17999
18527
|
children?: SelectListItem[];
|
|
18000
18528
|
}
|
|
18001
18529
|
interface SelectProps {
|
|
@@ -18014,7 +18542,7 @@ declare global {
|
|
|
18014
18542
|
width?: number;
|
|
18015
18543
|
height?: number;
|
|
18016
18544
|
title: string;
|
|
18017
|
-
children?:
|
|
18545
|
+
children?: React__default__default.ReactNode;
|
|
18018
18546
|
onClick?: () => void;
|
|
18019
18547
|
}
|
|
18020
18548
|
function Board({ padding, bgColor, width, height, title, children, onClick }: BoardProps): react_jsx_runtime.JSX.Element;
|
|
@@ -18045,6 +18573,7 @@ declare global {
|
|
|
18045
18573
|
readonly Select: typeof Select;
|
|
18046
18574
|
readonly Board: typeof Board;
|
|
18047
18575
|
readonly Image: typeof Image;
|
|
18576
|
+
readonly Table: React__default.ForwardRefExoticComponent<TableProps & React__default.RefAttributes<TableInstance>>;
|
|
18048
18577
|
};
|
|
18049
18578
|
const LC_DESIGN_COMPONENTS_NAMES: (keyof typeof ComponentsIndex)[];
|
|
18050
18579
|
type TComponentsIndex = typeof ComponentsIndex;
|
|
@@ -18560,7 +19089,7 @@ declare global {
|
|
|
18560
19089
|
* 获取扩展内的文件
|
|
18561
19090
|
*
|
|
18562
19091
|
* @public
|
|
18563
|
-
* @param uri -
|
|
19092
|
+
* @param uri - 文件路径
|
|
18564
19093
|
* @returns File 格式文件
|
|
18565
19094
|
*/
|
|
18566
19095
|
getExtensionFile(uri: string): Promise<File | undefined>;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "@jlceda/pro-api-types", "type": "module", "version": "0.2.
|
|
1
|
+
{ "name": "@jlceda/pro-api-types", "type": "module", "version": "0.2.45", "description": "嘉立创EDA & EasyEDA 专业版扩展 API 接口类型定义", "typings": "index.d.ts", "author": "JLCEDA <support@lceda.cn>", "license": "Apache-2.0", "homepage": "https://pro.lceda.cn/", "keywords": ["jlceda", "pro-api"], "scripts": { "lint": "eslint", "fix": "eslint --fix", "build": "ts-node ./build/build.ts" }, "devDependencies": { "@antfu/eslint-config": "^5.4.1", "@types/fast-text-encoding": "^1.0.3", "@types/fs-extra": "^11.0.4", "dotenv": "^16.4.7", "eslint": "^9.37.0", "fast-text-encoding": "^1.0.6", "fs-extra": "^11.3.0", "lint-staged": "^16.2.3", "simple-git-hooks": "^2.13.1", "ts-node": "^10.9.2", "typescript": "^5.7.3" }, "simple-git-hooks": { "pre-commit": "npx lint-staged" }, "lint-staged": { "*": "eslint --fix" } }
|