@harbour-enterprises/superdoc 0.6.16 → 0.6.17
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/chunks/{super-editor.es-d-Yqwndw.js → super-editor.es-gzwV8MKs.js} +26 -9
- package/dist/chunks/{super-editor.es-d-Yqwndw.js.map → super-editor.es-gzwV8MKs.js.map} +1 -1
- package/dist/super-editor/chunks/{converter-DQwniUOI.js → converter-CY8XCpse.js} +25 -8
- package/dist/super-editor/chunks/{converter-DQwniUOI.js.map → converter-CY8XCpse.js.map} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-Dwm-YSyG.js → docx-zipper-CXCVs3Qx.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-Dwm-YSyG.js.map → docx-zipper-CXCVs3Qx.js.map} +1 -1
- package/dist/super-editor/chunks/{editor-BKJSAjPb.js → editor-DAjFASYa.js} +4 -4
- package/dist/super-editor/chunks/{editor-BKJSAjPb.js.map → editor-DAjFASYa.js.map} +1 -1
- package/dist/super-editor/chunks/{toolbar-BPtppK60.js → toolbar-DiYLEYrn.js} +3 -3
- package/dist/super-editor/chunks/{toolbar-BPtppK60.js.map → toolbar-DiYLEYrn.js.map} +1 -1
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/docxImporter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/listImporter.d.ts.map +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/tests/import/listImporterMissingItemsExample.test.d.ts +2 -0
- package/dist/super-editor/tests/import/listImporterMissingItemsExample.test.d.ts.map +1 -0
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.es.js +3 -3
- package/package.json +1 -1
|
@@ -52584,12 +52584,27 @@ const getListNumIdFromStyleRef = (styleId, docx) => {
|
|
|
52584
52584
|
const style = styleTags.find((tag) => tag.attributes["w:styleId"] === styleId) || {};
|
|
52585
52585
|
const pPr = style?.elements?.find((style2) => style2.name === "w:pPr");
|
|
52586
52586
|
if (!pPr) return null;
|
|
52587
|
-
|
|
52587
|
+
let numPr = pPr?.elements?.find((style2) => style2.name === "w:numPr");
|
|
52588
52588
|
if (!numPr) return null;
|
|
52589
|
-
|
|
52590
|
-
|
|
52591
|
-
|
|
52592
|
-
|
|
52589
|
+
let numIdTag = numPr?.elements?.find((style2) => style2.name === "w:numId") || {};
|
|
52590
|
+
let numId = numIdTag?.attributes?.["w:val"];
|
|
52591
|
+
let ilvlTag = numPr?.elements?.find((style2) => style2.name === "w:ilvl");
|
|
52592
|
+
let ilvl = ilvlTag?.attributes?.["w:val"];
|
|
52593
|
+
const basedOnTag = style?.elements?.find((style2) => style2.name === "w:basedOn");
|
|
52594
|
+
const basedOnId = basedOnTag?.attributes?.["w:val"];
|
|
52595
|
+
let loopCount = 0;
|
|
52596
|
+
while (numPr && !numId && loopCount < 10) {
|
|
52597
|
+
const basedOnStyle = styleTags.find((tag) => tag.attributes["w:styleId"] === basedOnId) || {};
|
|
52598
|
+
const basedOnPPr = basedOnStyle?.elements?.find((style2) => style2.name === "w:pPr");
|
|
52599
|
+
numPr = basedOnPPr?.elements?.find((style2) => style2.name === "w:numPr");
|
|
52600
|
+
numIdTag = numPr?.elements?.find((style2) => style2.name === "w:numId") || {};
|
|
52601
|
+
numId = numIdTag?.attributes?.["w:val"];
|
|
52602
|
+
if (!ilvlTag) {
|
|
52603
|
+
ilvlTag = numPr?.elements?.find((style2) => style2.name === "w:ilvl");
|
|
52604
|
+
ilvl = ilvlTag?.attributes?.["w:val"];
|
|
52605
|
+
}
|
|
52606
|
+
loopCount++;
|
|
52607
|
+
}
|
|
52593
52608
|
return { numId, ilvl };
|
|
52594
52609
|
};
|
|
52595
52610
|
const getListLevelDefinitionTag = (numId, level, pStyleId, docx) => {
|
|
@@ -53401,6 +53416,7 @@ const createNodeListHandler = (nodeHandlers) => {
|
|
|
53401
53416
|
});
|
|
53402
53417
|
}
|
|
53403
53418
|
} catch (error2) {
|
|
53419
|
+
console.debug("Import error", error2);
|
|
53404
53420
|
editor?.emit("exception", { error: error2 });
|
|
53405
53421
|
converter?.telemetry?.trackStatistic("error", {
|
|
53406
53422
|
type: "processing_error",
|
|
@@ -53413,6 +53429,7 @@ const createNodeListHandler = (nodeHandlers) => {
|
|
|
53413
53429
|
}
|
|
53414
53430
|
return processedElements;
|
|
53415
53431
|
} catch (error2) {
|
|
53432
|
+
console.debug("Error during import", error2);
|
|
53416
53433
|
editor?.emit("exception", { error: error2 });
|
|
53417
53434
|
converter?.telemetry?.trackStatistic("error", {
|
|
53418
53435
|
type: "fatal_error",
|
|
@@ -53607,7 +53624,7 @@ const _SuperConverter = class _SuperConverter {
|
|
|
53607
53624
|
return;
|
|
53608
53625
|
}
|
|
53609
53626
|
}
|
|
53610
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.6.
|
|
53627
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.6.17") {
|
|
53611
53628
|
const customLocation = "docProps/custom.xml";
|
|
53612
53629
|
if (!docx[customLocation]) {
|
|
53613
53630
|
docx[customLocation] = generateCustomXml();
|
|
@@ -53855,7 +53872,7 @@ function storeSuperdocVersion(docx) {
|
|
|
53855
53872
|
function generateCustomXml() {
|
|
53856
53873
|
return DEFAULT_CUSTOM_XML;
|
|
53857
53874
|
}
|
|
53858
|
-
function generateSuperdocVersion(version2 = "0.6.
|
|
53875
|
+
function generateSuperdocVersion(version2 = "0.6.17") {
|
|
53859
53876
|
return {
|
|
53860
53877
|
type: "element",
|
|
53861
53878
|
name: "property",
|
|
@@ -53927,4 +53944,4 @@ export {
|
|
|
53927
53944
|
twipsToLines as y,
|
|
53928
53945
|
pixelsToTwips as z
|
|
53929
53946
|
};
|
|
53930
|
-
//# sourceMappingURL=converter-
|
|
53947
|
+
//# sourceMappingURL=converter-CY8XCpse.js.map
|