pptx-react-viewer 1.1.2 → 1.1.3
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/node_modules/emf-converter/package.json +1 -1
- package/node_modules/mtx-decompressor/package.json +1 -1
- package/node_modules/pptx-viewer-core/dist/{SvgExporter--H1PDfAY.d.ts → SvgExporter-BMjoxMDV.d.ts} +1 -1
- package/node_modules/pptx-viewer-core/dist/{SvgExporter-Dq_2eV_r.d.mts → SvgExporter-z6AbXRQg.d.mts} +1 -1
- package/node_modules/pptx-viewer-core/dist/cli/index.d.mts +2 -2
- package/node_modules/pptx-viewer-core/dist/cli/index.d.ts +2 -2
- package/node_modules/pptx-viewer-core/dist/cli/index.js +165 -18
- package/node_modules/pptx-viewer-core/dist/cli/index.mjs +165 -18
- package/node_modules/pptx-viewer-core/dist/converter/index.d.mts +3 -3
- package/node_modules/pptx-viewer-core/dist/converter/index.d.ts +3 -3
- package/node_modules/pptx-viewer-core/dist/index.d.mts +26 -5
- package/node_modules/pptx-viewer-core/dist/index.d.ts +26 -5
- package/node_modules/pptx-viewer-core/dist/index.js +165 -18
- package/node_modules/pptx-viewer-core/dist/index.mjs +165 -18
- package/node_modules/pptx-viewer-core/dist/{presentation-BozkirFp.d.mts → presentation-CchuDGfU.d.mts} +1 -1
- package/node_modules/pptx-viewer-core/dist/{presentation-BozkirFp.d.ts → presentation-CchuDGfU.d.ts} +1 -1
- package/node_modules/pptx-viewer-core/dist/{text-operations-B2JbPA5H.d.mts → text-operations-CeukUztU.d.mts} +1 -1
- package/node_modules/pptx-viewer-core/dist/{text-operations-zwF6i4eH.d.ts → text-operations-e7JxgI5l.d.ts} +1 -1
- package/node_modules/pptx-viewer-core/package.json +1 -1
- package/package.json +4 -4
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { P as PptxElement, a as PptxElementWithShapeStyle, b as PptxElementWithText, C as ConnectorPptxElement, c as PptxImageLikeElement, I as InkPptxElement, S as ShapePptxElement, T as TextPptxElement, Z as ZoomPptxElement, d as PptxThemeColorScheme, e as PptxThemeFontScheme, f as PptxAnimationPreset, g as PptxAnimationTrigger, h as StrokeDashType, i as ConnectorArrowType, j as PptxTransitionType, k as PptxChartType, l as PptxSlide, m as PptxData, n as PptxCompatibilityWarning, o as PptxLayoutOption, X as XmlObject, p as PptxChartData, q as PptxSmartArtData, r as PptxHeaderFooter, s as PptxPresentationProperties, t as PptxCustomShow, u as PptxSection, v as PptxCoreProperties, w as PptxAppProperties, x as PptxCustomProperty, y as PptxNotesMaster, z as PptxHandoutMaster, A as PptxTagCollection, B as PptxPhotoAlbum, D as PptxKinsoku, E as PptxModifyVerifier, F as PptxViewProperties, G as PptxEmbeddedFont, H as PptxExportOptions, J as PptxThemeFormatScheme, K as TextSegment, L as PptxComment, M as PptxSlideTransition, N as PptxElementAnimation, O as PptxNativeAnimation, Q as PptxCustomerData, R as PptxActiveXControl, U as AnimationCondition, V as ShapeStyle, W as TextStyle, Y as ElementAction, _ as PptxAction, $ as OleObjectType, a0 as PptxSmartArtNode, a1 as SmartArtLayoutType, a2 as PptxSmartArtDrawingShape, a3 as PptxChartDataTable, a4 as PptxChartLineStyle, a5 as PptxChartErrBars, a6 as PptxChartTrendline, a7 as PptxChartMarker, a8 as PptxChartDataLabel, a9 as PptxChartDataPoint, aa as PptxChartShapeProps, ab as PptxChart3DSurface, ac as PptxChartAxisFormatting, ad as PptxEmbeddedWorkbookData, ae as PptxDrawingGuide, af as PptxTableCellStyle, ag as PptxCustomXmlPart, ah as PptxCommentAuthor, ai as MediaPptxElement, aj as PptxTableData, ak as PptxTheme, al as ParsedTableStyleMap, am as PptxSlideMaster, an as PptxThemeOption, ao as PlaceholderDefaults, ap as ParsedTableStyleFill, aq as ParsedTableStyleText, ar as PptxImageEffects, as as MediaBookmark, at as PptxChartStyle, au as
|
|
2
|
-
export { aN as ActionButtonPreset, aO as AnimationConditionEvent, aP as BevelPresetType, aQ as ConnectorConnectionPoint, aR as ContentPartInkStroke, aS as ContentPartPptxElement, aT as CustomGeometrySegment, aU as ElementActionType, aV as MasterViewTab, aW as MaterialPresetType, aX as MediaCaptionTrack, aY as MediaMetadata, aZ as Model3DPptxElement, a_ as OlePptxElement, a$ as ParsedTableStyleEntry, b0 as PicturePptxElement, b1 as Pptx3DScene, b2 as Pptx3DShape, b3 as PptxAfterAnimationAction, b4 as PptxAnimationDirection, b5 as PptxAnimationIterate, b6 as PptxAnimationRepeatMode, b7 as PptxAnimationSequence, b8 as PptxAnimationTimingCurve, b9 as PptxChartAxisNumFmt, ba as PptxChartErrBarDir, bb as PptxChartErrBarType, bc as PptxChartErrValType, bd as PptxChartMarkerSymbol, be as PptxChartTrendlineType, bf as PptxColorAnimation, bg as PptxCommonSlideViewProperties, bh as PptxCropShape, bi as PptxCustomPathProperties, bj as PptxElementBase, bk as PptxElementType, bl as PptxExportFormat, bm as PptxImageProperties, bn as PptxMasterTextStyles, bo as PptxMediaType, bp as PptxNormalViewProperties, bq as PptxRestoredRegion, br as PptxShapeProperties, bs as PptxSlideLayout, bt as PptxSmartArtConnection, bu as PptxSplitDirection, bv as PptxSplitOrientation, bw as PptxStripDirection, bx as PptxTableCell, by as PptxTableRow, bz as PptxTag, bA as PptxTextAnimationTarget, bB as PptxTextBuildType, bC as PptxTextProperties, bD as PptxTextStyleLevels, bE as PptxTextWarpPreset, bF as PptxThemeFontGroup, bG as PptxTransitionDirection4, bH as PptxTransitionDirection8, bI as PptxViewOrigin, bJ as PptxViewScale, bK as ShadowEffect, bL as SmartArtColorScheme, bM as SmartArtLayout, bN as SmartArtStyle, bO as THEME_COLOR_SCHEME_KEYS, bP as TRANSITION_VALID_DIRECTIONS, bQ as Text3DStyle, bR as UnderlineStyle, bS as UnknownPptxElement } from './presentation-
|
|
3
|
-
import { F as FindResult, M as MergeOptions } from './text-operations-
|
|
4
|
-
export { f as findText, m as mergePresentation, r as replaceText, a as replaceTextInSlide } from './text-operations-
|
|
1
|
+
import { P as PptxElement, a as PptxElementWithShapeStyle, b as PptxElementWithText, C as ConnectorPptxElement, c as PptxImageLikeElement, I as InkPptxElement, S as ShapePptxElement, T as TextPptxElement, Z as ZoomPptxElement, d as PptxThemeColorScheme, e as PptxThemeFontScheme, f as PptxAnimationPreset, g as PptxAnimationTrigger, h as StrokeDashType, i as ConnectorArrowType, j as PptxTransitionType, k as PptxChartType, l as PptxSlide, m as PptxData, n as PptxCompatibilityWarning, o as PptxLayoutOption, X as XmlObject, p as PptxChartData, q as PptxSmartArtData, r as PptxHeaderFooter, s as PptxPresentationProperties, t as PptxCustomShow, u as PptxSection, v as PptxCoreProperties, w as PptxAppProperties, x as PptxCustomProperty, y as PptxNotesMaster, z as PptxHandoutMaster, A as PptxTagCollection, B as PptxPhotoAlbum, D as PptxKinsoku, E as PptxModifyVerifier, F as PptxViewProperties, G as PptxEmbeddedFont, H as PptxExportOptions, J as PptxThemeFormatScheme, K as TextSegment, L as PptxComment, M as PptxSlideTransition, N as PptxElementAnimation, O as PptxNativeAnimation, Q as PptxCustomerData, R as PptxActiveXControl, U as AnimationCondition, V as ShapeStyle, W as TextStyle, Y as ElementAction, _ as PptxAction, $ as OleObjectType, a0 as PptxSmartArtNode, a1 as SmartArtLayoutType, a2 as PptxSmartArtDrawingShape, a3 as PptxChartDataTable, a4 as PptxChartLineStyle, a5 as PptxChartErrBars, a6 as PptxChartTrendline, a7 as PptxChartMarker, a8 as PptxChartDataLabel, a9 as PptxChartDataPoint, aa as PptxChartShapeProps, ab as PptxChart3DSurface, ac as PptxChartAxisFormatting, ad as PptxEmbeddedWorkbookData, ae as PptxDrawingGuide, af as PptxTableCellStyle, ag as PptxCustomXmlPart, ah as PptxCommentAuthor, ai as MediaPptxElement, aj as PptxTableData, ak as PptxTheme, al as ParsedTableStyleMap, am as PptxSlideMaster, an as PptxThemeOption, ao as PlaceholderDefaults, ap as ParsedTableStyleFill, aq as ParsedTableStyleText, ar as PptxImageEffects, as as MediaBookmark, at as PptxChartStyle, au as TablePptxElement, av as GroupPptxElement, aw as PlaceholderTextLevelStyle, ax as PptxChartSeries, ay as SmartArtPptxElement, az as GeometryAdjustmentHandle, aA as BulletInfo, aB as PptxShapeLocks, aC as PptxThemeFillStyle, aD as PptxThemeLineStyle, aE as PptxThemeEffectStyle, aF as PptxSmartArtChrome, aG as PptxSmartArtColorTransform, aH as PptxSmartArtQuickStyle, aI as PptxExternalData, aJ as CustomGeometryPoint, aK as CustomGeometryPath, aL as ChartPptxElement, aM as ImagePptxElement } from './presentation-CchuDGfU.mjs';
|
|
2
|
+
export { aN as ActionButtonPreset, aO as AnimationConditionEvent, aP as BevelPresetType, aQ as ConnectorConnectionPoint, aR as ContentPartInkStroke, aS as ContentPartPptxElement, aT as CustomGeometrySegment, aU as ElementActionType, aV as MasterViewTab, aW as MaterialPresetType, aX as MediaCaptionTrack, aY as MediaMetadata, aZ as Model3DPptxElement, a_ as OlePptxElement, a$ as ParsedTableStyleEntry, b0 as PicturePptxElement, b1 as Pptx3DScene, b2 as Pptx3DShape, b3 as PptxAfterAnimationAction, b4 as PptxAnimationDirection, b5 as PptxAnimationIterate, b6 as PptxAnimationRepeatMode, b7 as PptxAnimationSequence, b8 as PptxAnimationTimingCurve, b9 as PptxChartAxisNumFmt, ba as PptxChartErrBarDir, bb as PptxChartErrBarType, bc as PptxChartErrValType, bd as PptxChartMarkerSymbol, be as PptxChartTrendlineType, bf as PptxColorAnimation, bg as PptxCommonSlideViewProperties, bh as PptxCropShape, bi as PptxCustomPathProperties, bj as PptxElementBase, bk as PptxElementType, bl as PptxExportFormat, bm as PptxImageProperties, bn as PptxMasterTextStyles, bo as PptxMediaType, bp as PptxNormalViewProperties, bq as PptxRestoredRegion, br as PptxShapeProperties, bs as PptxSlideLayout, bt as PptxSmartArtConnection, bu as PptxSplitDirection, bv as PptxSplitOrientation, bw as PptxStripDirection, bx as PptxTableCell, by as PptxTableRow, bz as PptxTag, bA as PptxTextAnimationTarget, bB as PptxTextBuildType, bC as PptxTextProperties, bD as PptxTextStyleLevels, bE as PptxTextWarpPreset, bF as PptxThemeFontGroup, bG as PptxTransitionDirection4, bH as PptxTransitionDirection8, bI as PptxViewOrigin, bJ as PptxViewScale, bK as ShadowEffect, bL as SmartArtColorScheme, bM as SmartArtLayout, bN as SmartArtStyle, bO as THEME_COLOR_SCHEME_KEYS, bP as TRANSITION_VALID_DIRECTIONS, bQ as Text3DStyle, bR as UnderlineStyle, bS as UnknownPptxElement } from './presentation-CchuDGfU.mjs';
|
|
3
|
+
import { F as FindResult, M as MergeOptions } from './text-operations-CeukUztU.mjs';
|
|
4
|
+
export { f as findText, m as mergePresentation, r as replaceText, a as replaceTextInSlide } from './text-operations-CeukUztU.mjs';
|
|
5
5
|
import { XMLParser, XMLBuilder } from 'fast-xml-parser';
|
|
6
6
|
import JSZip from 'jszip';
|
|
7
7
|
export { C as CertificateRevocationStatus, D as DIGEST_ALGORITHM_TO_HASH, a as DIGEST_ALGORITHM_TO_WEB_CRYPTO, b as DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, c as DIGITAL_SIGNATURE_REL_TYPE, d as DigitalSignatureReport, e as DigitalSignatureVerificationStatus, E as ENTERPRISE_FAIL_ON_REVOCATION_UNKNOWN_ENV, f as ENTERPRISE_REQUIRE_REVOCATION_ENV, g as ENTERPRISE_REQUIRE_TIMESTAMP_ENV, h as ENTERPRISE_TRUST_ROOTS_FILE_ENV, i as ENTERPRISE_TRUST_ROOTS_PEM_ENV, L as LoadedSigningMaterial, O as OPC_RELATIONSHIP_TRANSFORM, j as OfficeSignatureReference, P as PPTX_VIEWER_MANIFEST_NS, k as ParsedReferenceTransform, R as ReferenceTransformResult, S as SUPPORTED_XML_CANON_TRANSFORMS, l as SignOptions, m as SignResult, n as SignatureDetail, o as SignatureDetailStatus, p as SignatureNodeCertificateInfo, q as SignatureReferenceCheck, r as SignatureValidationPolicy, T as TimestampAuthorityStatus, X as XMLDSIG_NS, s as XML_TRANSFORM_ENVELOPED_SIGNATURE, t as computeDetailStatus, u as computeDigestBase64WebCrypto, v as computeVerificationStatus, w as escapeXmlAttr, x as extractAllTagText, y as extractFirstTagText, z as extractTagAttribute, A as normalizePartPath, B as resolveReferenceUriToPart } from './signature-inspection-status-BcJSdOvb.mjs';
|
|
8
8
|
export { convertEmfToDataUrl, convertWmfToDataUrl } from 'emf-converter';
|
|
9
|
-
export { C as ConversionOptions, a as ConversionResult, D as DocumentConverter, F as FileSystemAdapter, M as MediaContext, P as PptxConverterOptions, b as PptxMarkdownConverter, S as SlideProcessor, c as SlideProcessorOptions, d as SvgExportOptions, e as SvgExporter, f as dataUrlToMediaBytes, g as deriveOutputPath, h as generateMediaFilename, i as getDirectory, n as normalizePath } from './SvgExporter-
|
|
9
|
+
export { C as ConversionOptions, a as ConversionResult, D as DocumentConverter, F as FileSystemAdapter, M as MediaContext, P as PptxConverterOptions, b as PptxMarkdownConverter, S as SlideProcessor, c as SlideProcessorOptions, d as SvgExportOptions, e as SvgExporter, f as dataUrlToMediaBytes, g as deriveOutputPath, h as generateMediaFilename, i as getDirectory, n as normalizePath } from './SvgExporter-z6AbXRQg.mjs';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Runtime type guards for narrowing the {@link PptxElement} union.
|
|
@@ -4343,6 +4343,13 @@ interface IPptxPresentationSlidesReconciler {
|
|
|
4343
4343
|
}
|
|
4344
4344
|
declare class PptxPresentationSlidesReconciler implements IPptxPresentationSlidesReconciler {
|
|
4345
4345
|
reconcile(input: PptxPresentationSlidesReconcilerInput): Promise<void>;
|
|
4346
|
+
/**
|
|
4347
|
+
* Return a new presentation XML object whose `p:sldIdLst` child sits in the
|
|
4348
|
+
* schema-mandated position (after `sldMasterIdLst` / `notesMasterIdLst` /
|
|
4349
|
+
* `handoutMasterIdLst`, before `sldSz`). Non-sldIdLst keys keep their
|
|
4350
|
+
* relative order; attribute keys (`@_...`) stay at the front.
|
|
4351
|
+
*/
|
|
4352
|
+
private insertSlideIdListInOrder;
|
|
4346
4353
|
private attachNewSlide;
|
|
4347
4354
|
private tryCopySourceRelationships;
|
|
4348
4355
|
private removeInactiveSlides;
|
|
@@ -5469,6 +5476,20 @@ declare class PptxHandlerRuntime$Z extends PptxHandlerRuntime$_ {
|
|
|
5469
5476
|
}
|
|
5470
5477
|
|
|
5471
5478
|
declare class PptxHandlerRuntime$Y extends PptxHandlerRuntime$Z {
|
|
5479
|
+
/**
|
|
5480
|
+
* Build a `p:graphicFrame` XML skeleton for an SDK-created table.
|
|
5481
|
+
*
|
|
5482
|
+
* Tables round-trip as `<p:graphicFrame>/<a:graphic>/<a:graphicData
|
|
5483
|
+
* uri=".../drawingml/2006/table">/<a:tbl>` inside `p:spTree`. When the
|
|
5484
|
+
* element was loaded from an existing file, `el.rawXml` already contains
|
|
5485
|
+
* this envelope and the downstream `serializeTableDataToXml` path
|
|
5486
|
+
* populates cells in place. When the element was created via the SDK
|
|
5487
|
+
* (`SlideBuilder.addTable`), there is no `rawXml`, so this method
|
|
5488
|
+
* fabricates a minimal envelope with an empty `a:tbl`. The element
|
|
5489
|
+
* writer then calls `serializeTableDataToXml`, which triggers
|
|
5490
|
+
* `rebuildTableXmlFromData` and fills in `a:tblGrid` / `a:tr` children.
|
|
5491
|
+
*/
|
|
5492
|
+
protected createTableGraphicFrameXml(el: TablePptxElement): XmlObject;
|
|
5472
5493
|
/**
|
|
5473
5494
|
* Build a p:sp XML object for an ink annotation element.
|
|
5474
5495
|
* Each ink path becomes a separate a:path within a:pathLst,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { P as PptxElement, a as PptxElementWithShapeStyle, b as PptxElementWithText, C as ConnectorPptxElement, c as PptxImageLikeElement, I as InkPptxElement, S as ShapePptxElement, T as TextPptxElement, Z as ZoomPptxElement, d as PptxThemeColorScheme, e as PptxThemeFontScheme, f as PptxAnimationPreset, g as PptxAnimationTrigger, h as StrokeDashType, i as ConnectorArrowType, j as PptxTransitionType, k as PptxChartType, l as PptxSlide, m as PptxData, n as PptxCompatibilityWarning, o as PptxLayoutOption, X as XmlObject, p as PptxChartData, q as PptxSmartArtData, r as PptxHeaderFooter, s as PptxPresentationProperties, t as PptxCustomShow, u as PptxSection, v as PptxCoreProperties, w as PptxAppProperties, x as PptxCustomProperty, y as PptxNotesMaster, z as PptxHandoutMaster, A as PptxTagCollection, B as PptxPhotoAlbum, D as PptxKinsoku, E as PptxModifyVerifier, F as PptxViewProperties, G as PptxEmbeddedFont, H as PptxExportOptions, J as PptxThemeFormatScheme, K as TextSegment, L as PptxComment, M as PptxSlideTransition, N as PptxElementAnimation, O as PptxNativeAnimation, Q as PptxCustomerData, R as PptxActiveXControl, U as AnimationCondition, V as ShapeStyle, W as TextStyle, Y as ElementAction, _ as PptxAction, $ as OleObjectType, a0 as PptxSmartArtNode, a1 as SmartArtLayoutType, a2 as PptxSmartArtDrawingShape, a3 as PptxChartDataTable, a4 as PptxChartLineStyle, a5 as PptxChartErrBars, a6 as PptxChartTrendline, a7 as PptxChartMarker, a8 as PptxChartDataLabel, a9 as PptxChartDataPoint, aa as PptxChartShapeProps, ab as PptxChart3DSurface, ac as PptxChartAxisFormatting, ad as PptxEmbeddedWorkbookData, ae as PptxDrawingGuide, af as PptxTableCellStyle, ag as PptxCustomXmlPart, ah as PptxCommentAuthor, ai as MediaPptxElement, aj as PptxTableData, ak as PptxTheme, al as ParsedTableStyleMap, am as PptxSlideMaster, an as PptxThemeOption, ao as PlaceholderDefaults, ap as ParsedTableStyleFill, aq as ParsedTableStyleText, ar as PptxImageEffects, as as MediaBookmark, at as PptxChartStyle, au as
|
|
2
|
-
export { aN as ActionButtonPreset, aO as AnimationConditionEvent, aP as BevelPresetType, aQ as ConnectorConnectionPoint, aR as ContentPartInkStroke, aS as ContentPartPptxElement, aT as CustomGeometrySegment, aU as ElementActionType, aV as MasterViewTab, aW as MaterialPresetType, aX as MediaCaptionTrack, aY as MediaMetadata, aZ as Model3DPptxElement, a_ as OlePptxElement, a$ as ParsedTableStyleEntry, b0 as PicturePptxElement, b1 as Pptx3DScene, b2 as Pptx3DShape, b3 as PptxAfterAnimationAction, b4 as PptxAnimationDirection, b5 as PptxAnimationIterate, b6 as PptxAnimationRepeatMode, b7 as PptxAnimationSequence, b8 as PptxAnimationTimingCurve, b9 as PptxChartAxisNumFmt, ba as PptxChartErrBarDir, bb as PptxChartErrBarType, bc as PptxChartErrValType, bd as PptxChartMarkerSymbol, be as PptxChartTrendlineType, bf as PptxColorAnimation, bg as PptxCommonSlideViewProperties, bh as PptxCropShape, bi as PptxCustomPathProperties, bj as PptxElementBase, bk as PptxElementType, bl as PptxExportFormat, bm as PptxImageProperties, bn as PptxMasterTextStyles, bo as PptxMediaType, bp as PptxNormalViewProperties, bq as PptxRestoredRegion, br as PptxShapeProperties, bs as PptxSlideLayout, bt as PptxSmartArtConnection, bu as PptxSplitDirection, bv as PptxSplitOrientation, bw as PptxStripDirection, bx as PptxTableCell, by as PptxTableRow, bz as PptxTag, bA as PptxTextAnimationTarget, bB as PptxTextBuildType, bC as PptxTextProperties, bD as PptxTextStyleLevels, bE as PptxTextWarpPreset, bF as PptxThemeFontGroup, bG as PptxTransitionDirection4, bH as PptxTransitionDirection8, bI as PptxViewOrigin, bJ as PptxViewScale, bK as ShadowEffect, bL as SmartArtColorScheme, bM as SmartArtLayout, bN as SmartArtStyle, bO as THEME_COLOR_SCHEME_KEYS, bP as TRANSITION_VALID_DIRECTIONS, bQ as Text3DStyle, bR as UnderlineStyle, bS as UnknownPptxElement } from './presentation-
|
|
3
|
-
import { F as FindResult, M as MergeOptions } from './text-operations-
|
|
4
|
-
export { f as findText, m as mergePresentation, r as replaceText, a as replaceTextInSlide } from './text-operations-
|
|
1
|
+
import { P as PptxElement, a as PptxElementWithShapeStyle, b as PptxElementWithText, C as ConnectorPptxElement, c as PptxImageLikeElement, I as InkPptxElement, S as ShapePptxElement, T as TextPptxElement, Z as ZoomPptxElement, d as PptxThemeColorScheme, e as PptxThemeFontScheme, f as PptxAnimationPreset, g as PptxAnimationTrigger, h as StrokeDashType, i as ConnectorArrowType, j as PptxTransitionType, k as PptxChartType, l as PptxSlide, m as PptxData, n as PptxCompatibilityWarning, o as PptxLayoutOption, X as XmlObject, p as PptxChartData, q as PptxSmartArtData, r as PptxHeaderFooter, s as PptxPresentationProperties, t as PptxCustomShow, u as PptxSection, v as PptxCoreProperties, w as PptxAppProperties, x as PptxCustomProperty, y as PptxNotesMaster, z as PptxHandoutMaster, A as PptxTagCollection, B as PptxPhotoAlbum, D as PptxKinsoku, E as PptxModifyVerifier, F as PptxViewProperties, G as PptxEmbeddedFont, H as PptxExportOptions, J as PptxThemeFormatScheme, K as TextSegment, L as PptxComment, M as PptxSlideTransition, N as PptxElementAnimation, O as PptxNativeAnimation, Q as PptxCustomerData, R as PptxActiveXControl, U as AnimationCondition, V as ShapeStyle, W as TextStyle, Y as ElementAction, _ as PptxAction, $ as OleObjectType, a0 as PptxSmartArtNode, a1 as SmartArtLayoutType, a2 as PptxSmartArtDrawingShape, a3 as PptxChartDataTable, a4 as PptxChartLineStyle, a5 as PptxChartErrBars, a6 as PptxChartTrendline, a7 as PptxChartMarker, a8 as PptxChartDataLabel, a9 as PptxChartDataPoint, aa as PptxChartShapeProps, ab as PptxChart3DSurface, ac as PptxChartAxisFormatting, ad as PptxEmbeddedWorkbookData, ae as PptxDrawingGuide, af as PptxTableCellStyle, ag as PptxCustomXmlPart, ah as PptxCommentAuthor, ai as MediaPptxElement, aj as PptxTableData, ak as PptxTheme, al as ParsedTableStyleMap, am as PptxSlideMaster, an as PptxThemeOption, ao as PlaceholderDefaults, ap as ParsedTableStyleFill, aq as ParsedTableStyleText, ar as PptxImageEffects, as as MediaBookmark, at as PptxChartStyle, au as TablePptxElement, av as GroupPptxElement, aw as PlaceholderTextLevelStyle, ax as PptxChartSeries, ay as SmartArtPptxElement, az as GeometryAdjustmentHandle, aA as BulletInfo, aB as PptxShapeLocks, aC as PptxThemeFillStyle, aD as PptxThemeLineStyle, aE as PptxThemeEffectStyle, aF as PptxSmartArtChrome, aG as PptxSmartArtColorTransform, aH as PptxSmartArtQuickStyle, aI as PptxExternalData, aJ as CustomGeometryPoint, aK as CustomGeometryPath, aL as ChartPptxElement, aM as ImagePptxElement } from './presentation-CchuDGfU.js';
|
|
2
|
+
export { aN as ActionButtonPreset, aO as AnimationConditionEvent, aP as BevelPresetType, aQ as ConnectorConnectionPoint, aR as ContentPartInkStroke, aS as ContentPartPptxElement, aT as CustomGeometrySegment, aU as ElementActionType, aV as MasterViewTab, aW as MaterialPresetType, aX as MediaCaptionTrack, aY as MediaMetadata, aZ as Model3DPptxElement, a_ as OlePptxElement, a$ as ParsedTableStyleEntry, b0 as PicturePptxElement, b1 as Pptx3DScene, b2 as Pptx3DShape, b3 as PptxAfterAnimationAction, b4 as PptxAnimationDirection, b5 as PptxAnimationIterate, b6 as PptxAnimationRepeatMode, b7 as PptxAnimationSequence, b8 as PptxAnimationTimingCurve, b9 as PptxChartAxisNumFmt, ba as PptxChartErrBarDir, bb as PptxChartErrBarType, bc as PptxChartErrValType, bd as PptxChartMarkerSymbol, be as PptxChartTrendlineType, bf as PptxColorAnimation, bg as PptxCommonSlideViewProperties, bh as PptxCropShape, bi as PptxCustomPathProperties, bj as PptxElementBase, bk as PptxElementType, bl as PptxExportFormat, bm as PptxImageProperties, bn as PptxMasterTextStyles, bo as PptxMediaType, bp as PptxNormalViewProperties, bq as PptxRestoredRegion, br as PptxShapeProperties, bs as PptxSlideLayout, bt as PptxSmartArtConnection, bu as PptxSplitDirection, bv as PptxSplitOrientation, bw as PptxStripDirection, bx as PptxTableCell, by as PptxTableRow, bz as PptxTag, bA as PptxTextAnimationTarget, bB as PptxTextBuildType, bC as PptxTextProperties, bD as PptxTextStyleLevels, bE as PptxTextWarpPreset, bF as PptxThemeFontGroup, bG as PptxTransitionDirection4, bH as PptxTransitionDirection8, bI as PptxViewOrigin, bJ as PptxViewScale, bK as ShadowEffect, bL as SmartArtColorScheme, bM as SmartArtLayout, bN as SmartArtStyle, bO as THEME_COLOR_SCHEME_KEYS, bP as TRANSITION_VALID_DIRECTIONS, bQ as Text3DStyle, bR as UnderlineStyle, bS as UnknownPptxElement } from './presentation-CchuDGfU.js';
|
|
3
|
+
import { F as FindResult, M as MergeOptions } from './text-operations-e7JxgI5l.js';
|
|
4
|
+
export { f as findText, m as mergePresentation, r as replaceText, a as replaceTextInSlide } from './text-operations-e7JxgI5l.js';
|
|
5
5
|
import { XMLParser, XMLBuilder } from 'fast-xml-parser';
|
|
6
6
|
import JSZip from 'jszip';
|
|
7
7
|
export { C as CertificateRevocationStatus, D as DIGEST_ALGORITHM_TO_HASH, a as DIGEST_ALGORITHM_TO_WEB_CRYPTO, b as DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, c as DIGITAL_SIGNATURE_REL_TYPE, d as DigitalSignatureReport, e as DigitalSignatureVerificationStatus, E as ENTERPRISE_FAIL_ON_REVOCATION_UNKNOWN_ENV, f as ENTERPRISE_REQUIRE_REVOCATION_ENV, g as ENTERPRISE_REQUIRE_TIMESTAMP_ENV, h as ENTERPRISE_TRUST_ROOTS_FILE_ENV, i as ENTERPRISE_TRUST_ROOTS_PEM_ENV, L as LoadedSigningMaterial, O as OPC_RELATIONSHIP_TRANSFORM, j as OfficeSignatureReference, P as PPTX_VIEWER_MANIFEST_NS, k as ParsedReferenceTransform, R as ReferenceTransformResult, S as SUPPORTED_XML_CANON_TRANSFORMS, l as SignOptions, m as SignResult, n as SignatureDetail, o as SignatureDetailStatus, p as SignatureNodeCertificateInfo, q as SignatureReferenceCheck, r as SignatureValidationPolicy, T as TimestampAuthorityStatus, X as XMLDSIG_NS, s as XML_TRANSFORM_ENVELOPED_SIGNATURE, t as computeDetailStatus, u as computeDigestBase64WebCrypto, v as computeVerificationStatus, w as escapeXmlAttr, x as extractAllTagText, y as extractFirstTagText, z as extractTagAttribute, A as normalizePartPath, B as resolveReferenceUriToPart } from './signature-inspection-status-BcJSdOvb.js';
|
|
8
8
|
export { convertEmfToDataUrl, convertWmfToDataUrl } from 'emf-converter';
|
|
9
|
-
export { C as ConversionOptions, a as ConversionResult, D as DocumentConverter, F as FileSystemAdapter, M as MediaContext, P as PptxConverterOptions, b as PptxMarkdownConverter, S as SlideProcessor, c as SlideProcessorOptions, d as SvgExportOptions, e as SvgExporter, f as dataUrlToMediaBytes, g as deriveOutputPath, h as generateMediaFilename, i as getDirectory, n as normalizePath } from './SvgExporter
|
|
9
|
+
export { C as ConversionOptions, a as ConversionResult, D as DocumentConverter, F as FileSystemAdapter, M as MediaContext, P as PptxConverterOptions, b as PptxMarkdownConverter, S as SlideProcessor, c as SlideProcessorOptions, d as SvgExportOptions, e as SvgExporter, f as dataUrlToMediaBytes, g as deriveOutputPath, h as generateMediaFilename, i as getDirectory, n as normalizePath } from './SvgExporter-BMjoxMDV.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Runtime type guards for narrowing the {@link PptxElement} union.
|
|
@@ -4343,6 +4343,13 @@ interface IPptxPresentationSlidesReconciler {
|
|
|
4343
4343
|
}
|
|
4344
4344
|
declare class PptxPresentationSlidesReconciler implements IPptxPresentationSlidesReconciler {
|
|
4345
4345
|
reconcile(input: PptxPresentationSlidesReconcilerInput): Promise<void>;
|
|
4346
|
+
/**
|
|
4347
|
+
* Return a new presentation XML object whose `p:sldIdLst` child sits in the
|
|
4348
|
+
* schema-mandated position (after `sldMasterIdLst` / `notesMasterIdLst` /
|
|
4349
|
+
* `handoutMasterIdLst`, before `sldSz`). Non-sldIdLst keys keep their
|
|
4350
|
+
* relative order; attribute keys (`@_...`) stay at the front.
|
|
4351
|
+
*/
|
|
4352
|
+
private insertSlideIdListInOrder;
|
|
4346
4353
|
private attachNewSlide;
|
|
4347
4354
|
private tryCopySourceRelationships;
|
|
4348
4355
|
private removeInactiveSlides;
|
|
@@ -5469,6 +5476,20 @@ declare class PptxHandlerRuntime$Z extends PptxHandlerRuntime$_ {
|
|
|
5469
5476
|
}
|
|
5470
5477
|
|
|
5471
5478
|
declare class PptxHandlerRuntime$Y extends PptxHandlerRuntime$Z {
|
|
5479
|
+
/**
|
|
5480
|
+
* Build a `p:graphicFrame` XML skeleton for an SDK-created table.
|
|
5481
|
+
*
|
|
5482
|
+
* Tables round-trip as `<p:graphicFrame>/<a:graphic>/<a:graphicData
|
|
5483
|
+
* uri=".../drawingml/2006/table">/<a:tbl>` inside `p:spTree`. When the
|
|
5484
|
+
* element was loaded from an existing file, `el.rawXml` already contains
|
|
5485
|
+
* this envelope and the downstream `serializeTableDataToXml` path
|
|
5486
|
+
* populates cells in place. When the element was created via the SDK
|
|
5487
|
+
* (`SlideBuilder.addTable`), there is no `rawXml`, so this method
|
|
5488
|
+
* fabricates a minimal envelope with an empty `a:tbl`. The element
|
|
5489
|
+
* writer then calls `serializeTableDataToXml`, which triggers
|
|
5490
|
+
* `rebuildTableXmlFromData` and fills in `a:tblGrid` / `a:tr` children.
|
|
5491
|
+
*/
|
|
5492
|
+
protected createTableGraphicFrameXml(el: TablePptxElement): XmlObject;
|
|
5472
5493
|
/**
|
|
5473
5494
|
* Build a p:sp XML object for an ink annotation element.
|
|
5474
5495
|
* Each ink path becomes a separate a:path within a:pathLst,
|
|
@@ -1447,7 +1447,11 @@ function isoNow() {
|
|
|
1447
1447
|
return (/* @__PURE__ */ new Date()).toISOString().replace(/\.\d+Z$/, "Z");
|
|
1448
1448
|
}
|
|
1449
1449
|
var STANDARD_LAYOUTS = [
|
|
1450
|
-
|
|
1450
|
+
// `type` is ST_SlideLayoutType per ECMA-376 §19.7.15. The Title Slide
|
|
1451
|
+
// layout uses `title`; `ctrTitle` is a placeholder type (ST_PlaceholderType)
|
|
1452
|
+
// and is not valid here — PowerPoint's OPC loader rejects the package
|
|
1453
|
+
// with ERROR_FILE_CORRUPT (0x80070570) when it sees it.
|
|
1454
|
+
{ name: "Title Slide", type: "title" },
|
|
1451
1455
|
{ name: "Title and Content", type: "obj" },
|
|
1452
1456
|
{ name: "Section Header", type: "secHead" },
|
|
1453
1457
|
{ name: "Two Content", type: "twoObj" },
|
|
@@ -1481,7 +1485,7 @@ ${slideOverrides}
|
|
|
1481
1485
|
<Override PartName="/ppt/viewProps.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml"/>
|
|
1482
1486
|
<Override PartName="/ppt/tableStyles.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml"/>
|
|
1483
1487
|
<Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>
|
|
1484
|
-
<Override PartName="/docProps/app.xml" ContentType="application/vnd.
|
|
1488
|
+
<Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/>
|
|
1485
1489
|
</Types>`;
|
|
1486
1490
|
}
|
|
1487
1491
|
function rootRelsXml() {
|
|
@@ -2807,9 +2811,40 @@ var PptxPresentationSlidesReconciler = class {
|
|
|
2807
2811
|
"@_r:id": slide.rId
|
|
2808
2812
|
};
|
|
2809
2813
|
});
|
|
2810
|
-
|
|
2811
|
-
|
|
2814
|
+
input.presentationData["p:presentation"] = this.insertSlideIdListInOrder(
|
|
2815
|
+
presentation,
|
|
2816
|
+
slideIdList
|
|
2817
|
+
);
|
|
2818
|
+
}
|
|
2819
|
+
}
|
|
2820
|
+
/**
|
|
2821
|
+
* Return a new presentation XML object whose `p:sldIdLst` child sits in the
|
|
2822
|
+
* schema-mandated position (after `sldMasterIdLst` / `notesMasterIdLst` /
|
|
2823
|
+
* `handoutMasterIdLst`, before `sldSz`). Non-sldIdLst keys keep their
|
|
2824
|
+
* relative order; attribute keys (`@_...`) stay at the front.
|
|
2825
|
+
*/
|
|
2826
|
+
insertSlideIdListInOrder(presentation, slideIdList) {
|
|
2827
|
+
const before = /* @__PURE__ */ new Set([
|
|
2828
|
+
"p:sldMasterIdLst",
|
|
2829
|
+
"p:notesMasterIdLst",
|
|
2830
|
+
"p:handoutMasterIdLst"
|
|
2831
|
+
]);
|
|
2832
|
+
const rebuilt = {};
|
|
2833
|
+
let inserted = false;
|
|
2834
|
+
for (const key of Object.keys(presentation)) {
|
|
2835
|
+
if (key === "p:sldIdLst") {
|
|
2836
|
+
continue;
|
|
2837
|
+
}
|
|
2838
|
+
if (!inserted && !key.startsWith("@_") && !before.has(key)) {
|
|
2839
|
+
rebuilt["p:sldIdLst"] = slideIdList;
|
|
2840
|
+
inserted = true;
|
|
2841
|
+
}
|
|
2842
|
+
rebuilt[key] = presentation[key];
|
|
2843
|
+
}
|
|
2844
|
+
if (!inserted) {
|
|
2845
|
+
rebuilt["p:sldIdLst"] = slideIdList;
|
|
2812
2846
|
}
|
|
2847
|
+
return rebuilt;
|
|
2813
2848
|
}
|
|
2814
2849
|
async attachNewSlide(init) {
|
|
2815
2850
|
const sourceSlidePath = init.input.findSourceSlidePath(init.slide.sourceSlideId);
|
|
@@ -28798,6 +28833,55 @@ var PptxHandlerRuntime14 = class extends PptxHandlerRuntime13 {
|
|
|
28798
28833
|
|
|
28799
28834
|
// src/core/core/runtime/PptxHandlerRuntimeSaveShapeXml.ts
|
|
28800
28835
|
var PptxHandlerRuntime15 = class _PptxHandlerRuntime extends PptxHandlerRuntime14 {
|
|
28836
|
+
/**
|
|
28837
|
+
* Build a `p:graphicFrame` XML skeleton for an SDK-created table.
|
|
28838
|
+
*
|
|
28839
|
+
* Tables round-trip as `<p:graphicFrame>/<a:graphic>/<a:graphicData
|
|
28840
|
+
* uri=".../drawingml/2006/table">/<a:tbl>` inside `p:spTree`. When the
|
|
28841
|
+
* element was loaded from an existing file, `el.rawXml` already contains
|
|
28842
|
+
* this envelope and the downstream `serializeTableDataToXml` path
|
|
28843
|
+
* populates cells in place. When the element was created via the SDK
|
|
28844
|
+
* (`SlideBuilder.addTable`), there is no `rawXml`, so this method
|
|
28845
|
+
* fabricates a minimal envelope with an empty `a:tbl`. The element
|
|
28846
|
+
* writer then calls `serializeTableDataToXml`, which triggers
|
|
28847
|
+
* `rebuildTableXmlFromData` and fills in `a:tblGrid` / `a:tr` children.
|
|
28848
|
+
*/
|
|
28849
|
+
createTableGraphicFrameXml(el) {
|
|
28850
|
+
const EMU = _PptxHandlerRuntime.EMU_PER_PX;
|
|
28851
|
+
const offX = String(Math.round(el.x * EMU));
|
|
28852
|
+
const offY = String(Math.round(el.y * EMU));
|
|
28853
|
+
const extCx = String(Math.round(Math.max(el.width, 1) * EMU));
|
|
28854
|
+
const extCy = String(Math.round(Math.max(el.height, 1) * EMU));
|
|
28855
|
+
const tblPr = {
|
|
28856
|
+
"@_firstRow": el.tableData?.firstRowHeader ? "1" : "0",
|
|
28857
|
+
"@_bandRow": el.tableData?.bandedRows ? "1" : "0"
|
|
28858
|
+
};
|
|
28859
|
+
if (el.tableData?.tableStyleId) {
|
|
28860
|
+
tblPr["a:tableStyleId"] = el.tableData.tableStyleId;
|
|
28861
|
+
}
|
|
28862
|
+
return {
|
|
28863
|
+
"p:nvGraphicFramePr": {
|
|
28864
|
+
"p:cNvPr": { "@_id": "0", "@_name": el.name || "Table" },
|
|
28865
|
+
"p:cNvGraphicFramePr": {
|
|
28866
|
+
"a:graphicFrameLocks": { "@_noGrp": "1" }
|
|
28867
|
+
},
|
|
28868
|
+
"p:nvPr": {}
|
|
28869
|
+
},
|
|
28870
|
+
"p:xfrm": {
|
|
28871
|
+
"a:off": { "@_x": offX, "@_y": offY },
|
|
28872
|
+
"a:ext": { "@_cx": extCx, "@_cy": extCy }
|
|
28873
|
+
},
|
|
28874
|
+
"a:graphic": {
|
|
28875
|
+
"a:graphicData": {
|
|
28876
|
+
"@_uri": "http://schemas.openxmlformats.org/drawingml/2006/table",
|
|
28877
|
+
"a:tbl": {
|
|
28878
|
+
"a:tblPr": tblPr,
|
|
28879
|
+
"a:tblGrid": {}
|
|
28880
|
+
}
|
|
28881
|
+
}
|
|
28882
|
+
}
|
|
28883
|
+
};
|
|
28884
|
+
}
|
|
28801
28885
|
/**
|
|
28802
28886
|
* Build a p:sp XML object for an ink annotation element.
|
|
28803
28887
|
* Each ink path becomes a separate a:path within a:pathLst,
|
|
@@ -30279,14 +30363,15 @@ function writeCellTextFormatting(xmlCell, style, ensureArray6) {
|
|
|
30279
30363
|
const paragraphs = ensureArray6(xmlCell["a:txBody"]?.["a:p"]);
|
|
30280
30364
|
for (const paragraph of paragraphs) {
|
|
30281
30365
|
const runs = ensureArray6(paragraph?.["a:r"]);
|
|
30366
|
+
const rebuiltRuns = [];
|
|
30367
|
+
let runsChanged = false;
|
|
30282
30368
|
for (const run of runs) {
|
|
30283
30369
|
if (!run) {
|
|
30370
|
+
rebuiltRuns.push(run);
|
|
30284
30371
|
continue;
|
|
30285
30372
|
}
|
|
30286
|
-
|
|
30287
|
-
|
|
30288
|
-
}
|
|
30289
|
-
const rPr = run["a:rPr"];
|
|
30373
|
+
const existingRPr = run["a:rPr"] ?? {};
|
|
30374
|
+
const rPr = { ...existingRPr };
|
|
30290
30375
|
if (style.bold !== void 0) {
|
|
30291
30376
|
rPr["@_b"] = style.bold ? "1" : "0";
|
|
30292
30377
|
}
|
|
@@ -30306,6 +30391,18 @@ function writeCellTextFormatting(xmlCell, style, ensureArray6) {
|
|
|
30306
30391
|
}
|
|
30307
30392
|
};
|
|
30308
30393
|
}
|
|
30394
|
+
const rebuilt = { "a:rPr": rPr };
|
|
30395
|
+
for (const key of Object.keys(run)) {
|
|
30396
|
+
if (key === "a:rPr") {
|
|
30397
|
+
continue;
|
|
30398
|
+
}
|
|
30399
|
+
rebuilt[key] = run[key];
|
|
30400
|
+
}
|
|
30401
|
+
rebuiltRuns.push(rebuilt);
|
|
30402
|
+
runsChanged = true;
|
|
30403
|
+
}
|
|
30404
|
+
if (runsChanged && rebuiltRuns.length > 0) {
|
|
30405
|
+
paragraph["a:r"] = rebuiltRuns.length === 1 ? rebuiltRuns[0] : rebuiltRuns;
|
|
30309
30406
|
}
|
|
30310
30407
|
}
|
|
30311
30408
|
}
|
|
@@ -30327,6 +30424,9 @@ var PptxHandlerRuntime22 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
30327
30424
|
const existingParagraphs = this.ensureArray(txBody["a:p"]);
|
|
30328
30425
|
const firstRPr = this.ensureArray(existingParagraphs[0]?.["a:r"])[0]?.["a:rPr"];
|
|
30329
30426
|
const firstPPr = existingParagraphs[0]?.["a:pPr"];
|
|
30427
|
+
const firstEndParaRPr = existingParagraphs[0]?.["a:endParaRPr"];
|
|
30428
|
+
const rPrForRun = firstRPr ? { ...firstRPr } : { "@_lang": "en-US", "@_dirty": "0" };
|
|
30429
|
+
const endParaRPr = firstEndParaRPr ? { ...firstEndParaRPr } : { "@_lang": "en-US", "@_dirty": "0" };
|
|
30330
30430
|
const lines = text.split("\n");
|
|
30331
30431
|
const paragraphs = lines.map((line) => {
|
|
30332
30432
|
const paragraph = {};
|
|
@@ -30334,9 +30434,10 @@ var PptxHandlerRuntime22 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
30334
30434
|
paragraph["a:pPr"] = firstPPr;
|
|
30335
30435
|
}
|
|
30336
30436
|
paragraph["a:r"] = {
|
|
30337
|
-
|
|
30437
|
+
"a:rPr": rPrForRun,
|
|
30338
30438
|
"a:t": line
|
|
30339
30439
|
};
|
|
30440
|
+
paragraph["a:endParaRPr"] = endParaRPr;
|
|
30340
30441
|
return paragraph;
|
|
30341
30442
|
});
|
|
30342
30443
|
txBody["a:p"] = paragraphs.length === 1 ? paragraphs[0] : paragraphs;
|
|
@@ -30486,14 +30587,27 @@ function serializeCellMergeAttributes(xmlCell, cell) {
|
|
|
30486
30587
|
delete xmlCell["@_vMerge"];
|
|
30487
30588
|
}
|
|
30488
30589
|
}
|
|
30590
|
+
var DEFAULT_POWERPOINT_TABLE_STYLE_ID = "{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}";
|
|
30489
30591
|
function serializeTablePropertyFlags(tbl, tableData) {
|
|
30490
30592
|
const tblPr = tbl["a:tblPr"] ?? {};
|
|
30491
|
-
|
|
30492
|
-
|
|
30493
|
-
|
|
30494
|
-
|
|
30495
|
-
|
|
30496
|
-
|
|
30593
|
+
const setOrDelete = (key, truthy) => {
|
|
30594
|
+
if (truthy) {
|
|
30595
|
+
tblPr[key] = "1";
|
|
30596
|
+
} else {
|
|
30597
|
+
delete tblPr[key];
|
|
30598
|
+
}
|
|
30599
|
+
};
|
|
30600
|
+
setOrDelete("@_bandRow", tableData.bandedRows);
|
|
30601
|
+
setOrDelete("@_bandCol", tableData.bandedColumns);
|
|
30602
|
+
setOrDelete("@_firstRow", tableData.firstRowHeader);
|
|
30603
|
+
setOrDelete("@_lastRow", tableData.lastRow);
|
|
30604
|
+
setOrDelete("@_firstCol", tableData.firstCol);
|
|
30605
|
+
setOrDelete("@_lastCol", tableData.lastCol);
|
|
30606
|
+
if (tableData.tableStyleId) {
|
|
30607
|
+
tblPr["a:tableStyleId"] = tableData.tableStyleId;
|
|
30608
|
+
} else if (!tblPr["a:tableStyleId"]) {
|
|
30609
|
+
tblPr["a:tableStyleId"] = DEFAULT_POWERPOINT_TABLE_STYLE_ID;
|
|
30610
|
+
}
|
|
30497
30611
|
tbl["a:tblPr"] = tblPr;
|
|
30498
30612
|
}
|
|
30499
30613
|
function replaceFirstTextValueInTree(node, localName, newValue, getXmlLocalName) {
|
|
@@ -30538,7 +30652,9 @@ function createDefaultXmlCell() {
|
|
|
30538
30652
|
"a:bodyPr": {},
|
|
30539
30653
|
"a:lstStyle": {},
|
|
30540
30654
|
"a:p": {
|
|
30541
|
-
|
|
30655
|
+
// Match PowerPoint's "Insert Table" default: every paragraph-end
|
|
30656
|
+
// run carries `lang="en-US" dirty="0"`.
|
|
30657
|
+
"a:endParaRPr": { "@_lang": "en-US", "@_dirty": "0" }
|
|
30542
30658
|
}
|
|
30543
30659
|
},
|
|
30544
30660
|
"a:tcPr": {}
|
|
@@ -30546,6 +30662,11 @@ function createDefaultXmlCell() {
|
|
|
30546
30662
|
}
|
|
30547
30663
|
|
|
30548
30664
|
// src/core/core/runtime/table-xml-rebuild.ts
|
|
30665
|
+
var GRID_COL_ID_EXT_URI = "{9D8B030D-6E8A-4147-A177-3AD203B41FA5}";
|
|
30666
|
+
var A16_NAMESPACE = "http://schemas.microsoft.com/office/drawing/2014/main";
|
|
30667
|
+
function randomColumnId() {
|
|
30668
|
+
return String(Math.floor(Math.random() * 4294967295));
|
|
30669
|
+
}
|
|
30549
30670
|
function rebuildTableXmlFromData(tbl, tableData, emuPerPx, ensureArrayFn) {
|
|
30550
30671
|
const existingXmlRows = ensureArrayFn(tbl["a:tr"]);
|
|
30551
30672
|
const existingGridCols = ensureArrayFn(
|
|
@@ -30554,8 +30675,31 @@ function rebuildTableXmlFromData(tbl, tableData, emuPerPx, ensureArrayFn) {
|
|
|
30554
30675
|
const totalWidthEmu = existingGridCols.reduce((sum, col) => {
|
|
30555
30676
|
return sum + (parseInt(String(col?.["@_w"] || "0"), 10) || 0);
|
|
30556
30677
|
}, 0) || 9144e3;
|
|
30557
|
-
const
|
|
30558
|
-
|
|
30678
|
+
const existingColIds = existingGridCols.map((col) => {
|
|
30679
|
+
const extList = col?.["a:extLst"];
|
|
30680
|
+
const exts = Array.isArray(extList?.["a:ext"]) ? extList["a:ext"] : extList?.["a:ext"] ? [extList["a:ext"]] : [];
|
|
30681
|
+
for (const ext of exts) {
|
|
30682
|
+
if (ext?.["@_uri"] === GRID_COL_ID_EXT_URI) {
|
|
30683
|
+
const colId = ext["a16:colId"];
|
|
30684
|
+
const val = colId?.["@_val"];
|
|
30685
|
+
if (typeof val === "string" && val.length > 0) {
|
|
30686
|
+
return val;
|
|
30687
|
+
}
|
|
30688
|
+
}
|
|
30689
|
+
}
|
|
30690
|
+
return "";
|
|
30691
|
+
});
|
|
30692
|
+
const newGridCols = tableData.columnWidths.map((w, i) => ({
|
|
30693
|
+
"@_w": String(Math.round(w * totalWidthEmu)),
|
|
30694
|
+
"a:extLst": {
|
|
30695
|
+
"a:ext": {
|
|
30696
|
+
"@_uri": GRID_COL_ID_EXT_URI,
|
|
30697
|
+
"a16:colId": {
|
|
30698
|
+
"@_xmlns:a16": A16_NAMESPACE,
|
|
30699
|
+
"@_val": existingColIds[i] || randomColumnId()
|
|
30700
|
+
}
|
|
30701
|
+
}
|
|
30702
|
+
}
|
|
30559
30703
|
}));
|
|
30560
30704
|
if (!tbl["a:tblGrid"]) {
|
|
30561
30705
|
tbl["a:tblGrid"] = {};
|
|
@@ -32965,6 +33109,9 @@ var PptxHandlerRuntime32 = class _PptxHandlerRuntime extends PptxHandlerRuntime3
|
|
|
32965
33109
|
if (!shape && el.type === "ink") {
|
|
32966
33110
|
shape = this.createInkShapeXml(el);
|
|
32967
33111
|
}
|
|
33112
|
+
if (!shape && el.type === "table") {
|
|
33113
|
+
shape = this.createTableGraphicFrameXml(el);
|
|
33114
|
+
}
|
|
32968
33115
|
if (!shape) {
|
|
32969
33116
|
this.compatibilityService.reportWarning({
|
|
32970
33117
|
code: "SAVE_ELEMENT_SKIPPED",
|