@syncfusion/ej2-office-common 35.1.37 → 35.1.42

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 (226) hide show
  1. package/dist/ej2-office-common.umd.min.js +2 -2
  2. package/dist/ej2-office-common.umd.min.js.map +1 -1
  3. package/dist/es6/ej2-office-common.es2015.js +5421 -6017
  4. package/dist/es6/ej2-office-common.es2015.js.map +1 -1
  5. package/dist/es6/ej2-office-common.es5.js +6270 -7203
  6. package/dist/es6/ej2-office-common.es5.js.map +1 -1
  7. package/dist/global/ej2-office-common.min.js +2 -2
  8. package/dist/global/ej2-office-common.min.js.map +1 -1
  9. package/dist/global/index.d.ts +1 -1
  10. package/office-common.js +4 -0
  11. package/package.json +11 -7
  12. package/src/index.d.ts +3 -17
  13. package/src/index.js +3 -18
  14. package/src/office-common/features/index.d.ts +6 -0
  15. package/src/office-common/features/index.js +6 -0
  16. package/src/office-common/features/mathml/index.d.ts +25 -0
  17. package/src/office-common/features/mathml/index.js +22 -0
  18. package/src/office-common/features/mathml/latex/latex-generator.d.ts +8 -0
  19. package/src/office-common/features/mathml/latex/latex-generator.js +357 -0
  20. package/src/office-common/features/mathml/latex/latex-parser.d.ts +87 -0
  21. package/src/office-common/features/mathml/latex/latex-parser.js +1206 -0
  22. package/src/office-common/features/mathml/latex/latex-symbols.d.ts +13 -0
  23. package/src/office-common/features/mathml/latex/latex-symbols.js +681 -0
  24. package/src/office-common/features/mathml/math-settings.d.ts +54 -0
  25. package/src/office-common/features/mathml/math-settings.js +174 -0
  26. package/src/office-common/features/mathml/office-math/adapter.d.ts +59 -0
  27. package/src/office-common/features/mathml/office-math/adapter.js +6 -0
  28. package/src/office-common/features/mathml/office-math/basic.d.ts +91 -0
  29. package/src/office-common/features/mathml/office-math/basic.js +93 -0
  30. package/src/office-common/features/mathml/office-math/break.d.ts +30 -0
  31. package/src/office-common/features/mathml/office-math/break.js +75 -0
  32. package/src/office-common/features/mathml/office-math/collection.d.ts +104 -0
  33. package/src/office-common/features/mathml/office-math/collection.js +170 -0
  34. package/src/office-common/features/mathml/office-math/entity.d.ts +12 -0
  35. package/src/office-common/features/mathml/office-math/entity.js +3 -0
  36. package/src/office-common/features/mathml/office-math/enums.d.ts +97 -0
  37. package/src/office-common/features/mathml/office-math/enums.js +108 -0
  38. package/src/office-common/features/mathml/office-math/format.d.ts +28 -0
  39. package/src/office-common/features/mathml/office-math/format.js +90 -0
  40. package/src/office-common/features/mathml/office-math/function-base.d.ts +27 -0
  41. package/src/office-common/features/mathml/office-math/function-base.js +69 -0
  42. package/src/office-common/features/mathml/office-math/function-collection.d.ts +29 -0
  43. package/src/office-common/features/mathml/office-math/function-collection.js +76 -0
  44. package/src/office-common/features/mathml/office-math/functions-basic.d.ts +118 -0
  45. package/src/office-common/features/mathml/office-math/functions-basic.js +331 -0
  46. package/src/office-common/features/mathml/office-math/functions-multi.d.ts +156 -0
  47. package/src/office-common/features/mathml/office-math/functions-multi.js +407 -0
  48. package/src/office-common/features/mathml/office-math/index.d.ts +27 -0
  49. package/src/office-common/features/mathml/office-math/index.js +25 -0
  50. package/src/office-common/features/mathml/office-math/keys.d.ts +6 -0
  51. package/src/office-common/features/mathml/office-math/keys.js +20 -0
  52. package/src/office-common/features/mathml/office-math/math-clone.d.ts +20 -0
  53. package/src/office-common/features/mathml/office-math/math-clone.js +203 -0
  54. package/src/office-common/features/mathml/office-math/math-collection.d.ts +19 -0
  55. package/src/office-common/features/mathml/office-math/math-collection.js +41 -0
  56. package/src/office-common/features/mathml/office-math/math-equality.d.ts +21 -0
  57. package/src/office-common/features/mathml/office-math/math-equality.js +115 -0
  58. package/src/office-common/features/mathml/office-math/math-paragraph.d.ts +58 -0
  59. package/src/office-common/features/mathml/office-math/math-paragraph.js +126 -0
  60. package/src/office-common/features/mathml/office-math/math-traversal.d.ts +23 -0
  61. package/src/office-common/features/mathml/office-math/math-traversal.js +95 -0
  62. package/src/office-common/features/mathml/office-math/matrix-collections.d.ts +54 -0
  63. package/src/office-common/features/mathml/office-math/matrix-collections.js +113 -0
  64. package/src/office-common/features/mathml/office-math/matrix-column.d.ts +43 -0
  65. package/src/office-common/features/mathml/office-math/matrix-column.js +96 -0
  66. package/src/office-common/features/mathml/office-math/matrix-row.d.ts +38 -0
  67. package/src/office-common/features/mathml/office-math/matrix-row.js +71 -0
  68. package/src/office-common/features/mathml/office-math/matrix.d.ts +62 -0
  69. package/src/office-common/features/mathml/office-math/matrix.js +158 -0
  70. package/src/office-common/features/mathml/office-math/office-math.d.ts +55 -0
  71. package/src/office-common/features/mathml/office-math/office-math.js +116 -0
  72. package/src/office-common/features/mathml/office-math/owner-holder.d.ts +42 -0
  73. package/src/office-common/features/mathml/office-math/owner-holder.js +87 -0
  74. package/src/office-common/features/mathml/office-math/property-store.d.ts +66 -0
  75. package/src/office-common/features/mathml/office-math/property-store.js +99 -0
  76. package/src/office-common/features/mathml/office-math/run-element.d.ts +31 -0
  77. package/src/office-common/features/mathml/office-math/run-element.js +97 -0
  78. package/src/office-common/features/mathml/office-math/unknown-element.d.ts +37 -0
  79. package/src/office-common/features/mathml/office-math/unknown-element.js +62 -0
  80. package/src/office-common/features/mathml/office-math/xml-equal.d.ts +13 -0
  81. package/src/office-common/features/mathml/office-math/xml-equal.js +24 -0
  82. package/src/office-common/features/mathml/parse/office-math-parser.d.ts +24 -0
  83. package/src/office-common/features/mathml/parse/office-math-parser.js +396 -0
  84. package/src/office-common/features/mathml/parse/office-math-properties.d.ts +165 -0
  85. package/src/office-common/features/mathml/parse/office-math-properties.js +432 -0
  86. package/src/office-common/features/mathml/parse/parse-options.d.ts +22 -0
  87. package/src/office-common/features/mathml/parse/parse-options.js +3 -0
  88. package/src/office-common/features/mathml/serialize/office-math-properties-writer.d.ts +38 -0
  89. package/src/office-common/features/mathml/serialize/office-math-properties-writer.js +267 -0
  90. package/src/office-common/features/mathml/serialize/office-math-serializer.d.ts +23 -0
  91. package/src/office-common/features/mathml/serialize/office-math-serializer.js +306 -0
  92. package/src/office-common/features/mathml/serialize/omml-writer.d.ts +123 -0
  93. package/src/office-common/features/mathml/serialize/omml-writer.js +135 -0
  94. package/src/office-common/index.d.ts +10 -0
  95. package/src/office-common/index.js +10 -0
  96. package/.eslintrc.json +0 -263
  97. package/.prettierrc.json +0 -5
  98. package/api-extractor.json +0 -35
  99. package/core.js +0 -4
  100. package/encryption.js +0 -4
  101. package/features.js +0 -4
  102. package/global.json +0 -6
  103. package/nuget.config +0 -7
  104. package/src/all.d.ts +0 -41
  105. package/src/all.js +0 -38
  106. package/src/features/index.d.ts +0 -11
  107. package/src/features/index.js +0 -11
  108. package/src/features/mathml/index.d.ts +0 -30
  109. package/src/features/mathml/index.js +0 -22
  110. package/src/features/mathml/math-factory.d.ts +0 -26
  111. package/src/features/mathml/math-factory.js +0 -568
  112. package/src/features/mathml/model/controls.d.ts +0 -896
  113. package/src/features/mathml/model/controls.js +0 -1541
  114. package/src/features/mathml/model/math-element.d.ts +0 -173
  115. package/src/features/mathml/model/math-element.js +0 -315
  116. package/src/features/mathml/model/roots.d.ts +0 -82
  117. package/src/features/mathml/model/roots.js +0 -177
  118. package/src/features/mathml/parse/math-parser.d.ts +0 -43
  119. package/src/features/mathml/parse/math-parser.js +0 -636
  120. package/src/features/mathml/serialize/math-serializer.d.ts +0 -34
  121. package/src/features/mathml/serialize/math-serializer.js +0 -749
  122. package/tsconfig.build.json +0 -13
  123. package/tsconfig.harness.json +0 -32
  124. package/tslint.json +0 -111
  125. /package/src/{core → office-common/core}/index.d.ts +0 -0
  126. /package/src/{core → office-common/core}/index.js +0 -0
  127. /package/src/{core → office-common/core}/xml/index.d.ts +0 -0
  128. /package/src/{core → office-common/core}/xml/index.js +0 -0
  129. /package/src/{core → office-common/core}/xml/model.d.ts +0 -0
  130. /package/src/{core → office-common/core}/xml/model.js +0 -0
  131. /package/src/{encryption → office-common/encryption}/agile-constants.d.ts +0 -0
  132. /package/src/{encryption → office-common/encryption}/agile-constants.js +0 -0
  133. /package/src/{encryption → office-common/encryption}/agile-encryption-info.d.ts +0 -0
  134. /package/src/{encryption → office-common/encryption}/agile-encryption-info.js +0 -0
  135. /package/src/{encryption → office-common/encryption}/agile-password.d.ts +0 -0
  136. /package/src/{encryption → office-common/encryption}/agile-password.js +0 -0
  137. /package/src/{encryption → office-common/encryption}/cfb-reader.d.ts +0 -0
  138. /package/src/{encryption → office-common/encryption}/cfb-reader.js +0 -0
  139. /package/src/{encryption → office-common/encryption}/crypto-primitives.d.ts +0 -0
  140. /package/src/{encryption → office-common/encryption}/crypto-primitives.js +0 -0
  141. /package/src/{encryption → office-common/encryption}/decrypt-encrypted-package.d.ts +0 -0
  142. /package/src/{encryption → office-common/encryption}/decrypt-encrypted-package.js +0 -0
  143. /package/src/{encryption → office-common/encryption}/encryption-info-xml.d.ts +0 -0
  144. /package/src/{encryption → office-common/encryption}/encryption-info-xml.js +0 -0
  145. /package/src/{encryption → office-common/encryption}/errors.d.ts +0 -0
  146. /package/src/{encryption → office-common/encryption}/errors.js +0 -0
  147. /package/src/{encryption → office-common/encryption}/index.d.ts +0 -0
  148. /package/src/{encryption → office-common/encryption}/index.js +0 -0
  149. /package/src/{features → office-common/features}/diagrams/constants.d.ts +0 -0
  150. /package/src/{features → office-common/features}/diagrams/constants.js +0 -0
  151. /package/src/{features → office-common/features}/diagrams/diagram-data-model.d.ts +0 -0
  152. /package/src/{features → office-common/features}/diagrams/diagram-data-model.js +0 -0
  153. /package/src/{features → office-common/features}/diagrams/diagram-parsers.d.ts +0 -0
  154. /package/src/{features → office-common/features}/diagrams/diagram-parsers.js +0 -0
  155. /package/src/{features → office-common/features}/diagrams/diagram-serializers.d.ts +0 -0
  156. /package/src/{features → office-common/features}/diagrams/diagram-serializers.js +0 -0
  157. /package/src/{features → office-common/features}/diagrams/diagram-views.d.ts +0 -0
  158. /package/src/{features → office-common/features}/diagrams/diagram-views.js +0 -0
  159. /package/src/{features → office-common/features}/diagrams/element-tree.d.ts +0 -0
  160. /package/src/{features → office-common/features}/diagrams/element-tree.js +0 -0
  161. /package/src/{features → office-common/features}/diagrams/errors.d.ts +0 -0
  162. /package/src/{features → office-common/features}/diagrams/errors.js +0 -0
  163. /package/src/{features → office-common/features}/diagrams/index.d.ts +0 -0
  164. /package/src/{features → office-common/features}/diagrams/index.js +0 -0
  165. /package/src/{features → office-common/features}/diagrams/smart-art-catalog.d.ts +0 -0
  166. /package/src/{features → office-common/features}/diagrams/smart-art-catalog.js +0 -0
  167. /package/src/{features → office-common/features}/diagrams/smart-art-diagram.d.ts +0 -0
  168. /package/src/{features → office-common/features}/diagrams/smart-art-diagram.js +0 -0
  169. /package/src/{features → office-common/features}/ink/constants.d.ts +0 -0
  170. /package/src/{features → office-common/features}/ink/constants.js +0 -0
  171. /package/src/{features → office-common/features}/ink/index.d.ts +0 -0
  172. /package/src/{features → office-common/features}/ink/index.js +0 -0
  173. /package/src/{features → office-common/features}/ink/ink-effects.d.ts +0 -0
  174. /package/src/{features → office-common/features}/ink/ink-effects.js +0 -0
  175. /package/src/{features → office-common/features}/ink/ink-model.d.ts +0 -0
  176. /package/src/{features → office-common/features}/ink/ink-model.js +0 -0
  177. /package/src/{features → office-common/features}/ink/ink-parser.d.ts +0 -0
  178. /package/src/{features → office-common/features}/ink/ink-parser.js +0 -0
  179. /package/src/{features → office-common/features}/ink/ink-serializer.d.ts +0 -0
  180. /package/src/{features → office-common/features}/ink/ink-serializer.js +0 -0
  181. /package/src/{features → office-common/features}/ink/ink-units.d.ts +0 -0
  182. /package/src/{features → office-common/features}/ink/ink-units.js +0 -0
  183. /package/src/{features → office-common/features}/ink/ink-xml.d.ts +0 -0
  184. /package/src/{features → office-common/features}/ink/ink-xml.js +0 -0
  185. /package/src/{features → office-common/features}/ink/trace-codec.d.ts +0 -0
  186. /package/src/{features → office-common/features}/ink/trace-codec.js +0 -0
  187. /package/src/{features → office-common/features}/mathml/constants.d.ts +0 -0
  188. /package/src/{features → office-common/features}/mathml/constants.js +0 -0
  189. /package/src/{features → office-common/features}/mathml/errors.d.ts +0 -0
  190. /package/src/{features → office-common/features}/mathml/errors.js +0 -0
  191. /package/src/{features → office-common/features}/mathml/model/enums.d.ts +0 -0
  192. /package/src/{features → office-common/features}/mathml/model/enums.js +0 -0
  193. /package/src/{features → office-common/features}/mathml/openxml.d.ts +0 -0
  194. /package/src/{features → office-common/features}/mathml/openxml.js +0 -0
  195. /package/src/{features → office-common/features}/smart-art/diagram-xml.d.ts +0 -0
  196. /package/src/{features → office-common/features}/smart-art/diagram-xml.js +0 -0
  197. /package/src/{features → office-common/features}/smart-art/errors.d.ts +0 -0
  198. /package/src/{features → office-common/features}/smart-art/errors.js +0 -0
  199. /package/src/{features → office-common/features}/smart-art/index.d.ts +0 -0
  200. /package/src/{features → office-common/features}/smart-art/index.js +0 -0
  201. /package/src/{features → office-common/features}/smart-art/minimal-samples.d.ts +0 -0
  202. /package/src/{features → office-common/features}/smart-art/minimal-samples.js +0 -0
  203. /package/src/{features → office-common/features}/smart-art/mutators.d.ts +0 -0
  204. /package/src/{features → office-common/features}/smart-art/mutators.js +0 -0
  205. /package/src/{features → office-common/features}/smart-art/namespaces.d.ts +0 -0
  206. /package/src/{features → office-common/features}/smart-art/namespaces.js +0 -0
  207. /package/src/{features → office-common/features}/smart-art/package-graph.d.ts +0 -0
  208. /package/src/{features → office-common/features}/smart-art/package-graph.js +0 -0
  209. /package/src/{features → office-common/features}/smart-art/parse-colors.d.ts +0 -0
  210. /package/src/{features → office-common/features}/smart-art/parse-colors.js +0 -0
  211. /package/src/{features → office-common/features}/smart-art/parse-data.d.ts +0 -0
  212. /package/src/{features → office-common/features}/smart-art/parse-data.js +0 -0
  213. /package/src/{features → office-common/features}/smart-art/parse-layout.d.ts +0 -0
  214. /package/src/{features → office-common/features}/smart-art/parse-layout.js +0 -0
  215. /package/src/{features → office-common/features}/smart-art/parse-rel-ids.d.ts +0 -0
  216. /package/src/{features → office-common/features}/smart-art/parse-rel-ids.js +0 -0
  217. /package/src/{features → office-common/features}/smart-art/parse-style.d.ts +0 -0
  218. /package/src/{features → office-common/features}/smart-art/parse-style.js +0 -0
  219. /package/src/{features → office-common/features}/smart-art/point-text.d.ts +0 -0
  220. /package/src/{features → office-common/features}/smart-art/point-text.js +0 -0
  221. /package/src/{features → office-common/features}/smart-art/register.d.ts +0 -0
  222. /package/src/{features → office-common/features}/smart-art/register.js +0 -0
  223. /package/src/{features → office-common/features}/smart-art/serialize.d.ts +0 -0
  224. /package/src/{features → office-common/features}/smart-art/serialize.js +0 -0
  225. /package/src/{features → office-common/features}/smart-art/types.d.ts +0 -0
  226. /package/src/{features → office-common/features}/smart-art/types.js +0 -0
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Low-level OMML element builders shared by the Office Math serializer.
3
+ *
4
+ * Source: ECMA-376-1 §22.1 (shared-math.xsd). The schema declares `attributeFormDefault="qualified"`,
5
+ * so `m:val`-style attributes are written in the math namespace, as Word does.
6
+ */
7
+ import { MathmlConstraintKind } from '../errors';
8
+ import { OpenXmlAttribute, OpenXmlChild, OpenXmlElement } from '../openxml';
9
+ import { MathDocumentAdapter } from '../office-math/adapter';
10
+ import { ExplicitPropertyStore } from '../office-math/property-store';
11
+ /** Options of the Office Math serializer. @public */
12
+ export interface SerializeOfficeMathOptions {
13
+ /** Math prefix to write. Defaults to the first free entry of `m`, `m1`, `m2`… */
14
+ readonly prefix?: string;
15
+ /** Prefixes already claimed in the outer document. */
16
+ readonly reservedPrefixes?: ReadonlyArray<string>;
17
+ /**
18
+ * Forces `m:oMathPara` (true) or a bare `m:oMath` (false). When omitted the root is display when
19
+ * the paragraph has explicit justification or does not hold exactly one equation.
20
+ */
21
+ readonly display?: boolean;
22
+ }
23
+ /** State threaded through one serialization. @private */
24
+ export interface WriteContext {
25
+ readonly prefix: string;
26
+ readonly adapter: MathDocumentAdapter | undefined;
27
+ }
28
+ /**
29
+ * Picks the math prefix for a save.
30
+ *
31
+ * @param {SerializeOfficeMathOptions} options The serializer options.
32
+ * @returns {string} The prefix.
33
+ * @private
34
+ */
35
+ export declare function resolveMathPrefix(options?: SerializeOfficeMathOptions): string;
36
+ /**
37
+ * Creates an `m:` element. @private
38
+ *
39
+ * @param {WriteContext} ctx The write context.
40
+ * @param {string} name The local name.
41
+ * @param {ReadonlyArray<OpenXmlChild>} children The children.
42
+ * @param {ReadonlyArray<OpenXmlAttribute>} attributes The attributes.
43
+ * @returns {OpenXmlElement} The element.
44
+ */
45
+ export declare function mathElement(ctx: WriteContext, name: string, children?: ReadonlyArray<OpenXmlChild>, attributes?: ReadonlyArray<OpenXmlAttribute>): OpenXmlElement;
46
+ /**
47
+ * Creates a namespace-qualified math attribute. @private
48
+ *
49
+ * @param {WriteContext} ctx The write context.
50
+ * @param {string} name The attribute local name.
51
+ * @param {string} value The value.
52
+ * @returns {OpenXmlAttribute} The attribute.
53
+ */
54
+ export declare function mathAttribute(ctx: WriteContext, name: string, value: string): OpenXmlAttribute;
55
+ /**
56
+ * Creates `<m:name m:val="value"/>`. @private
57
+ *
58
+ * @param {WriteContext} ctx The write context.
59
+ * @param {string} name The element local name.
60
+ * @param {string} value The value.
61
+ * @returns {OpenXmlElement} The element.
62
+ */
63
+ export declare function valueElement(ctx: WriteContext, name: string, value: string): OpenXmlElement;
64
+ /**
65
+ * Creates an on/off element using the canonical `1` / `0`. @private
66
+ *
67
+ * @param {WriteContext} ctx The write context.
68
+ * @param {string} name The element local name.
69
+ * @param {boolean} value The value.
70
+ * @returns {OpenXmlElement} The element.
71
+ */
72
+ export declare function onOffElement(ctx: WriteContext, name: string, value: boolean): OpenXmlElement;
73
+ /**
74
+ * Throws a validation error. @private
75
+ *
76
+ * @param {string} message The message.
77
+ * @param {string} path The element path.
78
+ * @param {MathmlConstraintKind} kind The violated constraint.
79
+ * @returns {never} Never returns.
80
+ */
81
+ export declare function invalid(message: string, path: string, kind: MathmlConstraintKind): never;
82
+ /**
83
+ * Maps an enum value to its OMML token, failing on out-of-range values. @private
84
+ *
85
+ * @param {ReadonlyArray<string>} table Tokens indexed by enum value.
86
+ * @param {number} value The enum value.
87
+ * @param {string} path The element path.
88
+ * @param {string} label The schema type name.
89
+ * @returns {string} The token.
90
+ */
91
+ export declare function token(table: ReadonlyArray<string>, value: number, path: string, label: string): string;
92
+ /**
93
+ * Asserts an unsigned integer. @private
94
+ *
95
+ * @param {number} value The value.
96
+ * @param {string} path The element path.
97
+ * @returns {string} The decimal text.
98
+ */
99
+ export declare function unsigned(value: number, path: string): string;
100
+ /** An explicit on/off property: store key, element name and current value. @private */
101
+ export declare type FlagEntry = [number, string, boolean];
102
+ /**
103
+ * Appends an on/off element for every flag that was explicitly set. @private
104
+ *
105
+ * @param {WriteContext} ctx The write context.
106
+ * @param {OpenXmlChild[]} out The children being built.
107
+ * @param {ExplicitPropertyStore} store The owner of the properties.
108
+ * @param {FlagEntry[]} entries Entries in schema order.
109
+ * @returns {void}
110
+ */
111
+ export declare function writeFlags(ctx: WriteContext, out: OpenXmlChild[], store: ExplicitPropertyStore, entries: FlagEntry[]): void;
112
+ /**
113
+ * Appends a value element when the property was explicitly set. @private
114
+ *
115
+ * @param {WriteContext} ctx The write context.
116
+ * @param {OpenXmlChild[]} out The children being built.
117
+ * @param {ExplicitPropertyStore} store The owner of the property.
118
+ * @param {number} key The property key.
119
+ * @param {string} name The element local name.
120
+ * @param {Function} value Lazily produces the text, so unset properties are never evaluated.
121
+ * @returns {void}
122
+ */
123
+ export declare function writeValue(ctx: WriteContext, out: OpenXmlChild[], store: ExplicitPropertyStore, key: number, name: string, value: () => string): void;
@@ -0,0 +1,135 @@
1
+ /**
2
+ * Low-level OMML element builders shared by the Office Math serializer.
3
+ *
4
+ * Source: ECMA-376-1 §22.1 (shared-math.xsd). The schema declares `attributeFormDefault="qualified"`,
5
+ * so `m:val`-style attributes are written in the math namespace, as Word does.
6
+ */
7
+ import { MATH_NAMESPACE, MATH_PREFIX_FALLBACKS } from '../constants';
8
+ import { MathmlValidationError } from '../errors';
9
+ import { createElement } from '../openxml';
10
+ /**
11
+ * Picks the math prefix for a save.
12
+ *
13
+ * @param {SerializeOfficeMathOptions} options The serializer options.
14
+ * @returns {string} The prefix.
15
+ * @private
16
+ */
17
+ export function resolveMathPrefix(options) {
18
+ if (options !== undefined && options.prefix !== undefined && options.prefix.length > 0) {
19
+ return options.prefix;
20
+ }
21
+ var reserved = options !== undefined && options.reservedPrefixes !== undefined ? options.reservedPrefixes : [];
22
+ var free = MATH_PREFIX_FALLBACKS.filter(function (p) { return reserved.indexOf(p) === -1; });
23
+ return free.length > 0 ? free[0] : 'm999';
24
+ }
25
+ /**
26
+ * Creates an `m:` element. @private
27
+ *
28
+ * @param {WriteContext} ctx The write context.
29
+ * @param {string} name The local name.
30
+ * @param {ReadonlyArray<OpenXmlChild>} children The children.
31
+ * @param {ReadonlyArray<OpenXmlAttribute>} attributes The attributes.
32
+ * @returns {OpenXmlElement} The element.
33
+ */
34
+ export function mathElement(ctx, name, children, attributes) {
35
+ if (children === void 0) { children = []; }
36
+ if (attributes === void 0) { attributes = []; }
37
+ return createElement(MATH_NAMESPACE, name, ctx.prefix, { attributes: attributes, children: children });
38
+ }
39
+ /**
40
+ * Creates a namespace-qualified math attribute. @private
41
+ *
42
+ * @param {WriteContext} ctx The write context.
43
+ * @param {string} name The attribute local name.
44
+ * @param {string} value The value.
45
+ * @returns {OpenXmlAttribute} The attribute.
46
+ */
47
+ export function mathAttribute(ctx, name, value) {
48
+ return { namespaceUri: MATH_NAMESPACE, localName: name, prefix: ctx.prefix, value: value };
49
+ }
50
+ /**
51
+ * Creates `<m:name m:val="value"/>`. @private
52
+ *
53
+ * @param {WriteContext} ctx The write context.
54
+ * @param {string} name The element local name.
55
+ * @param {string} value The value.
56
+ * @returns {OpenXmlElement} The element.
57
+ */
58
+ export function valueElement(ctx, name, value) {
59
+ return mathElement(ctx, name, [], [mathAttribute(ctx, 'val', value)]);
60
+ }
61
+ /**
62
+ * Creates an on/off element using the canonical `1` / `0`. @private
63
+ *
64
+ * @param {WriteContext} ctx The write context.
65
+ * @param {string} name The element local name.
66
+ * @param {boolean} value The value.
67
+ * @returns {OpenXmlElement} The element.
68
+ */
69
+ export function onOffElement(ctx, name, value) {
70
+ return valueElement(ctx, name, value ? '1' : '0');
71
+ }
72
+ /**
73
+ * Throws a validation error. @private
74
+ *
75
+ * @param {string} message The message.
76
+ * @param {string} path The element path.
77
+ * @param {MathmlConstraintKind} kind The violated constraint.
78
+ * @returns {never} Never returns.
79
+ */
80
+ export function invalid(message, path, kind) {
81
+ throw new MathmlValidationError(message, path, kind);
82
+ }
83
+ /**
84
+ * Maps an enum value to its OMML token, failing on out-of-range values. @private
85
+ *
86
+ * @param {ReadonlyArray<string>} table Tokens indexed by enum value.
87
+ * @param {number} value The enum value.
88
+ * @param {string} path The element path.
89
+ * @param {string} label The schema type name.
90
+ * @returns {string} The token.
91
+ */
92
+ export function token(table, value, path, label) {
93
+ var result = table[value];
94
+ return result !== undefined ? result : invalid('Illegal ' + label + ' value ' + String(value), path, 'enum-value');
95
+ }
96
+ /**
97
+ * Asserts an unsigned integer. @private
98
+ *
99
+ * @param {number} value The value.
100
+ * @param {string} path The element path.
101
+ * @returns {string} The decimal text.
102
+ */
103
+ export function unsigned(value, path) {
104
+ return Number.isInteger(value) && value >= 0 ? String(value) : invalid('Expected an unsigned integer, got ' + String(value), path, 'value-range');
105
+ }
106
+ /**
107
+ * Appends an on/off element for every flag that was explicitly set. @private
108
+ *
109
+ * @param {WriteContext} ctx The write context.
110
+ * @param {OpenXmlChild[]} out The children being built.
111
+ * @param {ExplicitPropertyStore} store The owner of the properties.
112
+ * @param {FlagEntry[]} entries Entries in schema order.
113
+ * @returns {void}
114
+ */
115
+ export function writeFlags(ctx, out, store, entries) {
116
+ entries.forEach(function (e) { if (store.isExplicit(e[0])) {
117
+ out.push(onOffElement(ctx, e[1], e[2]));
118
+ } });
119
+ }
120
+ /**
121
+ * Appends a value element when the property was explicitly set. @private
122
+ *
123
+ * @param {WriteContext} ctx The write context.
124
+ * @param {OpenXmlChild[]} out The children being built.
125
+ * @param {ExplicitPropertyStore} store The owner of the property.
126
+ * @param {number} key The property key.
127
+ * @param {string} name The element local name.
128
+ * @param {Function} value Lazily produces the text, so unset properties are never evaluated.
129
+ * @returns {void}
130
+ */
131
+ export function writeValue(ctx, out, store, key, name, value) {
132
+ if (store.isExplicit(key)) {
133
+ out.push(valueElement(ctx, name, value()));
134
+ }
135
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Shared OOXML codecs and domain models for EJ2 Office JavaScript libraries.
3
+ *
4
+ * Public surface: MathML (OMML) typed model, parser, serializer, settings, and
5
+ * LaTeX conversion. Other feature modules (ink, diagrams, smart-art,
6
+ * encryption) are internal and intentionally not exported yet.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ export * from './features/mathml/index';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Shared OOXML codecs and domain models for EJ2 Office JavaScript libraries.
3
+ *
4
+ * Public surface: MathML (OMML) typed model, parser, serializer, settings, and
5
+ * LaTeX conversion. Other feature modules (ink, diagrams, smart-art,
6
+ * encryption) are internal and intentionally not exported yet.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ export * from './features/mathml/index';
package/.eslintrc.json DELETED
@@ -1,263 +0,0 @@
1
- {
2
- "env": {
3
- "browser": true,
4
- "es2021": true
5
- },
6
- "extends": [
7
- "eslint:recommended",
8
- "plugin:@typescript-eslint/recommended",
9
- "plugin:jsdoc/recommended",
10
- "plugin:security/recommended"
11
- ],
12
- "parser": "@typescript-eslint/parser",
13
- "parserOptions": {
14
- "ecmaFeatures": { "js": true },
15
- "ecmaVersion": 2018,
16
- "project": "./tsconfig.json",
17
- "sourceType": "module"
18
- },
19
- "ignorePatterns": ["*.d.ts", "*.js"],
20
- "plugins": [
21
- "@typescript-eslint",
22
- "@typescript-eslint/tslint",
23
- "eslint-plugin-security",
24
- "jsdoc"
25
- ],
26
- "rules": {
27
- "use-isnan": "error",
28
- "security/detect-unsafe-regex":"error",
29
- "security/detect-buffer-noassert":"error",
30
- "security/detect-child-process":"error",
31
- "security/detect-disable-mustache-escape":"error",
32
- "security/detect-eval-with-expression":"error",
33
- "security/detect-no-csrf-before-method-override":"error",
34
- "security/detect-non-literal-fs-filename":"error",
35
- "security/detect-non-literal-regexp":"error",
36
- "security/detect-non-literal-require":"error",
37
- "security/detect-object-injection":"error",
38
- "security/detect-possible-timing-attacks":"error",
39
- "security/detect-pseudoRandomBytes":"error",
40
- "security/detect-new-buffer":"error",
41
- "security/detect-bidi-characters":"error",
42
- "no-prototype-builtins": "warn",
43
- "no-extend-native": ["warn"],
44
- "@typescript-eslint/no-inferrable-types": "off",
45
- "@typescript-eslint/ban-types": ["warn", {
46
- "types": {
47
- "Object": false,
48
- "object": false,
49
- "{}": false,
50
- "Function": false
51
- }
52
- }],
53
- "jsdoc/check-tag-names": 0,
54
- "@typescript-eslint/tslint/config": [
55
- "error",
56
- {
57
- "rules": {
58
- "ban": true,
59
- "chai-vague-errors": true,
60
- "max-func-body-length": [
61
- true,
62
- 120,
63
- {
64
- "ignore-parameters-to-function-regex": "describe"
65
- }
66
- ],
67
- "missing-jsdoc": true,
68
- "no-backbone-get-set-outside-model": false,
69
- "no-cookies": false,
70
- "no-delete-expression": false,
71
- "no-disable-auto-sanitization": true,
72
- "no-duplicate-case": true,
73
- "no-duplicate-parameter-names": true,
74
- "no-empty-interfaces": false,
75
- "no-exec-script": true,
76
- "no-function-expression": false,
77
- "no-multiple-var-decl": false,
78
- "no-string-based-set-immediate": false,
79
- "no-string-based-set-interval": false,
80
- "no-unnecessary-bind": false,
81
- "no-unused-imports": true,
82
- "no-with-statement": false,
83
- "prefer-array-literal": false,
84
- "typedef": [
85
- true,
86
- "call-signature",
87
- "parameter",
88
- "property-declaration",
89
- "variable-declaration",
90
- "arrow-parameter",
91
- "member-variable-declaration"
92
- ],
93
- "use-named-parameter": false,
94
- "valid-typeof": true,
95
- "whitespace": [
96
- true,
97
- "check-branch",
98
- "check-decl",
99
- "check-operator",
100
- "check-separator",
101
- "check-type"
102
- ]
103
- }
104
- }
105
- ],
106
- "no-control-regex": "error",
107
- "no-constant-condition": "error",
108
- "no-invalid-regexp": "error",
109
- "curly": "error",
110
- "eol-last": [
111
- "error",
112
- "always"
113
- ],
114
- "guard-for-in": "error",
115
- "no-labels": "error",
116
- "max-len": [
117
- "error",
118
- {
119
- "code": 140,
120
- "tabWidth": 4,
121
- "ignoreComments": true,
122
- "ignoreStrings": true,
123
- "ignoreTemplateLiterals": true,
124
- "ignoreRegExpLiterals": true
125
- }
126
- ],
127
- "no-console": [
128
- "error",
129
- {
130
- "allow": [
131
- "warn",
132
- "dir",
133
- "timeLog",
134
- "assert",
135
- "clear",
136
- "count",
137
- "countReset",
138
- "group",
139
- "groupEnd",
140
- "table",
141
- "dirxml",
142
- "error",
143
- "groupCollapsed",
144
- "Console",
145
- "profile",
146
- "profileEnd",
147
- "timeStamp",
148
- "context"
149
- ]
150
- }
151
- ],
152
- "no-redeclare": [
153
- "error",
154
- {
155
- "builtinGlobals": true
156
- }
157
- ],
158
- "@typescript-eslint/no-parameter-properties": "error",
159
- "@typescript-eslint/indent": [
160
- "error",
161
- 4,
162
- {
163
- "CallExpression": {
164
- "arguments": "first"
165
- },
166
- "FunctionDeclaration": {
167
- "parameters": "first"
168
- },
169
- "FunctionExpression": {
170
- "parameters": "first"
171
- }
172
- }
173
- ],
174
- "no-debugger": "error",
175
- "no-eval": "error",
176
- "no-extra-semi": "error",
177
- "no-throw-literal": "error",
178
- "no-fallthrough": "error",
179
- "comma-dangle": [
180
- "error",
181
- "never"
182
- ],
183
- "no-trailing-spaces": "error",
184
- "@typescript-eslint/no-unused-expressions": "error",
185
- "@typescript-eslint/no-var-requires": "error",
186
- "one-var": [
187
- "error",
188
- "never"
189
- ],
190
- "@typescript-eslint/no-explicit-any": "warn",
191
- "no-cond-assign": [
192
- "error",
193
- "always"
194
- ],
195
- "@typescript-eslint/consistent-type-assertions": "off",
196
- "jsdoc/check-alignment": "error",
197
- "no-empty": "error",
198
- "quotes": [
199
- "error",
200
- "single"
201
- ],
202
- "semi": [
203
- "error",
204
- "always"
205
- ],
206
- "eqeqeq": [
207
- "error",
208
- "smart"
209
- ],
210
- "valid-typeof": [
211
- "error",
212
- {
213
- "requireStringLiterals": true
214
- }
215
- ],
216
- "camelcase": [
217
- "error",
218
- {
219
- "properties": "always",
220
- "ignoreDestructuring": true,
221
- "ignoreImports": true
222
- }
223
- ],
224
- "no-irregular-whitespace": [
225
- "error",
226
- {
227
- "skipStrings": true,
228
- "skipComments": true,
229
- "skipRegExps": true,
230
- "skipTemplates": true
231
- }
232
- ],
233
- "valid-jsdoc": [
234
- "error",
235
- {
236
- "prefer": {
237
- "arg": "param",
238
- "argument": "param",
239
- "class": "constructor",
240
- "return": "returns",
241
- "virtual": "abstract"
242
- }
243
- }
244
- ],
245
- "no-var": "error",
246
- "radix": "error"
247
- },
248
- "reportUnusedDisableDirectives": true,
249
- "overrides": [
250
- {
251
- "files": [
252
- "node_modules",
253
- "dist",
254
- "public",
255
- "coverage",
256
- "test-report"
257
- ],
258
- "rules": {
259
- "no-unused-expressions": "off"
260
- }
261
- }
262
- ]
263
- }
package/.prettierrc.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "singleQuote": true,
3
- "trailingComma": "all",
4
- "printWidth": 100
5
- }
@@ -1,35 +0,0 @@
1
- {
2
- "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts",
4
- "bundledPackages": [],
5
- "compiler": {
6
- "tsconfigFilePath": "<projectFolder>/tsconfig.build.json"
7
- },
8
- "apiReport": {
9
- "enabled": true,
10
- "reportFolder": "<projectFolder>/docs/api",
11
- "reportFileName": "@syncfusion/ej2-office-common.api.md"
12
- },
13
- "docModel": {
14
- "enabled": false
15
- },
16
- "dtsRollup": {
17
- "enabled": true,
18
- "publicTrimmedFilePath": "<projectFolder>/dist/@syncfusion/ej2-office-common.d.ts"
19
- },
20
- "tsdocMetadata": {
21
- "enabled": false
22
- },
23
- "messages": {
24
- "extractorMessageReporting": {
25
- "default": {
26
- "logLevel": "warning"
27
- }
28
- },
29
- "compilerMessageReporting": {
30
- "default": {
31
- "logLevel": "warning"
32
- }
33
- }
34
- }
35
- }
package/core.js DELETED
@@ -1,4 +0,0 @@
1
- /**
2
- * core
3
- */
4
- export * from './src/core/index';
package/encryption.js DELETED
@@ -1,4 +0,0 @@
1
- /**
2
- * encryption
3
- */
4
- export * from './src/encryption/index';
package/features.js DELETED
@@ -1,4 +0,0 @@
1
- /**
2
- * features
3
- */
4
- export * from './src/features/index';
package/global.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "sdk": {
3
- "version": "10.0.400",
4
- "rollForward": "latestFeature"
5
- }
6
- }
package/nuget.config DELETED
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <configuration>
3
- <packageSources>
4
- <clear />
5
- <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
6
- </packageSources>
7
- </configuration>
package/src/all.d.ts DELETED
@@ -1,41 +0,0 @@
1
- /**
2
- * All-in entry for consumers who want every public API from @syncfusion/ej2-office-common.
3
- * Prefer explicit `@syncfusion/ej2-office-common/<feature>` subpaths when bundle size matters.
4
- *
5
- * @remarks
6
- * Re-exports the root surface (ink, mathml, encryption) plus the optional
7
- * SmartArt (`./smart-art`) module. Diagram feature symbols remain on the
8
- * `@syncfusion/ej2-office-common/diagrams` subpath only (same dual-export pattern as
9
- * development). FEATURE_SUBPATHS lists every optional feature export.
10
- *
11
- * @packageDocumentation
12
- */
13
- export * from './index';
14
- export { DIAGRAM_COLORS_CONTENT_TYPE, DIAGRAM_COLORS_RELATIONSHIP_TYPE, DIAGRAM_CONTENT_TYPES, DIAGRAM_DATA_CONTENT_TYPE, DIAGRAM_DATA_RELATIONSHIP_TYPE, DIAGRAM_GRAPHIC_DATA_URI, DIAGRAM_LAYOUT_CONTENT_TYPE, DIAGRAM_LAYOUT_RELATIONSHIP_TYPE, DIAGRAM_NAMESPACE, DIAGRAM_QUICK_STYLE_RELATIONSHIP_TYPE, DIAGRAM_RELATIONSHIP_TYPES, DIAGRAM_STYLE_CONTENT_TYPE, DRAWINGML_MAIN_NAMESPACE, OFFICE_DOCUMENT_RELATIONSHIPS_NAMESPACE, OFFICE_IMAGE_RELATIONSHIP_TYPE, DiagramPartError, DiagramPointType, createDiagramInstance, diagramPoint, diagramPointText, enumerateDiagramInstances, findDiagramRelIds, getDiagramInstance, getDiagramPartHandler, listDiagramConnections, listDiagramParts, listDiagramPoints, normalizePartName, parseDiagramColors, parseDiagramData, parseDiagramLayout, parseDiagramRelIds, parseDiagramStyle, registerSmartArtFeature, removeDiagramInstance, serializeDiagramColors, serializeDiagramData, serializeDiagramLayout, serializeDiagramStyle, withDiagramPointText, CreateDiagramInstanceOptions, CreateDiagramInstanceResult, CreateDiagramInstanceSeeds, DiagramColorsPart, DiagramConnection, DiagramDataPart, DiagramGraphicHook, DiagramInstance, DiagramLayoutPart, DiagramPackageGraph, DiagramPackagePart, DiagramPackageRelationship, DiagramPartHandler, DiagramPartNames, DiagramPoint, DiagramRelIds, DiagramStylePart, GetDiagramInstanceOptions, RemoveDiagramInstanceOptions, RemoveDiagramInstanceResult, } from './features/smart-art/index';
15
- /**
16
- * Feature subpaths registered for the configurator / bundle matrix.
17
- * Must stay in sync with `package.json` `exports` feature keys.
18
- *
19
- * @remarks
20
- * Non-feature surfaces such as `./encryption` are omitted here.
21
- *
22
- * @public
23
- */
24
- export declare const FEATURE_SUBPATHS: string[];
25
- /**
26
- * Union of FEATURE_SUBPATHS string literals.
27
- *
28
- * @public
29
- */
30
- export declare type FeatureSubpath = (typeof FEATURE_SUBPATHS)[number];
31
- /**
32
- * Registers every optional feature that installs side-effect handlers in this build.
33
- *
34
- * @remarks
35
- * Invokes registerSmartArtFeature, which installs the four Transitional
36
- * diagram content-type handlers (idempotent). Ink / diagrams / mathml modules
37
- * do not expose a matching register hook on this tree.
38
- *
39
- * @public
40
- */
41
- export declare function registerAllFeatures(): void;