@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
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deep clone of the Math model.
|
|
3
|
+
*/
|
|
4
|
+
var __values = (this && this.__values) || function (o) {
|
|
5
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
|
|
6
|
+
if (m) return m.call(o);
|
|
7
|
+
return {
|
|
8
|
+
next: function () {
|
|
9
|
+
if (o && i >= o.length) o = void 0;
|
|
10
|
+
return { value: o && o[i++], done: !o };
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
import { MathFunctionType } from './enums';
|
|
15
|
+
import { OfficeMath } from './office-math';
|
|
16
|
+
import { OfficeMathParagraph } from './math-paragraph';
|
|
17
|
+
import { OfficeMathUnknownElement } from './unknown-element';
|
|
18
|
+
import { OfficeMathBreak } from './break';
|
|
19
|
+
import { BasicRun } from './basic';
|
|
20
|
+
import { childEquations } from './math-traversal';
|
|
21
|
+
/**
|
|
22
|
+
* Implementation helper. @private
|
|
23
|
+
*
|
|
24
|
+
* @param {OfficeMathBreak} source The source object.
|
|
25
|
+
* @returns {OfficeMathBreak} The result.
|
|
26
|
+
*/
|
|
27
|
+
function cloneBreak(source) {
|
|
28
|
+
var copy = new OfficeMathBreak();
|
|
29
|
+
copy.copyExplicitFrom(source);
|
|
30
|
+
return copy;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Implementation helper. @private
|
|
34
|
+
*
|
|
35
|
+
* @param {OfficeMathRunElement} source The source object.
|
|
36
|
+
* @param {OfficeMathRunElement} target The target to populate.
|
|
37
|
+
* @param {OfficeMathParagraph} root The owning Math paragraph.
|
|
38
|
+
* @returns {void}
|
|
39
|
+
*/
|
|
40
|
+
function cloneRunContent(source, target, root) {
|
|
41
|
+
target.mathFormat.copyExplicitFrom(source.mathFormat);
|
|
42
|
+
if (source.mathFormat.break !== undefined) {
|
|
43
|
+
target.mathFormat.break = cloneBreak(source.mathFormat.break);
|
|
44
|
+
}
|
|
45
|
+
if (source.item === undefined) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (root.adapter !== undefined) {
|
|
49
|
+
target.item = root.adapter.cloneRun(source.item);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
if (source.item instanceof BasicRun) {
|
|
53
|
+
target.item = source.item.clone();
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
var run = new BasicRun();
|
|
57
|
+
run.text = source.text;
|
|
58
|
+
target.item = run;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Implementation helper. @private
|
|
64
|
+
*
|
|
65
|
+
* @param {OfficeMathFunctionBase} source The source object.
|
|
66
|
+
* @param {OfficeMathFunctionBase} target The target to populate.
|
|
67
|
+
* @returns {void}
|
|
68
|
+
*/
|
|
69
|
+
function prepareStructure(source, target) {
|
|
70
|
+
if (source.type === MathFunctionType.Matrix) {
|
|
71
|
+
var from = source;
|
|
72
|
+
var to_1 = target;
|
|
73
|
+
from.columns.toArray().forEach(function (column) { return to_1.columns.add().copyExplicitFrom(column); });
|
|
74
|
+
from.rowItems.forEach(function (row) { return to_1.rows.add().copyExplicitFrom(row); });
|
|
75
|
+
}
|
|
76
|
+
else if (source.type === MathFunctionType.Delimiter || source.type === MathFunctionType.EquationArray) {
|
|
77
|
+
var from = source;
|
|
78
|
+
var to = target;
|
|
79
|
+
for (var i = 0; i < from.equations.count; i++) {
|
|
80
|
+
to.equations.add();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Implementation helper. @private
|
|
86
|
+
*
|
|
87
|
+
* @param {OfficeMathFunctionBase} source The source object.
|
|
88
|
+
* @param {OfficeMathFunctionBase} target The target to populate.
|
|
89
|
+
* @returns {void}
|
|
90
|
+
*/
|
|
91
|
+
function copyFunctionState(source, target) {
|
|
92
|
+
target.copyExplicitFrom(source);
|
|
93
|
+
if (source.hasControlProperties) {
|
|
94
|
+
target.controlProperties = source.controlProperties.clone();
|
|
95
|
+
}
|
|
96
|
+
if (source.type === MathFunctionType.Box && source.break !== undefined) {
|
|
97
|
+
var sourceBreak = source.break;
|
|
98
|
+
var from = source.ownerMathEntity instanceof OfficeMath ? source.ownerMathEntity : undefined;
|
|
99
|
+
var to = target.ownerMathEntity instanceof OfficeMath ? target.ownerMathEntity : undefined;
|
|
100
|
+
var index = from !== undefined ? from.breaks.toArray().indexOf(sourceBreak) : -1;
|
|
101
|
+
target.break = index >= 0 && to !== undefined ? to.breaks.getItem(index) : cloneBreak(sourceBreak);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Implementation helper. @private
|
|
106
|
+
*
|
|
107
|
+
* @param {OfficeMathFunctionBase} source The source object.
|
|
108
|
+
* @param {OfficeMath} destination The destination equation.
|
|
109
|
+
* @param {OfficeMathParagraph} root The owning Math paragraph.
|
|
110
|
+
* @returns {void}
|
|
111
|
+
*/
|
|
112
|
+
function cloneFunctionInto(source, destination, root) {
|
|
113
|
+
if (source instanceof OfficeMathUnknownElement) {
|
|
114
|
+
destination.functions.insert(destination.functions.count, new OfficeMathUnknownElement(source.localName, source.preservedXml));
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
var target = destination.functions.add(source.type);
|
|
118
|
+
copyFunctionState(source, target);
|
|
119
|
+
if (source.type === MathFunctionType.RunElement) {
|
|
120
|
+
cloneRunContent(source, target, root);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
prepareStructure(source, target);
|
|
124
|
+
var from = childEquations(source);
|
|
125
|
+
var to = childEquations(target);
|
|
126
|
+
from.forEach(function (child, i) { return cloneEquationInto(child, to[i], root); });
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Implementation helper. @private
|
|
130
|
+
*
|
|
131
|
+
* @param {OfficeMath} source The source object.
|
|
132
|
+
* @param {OfficeMath} target The target to populate.
|
|
133
|
+
* @param {OfficeMathParagraph} root The owning Math paragraph.
|
|
134
|
+
* @returns {void}
|
|
135
|
+
*/
|
|
136
|
+
function cloneEquationInto(source, target, root) {
|
|
137
|
+
var e_1, _a, e_2, _b;
|
|
138
|
+
target.copyExplicitFrom(source);
|
|
139
|
+
target.preservedControlProperties = source.preservedControlProperties;
|
|
140
|
+
try {
|
|
141
|
+
for (var _c = __values(source.breaks), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
142
|
+
var brk = _d.value;
|
|
143
|
+
target.breaks.add().copyExplicitFrom(brk);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
147
|
+
finally {
|
|
148
|
+
try {
|
|
149
|
+
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
150
|
+
}
|
|
151
|
+
finally { if (e_1) throw e_1.error; }
|
|
152
|
+
}
|
|
153
|
+
try {
|
|
154
|
+
for (var _e = __values(source.functions), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
155
|
+
var fn = _f.value;
|
|
156
|
+
cloneFunctionInto(fn, target, root);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
160
|
+
finally {
|
|
161
|
+
try {
|
|
162
|
+
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
163
|
+
}
|
|
164
|
+
finally { if (e_2) throw e_2.error; }
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Deep-clones an equation as a new, detached equation.
|
|
169
|
+
*
|
|
170
|
+
* @param {OfficeMath} source The equation to clone.
|
|
171
|
+
* @param {OfficeMathParagraph} root Paragraph that supplies the host adapter for the copy.
|
|
172
|
+
* @returns {OfficeMath} An attached copy living under `root`.
|
|
173
|
+
*/
|
|
174
|
+
export function cloneOfficeMath(source, root) {
|
|
175
|
+
var copy = root.maths.add();
|
|
176
|
+
cloneEquationInto(source, copy, root);
|
|
177
|
+
return copy;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Deep-clones a Math paragraph including explicit properties, owners and unknown elements.
|
|
181
|
+
*
|
|
182
|
+
* @param {OfficeMathParagraph} source The paragraph to clone.
|
|
183
|
+
* @returns {OfficeMathParagraph} An independent copy.
|
|
184
|
+
*/
|
|
185
|
+
export function cloneOfficeMathParagraph(source) {
|
|
186
|
+
var e_3, _a;
|
|
187
|
+
var copy = new OfficeMathParagraph(source.adapter);
|
|
188
|
+
copy.copyExplicitFrom(source);
|
|
189
|
+
try {
|
|
190
|
+
for (var _b = __values(source.maths), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
191
|
+
var math = _c.value;
|
|
192
|
+
cloneOfficeMath(math, copy);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
196
|
+
finally {
|
|
197
|
+
try {
|
|
198
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
199
|
+
}
|
|
200
|
+
finally { if (e_3) throw e_3.error; }
|
|
201
|
+
}
|
|
202
|
+
return copy;
|
|
203
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collection of equations (`OfficeMath`).
|
|
3
|
+
*/
|
|
4
|
+
import { OwnedCollection, CollectionOwner } from './collection';
|
|
5
|
+
import { OfficeMath } from './office-math';
|
|
6
|
+
/**
|
|
7
|
+
* Ordered collection of {@link OfficeMath} equations.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export declare class OfficeMathCollection extends OwnedCollection<OfficeMath> {
|
|
12
|
+
constructor(owner: CollectionOwner);
|
|
13
|
+
/**
|
|
14
|
+
* Creates an equation and appends it, or inserts it at `index`.
|
|
15
|
+
*
|
|
16
|
+
* @param index
|
|
17
|
+
*/
|
|
18
|
+
add(index?: number): OfficeMath;
|
|
19
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collection of equations (`OfficeMath`).
|
|
3
|
+
*/
|
|
4
|
+
var __extends = (this && this.__extends) || (function () {
|
|
5
|
+
var extendStatics = function (d, b) {
|
|
6
|
+
extendStatics = Object.setPrototypeOf ||
|
|
7
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
8
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
9
|
+
return extendStatics(d, b);
|
|
10
|
+
};
|
|
11
|
+
return function (d, b) {
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
import { OwnedCollection } from './collection';
|
|
18
|
+
import { OfficeMath } from './office-math';
|
|
19
|
+
/**
|
|
20
|
+
* Ordered collection of {@link OfficeMath} equations.
|
|
21
|
+
*
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
var OfficeMathCollection = /** @class */ (function (_super) {
|
|
25
|
+
__extends(OfficeMathCollection, _super);
|
|
26
|
+
function OfficeMathCollection(owner) {
|
|
27
|
+
return _super.call(this, owner) || this;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Creates an equation and appends it, or inserts it at `index`.
|
|
31
|
+
*
|
|
32
|
+
* @param index
|
|
33
|
+
*/
|
|
34
|
+
OfficeMathCollection.prototype.add = function (index) {
|
|
35
|
+
var item = new OfficeMath();
|
|
36
|
+
this.insertItem(index === undefined ? this.count : index, item);
|
|
37
|
+
return item;
|
|
38
|
+
};
|
|
39
|
+
return OfficeMathCollection;
|
|
40
|
+
}(OwnedCollection));
|
|
41
|
+
export { OfficeMathCollection };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantic equality of two Math trees.
|
|
3
|
+
*/
|
|
4
|
+
import { OfficeMath } from './office-math';
|
|
5
|
+
import { OfficeMathParagraph } from './math-paragraph';
|
|
6
|
+
/**
|
|
7
|
+
* Semantic equality of two equations (shape, text, explicit properties).
|
|
8
|
+
*
|
|
9
|
+
* @param {OfficeMath} a First equation.
|
|
10
|
+
* @param {OfficeMath} b Second equation.
|
|
11
|
+
* @returns {boolean} True when both trees are equal.
|
|
12
|
+
*/
|
|
13
|
+
export declare function officeMathEquals(a: OfficeMath, b: OfficeMath): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Semantic equality of two Math paragraphs.
|
|
16
|
+
*
|
|
17
|
+
* @param {OfficeMathParagraph} a First paragraph.
|
|
18
|
+
* @param {OfficeMathParagraph} b Second paragraph.
|
|
19
|
+
* @returns {boolean} True when both trees are equal.
|
|
20
|
+
*/
|
|
21
|
+
export declare function officeMathParagraphEquals(a: OfficeMathParagraph, b: OfficeMathParagraph): boolean;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantic equality of two Math trees.
|
|
3
|
+
*/
|
|
4
|
+
import { MathFunctionType } from './enums';
|
|
5
|
+
import { OfficeMathUnknownElement } from './unknown-element';
|
|
6
|
+
import { childEquations, breakOf } from './math-traversal';
|
|
7
|
+
import { xmlEqual } from './xml-equal';
|
|
8
|
+
/**
|
|
9
|
+
* Implementation helper. @private
|
|
10
|
+
*
|
|
11
|
+
* @param {OfficeMathBreak | undefined} a First object.
|
|
12
|
+
* @param {OfficeMathBreak | undefined} b Second object.
|
|
13
|
+
* @returns {boolean} The result.
|
|
14
|
+
*/
|
|
15
|
+
function breakEqual(a, b) {
|
|
16
|
+
if (a === undefined || b === undefined) {
|
|
17
|
+
return a === b;
|
|
18
|
+
}
|
|
19
|
+
return a.explicitEquals(b);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Implementation helper. @private
|
|
23
|
+
*
|
|
24
|
+
* @param {OfficeMathFunctionBase} a First object.
|
|
25
|
+
* @param {OfficeMathFunctionBase} b Second object.
|
|
26
|
+
* @returns {boolean} The result.
|
|
27
|
+
*/
|
|
28
|
+
function controlEqual(a, b) {
|
|
29
|
+
if (a.hasControlProperties !== b.hasControlProperties) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
if (!a.hasControlProperties) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
var fa = a.controlProperties;
|
|
36
|
+
return fa.equals === undefined || fa.equals(b.controlProperties);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Implementation helper. @private
|
|
40
|
+
*
|
|
41
|
+
* @param {OfficeMathMatrix} a First object.
|
|
42
|
+
* @param {OfficeMathMatrix} b Second object.
|
|
43
|
+
* @returns {boolean} The result.
|
|
44
|
+
*/
|
|
45
|
+
function matrixShapeEqual(a, b) {
|
|
46
|
+
var ca = a.columns.toArray();
|
|
47
|
+
var cb = b.columns.toArray();
|
|
48
|
+
var ra = a.rowItems;
|
|
49
|
+
var rb = b.rowItems;
|
|
50
|
+
return ca.length === cb.length && ra.length === rb.length
|
|
51
|
+
&& ca.every(function (c, i) { return c.explicitEquals(cb[i]); })
|
|
52
|
+
&& ra.every(function (r, i) { return r.explicitEquals(rb[i]); });
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Implementation helper. @private
|
|
56
|
+
*
|
|
57
|
+
* @param {OfficeMathFunctionBase} a First object.
|
|
58
|
+
* @param {OfficeMathFunctionBase} b Second object.
|
|
59
|
+
* @returns {boolean} The result.
|
|
60
|
+
*/
|
|
61
|
+
function functionEqual(a, b) {
|
|
62
|
+
if (a.type !== b.type || !a.explicitEquals(b) || !controlEqual(a, b)) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
if (a instanceof OfficeMathUnknownElement) {
|
|
66
|
+
var other = b;
|
|
67
|
+
return a.localName === other.localName && xmlEqual(a.preservedXml, other.preservedXml);
|
|
68
|
+
}
|
|
69
|
+
if (!breakEqual(breakOf(a), breakOf(b))) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
if (a.type === MathFunctionType.RunElement) {
|
|
73
|
+
var ra = a;
|
|
74
|
+
var rb = b;
|
|
75
|
+
return ra.text === rb.text && ra.mathFormat.explicitEquals(rb.mathFormat);
|
|
76
|
+
}
|
|
77
|
+
if (a.type === MathFunctionType.Matrix && !matrixShapeEqual(a, b)) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
var ca = childEquations(a);
|
|
81
|
+
var cb = childEquations(b);
|
|
82
|
+
return ca.length === cb.length && ca.every(function (c, i) { return officeMathEquals(c, cb[i]); });
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Semantic equality of two equations (shape, text, explicit properties).
|
|
86
|
+
*
|
|
87
|
+
* @param {OfficeMath} a First equation.
|
|
88
|
+
* @param {OfficeMath} b Second equation.
|
|
89
|
+
* @returns {boolean} True when both trees are equal.
|
|
90
|
+
*/
|
|
91
|
+
export function officeMathEquals(a, b) {
|
|
92
|
+
if (!a.explicitEquals(b) || a.functions.count !== b.functions.count || a.breaks.count !== b.breaks.count) {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
var bb = b.breaks.toArray();
|
|
96
|
+
if (!a.breaks.toArray().every(function (x, i) { return breakEqual(x, bb[i]); })) {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
var fb = b.functions.toArray();
|
|
100
|
+
return a.functions.toArray().every(function (f, i) { return functionEqual(f, fb[i]); });
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Semantic equality of two Math paragraphs.
|
|
104
|
+
*
|
|
105
|
+
* @param {OfficeMathParagraph} a First paragraph.
|
|
106
|
+
* @param {OfficeMathParagraph} b Second paragraph.
|
|
107
|
+
* @returns {boolean} True when both trees are equal.
|
|
108
|
+
*/
|
|
109
|
+
export function officeMathParagraphEquals(a, b) {
|
|
110
|
+
if (!a.explicitEquals(b) || a.maths.count !== b.maths.count) {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
var mb = b.maths.toArray();
|
|
114
|
+
return a.maths.toArray().every(function (m, i) { return officeMathEquals(m, mb[i]); });
|
|
115
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Office Math paragraph (`m:oMathPara`): the root of the Math model.
|
|
3
|
+
*/
|
|
4
|
+
import { OwnerHolder } from './owner-holder';
|
|
5
|
+
import { OfficeMathCollection } from './math-collection';
|
|
6
|
+
import { MathJustification } from './enums';
|
|
7
|
+
import { MathDocumentAdapter, OfficeRunFormat } from './adapter';
|
|
8
|
+
/**
|
|
9
|
+
* Root container of equations. Notifies a host listener on any change below it.
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export declare class OfficeMathParagraph extends OwnerHolder {
|
|
14
|
+
private readonly _maths;
|
|
15
|
+
private _listener;
|
|
16
|
+
private _suspended;
|
|
17
|
+
readonly adapter: MathDocumentAdapter | undefined;
|
|
18
|
+
constructor(adapter?: MathDocumentAdapter);
|
|
19
|
+
/** Equations of the paragraph. */
|
|
20
|
+
readonly maths: OfficeMathCollection;
|
|
21
|
+
/** Paragraph justification. Default center-group. */
|
|
22
|
+
justification: MathJustification;
|
|
23
|
+
/** Whether the justification was set or parsed explicitly. */
|
|
24
|
+
readonly hasExplicitJustification: boolean;
|
|
25
|
+
/** Default Math character format used to seed function control properties. */
|
|
26
|
+
readonly defaultMathCharacterFormat: OfficeRunFormat;
|
|
27
|
+
/**
|
|
28
|
+
* LaTeX of the current equations, generated from the live Math tree.
|
|
29
|
+
* Assigning replaces all equations on this same paragraph.
|
|
30
|
+
*/
|
|
31
|
+
latex: string;
|
|
32
|
+
/**
|
|
33
|
+
* Replaces all equations with those parsed from `latex`. The paragraph keeps its identity, owner,
|
|
34
|
+
* adapter and mutation listener; one mutation notification is raised after the replacement.
|
|
35
|
+
* An empty string leaves the paragraph without equations.
|
|
36
|
+
*
|
|
37
|
+
* @param {string} latex The LaTeX source.
|
|
38
|
+
* @returns {void}
|
|
39
|
+
*/
|
|
40
|
+
convertLatexToMath(latex: string): void;
|
|
41
|
+
/**
|
|
42
|
+
* Registers a callback invoked after any change in the Math tree.
|
|
43
|
+
*
|
|
44
|
+
* @param {Function} listener The mutation callback, or undefined to clear it.
|
|
45
|
+
* @returns {void}
|
|
46
|
+
*/
|
|
47
|
+
setMutationListener(listener: (() => void) | undefined): void;
|
|
48
|
+
/**
|
|
49
|
+
* Runs `action` without raising mutation notifications, then restores notifications.
|
|
50
|
+
* Used while hydrating the model from XML.
|
|
51
|
+
*
|
|
52
|
+
* @param {Function} action The work to perform silently.
|
|
53
|
+
* @returns {void}
|
|
54
|
+
* @private
|
|
55
|
+
*/
|
|
56
|
+
suspendMutations(action: () => void): void;
|
|
57
|
+
protected rootMutated(): void;
|
|
58
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Office Math paragraph (`m:oMathPara`): the root of the Math model.
|
|
3
|
+
*/
|
|
4
|
+
var __extends = (this && this.__extends) || (function () {
|
|
5
|
+
var extendStatics = function (d, b) {
|
|
6
|
+
extendStatics = Object.setPrototypeOf ||
|
|
7
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
8
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
9
|
+
return extendStatics(d, b);
|
|
10
|
+
};
|
|
11
|
+
return function (d, b) {
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
import { OwnerHolder } from './owner-holder';
|
|
18
|
+
import { OfficeMathCollection } from './math-collection';
|
|
19
|
+
import { MathJustification } from './enums';
|
|
20
|
+
import { K } from './keys';
|
|
21
|
+
import { BasicRunFormat } from './basic';
|
|
22
|
+
import { parseLatexIntoMathParagraph } from '../latex/latex-parser';
|
|
23
|
+
import { mathToLatex } from '../latex/latex-generator';
|
|
24
|
+
/**
|
|
25
|
+
* Root container of equations. Notifies a host listener on any change below it.
|
|
26
|
+
*
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
var OfficeMathParagraph = /** @class */ (function (_super) {
|
|
30
|
+
__extends(OfficeMathParagraph, _super);
|
|
31
|
+
function OfficeMathParagraph(adapter) {
|
|
32
|
+
var _this = _super.call(this) || this;
|
|
33
|
+
_this._suspended = 0;
|
|
34
|
+
_this.adapter = adapter;
|
|
35
|
+
_this._maths = new OfficeMathCollection(_this);
|
|
36
|
+
return _this;
|
|
37
|
+
}
|
|
38
|
+
Object.defineProperty(OfficeMathParagraph.prototype, "maths", {
|
|
39
|
+
/** Equations of the paragraph. */
|
|
40
|
+
get: function () { return this._maths; },
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(OfficeMathParagraph.prototype, "justification", {
|
|
45
|
+
/** Paragraph justification. Default center-group. */
|
|
46
|
+
get: function () {
|
|
47
|
+
return this.getProperty(K.Justification, function () { return MathJustification.CenterGroup; });
|
|
48
|
+
},
|
|
49
|
+
set: function (value) { this.setProperty(K.Justification, value); },
|
|
50
|
+
enumerable: true,
|
|
51
|
+
configurable: true
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(OfficeMathParagraph.prototype, "hasExplicitJustification", {
|
|
54
|
+
/** Whether the justification was set or parsed explicitly. */
|
|
55
|
+
get: function () { return this.isExplicit(K.Justification); },
|
|
56
|
+
enumerable: true,
|
|
57
|
+
configurable: true
|
|
58
|
+
});
|
|
59
|
+
Object.defineProperty(OfficeMathParagraph.prototype, "defaultMathCharacterFormat", {
|
|
60
|
+
/** Default Math character format used to seed function control properties. */
|
|
61
|
+
get: function () {
|
|
62
|
+
return this.adapter !== undefined
|
|
63
|
+
? this.adapter.createDefaultMathCharacterFormat(this)
|
|
64
|
+
: new BasicRunFormat();
|
|
65
|
+
},
|
|
66
|
+
enumerable: true,
|
|
67
|
+
configurable: true
|
|
68
|
+
});
|
|
69
|
+
Object.defineProperty(OfficeMathParagraph.prototype, "latex", {
|
|
70
|
+
/**
|
|
71
|
+
* LaTeX of the current equations, generated from the live Math tree.
|
|
72
|
+
* Assigning replaces all equations on this same paragraph.
|
|
73
|
+
*/
|
|
74
|
+
get: function () { return mathToLatex(this); },
|
|
75
|
+
set: function (value) { this.convertLatexToMath(value); },
|
|
76
|
+
enumerable: true,
|
|
77
|
+
configurable: true
|
|
78
|
+
});
|
|
79
|
+
/**
|
|
80
|
+
* Replaces all equations with those parsed from `latex`. The paragraph keeps its identity, owner,
|
|
81
|
+
* adapter and mutation listener; one mutation notification is raised after the replacement.
|
|
82
|
+
* An empty string leaves the paragraph without equations.
|
|
83
|
+
*
|
|
84
|
+
* @param {string} latex The LaTeX source.
|
|
85
|
+
* @returns {void}
|
|
86
|
+
*/
|
|
87
|
+
OfficeMathParagraph.prototype.convertLatexToMath = function (latex) {
|
|
88
|
+
var _this = this;
|
|
89
|
+
this.suspendMutations(function () {
|
|
90
|
+
_this._maths.clear();
|
|
91
|
+
parseLatexIntoMathParagraph(latex, _this);
|
|
92
|
+
});
|
|
93
|
+
this.notifyMutated();
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Registers a callback invoked after any change in the Math tree.
|
|
97
|
+
*
|
|
98
|
+
* @param {Function} listener The mutation callback, or undefined to clear it.
|
|
99
|
+
* @returns {void}
|
|
100
|
+
*/
|
|
101
|
+
OfficeMathParagraph.prototype.setMutationListener = function (listener) { this._listener = listener; };
|
|
102
|
+
/**
|
|
103
|
+
* Runs `action` without raising mutation notifications, then restores notifications.
|
|
104
|
+
* Used while hydrating the model from XML.
|
|
105
|
+
*
|
|
106
|
+
* @param {Function} action The work to perform silently.
|
|
107
|
+
* @returns {void}
|
|
108
|
+
* @private
|
|
109
|
+
*/
|
|
110
|
+
OfficeMathParagraph.prototype.suspendMutations = function (action) {
|
|
111
|
+
this._suspended++;
|
|
112
|
+
try {
|
|
113
|
+
action();
|
|
114
|
+
}
|
|
115
|
+
finally {
|
|
116
|
+
this._suspended--;
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
OfficeMathParagraph.prototype.rootMutated = function () {
|
|
120
|
+
if (this._suspended === 0 && this._listener !== undefined) {
|
|
121
|
+
this._listener();
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
return OfficeMathParagraph;
|
|
125
|
+
}(OwnerHolder));
|
|
126
|
+
export { OfficeMathParagraph };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structural traversal shared by clone and equality over the Math model.
|
|
3
|
+
*/
|
|
4
|
+
import { OfficeMathFunctionBase } from './function-base';
|
|
5
|
+
import { OfficeMath } from './office-math';
|
|
6
|
+
import { OfficeMathBreak } from './break';
|
|
7
|
+
/**
|
|
8
|
+
* Lists the child equations of a function in a fixed, schema-like order.
|
|
9
|
+
* Matrix cells are listed row by row.
|
|
10
|
+
*
|
|
11
|
+
* @param {OfficeMathFunctionBase} fn The function to inspect.
|
|
12
|
+
* @returns {OfficeMath[]} Child equations in order.
|
|
13
|
+
* @private
|
|
14
|
+
*/
|
|
15
|
+
export declare function childEquations(fn: OfficeMathFunctionBase): OfficeMath[];
|
|
16
|
+
/**
|
|
17
|
+
* Returns the manual break owned by a box or run element.
|
|
18
|
+
*
|
|
19
|
+
* @param {OfficeMathFunctionBase} fn The function to inspect.
|
|
20
|
+
* @returns {OfficeMathBreak | undefined} The break, when present.
|
|
21
|
+
* @private
|
|
22
|
+
*/
|
|
23
|
+
export declare function breakOf(fn: OfficeMathFunctionBase): OfficeMathBreak | undefined;
|