From 607f99305778201fa62a89a44e82808fafe471b6 Mon Sep 17 00:00:00 2001 From: wxm <157215725@qq.com> Date: Mon, 16 Dec 2024 12:01:10 +0800 Subject: [PATCH] feat: update --- src/OpenXml/Presentation/BuildList.ts | 12 ++++++ src/OpenXml/Presentation/ChildTimeNodeList.ts | 22 +++++++++++ src/OpenXml/Presentation/CommonTimeNode.ts | 39 +++++++++++++++++++ src/OpenXml/Presentation/ParallelTimeNode.ts | 10 +++++ src/OpenXml/Presentation/SequenceTimeNode.ts | 16 ++++++++ src/OpenXml/Presentation/TimeNodeList.ts | 22 +++++++++++ src/OpenXml/Presentation/Timing.ts | 9 ++++- src/OpenXml/Presentation/index.ts | 6 +++ 8 files changed, 134 insertions(+), 2 deletions(-) create mode 100644 src/OpenXml/Presentation/BuildList.ts create mode 100644 src/OpenXml/Presentation/ChildTimeNodeList.ts create mode 100644 src/OpenXml/Presentation/CommonTimeNode.ts create mode 100644 src/OpenXml/Presentation/ParallelTimeNode.ts create mode 100644 src/OpenXml/Presentation/SequenceTimeNode.ts create mode 100644 src/OpenXml/Presentation/TimeNodeList.ts diff --git a/src/OpenXml/Presentation/BuildList.ts b/src/OpenXml/Presentation/BuildList.ts new file mode 100644 index 0000000..570e5ed --- /dev/null +++ b/src/OpenXml/Presentation/BuildList.ts @@ -0,0 +1,12 @@ +import { defineChild, defineElement, OOXML } from '../../core' + +/** + * https://learn.microsoft.com/dotnet/api/documentformat.openxml.presentation.buildlist + */ +@defineElement('p:bldLst') +export class BuildList extends OOXML { + @defineChild('p:bldDgm') declare bldDgm?: OOXML + @defineChild('p:bldGraphic') declare bldGraphic?: OOXML + @defineChild('p:bldOleChart') declare bldOleChart?: OOXML + @defineChild('p:bldP') declare bldP?: OOXML +} diff --git a/src/OpenXml/Presentation/ChildTimeNodeList.ts b/src/OpenXml/Presentation/ChildTimeNodeList.ts new file mode 100644 index 0000000..ebd9a79 --- /dev/null +++ b/src/OpenXml/Presentation/ChildTimeNodeList.ts @@ -0,0 +1,22 @@ +import type { SequenceTimeNode } from './SequenceTimeNode' +import { defineChild, defineElement, OOXML } from '../../core' + +/** + * https://learn.microsoft.com/dotnet/api/documentformat.openxml.presentation.childtimenodelist + */ +@defineElement('p:childTnLst') +export class ChildTimeNodeList extends OOXML { + @defineChild('p:anim') declare anim?: OOXML + @defineChild('p:animClr') declare animClr?: OOXML + @defineChild('p:animEffect') declare animEffect?: OOXML + @defineChild('p:animMotion') declare animMotion?: OOXML + @defineChild('p:animRot') declare animRot?: OOXML + @defineChild('p:animScale') declare animScale?: OOXML + @defineChild('p:audio') declare audio?: OOXML + @defineChild('p:cmd') declare cmd?: OOXML + @defineChild('p:excl') declare excl?: OOXML + @defineChild('p:par') declare par?: OOXML + @defineChild('p:seq') declare seq?: SequenceTimeNode + @defineChild('p:set') declare set?: OOXML + @defineChild('p:video') declare video?: OOXML +} diff --git a/src/OpenXml/Presentation/CommonTimeNode.ts b/src/OpenXml/Presentation/CommonTimeNode.ts new file mode 100644 index 0000000..1cf3d77 --- /dev/null +++ b/src/OpenXml/Presentation/CommonTimeNode.ts @@ -0,0 +1,39 @@ +import type { ChildTimeNodeList } from './ChildTimeNodeList' +import { defineAttribute, defineChild, defineElement, OOXML } from '../../core' + +/** + * https://learn.microsoft.com/dotnet/api/documentformat.openxml.presentation.commontimenode + */ +@defineElement('p:cTn') +export class CommonTimeNode extends OOXML { + @defineAttribute('accel') declare accel?: any + @defineAttribute('afterEffect') declare afterEffect?: any + @defineAttribute('autoRev') declare autoRev?: any + @defineAttribute('bldLvl') declare bldLvl?: any + @defineAttribute('decel') declare decel?: any + @defineAttribute('display') declare display?: any + @defineAttribute('dur') declare dur?: any + @defineAttribute('evtFilter') declare evtFilter?: any + @defineAttribute('fill') declare fill?: any + @defineAttribute('grpId') declare grpId?: any + @defineAttribute('id') declare id?: any + @defineAttribute('masterRel') declare masterRel?: any + @defineAttribute('nodePh') declare nodePh?: any + @defineAttribute('nodeType') declare nodeType?: string + @defineAttribute('presetClass') declare presetClass?: any + @defineAttribute('presetID') declare presetID?: any + @defineAttribute('presetSubtype') declare presetSubtype?: any + @defineAttribute('repeatCount') declare repeatCount?: any + @defineAttribute('repeatDur') declare repeatDur?: any + @defineAttribute('restart') declare restart?: any + @defineAttribute('spd') declare spd?: any + @defineAttribute('syncBehavior') declare syncBehavior?: any + @defineAttribute('tmFilter') declare tmFilter?: any + + @defineChild('p:childTnLst') declare childTnLst?: ChildTimeNodeList + @defineChild('p:endCondLst') declare endCondLst?: OOXML + @defineChild('p:endSync') declare endSync?: OOXML + @defineChild('p:iterate') declare iterate?: OOXML + @defineChild('p:stCondLst') declare stCondLst?: OOXML + @defineChild('p:subTnLst') declare subTnLst?: OOXML +} diff --git a/src/OpenXml/Presentation/ParallelTimeNode.ts b/src/OpenXml/Presentation/ParallelTimeNode.ts new file mode 100644 index 0000000..fee2d16 --- /dev/null +++ b/src/OpenXml/Presentation/ParallelTimeNode.ts @@ -0,0 +1,10 @@ +import type { CommonTimeNode } from './CommonTimeNode' +import { defineChild, defineElement, OOXML } from '../../core' + +/** + * https://learn.microsoft.com/dotnet/api/documentformat.openxml.presentation.paralleltimenode + */ +@defineElement('p:par') +export class ParallelTimeNode extends OOXML { + @defineChild('p:cTn') declare cTn?: CommonTimeNode +} diff --git a/src/OpenXml/Presentation/SequenceTimeNode.ts b/src/OpenXml/Presentation/SequenceTimeNode.ts new file mode 100644 index 0000000..e222931 --- /dev/null +++ b/src/OpenXml/Presentation/SequenceTimeNode.ts @@ -0,0 +1,16 @@ +import type { CommonTimeNode } from './CommonTimeNode' +import { defineAttribute, defineChild, defineElement, OOXML } from '../../core' + +/** + * https://learn.microsoft.com/dotnet/api/documentformat.openxml.presentation.sequencetimenode + */ +@defineElement('p:seq') +export class SequenceTimeNode extends OOXML { + @defineAttribute('concurrent') declare concurrent?: any + @defineAttribute('nextAc') declare nextAc?: any + @defineAttribute('prevAc') declare prevAc?: any + + @defineChild('p:cTn') declare cTn?: CommonTimeNode + @defineChild('p:nextCondLst') declare nextCondLst?: OOXML + @defineChild('p:prevCondLst') declare prevCondLst?: OOXML +} diff --git a/src/OpenXml/Presentation/TimeNodeList.ts b/src/OpenXml/Presentation/TimeNodeList.ts new file mode 100644 index 0000000..ebb85c7 --- /dev/null +++ b/src/OpenXml/Presentation/TimeNodeList.ts @@ -0,0 +1,22 @@ +import type { ParallelTimeNode } from './ParallelTimeNode' +import { defineChild, defineElement, OOXML } from '../../core' + +/** + * https://learn.microsoft.com/dotnet/api/documentformat.openxml.presentation.timenodelist + */ +@defineElement('p:tnLst') +export class TimeNodeList extends OOXML { + @defineChild('p:anim') declare anim?: OOXML + @defineChild('p:animClr') declare animClr?: OOXML + @defineChild('p:animEffect') declare animEffect?: OOXML + @defineChild('p:animMotion') declare animMotion?: OOXML + @defineChild('p:animRot') declare animRot?: OOXML + @defineChild('p:animScale') declare animScale?: OOXML + @defineChild('p:audio') declare audio?: OOXML + @defineChild('p:cmd') declare cmd?: OOXML + @defineChild('p:excl') declare excl?: OOXML + @defineChild('p:par') declare par?: ParallelTimeNode + @defineChild('p:seq') declare seq?: OOXML + @defineChild('p:set') declare set?: OOXML + @defineChild('p:video') declare video?: OOXML +} diff --git a/src/OpenXml/Presentation/Timing.ts b/src/OpenXml/Presentation/Timing.ts index f495eba..04736d5 100644 --- a/src/OpenXml/Presentation/Timing.ts +++ b/src/OpenXml/Presentation/Timing.ts @@ -1,9 +1,14 @@ -import { defineElement, OOXML } from '../../core' +import type { BuildList } from './BuildList' +import type { ExtensionList } from './ExtensionList' +import type { TimeNodeList } from './TimeNodeList' +import { defineChild, defineElement, OOXML } from '../../core' /** * https://learn.microsoft.com/dotnet/api/documentformat.openxml.presentation.timing */ @defineElement('p:timing') export class Timing extends OOXML { - // TODO + @defineChild('p:bldLst') declare bldLst?: BuildList + @defineChild('p:extLst') declare extLst?: ExtensionList + @defineChild('p:tnLst') declare tnLst?: TimeNodeList } diff --git a/src/OpenXml/Presentation/index.ts b/src/OpenXml/Presentation/index.ts index 3403c22..415a586 100644 --- a/src/OpenXml/Presentation/index.ts +++ b/src/OpenXml/Presentation/index.ts @@ -9,10 +9,13 @@ export * from './BlipFill' export * from './BodyStyle' export * from './BoldFont' export * from './BoldItalicFont' +export * from './BuildList' +export * from './ChildTimeNodeList' export * from './ColorMap' export * from './ColorMapOverride' export * from './ColorMostRecentlyUsed' export * from './CommonSlideData' +export * from './CommonTimeNode' export * from './ConnectionShape' export * from './DefaultTextStyle' export * from './EmbeddedFont' @@ -37,12 +40,14 @@ export * from './NotesMasterId' export * from './NotesMasterIdList' export * from './NotesSize' export * from './OtherStyle' +export * from './ParallelTimeNode' export * from './Picture' export * from './PlaceholderShape' export * from './Presentation' export * from './PresentationProperties' export * from './PrintingProperties' export * from './RegularFont' +export * from './SequenceTimeNode' export * from './Shape' export * from './ShapeProperties' export * from './ShapeTree' @@ -59,6 +64,7 @@ export * from './SlideMasterIdList' export * from './SlideSize' export * from './TextBody' export * from './TextStyles' +export * from './TimeNodeList' export * from './Timing' export * from './TitleStyle' export * from './ViewProperties'