@syncfusion/ej2-docx-renderer 0.0.0-stage → 35.2.15
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/README.md +2 -2
- package/base.d.ts +4 -0
- package/base.js +4 -0
- package/dist/ej2-docx-renderer.umd.min.js +2 -0
- package/dist/ej2-docx-renderer.umd.min.js.map +1 -0
- package/dist/es6/ej2-docx-renderer.es2015.js +52432 -0
- package/dist/es6/ej2-docx-renderer.es2015.js.map +1 -0
- package/dist/es6/ej2-docx-renderer.es5.js +54425 -0
- package/dist/es6/ej2-docx-renderer.es5.js.map +1 -0
- package/dist/global/ej2-docx-renderer.min.js +2 -0
- package/dist/global/ej2-docx-renderer.min.js.map +1 -0
- package/dist/global/index.d.ts +5 -0
- package/format.d.ts +4 -0
- package/format.js +4 -0
- package/helper.d.ts +4 -0
- package/helper.js +4 -0
- package/index.d.ts +4 -0
- package/index.js +4 -0
- package/license +10 -0
- package/list.d.ts +4 -0
- package/list.js +4 -0
- package/package.json +26 -4
- package/parser.d.ts +4 -0
- package/parser.js +4 -0
- package/src/base/constants.d.ts +2 -0
- package/src/base/constants.js +2 -0
- package/src/base/dictionary.d.ts +52 -0
- package/src/base/dictionary.js +137 -0
- package/src/base/index.d.ts +9 -0
- package/src/base/index.js +9 -0
- package/src/base/keywords.d.ts +422 -0
- package/src/base/keywords.js +422 -0
- package/src/base/types.d.ts +2590 -0
- package/src/base/types.js +1056 -0
- package/src/base/unique-format.d.ts +87 -0
- package/src/base/unique-format.js +858 -0
- package/src/base/unique-formats.d.ts +32 -0
- package/src/base/unique-formats.js +87 -0
- package/src/document-canvas.d.ts +61 -0
- package/src/document-canvas.js +221 -0
- package/src/docx-renderer.d.ts +941 -0
- package/src/docx-renderer.js +2251 -0
- package/src/format/border.d.ts +53 -0
- package/src/format/border.js +600 -0
- package/src/format/borders.d.ts +44 -0
- package/src/format/borders.js +314 -0
- package/src/format/cell-format.d.ts +42 -0
- package/src/format/cell-format.js +309 -0
- package/src/format/character-format.d.ts +152 -0
- package/src/format/character-format.js +1224 -0
- package/src/format/index.d.ts +14 -0
- package/src/format/index.js +14 -0
- package/src/format/list-format.d.ts +32 -0
- package/src/format/list-format.js +238 -0
- package/src/format/paragraph-format.d.ts +103 -0
- package/src/format/paragraph-format.js +854 -0
- package/src/format/row-format.d.ts +119 -0
- package/src/format/row-format.js +545 -0
- package/src/format/section-format.d.ts +89 -0
- package/src/format/section-format.js +689 -0
- package/src/format/shading.d.ts +24 -0
- package/src/format/shading.js +137 -0
- package/src/format/style.d.ts +106 -0
- package/src/format/style.js +286 -0
- package/src/format/table-format.d.ts +51 -0
- package/src/format/table-format.js +395 -0
- package/src/global.js +1 -0
- package/src/helper/document-editor-helper.d.ts +515 -0
- package/src/helper/document-editor-helper.js +1302 -0
- package/src/helper/document-editor-settings.d.ts +293 -0
- package/src/helper/document-editor-settings.js +94 -0
- package/src/helper/index.d.ts +5 -0
- package/src/helper/index.js +5 -0
- package/src/helper/layout-helper-methods.d.ts +539 -0
- package/src/helper/layout-helper-methods.js +1065 -0
- package/src/helper/renderer-hooks.d.ts +74 -0
- package/src/helper/renderer-hooks.js +14 -0
- package/src/helper/revision-helper-methods.d.ts +199 -0
- package/src/helper/revision-helper-methods.js +362 -0
- package/src/index.d.ts +18 -0
- package/src/index.js +18 -0
- package/src/layout-helper.d.ts +190 -0
- package/src/layout-helper.js +1368 -0
- package/src/layout.d.ts +779 -0
- package/src/layout.js +17232 -0
- package/src/list/abstract-list.d.ts +25 -0
- package/src/list/abstract-list.js +67 -0
- package/src/list/index.d.ts +7 -0
- package/src/list/index.js +7 -0
- package/src/list/level-override.d.ts +22 -0
- package/src/list/level-override.js +43 -0
- package/src/list/list-level.d.ts +57 -0
- package/src/list/list-level.js +249 -0
- package/src/list/list.d.ts +30 -0
- package/src/list/list.js +100 -0
- package/src/page.d.ts +4155 -0
- package/src/page.js +11342 -0
- package/src/parser/index.d.ts +1 -0
- package/src/parser/index.js +1 -0
- package/src/parser/sfdt-reader.d.ts +254 -0
- package/src/parser/sfdt-reader.js +4569 -0
- package/src/render.d.ts +226 -0
- package/src/render.js +4222 -0
- package/src/text-helper.d.ts +144 -0
- package/src/text-helper.js +1079 -0
- package/src/text-helpers/index.d.ts +2 -0
- package/src/text-helpers/index.js +2 -0
- package/src/text-helpers/optimized.d.ts +45 -0
- package/src/text-helpers/optimized.js +121 -0
- package/src/text-helpers/regular.d.ts +37 -0
- package/src/text-helpers/regular.js +93 -0
- package/src/themes/font-scheme.d.ts +28 -0
- package/src/themes/font-scheme.js +107 -0
- package/src/themes/index.d.ts +6 -0
- package/src/themes/index.js +6 -0
- package/src/themes/major-minor-font-scheme.d.ts +14 -0
- package/src/themes/major-minor-font-scheme.js +45 -0
- package/src/themes/themes.d.ts +11 -0
- package/src/themes/themes.js +31 -0
- package/src/utility/index.d.ts +1 -0
- package/src/utility/index.js +1 -0
- package/src/utility/path-util.d.ts +133 -0
- package/src/utility/path-util.js +639 -0
- package/text-helpers.d.ts +4 -0
- package/text-helpers.js +4 -0
- package/themes.d.ts +4 -0
- package/themes.js +4 -0
- package/utility.d.ts +4 -0
- package/utility.js +4 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { WCharacterFormat } from '../format/character-format';
|
|
2
|
+
import { DocxRenderer } from '../docx-renderer';
|
|
3
|
+
import { TextSizeInfo } from '../text-helper';
|
|
4
|
+
/**
|
|
5
|
+
* Class which performs optimized text measuring logic to find font height.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Optimized {
|
|
8
|
+
private documentHelper;
|
|
9
|
+
/**
|
|
10
|
+
* Font height collection cache object
|
|
11
|
+
*/
|
|
12
|
+
private optimizedHeightCollection;
|
|
13
|
+
private getModuleName;
|
|
14
|
+
/**
|
|
15
|
+
* Constructor to initialize Optimized module.
|
|
16
|
+
*
|
|
17
|
+
* @param {DocxRenderer} documentHelper - the document helper object.
|
|
18
|
+
*/
|
|
19
|
+
constructor(documentHelper: DocxRenderer);
|
|
20
|
+
/**
|
|
21
|
+
* Construct key based on the character format.
|
|
22
|
+
*
|
|
23
|
+
* @param {WCharacterFormat} characterFormat - the character format to construct key.
|
|
24
|
+
* @returns {string} - the constructed key.
|
|
25
|
+
*/
|
|
26
|
+
private getkeyFromCharFormat;
|
|
27
|
+
/**
|
|
28
|
+
* Method to retrieve font information with optimized text measuring logic.
|
|
29
|
+
*
|
|
30
|
+
* @param {WCharacterFormat} characterFormat -character format to apply.
|
|
31
|
+
* @returns {string} - returns font size information.
|
|
32
|
+
*/
|
|
33
|
+
private getFontInfo;
|
|
34
|
+
/**
|
|
35
|
+
* @private
|
|
36
|
+
* @param {WCharacterFormat} characterFormat - character format to apply.
|
|
37
|
+
* @returns {TextSizeInfo} returns text size information.
|
|
38
|
+
*/
|
|
39
|
+
getHeightInternal(characterFormat: WCharacterFormat): TextSizeInfo;
|
|
40
|
+
/**
|
|
41
|
+
* @private
|
|
42
|
+
* @returns {void}
|
|
43
|
+
*/
|
|
44
|
+
destroy(): void;
|
|
45
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { isNullOrUndefined, createElement, updateCSSText } from '@syncfusion/ej2-base';
|
|
2
|
+
/**
|
|
3
|
+
* Class which performs optimized text measuring logic to find font height.
|
|
4
|
+
*/
|
|
5
|
+
var Optimized = /** @class */ (function () {
|
|
6
|
+
/**
|
|
7
|
+
* Constructor to initialize Optimized module.
|
|
8
|
+
*
|
|
9
|
+
* @param {DocxRenderer} documentHelper - the document helper object.
|
|
10
|
+
*/
|
|
11
|
+
function Optimized(documentHelper) {
|
|
12
|
+
this.documentHelper = documentHelper;
|
|
13
|
+
this.optimizedHeightCollection = {};
|
|
14
|
+
}
|
|
15
|
+
Optimized.prototype.getModuleName = function () {
|
|
16
|
+
return 'Optimized';
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Construct key based on the character format.
|
|
20
|
+
*
|
|
21
|
+
* @param {WCharacterFormat} characterFormat - the character format to construct key.
|
|
22
|
+
* @returns {string} - the constructed key.
|
|
23
|
+
*/
|
|
24
|
+
Optimized.prototype.getkeyFromCharFormat = function (characterFormat) {
|
|
25
|
+
var formatText = characterFormat.fontFamily.toLocaleLowerCase();
|
|
26
|
+
if (characterFormat.bold) {
|
|
27
|
+
formatText += ';' + 'bold';
|
|
28
|
+
}
|
|
29
|
+
if (characterFormat.italic) {
|
|
30
|
+
formatText += ';' + 'italic';
|
|
31
|
+
}
|
|
32
|
+
return formatText;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Method to retrieve font information with optimized text measuring logic.
|
|
36
|
+
*
|
|
37
|
+
* @param {WCharacterFormat} characterFormat -character format to apply.
|
|
38
|
+
* @returns {string} - returns font size information.
|
|
39
|
+
*/
|
|
40
|
+
Optimized.prototype.getFontInfo = function (characterFormat) {
|
|
41
|
+
var iframe = createElement('iframe');
|
|
42
|
+
document.body.appendChild(iframe);
|
|
43
|
+
var innerHtml = '<!DOCTYPE html>'
|
|
44
|
+
+ '<html><head></head>'
|
|
45
|
+
+ '<body>'
|
|
46
|
+
+ '</body>'
|
|
47
|
+
+ '</html>';
|
|
48
|
+
var externalFonts = this.documentHelper.externalFonts;
|
|
49
|
+
if (externalFonts && externalFonts.length > 0) {
|
|
50
|
+
externalFonts.forEach(function (externalFont) {
|
|
51
|
+
if (externalFont.src) {
|
|
52
|
+
innerHtml += '<style>@font-face {font-family: \'' + externalFont.fontFamily + '\'; src: ' + externalFont.src + '; }</style>';
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
if (!isNullOrUndefined(iframe.contentDocument)) {
|
|
57
|
+
iframe.contentDocument.open();
|
|
58
|
+
iframe.contentDocument.write(innerHtml);
|
|
59
|
+
iframe.contentDocument.close();
|
|
60
|
+
}
|
|
61
|
+
var container = document.createElement('div');
|
|
62
|
+
var cssText = 'position:absolute;top:-1000px;left:-1000px;opacity:0;font-size:0px;line-height:normal';
|
|
63
|
+
updateCSSText(container, cssText);
|
|
64
|
+
// constant tested height value for calculating height factor which matches 90% accuracy with GDI+ value.
|
|
65
|
+
var maxFontHeight = 288;
|
|
66
|
+
var factor = 1.0 / window.devicePixelRatio;
|
|
67
|
+
container.style.transform = 'scale(' + factor.toString() + ',' + factor.toString() + ')';
|
|
68
|
+
container.innerHTML = '';
|
|
69
|
+
var baselineReferenceSpan = document.createElement('span');
|
|
70
|
+
baselineReferenceSpan.className = 'e-de-font-info';
|
|
71
|
+
baselineReferenceSpan.style.cssText = 'font-size: 0; font-family: ' + ("'" + characterFormat.fontFamily + "'") + '; display: inline-block;';
|
|
72
|
+
baselineReferenceSpan.textContent = 'm';
|
|
73
|
+
var fontMeasurementSpan = document.createElement('span');
|
|
74
|
+
fontMeasurementSpan.className = 'e-de-font-info';
|
|
75
|
+
fontMeasurementSpan.style.cssText = 'font-size: ' + maxFontHeight + 'pt; ' +
|
|
76
|
+
'font-family: ' + ("'" + characterFormat.fontFamily + "'") + '; ' +
|
|
77
|
+
(characterFormat.bold ? 'font-weight: bold; ' : '') +
|
|
78
|
+
(characterFormat.italic ? 'font-style: italic; ' : '') +
|
|
79
|
+
'display: inline-block;';
|
|
80
|
+
fontMeasurementSpan.textContent = 'm';
|
|
81
|
+
container.appendChild(baselineReferenceSpan);
|
|
82
|
+
container.appendChild(fontMeasurementSpan);
|
|
83
|
+
iframe.contentDocument.body.appendChild(container);
|
|
84
|
+
/* eslint-disable-next-line max-len */
|
|
85
|
+
var baseLineFactor = container.firstChild.offsetTop / container.lastChild.offsetHeight;
|
|
86
|
+
var heightFactor = parseFloat((container.lastChild.offsetHeight / maxFontHeight).toFixed(2));
|
|
87
|
+
document.body.removeChild(iframe);
|
|
88
|
+
return { HeightFactor: heightFactor, BaselineFactor: baseLineFactor };
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* @private
|
|
92
|
+
* @param {WCharacterFormat} characterFormat - character format to apply.
|
|
93
|
+
* @returns {TextSizeInfo} returns text size information.
|
|
94
|
+
*/
|
|
95
|
+
Optimized.prototype.getHeightInternal = function (characterFormat) {
|
|
96
|
+
var key = this.getkeyFromCharFormat(characterFormat);
|
|
97
|
+
//With optimized technique, height and baseline factor will be same for each font-family, hence we maintaining cache for the factors and updating height based on font size.
|
|
98
|
+
var isBidi = characterFormat.bidi || characterFormat.complexScript;
|
|
99
|
+
if (isNullOrUndefined(this.optimizedHeightCollection["" + key])) {
|
|
100
|
+
var fontInfo = this.getFontInfo(characterFormat);
|
|
101
|
+
this.optimizedHeightCollection["" + key] = fontInfo;
|
|
102
|
+
var fontHeight = fontInfo.HeightFactor * (isBidi ? characterFormat.fontSizeBidi : characterFormat.fontSize);
|
|
103
|
+
return { Height: fontHeight, BaselineOffset: fontInfo.BaselineFactor * fontHeight };
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
var fontSizeInfo = this.optimizedHeightCollection["" + key];
|
|
107
|
+
var fontHeight = fontSizeInfo.HeightFactor * (isBidi ? characterFormat.fontSizeBidi : characterFormat.fontSize);
|
|
108
|
+
return { Height: fontHeight, BaselineOffset: fontSizeInfo.BaselineFactor * fontHeight };
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* @private
|
|
113
|
+
* @returns {void}
|
|
114
|
+
*/
|
|
115
|
+
Optimized.prototype.destroy = function () {
|
|
116
|
+
this.documentHelper = undefined;
|
|
117
|
+
this.optimizedHeightCollection = undefined;
|
|
118
|
+
};
|
|
119
|
+
return Optimized;
|
|
120
|
+
}());
|
|
121
|
+
export { Optimized };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { WCharacterFormat } from '../format/character-format';
|
|
2
|
+
import { DocxRenderer } from '../docx-renderer';
|
|
3
|
+
import { TextSizeInfo } from '../text-helper';
|
|
4
|
+
/**
|
|
5
|
+
* Class which performs regular text measuring logic to find font height.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Regular {
|
|
8
|
+
/**
|
|
9
|
+
* @private
|
|
10
|
+
*/
|
|
11
|
+
documentHelper: DocxRenderer;
|
|
12
|
+
/**
|
|
13
|
+
* Gets module name.
|
|
14
|
+
*
|
|
15
|
+
* @returns {string} - the module name.
|
|
16
|
+
*/
|
|
17
|
+
private getModuleName;
|
|
18
|
+
/**
|
|
19
|
+
* Constructor to initialize Regular module.
|
|
20
|
+
*
|
|
21
|
+
* @param {DocxRenderer} documentHelper - the document helper object
|
|
22
|
+
*/
|
|
23
|
+
constructor(documentHelper: DocxRenderer);
|
|
24
|
+
/**
|
|
25
|
+
* @private
|
|
26
|
+
* @param {WCharacterFormat} characterFormat - character format to apply.
|
|
27
|
+
* @param {string} fontToRender - font to render.
|
|
28
|
+
* @returns {TextSizeInfo} returns text size information.
|
|
29
|
+
*/
|
|
30
|
+
getHeightInternal(characterFormat: WCharacterFormat, fontToRender: string): TextSizeInfo;
|
|
31
|
+
applyStyle(spanElement: HTMLSpanElement, characterFormat: WCharacterFormat, fontToRender: string): void;
|
|
32
|
+
/**
|
|
33
|
+
* @private
|
|
34
|
+
* @returns {void}
|
|
35
|
+
*/
|
|
36
|
+
destroy(): void;
|
|
37
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { createElement, isNullOrUndefined, updateCSSText } from '@syncfusion/ej2-base';
|
|
2
|
+
/**
|
|
3
|
+
* Class which performs regular text measuring logic to find font height.
|
|
4
|
+
*/
|
|
5
|
+
var Regular = /** @class */ (function () {
|
|
6
|
+
/**
|
|
7
|
+
* Constructor to initialize Regular module.
|
|
8
|
+
*
|
|
9
|
+
* @param {DocxRenderer} documentHelper - the document helper object
|
|
10
|
+
*/
|
|
11
|
+
function Regular(documentHelper) {
|
|
12
|
+
this.documentHelper = documentHelper;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Gets module name.
|
|
16
|
+
*
|
|
17
|
+
* @returns {string} - the module name.
|
|
18
|
+
*/
|
|
19
|
+
Regular.prototype.getModuleName = function () {
|
|
20
|
+
return 'Regular';
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* @private
|
|
24
|
+
* @param {WCharacterFormat} characterFormat - character format to apply.
|
|
25
|
+
* @param {string} fontToRender - font to render.
|
|
26
|
+
* @returns {TextSizeInfo} returns text size information.
|
|
27
|
+
*/
|
|
28
|
+
Regular.prototype.getHeightInternal = function (characterFormat, fontToRender) {
|
|
29
|
+
var textHeight = 0;
|
|
30
|
+
var baselineOffset = 0;
|
|
31
|
+
var spanElement = document.createElement('span');
|
|
32
|
+
spanElement.innerText = 'm';
|
|
33
|
+
var iframe = createElement('iframe');
|
|
34
|
+
document.body.appendChild(iframe);
|
|
35
|
+
var innerHtml = '<!DOCTYPE html>'
|
|
36
|
+
+ '<html><head></head>'
|
|
37
|
+
+ '<body>'
|
|
38
|
+
+ '</body>'
|
|
39
|
+
+ '</html>';
|
|
40
|
+
if (!isNullOrUndefined(iframe.contentDocument)) {
|
|
41
|
+
iframe.contentDocument.open();
|
|
42
|
+
iframe.contentDocument.write(innerHtml);
|
|
43
|
+
iframe.contentDocument.close();
|
|
44
|
+
}
|
|
45
|
+
this.applyStyle(spanElement, characterFormat, fontToRender);
|
|
46
|
+
var parentDiv = document.createElement('div');
|
|
47
|
+
parentDiv.style.cssText = 'display:inline-block;position:absolute;';
|
|
48
|
+
var tempDiv = document.createElement('div');
|
|
49
|
+
tempDiv.style.cssText = 'display:inline-block;width: 1px; height: 0px;vertical-align: baseline;';
|
|
50
|
+
parentDiv.appendChild(spanElement);
|
|
51
|
+
parentDiv.appendChild(tempDiv);
|
|
52
|
+
iframe.contentDocument.body.appendChild(parentDiv);
|
|
53
|
+
textHeight = spanElement.offsetHeight;
|
|
54
|
+
var textTopVal = spanElement.offsetTop;
|
|
55
|
+
var tempDivTopVal = tempDiv.offsetTop;
|
|
56
|
+
baselineOffset = tempDivTopVal - textTopVal;
|
|
57
|
+
document.body.removeChild(iframe);
|
|
58
|
+
return { 'Height': textHeight, 'BaselineOffset': baselineOffset };
|
|
59
|
+
};
|
|
60
|
+
Regular.prototype.applyStyle = function (spanElement, characterFormat, fontToRender) {
|
|
61
|
+
if (!isNullOrUndefined(spanElement) && !isNullOrUndefined(characterFormat)) {
|
|
62
|
+
var style = 'white-space:nowrap;';
|
|
63
|
+
if (!isNullOrUndefined(fontToRender) && fontToRender !== '') {
|
|
64
|
+
style += 'font-family:' + fontToRender + ';';
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
style += 'font-family:' + characterFormat.fontFamily + ';';
|
|
68
|
+
}
|
|
69
|
+
var isBidi = characterFormat.bidi || characterFormat.complexScript;
|
|
70
|
+
var fontSize = isBidi ? characterFormat.fontSizeBidi : characterFormat.fontSize;
|
|
71
|
+
if (fontSize <= 0.5) {
|
|
72
|
+
fontSize = 0.5;
|
|
73
|
+
}
|
|
74
|
+
style += 'font-size:' + fontSize.toString() + 'pt;';
|
|
75
|
+
if (characterFormat.bold) {
|
|
76
|
+
style += 'font-weight:bold;';
|
|
77
|
+
}
|
|
78
|
+
if (characterFormat.italic) {
|
|
79
|
+
style += 'font-style:italic;';
|
|
80
|
+
}
|
|
81
|
+
updateCSSText(spanElement, style);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* @private
|
|
86
|
+
* @returns {void}
|
|
87
|
+
*/
|
|
88
|
+
Regular.prototype.destroy = function () {
|
|
89
|
+
this.documentHelper = undefined;
|
|
90
|
+
};
|
|
91
|
+
return Regular;
|
|
92
|
+
}());
|
|
93
|
+
export { Regular };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { MajorMinorFontScheme } from './major-minor-font-scheme';
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
*/
|
|
5
|
+
export declare class FontScheme {
|
|
6
|
+
private schemeName;
|
|
7
|
+
private majFontScheme;
|
|
8
|
+
private minFontScheme;
|
|
9
|
+
fontSchemeName: string;
|
|
10
|
+
majorFontScheme: MajorMinorFontScheme;
|
|
11
|
+
minorFontScheme: MajorMinorFontScheme;
|
|
12
|
+
constructor(node?: Object);
|
|
13
|
+
copyFormat(fontScheme: FontScheme): void;
|
|
14
|
+
destroy(): void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
export declare class FontSchemeStruct {
|
|
20
|
+
private fontName;
|
|
21
|
+
private fontTypeface;
|
|
22
|
+
private pnose;
|
|
23
|
+
name: string;
|
|
24
|
+
typeface: string;
|
|
25
|
+
panose: string;
|
|
26
|
+
copyFormat(fontSchemeStructure: FontSchemeStruct): void;
|
|
27
|
+
destroy(): void;
|
|
28
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
2
|
+
import { MajorMinorFontScheme } from './major-minor-font-scheme';
|
|
3
|
+
/**
|
|
4
|
+
* @private
|
|
5
|
+
*/
|
|
6
|
+
var FontScheme = /** @class */ (function () {
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8
|
+
function FontScheme(node) {
|
|
9
|
+
this.majFontScheme = new MajorMinorFontScheme();
|
|
10
|
+
this.minFontScheme = new MajorMinorFontScheme();
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(FontScheme.prototype, "fontSchemeName", {
|
|
13
|
+
get: function () {
|
|
14
|
+
return this.schemeName;
|
|
15
|
+
},
|
|
16
|
+
set: function (value) {
|
|
17
|
+
this.schemeName = value;
|
|
18
|
+
},
|
|
19
|
+
enumerable: true,
|
|
20
|
+
configurable: true
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(FontScheme.prototype, "majorFontScheme", {
|
|
23
|
+
get: function () {
|
|
24
|
+
return this.majFontScheme;
|
|
25
|
+
},
|
|
26
|
+
set: function (value) {
|
|
27
|
+
this.majFontScheme = value;
|
|
28
|
+
},
|
|
29
|
+
enumerable: true,
|
|
30
|
+
configurable: true
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(FontScheme.prototype, "minorFontScheme", {
|
|
33
|
+
get: function () {
|
|
34
|
+
return this.minFontScheme;
|
|
35
|
+
},
|
|
36
|
+
set: function (value) {
|
|
37
|
+
this.minFontScheme = value;
|
|
38
|
+
},
|
|
39
|
+
enumerable: true,
|
|
40
|
+
configurable: true
|
|
41
|
+
});
|
|
42
|
+
FontScheme.prototype.copyFormat = function (fontScheme) {
|
|
43
|
+
if (!isNullOrUndefined(fontScheme)) {
|
|
44
|
+
this.schemeName = fontScheme.schemeName;
|
|
45
|
+
this.majFontScheme.copyFormat(fontScheme.majFontScheme);
|
|
46
|
+
this.minFontScheme.copyFormat(fontScheme.minFontScheme);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
FontScheme.prototype.destroy = function () {
|
|
50
|
+
this.schemeName = undefined;
|
|
51
|
+
this.majFontScheme = undefined;
|
|
52
|
+
this.minFontScheme = undefined;
|
|
53
|
+
};
|
|
54
|
+
return FontScheme;
|
|
55
|
+
}());
|
|
56
|
+
export { FontScheme };
|
|
57
|
+
/**
|
|
58
|
+
* @private
|
|
59
|
+
*/
|
|
60
|
+
var FontSchemeStruct = /** @class */ (function () {
|
|
61
|
+
function FontSchemeStruct() {
|
|
62
|
+
}
|
|
63
|
+
Object.defineProperty(FontSchemeStruct.prototype, "name", {
|
|
64
|
+
get: function () {
|
|
65
|
+
return this.fontName;
|
|
66
|
+
},
|
|
67
|
+
set: function (value) {
|
|
68
|
+
this.fontName = value;
|
|
69
|
+
},
|
|
70
|
+
enumerable: true,
|
|
71
|
+
configurable: true
|
|
72
|
+
});
|
|
73
|
+
Object.defineProperty(FontSchemeStruct.prototype, "typeface", {
|
|
74
|
+
get: function () {
|
|
75
|
+
return this.fontTypeface;
|
|
76
|
+
},
|
|
77
|
+
set: function (value) {
|
|
78
|
+
this.fontTypeface = value;
|
|
79
|
+
},
|
|
80
|
+
enumerable: true,
|
|
81
|
+
configurable: true
|
|
82
|
+
});
|
|
83
|
+
Object.defineProperty(FontSchemeStruct.prototype, "panose", {
|
|
84
|
+
get: function () {
|
|
85
|
+
return this.pnose;
|
|
86
|
+
},
|
|
87
|
+
set: function (value) {
|
|
88
|
+
this.pnose = value;
|
|
89
|
+
},
|
|
90
|
+
enumerable: true,
|
|
91
|
+
configurable: true
|
|
92
|
+
});
|
|
93
|
+
FontSchemeStruct.prototype.copyFormat = function (fontSchemeStructure) {
|
|
94
|
+
if (!isNullOrUndefined(fontSchemeStructure)) {
|
|
95
|
+
this.fontName = fontSchemeStructure.fontName;
|
|
96
|
+
this.fontTypeface = fontSchemeStructure.fontTypeface;
|
|
97
|
+
this.pnose = fontSchemeStructure.panose;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
FontSchemeStruct.prototype.destroy = function () {
|
|
101
|
+
this.fontName = undefined;
|
|
102
|
+
this.fontTypeface = undefined;
|
|
103
|
+
this.pnose = undefined;
|
|
104
|
+
};
|
|
105
|
+
return FontSchemeStruct;
|
|
106
|
+
}());
|
|
107
|
+
export { FontSchemeStruct };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Dictionary } from '../base/dictionary';
|
|
2
|
+
import { FontSchemeStruct } from './font-scheme';
|
|
3
|
+
/**
|
|
4
|
+
* @private
|
|
5
|
+
*/
|
|
6
|
+
export declare class MajorMinorFontScheme {
|
|
7
|
+
private fntTypeface;
|
|
8
|
+
private fntSchemeList;
|
|
9
|
+
fontTypeface: Dictionary<string, string>;
|
|
10
|
+
fontSchemeList: FontSchemeStruct[];
|
|
11
|
+
constructor();
|
|
12
|
+
copyFormat(majorMinor: MajorMinorFontScheme): void;
|
|
13
|
+
destroy(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
2
|
+
import { Dictionary } from '../base/dictionary';
|
|
3
|
+
/**
|
|
4
|
+
* @private
|
|
5
|
+
*/
|
|
6
|
+
var MajorMinorFontScheme = /** @class */ (function () {
|
|
7
|
+
function MajorMinorFontScheme() {
|
|
8
|
+
this.fntTypeface = new Dictionary();
|
|
9
|
+
this.fntSchemeList = [];
|
|
10
|
+
this.fntTypeface = new Dictionary();
|
|
11
|
+
this.fntSchemeList = [];
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(MajorMinorFontScheme.prototype, "fontTypeface", {
|
|
14
|
+
get: function () {
|
|
15
|
+
return this.fntTypeface;
|
|
16
|
+
},
|
|
17
|
+
set: function (value) {
|
|
18
|
+
this.fntTypeface = value;
|
|
19
|
+
},
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(MajorMinorFontScheme.prototype, "fontSchemeList", {
|
|
24
|
+
get: function () {
|
|
25
|
+
return this.fntSchemeList;
|
|
26
|
+
},
|
|
27
|
+
set: function (value) {
|
|
28
|
+
this.fntSchemeList = value;
|
|
29
|
+
},
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true
|
|
32
|
+
});
|
|
33
|
+
MajorMinorFontScheme.prototype.copyFormat = function (majorMinor) {
|
|
34
|
+
if (!isNullOrUndefined(majorMinor)) {
|
|
35
|
+
this.fntTypeface = majorMinor.fntTypeface;
|
|
36
|
+
this.fntSchemeList = majorMinor.fntSchemeList;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
MajorMinorFontScheme.prototype.destroy = function () {
|
|
40
|
+
this.fntTypeface = undefined;
|
|
41
|
+
this.fntSchemeList = undefined;
|
|
42
|
+
};
|
|
43
|
+
return MajorMinorFontScheme;
|
|
44
|
+
}());
|
|
45
|
+
export { MajorMinorFontScheme };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
2
|
+
import { FontScheme } from './font-scheme';
|
|
3
|
+
/**
|
|
4
|
+
* @private
|
|
5
|
+
*/
|
|
6
|
+
var Themes = /** @class */ (function () {
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8
|
+
function Themes(node) {
|
|
9
|
+
this.fntScheme = new FontScheme();
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(Themes.prototype, "fontScheme", {
|
|
12
|
+
get: function () {
|
|
13
|
+
return this.fntScheme;
|
|
14
|
+
},
|
|
15
|
+
set: function (value) {
|
|
16
|
+
this.fntScheme = value;
|
|
17
|
+
},
|
|
18
|
+
enumerable: true,
|
|
19
|
+
configurable: true
|
|
20
|
+
});
|
|
21
|
+
Themes.prototype.copyFormat = function (themes) {
|
|
22
|
+
if (!isNullOrUndefined(themes)) {
|
|
23
|
+
this.fntScheme.copyFormat(themes.fntScheme);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
Themes.prototype.destroy = function () {
|
|
27
|
+
this.fntScheme = undefined;
|
|
28
|
+
};
|
|
29
|
+
return Themes;
|
|
30
|
+
}());
|
|
31
|
+
export { Themes };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './path-util';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './path-util';
|