@syncfusion/ej2-docx-renderer 0.0.0-stage → 35.2.15

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.
Files changed (129) hide show
  1. package/README.md +2 -2
  2. package/base.d.ts +4 -0
  3. package/base.js +4 -0
  4. package/dist/ej2-docx-renderer.umd.min.js +2 -0
  5. package/dist/ej2-docx-renderer.umd.min.js.map +1 -0
  6. package/dist/es6/ej2-docx-renderer.es2015.js +52432 -0
  7. package/dist/es6/ej2-docx-renderer.es2015.js.map +1 -0
  8. package/dist/es6/ej2-docx-renderer.es5.js +54425 -0
  9. package/dist/es6/ej2-docx-renderer.es5.js.map +1 -0
  10. package/dist/global/ej2-docx-renderer.min.js +2 -0
  11. package/dist/global/ej2-docx-renderer.min.js.map +1 -0
  12. package/dist/global/index.d.ts +5 -0
  13. package/format.d.ts +4 -0
  14. package/format.js +4 -0
  15. package/helper.d.ts +4 -0
  16. package/helper.js +4 -0
  17. package/index.d.ts +4 -0
  18. package/index.js +4 -0
  19. package/license +10 -0
  20. package/list.d.ts +4 -0
  21. package/list.js +4 -0
  22. package/package.json +26 -4
  23. package/parser.d.ts +4 -0
  24. package/parser.js +4 -0
  25. package/src/base/constants.d.ts +2 -0
  26. package/src/base/constants.js +2 -0
  27. package/src/base/dictionary.d.ts +52 -0
  28. package/src/base/dictionary.js +137 -0
  29. package/src/base/index.d.ts +9 -0
  30. package/src/base/index.js +9 -0
  31. package/src/base/keywords.d.ts +422 -0
  32. package/src/base/keywords.js +422 -0
  33. package/src/base/types.d.ts +2590 -0
  34. package/src/base/types.js +1056 -0
  35. package/src/base/unique-format.d.ts +87 -0
  36. package/src/base/unique-format.js +858 -0
  37. package/src/base/unique-formats.d.ts +32 -0
  38. package/src/base/unique-formats.js +87 -0
  39. package/src/document-canvas.d.ts +61 -0
  40. package/src/document-canvas.js +221 -0
  41. package/src/docx-renderer.d.ts +941 -0
  42. package/src/docx-renderer.js +2251 -0
  43. package/src/format/border.d.ts +53 -0
  44. package/src/format/border.js +600 -0
  45. package/src/format/borders.d.ts +44 -0
  46. package/src/format/borders.js +314 -0
  47. package/src/format/cell-format.d.ts +42 -0
  48. package/src/format/cell-format.js +309 -0
  49. package/src/format/character-format.d.ts +152 -0
  50. package/src/format/character-format.js +1224 -0
  51. package/src/format/index.d.ts +14 -0
  52. package/src/format/index.js +14 -0
  53. package/src/format/list-format.d.ts +32 -0
  54. package/src/format/list-format.js +238 -0
  55. package/src/format/paragraph-format.d.ts +103 -0
  56. package/src/format/paragraph-format.js +854 -0
  57. package/src/format/row-format.d.ts +119 -0
  58. package/src/format/row-format.js +545 -0
  59. package/src/format/section-format.d.ts +89 -0
  60. package/src/format/section-format.js +689 -0
  61. package/src/format/shading.d.ts +24 -0
  62. package/src/format/shading.js +137 -0
  63. package/src/format/style.d.ts +106 -0
  64. package/src/format/style.js +286 -0
  65. package/src/format/table-format.d.ts +51 -0
  66. package/src/format/table-format.js +395 -0
  67. package/src/global.js +1 -0
  68. package/src/helper/document-editor-helper.d.ts +515 -0
  69. package/src/helper/document-editor-helper.js +1302 -0
  70. package/src/helper/document-editor-settings.d.ts +293 -0
  71. package/src/helper/document-editor-settings.js +94 -0
  72. package/src/helper/index.d.ts +5 -0
  73. package/src/helper/index.js +5 -0
  74. package/src/helper/layout-helper-methods.d.ts +539 -0
  75. package/src/helper/layout-helper-methods.js +1065 -0
  76. package/src/helper/renderer-hooks.d.ts +74 -0
  77. package/src/helper/renderer-hooks.js +14 -0
  78. package/src/helper/revision-helper-methods.d.ts +199 -0
  79. package/src/helper/revision-helper-methods.js +362 -0
  80. package/src/index.d.ts +18 -0
  81. package/src/index.js +18 -0
  82. package/src/layout-helper.d.ts +190 -0
  83. package/src/layout-helper.js +1368 -0
  84. package/src/layout.d.ts +779 -0
  85. package/src/layout.js +17232 -0
  86. package/src/list/abstract-list.d.ts +25 -0
  87. package/src/list/abstract-list.js +67 -0
  88. package/src/list/index.d.ts +7 -0
  89. package/src/list/index.js +7 -0
  90. package/src/list/level-override.d.ts +22 -0
  91. package/src/list/level-override.js +43 -0
  92. package/src/list/list-level.d.ts +57 -0
  93. package/src/list/list-level.js +249 -0
  94. package/src/list/list.d.ts +30 -0
  95. package/src/list/list.js +100 -0
  96. package/src/page.d.ts +4155 -0
  97. package/src/page.js +11342 -0
  98. package/src/parser/index.d.ts +1 -0
  99. package/src/parser/index.js +1 -0
  100. package/src/parser/sfdt-reader.d.ts +254 -0
  101. package/src/parser/sfdt-reader.js +4569 -0
  102. package/src/render.d.ts +226 -0
  103. package/src/render.js +4222 -0
  104. package/src/text-helper.d.ts +144 -0
  105. package/src/text-helper.js +1079 -0
  106. package/src/text-helpers/index.d.ts +2 -0
  107. package/src/text-helpers/index.js +2 -0
  108. package/src/text-helpers/optimized.d.ts +45 -0
  109. package/src/text-helpers/optimized.js +121 -0
  110. package/src/text-helpers/regular.d.ts +37 -0
  111. package/src/text-helpers/regular.js +93 -0
  112. package/src/themes/font-scheme.d.ts +28 -0
  113. package/src/themes/font-scheme.js +107 -0
  114. package/src/themes/index.d.ts +6 -0
  115. package/src/themes/index.js +6 -0
  116. package/src/themes/major-minor-font-scheme.d.ts +14 -0
  117. package/src/themes/major-minor-font-scheme.js +45 -0
  118. package/src/themes/themes.d.ts +11 -0
  119. package/src/themes/themes.js +31 -0
  120. package/src/utility/index.d.ts +1 -0
  121. package/src/utility/index.js +1 -0
  122. package/src/utility/path-util.d.ts +133 -0
  123. package/src/utility/path-util.js +639 -0
  124. package/text-helpers.d.ts +4 -0
  125. package/text-helpers.js +4 -0
  126. package/themes.d.ts +4 -0
  127. package/themes.js +4 -0
  128. package/utility.d.ts +4 -0
  129. package/utility.js +4 -0
