@contrail/document-generation 2.2.2-dev-tel-own-otel-2 → 2.2.4

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.
@@ -1,8 +1,9 @@
1
1
  import { DocumentGenerationOptions } from './interfaces';
2
2
  import { DocumentFrame } from './frames/frame';
3
+ import { Type } from '@contrail/types';
3
4
  export declare class ShowcaseFrameGenerator {
4
5
  constructor();
5
- static generateFrames(options: DocumentGenerationOptions): Array<DocumentFrame>;
6
+ static generateFrames(options: DocumentGenerationOptions, typeMap: Record<string, Type>): Array<DocumentFrame>;
6
7
  private static getFrameGroups;
7
8
  private static getLeafGroupsFromGroups;
8
9
  }
@@ -4,9 +4,13 @@ exports.ShowcaseFrameGenerator = void 0;
4
4
  const frame_1 = require("./frames/frame");
5
5
  const frame_generator_1 = require("./frames/frame-generator");
6
6
  const telemetry_1 = require("@contrail/telemetry");
7
+ const document_dynamic_text_element_util_1 = require("./util/document-dynamic-text-element-util");
7
8
  class ShowcaseFrameGenerator {
8
9
  constructor() { }
9
- static generateFrames(options) {
10
+ static generateFrames(options, typeMap) {
11
+ if (typeMap && document_dynamic_text_element_util_1.DocumentDynamicTextElementUtil.typeMap === undefined) {
12
+ document_dynamic_text_element_util_1.DocumentDynamicTextElementUtil.setTypeMap(typeMap);
13
+ }
10
14
  const frames = [];
11
15
  const structure = options.data.dataGroup;
12
16
  const template = options.documentTemplateDefinition;
@@ -1,9 +1,10 @@
1
1
  import { DataGroup } from '@contrail/data-grouping';
2
2
  import { DocumentElement } from '@contrail/documents';
3
+ import { Type } from '@contrail/types';
3
4
  export declare class DocumentDynamicTextElementUtil {
4
5
  static typeMap: any;
5
6
  static propertyMapByType: any;
6
7
  static isDynamicText(element: any): any;
7
8
  static handleDynamicText(element: DocumentElement, dataGroup: DataGroup, frameTitle: any, templateElement: DocumentElement): void;
8
- static setTypeMap(typeMap: any): void;
9
+ static setTypeMap(typeMap: Record<string, Type>): void;
9
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/document-generation",
3
- "version": "2.2.2-dev-tel-own-otel-2",
3
+ "version": "2.2.4",
4
4
  "description": "Utilities for automatic generation of documents.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -44,10 +44,10 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@contrail/data-grouping": "^1.0.50",
47
- "@contrail/document-table": "^1.1.1-dev-tel-own-otel-2",
48
- "@contrail/documents": "^1.4.1-dev-tel-own-otel-2",
49
- "@contrail/telemetry": "^2.0.0-dev-telemetry-own-otel-1",
50
- "@contrail/types": "^3.3.1-dev-tel-own-otel-2",
51
- "@contrail/util": "^1.2.2-dev-tel-own-otel-2"
47
+ "@contrail/document-table": "^1.0.5",
48
+ "@contrail/documents": "^1.3.3",
49
+ "@contrail/telemetry": "^1.0.2",
50
+ "@contrail/types": "^3.1.3",
51
+ "@contrail/util": "^1.1.19"
52
52
  }
53
53
  }