@contrail/document-generation 2.0.23 → 2.0.24

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.
@@ -177,15 +177,15 @@ class BoardDocumentGenerator {
177
177
  static generateSecondaryGroupHeader(dataGroup, template, position, span) {
178
178
  const elements = [];
179
179
  const heading = documents_1.DocumentElementFactory.createTextElement("Placeholder", {});
180
- heading.style = { border: { width: 1, color: "rgba(0,0,0,0)" }, color: "#000000", backgroundColor: template.frameGroupHeaderTemplate.style.backgroundColor || 'black' };
181
- heading.text = `<p><span style=\"font-size: ${template.frameGroupHeaderTemplate.style.font.size}pt;\"><strong><span style=\"color: ${template.frameGroupHeaderTemplate.style.color};\">${document_util_1.DocumentUtil.sanitizeHTML(dataGroup.name)}</span></strong></span></p>`;
180
+ heading.style = { border: { width: 1, color: "rgba(0,0,0,0)" }, color: "#000000", backgroundColor: template.secondaryFrameGroupHeaderTemplate.style.backgroundColor || 'black' };
181
+ heading.text = `<p><span style=\"font-size: ${template.secondaryFrameGroupHeaderTemplate.style.font.size}pt;\"><strong><span style=\"color: ${template.secondaryFrameGroupHeaderTemplate.style.color};\">${document_util_1.DocumentUtil.sanitizeHTML(dataGroup.name)}</span></strong></span></p>`;
182
182
  heading.position = position;
183
183
  if (template.frameOrientation === interfaces_1.Orientation.VERTICAL) {
184
184
  let sizeDim = template.frameSize.height * span;
185
185
  if (span > 1) {
186
186
  sizeDim += (span - 1) * template.framePadding;
187
187
  }
188
- heading.size = { width: sizeDim, height: template.frameGroupHeaderTemplate.size.height };
188
+ heading.size = { width: sizeDim, height: template.secondaryFrameGroupHeaderTemplate.size.height };
189
189
  heading.rotate = { angle: 270 };
190
190
  heading.position.x = heading.position.x - (heading.size.width / 2) + (heading.size.height / 2);
191
191
  heading.position.y = heading.position.y + (heading.size.width / 2) - (heading.size.height / 2);
@@ -196,7 +196,7 @@ class BoardDocumentGenerator {
196
196
  sizeDim += (span - 1) * template.framePadding;
197
197
  }
198
198
  heading.rotate = { angle: 0 };
199
- heading.size = { width: sizeDim, height: template.frameGroupHeaderTemplate.size.height };
199
+ heading.size = { width: sizeDim, height: template.secondaryFrameGroupHeaderTemplate.size.height };
200
200
  }
201
201
  elements.push(heading);
202
202
  return elements;
@@ -19,6 +19,7 @@ export interface DocumentTemplate {
19
19
  frameSize: SizeDefinition;
20
20
  framePadding?: number;
21
21
  frameGroupHeaderTemplate: DocumentElement;
22
+ secondaryFrameGroupHeaderTemplate?: DocumentElement;
22
23
  frameHeaderTemplate?: DocumentElement;
23
24
  frameInfoPanelTemplate?: FrameInfoPanelTemplate;
24
25
  componentGridTemplate: ComponentGridTemplate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/document-generation",
3
- "version": "2.0.23",
3
+ "version": "2.0.24",
4
4
  "description": "Utilities for automatic generation of documents.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",