@contrail/document-generation 2.0.20 → 2.0.21
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.
|
@@ -11,13 +11,17 @@ class FrameGenerator {
|
|
|
11
11
|
static generateBoardFrameForDataGroup(dataGroup, framePosition, template, frameTemplate) {
|
|
12
12
|
let style = { backgroundColor: "#fff", border: { width: 1, color: "#616161" } };
|
|
13
13
|
let frameSize = template.frameSize;
|
|
14
|
+
let clipContent = false;
|
|
14
15
|
if (frameTemplate) {
|
|
15
16
|
if (frameTemplate.document.style) {
|
|
16
17
|
style = frameTemplate.document.style;
|
|
17
18
|
}
|
|
18
19
|
frameSize = frameTemplate.document.size;
|
|
20
|
+
if (frameTemplate.document.clipContent) {
|
|
21
|
+
clipContent = frameTemplate.document.clipContent;
|
|
22
|
+
}
|
|
19
23
|
}
|
|
20
|
-
let frame = new frame_1.BoardFrame(dataGroup.name, util_1.ObjectUtil.cloneDeep(framePosition), frameSize, style);
|
|
24
|
+
let frame = new frame_1.BoardFrame(dataGroup.name, util_1.ObjectUtil.cloneDeep(framePosition), frameSize, style, clipContent);
|
|
21
25
|
frame = this.generateFrameContentForGroup(frame, dataGroup, template, frameTemplate);
|
|
22
26
|
return frame;
|
|
23
27
|
}
|
package/lib/frames/frame.d.ts
CHANGED
|
@@ -10,6 +10,6 @@ export declare class ShowcaseFrame extends DocumentFrame {
|
|
|
10
10
|
export declare class BoardFrame extends DocumentFrame {
|
|
11
11
|
private frameElement;
|
|
12
12
|
name: string;
|
|
13
|
-
constructor(name: string, position: PositionDefinition, size: SizeDefinition, style: StyleDefinition);
|
|
13
|
+
constructor(name: string, position: PositionDefinition, size: SizeDefinition, style: StyleDefinition, clipContent?: boolean);
|
|
14
14
|
toDocumentElements(): Array<DocumentElement>;
|
|
15
15
|
}
|
package/lib/frames/frame.js
CHANGED
|
@@ -21,7 +21,7 @@ class ShowcaseFrame extends DocumentFrame {
|
|
|
21
21
|
}
|
|
22
22
|
exports.ShowcaseFrame = ShowcaseFrame;
|
|
23
23
|
class BoardFrame extends DocumentFrame {
|
|
24
|
-
constructor(name, position, size, style) {
|
|
24
|
+
constructor(name, position, size, style, clipContent = false) {
|
|
25
25
|
super();
|
|
26
26
|
if (!position) {
|
|
27
27
|
position = { x: 0, y: 0 };
|
|
@@ -32,7 +32,7 @@ class BoardFrame extends DocumentFrame {
|
|
|
32
32
|
if (!style) {
|
|
33
33
|
style = {};
|
|
34
34
|
}
|
|
35
|
-
this.frameElement = documents_1.DocumentElementFactory.createFrameElement({ size, position, style });
|
|
35
|
+
this.frameElement = documents_1.DocumentElementFactory.createFrameElement({ size, position, style, clipContent });
|
|
36
36
|
this.frameElement.name = name;
|
|
37
37
|
}
|
|
38
38
|
toDocumentElements() {
|
package/lib/interfaces.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrail/document-generation",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.21",
|
|
4
4
|
"description": "Utilities for automatic generation of documents.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@contrail/data-grouping": "^1.0.20",
|
|
46
|
-
"@contrail/documents": "^1.0.
|
|
46
|
+
"@contrail/documents": "^1.0.68",
|
|
47
47
|
"@contrail/types": "^3.0.27",
|
|
48
48
|
"@contrail/util": "^1.0.27"
|
|
49
49
|
}
|