@syncfusion/ej2-office-common 35.1.37

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 (147) hide show
  1. package/.eslintrc.json +263 -0
  2. package/.prettierrc.json +5 -0
  3. package/README.md +167 -0
  4. package/api-extractor.json +35 -0
  5. package/core.js +4 -0
  6. package/dist/ej2-office-common.umd.min.js +11 -0
  7. package/dist/ej2-office-common.umd.min.js.map +1 -0
  8. package/dist/es6/ej2-office-common.es2015.js +6585 -0
  9. package/dist/es6/ej2-office-common.es2015.js.map +1 -0
  10. package/dist/es6/ej2-office-common.es5.js +7955 -0
  11. package/dist/es6/ej2-office-common.es5.js.map +1 -0
  12. package/dist/global/ej2-office-common.min.js +11 -0
  13. package/dist/global/ej2-office-common.min.js.map +1 -0
  14. package/dist/global/index.d.ts +14 -0
  15. package/encryption.js +4 -0
  16. package/features.js +4 -0
  17. package/global.json +6 -0
  18. package/index.js +4 -0
  19. package/license +10 -0
  20. package/nuget.config +7 -0
  21. package/package.json +23 -0
  22. package/src/all.d.ts +41 -0
  23. package/src/all.js +38 -0
  24. package/src/core/index.d.ts +6 -0
  25. package/src/core/index.js +6 -0
  26. package/src/core/xml/index.d.ts +7 -0
  27. package/src/core/xml/index.js +6 -0
  28. package/src/core/xml/model.d.ts +71 -0
  29. package/src/core/xml/model.js +20 -0
  30. package/src/encryption/agile-constants.d.ts +61 -0
  31. package/src/encryption/agile-constants.js +71 -0
  32. package/src/encryption/agile-encryption-info.d.ts +46 -0
  33. package/src/encryption/agile-encryption-info.js +333 -0
  34. package/src/encryption/agile-password.d.ts +8 -0
  35. package/src/encryption/agile-password.js +58 -0
  36. package/src/encryption/cfb-reader.d.ts +11 -0
  37. package/src/encryption/cfb-reader.js +345 -0
  38. package/src/encryption/crypto-primitives.d.ts +74 -0
  39. package/src/encryption/crypto-primitives.js +302 -0
  40. package/src/encryption/decrypt-encrypted-package.d.ts +16 -0
  41. package/src/encryption/decrypt-encrypted-package.js +138 -0
  42. package/src/encryption/encryption-info-xml.d.ts +21 -0
  43. package/src/encryption/encryption-info-xml.js +282 -0
  44. package/src/encryption/errors.d.ts +66 -0
  45. package/src/encryption/errors.js +124 -0
  46. package/src/encryption/index.d.ts +35 -0
  47. package/src/encryption/index.js +100 -0
  48. package/src/features/diagrams/constants.d.ts +83 -0
  49. package/src/features/diagrams/constants.js +101 -0
  50. package/src/features/diagrams/diagram-data-model.d.ts +148 -0
  51. package/src/features/diagrams/diagram-data-model.js +446 -0
  52. package/src/features/diagrams/diagram-parsers.d.ts +28 -0
  53. package/src/features/diagrams/diagram-parsers.js +182 -0
  54. package/src/features/diagrams/diagram-serializers.d.ts +20 -0
  55. package/src/features/diagrams/diagram-serializers.js +110 -0
  56. package/src/features/diagrams/diagram-views.d.ts +60 -0
  57. package/src/features/diagrams/diagram-views.js +213 -0
  58. package/src/features/diagrams/element-tree.d.ts +55 -0
  59. package/src/features/diagrams/element-tree.js +197 -0
  60. package/src/features/diagrams/errors.d.ts +17 -0
  61. package/src/features/diagrams/errors.js +59 -0
  62. package/src/features/diagrams/index.d.ts +17 -0
  63. package/src/features/diagrams/index.js +17 -0
  64. package/src/features/diagrams/smart-art-catalog.d.ts +107 -0
  65. package/src/features/diagrams/smart-art-catalog.js +422 -0
  66. package/src/features/diagrams/smart-art-diagram.d.ts +96 -0
  67. package/src/features/diagrams/smart-art-diagram.js +258 -0
  68. package/src/features/index.d.ts +11 -0
  69. package/src/features/index.js +11 -0
  70. package/src/features/ink/constants.d.ts +54 -0
  71. package/src/features/ink/constants.js +54 -0
  72. package/src/features/ink/index.d.ts +18 -0
  73. package/src/features/ink/index.js +15 -0
  74. package/src/features/ink/ink-effects.d.ts +35 -0
  75. package/src/features/ink/ink-effects.js +45 -0
  76. package/src/features/ink/ink-model.d.ts +237 -0
  77. package/src/features/ink/ink-model.js +406 -0
  78. package/src/features/ink/ink-parser.d.ts +59 -0
  79. package/src/features/ink/ink-parser.js +671 -0
  80. package/src/features/ink/ink-serializer.d.ts +16 -0
  81. package/src/features/ink/ink-serializer.js +281 -0
  82. package/src/features/ink/ink-units.d.ts +33 -0
  83. package/src/features/ink/ink-units.js +92 -0
  84. package/src/features/ink/ink-xml.d.ts +26 -0
  85. package/src/features/ink/ink-xml.js +165 -0
  86. package/src/features/ink/trace-codec.d.ts +127 -0
  87. package/src/features/ink/trace-codec.js +266 -0
  88. package/src/features/mathml/constants.d.ts +47 -0
  89. package/src/features/mathml/constants.js +47 -0
  90. package/src/features/mathml/errors.d.ts +50 -0
  91. package/src/features/mathml/errors.js +69 -0
  92. package/src/features/mathml/index.d.ts +30 -0
  93. package/src/features/mathml/index.js +22 -0
  94. package/src/features/mathml/math-factory.d.ts +26 -0
  95. package/src/features/mathml/math-factory.js +568 -0
  96. package/src/features/mathml/model/controls.d.ts +896 -0
  97. package/src/features/mathml/model/controls.js +1541 -0
  98. package/src/features/mathml/model/enums.d.ts +153 -0
  99. package/src/features/mathml/model/enums.js +133 -0
  100. package/src/features/mathml/model/math-element.d.ts +173 -0
  101. package/src/features/mathml/model/math-element.js +315 -0
  102. package/src/features/mathml/model/roots.d.ts +82 -0
  103. package/src/features/mathml/model/roots.js +177 -0
  104. package/src/features/mathml/openxml.d.ts +56 -0
  105. package/src/features/mathml/openxml.js +87 -0
  106. package/src/features/mathml/parse/math-parser.d.ts +43 -0
  107. package/src/features/mathml/parse/math-parser.js +636 -0
  108. package/src/features/mathml/serialize/math-serializer.d.ts +34 -0
  109. package/src/features/mathml/serialize/math-serializer.js +749 -0
  110. package/src/features/smart-art/diagram-xml.d.ts +63 -0
  111. package/src/features/smart-art/diagram-xml.js +459 -0
  112. package/src/features/smart-art/errors.d.ts +24 -0
  113. package/src/features/smart-art/errors.js +47 -0
  114. package/src/features/smart-art/index.d.ts +26 -0
  115. package/src/features/smart-art/index.js +26 -0
  116. package/src/features/smart-art/minimal-samples.d.ts +18 -0
  117. package/src/features/smart-art/minimal-samples.js +40 -0
  118. package/src/features/smart-art/mutators.d.ts +60 -0
  119. package/src/features/smart-art/mutators.js +566 -0
  120. package/src/features/smart-art/namespaces.d.ts +153 -0
  121. package/src/features/smart-art/namespaces.js +163 -0
  122. package/src/features/smart-art/package-graph.d.ts +61 -0
  123. package/src/features/smart-art/package-graph.js +413 -0
  124. package/src/features/smart-art/parse-colors.d.ts +19 -0
  125. package/src/features/smart-art/parse-colors.js +39 -0
  126. package/src/features/smart-art/parse-data.d.ts +21 -0
  127. package/src/features/smart-art/parse-data.js +121 -0
  128. package/src/features/smart-art/parse-layout.d.ts +20 -0
  129. package/src/features/smart-art/parse-layout.js +40 -0
  130. package/src/features/smart-art/parse-rel-ids.d.ts +71 -0
  131. package/src/features/smart-art/parse-rel-ids.js +233 -0
  132. package/src/features/smart-art/parse-style.d.ts +19 -0
  133. package/src/features/smart-art/parse-style.js +39 -0
  134. package/src/features/smart-art/point-text.d.ts +80 -0
  135. package/src/features/smart-art/point-text.js +424 -0
  136. package/src/features/smart-art/register.d.ts +33 -0
  137. package/src/features/smart-art/register.js +95 -0
  138. package/src/features/smart-art/serialize.d.ts +40 -0
  139. package/src/features/smart-art/serialize.js +48 -0
  140. package/src/features/smart-art/types.d.ts +403 -0
  141. package/src/features/smart-art/types.js +28 -0
  142. package/src/global.js +1 -0
  143. package/src/index.d.ts +21 -0
  144. package/src/index.js +22 -0
  145. package/tsconfig.build.json +13 -0
  146. package/tsconfig.harness.json +32 -0
  147. package/tslint.json +111 -0
