@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,144 @@
1
+ import { WCharacterFormat } from './format/character-format';
2
+ import { Dictionary } from './base/dictionary';
3
+ import { TextElementBox, ListTextElementBox, ParagraphWidget } from './page';
4
+ import { LtrRtlTextInfo, RtlInfo } from './helper/layout-helper-methods';
5
+ import { BiDirectionalOverride, CharacterRangeType, FontScriptType } from './base/types';
6
+ import { DocxRenderer } from './docx-renderer';
7
+ /**
8
+ * @private
9
+ */
10
+ export interface TextSizeInfo {
11
+ Height?: number;
12
+ BaselineOffset?: number;
13
+ Width?: number;
14
+ }
15
+ /**
16
+ * @private
17
+ */
18
+ export interface FontSizeInfo {
19
+ HeightFactor?: number;
20
+ BaselineFactor?: number;
21
+ }
22
+ /**
23
+ * @private
24
+ */
25
+ export interface TextHeightInfo {
26
+ [key: string]: TextSizeInfo;
27
+ }
28
+ /**
29
+ * @private
30
+ */
31
+ export interface FontHeightInfo {
32
+ [key: string]: FontSizeInfo;
33
+ }
34
+ /**
35
+ * @private
36
+ */
37
+ export declare class TextHelper {
38
+ private documentHelper;
39
+ private context;
40
+ private paragraphMarkInfo;
41
+ private _position;
42
+ /**
43
+ * @private
44
+ * Current position of the fulltext
45
+ */
46
+ position: number;
47
+ private static wordSplitCharacters;
48
+ private static numberNonReversingCharacters;
49
+ private readonly paragraphMark;
50
+ private readonly lineBreakMark;
51
+ getEnSpaceCharacter(): string;
52
+ repeatChar(char: string, count: number): string;
53
+ constructor(documentHelper: DocxRenderer);
54
+ getParagraphMarkWidth(characterFormat: WCharacterFormat): number;
55
+ getParagraphMarkSize(characterFormat: WCharacterFormat): TextSizeInfo;
56
+ getTextSize(elementBox: TextElementBox, characterFormat: WCharacterFormat): number;
57
+ getHeight(characterFormat: WCharacterFormat, scriptType?: FontScriptType): TextSizeInfo;
58
+ getFormatText(characterFormat: WCharacterFormat, fontToRender?: string): string;
59
+ measureTextExcludingSpaceAtEnd(text: string, characterFormat: WCharacterFormat, scriptType: FontScriptType): number;
60
+ getWidth(text: string, characterFormat: WCharacterFormat, scriptType?: FontScriptType): number;
61
+ getWidthWithZWJ(firstText: string, zwj: string, nextText: string, characterFormat: WCharacterFormat, scriptType?: FontScriptType): number;
62
+ setText(textToRender: string, isBidi: boolean, bdo: BiDirectionalOverride, isRender?: boolean): string;
63
+ measureText(text: string, characterFormat: WCharacterFormat, scriptType?: FontScriptType): TextSizeInfo;
64
+ updateTextSize(elementBox: ListTextElementBox, paragraph: ParagraphWidget): void;
65
+ containsSpecialCharAlone(text: string): boolean;
66
+ containsNumberAlone(text: string): boolean;
67
+ containsCombinationText(element: TextElementBox): boolean;
68
+ inverseCharacter(ch: string): string;
69
+ containsSpecialChar(text: string): boolean;
70
+ /**
71
+ * @private
72
+ * @param {string} text - Specifies the text
73
+ * @returns {boolean} - Returns true if given text it right to left.
74
+ */
75
+ isRTLText(text: string): boolean;
76
+ /**
77
+ * @private
78
+ * @param {string} text - Specifies the text
79
+ * @param {FontScriptType} scriptType - Specifies the script type
80
+ * @returns {boolean} - Returns true if given text is unicode text.
81
+ */
82
+ isUnicodeText(text: string, scriptType: FontScriptType, isWordBreak?: boolean): boolean;
83
+ /**
84
+ * @private
85
+ * @param {string} text - Specifies the text
86
+ * @param {Dictionary<TextElementBox, number>} elements - Elements of the text
87
+ * @param {boolean} isAutoWidth
88
+ * @param {boolean} isAllColumnHasAutoWidthType
89
+ */
90
+ readWord(text: string, elements: Dictionary<TextElementBox, number>, isAutoWidth: boolean, isAllowAutoFit: boolean, isAllColumnHasAutoWidthType: boolean): string;
91
+ /**
92
+ * @private
93
+ * @param {number} pos - Current text position
94
+ * @param {Dictionary<TextElementBox, number>} elements - Elements of the text
95
+ */
96
+ getElementBoxOfChar(pos: number, elements: Dictionary<TextElementBox, number>): TextElementBox;
97
+ /**
98
+ * @private
99
+ * @param {string} text - Text which contains non-breaking space character.
100
+ */
101
+ isTextContainsNonBreakingSpaceCharacter(text: string): boolean;
102
+ /**
103
+ * @private
104
+ * @param {string} text - Text which contains non-breaking space character.
105
+ * @param {number} pos - Position of the empty space character
106
+ */
107
+ isNonBreakingCharacterCombinedWithSpace(text: string, pos: number): boolean;
108
+ /**
109
+ * @private
110
+ * @param {string} text - Specifies the text
111
+ * @returns {RtlInfo} - Returns the text info.
112
+ */
113
+ getRtlLanguage(text: string): RtlInfo;
114
+ /**
115
+ * @private
116
+ */
117
+ splitTextByConsecutiveLtrAndRtl(text: string, isTextBidi: boolean, isRTLLang: boolean, characterRangeTypes: CharacterRangeType[], isPrevLTRText: LtrRtlTextInfo, hasRTLCharacter: LtrRtlTextInfo, isPrevLTRBidi: LtrRtlTextInfo, isPrevHebrewText?: LtrRtlTextInfo): string[];
118
+ /**
119
+ * @private
120
+ */
121
+ isRightToLeftLanguage(lang: number): boolean;
122
+ private isNumber;
123
+ /**
124
+ * @private
125
+ */
126
+ isWordSplitChar(character: string): boolean;
127
+ /**
128
+ * @private
129
+ */
130
+ static isNumberNonReversingCharacter(character: string, isTextBidi: boolean): boolean;
131
+ /**
132
+ * @private
133
+ */
134
+ isNonWordSplitCharacter(character: string): boolean;
135
+ getFontNameToRender(scriptType: FontScriptType, charFormat: WCharacterFormat): string;
136
+ private isEastAsiaScript;
137
+ private getFontNameEAToRender;
138
+ private getFontNameAsciiToRender;
139
+ private getFontNameBidiToRender;
140
+ private getFontNameFromTheme;
141
+ private updateFontNameFromTheme;
142
+ private getFontNameWithFontScript;
143
+ destroy(): void;
144
+ }