@aurigma/design-atoms
Advanced tools
Comparing version 6.9.8 to 6.9.9
@@ -16,3 +16,2 @@ import { IFontSettings } from "@aurigma/design-atoms-model/Product/Interfaces"; | ||
constructor(_colorPaletteManager: IColorPaletteManager, _fontService: IFontService, _useSimpleFontList: boolean, _previewScale: number, _defaultFontValue: HtmlFontValue); | ||
convert(markup: string): string; | ||
protected _parse(html: string): HTMLBodyElement; | ||
@@ -19,0 +18,0 @@ protected _serialize(node: Node): string; |
@@ -37,7 +37,2 @@ var __extends = (this && this.__extends) || (function () { | ||
} | ||
HtmlToXmlConverter.prototype.convert = function (markup) { | ||
var r = _super.prototype.convert.call(this, markup); | ||
console.warn("HTMLToXMl convert \n\r" + markup + "\n\r\n\r" + r); | ||
return r; | ||
}; | ||
HtmlToXmlConverter.prototype._parse = function (html) { | ||
@@ -94,6 +89,4 @@ var body = new DOMParser() | ||
var alignment = HtmlToXmlConverter.getAlignmentValue(style); | ||
if (alignment != null) { | ||
if (alignment != null) | ||
result[XmlParagraphStyles.alignment] = TreeConverter.textAlignmentToXmlString(alignment); | ||
console.log("_applyParagraphStyles " + alignment + " -> " + result[XmlParagraphStyles.alignment]); | ||
} | ||
var firstLineIndent = HtmlToXmlConverter.getFirstLineIndentValue(style, this._previewScale); | ||
@@ -119,12 +112,8 @@ if (firstLineIndent != null) | ||
var xmlStyle = serializeStyleAttribute(result); | ||
if (!Utils.isNullOrEmptyOrWhiteSpace(xmlStyle)) { | ||
if (!Utils.isNullOrEmptyOrWhiteSpace(xmlStyle)) | ||
p.setAttribute("style", xmlStyle); | ||
console.log("_applyParagraphStyles serialized " + xmlStyle); | ||
} | ||
}; | ||
HtmlToXmlConverter.getAlignmentValue = function (styles) { | ||
var value = styles["text-align"]; | ||
var res = value == null ? null : TreeConverter.stringToTextAlignment(value); | ||
console.log("getAlignmentValue " + value + " -> " + res); | ||
return res; | ||
return value == null ? null : TreeConverter.stringToTextAlignment(value); | ||
}; | ||
@@ -271,3 +260,2 @@ HtmlToXmlConverter.getFirstLineIndentValue = function (styles, scale) { | ||
delete result.italic; | ||
//console.log(`getElementFontValue - getValues\n\r result: {${result.family}, ${result.bold}, ${result.italic}}\n\r default: {${defaultFontValue?.family}, ${defaultFontValue?.bold}, ${defaultFontValue?.italic}}`, element); | ||
return result; | ||
@@ -288,8 +276,2 @@ }; | ||
result.italic = italic === "italic" ? true : false; | ||
/*const r= { | ||
family: ? null : family, | ||
bold: bold == null ? null : bold === "bold" ? true : false, | ||
italic: italic == null ? null : italic === "italic" ? true : false | ||
}*/ | ||
//console.warn(`getFontValue `, result); | ||
return result; | ||
@@ -299,2 +281,4 @@ }; | ||
if (simpleMode) { | ||
if (value.family == null) | ||
return {}; | ||
var fontFamily = HtmlToXmlConverter._deserializeCssEscapedString(value.family); | ||
@@ -319,3 +303,2 @@ var prefixedFontFamily = fontFamily.replace(/"/g, "").replace(/'/g, ""); | ||
var fontSettings = HtmlToXmlConverter.getFontSettings(value, fontService, simpleMode); | ||
//console.log(`setFontValue `, fontSettings, value); | ||
if (fontSettings.postScriptName != null) | ||
@@ -322,0 +305,0 @@ xmlStyles[XmlSpanStyles.fontName] = fontSettings.postScriptName; |
@@ -74,6 +74,4 @@ var __extends = (this && this.__extends) || (function () { | ||
var alignment = styles[XmlParagraphStyles.alignment]; | ||
if (alignment != null) { | ||
console.log("_applyParagraphStyles " + xmlStyle + " alignment " + alignment); | ||
if (alignment != null) | ||
XmlToHtmlConverter.setAlignmentValue(p, alignment); | ||
} | ||
var firstLineIndent = styles[XmlParagraphStyles.firstLineIndent]; | ||
@@ -80,0 +78,0 @@ if (firstLineIndent) |
{ | ||
"version": "6.9.8", | ||
"version": "6.9.9", | ||
"name": "@aurigma/design-atoms", | ||
@@ -4,0 +4,0 @@ "license": "SEE LICENSE IN License.md", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3660177
48554