@contrail/documents 1.0.13 → 1.0.15
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.
|
@@ -3,11 +3,119 @@ export interface ComponentDefinition {
|
|
|
3
3
|
slug: string;
|
|
4
4
|
defaultTemplate: Document;
|
|
5
5
|
}
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const ITEM_VIEW_TEMPLATE: {
|
|
7
|
+
elements: ({
|
|
8
|
+
type: string;
|
|
9
|
+
size: {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
};
|
|
13
|
+
propertyBindings: {
|
|
14
|
+
url: string;
|
|
15
|
+
text?: undefined;
|
|
16
|
+
};
|
|
17
|
+
position?: undefined;
|
|
18
|
+
style?: undefined;
|
|
19
|
+
} | {
|
|
20
|
+
type: string;
|
|
21
|
+
position: {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
};
|
|
25
|
+
size: {
|
|
26
|
+
height: number;
|
|
27
|
+
width: number;
|
|
28
|
+
};
|
|
29
|
+
style: {
|
|
30
|
+
font: {
|
|
31
|
+
size: number;
|
|
32
|
+
};
|
|
33
|
+
color?: undefined;
|
|
34
|
+
};
|
|
35
|
+
propertyBindings: {
|
|
36
|
+
text: string;
|
|
37
|
+
url?: undefined;
|
|
38
|
+
};
|
|
39
|
+
} | {
|
|
40
|
+
type: string;
|
|
41
|
+
position: {
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
};
|
|
45
|
+
size: {
|
|
46
|
+
height: number;
|
|
47
|
+
width: number;
|
|
48
|
+
};
|
|
49
|
+
style: {
|
|
50
|
+
font: {
|
|
51
|
+
size: number;
|
|
52
|
+
};
|
|
53
|
+
color: string;
|
|
54
|
+
};
|
|
55
|
+
propertyBindings: {
|
|
56
|
+
text: string;
|
|
57
|
+
url?: undefined;
|
|
58
|
+
};
|
|
59
|
+
})[];
|
|
60
|
+
};
|
|
7
61
|
export declare const ITEM_COLOR_VIEW_STATIC_THUMBNAIL_TEMPLATE: Document;
|
|
8
|
-
export declare const
|
|
62
|
+
export declare const ITEM_VIEW: {
|
|
9
63
|
slug: string;
|
|
10
|
-
defaultTemplate:
|
|
64
|
+
defaultTemplate: {
|
|
65
|
+
elements: ({
|
|
66
|
+
type: string;
|
|
67
|
+
size: {
|
|
68
|
+
width: number;
|
|
69
|
+
height: number;
|
|
70
|
+
};
|
|
71
|
+
propertyBindings: {
|
|
72
|
+
url: string;
|
|
73
|
+
text?: undefined;
|
|
74
|
+
};
|
|
75
|
+
position?: undefined;
|
|
76
|
+
style?: undefined;
|
|
77
|
+
} | {
|
|
78
|
+
type: string;
|
|
79
|
+
position: {
|
|
80
|
+
x: number;
|
|
81
|
+
y: number;
|
|
82
|
+
};
|
|
83
|
+
size: {
|
|
84
|
+
height: number;
|
|
85
|
+
width: number;
|
|
86
|
+
};
|
|
87
|
+
style: {
|
|
88
|
+
font: {
|
|
89
|
+
size: number;
|
|
90
|
+
};
|
|
91
|
+
color?: undefined;
|
|
92
|
+
};
|
|
93
|
+
propertyBindings: {
|
|
94
|
+
text: string;
|
|
95
|
+
url?: undefined;
|
|
96
|
+
};
|
|
97
|
+
} | {
|
|
98
|
+
type: string;
|
|
99
|
+
position: {
|
|
100
|
+
x: number;
|
|
101
|
+
y: number;
|
|
102
|
+
};
|
|
103
|
+
size: {
|
|
104
|
+
height: number;
|
|
105
|
+
width: number;
|
|
106
|
+
};
|
|
107
|
+
style: {
|
|
108
|
+
font: {
|
|
109
|
+
size: number;
|
|
110
|
+
};
|
|
111
|
+
color: string;
|
|
112
|
+
};
|
|
113
|
+
propertyBindings: {
|
|
114
|
+
text: string;
|
|
115
|
+
url?: undefined;
|
|
116
|
+
};
|
|
117
|
+
})[];
|
|
118
|
+
};
|
|
11
119
|
};
|
|
12
120
|
export declare const ITEM_COLOR_STATIC_THUMBNAIL_VIEW: {
|
|
13
121
|
slug: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ComponentRegistry = exports.ITEM_COLOR_STATIC_THUMBNAIL_VIEW = exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.ComponentRegistry = exports.ITEM_COLOR_STATIC_THUMBNAIL_VIEW = exports.ITEM_VIEW = exports.ITEM_COLOR_VIEW_STATIC_THUMBNAIL_TEMPLATE = exports.ITEM_VIEW_TEMPLATE = void 0;
|
|
4
|
+
exports.ITEM_VIEW_TEMPLATE = {
|
|
5
5
|
elements: [{
|
|
6
6
|
type: "image",
|
|
7
7
|
size: { width: 125, height: 125 },
|
|
@@ -9,24 +9,16 @@ exports.ITEM_COLOR_VIEW_TEMPLATE = {
|
|
|
9
9
|
}, {
|
|
10
10
|
type: "text",
|
|
11
11
|
position: { x: 0, y: 126 },
|
|
12
|
+
size: { height: 25, width: 125 },
|
|
12
13
|
style: {
|
|
13
14
|
font: {
|
|
14
15
|
size: 8,
|
|
15
16
|
}
|
|
16
17
|
},
|
|
17
|
-
propertyBindings: { text: '
|
|
18
|
-
}, {
|
|
19
|
-
type: "text",
|
|
20
|
-
position: { x: 0, y: 137 },
|
|
21
|
-
style: {
|
|
22
|
-
font: {
|
|
23
|
-
size: 8,
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
propertyBindings: { text: 'itemColor.item.styleNumber' }
|
|
18
|
+
propertyBindings: { text: 'item.name' }
|
|
27
19
|
}, {
|
|
28
20
|
type: "text",
|
|
29
|
-
position: { x: 0, y:
|
|
21
|
+
position: { x: 0, y: 151 },
|
|
30
22
|
size: { height: 25, width: 125 },
|
|
31
23
|
style: {
|
|
32
24
|
font: {
|
|
@@ -34,7 +26,7 @@ exports.ITEM_COLOR_VIEW_TEMPLATE = {
|
|
|
34
26
|
},
|
|
35
27
|
color: 'rgba(0,0,0,.5)',
|
|
36
28
|
},
|
|
37
|
-
propertyBindings: { text: '
|
|
29
|
+
propertyBindings: { text: 'item.optionName' }
|
|
38
30
|
}
|
|
39
31
|
]
|
|
40
32
|
};
|
|
@@ -75,9 +67,9 @@ exports.ITEM_COLOR_VIEW_STATIC_THUMBNAIL_TEMPLATE = {
|
|
|
75
67
|
}
|
|
76
68
|
]
|
|
77
69
|
};
|
|
78
|
-
exports.
|
|
79
|
-
slug: 'item-
|
|
80
|
-
defaultTemplate: exports.
|
|
70
|
+
exports.ITEM_VIEW = {
|
|
71
|
+
slug: 'item-view',
|
|
72
|
+
defaultTemplate: exports.ITEM_VIEW_TEMPLATE,
|
|
81
73
|
};
|
|
82
74
|
exports.ITEM_COLOR_STATIC_THUMBNAIL_VIEW = {
|
|
83
75
|
slug: 'item-color-static-thumbnail-view',
|
|
@@ -92,7 +84,7 @@ class ComponentRegistry {
|
|
|
92
84
|
}
|
|
93
85
|
static initMap() {
|
|
94
86
|
this.componentDefinitionMap = new Map();
|
|
95
|
-
this.componentDefinitionMap.set('item-
|
|
87
|
+
this.componentDefinitionMap.set('item-view', exports.ITEM_VIEW);
|
|
96
88
|
this.componentDefinitionMap.set('item-color-static-thumbnail-view', exports.ITEM_COLOR_STATIC_THUMBNAIL_VIEW);
|
|
97
89
|
}
|
|
98
90
|
}
|
package/lib/types/common.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PositionDefinition } from './common';
|
|
1
|
+
import { LineDefinition, PositionDefinition } from './common';
|
|
2
2
|
import { Document } from './document';
|
|
3
3
|
export interface DocumentElement extends Document {
|
|
4
4
|
id?: string;
|
|
@@ -7,4 +7,5 @@ export interface DocumentElement extends Document {
|
|
|
7
7
|
text?: string;
|
|
8
8
|
url?: string;
|
|
9
9
|
propertyBindings?: any;
|
|
10
|
+
lineDefinition?: LineDefinition;
|
|
10
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrail/documents",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "Documents library for contrail platform",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -13,9 +13,6 @@
|
|
|
13
13
|
"keywords": [],
|
|
14
14
|
"author": "",
|
|
15
15
|
"license": "ISC",
|
|
16
|
-
"files": [
|
|
17
|
-
"lib/**/*"
|
|
18
|
-
],
|
|
19
16
|
"devDependencies": {
|
|
20
17
|
"@types/jest": "^23.3.14",
|
|
21
18
|
"jest": "^23.6.0",
|