@@ -0,0 +1,226 @@
1
+ import { Page, LineWidget, TabElementBox, BookmarkElementBox, CommentCharacterElementBox } from './page';
2
+ import { Point } from './index';
3
+ import { Dictionary, DocxRenderer, WCharacterFormat } from './index';
4
+ import { ShapeBase } from './page';
5
+ import { DocumentCanvasElement, DocumentCanvasRenderingContext2D } from './document-canvas';
6
+ /**
7
+ * Renderer class provides comprehensive rendering functionality for the Document Editor.
8
+ * Handles PDF export by rendering all widget types to canvas context operations.
9
+ *
10
+ * @private
11
+ */
12
+ export declare class Renderer {
13
+ /**
14
+ * @private
15
+ */
16
+ commentMarkDictionary: Dictionary<HTMLElement, CommentCharacterElementBox[]>;
17
+ isPrinting: boolean;
18
+ skipRenderWavyLine: boolean;
19
+ isExporting: boolean;
20
+ /**
21
+ * @private
22
+ */
23
+ pageLeft: number;
24
+ /**
25
+ * @private
26
+ */
27
+ pageTop: number;
28
+ private documentHelper;
29
+ /**
30
+ * @private
31
+ */
32
+ pageIndex: number;
33
+ private pageCanvasIn;
34
+ private isFieldCode;
35
+ private isRenderHeader;
36
+ private height;
37
+ private exportPageCanvas;
38
+ private fieldStacks;
39
+ readonly pageCanvas: HTMLCanvasElement | DocumentCanvasElement;
40
+ private readonly selectionCanvas;
41
+ private readonly pageContext;
42
+ private readonly selectionContext;
43
+ constructor(documentHelper: DocxRenderer);
44
+ private readonly viewer;
45
+ renderWidgets(page: Page, left: number, top: number, width: number, height: number): void;
46
+ private setPageSize;
47
+ private renderHFWidgets;
48
+ private renderHeaderSeparator;
49
+ private getFooterHeight;
50
+ private getHeaderFooterType;
51
+ renderDashLine(context: CanvasRenderingContext2D | DocumentCanvasRenderingContext2D, x: number, y: number, width: number, fillStyle: string, isSmallDash: boolean): void;
52
+ renderSolidLine(context: CanvasRenderingContext2D | DocumentCanvasRenderingContext2D, x: number, y: number, width: number, fillStyle: string): void;
53
+ private renderHeaderFooterMark;
54
+ private renderHeaderFooterMarkText;
55
+ private render;
56
+ private renderFloatingItems;
57
+ /**
58
+ * @private
59
+ * @returns {boolean}
60
+ */
61
+ isOverLappedShapeWidget(floatingElement: ShapeBase): boolean;
62
+ private renderGroupShapeElementBox;
63
+ private renderShapeElementBox;
64
+ private renderPathElement;
65
+ private renderWidget;
66
+ private getConnectorPathData;
67
+ private getCurvedPathData;
68
+ private constructPath;
69
+ private calculateCoord;
70
+ private drawPath;
71
+ private renderPath;
72
+ private m;
73
+ private r;
74
+ private a;
75
+ private updatePath;
76
+ private calculatePathBounds;
77
+ private setStyle;
78
+ private setShapeLineDash;
79
+ private renderLockRegionBorder;
80
+ private renderHeader;
81
+ private updateClonedRowLocation;
82
+ private updateTableHeaderRows;
83
+ private renderParagraphWidget;
84
+ private renderParagraphBorder;
85
+ /**
86
+ * Renders the border around a TextElementBox.
87
+ * @param elementBox - The TextElementBox for which the border is rendered.
88
+ * @param left - The left position of the TextElementBox.
89
+ * @param top - The top position of the TextElementBox.
90
+ * @param color - The color of the border.
91
+ * @param borderStyle - The style of the border (e.g., 'Single', 'Double').
92
+ * @param borderWidth - The width of the border.
93
+ * @param baselineAlignment - The baseline alignment of the TextElementBox.
94
+ * @param revisionInfo - Revision information (optional).
95
+ */
96
+ private renderImgBorder;
97
+ private getContainerWidth;
98
+ private getTopMargin;
99
+ private getBottomMargin;
100
+ private renderfootNoteWidget;
101
+ private renderTableWidget;
102
+ private renderTableRowWidget;
103
+ private renderTableCellWidget;
104
+ /**
105
+ * The hierarchical index of a line inside a shape's text frame does not include the paragraph and line positions
106
+ * within the frame, so every line of the frame shares one index. Compare those positions explicitly to match only the selected line.
107
+ */
108
+ private isSameLinePositionInTextFrame;
109
+ private checkHeaderFooterLineWidget;
110
+ private renderContentControlBorder;
111
+ private renderEditRegionHighlight;
112
+ private renderSearchHighlight;
113
+ private validateRemoveSearchHighlighters;
114
+ private renderSelectionHighlight;
115
+ private renderSelectionHighlightOnTable;
116
+ private renderLine;
117
+ private getPageBreakText;
118
+ /**
119
+ *
120
+ * @private
121
+ */
122
+ isBookmarkEndAtStart(bookmark: BookmarkElementBox): boolean;
123
+ private isRenderable;
124
+ private combineHexColors;
125
+ private renderBookmark;
126
+ private retriveCharacterformat;
127
+ private toSkipFieldCode;
128
+ getUnderlineYPosition(lineWidget: LineWidget): number;
129
+ private renderListTextElementBox;
130
+ private renderListTextElement;
131
+ private getDefaultFontColor;
132
+ private isElementAllWordSplit;
133
+ private isSkippableElement;
134
+ private prevIsRTL;
135
+ private nextIsRTL;
136
+ /**
137
+ *
138
+ * @private
139
+ * @returns {boolean}
140
+ */
141
+ checkFormatToCombineText(currentFormat: WCharacterFormat, previousFormat: WCharacterFormat): boolean;
142
+ private renderTextElementBox;
143
+ private tabMark;
144
+ private replaceSpace;
145
+ private inverseCharacter;
146
+ private getBackgroundColorHeirachy;
147
+ drawWavy(from: Point, to: Point, frequency: number, amplitude: number, step: number, color: string, height: number, backColor: string, negative?: number): void;
148
+ /**
149
+ * @private
150
+ */
151
+ getTabLeader(elementBox: TabElementBox): string;
152
+ private getTabLeaderString;
153
+ private clipRect;
154
+ private getTrimmedWidth;
155
+ private renderUnderline;
156
+ private renderStrikeThrough;
157
+ private renderImageElementBox;
158
+ private renderTableOutline;
159
+ private renderTableCellOutline;
160
+ private renderTableCellOutlineBorders;
161
+ /**
162
+ * Renders Double / Triple cell borders. Every edge of the cell owns a border band that is split into
163
+ * parallel lines. The outermost line is drawn only on the edges that form the table perimeter (so it
164
+ * surrounds the entire table); the remaining lines are drawn on every cell, so each cell is surrounded
165
+ * by its own inner border.
166
+ */
167
+ private renderCellMultiLineBorders;
168
+ private renderCellBackground;
169
+ private renderBackgroundColor;
170
+ private drawTextureStyle;
171
+ private getForeColor;
172
+ private getColorValue;
173
+ private setLineDashBasedOnStyle;
174
+ private isRenderingCellBorders;
175
+ private renderMultipleLineBorder;
176
+ private renderSingleBorder;
177
+ getScaledValue(value: number, type?: number): number;
178
+ private checkRevisionType;
179
+ /**
180
+ * Resolves the display color for a revision using insertRevisionColor / deleteRevisionColor
181
+ * when set to a fixed hex value; otherwise falls back to the author-specific color.
182
+ *
183
+ * @private
184
+ * @param {RevisionBase} revision - The revision whose display color is needed.
185
+ * @returns {string} Hex color string used for visual identification.
186
+ */
187
+ private resolveRevisionDisplayColor;
188
+ /**
189
+ * Resolves the background color for table-row revisions using insertedRowColor / deletedRowColor
190
+ * when set to a fixed hex value; otherwise falls back to the author-specific color.
191
+ *
192
+ * @private
193
+ * @param {RevisionBase} revision - The row revision whose display color is needed.
194
+ * @returns {string} Hex color string used for visual identification of the row.
195
+ */
196
+ private resolveRowRevisionFillColor;
197
+ /**
198
+ * Mixes the given hex color with white at the specified percent intensity.
199
+ * Example: 10% of #0e76b1 on white yields a light wash of that color.
200
+ *
201
+ * @param {string} color - Source hex color (e.g. `#0e76b1` or `0e76b1`).
202
+ * @param {number} percent - Intensity of the source color (0–100).
203
+ * @returns {string} Tinted hex color string.
204
+ */
205
+ private tintColor;
206
+ /**
207
+ * Shared resolver for type-based revision colors (content vs table-row).
208
+ *
209
+ * @param {RevisionBase} revision - The revision whose display color is needed.
210
+ * @param {boolean} forTableRow - When true, uses insertedRowColor/deletedRowColor; otherwise insertRevisionColor/deleteRevisionColor.
211
+ * @returns {string} Hex color string used for visual identification.
212
+ */
213
+ private resolveTypedRevisionColor;
214
+ private getRevisionColor;
215
+ private getRevisionType;
216
+ private getFormfieldInLine;
217
+ private renderLockMark;
218
+ private getShape;
219
+ private shapes;
220
+ /**
221
+ * Destroys the internal objects which is maintained.
222
+ *
223
+ * @returns {void}
224
+ */
225
+ destroy(): void;
226
+ }