@micromag/screen-urbania-horoscope 0.3.310 → 0.3.318
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 +3 -3
- package/es/index.js +102 -155
- package/lib/index.js +102 -155
- package/package.json +18 -18
package/assets/css/styles.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
.micromag-screen-urbania-horoscope-sign-card-container{
|
|
2
|
-
.micromag-screen-urbania-horoscope-sign-modal-modalButton{
|
|
3
|
-
.micromag-screen-urbania-horoscope-close{
|
|
1
|
+
.micromag-screen-urbania-horoscope-sign-card-container{-ms-flex-align:center;-webkit-touch-callout:none;align-items:center;background-color:#1d3af2;border:0;border-radius:10px;display:-ms-flexbox;display:flex;-webkit-filter:drop-shadow(0 0 6px rgba(0,0,0,.7));filter:drop-shadow(0 0 6px rgba(0,0,0,.7));-ms-flex-direction:column;flex-direction:column;height:100%;padding:5px;position:relative;-webkit-transition:-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);transition:-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);-o-transition:transform .3s cubic-bezier(.41,1.69,.04,.67);transition:transform .3s cubic-bezier(.41,1.69,.04,.67);transition:transform .3s cubic-bezier(.41,1.69,.04,.67),-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.micromag-screen-urbania-horoscope-sign-card-container:hover{-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05);z-index:2}.micromag-screen-urbania-horoscope-sign-card-container:active{-webkit-transform:scale(.95);-ms-transform:scale(.95);transform:scale(.95)}.micromag-screen-urbania-horoscope-sign-card-placeholder{background-color:#b3b3b3;height:30px;margin:1px;width:30px}.micromag-screen-urbania-horoscope-sign-card-thumbnail{max-height:50px;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.micromag-screen-urbania-horoscope-sign-card-name{background-color:#fffc00;border-radius:24px;-webkit-box-shadow:0 0 0 2px rgba(255,250,0,.6);box-shadow:0 0 0 2px rgba(255,250,0,.6);color:#222;font-family:Agrandir Tight,sans-serif;font-size:12px;font-weight:700;margin-bottom:.4rem!important;padding:2px 5px 0!important;width:100%}.micromag-screen-urbania-horoscope-sign-card-date{color:#fffa00;font-family:Agrandir,sans-serif;font-size:8px}.micromag-screen-urbania-horoscope-sign-card-arrow{display:inline-block;font-size:20px;padding-bottom:2px;padding-right:5px;vertical-align:middle}.micromag-screen-urbania-horoscope-sign-card-emptyText{margin-top:5px;padding:10px;width:100%}
|
|
2
|
+
.micromag-screen-urbania-horoscope-sign-modal-modalButton{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:inherit;cursor:pointer;display:inline-block;font-family:inherit;padding:0;position:relative}.micromag-screen-urbania-horoscope-sign-modal-container{height:100%;overflow:hidden;width:100%}.micromag-screen-urbania-horoscope-sign-modal-disabled.micromag-screen-urbania-horoscope-sign-modal-container{overflow:hidden;pointer-events:none}.micromag-screen-urbania-horoscope-sign-modal-hidden.micromag-screen-urbania-horoscope-sign-modal-container{display:none;visibility:hidden}.micromag-screen-urbania-horoscope-sign-modal-placeholder.micromag-screen-urbania-horoscope-sign-modal-container .micromag-screen-urbania-horoscope-sign-modal-content{padding:6px;position:relative}.micromag-screen-urbania-horoscope-sign-modal-container{position:relative}.micromag-screen-urbania-horoscope-sign-modal-modalButton{-webkit-transition:-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);transition:-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);-o-transition:transform .3s cubic-bezier(.41,1.69,.04,.67);transition:transform .3s cubic-bezier(.41,1.69,.04,.67);transition:transform .3s cubic-bezier(.41,1.69,.04,.67),-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67)}.micromag-screen-urbania-horoscope-sign-modal-modalButton:active{-webkit-transform:scale(.95);-ms-transform:scale(.95);transform:scale(.95)}.micromag-screen-urbania-horoscope-sign-modal-modal{background-color:#0ff;border-radius:22px;-webkit-box-shadow:0 0 4px #010f66;box-shadow:0 0 4px #010f66;color:#1d3af2;margin:52px 18px 30px;padding:10px}.micromag-screen-urbania-horoscope-sign-modal-name{font-family:Agrandir Tight,sans-serif;font-weight:900;padding:7px auto 5px;text-transform:uppercase}.micromag-screen-urbania-horoscope-sign-modal-wordContainer{border:1px solid #1d3af2;border-radius:9px;margin-bottom:5px;padding:6px 6px 3px;text-transform:uppercase}.micromag-screen-urbania-horoscope-sign-modal-wordOfTheWeek{font-family:Agrandir Tight,sans-serif;font-size:8px;font-weight:500;letter-spacing:.03rem;padding-bottom:2px}.micromag-screen-urbania-horoscope-sign-modal-word{font-family:Agrandir Narrow,sans-serif;font-size:16px;font-weight:700}.micromag-screen-urbania-horoscope-sign-modal-description{font-family:Roboto,sans-serif;font-size:12px;line-height:1.2;padding-bottom:5px}.micromag-screen-urbania-horoscope-sign-modal-description p{margin-bottom:1em}.micromag-screen-urbania-horoscope-sign-modal-description p:last-child{margin-bottom:0}.micromag-screen-urbania-horoscope-sign-modal-illustration{height:auto;margin:0 auto;pointer-events:none;width:75%}.micromag-screen-urbania-horoscope-sign-modal-arrow{font-size:20px;padding-right:5px;vertical-align:middle}
|
|
3
|
+
.micromag-screen-urbania-horoscope-close{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:inherit;cursor:pointer;display:inline-block;font-family:inherit;padding:0;position:relative}.micromag-screen-urbania-horoscope-backdrop,.micromag-screen-urbania-horoscope-container .micromag-screen-urbania-horoscope-background,.micromag-screen-urbania-horoscope-signsGridContainer{height:100%;left:0;position:absolute;top:0;width:100%}.micromag-screen-urbania-horoscope-container{height:100%;overflow:hidden;position:relative;width:100%}.micromag-screen-urbania-horoscope-disabled.micromag-screen-urbania-horoscope-container{overflow:hidden;pointer-events:none}.micromag-screen-urbania-horoscope-hidden.micromag-screen-urbania-horoscope-container{display:none;visibility:hidden}.micromag-screen-urbania-horoscope-placeholder.micromag-screen-urbania-horoscope-container .micromag-screen-urbania-horoscope-content{padding:6px;position:relative}.micromag-screen-urbania-horoscope-emptyText,.micromag-screen-urbania-horoscope-emptyTitle{border:2px dashed #343434;color:#343434;margin:5px auto}.micromag-screen-urbania-horoscope-close:focus-visible{outline:3px solid #a13dff;outline-offset:4px}.micromag-screen-urbania-horoscope-container{-ms-touch-action:none;touch-action:none}.micromag-screen-urbania-horoscope-container .micromag-screen-urbania-horoscope-background{z-index:0}.micromag-screen-urbania-horoscope-container .micromag-screen-urbania-horoscope-content{z-index:1}.micromag-screen-urbania-horoscope-container.micromag-screen-urbania-horoscope-isPlaceholder .micromag-screen-urbania-horoscope-layout{padding:10px}.micromag-screen-urbania-horoscope-layout{-ms-flex-align:center;-ms-flex-pack:justify;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;justify-content:space-between;text-align:center}.micromag-screen-urbania-horoscope-emptyText,.micromag-screen-urbania-horoscope-emptyTitle{margin:10px auto;width:100%}.micromag-screen-urbania-horoscope-emptyTitle{height:100px}.micromag-screen-urbania-horoscope-emptyText{height:50px}.micromag-screen-urbania-horoscope-headerContainer{width:280px}.micromag-screen-urbania-horoscope-title{-webkit-text-stroke:1px #000f66;color:#0ff;font-family:Agrandir Tight,sans-serif;font-size:48px;font-weight:700;letter-spacing:-1px;text-shadow:-3px -3px 0 #000f66;text-transform:uppercase}.micromag-screen-urbania-horoscope-title,.micromag-screen-urbania-horoscope-titleImage{-webkit-filter:drop-shadow(0 0 6px rgba(0,0,0,.7));filter:drop-shadow(0 0 6px rgba(0,0,0,.7))}.micromag-screen-urbania-horoscope-titleImage{height:auto;width:100%}.micromag-screen-urbania-horoscope-titlePlaceholder{background-color:#343434;padding:10px}.micromag-screen-urbania-horoscope-description{color:#0ff;-webkit-filter:drop-shadow(0 0 3px rgba(0,0,0,.7));filter:drop-shadow(0 0 3px rgba(0,0,0,.7));font-family:Agrandir Tight,sans-serif;font-size:18px;font-weight:700;margin-bottom:8px;padding:10px}.micromag-screen-urbania-horoscope-description p,.micromag-screen-urbania-horoscope-description span{font-weight:700!important}.micromag-screen-urbania-horoscope-descriptionPlaceholder{padding:10px 10px 30px}.micromag-screen-urbania-horoscope-button{background-color:#fffc00;border-radius:24px;-webkit-box-shadow:0 0 0 6px rgba(255,250,0,.6);box-shadow:0 0 0 6px rgba(255,250,0,.6);padding:8px 15px 4px;-webkit-transition:-webkit-box-shadow .2s cubic-bezier(.41,1.69,.04,.67);transition:-webkit-box-shadow .2s cubic-bezier(.41,1.69,.04,.67);-o-transition:box-shadow .2s cubic-bezier(.41,1.69,.04,.67);transition:box-shadow .2s cubic-bezier(.41,1.69,.04,.67);transition:box-shadow .2s cubic-bezier(.41,1.69,.04,.67),-webkit-box-shadow .2s cubic-bezier(.41,1.69,.04,.67)}.micromag-screen-urbania-horoscope-button:hover{-webkit-box-shadow:0 0 0 12px rgba(255,250,0,.6);box-shadow:0 0 0 12px rgba(255,250,0,.6)}.micromag-screen-urbania-horoscope-button:active{-webkit-box-shadow:0 0 0 3px rgba(255,250,0,.3);box-shadow:0 0 0 3px rgba(255,250,0,.3)}.micromag-screen-urbania-horoscope-buttonLabel{color:#000;font-family:Agrandir Tight,sans-serif;font-size:22px;font-weight:700;letter-spacing:.03rem}.micromag-screen-urbania-horoscope-header{-ms-flex-align:center;align-items:center;background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.75)),to(rgba(0,0,0,0)));background-image:-o-linear-gradient(rgba(0,0,0,.75),rgba(0,0,0,0));background-image:linear-gradient(rgba(0,0,0,.75),rgba(0,0,0,0));display:-ms-flexbox;display:flex;left:0;padding:10px;position:fixed;top:0;width:100%;z-index:4}.micromag-screen-urbania-horoscope-buttons{-ms-flex-positive:1;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;flex-grow:1;position:relative}.micromag-screen-urbania-horoscope-close{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;font-weight:700;margin-left:auto}.micromag-screen-urbania-horoscope-signsGridContainer{padding:2.5rem 1rem;-ms-touch-action:none;touch-action:none;z-index:3}.micromag-screen-urbania-horoscope-signsGridContainer.micromag-screen-urbania-horoscope-isPlaceholder{padding:0}.micromag-screen-urbania-horoscope-signs{-ms-flex-pack:justify;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;justify-content:space-between}.micromag-screen-urbania-horoscope-author{color:#0ff;-webkit-filter:drop-shadow(0 0 3px rgba(0,0,0,.7));filter:drop-shadow(0 0 3px rgba(0,0,0,.7));margin:5px auto 0;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.micromag-screen-urbania-horoscope-collaborator{color:#0ff}.micromag-screen-urbania-horoscope-authorBackground{background-color:#161719!important}.micromag-screen-urbania-horoscope-authorBackground p{font-weight:400!important;text-transform:none!important}.micromag-screen-urbania-horoscope-modal{height:100%;left:0;position:fixed;right:0;top:0;-ms-touch-action:none;touch-action:none;width:100%;z-index:6}.micromag-screen-urbania-horoscope-backdrop{background-color:rgba(0,0,0,.75);pointer-events:none;z-index:1}.micromag-screen-urbania-horoscope-backdropVideo{pointer-events:none}
|
package/es/index.js
CHANGED
|
@@ -282,22 +282,19 @@ var defaultProps$2 = {
|
|
|
282
282
|
sign: null,
|
|
283
283
|
onClick: null
|
|
284
284
|
};
|
|
285
|
-
|
|
286
285
|
var SignCard = function SignCard(_ref) {
|
|
287
286
|
var className = _ref.className,
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
287
|
+
sign = _ref.sign,
|
|
288
|
+
onClick = _ref.onClick;
|
|
291
289
|
var _ref2 = sign || {},
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
290
|
+
_ref2$id = _ref2.id,
|
|
291
|
+
id = _ref2$id === void 0 ? null : _ref2$id,
|
|
292
|
+
_ref2$thumbnail = _ref2.thumbnail,
|
|
293
|
+
thumbnail = _ref2$thumbnail === void 0 ? null : _ref2$thumbnail,
|
|
294
|
+
_ref2$label = _ref2.label,
|
|
295
|
+
label = _ref2$label === void 0 ? null : _ref2$label,
|
|
296
|
+
_ref2$date = _ref2.date,
|
|
297
|
+
date = _ref2$date === void 0 ? null : _ref2$date;
|
|
301
298
|
return /*#__PURE__*/React.createElement(ScreenElement, {
|
|
302
299
|
placeholder: /*#__PURE__*/React.createElement(PlaceholderTitle, {
|
|
303
300
|
className: styles$2.placeholder
|
|
@@ -328,7 +325,6 @@ var SignCard = function SignCard(_ref) {
|
|
|
328
325
|
className: styles$2.date
|
|
329
326
|
}, date !== null ? /*#__PURE__*/React.createElement(FormattedMessage, date) : null))));
|
|
330
327
|
};
|
|
331
|
-
|
|
332
328
|
SignCard.propTypes = propTypes$2;
|
|
333
329
|
SignCard.defaultProps = defaultProps$2;
|
|
334
330
|
|
|
@@ -361,38 +357,32 @@ var defaultProps$1 = {
|
|
|
361
357
|
onClick: null,
|
|
362
358
|
className: null
|
|
363
359
|
};
|
|
364
|
-
|
|
365
360
|
var SignModal = function SignModal(_ref) {
|
|
366
361
|
var _ref4;
|
|
367
|
-
|
|
368
362
|
var width = _ref.width,
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
363
|
+
height = _ref.height,
|
|
364
|
+
sign = _ref.sign,
|
|
365
|
+
subtitle = _ref.subtitle,
|
|
366
|
+
current = _ref.current,
|
|
367
|
+
transitionDisabled = _ref.transitionDisabled,
|
|
368
|
+
_onClick = _ref.onClick,
|
|
369
|
+
className = _ref.className;
|
|
377
370
|
// eslint-disable-next-line no-unused-vars
|
|
378
371
|
var _ref2 = sign || {},
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
372
|
+
_ref2$label = _ref2.label,
|
|
373
|
+
label = _ref2$label === void 0 ? null : _ref2$label,
|
|
374
|
+
_ref2$image = _ref2.image,
|
|
375
|
+
image = _ref2$image === void 0 ? null : _ref2$image;
|
|
376
|
+
_ref2.date;
|
|
377
|
+
var _ref2$word = _ref2.word,
|
|
378
|
+
word = _ref2$word === void 0 ? null : _ref2$word,
|
|
379
|
+
_ref2$description = _ref2.description,
|
|
380
|
+
description = _ref2$description === void 0 ? null : _ref2$description;
|
|
389
381
|
var _ref3 = word || {},
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
382
|
+
_ref3$body = _ref3.body,
|
|
383
|
+
wordBody = _ref3$body === void 0 ? null : _ref3$body;
|
|
393
384
|
var _useScreenRenderConte = useScreenRenderContext(),
|
|
394
|
-
|
|
395
|
-
|
|
385
|
+
isEdit = _useScreenRenderConte.isEdit;
|
|
396
386
|
var hasWord = isTextFilled(word);
|
|
397
387
|
var hasSubtitle = isTextFilled(subtitle);
|
|
398
388
|
var scrollingDisabled = !isEdit && transitionDisabled || !current;
|
|
@@ -438,11 +428,10 @@ var SignModal = function SignModal(_ref) {
|
|
|
438
428
|
alt: label
|
|
439
429
|
}) : null))));
|
|
440
430
|
};
|
|
441
|
-
|
|
442
431
|
SignModal.propTypes = propTypes$1;
|
|
443
432
|
SignModal.defaultProps = defaultProps$1;
|
|
444
433
|
|
|
445
|
-
var styles = {"close":"micromag-screen-urbania-horoscope-close","backdrop":"micromag-screen-urbania-horoscope-backdrop","
|
|
434
|
+
var styles = {"close":"micromag-screen-urbania-horoscope-close","backdrop":"micromag-screen-urbania-horoscope-backdrop","signsGridContainer":"micromag-screen-urbania-horoscope-signsGridContainer","container":"micromag-screen-urbania-horoscope-container","background":"micromag-screen-urbania-horoscope-background","disabled":"micromag-screen-urbania-horoscope-disabled","hidden":"micromag-screen-urbania-horoscope-hidden","placeholder":"micromag-screen-urbania-horoscope-placeholder","content":"micromag-screen-urbania-horoscope-content","emptyTitle":"micromag-screen-urbania-horoscope-emptyTitle","emptyText":"micromag-screen-urbania-horoscope-emptyText","isPlaceholder":"micromag-screen-urbania-horoscope-isPlaceholder","layout":"micromag-screen-urbania-horoscope-layout","headerContainer":"micromag-screen-urbania-horoscope-headerContainer","title":"micromag-screen-urbania-horoscope-title","titleImage":"micromag-screen-urbania-horoscope-titleImage","titlePlaceholder":"micromag-screen-urbania-horoscope-titlePlaceholder","description":"micromag-screen-urbania-horoscope-description","descriptionPlaceholder":"micromag-screen-urbania-horoscope-descriptionPlaceholder","button":"micromag-screen-urbania-horoscope-button","buttonLabel":"micromag-screen-urbania-horoscope-buttonLabel","header":"micromag-screen-urbania-horoscope-header","buttons":"micromag-screen-urbania-horoscope-buttons","signs":"micromag-screen-urbania-horoscope-signs","author":"micromag-screen-urbania-horoscope-author","collaborator":"micromag-screen-urbania-horoscope-collaborator","authorBackground":"micromag-screen-urbania-horoscope-authorBackground","modal":"micromag-screen-urbania-horoscope-modal","backdropVideo":"micromag-screen-urbania-horoscope-backdropVideo"};
|
|
446
435
|
|
|
447
436
|
var Astrologie = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20906.64%20139.48%22%3E%20%20%20%20%3Cpath%20d%3D%22M35.88%2C4.42h35.5l34.66%2C119.78h-28.43l-5.89-23.72H35.55l-6.22%2C23.72H1.4L35.88%2C4.42Zm31.8%2C75.54l-13.63-52.15h-.34l-14.13%2C52.15h28.09Z%22%20fill%3D%22%23000f66%22%20stroke%3D%22aqua%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M123.37%2C122.51c-6.84-3.36-12.17-8.13-15.98-14.3-3.81-6.17-5.78-13.34-5.89-21.53l26.24-4.21c0%2C7.07%2C1.96%2C12.73%2C5.89%2C16.99%2C3.92%2C4.26%2C8.92%2C6.39%2C14.97%2C6.39%2C4.82%2C0%2C8.72-1.29%2C11.69-3.87%2C2.97-2.58%2C4.46-5.89%2C4.46-9.92%2C0-3.37-1.15-6.2-3.45-8.5-2.3-2.3-6.03-4.34-11.19-6.14l-14.64-4.71c-10.66-3.25-18.37-7.68-23.13-13.29-4.77-5.61-7.15-13.01-7.15-22.21%2C0-10.88%2C3.53-19.63%2C10.6-26.24%2C7.07-6.62%2C16.99-9.93%2C29.78-9.93%2C11.89%2C0%2C21.48%2C3.23%2C28.77%2C9.67%2C7.29%2C6.45%2C11.05%2C15.17%2C11.27%2C26.16l-25.57%2C4.88c.11-5.83-1.24-10.51-4.04-14.05-2.8-3.53-6.45-5.3-10.94-5.3-3.93%2C0-7.12%2C1.21-9.59%2C3.62-2.47%2C2.41-3.7%2C5.47-3.7%2C9.17s1.15%2C6.54%2C3.45%2C8.83c2.3%2C2.3%2C6.08%2C4.23%2C11.36%2C5.8l13.96%2C4.71c10.88%2C3.25%2C18.76%2C7.66%2C23.64%2C13.21s7.32%2C12.93%2C7.32%2C22.12c0%2C7.29-1.74%2C13.79-5.22%2C19.51-3.48%2C5.72-8.52%2C10.18-15.14%2C13.38-6.62%2C3.2-14.58%2C4.79-23.89%2C4.79s-17.05-1.68-23.89-5.05Z%22%20fill%3D%22%23000f66%22%20stroke%3D%22aqua%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M213.03%2C28.64h-28.26V4.42h84.96V28.64h-28.26V124.2h-28.43V28.64Z%22%20fill%3D%22%23000f66%22%20stroke%3D%22aqua%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M335.5%2C122.35c-3.59-3.25-5.95-7.63-7.07-13.12l-5.05-21.37c-.79-2.92-2.19-5.3-4.21-7.15s-4.26-2.78-6.73-2.78h-10.09v46.26h-28.26V4.42h46.1c8.86%2C0%2C16.6%2C1.54%2C23.22%2C4.63%2C6.62%2C3.09%2C11.72%2C7.46%2C15.31%2C13.12%2C3.59%2C5.66%2C5.38%2C12.31%2C5.38%2C19.94%2C0%2C7.18-2.08%2C13.6-6.22%2C19.26-4.15%2C5.67-9.76%2C9.51-16.82%2C11.52v.17c2.8%2C1.24%2C4.96%2C3%2C6.48%2C5.3%2C1.51%2C2.3%2C2.66%2C5.13%2C3.45%2C8.5l3.53%2C15.48c.67%2C3.7%2C2.19%2C5.55%2C4.54%2C5.55%2C2.13%2C0%2C4.15-1.29%2C6.06-3.87l6.73%2C13.63c-2.8%2C2.92-6.2%2C5.24-10.18%2C6.98-3.98%2C1.74-8.05%2C2.61-12.2%2C2.61-5.72%2C0-10.38-1.63-13.96-4.88Zm-16.82-64.26c5.05%2C0%2C9.14-1.46%2C12.28-4.37%2C3.14-2.92%2C4.71-6.78%2C4.71-11.61%2C0-5.16-1.54-9.17-4.63-12.03-3.09-2.86-7.21-4.29-12.37-4.29h-16.32V58.08h16.32Z%22%20fill%3D%22%23000f66%22%20stroke%3D%22aqua%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M396.23%2C119.74c-8.52-5.21-15.14-12.62-19.85-22.21-4.71-9.59-7.07-20.66-7.07-33.23s2.36-23.64%2C7.07-33.23c4.71-9.59%2C11.33-16.99%2C19.85-22.21%2C8.52-5.21%2C18.45-7.82%2C29.78-7.82s21.28%2C2.61%2C29.86%2C7.82c8.58%2C5.22%2C15.22%2C12.59%2C19.94%2C22.12%2C4.71%2C9.53%2C7.07%2C20.58%2C7.07%2C33.14s-2.36%2C23.8-7.07%2C33.39c-4.71%2C9.59-11.36%2C16.99-19.94%2C22.21s-18.53%2C7.82-29.86%2C7.82-21.26-2.61-29.78-7.82Zm50.47-27c5.16-7.07%2C7.74-16.54%2C7.74-28.43s-2.58-21.37-7.74-28.43c-5.16-7.07-12.06-10.6-20.69-10.6s-15.51%2C3.53-20.61%2C10.6c-5.1%2C7.07-7.65%2C16.54-7.65%2C28.43s2.55%2C21.37%2C7.65%2C28.43c5.1%2C7.07%2C11.97%2C10.6%2C20.61%2C10.6s15.53-3.53%2C20.69-10.6Z%22%20fill%3D%22%23000f66%22%20stroke%3D%22aqua%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M489.26%2C4.42h28.26V99.97h37.68v24.23h-65.95V4.42Z%22%20fill%3D%22%23000f66%22%20stroke%3D%22aqua%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M580.28%2C119.74c-8.52-5.21-15.14-12.62-19.85-22.21-4.71-9.59-7.07-20.66-7.07-33.23s2.36-23.64%2C7.07-33.23c4.71-9.59%2C11.33-16.99%2C19.85-22.21%2C8.52-5.21%2C18.45-7.82%2C29.78-7.82s21.28%2C2.61%2C29.86%2C7.82c8.58%2C5.22%2C15.22%2C12.59%2C19.94%2C22.12%2C4.71%2C9.53%2C7.07%2C20.58%2C7.07%2C33.14s-2.36%2C23.8-7.07%2C33.39c-4.71%2C9.59-11.36%2C16.99-19.94%2C22.21s-18.53%2C7.82-29.86%2C7.82-21.26-2.61-29.78-7.82Zm50.47-27c5.16-7.07%2C7.74-16.54%2C7.74-28.43s-2.58-21.37-7.74-28.43c-5.16-7.07-12.06-10.6-20.69-10.6s-15.51%2C3.53-20.61%2C10.6c-5.1%2C7.07-7.65%2C16.54-7.65%2C28.43s2.55%2C21.37%2C7.65%2C28.43c5.1%2C7.07%2C11.97%2C10.6%2C20.61%2C10.6s15.53-3.53%2C20.69-10.6Z%22%20fill%3D%22%23000f66%22%20stroke%3D%22aqua%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M693.75%2C119.65c-7.68-5.05-13.6-12.31-17.75-21.79-4.15-9.48-6.22-20.66-6.22-33.56s2.21-24.25%2C6.65-33.73c4.43-9.48%2C10.77-16.77%2C19.01-21.87%2C8.24-5.1%2C17.97-7.65%2C29.19-7.65s21.53%2C3.28%2C29.95%2C9.84c8.41%2C6.56%2C14.19%2C15.56%2C17.33%2C27l-26.58%2C5.72c-1.8-5.72-4.54-10.2-8.24-13.46-3.7-3.25-7.96-4.88-12.79-4.88-8.08%2C0-14.44%2C3.42-19.09%2C10.26-4.66%2C6.84-6.98%2C16.21-6.98%2C28.09s2.63%2C21.84%2C7.91%2C28.85c5.27%2C7.01%2C12.5%2C10.51%2C21.7%2C10.51%2C8.19%2C0%2C14.66-2.49%2C19.43-7.49%2C4.77-4.99%2C7.26-11.92%2C7.49-20.78h-37.18v-18.51h64.26V124.2h-20.86l-1.68-18.67h-.17c-3.93%2C6.73-9.31%2C12.03-16.15%2C15.9-6.84%2C3.87-14.19%2C5.8-22.04%2C5.8-10.43%2C0-19.49-2.52-27.17-7.57Z%22%20fill%3D%22%23000f66%22%20stroke%3D%22aqua%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M789.56%2C4.42h28.26V124.2h-28.26V4.42Z%22%20fill%3D%22%23000f66%22%20stroke%3D%22aqua%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M827.74%2C4.42h68.81V27.13h-41.55v25.57h34.82v20.19h-34.82v28.6h43.24v22.71h-70.49V4.42Z%22%20fill%3D%22%23000f66%22%20stroke%3D%22aqua%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M43.24%2C15.29h35.5l34.66%2C119.78h-28.43l-5.89-23.72H42.91l-6.22%2C23.72H8.76L43.24%2C15.29Zm31.8%2C75.54l-13.63-52.15h-.34l-14.13%2C52.15h28.09Z%22%20fill%3D%22aqua%22%20stroke%3D%22%23000f66%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M130.73%2C133.38c-6.84-3.36-12.17-8.13-15.98-14.3-3.81-6.17-5.78-13.34-5.89-21.53l26.24-4.21c0%2C7.07%2C1.96%2C12.73%2C5.89%2C16.99%2C3.92%2C4.26%2C8.92%2C6.39%2C14.97%2C6.39%2C4.82%2C0%2C8.72-1.29%2C11.69-3.87%2C2.97-2.58%2C4.46-5.89%2C4.46-9.92%2C0-3.37-1.15-6.2-3.45-8.5-2.3-2.3-6.03-4.34-11.19-6.14l-14.64-4.71c-10.66-3.25-18.37-7.68-23.13-13.29-4.77-5.61-7.15-13.01-7.15-22.21%2C0-10.88%2C3.53-19.63%2C10.6-26.24%2C7.07-6.62%2C16.99-9.93%2C29.78-9.93%2C11.89%2C0%2C21.48%2C3.23%2C28.77%2C9.67%2C7.29%2C6.45%2C11.05%2C15.17%2C11.27%2C26.16l-25.57%2C4.88c.11-5.83-1.24-10.51-4.04-14.05-2.8-3.53-6.45-5.3-10.94-5.3-3.93%2C0-7.12%2C1.21-9.59%2C3.62-2.47%2C2.41-3.7%2C5.47-3.7%2C9.17s1.15%2C6.54%2C3.45%2C8.83c2.3%2C2.3%2C6.08%2C4.23%2C11.36%2C5.8l13.96%2C4.71c10.88%2C3.25%2C18.76%2C7.66%2C23.64%2C13.21s7.32%2C12.93%2C7.32%2C22.12c0%2C7.29-1.74%2C13.79-5.22%2C19.51-3.48%2C5.72-8.52%2C10.18-15.14%2C13.38-6.62%2C3.2-14.58%2C4.79-23.89%2C4.79s-17.05-1.68-23.89-5.05Z%22%20fill%3D%22aqua%22%20stroke%3D%22%23000f66%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M220.39%2C39.51h-28.26V15.29h84.96v24.23h-28.26v95.56h-28.43V39.51Z%22%20fill%3D%22aqua%22%20stroke%3D%22%23000f66%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M342.86%2C133.22c-3.59-3.25-5.95-7.63-7.07-13.12l-5.05-21.37c-.79-2.92-2.19-5.3-4.21-7.15s-4.26-2.78-6.73-2.78h-10.09v46.26h-28.26V15.29h46.1c8.86%2C0%2C16.6%2C1.54%2C23.22%2C4.63%2C6.62%2C3.09%2C11.72%2C7.46%2C15.31%2C13.12%2C3.59%2C5.66%2C5.38%2C12.31%2C5.38%2C19.94%2C0%2C7.18-2.08%2C13.6-6.22%2C19.26-4.15%2C5.67-9.76%2C9.51-16.82%2C11.52v.17c2.8%2C1.24%2C4.96%2C3%2C6.48%2C5.3%2C1.51%2C2.3%2C2.66%2C5.13%2C3.45%2C8.5l3.53%2C15.48c.67%2C3.7%2C2.19%2C5.55%2C4.54%2C5.55%2C2.13%2C0%2C4.15-1.29%2C6.06-3.87l6.73%2C13.63c-2.8%2C2.92-6.2%2C5.24-10.18%2C6.98-3.98%2C1.74-8.05%2C2.61-12.2%2C2.61-5.72%2C0-10.38-1.63-13.96-4.88Zm-16.82-64.26c5.05%2C0%2C9.14-1.46%2C12.28-4.37%2C3.14-2.92%2C4.71-6.78%2C4.71-11.61%2C0-5.16-1.54-9.17-4.63-12.03-3.09-2.86-7.21-4.29-12.37-4.29h-16.32v32.3h16.32Z%22%20fill%3D%22aqua%22%20stroke%3D%22%23000f66%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M403.59%2C130.61c-8.52-5.21-15.14-12.62-19.85-22.21-4.71-9.59-7.07-20.66-7.07-33.23s2.36-23.64%2C7.07-33.23c4.71-9.59%2C11.33-16.99%2C19.85-22.21%2C8.52-5.21%2C18.45-7.82%2C29.78-7.82s21.28%2C2.61%2C29.86%2C7.82c8.58%2C5.22%2C15.22%2C12.59%2C19.94%2C22.12%2C4.71%2C9.53%2C7.07%2C20.58%2C7.07%2C33.14s-2.36%2C23.8-7.07%2C33.39c-4.71%2C9.59-11.36%2C16.99-19.94%2C22.21s-18.53%2C7.82-29.86%2C7.82-21.26-2.61-29.78-7.82Zm50.47-27c5.16-7.07%2C7.74-16.54%2C7.74-28.43s-2.58-21.37-7.74-28.43c-5.16-7.07-12.06-10.6-20.69-10.6s-15.51%2C3.53-20.61%2C10.6c-5.1%2C7.07-7.65%2C16.54-7.65%2C28.43s2.55%2C21.37%2C7.65%2C28.43c5.1%2C7.07%2C11.97%2C10.6%2C20.61%2C10.6s15.53-3.53%2C20.69-10.6Z%22%20fill%3D%22aqua%22%20stroke%3D%22%23000f66%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M496.62%2C15.29h28.26V110.84h37.68v24.23h-65.95V15.29Z%22%20fill%3D%22aqua%22%20stroke%3D%22%23000f66%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M587.64%2C130.61c-8.52-5.21-15.14-12.62-19.85-22.21-4.71-9.59-7.07-20.66-7.07-33.23s2.36-23.64%2C7.07-33.23c4.71-9.59%2C11.33-16.99%2C19.85-22.21%2C8.52-5.21%2C18.45-7.82%2C29.78-7.82s21.28%2C2.61%2C29.86%2C7.82c8.58%2C5.22%2C15.22%2C12.59%2C19.94%2C22.12%2C4.71%2C9.53%2C7.07%2C20.58%2C7.07%2C33.14s-2.36%2C23.8-7.07%2C33.39c-4.71%2C9.59-11.36%2C16.99-19.94%2C22.21s-18.53%2C7.82-29.86%2C7.82-21.26-2.61-29.78-7.82Zm50.47-27c5.16-7.07%2C7.74-16.54%2C7.74-28.43s-2.58-21.37-7.74-28.43c-5.16-7.07-12.06-10.6-20.69-10.6s-15.51%2C3.53-20.61%2C10.6c-5.1%2C7.07-7.65%2C16.54-7.65%2C28.43s2.55%2C21.37%2C7.65%2C28.43c5.1%2C7.07%2C11.97%2C10.6%2C20.61%2C10.6s15.53-3.53%2C20.69-10.6Z%22%20fill%3D%22aqua%22%20stroke%3D%22%23000f66%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M701.11%2C130.53c-7.68-5.05-13.6-12.31-17.75-21.79-4.15-9.48-6.22-20.66-6.22-33.56s2.21-24.25%2C6.65-33.73c4.43-9.48%2C10.77-16.77%2C19.01-21.87%2C8.24-5.1%2C17.97-7.65%2C29.19-7.65s21.53%2C3.28%2C29.95%2C9.84c8.41%2C6.56%2C14.19%2C15.56%2C17.33%2C27l-26.58%2C5.72c-1.8-5.72-4.54-10.2-8.24-13.46-3.7-3.25-7.96-4.88-12.79-4.88-8.08%2C0-14.44%2C3.42-19.09%2C10.26-4.66%2C6.84-6.98%2C16.21-6.98%2C28.09s2.63%2C21.84%2C7.91%2C28.85c5.27%2C7.01%2C12.5%2C10.51%2C21.7%2C10.51%2C8.19%2C0%2C14.66-2.49%2C19.43-7.49%2C4.77-4.99%2C7.26-11.92%2C7.49-20.78h-37.18v-18.51h64.26v67.97h-20.86l-1.68-18.67h-.17c-3.93%2C6.73-9.31%2C12.03-16.15%2C15.9-6.84%2C3.87-14.19%2C5.8-22.04%2C5.8-10.43%2C0-19.49-2.52-27.17-7.57Z%22%20fill%3D%22aqua%22%20stroke%3D%22%23000f66%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M796.92%2C15.29h28.26v119.78h-28.26V15.29Z%22%20fill%3D%22aqua%22%20stroke%3D%22%23000f66%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M835.1%2C15.29h68.81v22.71h-41.55v25.57h34.82v20.19h-34.82v28.6h43.24v22.71h-70.49V15.29Z%22%20fill%3D%22aqua%22%20stroke%3D%22%23000f66%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%3C%2Fsvg%3E";
|
|
448
437
|
|
|
@@ -466,7 +455,6 @@ var stopDragEventsPropagation = {
|
|
|
466
455
|
return e.stopPropagation();
|
|
467
456
|
}
|
|
468
457
|
};
|
|
469
|
-
|
|
470
458
|
var mouseBlocker = _objectSpread(_objectSpread({}, stopDragEventsPropagation), {}, {
|
|
471
459
|
onClick: function onClick(e) {
|
|
472
460
|
return e.stopPropagation();
|
|
@@ -481,7 +469,6 @@ var mouseBlocker = _objectSpread(_objectSpread({}, stopDragEventsPropagation), {
|
|
|
481
469
|
cursor: 'default'
|
|
482
470
|
}
|
|
483
471
|
});
|
|
484
|
-
|
|
485
472
|
var propTypes = {
|
|
486
473
|
defaultSigns: PropTypes.arrayOf(PropTypes.shape({
|
|
487
474
|
id: PropTypes.string,
|
|
@@ -522,34 +509,29 @@ var defaultProps = {
|
|
|
522
509
|
type: 'horoscope',
|
|
523
510
|
className: null
|
|
524
511
|
};
|
|
525
|
-
|
|
526
512
|
var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
527
513
|
var _ref7;
|
|
528
|
-
|
|
529
514
|
var defaultSigns = _ref.defaultSigns,
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
515
|
+
signsValue = _ref.signs,
|
|
516
|
+
title = _ref.title,
|
|
517
|
+
description = _ref.description,
|
|
518
|
+
author = _ref.author,
|
|
519
|
+
button = _ref.button,
|
|
520
|
+
signSubtitle = _ref.signSubtitle,
|
|
521
|
+
spacing = _ref.spacing,
|
|
522
|
+
background = _ref.background,
|
|
523
|
+
popupBackground = _ref.popupBackground,
|
|
524
|
+
current = _ref.current,
|
|
525
|
+
active = _ref.active,
|
|
526
|
+
type = _ref.type,
|
|
527
|
+
className = _ref.className;
|
|
543
528
|
var intl = useIntl();
|
|
544
529
|
var trackScreenEvent = useTrackScreenEvent(type);
|
|
545
|
-
|
|
546
530
|
var _useViewerInteraction = useViewerInteraction(),
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
531
|
+
enableInteraction = _useViewerInteraction.enableInteraction,
|
|
532
|
+
disableInteraction = _useViewerInteraction.disableInteraction;
|
|
550
533
|
var _usePlaybackContext = usePlaybackContext(),
|
|
551
|
-
|
|
552
|
-
|
|
534
|
+
muted = _usePlaybackContext.muted;
|
|
553
535
|
var mediaRef = usePlaybackMediaRef(current);
|
|
554
536
|
var hasAuthor = author !== null && isTextFilled(author.name);
|
|
555
537
|
var signs = useMemo(function () {
|
|
@@ -560,51 +542,41 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
560
542
|
}) || signsValue[index] : null), defaultSign);
|
|
561
543
|
});
|
|
562
544
|
}, [signsValue]);
|
|
563
|
-
|
|
564
545
|
var _useScreenSize = useScreenSize(),
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
546
|
+
width = _useScreenSize.width,
|
|
547
|
+
height = _useScreenSize.height,
|
|
548
|
+
resolution = _useScreenSize.resolution;
|
|
569
549
|
var _useViewerContext = useViewerContext(),
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
550
|
+
viewerTopHeight = _useViewerContext.topHeight,
|
|
551
|
+
viewerBottomHeight = _useViewerContext.bottomHeight;
|
|
573
552
|
var _useScreenRenderConte = useScreenRenderContext(),
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
553
|
+
isView = _useScreenRenderConte.isView,
|
|
554
|
+
isPreview = _useScreenRenderConte.isPreview,
|
|
555
|
+
isPlaceholder = _useScreenRenderConte.isPlaceholder,
|
|
556
|
+
isEdit = _useScreenRenderConte.isEdit;
|
|
579
557
|
var hasTitle = isTextFilled(title);
|
|
580
558
|
var hasDescription = isTextFilled(description);
|
|
581
559
|
var hasButton = isTextFilled(button);
|
|
582
560
|
var backgroundPlaying = current && (isView || isEdit);
|
|
583
561
|
var mediaShouldLoad = !isPlaceholder && (current || active);
|
|
584
|
-
|
|
585
562
|
var _useState = useState(false),
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
563
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
564
|
+
showSignsGrid = _useState2[0],
|
|
565
|
+
setShowSignsGrid = _useState2[1];
|
|
590
566
|
var _useState3 = useState(null),
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
567
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
568
|
+
selectedSign = _useState4[0],
|
|
569
|
+
setSelectedSign = _useState4[1];
|
|
595
570
|
var _useState5 = useState(false),
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
571
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
572
|
+
showModal = _useState6[0],
|
|
573
|
+
setShowModal = _useState6[1];
|
|
600
574
|
var _ref3 = popupBackground || {},
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
575
|
+
_ref3$video = _ref3.video,
|
|
576
|
+
video = _ref3$video === void 0 ? null : _ref3$video;
|
|
604
577
|
var _ref4 = video || {},
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
578
|
+
_ref4$url = _ref4.url,
|
|
579
|
+
popupBackgroundUrl = _ref4$url === void 0 ? null : _ref4$url;
|
|
608
580
|
var onOpenSignsGrid = useCallback(function () {
|
|
609
581
|
setShowSignsGrid(true);
|
|
610
582
|
disableInteraction();
|
|
@@ -613,7 +585,6 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
613
585
|
var onCloseSignsGrid = useCallback(function () {
|
|
614
586
|
setShowSignsGrid(false);
|
|
615
587
|
setShowModal(0); // can't have a modal if signs are closed
|
|
616
|
-
|
|
617
588
|
enableInteraction();
|
|
618
589
|
trackScreenEvent('close');
|
|
619
590
|
}, [setShowSignsGrid, setShowModal, enableInteraction, trackScreenEvent]);
|
|
@@ -632,76 +603,64 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
632
603
|
}, [setShowModal, trackScreenEvent]);
|
|
633
604
|
var computeSignsGridProgress = useCallback(function (_ref5) {
|
|
634
605
|
var dragActive = _ref5.active,
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
606
|
+
_ref5$movement = _slicedToArray(_ref5.movement, 2),
|
|
607
|
+
my = _ref5$movement[1],
|
|
608
|
+
_ref5$velocity = _slicedToArray(_ref5.velocity, 2),
|
|
609
|
+
vy = _ref5$velocity[1];
|
|
640
610
|
var progress = Math.max(0, my) / (window.innerHeight * 0.8);
|
|
641
611
|
var reachedThreshold = vy > 0.3 || Math.abs(progress) > 0.3;
|
|
642
|
-
|
|
643
612
|
if (!dragActive) {
|
|
644
613
|
if (reachedThreshold) {
|
|
645
614
|
onCloseSignsGrid();
|
|
646
615
|
}
|
|
647
|
-
|
|
648
616
|
return reachedThreshold ? 0 : 1;
|
|
649
617
|
}
|
|
650
|
-
|
|
651
618
|
return 1 - progress;
|
|
652
619
|
}, [onOpenSignsGrid, onCloseSignsGrid]);
|
|
653
|
-
|
|
654
620
|
var _useDragProgress = useDragProgress({
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
621
|
+
disabled: !isView,
|
|
622
|
+
progress: showSignsGrid ? 1 : 0,
|
|
623
|
+
computeProgress: computeSignsGridProgress,
|
|
624
|
+
springParams: {
|
|
625
|
+
config: {
|
|
626
|
+
tension: 300,
|
|
627
|
+
friction: 30
|
|
628
|
+
}
|
|
662
629
|
}
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
showSignsGridProgress = _useDragProgress.progress;
|
|
667
|
-
|
|
630
|
+
}),
|
|
631
|
+
bindSignsDrag = _useDragProgress.bind,
|
|
632
|
+
showSignsGridProgress = _useDragProgress.progress;
|
|
668
633
|
var computeModalProgress = useCallback(function (_ref6) {
|
|
669
634
|
var dragActive = _ref6.active,
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
635
|
+
_ref6$movement = _slicedToArray(_ref6.movement, 2),
|
|
636
|
+
my = _ref6$movement[1],
|
|
637
|
+
_ref6$velocity = _slicedToArray(_ref6.velocity, 2),
|
|
638
|
+
vy = _ref6$velocity[1];
|
|
675
639
|
var damper = 0.5;
|
|
676
640
|
var p = Math.max(0, my) / window.innerHeight;
|
|
677
641
|
var progress = p * damper;
|
|
678
642
|
var reachedThreshold = vy > 0.3 || Math.abs(p) > 0.3;
|
|
679
|
-
|
|
680
643
|
if (!dragActive) {
|
|
681
644
|
if (reachedThreshold) {
|
|
682
645
|
onCloseModal();
|
|
683
646
|
}
|
|
684
|
-
|
|
685
647
|
return reachedThreshold ? 0 : 1;
|
|
686
648
|
}
|
|
687
|
-
|
|
688
649
|
return 1 - progress;
|
|
689
650
|
}, [onCloseModal]);
|
|
690
|
-
|
|
691
651
|
var _useDragProgress2 = useDragProgress({
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
652
|
+
disabled: !isView,
|
|
653
|
+
progress: showModal ? 1 : 0,
|
|
654
|
+
computeProgress: computeModalProgress,
|
|
655
|
+
springParams: {
|
|
656
|
+
config: {
|
|
657
|
+
tension: 300,
|
|
658
|
+
friction: 30
|
|
659
|
+
}
|
|
699
660
|
}
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
showModalProgress = _useDragProgress2.progress;
|
|
704
|
-
|
|
661
|
+
}),
|
|
662
|
+
bindModalDrag = _useDragProgress2.bind,
|
|
663
|
+
showModalProgress = _useDragProgress2.progress;
|
|
705
664
|
var getHeaderStyles = function getHeaderStyles(spring) {
|
|
706
665
|
return {
|
|
707
666
|
transform: spring.to(function (p) {
|
|
@@ -712,7 +671,6 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
712
671
|
})
|
|
713
672
|
};
|
|
714
673
|
};
|
|
715
|
-
|
|
716
674
|
var getSignsContainerStyles = function getSignsContainerStyles(spring) {
|
|
717
675
|
return {
|
|
718
676
|
opacity: spring,
|
|
@@ -721,7 +679,6 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
721
679
|
})
|
|
722
680
|
};
|
|
723
681
|
};
|
|
724
|
-
|
|
725
682
|
var getSignStyles = function getSignStyles(spring) {
|
|
726
683
|
return {
|
|
727
684
|
opacity: spring,
|
|
@@ -730,7 +687,6 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
730
687
|
})
|
|
731
688
|
};
|
|
732
689
|
};
|
|
733
|
-
|
|
734
690
|
var getAuthorStyles = function getAuthorStyles(spring) {
|
|
735
691
|
return {
|
|
736
692
|
transform: spring.to(function (p) {
|
|
@@ -739,13 +695,11 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
739
695
|
opacity: spring
|
|
740
696
|
};
|
|
741
697
|
};
|
|
742
|
-
|
|
743
698
|
var getBackdropStyles = function getBackdropStyles(spring) {
|
|
744
699
|
return {
|
|
745
700
|
opacity: spring
|
|
746
701
|
};
|
|
747
702
|
};
|
|
748
|
-
|
|
749
703
|
var getModalStyles = function getModalStyles(spring) {
|
|
750
704
|
return {
|
|
751
705
|
transform: spring.to(function (p) {
|
|
@@ -755,24 +709,21 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
755
709
|
return p < 0.1 ? 'none' : 'auto';
|
|
756
710
|
})
|
|
757
711
|
};
|
|
758
|
-
};
|
|
759
|
-
|
|
712
|
+
};
|
|
760
713
|
|
|
714
|
+
// for editor purposes
|
|
761
715
|
var screenState = useScreenState();
|
|
762
716
|
useEffect(function () {
|
|
763
717
|
setShowSignsGrid(0);
|
|
764
|
-
|
|
765
718
|
if (screenState === null || screenState === 'intro') {
|
|
766
719
|
setShowSignsGrid(0);
|
|
767
720
|
setShowModal(0);
|
|
768
721
|
}
|
|
769
|
-
|
|
770
722
|
if (screenState === 'grid') {
|
|
771
723
|
setShowSignsGrid(1);
|
|
772
724
|
setSelectedSign(null);
|
|
773
725
|
setShowModal(0);
|
|
774
726
|
}
|
|
775
|
-
|
|
776
727
|
if (screenState !== null && screenState.includes('signs')) {
|
|
777
728
|
var index = screenState.split('.').pop();
|
|
778
729
|
setShowSignsGrid(1);
|
|
@@ -787,13 +738,11 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
787
738
|
onCloseModal();
|
|
788
739
|
return;
|
|
789
740
|
}
|
|
790
|
-
|
|
791
741
|
if (showSignsGrid) {
|
|
792
742
|
onCloseSignsGrid();
|
|
793
743
|
}
|
|
794
744
|
}
|
|
795
745
|
};
|
|
796
|
-
|
|
797
746
|
document.addEventListener('keyup', keyup);
|
|
798
747
|
return function () {
|
|
799
748
|
document.removeEventListener('keyup', keyup);
|
|
@@ -897,9 +846,8 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
897
846
|
spacing: 5,
|
|
898
847
|
items: signs.map(function (sign) {
|
|
899
848
|
var _ref8 = sign || {},
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
849
|
+
_ref8$id = _ref8.id,
|
|
850
|
+
id = _ref8$id === void 0 ? null : _ref8$id;
|
|
903
851
|
return /*#__PURE__*/React.createElement(animated.div, {
|
|
904
852
|
key: id,
|
|
905
853
|
className: styles.sign,
|
|
@@ -963,7 +911,6 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
963
911
|
className: styles.background
|
|
964
912
|
}) : null);
|
|
965
913
|
};
|
|
966
|
-
|
|
967
914
|
UrbaniaHoroscope.propTypes = propTypes;
|
|
968
915
|
UrbaniaHoroscope.defaultProps = defaultProps;
|
|
969
916
|
var UrbaniaHoroscope$1 = /*#__PURE__*/React.memo(UrbaniaHoroscope);
|
package/lib/index.js
CHANGED
|
@@ -328,22 +328,19 @@ var defaultProps$2 = {
|
|
|
328
328
|
sign: null,
|
|
329
329
|
onClick: null
|
|
330
330
|
};
|
|
331
|
-
|
|
332
331
|
var SignCard = function SignCard(_ref) {
|
|
333
332
|
var className = _ref.className,
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
333
|
+
sign = _ref.sign,
|
|
334
|
+
onClick = _ref.onClick;
|
|
337
335
|
var _ref2 = sign || {},
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
336
|
+
_ref2$id = _ref2.id,
|
|
337
|
+
id = _ref2$id === void 0 ? null : _ref2$id,
|
|
338
|
+
_ref2$thumbnail = _ref2.thumbnail,
|
|
339
|
+
thumbnail = _ref2$thumbnail === void 0 ? null : _ref2$thumbnail,
|
|
340
|
+
_ref2$label = _ref2.label,
|
|
341
|
+
label = _ref2$label === void 0 ? null : _ref2$label,
|
|
342
|
+
_ref2$date = _ref2.date,
|
|
343
|
+
date = _ref2$date === void 0 ? null : _ref2$date;
|
|
347
344
|
return /*#__PURE__*/React__default["default"].createElement(components.ScreenElement, {
|
|
348
345
|
placeholder: /*#__PURE__*/React__default["default"].createElement(components.PlaceholderTitle, {
|
|
349
346
|
className: styles$2.placeholder
|
|
@@ -374,7 +371,6 @@ var SignCard = function SignCard(_ref) {
|
|
|
374
371
|
className: styles$2.date
|
|
375
372
|
}, date !== null ? /*#__PURE__*/React__default["default"].createElement(reactIntl.FormattedMessage, date) : null))));
|
|
376
373
|
};
|
|
377
|
-
|
|
378
374
|
SignCard.propTypes = propTypes$2;
|
|
379
375
|
SignCard.defaultProps = defaultProps$2;
|
|
380
376
|
|
|
@@ -407,38 +403,32 @@ var defaultProps$1 = {
|
|
|
407
403
|
onClick: null,
|
|
408
404
|
className: null
|
|
409
405
|
};
|
|
410
|
-
|
|
411
406
|
var SignModal = function SignModal(_ref) {
|
|
412
407
|
var _ref4;
|
|
413
|
-
|
|
414
408
|
var width = _ref.width,
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
409
|
+
height = _ref.height,
|
|
410
|
+
sign = _ref.sign,
|
|
411
|
+
subtitle = _ref.subtitle,
|
|
412
|
+
current = _ref.current,
|
|
413
|
+
transitionDisabled = _ref.transitionDisabled,
|
|
414
|
+
_onClick = _ref.onClick,
|
|
415
|
+
className = _ref.className;
|
|
423
416
|
// eslint-disable-next-line no-unused-vars
|
|
424
417
|
var _ref2 = sign || {},
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
418
|
+
_ref2$label = _ref2.label,
|
|
419
|
+
label = _ref2$label === void 0 ? null : _ref2$label,
|
|
420
|
+
_ref2$image = _ref2.image,
|
|
421
|
+
image = _ref2$image === void 0 ? null : _ref2$image;
|
|
422
|
+
_ref2.date;
|
|
423
|
+
var _ref2$word = _ref2.word,
|
|
424
|
+
word = _ref2$word === void 0 ? null : _ref2$word,
|
|
425
|
+
_ref2$description = _ref2.description,
|
|
426
|
+
description = _ref2$description === void 0 ? null : _ref2$description;
|
|
435
427
|
var _ref3 = word || {},
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
428
|
+
_ref3$body = _ref3.body,
|
|
429
|
+
wordBody = _ref3$body === void 0 ? null : _ref3$body;
|
|
439
430
|
var _useScreenRenderConte = contexts.useScreenRenderContext(),
|
|
440
|
-
|
|
441
|
-
|
|
431
|
+
isEdit = _useScreenRenderConte.isEdit;
|
|
442
432
|
var hasWord = utils.isTextFilled(word);
|
|
443
433
|
var hasSubtitle = utils.isTextFilled(subtitle);
|
|
444
434
|
var scrollingDisabled = !isEdit && transitionDisabled || !current;
|
|
@@ -484,11 +474,10 @@ var SignModal = function SignModal(_ref) {
|
|
|
484
474
|
alt: label
|
|
485
475
|
}) : null))));
|
|
486
476
|
};
|
|
487
|
-
|
|
488
477
|
SignModal.propTypes = propTypes$1;
|
|
489
478
|
SignModal.defaultProps = defaultProps$1;
|
|
490
479
|
|
|
491
|
-
var styles = {"close":"micromag-screen-urbania-horoscope-close","backdrop":"micromag-screen-urbania-horoscope-backdrop","
|
|
480
|
+
var styles = {"close":"micromag-screen-urbania-horoscope-close","backdrop":"micromag-screen-urbania-horoscope-backdrop","signsGridContainer":"micromag-screen-urbania-horoscope-signsGridContainer","container":"micromag-screen-urbania-horoscope-container","background":"micromag-screen-urbania-horoscope-background","disabled":"micromag-screen-urbania-horoscope-disabled","hidden":"micromag-screen-urbania-horoscope-hidden","placeholder":"micromag-screen-urbania-horoscope-placeholder","content":"micromag-screen-urbania-horoscope-content","emptyTitle":"micromag-screen-urbania-horoscope-emptyTitle","emptyText":"micromag-screen-urbania-horoscope-emptyText","isPlaceholder":"micromag-screen-urbania-horoscope-isPlaceholder","layout":"micromag-screen-urbania-horoscope-layout","headerContainer":"micromag-screen-urbania-horoscope-headerContainer","title":"micromag-screen-urbania-horoscope-title","titleImage":"micromag-screen-urbania-horoscope-titleImage","titlePlaceholder":"micromag-screen-urbania-horoscope-titlePlaceholder","description":"micromag-screen-urbania-horoscope-description","descriptionPlaceholder":"micromag-screen-urbania-horoscope-descriptionPlaceholder","button":"micromag-screen-urbania-horoscope-button","buttonLabel":"micromag-screen-urbania-horoscope-buttonLabel","header":"micromag-screen-urbania-horoscope-header","buttons":"micromag-screen-urbania-horoscope-buttons","signs":"micromag-screen-urbania-horoscope-signs","author":"micromag-screen-urbania-horoscope-author","collaborator":"micromag-screen-urbania-horoscope-collaborator","authorBackground":"micromag-screen-urbania-horoscope-authorBackground","modal":"micromag-screen-urbania-horoscope-modal","backdropVideo":"micromag-screen-urbania-horoscope-backdropVideo"};
|
|
492
481
|
|
|
493
482
|
var Astrologie = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20906.64%20139.48%22%3E%20%20%20%20%3Cpath%20d%3D%22M35.88%2C4.42h35.5l34.66%2C119.78h-28.43l-5.89-23.72H35.55l-6.22%2C23.72H1.4L35.88%2C4.42Zm31.8%2C75.54l-13.63-52.15h-.34l-14.13%2C52.15h28.09Z%22%20fill%3D%22%23000f66%22%20stroke%3D%22aqua%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M123.37%2C122.51c-6.84-3.36-12.17-8.13-15.98-14.3-3.81-6.17-5.78-13.34-5.89-21.53l26.24-4.21c0%2C7.07%2C1.96%2C12.73%2C5.89%2C16.99%2C3.92%2C4.26%2C8.92%2C6.39%2C14.97%2C6.39%2C4.82%2C0%2C8.72-1.29%2C11.69-3.87%2C2.97-2.58%2C4.46-5.89%2C4.46-9.92%2C0-3.37-1.15-6.2-3.45-8.5-2.3-2.3-6.03-4.34-11.19-6.14l-14.64-4.71c-10.66-3.25-18.37-7.68-23.13-13.29-4.77-5.61-7.15-13.01-7.15-22.21%2C0-10.88%2C3.53-19.63%2C10.6-26.24%2C7.07-6.62%2C16.99-9.93%2C29.78-9.93%2C11.89%2C0%2C21.48%2C3.23%2C28.77%2C9.67%2C7.29%2C6.45%2C11.05%2C15.17%2C11.27%2C26.16l-25.57%2C4.88c.11-5.83-1.24-10.51-4.04-14.05-2.8-3.53-6.45-5.3-10.94-5.3-3.93%2C0-7.12%2C1.21-9.59%2C3.62-2.47%2C2.41-3.7%2C5.47-3.7%2C9.17s1.15%2C6.54%2C3.45%2C8.83c2.3%2C2.3%2C6.08%2C4.23%2C11.36%2C5.8l13.96%2C4.71c10.88%2C3.25%2C18.76%2C7.66%2C23.64%2C13.21s7.32%2C12.93%2C7.32%2C22.12c0%2C7.29-1.74%2C13.79-5.22%2C19.51-3.48%2C5.72-8.52%2C10.18-15.14%2C13.38-6.62%2C3.2-14.58%2C4.79-23.89%2C4.79s-17.05-1.68-23.89-5.05Z%22%20fill%3D%22%23000f66%22%20stroke%3D%22aqua%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M213.03%2C28.64h-28.26V4.42h84.96V28.64h-28.26V124.2h-28.43V28.64Z%22%20fill%3D%22%23000f66%22%20stroke%3D%22aqua%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M335.5%2C122.35c-3.59-3.25-5.95-7.63-7.07-13.12l-5.05-21.37c-.79-2.92-2.19-5.3-4.21-7.15s-4.26-2.78-6.73-2.78h-10.09v46.26h-28.26V4.42h46.1c8.86%2C0%2C16.6%2C1.54%2C23.22%2C4.63%2C6.62%2C3.09%2C11.72%2C7.46%2C15.31%2C13.12%2C3.59%2C5.66%2C5.38%2C12.31%2C5.38%2C19.94%2C0%2C7.18-2.08%2C13.6-6.22%2C19.26-4.15%2C5.67-9.76%2C9.51-16.82%2C11.52v.17c2.8%2C1.24%2C4.96%2C3%2C6.48%2C5.3%2C1.51%2C2.3%2C2.66%2C5.13%2C3.45%2C8.5l3.53%2C15.48c.67%2C3.7%2C2.19%2C5.55%2C4.54%2C5.55%2C2.13%2C0%2C4.15-1.29%2C6.06-3.87l6.73%2C13.63c-2.8%2C2.92-6.2%2C5.24-10.18%2C6.98-3.98%2C1.74-8.05%2C2.61-12.2%2C2.61-5.72%2C0-10.38-1.63-13.96-4.88Zm-16.82-64.26c5.05%2C0%2C9.14-1.46%2C12.28-4.37%2C3.14-2.92%2C4.71-6.78%2C4.71-11.61%2C0-5.16-1.54-9.17-4.63-12.03-3.09-2.86-7.21-4.29-12.37-4.29h-16.32V58.08h16.32Z%22%20fill%3D%22%23000f66%22%20stroke%3D%22aqua%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M396.23%2C119.74c-8.52-5.21-15.14-12.62-19.85-22.21-4.71-9.59-7.07-20.66-7.07-33.23s2.36-23.64%2C7.07-33.23c4.71-9.59%2C11.33-16.99%2C19.85-22.21%2C8.52-5.21%2C18.45-7.82%2C29.78-7.82s21.28%2C2.61%2C29.86%2C7.82c8.58%2C5.22%2C15.22%2C12.59%2C19.94%2C22.12%2C4.71%2C9.53%2C7.07%2C20.58%2C7.07%2C33.14s-2.36%2C23.8-7.07%2C33.39c-4.71%2C9.59-11.36%2C16.99-19.94%2C22.21s-18.53%2C7.82-29.86%2C7.82-21.26-2.61-29.78-7.82Zm50.47-27c5.16-7.07%2C7.74-16.54%2C7.74-28.43s-2.58-21.37-7.74-28.43c-5.16-7.07-12.06-10.6-20.69-10.6s-15.51%2C3.53-20.61%2C10.6c-5.1%2C7.07-7.65%2C16.54-7.65%2C28.43s2.55%2C21.37%2C7.65%2C28.43c5.1%2C7.07%2C11.97%2C10.6%2C20.61%2C10.6s15.53-3.53%2C20.69-10.6Z%22%20fill%3D%22%23000f66%22%20stroke%3D%22aqua%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M489.26%2C4.42h28.26V99.97h37.68v24.23h-65.95V4.42Z%22%20fill%3D%22%23000f66%22%20stroke%3D%22aqua%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M580.28%2C119.74c-8.52-5.21-15.14-12.62-19.85-22.21-4.71-9.59-7.07-20.66-7.07-33.23s2.36-23.64%2C7.07-33.23c4.71-9.59%2C11.33-16.99%2C19.85-22.21%2C8.52-5.21%2C18.45-7.82%2C29.78-7.82s21.28%2C2.61%2C29.86%2C7.82c8.58%2C5.22%2C15.22%2C12.59%2C19.94%2C22.12%2C4.71%2C9.53%2C7.07%2C20.58%2C7.07%2C33.14s-2.36%2C23.8-7.07%2C33.39c-4.71%2C9.59-11.36%2C16.99-19.94%2C22.21s-18.53%2C7.82-29.86%2C7.82-21.26-2.61-29.78-7.82Zm50.47-27c5.16-7.07%2C7.74-16.54%2C7.74-28.43s-2.58-21.37-7.74-28.43c-5.16-7.07-12.06-10.6-20.69-10.6s-15.51%2C3.53-20.61%2C10.6c-5.1%2C7.07-7.65%2C16.54-7.65%2C28.43s2.55%2C21.37%2C7.65%2C28.43c5.1%2C7.07%2C11.97%2C10.6%2C20.61%2C10.6s15.53-3.53%2C20.69-10.6Z%22%20fill%3D%22%23000f66%22%20stroke%3D%22aqua%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M693.75%2C119.65c-7.68-5.05-13.6-12.31-17.75-21.79-4.15-9.48-6.22-20.66-6.22-33.56s2.21-24.25%2C6.65-33.73c4.43-9.48%2C10.77-16.77%2C19.01-21.87%2C8.24-5.1%2C17.97-7.65%2C29.19-7.65s21.53%2C3.28%2C29.95%2C9.84c8.41%2C6.56%2C14.19%2C15.56%2C17.33%2C27l-26.58%2C5.72c-1.8-5.72-4.54-10.2-8.24-13.46-3.7-3.25-7.96-4.88-12.79-4.88-8.08%2C0-14.44%2C3.42-19.09%2C10.26-4.66%2C6.84-6.98%2C16.21-6.98%2C28.09s2.63%2C21.84%2C7.91%2C28.85c5.27%2C7.01%2C12.5%2C10.51%2C21.7%2C10.51%2C8.19%2C0%2C14.66-2.49%2C19.43-7.49%2C4.77-4.99%2C7.26-11.92%2C7.49-20.78h-37.18v-18.51h64.26V124.2h-20.86l-1.68-18.67h-.17c-3.93%2C6.73-9.31%2C12.03-16.15%2C15.9-6.84%2C3.87-14.19%2C5.8-22.04%2C5.8-10.43%2C0-19.49-2.52-27.17-7.57Z%22%20fill%3D%22%23000f66%22%20stroke%3D%22aqua%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M789.56%2C4.42h28.26V124.2h-28.26V4.42Z%22%20fill%3D%22%23000f66%22%20stroke%3D%22aqua%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M827.74%2C4.42h68.81V27.13h-41.55v25.57h34.82v20.19h-34.82v28.6h43.24v22.71h-70.49V4.42Z%22%20fill%3D%22%23000f66%22%20stroke%3D%22aqua%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M43.24%2C15.29h35.5l34.66%2C119.78h-28.43l-5.89-23.72H42.91l-6.22%2C23.72H8.76L43.24%2C15.29Zm31.8%2C75.54l-13.63-52.15h-.34l-14.13%2C52.15h28.09Z%22%20fill%3D%22aqua%22%20stroke%3D%22%23000f66%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M130.73%2C133.38c-6.84-3.36-12.17-8.13-15.98-14.3-3.81-6.17-5.78-13.34-5.89-21.53l26.24-4.21c0%2C7.07%2C1.96%2C12.73%2C5.89%2C16.99%2C3.92%2C4.26%2C8.92%2C6.39%2C14.97%2C6.39%2C4.82%2C0%2C8.72-1.29%2C11.69-3.87%2C2.97-2.58%2C4.46-5.89%2C4.46-9.92%2C0-3.37-1.15-6.2-3.45-8.5-2.3-2.3-6.03-4.34-11.19-6.14l-14.64-4.71c-10.66-3.25-18.37-7.68-23.13-13.29-4.77-5.61-7.15-13.01-7.15-22.21%2C0-10.88%2C3.53-19.63%2C10.6-26.24%2C7.07-6.62%2C16.99-9.93%2C29.78-9.93%2C11.89%2C0%2C21.48%2C3.23%2C28.77%2C9.67%2C7.29%2C6.45%2C11.05%2C15.17%2C11.27%2C26.16l-25.57%2C4.88c.11-5.83-1.24-10.51-4.04-14.05-2.8-3.53-6.45-5.3-10.94-5.3-3.93%2C0-7.12%2C1.21-9.59%2C3.62-2.47%2C2.41-3.7%2C5.47-3.7%2C9.17s1.15%2C6.54%2C3.45%2C8.83c2.3%2C2.3%2C6.08%2C4.23%2C11.36%2C5.8l13.96%2C4.71c10.88%2C3.25%2C18.76%2C7.66%2C23.64%2C13.21s7.32%2C12.93%2C7.32%2C22.12c0%2C7.29-1.74%2C13.79-5.22%2C19.51-3.48%2C5.72-8.52%2C10.18-15.14%2C13.38-6.62%2C3.2-14.58%2C4.79-23.89%2C4.79s-17.05-1.68-23.89-5.05Z%22%20fill%3D%22aqua%22%20stroke%3D%22%23000f66%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M220.39%2C39.51h-28.26V15.29h84.96v24.23h-28.26v95.56h-28.43V39.51Z%22%20fill%3D%22aqua%22%20stroke%3D%22%23000f66%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M342.86%2C133.22c-3.59-3.25-5.95-7.63-7.07-13.12l-5.05-21.37c-.79-2.92-2.19-5.3-4.21-7.15s-4.26-2.78-6.73-2.78h-10.09v46.26h-28.26V15.29h46.1c8.86%2C0%2C16.6%2C1.54%2C23.22%2C4.63%2C6.62%2C3.09%2C11.72%2C7.46%2C15.31%2C13.12%2C3.59%2C5.66%2C5.38%2C12.31%2C5.38%2C19.94%2C0%2C7.18-2.08%2C13.6-6.22%2C19.26-4.15%2C5.67-9.76%2C9.51-16.82%2C11.52v.17c2.8%2C1.24%2C4.96%2C3%2C6.48%2C5.3%2C1.51%2C2.3%2C2.66%2C5.13%2C3.45%2C8.5l3.53%2C15.48c.67%2C3.7%2C2.19%2C5.55%2C4.54%2C5.55%2C2.13%2C0%2C4.15-1.29%2C6.06-3.87l6.73%2C13.63c-2.8%2C2.92-6.2%2C5.24-10.18%2C6.98-3.98%2C1.74-8.05%2C2.61-12.2%2C2.61-5.72%2C0-10.38-1.63-13.96-4.88Zm-16.82-64.26c5.05%2C0%2C9.14-1.46%2C12.28-4.37%2C3.14-2.92%2C4.71-6.78%2C4.71-11.61%2C0-5.16-1.54-9.17-4.63-12.03-3.09-2.86-7.21-4.29-12.37-4.29h-16.32v32.3h16.32Z%22%20fill%3D%22aqua%22%20stroke%3D%22%23000f66%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M403.59%2C130.61c-8.52-5.21-15.14-12.62-19.85-22.21-4.71-9.59-7.07-20.66-7.07-33.23s2.36-23.64%2C7.07-33.23c4.71-9.59%2C11.33-16.99%2C19.85-22.21%2C8.52-5.21%2C18.45-7.82%2C29.78-7.82s21.28%2C2.61%2C29.86%2C7.82c8.58%2C5.22%2C15.22%2C12.59%2C19.94%2C22.12%2C4.71%2C9.53%2C7.07%2C20.58%2C7.07%2C33.14s-2.36%2C23.8-7.07%2C33.39c-4.71%2C9.59-11.36%2C16.99-19.94%2C22.21s-18.53%2C7.82-29.86%2C7.82-21.26-2.61-29.78-7.82Zm50.47-27c5.16-7.07%2C7.74-16.54%2C7.74-28.43s-2.58-21.37-7.74-28.43c-5.16-7.07-12.06-10.6-20.69-10.6s-15.51%2C3.53-20.61%2C10.6c-5.1%2C7.07-7.65%2C16.54-7.65%2C28.43s2.55%2C21.37%2C7.65%2C28.43c5.1%2C7.07%2C11.97%2C10.6%2C20.61%2C10.6s15.53-3.53%2C20.69-10.6Z%22%20fill%3D%22aqua%22%20stroke%3D%22%23000f66%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M496.62%2C15.29h28.26V110.84h37.68v24.23h-65.95V15.29Z%22%20fill%3D%22aqua%22%20stroke%3D%22%23000f66%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M587.64%2C130.61c-8.52-5.21-15.14-12.62-19.85-22.21-4.71-9.59-7.07-20.66-7.07-33.23s2.36-23.64%2C7.07-33.23c4.71-9.59%2C11.33-16.99%2C19.85-22.21%2C8.52-5.21%2C18.45-7.82%2C29.78-7.82s21.28%2C2.61%2C29.86%2C7.82c8.58%2C5.22%2C15.22%2C12.59%2C19.94%2C22.12%2C4.71%2C9.53%2C7.07%2C20.58%2C7.07%2C33.14s-2.36%2C23.8-7.07%2C33.39c-4.71%2C9.59-11.36%2C16.99-19.94%2C22.21s-18.53%2C7.82-29.86%2C7.82-21.26-2.61-29.78-7.82Zm50.47-27c5.16-7.07%2C7.74-16.54%2C7.74-28.43s-2.58-21.37-7.74-28.43c-5.16-7.07-12.06-10.6-20.69-10.6s-15.51%2C3.53-20.61%2C10.6c-5.1%2C7.07-7.65%2C16.54-7.65%2C28.43s2.55%2C21.37%2C7.65%2C28.43c5.1%2C7.07%2C11.97%2C10.6%2C20.61%2C10.6s15.53-3.53%2C20.69-10.6Z%22%20fill%3D%22aqua%22%20stroke%3D%22%23000f66%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M701.11%2C130.53c-7.68-5.05-13.6-12.31-17.75-21.79-4.15-9.48-6.22-20.66-6.22-33.56s2.21-24.25%2C6.65-33.73c4.43-9.48%2C10.77-16.77%2C19.01-21.87%2C8.24-5.1%2C17.97-7.65%2C29.19-7.65s21.53%2C3.28%2C29.95%2C9.84c8.41%2C6.56%2C14.19%2C15.56%2C17.33%2C27l-26.58%2C5.72c-1.8-5.72-4.54-10.2-8.24-13.46-3.7-3.25-7.96-4.88-12.79-4.88-8.08%2C0-14.44%2C3.42-19.09%2C10.26-4.66%2C6.84-6.98%2C16.21-6.98%2C28.09s2.63%2C21.84%2C7.91%2C28.85c5.27%2C7.01%2C12.5%2C10.51%2C21.7%2C10.51%2C8.19%2C0%2C14.66-2.49%2C19.43-7.49%2C4.77-4.99%2C7.26-11.92%2C7.49-20.78h-37.18v-18.51h64.26v67.97h-20.86l-1.68-18.67h-.17c-3.93%2C6.73-9.31%2C12.03-16.15%2C15.9-6.84%2C3.87-14.19%2C5.8-22.04%2C5.8-10.43%2C0-19.49-2.52-27.17-7.57Z%22%20fill%3D%22aqua%22%20stroke%3D%22%23000f66%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M796.92%2C15.29h28.26v119.78h-28.26V15.29Z%22%20fill%3D%22aqua%22%20stroke%3D%22%23000f66%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M835.1%2C15.29h68.81v22.71h-41.55v25.57h34.82v20.19h-34.82v28.6h43.24v22.71h-70.49V15.29Z%22%20fill%3D%22aqua%22%20stroke%3D%22%23000f66%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%222.1%22%2F%3E%3C%2Fsvg%3E";
|
|
494
483
|
|
|
@@ -512,7 +501,6 @@ var stopDragEventsPropagation = {
|
|
|
512
501
|
return e.stopPropagation();
|
|
513
502
|
}
|
|
514
503
|
};
|
|
515
|
-
|
|
516
504
|
var mouseBlocker = _objectSpread__default["default"](_objectSpread__default["default"]({}, stopDragEventsPropagation), {}, {
|
|
517
505
|
onClick: function onClick(e) {
|
|
518
506
|
return e.stopPropagation();
|
|
@@ -527,7 +515,6 @@ var mouseBlocker = _objectSpread__default["default"](_objectSpread__default["def
|
|
|
527
515
|
cursor: 'default'
|
|
528
516
|
}
|
|
529
517
|
});
|
|
530
|
-
|
|
531
518
|
var propTypes = {
|
|
532
519
|
defaultSigns: PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
|
|
533
520
|
id: PropTypes__default["default"].string,
|
|
@@ -568,34 +555,29 @@ var defaultProps = {
|
|
|
568
555
|
type: 'horoscope',
|
|
569
556
|
className: null
|
|
570
557
|
};
|
|
571
|
-
|
|
572
558
|
var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
573
559
|
var _ref7;
|
|
574
|
-
|
|
575
560
|
var defaultSigns = _ref.defaultSigns,
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
561
|
+
signsValue = _ref.signs,
|
|
562
|
+
title = _ref.title,
|
|
563
|
+
description = _ref.description,
|
|
564
|
+
author = _ref.author,
|
|
565
|
+
button = _ref.button,
|
|
566
|
+
signSubtitle = _ref.signSubtitle,
|
|
567
|
+
spacing = _ref.spacing,
|
|
568
|
+
background = _ref.background,
|
|
569
|
+
popupBackground = _ref.popupBackground,
|
|
570
|
+
current = _ref.current,
|
|
571
|
+
active = _ref.active,
|
|
572
|
+
type = _ref.type,
|
|
573
|
+
className = _ref.className;
|
|
589
574
|
var intl = reactIntl.useIntl();
|
|
590
575
|
var trackScreenEvent = hooks.useTrackScreenEvent(type);
|
|
591
|
-
|
|
592
576
|
var _useViewerInteraction = contexts.useViewerInteraction(),
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
577
|
+
enableInteraction = _useViewerInteraction.enableInteraction,
|
|
578
|
+
disableInteraction = _useViewerInteraction.disableInteraction;
|
|
596
579
|
var _usePlaybackContext = contexts.usePlaybackContext(),
|
|
597
|
-
|
|
598
|
-
|
|
580
|
+
muted = _usePlaybackContext.muted;
|
|
599
581
|
var mediaRef = contexts.usePlaybackMediaRef(current);
|
|
600
582
|
var hasAuthor = author !== null && utils.isTextFilled(author.name);
|
|
601
583
|
var signs = React.useMemo(function () {
|
|
@@ -606,51 +588,41 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
606
588
|
}) || signsValue[index] : null), defaultSign);
|
|
607
589
|
});
|
|
608
590
|
}, [signsValue]);
|
|
609
|
-
|
|
610
591
|
var _useScreenSize = contexts.useScreenSize(),
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
592
|
+
width = _useScreenSize.width,
|
|
593
|
+
height = _useScreenSize.height,
|
|
594
|
+
resolution = _useScreenSize.resolution;
|
|
615
595
|
var _useViewerContext = contexts.useViewerContext(),
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
596
|
+
viewerTopHeight = _useViewerContext.topHeight,
|
|
597
|
+
viewerBottomHeight = _useViewerContext.bottomHeight;
|
|
619
598
|
var _useScreenRenderConte = contexts.useScreenRenderContext(),
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
599
|
+
isView = _useScreenRenderConte.isView,
|
|
600
|
+
isPreview = _useScreenRenderConte.isPreview,
|
|
601
|
+
isPlaceholder = _useScreenRenderConte.isPlaceholder,
|
|
602
|
+
isEdit = _useScreenRenderConte.isEdit;
|
|
625
603
|
var hasTitle = utils.isTextFilled(title);
|
|
626
604
|
var hasDescription = utils.isTextFilled(description);
|
|
627
605
|
var hasButton = utils.isTextFilled(button);
|
|
628
606
|
var backgroundPlaying = current && (isView || isEdit);
|
|
629
607
|
var mediaShouldLoad = !isPlaceholder && (current || active);
|
|
630
|
-
|
|
631
608
|
var _useState = React.useState(false),
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
609
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
610
|
+
showSignsGrid = _useState2[0],
|
|
611
|
+
setShowSignsGrid = _useState2[1];
|
|
636
612
|
var _useState3 = React.useState(null),
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
613
|
+
_useState4 = _slicedToArray__default["default"](_useState3, 2),
|
|
614
|
+
selectedSign = _useState4[0],
|
|
615
|
+
setSelectedSign = _useState4[1];
|
|
641
616
|
var _useState5 = React.useState(false),
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
617
|
+
_useState6 = _slicedToArray__default["default"](_useState5, 2),
|
|
618
|
+
showModal = _useState6[0],
|
|
619
|
+
setShowModal = _useState6[1];
|
|
646
620
|
var _ref3 = popupBackground || {},
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
621
|
+
_ref3$video = _ref3.video,
|
|
622
|
+
video = _ref3$video === void 0 ? null : _ref3$video;
|
|
650
623
|
var _ref4 = video || {},
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
624
|
+
_ref4$url = _ref4.url,
|
|
625
|
+
popupBackgroundUrl = _ref4$url === void 0 ? null : _ref4$url;
|
|
654
626
|
var onOpenSignsGrid = React.useCallback(function () {
|
|
655
627
|
setShowSignsGrid(true);
|
|
656
628
|
disableInteraction();
|
|
@@ -659,7 +631,6 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
659
631
|
var onCloseSignsGrid = React.useCallback(function () {
|
|
660
632
|
setShowSignsGrid(false);
|
|
661
633
|
setShowModal(0); // can't have a modal if signs are closed
|
|
662
|
-
|
|
663
634
|
enableInteraction();
|
|
664
635
|
trackScreenEvent('close');
|
|
665
636
|
}, [setShowSignsGrid, setShowModal, enableInteraction, trackScreenEvent]);
|
|
@@ -678,76 +649,64 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
678
649
|
}, [setShowModal, trackScreenEvent]);
|
|
679
650
|
var computeSignsGridProgress = React.useCallback(function (_ref5) {
|
|
680
651
|
var dragActive = _ref5.active,
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
652
|
+
_ref5$movement = _slicedToArray__default["default"](_ref5.movement, 2),
|
|
653
|
+
my = _ref5$movement[1],
|
|
654
|
+
_ref5$velocity = _slicedToArray__default["default"](_ref5.velocity, 2),
|
|
655
|
+
vy = _ref5$velocity[1];
|
|
686
656
|
var progress = Math.max(0, my) / (window.innerHeight * 0.8);
|
|
687
657
|
var reachedThreshold = vy > 0.3 || Math.abs(progress) > 0.3;
|
|
688
|
-
|
|
689
658
|
if (!dragActive) {
|
|
690
659
|
if (reachedThreshold) {
|
|
691
660
|
onCloseSignsGrid();
|
|
692
661
|
}
|
|
693
|
-
|
|
694
662
|
return reachedThreshold ? 0 : 1;
|
|
695
663
|
}
|
|
696
|
-
|
|
697
664
|
return 1 - progress;
|
|
698
665
|
}, [onOpenSignsGrid, onCloseSignsGrid]);
|
|
699
|
-
|
|
700
666
|
var _useDragProgress = hooks.useDragProgress({
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
667
|
+
disabled: !isView,
|
|
668
|
+
progress: showSignsGrid ? 1 : 0,
|
|
669
|
+
computeProgress: computeSignsGridProgress,
|
|
670
|
+
springParams: {
|
|
671
|
+
config: {
|
|
672
|
+
tension: 300,
|
|
673
|
+
friction: 30
|
|
674
|
+
}
|
|
708
675
|
}
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
showSignsGridProgress = _useDragProgress.progress;
|
|
713
|
-
|
|
676
|
+
}),
|
|
677
|
+
bindSignsDrag = _useDragProgress.bind,
|
|
678
|
+
showSignsGridProgress = _useDragProgress.progress;
|
|
714
679
|
var computeModalProgress = React.useCallback(function (_ref6) {
|
|
715
680
|
var dragActive = _ref6.active,
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
681
|
+
_ref6$movement = _slicedToArray__default["default"](_ref6.movement, 2),
|
|
682
|
+
my = _ref6$movement[1],
|
|
683
|
+
_ref6$velocity = _slicedToArray__default["default"](_ref6.velocity, 2),
|
|
684
|
+
vy = _ref6$velocity[1];
|
|
721
685
|
var damper = 0.5;
|
|
722
686
|
var p = Math.max(0, my) / window.innerHeight;
|
|
723
687
|
var progress = p * damper;
|
|
724
688
|
var reachedThreshold = vy > 0.3 || Math.abs(p) > 0.3;
|
|
725
|
-
|
|
726
689
|
if (!dragActive) {
|
|
727
690
|
if (reachedThreshold) {
|
|
728
691
|
onCloseModal();
|
|
729
692
|
}
|
|
730
|
-
|
|
731
693
|
return reachedThreshold ? 0 : 1;
|
|
732
694
|
}
|
|
733
|
-
|
|
734
695
|
return 1 - progress;
|
|
735
696
|
}, [onCloseModal]);
|
|
736
|
-
|
|
737
697
|
var _useDragProgress2 = hooks.useDragProgress({
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
698
|
+
disabled: !isView,
|
|
699
|
+
progress: showModal ? 1 : 0,
|
|
700
|
+
computeProgress: computeModalProgress,
|
|
701
|
+
springParams: {
|
|
702
|
+
config: {
|
|
703
|
+
tension: 300,
|
|
704
|
+
friction: 30
|
|
705
|
+
}
|
|
745
706
|
}
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
showModalProgress = _useDragProgress2.progress;
|
|
750
|
-
|
|
707
|
+
}),
|
|
708
|
+
bindModalDrag = _useDragProgress2.bind,
|
|
709
|
+
showModalProgress = _useDragProgress2.progress;
|
|
751
710
|
var getHeaderStyles = function getHeaderStyles(spring) {
|
|
752
711
|
return {
|
|
753
712
|
transform: spring.to(function (p) {
|
|
@@ -758,7 +717,6 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
758
717
|
})
|
|
759
718
|
};
|
|
760
719
|
};
|
|
761
|
-
|
|
762
720
|
var getSignsContainerStyles = function getSignsContainerStyles(spring) {
|
|
763
721
|
return {
|
|
764
722
|
opacity: spring,
|
|
@@ -767,7 +725,6 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
767
725
|
})
|
|
768
726
|
};
|
|
769
727
|
};
|
|
770
|
-
|
|
771
728
|
var getSignStyles = function getSignStyles(spring) {
|
|
772
729
|
return {
|
|
773
730
|
opacity: spring,
|
|
@@ -776,7 +733,6 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
776
733
|
})
|
|
777
734
|
};
|
|
778
735
|
};
|
|
779
|
-
|
|
780
736
|
var getAuthorStyles = function getAuthorStyles(spring) {
|
|
781
737
|
return {
|
|
782
738
|
transform: spring.to(function (p) {
|
|
@@ -785,13 +741,11 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
785
741
|
opacity: spring
|
|
786
742
|
};
|
|
787
743
|
};
|
|
788
|
-
|
|
789
744
|
var getBackdropStyles = function getBackdropStyles(spring) {
|
|
790
745
|
return {
|
|
791
746
|
opacity: spring
|
|
792
747
|
};
|
|
793
748
|
};
|
|
794
|
-
|
|
795
749
|
var getModalStyles = function getModalStyles(spring) {
|
|
796
750
|
return {
|
|
797
751
|
transform: spring.to(function (p) {
|
|
@@ -801,24 +755,21 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
801
755
|
return p < 0.1 ? 'none' : 'auto';
|
|
802
756
|
})
|
|
803
757
|
};
|
|
804
|
-
};
|
|
805
|
-
|
|
758
|
+
};
|
|
806
759
|
|
|
760
|
+
// for editor purposes
|
|
807
761
|
var screenState = contexts.useScreenState();
|
|
808
762
|
React.useEffect(function () {
|
|
809
763
|
setShowSignsGrid(0);
|
|
810
|
-
|
|
811
764
|
if (screenState === null || screenState === 'intro') {
|
|
812
765
|
setShowSignsGrid(0);
|
|
813
766
|
setShowModal(0);
|
|
814
767
|
}
|
|
815
|
-
|
|
816
768
|
if (screenState === 'grid') {
|
|
817
769
|
setShowSignsGrid(1);
|
|
818
770
|
setSelectedSign(null);
|
|
819
771
|
setShowModal(0);
|
|
820
772
|
}
|
|
821
|
-
|
|
822
773
|
if (screenState !== null && screenState.includes('signs')) {
|
|
823
774
|
var index = screenState.split('.').pop();
|
|
824
775
|
setShowSignsGrid(1);
|
|
@@ -833,13 +784,11 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
833
784
|
onCloseModal();
|
|
834
785
|
return;
|
|
835
786
|
}
|
|
836
|
-
|
|
837
787
|
if (showSignsGrid) {
|
|
838
788
|
onCloseSignsGrid();
|
|
839
789
|
}
|
|
840
790
|
}
|
|
841
791
|
};
|
|
842
|
-
|
|
843
792
|
document.addEventListener('keyup', keyup);
|
|
844
793
|
return function () {
|
|
845
794
|
document.removeEventListener('keyup', keyup);
|
|
@@ -943,9 +892,8 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
943
892
|
spacing: 5,
|
|
944
893
|
items: signs.map(function (sign) {
|
|
945
894
|
var _ref8 = sign || {},
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
895
|
+
_ref8$id = _ref8.id,
|
|
896
|
+
id = _ref8$id === void 0 ? null : _ref8$id;
|
|
949
897
|
return /*#__PURE__*/React__default["default"].createElement(web.animated.div, {
|
|
950
898
|
key: id,
|
|
951
899
|
className: styles.sign,
|
|
@@ -1009,7 +957,6 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
1009
957
|
className: styles.background
|
|
1010
958
|
}) : null);
|
|
1011
959
|
};
|
|
1012
|
-
|
|
1013
960
|
UrbaniaHoroscope.propTypes = propTypes;
|
|
1014
961
|
UrbaniaHoroscope.defaultProps = defaultProps;
|
|
1015
962
|
var UrbaniaHoroscope$1 = /*#__PURE__*/React__default["default"].memo(UrbaniaHoroscope);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-urbania-horoscope",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.318",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -50,31 +50,31 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@babel/runtime": "^7.13.10",
|
|
53
|
-
"@micromag/core": "^0.3.
|
|
54
|
-
"@micromag/element-background": "^0.3.
|
|
55
|
-
"@micromag/element-button": "^0.3.
|
|
56
|
-
"@micromag/element-call-to-action": "^0.3.
|
|
57
|
-
"@micromag/element-container": "^0.3.
|
|
58
|
-
"@micromag/element-grid": "^0.3.
|
|
59
|
-
"@micromag/element-heading": "^0.3.
|
|
60
|
-
"@micromag/element-keypad": "^0.3.
|
|
61
|
-
"@micromag/element-layout": "^0.3.
|
|
62
|
-
"@micromag/element-scroll": "^0.3.
|
|
63
|
-
"@micromag/element-text": "^0.3.
|
|
64
|
-
"@micromag/element-urbania-author": "^0.3.
|
|
65
|
-
"@micromag/transforms": "^0.3.
|
|
66
|
-
"@react-spring/core": "^9.
|
|
67
|
-
"@react-spring/web": "^9.
|
|
53
|
+
"@micromag/core": "^0.3.318",
|
|
54
|
+
"@micromag/element-background": "^0.3.318",
|
|
55
|
+
"@micromag/element-button": "^0.3.318",
|
|
56
|
+
"@micromag/element-call-to-action": "^0.3.318",
|
|
57
|
+
"@micromag/element-container": "^0.3.318",
|
|
58
|
+
"@micromag/element-grid": "^0.3.318",
|
|
59
|
+
"@micromag/element-heading": "^0.3.318",
|
|
60
|
+
"@micromag/element-keypad": "^0.3.318",
|
|
61
|
+
"@micromag/element-layout": "^0.3.318",
|
|
62
|
+
"@micromag/element-scroll": "^0.3.318",
|
|
63
|
+
"@micromag/element-text": "^0.3.318",
|
|
64
|
+
"@micromag/element-urbania-author": "^0.3.318",
|
|
65
|
+
"@micromag/transforms": "^0.3.318",
|
|
66
|
+
"@react-spring/core": "^9.6.1",
|
|
67
|
+
"@react-spring/web": "^9.6.1",
|
|
68
68
|
"@use-gesture/react": "^10.2.4",
|
|
69
69
|
"classnames": "^2.2.6",
|
|
70
70
|
"lodash": "^4.17.21",
|
|
71
71
|
"prop-types": "^15.7.2",
|
|
72
72
|
"react-intl": "^5.12.1",
|
|
73
73
|
"react-transition-group": "^4.4.2",
|
|
74
|
-
"uuid": "^
|
|
74
|
+
"uuid": "^9.0.0"
|
|
75
75
|
},
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "7d1a296e0c0d410e1225279e1f19e3a7715bfa96"
|
|
80
80
|
}
|