@modusoperandi/licit-import-utils 0.1.0
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/LICENSE +21 -0
- package/capco.util.d.ts +38 -0
- package/capco.util.js +195 -0
- package/index.d.ts +8 -0
- package/index.js +8 -0
- package/licit-elements.d.ts +878 -0
- package/licit-elements.js +2588 -0
- package/licit-transform.d.ts +360 -0
- package/licit-transform.js +2197 -0
- package/package.json +52 -0
- package/transform.docx.d.ts +16 -0
- package/transform.docx.js +154 -0
- package/transform.utils.d.ts +17 -0
- package/transform.utils.js +155 -0
- package/transform.zip.d.ts +5 -0
- package/transform.zip.js +296 -0
- package/types.d.ts +9 -0
- package/types.js +5 -0
- package/zip.utils.d.ts +6 -0
- package/zip.utils.js +23 -0
|
@@ -0,0 +1,878 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* @copyright Copyright 2026 Modus Operandi Inc. All Rights Reserved.
|
|
4
|
+
*/
|
|
5
|
+
interface InfoIconData {
|
|
6
|
+
infoIconClass: string;
|
|
7
|
+
infoIconUnicode: string;
|
|
8
|
+
}
|
|
9
|
+
type LicitAttrs = Record<string, unknown>;
|
|
10
|
+
interface Mark {
|
|
11
|
+
type: string;
|
|
12
|
+
attrs?: LicitAttrs;
|
|
13
|
+
marks?: {
|
|
14
|
+
type: string;
|
|
15
|
+
attrs?: LicitAttrs;
|
|
16
|
+
}[];
|
|
17
|
+
text?: string;
|
|
18
|
+
}
|
|
19
|
+
export type LicitElementJSON = Record<string, unknown>;
|
|
20
|
+
interface LicitElementAttrsJSON extends LicitAttrs {
|
|
21
|
+
parser?: LicitAttrs;
|
|
22
|
+
}
|
|
23
|
+
interface LicitMarksJSON {
|
|
24
|
+
type: string;
|
|
25
|
+
attrs?: LicitAttrs;
|
|
26
|
+
}
|
|
27
|
+
interface LicitDocumentAttrsJSON extends LicitElementAttrsJSON {
|
|
28
|
+
layout: null;
|
|
29
|
+
padding: null;
|
|
30
|
+
width: null;
|
|
31
|
+
}
|
|
32
|
+
export interface LicitImageAttrsJSON extends LicitElementAttrsJSON {
|
|
33
|
+
align: string | null;
|
|
34
|
+
alt: string | null;
|
|
35
|
+
crop: string | null;
|
|
36
|
+
height: string | null;
|
|
37
|
+
rotate: string | null;
|
|
38
|
+
src: string | null;
|
|
39
|
+
title: string | null;
|
|
40
|
+
width: string | null;
|
|
41
|
+
fitToParent: number;
|
|
42
|
+
}
|
|
43
|
+
interface LicitImageJSON extends LicitElementJSON {
|
|
44
|
+
type: string;
|
|
45
|
+
attrs: LicitImageAttrsJSON;
|
|
46
|
+
}
|
|
47
|
+
interface LicitParagraphImageAttrsJSON extends LicitElementAttrsJSON {
|
|
48
|
+
styleName?: string;
|
|
49
|
+
}
|
|
50
|
+
interface LicitImageContentJSON extends LicitElementJSON {
|
|
51
|
+
type: string;
|
|
52
|
+
attrs: LicitImageAttrsJSON;
|
|
53
|
+
}
|
|
54
|
+
interface LicitParagraphImageJSON extends LicitElementJSON {
|
|
55
|
+
type: string;
|
|
56
|
+
attrs: LicitParagraphImageAttrsJSON;
|
|
57
|
+
content: LicitImageContentJSON[];
|
|
58
|
+
}
|
|
59
|
+
interface LicitHeaderAttrsJSON extends LicitElementAttrsJSON {
|
|
60
|
+
styleName?: string;
|
|
61
|
+
capco?: string;
|
|
62
|
+
selectionId?: string;
|
|
63
|
+
}
|
|
64
|
+
interface LicitHeaderContentJSON extends LicitElementJSON {
|
|
65
|
+
type: string;
|
|
66
|
+
text: string;
|
|
67
|
+
marks: LicitMarksJSON[];
|
|
68
|
+
}
|
|
69
|
+
interface LicitHeaderJSON extends LicitElementJSON {
|
|
70
|
+
type: string;
|
|
71
|
+
attrs: LicitHeaderAttrsJSON;
|
|
72
|
+
content: LicitHeaderContentJSON[];
|
|
73
|
+
}
|
|
74
|
+
interface LicitParagraphAttrsJSON extends LicitElementAttrsJSON {
|
|
75
|
+
styleName?: string;
|
|
76
|
+
align?: string;
|
|
77
|
+
indent?: number;
|
|
78
|
+
}
|
|
79
|
+
interface LicitParagraphContentJSON extends LicitElementJSON {
|
|
80
|
+
type: string;
|
|
81
|
+
text: string;
|
|
82
|
+
marks: LicitMarksJSON[];
|
|
83
|
+
}
|
|
84
|
+
interface LicitParagraphJSON extends LicitElementJSON {
|
|
85
|
+
type: string;
|
|
86
|
+
attrs: LicitParagraphAttrsJSON;
|
|
87
|
+
content: LicitParagraphContentJSON[];
|
|
88
|
+
}
|
|
89
|
+
interface LicitBulletListItemAttrsJSON extends LicitElementAttrsJSON {
|
|
90
|
+
styleName?: string;
|
|
91
|
+
}
|
|
92
|
+
interface LicitBulletListItemJSON extends LicitElementJSON {
|
|
93
|
+
type: string;
|
|
94
|
+
attrs: LicitBulletListItemAttrsJSON;
|
|
95
|
+
content: LicitParagraphJSON[];
|
|
96
|
+
}
|
|
97
|
+
interface LicitBulletListAttrsJSON extends LicitElementAttrsJSON {
|
|
98
|
+
id: string;
|
|
99
|
+
indent: number;
|
|
100
|
+
listStyleType: string;
|
|
101
|
+
}
|
|
102
|
+
interface LicitBulletListJSON extends LicitElementJSON {
|
|
103
|
+
type: 'bullet_list';
|
|
104
|
+
attrs: LicitBulletListAttrsJSON;
|
|
105
|
+
content: LicitBulletListItemJSON[];
|
|
106
|
+
}
|
|
107
|
+
interface LicitTableAttrsJSON extends LicitElementAttrsJSON {
|
|
108
|
+
marginLeft: null;
|
|
109
|
+
vignette: boolean;
|
|
110
|
+
}
|
|
111
|
+
interface LicitTableCellAttrsJSON extends LicitElementAttrsJSON {
|
|
112
|
+
colspan: number;
|
|
113
|
+
rowspan: number;
|
|
114
|
+
colwidth: number[] | number;
|
|
115
|
+
borderColor?: string;
|
|
116
|
+
borderTop?: string;
|
|
117
|
+
borderBottom?: string;
|
|
118
|
+
borderLeft?: string;
|
|
119
|
+
borderRight?: string;
|
|
120
|
+
background: string;
|
|
121
|
+
vignette?: boolean;
|
|
122
|
+
fullSize?: number;
|
|
123
|
+
vAlign?: string;
|
|
124
|
+
}
|
|
125
|
+
interface LicitTableCellJSON extends LicitElementJSON {
|
|
126
|
+
type: 'table_cell' | 'table_header';
|
|
127
|
+
attrs: LicitTableCellAttrsJSON;
|
|
128
|
+
content: LicitParagraphJSON[];
|
|
129
|
+
}
|
|
130
|
+
interface LicitTableCellImageJSON extends LicitElementJSON {
|
|
131
|
+
type: 'table_cell';
|
|
132
|
+
attrs: LicitTableCellAttrsJSON;
|
|
133
|
+
content: LicitParagraphImageJSON[];
|
|
134
|
+
}
|
|
135
|
+
interface LicitTableRowJSON extends LicitElementJSON {
|
|
136
|
+
type: 'table_row';
|
|
137
|
+
content: LicitTableCellJSON[];
|
|
138
|
+
}
|
|
139
|
+
export interface LicitTableJSON extends LicitElementJSON {
|
|
140
|
+
type: 'table';
|
|
141
|
+
attrs: LicitTableAttrsJSON;
|
|
142
|
+
content: LicitTableRowJSON[];
|
|
143
|
+
}
|
|
144
|
+
export declare abstract class LicitElement {
|
|
145
|
+
styleLevel: number;
|
|
146
|
+
id?: string;
|
|
147
|
+
abstract getBaseElement(): unknown;
|
|
148
|
+
abstract render(): LicitElementJSON;
|
|
149
|
+
}
|
|
150
|
+
interface LicitHRJSON extends LicitElementJSON {
|
|
151
|
+
type: string;
|
|
152
|
+
attrs: LicitHRAttrsJSON;
|
|
153
|
+
}
|
|
154
|
+
interface LicitHRAttrsJSON extends LicitElementAttrsJSON {
|
|
155
|
+
pageBreak: null;
|
|
156
|
+
}
|
|
157
|
+
interface LicitOrderedListJSON extends LicitElementJSON {
|
|
158
|
+
type: 'ordered_list';
|
|
159
|
+
attrs: LicitBulletListAttrsJSON;
|
|
160
|
+
content: LicitBulletListItemJSON[];
|
|
161
|
+
}
|
|
162
|
+
export interface LicitDocumentJSON extends LicitElementJSON {
|
|
163
|
+
type: 'doc';
|
|
164
|
+
attrs: LicitDocumentAttrsJSON;
|
|
165
|
+
content: LicitElementJSON[];
|
|
166
|
+
}
|
|
167
|
+
export declare class LicitDocumentElement extends LicitElement {
|
|
168
|
+
getBaseElement(): LicitDocumentJSON;
|
|
169
|
+
children: LicitElement[];
|
|
170
|
+
appendElement(element: LicitElement): void;
|
|
171
|
+
render(): LicitDocumentJSON;
|
|
172
|
+
}
|
|
173
|
+
export declare class LicitImageElement extends LicitElement {
|
|
174
|
+
source: string;
|
|
175
|
+
alt: string;
|
|
176
|
+
width?: string;
|
|
177
|
+
height?: string;
|
|
178
|
+
align?: string;
|
|
179
|
+
constructor(src: string, altText?: string, width?: string, height?: string, align?: string);
|
|
180
|
+
getBaseElement(): LicitImageJSON;
|
|
181
|
+
render(): LicitImageJSON;
|
|
182
|
+
}
|
|
183
|
+
export declare class LicitNewImageElement extends LicitElement {
|
|
184
|
+
getBaseElement(): {
|
|
185
|
+
type: string;
|
|
186
|
+
attrs: {
|
|
187
|
+
alt: string;
|
|
188
|
+
height: any;
|
|
189
|
+
src: string;
|
|
190
|
+
title: any;
|
|
191
|
+
width: any;
|
|
192
|
+
fitToParent: any;
|
|
193
|
+
simpleImg: string;
|
|
194
|
+
capco: string;
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
source: string;
|
|
198
|
+
alt: string;
|
|
199
|
+
width: string;
|
|
200
|
+
height: string;
|
|
201
|
+
capco: string;
|
|
202
|
+
constructor(src: string, width: string, height: string, altText?: string, capco?: string);
|
|
203
|
+
render(): {
|
|
204
|
+
type: string;
|
|
205
|
+
attrs: {
|
|
206
|
+
alt: string;
|
|
207
|
+
height: any;
|
|
208
|
+
src: string;
|
|
209
|
+
title: any;
|
|
210
|
+
width: any;
|
|
211
|
+
fitToParent: any;
|
|
212
|
+
simpleImg: string;
|
|
213
|
+
capco: string;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
export declare class LicitParagraphImageElement extends LicitElement {
|
|
218
|
+
getBaseElement(): LicitParagraphImageJSON;
|
|
219
|
+
source: string;
|
|
220
|
+
alt: string;
|
|
221
|
+
width?: string;
|
|
222
|
+
height?: string;
|
|
223
|
+
capco?: string;
|
|
224
|
+
align?: string;
|
|
225
|
+
constructor(src: string, alt?: string, width?: string, height?: string, align?: string);
|
|
226
|
+
render(): LicitParagraphImageJSON;
|
|
227
|
+
}
|
|
228
|
+
export declare class LicitEnhancedImageElement extends LicitElement {
|
|
229
|
+
getBaseElement(): {
|
|
230
|
+
type: string;
|
|
231
|
+
attrs: {
|
|
232
|
+
id: string;
|
|
233
|
+
figureType: string;
|
|
234
|
+
orientation: string;
|
|
235
|
+
maximized: boolean;
|
|
236
|
+
isValidate: boolean;
|
|
237
|
+
};
|
|
238
|
+
content: any[];
|
|
239
|
+
};
|
|
240
|
+
body: LicitEnhancedImageBodyElement;
|
|
241
|
+
capco: LicitEnhancedTableFigureCapcoElement;
|
|
242
|
+
orientation: string;
|
|
243
|
+
constructor(orientation: string);
|
|
244
|
+
render(): {
|
|
245
|
+
type: string;
|
|
246
|
+
attrs: {
|
|
247
|
+
id: string;
|
|
248
|
+
figureType: string;
|
|
249
|
+
orientation: string;
|
|
250
|
+
maximized: boolean;
|
|
251
|
+
isValidate: boolean;
|
|
252
|
+
};
|
|
253
|
+
content: any[];
|
|
254
|
+
};
|
|
255
|
+
addBody(bodyObj: LicitEnhancedImageBodyElement): void;
|
|
256
|
+
addCapco(capcoObj: LicitEnhancedTableFigureCapcoElement): void;
|
|
257
|
+
}
|
|
258
|
+
export declare class LicitEnhancedImageBodyElement extends LicitElement {
|
|
259
|
+
image: LicitNewImageElement;
|
|
260
|
+
getBaseElement(): {
|
|
261
|
+
type: string;
|
|
262
|
+
content: any[];
|
|
263
|
+
};
|
|
264
|
+
constructor(img: LicitNewImageElement);
|
|
265
|
+
render(): {
|
|
266
|
+
type: string;
|
|
267
|
+
content: any[];
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
export declare class LicitHeaderElement extends LicitElement {
|
|
271
|
+
getBaseElement(): LicitHeaderJSON;
|
|
272
|
+
text: string;
|
|
273
|
+
subText: string;
|
|
274
|
+
align: string | null;
|
|
275
|
+
styleName: string;
|
|
276
|
+
capco: string;
|
|
277
|
+
selectionId?: string;
|
|
278
|
+
name?: string;
|
|
279
|
+
marks?: Mark[];
|
|
280
|
+
constructor(text?: string, subText?: string, styleLevel?: number, styleName?: string, capco?: string, node?: HTMLElement);
|
|
281
|
+
render(): LicitHeaderJSON;
|
|
282
|
+
setInnerlinks(node?: HTMLElement): void;
|
|
283
|
+
handleInlineStyles(node: HTMLElement): Mark[];
|
|
284
|
+
mapInlineStylesToMarks(inlineStyles: string[], inlineMarks: {
|
|
285
|
+
type: string;
|
|
286
|
+
attrs?: LicitAttrs;
|
|
287
|
+
}[]): void;
|
|
288
|
+
}
|
|
289
|
+
export declare class LicitParagraphNote extends LicitElement {
|
|
290
|
+
node: HTMLElement;
|
|
291
|
+
styleName: string;
|
|
292
|
+
capco: string;
|
|
293
|
+
constructor(node: HTMLElement);
|
|
294
|
+
getBaseElement(): LicitParagraphJSON;
|
|
295
|
+
render(): LicitParagraphJSON;
|
|
296
|
+
}
|
|
297
|
+
export declare class LicitParagraphElement extends LicitElement {
|
|
298
|
+
getBaseElement(): LicitParagraphJSON;
|
|
299
|
+
text: string;
|
|
300
|
+
align: string | null;
|
|
301
|
+
constructor(text?: string);
|
|
302
|
+
render(): LicitParagraphJSON;
|
|
303
|
+
}
|
|
304
|
+
export declare class NewLicitParagraphElement extends LicitElement {
|
|
305
|
+
text: string;
|
|
306
|
+
align: string | null;
|
|
307
|
+
node: NodeList;
|
|
308
|
+
marks: Mark[];
|
|
309
|
+
styleName: string;
|
|
310
|
+
selectionId?: string;
|
|
311
|
+
id?: string;
|
|
312
|
+
capco?: string;
|
|
313
|
+
indent: number;
|
|
314
|
+
name?: string;
|
|
315
|
+
overriddenLineSpacing?: boolean;
|
|
316
|
+
imgContent: string[];
|
|
317
|
+
lineSpacing?: string | null;
|
|
318
|
+
overriddenLineSpaceingValue?: string | null;
|
|
319
|
+
overriddenAlignValue?: string | null;
|
|
320
|
+
overriddenAlign?: boolean;
|
|
321
|
+
hangingindent?: boolean;
|
|
322
|
+
reset?: boolean;
|
|
323
|
+
constructor(node: HTMLElement, infoIconData?: HTMLOListElement[], renderedContentList?: Node[]);
|
|
324
|
+
setInnerlinks(node: HTMLElement): void;
|
|
325
|
+
ConvertMarks(node: HTMLElement, infoIconData?: HTMLOListElement[], renderedContentList?: Node[]): void;
|
|
326
|
+
private handleTextMark;
|
|
327
|
+
/**
|
|
328
|
+
* Modifies and processes the child nodes of a given HTML element, applying various transformations
|
|
329
|
+
* and extracting semantic marks based on the node type. Handles inline styles, anchors, strong/emphasis/underline tags,
|
|
330
|
+
* superscript/subscript, text color/highlight, images, spans, and paragraphs. Updates mark collections and invokes
|
|
331
|
+
* specialized parsing methods for each supported node type.
|
|
332
|
+
*
|
|
333
|
+
* @param n - The current HTML element node to process.
|
|
334
|
+
* @param infoIconData - An array of HTMLOListElement objects containing info icon data.
|
|
335
|
+
* @param tMark - An array of Mark objects representing text marks.
|
|
336
|
+
* @param mark_Colour - The color to apply to marks.
|
|
337
|
+
* @param node - The parent HTML element node.
|
|
338
|
+
* @param renderedContentList - (Optional) An array of Node objects representing rendered content.
|
|
339
|
+
* @param parentInlineMarks - (Optional) An array of Mark objects representing inline stlyes written for parent node.
|
|
340
|
+
*/
|
|
341
|
+
modifyChildNodes(n: HTMLElement, infoIconData: HTMLOListElement[], tMark: Mark[], mark_Colour: string, node: HTMLElement, renderedContentList?: Node[], parentInlineMarks?: Mark[]): void;
|
|
342
|
+
private handleParagraph;
|
|
343
|
+
private handleSpan;
|
|
344
|
+
isEmptySpaceSpan(node: HTMLElement): boolean;
|
|
345
|
+
isLastCharNotEmpty(str: any): boolean;
|
|
346
|
+
addTrailingSpace(): void;
|
|
347
|
+
handleText(textNode: HTMLElement, myMark: Mark, isFirstSentenceBold: boolean, styleMarks?: {
|
|
348
|
+
type: string;
|
|
349
|
+
attrs?: LicitAttrs;
|
|
350
|
+
}[]): void;
|
|
351
|
+
checkForLinks(text: string, urlRegex: RegExp): RegExpMatchArray;
|
|
352
|
+
addLinks(text: string, urlRegex: RegExp, myMark: Mark): void;
|
|
353
|
+
addMark(textMark: Mark, newMark: Mark): Mark;
|
|
354
|
+
/**
|
|
355
|
+
* Extracts inline style marks from a DOM node and returns an array of mark objects.
|
|
356
|
+
*
|
|
357
|
+
* This function parses the `style` attribute of the given node, identifies supported inline styles
|
|
358
|
+
* (such as italic, bold, underline, text color, line height, and text alignment), and returns
|
|
359
|
+
* corresponding mark objects with their attributes. It also updates certain instance properties
|
|
360
|
+
* for overridden line spacing and alignment when those styles are detected.
|
|
361
|
+
*
|
|
362
|
+
* @param node - The DOM node from which to extract inline styles.
|
|
363
|
+
* @returns An array of objects representing inline style marks, each with a `type` and optional `attrs`.
|
|
364
|
+
*/
|
|
365
|
+
fetchInlineStyles(node: HTMLElement): {
|
|
366
|
+
type: string;
|
|
367
|
+
attrs?: LicitAttrs;
|
|
368
|
+
}[];
|
|
369
|
+
mapInlineStylesToMarks(inlineStyles: string[], inlineMarks: {
|
|
370
|
+
type: string;
|
|
371
|
+
attrs?: LicitAttrs;
|
|
372
|
+
}[]): void;
|
|
373
|
+
handleCustomInlineStyle(inlineStyle: string, inlineMarks: {
|
|
374
|
+
type: string;
|
|
375
|
+
attrs?: LicitAttrs;
|
|
376
|
+
}[]): void;
|
|
377
|
+
private parseImage;
|
|
378
|
+
private parseUnderline;
|
|
379
|
+
private parseEmphisis;
|
|
380
|
+
private parseStrong;
|
|
381
|
+
private parseAnchor;
|
|
382
|
+
private applyLinkAndColorMarks;
|
|
383
|
+
private parseLinkText;
|
|
384
|
+
private setLink;
|
|
385
|
+
private parseFont;
|
|
386
|
+
handleClassName(className: string, mark: Mark): void;
|
|
387
|
+
getEmptyTextMark(): {
|
|
388
|
+
type: string;
|
|
389
|
+
marks: any[];
|
|
390
|
+
text: string;
|
|
391
|
+
};
|
|
392
|
+
hasFontDetails(n: HTMLElement): boolean;
|
|
393
|
+
parseSubMarks(n: any, mark: Mark, _hasOneChild: boolean, infoIconData?: HTMLOListElement[]): Mark;
|
|
394
|
+
private parseFontWithInfoicon;
|
|
395
|
+
private parseUnderlineWithInfoicon;
|
|
396
|
+
private parseEMWithInfoicon;
|
|
397
|
+
private parseStrongWithInfoicon;
|
|
398
|
+
private parseAnchorWithInfoIcon;
|
|
399
|
+
getBaseElement(): {
|
|
400
|
+
type: string;
|
|
401
|
+
attrs: {
|
|
402
|
+
styleName: string;
|
|
403
|
+
align: string;
|
|
404
|
+
indent: number;
|
|
405
|
+
id: string;
|
|
406
|
+
capco: string;
|
|
407
|
+
selectionId: string;
|
|
408
|
+
overriddenLineSpacing: boolean;
|
|
409
|
+
lineSpacing: string;
|
|
410
|
+
overriddenLineSpaceingValue: string;
|
|
411
|
+
overriddenAlignValue: string;
|
|
412
|
+
overriddenAlign: boolean;
|
|
413
|
+
hangingindent: boolean;
|
|
414
|
+
reset: boolean;
|
|
415
|
+
};
|
|
416
|
+
content: any;
|
|
417
|
+
};
|
|
418
|
+
getBoldMarks(node: HTMLElement): {
|
|
419
|
+
type: string;
|
|
420
|
+
marks: {
|
|
421
|
+
type: string;
|
|
422
|
+
attrs: {
|
|
423
|
+
overridden: boolean;
|
|
424
|
+
};
|
|
425
|
+
}[];
|
|
426
|
+
text: string;
|
|
427
|
+
};
|
|
428
|
+
getEmMarks(node: HTMLElement, data?: any): Mark;
|
|
429
|
+
getEmInfoIconMark(childNode: ChildNode, data?: any): Mark | undefined;
|
|
430
|
+
getUnderLineMarks(node: HTMLElement): {
|
|
431
|
+
type: string;
|
|
432
|
+
marks: {
|
|
433
|
+
type: string;
|
|
434
|
+
attrs: {
|
|
435
|
+
overridden: boolean;
|
|
436
|
+
};
|
|
437
|
+
}[];
|
|
438
|
+
text: string;
|
|
439
|
+
};
|
|
440
|
+
getSuperScriptMarks(node: HTMLElement, data?: any): {
|
|
441
|
+
type: string;
|
|
442
|
+
attrs: {
|
|
443
|
+
from: any;
|
|
444
|
+
to: any;
|
|
445
|
+
description: string;
|
|
446
|
+
infoIcon: {
|
|
447
|
+
name: string;
|
|
448
|
+
unicode: string;
|
|
449
|
+
selected: boolean;
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
} | {
|
|
453
|
+
type: string;
|
|
454
|
+
marks: {
|
|
455
|
+
type: string;
|
|
456
|
+
attrs: {
|
|
457
|
+
overridden: boolean;
|
|
458
|
+
};
|
|
459
|
+
}[];
|
|
460
|
+
text: string;
|
|
461
|
+
};
|
|
462
|
+
getHighLightAndTextColor(node: HTMLElement): Mark | undefined;
|
|
463
|
+
getSubscriptMarks(node: HTMLElement): {
|
|
464
|
+
type: string;
|
|
465
|
+
marks: {
|
|
466
|
+
type: string;
|
|
467
|
+
attrs: {
|
|
468
|
+
overridden: boolean;
|
|
469
|
+
};
|
|
470
|
+
}[];
|
|
471
|
+
text: string;
|
|
472
|
+
};
|
|
473
|
+
getLinkMarks(node: HTMLLinkElement): {
|
|
474
|
+
type: string;
|
|
475
|
+
marks: {
|
|
476
|
+
type: string;
|
|
477
|
+
attrs: {
|
|
478
|
+
href: string;
|
|
479
|
+
rel: string;
|
|
480
|
+
target: string;
|
|
481
|
+
title: any;
|
|
482
|
+
};
|
|
483
|
+
}[];
|
|
484
|
+
text: string;
|
|
485
|
+
};
|
|
486
|
+
getText(node: HTMLElement): {
|
|
487
|
+
type: string;
|
|
488
|
+
text: string;
|
|
489
|
+
};
|
|
490
|
+
getInfoIconJson(infoDescription: string, Data: InfoIconData): {
|
|
491
|
+
type: string;
|
|
492
|
+
attrs: {
|
|
493
|
+
from: any;
|
|
494
|
+
to: any;
|
|
495
|
+
description: string;
|
|
496
|
+
infoIcon: {
|
|
497
|
+
name: string;
|
|
498
|
+
unicode: string;
|
|
499
|
+
selected: boolean;
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
render(): {
|
|
504
|
+
type: string;
|
|
505
|
+
attrs: {
|
|
506
|
+
styleName: string;
|
|
507
|
+
align: string;
|
|
508
|
+
indent: number;
|
|
509
|
+
id: string;
|
|
510
|
+
capco: string;
|
|
511
|
+
selectionId: string;
|
|
512
|
+
overriddenLineSpacing: boolean;
|
|
513
|
+
lineSpacing: string;
|
|
514
|
+
overriddenLineSpaceingValue: string;
|
|
515
|
+
overriddenAlignValue: string;
|
|
516
|
+
overriddenAlign: boolean;
|
|
517
|
+
hangingindent: boolean;
|
|
518
|
+
reset: boolean;
|
|
519
|
+
};
|
|
520
|
+
content: any;
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
export declare class LicitErrorTextElement extends LicitElement {
|
|
524
|
+
getBaseElement(): {
|
|
525
|
+
type: string;
|
|
526
|
+
attrs: {
|
|
527
|
+
align: string;
|
|
528
|
+
color: any;
|
|
529
|
+
id: any;
|
|
530
|
+
indent: any;
|
|
531
|
+
lineSpacing: any;
|
|
532
|
+
paddingBottom: any;
|
|
533
|
+
paddingTop: any;
|
|
534
|
+
};
|
|
535
|
+
content: {
|
|
536
|
+
type: string;
|
|
537
|
+
marks: ({
|
|
538
|
+
type: string;
|
|
539
|
+
attrs: {
|
|
540
|
+
overridden: boolean;
|
|
541
|
+
color?: undefined;
|
|
542
|
+
};
|
|
543
|
+
} | {
|
|
544
|
+
type: string;
|
|
545
|
+
attrs: {
|
|
546
|
+
color: string;
|
|
547
|
+
overridden: boolean;
|
|
548
|
+
};
|
|
549
|
+
})[];
|
|
550
|
+
text: string;
|
|
551
|
+
}[];
|
|
552
|
+
};
|
|
553
|
+
text: string;
|
|
554
|
+
constructor(altText: string);
|
|
555
|
+
render(): {
|
|
556
|
+
type: string;
|
|
557
|
+
attrs: {
|
|
558
|
+
align: string;
|
|
559
|
+
color: any;
|
|
560
|
+
id: any;
|
|
561
|
+
indent: any;
|
|
562
|
+
lineSpacing: any;
|
|
563
|
+
paddingBottom: any;
|
|
564
|
+
paddingTop: any;
|
|
565
|
+
};
|
|
566
|
+
content: {
|
|
567
|
+
type: string;
|
|
568
|
+
marks: ({
|
|
569
|
+
type: string;
|
|
570
|
+
attrs: {
|
|
571
|
+
overridden: boolean;
|
|
572
|
+
color?: undefined;
|
|
573
|
+
};
|
|
574
|
+
} | {
|
|
575
|
+
type: string;
|
|
576
|
+
attrs: {
|
|
577
|
+
color: string;
|
|
578
|
+
overridden: boolean;
|
|
579
|
+
};
|
|
580
|
+
})[];
|
|
581
|
+
text: string;
|
|
582
|
+
}[];
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
export declare class LicitBulletListItemElement extends LicitElement {
|
|
586
|
+
getBaseElement(): LicitBulletListItemJSON;
|
|
587
|
+
node: HTMLElement;
|
|
588
|
+
constructor(_node: HTMLElement);
|
|
589
|
+
render(): LicitBulletListItemJSON;
|
|
590
|
+
}
|
|
591
|
+
export declare class LicitBulletListElement extends LicitElement {
|
|
592
|
+
getBaseElement(): LicitBulletListJSON;
|
|
593
|
+
listItems: LicitBulletListItemElement[];
|
|
594
|
+
indent: number;
|
|
595
|
+
constructor(indent: number);
|
|
596
|
+
addItem(item: LicitBulletListItemElement): void;
|
|
597
|
+
render(): LicitBulletListJSON;
|
|
598
|
+
}
|
|
599
|
+
export declare class LicitTableCellElement extends LicitElement {
|
|
600
|
+
getBaseElement(): LicitTableCellJSON;
|
|
601
|
+
text: string;
|
|
602
|
+
rowspan: number;
|
|
603
|
+
colspan: number;
|
|
604
|
+
bgColor: string;
|
|
605
|
+
align: string;
|
|
606
|
+
colwidth: [number];
|
|
607
|
+
vAlign: string;
|
|
608
|
+
constructor(text: string, bgColor?: string, alignment?: string, colWidth?: [number], verticalAlignment?: string);
|
|
609
|
+
render(): LicitTableCellJSON;
|
|
610
|
+
}
|
|
611
|
+
export declare class LicitTableCellParagraph extends LicitElement {
|
|
612
|
+
getBaseElement(): {
|
|
613
|
+
type: string;
|
|
614
|
+
attrs: {
|
|
615
|
+
colspan: number;
|
|
616
|
+
rowspan: number;
|
|
617
|
+
colwidth: [number];
|
|
618
|
+
background: string;
|
|
619
|
+
vAlign: string;
|
|
620
|
+
};
|
|
621
|
+
content: any[];
|
|
622
|
+
};
|
|
623
|
+
node: HTMLElement;
|
|
624
|
+
rowspan: number;
|
|
625
|
+
colspan: number;
|
|
626
|
+
bgColor: string;
|
|
627
|
+
colWidth: [number];
|
|
628
|
+
content: any[];
|
|
629
|
+
vAlign: string;
|
|
630
|
+
constructor(node: HTMLElement, bgColor?: string, colwidth?: [number], vericalAlignment?: string);
|
|
631
|
+
render(): {
|
|
632
|
+
type: string;
|
|
633
|
+
attrs: {
|
|
634
|
+
colspan: number;
|
|
635
|
+
rowspan: number;
|
|
636
|
+
colwidth: [number];
|
|
637
|
+
background: string;
|
|
638
|
+
vAlign: string;
|
|
639
|
+
};
|
|
640
|
+
content: any[];
|
|
641
|
+
};
|
|
642
|
+
}
|
|
643
|
+
export declare class NewLicitTableCellParagraph extends LicitElement {
|
|
644
|
+
getBaseElement(): {
|
|
645
|
+
type: string;
|
|
646
|
+
attrs: {
|
|
647
|
+
colspan: number;
|
|
648
|
+
rowspan: number;
|
|
649
|
+
colwidth: number | [number];
|
|
650
|
+
background: string;
|
|
651
|
+
vAlign: string;
|
|
652
|
+
};
|
|
653
|
+
content: any[];
|
|
654
|
+
};
|
|
655
|
+
node: HTMLElement;
|
|
656
|
+
rowspan: number;
|
|
657
|
+
colspan: number;
|
|
658
|
+
bgColor: string;
|
|
659
|
+
colWidth: [number];
|
|
660
|
+
content: any[];
|
|
661
|
+
vAlign: string;
|
|
662
|
+
constructor(node: HTMLElement, bgColor?: string, colwidth?: [number], vericalAlignment?: string);
|
|
663
|
+
render(): {
|
|
664
|
+
type: string;
|
|
665
|
+
attrs: {
|
|
666
|
+
colspan: number;
|
|
667
|
+
rowspan: number;
|
|
668
|
+
colwidth: number | [number];
|
|
669
|
+
background: string;
|
|
670
|
+
vAlign: string;
|
|
671
|
+
};
|
|
672
|
+
content: any[];
|
|
673
|
+
};
|
|
674
|
+
}
|
|
675
|
+
export declare class LicitTableCellImageElement extends LicitElement {
|
|
676
|
+
getBaseElement(): LicitTableCellImageJSON;
|
|
677
|
+
text: string;
|
|
678
|
+
src: string;
|
|
679
|
+
rowspan: number;
|
|
680
|
+
colspan: number;
|
|
681
|
+
height: string;
|
|
682
|
+
bgColor: string;
|
|
683
|
+
colWidth: [number];
|
|
684
|
+
alt: string;
|
|
685
|
+
fillImg: number;
|
|
686
|
+
fitToParent: number;
|
|
687
|
+
constructor(src: string, fillImg: number, fitToParent: number, bgColor?: string, imgHeight?: string, colWidth?: [number], alt?: string);
|
|
688
|
+
render(): LicitTableCellImageJSON;
|
|
689
|
+
}
|
|
690
|
+
export declare class LicitVignetteElement extends LicitElement {
|
|
691
|
+
getBaseElement(): {
|
|
692
|
+
type: string;
|
|
693
|
+
attrs: {
|
|
694
|
+
colspan: number;
|
|
695
|
+
rowspan: number;
|
|
696
|
+
colwidth: number[];
|
|
697
|
+
borderColor: string;
|
|
698
|
+
borderTop: string;
|
|
699
|
+
borderBottom: string;
|
|
700
|
+
borderLeft: string;
|
|
701
|
+
borderRight: string;
|
|
702
|
+
background: string;
|
|
703
|
+
vignette: boolean;
|
|
704
|
+
};
|
|
705
|
+
content: any[];
|
|
706
|
+
};
|
|
707
|
+
text: string;
|
|
708
|
+
src: string;
|
|
709
|
+
rowspan: number;
|
|
710
|
+
colspan: number;
|
|
711
|
+
borderColor: string;
|
|
712
|
+
bgColor: string;
|
|
713
|
+
isVignet: boolean;
|
|
714
|
+
width: number[];
|
|
715
|
+
content: any[];
|
|
716
|
+
constructor(node: Element, borderColor: string, bgColor: string, width: number);
|
|
717
|
+
ConvertElements(node: Element): void;
|
|
718
|
+
private convertDiv;
|
|
719
|
+
private processSpanChildren;
|
|
720
|
+
private processDivChildren;
|
|
721
|
+
handleVignetteSpan(pNode: any): void;
|
|
722
|
+
render(): {
|
|
723
|
+
type: string;
|
|
724
|
+
attrs: {
|
|
725
|
+
colspan: number;
|
|
726
|
+
rowspan: number;
|
|
727
|
+
colwidth: number[];
|
|
728
|
+
borderColor: string;
|
|
729
|
+
borderTop: string;
|
|
730
|
+
borderBottom: string;
|
|
731
|
+
borderLeft: string;
|
|
732
|
+
borderRight: string;
|
|
733
|
+
background: string;
|
|
734
|
+
vignette: boolean;
|
|
735
|
+
};
|
|
736
|
+
content: any[];
|
|
737
|
+
};
|
|
738
|
+
}
|
|
739
|
+
export declare class LicitTableCellParaElement extends LicitElement {
|
|
740
|
+
getBaseElement(): LicitTableCellJSON;
|
|
741
|
+
node: HTMLElement;
|
|
742
|
+
rowspan: number;
|
|
743
|
+
colspan: number;
|
|
744
|
+
bgColor: string;
|
|
745
|
+
colWidth: number[];
|
|
746
|
+
content: any[];
|
|
747
|
+
vAlign: string;
|
|
748
|
+
isTableHeader: boolean;
|
|
749
|
+
isTransparentTable: boolean;
|
|
750
|
+
constructor(node: HTMLElement, bgColor?: string, colwidth?: [number], vericalAlignment?: string, isTableHeader?: boolean, isTransparentTable?: boolean);
|
|
751
|
+
ConvertElements(node: HTMLElement): void;
|
|
752
|
+
processChildNode(childNode: ChildNode): void;
|
|
753
|
+
processChildOL(childNode: ChildNode): void;
|
|
754
|
+
processChildUL(childNode: ChildNode): void;
|
|
755
|
+
processTextNodes(node: any): void;
|
|
756
|
+
cleanupText(text: any): string;
|
|
757
|
+
removeNewLines(text: string): string;
|
|
758
|
+
removeBullets(text: string): string;
|
|
759
|
+
render(): LicitTableCellJSON;
|
|
760
|
+
}
|
|
761
|
+
export declare class LicitTableRowElement extends LicitElement {
|
|
762
|
+
getBaseElement(): LicitTableRowJSON;
|
|
763
|
+
cells: LicitTableCellElement[];
|
|
764
|
+
addCell(cell: LicitTableCellElement): void;
|
|
765
|
+
render(): LicitTableRowJSON;
|
|
766
|
+
}
|
|
767
|
+
export declare class LicitTableElement extends LicitElement {
|
|
768
|
+
getBaseElement(): LicitTableJSON;
|
|
769
|
+
rows: LicitTableRowElement[];
|
|
770
|
+
isVignette: boolean;
|
|
771
|
+
capco?: string;
|
|
772
|
+
constructor(isVignette?: boolean, capco?: string);
|
|
773
|
+
addRow(row: LicitTableRowElement): void;
|
|
774
|
+
render(): LicitTableJSON;
|
|
775
|
+
}
|
|
776
|
+
export declare class LicitEnhancedTableElement extends LicitElement {
|
|
777
|
+
getBaseElement(): {
|
|
778
|
+
type: string;
|
|
779
|
+
attrs: {
|
|
780
|
+
id: string;
|
|
781
|
+
figureType: string;
|
|
782
|
+
orientation: string;
|
|
783
|
+
maximized: boolean;
|
|
784
|
+
isValidate: boolean;
|
|
785
|
+
};
|
|
786
|
+
content: any[];
|
|
787
|
+
};
|
|
788
|
+
body: LicitEnhancedTableFigureBodyElement;
|
|
789
|
+
capco: LicitEnhancedTableFigureCapcoElement;
|
|
790
|
+
notes: LicitEnhancedTableNotesElement;
|
|
791
|
+
orientation: string;
|
|
792
|
+
constructor(orientation?: string);
|
|
793
|
+
render(): {
|
|
794
|
+
type: string;
|
|
795
|
+
attrs: {
|
|
796
|
+
id: string;
|
|
797
|
+
figureType: string;
|
|
798
|
+
orientation: string;
|
|
799
|
+
maximized: boolean;
|
|
800
|
+
isValidate: boolean;
|
|
801
|
+
};
|
|
802
|
+
content: any[];
|
|
803
|
+
};
|
|
804
|
+
addBody(bodyObj: LicitEnhancedTableFigureBodyElement): void;
|
|
805
|
+
addCapco(capcoObj: LicitEnhancedTableFigureCapcoElement): void;
|
|
806
|
+
addNotes(notesObj: LicitEnhancedTableNotesElement): void;
|
|
807
|
+
removeLastRow(): void;
|
|
808
|
+
}
|
|
809
|
+
export declare class LicitEnhancedTableFigureBodyElement extends LicitElement {
|
|
810
|
+
table: LicitTableElement;
|
|
811
|
+
getBaseElement(): {
|
|
812
|
+
content: any[];
|
|
813
|
+
type: string;
|
|
814
|
+
};
|
|
815
|
+
render(): {
|
|
816
|
+
content: any[];
|
|
817
|
+
type: string;
|
|
818
|
+
};
|
|
819
|
+
addTable(table: LicitTableElement): void;
|
|
820
|
+
}
|
|
821
|
+
export declare class LicitEnhancedTableFigureCapcoElement extends LicitElement {
|
|
822
|
+
text: string;
|
|
823
|
+
capco: string | null;
|
|
824
|
+
getBaseElement(): {
|
|
825
|
+
type: string;
|
|
826
|
+
attrs: {
|
|
827
|
+
form: string;
|
|
828
|
+
capco: string;
|
|
829
|
+
style: string;
|
|
830
|
+
isValidate: boolean;
|
|
831
|
+
};
|
|
832
|
+
content: any[];
|
|
833
|
+
};
|
|
834
|
+
constructor(capco: string);
|
|
835
|
+
render(): {
|
|
836
|
+
type: string;
|
|
837
|
+
attrs: {
|
|
838
|
+
form: string;
|
|
839
|
+
capco: string;
|
|
840
|
+
style: string;
|
|
841
|
+
isValidate: boolean;
|
|
842
|
+
};
|
|
843
|
+
content: any[];
|
|
844
|
+
};
|
|
845
|
+
}
|
|
846
|
+
export declare class LicitEnhancedTableNotesElement extends LicitElement {
|
|
847
|
+
paragraphs: NewLicitParagraphElement[];
|
|
848
|
+
constructor(paragraphNodes: HTMLElement[]);
|
|
849
|
+
getBaseElement(): {
|
|
850
|
+
type: string;
|
|
851
|
+
attrs: {
|
|
852
|
+
styleName: string;
|
|
853
|
+
};
|
|
854
|
+
content: any[];
|
|
855
|
+
};
|
|
856
|
+
render(): {
|
|
857
|
+
type: string;
|
|
858
|
+
attrs: {
|
|
859
|
+
styleName: string;
|
|
860
|
+
};
|
|
861
|
+
content: any[];
|
|
862
|
+
};
|
|
863
|
+
}
|
|
864
|
+
export declare class LicitHRElement extends LicitElement {
|
|
865
|
+
getBaseElement(): LicitHRJSON;
|
|
866
|
+
render(): LicitHRJSON;
|
|
867
|
+
}
|
|
868
|
+
export declare class LicitOrderedListElement extends LicitElement {
|
|
869
|
+
getBaseElement(): LicitOrderedListJSON;
|
|
870
|
+
listItems: LicitBulletListItemElement[];
|
|
871
|
+
indent: number;
|
|
872
|
+
constructor(indent: number);
|
|
873
|
+
addItem(item: LicitBulletListItemElement): void;
|
|
874
|
+
render(): LicitOrderedListJSON;
|
|
875
|
+
}
|
|
876
|
+
export declare function shouldSkipNext(className: string): boolean;
|
|
877
|
+
export declare function getElementAlignment(imgEl: Element): string;
|
|
878
|
+
export {};
|