@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.
- package/.eslintrc.json +263 -0
- package/.prettierrc.json +5 -0
- package/README.md +167 -0
- package/api-extractor.json +35 -0
- package/core.js +4 -0
- package/dist/ej2-office-common.umd.min.js +11 -0
- package/dist/ej2-office-common.umd.min.js.map +1 -0
- package/dist/es6/ej2-office-common.es2015.js +6585 -0
- package/dist/es6/ej2-office-common.es2015.js.map +1 -0
- package/dist/es6/ej2-office-common.es5.js +7955 -0
- package/dist/es6/ej2-office-common.es5.js.map +1 -0
- package/dist/global/ej2-office-common.min.js +11 -0
- package/dist/global/ej2-office-common.min.js.map +1 -0
- package/dist/global/index.d.ts +14 -0
- package/encryption.js +4 -0
- package/features.js +4 -0
- package/global.json +6 -0
- package/index.js +4 -0
- package/license +10 -0
- package/nuget.config +7 -0
- package/package.json +23 -0
- package/src/all.d.ts +41 -0
- package/src/all.js +38 -0
- package/src/core/index.d.ts +6 -0
- package/src/core/index.js +6 -0
- package/src/core/xml/index.d.ts +7 -0
- package/src/core/xml/index.js +6 -0
- package/src/core/xml/model.d.ts +71 -0
- package/src/core/xml/model.js +20 -0
- package/src/encryption/agile-constants.d.ts +61 -0
- package/src/encryption/agile-constants.js +71 -0
- package/src/encryption/agile-encryption-info.d.ts +46 -0
- package/src/encryption/agile-encryption-info.js +333 -0
- package/src/encryption/agile-password.d.ts +8 -0
- package/src/encryption/agile-password.js +58 -0
- package/src/encryption/cfb-reader.d.ts +11 -0
- package/src/encryption/cfb-reader.js +345 -0
- package/src/encryption/crypto-primitives.d.ts +74 -0
- package/src/encryption/crypto-primitives.js +302 -0
- package/src/encryption/decrypt-encrypted-package.d.ts +16 -0
- package/src/encryption/decrypt-encrypted-package.js +138 -0
- package/src/encryption/encryption-info-xml.d.ts +21 -0
- package/src/encryption/encryption-info-xml.js +282 -0
- package/src/encryption/errors.d.ts +66 -0
- package/src/encryption/errors.js +124 -0
- package/src/encryption/index.d.ts +35 -0
- package/src/encryption/index.js +100 -0
- package/src/features/diagrams/constants.d.ts +83 -0
- package/src/features/diagrams/constants.js +101 -0
- package/src/features/diagrams/diagram-data-model.d.ts +148 -0
- package/src/features/diagrams/diagram-data-model.js +446 -0
- package/src/features/diagrams/diagram-parsers.d.ts +28 -0
- package/src/features/diagrams/diagram-parsers.js +182 -0
- package/src/features/diagrams/diagram-serializers.d.ts +20 -0
- package/src/features/diagrams/diagram-serializers.js +110 -0
- package/src/features/diagrams/diagram-views.d.ts +60 -0
- package/src/features/diagrams/diagram-views.js +213 -0
- package/src/features/diagrams/element-tree.d.ts +55 -0
- package/src/features/diagrams/element-tree.js +197 -0
- package/src/features/diagrams/errors.d.ts +17 -0
- package/src/features/diagrams/errors.js +59 -0
- package/src/features/diagrams/index.d.ts +17 -0
- package/src/features/diagrams/index.js +17 -0
- package/src/features/diagrams/smart-art-catalog.d.ts +107 -0
- package/src/features/diagrams/smart-art-catalog.js +422 -0
- package/src/features/diagrams/smart-art-diagram.d.ts +96 -0
- package/src/features/diagrams/smart-art-diagram.js +258 -0
- package/src/features/index.d.ts +11 -0
- package/src/features/index.js +11 -0
- package/src/features/ink/constants.d.ts +54 -0
- package/src/features/ink/constants.js +54 -0
- package/src/features/ink/index.d.ts +18 -0
- package/src/features/ink/index.js +15 -0
- package/src/features/ink/ink-effects.d.ts +35 -0
- package/src/features/ink/ink-effects.js +45 -0
- package/src/features/ink/ink-model.d.ts +237 -0
- package/src/features/ink/ink-model.js +406 -0
- package/src/features/ink/ink-parser.d.ts +59 -0
- package/src/features/ink/ink-parser.js +671 -0
- package/src/features/ink/ink-serializer.d.ts +16 -0
- package/src/features/ink/ink-serializer.js +281 -0
- package/src/features/ink/ink-units.d.ts +33 -0
- package/src/features/ink/ink-units.js +92 -0
- package/src/features/ink/ink-xml.d.ts +26 -0
- package/src/features/ink/ink-xml.js +165 -0
- package/src/features/ink/trace-codec.d.ts +127 -0
- package/src/features/ink/trace-codec.js +266 -0
- package/src/features/mathml/constants.d.ts +47 -0
- package/src/features/mathml/constants.js +47 -0
- package/src/features/mathml/errors.d.ts +50 -0
- package/src/features/mathml/errors.js +69 -0
- package/src/features/mathml/index.d.ts +30 -0
- package/src/features/mathml/index.js +22 -0
- package/src/features/mathml/math-factory.d.ts +26 -0
- package/src/features/mathml/math-factory.js +568 -0
- package/src/features/mathml/model/controls.d.ts +896 -0
- package/src/features/mathml/model/controls.js +1541 -0
- package/src/features/mathml/model/enums.d.ts +153 -0
- package/src/features/mathml/model/enums.js +133 -0
- package/src/features/mathml/model/math-element.d.ts +173 -0
- package/src/features/mathml/model/math-element.js +315 -0
- package/src/features/mathml/model/roots.d.ts +82 -0
- package/src/features/mathml/model/roots.js +177 -0
- package/src/features/mathml/openxml.d.ts +56 -0
- package/src/features/mathml/openxml.js +87 -0
- package/src/features/mathml/parse/math-parser.d.ts +43 -0
- package/src/features/mathml/parse/math-parser.js +636 -0
- package/src/features/mathml/serialize/math-serializer.d.ts +34 -0
- package/src/features/mathml/serialize/math-serializer.js +749 -0
- package/src/features/smart-art/diagram-xml.d.ts +63 -0
- package/src/features/smart-art/diagram-xml.js +459 -0
- package/src/features/smart-art/errors.d.ts +24 -0
- package/src/features/smart-art/errors.js +47 -0
- package/src/features/smart-art/index.d.ts +26 -0
- package/src/features/smart-art/index.js +26 -0
- package/src/features/smart-art/minimal-samples.d.ts +18 -0
- package/src/features/smart-art/minimal-samples.js +40 -0
- package/src/features/smart-art/mutators.d.ts +60 -0
- package/src/features/smart-art/mutators.js +566 -0
- package/src/features/smart-art/namespaces.d.ts +153 -0
- package/src/features/smart-art/namespaces.js +163 -0
- package/src/features/smart-art/package-graph.d.ts +61 -0
- package/src/features/smart-art/package-graph.js +413 -0
- package/src/features/smart-art/parse-colors.d.ts +19 -0
- package/src/features/smart-art/parse-colors.js +39 -0
- package/src/features/smart-art/parse-data.d.ts +21 -0
- package/src/features/smart-art/parse-data.js +121 -0
- package/src/features/smart-art/parse-layout.d.ts +20 -0
- package/src/features/smart-art/parse-layout.js +40 -0
- package/src/features/smart-art/parse-rel-ids.d.ts +71 -0
- package/src/features/smart-art/parse-rel-ids.js +233 -0
- package/src/features/smart-art/parse-style.d.ts +19 -0
- package/src/features/smart-art/parse-style.js +39 -0
- package/src/features/smart-art/point-text.d.ts +80 -0
- package/src/features/smart-art/point-text.js +424 -0
- package/src/features/smart-art/register.d.ts +33 -0
- package/src/features/smart-art/register.js +95 -0
- package/src/features/smart-art/serialize.d.ts +40 -0
- package/src/features/smart-art/serialize.js +48 -0
- package/src/features/smart-art/types.d.ts +403 -0
- package/src/features/smart-art/types.js +28 -0
- package/src/global.js +1 -0
- package/src/index.d.ts +21 -0
- package/src/index.js +22 -0
- package/tsconfig.build.json +13 -0
- package/tsconfig.harness.json +32 -0
- package/tslint.json +111 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local structural OpenXml element-tree contract for mathml parse/serialize.
|
|
3
|
+
*
|
|
4
|
+
* office-common has no shared `src/core/xml` yet (TASK-9002/9003). This
|
|
5
|
+
* mirrors ej2-docx `src/core/xml/model.ts` so TASK-9011 can pass the same
|
|
6
|
+
* tree shape across the boundary. Unify when core XML lands.
|
|
7
|
+
*
|
|
8
|
+
* These types are part of the public `@syncfusion/ej2-office-common/mathml` surface
|
|
9
|
+
* (parse/serialize boundary). Keep them public under stripInternal builds —
|
|
10
|
+
* never tag this module as internal.
|
|
11
|
+
*/
|
|
12
|
+
var __values = (this && this.__values) || function (o) {
|
|
13
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
|
|
14
|
+
if (m) return m.call(o);
|
|
15
|
+
return {
|
|
16
|
+
next: function () {
|
|
17
|
+
if (o && i >= o.length) o = void 0;
|
|
18
|
+
return { value: o && o[i++], done: !o };
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
/** Create an immutable element node. */
|
|
23
|
+
export function createElement(namespaceUri, localName, prefix, options) {
|
|
24
|
+
return { kind: 'element',
|
|
25
|
+
namespaceUri: namespaceUri,
|
|
26
|
+
localName: localName,
|
|
27
|
+
prefix: prefix,
|
|
28
|
+
attributes: function () {
|
|
29
|
+
var _nc = options == null ? void 0 : options.attributes;
|
|
30
|
+
return _nc != null ? _nc : [];
|
|
31
|
+
}(),
|
|
32
|
+
namespaceDeclarations: function () {
|
|
33
|
+
var _nc = options == null ? void 0 : options.namespaceDeclarations;
|
|
34
|
+
return _nc != null ? _nc : [];
|
|
35
|
+
}(),
|
|
36
|
+
children: function () {
|
|
37
|
+
var _nc = options == null ? void 0 : options.children;
|
|
38
|
+
return _nc != null ? _nc : [];
|
|
39
|
+
}()
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/** Create a text node. */
|
|
43
|
+
export function createText(value) {
|
|
44
|
+
return {
|
|
45
|
+
kind: 'text',
|
|
46
|
+
value: value
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/** Filter element children only. */
|
|
50
|
+
export function childElements(element) {
|
|
51
|
+
return element.children.filter(function (c) { return c.kind === 'element'; });
|
|
52
|
+
}
|
|
53
|
+
/** Read the first matching attribute value by local name (any namespace). */
|
|
54
|
+
export function attrValue(element, localName) {
|
|
55
|
+
return function () {
|
|
56
|
+
var _om = element.attributes.find(function (a) { return a.localName === localName; });
|
|
57
|
+
return _om == null ? void 0 : _om.value;
|
|
58
|
+
}();
|
|
59
|
+
}
|
|
60
|
+
/** Read attribute value restricted to a namespace URI. */
|
|
61
|
+
export function attrValueNs(element, namespaceUri, localName) {
|
|
62
|
+
return function () {
|
|
63
|
+
var _om = element.attributes.find(function (a) { return a.namespaceUri === namespaceUri && a.localName === localName; });
|
|
64
|
+
return _om == null ? void 0 : _om.value;
|
|
65
|
+
}();
|
|
66
|
+
}
|
|
67
|
+
/** Concatenate direct text-node children. */
|
|
68
|
+
export function textContent(element) {
|
|
69
|
+
var e_1, _a;
|
|
70
|
+
var out = '';
|
|
71
|
+
try {
|
|
72
|
+
for (var _b = __values(element.children), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
73
|
+
var child = _c.value;
|
|
74
|
+
if (child.kind === 'text') {
|
|
75
|
+
out += child.value;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
80
|
+
finally {
|
|
81
|
+
try {
|
|
82
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
83
|
+
}
|
|
84
|
+
finally { if (e_1) throw e_1.error; }
|
|
85
|
+
}
|
|
86
|
+
return out;
|
|
87
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tolerant OMML element-tree → typed Math* DOM parser.
|
|
3
|
+
*
|
|
4
|
+
* Source: mathml-spec §8; ECMA-376-4 Annex A.8.1.
|
|
5
|
+
* Never throws on load. Unknown m:* → UnknownMathElement.
|
|
6
|
+
* Malformed required structure → markPreserveOnly + optional diagnostic.
|
|
7
|
+
*/
|
|
8
|
+
import { OpenXmlElement } from '../openxml';
|
|
9
|
+
import { MathElement } from '../model/math-element';
|
|
10
|
+
/**
|
|
11
|
+
* Optional diagnostic callback for degradation events.
|
|
12
|
+
*
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export interface MathParseDiagnostic {
|
|
16
|
+
readonly path: string;
|
|
17
|
+
readonly message: string;
|
|
18
|
+
readonly localName: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Parser options.
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
export interface ParseMathOptions {
|
|
26
|
+
/** Called when a structure is degraded to preserve-only. */
|
|
27
|
+
readonly onDiagnostic?: (d: MathParseDiagnostic) => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Parse a single OMML root element (`m:oMathPara`, `m:oMath`, or any EG_OMathElements member)
|
|
31
|
+
* into a typed {@link MathElement}.
|
|
32
|
+
*
|
|
33
|
+
* Tolerant: never throws. Unknown / malformed nodes degrade rather than abort.
|
|
34
|
+
*
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
export declare function parseMathElement(root: OpenXmlElement, options?: ParseMathOptions): MathElement;
|
|
38
|
+
/**
|
|
39
|
+
* Parse zero or more sibling math roots (e.g. multiple `m:oMath` under a paragraph host).
|
|
40
|
+
*
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
export declare function parseMathElements(roots: ReadonlyArray<OpenXmlElement>, options?: ParseMathOptions): MathElement[];
|