@@ -0,0 +1,403 @@
1
+ /**
2
+ * Public types for DrawingML diagram (SmartArt) part models.
3
+ *
4
+ * @remarks
5
+ * Citations: `dml-diagram.xsd` (`CT_DataModel`, `CT_Pt`, `ST_PtType`, `CT_Cxn`,
6
+ * `CT_ColorTransform`, `CT_DiagramDefinition`, `CT_StyleDefinition`);
7
+ * ECMA-376 Part 1 §14.2.3–14.2.6.
8
+ *
9
+ * Colors, layout, and style parts are identity + opaque XML preserve in v1
10
+ * (TASK-8102). Data points expose `modelId` / `type` / optional text body;
11
+ * plain-text read/write is {@link diagramPointText} / {@link withDiagramPointText}.
12
+ *
13
+ * @public
14
+ */
15
+ import { DiagramXmlElement } from './diagram-xml';
16
+ /**
17
+ * `ST_PtType` values from Transitional `dml-diagram.xsd`.
18
+ *
19
+ * @public
20
+ */
21
+ export declare const DiagramPointType: {
22
+ /** Default when `@type` is absent. */
23
+ Node: string;
24
+ Asst: string;
25
+ Doc: string;
26
+ Pres: string;
27
+ ParTrans: string;
28
+ SibTrans: string;
29
+ };
30
+ /**
31
+ * Union of {@link DiagramPointType} values.
32
+ *
33
+ * @public
34
+ */
35
+ export declare type DiagramPointType = (typeof DiagramPointType)[keyof typeof DiagramPointType];
36
+ /**
37
+ * One `dgm:pt` (`CT_Pt`) with modeled fields and full element preserve.
38
+ *
39
+ * @public
40
+ */
41
+ export interface DiagramPoint {
42
+ /** Required `modelId` attribute. */
43
+ readonly modelId: string;
44
+ /**
45
+ * Point kind from `@type`. When the attribute is absent in XML, this is
46
+ * {@link DiagramPointType.Node} (XSD default).
47
+ */
48
+ readonly type: DiagramPointType;
49
+ /**
50
+ * True when `type` was written on the element; false when applying the XSD default.
51
+ */
52
+ readonly typeAttributePresent: boolean;
53
+ /**
54
+ * Optional connection id (`cxnId`) when present.
55
+ */
56
+ readonly connectionId?: string;
57
+ /**
58
+ * Optional `dgm:t` text-body child, preserved as an element subtree when present.
59
+ *
60
+ * @private
61
+ */
62
+ readonly textBody?: DiagramXmlElement;
63
+ /**
64
+ * Full `dgm:pt` element including unknown children/attributes for round-trip.
65
+ *
66
+ * @private
67
+ */
68
+ readonly element: DiagramXmlElement;
69
+ }
70
+ /**
71
+ * One `dgm:cxn` (`CT_Cxn`) preserved for round-trip with key ids exposed.
72
+ *
73
+ * @public
74
+ */
75
+ export interface DiagramConnection {
76
+ readonly modelId: string;
77
+ readonly sourceId: string;
78
+ readonly destinationId: string;
79
+ /**
80
+ * Full `dgm:cxn` element.
81
+ *
82
+ * @private
83
+ */
84
+ readonly element: DiagramXmlElement;
85
+ }
86
+ /**
87
+ * Parsed Diagram Data part (`dgm:dataModel` / `CT_DataModel`).
88
+ *
89
+ * @public
90
+ */
91
+ export interface DiagramDataPart {
92
+ readonly kind: 'diagramData';
93
+ /** Points from required `ptLst`. */
94
+ readonly points: ReadonlyArray<DiagramPoint>;
95
+ /** Connections from optional `cxnLst` (empty when absent). */
96
+ readonly connections: ReadonlyArray<DiagramConnection>;
97
+ /**
98
+ * Full root element including `bg`, `whole`, `extLst`, and unknown content.
99
+ *
100
+ * @private
101
+ */
102
+ readonly root: DiagramXmlElement;
103
+ }
104
+ /**
105
+ * Parsed Diagram Colors part (`dgm:colorsDef` / `CT_ColorTransform`).
106
+ *
107
+ * @public
108
+ */
109
+ export interface DiagramColorsPart {
110
+ readonly kind: 'diagramColors';
111
+ /** Optional `uniqueId` attribute when present. */
112
+ readonly uniqueId?: string;
113
+ /**
114
+ * Full root element for opaque preserve serialize.
115
+ *
116
+ * @private
117
+ */
118
+ readonly root: DiagramXmlElement;
119
+ }
120
+ /**
121
+ * Parsed Diagram Layout Definition part (`dgm:layoutDef` / `CT_DiagramDefinition`).
122
+ *
123
+ * @public
124
+ */
125
+ export interface DiagramLayoutPart {
126
+ readonly kind: 'diagramLayout';
127
+ /** Optional `uniqueId` attribute when present. */
128
+ readonly uniqueId?: string;
129
+ /**
130
+ * Full root element for opaque preserve serialize.
131
+ *
132
+ * @private
133
+ */
134
+ readonly root: DiagramXmlElement;
135
+ }
136
+ /**
137
+ * Parsed Diagram Style part (`dgm:styleDef` / `CT_StyleDefinition`).
138
+ *
139
+ * @public
140
+ */
141
+ export interface DiagramStylePart {
142
+ readonly kind: 'diagramStyle';
143
+ /** Optional `uniqueId` attribute when present. */
144
+ readonly uniqueId?: string;
145
+ /**
146
+ * Full root element for opaque preserve serialize.
147
+ *
148
+ * @private
149
+ */
150
+ readonly root: DiagramXmlElement;
151
+ }
152
+ /**
153
+ * Handler pair for a diagram part content type (in-module registry).
154
+ *
155
+ * @public
156
+ */
157
+ export interface DiagramPartHandler {
158
+ readonly contentType: string;
159
+ readonly parse: (xml: string) => DiagramDataPart | DiagramColorsPart | DiagramLayoutPart | DiagramStylePart;
160
+ readonly serialize: (part: DiagramDataPart | DiagramColorsPart | DiagramLayoutPart | DiagramStylePart) => string;
161
+ }
162
+ /**
163
+ * `dgm:relIds` (`CT_RelIds`) relationship id strings.
164
+ *
165
+ * @remarks
166
+ * Schema (`dml-diagram.xsd`): attributes `r:dm`, `r:lo`, `r:qs`, `r:cs` are all
167
+ * required. They target the Diagram Data, Layout Definition, Style (quick style),
168
+ * and Colors parts respectively ([MS-ODRAWXML] §3.7.1).
169
+ *
170
+ * @public
171
+ */
172
+ export interface DiagramRelIds {
173
+ /** Relationship id for the Diagram Data part (`r:dm`). */
174
+ readonly dm: string;
175
+ /** Relationship id for the Diagram Layout Definition part (`r:lo`). */
176
+ readonly lo: string;
177
+ /** Relationship id for the Diagram Style / quick style part (`r:qs`). */
178
+ readonly qs: string;
179
+ /** Relationship id for the Diagram Colors part (`r:cs`). */
180
+ readonly cs: string;
181
+ }
182
+ /**
183
+ * Package part names for the four diagram parts of one instance.
184
+ *
185
+ * @remarks
186
+ * Paths are host-supplied package part names (leading `/` normalized). Layout
187
+ * part names must not be shared across instances (ECMA-376 Part 1 §14.2.5).
188
+ *
189
+ * @public
190
+ */
191
+ export interface DiagramPartNames {
192
+ readonly data: string;
193
+ readonly layout: string;
194
+ readonly colors: string;
195
+ readonly style: string;
196
+ }
197
+ /**
198
+ * One discoverable DrawingML diagram instance (four parts + hook rel ids).
199
+ *
200
+ * @remarks
201
+ * Host-neutral: no slide, main-document, or worksheet types. The host owns the
202
+ * graphic-frame markup that embeds `dgm:relIds`; this handle exposes the package
203
+ * subgraph and the relationship ids only.
204
+ *
205
+ * @public
206
+ */
207
+ export interface DiagramInstance {
208
+ /**
209
+ * Stable library id for this instance (data part name after normalization).
210
+ */
211
+ readonly id: string;
212
+ readonly data: DiagramDataPart;
213
+ readonly layout: DiagramLayoutPart;
214
+ readonly colors: DiagramColorsPart;
215
+ readonly style: DiagramStylePart;
216
+ readonly relIds: DiagramRelIds;
217
+ readonly partNames: DiagramPartNames;
218
+ /**
219
+ * Package part that sources the four diagram relationships (host drawing or
220
+ * document part name). Empty string when the instance was clustered from
221
+ * relationships without a recorded source.
222
+ */
223
+ readonly sourcePartName: string;
224
+ }
225
+ /**
226
+ * One package part entry for diagram discovery (host-neutral OPC view).
227
+ *
228
+ * @public
229
+ */
230
+ export interface DiagramPackagePart {
231
+ /** Package part name (e.g. `/diagrams/data1.xml`). */
232
+ readonly name: string;
233
+ /** Content type of the part. */
234
+ readonly contentType: string;
235
+ /** Part XML text (UTF-8). */
236
+ readonly xml: string;
237
+ }
238
+ /**
239
+ * One package relationship edge for diagram discovery.
240
+ *
241
+ * @remarks
242
+ * `target` should be the resolved package part name of the relationship target
243
+ * (hosts normalize relative Target attributes before calling into this module).
244
+ *
245
+ * @public
246
+ */
247
+ export interface DiagramPackageRelationship {
248
+ /** Relationship id (`Id` attribute, e.g. `rId8`). */
249
+ readonly id: string;
250
+ /** Relationship type URI. */
251
+ readonly type: string;
252
+ /** Resolved target part name. */
253
+ readonly target: string;
254
+ /** Source part name that owns this relationship. */
255
+ readonly source: string;
256
+ }
257
+ /**
258
+ * Host-neutral package graph slice used to discover diagram instances.
259
+ *
260
+ * @remarks
261
+ * This encryption-base tree has no core OPC module. Hosts (or tests) supply
262
+ * parts and relationships; SmartArt never imports PPT/Word/Excel product types.
263
+ *
264
+ * @public
265
+ */
266
+ export interface DiagramPackageGraph {
267
+ readonly parts: ReadonlyArray<DiagramPackagePart>;
268
+ readonly relationships: ReadonlyArray<DiagramPackageRelationship>;
269
+ }
270
+ /**
271
+ * Options for {@link getDiagramInstance}.
272
+ *
273
+ * @public
274
+ */
275
+ export interface GetDiagramInstanceOptions {
276
+ /** Match {@link DiagramInstance.id} (normalized data part name). */
277
+ readonly id?: string;
278
+ /** Match the data part package name (normalized). */
279
+ readonly dataPartName?: string;
280
+ }
281
+ /**
282
+ * Caller-supplied XML seeds for the four diagram parts.
283
+ *
284
+ * @remarks
285
+ * Each non-empty string is validated with the corresponding parse API before
286
+ * any package mutation. Omitted fields fall back to the library minimal sample
287
+ * when the entire `seeds` object is omitted, or when individual fields are
288
+ * omitted under a partial `seeds` object. Explicit empty string is invalid.
289
+ *
290
+ * @public
291
+ */
292
+ export interface CreateDiagramInstanceSeeds {
293
+ /** UTF-8 XML with `dgm:dataModel` root. */
294
+ readonly dataXml?: string;
295
+ /** UTF-8 XML with `dgm:layoutDef` root. */
296
+ readonly layoutXml?: string;
297
+ /** UTF-8 XML with `dgm:colorsDef` root. */
298
+ readonly colorsXml?: string;
299
+ /** UTF-8 XML with `dgm:styleDef` root. */
300
+ readonly styleXml?: string;
301
+ }
302
+ /**
303
+ * Options for {@link createDiagramInstance}.
304
+ *
305
+ * @public
306
+ */
307
+ export interface CreateDiagramInstanceOptions {
308
+ /**
309
+ * Part XML seeds. When omitted entirely, built-in minimal samples are used
310
+ * for all four parts.
311
+ */
312
+ readonly seeds?: CreateDiagramInstanceSeeds;
313
+ /**
314
+ * Host part that will own the four diagram relationships (slide, document,
315
+ * drawings part, etc.). When set, the returned graph includes four new
316
+ * relationship edges from this source and allocates unique relationship ids.
317
+ * When omitted, no relationship edges are written; {@link DiagramGraphicHook.relIds}
318
+ * still carries suggested ids for the host to create.
319
+ */
320
+ readonly sourcePartName?: string;
321
+ /**
322
+ * Package directory prefix for new part names (default `/diagrams`).
323
+ * Final names are `{prefix}/data{N}.xml`, `layout{N}.xml`, `colors{N}.xml`,
324
+ * `quickStyle{N}.xml` with N chosen so names do not collide with existing parts.
325
+ */
326
+ readonly partNamePrefix?: string;
327
+ }
328
+ /**
329
+ * Host graphic-frame hook payload produced by {@link createDiagramInstance}.
330
+ *
331
+ * @remarks
332
+ * The host must embed `a:graphicData@uri` = {@link graphicDataUri} with child
333
+ * `dgm:relIds` carrying {@link relIds} in its own drawing tree. This module does
334
+ * not mutate host product markup.
335
+ *
336
+ * @public
337
+ */
338
+ export interface DiagramGraphicHook {
339
+ /**
340
+ * Value for `a:graphicData@uri` (diagram namespace).
341
+ *
342
+ * @see DIAGRAM_GRAPHIC_DATA_URI
343
+ */
344
+ readonly graphicDataUri: string;
345
+ /** Relationship id tokens for `r:dm` / `r:lo` / `r:qs` / `r:cs`. */
346
+ readonly relIds: DiagramRelIds;
347
+ }
348
+ /**
349
+ * Result of {@link createDiagramInstance}.
350
+ *
351
+ * @public
352
+ */
353
+ export interface CreateDiagramInstanceResult {
354
+ /**
355
+ * New package graph: previous parts/relationships plus the four diagram parts
356
+ * and optional source relationships. Input graph is not mutated.
357
+ */
358
+ readonly graph: DiagramPackageGraph;
359
+ /** Bound instance handle (parsed parts + part names + rel ids). */
360
+ readonly instance: DiagramInstance;
361
+ /** Payload for the host to attach a graphic frame / `dgm:relIds`. */
362
+ readonly hook: DiagramGraphicHook;
363
+ }
364
+ /**
365
+ * Options for {@link removeDiagramInstance}.
366
+ *
367
+ * @remarks
368
+ * Provide {@link instance}, and/or {@link id} / {@link dataPartName} so the
369
+ * four owned diagram parts can be resolved. At least one identification path
370
+ * is required. Unknown instances throw (explicit mutate policy).
371
+ *
372
+ * @public
373
+ */
374
+ export interface RemoveDiagramInstanceOptions {
375
+ /**
376
+ * Instance handle (e.g. from {@link createDiagramInstance} or enumerate).
377
+ * Part names are validated against the graph (diagram content types only)
378
+ * before any delete — forged non-diagram names are rejected.
379
+ */
380
+ readonly instance?: DiagramInstance;
381
+ /** Match {@link DiagramInstance.id} (normalized data part name). */
382
+ readonly id?: string;
383
+ /** Match the data part package name (normalized). */
384
+ readonly dataPartName?: string;
385
+ }
386
+ /**
387
+ * Result of {@link removeDiagramInstance}.
388
+ *
389
+ * @public
390
+ */
391
+ export interface RemoveDiagramInstanceResult {
392
+ /**
393
+ * New package graph without the instance’s four diagram parts, relationships
394
+ * targeting or sourced from those parts (as visible on the graph), and any
395
+ * exclusively owned image parts. Input graph is not mutated.
396
+ */
397
+ readonly graph: DiagramPackageGraph;
398
+ /**
399
+ * Normalized names of parts removed (four diagram parts plus exclusive
400
+ * image parts, if any).
401
+ */
402
+ readonly removedPartNames: ReadonlyArray<string>;
403
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Public types for DrawingML diagram (SmartArt) part models.
3
+ *
4
+ * @remarks
5
+ * Citations: `dml-diagram.xsd` (`CT_DataModel`, `CT_Pt`, `ST_PtType`, `CT_Cxn`,
6
+ * `CT_ColorTransform`, `CT_DiagramDefinition`, `CT_StyleDefinition`);
7
+ * ECMA-376 Part 1 §14.2.3–14.2.6.
8
+ *
9
+ * Colors, layout, and style parts are identity + opaque XML preserve in v1
10
+ * (TASK-8102). Data points expose `modelId` / `type` / optional text body;
11
+ * plain-text read/write is {@link diagramPointText} / {@link withDiagramPointText}.
12
+ *
13
+ * @public
14
+ */
15
+ /**
16
+ * `ST_PtType` values from Transitional `dml-diagram.xsd`.
17
+ *
18
+ * @public
19
+ */
20
+ export var DiagramPointType = {
21
+ /** Default when `@type` is absent. */
22
+ Node: 'node',
23
+ Asst: 'asst',
24
+ Doc: 'doc',
25
+ Pres: 'pres',
26
+ ParTrans: 'parTrans',
27
+ SibTrans: 'sibTrans',
28
+ };
package/src/global.js ADDED
@@ -0,0 +1 @@
1
+ export * from './index';
package/src/index.d.ts ADDED
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Shared OOXML codecs and domain models for EJ2 Office JavaScript libraries.
3
+ * Consume from git / local workspace; not published to npm.
4
+ *
5
+ * Feature modules are added incrementally (ink, mathml, encryption, …). Root
6
+ * entry re-exports the public surface as features land, including the OFFCRYPTO
7
+ * Agile decrypt surface from ./encryption.
8
+ *
9
+ * @packageDocumentation
10
+ */
11
+ /**
12
+ * Package identity string for consumers proving resolution (TASK-9001).
13
+ *
14
+ * @public
15
+ */
16
+ export declare const OFFICE_COMMON_PACKAGE_NAME = "@syncfusion/ej2-office-common";
17
+ export { INKML_NAMESPACE, INK_CONTENT_TYPE, INK_SOURCE_RELATIONSHIP_TYPE, WORDML_2010_NAMESPACE, WORDPROCESSING_INK_URI, INK_EFFECT_COLORS, inkEffectColor, computeInkBounds, decodeTrace, encodeTrace, scalePointsStretch, scalePointsUniform, addInkTrace, cloneInk, createInk, inkPathPoints, isOfficeInk, DIAG_INVALID_INK_TRACE, getLastInkParseDiagnostics, parseInkXml, serializeInkXml, EMUS_PER_POINT, formatUnitValue, pointsToUnit, unitValueToPoints, } from './features/ink/index';
18
+ export { InkBounds, InkExtent, InkPoint, TraceDecodeResult, TraceDecodeStats, InkBrush, InkChannel, InkContext, InkEffectType, InkTrace, OfficeInk, InkParseDiagnostic, InkParseDiagnostics, } from './features/ink/index';
19
+ export { MATH_NAMESPACE, MATH_PREFIX_FALLBACKS, WML_TRANSITIONAL_NAMESPACE, XML_NAMESPACE, MATH_BREAKBIN_VALUES, MATH_BREAKBINSUB_VALUES, MATH_FTYPE_VALUES, MATH_JC_VALUES, MATH_LIMLOC_VALUES, MATH_SCRIPT_VALUES, MATH_SHP_VALUES, MATH_SPACING_RULE_VALUES, MATH_STYLE_VALUES, MATH_TOPBOT_VALUES, emitOnOff, isInteger2, isInteger255, isSpacingRule, isUnSignedInteger, parseMathBreakBin, parseMathBreakBinSub, parseMathFractionType, parseMathJc, parseMathLimLoc, parseMathScript, parseMathShape, parseMathStyle, parseMathTopBot, parseOnOff, MathArgument, MathElement, MathText, UnknownMathElement, mathArg, MathOMath, MathParagraph, MathAccent, MathBar, MathBorderBox, MathBox, MathDelimiter, MathEquationArray, MathFraction, MathFunction, MathGroupCharacter, MathLimitLower, MathLimitUpper, MathMatrix, MathMatrixRow, MathNaryOperator, MathPhantom, MathPreSubSuperscript, MathRadical, MathRun, MathSubscript, MathSubSuperscript, MathSuperscript, parseMathElement, parseMathElements, mathElementToOpenXml, cloneMathElement, mathEqual, attrValue, attrValueNs, childElements, createElement, createText, textContent, } from './features/mathml/index';
20
+ export { MathBreakBin, MathBreakBinSub, MathFractionType, MathJc, MathLimLoc, MathScript, MathShape, MathSpacingRule, MathStyle, MathTopBot, MathArgProperties, MathElementType, MathParaProperties, MathAccentProperties, MathBarProperties, MathBorderBoxProperties, MathBoxProperties, MathCtrlPr, MathDelimiterProperties, MathEquationArrayProperties, MathFractionProperties, MathFunctionProperties, MathGroupCharacterProperties, MathLimitProperties, MathMatrixProperties, MathNaryProperties, MathPhantomProperties, MathRadicalProperties, MathRunProperties, MathScriptControlProperties, MathParseDiagnostic, ParseMathOptions, SerializeMathOptions, NamespaceDeclaration, OpenXmlAttribute, OpenXmlChild, OpenXmlElement, OpenXmlText, } from './features/mathml/index';
21
+ export { decryptOffCryptoPackage, isOffCryptoPackage, DEFAULT_DECRYPT_SECURITY_LIMITS, EncryptedPackageError, InvalidPasswordError, PackageLimitError, resolveDecryptLimits, UnsupportedEncryptionError, DecryptSecurityLimits, SecurityErrorOptions, AGILE_ENCRYPTION_NS, AGILE_RESERVED, AGILE_VERSION_MAJOR, AGILE_VERSION_MINOR, BLOCK_KEY_ENCRYPTOR_KEY, BLOCK_KEY_HMAC_KEY, BLOCK_KEY_HMAC_VALUE, BLOCK_KEY_VERIFIER_HASH, BLOCK_KEY_VERIFIER_INPUT, ENCRYPTED_PACKAGE_SEGMENT_SIZE, PASSWORD_KEY_ENCRYPTOR_NS, PASSWORD_KEY_ENCRYPTOR_URI, STREAM_ENCRYPTED_PACKAGE, STREAM_ENCRYPTION_INFO, aesCbcDecrypt, aesCbcEncrypt, concatBytes, deriveAgileIv, deriveAgileKey, encodePasswordUtf16Le, hashBytes, hashDigestLength, hmacBytes, timingSafeEqual, AgileHashName, } from './encryption/index';
package/src/index.js ADDED
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Shared OOXML codecs and domain models for EJ2 Office JavaScript libraries.
3
+ * Consume from git / local workspace; not published to npm.
4
+ *
5
+ * Feature modules are added incrementally (ink, mathml, encryption, …). Root
6
+ * entry re-exports the public surface as features land, including the OFFCRYPTO
7
+ * Agile decrypt surface from ./encryption.
8
+ *
9
+ * @packageDocumentation
10
+ */
11
+ /**
12
+ * Package identity string for consumers proving resolution (TASK-9001).
13
+ *
14
+ * @public
15
+ */
16
+ export var OFFICE_COMMON_PACKAGE_NAME = '@syncfusion/ej2-office-common';
17
+ export { INKML_NAMESPACE, INK_CONTENT_TYPE, INK_SOURCE_RELATIONSHIP_TYPE, WORDML_2010_NAMESPACE, WORDPROCESSING_INK_URI, INK_EFFECT_COLORS, inkEffectColor, computeInkBounds, decodeTrace, encodeTrace, scalePointsStretch, scalePointsUniform, addInkTrace, cloneInk, createInk, inkPathPoints, isOfficeInk, DIAG_INVALID_INK_TRACE, getLastInkParseDiagnostics, parseInkXml, serializeInkXml, EMUS_PER_POINT, formatUnitValue, pointsToUnit, unitValueToPoints, } from './features/ink/index';
18
+ // ─── mathml (OMML) public surface — @syncfusion/ej2-office-common/mathml ──────────────────
19
+ export { MATH_NAMESPACE, MATH_PREFIX_FALLBACKS, WML_TRANSITIONAL_NAMESPACE, XML_NAMESPACE, MATH_BREAKBIN_VALUES, MATH_BREAKBINSUB_VALUES, MATH_FTYPE_VALUES, MATH_JC_VALUES, MATH_LIMLOC_VALUES, MATH_SCRIPT_VALUES, MATH_SHP_VALUES, MATH_SPACING_RULE_VALUES, MATH_STYLE_VALUES, MATH_TOPBOT_VALUES, emitOnOff, isInteger2, isInteger255, isSpacingRule, isUnSignedInteger, parseMathBreakBin, parseMathBreakBinSub, parseMathFractionType, parseMathJc, parseMathLimLoc, parseMathScript, parseMathShape, parseMathStyle, parseMathTopBot, parseOnOff, MathArgument, MathElement, MathText, UnknownMathElement, mathArg, MathOMath, MathParagraph, MathAccent, MathBar, MathBorderBox, MathBox, MathDelimiter, MathEquationArray, MathFraction, MathFunction, MathGroupCharacter, MathLimitLower, MathLimitUpper, MathMatrix, MathMatrixRow, MathNaryOperator, MathPhantom, MathPreSubSuperscript, MathRadical, MathRun, MathSubscript, MathSubSuperscript, MathSuperscript, parseMathElement, parseMathElements, mathElementToOpenXml, cloneMathElement, mathEqual, attrValue, attrValueNs, childElements, createElement, createText, textContent, } from './features/mathml/index';
20
+ export { decryptOffCryptoPackage, isOffCryptoPackage, DEFAULT_DECRYPT_SECURITY_LIMITS, EncryptedPackageError, InvalidPasswordError, PackageLimitError, resolveDecryptLimits, UnsupportedEncryptionError,
21
+ // fixture / advanced crypto surface
22
+ AGILE_ENCRYPTION_NS, AGILE_RESERVED, AGILE_VERSION_MAJOR, AGILE_VERSION_MINOR, BLOCK_KEY_ENCRYPTOR_KEY, BLOCK_KEY_HMAC_KEY, BLOCK_KEY_HMAC_VALUE, BLOCK_KEY_VERIFIER_HASH, BLOCK_KEY_VERIFIER_INPUT, ENCRYPTED_PACKAGE_SEGMENT_SIZE, PASSWORD_KEY_ENCRYPTOR_NS, PASSWORD_KEY_ENCRYPTOR_URI, STREAM_ENCRYPTED_PACKAGE, STREAM_ENCRYPTION_INFO, aesCbcDecrypt, aesCbcEncrypt, concatBytes, deriveAgileIv, deriveAgileKey, encodePasswordUtf16Le, hashBytes, hashDigestLength, hmacBytes, timingSafeEqual, } from './encryption/index';
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "./tsconfig.harness.json",
3
+ "compilerOptions": {
4
+ "noEmit": false,
5
+ "rootDir": "src",
6
+ "outDir": "dist",
7
+ "declaration": true,
8
+ "declarationMap": true,
9
+ "sourceMap": true,
10
+ "stripInternal": true
11
+ },
12
+ "include": ["src/**/*.ts"]
13
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2018",
4
+ "module": "ES2015",
5
+ "moduleResolution": "node",
6
+ "lib": [
7
+ "ES2018",
8
+ "DOM"
9
+ ],
10
+ "declaration": true,
11
+ "strict": false,
12
+ "noImplicitAny": true,
13
+ "noImplicitReturns": true,
14
+ "noFallthroughCasesInSwitch": true,
15
+ "forceConsistentCasingInFileNames": true,
16
+ "skipLibCheck": true,
17
+ "noEmit": true,
18
+ "rootDir": "src",
19
+ "types": [],
20
+ "strictNullChecks": false,
21
+ "strictPropertyInitialization": false
22
+ },
23
+ "include": [
24
+ "src/**/*.ts"
25
+ ],
26
+ "exclude": [
27
+ "src/**/*.spec.ts",
28
+ "node_modules",
29
+ "dist",
30
+ "coverage"
31
+ ]
32
+ }
package/tslint.json ADDED
@@ -0,0 +1,111 @@
1
+ {
2
+ "rules": {
3
+ "chai-vague-errors": true,
4
+ "use-isnan": true,
5
+ "missing-jsdoc": true,
6
+ "missing-optional-annotation": true,
7
+ "no-backbone-get-set-outside-model": true,
8
+ "no-banned-terms": true,
9
+ "no-constant-condition": true,
10
+ "no-control-regex": true,
11
+ "no-cookies": true,
12
+ "no-delete-expression": true,
13
+ "no-document-write": true,
14
+ "no-document-domain": true,
15
+ "no-disable-auto-sanitization": true,
16
+ "no-duplicate-case": true,
17
+ "no-duplicate-parameter-names": true,
18
+ "no-empty-interfaces": true,
19
+ "no-exec-script": true,
20
+ "no-function-constructor-with-string-args": true,
21
+ "no-function-expression": true,
22
+ "no-invalid-regexp": true,
23
+ "no-for-in": true,
24
+ "member-access": true,
25
+ "no-multiline-string": true,
26
+ "no-multiple-var-decl": true,
27
+ "no-unnecessary-bind": true,
28
+ "no-unnecessary-semicolons": true,
29
+ "no-octal-literal": true,
30
+ "no-regex-spaces": true,
31
+ "no-sparse-arrays": true,
32
+ "no-string-based-set-immediate": true,
33
+ "no-string-based-set-interval": true,
34
+ "no-unused-imports": true,
35
+ "no-with-statement": true,
36
+ "prefer-array-literal": true,
37
+ "promise-must-complete": false,
38
+ "react-no-dangerous-html": true,
39
+ "use-named-parameter": true,
40
+ "valid-typeof": true,
41
+ "max-func-body-length": [true, 100, {
42
+ "ignore-parameters-to-function-regex": "describe"
43
+ }],
44
+ "class-name": true,
45
+ "curly": true,
46
+ "eofline": false,
47
+ "forin": true,
48
+ "indent": [
49
+ true,
50
+ "spaces"
51
+ ],
52
+ "label-position": true,
53
+ "max-line-length": [true, 140],
54
+ "no-arg": true,
55
+ "no-console": [true,
56
+ "debug",
57
+ "info",
58
+ "log",
59
+ "time",
60
+ "timeEnd",
61
+ "trace"
62
+ ],
63
+ "no-construct": true,
64
+ "no-parameter-properties": true,
65
+ "no-debugger": true,
66
+ "no-duplicate-variable": true,
67
+ "no-empty": true,
68
+ "no-eval": true,
69
+ "no-string-literal": true,
70
+ "no-switch-case-fall-through": true,
71
+ "trailing-comma": true,
72
+ "no-trailing-whitespace": true,
73
+ "no-unused-expression": true,
74
+ "no-use-before-declare": false,
75
+ "no-var-requires": true,
76
+ "one-line": [true,
77
+ "check-open-brace",
78
+ "check-catch",
79
+ "check-else",
80
+ "check-whitespace"
81
+ ],
82
+ "no-any": true,
83
+ "no-conditional-assignment": true,
84
+ "no-angle-bracket-type-assertion": false,
85
+ "align": [true, "parameters", "arguments", "statements"],
86
+ "no-empty-line-after-opening-brace": false,
87
+ "typedef-whitespace": [false],
88
+ "ban": true,
89
+ "quotemark": [true, "single"],
90
+ "semicolon": true,
91
+ "triple-equals": [true, "allow-null-check"],
92
+ "typedef": [true,
93
+ "call-signature",
94
+ "parameter",
95
+ "property-declaration",
96
+ "variable-declaration",
97
+ "arrow-parameter",
98
+ "member-variable-declaration"],
99
+ "variable-name": true,
100
+ "whitespace": [true,
101
+ "check-branch",
102
+ "check-decl",
103
+ "check-operator",
104
+ "check-separator",
105
+ "check-type"
106
+ ],
107
+ "jsdoc-format": true,
108
+ "no-var-keyword": true,
109
+ "radix": true
110
+ }
111
+ }