@contrail/documents 1.0.36 → 1.0.38

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,236 +1,236 @@
1
- import { Document } from '../types/document';
2
- export interface ComponentDefinition {
3
- slug: string;
4
- defaultTemplate: Document;
5
- }
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
- };
61
- export declare const ITEM_VIEW_TEMPLATE_V2: {
62
- elements: ({
63
- type: string;
64
- size: {
65
- width: number;
66
- height: number;
67
- };
68
- propertyBindings: {
69
- url: string;
70
- text?: undefined;
71
- };
72
- position?: undefined;
73
- style?: undefined;
74
- } | {
75
- type: string;
76
- position: {
77
- x: number;
78
- y: number;
79
- };
80
- size: {
81
- height: number;
82
- width: number;
83
- };
84
- style: {
85
- font: {
86
- size: number;
87
- };
88
- color?: undefined;
89
- };
90
- propertyBindings: {
91
- text: string;
92
- url?: undefined;
93
- };
94
- } | {
95
- type: string;
96
- position: {
97
- x: number;
98
- y: number;
99
- };
100
- size: {
101
- height: number;
102
- width: number;
103
- };
104
- style: {
105
- font: {
106
- size: number;
107
- };
108
- color: string;
109
- };
110
- propertyBindings: {
111
- text: string;
112
- url?: undefined;
113
- };
114
- })[];
115
- };
116
- export declare const ITEM_VIEW: {
117
- slug: string;
118
- defaultTemplate: {
119
- elements: ({
120
- type: string;
121
- size: {
122
- width: number;
123
- height: number;
124
- };
125
- propertyBindings: {
126
- url: string;
127
- text?: undefined;
128
- };
129
- position?: undefined;
130
- style?: undefined;
131
- } | {
132
- type: string;
133
- position: {
134
- x: number;
135
- y: number;
136
- };
137
- size: {
138
- height: number;
139
- width: number;
140
- };
141
- style: {
142
- font: {
143
- size: number;
144
- };
145
- color?: undefined;
146
- };
147
- propertyBindings: {
148
- text: string;
149
- url?: undefined;
150
- };
151
- } | {
152
- type: string;
153
- position: {
154
- x: number;
155
- y: number;
156
- };
157
- size: {
158
- height: number;
159
- width: number;
160
- };
161
- style: {
162
- font: {
163
- size: number;
164
- };
165
- color: string;
166
- };
167
- propertyBindings: {
168
- text: string;
169
- url?: undefined;
170
- };
171
- })[];
172
- };
173
- };
174
- export declare const ITEM_VIEW_V2: {
175
- slug: string;
176
- defaultTemplate: {
177
- elements: ({
178
- type: string;
179
- size: {
180
- width: number;
181
- height: number;
182
- };
183
- propertyBindings: {
184
- url: string;
185
- text?: undefined;
186
- };
187
- position?: undefined;
188
- style?: undefined;
189
- } | {
190
- type: string;
191
- position: {
192
- x: number;
193
- y: number;
194
- };
195
- size: {
196
- height: number;
197
- width: number;
198
- };
199
- style: {
200
- font: {
201
- size: number;
202
- };
203
- color?: undefined;
204
- };
205
- propertyBindings: {
206
- text: string;
207
- url?: undefined;
208
- };
209
- } | {
210
- type: string;
211
- position: {
212
- x: number;
213
- y: number;
214
- };
215
- size: {
216
- height: number;
217
- width: number;
218
- };
219
- style: {
220
- font: {
221
- size: number;
222
- };
223
- color: string;
224
- };
225
- propertyBindings: {
226
- text: string;
227
- url?: undefined;
228
- };
229
- })[];
230
- };
231
- };
232
- export declare class ComponentRegistry {
233
- private static componentDefinitionMap;
234
- static getComponentDefinition(slug: string): ComponentDefinition;
235
- private static initMap;
236
- }
1
+ import { Document } from '../types/document';
2
+ export interface ComponentDefinition {
3
+ slug: string;
4
+ defaultTemplate: Document;
5
+ }
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
+ };
61
+ export declare const ITEM_VIEW_TEMPLATE_V2: {
62
+ elements: ({
63
+ type: string;
64
+ size: {
65
+ width: number;
66
+ height: number;
67
+ };
68
+ propertyBindings: {
69
+ url: string;
70
+ text?: undefined;
71
+ };
72
+ position?: undefined;
73
+ style?: undefined;
74
+ } | {
75
+ type: string;
76
+ position: {
77
+ x: number;
78
+ y: number;
79
+ };
80
+ size: {
81
+ height: number;
82
+ width: number;
83
+ };
84
+ style: {
85
+ font: {
86
+ size: number;
87
+ };
88
+ color?: undefined;
89
+ };
90
+ propertyBindings: {
91
+ text: string;
92
+ url?: undefined;
93
+ };
94
+ } | {
95
+ type: string;
96
+ position: {
97
+ x: number;
98
+ y: number;
99
+ };
100
+ size: {
101
+ height: number;
102
+ width: number;
103
+ };
104
+ style: {
105
+ font: {
106
+ size: number;
107
+ };
108
+ color: string;
109
+ };
110
+ propertyBindings: {
111
+ text: string;
112
+ url?: undefined;
113
+ };
114
+ })[];
115
+ };
116
+ export declare const ITEM_VIEW: {
117
+ slug: string;
118
+ defaultTemplate: {
119
+ elements: ({
120
+ type: string;
121
+ size: {
122
+ width: number;
123
+ height: number;
124
+ };
125
+ propertyBindings: {
126
+ url: string;
127
+ text?: undefined;
128
+ };
129
+ position?: undefined;
130
+ style?: undefined;
131
+ } | {
132
+ type: string;
133
+ position: {
134
+ x: number;
135
+ y: number;
136
+ };
137
+ size: {
138
+ height: number;
139
+ width: number;
140
+ };
141
+ style: {
142
+ font: {
143
+ size: number;
144
+ };
145
+ color?: undefined;
146
+ };
147
+ propertyBindings: {
148
+ text: string;
149
+ url?: undefined;
150
+ };
151
+ } | {
152
+ type: string;
153
+ position: {
154
+ x: number;
155
+ y: number;
156
+ };
157
+ size: {
158
+ height: number;
159
+ width: number;
160
+ };
161
+ style: {
162
+ font: {
163
+ size: number;
164
+ };
165
+ color: string;
166
+ };
167
+ propertyBindings: {
168
+ text: string;
169
+ url?: undefined;
170
+ };
171
+ })[];
172
+ };
173
+ };
174
+ export declare const ITEM_VIEW_V2: {
175
+ slug: string;
176
+ defaultTemplate: {
177
+ elements: ({
178
+ type: string;
179
+ size: {
180
+ width: number;
181
+ height: number;
182
+ };
183
+ propertyBindings: {
184
+ url: string;
185
+ text?: undefined;
186
+ };
187
+ position?: undefined;
188
+ style?: undefined;
189
+ } | {
190
+ type: string;
191
+ position: {
192
+ x: number;
193
+ y: number;
194
+ };
195
+ size: {
196
+ height: number;
197
+ width: number;
198
+ };
199
+ style: {
200
+ font: {
201
+ size: number;
202
+ };
203
+ color?: undefined;
204
+ };
205
+ propertyBindings: {
206
+ text: string;
207
+ url?: undefined;
208
+ };
209
+ } | {
210
+ type: string;
211
+ position: {
212
+ x: number;
213
+ y: number;
214
+ };
215
+ size: {
216
+ height: number;
217
+ width: number;
218
+ };
219
+ style: {
220
+ font: {
221
+ size: number;
222
+ };
223
+ color: string;
224
+ };
225
+ propertyBindings: {
226
+ text: string;
227
+ url?: undefined;
228
+ };
229
+ })[];
230
+ };
231
+ };
232
+ export declare class ComponentRegistry {
233
+ private static componentDefinitionMap;
234
+ static getComponentDefinition(slug: string): ComponentDefinition;
235
+ private static initMap;
236
+ }
@@ -1,83 +1,83 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ComponentRegistry = exports.ITEM_VIEW_V2 = exports.ITEM_VIEW = exports.ITEM_VIEW_TEMPLATE_V2 = exports.ITEM_VIEW_TEMPLATE = void 0;
4
- exports.ITEM_VIEW_TEMPLATE = {
5
- elements: [{
6
- type: "image",
7
- size: { width: 125, height: 125 },
8
- propertyBindings: { url: 'thumbnail.downloadUrl' }
9
- }, {
10
- type: "text",
11
- position: { x: 0, y: 126 },
12
- size: { height: 25, width: 125 },
13
- style: {
14
- font: {
15
- size: 8,
16
- }
17
- },
18
- propertyBindings: { text: 'item.name' }
19
- }, {
20
- type: "text",
21
- position: { x: 0, y: 151 },
22
- size: { height: 25, width: 125 },
23
- style: {
24
- font: {
25
- size: 8,
26
- },
27
- color: 'rgba(0,0,0,.5)',
28
- },
29
- propertyBindings: { text: 'item.optionName' }
30
- }
31
- ]
32
- };
33
- exports.ITEM_VIEW_TEMPLATE_V2 = {
34
- elements: [{
35
- type: "image",
36
- size: { width: 125, height: 125 },
37
- propertyBindings: { url: 'viewable.mediumViewableDownloadUrl' }
38
- }, {
39
- type: "text",
40
- position: { x: 0, y: 126 },
41
- size: { height: 25, width: 125 },
42
- style: {
43
- font: {
44
- size: 8,
45
- }
46
- },
47
- propertyBindings: { text: 'item.name' }
48
- }, {
49
- type: "text",
50
- position: { x: 0, y: 151 },
51
- size: { height: 25, width: 125 },
52
- style: {
53
- font: {
54
- size: 8,
55
- },
56
- color: 'rgba(0,0,0,.5)',
57
- },
58
- propertyBindings: { text: 'item.optionName' }
59
- }
60
- ]
61
- };
62
- exports.ITEM_VIEW = {
63
- slug: 'item-view',
64
- defaultTemplate: exports.ITEM_VIEW_TEMPLATE,
65
- };
66
- exports.ITEM_VIEW_V2 = {
67
- slug: 'item-view-v2',
68
- defaultTemplate: exports.ITEM_VIEW_TEMPLATE_V2,
69
- };
70
- class ComponentRegistry {
71
- static getComponentDefinition(slug) {
72
- if (!this.componentDefinitionMap) {
73
- this.initMap();
74
- }
75
- return this.componentDefinitionMap.get(slug);
76
- }
77
- static initMap() {
78
- this.componentDefinitionMap = new Map();
79
- this.componentDefinitionMap.set('item-view', exports.ITEM_VIEW);
80
- this.componentDefinitionMap.set('item-view-v2', exports.ITEM_VIEW_V2);
81
- }
82
- }
83
- exports.ComponentRegistry = ComponentRegistry;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ComponentRegistry = exports.ITEM_VIEW_V2 = exports.ITEM_VIEW = exports.ITEM_VIEW_TEMPLATE_V2 = exports.ITEM_VIEW_TEMPLATE = void 0;
4
+ exports.ITEM_VIEW_TEMPLATE = {
5
+ elements: [{
6
+ type: "image",
7
+ size: { width: 125, height: 125 },
8
+ propertyBindings: { url: 'thumbnail.downloadUrl' }
9
+ }, {
10
+ type: "text",
11
+ position: { x: 0, y: 126 },
12
+ size: { height: 25, width: 125 },
13
+ style: {
14
+ font: {
15
+ size: 8,
16
+ }
17
+ },
18
+ propertyBindings: { text: 'item.name' }
19
+ }, {
20
+ type: "text",
21
+ position: { x: 0, y: 151 },
22
+ size: { height: 25, width: 125 },
23
+ style: {
24
+ font: {
25
+ size: 8,
26
+ },
27
+ color: 'rgba(0,0,0,.5)',
28
+ },
29
+ propertyBindings: { text: 'item.optionName' }
30
+ }
31
+ ]
32
+ };
33
+ exports.ITEM_VIEW_TEMPLATE_V2 = {
34
+ elements: [{
35
+ type: "image",
36
+ size: { width: 125, height: 125 },
37
+ propertyBindings: { url: 'viewable.mediumViewableDownloadUrl' }
38
+ }, {
39
+ type: "text",
40
+ position: { x: 0, y: 126 },
41
+ size: { height: 25, width: 125 },
42
+ style: {
43
+ font: {
44
+ size: 8,
45
+ }
46
+ },
47
+ propertyBindings: { text: 'item.name' }
48
+ }, {
49
+ type: "text",
50
+ position: { x: 0, y: 151 },
51
+ size: { height: 25, width: 125 },
52
+ style: {
53
+ font: {
54
+ size: 8,
55
+ },
56
+ color: 'rgba(0,0,0,.5)',
57
+ },
58
+ propertyBindings: { text: 'item.optionName' }
59
+ }
60
+ ]
61
+ };
62
+ exports.ITEM_VIEW = {
63
+ slug: 'item-view',
64
+ defaultTemplate: exports.ITEM_VIEW_TEMPLATE,
65
+ };
66
+ exports.ITEM_VIEW_V2 = {
67
+ slug: 'item-view-v2',
68
+ defaultTemplate: exports.ITEM_VIEW_TEMPLATE_V2,
69
+ };
70
+ class ComponentRegistry {
71
+ static getComponentDefinition(slug) {
72
+ if (!this.componentDefinitionMap) {
73
+ this.initMap();
74
+ }
75
+ return this.componentDefinitionMap.get(slug);
76
+ }
77
+ static initMap() {
78
+ this.componentDefinitionMap = new Map();
79
+ this.componentDefinitionMap.set('item-view', exports.ITEM_VIEW);
80
+ this.componentDefinitionMap.set('item-view-v2', exports.ITEM_VIEW_V2);
81
+ }
82
+ }
83
+ exports.ComponentRegistry = ComponentRegistry;
@@ -1 +1 @@
1
- export * from './components';
1
+ export * from './components';
@@ -1,17 +1,17 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./components"), exports);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./components"), exports);