@contrail/document-generation
Advanced tools
Comparing version 2.0.49 to 2.0.50
@@ -11,3 +11,3 @@ import { DocumentElement, PositionDefinition, SizeDefinition } from '@contrail/documents'; | ||
static generateFrame(options: DocumentElement): DocumentElement; | ||
static generateFrameTemplateElements(frameTemplate: FrameDocumentTemplate, dataGroup: DataGroup): DocumentElement[]; | ||
static generateFrameTemplateElements(frameTemplate: FrameDocumentTemplate, dataGroup: DataGroup, frameTitle?: string): DocumentElement[]; | ||
} |
@@ -45,3 +45,3 @@ "use strict"; | ||
if (frameTemplate) { | ||
const elements = this.generateFrameTemplateElements(frameTemplate, dataGroup); | ||
const elements = this.generateFrameTemplateElements(frameTemplate, dataGroup, frameTitle); | ||
frame.addDocumentElements(elements); | ||
@@ -115,3 +115,3 @@ } | ||
} | ||
static generateFrameTemplateElements(frameTemplate, dataGroup) { | ||
static generateFrameTemplateElements(frameTemplate, dataGroup, frameTitle = null) { | ||
const templateElements = util_1.ObjectUtil.cloneDeep(frameTemplate.document.elements); | ||
@@ -133,3 +133,3 @@ const elementMapping = {}; | ||
if (document_dynamic_text_element_util_1.DocumentDynamicTextElementUtil.isDynamicText(documentElement)) { | ||
document_dynamic_text_element_util_1.DocumentDynamicTextElementUtil.handleDynamicText(documentElement, dataGroup); | ||
document_dynamic_text_element_util_1.DocumentDynamicTextElementUtil.handleDynamicText(documentElement, dataGroup, frameTitle); | ||
} | ||
@@ -136,0 +136,0 @@ if (documentElement.elementIds) { |
@@ -6,4 +6,4 @@ import { DataGroup } from '@contrail/data-grouping'; | ||
static isDynamicText(element: any): any; | ||
static handleDynamicText(element: DocumentElement, dataGroup: DataGroup): any; | ||
static handleDynamicText(element: DocumentElement, dataGroup: DataGroup, frameTitle?: any): any; | ||
private static getPropertyValuesForElements; | ||
} |
@@ -17,3 +17,3 @@ "use strict"; | ||
} | ||
static handleDynamicText(element, dataGroup) { | ||
static handleDynamicText(element, dataGroup, frameTitle = null) { | ||
var _a; | ||
@@ -38,3 +38,3 @@ const displayFunction = element.propertyBindingsMetaData.displayFunction; | ||
else { | ||
text = dataGroup.name; | ||
text = frameTitle || dataGroup.name; | ||
} | ||
@@ -41,0 +41,0 @@ } |
{ | ||
"name": "@contrail/document-generation", | ||
"version": "2.0.49", | ||
"version": "2.0.50", | ||
"description": "Utilities for automatic generation of documents.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
1134657