@micromag/screen-article 0.3.541 → 0.3.569
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/es/index.js +2 -3
- package/package.json +16 -17
- package/lib/index.js +0 -470
package/es/index.js
CHANGED
|
@@ -312,7 +312,6 @@ var ArticleScreen = function ArticleScreen(_ref) {
|
|
|
312
312
|
};
|
|
313
313
|
ArticleScreen.propTypes = propTypes;
|
|
314
314
|
ArticleScreen.defaultProps = defaultProps;
|
|
315
|
-
var ArticleScreen$1 = ArticleScreen;
|
|
316
315
|
|
|
317
316
|
// import * as transforms from './transforms/index';
|
|
318
317
|
|
|
@@ -336,7 +335,7 @@ var definition = [{
|
|
|
336
335
|
"value": "Article"
|
|
337
336
|
}]
|
|
338
337
|
}),
|
|
339
|
-
component: ArticleScreen
|
|
338
|
+
component: ArticleScreen,
|
|
340
339
|
layouts: ['normal'],
|
|
341
340
|
// transforms,
|
|
342
341
|
fields: [{
|
|
@@ -462,4 +461,4 @@ var definition = [{
|
|
|
462
461
|
}]
|
|
463
462
|
}];
|
|
464
463
|
|
|
465
|
-
export { ArticleScreen
|
|
464
|
+
export { ArticleScreen, definition as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-article",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.569",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -26,12 +26,11 @@
|
|
|
26
26
|
}
|
|
27
27
|
],
|
|
28
28
|
"license": "ISC",
|
|
29
|
-
"
|
|
29
|
+
"type": "module",
|
|
30
30
|
"module": "es/index.js",
|
|
31
31
|
"style": "assets/css/styles.css",
|
|
32
32
|
"exports": {
|
|
33
33
|
".": {
|
|
34
|
-
"require": "./lib/index.js",
|
|
35
34
|
"import": "./es/index.js"
|
|
36
35
|
},
|
|
37
36
|
"./assets/css/styles": "./assets/css/styles.css",
|
|
@@ -57,19 +56,19 @@
|
|
|
57
56
|
},
|
|
58
57
|
"dependencies": {
|
|
59
58
|
"@babel/runtime": "^7.13.10",
|
|
60
|
-
"@micromag/core": "^0.3.
|
|
61
|
-
"@micromag/element-author": "^0.3.
|
|
62
|
-
"@micromag/element-background": "^0.3.
|
|
63
|
-
"@micromag/element-container": "^0.3.
|
|
64
|
-
"@micromag/element-footer": "^0.3.
|
|
65
|
-
"@micromag/element-header": "^0.3.
|
|
66
|
-
"@micromag/element-heading": "^0.3.
|
|
67
|
-
"@micromag/element-layout": "^0.3.
|
|
68
|
-
"@micromag/element-scroll": "^0.3.
|
|
69
|
-
"@micromag/element-stack": "^0.3.
|
|
70
|
-
"@micromag/element-text": "^0.3.
|
|
71
|
-
"@micromag/element-visual": "^0.3.
|
|
72
|
-
"@micromag/transforms": "^0.3.
|
|
59
|
+
"@micromag/core": "^0.3.569",
|
|
60
|
+
"@micromag/element-author": "^0.3.569",
|
|
61
|
+
"@micromag/element-background": "^0.3.569",
|
|
62
|
+
"@micromag/element-container": "^0.3.569",
|
|
63
|
+
"@micromag/element-footer": "^0.3.569",
|
|
64
|
+
"@micromag/element-header": "^0.3.569",
|
|
65
|
+
"@micromag/element-heading": "^0.3.569",
|
|
66
|
+
"@micromag/element-layout": "^0.3.569",
|
|
67
|
+
"@micromag/element-scroll": "^0.3.569",
|
|
68
|
+
"@micromag/element-stack": "^0.3.569",
|
|
69
|
+
"@micromag/element-text": "^0.3.569",
|
|
70
|
+
"@micromag/element-visual": "^0.3.569",
|
|
71
|
+
"@micromag/transforms": "^0.3.569",
|
|
73
72
|
"classnames": "^2.2.6",
|
|
74
73
|
"dayjs": "^1.11.10",
|
|
75
74
|
"lodash": "^4.17.21",
|
|
@@ -81,5 +80,5 @@
|
|
|
81
80
|
"access": "public",
|
|
82
81
|
"registry": "https://registry.npmjs.org/"
|
|
83
82
|
},
|
|
84
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "ceb71f23a32ab8df4a1563a1e5cd5598e539de4d"
|
|
85
84
|
}
|
package/lib/index.js
DELETED
|
@@ -1,470 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var reactIntl = require('react-intl');
|
|
6
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
|
-
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
8
|
-
var classNames = require('classnames');
|
|
9
|
-
var dayjs = require('dayjs');
|
|
10
|
-
var PropTypes = require('prop-types');
|
|
11
|
-
var React = require('react');
|
|
12
|
-
var core = require('@micromag/core');
|
|
13
|
-
var components = require('@micromag/core/components');
|
|
14
|
-
var contexts = require('@micromag/core/contexts');
|
|
15
|
-
var hooks = require('@micromag/core/hooks');
|
|
16
|
-
var utils = require('@micromag/core/utils');
|
|
17
|
-
var Author = require('@micromag/element-author');
|
|
18
|
-
var Background = require('@micromag/element-background');
|
|
19
|
-
var Container = require('@micromag/element-container');
|
|
20
|
-
var Footer = require('@micromag/element-footer');
|
|
21
|
-
var Header = require('@micromag/element-header');
|
|
22
|
-
var Heading = require('@micromag/element-heading');
|
|
23
|
-
var Layout = require('@micromag/element-layout');
|
|
24
|
-
var Scroll = require('@micromag/element-scroll');
|
|
25
|
-
var Text = require('@micromag/element-text');
|
|
26
|
-
var Visual = require('@micromag/element-visual');
|
|
27
|
-
|
|
28
|
-
var styles = {"container":"micromag-screen-article-container","background":"micromag-screen-article-background","emptySurtitle":"micromag-screen-article-emptySurtitle","emptyDate":"micromag-screen-article-emptyDate","emptyTitle":"micromag-screen-article-emptyTitle","emptyAuthor":"micromag-screen-article-emptyAuthor","emptyText":"micromag-screen-article-emptyText","content":"micromag-screen-article-content","layout":"micromag-screen-article-layout","main":"micromag-screen-article-main","hasText":"micromag-screen-article-hasText","visualContainer":"micromag-screen-article-visualContainer","surtitle":"micromag-screen-article-surtitle","date":"micromag-screen-article-date","title":"micromag-screen-article-title","text":"micromag-screen-article-text","topContent":"micromag-screen-article-topContent","footer":"micromag-screen-article-footer","disabled":"micromag-screen-article-disabled","isPlaceholder":"micromag-screen-article-isPlaceholder"};
|
|
29
|
-
|
|
30
|
-
var propTypes = {
|
|
31
|
-
layout: PropTypes.oneOf(['normal']),
|
|
32
|
-
image: core.PropTypes.imageMedia,
|
|
33
|
-
title: core.PropTypes.text,
|
|
34
|
-
surtitle: core.PropTypes.text,
|
|
35
|
-
date: PropTypes.string,
|
|
36
|
-
author: PropTypes.shape({}),
|
|
37
|
-
// author: MicromagPropTypes.text,
|
|
38
|
-
text: core.PropTypes.text,
|
|
39
|
-
spacing: PropTypes.number,
|
|
40
|
-
background: core.PropTypes.backgroundElement,
|
|
41
|
-
header: core.PropTypes.header,
|
|
42
|
-
footer: core.PropTypes.footer,
|
|
43
|
-
current: PropTypes.bool,
|
|
44
|
-
active: PropTypes.bool,
|
|
45
|
-
type: PropTypes.string,
|
|
46
|
-
className: PropTypes.string
|
|
47
|
-
};
|
|
48
|
-
var defaultProps = {
|
|
49
|
-
layout: 'normal',
|
|
50
|
-
image: null,
|
|
51
|
-
title: null,
|
|
52
|
-
surtitle: null,
|
|
53
|
-
date: null,
|
|
54
|
-
author: null,
|
|
55
|
-
text: null,
|
|
56
|
-
spacing: 20,
|
|
57
|
-
background: null,
|
|
58
|
-
header: null,
|
|
59
|
-
footer: null,
|
|
60
|
-
current: true,
|
|
61
|
-
active: true,
|
|
62
|
-
type: null,
|
|
63
|
-
className: null
|
|
64
|
-
};
|
|
65
|
-
var ArticleScreen = function ArticleScreen(_ref) {
|
|
66
|
-
var image = _ref.image,
|
|
67
|
-
title = _ref.title,
|
|
68
|
-
surtitle = _ref.surtitle,
|
|
69
|
-
date = _ref.date,
|
|
70
|
-
author = _ref.author,
|
|
71
|
-
text = _ref.text,
|
|
72
|
-
spacing = _ref.spacing,
|
|
73
|
-
background = _ref.background,
|
|
74
|
-
header = _ref.header,
|
|
75
|
-
footer = _ref.footer,
|
|
76
|
-
current = _ref.current,
|
|
77
|
-
active = _ref.active,
|
|
78
|
-
type = _ref.type,
|
|
79
|
-
className = _ref.className;
|
|
80
|
-
var intl = reactIntl.useIntl();
|
|
81
|
-
var trackScreenEvent = hooks.useTrackScreenEvent(type);
|
|
82
|
-
var _useScreenSize = contexts.useScreenSize(),
|
|
83
|
-
width = _useScreenSize.width,
|
|
84
|
-
height = _useScreenSize.height,
|
|
85
|
-
resolution = _useScreenSize.resolution;
|
|
86
|
-
var _useViewerContext = contexts.useViewerContext(),
|
|
87
|
-
viewerTopHeight = _useViewerContext.topHeight,
|
|
88
|
-
viewerBottomHeight = _useViewerContext.bottomHeight,
|
|
89
|
-
viewerBottomSidesWidth = _useViewerContext.bottomSidesWidth;
|
|
90
|
-
var _useViewerWebView = contexts.useViewerWebView(),
|
|
91
|
-
openWebView = _useViewerWebView.open;
|
|
92
|
-
var _usePlaybackContext = contexts.usePlaybackContext(),
|
|
93
|
-
muted = _usePlaybackContext.muted;
|
|
94
|
-
var mediaRef = contexts.usePlaybackMediaRef(current);
|
|
95
|
-
var _useDimensionObserver = hooks.useDimensionObserver(),
|
|
96
|
-
imageCntRef = _useDimensionObserver.ref,
|
|
97
|
-
imageHeight = _useDimensionObserver.height;
|
|
98
|
-
var _useScreenRenderConte = contexts.useScreenRenderContext(),
|
|
99
|
-
isView = _useScreenRenderConte.isView,
|
|
100
|
-
isPreview = _useScreenRenderConte.isPreview,
|
|
101
|
-
isPlaceholder = _useScreenRenderConte.isPlaceholder,
|
|
102
|
-
isEdit = _useScreenRenderConte.isEdit,
|
|
103
|
-
isStatic = _useScreenRenderConte.isStatic,
|
|
104
|
-
isCapture = _useScreenRenderConte.isCapture;
|
|
105
|
-
var backgroundPlaying = current && (isView || isEdit);
|
|
106
|
-
var mediaShouldLoad = current || active;
|
|
107
|
-
var ready = true;
|
|
108
|
-
var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
109
|
-
var scrollingDisabled = !isEdit && transitionDisabled || !current;
|
|
110
|
-
var _ref2 = author || {},
|
|
111
|
-
_ref2$name = _ref2.name,
|
|
112
|
-
authorName = _ref2$name === void 0 ? null : _ref2$name,
|
|
113
|
-
_ref2$image = _ref2.image,
|
|
114
|
-
authorImage = _ref2$image === void 0 ? null : _ref2$image,
|
|
115
|
-
authorCollabs = _ref2.collaborator;
|
|
116
|
-
var hasText = utils.isTextFilled(text);
|
|
117
|
-
var hasHeader = utils.isHeaderFilled(header);
|
|
118
|
-
var hasFooter = utils.isFooterFilled(footer);
|
|
119
|
-
var hasTitle = utils.isTextFilled(title);
|
|
120
|
-
var hasSurtitle = utils.isTextFilled(surtitle);
|
|
121
|
-
var hasSimpleAuthor = utils.isTextFilled(author); // legacy
|
|
122
|
-
var hasAuthor = utils.isTextFilled(authorName) || utils.isImageFilled(authorImage) || utils.isTextFilled(authorCollabs);
|
|
123
|
-
var hasImage = utils.isImageFilled(image);
|
|
124
|
-
var hasDate = utils.isTextFilled(date);
|
|
125
|
-
var footerProps = utils.getFooterProps(footer, {
|
|
126
|
-
isView: isView,
|
|
127
|
-
current: current,
|
|
128
|
-
openWebView: openWebView,
|
|
129
|
-
isPreview: isPreview
|
|
130
|
-
});
|
|
131
|
-
var mediaHeight = React.useMemo(function () {
|
|
132
|
-
if (!hasImage) {
|
|
133
|
-
return 0;
|
|
134
|
-
}
|
|
135
|
-
var _ref3 = image || {},
|
|
136
|
-
_ref3$metadata = _ref3.metadata,
|
|
137
|
-
metadata = _ref3$metadata === void 0 ? {} : _ref3$metadata;
|
|
138
|
-
var _ref4 = metadata || {},
|
|
139
|
-
_ref4$width = _ref4.width,
|
|
140
|
-
initialWidth = _ref4$width === void 0 ? 0 : _ref4$width,
|
|
141
|
-
_ref4$height = _ref4.height,
|
|
142
|
-
initialHeight = _ref4$height === void 0 ? 0 : _ref4$height;
|
|
143
|
-
return width * initialHeight / initialWidth;
|
|
144
|
-
}, [image]);
|
|
145
|
-
var partialDate = hasDate ? date.body || null : null;
|
|
146
|
-
var finalDate = React.useMemo(function () {
|
|
147
|
-
return partialDate !== null ? "<p>".concat(intl.formatDate(dayjs(partialDate).toDate(), {
|
|
148
|
-
year: 'numeric',
|
|
149
|
-
month: 'long',
|
|
150
|
-
day: '2-digit'
|
|
151
|
-
}), "</p>") : null;
|
|
152
|
-
}, [partialDate]);
|
|
153
|
-
var imageElement = /*#__PURE__*/React.createElement(components.ScreenElement, {
|
|
154
|
-
placeholder: "image",
|
|
155
|
-
emptyLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
156
|
-
id: "ebsPd4",
|
|
157
|
-
defaultMessage: [{
|
|
158
|
-
"type": 0,
|
|
159
|
-
"value": "Image"
|
|
160
|
-
}]
|
|
161
|
-
}),
|
|
162
|
-
emptyClassName: styles.emptyText,
|
|
163
|
-
isEmpty: !hasImage
|
|
164
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
165
|
-
ref: imageCntRef,
|
|
166
|
-
className: styles.visualContainer
|
|
167
|
-
}, hasImage ? /*#__PURE__*/React.createElement(Visual, {
|
|
168
|
-
media: image
|
|
169
|
-
// width={width - spacing * 2} // in layout flow
|
|
170
|
-
,
|
|
171
|
-
width: width,
|
|
172
|
-
height: mediaHeight,
|
|
173
|
-
resolution: resolution,
|
|
174
|
-
className: styles.visual
|
|
175
|
-
}) : null));
|
|
176
|
-
var titleElement = /*#__PURE__*/React.createElement(components.ScreenElement, {
|
|
177
|
-
key: "title",
|
|
178
|
-
placeholder: "title",
|
|
179
|
-
emptyLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
180
|
-
id: "2ZOPe+",
|
|
181
|
-
defaultMessage: [{
|
|
182
|
-
"type": 0,
|
|
183
|
-
"value": "Title"
|
|
184
|
-
}]
|
|
185
|
-
}),
|
|
186
|
-
emptyClassName: styles.emptyTitle,
|
|
187
|
-
isEmpty: !hasTitle
|
|
188
|
-
}, hasTitle ? /*#__PURE__*/React.createElement(Heading, Object.assign({
|
|
189
|
-
className: styles.title
|
|
190
|
-
}, title)) : null);
|
|
191
|
-
var surtitleElement = /*#__PURE__*/React.createElement(components.ScreenElement, {
|
|
192
|
-
key: "surtitle",
|
|
193
|
-
placeholder: "line",
|
|
194
|
-
emptyLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
195
|
-
id: "vdWMTA",
|
|
196
|
-
defaultMessage: [{
|
|
197
|
-
"type": 0,
|
|
198
|
-
"value": "Surtitle"
|
|
199
|
-
}]
|
|
200
|
-
}),
|
|
201
|
-
emptyClassName: styles.emptySurtitle,
|
|
202
|
-
isEmpty: !hasSurtitle
|
|
203
|
-
}, hasSurtitle ? /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
204
|
-
className: styles.surtitle
|
|
205
|
-
}, surtitle)) : null);
|
|
206
|
-
var dateElement = /*#__PURE__*/React.createElement(components.ScreenElement, {
|
|
207
|
-
key: "date",
|
|
208
|
-
placeholder: "line",
|
|
209
|
-
emptyLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
210
|
-
id: "/MsgWe",
|
|
211
|
-
defaultMessage: [{
|
|
212
|
-
"type": 0,
|
|
213
|
-
"value": "Date"
|
|
214
|
-
}]
|
|
215
|
-
}),
|
|
216
|
-
emptyClassName: styles.emptyDate,
|
|
217
|
-
isEmpty: !hasDate
|
|
218
|
-
}, hasDate ? /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
219
|
-
className: styles.date
|
|
220
|
-
}, date, {
|
|
221
|
-
body: finalDate
|
|
222
|
-
})) : null);
|
|
223
|
-
var authorElement = /*#__PURE__*/React.createElement(components.ScreenElement, {
|
|
224
|
-
key: "author",
|
|
225
|
-
placeholder: "line",
|
|
226
|
-
emptyLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
227
|
-
id: "xYqGzM",
|
|
228
|
-
defaultMessage: [{
|
|
229
|
-
"type": 0,
|
|
230
|
-
"value": "Author"
|
|
231
|
-
}]
|
|
232
|
-
}),
|
|
233
|
-
emptyClassName: styles.emptyAuthor,
|
|
234
|
-
isEmpty: !hasAuthor && !hasSimpleAuthor
|
|
235
|
-
}, hasSimpleAuthor ? /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
236
|
-
className: styles.author
|
|
237
|
-
}, author)) : null, hasAuthor ? /*#__PURE__*/React.createElement(Author, {
|
|
238
|
-
author: author
|
|
239
|
-
}) : null);
|
|
240
|
-
var contentElement = /*#__PURE__*/React.createElement(components.ScreenElement, {
|
|
241
|
-
placeholder: "text",
|
|
242
|
-
emptyLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
243
|
-
id: "z4CiV1",
|
|
244
|
-
defaultMessage: [{
|
|
245
|
-
"type": 0,
|
|
246
|
-
"value": "Text"
|
|
247
|
-
}]
|
|
248
|
-
}),
|
|
249
|
-
emptyClassName: styles.emptyText,
|
|
250
|
-
isEmpty: !hasText
|
|
251
|
-
}, hasText ? /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
252
|
-
className: styles.text
|
|
253
|
-
}, text)) : null);
|
|
254
|
-
var _useState = React.useState(false),
|
|
255
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
256
|
-
scrolledBottom = _useState2[0],
|
|
257
|
-
setScrolledBottom = _useState2[1];
|
|
258
|
-
var onScrolledBottom = React.useCallback(function (_ref5) {
|
|
259
|
-
var initial = _ref5.initial;
|
|
260
|
-
if (initial) {
|
|
261
|
-
trackScreenEvent('scroll', 'Screen');
|
|
262
|
-
}
|
|
263
|
-
setScrolledBottom(true);
|
|
264
|
-
}, [trackScreenEvent]);
|
|
265
|
-
var onScrolledNotBottom = React.useCallback(function () {
|
|
266
|
-
setScrolledBottom(false);
|
|
267
|
-
}, [setScrolledBottom]);
|
|
268
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
269
|
-
className: classNames([styles.container, _defineProperty(_defineProperty({}, className, className !== null), styles.isPlaceholder, isPlaceholder)]),
|
|
270
|
-
"data-screen-ready": ready
|
|
271
|
-
}, /*#__PURE__*/React.createElement(Container, {
|
|
272
|
-
width: width,
|
|
273
|
-
height: height,
|
|
274
|
-
className: styles.content
|
|
275
|
-
}, /*#__PURE__*/React.createElement(Scroll, {
|
|
276
|
-
disabled: scrollingDisabled,
|
|
277
|
-
onScrolledBottom: onScrolledBottom,
|
|
278
|
-
onScrolledNotBottom: onScrolledNotBottom,
|
|
279
|
-
withShadow: true
|
|
280
|
-
}, /*#__PURE__*/React.createElement(Layout, {
|
|
281
|
-
className: styles.layout,
|
|
282
|
-
style: !isPlaceholder ? {
|
|
283
|
-
padding: spacing,
|
|
284
|
-
paddingTop: hasHeader ? spacing / 2 + (!isPreview ? viewerTopHeight : 0) : spacing / 2 + imageHeight,
|
|
285
|
-
paddingBottom: (current && !isPreview ? viewerBottomHeight : 0) + spacing / 2
|
|
286
|
-
} : null
|
|
287
|
-
}, !isPlaceholder && hasHeader ? /*#__PURE__*/React.createElement("div", {
|
|
288
|
-
key: "header",
|
|
289
|
-
style: {
|
|
290
|
-
height: hasImage && imageHeight > 0 ? 0 : 'auto',
|
|
291
|
-
paddingBottom: imageHeight > 0 ? imageHeight - viewerTopHeight : spacing
|
|
292
|
-
}
|
|
293
|
-
}, /*#__PURE__*/React.createElement(Header, header)) : null, /*#__PURE__*/React.createElement("div", {
|
|
294
|
-
className: classNames([styles.main, _defineProperty({}, styles.hasText, hasText && hasAuthor)])
|
|
295
|
-
}, imageElement, /*#__PURE__*/React.createElement("div", {
|
|
296
|
-
className: styles.topContent
|
|
297
|
-
}, surtitleElement, dateElement), titleElement, authorElement), contentElement, !isPlaceholder && hasFooter ? /*#__PURE__*/React.createElement("div", {
|
|
298
|
-
className: classNames([styles.footer, _defineProperty({}, styles.disabled, !scrolledBottom)]),
|
|
299
|
-
style: {
|
|
300
|
-
paddingLeft: Math.max(viewerBottomSidesWidth - spacing, 0),
|
|
301
|
-
paddingRight: Math.max(viewerBottomSidesWidth - spacing, 0),
|
|
302
|
-
paddingTop: spacing
|
|
303
|
-
}
|
|
304
|
-
}, /*#__PURE__*/React.createElement(Footer, footerProps)) : null))), !isPlaceholder ? /*#__PURE__*/React.createElement(Background, {
|
|
305
|
-
background: background,
|
|
306
|
-
width: width,
|
|
307
|
-
height: height,
|
|
308
|
-
resolution: resolution,
|
|
309
|
-
playing: backgroundPlaying,
|
|
310
|
-
muted: muted,
|
|
311
|
-
shouldLoad: mediaShouldLoad,
|
|
312
|
-
mediaRef: mediaRef,
|
|
313
|
-
withoutVideo: isPreview,
|
|
314
|
-
className: styles.background
|
|
315
|
-
}) : null);
|
|
316
|
-
};
|
|
317
|
-
ArticleScreen.propTypes = propTypes;
|
|
318
|
-
ArticleScreen.defaultProps = defaultProps;
|
|
319
|
-
var ArticleScreen$1 = ArticleScreen;
|
|
320
|
-
|
|
321
|
-
// import * as transforms from './transforms/index';
|
|
322
|
-
|
|
323
|
-
var definition = [{
|
|
324
|
-
id: 'article',
|
|
325
|
-
type: 'screen',
|
|
326
|
-
group: {
|
|
327
|
-
label: reactIntl.defineMessage({
|
|
328
|
-
id: "fIawTr",
|
|
329
|
-
defaultMessage: [{
|
|
330
|
-
"type": 0,
|
|
331
|
-
"value": "Text"
|
|
332
|
-
}]
|
|
333
|
-
}),
|
|
334
|
-
order: 2
|
|
335
|
-
},
|
|
336
|
-
title: reactIntl.defineMessage({
|
|
337
|
-
id: "ouMwWq",
|
|
338
|
-
defaultMessage: [{
|
|
339
|
-
"type": 0,
|
|
340
|
-
"value": "Article"
|
|
341
|
-
}]
|
|
342
|
-
}),
|
|
343
|
-
component: ArticleScreen$1,
|
|
344
|
-
layouts: ['normal'],
|
|
345
|
-
// transforms,
|
|
346
|
-
fields: [{
|
|
347
|
-
name: 'image',
|
|
348
|
-
type: 'visual',
|
|
349
|
-
label: reactIntl.defineMessage({
|
|
350
|
-
id: "xsipID",
|
|
351
|
-
defaultMessage: [{
|
|
352
|
-
"type": 0,
|
|
353
|
-
"value": "Image"
|
|
354
|
-
}]
|
|
355
|
-
})
|
|
356
|
-
}, {
|
|
357
|
-
name: 'title',
|
|
358
|
-
type: 'heading-element',
|
|
359
|
-
inline: true,
|
|
360
|
-
theme: {
|
|
361
|
-
textStyle: 'header2'
|
|
362
|
-
},
|
|
363
|
-
label: reactIntl.defineMessage({
|
|
364
|
-
id: "N25iDO",
|
|
365
|
-
defaultMessage: [{
|
|
366
|
-
"type": 0,
|
|
367
|
-
"value": "Title"
|
|
368
|
-
}]
|
|
369
|
-
})
|
|
370
|
-
}, {
|
|
371
|
-
name: 'surtitle',
|
|
372
|
-
type: 'text-element',
|
|
373
|
-
label: reactIntl.defineMessage({
|
|
374
|
-
id: "YD9M2p",
|
|
375
|
-
defaultMessage: [{
|
|
376
|
-
"type": 0,
|
|
377
|
-
"value": "Overtitle"
|
|
378
|
-
}]
|
|
379
|
-
})
|
|
380
|
-
}, {
|
|
381
|
-
name: 'date',
|
|
382
|
-
type: 'date-element',
|
|
383
|
-
label: reactIntl.defineMessage({
|
|
384
|
-
id: "9AP246",
|
|
385
|
-
defaultMessage: [{
|
|
386
|
-
"type": 0,
|
|
387
|
-
"value": "Date"
|
|
388
|
-
}]
|
|
389
|
-
})
|
|
390
|
-
}, {
|
|
391
|
-
name: 'author',
|
|
392
|
-
type: 'author-element',
|
|
393
|
-
label: reactIntl.defineMessage({
|
|
394
|
-
id: "73hxYw",
|
|
395
|
-
defaultMessage: [{
|
|
396
|
-
"type": 0,
|
|
397
|
-
"value": "Author"
|
|
398
|
-
}]
|
|
399
|
-
})
|
|
400
|
-
},
|
|
401
|
-
// {
|
|
402
|
-
// name: 'author',
|
|
403
|
-
// type: 'text-element',
|
|
404
|
-
// label: defineMessage({
|
|
405
|
-
// defaultMessage: 'Author',
|
|
406
|
-
// description: 'Author field label',
|
|
407
|
-
// }),
|
|
408
|
-
// },
|
|
409
|
-
|
|
410
|
-
{
|
|
411
|
-
name: 'text',
|
|
412
|
-
type: 'text-modal',
|
|
413
|
-
label: reactIntl.defineMessage({
|
|
414
|
-
id: "4E2gbX",
|
|
415
|
-
defaultMessage: [{
|
|
416
|
-
"type": 0,
|
|
417
|
-
"value": "Text"
|
|
418
|
-
}]
|
|
419
|
-
})
|
|
420
|
-
}, {
|
|
421
|
-
name: 'background',
|
|
422
|
-
type: 'background',
|
|
423
|
-
label: reactIntl.defineMessage({
|
|
424
|
-
id: "+MPZRu",
|
|
425
|
-
defaultMessage: [{
|
|
426
|
-
"type": 0,
|
|
427
|
-
"value": "Background"
|
|
428
|
-
}]
|
|
429
|
-
})
|
|
430
|
-
}, {
|
|
431
|
-
name: 'header',
|
|
432
|
-
type: 'header',
|
|
433
|
-
label: reactIntl.defineMessage({
|
|
434
|
-
id: "rhuDxI",
|
|
435
|
-
defaultMessage: [{
|
|
436
|
-
"type": 0,
|
|
437
|
-
"value": "Header"
|
|
438
|
-
}]
|
|
439
|
-
}),
|
|
440
|
-
theme: {
|
|
441
|
-
badge: {
|
|
442
|
-
label: {
|
|
443
|
-
textStyle: 'badge'
|
|
444
|
-
},
|
|
445
|
-
boxStyle: 'badge'
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
}, {
|
|
449
|
-
name: 'footer',
|
|
450
|
-
type: 'footer',
|
|
451
|
-
label: reactIntl.defineMessage({
|
|
452
|
-
id: "g4nybp",
|
|
453
|
-
defaultMessage: [{
|
|
454
|
-
"type": 0,
|
|
455
|
-
"value": "Footer"
|
|
456
|
-
}]
|
|
457
|
-
}),
|
|
458
|
-
theme: {
|
|
459
|
-
callToAction: {
|
|
460
|
-
label: {
|
|
461
|
-
textStyle: 'cta'
|
|
462
|
-
},
|
|
463
|
-
boxStyle: 'cta'
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
}]
|
|
467
|
-
}];
|
|
468
|
-
|
|
469
|
-
exports.ArticleScreen = ArticleScreen$1;
|
|
470
|
-
exports.default = definition;
|