ooxml-core 1.15.0 → 1.16.0
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/PptxHandler-3A7VEXVK.cjs +13 -0
- package/dist/PptxHandler-7POULDRL.mjs +4 -0
- package/dist/{PptxHandler-R5BVKEBW.mjs → PptxHandler-M35YFCUC.mjs} +2 -2
- package/dist/PresentationBuilder-C7NPM7OQ.mjs +4 -0
- package/dist/{PresentationBuilder-4AF3PZHG.cjs → PresentationBuilder-XVRTITYR.cjs} +6 -5
- package/dist/{PresentationBuilder-W67DIJBV.mjs → PresentationBuilder-Y6DJK6H2.mjs} +2 -2
- package/dist/automation/index.cjs +935 -535
- package/dist/automation/index.mjs +935 -535
- package/dist/chunk-5W2QL4SB.cjs +244 -0
- package/dist/{chunk-ZWI7MTLF.cjs → chunk-AHRFBMLK.cjs} +2846 -1546
- package/dist/{chunk-NWAQEXBK.mjs → chunk-B37EVUMG.mjs} +1 -1
- package/dist/{chunk-HU36GIYM.mjs → chunk-C2Y6SZDN.mjs} +421 -129
- package/dist/chunk-CA7KCNL3.mjs +236 -0
- package/dist/{chunk-BSUIDT6K.cjs → chunk-DWRJ62KP.cjs} +1 -0
- package/dist/{chunk-OPBZBSJF.mjs → chunk-KOX5Y5E5.mjs} +1 -1
- package/dist/{chunk-JFMIPOPV.mjs → chunk-LM6VBPQJ.mjs} +416 -15
- package/dist/{chunk-PC4MTLG4.cjs → chunk-OA5V3JJC.cjs} +8 -8
- package/dist/{chunk-7ZIZFJXT.mjs → chunk-OKGQ2X7D.mjs} +1848 -548
- package/dist/{chunk-X7MGZQ6C.cjs → chunk-UGWY72WC.cjs} +396 -254
- package/dist/{chunk-EMZIHAOH.mjs → chunk-WBCV52YV.mjs} +1846 -565
- package/dist/{chunk-2EBMHIGJ.mjs → chunk-WEFFRYXN.mjs} +379 -242
- package/dist/{chunk-AXF2FC4D.mjs → chunk-WSRCLCMB.mjs} +1 -0
- package/dist/{chunk-LMMP67YN.mjs → chunk-XCJRUBGJ.mjs} +1 -1
- package/dist/pptx/automation/index.cjs +2662 -884
- package/dist/pptx/automation/index.d.ts +4 -4
- package/dist/pptx/automation/index.mjs +5 -5
- package/dist/pptx/chunks/{elements-Cadkqht8.d.ts → elements-iUzpAeqR.d.ts} +114 -25
- package/dist/pptx/chunks/elements-iUzpAeqR.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-CJI2EugA.d.ts → index-BWHNCVNC.d.ts} +1671 -1534
- package/dist/pptx/chunks/index-BWHNCVNC.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-CozqpSPL.d.ts → index-CiyTR6mm.d.ts} +99 -10
- package/dist/pptx/chunks/index-CiyTR6mm.d.ts.map +1 -0
- package/dist/pptx/chunks/{text-operations-C3L9xrqx.d.ts → text-operations-CfLVZ7DK.d.ts} +81 -3
- package/dist/pptx/chunks/text-operations-CfLVZ7DK.d.ts.map +1 -0
- package/dist/pptx/cli/index.cjs +2652 -874
- package/dist/pptx/cli/index.d.ts +1 -1
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.cjs +45 -1
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-live-patch-target.cjs +4 -4
- package/dist/pptx/editor/render/collaboration-live-patch-target.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-reconcile.cjs +7 -7
- package/dist/pptx/editor/render/collaboration-reconcile.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-sync.cjs +14 -14
- package/dist/pptx/editor/render/collaboration-sync.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-sync.mjs +1 -1
- package/dist/pptx/editor/render/find-replace.cjs +15 -14
- package/dist/pptx/editor/render/find-replace.d.ts +2 -2
- package/dist/pptx/editor/render/find-replace.mjs +2 -1
- package/dist/pptx/editor/render/slide-operations.cjs +9 -8
- package/dist/pptx/editor/render/slide-operations.mjs +3 -2
- package/dist/pptx/editor/render/slide-size-rescale.cjs +3 -3
- package/dist/pptx/editor/render/slide-size-rescale.d.ts +1 -1
- package/dist/pptx/editor/render/slide-size-rescale.d.ts.map +1 -1
- package/dist/pptx/editor/render/slide-size-rescale.mjs +3 -3
- package/dist/pptx/editor/render/text-runs-style-patch.d.ts +1 -1
- package/dist/pptx/editor/render/text-style-scope.d.ts +1 -1
- package/dist/pptx/index.cjs +3208 -1106
- package/dist/pptx/index.d.ts +5 -5
- package/dist/pptx/index.mjs +5 -5
- package/dist/teams/index.cjs +156 -65
- package/dist/teams/index.mjs +156 -65
- package/dist/xlsx/edit/pivots.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +867 -467
- package/dist/xlsx/index.mjs +867 -467
- package/dist/xlsx/load/index.cjs +345 -99
- package/dist/xlsx/load/index.mjs +345 -99
- package/dist/xlsx/model-pivots.d.ts +47 -0
- package/dist/xlsx/model-pivots.d.ts.map +1 -1
- package/dist/xlsx/pivot/captions-locales.d.ts +3 -0
- package/dist/xlsx/pivot/captions-locales.d.ts.map +1 -0
- package/dist/xlsx/pivot/captions-read.d.ts +14 -0
- package/dist/xlsx/pivot/captions-read.d.ts.map +1 -0
- package/dist/xlsx/pivot/captions.d.ts +26 -0
- package/dist/xlsx/pivot/captions.d.ts.map +1 -0
- package/dist/xlsx/pivot/columns.d.ts.map +1 -1
- package/dist/xlsx/pivot/data.d.ts +3 -2
- package/dist/xlsx/pivot/data.d.ts.map +1 -1
- package/dist/xlsx/pivot/item-labels.d.ts +12 -0
- package/dist/xlsx/pivot/item-labels.d.ts.map +1 -0
- package/dist/xlsx/pivot/item-names-read.d.ts +8 -0
- package/dist/xlsx/pivot/item-names-read.d.ts.map +1 -0
- package/dist/xlsx/pivot/measures.d.ts +2 -1
- package/dist/xlsx/pivot/measures.d.ts.map +1 -1
- package/dist/xlsx/pivot/nested.d.ts.map +1 -1
- package/dist/xlsx/pivot/page-filter-admission.d.ts.map +1 -1
- package/dist/xlsx/pivot/page-filter.d.ts +1 -1
- package/dist/xlsx/pivot/page-filter.d.ts.map +1 -1
- package/dist/xlsx/pivot/read.d.ts.map +1 -1
- package/dist/xlsx/pivot/table-xml.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/navigation.d.ts.map +1 -1
- package/dist/xlsx/ui/index.cjs +800 -621
- package/dist/xlsx/ui/index.mjs +800 -621
- package/package.json +1 -1
- package/dist/PptxHandler-OGLITB3F.cjs +0 -12
- package/dist/PptxHandler-UKAA5T5U.mjs +0 -3
- package/dist/PresentationBuilder-54QGEZ2F.mjs +0 -3
- package/dist/pptx/chunks/elements-Cadkqht8.d.ts.map +0 -1
- package/dist/pptx/chunks/index-CJI2EugA.d.ts.map +0 -1
- package/dist/pptx/chunks/index-CozqpSPL.d.ts.map +0 -1
- package/dist/pptx/chunks/text-operations-C3L9xrqx.d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { hasTextProperties, isImageLikeElement, blobUrlToDataUrl, getSubstituteFontFamily, stripXmlOrderSuffix } from './chunk-
|
|
1
|
+
import { hasTextProperties, isImageLikeElement, blobUrlToDataUrl, getSubstituteFontFamily, stripXmlOrderSuffix } from './chunk-LM6VBPQJ.mjs';
|
|
2
2
|
|
|
3
3
|
// pptx/converter/media-context.ts
|
|
4
4
|
var MIME_TO_EXT = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { findText, replaceText, replaceTextInSlide, mergePresentation } from './chunk-
|
|
2
|
-
import { PresentationBuilder, PptxHandler, SlideBuilder, validateSeriesIndex, removeEmptyDataPoint, ensureDataPoint, ensureChartData, assertChartGradientSupported, toChartGradientFill, isLineDrawnChartType, chartFormatTargetKey, applyChartGroupOptionsInput, STANDARD_LAYOUTS, createTextElement, createShapeElement, createImageElement, createTableElement, createChartElement, createConnectorElement, createMediaElement, createGroupElement, relationshipsPartFor, parseRelationships, resolvePartPath, clonePartGraph, buildRelationshipsXml, buildBlankPresentationArchive, nextRelationshipId, relativePartTarget, PptxXmlBuilder } from './chunk-
|
|
3
|
-
import { escAttr, EMU_PER_PIXEL, EMU_PER_INCH, parseXml, first, elements, buildXml, bytesToBase64, base64ToBytes, hasTextProperties } from './chunk-
|
|
1
|
+
import { findText, replaceText, replaceTextInSlide, mergePresentation } from './chunk-KOX5Y5E5.mjs';
|
|
2
|
+
import { PresentationBuilder, PptxHandler, SlideBuilder, validateSeriesIndex, removeEmptyDataPoint, ensureDataPoint, ensureChartData, assertChartGradientSupported, toChartGradientFill, isLineDrawnChartType, chartFormatTargetKey, applyChartGroupOptionsInput, STANDARD_LAYOUTS, createTextElement, createShapeElement, createImageElement, createTableElement, createChartElement, createConnectorElement, createMediaElement, createGroupElement, relationshipsPartFor, parseRelationships, resolvePartPath, clonePartGraph, buildRelationshipsXml, buildBlankPresentationArchive, nextRelationshipId, relativePartTarget, PptxXmlBuilder } from './chunk-WBCV52YV.mjs';
|
|
3
|
+
import { escAttr, EMU_PER_PIXEL, EMU_PER_INCH, parseXml, first, elements, buildXml, bytesToBase64, base64ToBytes, hasTextProperties } from './chunk-LM6VBPQJ.mjs';
|
|
4
4
|
import { openPptxZip } from './chunk-M4XLF4R7.mjs';
|
|
5
5
|
import { cloneSlide, cloneElement } from './chunk-54S5A5PZ.mjs';
|
|
6
6
|
|
|
@@ -1539,122 +1539,7 @@ function setChartDataPointGradient(element, seriesIndex, pointIndex, gradient) {
|
|
|
1539
1539
|
}
|
|
1540
1540
|
}
|
|
1541
1541
|
|
|
1542
|
-
// pptx/core/builders/sdk/chart-element-format-
|
|
1543
|
-
function chartFormatTargetSupports(data, target) {
|
|
1544
|
-
switch (target.kind) {
|
|
1545
|
-
case "axis":
|
|
1546
|
-
case "majorGridlines":
|
|
1547
|
-
case "minorGridlines":
|
|
1548
|
-
return { fill: false, gradient: false };
|
|
1549
|
-
case "series": {
|
|
1550
|
-
const series = data.series[target.seriesIndex];
|
|
1551
|
-
const lineDrawn = isLineDrawnChartType(series?.seriesChartType ?? data.chartType);
|
|
1552
|
-
return { fill: !lineDrawn, gradient: !lineDrawn };
|
|
1553
|
-
}
|
|
1554
|
-
case "chartArea":
|
|
1555
|
-
case "plotArea":
|
|
1556
|
-
return { fill: true, gradient: true };
|
|
1557
|
-
default:
|
|
1558
|
-
return { fill: true, gradient: false };
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
function defaultGradient(color) {
|
|
1562
|
-
const base = color && /^#?[0-9a-f]{6}$/iu.test(color) ? color.replace(/^#?/u, "#") : "#4472C4";
|
|
1563
|
-
return {
|
|
1564
|
-
type: "linear",
|
|
1565
|
-
angle: 90,
|
|
1566
|
-
stops: [
|
|
1567
|
-
{ color: "#FFFFFF", position: 0 },
|
|
1568
|
-
{ color: base.toUpperCase(), position: 100 }
|
|
1569
|
-
]
|
|
1570
|
-
};
|
|
1571
|
-
}
|
|
1572
|
-
function paintKind(paint) {
|
|
1573
|
-
if (paint === void 0) {
|
|
1574
|
-
return { kind: "automatic" };
|
|
1575
|
-
}
|
|
1576
|
-
return paint === "none" ? { kind: "none" } : { kind: "solid", color: paint };
|
|
1577
|
-
}
|
|
1578
|
-
function lineFromShape(shape) {
|
|
1579
|
-
if (!shape) {
|
|
1580
|
-
return { kind: "automatic" };
|
|
1581
|
-
}
|
|
1582
|
-
const line = shape.lineNoFill ? { kind: "none" } : shape.strokeColor ? { kind: "solid", color: shape.strokeColor } : { kind: "automatic" };
|
|
1583
|
-
if (shape.strokeWidth !== void 0) {
|
|
1584
|
-
line.width = shape.strokeWidth;
|
|
1585
|
-
}
|
|
1586
|
-
if (shape.strokeDashStyle) {
|
|
1587
|
-
line.dash = shape.strokeDashStyle;
|
|
1588
|
-
}
|
|
1589
|
-
return line;
|
|
1590
|
-
}
|
|
1591
|
-
function flatView(data, target) {
|
|
1592
|
-
const style = data.style;
|
|
1593
|
-
switch (target.kind) {
|
|
1594
|
-
case "chartArea":
|
|
1595
|
-
case "plotArea": {
|
|
1596
|
-
const gradient = style?.[`${target.kind}Gradient`];
|
|
1597
|
-
const fill = gradient ? { kind: "gradient", gradient } : paintKind(style?.[`${target.kind}Fill`]);
|
|
1598
|
-
const border = paintKind(style?.[`${target.kind}Border`]);
|
|
1599
|
-
return {
|
|
1600
|
-
fill,
|
|
1601
|
-
line: border.kind === "gradient" ? { kind: "automatic" } : border
|
|
1602
|
-
};
|
|
1603
|
-
}
|
|
1604
|
-
case "title": {
|
|
1605
|
-
const shape = style?.titleSpPr;
|
|
1606
|
-
return {
|
|
1607
|
-
fill: shape?.fillColor ? { kind: "solid", color: shape.fillColor } : { kind: "automatic" },
|
|
1608
|
-
line: lineFromShape(shape)
|
|
1609
|
-
};
|
|
1610
|
-
}
|
|
1611
|
-
case "axis":
|
|
1612
|
-
case "majorGridlines":
|
|
1613
|
-
case "minorGridlines": {
|
|
1614
|
-
const axis = data.axes?.[target.axisIndex];
|
|
1615
|
-
const shape = target.kind === "axis" ? axis?.spPr : target.kind === "majorGridlines" ? axis?.majorGridlinesSpPr : axis?.minorGridlinesSpPr;
|
|
1616
|
-
return { fill: { kind: "automatic" }, line: lineFromShape(shape) };
|
|
1617
|
-
}
|
|
1618
|
-
case "series": {
|
|
1619
|
-
const series = data.series[target.seriesIndex];
|
|
1620
|
-
if (!series) {
|
|
1621
|
-
return { fill: { kind: "automatic" }, line: { kind: "automatic" } };
|
|
1622
|
-
}
|
|
1623
|
-
const lineDrawn = isLineDrawnChartType(series.seriesChartType ?? data.chartType);
|
|
1624
|
-
const line = series.lineNoFill ? { kind: "none" } : lineDrawn && series.color ? { kind: "solid", color: series.color } : { kind: "automatic" };
|
|
1625
|
-
if (series.lineWidth !== void 0) {
|
|
1626
|
-
line.width = series.lineWidth;
|
|
1627
|
-
}
|
|
1628
|
-
if (series.lineDashStyle) {
|
|
1629
|
-
line.dash = series.lineDashStyle;
|
|
1630
|
-
}
|
|
1631
|
-
const fill = series.gradientFill ? { kind: "gradient", gradient: series.gradientFill } : !lineDrawn && series.color ? { kind: "solid", color: series.color } : { kind: "automatic" };
|
|
1632
|
-
return { fill, line };
|
|
1633
|
-
}
|
|
1634
|
-
default:
|
|
1635
|
-
return { fill: { kind: "automatic" }, line: { kind: "automatic" } };
|
|
1636
|
-
}
|
|
1637
|
-
}
|
|
1638
|
-
function readChartElementFormat(data, target) {
|
|
1639
|
-
const support = chartFormatTargetSupports(data, target);
|
|
1640
|
-
const recorded = data.elementFormats?.[chartFormatTargetKey(target)];
|
|
1641
|
-
const flat = recorded?.reset ? { fill: { kind: "automatic" }, line: { kind: "automatic" } } : flatView(data, target);
|
|
1642
|
-
const fill = recorded?.fill && flat.fill.kind !== "gradient" ? { ...recorded.fill } : { ...flat.fill };
|
|
1643
|
-
const line = recorded?.line ? { ...recorded.line } : { ...flat.line };
|
|
1644
|
-
if (fill.kind === "solid" && flat.fill.kind === "solid" && flat.fill.color) {
|
|
1645
|
-
fill.color = flat.fill.color;
|
|
1646
|
-
}
|
|
1647
|
-
const gradient = "gradient" in fill && fill.gradient ? fill.gradient : defaultGradient(fill.color);
|
|
1648
|
-
return {
|
|
1649
|
-
support,
|
|
1650
|
-
fill: { ...fill, ...support.gradient ? { gradient } : {} },
|
|
1651
|
-
line,
|
|
1652
|
-
effects: { ...recorded?.effects },
|
|
1653
|
-
reset: Boolean(recorded?.reset && !recorded.fill && !recorded.line && !recorded.effects)
|
|
1654
|
-
};
|
|
1655
|
-
}
|
|
1656
|
-
|
|
1657
|
-
// pptx/core/builders/sdk/chart-element-format-operations.ts
|
|
1542
|
+
// pptx/core/builders/sdk/chart-element-format-mirror.ts
|
|
1658
1543
|
function withSeries(data, index, update) {
|
|
1659
1544
|
if (!data.series[index]) {
|
|
1660
1545
|
return data;
|
|
@@ -1674,6 +1559,8 @@ function shapeFromFormat(base, fill, line) {
|
|
|
1674
1559
|
delete next.lineNoFill;
|
|
1675
1560
|
if (line.kind === "solid" && line.color) {
|
|
1676
1561
|
next.strokeColor = line.color;
|
|
1562
|
+
} else if (line.kind === "gradient" && line.gradient?.stops.length) {
|
|
1563
|
+
next.strokeColor = line.gradient.stops[line.gradient.stops.length - 1].color;
|
|
1677
1564
|
} else if (line.kind === "none") {
|
|
1678
1565
|
next.lineNoFill = true;
|
|
1679
1566
|
}
|
|
@@ -1687,7 +1574,7 @@ function shapeFromFormat(base, fill, line) {
|
|
|
1687
1574
|
return Object.keys(next).length > 0 ? next : void 0;
|
|
1688
1575
|
}
|
|
1689
1576
|
function mirrorFlatFields(data, target, fill, line) {
|
|
1690
|
-
const paint = (p) => !p || p.kind
|
|
1577
|
+
const paint = (p) => !p || p.kind !== "none" && p.kind !== "solid" ? void 0 : p.kind === "none" ? "none" : p.color;
|
|
1691
1578
|
switch (target.kind) {
|
|
1692
1579
|
case "chartArea":
|
|
1693
1580
|
case "plotArea": {
|
|
@@ -1736,13 +1623,24 @@ function mirrorFlatFields(data, target, fill, line) {
|
|
|
1736
1623
|
if (fill && !lineDrawn) {
|
|
1737
1624
|
delete next.gradientFill;
|
|
1738
1625
|
delete next.color;
|
|
1626
|
+
delete next.impliedPicture;
|
|
1739
1627
|
if (fill.kind === "solid" && fill.color) {
|
|
1740
1628
|
next.color = fill.color;
|
|
1629
|
+
} else if (fill.kind === "picture" && fill.picture?.src) {
|
|
1630
|
+
next.impliedPicture = {
|
|
1631
|
+
imageUrl: fill.picture.src,
|
|
1632
|
+
pictureFormat: fill.picture.tile ? "stack" : "stretch",
|
|
1633
|
+
...fill.picture.transparency ? { opacity: 1 - fill.picture.transparency / 100 } : {}
|
|
1634
|
+
};
|
|
1741
1635
|
}
|
|
1742
1636
|
}
|
|
1743
1637
|
if (line) {
|
|
1744
1638
|
if (lineDrawn) {
|
|
1745
1639
|
delete next.lineNoFill;
|
|
1640
|
+
delete next.lineGradientFill;
|
|
1641
|
+
if (line.kind === "gradient" && line.gradient) {
|
|
1642
|
+
next.lineGradientFill = line.gradient;
|
|
1643
|
+
}
|
|
1746
1644
|
if (line.kind === "solid" && line.color) {
|
|
1747
1645
|
next.color = line.color;
|
|
1748
1646
|
} else if (line.kind === "none") {
|
|
@@ -1762,6 +1660,9 @@ function mirrorFlatFields(data, target, fill, line) {
|
|
|
1762
1660
|
return data;
|
|
1763
1661
|
}
|
|
1764
1662
|
}
|
|
1663
|
+
function hasGradientField(target) {
|
|
1664
|
+
return target.kind === "chartArea" || target.kind === "plotArea" || target.kind === "series";
|
|
1665
|
+
}
|
|
1765
1666
|
function applyGradient(data, target, gradient) {
|
|
1766
1667
|
if (target.kind === "chartArea" || target.kind === "plotArea") {
|
|
1767
1668
|
const style = { ...data.style };
|
|
@@ -1777,6 +1678,200 @@ function applyGradient(data, target, gradient) {
|
|
|
1777
1678
|
}
|
|
1778
1679
|
return data;
|
|
1779
1680
|
}
|
|
1681
|
+
function mirrorTextColor(data, target, text) {
|
|
1682
|
+
const fill = text?.fill;
|
|
1683
|
+
if (!fill || fill.kind !== "solid" && fill.kind !== "automatic") {
|
|
1684
|
+
return data;
|
|
1685
|
+
}
|
|
1686
|
+
const color = fill.kind === "solid" ? fill.color : void 0;
|
|
1687
|
+
const withColor = (style2) => {
|
|
1688
|
+
const next = { ...style2 };
|
|
1689
|
+
if (color) next.color = color;
|
|
1690
|
+
else delete next.color;
|
|
1691
|
+
return next;
|
|
1692
|
+
};
|
|
1693
|
+
const style = { ...data.style };
|
|
1694
|
+
switch (target.kind) {
|
|
1695
|
+
case "chartArea":
|
|
1696
|
+
style.textStyle = withColor(style.textStyle);
|
|
1697
|
+
return { ...data, style };
|
|
1698
|
+
case "title": {
|
|
1699
|
+
if (color) style.titleFontColor = color;
|
|
1700
|
+
else delete style.titleFontColor;
|
|
1701
|
+
const titleRuns = data.titleRuns?.map((run) => withColor(run));
|
|
1702
|
+
return { ...data, style, ...titleRuns ? { titleRuns } : {} };
|
|
1703
|
+
}
|
|
1704
|
+
case "legend":
|
|
1705
|
+
style.legendTextStyle = withColor(style.legendTextStyle);
|
|
1706
|
+
return { ...data, style };
|
|
1707
|
+
case "axis":
|
|
1708
|
+
return {
|
|
1709
|
+
...data,
|
|
1710
|
+
axes: (data.axes ?? []).map((axis, i) => {
|
|
1711
|
+
if (i !== target.axisIndex) return axis;
|
|
1712
|
+
const next = { ...axis };
|
|
1713
|
+
if (color) next.fontColor = color;
|
|
1714
|
+
else delete next.fontColor;
|
|
1715
|
+
return next;
|
|
1716
|
+
})
|
|
1717
|
+
};
|
|
1718
|
+
case "dataLabels":
|
|
1719
|
+
if (target.seriesIndex === void 0) {
|
|
1720
|
+
style.dataLabels = { ...style.dataLabels, txPr: withColor(style.dataLabels?.txPr) };
|
|
1721
|
+
return { ...data, style };
|
|
1722
|
+
}
|
|
1723
|
+
return withSeries(data, target.seriesIndex, (series) => ({
|
|
1724
|
+
...series,
|
|
1725
|
+
dataLabelOptions: {
|
|
1726
|
+
...series.dataLabelOptions,
|
|
1727
|
+
txPr: withColor(series.dataLabelOptions?.txPr)
|
|
1728
|
+
}
|
|
1729
|
+
}));
|
|
1730
|
+
default:
|
|
1731
|
+
return data;
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
// pptx/core/builders/sdk/chart-element-format-read.ts
|
|
1736
|
+
function chartFormatTargetSupports(data, target) {
|
|
1737
|
+
const filled = (fill, threeD, text) => ({
|
|
1738
|
+
fill,
|
|
1739
|
+
gradient: fill,
|
|
1740
|
+
pattern: fill,
|
|
1741
|
+
picture: fill,
|
|
1742
|
+
threeD,
|
|
1743
|
+
text
|
|
1744
|
+
});
|
|
1745
|
+
switch (target.kind) {
|
|
1746
|
+
case "axis":
|
|
1747
|
+
return filled(false, false, true);
|
|
1748
|
+
case "majorGridlines":
|
|
1749
|
+
case "minorGridlines":
|
|
1750
|
+
return filled(false, false, false);
|
|
1751
|
+
case "series": {
|
|
1752
|
+
const series = data.series[target.seriesIndex];
|
|
1753
|
+
const lineDrawn = isLineDrawnChartType(series?.seriesChartType ?? data.chartType);
|
|
1754
|
+
return filled(!lineDrawn, true, false);
|
|
1755
|
+
}
|
|
1756
|
+
case "plotArea":
|
|
1757
|
+
return filled(true, true, false);
|
|
1758
|
+
default:
|
|
1759
|
+
return filled(true, true, true);
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
function defaultGradient(color) {
|
|
1763
|
+
const base = color && /^#?[0-9a-f]{6}$/iu.test(color) ? color.replace(/^#?/u, "#") : "#4472C4";
|
|
1764
|
+
return {
|
|
1765
|
+
type: "linear",
|
|
1766
|
+
angle: 90,
|
|
1767
|
+
stops: [
|
|
1768
|
+
{ color: "#FFFFFF", position: 0 },
|
|
1769
|
+
{ color: base.toUpperCase(), position: 100 }
|
|
1770
|
+
]
|
|
1771
|
+
};
|
|
1772
|
+
}
|
|
1773
|
+
function defaultPattern(color) {
|
|
1774
|
+
const base = color && /^#?[0-9a-f]{6}$/iu.test(color) ? color.replace(/^#?/u, "#") : "#4472C4";
|
|
1775
|
+
return { preset: "pct5", foreground: base.toUpperCase(), background: "#FFFFFF" };
|
|
1776
|
+
}
|
|
1777
|
+
function paintKind(paint) {
|
|
1778
|
+
if (paint === void 0) {
|
|
1779
|
+
return { kind: "automatic" };
|
|
1780
|
+
}
|
|
1781
|
+
return paint === "none" ? { kind: "none" } : { kind: "solid", color: paint };
|
|
1782
|
+
}
|
|
1783
|
+
function lineFromShape(shape) {
|
|
1784
|
+
if (!shape) {
|
|
1785
|
+
return { kind: "automatic" };
|
|
1786
|
+
}
|
|
1787
|
+
const line = shape.lineNoFill ? { kind: "none" } : shape.strokeColor ? { kind: "solid", color: shape.strokeColor } : { kind: "automatic" };
|
|
1788
|
+
if (shape.strokeWidth !== void 0) {
|
|
1789
|
+
line.width = shape.strokeWidth;
|
|
1790
|
+
}
|
|
1791
|
+
if (shape.strokeDashStyle) {
|
|
1792
|
+
line.dash = shape.strokeDashStyle;
|
|
1793
|
+
}
|
|
1794
|
+
return line;
|
|
1795
|
+
}
|
|
1796
|
+
function flatView(data, target) {
|
|
1797
|
+
const style = data.style;
|
|
1798
|
+
switch (target.kind) {
|
|
1799
|
+
case "chartArea":
|
|
1800
|
+
case "plotArea": {
|
|
1801
|
+
const gradient = style?.[`${target.kind}Gradient`];
|
|
1802
|
+
const fill = gradient ? { kind: "gradient", gradient } : paintKind(style?.[`${target.kind}Fill`]);
|
|
1803
|
+
const border = paintKind(style?.[`${target.kind}Border`]);
|
|
1804
|
+
return {
|
|
1805
|
+
fill,
|
|
1806
|
+
line: border.kind === "gradient" ? { kind: "automatic" } : border
|
|
1807
|
+
};
|
|
1808
|
+
}
|
|
1809
|
+
case "title": {
|
|
1810
|
+
const shape = style?.titleSpPr;
|
|
1811
|
+
return {
|
|
1812
|
+
fill: shape?.fillColor ? { kind: "solid", color: shape.fillColor } : { kind: "automatic" },
|
|
1813
|
+
line: lineFromShape(shape)
|
|
1814
|
+
};
|
|
1815
|
+
}
|
|
1816
|
+
case "axis":
|
|
1817
|
+
case "majorGridlines":
|
|
1818
|
+
case "minorGridlines": {
|
|
1819
|
+
const axis = data.axes?.[target.axisIndex];
|
|
1820
|
+
const shape = target.kind === "axis" ? axis?.spPr : target.kind === "majorGridlines" ? axis?.majorGridlinesSpPr : axis?.minorGridlinesSpPr;
|
|
1821
|
+
return { fill: { kind: "automatic" }, line: lineFromShape(shape) };
|
|
1822
|
+
}
|
|
1823
|
+
case "series": {
|
|
1824
|
+
const series = data.series[target.seriesIndex];
|
|
1825
|
+
if (!series) {
|
|
1826
|
+
return { fill: { kind: "automatic" }, line: { kind: "automatic" } };
|
|
1827
|
+
}
|
|
1828
|
+
const lineDrawn = isLineDrawnChartType(series.seriesChartType ?? data.chartType);
|
|
1829
|
+
const line = series.lineNoFill ? { kind: "none" } : lineDrawn && series.color ? { kind: "solid", color: series.color } : { kind: "automatic" };
|
|
1830
|
+
if (series.lineWidth !== void 0) {
|
|
1831
|
+
line.width = series.lineWidth;
|
|
1832
|
+
}
|
|
1833
|
+
if (series.lineDashStyle) {
|
|
1834
|
+
line.dash = series.lineDashStyle;
|
|
1835
|
+
}
|
|
1836
|
+
const fill = series.gradientFill ? { kind: "gradient", gradient: series.gradientFill } : !lineDrawn && series.color ? { kind: "solid", color: series.color } : { kind: "automatic" };
|
|
1837
|
+
return { fill, line };
|
|
1838
|
+
}
|
|
1839
|
+
default:
|
|
1840
|
+
return { fill: { kind: "automatic" }, line: { kind: "automatic" } };
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
function readChartElementFormat(data, target) {
|
|
1844
|
+
const support = chartFormatTargetSupports(data, target);
|
|
1845
|
+
const recorded = data.elementFormats?.[chartFormatTargetKey(target)];
|
|
1846
|
+
const flat = recorded?.reset ? { fill: { kind: "automatic" }, line: { kind: "automatic" } } : flatView(data, target);
|
|
1847
|
+
const fill = recorded?.fill && flat.fill.kind !== "gradient" ? { ...recorded.fill } : { ...flat.fill };
|
|
1848
|
+
const line = recorded?.line ? { ...recorded.line } : { ...flat.line };
|
|
1849
|
+
if (fill.kind === "solid" && flat.fill.kind === "solid" && flat.fill.color) {
|
|
1850
|
+
fill.color = flat.fill.color;
|
|
1851
|
+
}
|
|
1852
|
+
const gradient = "gradient" in fill && fill.gradient ? fill.gradient : defaultGradient(fill.color);
|
|
1853
|
+
const pattern = "pattern" in fill && fill.pattern ? fill.pattern : defaultPattern(fill.color);
|
|
1854
|
+
if (line.kind === "gradient" && !line.gradient) {
|
|
1855
|
+
line.gradient = defaultGradient(line.color);
|
|
1856
|
+
}
|
|
1857
|
+
return {
|
|
1858
|
+
support,
|
|
1859
|
+
fill: {
|
|
1860
|
+
...fill,
|
|
1861
|
+
...support.gradient ? { gradient } : {},
|
|
1862
|
+
...support.pattern ? { pattern } : {}
|
|
1863
|
+
},
|
|
1864
|
+
line,
|
|
1865
|
+
effects: { ...recorded?.effects },
|
|
1866
|
+
threeD: { ...recorded?.threeD },
|
|
1867
|
+
text: { ...recorded?.text },
|
|
1868
|
+
reset: Boolean(
|
|
1869
|
+
recorded?.reset && !recorded.fill && !recorded.line && !recorded.effects && !recorded.threeD && !recorded.text
|
|
1870
|
+
)
|
|
1871
|
+
};
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
// pptx/core/builders/sdk/chart-element-format-operations.ts
|
|
1780
1875
|
function withChartElementFormat(data, target, patch) {
|
|
1781
1876
|
const key = chartFormatTargetKey(target);
|
|
1782
1877
|
const view = readChartElementFormat(data, target);
|
|
@@ -1787,13 +1882,33 @@ function withChartElementFormat(data, target, patch) {
|
|
|
1787
1882
|
if (patch.fill && view.support.fill) {
|
|
1788
1883
|
const kind = patch.fill.kind ?? view.fill.kind;
|
|
1789
1884
|
if (kind === "gradient") {
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
}
|
|
1885
|
+
const gradient = patch.fill.gradient ?? view.fill.gradient;
|
|
1886
|
+
if (gradient && hasGradientField(target)) {
|
|
1887
|
+
next = applyGradient(next, target, gradient);
|
|
1888
|
+
delete entry.fill;
|
|
1889
|
+
} else if (gradient) {
|
|
1890
|
+
fill = { kind: "gradient", gradient };
|
|
1891
|
+
entry.fill = fill;
|
|
1892
|
+
}
|
|
1893
|
+
} else if (kind === "pattern") {
|
|
1894
|
+
const base = view.fill.pattern ?? {
|
|
1895
|
+
preset: "pct5",
|
|
1896
|
+
foreground: "#4472C4",
|
|
1897
|
+
background: "#FFFFFF"
|
|
1898
|
+
};
|
|
1899
|
+
fill = { kind: "pattern", pattern: { ...base, ...patch.fill.pattern } };
|
|
1900
|
+
entry.fill = fill;
|
|
1901
|
+
} else if (kind === "picture") {
|
|
1902
|
+
const previous2 = view.fill.kind === "picture" ? view.fill.picture : void 0;
|
|
1903
|
+
const picture = { ...previous2, ...patch.fill.picture };
|
|
1904
|
+
if (patch.fill.picture?.src && patch.fill.picture.src !== previous2?.src) {
|
|
1905
|
+
delete picture.relId;
|
|
1906
|
+
}
|
|
1907
|
+
if (!picture.src && !picture.relId) {
|
|
1908
|
+
return data;
|
|
1796
1909
|
}
|
|
1910
|
+
fill = { kind: "picture", picture };
|
|
1911
|
+
entry.fill = fill;
|
|
1797
1912
|
} else {
|
|
1798
1913
|
fill = {
|
|
1799
1914
|
kind,
|
|
@@ -1806,12 +1921,35 @@ function withChartElementFormat(data, target, patch) {
|
|
|
1806
1921
|
let line;
|
|
1807
1922
|
if (patch.line) {
|
|
1808
1923
|
line = { ...view.line, ...patch.line };
|
|
1924
|
+
if (line.kind !== "gradient") {
|
|
1925
|
+
delete line.gradient;
|
|
1926
|
+
}
|
|
1809
1927
|
entry.line = line;
|
|
1810
1928
|
}
|
|
1811
1929
|
if (patch.effects) {
|
|
1812
1930
|
entry.effects = { ...view.effects, ...patch.effects };
|
|
1813
1931
|
}
|
|
1932
|
+
if (patch.threeD && view.support.threeD) {
|
|
1933
|
+
entry.threeD = { ...view.threeD, ...patch.threeD };
|
|
1934
|
+
}
|
|
1935
|
+
if (patch.text && view.support.text) {
|
|
1936
|
+
const text = { ...view.text, ...patch.text };
|
|
1937
|
+
if (patch.text.fill) {
|
|
1938
|
+
text.fill = { kind: "automatic", ...view.text.fill, ...patch.text.fill };
|
|
1939
|
+
if (text.fill.kind !== "gradient") delete text.fill.gradient;
|
|
1940
|
+
}
|
|
1941
|
+
if (patch.text.outline) {
|
|
1942
|
+
text.outline = { kind: "automatic", ...view.text.outline, ...patch.text.outline };
|
|
1943
|
+
}
|
|
1944
|
+
if (patch.text.effects) {
|
|
1945
|
+
text.effects = { ...view.text.effects, ...patch.text.effects };
|
|
1946
|
+
}
|
|
1947
|
+
entry.text = text;
|
|
1948
|
+
}
|
|
1814
1949
|
next = mirrorFlatFields(next, target, fill, line);
|
|
1950
|
+
if (patch.text?.fill && entry.text) {
|
|
1951
|
+
next = mirrorTextColor(next, target, entry.text);
|
|
1952
|
+
}
|
|
1815
1953
|
return { ...next, elementFormats: { ...next.elementFormats, [key]: entry } };
|
|
1816
1954
|
}
|
|
1817
1955
|
function resetChartElementFormat(data, target) {
|
|
@@ -1952,7 +2090,10 @@ function withChartLegendOptions(data, edit) {
|
|
|
1952
2090
|
}
|
|
1953
2091
|
return { ...data, style };
|
|
1954
2092
|
}
|
|
1955
|
-
function withChartDataLabelOptions(data, edit) {
|
|
2093
|
+
function withChartDataLabelOptions(data, edit, seriesIndex) {
|
|
2094
|
+
if (seriesIndex !== void 0) {
|
|
2095
|
+
return withSeriesDataLabelOptions(data, edit, seriesIndex);
|
|
2096
|
+
}
|
|
1956
2097
|
const style = { ...data.style };
|
|
1957
2098
|
const labels = { ...style.dataLabels };
|
|
1958
2099
|
if (edit.show !== void 0) {
|
|
@@ -1980,6 +2121,157 @@ function withChartDataLabelOptions(data, edit) {
|
|
|
1980
2121
|
style.dataLabels = labels;
|
|
1981
2122
|
return { ...data, style };
|
|
1982
2123
|
}
|
|
2124
|
+
var LABEL_FLAGS = [
|
|
2125
|
+
"showValue",
|
|
2126
|
+
"showCategory",
|
|
2127
|
+
"showSeriesName",
|
|
2128
|
+
"showPercent",
|
|
2129
|
+
"showLegendKey"
|
|
2130
|
+
];
|
|
2131
|
+
function withSeriesDataLabelOptions(data, edit, seriesIndex) {
|
|
2132
|
+
const series = data.series[seriesIndex];
|
|
2133
|
+
if (!series) {
|
|
2134
|
+
return data;
|
|
2135
|
+
}
|
|
2136
|
+
const chartLevel = data.style?.dataLabels ?? {};
|
|
2137
|
+
const labels = { ...series.dataLabelOptions };
|
|
2138
|
+
for (const key of LABEL_FLAGS) {
|
|
2139
|
+
labels[key] ??= chartLevel[key] ?? false;
|
|
2140
|
+
if (edit[key] !== void 0) {
|
|
2141
|
+
labels[key] = edit[key];
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
if (edit.position !== void 0) {
|
|
2145
|
+
if (edit.position === null) {
|
|
2146
|
+
delete labels.position;
|
|
2147
|
+
} else {
|
|
2148
|
+
labels.position = edit.position;
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
const style = { ...data.style };
|
|
2152
|
+
if (style.hasDataLabels !== true && LABEL_FLAGS.some((key) => labels[key])) {
|
|
2153
|
+
style.hasDataLabels = true;
|
|
2154
|
+
const off = { ...style.dataLabels };
|
|
2155
|
+
for (const key of LABEL_FLAGS) {
|
|
2156
|
+
off[key] ??= false;
|
|
2157
|
+
}
|
|
2158
|
+
style.dataLabels = off;
|
|
2159
|
+
}
|
|
2160
|
+
return {
|
|
2161
|
+
...data,
|
|
2162
|
+
style,
|
|
2163
|
+
series: data.series.map((s, i) => i === seriesIndex ? { ...s, dataLabelOptions: labels } : s)
|
|
2164
|
+
};
|
|
2165
|
+
}
|
|
2166
|
+
|
|
2167
|
+
// pptx/core/builders/sdk/chart-series-axis-operations.ts
|
|
2168
|
+
var SECONDARY_TYPES = /* @__PURE__ */ new Set([
|
|
2169
|
+
"bar",
|
|
2170
|
+
"line",
|
|
2171
|
+
"area",
|
|
2172
|
+
"scatter",
|
|
2173
|
+
"bubble",
|
|
2174
|
+
"combo"
|
|
2175
|
+
]);
|
|
2176
|
+
function chartSupportsSecondaryAxis(data) {
|
|
2177
|
+
return SECONDARY_TYPES.has(data.chartType) && (data.axes ?? []).some((axis) => axis.axisType === "valAx");
|
|
2178
|
+
}
|
|
2179
|
+
function valueAxes(data) {
|
|
2180
|
+
return (data.axes ?? []).filter((axis) => axis.axisType === "valAx");
|
|
2181
|
+
}
|
|
2182
|
+
function valueAxisPair(data) {
|
|
2183
|
+
const values = valueAxes(data);
|
|
2184
|
+
const vertical = (axis) => axis.axPos === "l" || axis.axPos === "r";
|
|
2185
|
+
const primary = values.find((axis) => axis.axPos === "l") ?? values.find((axis) => axis.axPos === "b" && data.barDirection === "bar") ?? values[0];
|
|
2186
|
+
const secondary = values.find(
|
|
2187
|
+
(axis) => axis !== primary && (axis.axPos === "r" || axis.axPos === "t") && primary !== void 0 && vertical(axis) === vertical(primary)
|
|
2188
|
+
);
|
|
2189
|
+
return { primary, secondary };
|
|
2190
|
+
}
|
|
2191
|
+
function isChartSeriesOnSecondaryAxis(data, seriesIndex) {
|
|
2192
|
+
const series = data.series[seriesIndex];
|
|
2193
|
+
const { secondary } = valueAxisPair(data);
|
|
2194
|
+
return Boolean(series && secondary && series.axisId === secondary.axisId);
|
|
2195
|
+
}
|
|
2196
|
+
function reindexAxisFormats(formats, removed) {
|
|
2197
|
+
if (!formats) return formats;
|
|
2198
|
+
const out = {};
|
|
2199
|
+
for (const [key, value] of Object.entries(formats)) {
|
|
2200
|
+
const match = /^(axis|majorGridlines|minorGridlines):(\d+)$/u.exec(key);
|
|
2201
|
+
if (!match) {
|
|
2202
|
+
out[key] = value;
|
|
2203
|
+
continue;
|
|
2204
|
+
}
|
|
2205
|
+
const index = Number(match[2]);
|
|
2206
|
+
if (removed.includes(index)) continue;
|
|
2207
|
+
const shift = removed.filter((r) => r < index).length;
|
|
2208
|
+
out[`${match[1]}:${index - shift}`] = value;
|
|
2209
|
+
}
|
|
2210
|
+
return out;
|
|
2211
|
+
}
|
|
2212
|
+
function withChartSeriesOnSecondaryAxis(data, seriesIndex, secondary) {
|
|
2213
|
+
const series = data.series[seriesIndex];
|
|
2214
|
+
if (!series || !chartSupportsSecondaryAxis(data)) return data;
|
|
2215
|
+
if (isChartSeriesOnSecondaryAxis(data, seriesIndex) === secondary) return data;
|
|
2216
|
+
const axes = [...data.axes ?? []];
|
|
2217
|
+
const pair = valueAxisPair(data);
|
|
2218
|
+
const primary = pair.primary;
|
|
2219
|
+
if (!primary || primary.axisId === void 0) return data;
|
|
2220
|
+
if (!secondary) {
|
|
2221
|
+
const nextSeries = data.series.map(
|
|
2222
|
+
(s, i) => i === seriesIndex ? { ...s, axisId: primary.axisId } : s
|
|
2223
|
+
);
|
|
2224
|
+
const stillUsed = nextSeries.some((s) => s.axisId === pair.secondary?.axisId);
|
|
2225
|
+
if (stillUsed || !pair.secondary) {
|
|
2226
|
+
return { ...data, series: nextSeries };
|
|
2227
|
+
}
|
|
2228
|
+
const drop = /* @__PURE__ */ new Set([pair.secondary.axisId, pair.secondary.crossAxisId]);
|
|
2229
|
+
const removed = axes.flatMap((axis, i) => drop.has(axis.axisId) ? [i] : []);
|
|
2230
|
+
return {
|
|
2231
|
+
...data,
|
|
2232
|
+
series: nextSeries,
|
|
2233
|
+
axes: axes.filter((_, i) => !removed.includes(i)),
|
|
2234
|
+
elementFormats: reindexAxisFormats(data.elementFormats, removed)
|
|
2235
|
+
};
|
|
2236
|
+
}
|
|
2237
|
+
let target = pair.secondary;
|
|
2238
|
+
if (!target) {
|
|
2239
|
+
const used = axes.map((axis) => axis.axisId ?? 0);
|
|
2240
|
+
const valueId = Math.max(0, ...used) + 1;
|
|
2241
|
+
const crossId = valueId + 1;
|
|
2242
|
+
const primaryCross = axes.find((axis) => axis.axisId === primary.crossAxisId);
|
|
2243
|
+
const horizontal = primary.axPos === "b" || primary.axPos === "t";
|
|
2244
|
+
target = {
|
|
2245
|
+
axisType: "valAx",
|
|
2246
|
+
axisId: valueId,
|
|
2247
|
+
crossAxisId: crossId,
|
|
2248
|
+
axPos: horizontal ? "t" : "r",
|
|
2249
|
+
crosses: "max",
|
|
2250
|
+
crossBetween: primary.crossBetween ?? "between",
|
|
2251
|
+
majorTickMark: "out",
|
|
2252
|
+
minorTickMark: "none",
|
|
2253
|
+
tickLblPos: "nextTo",
|
|
2254
|
+
...primary.numFmt ? { numFmt: { ...primary.numFmt } } : {}
|
|
2255
|
+
};
|
|
2256
|
+
const cross = {
|
|
2257
|
+
axisType: primaryCross?.axisType ?? "catAx",
|
|
2258
|
+
axisId: crossId,
|
|
2259
|
+
crossAxisId: valueId,
|
|
2260
|
+
axPos: primaryCross?.axPos ?? (horizontal ? "l" : "b"),
|
|
2261
|
+
deleted: true,
|
|
2262
|
+
crosses: "autoZero",
|
|
2263
|
+
majorTickMark: "out",
|
|
2264
|
+
minorTickMark: "none",
|
|
2265
|
+
tickLblPos: "nextTo"
|
|
2266
|
+
};
|
|
2267
|
+
axes.push(target, cross);
|
|
2268
|
+
}
|
|
2269
|
+
return {
|
|
2270
|
+
...data,
|
|
2271
|
+
axes,
|
|
2272
|
+
series: data.series.map((s, i) => i === seriesIndex ? { ...s, axisId: target.axisId } : s)
|
|
2273
|
+
};
|
|
2274
|
+
}
|
|
1983
2275
|
|
|
1984
2276
|
// pptx/core/builders/sdk/chart-user-shape-operations.ts
|
|
1985
2277
|
function ensureChartData2(element) {
|
|
@@ -14665,7 +14957,7 @@ async function setPresentationRunText(bytes, slideIndex, elementId, runIndex, te
|
|
|
14665
14957
|
async function createPresentationFromOutline(slides, options = {}) {
|
|
14666
14958
|
if (!(slides instanceof Array) || !slides.length || slides.length > 200)
|
|
14667
14959
|
throw new Error("A presentation outline has 1 to 200 slides");
|
|
14668
|
-
const { PresentationBuilder: PresentationBuilder2 } = await import('./PresentationBuilder-
|
|
14960
|
+
const { PresentationBuilder: PresentationBuilder2 } = await import('./PresentationBuilder-Y6DJK6H2.mjs');
|
|
14669
14961
|
const { handler, data, createSlide } = await PresentationBuilder2.create({
|
|
14670
14962
|
...options.title ? { title: options.title } : {}
|
|
14671
14963
|
});
|
|
@@ -14701,4 +14993,4 @@ async function createPresentationFromOutline(slides, options = {}) {
|
|
|
14701
14993
|
return handler.save(data.slides);
|
|
14702
14994
|
}
|
|
14703
14995
|
|
|
14704
|
-
export { ChartBuilder, ConnectorBuilder, GroupBuilder, ImageBuilder, MediaBuilder, OPENXML_COVERAGE, OPENXML_SCHEMA_CONSTRUCT_IDS, OPENXML_STRICT_SCHEMA_CONSTRUCT_IDS, OPENXML_TRANSITIONAL_SCHEMA_CONSTRUCT_IDS, Presentation, SLIDE_PACKAGE_CLIPBOARD_MIME, ShapeBuilder, SlideSizes, THEME_PRESETS, TRANSITION_PATTERN_OPTIONS, TRANSITION_THRUBLK_TYPES, TRANSITION_VALID_DIRECTIONS, TableBuilder, TextBuilder, ThemePresets, addChartUserShape, addChartUserShapeGroupChild, addSection, applyTemplate, chartFormatTargetSupports, cm, cmToEmu, collectLayoutNames, collectMasterNames, createLayout, createLayouts, createPresentationFromOutline, createSlideClipboardPackage, deleteLayout, deleteSlideMaster, deserializeSlidePackageClipboard, diffPresentations, diffSlides, duplicateElement, duplicateLayout, duplicateSlide, duplicateSlideMaster, emuToPixels, findLayoutByName, findLayoutByType, findOpenXmlCoverage, findPlaceholders, generateLayoutXml, getChartUserShapeAtPath, getSectionForSlide, getThemePreset, importSlidePackage, inches, inchesToEmu, insertLayout, insertSlideMaster, inspectPresentationText, interpolateShapeGeometry, listChartUserShapes, listUnassessedOpenXmlCoverage, mailMerge, mm, moveSlidesToSection, parseSvgPath, pixelsToEmu, pt, readChartElementFormat, removeChartUserShape, removeChartUserShapeAtPath, removeSection, renameLayout, renameSlideMaster, reorderSections, replaceShapeGeometry, replaceWithCustomGeometry, resetChartElementFormat, resetCloneIdCounter, resetSectionIdCounter, serializeSlidePackageClipboard, serializeSvgPath, setChartColorMapOverride, setChartDataPointGradient, setChartDataPointStyle, setChartHelperLine, setChartSeriesGradient, setElementLocked, setPresentationRunText, summarizeOpenXmlCoverage, summarizeOpenXmlCoverageByVocabulary, uniqueDisplayName, uniquePrefixedName, updateChartUserShape, updateChartUserShapeAtPath, withChartAxisOptions, withChartDataLabelOptions, withChartElementFormat, withChartLegendOptions, withChartSeriesOptions };
|
|
14996
|
+
export { ChartBuilder, ConnectorBuilder, GroupBuilder, ImageBuilder, MediaBuilder, OPENXML_COVERAGE, OPENXML_SCHEMA_CONSTRUCT_IDS, OPENXML_STRICT_SCHEMA_CONSTRUCT_IDS, OPENXML_TRANSITIONAL_SCHEMA_CONSTRUCT_IDS, Presentation, SLIDE_PACKAGE_CLIPBOARD_MIME, ShapeBuilder, SlideSizes, THEME_PRESETS, TRANSITION_PATTERN_OPTIONS, TRANSITION_THRUBLK_TYPES, TRANSITION_VALID_DIRECTIONS, TableBuilder, TextBuilder, ThemePresets, addChartUserShape, addChartUserShapeGroupChild, addSection, applyTemplate, chartFormatTargetSupports, chartSupportsSecondaryAxis, cm, cmToEmu, collectLayoutNames, collectMasterNames, createLayout, createLayouts, createPresentationFromOutline, createSlideClipboardPackage, deleteLayout, deleteSlideMaster, deserializeSlidePackageClipboard, diffPresentations, diffSlides, duplicateElement, duplicateLayout, duplicateSlide, duplicateSlideMaster, emuToPixels, findLayoutByName, findLayoutByType, findOpenXmlCoverage, findPlaceholders, generateLayoutXml, getChartUserShapeAtPath, getSectionForSlide, getThemePreset, importSlidePackage, inches, inchesToEmu, insertLayout, insertSlideMaster, inspectPresentationText, interpolateShapeGeometry, isChartSeriesOnSecondaryAxis, listChartUserShapes, listUnassessedOpenXmlCoverage, mailMerge, mm, moveSlidesToSection, parseSvgPath, pixelsToEmu, pt, readChartElementFormat, removeChartUserShape, removeChartUserShapeAtPath, removeSection, renameLayout, renameSlideMaster, reorderSections, replaceShapeGeometry, replaceWithCustomGeometry, resetChartElementFormat, resetCloneIdCounter, resetSectionIdCounter, serializeSlidePackageClipboard, serializeSvgPath, setChartColorMapOverride, setChartDataPointGradient, setChartDataPointStyle, setChartHelperLine, setChartSeriesGradient, setElementLocked, setPresentationRunText, summarizeOpenXmlCoverage, summarizeOpenXmlCoverageByVocabulary, uniqueDisplayName, uniquePrefixedName, updateChartUserShape, updateChartUserShapeAtPath, withChartAxisOptions, withChartDataLabelOptions, withChartElementFormat, withChartLegendOptions, withChartSeriesOnSecondaryAxis, withChartSeriesOptions };
|