@micromag/screen-urbania-article 0.3.88 → 0.3.91
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/assets/css/styles.css +1 -1
- package/es/index.js +44 -24
- package/lib/index.js +44 -24
- package/package.json +14 -14
package/assets/css/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.micromag-screen-urbania-article-container .micromag-screen-urbania-article-empty,.micromag-screen-urbania-article-container.micromag-screen-urbania-article-isVideo .micromag-screen-urbania-article-video,.micromag-screen-urbania-article-container .micromag-screen-urbania-article-video{position:absolute;top:0;left:0;width:100%;height:100%}.micromag-screen-urbania-article-container{position:relative;width:100%;height:100%;overflow:hidden}.micromag-screen-urbania-article-disabled.micromag-screen-urbania-article-container{overflow:hidden;pointer-events:none}.micromag-screen-urbania-article-hidden.micromag-screen-urbania-article-container{display:none;visibility:hidden}.micromag-screen-urbania-article-placeholder.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content{position:relative;padding:6px}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-empty{margin:5px auto;border:2px dashed #343434;color:#343434}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-placeholder{background-color:#6c6c6c}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-emptyContainer{width:100%;height:0;margin-bottom:10px;padding-bottom:20%;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-emptyContainer.micromag-screen-urbania-article-small{padding-bottom:15%}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-empty{margin:0}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-inner{height:100%}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content,.micromag-screen-urbania-article-container .micromag-screen-urbania-article-inner{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;width:100%}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content{z-index:1;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;color:#222;text-align:center}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content .micromag-screen-urbania-article-authors,.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content .micromag-screen-urbania-article-overTitle,.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content .micromag-screen-urbania-article-title{padding:
|
|
1
|
+
.micromag-screen-urbania-article-container .micromag-screen-urbania-article-empty,.micromag-screen-urbania-article-container.micromag-screen-urbania-article-isVideo .micromag-screen-urbania-article-video,.micromag-screen-urbania-article-container .micromag-screen-urbania-article-video{position:absolute;top:0;left:0;width:100%;height:100%}.micromag-screen-urbania-article-container{position:relative;width:100%;height:100%;overflow:hidden}.micromag-screen-urbania-article-disabled.micromag-screen-urbania-article-container{overflow:hidden;pointer-events:none}.micromag-screen-urbania-article-hidden.micromag-screen-urbania-article-container{display:none;visibility:hidden}.micromag-screen-urbania-article-placeholder.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content{position:relative;padding:6px}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-empty{margin:5px auto;border:2px dashed #343434;color:#343434}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-placeholder{background-color:#6c6c6c}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-emptyContainer{width:100%;height:0;margin-bottom:10px;padding-bottom:20%;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-emptyContainer.micromag-screen-urbania-article-small{padding-bottom:15%}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-empty{margin:0}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-inner{height:100%}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content,.micromag-screen-urbania-article-container .micromag-screen-urbania-article-inner{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;width:100%}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content{z-index:1;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;overflow:hidden;color:#222;text-align:center}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content .micromag-screen-urbania-article-authors,.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content .micromag-screen-urbania-article-overTitle,.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content .micromag-screen-urbania-article-title{padding:8px 20px}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content .micromag-screen-urbania-article-overTitle{margin-bottom:10px;padding:30px 0 2px;border-bottom:1px solid;font-family:Agrandir Grand;font-size:10px;font-weight:500;letter-spacing:.1em;text-transform:uppercase}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content .micromag-screen-urbania-article-title{font-family:GarageGothic-Bold;text-transform:uppercase}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content .micromag-screen-urbania-article-authors{margin-bottom:8px}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content .micromag-screen-urbania-article-sponsors{display:inline-block;width:100%;margin-top:auto;padding:0 10px 4px;background-color:#ff0;color:#222;letter-spacing:.04em;line-height:1}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content .micromag-screen-urbania-article-sponsor{display:inline;font-family:Agrandir;font-size:9px;font-weight:400;line-height:1;text-transform:uppercase}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content.micromag-screen-urbania-article-quatre95{background-color:#fff}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content.micromag-screen-urbania-article-quatre95 .micromag-screen-urbania-article-author{color:#5e79ff}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content.micromag-screen-urbania-article-quatre95 .micromag-screen-urbania-article-sponsors,.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content.micromag-screen-urbania-article-urbania{background-color:#ff0;color:#222}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content.micromag-screen-urbania-article-urbania .micromag-screen-urbania-article-author{color:#222}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content.micromag-screen-urbania-article-urbania .micromag-screen-urbania-article-sponsors{background-color:#222;color:#ff0}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content.micromag-screen-urbania-article-dehors{background-color:#00c693;color:#ffeada}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content.micromag-screen-urbania-article-dehors .micromag-screen-urbania-article-author{color:#ffeada}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content.micromag-screen-urbania-article-universities{background-color:#fff;color:#f33}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-content.micromag-screen-urbania-article-universities .micromag-screen-urbania-article-overTitle{color:#222}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-callToAction{position:absolute;z-index:10;right:0;bottom:0;left:0;padding-bottom:5px;vertical-align:middle}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-callToAction .micromag-screen-urbania-article-arrow{margin-bottom:5px;opacity:.95}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-callToAction .micromag-screen-urbania-article-icon{display:inline-block;margin-top:-3px;margin-right:3px;padding:1px}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-mediaControls{padding:10px 20px 20px}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-placeholder{display:block}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-videoContainer{position:absolute}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-bottomContent{position:absolute;bottom:0;width:100%}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-bottom{-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear;opacity:0}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-bottom.micromag-screen-urbania-article-visible{opacity:1}.micromag-screen-urbania-article-container .micromag-screen-urbania-article-bottom.micromag-screen-urbania-article-withGradient{background:-webkit-gradient(linear,left top, left bottom,from(rgba(0,0,0,0)),to(rgba(0,0,0,.4)));background:-o-linear-gradient(rgba(0,0,0,0),rgba(0,0,0,.4));background:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,.4))}.micromag-screen-urbania-article-container.micromag-screen-urbania-article-isPlaceholder .micromag-screen-urbania-article-content{width:80%;height:35%;margin:5px auto;background-color:rgba(0,0,0,0);background-color:#2b2b2b}.micromag-screen-urbania-article-container.micromag-screen-urbania-article-isPlaceholder .micromag-screen-urbania-article-visual{position:relative;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;width:80%;height:50%;margin:5px auto}.micromag-screen-urbania-article-container.micromag-screen-urbania-article-isVideo .micromag-screen-urbania-article-content{-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;margin-bottom:10px;background-color:rgba(0,0,0,0)}.micromag-screen-urbania-article-container.micromag-screen-urbania-article-isVideo .micromag-screen-urbania-article-content .micromag-screen-urbania-article-overTitle{margin-bottom:auto}.micromag-screen-urbania-article-container.micromag-screen-urbania-article-isVideo .micromag-screen-urbania-article-content .micromag-screen-urbania-article-title{color:#fff;text-shadow:2px 2px 0 #222}.micromag-screen-urbania-article-container.micromag-screen-urbania-article-isVideo .micromag-screen-urbania-article-content .micromag-screen-urbania-article-sponsors{margin-top:0}.micromag-screen-urbania-article-container.micromag-screen-urbania-article-isVideo .micromag-screen-urbania-article-emptyContainer{top:0;height:100%;padding-bottom:0;-webkit-transform:none;-ms-transform:none;transform:none}.micromag-screen-urbania-article-container.micromag-screen-urbania-article-isVideo .micromag-screen-urbania-article-callToAction{position:relative}
|
package/es/index.js
CHANGED
|
@@ -114,6 +114,8 @@ var propTypes$1 = {
|
|
|
114
114
|
active: PropTypes.bool,
|
|
115
115
|
transitions: PropTypes$1.transitions,
|
|
116
116
|
spacing: PropTypes.number,
|
|
117
|
+
enableInteraction: PropTypes.func,
|
|
118
|
+
disableInteraction: PropTypes.func,
|
|
117
119
|
className: PropTypes.string
|
|
118
120
|
};
|
|
119
121
|
var defaultProps$1 = {
|
|
@@ -133,11 +135,13 @@ var defaultProps$1 = {
|
|
|
133
135
|
active: true,
|
|
134
136
|
transitions: null,
|
|
135
137
|
spacing: 20,
|
|
138
|
+
enableInteraction: null,
|
|
139
|
+
disableInteraction: null,
|
|
136
140
|
className: null
|
|
137
141
|
};
|
|
138
142
|
|
|
139
143
|
var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
140
|
-
var
|
|
144
|
+
var _ref6;
|
|
141
145
|
|
|
142
146
|
var hasArticle = _ref.hasArticle,
|
|
143
147
|
type = _ref.type,
|
|
@@ -155,6 +159,8 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
155
159
|
active = _ref.active,
|
|
156
160
|
transitions = _ref.transitions,
|
|
157
161
|
spacing = _ref.spacing,
|
|
162
|
+
enableInteraction = _ref.enableInteraction,
|
|
163
|
+
disableInteraction = _ref.disableInteraction,
|
|
158
164
|
className = _ref.className;
|
|
159
165
|
|
|
160
166
|
var _useScreenSize = useScreenSize(),
|
|
@@ -162,31 +168,42 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
162
168
|
height = _useScreenSize.height,
|
|
163
169
|
resolution = _useScreenSize.resolution;
|
|
164
170
|
|
|
171
|
+
var _ref2 = background || {},
|
|
172
|
+
_ref2$color = _ref2.color,
|
|
173
|
+
backgroundColor = _ref2$color === void 0 ? null : _ref2$color;
|
|
174
|
+
|
|
165
175
|
var _useResizeObserver = useResizeObserver(),
|
|
166
176
|
contentRef = _useResizeObserver.ref,
|
|
167
177
|
contentRect = _useResizeObserver.entry.contentRect;
|
|
168
178
|
|
|
169
|
-
var
|
|
170
|
-
contentHeight =
|
|
171
|
-
contentTop =
|
|
179
|
+
var _ref3 = contentRect || {},
|
|
180
|
+
contentHeight = _ref3.height,
|
|
181
|
+
contentTop = _ref3.top;
|
|
172
182
|
|
|
173
183
|
var _useMemo = useMemo(function () {
|
|
174
|
-
var
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
184
|
+
var defaultImageHeight = width * 0.8; // const difference = height - contentHeight - contentTop + 1;
|
|
185
|
+
// if (difference > defaultImageHeight) {
|
|
186
|
+
// return { imageHeight: difference, minImageHeight: defaultImageHeight };
|
|
187
|
+
// }
|
|
188
|
+
// return { imageHeight: difference, minImageHeight: defaultImageHeight };
|
|
189
|
+
|
|
190
|
+
// const difference = height - contentHeight - contentTop + 1;
|
|
191
|
+
// if (difference > defaultImageHeight) {
|
|
192
|
+
// return { imageHeight: difference, minImageHeight: defaultImageHeight };
|
|
193
|
+
// }
|
|
194
|
+
// return { imageHeight: difference, minImageHeight: defaultImageHeight };
|
|
195
|
+
var finalMaxContentHeight = height - defaultImageHeight;
|
|
183
196
|
return {
|
|
184
|
-
imageHeight:
|
|
197
|
+
imageHeight: defaultImageHeight,
|
|
198
|
+
maxContentHeight: finalMaxContentHeight
|
|
185
199
|
};
|
|
186
200
|
}, [contentTop, contentHeight, width, height]),
|
|
187
201
|
_useMemo$minContentHe = _useMemo.minContentHeight,
|
|
188
202
|
minContentHeight = _useMemo$minContentHe === void 0 ? null : _useMemo$minContentHe,
|
|
189
|
-
|
|
203
|
+
_useMemo$maxContentHe = _useMemo.maxContentHeight,
|
|
204
|
+
maxContentHeight = _useMemo$maxContentHe === void 0 ? null : _useMemo$maxContentHe,
|
|
205
|
+
_useMemo$imageHeight = _useMemo.imageHeight,
|
|
206
|
+
imageHeight = _useMemo$imageHeight === void 0 ? null : _useMemo$imageHeight;
|
|
190
207
|
|
|
191
208
|
var _useScreenRenderConte = useScreenRenderContext(),
|
|
192
209
|
isView = _useScreenRenderConte.isView,
|
|
@@ -201,14 +218,14 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
201
218
|
var hasTitle = isTextFilled(title);
|
|
202
219
|
var hasSponsor = isTextFilled(sponsor);
|
|
203
220
|
|
|
204
|
-
var
|
|
205
|
-
authorFullName =
|
|
221
|
+
var _ref4 = author || {},
|
|
222
|
+
authorFullName = _ref4.name;
|
|
206
223
|
|
|
207
224
|
var hasAuthor = isTextFilled(authorFullName);
|
|
208
225
|
|
|
209
|
-
var
|
|
210
|
-
|
|
211
|
-
url =
|
|
226
|
+
var _ref5 = image || {},
|
|
227
|
+
_ref5$url = _ref5.url,
|
|
228
|
+
url = _ref5$url === void 0 ? null : _ref5$url;
|
|
212
229
|
|
|
213
230
|
var hasImage = url !== null;
|
|
214
231
|
var backgroundPlaying = current && (isView || isEdit);
|
|
@@ -298,7 +315,7 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
298
315
|
return it !== null;
|
|
299
316
|
});
|
|
300
317
|
return /*#__PURE__*/React.createElement("div", {
|
|
301
|
-
className: classNames([styles.container, (
|
|
318
|
+
className: classNames([styles.container, (_ref6 = {}, _defineProperty(_ref6, className, className !== null), _defineProperty(_ref6, styles.isVideo, isVideo), _defineProperty(_ref6, styles.isPlaceholder, isPlaceholder), _ref6)]),
|
|
302
319
|
"data-screen-ready": isStatic || isCapture
|
|
303
320
|
}, /*#__PURE__*/React.createElement(Background, {
|
|
304
321
|
background: background,
|
|
@@ -313,10 +330,11 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
313
330
|
height: height
|
|
314
331
|
}, /*#__PURE__*/React.createElement("div", {
|
|
315
332
|
className: classNames([styles.content, _defineProperty({}, styles["".concat(site)], site !== null)]),
|
|
316
|
-
style: {
|
|
333
|
+
style: _objectSpread({
|
|
317
334
|
paddingTop: spacing,
|
|
318
|
-
minHeight: minContentHeight
|
|
319
|
-
|
|
335
|
+
minHeight: minContentHeight,
|
|
336
|
+
height: maxContentHeight
|
|
337
|
+
}, !isVideo ? getStyleFromColor(backgroundColor, 'backgroundColor') : null),
|
|
320
338
|
ref: contentRef
|
|
321
339
|
}, items), /*#__PURE__*/React.createElement("div", {
|
|
322
340
|
className: styles.visual
|
|
@@ -374,6 +392,8 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
374
392
|
height: height
|
|
375
393
|
},
|
|
376
394
|
arrow: /*#__PURE__*/React.createElement(Arrow, null),
|
|
395
|
+
enableInteraction: enableInteraction,
|
|
396
|
+
disableInteraction: disableInteraction,
|
|
377
397
|
icon: type === 'video' ? /*#__PURE__*/React.createElement(WatchIcon, {
|
|
378
398
|
className: styles.icon
|
|
379
399
|
}) : null
|
package/lib/index.js
CHANGED
|
@@ -134,6 +134,8 @@ var propTypes$1 = {
|
|
|
134
134
|
active: PropTypes__default["default"].bool,
|
|
135
135
|
transitions: core.PropTypes.transitions,
|
|
136
136
|
spacing: PropTypes__default["default"].number,
|
|
137
|
+
enableInteraction: PropTypes__default["default"].func,
|
|
138
|
+
disableInteraction: PropTypes__default["default"].func,
|
|
137
139
|
className: PropTypes__default["default"].string
|
|
138
140
|
};
|
|
139
141
|
var defaultProps$1 = {
|
|
@@ -153,11 +155,13 @@ var defaultProps$1 = {
|
|
|
153
155
|
active: true,
|
|
154
156
|
transitions: null,
|
|
155
157
|
spacing: 20,
|
|
158
|
+
enableInteraction: null,
|
|
159
|
+
disableInteraction: null,
|
|
156
160
|
className: null
|
|
157
161
|
};
|
|
158
162
|
|
|
159
163
|
var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
160
|
-
var
|
|
164
|
+
var _ref6;
|
|
161
165
|
|
|
162
166
|
var hasArticle = _ref.hasArticle,
|
|
163
167
|
type = _ref.type,
|
|
@@ -175,6 +179,8 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
175
179
|
active = _ref.active,
|
|
176
180
|
transitions = _ref.transitions,
|
|
177
181
|
spacing = _ref.spacing,
|
|
182
|
+
enableInteraction = _ref.enableInteraction,
|
|
183
|
+
disableInteraction = _ref.disableInteraction,
|
|
178
184
|
className = _ref.className;
|
|
179
185
|
|
|
180
186
|
var _useScreenSize = contexts.useScreenSize(),
|
|
@@ -182,31 +188,42 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
182
188
|
height = _useScreenSize.height,
|
|
183
189
|
resolution = _useScreenSize.resolution;
|
|
184
190
|
|
|
191
|
+
var _ref2 = background || {},
|
|
192
|
+
_ref2$color = _ref2.color,
|
|
193
|
+
backgroundColor = _ref2$color === void 0 ? null : _ref2$color;
|
|
194
|
+
|
|
185
195
|
var _useResizeObserver = hooks.useResizeObserver(),
|
|
186
196
|
contentRef = _useResizeObserver.ref,
|
|
187
197
|
contentRect = _useResizeObserver.entry.contentRect;
|
|
188
198
|
|
|
189
|
-
var
|
|
190
|
-
contentHeight =
|
|
191
|
-
contentTop =
|
|
199
|
+
var _ref3 = contentRect || {},
|
|
200
|
+
contentHeight = _ref3.height,
|
|
201
|
+
contentTop = _ref3.top;
|
|
192
202
|
|
|
193
203
|
var _useMemo = React.useMemo(function () {
|
|
194
|
-
var
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
204
|
+
var defaultImageHeight = width * 0.8; // const difference = height - contentHeight - contentTop + 1;
|
|
205
|
+
// if (difference > defaultImageHeight) {
|
|
206
|
+
// return { imageHeight: difference, minImageHeight: defaultImageHeight };
|
|
207
|
+
// }
|
|
208
|
+
// return { imageHeight: difference, minImageHeight: defaultImageHeight };
|
|
209
|
+
|
|
210
|
+
// const difference = height - contentHeight - contentTop + 1;
|
|
211
|
+
// if (difference > defaultImageHeight) {
|
|
212
|
+
// return { imageHeight: difference, minImageHeight: defaultImageHeight };
|
|
213
|
+
// }
|
|
214
|
+
// return { imageHeight: difference, minImageHeight: defaultImageHeight };
|
|
215
|
+
var finalMaxContentHeight = height - defaultImageHeight;
|
|
203
216
|
return {
|
|
204
|
-
imageHeight:
|
|
217
|
+
imageHeight: defaultImageHeight,
|
|
218
|
+
maxContentHeight: finalMaxContentHeight
|
|
205
219
|
};
|
|
206
220
|
}, [contentTop, contentHeight, width, height]),
|
|
207
221
|
_useMemo$minContentHe = _useMemo.minContentHeight,
|
|
208
222
|
minContentHeight = _useMemo$minContentHe === void 0 ? null : _useMemo$minContentHe,
|
|
209
|
-
|
|
223
|
+
_useMemo$maxContentHe = _useMemo.maxContentHeight,
|
|
224
|
+
maxContentHeight = _useMemo$maxContentHe === void 0 ? null : _useMemo$maxContentHe,
|
|
225
|
+
_useMemo$imageHeight = _useMemo.imageHeight,
|
|
226
|
+
imageHeight = _useMemo$imageHeight === void 0 ? null : _useMemo$imageHeight;
|
|
210
227
|
|
|
211
228
|
var _useScreenRenderConte = contexts.useScreenRenderContext(),
|
|
212
229
|
isView = _useScreenRenderConte.isView,
|
|
@@ -221,14 +238,14 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
221
238
|
var hasTitle = utils.isTextFilled(title);
|
|
222
239
|
var hasSponsor = utils.isTextFilled(sponsor);
|
|
223
240
|
|
|
224
|
-
var
|
|
225
|
-
authorFullName =
|
|
241
|
+
var _ref4 = author || {},
|
|
242
|
+
authorFullName = _ref4.name;
|
|
226
243
|
|
|
227
244
|
var hasAuthor = utils.isTextFilled(authorFullName);
|
|
228
245
|
|
|
229
|
-
var
|
|
230
|
-
|
|
231
|
-
url =
|
|
246
|
+
var _ref5 = image || {},
|
|
247
|
+
_ref5$url = _ref5.url,
|
|
248
|
+
url = _ref5$url === void 0 ? null : _ref5$url;
|
|
232
249
|
|
|
233
250
|
var hasImage = url !== null;
|
|
234
251
|
var backgroundPlaying = current && (isView || isEdit);
|
|
@@ -318,7 +335,7 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
318
335
|
return it !== null;
|
|
319
336
|
});
|
|
320
337
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
321
|
-
className: classNames__default["default"]([styles.container, (
|
|
338
|
+
className: classNames__default["default"]([styles.container, (_ref6 = {}, _defineProperty__default["default"](_ref6, className, className !== null), _defineProperty__default["default"](_ref6, styles.isVideo, isVideo), _defineProperty__default["default"](_ref6, styles.isPlaceholder, isPlaceholder), _ref6)]),
|
|
322
339
|
"data-screen-ready": isStatic || isCapture
|
|
323
340
|
}, /*#__PURE__*/React__default["default"].createElement(Background__default["default"], {
|
|
324
341
|
background: background,
|
|
@@ -333,10 +350,11 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
333
350
|
height: height
|
|
334
351
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
335
352
|
className: classNames__default["default"]([styles.content, _defineProperty__default["default"]({}, styles["".concat(site)], site !== null)]),
|
|
336
|
-
style: {
|
|
353
|
+
style: _objectSpread__default["default"]({
|
|
337
354
|
paddingTop: spacing,
|
|
338
|
-
minHeight: minContentHeight
|
|
339
|
-
|
|
355
|
+
minHeight: minContentHeight,
|
|
356
|
+
height: maxContentHeight
|
|
357
|
+
}, !isVideo ? utils.getStyleFromColor(backgroundColor, 'backgroundColor') : null),
|
|
340
358
|
ref: contentRef
|
|
341
359
|
}, items), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
342
360
|
className: styles.visual
|
|
@@ -394,6 +412,8 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
394
412
|
height: height
|
|
395
413
|
},
|
|
396
414
|
arrow: /*#__PURE__*/React__default["default"].createElement(Arrow, null),
|
|
415
|
+
enableInteraction: enableInteraction,
|
|
416
|
+
disableInteraction: disableInteraction,
|
|
397
417
|
icon: type === 'video' ? /*#__PURE__*/React__default["default"].createElement(WatchIcon, {
|
|
398
418
|
className: styles.icon
|
|
399
419
|
}) : null
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-urbania-article",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.91",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -51,18 +51,18 @@
|
|
|
51
51
|
"@babel/runtime": "^7.13.10",
|
|
52
52
|
"@folklore/fetch": "^0.1.15",
|
|
53
53
|
"@folklore/size": "^0.1.20",
|
|
54
|
-
"@micromag/core": "^0.3.
|
|
55
|
-
"@micromag/element-background": "^0.3.
|
|
56
|
-
"@micromag/element-call-to-action": "^0.3.
|
|
57
|
-
"@micromag/element-closed-captions": "^0.3.
|
|
58
|
-
"@micromag/element-container": "^0.3.
|
|
59
|
-
"@micromag/element-heading": "^0.3.
|
|
60
|
-
"@micromag/element-image": "^0.3.
|
|
61
|
-
"@micromag/element-media-controls": "^0.3.
|
|
62
|
-
"@micromag/element-urbania-author": "^0.3.
|
|
63
|
-
"@micromag/element-video": "^0.3.
|
|
64
|
-
"@micromag/element-visual": "^0.3.
|
|
65
|
-
"@micromag/transforms": "^0.3.
|
|
54
|
+
"@micromag/core": "^0.3.91",
|
|
55
|
+
"@micromag/element-background": "^0.3.91",
|
|
56
|
+
"@micromag/element-call-to-action": "^0.3.91",
|
|
57
|
+
"@micromag/element-closed-captions": "^0.3.91",
|
|
58
|
+
"@micromag/element-container": "^0.3.91",
|
|
59
|
+
"@micromag/element-heading": "^0.3.91",
|
|
60
|
+
"@micromag/element-image": "^0.3.91",
|
|
61
|
+
"@micromag/element-media-controls": "^0.3.91",
|
|
62
|
+
"@micromag/element-urbania-author": "^0.3.91",
|
|
63
|
+
"@micromag/element-video": "^0.3.91",
|
|
64
|
+
"@micromag/element-visual": "^0.3.91",
|
|
65
|
+
"@micromag/transforms": "^0.3.91",
|
|
66
66
|
"classnames": "^2.2.6",
|
|
67
67
|
"lodash": "^4.17.21",
|
|
68
68
|
"prop-types": "^15.7.2",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "bce204f3045898193845386933a98a5e3666bcf3"
|
|
76
76
|
}
|