@micromag/screen-title 0.3.541 → 0.3.547
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 +8 -12
- package/package.json +12 -13
- package/lib/index.js +0 -755
package/es/index.js
CHANGED
|
@@ -230,15 +230,13 @@ var TitleScreen = function TitleScreen(_ref) {
|
|
|
230
230
|
};
|
|
231
231
|
TitleScreen.propTypes = propTypes$2;
|
|
232
232
|
TitleScreen.defaultProps = defaultProps$2;
|
|
233
|
-
var TitleScreen$1 = TitleScreen;
|
|
234
233
|
|
|
235
234
|
var TitleSubtitleScreen = function TitleSubtitleScreen(_ref) {
|
|
236
235
|
var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
237
|
-
return /*#__PURE__*/React.createElement(TitleScreen
|
|
236
|
+
return /*#__PURE__*/React.createElement(TitleScreen, Object.assign({}, props, {
|
|
238
237
|
withSubtitle: true
|
|
239
238
|
}));
|
|
240
239
|
};
|
|
241
|
-
var TitleSubtitleScreen$1 = TitleSubtitleScreen;
|
|
242
240
|
|
|
243
241
|
var _excluded = ["credits"];
|
|
244
242
|
var propTypes$1 = {
|
|
@@ -250,7 +248,7 @@ var defaultProps$1 = {
|
|
|
250
248
|
var TitleSubtitleCreditsScreen = function TitleSubtitleCreditsScreen(_ref) {
|
|
251
249
|
var credits = _ref.credits,
|
|
252
250
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
253
|
-
return /*#__PURE__*/React.createElement(TitleScreen
|
|
251
|
+
return /*#__PURE__*/React.createElement(TitleScreen, Object.assign({}, props, {
|
|
254
252
|
description: credits,
|
|
255
253
|
withSubtitle: true,
|
|
256
254
|
withDescription: true,
|
|
@@ -265,13 +263,12 @@ var TitleSubtitleCreditsScreen = function TitleSubtitleCreditsScreen(_ref) {
|
|
|
265
263
|
};
|
|
266
264
|
TitleSubtitleCreditsScreen.propTypes = propTypes$1;
|
|
267
265
|
TitleSubtitleCreditsScreen.defaultProps = defaultProps$1;
|
|
268
|
-
var TitleSubtitleCreditsScreen$1 = TitleSubtitleCreditsScreen;
|
|
269
266
|
|
|
270
267
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
271
268
|
var propTypes = {};
|
|
272
269
|
var defaultProps = {};
|
|
273
270
|
var TitleWithBoxScreen = function TitleWithBoxScreen(props) {
|
|
274
|
-
return /*#__PURE__*/React.createElement(TitleScreen
|
|
271
|
+
return /*#__PURE__*/React.createElement(TitleScreen, Object.assign({}, props, {
|
|
275
272
|
withSubtitle: true,
|
|
276
273
|
withDescription: true,
|
|
277
274
|
withBox: true
|
|
@@ -279,7 +276,6 @@ var TitleWithBoxScreen = function TitleWithBoxScreen(props) {
|
|
|
279
276
|
};
|
|
280
277
|
TitleWithBoxScreen.propTypes = propTypes;
|
|
281
278
|
TitleWithBoxScreen.defaultProps = defaultProps;
|
|
282
|
-
var TitleWithBoxScreen$1 = TitleWithBoxScreen;
|
|
283
279
|
|
|
284
280
|
var definition = [{
|
|
285
281
|
id: 'title',
|
|
@@ -301,7 +297,7 @@ var definition = [{
|
|
|
301
297
|
"value": "Title"
|
|
302
298
|
}]
|
|
303
299
|
}),
|
|
304
|
-
component: TitleScreen
|
|
300
|
+
component: TitleScreen,
|
|
305
301
|
layouts: ['top', 'middle', 'bottom'],
|
|
306
302
|
// transforms,
|
|
307
303
|
fields: [{
|
|
@@ -395,7 +391,7 @@ var definition = [{
|
|
|
395
391
|
"value": "Title with subtitle"
|
|
396
392
|
}]
|
|
397
393
|
}),
|
|
398
|
-
component: TitleSubtitleScreen
|
|
394
|
+
component: TitleSubtitleScreen,
|
|
399
395
|
layouts: ['top', 'middle', 'bottom', 'split'],
|
|
400
396
|
// transforms,
|
|
401
397
|
fields: [{
|
|
@@ -502,7 +498,7 @@ var definition = [{
|
|
|
502
498
|
"value": "Title with subtitle and credits"
|
|
503
499
|
}]
|
|
504
500
|
}),
|
|
505
|
-
component: TitleSubtitleCreditsScreen
|
|
501
|
+
component: TitleSubtitleCreditsScreen,
|
|
506
502
|
layouts: ['top', 'middle', 'bottom', 'split-top', 'split-bottom'],
|
|
507
503
|
// transforms,
|
|
508
504
|
fields: [{
|
|
@@ -622,7 +618,7 @@ var definition = [{
|
|
|
622
618
|
"value": "Title with box"
|
|
623
619
|
}]
|
|
624
620
|
}),
|
|
625
|
-
component: TitleWithBoxScreen
|
|
621
|
+
component: TitleWithBoxScreen,
|
|
626
622
|
layouts: ['top', 'middle', 'bottom', 'split-top', 'split-bottom'],
|
|
627
623
|
// transforms,
|
|
628
624
|
fields: [{
|
|
@@ -745,4 +741,4 @@ var definition = [{
|
|
|
745
741
|
}]
|
|
746
742
|
}];
|
|
747
743
|
|
|
748
|
-
export { TitleScreen
|
|
744
|
+
export { TitleScreen, TitleSubtitleCreditsScreen, TitleSubtitleScreen, definition as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-title",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.547",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -30,12 +30,11 @@
|
|
|
30
30
|
}
|
|
31
31
|
],
|
|
32
32
|
"license": "ISC",
|
|
33
|
-
"
|
|
33
|
+
"type": "module",
|
|
34
34
|
"module": "es/index.js",
|
|
35
35
|
"style": "assets/css/styles.css",
|
|
36
36
|
"exports": {
|
|
37
37
|
".": {
|
|
38
|
-
"require": "./lib/index.js",
|
|
39
38
|
"import": "./es/index.js"
|
|
40
39
|
},
|
|
41
40
|
"./assets/css/styles": "./assets/css/styles.css",
|
|
@@ -61,15 +60,15 @@
|
|
|
61
60
|
},
|
|
62
61
|
"dependencies": {
|
|
63
62
|
"@babel/runtime": "^7.13.10",
|
|
64
|
-
"@micromag/core": "^0.3.
|
|
65
|
-
"@micromag/element-background": "^0.3.
|
|
66
|
-
"@micromag/element-container": "^0.3.
|
|
67
|
-
"@micromag/element-footer": "^0.3.
|
|
68
|
-
"@micromag/element-header": "^0.3.
|
|
69
|
-
"@micromag/element-heading": "^0.3.
|
|
70
|
-
"@micromag/element-layout": "^0.3.
|
|
71
|
-
"@micromag/element-text": "^0.3.
|
|
72
|
-
"@micromag/transforms": "^0.3.
|
|
63
|
+
"@micromag/core": "^0.3.547",
|
|
64
|
+
"@micromag/element-background": "^0.3.547",
|
|
65
|
+
"@micromag/element-container": "^0.3.547",
|
|
66
|
+
"@micromag/element-footer": "^0.3.547",
|
|
67
|
+
"@micromag/element-header": "^0.3.547",
|
|
68
|
+
"@micromag/element-heading": "^0.3.547",
|
|
69
|
+
"@micromag/element-layout": "^0.3.547",
|
|
70
|
+
"@micromag/element-text": "^0.3.547",
|
|
71
|
+
"@micromag/transforms": "^0.3.547",
|
|
73
72
|
"classnames": "^2.2.6",
|
|
74
73
|
"lodash": "^4.17.21",
|
|
75
74
|
"prop-types": "^15.7.2",
|
|
@@ -80,5 +79,5 @@
|
|
|
80
79
|
"access": "public",
|
|
81
80
|
"registry": "https://registry.npmjs.org/"
|
|
82
81
|
},
|
|
83
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "3c2f5904ce61fcfa61f673c38c2a5ec56e9e2b07"
|
|
84
83
|
}
|
package/lib/index.js
DELETED
|
@@ -1,755 +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 classNames = require('classnames');
|
|
8
|
-
var PropTypes = require('prop-types');
|
|
9
|
-
var React = require('react');
|
|
10
|
-
var core = require('@micromag/core');
|
|
11
|
-
var components = require('@micromag/core/components');
|
|
12
|
-
var contexts = require('@micromag/core/contexts');
|
|
13
|
-
var utils = require('@micromag/core/utils');
|
|
14
|
-
var Background = require('@micromag/element-background');
|
|
15
|
-
var Container = require('@micromag/element-container');
|
|
16
|
-
var Footer = require('@micromag/element-footer');
|
|
17
|
-
var Header = require('@micromag/element-header');
|
|
18
|
-
var Heading = require('@micromag/element-heading');
|
|
19
|
-
var Layout = require('@micromag/element-layout');
|
|
20
|
-
var Text = require('@micromag/element-text');
|
|
21
|
-
var _objectDestructuringEmpty = require('@babel/runtime/helpers/objectDestructuringEmpty');
|
|
22
|
-
var _extends = require('@babel/runtime/helpers/extends');
|
|
23
|
-
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
24
|
-
|
|
25
|
-
var styles = {"container":"micromag-screen-title-container","background":"micromag-screen-title-background","disabled":"micromag-screen-title-disabled","hidden":"micromag-screen-title-hidden","placeholder":"micromag-screen-title-placeholder","content":"micromag-screen-title-content","emptyTitle":"micromag-screen-title-emptyTitle","emptySubtitle":"micromag-screen-title-emptySubtitle","emptyDescription":"micromag-screen-title-emptyDescription","title":"micromag-screen-title-title","withMargin":"micromag-screen-title-withMargin","subtitle":"micromag-screen-title-subtitle","box":"micromag-screen-title-box","isPlaceholder":"micromag-screen-title-isPlaceholder","layout":"micromag-screen-title-layout"};
|
|
26
|
-
|
|
27
|
-
var propTypes$2 = {
|
|
28
|
-
layout: PropTypes.oneOf(['top', 'middle', 'bottom', 'split', 'split-top', 'split-bottom']),
|
|
29
|
-
title: core.PropTypes.headingElement,
|
|
30
|
-
subtitle: core.PropTypes.headingElement,
|
|
31
|
-
description: core.PropTypes.textElement,
|
|
32
|
-
boxStyle: core.PropTypes.boxStyle,
|
|
33
|
-
withSubtitle: PropTypes.bool,
|
|
34
|
-
withDescription: PropTypes.bool,
|
|
35
|
-
withBox: PropTypes.bool,
|
|
36
|
-
spacing: PropTypes.number,
|
|
37
|
-
descriptionEmptyLabel: core.PropTypes.label,
|
|
38
|
-
header: core.PropTypes.header,
|
|
39
|
-
footer: core.PropTypes.footer,
|
|
40
|
-
background: core.PropTypes.backgroundElement,
|
|
41
|
-
current: PropTypes.bool,
|
|
42
|
-
active: PropTypes.bool,
|
|
43
|
-
transitionStagger: PropTypes.number,
|
|
44
|
-
className: PropTypes.string
|
|
45
|
-
};
|
|
46
|
-
var defaultProps$2 = {
|
|
47
|
-
layout: 'top',
|
|
48
|
-
title: null,
|
|
49
|
-
subtitle: null,
|
|
50
|
-
description: null,
|
|
51
|
-
boxStyle: null,
|
|
52
|
-
withSubtitle: false,
|
|
53
|
-
withDescription: false,
|
|
54
|
-
withBox: false,
|
|
55
|
-
spacing: 20,
|
|
56
|
-
descriptionEmptyLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
57
|
-
id: "507VAi",
|
|
58
|
-
defaultMessage: [{
|
|
59
|
-
"type": 0,
|
|
60
|
-
"value": "Description"
|
|
61
|
-
}]
|
|
62
|
-
}),
|
|
63
|
-
header: null,
|
|
64
|
-
footer: null,
|
|
65
|
-
background: null,
|
|
66
|
-
current: true,
|
|
67
|
-
active: true,
|
|
68
|
-
transitionStagger: 100,
|
|
69
|
-
className: null
|
|
70
|
-
};
|
|
71
|
-
var TitleScreen = function TitleScreen(_ref) {
|
|
72
|
-
var layout = _ref.layout,
|
|
73
|
-
title = _ref.title,
|
|
74
|
-
subtitle = _ref.subtitle,
|
|
75
|
-
description = _ref.description,
|
|
76
|
-
boxStyle = _ref.boxStyle,
|
|
77
|
-
withSubtitle = _ref.withSubtitle,
|
|
78
|
-
withDescription = _ref.withDescription,
|
|
79
|
-
withBox = _ref.withBox,
|
|
80
|
-
spacing = _ref.spacing,
|
|
81
|
-
descriptionEmptyLabel = _ref.descriptionEmptyLabel,
|
|
82
|
-
header = _ref.header,
|
|
83
|
-
footer = _ref.footer,
|
|
84
|
-
background = _ref.background,
|
|
85
|
-
current = _ref.current,
|
|
86
|
-
active = _ref.active,
|
|
87
|
-
className = _ref.className;
|
|
88
|
-
var _useScreenSize = contexts.useScreenSize(),
|
|
89
|
-
width = _useScreenSize.width,
|
|
90
|
-
height = _useScreenSize.height,
|
|
91
|
-
resolution = _useScreenSize.resolution;
|
|
92
|
-
var _useScreenRenderConte = contexts.useScreenRenderContext(),
|
|
93
|
-
isView = _useScreenRenderConte.isView,
|
|
94
|
-
isPreview = _useScreenRenderConte.isPreview,
|
|
95
|
-
isPlaceholder = _useScreenRenderConte.isPlaceholder,
|
|
96
|
-
isEdit = _useScreenRenderConte.isEdit;
|
|
97
|
-
var _useViewerContext = contexts.useViewerContext(),
|
|
98
|
-
viewerTopHeight = _useViewerContext.topHeight,
|
|
99
|
-
viewerBottomHeight = _useViewerContext.bottomHeight,
|
|
100
|
-
viewerBottomSidesWidth = _useViewerContext.bottomSidesWidth;
|
|
101
|
-
var _useViewerWebView = contexts.useViewerWebView(),
|
|
102
|
-
openWebView = _useViewerWebView.open;
|
|
103
|
-
var _usePlaybackContext = contexts.usePlaybackContext(),
|
|
104
|
-
muted = _usePlaybackContext.muted;
|
|
105
|
-
var mediaRef = contexts.usePlaybackMediaRef(current);
|
|
106
|
-
var hasTitle = utils.isTextFilled(title);
|
|
107
|
-
var hasSubtitle = utils.isTextFilled(subtitle);
|
|
108
|
-
var hasDescription = utils.isTextFilled(description);
|
|
109
|
-
var layoutParts = layout.split('-');
|
|
110
|
-
var isSplitted = layoutParts[0] === 'split';
|
|
111
|
-
var isTopLayout = layout === 'top';
|
|
112
|
-
var isMiddleLayout = layout === 'middle';
|
|
113
|
-
var isBottomLayout = layout === 'bottom';
|
|
114
|
-
var verticalAlign = isSplitted ? layoutParts[1] || null : layoutParts[0];
|
|
115
|
-
var titleWithMargin = hasTitle && (hasSubtitle || hasDescription) && (!isSplitted || verticalAlign === 'top');
|
|
116
|
-
var subtitleWithMargin = hasSubtitle && hasDescription && (!isSplitted || verticalAlign === 'bottom');
|
|
117
|
-
var backgroundPlaying = current && (isView || isEdit);
|
|
118
|
-
var backgroundShouldLoad = current || active;
|
|
119
|
-
var hasHeader = utils.isHeaderFilled(header);
|
|
120
|
-
var hasFooter = utils.isFooterFilled(footer);
|
|
121
|
-
var footerProps = utils.getFooterProps(footer, {
|
|
122
|
-
isView: isView,
|
|
123
|
-
current: current,
|
|
124
|
-
openWebView: openWebView,
|
|
125
|
-
isPreview: isPreview
|
|
126
|
-
});
|
|
127
|
-
var titleElement = /*#__PURE__*/React.createElement(components.ScreenElement, {
|
|
128
|
-
key: "title",
|
|
129
|
-
placeholder: "title",
|
|
130
|
-
emptyLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
131
|
-
id: "2ZOPe+",
|
|
132
|
-
defaultMessage: [{
|
|
133
|
-
"type": 0,
|
|
134
|
-
"value": "Title"
|
|
135
|
-
}]
|
|
136
|
-
}),
|
|
137
|
-
emptyClassName: styles.emptyTitle,
|
|
138
|
-
isEmpty: !hasTitle
|
|
139
|
-
}, hasTitle ? /*#__PURE__*/React.createElement(Heading, Object.assign({
|
|
140
|
-
className: classNames([styles.title, _defineProperty({}, styles.withMargin, titleWithMargin)])
|
|
141
|
-
}, title, {
|
|
142
|
-
size: 1
|
|
143
|
-
})) : null);
|
|
144
|
-
var subtitleElement = withSubtitle ? /*#__PURE__*/React.createElement(components.ScreenElement, {
|
|
145
|
-
key: "subtitle",
|
|
146
|
-
placeholder: "subtitle",
|
|
147
|
-
emptyLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
148
|
-
id: "d60tSn",
|
|
149
|
-
defaultMessage: [{
|
|
150
|
-
"type": 0,
|
|
151
|
-
"value": "Subtitle"
|
|
152
|
-
}]
|
|
153
|
-
}),
|
|
154
|
-
emptyClassName: styles.emptySubtitle,
|
|
155
|
-
isEmpty: !hasSubtitle
|
|
156
|
-
}, hasSubtitle ? /*#__PURE__*/React.createElement(Heading, Object.assign({
|
|
157
|
-
className: classNames([styles.subtitle, _defineProperty({}, styles.withMargin, subtitleWithMargin)])
|
|
158
|
-
}, subtitle, {
|
|
159
|
-
size: 2
|
|
160
|
-
})) : null) : null;
|
|
161
|
-
var descriptionElement = withDescription ? /*#__PURE__*/React.createElement(components.ScreenElement, {
|
|
162
|
-
key: "description",
|
|
163
|
-
placeholder: "shortText",
|
|
164
|
-
emptyLabel: descriptionEmptyLabel,
|
|
165
|
-
emptyClassName: styles.emptyDescription,
|
|
166
|
-
isEmpty: !hasDescription
|
|
167
|
-
}, hasDescription ? /*#__PURE__*/React.createElement(Text, description) : null) : null;
|
|
168
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
169
|
-
className: classNames([styles.container, _defineProperty(_defineProperty({}, className, className !== null), styles.isPlaceholder, isPlaceholder)]),
|
|
170
|
-
"data-screen-ready": true
|
|
171
|
-
}, /*#__PURE__*/React.createElement(Container, {
|
|
172
|
-
width: width,
|
|
173
|
-
height: height,
|
|
174
|
-
className: styles.content
|
|
175
|
-
}, /*#__PURE__*/React.createElement(Layout, {
|
|
176
|
-
className: styles.layout,
|
|
177
|
-
fullscreen: true,
|
|
178
|
-
verticalAlign: verticalAlign,
|
|
179
|
-
style: !isPlaceholder ? {
|
|
180
|
-
padding: spacing,
|
|
181
|
-
paddingTop: (!isPreview ? viewerTopHeight : 0) + (hasHeader ? spacing / 2 : spacing),
|
|
182
|
-
paddingBottom: (current && !isPreview ? viewerBottomHeight : 0) + (hasFooter ? spacing / 2 : spacing)
|
|
183
|
-
} : null
|
|
184
|
-
}, !isPlaceholder && hasHeader ? /*#__PURE__*/React.createElement("div", {
|
|
185
|
-
style: {
|
|
186
|
-
paddingBottom: spacing
|
|
187
|
-
}
|
|
188
|
-
}, /*#__PURE__*/React.createElement(Header, header)) : null, !isPlaceholder && hasFooter && isMiddleLayout ? /*#__PURE__*/React.createElement(Layout.Spacer, {
|
|
189
|
-
key: "spacer-cta-top"
|
|
190
|
-
}) : null, !isPlaceholder && hasHeader && isBottomLayout ? /*#__PURE__*/React.createElement(Layout.Spacer, {
|
|
191
|
-
key: "spacer-cta-top"
|
|
192
|
-
}) : null, !isPlaceholder && hasHeader && !hasFooter && isMiddleLayout ? /*#__PURE__*/React.createElement(Layout.Spacer, {
|
|
193
|
-
key: "spacer-cta-top"
|
|
194
|
-
}) : null, withBox && !isSplitted ? /*#__PURE__*/React.createElement("div", {
|
|
195
|
-
className: styles.box,
|
|
196
|
-
style: isEdit || isPlaceholder || hasTitle || hasSubtitle || hasDescription ? utils.getStyleFromBox(boxStyle) : null
|
|
197
|
-
}, [titleElement, subtitleElement, descriptionElement]) : null, withBox && isSplitted ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
198
|
-
className: styles.box,
|
|
199
|
-
key: "top",
|
|
200
|
-
style: isEdit || isPlaceholder || hasTitle || withDescription && verticalAlign === 'top' && hasSubtitle ? utils.getStyleFromBox(boxStyle) : null
|
|
201
|
-
}, titleElement, withDescription && verticalAlign === 'top' ? subtitleElement : null), /*#__PURE__*/React.createElement(Layout.Spacer, {
|
|
202
|
-
key: "spacer1"
|
|
203
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
204
|
-
className: styles.box,
|
|
205
|
-
key: "bottom",
|
|
206
|
-
style: isEdit || isPlaceholder || hasDescription || (!withDescription || verticalAlign === 'bottom') && hasSubtitle ? utils.getStyleFromBox(boxStyle) : null
|
|
207
|
-
}, !withDescription || verticalAlign === 'bottom' ? subtitleElement : null, descriptionElement)) : null, !withBox ? /*#__PURE__*/React.createElement(React.Fragment, null, titleElement, isSplitted && (!withDescription || verticalAlign === 'bottom') && /*#__PURE__*/React.createElement(Layout.Spacer, {
|
|
208
|
-
key: "spacer1"
|
|
209
|
-
}), subtitleElement, isSplitted && withDescription && verticalAlign === 'top' && /*#__PURE__*/React.createElement(Layout.Spacer, {
|
|
210
|
-
key: "spacer2"
|
|
211
|
-
}), descriptionElement) : null, !isPlaceholder && hasFooter && (isTopLayout || isMiddleLayout) ? /*#__PURE__*/React.createElement(Layout.Spacer, {
|
|
212
|
-
key: "spacer-cta-bottom"
|
|
213
|
-
}) : null, !isPlaceholder && hasHeader && !hasFooter && isMiddleLayout ? /*#__PURE__*/React.createElement(Layout.Spacer, {
|
|
214
|
-
key: "spacer-cta-bottom"
|
|
215
|
-
}) : null, !isPlaceholder && hasFooter ? /*#__PURE__*/React.createElement("div", {
|
|
216
|
-
key: "call-to-action",
|
|
217
|
-
style: {
|
|
218
|
-
paddingTop: spacing,
|
|
219
|
-
paddingLeft: Math.max(0, viewerBottomSidesWidth - spacing),
|
|
220
|
-
paddingRight: Math.max(0, viewerBottomSidesWidth - spacing)
|
|
221
|
-
}
|
|
222
|
-
}, /*#__PURE__*/React.createElement(Footer, footerProps)) : null)), !isPlaceholder ? /*#__PURE__*/React.createElement(Background, {
|
|
223
|
-
background: background,
|
|
224
|
-
width: width,
|
|
225
|
-
height: height,
|
|
226
|
-
resolution: resolution,
|
|
227
|
-
playing: backgroundPlaying,
|
|
228
|
-
muted: muted,
|
|
229
|
-
shouldLoad: backgroundShouldLoad,
|
|
230
|
-
mediaRef: mediaRef,
|
|
231
|
-
withoutVideo: isPreview,
|
|
232
|
-
className: styles.background
|
|
233
|
-
}) : null);
|
|
234
|
-
};
|
|
235
|
-
TitleScreen.propTypes = propTypes$2;
|
|
236
|
-
TitleScreen.defaultProps = defaultProps$2;
|
|
237
|
-
var TitleScreen$1 = TitleScreen;
|
|
238
|
-
|
|
239
|
-
var TitleSubtitleScreen = function TitleSubtitleScreen(_ref) {
|
|
240
|
-
var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
241
|
-
return /*#__PURE__*/React.createElement(TitleScreen$1, Object.assign({}, props, {
|
|
242
|
-
withSubtitle: true
|
|
243
|
-
}));
|
|
244
|
-
};
|
|
245
|
-
var TitleSubtitleScreen$1 = TitleSubtitleScreen;
|
|
246
|
-
|
|
247
|
-
var _excluded = ["credits"];
|
|
248
|
-
var propTypes$1 = {
|
|
249
|
-
credits: core.PropTypes.textElement
|
|
250
|
-
};
|
|
251
|
-
var defaultProps$1 = {
|
|
252
|
-
credits: null
|
|
253
|
-
};
|
|
254
|
-
var TitleSubtitleCreditsScreen = function TitleSubtitleCreditsScreen(_ref) {
|
|
255
|
-
var credits = _ref.credits,
|
|
256
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
257
|
-
return /*#__PURE__*/React.createElement(TitleScreen$1, Object.assign({}, props, {
|
|
258
|
-
description: credits,
|
|
259
|
-
withSubtitle: true,
|
|
260
|
-
withDescription: true,
|
|
261
|
-
descriptionEmptyLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
262
|
-
id: "/hupzO",
|
|
263
|
-
defaultMessage: [{
|
|
264
|
-
"type": 0,
|
|
265
|
-
"value": "Credits"
|
|
266
|
-
}]
|
|
267
|
-
})
|
|
268
|
-
}));
|
|
269
|
-
};
|
|
270
|
-
TitleSubtitleCreditsScreen.propTypes = propTypes$1;
|
|
271
|
-
TitleSubtitleCreditsScreen.defaultProps = defaultProps$1;
|
|
272
|
-
var TitleSubtitleCreditsScreen$1 = TitleSubtitleCreditsScreen;
|
|
273
|
-
|
|
274
|
-
/* eslint-disable react/jsx-props-no-spreading */
|
|
275
|
-
var propTypes = {};
|
|
276
|
-
var defaultProps = {};
|
|
277
|
-
var TitleWithBoxScreen = function TitleWithBoxScreen(props) {
|
|
278
|
-
return /*#__PURE__*/React.createElement(TitleScreen$1, Object.assign({}, props, {
|
|
279
|
-
withSubtitle: true,
|
|
280
|
-
withDescription: true,
|
|
281
|
-
withBox: true
|
|
282
|
-
}));
|
|
283
|
-
};
|
|
284
|
-
TitleWithBoxScreen.propTypes = propTypes;
|
|
285
|
-
TitleWithBoxScreen.defaultProps = defaultProps;
|
|
286
|
-
var TitleWithBoxScreen$1 = TitleWithBoxScreen;
|
|
287
|
-
|
|
288
|
-
var definition = [{
|
|
289
|
-
id: 'title',
|
|
290
|
-
type: 'screen',
|
|
291
|
-
group: {
|
|
292
|
-
label: reactIntl.defineMessage({
|
|
293
|
-
id: "uKJRh2",
|
|
294
|
-
defaultMessage: [{
|
|
295
|
-
"type": 0,
|
|
296
|
-
"value": "Title"
|
|
297
|
-
}]
|
|
298
|
-
}),
|
|
299
|
-
order: 1
|
|
300
|
-
},
|
|
301
|
-
title: reactIntl.defineMessage({
|
|
302
|
-
id: "dVcog7",
|
|
303
|
-
defaultMessage: [{
|
|
304
|
-
"type": 0,
|
|
305
|
-
"value": "Title"
|
|
306
|
-
}]
|
|
307
|
-
}),
|
|
308
|
-
component: TitleScreen$1,
|
|
309
|
-
layouts: ['top', 'middle', 'bottom'],
|
|
310
|
-
// transforms,
|
|
311
|
-
fields: [{
|
|
312
|
-
name: 'layout',
|
|
313
|
-
type: 'screen-layout',
|
|
314
|
-
defaultValue: 'top',
|
|
315
|
-
label: reactIntl.defineMessage({
|
|
316
|
-
id: "4iBXj2",
|
|
317
|
-
defaultMessage: [{
|
|
318
|
-
"type": 0,
|
|
319
|
-
"value": "Layout"
|
|
320
|
-
}]
|
|
321
|
-
})
|
|
322
|
-
}, {
|
|
323
|
-
name: 'title',
|
|
324
|
-
type: 'heading-element',
|
|
325
|
-
theme: {
|
|
326
|
-
textStyle: 'heading1'
|
|
327
|
-
},
|
|
328
|
-
label: reactIntl.defineMessage({
|
|
329
|
-
id: "N25iDO",
|
|
330
|
-
defaultMessage: [{
|
|
331
|
-
"type": 0,
|
|
332
|
-
"value": "Title"
|
|
333
|
-
}]
|
|
334
|
-
})
|
|
335
|
-
}, {
|
|
336
|
-
name: 'background',
|
|
337
|
-
type: 'background',
|
|
338
|
-
label: reactIntl.defineMessage({
|
|
339
|
-
id: "+MPZRu",
|
|
340
|
-
defaultMessage: [{
|
|
341
|
-
"type": 0,
|
|
342
|
-
"value": "Background"
|
|
343
|
-
}]
|
|
344
|
-
})
|
|
345
|
-
}, {
|
|
346
|
-
name: 'header',
|
|
347
|
-
type: 'header',
|
|
348
|
-
label: reactIntl.defineMessage({
|
|
349
|
-
id: "rhuDxI",
|
|
350
|
-
defaultMessage: [{
|
|
351
|
-
"type": 0,
|
|
352
|
-
"value": "Header"
|
|
353
|
-
}]
|
|
354
|
-
}),
|
|
355
|
-
theme: {
|
|
356
|
-
badge: {
|
|
357
|
-
label: {
|
|
358
|
-
textStyle: 'badge'
|
|
359
|
-
},
|
|
360
|
-
boxStyle: 'badge'
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
}, {
|
|
364
|
-
name: 'footer',
|
|
365
|
-
type: 'footer',
|
|
366
|
-
label: reactIntl.defineMessage({
|
|
367
|
-
id: "g4nybp",
|
|
368
|
-
defaultMessage: [{
|
|
369
|
-
"type": 0,
|
|
370
|
-
"value": "Footer"
|
|
371
|
-
}]
|
|
372
|
-
}),
|
|
373
|
-
theme: {
|
|
374
|
-
callToAction: {
|
|
375
|
-
label: {
|
|
376
|
-
textStyle: 'cta'
|
|
377
|
-
},
|
|
378
|
-
boxStyle: 'cta'
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
}]
|
|
382
|
-
}, {
|
|
383
|
-
id: 'title-subtitle',
|
|
384
|
-
type: 'screen',
|
|
385
|
-
group: {
|
|
386
|
-
label: reactIntl.defineMessage({
|
|
387
|
-
id: "uKJRh2",
|
|
388
|
-
defaultMessage: [{
|
|
389
|
-
"type": 0,
|
|
390
|
-
"value": "Title"
|
|
391
|
-
}]
|
|
392
|
-
}),
|
|
393
|
-
order: 1
|
|
394
|
-
},
|
|
395
|
-
title: reactIntl.defineMessage({
|
|
396
|
-
id: "P1dwGU",
|
|
397
|
-
defaultMessage: [{
|
|
398
|
-
"type": 0,
|
|
399
|
-
"value": "Title with subtitle"
|
|
400
|
-
}]
|
|
401
|
-
}),
|
|
402
|
-
component: TitleSubtitleScreen$1,
|
|
403
|
-
layouts: ['top', 'middle', 'bottom', 'split'],
|
|
404
|
-
// transforms,
|
|
405
|
-
fields: [{
|
|
406
|
-
name: 'layout',
|
|
407
|
-
type: 'screen-layout',
|
|
408
|
-
defaultValue: 'top',
|
|
409
|
-
label: reactIntl.defineMessage({
|
|
410
|
-
id: "4iBXj2",
|
|
411
|
-
defaultMessage: [{
|
|
412
|
-
"type": 0,
|
|
413
|
-
"value": "Layout"
|
|
414
|
-
}]
|
|
415
|
-
})
|
|
416
|
-
}, {
|
|
417
|
-
name: 'title',
|
|
418
|
-
type: 'heading-element',
|
|
419
|
-
theme: {
|
|
420
|
-
textStyle: 'heading1'
|
|
421
|
-
},
|
|
422
|
-
label: reactIntl.defineMessage({
|
|
423
|
-
id: "N25iDO",
|
|
424
|
-
defaultMessage: [{
|
|
425
|
-
"type": 0,
|
|
426
|
-
"value": "Title"
|
|
427
|
-
}]
|
|
428
|
-
})
|
|
429
|
-
}, {
|
|
430
|
-
name: 'subtitle',
|
|
431
|
-
type: 'heading-element',
|
|
432
|
-
theme: {
|
|
433
|
-
textStyle: 'heading2'
|
|
434
|
-
},
|
|
435
|
-
label: reactIntl.defineMessage({
|
|
436
|
-
id: "EcZYpr",
|
|
437
|
-
defaultMessage: [{
|
|
438
|
-
"type": 0,
|
|
439
|
-
"value": "Subtitle"
|
|
440
|
-
}]
|
|
441
|
-
})
|
|
442
|
-
}, {
|
|
443
|
-
name: 'background',
|
|
444
|
-
type: 'background',
|
|
445
|
-
label: reactIntl.defineMessage({
|
|
446
|
-
id: "+MPZRu",
|
|
447
|
-
defaultMessage: [{
|
|
448
|
-
"type": 0,
|
|
449
|
-
"value": "Background"
|
|
450
|
-
}]
|
|
451
|
-
})
|
|
452
|
-
}, {
|
|
453
|
-
name: 'header',
|
|
454
|
-
type: 'header',
|
|
455
|
-
label: reactIntl.defineMessage({
|
|
456
|
-
id: "rhuDxI",
|
|
457
|
-
defaultMessage: [{
|
|
458
|
-
"type": 0,
|
|
459
|
-
"value": "Header"
|
|
460
|
-
}]
|
|
461
|
-
}),
|
|
462
|
-
theme: {
|
|
463
|
-
badge: {
|
|
464
|
-
label: {
|
|
465
|
-
textStyle: 'badge'
|
|
466
|
-
},
|
|
467
|
-
boxStyle: 'badge'
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
}, {
|
|
471
|
-
name: 'footer',
|
|
472
|
-
type: 'footer',
|
|
473
|
-
label: reactIntl.defineMessage({
|
|
474
|
-
id: "g4nybp",
|
|
475
|
-
defaultMessage: [{
|
|
476
|
-
"type": 0,
|
|
477
|
-
"value": "Footer"
|
|
478
|
-
}]
|
|
479
|
-
}),
|
|
480
|
-
theme: {
|
|
481
|
-
callToAction: {
|
|
482
|
-
label: {
|
|
483
|
-
textStyle: 'cta'
|
|
484
|
-
},
|
|
485
|
-
boxStyle: 'cta'
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
}]
|
|
489
|
-
}, {
|
|
490
|
-
id: 'title-subtitle-credits',
|
|
491
|
-
type: 'screen',
|
|
492
|
-
group: {
|
|
493
|
-
label: reactIntl.defineMessage({
|
|
494
|
-
id: "uKJRh2",
|
|
495
|
-
defaultMessage: [{
|
|
496
|
-
"type": 0,
|
|
497
|
-
"value": "Title"
|
|
498
|
-
}]
|
|
499
|
-
}),
|
|
500
|
-
order: 1
|
|
501
|
-
},
|
|
502
|
-
title: reactIntl.defineMessage({
|
|
503
|
-
id: "vZrFq6",
|
|
504
|
-
defaultMessage: [{
|
|
505
|
-
"type": 0,
|
|
506
|
-
"value": "Title with subtitle and credits"
|
|
507
|
-
}]
|
|
508
|
-
}),
|
|
509
|
-
component: TitleSubtitleCreditsScreen$1,
|
|
510
|
-
layouts: ['top', 'middle', 'bottom', 'split-top', 'split-bottom'],
|
|
511
|
-
// transforms,
|
|
512
|
-
fields: [{
|
|
513
|
-
name: 'layout',
|
|
514
|
-
type: 'screen-layout',
|
|
515
|
-
defaultValue: 'top',
|
|
516
|
-
label: reactIntl.defineMessage({
|
|
517
|
-
id: "4iBXj2",
|
|
518
|
-
defaultMessage: [{
|
|
519
|
-
"type": 0,
|
|
520
|
-
"value": "Layout"
|
|
521
|
-
}]
|
|
522
|
-
})
|
|
523
|
-
}, {
|
|
524
|
-
name: 'title',
|
|
525
|
-
type: 'heading-element',
|
|
526
|
-
theme: {
|
|
527
|
-
textStyle: 'heading1'
|
|
528
|
-
},
|
|
529
|
-
label: reactIntl.defineMessage({
|
|
530
|
-
id: "N25iDO",
|
|
531
|
-
defaultMessage: [{
|
|
532
|
-
"type": 0,
|
|
533
|
-
"value": "Title"
|
|
534
|
-
}]
|
|
535
|
-
})
|
|
536
|
-
}, {
|
|
537
|
-
name: 'subtitle',
|
|
538
|
-
type: 'heading-element',
|
|
539
|
-
theme: {
|
|
540
|
-
textStyle: 'heading2'
|
|
541
|
-
},
|
|
542
|
-
label: reactIntl.defineMessage({
|
|
543
|
-
id: "EcZYpr",
|
|
544
|
-
defaultMessage: [{
|
|
545
|
-
"type": 0,
|
|
546
|
-
"value": "Subtitle"
|
|
547
|
-
}]
|
|
548
|
-
})
|
|
549
|
-
}, {
|
|
550
|
-
name: 'credits',
|
|
551
|
-
type: 'text-element',
|
|
552
|
-
theme: {
|
|
553
|
-
textStyle: 'text'
|
|
554
|
-
},
|
|
555
|
-
label: reactIntl.defineMessage({
|
|
556
|
-
id: "upzOTm",
|
|
557
|
-
defaultMessage: [{
|
|
558
|
-
"type": 0,
|
|
559
|
-
"value": "Credits"
|
|
560
|
-
}]
|
|
561
|
-
})
|
|
562
|
-
}, {
|
|
563
|
-
name: 'background',
|
|
564
|
-
type: 'background',
|
|
565
|
-
label: reactIntl.defineMessage({
|
|
566
|
-
id: "+MPZRu",
|
|
567
|
-
defaultMessage: [{
|
|
568
|
-
"type": 0,
|
|
569
|
-
"value": "Background"
|
|
570
|
-
}]
|
|
571
|
-
})
|
|
572
|
-
}, {
|
|
573
|
-
name: 'header',
|
|
574
|
-
type: 'header',
|
|
575
|
-
label: reactIntl.defineMessage({
|
|
576
|
-
id: "rhuDxI",
|
|
577
|
-
defaultMessage: [{
|
|
578
|
-
"type": 0,
|
|
579
|
-
"value": "Header"
|
|
580
|
-
}]
|
|
581
|
-
}),
|
|
582
|
-
theme: {
|
|
583
|
-
badge: {
|
|
584
|
-
label: {
|
|
585
|
-
textStyle: 'badge'
|
|
586
|
-
},
|
|
587
|
-
boxStyle: 'badge'
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
}, {
|
|
591
|
-
name: 'footer',
|
|
592
|
-
type: 'footer',
|
|
593
|
-
label: reactIntl.defineMessage({
|
|
594
|
-
id: "g4nybp",
|
|
595
|
-
defaultMessage: [{
|
|
596
|
-
"type": 0,
|
|
597
|
-
"value": "Footer"
|
|
598
|
-
}]
|
|
599
|
-
}),
|
|
600
|
-
theme: {
|
|
601
|
-
callToAction: {
|
|
602
|
-
label: {
|
|
603
|
-
textStyle: 'cta'
|
|
604
|
-
},
|
|
605
|
-
boxStyle: 'cta'
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
}]
|
|
609
|
-
}, {
|
|
610
|
-
id: 'title-with-box',
|
|
611
|
-
type: 'screen',
|
|
612
|
-
group: {
|
|
613
|
-
label: reactIntl.defineMessage({
|
|
614
|
-
id: "uKJRh2",
|
|
615
|
-
defaultMessage: [{
|
|
616
|
-
"type": 0,
|
|
617
|
-
"value": "Title"
|
|
618
|
-
}]
|
|
619
|
-
}),
|
|
620
|
-
order: 1
|
|
621
|
-
},
|
|
622
|
-
title: reactIntl.defineMessage({
|
|
623
|
-
id: "9a5s+m",
|
|
624
|
-
defaultMessage: [{
|
|
625
|
-
"type": 0,
|
|
626
|
-
"value": "Title with box"
|
|
627
|
-
}]
|
|
628
|
-
}),
|
|
629
|
-
component: TitleWithBoxScreen$1,
|
|
630
|
-
layouts: ['top', 'middle', 'bottom', 'split-top', 'split-bottom'],
|
|
631
|
-
// transforms,
|
|
632
|
-
fields: [{
|
|
633
|
-
name: 'layout',
|
|
634
|
-
type: 'screen-layout',
|
|
635
|
-
defaultValue: 'top',
|
|
636
|
-
label: reactIntl.defineMessage({
|
|
637
|
-
id: "4iBXj2",
|
|
638
|
-
defaultMessage: [{
|
|
639
|
-
"type": 0,
|
|
640
|
-
"value": "Layout"
|
|
641
|
-
}]
|
|
642
|
-
})
|
|
643
|
-
}, {
|
|
644
|
-
name: 'title',
|
|
645
|
-
type: 'heading-element',
|
|
646
|
-
theme: {
|
|
647
|
-
textStyle: 'heading1'
|
|
648
|
-
},
|
|
649
|
-
label: reactIntl.defineMessage({
|
|
650
|
-
id: "N25iDO",
|
|
651
|
-
defaultMessage: [{
|
|
652
|
-
"type": 0,
|
|
653
|
-
"value": "Title"
|
|
654
|
-
}]
|
|
655
|
-
})
|
|
656
|
-
}, {
|
|
657
|
-
name: 'subtitle',
|
|
658
|
-
type: 'heading-element',
|
|
659
|
-
theme: {
|
|
660
|
-
textStyle: 'heading2'
|
|
661
|
-
},
|
|
662
|
-
label: reactIntl.defineMessage({
|
|
663
|
-
id: "EcZYpr",
|
|
664
|
-
defaultMessage: [{
|
|
665
|
-
"type": 0,
|
|
666
|
-
"value": "Subtitle"
|
|
667
|
-
}]
|
|
668
|
-
})
|
|
669
|
-
}, {
|
|
670
|
-
name: 'description',
|
|
671
|
-
type: 'text-element',
|
|
672
|
-
theme: {
|
|
673
|
-
textStyle: 'text'
|
|
674
|
-
},
|
|
675
|
-
label: reactIntl.defineMessage({
|
|
676
|
-
id: "ZCe0r4",
|
|
677
|
-
defaultMessage: [{
|
|
678
|
-
"type": 0,
|
|
679
|
-
"value": "Description"
|
|
680
|
-
}]
|
|
681
|
-
})
|
|
682
|
-
}, {
|
|
683
|
-
type: 'fields',
|
|
684
|
-
isList: true,
|
|
685
|
-
label: reactIntl.defineMessage({
|
|
686
|
-
id: "LOknw0",
|
|
687
|
-
defaultMessage: [{
|
|
688
|
-
"type": 0,
|
|
689
|
-
"value": "Styles"
|
|
690
|
-
}]
|
|
691
|
-
}),
|
|
692
|
-
fields: [{
|
|
693
|
-
name: 'boxStyle',
|
|
694
|
-
type: 'box-style-form',
|
|
695
|
-
label: reactIntl.defineMessage({
|
|
696
|
-
id: "f5Yipd",
|
|
697
|
-
defaultMessage: [{
|
|
698
|
-
"type": 0,
|
|
699
|
-
"value": "Box"
|
|
700
|
-
}]
|
|
701
|
-
})
|
|
702
|
-
}]
|
|
703
|
-
}, {
|
|
704
|
-
name: 'background',
|
|
705
|
-
type: 'background',
|
|
706
|
-
label: reactIntl.defineMessage({
|
|
707
|
-
id: "cDj1mZ",
|
|
708
|
-
defaultMessage: [{
|
|
709
|
-
"type": 0,
|
|
710
|
-
"value": "Background"
|
|
711
|
-
}]
|
|
712
|
-
})
|
|
713
|
-
}, {
|
|
714
|
-
name: 'header',
|
|
715
|
-
type: 'header',
|
|
716
|
-
label: reactIntl.defineMessage({
|
|
717
|
-
id: "rhuDxI",
|
|
718
|
-
defaultMessage: [{
|
|
719
|
-
"type": 0,
|
|
720
|
-
"value": "Header"
|
|
721
|
-
}]
|
|
722
|
-
}),
|
|
723
|
-
theme: {
|
|
724
|
-
badge: {
|
|
725
|
-
label: {
|
|
726
|
-
textStyle: 'badge'
|
|
727
|
-
},
|
|
728
|
-
boxStyle: 'badge'
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
}, {
|
|
732
|
-
name: 'footer',
|
|
733
|
-
type: 'footer',
|
|
734
|
-
label: reactIntl.defineMessage({
|
|
735
|
-
id: "g4nybp",
|
|
736
|
-
defaultMessage: [{
|
|
737
|
-
"type": 0,
|
|
738
|
-
"value": "Footer"
|
|
739
|
-
}]
|
|
740
|
-
}),
|
|
741
|
-
theme: {
|
|
742
|
-
callToAction: {
|
|
743
|
-
label: {
|
|
744
|
-
textStyle: 'cta'
|
|
745
|
-
},
|
|
746
|
-
boxStyle: 'cta'
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
}]
|
|
750
|
-
}];
|
|
751
|
-
|
|
752
|
-
exports.TitleScreen = TitleScreen$1;
|
|
753
|
-
exports.TitleSubtitleCreditsScreen = TitleSubtitleCreditsScreen$1;
|
|
754
|
-
exports.TitleSubtitleScreen = TitleSubtitleScreen$1;
|
|
755
|
-
exports.default = definition;
|