@contrail/document-generation 1.0.31 → 1.0.33
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.
- package/README.md +1 -1
- package/lib/components/component-generator.d.ts +11 -11
- package/lib/components/component-generator.js +67 -67
- package/lib/components/component-grid-generator.d.ts +7 -7
- package/lib/components/component-grid-generator.js +81 -81
- package/lib/components/component-util.d.ts +4 -4
- package/lib/components/component-util.js +26 -26
- package/lib/document-generator.d.ts +11 -11
- package/lib/document-generator.js +107 -106
- package/lib/frame-generator.d.ts +9 -9
- package/lib/frame-generator.js +77 -77
- package/lib/index.d.ts +2 -2
- package/lib/index.js +18 -18
- package/lib/info-panel/info-panel-generator.d.ts +5 -5
- package/lib/info-panel/info-panel-generator.js +34 -34
- package/lib/interfaces.d.ts +56 -56
- package/lib/interfaces.js +8 -8
- package/lib/scripts/test.d.ts +1 -1
- package/lib/scripts/test.js +275 -275
- package/lib/test-data.d.ts +72 -72
- package/lib/test-data.js +176 -176
- package/lib/util/document-property-util.d.ts +7 -7
- package/lib/util/document-property-util.js +47 -47
- package/lib/util/document-text-element-util.d.ts +10 -10
- package/lib/util/document-text-element-util.js +120 -119
- package/lib/util/document-util.d.ts +8 -7
- package/lib/util/document-util.js +24 -13
- package/package.json +50 -50
package/lib/interfaces.d.ts
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { DataGroupStructure } from "@contrail/data-grouping";
|
|
2
|
-
import { PositionDefinition, SizeDefinition, DocumentElement, StyleDefinition } from "@contrail/documents";
|
|
3
|
-
import { TypeProperty } from "@contrail/types";
|
|
4
|
-
export declare enum Orientation {
|
|
5
|
-
HORIZONTAL = "horizontal",
|
|
6
|
-
VERTICAL = "vertical"
|
|
7
|
-
}
|
|
8
|
-
export interface DocumentGenerationDataDefinition {
|
|
9
|
-
dataGroup: DataGroupStructure;
|
|
10
|
-
}
|
|
11
|
-
export interface DocumentGenerationOptions {
|
|
12
|
-
startingCoordinates: PositionDefinition;
|
|
13
|
-
data: DocumentGenerationDataDefinition;
|
|
14
|
-
documentTemplateDefinition: DocumentTemplate;
|
|
15
|
-
}
|
|
16
|
-
export interface DocumentTemplate {
|
|
17
|
-
frameOrientation: Orientation;
|
|
18
|
-
frameSize: SizeDefinition;
|
|
19
|
-
framePadding?: number;
|
|
20
|
-
frameGroupHeaderTemplate: DocumentElement;
|
|
21
|
-
frameHeaderTemplate?: DocumentElement;
|
|
22
|
-
frameInfoPanelTemplate?: FrameInfoPanelTemplate;
|
|
23
|
-
componentGridTemplate: ComponentGridTemplate;
|
|
24
|
-
}
|
|
25
|
-
export interface FrameInfoPanelTemplate {
|
|
26
|
-
panelDocumentTemplate: DocumentElement;
|
|
27
|
-
propertyTemplate: PanelPropertyTemplate;
|
|
28
|
-
}
|
|
29
|
-
export interface PanelPropertyTemplate {
|
|
30
|
-
textHorizontalAlignment?: 'center' | 'right' | 'left';
|
|
31
|
-
properties: Array<DocumentPropertyDefinition>;
|
|
32
|
-
}
|
|
33
|
-
export interface ComponentGridTemplate {
|
|
34
|
-
componentTemplate: ComponentTemplate;
|
|
35
|
-
componentPadding?: number;
|
|
36
|
-
gridDimensions: {
|
|
37
|
-
rows: number;
|
|
38
|
-
cols: number;
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
export interface ComponentTemplate {
|
|
42
|
-
propertyTemplate?: ComponentPropertyTemplate;
|
|
43
|
-
}
|
|
44
|
-
export interface ComponentPropertyTemplate {
|
|
45
|
-
imageDimension?: SizeDefinition;
|
|
46
|
-
imageLocation?: 'top' | 'right' | 'left' | 'bottom';
|
|
47
|
-
textHorizontalAlignment?: 'center' | 'right' | 'left';
|
|
48
|
-
properties: Array<DocumentPropertyDefinition>;
|
|
49
|
-
}
|
|
50
|
-
export interface DocumentPropertyDefinition {
|
|
51
|
-
style?: StyleDefinition;
|
|
52
|
-
propertyDefinition: TypeProperty;
|
|
53
|
-
slug: string;
|
|
54
|
-
typeRootSlug: string;
|
|
55
|
-
includeLabel?: boolean;
|
|
56
|
-
}
|
|
1
|
+
import { DataGroupStructure } from "@contrail/data-grouping";
|
|
2
|
+
import { PositionDefinition, SizeDefinition, DocumentElement, StyleDefinition } from "@contrail/documents";
|
|
3
|
+
import { TypeProperty } from "@contrail/types";
|
|
4
|
+
export declare enum Orientation {
|
|
5
|
+
HORIZONTAL = "horizontal",
|
|
6
|
+
VERTICAL = "vertical"
|
|
7
|
+
}
|
|
8
|
+
export interface DocumentGenerationDataDefinition {
|
|
9
|
+
dataGroup: DataGroupStructure;
|
|
10
|
+
}
|
|
11
|
+
export interface DocumentGenerationOptions {
|
|
12
|
+
startingCoordinates: PositionDefinition;
|
|
13
|
+
data: DocumentGenerationDataDefinition;
|
|
14
|
+
documentTemplateDefinition: DocumentTemplate;
|
|
15
|
+
}
|
|
16
|
+
export interface DocumentTemplate {
|
|
17
|
+
frameOrientation: Orientation;
|
|
18
|
+
frameSize: SizeDefinition;
|
|
19
|
+
framePadding?: number;
|
|
20
|
+
frameGroupHeaderTemplate: DocumentElement;
|
|
21
|
+
frameHeaderTemplate?: DocumentElement;
|
|
22
|
+
frameInfoPanelTemplate?: FrameInfoPanelTemplate;
|
|
23
|
+
componentGridTemplate: ComponentGridTemplate;
|
|
24
|
+
}
|
|
25
|
+
export interface FrameInfoPanelTemplate {
|
|
26
|
+
panelDocumentTemplate: DocumentElement;
|
|
27
|
+
propertyTemplate: PanelPropertyTemplate;
|
|
28
|
+
}
|
|
29
|
+
export interface PanelPropertyTemplate {
|
|
30
|
+
textHorizontalAlignment?: 'center' | 'right' | 'left';
|
|
31
|
+
properties: Array<DocumentPropertyDefinition>;
|
|
32
|
+
}
|
|
33
|
+
export interface ComponentGridTemplate {
|
|
34
|
+
componentTemplate: ComponentTemplate;
|
|
35
|
+
componentPadding?: number;
|
|
36
|
+
gridDimensions: {
|
|
37
|
+
rows: number;
|
|
38
|
+
cols: number;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export interface ComponentTemplate {
|
|
42
|
+
propertyTemplate?: ComponentPropertyTemplate;
|
|
43
|
+
}
|
|
44
|
+
export interface ComponentPropertyTemplate {
|
|
45
|
+
imageDimension?: SizeDefinition;
|
|
46
|
+
imageLocation?: 'top' | 'right' | 'left' | 'bottom';
|
|
47
|
+
textHorizontalAlignment?: 'center' | 'right' | 'left';
|
|
48
|
+
properties: Array<DocumentPropertyDefinition>;
|
|
49
|
+
}
|
|
50
|
+
export interface DocumentPropertyDefinition {
|
|
51
|
+
style?: StyleDefinition;
|
|
52
|
+
propertyDefinition: TypeProperty;
|
|
53
|
+
slug: string;
|
|
54
|
+
typeRootSlug: string;
|
|
55
|
+
includeLabel?: boolean;
|
|
56
|
+
}
|
package/lib/interfaces.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Orientation = void 0;
|
|
4
|
-
var Orientation;
|
|
5
|
-
(function (Orientation) {
|
|
6
|
-
Orientation["HORIZONTAL"] = "horizontal";
|
|
7
|
-
Orientation["VERTICAL"] = "vertical";
|
|
8
|
-
})(Orientation = exports.Orientation || (exports.Orientation = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Orientation = void 0;
|
|
4
|
+
var Orientation;
|
|
5
|
+
(function (Orientation) {
|
|
6
|
+
Orientation["HORIZONTAL"] = "horizontal";
|
|
7
|
+
Orientation["VERTICAL"] = "vertical";
|
|
8
|
+
})(Orientation = exports.Orientation || (exports.Orientation = {}));
|
package/lib/scripts/test.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|