@newview/ui 0.0.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/dist/newview-ui.js +188865 -0
- package/dist/newview-ui.umd.cjs +1 -0
- package/dist/style.css +1 -0
- package/package.json +66 -0
- package/tsconfig.json +19 -0
- package/tsconfig.node.json +9 -0
- package/types/ComForm.d.ts +1660 -0
- package/types/ControlGroup.d.ts +30 -0
- package/types/Editor.d.ts +33 -0
- package/types/ExcelImport.d.ts +82 -0
- package/types/Grid.d.ts +588 -0
- package/types/HtmlJson.d.ts +824 -0
- package/types/IconSelect.d.ts +30 -0
- package/types/List.d.ts +82 -0
- package/types/LuckySheet.d.ts +1288 -0
- package/types/Page.d.ts +57 -0
- package/types/SearchCom.d.ts +40 -0
- package/types/Toolbar.d.ts +65 -0
- package/types/index.d.ts +14 -0
- package/vite.config.ts +69 -0
|
@@ -0,0 +1,824 @@
|
|
|
1
|
+
export interface IHtmlResult {
|
|
2
|
+
pages: IHtmlPage[]
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export interface IHtmlPage {
|
|
6
|
+
name: string,
|
|
7
|
+
index: string,
|
|
8
|
+
status: string,
|
|
9
|
+
order: number,
|
|
10
|
+
zoomRatio: number, // sheet zoom ratio 10%-400%
|
|
11
|
+
showGridLines: string, // show grid lines
|
|
12
|
+
/**
|
|
13
|
+
* 宽度
|
|
14
|
+
*/
|
|
15
|
+
width: number,
|
|
16
|
+
/**
|
|
17
|
+
* 高度
|
|
18
|
+
*/
|
|
19
|
+
height: number,
|
|
20
|
+
/**
|
|
21
|
+
* 原始宽度 canvas绘制的宽度
|
|
22
|
+
*/
|
|
23
|
+
orgWidth: number,
|
|
24
|
+
/**
|
|
25
|
+
* 原始高度 canvas绘制的高度
|
|
26
|
+
*/
|
|
27
|
+
orgHeight: number,
|
|
28
|
+
/**
|
|
29
|
+
* 横纵表
|
|
30
|
+
* portrait:纵表
|
|
31
|
+
* landscape:横表
|
|
32
|
+
*/
|
|
33
|
+
oriantation: 'portrait' | 'landscape',
|
|
34
|
+
/**
|
|
35
|
+
* 总行数
|
|
36
|
+
*/
|
|
37
|
+
row: number,
|
|
38
|
+
/**
|
|
39
|
+
* 列行数
|
|
40
|
+
*/
|
|
41
|
+
col: number,
|
|
42
|
+
/**
|
|
43
|
+
* 行高配置
|
|
44
|
+
*/
|
|
45
|
+
rowHeights: any,
|
|
46
|
+
/**
|
|
47
|
+
* 列宽配置
|
|
48
|
+
*/
|
|
49
|
+
columnWidths: any,
|
|
50
|
+
/**
|
|
51
|
+
* 边框
|
|
52
|
+
*/
|
|
53
|
+
tdBorders: IHtmlTdBorders,
|
|
54
|
+
/**
|
|
55
|
+
* 内容
|
|
56
|
+
*/
|
|
57
|
+
html: string,
|
|
58
|
+
/**
|
|
59
|
+
* 打印设置 边距
|
|
60
|
+
*/
|
|
61
|
+
printSet: IHtmlPrintSet,
|
|
62
|
+
/**
|
|
63
|
+
* 单元格
|
|
64
|
+
*/
|
|
65
|
+
cells: IHtmlCells,
|
|
66
|
+
/**
|
|
67
|
+
* 合并的单元格
|
|
68
|
+
*/
|
|
69
|
+
merges: any,
|
|
70
|
+
/**
|
|
71
|
+
* 开始边框行
|
|
72
|
+
*/
|
|
73
|
+
startTopBorder: number,
|
|
74
|
+
/**
|
|
75
|
+
* 结束边框行
|
|
76
|
+
*/
|
|
77
|
+
endTopBorder: number
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface IHtmlTD {
|
|
81
|
+
value: string | IHtmlTDValue | IHtmlTDValue[],
|
|
82
|
+
style?: any,
|
|
83
|
+
tdStyle?: any,
|
|
84
|
+
colspan?: number,
|
|
85
|
+
rowspan?: number,
|
|
86
|
+
isRender?: boolean,
|
|
87
|
+
isMerge?: boolean,
|
|
88
|
+
tdContent?: string,
|
|
89
|
+
isEdit?: boolean,
|
|
90
|
+
edit?: IEdit,
|
|
91
|
+
tag?: any,
|
|
92
|
+
editIndex: number,
|
|
93
|
+
rowIndex: number,
|
|
94
|
+
colIndex: number
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* 编辑配置
|
|
99
|
+
*/
|
|
100
|
+
export interface IEdit {
|
|
101
|
+
/**
|
|
102
|
+
* 属性组Id
|
|
103
|
+
*/
|
|
104
|
+
PropertyGroupId: number,
|
|
105
|
+
/**
|
|
106
|
+
* 属性组类型 item table
|
|
107
|
+
*/
|
|
108
|
+
PropertyGroupType: string,
|
|
109
|
+
/**
|
|
110
|
+
* 属性Id
|
|
111
|
+
*/
|
|
112
|
+
PropertyId?: number,
|
|
113
|
+
/**
|
|
114
|
+
* 字段名称
|
|
115
|
+
*/
|
|
116
|
+
FieldName: string,
|
|
117
|
+
/**
|
|
118
|
+
* 字段Label
|
|
119
|
+
*/
|
|
120
|
+
FieldLabel: string,
|
|
121
|
+
/**
|
|
122
|
+
* 字段类型
|
|
123
|
+
* input 文本框
|
|
124
|
+
* textarea 文本域
|
|
125
|
+
* date 日期
|
|
126
|
+
* select 下拉框
|
|
127
|
+
* radio 单选框
|
|
128
|
+
* checkbox 多选框
|
|
129
|
+
* button 按钮
|
|
130
|
+
* img 图片
|
|
131
|
+
*/
|
|
132
|
+
FieldType: string,
|
|
133
|
+
/**
|
|
134
|
+
* 字段配置
|
|
135
|
+
*/
|
|
136
|
+
FieldOption: any,
|
|
137
|
+
/**
|
|
138
|
+
* 是否为数组
|
|
139
|
+
*/
|
|
140
|
+
IsArray?: boolean,
|
|
141
|
+
/**
|
|
142
|
+
* 表格渲染类型
|
|
143
|
+
* h 横向
|
|
144
|
+
* v 纵向
|
|
145
|
+
* hv 先横后纵
|
|
146
|
+
* vh 先纵后横
|
|
147
|
+
*/
|
|
148
|
+
TableType: string,
|
|
149
|
+
/**
|
|
150
|
+
* 是否分页
|
|
151
|
+
*/
|
|
152
|
+
TablePage: boolean,
|
|
153
|
+
/**
|
|
154
|
+
* 横向循环次数
|
|
155
|
+
*/
|
|
156
|
+
TableHNumber: number,
|
|
157
|
+
/**
|
|
158
|
+
* 横向间隔
|
|
159
|
+
*/
|
|
160
|
+
TableHStep: number,
|
|
161
|
+
/**
|
|
162
|
+
* 纵向循环次数
|
|
163
|
+
*/
|
|
164
|
+
TableVNumber: number,
|
|
165
|
+
/**
|
|
166
|
+
* 纵向间隔
|
|
167
|
+
*/
|
|
168
|
+
TableVStep: number,
|
|
169
|
+
/**
|
|
170
|
+
* 是否为公式结果
|
|
171
|
+
*/
|
|
172
|
+
IsFormulaResult: boolean,
|
|
173
|
+
/**
|
|
174
|
+
* 当前流程步骤
|
|
175
|
+
*/
|
|
176
|
+
IsCurrentVWFStep: boolean,
|
|
177
|
+
/**
|
|
178
|
+
* 虚拟流程步骤Id
|
|
179
|
+
*/
|
|
180
|
+
VWFStepId: number
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface IHtmlTDValue {
|
|
184
|
+
value: string,
|
|
185
|
+
style?: any
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export interface IHtmlTDs {
|
|
189
|
+
[key: string]: IHtmlTD
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export interface IHtmlCells {
|
|
193
|
+
maxRow: number,
|
|
194
|
+
maxCol: number,
|
|
195
|
+
defaultColWidth: number,
|
|
196
|
+
defaultRowHeight: number,
|
|
197
|
+
tds: IHtmlTDs,
|
|
198
|
+
borders: IHtmlTdBorders,
|
|
199
|
+
tdArray: IHtmlTD[][]
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export interface IHtmlTdBorders {
|
|
203
|
+
[key: string]: IHtmlBorder
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export interface IHtmlBorder {
|
|
207
|
+
style: any,
|
|
208
|
+
left: number,
|
|
209
|
+
right: number,
|
|
210
|
+
top: number,
|
|
211
|
+
bottom: number
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export interface IHtmlImage {
|
|
215
|
+
src: string,
|
|
216
|
+
style: any,
|
|
217
|
+
name: string,
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export interface IHtmlTextBox {
|
|
221
|
+
text: string,
|
|
222
|
+
style: any
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* 打印设置
|
|
226
|
+
*/
|
|
227
|
+
export interface IHtmlPrintSet {
|
|
228
|
+
marginTop: string,
|
|
229
|
+
marginRight: string,
|
|
230
|
+
marginBottom: string,
|
|
231
|
+
marginLeft: string,
|
|
232
|
+
headerRows: number,
|
|
233
|
+
showRowsfirst: number,
|
|
234
|
+
footerRows: number,
|
|
235
|
+
contentRows: number,
|
|
236
|
+
printscale: number,//打印缩放比率
|
|
237
|
+
oriantation: string,//打印纸张方向
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
export interface ICell {
|
|
242
|
+
trIndex: number,
|
|
243
|
+
tdIndex: number,
|
|
244
|
+
rowspan: number,
|
|
245
|
+
colspan: number,
|
|
246
|
+
ele: HTMLTableCellElement,
|
|
247
|
+
$td: any
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export interface IHlboxSelectedStyle {
|
|
251
|
+
top: string,
|
|
252
|
+
left: string,
|
|
253
|
+
width: string,
|
|
254
|
+
height: string
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export interface ISelectedArea {
|
|
258
|
+
isDown: boolean,
|
|
259
|
+
startCell?: ICell,
|
|
260
|
+
currentCell?: ICell,
|
|
261
|
+
parentLeft: number,
|
|
262
|
+
parentTop: number,
|
|
263
|
+
isShowHlboxSelectedStyle: boolean,
|
|
264
|
+
hlboxSelectedStyle: IHlboxSelectedStyle
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export interface ILuckyFile {
|
|
268
|
+
info: ILuckyFileInfo,//File information, name,password,date,createor etc.
|
|
269
|
+
sheets: IluckySheet[],//Sheets, include all sheet data
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export interface ILuckyFileInfo {
|
|
273
|
+
name: string,// File name
|
|
274
|
+
creator: string,//Create user
|
|
275
|
+
lastmodifiedby: string,//Edit user
|
|
276
|
+
createdTime: string,
|
|
277
|
+
modifiedTime: string,
|
|
278
|
+
company: string,
|
|
279
|
+
appversion: string,//Excel version, Is it necessary?
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
export interface IluckySheet {
|
|
285
|
+
name: string,// Sheet name, it will show on sheet bar, must be unique
|
|
286
|
+
color: string,// Sheet color, it will show on sheet bar
|
|
287
|
+
config?: IluckySheetConfig, // Row height, column width, hidden, and so on
|
|
288
|
+
|
|
289
|
+
index: string, //A sheet uniquely identifies,
|
|
290
|
+
status: string, //If 1 , it means current shown sheet, else means hidden
|
|
291
|
+
order: number, //Order of sheet
|
|
292
|
+
row: number,// Sheet the number of rows, contain blank cell
|
|
293
|
+
column: number, // Sheet the number of columns, contain blank cell
|
|
294
|
+
// visibledatarow:number[],
|
|
295
|
+
// visibledatacolumn:number[],
|
|
296
|
+
luckysheet_select_save?: IluckySheetSelection[],//selection defines
|
|
297
|
+
scrollLeft: number,//horizen scroll offset
|
|
298
|
+
scrollTop: number,//verticel scroll offset
|
|
299
|
+
|
|
300
|
+
celldata?: IluckySheetCelldata[],// cells
|
|
301
|
+
chart?: IluckySheetChart[],
|
|
302
|
+
|
|
303
|
+
data?: Array<IluckySheetCelldataValue[]>, // data
|
|
304
|
+
|
|
305
|
+
isPivotTable: boolean,
|
|
306
|
+
pivotTable?: IluckySheetPivotTable,
|
|
307
|
+
|
|
308
|
+
luckysheet_conditionformat_save?: IluckysheetConditionFormat[],
|
|
309
|
+
freezen?: IluckysheetFrozen,
|
|
310
|
+
|
|
311
|
+
calcChain?: IluckysheetCalcChain[],
|
|
312
|
+
|
|
313
|
+
zoomRatio: number, //sheet zoom ratio 10%-400%
|
|
314
|
+
|
|
315
|
+
showGridLines: string, // show grid lines
|
|
316
|
+
|
|
317
|
+
defaultColWidth: number, //cloumn width pixel
|
|
318
|
+
defaultRowHeight: number, //row height pixel
|
|
319
|
+
|
|
320
|
+
images: IluckyImages,//image list
|
|
321
|
+
textBoxs?: IluckyTextBoxs, // textBox list
|
|
322
|
+
lines?: IluckyLines// diagonal line 对角线
|
|
323
|
+
dataVerification: IluckysheetDataVerification;
|
|
324
|
+
hyperlink: IluckysheetHyperlink, // hyperlinks
|
|
325
|
+
hide: number; // sheet hide
|
|
326
|
+
visibledatarow: any; //by 20230211
|
|
327
|
+
visibledatacolumn: any;//by 20230211
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
//luckysheet general selection
|
|
331
|
+
export interface IluckySheetSelection {
|
|
332
|
+
row: number[], //selection start row and end row
|
|
333
|
+
column: number[], //selection start column and end column
|
|
334
|
+
sheetIndex: number
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export interface IluckySheetChart {
|
|
338
|
+
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
//pivot table interface
|
|
342
|
+
export interface IluckySheetPivotTable {
|
|
343
|
+
pivot_select_save: IluckySheetSelection,//Pivot table data source range
|
|
344
|
+
pivotDataSheetIndex: string | undefined, //data source sheet index, index is unique id
|
|
345
|
+
column: IluckySheetPivotTableField[],// column area, include filed
|
|
346
|
+
row: IluckySheetPivotTableField[], // row area, include filed
|
|
347
|
+
filter: IluckySheetPivotTableField[], // filter area, include filed
|
|
348
|
+
filterparm: IluckySheetPivotTablefilterParam,// save param after apply filter
|
|
349
|
+
values: IluckySheetPivotTableField[],
|
|
350
|
+
showType: string,
|
|
351
|
+
pivotDatas: any[][],
|
|
352
|
+
drawPivotTable: boolean,
|
|
353
|
+
pivotTableBoundary: number[],
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export interface IluckySheetPivotTableField {
|
|
357
|
+
index: number,
|
|
358
|
+
name: string,
|
|
359
|
+
fullname: string,
|
|
360
|
+
sumtype: string,
|
|
361
|
+
nameindex: number
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
export interface IluckySheetPivotTablefilterParam {
|
|
365
|
+
[index: string]: IluckySheetPivotTablefilterParamItem
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export interface IluckySheetPivotTablefilterParamItem {
|
|
369
|
+
caljs: IluckySheetPivotTablefilterParamItemCaljs,
|
|
370
|
+
rowhidden: IluckySheetPivotTablefilterParamItemRowhidden,
|
|
371
|
+
selected: IluckySheetPivotTablefilterParamItemSelected,
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export interface IluckySheetPivotTablefilterParamItemCaljs {
|
|
375
|
+
text: string,
|
|
376
|
+
type: string,
|
|
377
|
+
value: string,
|
|
378
|
+
value1: string,
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
export interface IluckySheetPivotTablefilterParamItemRowhidden {
|
|
382
|
+
[index: number]: number
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export interface IluckySheetPivotTablefilterParamItemSelected {
|
|
386
|
+
[index: number]: number
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
export interface IluckysheetFrozen {
|
|
391
|
+
horizen: number | undefined, //freeze horizen row number
|
|
392
|
+
vertical: number | undefined, //freeze horizen column number
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export interface IluckysheetConditionFormat {
|
|
396
|
+
type: string, //Option:defualt,databar,colorGradation,icons,
|
|
397
|
+
cellrange: IluckySheetSelection[],//Valid range
|
|
398
|
+
format: string[] | IluckysheetCFDefaultFormat | IluckysheetCFIconsFormat,//style
|
|
399
|
+
conditionName: string | undefined,//Detailed settings,comparison parameters
|
|
400
|
+
conditionRange: IluckySheetSelection[],//Detailed settings,comparison range
|
|
401
|
+
conditionValue: any[],//Detailed settings,comparison value
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
export interface IluckysheetCFDefaultFormat {
|
|
405
|
+
textColor: string | undefined | null,
|
|
406
|
+
cellColor: string | undefined | null
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export interface IluckysheetCFIconsFormat {
|
|
410
|
+
len: string | number,
|
|
411
|
+
leftMin: string | number,
|
|
412
|
+
top: string | number,
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
export interface IluckysheetCalcChain {
|
|
416
|
+
r: number,
|
|
417
|
+
c: number,
|
|
418
|
+
index: string | undefined,
|
|
419
|
+
// func?:any[],//[true, 152, "=SUBTOTAL(9,OFFSET(F15,ROW(F15:F18)-ROW(F15),1,3))"] 已经计算、终值、公式
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
export interface IluckySheetCelldata {
|
|
423
|
+
r: number,//cell row number
|
|
424
|
+
c: number,//cell column number
|
|
425
|
+
v: IluckySheetCelldataValue | string | null, //cell value
|
|
426
|
+
flag: any; // 单元格用户属性
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
export interface IluckySheetCelldataValue {
|
|
430
|
+
/**
|
|
431
|
+
* celltype,Cell value format: text, time, etc.
|
|
432
|
+
*/
|
|
433
|
+
ct?: ILuckySheetCellFormat, //celltype,Cell value format: text, time, etc.
|
|
434
|
+
/**
|
|
435
|
+
* background,#fff000
|
|
436
|
+
*/
|
|
437
|
+
bg?: string,//background,#fff000
|
|
438
|
+
/**
|
|
439
|
+
* fontfamily,
|
|
440
|
+
*/
|
|
441
|
+
ff?: string,//fontfamily,
|
|
442
|
+
/**
|
|
443
|
+
* fontcolor
|
|
444
|
+
*/
|
|
445
|
+
fc?: string,//fontcolor
|
|
446
|
+
/**
|
|
447
|
+
* Bold
|
|
448
|
+
*/
|
|
449
|
+
bl?: number,//Bold
|
|
450
|
+
/**
|
|
451
|
+
* italic
|
|
452
|
+
*/
|
|
453
|
+
it?: number,//italic
|
|
454
|
+
/**
|
|
455
|
+
* font size
|
|
456
|
+
*/
|
|
457
|
+
fs?: number,//font size
|
|
458
|
+
/**
|
|
459
|
+
* Cancelline, 0 Regular, 1 Cancelline
|
|
460
|
+
*/
|
|
461
|
+
cl?: number,//Cancelline, 0 Regular, 1 Cancelline
|
|
462
|
+
/**
|
|
463
|
+
* underline, 0 Regular, 1 underlines, fonts
|
|
464
|
+
*/
|
|
465
|
+
un?: number,//underline, 0 Regular, 1 underlines, fonts
|
|
466
|
+
/**
|
|
467
|
+
* Vertical alignment, 0 middle, 1 up, 2 down
|
|
468
|
+
*/
|
|
469
|
+
vt?: number,//Vertical alignment, 0 middle, 1 up, 2 down
|
|
470
|
+
/**
|
|
471
|
+
* Horizontal alignment,0 center, 1 left, 2 right
|
|
472
|
+
*/
|
|
473
|
+
ht?: number,//Horizontal alignment,0 center, 1 left, 2 right
|
|
474
|
+
/**
|
|
475
|
+
* Merge Cells
|
|
476
|
+
*/
|
|
477
|
+
mc?: IluckySheetCelldataValueMerge, //Merge Cells
|
|
478
|
+
/**
|
|
479
|
+
* Text rotation,0: 0、1: 45 、2: -45、3 Vertical text、4: 90 、5: -90
|
|
480
|
+
*/
|
|
481
|
+
tr?: number, //Text rotation,0: 0、1: 45 、2: -45、3 Vertical text、4: 90 、5: -90
|
|
482
|
+
/**
|
|
483
|
+
* Text wrap,0 truncation, 1 overflow, 2 word wrap
|
|
484
|
+
*/
|
|
485
|
+
tb?: number, //Text wrap,0 truncation, 1 overflow, 2 word wrap
|
|
486
|
+
/**
|
|
487
|
+
* Original value
|
|
488
|
+
*/
|
|
489
|
+
v?: string, //Original value
|
|
490
|
+
/**
|
|
491
|
+
* Display value
|
|
492
|
+
*/
|
|
493
|
+
m?: string, //Display value
|
|
494
|
+
/**
|
|
495
|
+
* text rotation angle 0-180 alignment
|
|
496
|
+
*/
|
|
497
|
+
rt?: number, //text rotation angle 0-180 alignment
|
|
498
|
+
/**
|
|
499
|
+
* formula
|
|
500
|
+
*/
|
|
501
|
+
f?: string, //formula
|
|
502
|
+
/**
|
|
503
|
+
* quotePrefix, show number as string
|
|
504
|
+
*/
|
|
505
|
+
qp?: number, //quotePrefix, show number as string
|
|
506
|
+
flag?: any, //配置属性
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
export interface ILuckySheetCellFormat {
|
|
511
|
+
fa: string //Format definition string
|
|
512
|
+
t: string // Cell Type
|
|
513
|
+
s?: any[]
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
export interface IluckySheetCelldataValueMerge {
|
|
517
|
+
rs?: number, //row of merge cell length, only main merge cell, every merge cell has only one main mergeCell
|
|
518
|
+
cs?: number, //column of merge cell length, only main merge cell, every merge cell has only one main mergeCell
|
|
519
|
+
r: number, // main merge cell row Number, other cell link to main cell
|
|
520
|
+
c: number, // main merge cell column Number, other cell link to main cell
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
//Lucky sheet config attribute
|
|
524
|
+
export interface IluckySheetConfig {
|
|
525
|
+
merge?: IluckySheetConfigMerges, //merge handdler
|
|
526
|
+
// _borderInfo?: IMapluckySheetborderInfoCellForImp, //range border
|
|
527
|
+
borderInfo: IluckySheetborderInfoCellForImp[],//range border
|
|
528
|
+
rowlen?: IluckySheetRowAndColumnLen, // every row's height
|
|
529
|
+
columnlen?: IluckySheetRowAndColumnLen,// every column's width
|
|
530
|
+
rowhidden?: IluckySheetRowAndColumnHidden,//setting be hidden rows
|
|
531
|
+
colhidden?: IluckySheetRowAndColumnHidden,//setting be hidden columns
|
|
532
|
+
customHeight: IluckySheetRowAndColumnHidden,//user operate row height
|
|
533
|
+
customWidth: IluckySheetRowAndColumnHidden//user operate column width
|
|
534
|
+
authority: any;//数据表保护设置
|
|
535
|
+
alias?: IluckySheetConfigCellAlias,
|
|
536
|
+
printPage?: IprintPage,//固定头尾分页说明
|
|
537
|
+
}
|
|
538
|
+
//sheet print config
|
|
539
|
+
export interface IprintPage {
|
|
540
|
+
headerRows: number,//页头行【index from 1 正数】
|
|
541
|
+
showRowsfirst: number,//只在第一页显示
|
|
542
|
+
footerRows: number,//页尾行 [index from 1 倒数]
|
|
543
|
+
contentRows: number,//内容行【行数】
|
|
544
|
+
marginTop: string,//打印上边距
|
|
545
|
+
marginRight: string,//打印右边距
|
|
546
|
+
marginBottom: string,//打印下边距
|
|
547
|
+
marginLeft: string,//打印左边距
|
|
548
|
+
printscale: number,//打印缩放比率
|
|
549
|
+
oriantation: string,//打印纸张方向
|
|
550
|
+
pageSize: string,//打印纸号 A4 A3
|
|
551
|
+
}
|
|
552
|
+
//Merge cells interface
|
|
553
|
+
export interface IluckySheetConfigMerges {
|
|
554
|
+
[firstRange: string]: IluckySheetConfigMerge // "r_s":{ r,c,rs,cs } format, define a main merge cell
|
|
555
|
+
}
|
|
556
|
+
//Merge cell interface
|
|
557
|
+
export interface IluckySheetConfigMerge {
|
|
558
|
+
r: number,
|
|
559
|
+
c: number,
|
|
560
|
+
rs: number,
|
|
561
|
+
cs: number
|
|
562
|
+
}
|
|
563
|
+
// cell set alias
|
|
564
|
+
export interface IluckySheetConfigCellAlias {
|
|
565
|
+
[index: string]: string
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
//Border cell interface
|
|
569
|
+
export interface IluckySheetborderInfoCell {
|
|
570
|
+
rangeType: string,
|
|
571
|
+
value: IluckySheetborderInfoCellValue,
|
|
572
|
+
}
|
|
573
|
+
export interface IluckySheetborderInfoCellValue {
|
|
574
|
+
row_index: number,
|
|
575
|
+
col_index: number,
|
|
576
|
+
l?: IluckySheetborderInfoCellValueStyle,
|
|
577
|
+
r?: IluckySheetborderInfoCellValueStyle,
|
|
578
|
+
t?: IluckySheetborderInfoCellValueStyle,
|
|
579
|
+
b?: IluckySheetborderInfoCellValueStyle
|
|
580
|
+
}
|
|
581
|
+
export interface IluckySheetborderInfoCellValueStyle {
|
|
582
|
+
"style": number,
|
|
583
|
+
"color": string
|
|
584
|
+
}
|
|
585
|
+
//border range interface
|
|
586
|
+
export interface IluckySheetborderInfoRange {
|
|
587
|
+
rangeType: string,
|
|
588
|
+
borderType: string,
|
|
589
|
+
style: string,
|
|
590
|
+
color: string,
|
|
591
|
+
range: IluckySheetSelection[],
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
//Border cell interface for import
|
|
595
|
+
export interface IluckySheetborderInfoCellForImp {
|
|
596
|
+
rangeType: string,
|
|
597
|
+
cells?: string[],
|
|
598
|
+
value: IluckySheetborderInfoCellValue,
|
|
599
|
+
range?: any[]
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
//Border cell interface for import
|
|
604
|
+
export interface IMapluckySheetborderInfoCellForImp {
|
|
605
|
+
[index: number]: IluckySheetborderInfoCellForImp
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
//row length and column length interface
|
|
609
|
+
export interface IluckySheetRowAndColumnLen {
|
|
610
|
+
[index: string]: number
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
//row and column hidden interface
|
|
614
|
+
export interface IluckySheetRowAndColumnHidden {
|
|
615
|
+
[index: string]: number
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
export interface IFormulaSI {
|
|
619
|
+
[index: string]: IFormulaCell
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
export interface IFormulaCell {
|
|
623
|
+
[index: string]: IFormulaCellValue
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
export interface IFormulaCellValue {
|
|
627
|
+
t: string
|
|
628
|
+
ref: string
|
|
629
|
+
si: string
|
|
630
|
+
fv: string
|
|
631
|
+
cellValue: IluckySheetCelldata
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
export interface ILuckyInlineString {
|
|
635
|
+
ff: string | undefined //font family
|
|
636
|
+
fc: string | undefined//font color
|
|
637
|
+
fs: number | undefined//font size
|
|
638
|
+
cl: number | undefined//strike
|
|
639
|
+
un: number | undefined//underline
|
|
640
|
+
bl: number | undefined//blod
|
|
641
|
+
it: number | undefined//italic
|
|
642
|
+
va: number | undefined//1sub and 2super and 0none
|
|
643
|
+
v: string | undefined
|
|
644
|
+
}
|
|
645
|
+
//Line
|
|
646
|
+
export interface IluckyLine {
|
|
647
|
+
color?: string,//颜色
|
|
648
|
+
thick?: number,//线的宽度
|
|
649
|
+
fromCol?: number
|
|
650
|
+
fromRow?: number
|
|
651
|
+
toCol?: number
|
|
652
|
+
toRow?: number
|
|
653
|
+
left?: number
|
|
654
|
+
top?: number
|
|
655
|
+
width?: number
|
|
656
|
+
height?: number
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
// TextBox
|
|
660
|
+
export interface IluckyTextBox {
|
|
661
|
+
v: IluckySheetCelldataValue
|
|
662
|
+
border: IluckyImageBorder
|
|
663
|
+
default: IluckyImageDefault
|
|
664
|
+
setchange?: number
|
|
665
|
+
fromCol?: number
|
|
666
|
+
fromColOff?: number
|
|
667
|
+
fromRow?: number
|
|
668
|
+
fromRowOff?: number
|
|
669
|
+
toCol?: number
|
|
670
|
+
toColOff?: number
|
|
671
|
+
toRow?: number
|
|
672
|
+
toRowOff?: number
|
|
673
|
+
alias: string
|
|
674
|
+
text: string
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
//Image
|
|
678
|
+
export interface IluckyImage {
|
|
679
|
+
border: IluckyImageBorder
|
|
680
|
+
crop: IluckyImageCrop
|
|
681
|
+
default: IluckyImageDefault
|
|
682
|
+
|
|
683
|
+
fixedLeft: number
|
|
684
|
+
fixedTop: number
|
|
685
|
+
isFixedPos: boolean
|
|
686
|
+
originHeight: number
|
|
687
|
+
originWidth: number
|
|
688
|
+
src: string
|
|
689
|
+
type: string
|
|
690
|
+
fullcell?: number
|
|
691
|
+
setchange?: number
|
|
692
|
+
fromCol?: number
|
|
693
|
+
fromColOff?: number
|
|
694
|
+
fromRow?: number
|
|
695
|
+
fromRowOff?: number
|
|
696
|
+
toCol?: number
|
|
697
|
+
toColOff?: number
|
|
698
|
+
toRow?: number
|
|
699
|
+
toRowOff?: number
|
|
700
|
+
alias: string
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
export interface IluckyImageBorder {
|
|
704
|
+
color: string
|
|
705
|
+
radius: number
|
|
706
|
+
style: string
|
|
707
|
+
width: number
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
export interface IluckyImageCrop {
|
|
711
|
+
height: number
|
|
712
|
+
offsetLeft: number
|
|
713
|
+
offsetTop: number
|
|
714
|
+
width: number
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
export interface IluckyImageDefault {
|
|
718
|
+
height: number
|
|
719
|
+
left: number
|
|
720
|
+
top: number
|
|
721
|
+
width: number
|
|
722
|
+
leftoffset: number,//add by newview 20230211 相对偏移量
|
|
723
|
+
topoffset: number,//add by newview 20230211 相对偏移量
|
|
724
|
+
}
|
|
725
|
+
export interface IluckyLines {
|
|
726
|
+
[index: string]: IluckyLine
|
|
727
|
+
}
|
|
728
|
+
export interface IluckyImages {
|
|
729
|
+
[index: string]: IluckyImage
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
export interface IluckyTextBoxs {
|
|
733
|
+
[index: string]: IluckyTextBox
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
export interface IcellOtherInfo {
|
|
737
|
+
[index: string]: IformulaList
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
export interface IformulaList {
|
|
741
|
+
[index: string]: IformulaListItem
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
export interface IformulaListItem {
|
|
745
|
+
r: number,
|
|
746
|
+
c: number
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
// DataVerification
|
|
751
|
+
export interface IluckysheetDataVerification {
|
|
752
|
+
[key: string]: IluckysheetDataVerificationValue;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
export interface IluckysheetDataVerificationValue {
|
|
756
|
+
type: IluckysheetDataVerificationType;
|
|
757
|
+
type2: string | null;
|
|
758
|
+
value1: string | number | null;
|
|
759
|
+
value2: string | number | null;
|
|
760
|
+
checked: boolean;
|
|
761
|
+
remote: boolean;
|
|
762
|
+
prohibitInput: boolean;
|
|
763
|
+
hintShow: boolean;
|
|
764
|
+
hintText: string;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
export type IluckysheetDataVerificationType =
|
|
768
|
+
| "dropdown"
|
|
769
|
+
| "checkbox"
|
|
770
|
+
| "number"
|
|
771
|
+
| "number_integer"
|
|
772
|
+
| "number_decimal"
|
|
773
|
+
| "text_content"
|
|
774
|
+
| "text_length"
|
|
775
|
+
| "date"
|
|
776
|
+
| "validity";
|
|
777
|
+
|
|
778
|
+
export interface IluckysheetHyperlink {
|
|
779
|
+
[key: string]: IluckysheetHyperlinkValue;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
export interface IluckysheetHyperlinkValue {
|
|
783
|
+
linkAddress: string;
|
|
784
|
+
linkTooltip: string;
|
|
785
|
+
linkType: IluckysheetHyperlinkType;
|
|
786
|
+
display: string;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
export type IluckysheetHyperlinkType = "internal" | "external";
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* 解析参数
|
|
794
|
+
*/
|
|
795
|
+
export interface ParserOption {
|
|
796
|
+
/**
|
|
797
|
+
* 偏移宽度
|
|
798
|
+
*/
|
|
799
|
+
driftWidth?: number,
|
|
800
|
+
/**
|
|
801
|
+
*
|
|
802
|
+
* 偏移高度
|
|
803
|
+
*/
|
|
804
|
+
driftHeight?: number,
|
|
805
|
+
/**
|
|
806
|
+
* 解析回调
|
|
807
|
+
* @param IHtmlTD
|
|
808
|
+
* @param IHtmlPage
|
|
809
|
+
* @returns
|
|
810
|
+
*/
|
|
811
|
+
parseCallback: (IHtmlTD: IHtmlTD, IHtmlPage: IHtmlPage) => IEdit
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
export declare class HtmlJson {
|
|
815
|
+
/**
|
|
816
|
+
* 初始化
|
|
817
|
+
*/
|
|
818
|
+
constructor(sheets: IluckySheet[]);
|
|
819
|
+
/**
|
|
820
|
+
* 解析
|
|
821
|
+
* @param parseCallback
|
|
822
|
+
*/
|
|
823
|
+
Parse(option: ParserOption): IHtmlResult;
|
|
824
|
+
}
|