@syncfusion/ej2-office-common 35.1.37 → 35.1.43
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/dist/ej2-office-common.umd.min.js +2 -2
- package/dist/ej2-office-common.umd.min.js.map +1 -1
- package/dist/es6/ej2-office-common.es2015.js +5421 -6017
- package/dist/es6/ej2-office-common.es2015.js.map +1 -1
- package/dist/es6/ej2-office-common.es5.js +6270 -7203
- package/dist/es6/ej2-office-common.es5.js.map +1 -1
- package/dist/global/ej2-office-common.min.js +2 -2
- package/dist/global/ej2-office-common.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/office-common.js +4 -0
- package/package.json +11 -7
- package/src/index.d.ts +3 -17
- package/src/index.js +3 -18
- package/src/office-common/features/index.d.ts +6 -0
- package/src/office-common/features/index.js +6 -0
- package/src/office-common/features/mathml/index.d.ts +25 -0
- package/src/office-common/features/mathml/index.js +22 -0
- package/src/office-common/features/mathml/latex/latex-generator.d.ts +8 -0
- package/src/office-common/features/mathml/latex/latex-generator.js +357 -0
- package/src/office-common/features/mathml/latex/latex-parser.d.ts +87 -0
- package/src/office-common/features/mathml/latex/latex-parser.js +1206 -0
- package/src/office-common/features/mathml/latex/latex-symbols.d.ts +13 -0
- package/src/office-common/features/mathml/latex/latex-symbols.js +681 -0
- package/src/office-common/features/mathml/math-settings.d.ts +54 -0
- package/src/office-common/features/mathml/math-settings.js +174 -0
- package/src/office-common/features/mathml/office-math/adapter.d.ts +59 -0
- package/src/office-common/features/mathml/office-math/adapter.js +6 -0
- package/src/office-common/features/mathml/office-math/basic.d.ts +91 -0
- package/src/office-common/features/mathml/office-math/basic.js +93 -0
- package/src/office-common/features/mathml/office-math/break.d.ts +30 -0
- package/src/office-common/features/mathml/office-math/break.js +75 -0
- package/src/office-common/features/mathml/office-math/collection.d.ts +104 -0
- package/src/office-common/features/mathml/office-math/collection.js +170 -0
- package/src/office-common/features/mathml/office-math/entity.d.ts +12 -0
- package/src/office-common/features/mathml/office-math/entity.js +3 -0
- package/src/office-common/features/mathml/office-math/enums.d.ts +97 -0
- package/src/office-common/features/mathml/office-math/enums.js +108 -0
- package/src/office-common/features/mathml/office-math/format.d.ts +28 -0
- package/src/office-common/features/mathml/office-math/format.js +90 -0
- package/src/office-common/features/mathml/office-math/function-base.d.ts +27 -0
- package/src/office-common/features/mathml/office-math/function-base.js +69 -0
- package/src/office-common/features/mathml/office-math/function-collection.d.ts +29 -0
- package/src/office-common/features/mathml/office-math/function-collection.js +76 -0
- package/src/office-common/features/mathml/office-math/functions-basic.d.ts +118 -0
- package/src/office-common/features/mathml/office-math/functions-basic.js +331 -0
- package/src/office-common/features/mathml/office-math/functions-multi.d.ts +156 -0
- package/src/office-common/features/mathml/office-math/functions-multi.js +407 -0
- package/src/office-common/features/mathml/office-math/index.d.ts +27 -0
- package/src/office-common/features/mathml/office-math/index.js +25 -0
- package/src/office-common/features/mathml/office-math/keys.d.ts +6 -0
- package/src/office-common/features/mathml/office-math/keys.js +20 -0
- package/src/office-common/features/mathml/office-math/math-clone.d.ts +20 -0
- package/src/office-common/features/mathml/office-math/math-clone.js +203 -0
- package/src/office-common/features/mathml/office-math/math-collection.d.ts +19 -0
- package/src/office-common/features/mathml/office-math/math-collection.js +41 -0
- package/src/office-common/features/mathml/office-math/math-equality.d.ts +21 -0
- package/src/office-common/features/mathml/office-math/math-equality.js +115 -0
- package/src/office-common/features/mathml/office-math/math-paragraph.d.ts +58 -0
- package/src/office-common/features/mathml/office-math/math-paragraph.js +126 -0
- package/src/office-common/features/mathml/office-math/math-traversal.d.ts +23 -0
- package/src/office-common/features/mathml/office-math/math-traversal.js +95 -0
- package/src/office-common/features/mathml/office-math/matrix-collections.d.ts +54 -0
- package/src/office-common/features/mathml/office-math/matrix-collections.js +113 -0
- package/src/office-common/features/mathml/office-math/matrix-column.d.ts +43 -0
- package/src/office-common/features/mathml/office-math/matrix-column.js +96 -0
- package/src/office-common/features/mathml/office-math/matrix-row.d.ts +38 -0
- package/src/office-common/features/mathml/office-math/matrix-row.js +71 -0
- package/src/office-common/features/mathml/office-math/matrix.d.ts +62 -0
- package/src/office-common/features/mathml/office-math/matrix.js +158 -0
- package/src/office-common/features/mathml/office-math/office-math.d.ts +55 -0
- package/src/office-common/features/mathml/office-math/office-math.js +116 -0
- package/src/office-common/features/mathml/office-math/owner-holder.d.ts +42 -0
- package/src/office-common/features/mathml/office-math/owner-holder.js +87 -0
- package/src/office-common/features/mathml/office-math/property-store.d.ts +66 -0
- package/src/office-common/features/mathml/office-math/property-store.js +99 -0
- package/src/office-common/features/mathml/office-math/run-element.d.ts +31 -0
- package/src/office-common/features/mathml/office-math/run-element.js +97 -0
- package/src/office-common/features/mathml/office-math/unknown-element.d.ts +37 -0
- package/src/office-common/features/mathml/office-math/unknown-element.js +62 -0
- package/src/office-common/features/mathml/office-math/xml-equal.d.ts +13 -0
- package/src/office-common/features/mathml/office-math/xml-equal.js +24 -0
- package/src/office-common/features/mathml/parse/office-math-parser.d.ts +24 -0
- package/src/office-common/features/mathml/parse/office-math-parser.js +396 -0
- package/src/office-common/features/mathml/parse/office-math-properties.d.ts +165 -0
- package/src/office-common/features/mathml/parse/office-math-properties.js +432 -0
- package/src/office-common/features/mathml/parse/parse-options.d.ts +22 -0
- package/src/office-common/features/mathml/parse/parse-options.js +3 -0
- package/src/office-common/features/mathml/serialize/office-math-properties-writer.d.ts +38 -0
- package/src/office-common/features/mathml/serialize/office-math-properties-writer.js +267 -0
- package/src/office-common/features/mathml/serialize/office-math-serializer.d.ts +23 -0
- package/src/office-common/features/mathml/serialize/office-math-serializer.js +306 -0
- package/src/office-common/features/mathml/serialize/omml-writer.d.ts +123 -0
- package/src/office-common/features/mathml/serialize/omml-writer.js +135 -0
- package/src/office-common/index.d.ts +10 -0
- package/src/office-common/index.js +10 -0
- package/.eslintrc.json +0 -263
- package/.prettierrc.json +0 -5
- package/api-extractor.json +0 -35
- package/core.js +0 -4
- package/encryption.js +0 -4
- package/features.js +0 -4
- package/global.json +0 -6
- package/nuget.config +0 -7
- package/src/all.d.ts +0 -41
- package/src/all.js +0 -38
- package/src/features/index.d.ts +0 -11
- package/src/features/index.js +0 -11
- package/src/features/mathml/index.d.ts +0 -30
- package/src/features/mathml/index.js +0 -22
- package/src/features/mathml/math-factory.d.ts +0 -26
- package/src/features/mathml/math-factory.js +0 -568
- package/src/features/mathml/model/controls.d.ts +0 -896
- package/src/features/mathml/model/controls.js +0 -1541
- package/src/features/mathml/model/math-element.d.ts +0 -173
- package/src/features/mathml/model/math-element.js +0 -315
- package/src/features/mathml/model/roots.d.ts +0 -82
- package/src/features/mathml/model/roots.js +0 -177
- package/src/features/mathml/parse/math-parser.d.ts +0 -43
- package/src/features/mathml/parse/math-parser.js +0 -636
- package/src/features/mathml/serialize/math-serializer.d.ts +0 -34
- package/src/features/mathml/serialize/math-serializer.js +0 -749
- package/tsconfig.build.json +0 -13
- package/tsconfig.harness.json +0 -32
- package/tslint.json +0 -111
- /package/src/{core → office-common/core}/index.d.ts +0 -0
- /package/src/{core → office-common/core}/index.js +0 -0
- /package/src/{core → office-common/core}/xml/index.d.ts +0 -0
- /package/src/{core → office-common/core}/xml/index.js +0 -0
- /package/src/{core → office-common/core}/xml/model.d.ts +0 -0
- /package/src/{core → office-common/core}/xml/model.js +0 -0
- /package/src/{encryption → office-common/encryption}/agile-constants.d.ts +0 -0
- /package/src/{encryption → office-common/encryption}/agile-constants.js +0 -0
- /package/src/{encryption → office-common/encryption}/agile-encryption-info.d.ts +0 -0
- /package/src/{encryption → office-common/encryption}/agile-encryption-info.js +0 -0
- /package/src/{encryption → office-common/encryption}/agile-password.d.ts +0 -0
- /package/src/{encryption → office-common/encryption}/agile-password.js +0 -0
- /package/src/{encryption → office-common/encryption}/cfb-reader.d.ts +0 -0
- /package/src/{encryption → office-common/encryption}/cfb-reader.js +0 -0
- /package/src/{encryption → office-common/encryption}/crypto-primitives.d.ts +0 -0
- /package/src/{encryption → office-common/encryption}/crypto-primitives.js +0 -0
- /package/src/{encryption → office-common/encryption}/decrypt-encrypted-package.d.ts +0 -0
- /package/src/{encryption → office-common/encryption}/decrypt-encrypted-package.js +0 -0
- /package/src/{encryption → office-common/encryption}/encryption-info-xml.d.ts +0 -0
- /package/src/{encryption → office-common/encryption}/encryption-info-xml.js +0 -0
- /package/src/{encryption → office-common/encryption}/errors.d.ts +0 -0
- /package/src/{encryption → office-common/encryption}/errors.js +0 -0
- /package/src/{encryption → office-common/encryption}/index.d.ts +0 -0
- /package/src/{encryption → office-common/encryption}/index.js +0 -0
- /package/src/{features → office-common/features}/diagrams/constants.d.ts +0 -0
- /package/src/{features → office-common/features}/diagrams/constants.js +0 -0
- /package/src/{features → office-common/features}/diagrams/diagram-data-model.d.ts +0 -0
- /package/src/{features → office-common/features}/diagrams/diagram-data-model.js +0 -0
- /package/src/{features → office-common/features}/diagrams/diagram-parsers.d.ts +0 -0
- /package/src/{features → office-common/features}/diagrams/diagram-parsers.js +0 -0
- /package/src/{features → office-common/features}/diagrams/diagram-serializers.d.ts +0 -0
- /package/src/{features → office-common/features}/diagrams/diagram-serializers.js +0 -0
- /package/src/{features → office-common/features}/diagrams/diagram-views.d.ts +0 -0
- /package/src/{features → office-common/features}/diagrams/diagram-views.js +0 -0
- /package/src/{features → office-common/features}/diagrams/element-tree.d.ts +0 -0
- /package/src/{features → office-common/features}/diagrams/element-tree.js +0 -0
- /package/src/{features → office-common/features}/diagrams/errors.d.ts +0 -0
- /package/src/{features → office-common/features}/diagrams/errors.js +0 -0
- /package/src/{features → office-common/features}/diagrams/index.d.ts +0 -0
- /package/src/{features → office-common/features}/diagrams/index.js +0 -0
- /package/src/{features → office-common/features}/diagrams/smart-art-catalog.d.ts +0 -0
- /package/src/{features → office-common/features}/diagrams/smart-art-catalog.js +0 -0
- /package/src/{features → office-common/features}/diagrams/smart-art-diagram.d.ts +0 -0
- /package/src/{features → office-common/features}/diagrams/smart-art-diagram.js +0 -0
- /package/src/{features → office-common/features}/ink/constants.d.ts +0 -0
- /package/src/{features → office-common/features}/ink/constants.js +0 -0
- /package/src/{features → office-common/features}/ink/index.d.ts +0 -0
- /package/src/{features → office-common/features}/ink/index.js +0 -0
- /package/src/{features → office-common/features}/ink/ink-effects.d.ts +0 -0
- /package/src/{features → office-common/features}/ink/ink-effects.js +0 -0
- /package/src/{features → office-common/features}/ink/ink-model.d.ts +0 -0
- /package/src/{features → office-common/features}/ink/ink-model.js +0 -0
- /package/src/{features → office-common/features}/ink/ink-parser.d.ts +0 -0
- /package/src/{features → office-common/features}/ink/ink-parser.js +0 -0
- /package/src/{features → office-common/features}/ink/ink-serializer.d.ts +0 -0
- /package/src/{features → office-common/features}/ink/ink-serializer.js +0 -0
- /package/src/{features → office-common/features}/ink/ink-units.d.ts +0 -0
- /package/src/{features → office-common/features}/ink/ink-units.js +0 -0
- /package/src/{features → office-common/features}/ink/ink-xml.d.ts +0 -0
- /package/src/{features → office-common/features}/ink/ink-xml.js +0 -0
- /package/src/{features → office-common/features}/ink/trace-codec.d.ts +0 -0
- /package/src/{features → office-common/features}/ink/trace-codec.js +0 -0
- /package/src/{features → office-common/features}/mathml/constants.d.ts +0 -0
- /package/src/{features → office-common/features}/mathml/constants.js +0 -0
- /package/src/{features → office-common/features}/mathml/errors.d.ts +0 -0
- /package/src/{features → office-common/features}/mathml/errors.js +0 -0
- /package/src/{features → office-common/features}/mathml/model/enums.d.ts +0 -0
- /package/src/{features → office-common/features}/mathml/model/enums.js +0 -0
- /package/src/{features → office-common/features}/mathml/openxml.d.ts +0 -0
- /package/src/{features → office-common/features}/mathml/openxml.js +0 -0
- /package/src/{features → office-common/features}/smart-art/diagram-xml.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/diagram-xml.js +0 -0
- /package/src/{features → office-common/features}/smart-art/errors.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/errors.js +0 -0
- /package/src/{features → office-common/features}/smart-art/index.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/index.js +0 -0
- /package/src/{features → office-common/features}/smart-art/minimal-samples.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/minimal-samples.js +0 -0
- /package/src/{features → office-common/features}/smart-art/mutators.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/mutators.js +0 -0
- /package/src/{features → office-common/features}/smart-art/namespaces.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/namespaces.js +0 -0
- /package/src/{features → office-common/features}/smart-art/package-graph.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/package-graph.js +0 -0
- /package/src/{features → office-common/features}/smart-art/parse-colors.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/parse-colors.js +0 -0
- /package/src/{features → office-common/features}/smart-art/parse-data.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/parse-data.js +0 -0
- /package/src/{features → office-common/features}/smart-art/parse-layout.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/parse-layout.js +0 -0
- /package/src/{features → office-common/features}/smart-art/parse-rel-ids.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/parse-rel-ids.js +0 -0
- /package/src/{features → office-common/features}/smart-art/parse-style.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/parse-style.js +0 -0
- /package/src/{features → office-common/features}/smart-art/point-text.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/point-text.js +0 -0
- /package/src/{features → office-common/features}/smart-art/register.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/register.js +0 -0
- /package/src/{features → office-common/features}/smart-art/serialize.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/serialize.js +0 -0
- /package/src/{features → office-common/features}/smart-art/types.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/types.js +0 -0
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Math root containers: `m:oMathPara`, `m:oMath`.
|
|
3
|
-
*
|
|
4
|
-
* Source: ECMA-376-4 Annex A.8.1 `CT_OMathPara`, `CT_OMath`.
|
|
5
|
-
*/
|
|
6
|
-
var __extends = (this && this.__extends) || (function () {
|
|
7
|
-
var extendStatics = function (d, b) {
|
|
8
|
-
extendStatics = Object.setPrototypeOf ||
|
|
9
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
10
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
11
|
-
return extendStatics(d, b);
|
|
12
|
-
};
|
|
13
|
-
return function (d, b) {
|
|
14
|
-
extendStatics(d, b);
|
|
15
|
-
function __() { this.constructor = d; }
|
|
16
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
17
|
-
};
|
|
18
|
-
})();
|
|
19
|
-
var __assign = (this && this.__assign) || function () {
|
|
20
|
-
__assign = Object.assign || function(t) {
|
|
21
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
22
|
-
s = arguments[i];
|
|
23
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
24
|
-
t[p] = s[p];
|
|
25
|
-
}
|
|
26
|
-
return t;
|
|
27
|
-
};
|
|
28
|
-
return __assign.apply(this, arguments);
|
|
29
|
-
};
|
|
30
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
31
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
32
|
-
if (!m) return o;
|
|
33
|
-
var i = m.call(o), r, ar = [], e;
|
|
34
|
-
try {
|
|
35
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
36
|
-
}
|
|
37
|
-
catch (error) { e = { error: error }; }
|
|
38
|
-
finally {
|
|
39
|
-
try {
|
|
40
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
41
|
-
}
|
|
42
|
-
finally { if (e) throw e.error; }
|
|
43
|
-
}
|
|
44
|
-
return ar;
|
|
45
|
-
};
|
|
46
|
-
var __spread = (this && this.__spread) || function () {
|
|
47
|
-
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
48
|
-
return ar;
|
|
49
|
-
};
|
|
50
|
-
import { MathElement } from './math-element';
|
|
51
|
-
import { MathmlValidationError } from '../errors';
|
|
52
|
-
/**
|
|
53
|
-
* Display-math paragraph (`m:oMathPara`) — a block of one or more office-math equations.
|
|
54
|
-
*
|
|
55
|
-
* Child sequence: `oMathParaPr?`, `oMath` (1..∞).
|
|
56
|
-
*
|
|
57
|
-
* @public
|
|
58
|
-
*/
|
|
59
|
-
var MathParagraph = /** @class */ (function (_super) {
|
|
60
|
-
__extends(MathParagraph, _super);
|
|
61
|
-
function MathParagraph(properties, equations) {
|
|
62
|
-
if (properties === void 0) { properties = {}; }
|
|
63
|
-
if (equations === void 0) { equations = []; }
|
|
64
|
-
var _this = _super.call(this) || this;
|
|
65
|
-
/**
|
|
66
|
-
* Math element type for this root (`oMathPara`).
|
|
67
|
-
*/
|
|
68
|
-
_this.type = 'oMathPara';
|
|
69
|
-
_this._properties = Object.freeze(__assign({}, properties));
|
|
70
|
-
_this._equations = __spread(equations);
|
|
71
|
-
return _this;
|
|
72
|
-
}
|
|
73
|
-
Object.defineProperty(MathParagraph.prototype, "properties", {
|
|
74
|
-
/**
|
|
75
|
-
* Paragraph-level math configuration (`m:oMathParaPr`), such as justification (`m:jc`).
|
|
76
|
-
*/
|
|
77
|
-
get: function () {
|
|
78
|
-
return this._properties;
|
|
79
|
-
},
|
|
80
|
-
set: function (next) {
|
|
81
|
-
this.assertMutable();
|
|
82
|
-
this._properties = Object.freeze(__assign({}, next));
|
|
83
|
-
this.notifyMutated();
|
|
84
|
-
},
|
|
85
|
-
enumerable: true,
|
|
86
|
-
configurable: true
|
|
87
|
-
});
|
|
88
|
-
Object.defineProperty(MathParagraph.prototype, "equations", {
|
|
89
|
-
/**
|
|
90
|
-
* Ordered office-math equations in this paragraph (`m:oMath`), each a {@link MathOMath}.
|
|
91
|
-
* At least one equation is required on serialize.
|
|
92
|
-
*/
|
|
93
|
-
get: function () {
|
|
94
|
-
return this._equations;
|
|
95
|
-
},
|
|
96
|
-
enumerable: true,
|
|
97
|
-
configurable: true
|
|
98
|
-
});
|
|
99
|
-
/**
|
|
100
|
-
* Replaces the ordered `m:oMath` equations in this paragraph.
|
|
101
|
-
*/
|
|
102
|
-
MathParagraph.prototype.setEquations = function (next) {
|
|
103
|
-
this.assertMutable();
|
|
104
|
-
this._equations = __spread(next);
|
|
105
|
-
this.notifyMutated();
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* Appends one office-math equation (`m:oMath`) at the end of this paragraph.
|
|
109
|
-
*/
|
|
110
|
-
MathParagraph.prototype.appendEquation = function (equation) {
|
|
111
|
-
this.assertMutable();
|
|
112
|
-
this._equations.push(equation);
|
|
113
|
-
this.notifyMutated();
|
|
114
|
-
};
|
|
115
|
-
/**
|
|
116
|
-
* Validates that this paragraph has at least one `m:oMath` before serialization.
|
|
117
|
-
*
|
|
118
|
-
* @private
|
|
119
|
-
* Called by the OMML serializer; not part of the public authoring API.
|
|
120
|
-
*/
|
|
121
|
-
MathParagraph.prototype.assertSerializable = function (path) {
|
|
122
|
-
if (path === void 0) { path = 'oMathPara'; }
|
|
123
|
-
if (this._equations.length < 1) {
|
|
124
|
-
throw new MathmlValidationError('m:oMathPara requires at least one m:oMath (CT_OMathPara)', path, 'required-child');
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
return MathParagraph;
|
|
128
|
-
}(MathElement));
|
|
129
|
-
export { MathParagraph };
|
|
130
|
-
/**
|
|
131
|
-
* Inline office-math root (`m:oMath`) — one equation body of math elements.
|
|
132
|
-
*
|
|
133
|
-
* Child sequence: `EG_OMathElements` (0..∞).
|
|
134
|
-
*
|
|
135
|
-
* @public
|
|
136
|
-
*/
|
|
137
|
-
var MathOMath = /** @class */ (function (_super) {
|
|
138
|
-
__extends(MathOMath, _super);
|
|
139
|
-
function MathOMath(children) {
|
|
140
|
-
if (children === void 0) { children = []; }
|
|
141
|
-
var _this = _super.call(this) || this;
|
|
142
|
-
/**
|
|
143
|
-
* Math element type for this root (`oMath`).
|
|
144
|
-
*/
|
|
145
|
-
_this.type = 'oMath';
|
|
146
|
-
_this._children = __spread(children);
|
|
147
|
-
return _this;
|
|
148
|
-
}
|
|
149
|
-
Object.defineProperty(MathOMath.prototype, "children", {
|
|
150
|
-
/**
|
|
151
|
-
* Ordered math children of this equation (`EG_OMathElements`).
|
|
152
|
-
*/
|
|
153
|
-
get: function () {
|
|
154
|
-
return this._children;
|
|
155
|
-
},
|
|
156
|
-
enumerable: true,
|
|
157
|
-
configurable: true
|
|
158
|
-
});
|
|
159
|
-
/**
|
|
160
|
-
* Replaces the ordered math children of this equation.
|
|
161
|
-
*/
|
|
162
|
-
MathOMath.prototype.setChildren = function (next) {
|
|
163
|
-
this.assertMutable();
|
|
164
|
-
this._children = __spread(next);
|
|
165
|
-
this.notifyMutated();
|
|
166
|
-
};
|
|
167
|
-
/**
|
|
168
|
-
* Appends one math element at the end of this equation.
|
|
169
|
-
*/
|
|
170
|
-
MathOMath.prototype.appendChild = function (child) {
|
|
171
|
-
this.assertMutable();
|
|
172
|
-
this._children.push(child);
|
|
173
|
-
this.notifyMutated();
|
|
174
|
-
};
|
|
175
|
-
return MathOMath;
|
|
176
|
-
}(MathElement));
|
|
177
|
-
export { MathOMath };
|
|
@@ -1,43 +0,0 @@
|
|
|
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[];
|