easy-template-x
Advanced tools
Comparing version 4.1.8 to 5.0.0
@@ -6,3 +6,3 @@ import { Tag } from '../../../compilation'; | ||
setUtilities(utilities: PluginUtilities): void; | ||
isApplicable(openTag: Tag, closeTag: Tag): boolean; | ||
isApplicable(openTag: Tag, closeTag: Tag, isCondition: boolean): boolean; | ||
splitBefore(openTag: Tag, closeTag: Tag): SplitBeforeResult; | ||
@@ -9,0 +9,0 @@ mergeBack(compiledNodes: XmlNode[][], firstNode: XmlNode, lastNode: XmlNode): void; |
@@ -8,5 +8,5 @@ import { Tag } from '../../../compilation'; | ||
setUtilities(utilities: PluginUtilities): void; | ||
isApplicable(openTag: Tag, closeTag: Tag): boolean; | ||
isApplicable(openTag: Tag, closeTag: Tag, isCondition: boolean): boolean; | ||
splitBefore(openTag: Tag, closeTag: Tag): SplitBeforeResult; | ||
mergeBack(paragraphGroups: XmlNode[][], firstParagraph: XmlNode, lastParagraphs: XmlNode): void; | ||
} |
@@ -8,5 +8,5 @@ import { Tag } from '../../../compilation'; | ||
setUtilities(utilities: PluginUtilities): void; | ||
isApplicable(openTag: Tag, closeTag: Tag): boolean; | ||
isApplicable(openTag: Tag, closeTag: Tag, isCondition: boolean): boolean; | ||
splitBefore(openTag: Tag, closeTag: Tag): SplitBeforeResult; | ||
mergeBack(middleParagraphs: XmlNode[][], firstParagraph: XmlNode, lastParagraph: XmlNode): void; | ||
} |
@@ -8,5 +8,5 @@ import { Tag } from '../../../compilation'; | ||
setUtilities(utilities: PluginUtilities): void; | ||
isApplicable(openTag: Tag, closeTag: Tag): boolean; | ||
isApplicable(openTag: Tag, closeTag: Tag, isCondition: boolean): boolean; | ||
splitBefore(openTag: Tag, closeTag: Tag): SplitBeforeResult; | ||
mergeBack(rowGroups: XmlNode[][], firstRow: XmlNode, lastRow: XmlNode): void; | ||
} |
{ | ||
"name": "easy-template-x", | ||
"version": "4.1.8", | ||
"version": "5.0.0", | ||
"description": "Generate docx documents from templates, in Node or in the browser.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -44,3 +44,3 @@ import { PathPart, ScopeData, Tag, TemplateContext } from '../../compilation'; | ||
// select the suitable strategy | ||
const loopStrategy = this.loopStrategies.find(strategy => strategy.isApplicable(openTag, closeTag)); | ||
const loopStrategy = this.loopStrategies.find(strategy => strategy.isApplicable(openTag, closeTag, isCondition)); | ||
if (!loopStrategy) | ||
@@ -47,0 +47,0 @@ throw new Error(`No loop strategy found for tag '${openTag.rawText}'.`); |
@@ -9,3 +9,3 @@ import { Tag } from '../../../compilation'; | ||
isApplicable(openTag: Tag, closeTag: Tag): boolean; | ||
isApplicable(openTag: Tag, closeTag: Tag, isCondition: boolean): boolean; | ||
@@ -12,0 +12,0 @@ splitBefore(openTag: Tag, closeTag: Tag): SplitBeforeResult; |
@@ -14,3 +14,7 @@ import { Tag } from '../../../compilation'; | ||
public isApplicable(openTag: Tag, closeTag: Tag): boolean { | ||
public isApplicable(openTag: Tag, closeTag: Tag, isCondition: boolean): boolean { | ||
if (isCondition) { | ||
return false; | ||
} | ||
const containingParagraph = this.utilities.docxParser.containingParagraphNode(openTag.xmlTextNode); | ||
@@ -17,0 +21,0 @@ return this.utilities.docxParser.isListParagraph(containingParagraph); |
@@ -14,3 +14,3 @@ import { Tag } from '../../../compilation'; | ||
public isApplicable(openTag: Tag, closeTag: Tag): boolean { | ||
public isApplicable(openTag: Tag, closeTag: Tag, isCondition: boolean): boolean { | ||
return true; | ||
@@ -17,0 +17,0 @@ } |
@@ -15,3 +15,3 @@ import { Tag } from '../../../compilation'; | ||
public isApplicable(openTag: Tag, closeTag: Tag): boolean { | ||
public isApplicable(openTag: Tag, closeTag: Tag, isCondition: boolean): boolean { | ||
const openParagraph = this.utilities.docxParser.containingParagraphNode(openTag.xmlTextNode); | ||
@@ -18,0 +18,0 @@ if (!openParagraph.parentNode) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
397485
10253