@micromag/viewer 0.3.426 → 0.3.429
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 +15 -15
- package/es/index.js +12 -21
- package/lib/index.js +457 -482
- package/package.json +15 -12
package/lib/index.js
CHANGED
|
@@ -31,26 +31,10 @@ var ShareOptions = require('@micromag/element-share-options');
|
|
|
31
31
|
var react = require('@use-gesture/react');
|
|
32
32
|
var WebView = require('@micromag/element-webview');
|
|
33
33
|
|
|
34
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
35
|
-
|
|
36
|
-
var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread);
|
|
37
|
-
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
38
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
39
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
40
|
-
var fieldsManager__default = /*#__PURE__*/_interopDefaultLegacy(fieldsManager);
|
|
41
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
42
|
-
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
43
|
-
var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
|
|
44
|
-
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
45
|
-
var EventEmitter__default = /*#__PURE__*/_interopDefaultLegacy(EventEmitter);
|
|
46
|
-
var Scroll__default = /*#__PURE__*/_interopDefaultLegacy(Scroll);
|
|
47
|
-
var ShareOptions__default = /*#__PURE__*/_interopDefaultLegacy(ShareOptions);
|
|
48
|
-
var WebView__default = /*#__PURE__*/_interopDefaultLegacy(WebView);
|
|
49
|
-
|
|
50
34
|
// eslint-disable-next-line import/prefer-default-export
|
|
51
|
-
var routes =
|
|
52
|
-
home:
|
|
53
|
-
screen:
|
|
35
|
+
var routes = PropTypes.shape({
|
|
36
|
+
home: PropTypes.string.isRequired,
|
|
37
|
+
screen: PropTypes.string.isRequired
|
|
54
38
|
});
|
|
55
39
|
|
|
56
40
|
function useKeyboardShortcuts() {
|
|
@@ -137,9 +121,9 @@ function useScreenInteraction() {
|
|
|
137
121
|
onNavigate = _ref$onNavigate === void 0 ? null : _ref$onNavigate;
|
|
138
122
|
var _useState = React.useState(screens.reduce(function (map, _ref2) {
|
|
139
123
|
var id = _ref2.id;
|
|
140
|
-
return
|
|
124
|
+
return _objectSpread(_objectSpread({}, map), {}, _defineProperty({}, id, true));
|
|
141
125
|
}, {})),
|
|
142
|
-
_useState2 =
|
|
126
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
143
127
|
screensInteractionEnabled = _useState2[0],
|
|
144
128
|
setScreensInteractionEnabled = _useState2[1];
|
|
145
129
|
var _ref3 = screens[screenIndex] || {},
|
|
@@ -153,7 +137,7 @@ function useScreenInteraction() {
|
|
|
153
137
|
if (currentValue !== newValue) {
|
|
154
138
|
setScreensInteractionEnabled(screens.reduce(function (map, _ref4) {
|
|
155
139
|
var id = _ref4.id;
|
|
156
|
-
return screenId === id ?
|
|
140
|
+
return screenId === id ? _objectSpread(_objectSpread({}, map), {}, _defineProperty({}, id, newValue)) : _objectSpread(_objectSpread({}, map), {}, _defineProperty({}, id, typeof screensInteractionEnabled[id] === 'undefined' || screensInteractionEnabled[id] === true));
|
|
157
141
|
}, {}));
|
|
158
142
|
}
|
|
159
143
|
}, [screens, screenId, screensInteractionEnabled, setScreensInteractionEnabled]);
|
|
@@ -219,30 +203,30 @@ var styles$g = {"container":"micromag-viewer-buttons-button-container","asLink":
|
|
|
219
203
|
|
|
220
204
|
var _excluded$9 = ["type", "theme", "size", "href", "external", "direct", "target", "label", "children", "focusable", "active", "icon", "iconPosition", "disabled", "loading", "disableOnLoading", "withoutTheme", "asLink", "onClick", "className", "iconClassName", "labelClassName", "refButton"];
|
|
221
205
|
var propTypes$n = {
|
|
222
|
-
type:
|
|
206
|
+
type: PropTypes.string,
|
|
223
207
|
theme: core.PropTypes.buttonTheme,
|
|
224
208
|
size: core.PropTypes.buttonSize,
|
|
225
|
-
href:
|
|
226
|
-
external:
|
|
227
|
-
direct:
|
|
228
|
-
target:
|
|
209
|
+
href: PropTypes.string,
|
|
210
|
+
external: PropTypes.bool,
|
|
211
|
+
direct: PropTypes.bool,
|
|
212
|
+
target: PropTypes.string,
|
|
229
213
|
label: core.PropTypes.label,
|
|
230
214
|
children: core.PropTypes.label,
|
|
231
|
-
focusable:
|
|
232
|
-
active:
|
|
233
|
-
icon:
|
|
234
|
-
iconPosition:
|
|
235
|
-
disabled:
|
|
236
|
-
loading:
|
|
237
|
-
disableOnLoading:
|
|
238
|
-
withoutTheme:
|
|
239
|
-
asLink:
|
|
240
|
-
className:
|
|
241
|
-
iconClassName:
|
|
242
|
-
labelClassName:
|
|
243
|
-
onClick:
|
|
244
|
-
refButton:
|
|
245
|
-
current:
|
|
215
|
+
focusable: PropTypes.bool,
|
|
216
|
+
active: PropTypes.bool,
|
|
217
|
+
icon: PropTypes.node,
|
|
218
|
+
iconPosition: PropTypes.oneOf(['left', 'right', 'inline']),
|
|
219
|
+
disabled: PropTypes.bool,
|
|
220
|
+
loading: PropTypes.bool,
|
|
221
|
+
disableOnLoading: PropTypes.bool,
|
|
222
|
+
withoutTheme: PropTypes.bool,
|
|
223
|
+
asLink: PropTypes.bool,
|
|
224
|
+
className: PropTypes.string,
|
|
225
|
+
iconClassName: PropTypes.string,
|
|
226
|
+
labelClassName: PropTypes.string,
|
|
227
|
+
onClick: PropTypes.func,
|
|
228
|
+
refButton: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
229
|
+
current: PropTypes.any // eslint-disable-line
|
|
246
230
|
})])
|
|
247
231
|
};
|
|
248
232
|
|
|
@@ -272,7 +256,6 @@ var defaultProps$n = {
|
|
|
272
256
|
refButton: null
|
|
273
257
|
};
|
|
274
258
|
var Button = function Button(_ref) {
|
|
275
|
-
var _ref2;
|
|
276
259
|
var type = _ref.type,
|
|
277
260
|
theme = _ref.theme;
|
|
278
261
|
_ref.size;
|
|
@@ -296,14 +279,14 @@ var Button = function Button(_ref) {
|
|
|
296
279
|
iconClassName = _ref.iconClassName,
|
|
297
280
|
labelClassName = _ref.labelClassName,
|
|
298
281
|
refButton = _ref.refButton,
|
|
299
|
-
props =
|
|
282
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
300
283
|
var finalLabel = label || children;
|
|
301
|
-
var text = finalLabel !== null ? /*#__PURE__*/
|
|
284
|
+
var text = finalLabel !== null ? /*#__PURE__*/React.createElement(components.Label, null, finalLabel) : null;
|
|
302
285
|
var hasChildren = label !== null && children !== null;
|
|
303
286
|
var hasIcon = icon !== null;
|
|
304
287
|
var hasInlineIcon = hasIcon && (iconPosition === 'inline' || text === null);
|
|
305
288
|
var hasIconColumns = hasIcon && !hasInlineIcon;
|
|
306
|
-
var buttonClassNames =
|
|
289
|
+
var buttonClassNames = classNames([styles$g.container, styles$g["icon-".concat(iconPosition)], _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, styles$g.withIcon, hasIcon), styles$g.withIconColumns, hasIconColumns), styles$g.withText, text !== null), styles$g.isLink, href !== null), styles$g.asLink, asLink), styles$g.isDisabled, disabled), styles$g.isLoading, loading), className, className !== null)]);
|
|
307
290
|
var _ref3 = theme || {},
|
|
308
291
|
_ref3$colors = _ref3.colors,
|
|
309
292
|
colors = _ref3$colors === void 0 ? null : _ref3$colors;
|
|
@@ -311,23 +294,23 @@ var Button = function Button(_ref) {
|
|
|
311
294
|
_ref4$primary = _ref4.primary,
|
|
312
295
|
brandPrimaryColor = _ref4$primary === void 0 ? null : _ref4$primary;
|
|
313
296
|
var primaryColor = utils.getStyleFromColor(brandPrimaryColor, 'color');
|
|
314
|
-
var buttonStyles =
|
|
315
|
-
var content = /*#__PURE__*/
|
|
316
|
-
className:
|
|
317
|
-
}, icon), text !== null ? /*#__PURE__*/
|
|
318
|
-
className:
|
|
319
|
-
}, text) : null) : null, hasIconColumns ? /*#__PURE__*/
|
|
320
|
-
className:
|
|
321
|
-
}, icon) : null, /*#__PURE__*/
|
|
322
|
-
className:
|
|
323
|
-
}, text), iconPosition === 'right' ? /*#__PURE__*/
|
|
324
|
-
className:
|
|
297
|
+
var buttonStyles = _objectSpread({}, primaryColor);
|
|
298
|
+
var content = /*#__PURE__*/React.createElement(React.Fragment, null, hasInlineIcon ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
299
|
+
className: classNames([styles$g.icon, _defineProperty({}, iconClassName, iconClassName !== null)])
|
|
300
|
+
}, icon), text !== null ? /*#__PURE__*/React.createElement("span", {
|
|
301
|
+
className: classNames([styles$g.label, _defineProperty({}, labelClassName, labelClassName !== null)])
|
|
302
|
+
}, text) : null) : null, hasIconColumns ? /*#__PURE__*/React.createElement(React.Fragment, null, iconPosition === 'left' ? /*#__PURE__*/React.createElement("span", {
|
|
303
|
+
className: classNames([styles$g.icon, styles$g.left, _defineProperty({}, iconClassName, iconClassName !== null && iconPosition === 'left')])
|
|
304
|
+
}, icon) : null, /*#__PURE__*/React.createElement("span", {
|
|
305
|
+
className: classNames([styles$g.center, styles$g.label, _defineProperty({}, labelClassName, labelClassName !== null)])
|
|
306
|
+
}, text), iconPosition === 'right' ? /*#__PURE__*/React.createElement("span", {
|
|
307
|
+
className: classNames([styles$g.icon, styles$g.right, _defineProperty({}, iconClassName, iconClassName !== null && iconPosition === 'right')])
|
|
325
308
|
}, icon) : null, hasChildren ? children : null) : null, !hasIcon ? text : null, hasChildren ? children : null);
|
|
326
309
|
if (href !== null) {
|
|
327
|
-
var linkClassNames =
|
|
310
|
+
var linkClassNames = classNames([buttonClassNames, _defineProperty({
|
|
328
311
|
disabled: disabled
|
|
329
312
|
}, styles$g.linkDisabled, disabled)]);
|
|
330
|
-
return external || direct ? /*#__PURE__*/
|
|
313
|
+
return external || direct ? /*#__PURE__*/React.createElement("a", Object.assign({}, props, {
|
|
331
314
|
href: disabled ? null : href,
|
|
332
315
|
className: linkClassNames,
|
|
333
316
|
style: buttonStyles,
|
|
@@ -335,7 +318,7 @@ var Button = function Button(_ref) {
|
|
|
335
318
|
target: external ? target : null,
|
|
336
319
|
ref: refButton,
|
|
337
320
|
tabIndex: focusable ? '' : '-1'
|
|
338
|
-
}), content) : /*#__PURE__*/
|
|
321
|
+
}), content) : /*#__PURE__*/React.createElement(reactRouterDom.Link, Object.assign({}, props, {
|
|
339
322
|
to: href,
|
|
340
323
|
className: linkClassNames,
|
|
341
324
|
style: buttonStyles,
|
|
@@ -344,7 +327,7 @@ var Button = function Button(_ref) {
|
|
|
344
327
|
tabIndex: focusable ? '' : '-1'
|
|
345
328
|
}), content);
|
|
346
329
|
}
|
|
347
|
-
return /*#__PURE__*/
|
|
330
|
+
return /*#__PURE__*/React.createElement("button", Object.assign({}, props, {
|
|
348
331
|
type: type,
|
|
349
332
|
className: buttonClassNames,
|
|
350
333
|
style: buttonStyles,
|
|
@@ -361,8 +344,8 @@ var styles$f = {"container":"micromag-viewer-buttons-icon-button-container","lab
|
|
|
361
344
|
|
|
362
345
|
var _excluded$8 = ["iconClassName", "className"];
|
|
363
346
|
var propTypes$m = {
|
|
364
|
-
iconClassName:
|
|
365
|
-
className:
|
|
347
|
+
iconClassName: PropTypes.string,
|
|
348
|
+
className: PropTypes.string
|
|
366
349
|
};
|
|
367
350
|
var defaultProps$m = {
|
|
368
351
|
iconClassName: null,
|
|
@@ -371,11 +354,11 @@ var defaultProps$m = {
|
|
|
371
354
|
var IconButton = function IconButton(_ref) {
|
|
372
355
|
var iconClassName = _ref.iconClassName,
|
|
373
356
|
className = _ref.className,
|
|
374
|
-
props =
|
|
375
|
-
return /*#__PURE__*/
|
|
376
|
-
className:
|
|
357
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
358
|
+
return /*#__PURE__*/React.createElement(Button, Object.assign({
|
|
359
|
+
className: classNames([styles$f.container, _defineProperty({}, className, className !== null)]),
|
|
377
360
|
labelClassName: styles$f.label,
|
|
378
|
-
iconClassName:
|
|
361
|
+
iconClassName: classNames([styles$f.icon, _defineProperty({}, iconClassName, iconClassName !== null)])
|
|
379
362
|
}, props));
|
|
380
363
|
};
|
|
381
364
|
IconButton.propTypes = propTypes$m;
|
|
@@ -383,8 +366,8 @@ IconButton.defaultProps = defaultProps$m;
|
|
|
383
366
|
|
|
384
367
|
var _excluded$7 = ["single", "className"];
|
|
385
368
|
var propTypes$l = {
|
|
386
|
-
single:
|
|
387
|
-
className:
|
|
369
|
+
single: PropTypes.bool,
|
|
370
|
+
className: PropTypes.string
|
|
388
371
|
};
|
|
389
372
|
var defaultProps$l = {
|
|
390
373
|
single: false,
|
|
@@ -393,10 +376,10 @@ var defaultProps$l = {
|
|
|
393
376
|
var CloseMenuButton = function CloseMenuButton(_ref) {
|
|
394
377
|
var single = _ref.single,
|
|
395
378
|
className = _ref.className,
|
|
396
|
-
props =
|
|
379
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
397
380
|
var intl = reactIntl.useIntl();
|
|
398
|
-
return /*#__PURE__*/
|
|
399
|
-
className:
|
|
381
|
+
return /*#__PURE__*/React.createElement(IconButton, Object.assign({
|
|
382
|
+
className: classNames([_defineProperty({}, className, className !== null)]),
|
|
400
383
|
label: intl.formatMessage({
|
|
401
384
|
id: "dIvwcD",
|
|
402
385
|
defaultMessage: [{
|
|
@@ -404,33 +387,33 @@ var CloseMenuButton = function CloseMenuButton(_ref) {
|
|
|
404
387
|
"value": "Close"
|
|
405
388
|
}]
|
|
406
389
|
}),
|
|
407
|
-
icon: /*#__PURE__*/
|
|
390
|
+
icon: /*#__PURE__*/React.createElement("svg", {
|
|
408
391
|
width: "19",
|
|
409
392
|
height: "23",
|
|
410
393
|
viewBox: "0 0 19 23",
|
|
411
394
|
fill: "none",
|
|
412
395
|
xmlns: "http://www.w3.org/2000/svg"
|
|
413
|
-
}, !single ? /*#__PURE__*/
|
|
396
|
+
}, !single ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("mask", {
|
|
414
397
|
id: "path-1-inside-1_560_19911",
|
|
415
398
|
fill: "currentColor"
|
|
416
|
-
}, /*#__PURE__*/
|
|
399
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
417
400
|
d: "M0 7C0 4.79086 1.79086 3 4 3H12C14.2091 3 16 4.79086 16 7V19C16 21.2091 14.2091 23 12 23H4C1.79086 23 0 21.2091 0 19V7Z"
|
|
418
|
-
})), /*#__PURE__*/
|
|
401
|
+
})), /*#__PURE__*/React.createElement("path", {
|
|
419
402
|
d: "M0 3H16H0ZM16 19C16 21.7614 13.7614 24 11 24H4C1.23858 24 -1 21.7614 -1 19H1C1 20.6569 2.34315 22 4 22H12C14.2091 22 16 20.6569 16 19ZM4 24C1.23858 24 -1 21.7614 -1 19V8C-1 5.23858 1.23858 3 4 3C2.34315 3 1 4.79086 1 7V19C1 20.6569 2.34315 22 4 22V24ZM16 3V23V3Z",
|
|
420
403
|
fill: "currentColor",
|
|
421
404
|
mask: "url(#path-1-inside-1_560_19911)"
|
|
422
|
-
})) : null, /*#__PURE__*/
|
|
405
|
+
})) : null, /*#__PURE__*/React.createElement("rect", {
|
|
423
406
|
x: "3.5",
|
|
424
407
|
y: "0.5",
|
|
425
408
|
width: "15",
|
|
426
409
|
height: "19",
|
|
427
410
|
rx: "2.5",
|
|
428
411
|
stroke: "currentColor"
|
|
429
|
-
}), /*#__PURE__*/
|
|
412
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
430
413
|
d: "M7.35333 6.35333L14.6467 13.6467",
|
|
431
414
|
stroke: "currentColor",
|
|
432
415
|
strokeLinejoin: "round"
|
|
433
|
-
}), /*#__PURE__*/
|
|
416
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
434
417
|
d: "M7.35333 13.6467L14.6467 6.35333",
|
|
435
418
|
stroke: "currentColor"
|
|
436
419
|
}))
|
|
@@ -441,8 +424,8 @@ CloseMenuButton.defaultProps = defaultProps$l;
|
|
|
441
424
|
|
|
442
425
|
var _excluded$6 = ["className", "iconClassName"];
|
|
443
426
|
var propTypes$k = {
|
|
444
|
-
className:
|
|
445
|
-
iconClassName:
|
|
427
|
+
className: PropTypes.string,
|
|
428
|
+
iconClassName: PropTypes.string
|
|
446
429
|
};
|
|
447
430
|
var defaultProps$k = {
|
|
448
431
|
className: null,
|
|
@@ -451,10 +434,10 @@ var defaultProps$k = {
|
|
|
451
434
|
var MenuButton = function MenuButton(_ref) {
|
|
452
435
|
var className = _ref.className;
|
|
453
436
|
_ref.iconClassName;
|
|
454
|
-
var props =
|
|
437
|
+
var props = _objectWithoutProperties(_ref, _excluded$6);
|
|
455
438
|
var intl = reactIntl.useIntl();
|
|
456
|
-
return /*#__PURE__*/
|
|
457
|
-
className:
|
|
439
|
+
return /*#__PURE__*/React.createElement(IconButton, Object.assign({
|
|
440
|
+
className: classNames([_defineProperty({}, className, className !== null)]),
|
|
458
441
|
label: intl.formatMessage({
|
|
459
442
|
id: "F/gl4b",
|
|
460
443
|
defaultMessage: [{
|
|
@@ -463,22 +446,22 @@ var MenuButton = function MenuButton(_ref) {
|
|
|
463
446
|
}]
|
|
464
447
|
}),
|
|
465
448
|
iconPosition: "right",
|
|
466
|
-
icon: /*#__PURE__*/
|
|
449
|
+
icon: /*#__PURE__*/React.createElement("svg", {
|
|
467
450
|
width: "19",
|
|
468
451
|
height: "23",
|
|
469
452
|
viewBox: "0 0 19 23",
|
|
470
453
|
fill: "none",
|
|
471
454
|
xmlns: "http://www.w3.org/2000/svg"
|
|
472
|
-
}, /*#__PURE__*/
|
|
455
|
+
}, /*#__PURE__*/React.createElement("mask", {
|
|
473
456
|
id: "path-1-inside-1_572_15622",
|
|
474
457
|
fill: "currentColor"
|
|
475
|
-
}, /*#__PURE__*/
|
|
458
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
476
459
|
d: "M0 7C0 4.79086 1.79086 3 4 3H12C14.2091 3 16 4.79086 16 7V19C16 21.2091 14.2091 23 12 23H4C1.79086 23 0 21.2091 0 19V7Z"
|
|
477
|
-
})), /*#__PURE__*/
|
|
460
|
+
})), /*#__PURE__*/React.createElement("path", {
|
|
478
461
|
d: "M0 3H16H0ZM16 19C16 21.7614 13.7614 24 11 24H4C1.23858 24 -1 21.7614 -1 19H1C1 20.6569 2.34315 22 4 22H12C14.2091 22 16 20.6569 16 19ZM4 24C1.23858 24 -1 21.7614 -1 19V8C-1 5.23858 1.23858 3 4 3C2.34315 3 1 4.79086 1 7V19C1 20.6569 2.34315 22 4 22V24ZM16 3V23V3Z",
|
|
479
462
|
fill: "currentColor",
|
|
480
463
|
mask: "url(#path-1-inside-1_572_15622)"
|
|
481
|
-
}), /*#__PURE__*/
|
|
464
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
482
465
|
x: "3.5",
|
|
483
466
|
y: "0.5",
|
|
484
467
|
width: "15",
|
|
@@ -493,17 +476,17 @@ MenuButton.defaultProps = defaultProps$k;
|
|
|
493
476
|
|
|
494
477
|
var _excluded$5 = ["className"];
|
|
495
478
|
var propTypes$j = {
|
|
496
|
-
className:
|
|
479
|
+
className: PropTypes.string
|
|
497
480
|
};
|
|
498
481
|
var defaultProps$j = {
|
|
499
482
|
className: null
|
|
500
483
|
};
|
|
501
484
|
var ShareButton = function ShareButton(_ref) {
|
|
502
485
|
var className = _ref.className,
|
|
503
|
-
props =
|
|
486
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
504
487
|
var intl = reactIntl.useIntl();
|
|
505
|
-
return /*#__PURE__*/
|
|
506
|
-
className:
|
|
488
|
+
return /*#__PURE__*/React.createElement(IconButton, Object.assign({
|
|
489
|
+
className: classNames([_defineProperty({}, className, className !== null)]),
|
|
507
490
|
label: intl.formatMessage({
|
|
508
491
|
id: "7tw6U2",
|
|
509
492
|
defaultMessage: [{
|
|
@@ -512,18 +495,18 @@ var ShareButton = function ShareButton(_ref) {
|
|
|
512
495
|
}]
|
|
513
496
|
}),
|
|
514
497
|
iconPosition: "left",
|
|
515
|
-
icon: /*#__PURE__*/
|
|
498
|
+
icon: /*#__PURE__*/React.createElement("svg", {
|
|
516
499
|
width: "16",
|
|
517
500
|
height: "22",
|
|
518
501
|
viewBox: "0 0 16 22",
|
|
519
502
|
fill: "none",
|
|
520
503
|
xmlns: "http://www.w3.org/2000/svg"
|
|
521
|
-
}, /*#__PURE__*/
|
|
504
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
522
505
|
fillRule: "evenodd",
|
|
523
506
|
clipRule: "evenodd",
|
|
524
507
|
d: "M7.55806 0.183058C7.80213 -0.0610194 8.19786 -0.0610194 8.44194 0.183058L12.4194 4.16053C12.6635 4.40461 12.6635 4.80034 12.4194 5.04442C12.1753 5.2885 11.7796 5.2885 11.5355 5.04442L8.625 2.13388V11.25H7.375V2.13388L4.46446 5.04442C4.22039 5.2885 3.82466 5.2885 3.58058 5.04442C3.3365 4.80034 3.3365 4.40461 3.58058 4.16053L7.55806 0.183058Z",
|
|
525
508
|
fill: "currentColor"
|
|
526
|
-
}), /*#__PURE__*/
|
|
509
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
527
510
|
fillRule: "evenodd",
|
|
528
511
|
clipRule: "evenodd",
|
|
529
512
|
d: "M16 18.25V10.25C16 8.59315 14.6569 7.25 13 7.25C14.1046 7.25 15 8.59315 15 10.25V18.25C15 19.3546 14.1046 20.25 13 20.25H3C1.89543 20.25 1 19.3546 1 18.25V10.25C1 8.59315 1.89543 7.25 3 7.25C1.34315 7.25 0 8.59315 0 10.25V18.25C0 19.9069 1.34315 21.25 3 21.25H13C14.6569 21.25 16 19.9069 16 18.25Z",
|
|
@@ -537,12 +520,12 @@ ShareButton.defaultProps = defaultProps$j;
|
|
|
537
520
|
var styles$e = {"container":"micromag-viewer-buttons-toggle-button-container","normal":"micromag-viewer-buttons-toggle-button-normal","toggled":"micromag-viewer-buttons-toggle-button-toggled"};
|
|
538
521
|
|
|
539
522
|
var propTypes$i = {
|
|
540
|
-
className:
|
|
541
|
-
progressSpring:
|
|
523
|
+
className: PropTypes.string,
|
|
524
|
+
progressSpring: PropTypes.object,
|
|
542
525
|
// eslint-disable-line react/forbid-prop-types
|
|
543
|
-
button:
|
|
544
|
-
toggledButton:
|
|
545
|
-
toggledButtonClassName:
|
|
526
|
+
button: PropTypes.node,
|
|
527
|
+
toggledButton: PropTypes.node,
|
|
528
|
+
toggledButtonClassName: PropTypes.string
|
|
546
529
|
};
|
|
547
530
|
var defaultProps$i = {
|
|
548
531
|
className: null,
|
|
@@ -558,17 +541,17 @@ var ToggleButton = function ToggleButton(_ref) {
|
|
|
558
541
|
toggledButton = _ref.toggledButton,
|
|
559
542
|
toggledButtonClassName = _ref.toggledButtonClassName;
|
|
560
543
|
if (button === null) return false;
|
|
561
|
-
return /*#__PURE__*/
|
|
562
|
-
className:
|
|
563
|
-
}, /*#__PURE__*/
|
|
544
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
545
|
+
className: classNames([styles$e.container, _defineProperty({}, className, className !== null)])
|
|
546
|
+
}, /*#__PURE__*/React.createElement(web.animated.div, {
|
|
564
547
|
className: styles$e.normal,
|
|
565
548
|
style: {
|
|
566
549
|
transform: progressSpring.to(function (p) {
|
|
567
550
|
return "translateY(".concat(p * -100, "%)");
|
|
568
551
|
})
|
|
569
552
|
}
|
|
570
|
-
}, button), /*#__PURE__*/
|
|
571
|
-
className:
|
|
553
|
+
}, button), /*#__PURE__*/React.createElement(web.animated.div, {
|
|
554
|
+
className: classNames([styles$e.toggled, _defineProperty({}, toggledButtonClassName, toggledButtonClassName !== null)]),
|
|
572
555
|
style: {
|
|
573
556
|
transform: progressSpring.to(function (p) {
|
|
574
557
|
return "translateY(".concat((p - 1) * -100, "%)");
|
|
@@ -582,11 +565,11 @@ ToggleButton.defaultProps = defaultProps$i;
|
|
|
582
565
|
var styles$d = {"backdrop":"micromag-viewer-menus-menu-container-backdrop","heightContainer":"micromag-viewer-menus-menu-container-heightContainer","container":"micromag-viewer-menus-menu-container-container"};
|
|
583
566
|
|
|
584
567
|
var propTypes$h = {
|
|
585
|
-
className:
|
|
586
|
-
progressSpring:
|
|
568
|
+
className: PropTypes.string,
|
|
569
|
+
progressSpring: PropTypes.object,
|
|
587
570
|
// eslint-disable-line react/forbid-prop-types
|
|
588
571
|
theme: core.PropTypes.viewerTheme,
|
|
589
|
-
children:
|
|
572
|
+
children: PropTypes.node
|
|
590
573
|
};
|
|
591
574
|
var defaultProps$h = {
|
|
592
575
|
className: null,
|
|
@@ -606,14 +589,14 @@ var ViewerMenuContainer = function ViewerMenuContainer(_ref) {
|
|
|
606
589
|
_ref3$color = _ref3.color,
|
|
607
590
|
brandBackgroundColor = _ref3$color === void 0 ? null : _ref3$color;
|
|
608
591
|
var backgroundColorStyle = utils.getStyleFromColor(brandBackgroundColor, 'backgroundColor');
|
|
609
|
-
return /*#__PURE__*/
|
|
610
|
-
className:
|
|
592
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
593
|
+
className: classNames([styles$d.container, _defineProperty({}, className, className !== null)]),
|
|
611
594
|
style: {
|
|
612
595
|
pointerEvents: 'none'
|
|
613
596
|
}
|
|
614
|
-
}, /*#__PURE__*/
|
|
597
|
+
}, /*#__PURE__*/React.createElement(web.animated.div, {
|
|
615
598
|
className: styles$d.heightContainer,
|
|
616
|
-
style:
|
|
599
|
+
style: _objectSpread({
|
|
617
600
|
opacity: progressSpring,
|
|
618
601
|
transform: progressSpring.to(function (p) {
|
|
619
602
|
return "translateY(".concat((1 - p) * -2, "rem)");
|
|
@@ -625,7 +608,7 @@ var ViewerMenuContainer = function ViewerMenuContainer(_ref) {
|
|
|
625
608
|
return Math.round(2 + p);
|
|
626
609
|
})
|
|
627
610
|
}, backgroundColorStyle)
|
|
628
|
-
}, children), /*#__PURE__*/
|
|
611
|
+
}, children), /*#__PURE__*/React.createElement(web.animated.div, {
|
|
629
612
|
className: styles$d.backdrop,
|
|
630
613
|
style: {
|
|
631
614
|
opacity: progressSpring.to(function (p) {
|
|
@@ -640,17 +623,17 @@ ViewerMenuContainer.defaultProps = defaultProps$h;
|
|
|
640
623
|
var styles$c = {"button":"micromag-viewer-menus-menu-dot-button","progress":"micromag-viewer-menus-menu-dot-progress","container":"micromag-viewer-menus-menu-dot-container","vertical":"micromag-viewer-menus-menu-dot-vertical","dot":"micromag-viewer-menus-menu-dot-dot","subDot":"micromag-viewer-menus-menu-dot-subDot","dots":"micromag-viewer-menus-menu-dot-dots","outlineBounce":"micromag-viewer-menus-menu-dot-outlineBounce"};
|
|
641
624
|
|
|
642
625
|
var propTypes$g = {
|
|
643
|
-
current:
|
|
644
|
-
active:
|
|
645
|
-
colors:
|
|
646
|
-
primary:
|
|
647
|
-
secondary:
|
|
626
|
+
current: PropTypes.bool,
|
|
627
|
+
active: PropTypes.bool,
|
|
628
|
+
colors: PropTypes.shape({
|
|
629
|
+
primary: PropTypes.string,
|
|
630
|
+
secondary: PropTypes.string
|
|
648
631
|
}),
|
|
649
|
-
count:
|
|
650
|
-
subIndex:
|
|
651
|
-
vertical:
|
|
652
|
-
onClick:
|
|
653
|
-
className:
|
|
632
|
+
count: PropTypes.number,
|
|
633
|
+
subIndex: PropTypes.number,
|
|
634
|
+
vertical: PropTypes.bool,
|
|
635
|
+
onClick: PropTypes.func,
|
|
636
|
+
className: PropTypes.string
|
|
654
637
|
};
|
|
655
638
|
var defaultProps$g = {
|
|
656
639
|
current: false,
|
|
@@ -663,7 +646,6 @@ var defaultProps$g = {
|
|
|
663
646
|
className: null
|
|
664
647
|
};
|
|
665
648
|
var ViewerMenuDot = function ViewerMenuDot(_ref) {
|
|
666
|
-
var _ref3;
|
|
667
649
|
var current = _ref.current,
|
|
668
650
|
active = _ref.active,
|
|
669
651
|
colors = _ref.colors,
|
|
@@ -686,7 +668,7 @@ var ViewerMenuDot = function ViewerMenuDot(_ref) {
|
|
|
686
668
|
}
|
|
687
669
|
};
|
|
688
670
|
}),
|
|
689
|
-
_useSpring2 =
|
|
671
|
+
_useSpring2 = _slicedToArray(_useSpring, 2),
|
|
690
672
|
dotSpringStyles = _useSpring2[0],
|
|
691
673
|
setDotSpringProps = _useSpring2[1];
|
|
692
674
|
React.useEffect(function () {
|
|
@@ -698,10 +680,10 @@ var ViewerMenuDot = function ViewerMenuDot(_ref) {
|
|
|
698
680
|
immediate: !current
|
|
699
681
|
});
|
|
700
682
|
}, [active, current, subIndex, count, setDotSpringProps]);
|
|
701
|
-
return /*#__PURE__*/
|
|
702
|
-
className:
|
|
683
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
684
|
+
className: classNames([styles$c.container, _defineProperty(_defineProperty(_defineProperty({}, styles$c.active, current), styles$c.vertical, vertical), className, className !== null)]),
|
|
703
685
|
"aria-hidden": "true"
|
|
704
|
-
}, /*#__PURE__*/
|
|
686
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
705
687
|
type: "button",
|
|
706
688
|
className: styles$c.button,
|
|
707
689
|
onClick: function onClick() {
|
|
@@ -714,14 +696,14 @@ var ViewerMenuDot = function ViewerMenuDot(_ref) {
|
|
|
714
696
|
}
|
|
715
697
|
},
|
|
716
698
|
tabIndex: "-1"
|
|
717
|
-
}, /*#__PURE__*/
|
|
699
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
718
700
|
className: styles$c.dot,
|
|
719
701
|
style: {
|
|
720
702
|
backgroundColor: secondary
|
|
721
703
|
}
|
|
722
|
-
}, /*#__PURE__*/
|
|
704
|
+
}, /*#__PURE__*/React.createElement(web.animated.div, {
|
|
723
705
|
className: styles$c.progress,
|
|
724
|
-
style:
|
|
706
|
+
style: _objectSpread(_objectSpread({}, dotSpringStyles), {}, {
|
|
725
707
|
backgroundColor: primary
|
|
726
708
|
})
|
|
727
709
|
}))));
|
|
@@ -729,23 +711,23 @@ var ViewerMenuDot = function ViewerMenuDot(_ref) {
|
|
|
729
711
|
ViewerMenuDot.propTypes = propTypes$g;
|
|
730
712
|
ViewerMenuDot.defaultProps = defaultProps$g;
|
|
731
713
|
|
|
732
|
-
var styles$b = {"container":"micromag-viewer-menus-menu-dots-container","closeButton":"micromag-viewer-menus-menu-dots-closeButton","items":"micromag-viewer-menus-menu-dots-items","item":"micromag-viewer-menus-menu-dots-item","vertical":"micromag-viewer-menus-menu-dots-vertical"};
|
|
714
|
+
var styles$b = {"container":"micromag-viewer-menus-menu-dots-container","closeButton":"micromag-viewer-menus-menu-dots-closeButton","focus-visible":"micromag-viewer-menus-menu-dots-focus-visible","items":"micromag-viewer-menus-menu-dots-items","item":"micromag-viewer-menus-menu-dots-item","vertical":"micromag-viewer-menus-menu-dots-vertical"};
|
|
733
715
|
|
|
734
716
|
var _excluded$4 = ["direction", "items", "onClickDot", "onClickScreensMenu", "colors", "closeable", "withItemClick", "withoutScreensMenu", "onClose", "className"];
|
|
735
717
|
var propTypes$f = {
|
|
736
|
-
direction:
|
|
718
|
+
direction: PropTypes.oneOf(['horizontal', 'vertical']),
|
|
737
719
|
items: core.PropTypes.menuItems,
|
|
738
|
-
onClickDot:
|
|
739
|
-
onClickScreensMenu:
|
|
740
|
-
colors:
|
|
741
|
-
primary:
|
|
742
|
-
secondary:
|
|
720
|
+
onClickDot: PropTypes.func,
|
|
721
|
+
onClickScreensMenu: PropTypes.func,
|
|
722
|
+
colors: PropTypes.shape({
|
|
723
|
+
primary: PropTypes.string,
|
|
724
|
+
secondary: PropTypes.string
|
|
743
725
|
}),
|
|
744
|
-
closeable:
|
|
745
|
-
withItemClick:
|
|
746
|
-
withoutScreensMenu:
|
|
747
|
-
onClose:
|
|
748
|
-
className:
|
|
726
|
+
closeable: PropTypes.bool,
|
|
727
|
+
withItemClick: PropTypes.bool,
|
|
728
|
+
withoutScreensMenu: PropTypes.bool,
|
|
729
|
+
onClose: PropTypes.func,
|
|
730
|
+
className: PropTypes.string
|
|
749
731
|
};
|
|
750
732
|
var defaultProps$f = {
|
|
751
733
|
direction: 'horizontal',
|
|
@@ -760,7 +742,6 @@ var defaultProps$f = {
|
|
|
760
742
|
className: null
|
|
761
743
|
};
|
|
762
744
|
var ViewerMenuDots = function ViewerMenuDots(_ref) {
|
|
763
|
-
var _ref5;
|
|
764
745
|
var direction = _ref.direction,
|
|
765
746
|
items = _ref.items,
|
|
766
747
|
onClickDot = _ref.onClickDot,
|
|
@@ -771,7 +752,7 @@ var ViewerMenuDots = function ViewerMenuDots(_ref) {
|
|
|
771
752
|
withoutScreensMenu = _ref.withoutScreensMenu,
|
|
772
753
|
onClose = _ref.onClose,
|
|
773
754
|
className = _ref.className,
|
|
774
|
-
props =
|
|
755
|
+
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
775
756
|
var _ref2 = colors || {},
|
|
776
757
|
_ref2$primary = _ref2.primary,
|
|
777
758
|
primary = _ref2$primary === void 0 ? 'rgba(255, 255, 255, 1)' : _ref2$primary;
|
|
@@ -783,8 +764,8 @@ var ViewerMenuDots = function ViewerMenuDots(_ref) {
|
|
|
783
764
|
});
|
|
784
765
|
var _ref4 = props || {},
|
|
785
766
|
style = _ref4.style;
|
|
786
|
-
return /*#__PURE__*/
|
|
787
|
-
className:
|
|
767
|
+
return /*#__PURE__*/React.createElement("nav", {
|
|
768
|
+
className: classNames([styles$b.container, _defineProperty(_defineProperty({}, className, className !== null), styles$b.vertical, direction === 'vertical')]),
|
|
788
769
|
"aria-label": intl.formatMessage({
|
|
789
770
|
id: "bLYuuN",
|
|
790
771
|
defaultMessage: [{
|
|
@@ -808,7 +789,7 @@ var ViewerMenuDots = function ViewerMenuDots(_ref) {
|
|
|
808
789
|
total: items.length
|
|
809
790
|
}),
|
|
810
791
|
style: style
|
|
811
|
-
}, /*#__PURE__*/
|
|
792
|
+
}, /*#__PURE__*/React.createElement("ul", {
|
|
812
793
|
className: styles$b.items
|
|
813
794
|
}, items.map(function (item, index) {
|
|
814
795
|
var _ref6 = item || {},
|
|
@@ -818,7 +799,7 @@ var ViewerMenuDots = function ViewerMenuDots(_ref) {
|
|
|
818
799
|
count = _ref6$count === void 0 ? 1 : _ref6$count,
|
|
819
800
|
_ref6$subIndex = _ref6.subIndex,
|
|
820
801
|
subIndex = _ref6$subIndex === void 0 ? 0 : _ref6$subIndex;
|
|
821
|
-
return /*#__PURE__*/
|
|
802
|
+
return /*#__PURE__*/React.createElement(ViewerMenuDot, {
|
|
822
803
|
key: "item-".concat(index + 1),
|
|
823
804
|
current: current,
|
|
824
805
|
active: index <= currentIndex,
|
|
@@ -834,12 +815,12 @@ var ViewerMenuDots = function ViewerMenuDots(_ref) {
|
|
|
834
815
|
},
|
|
835
816
|
vertical: direction === 'vertical'
|
|
836
817
|
});
|
|
837
|
-
}), closeable ? /*#__PURE__*/
|
|
818
|
+
}), closeable ? /*#__PURE__*/React.createElement("li", {
|
|
838
819
|
className: styles$b.closeButton,
|
|
839
820
|
style: {
|
|
840
821
|
color: primary
|
|
841
822
|
}
|
|
842
|
-
}, /*#__PURE__*/
|
|
823
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
843
824
|
type: "button",
|
|
844
825
|
className: styles$b.closeButton,
|
|
845
826
|
onClick: onClose,
|
|
@@ -857,44 +838,44 @@ var ViewerMenuDots = function ViewerMenuDots(_ref) {
|
|
|
857
838
|
"value": "Close"
|
|
858
839
|
}]
|
|
859
840
|
})
|
|
860
|
-
}, /*#__PURE__*/
|
|
841
|
+
}, /*#__PURE__*/React.createElement(components.CloseIcon, null))) : null));
|
|
861
842
|
};
|
|
862
843
|
ViewerMenuDots.propTypes = propTypes$f;
|
|
863
844
|
ViewerMenuDots.defaultProps = defaultProps$f;
|
|
864
845
|
|
|
865
846
|
var propTypes$e = {
|
|
866
|
-
className:
|
|
847
|
+
className: PropTypes.string
|
|
867
848
|
};
|
|
868
849
|
var defaultProps$e = {
|
|
869
850
|
className: null
|
|
870
851
|
};
|
|
871
852
|
var StackIcon = function StackIcon(_ref) {
|
|
872
853
|
var className = _ref.className;
|
|
873
|
-
return /*#__PURE__*/
|
|
854
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
874
855
|
xmlns: "http://www.w3.org/2000/svg",
|
|
875
856
|
width: "11.5px",
|
|
876
857
|
height: "17.5px",
|
|
877
858
|
viewBox: "0 0 11.5 17.5",
|
|
878
|
-
className:
|
|
879
|
-
}, /*#__PURE__*/
|
|
859
|
+
className: classNames([_defineProperty({}, className, className !== null)])
|
|
860
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
880
861
|
width: "10",
|
|
881
862
|
height: "16"
|
|
882
|
-
}), /*#__PURE__*/
|
|
863
|
+
}), /*#__PURE__*/React.createElement("polygon", {
|
|
883
864
|
points: "10.5 1.5 10.5 16.5 1.5 16.5 1.5 17.5 11.5 17.5 11.5 1.5 10.5 1.5"
|
|
884
865
|
}));
|
|
885
866
|
};
|
|
886
867
|
StackIcon.propTypes = propTypes$e;
|
|
887
868
|
StackIcon.defaultProps = defaultProps$e;
|
|
888
869
|
|
|
889
|
-
var styles$a = {"button":"micromag-viewer-menus-menu-screen-button","container":"micromag-viewer-menus-menu-screen-container","isCurrent":"micromag-viewer-menus-menu-screen-isCurrent","pulse":"micromag-viewer-menus-menu-screen-pulse","inner":"micromag-viewer-menus-menu-screen-inner","subScreenBadge":"micromag-viewer-menus-menu-screen-subScreenBadge","subScreenCount":"micromag-viewer-menus-menu-screen-subScreenCount","subScreenIcon":"micromag-viewer-menus-menu-screen-subScreenIcon"};
|
|
870
|
+
var styles$a = {"button":"micromag-viewer-menus-menu-screen-button","container":"micromag-viewer-menus-menu-screen-container","focus-visible":"micromag-viewer-menus-menu-screen-focus-visible","isCurrent":"micromag-viewer-menus-menu-screen-isCurrent","pulse":"micromag-viewer-menus-menu-screen-pulse","inner":"micromag-viewer-menus-menu-screen-inner","subScreenBadge":"micromag-viewer-menus-menu-screen-subScreenBadge","subScreenCount":"micromag-viewer-menus-menu-screen-subScreenCount","subScreenIcon":"micromag-viewer-menus-menu-screen-subScreenIcon"};
|
|
890
871
|
|
|
891
872
|
var propTypes$d = {
|
|
892
|
-
className:
|
|
873
|
+
className: PropTypes.string,
|
|
893
874
|
item: core.PropTypes.menuItem,
|
|
894
|
-
index:
|
|
895
|
-
onClick:
|
|
875
|
+
index: PropTypes.number,
|
|
876
|
+
onClick: PropTypes.func,
|
|
896
877
|
screenSize: core.PropTypes.screenSize,
|
|
897
|
-
focusable:
|
|
878
|
+
focusable: PropTypes.bool
|
|
898
879
|
};
|
|
899
880
|
var defaultProps$d = {
|
|
900
881
|
className: null,
|
|
@@ -905,7 +886,6 @@ var defaultProps$d = {
|
|
|
905
886
|
focusable: true
|
|
906
887
|
};
|
|
907
888
|
var ViewerMenuScreen = function ViewerMenuScreen(_ref) {
|
|
908
|
-
var _ref4;
|
|
909
889
|
var className = _ref.className,
|
|
910
890
|
item = _ref.item,
|
|
911
891
|
index = _ref.index,
|
|
@@ -940,12 +920,12 @@ var ViewerMenuScreen = function ViewerMenuScreen(_ref) {
|
|
|
940
920
|
"value": "(current screen)"
|
|
941
921
|
}]
|
|
942
922
|
})) : '');
|
|
943
|
-
return /*#__PURE__*/
|
|
944
|
-
className:
|
|
923
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
924
|
+
className: classNames([styles$a.container, _defineProperty(_defineProperty({}, className, className !== null), styles$a.isCurrent, current)]),
|
|
945
925
|
style: {
|
|
946
926
|
paddingBottom: "".concat(screenHeight / screenWidth * 100, "%")
|
|
947
927
|
}
|
|
948
|
-
}, /*#__PURE__*/
|
|
928
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
949
929
|
type: "button",
|
|
950
930
|
className: styles$a.button,
|
|
951
931
|
onClick: function onClick() {
|
|
@@ -959,15 +939,15 @@ var ViewerMenuScreen = function ViewerMenuScreen(_ref) {
|
|
|
959
939
|
},
|
|
960
940
|
"aria-label": screenAriaLabel,
|
|
961
941
|
tabIndex: focusable ? '0' : '-1'
|
|
962
|
-
}), /*#__PURE__*/
|
|
942
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
963
943
|
className: styles$a.inner
|
|
964
|
-
}, count > 1 ? /*#__PURE__*/
|
|
944
|
+
}, count > 1 ? /*#__PURE__*/React.createElement("div", {
|
|
965
945
|
className: styles$a.subScreenBadge
|
|
966
|
-
}, /*#__PURE__*/
|
|
946
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
967
947
|
className: styles$a.subScreenCount
|
|
968
|
-
}, count), /*#__PURE__*/
|
|
948
|
+
}, count), /*#__PURE__*/React.createElement(StackIcon, {
|
|
969
949
|
className: styles$a.subScreenIcon
|
|
970
|
-
})) : null, screenWidth > 0 && screenHeight > 0 ? /*#__PURE__*/
|
|
950
|
+
})) : null, screenWidth > 0 && screenHeight > 0 ? /*#__PURE__*/React.createElement(components.ScreenPreview, {
|
|
971
951
|
className: styles$a.screen,
|
|
972
952
|
screenWidth: screenWidth,
|
|
973
953
|
screenHeight: screenHeight,
|
|
@@ -985,22 +965,22 @@ var styles$9 = {"scroll":"micromag-viewer-menus-menu-preview-scroll","container"
|
|
|
985
965
|
var _excluded$3 = ["textAlign"];
|
|
986
966
|
var propTypes$c = {
|
|
987
967
|
viewerTheme: core.PropTypes.viewerTheme,
|
|
988
|
-
header:
|
|
968
|
+
header: PropTypes.node,
|
|
989
969
|
screenSize: core.PropTypes.screenSize,
|
|
990
|
-
title:
|
|
991
|
-
menuWidth:
|
|
970
|
+
title: PropTypes.string,
|
|
971
|
+
menuWidth: PropTypes.number,
|
|
992
972
|
items: core.PropTypes.menuItems,
|
|
993
|
-
focusable:
|
|
994
|
-
onClickScreen:
|
|
995
|
-
maxThumbsWidth:
|
|
996
|
-
paddingTop:
|
|
997
|
-
scrollDisabled:
|
|
973
|
+
focusable: PropTypes.bool,
|
|
974
|
+
onClickScreen: PropTypes.func,
|
|
975
|
+
maxThumbsWidth: PropTypes.number,
|
|
976
|
+
paddingTop: PropTypes.number,
|
|
977
|
+
scrollDisabled: PropTypes.bool,
|
|
998
978
|
// @todo to reimplement:
|
|
999
979
|
// shouldLoad: PropTypes.bool,
|
|
1000
980
|
// toggleFullscreen: PropTypes.func,
|
|
1001
981
|
// fullscreenActive: PropTypes.bool,
|
|
1002
982
|
// fullscreenEnabled: PropTypes.bool,
|
|
1003
|
-
className:
|
|
983
|
+
className: PropTypes.string
|
|
1004
984
|
};
|
|
1005
985
|
var defaultProps$c = {
|
|
1006
986
|
viewerTheme: null,
|
|
@@ -1061,11 +1041,11 @@ var ViewerMenuPreview = function ViewerMenuPreview(_ref) {
|
|
|
1061
1041
|
// eslint-disable-next-line no-unused-vars
|
|
1062
1042
|
var _ref6 = titleStyles || {};
|
|
1063
1043
|
_ref6.textAlign;
|
|
1064
|
-
var otherTitleStyles =
|
|
1044
|
+
var otherTitleStyles = _objectWithoutProperties(_ref6, _excluded$3);
|
|
1065
1045
|
var finalTitleStyles = titleStyles !== null ? utils.getStyleFromText(otherTitleStyles) : null;
|
|
1066
1046
|
// const { url: brandLogoUrl = null } = brandLogo || {};
|
|
1067
1047
|
var _useState = React.useState([]),
|
|
1068
|
-
_useState2 =
|
|
1048
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1069
1049
|
screensMounted = _useState2[0],
|
|
1070
1050
|
setScreensMounted = _useState2[1];
|
|
1071
1051
|
var hasTitle = title !== null;
|
|
@@ -1081,44 +1061,44 @@ var ViewerMenuPreview = function ViewerMenuPreview(_ref) {
|
|
|
1081
1061
|
return function () {};
|
|
1082
1062
|
}
|
|
1083
1063
|
var timeout = setTimeout(function () {
|
|
1084
|
-
setScreensMounted([].concat(
|
|
1064
|
+
setScreensMounted([].concat(_toConsumableArray(screensMounted), [true]));
|
|
1085
1065
|
}, 40);
|
|
1086
1066
|
return function () {
|
|
1087
1067
|
clearTimeout(timeout);
|
|
1088
1068
|
};
|
|
1089
1069
|
}, [items, screensMounted, setScreensMounted]);
|
|
1090
1070
|
var menuPaddingTop = paddingTop + 10;
|
|
1091
|
-
return /*#__PURE__*/
|
|
1092
|
-
className:
|
|
1093
|
-
style:
|
|
1071
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1072
|
+
className: classNames([styles$9.container, _defineProperty({}, className, className !== null)]),
|
|
1073
|
+
style: _objectSpread(_objectSpread({}, brandImageStyle), {}, {
|
|
1094
1074
|
width: menuWidth
|
|
1095
1075
|
}),
|
|
1096
1076
|
"aria-hidden": focusable ? null : 'true'
|
|
1097
|
-
}, /*#__PURE__*/
|
|
1077
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1098
1078
|
className: styles$9.content,
|
|
1099
1079
|
ref: containerRef
|
|
1100
|
-
}, /*#__PURE__*/
|
|
1080
|
+
}, /*#__PURE__*/React.createElement(Scroll, {
|
|
1101
1081
|
className: styles$9.scroll,
|
|
1102
1082
|
disabled: scrollDisabled
|
|
1103
|
-
}, hasTitle && header === null ? /*#__PURE__*/
|
|
1083
|
+
}, hasTitle && header === null ? /*#__PURE__*/React.createElement("div", {
|
|
1104
1084
|
className: styles$9.titleContainer,
|
|
1105
1085
|
style: {
|
|
1106
1086
|
paddingTop: menuPaddingTop
|
|
1107
1087
|
}
|
|
1108
|
-
}, /*#__PURE__*/
|
|
1088
|
+
}, /*#__PURE__*/React.createElement("h1", {
|
|
1109
1089
|
className: styles$9.title,
|
|
1110
|
-
style:
|
|
1111
|
-
}, title)) : /*#__PURE__*/
|
|
1090
|
+
style: _objectSpread({}, finalTitleStyles)
|
|
1091
|
+
}, title)) : /*#__PURE__*/React.createElement("div", {
|
|
1112
1092
|
className: styles$9.headerContainer,
|
|
1113
1093
|
style: {
|
|
1114
1094
|
paddingTop: menuPaddingTop
|
|
1115
1095
|
}
|
|
1116
|
-
}, header), /*#__PURE__*/
|
|
1096
|
+
}, header), /*#__PURE__*/React.createElement("nav", {
|
|
1117
1097
|
className: styles$9.nav,
|
|
1118
1098
|
style: !hasTitle ? {
|
|
1119
1099
|
paddingTop: paddingTop
|
|
1120
1100
|
} : null
|
|
1121
|
-
}, /*#__PURE__*/
|
|
1101
|
+
}, /*#__PURE__*/React.createElement("ul", {
|
|
1122
1102
|
className: styles$9.items
|
|
1123
1103
|
}, items.map(function (item, index) {
|
|
1124
1104
|
var _ref8 = item || {},
|
|
@@ -1130,18 +1110,18 @@ var ViewerMenuPreview = function ViewerMenuPreview(_ref) {
|
|
|
1130
1110
|
screenWidth = _ref9.width,
|
|
1131
1111
|
screenHeight = _ref9.height;
|
|
1132
1112
|
var screenMounted = screensMounted[index] || false;
|
|
1133
|
-
return /*#__PURE__*/
|
|
1113
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
1134
1114
|
key: "item-".concat(screenId),
|
|
1135
1115
|
className: styles$9.item,
|
|
1136
1116
|
style: itemStyles
|
|
1137
|
-
}, /*#__PURE__*/
|
|
1117
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1138
1118
|
className: styles$9.inner
|
|
1139
|
-
}, /*#__PURE__*/
|
|
1140
|
-
className:
|
|
1119
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1120
|
+
className: classNames([styles$9.frame, _defineProperty({}, styles$9.isLoading, !screenMounted)]),
|
|
1141
1121
|
style: {
|
|
1142
1122
|
paddingBottom: "".concat(screenHeight / screenWidth * 100, "%")
|
|
1143
1123
|
}
|
|
1144
|
-
}, screenMounted ? /*#__PURE__*/
|
|
1124
|
+
}, screenMounted ? /*#__PURE__*/React.createElement(ViewerMenuScreen, {
|
|
1145
1125
|
className: styles$9.screen,
|
|
1146
1126
|
item: item,
|
|
1147
1127
|
index: index,
|
|
@@ -1158,10 +1138,10 @@ var styles$8 = {"container":"micromag-viewer-partials-micromag-preview-container
|
|
|
1158
1138
|
|
|
1159
1139
|
var propTypes$b = {
|
|
1160
1140
|
screen: core.PropTypes.screen,
|
|
1161
|
-
title:
|
|
1162
|
-
url:
|
|
1163
|
-
description:
|
|
1164
|
-
className:
|
|
1141
|
+
title: PropTypes.string,
|
|
1142
|
+
url: PropTypes.string,
|
|
1143
|
+
description: PropTypes.string,
|
|
1144
|
+
className: PropTypes.string
|
|
1165
1145
|
};
|
|
1166
1146
|
var defaultProps$b = {
|
|
1167
1147
|
screen: null,
|
|
@@ -1176,22 +1156,22 @@ var MicromagPreview = function MicromagPreview(_ref) {
|
|
|
1176
1156
|
url = _ref.url,
|
|
1177
1157
|
description = _ref.description,
|
|
1178
1158
|
className = _ref.className;
|
|
1179
|
-
return /*#__PURE__*/
|
|
1180
|
-
className:
|
|
1181
|
-
}, /*#__PURE__*/
|
|
1159
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1160
|
+
className: classNames([styles$8.container, _defineProperty({}, className, className)])
|
|
1161
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1182
1162
|
className: styles$8.cover
|
|
1183
|
-
}, /*#__PURE__*/
|
|
1163
|
+
}, /*#__PURE__*/React.createElement(components.ScreenPreview, {
|
|
1184
1164
|
screen: screen,
|
|
1185
1165
|
width: 100,
|
|
1186
1166
|
height: 150,
|
|
1187
1167
|
withSize: true
|
|
1188
|
-
})), /*#__PURE__*/
|
|
1168
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
1189
1169
|
className: styles$8.info
|
|
1190
|
-
}, /*#__PURE__*/
|
|
1170
|
+
}, /*#__PURE__*/React.createElement("h3", {
|
|
1191
1171
|
className: styles$8.title
|
|
1192
|
-
}, title), url ? /*#__PURE__*/
|
|
1172
|
+
}, title), url ? /*#__PURE__*/React.createElement("div", {
|
|
1193
1173
|
className: styles$8.url
|
|
1194
|
-
}, url) : null, /*#__PURE__*/
|
|
1174
|
+
}, url) : null, /*#__PURE__*/React.createElement("p", null, description)));
|
|
1195
1175
|
};
|
|
1196
1176
|
MicromagPreview.propTypes = propTypes$b;
|
|
1197
1177
|
MicromagPreview.defaultProps = defaultProps$b;
|
|
@@ -1200,16 +1180,16 @@ var styles$7 = {"scroll":"micromag-viewer-menus-menu-share-scroll","container":"
|
|
|
1200
1180
|
|
|
1201
1181
|
var propTypes$a = {
|
|
1202
1182
|
viewerTheme: core.PropTypes.viewerTheme,
|
|
1203
|
-
menuWidth:
|
|
1204
|
-
title:
|
|
1205
|
-
description:
|
|
1183
|
+
menuWidth: PropTypes.number,
|
|
1184
|
+
title: PropTypes.string,
|
|
1185
|
+
description: PropTypes.string,
|
|
1206
1186
|
items: core.PropTypes.menuItems,
|
|
1207
|
-
focusable:
|
|
1208
|
-
paddingTop:
|
|
1209
|
-
currentScreenIndex:
|
|
1210
|
-
shareUrl:
|
|
1211
|
-
onShare:
|
|
1212
|
-
className:
|
|
1187
|
+
focusable: PropTypes.bool,
|
|
1188
|
+
paddingTop: PropTypes.number,
|
|
1189
|
+
currentScreenIndex: PropTypes.number,
|
|
1190
|
+
shareUrl: PropTypes.string,
|
|
1191
|
+
onShare: PropTypes.func,
|
|
1192
|
+
className: PropTypes.string
|
|
1213
1193
|
};
|
|
1214
1194
|
var defaultProps$a = {
|
|
1215
1195
|
viewerTheme: null,
|
|
@@ -1268,7 +1248,7 @@ var ViewerMenuShare = function ViewerMenuShare(_ref) {
|
|
|
1268
1248
|
return screen;
|
|
1269
1249
|
}, [items, currentScreenIndex, focusable]);
|
|
1270
1250
|
var _useState = React.useState(false),
|
|
1271
|
-
_useState2 =
|
|
1251
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1272
1252
|
shareCurrentScreen = _useState2[0],
|
|
1273
1253
|
setShareCurrentScreen = _useState2[1];
|
|
1274
1254
|
var onShareModeChange = React.useCallback(function () {
|
|
@@ -1277,50 +1257,50 @@ var ViewerMenuShare = function ViewerMenuShare(_ref) {
|
|
|
1277
1257
|
});
|
|
1278
1258
|
}, [setShareCurrentScreen]);
|
|
1279
1259
|
var _useState3 = React.useState(shareUrl),
|
|
1280
|
-
_useState4 =
|
|
1260
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
1281
1261
|
finalShareUrl = _useState4[0],
|
|
1282
1262
|
setFinalShareUrl = _useState4[1];
|
|
1283
1263
|
React.useEffect(function () {
|
|
1284
1264
|
setFinalShareUrl(shareCurrentScreen && currentScreenIndex !== 0 ? "".concat(shareUrl, "/").concat(currentScreenIndex + 1) : shareUrl);
|
|
1285
1265
|
}, [shareCurrentScreen, currentScreenIndex, setFinalShareUrl]);
|
|
1286
|
-
return /*#__PURE__*/
|
|
1287
|
-
className:
|
|
1288
|
-
style:
|
|
1266
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1267
|
+
className: classNames([styles$7.container, _defineProperty({}, className, className !== null)]),
|
|
1268
|
+
style: _objectSpread(_objectSpread({}, brandImageStyle), {}, {
|
|
1289
1269
|
width: menuWidth
|
|
1290
1270
|
}),
|
|
1291
1271
|
"aria-hidden": focusable ? null : 'true'
|
|
1292
|
-
}, /*#__PURE__*/
|
|
1272
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1293
1273
|
className: styles$7.content
|
|
1294
|
-
}, /*#__PURE__*/
|
|
1274
|
+
}, /*#__PURE__*/React.createElement(Scroll, {
|
|
1295
1275
|
className: styles$7.scroll
|
|
1296
|
-
}, /*#__PURE__*/
|
|
1276
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1297
1277
|
className: styles$7.inner,
|
|
1298
1278
|
style: {
|
|
1299
1279
|
paddingTop: paddingTop
|
|
1300
1280
|
}
|
|
1301
|
-
}, /*#__PURE__*/
|
|
1281
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1302
1282
|
className: styles$7.header
|
|
1303
|
-
}, /*#__PURE__*/
|
|
1283
|
+
}, /*#__PURE__*/React.createElement(MicromagPreview, {
|
|
1304
1284
|
className: styles$7.preview,
|
|
1305
1285
|
screen: shareCurrentScreen ? currentScreen : coverScreen,
|
|
1306
1286
|
title: title,
|
|
1307
1287
|
url: finalShareUrl,
|
|
1308
1288
|
description: description
|
|
1309
|
-
}), currentScreenIndex !== 0 ? /*#__PURE__*/
|
|
1289
|
+
}), currentScreenIndex !== 0 ? /*#__PURE__*/React.createElement("div", {
|
|
1310
1290
|
className: styles$7.mode
|
|
1311
|
-
}, /*#__PURE__*/
|
|
1291
|
+
}, /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("input", {
|
|
1312
1292
|
type: "checkbox",
|
|
1313
1293
|
name: "currentScreen",
|
|
1314
1294
|
value: "currentScreen",
|
|
1315
1295
|
onChange: onShareModeChange,
|
|
1316
1296
|
checked: shareCurrentScreen
|
|
1317
|
-
}), /*#__PURE__*/
|
|
1297
|
+
}), /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
1318
1298
|
id: "xuPbeq",
|
|
1319
1299
|
defaultMessage: [{
|
|
1320
1300
|
"type": 0,
|
|
1321
1301
|
"value": "Start from the current screen"
|
|
1322
1302
|
}]
|
|
1323
|
-
}))) : null), /*#__PURE__*/
|
|
1303
|
+
}))) : null), /*#__PURE__*/React.createElement(ShareOptions, {
|
|
1324
1304
|
className: styles$7.options,
|
|
1325
1305
|
itemClassName: styles$7.optionItem,
|
|
1326
1306
|
buttonClassName: styles$7.optionButton,
|
|
@@ -1335,31 +1315,31 @@ var ViewerMenuShare = function ViewerMenuShare(_ref) {
|
|
|
1335
1315
|
ViewerMenuShare.propTypes = propTypes$a;
|
|
1336
1316
|
ViewerMenuShare.defaultProps = defaultProps$a;
|
|
1337
1317
|
|
|
1338
|
-
var styles$6 = {"container":"micromag-viewer-container","screenContainer":"micromag-viewer-screenContainer","screensFrame":"micromag-viewer-screensFrame","menuShare":"micromag-viewer-menuShare","menuPreview":"micromag-viewer-menuPreview","menuContainer":"micromag-viewer-menuContainer","landscape":"micromag-viewer-landscape","hideMenu":"micromag-viewer-hideMenu","menuNavContainer":"micromag-viewer-menuNavContainer","menuTopContainer":"micromag-viewer-menuTopContainer","dots":"micromag-viewer-dots","disableMenu":"micromag-viewer-disableMenu","content":"micromag-viewer-content","withoutGestures":"micromag-viewer-withoutGestures","fadeMenu":"micromag-viewer-fadeMenu","withShadow":"micromag-viewer-withShadow","isOpened":"micromag-viewer-isOpened","menuItem":"micromag-viewer-menuItem","menuButton":"micromag-viewer-menuButton","slidingButton":"micromag-viewer-slidingButton","screensMenuButtonToggled":"micromag-viewer-screensMenuButtonToggled","navButton":"micromag-viewer-navButton","previous":"micromag-viewer-previous","next":"micromag-viewer-next","screen":"micromag-viewer-screen","current":"micromag-viewer-current","playbackControls":"micromag-viewer-playbackControls","arrowHint":"micromag-viewer-arrowHint","webView":"micromag-viewer-webView","shareIncentiveContainer":"micromag-viewer-shareIncentiveContainer","shareIncentive":"micromag-viewer-shareIncentive","shareIncentiveVisible":"micromag-viewer-shareIncentiveVisible"};
|
|
1318
|
+
var styles$6 = {"container":"micromag-viewer-container","screenContainer":"micromag-viewer-screenContainer","screensFrame":"micromag-viewer-screensFrame","menuShare":"micromag-viewer-menuShare","menuPreview":"micromag-viewer-menuPreview","menuContainer":"micromag-viewer-menuContainer","focus-visible":"micromag-viewer-focus-visible","landscape":"micromag-viewer-landscape","hideMenu":"micromag-viewer-hideMenu","menuNavContainer":"micromag-viewer-menuNavContainer","menuTopContainer":"micromag-viewer-menuTopContainer","dots":"micromag-viewer-dots","disableMenu":"micromag-viewer-disableMenu","content":"micromag-viewer-content","withoutGestures":"micromag-viewer-withoutGestures","fadeMenu":"micromag-viewer-fadeMenu","withShadow":"micromag-viewer-withShadow","isOpened":"micromag-viewer-isOpened","menuItem":"micromag-viewer-menuItem","menuButton":"micromag-viewer-menuButton","slidingButton":"micromag-viewer-slidingButton","screensMenuButtonToggled":"micromag-viewer-screensMenuButtonToggled","navButton":"micromag-viewer-navButton","previous":"micromag-viewer-previous","next":"micromag-viewer-next","screen":"micromag-viewer-screen","current":"micromag-viewer-current","playbackControls":"micromag-viewer-playbackControls","arrowHint":"micromag-viewer-arrowHint","webView":"micromag-viewer-webView","shareIncentiveContainer":"micromag-viewer-shareIncentiveContainer","shareIncentive":"micromag-viewer-shareIncentive","shareIncentiveVisible":"micromag-viewer-shareIncentiveVisible"};
|
|
1339
1319
|
|
|
1340
1320
|
var propTypes$9 = {
|
|
1341
1321
|
story: core.PropTypes.story.isRequired,
|
|
1342
|
-
currentScreenIndex:
|
|
1343
|
-
toggleFullscreen:
|
|
1344
|
-
fullscreenActive:
|
|
1345
|
-
fullscreenEnabled:
|
|
1346
|
-
closeable:
|
|
1347
|
-
withShadow:
|
|
1348
|
-
trackingEnabled:
|
|
1349
|
-
shareBasePath:
|
|
1322
|
+
currentScreenIndex: PropTypes.number,
|
|
1323
|
+
toggleFullscreen: PropTypes.func,
|
|
1324
|
+
fullscreenActive: PropTypes.bool,
|
|
1325
|
+
fullscreenEnabled: PropTypes.bool,
|
|
1326
|
+
closeable: PropTypes.bool,
|
|
1327
|
+
withShadow: PropTypes.bool,
|
|
1328
|
+
trackingEnabled: PropTypes.bool,
|
|
1329
|
+
shareBasePath: PropTypes.string,
|
|
1350
1330
|
theme: core.PropTypes.viewerTheme,
|
|
1351
1331
|
screenSize: core.PropTypes.screenSize,
|
|
1352
|
-
menuWidth:
|
|
1353
|
-
previewHeader:
|
|
1354
|
-
withDotItemClick:
|
|
1355
|
-
withoutScreensMenu:
|
|
1356
|
-
withoutShareMenu:
|
|
1357
|
-
onClickScreen:
|
|
1332
|
+
menuWidth: PropTypes.number,
|
|
1333
|
+
previewHeader: PropTypes.node,
|
|
1334
|
+
withDotItemClick: PropTypes.bool,
|
|
1335
|
+
withoutScreensMenu: PropTypes.bool,
|
|
1336
|
+
withoutShareMenu: PropTypes.bool,
|
|
1337
|
+
onClickScreen: PropTypes.func,
|
|
1358
1338
|
// onClickMenu: PropTypes.func,
|
|
1359
|
-
onClickCloseViewer:
|
|
1360
|
-
onChange:
|
|
1361
|
-
refDots:
|
|
1362
|
-
current:
|
|
1339
|
+
onClickCloseViewer: PropTypes.func,
|
|
1340
|
+
onChange: PropTypes.func,
|
|
1341
|
+
refDots: PropTypes.shape({
|
|
1342
|
+
current: PropTypes.any // eslint-disable-line
|
|
1363
1343
|
})
|
|
1364
1344
|
};
|
|
1365
1345
|
|
|
@@ -1386,7 +1366,6 @@ var defaultProps$9 = {
|
|
|
1386
1366
|
refDots: null
|
|
1387
1367
|
};
|
|
1388
1368
|
var ViewerMenu = function ViewerMenu(_ref) {
|
|
1389
|
-
var _ref11;
|
|
1390
1369
|
var story = _ref.story,
|
|
1391
1370
|
currentScreenIndex = _ref.currentScreenIndex,
|
|
1392
1371
|
toggleFullscreen = _ref.toggleFullscreen,
|
|
@@ -1428,15 +1407,15 @@ var ViewerMenu = function ViewerMenu(_ref) {
|
|
|
1428
1407
|
var _useViewerSize = contexts.useViewerSize(),
|
|
1429
1408
|
viewerHeight = _useViewerSize.height;
|
|
1430
1409
|
var _useState = React.useState(false),
|
|
1431
|
-
_useState2 =
|
|
1410
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1432
1411
|
menuOpened = _useState2[0],
|
|
1433
1412
|
setMenuOpened = _useState2[1];
|
|
1434
1413
|
var _useState3 = React.useState(false),
|
|
1435
|
-
_useState4 =
|
|
1414
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
1436
1415
|
shareOpened = _useState4[0],
|
|
1437
1416
|
setShareOpened = _useState4[1];
|
|
1438
1417
|
var _useState5 = React.useState(false),
|
|
1439
|
-
_useState6 =
|
|
1418
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
1440
1419
|
menuMounted = _useState6[0],
|
|
1441
1420
|
setMenuMounted = _useState6[1];
|
|
1442
1421
|
var _useDimensionObserver = hooks.useDimensionObserver(),
|
|
@@ -1532,11 +1511,11 @@ var ViewerMenu = function ViewerMenu(_ref) {
|
|
|
1532
1511
|
}, [trackScreenEvent]);
|
|
1533
1512
|
var computeShareProgress = React.useCallback(function (_ref7) {
|
|
1534
1513
|
var active = _ref7.active,
|
|
1535
|
-
_ref7$direction =
|
|
1514
|
+
_ref7$direction = _slicedToArray(_ref7.direction, 2),
|
|
1536
1515
|
dy = _ref7$direction[1],
|
|
1537
|
-
_ref7$movement =
|
|
1516
|
+
_ref7$movement = _slicedToArray(_ref7.movement, 2),
|
|
1538
1517
|
my = _ref7$movement[1],
|
|
1539
|
-
_ref7$velocity =
|
|
1518
|
+
_ref7$velocity = _slicedToArray(_ref7.velocity, 2),
|
|
1540
1519
|
vy = _ref7$velocity[1];
|
|
1541
1520
|
var progress = Math.max(0, my) / (viewerHeight * 0.8);
|
|
1542
1521
|
var reachedThreshold = (vy > 0.3 || Math.abs(progress) > 0.3) && dy !== -1;
|
|
@@ -1548,11 +1527,11 @@ var ViewerMenu = function ViewerMenu(_ref) {
|
|
|
1548
1527
|
}, [onOpenShare, viewerHeight]);
|
|
1549
1528
|
var computeShareProgressClose = React.useCallback(function (_ref8) {
|
|
1550
1529
|
var active = _ref8.active,
|
|
1551
|
-
_ref8$direction =
|
|
1530
|
+
_ref8$direction = _slicedToArray(_ref8.direction, 2),
|
|
1552
1531
|
dy = _ref8$direction[1],
|
|
1553
|
-
_ref8$movement =
|
|
1532
|
+
_ref8$movement = _slicedToArray(_ref8.movement, 2),
|
|
1554
1533
|
my = _ref8$movement[1],
|
|
1555
|
-
_ref8$velocity =
|
|
1534
|
+
_ref8$velocity = _slicedToArray(_ref8.velocity, 2),
|
|
1556
1535
|
vy = _ref8$velocity[1];
|
|
1557
1536
|
var progress = Math.max(0, my) / (viewerHeight * 0.8);
|
|
1558
1537
|
var reachedThreshold = (vy > 0.3 || Math.abs(progress) > 0.3) && dy !== -1;
|
|
@@ -1580,11 +1559,11 @@ var ViewerMenu = function ViewerMenu(_ref) {
|
|
|
1580
1559
|
shareOpenedProgress = _useDragProgress.progress;
|
|
1581
1560
|
var computeMenuProgress = React.useCallback(function (_ref9) {
|
|
1582
1561
|
var active = _ref9.active,
|
|
1583
|
-
_ref9$direction =
|
|
1562
|
+
_ref9$direction = _slicedToArray(_ref9.direction, 2),
|
|
1584
1563
|
dy = _ref9$direction[1],
|
|
1585
|
-
_ref9$movement =
|
|
1564
|
+
_ref9$movement = _slicedToArray(_ref9.movement, 2),
|
|
1586
1565
|
my = _ref9$movement[1],
|
|
1587
|
-
_ref9$velocity =
|
|
1566
|
+
_ref9$velocity = _slicedToArray(_ref9.velocity, 2),
|
|
1588
1567
|
vy = _ref9$velocity[1];
|
|
1589
1568
|
var progress = Math.max(0, my) / (window.innerHeight * 0.8);
|
|
1590
1569
|
var reachedThreshold = (vy > 0.3 || Math.abs(progress) > 0.3) && dy !== -1;
|
|
@@ -1596,11 +1575,11 @@ var ViewerMenu = function ViewerMenu(_ref) {
|
|
|
1596
1575
|
}, [onOpenMenu]);
|
|
1597
1576
|
var computeMenuProgressClose = React.useCallback(function (_ref10) {
|
|
1598
1577
|
var active = _ref10.active,
|
|
1599
|
-
_ref10$direction =
|
|
1578
|
+
_ref10$direction = _slicedToArray(_ref10.direction, 2),
|
|
1600
1579
|
dy = _ref10$direction[1],
|
|
1601
|
-
_ref10$movement =
|
|
1580
|
+
_ref10$movement = _slicedToArray(_ref10.movement, 2),
|
|
1602
1581
|
my = _ref10$movement[1],
|
|
1603
|
-
_ref10$velocity =
|
|
1582
|
+
_ref10$velocity = _slicedToArray(_ref10.velocity, 2),
|
|
1604
1583
|
vy = _ref10$velocity[1];
|
|
1605
1584
|
var progress = Math.max(0, my) / (window.innerHeight * 0.8);
|
|
1606
1585
|
var reachedThreshold = (vy > 0.3 || Math.abs(progress) > 0.3) && dy !== -1;
|
|
@@ -1647,27 +1626,27 @@ var ViewerMenu = function ViewerMenu(_ref) {
|
|
|
1647
1626
|
setMenuMounted(false);
|
|
1648
1627
|
}
|
|
1649
1628
|
}, [menuOpened, draggingMenu, menuMounted, setMenuMounted]);
|
|
1650
|
-
return /*#__PURE__*/
|
|
1651
|
-
className:
|
|
1629
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1630
|
+
className: classNames([styles$6.menuNavContainer, _defineProperty(_defineProperty({}, styles$6.withShadow, withShadow), styles$6.isOpened, menuOpened || shareOpened)]),
|
|
1652
1631
|
ref: refDots,
|
|
1653
1632
|
style: {
|
|
1654
1633
|
width: menuWidth
|
|
1655
1634
|
}
|
|
1656
|
-
}, /*#__PURE__*/
|
|
1635
|
+
}, /*#__PURE__*/React.createElement("nav", {
|
|
1657
1636
|
className: styles$6.menuTopContainer,
|
|
1658
1637
|
ref: navContainerRef
|
|
1659
|
-
}, !withoutShareMenu ? /*#__PURE__*/
|
|
1638
|
+
}, !withoutShareMenu ? /*#__PURE__*/React.createElement("div", Object.assign({
|
|
1660
1639
|
className: styles$6.menuItem
|
|
1661
|
-
}, bindShareDrag()), /*#__PURE__*/
|
|
1640
|
+
}, bindShareDrag()), /*#__PURE__*/React.createElement(ToggleButton, {
|
|
1662
1641
|
className: styles$6.slidingButton,
|
|
1663
|
-
button: /*#__PURE__*/
|
|
1642
|
+
button: /*#__PURE__*/React.createElement(ShareButton, {
|
|
1664
1643
|
className: styles$6.menuButton,
|
|
1665
1644
|
onClick: onOpenShare,
|
|
1666
1645
|
theme: menuTheme,
|
|
1667
1646
|
iconPosition: "left",
|
|
1668
1647
|
focusable: !shareOpened
|
|
1669
1648
|
}),
|
|
1670
|
-
toggledButton: /*#__PURE__*/
|
|
1649
|
+
toggledButton: /*#__PURE__*/React.createElement(CloseMenuButton, {
|
|
1671
1650
|
className: styles$6.menuButton,
|
|
1672
1651
|
onClick: onCloseShare,
|
|
1673
1652
|
theme: menuTheme,
|
|
@@ -1676,18 +1655,18 @@ var ViewerMenu = function ViewerMenu(_ref) {
|
|
|
1676
1655
|
single: true
|
|
1677
1656
|
}),
|
|
1678
1657
|
progressSpring: shareOpenedProgress
|
|
1679
|
-
})) : null, !withoutScreensMenu ? /*#__PURE__*/
|
|
1658
|
+
})) : null, !withoutScreensMenu ? /*#__PURE__*/React.createElement("div", Object.assign({
|
|
1680
1659
|
className: styles$6.menuItem
|
|
1681
|
-
}, bindMenuDrag()), /*#__PURE__*/
|
|
1660
|
+
}, bindMenuDrag()), /*#__PURE__*/React.createElement(ToggleButton, {
|
|
1682
1661
|
className: styles$6.slidingButton,
|
|
1683
|
-
button: /*#__PURE__*/
|
|
1662
|
+
button: /*#__PURE__*/React.createElement(MenuButton, {
|
|
1684
1663
|
className: styles$6.menuButton,
|
|
1685
1664
|
iconClassName: styles$6.menuButtonIcon,
|
|
1686
1665
|
onClick: onOpenMenu,
|
|
1687
1666
|
theme: menuTheme,
|
|
1688
1667
|
focusable: !menuOpened
|
|
1689
1668
|
}),
|
|
1690
|
-
toggledButton: /*#__PURE__*/
|
|
1669
|
+
toggledButton: /*#__PURE__*/React.createElement(CloseMenuButton, {
|
|
1691
1670
|
className: styles$6.menuButton,
|
|
1692
1671
|
onClick: onCloseMenu,
|
|
1693
1672
|
theme: menuTheme,
|
|
@@ -1696,7 +1675,7 @@ var ViewerMenu = function ViewerMenu(_ref) {
|
|
|
1696
1675
|
}),
|
|
1697
1676
|
progressSpring: menuOpenedProgress,
|
|
1698
1677
|
toggledButtonClassName: styles$6.screensMenuButtonToggled
|
|
1699
|
-
})) : null), /*#__PURE__*/
|
|
1678
|
+
})) : null), /*#__PURE__*/React.createElement(ViewerMenuDots, Object.assign({}, menuTheme, {
|
|
1700
1679
|
direction: "horizontal",
|
|
1701
1680
|
items: items,
|
|
1702
1681
|
onClickDot: onClickScreen,
|
|
@@ -1710,11 +1689,11 @@ var ViewerMenu = function ViewerMenu(_ref) {
|
|
|
1710
1689
|
// style={{
|
|
1711
1690
|
// opacity: dotsOpacity ** 5, // @note this is like a "quint" easing, meaning it'll go towards 1 slowly first and then fast as it approaches 1
|
|
1712
1691
|
// }}
|
|
1713
|
-
}))), /*#__PURE__*/
|
|
1692
|
+
}))), /*#__PURE__*/React.createElement(ViewerMenuContainer, {
|
|
1714
1693
|
className: styles$6.menuContainer,
|
|
1715
1694
|
progressSpring: shareOpenedProgress,
|
|
1716
1695
|
theme: viewerTheme
|
|
1717
|
-
}, draggingShare || shareOpened ? /*#__PURE__*/
|
|
1696
|
+
}, draggingShare || shareOpened ? /*#__PURE__*/React.createElement(ViewerMenuShare, {
|
|
1718
1697
|
viewerTheme: viewerTheme,
|
|
1719
1698
|
className: styles$6.menuShare,
|
|
1720
1699
|
title: title,
|
|
@@ -1727,11 +1706,11 @@ var ViewerMenu = function ViewerMenu(_ref) {
|
|
|
1727
1706
|
shareUrl: shareUrl,
|
|
1728
1707
|
onShare: onShare,
|
|
1729
1708
|
onClose: onCloseShare
|
|
1730
|
-
}) : null), /*#__PURE__*/
|
|
1709
|
+
}) : null), /*#__PURE__*/React.createElement(ViewerMenuContainer, {
|
|
1731
1710
|
className: styles$6.menuContainer,
|
|
1732
1711
|
progressSpring: menuOpenedProgress,
|
|
1733
1712
|
theme: viewerTheme
|
|
1734
|
-
}, menuMounted ? /*#__PURE__*/
|
|
1713
|
+
}, menuMounted ? /*#__PURE__*/React.createElement(ViewerMenuPreview, {
|
|
1735
1714
|
viewerTheme: viewerTheme,
|
|
1736
1715
|
header: previewHeader,
|
|
1737
1716
|
title: title,
|
|
@@ -1753,23 +1732,23 @@ var ViewerMenu = function ViewerMenu(_ref) {
|
|
|
1753
1732
|
};
|
|
1754
1733
|
ViewerMenu.propTypes = propTypes$9;
|
|
1755
1734
|
ViewerMenu.defaultProps = defaultProps$9;
|
|
1756
|
-
var ViewerMenu$1 = /*#__PURE__*/
|
|
1735
|
+
var ViewerMenu$1 = /*#__PURE__*/React.memo(ViewerMenu);
|
|
1757
1736
|
|
|
1758
1737
|
var styles$5 = {"container":"micromag-viewer-screen-container","inner":"micromag-viewer-screen-inner","navigationHint":"micromag-viewer-screen-navigationHint"};
|
|
1759
1738
|
|
|
1760
1739
|
var propTypes$8 = {
|
|
1761
1740
|
screen: core.PropTypes.screenComponent,
|
|
1762
1741
|
renderContext: core.PropTypes.renderContext,
|
|
1763
|
-
screenState:
|
|
1764
|
-
current:
|
|
1765
|
-
active:
|
|
1766
|
-
mediaRef:
|
|
1767
|
-
width:
|
|
1768
|
-
index:
|
|
1769
|
-
height:
|
|
1770
|
-
scale:
|
|
1742
|
+
screenState: PropTypes.string,
|
|
1743
|
+
current: PropTypes.bool,
|
|
1744
|
+
active: PropTypes.bool,
|
|
1745
|
+
mediaRef: PropTypes.func,
|
|
1746
|
+
width: PropTypes.number,
|
|
1747
|
+
index: PropTypes.number,
|
|
1748
|
+
height: PropTypes.number,
|
|
1749
|
+
scale: PropTypes.number,
|
|
1771
1750
|
// withNavigationHint: PropTypes.bool, // @todo
|
|
1772
|
-
className:
|
|
1751
|
+
className: PropTypes.string
|
|
1773
1752
|
};
|
|
1774
1753
|
var defaultProps$8 = {
|
|
1775
1754
|
screen: null,
|
|
@@ -1798,7 +1777,7 @@ function ViewerScreen(_ref) {
|
|
|
1798
1777
|
scale = _ref.scale,
|
|
1799
1778
|
className = _ref.className;
|
|
1800
1779
|
var _useState = React.useState(active || current),
|
|
1801
|
-
_useState2 =
|
|
1780
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1802
1781
|
mounted = _useState2[0],
|
|
1803
1782
|
setMounted = _useState2[1];
|
|
1804
1783
|
React.useEffect(function () {
|
|
@@ -1814,9 +1793,9 @@ function ViewerScreen(_ref) {
|
|
|
1814
1793
|
}
|
|
1815
1794
|
};
|
|
1816
1795
|
}, [active, mounted, setMounted, index]);
|
|
1817
|
-
return /*#__PURE__*/
|
|
1818
|
-
className:
|
|
1819
|
-
}, /*#__PURE__*/
|
|
1796
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1797
|
+
className: classNames([styles$5.container, _defineProperty({}, className, className !== null)])
|
|
1798
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1820
1799
|
className: styles$5.inner,
|
|
1821
1800
|
style: {
|
|
1822
1801
|
width: width,
|
|
@@ -1825,7 +1804,7 @@ function ViewerScreen(_ref) {
|
|
|
1825
1804
|
transformOrigin: scale !== null ? '0 0' : null,
|
|
1826
1805
|
opacity: mounted ? 1 : null
|
|
1827
1806
|
}
|
|
1828
|
-
}, mounted ? /*#__PURE__*/
|
|
1807
|
+
}, mounted ? /*#__PURE__*/React.createElement(components.Screen, {
|
|
1829
1808
|
screen: screen,
|
|
1830
1809
|
renderContext: renderContext,
|
|
1831
1810
|
screenState: screenState,
|
|
@@ -1841,9 +1820,9 @@ ViewerScreen.defaultProps = defaultProps$8;
|
|
|
1841
1820
|
var styles$4 = {"arrow":"micromag-viewer-buttons-navigation-button-arrow","next":"micromag-viewer-buttons-navigation-button-next","previous":"micromag-viewer-buttons-navigation-button-previous"};
|
|
1842
1821
|
|
|
1843
1822
|
var propTypes$7 = {
|
|
1844
|
-
direction:
|
|
1845
|
-
onClick:
|
|
1846
|
-
className:
|
|
1823
|
+
direction: PropTypes.oneOf(['previous', 'next']),
|
|
1824
|
+
onClick: PropTypes.func,
|
|
1825
|
+
className: PropTypes.string
|
|
1847
1826
|
};
|
|
1848
1827
|
var defaultProps$7 = {
|
|
1849
1828
|
direction: 'next',
|
|
@@ -1854,32 +1833,32 @@ var NavigationButton = function NavigationButton(_ref) {
|
|
|
1854
1833
|
var direction = _ref.direction,
|
|
1855
1834
|
_onClick = _ref.onClick,
|
|
1856
1835
|
className = _ref.className;
|
|
1857
|
-
return /*#__PURE__*/
|
|
1858
|
-
className:
|
|
1836
|
+
return /*#__PURE__*/React.createElement(IconButton, {
|
|
1837
|
+
className: classNames([styles$4.container, styles$4[direction], _defineProperty({}, className, className !== null)]),
|
|
1859
1838
|
onClick: function onClick(e) {
|
|
1860
1839
|
e.stopPropagation();
|
|
1861
1840
|
_onClick();
|
|
1862
1841
|
},
|
|
1863
1842
|
iconPosition: direction === 'next' ? 'right' : 'left',
|
|
1864
|
-
icon: /*#__PURE__*/
|
|
1843
|
+
icon: /*#__PURE__*/React.createElement("svg", {
|
|
1865
1844
|
className: styles$4.arrow,
|
|
1866
1845
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1867
1846
|
width: "10",
|
|
1868
1847
|
height: "16",
|
|
1869
1848
|
viewBox: "0 0 10 16",
|
|
1870
1849
|
fill: "currentColor"
|
|
1871
|
-
}, /*#__PURE__*/
|
|
1850
|
+
}, /*#__PURE__*/React.createElement("polygon", {
|
|
1872
1851
|
points: "9.62 4.62 5 0 0.38 4.62 1.44 5.68 4.25 2.87 4.25 14.39 5.75 14.39 5.75 2.87 8.56 5.68 9.62 4.62"
|
|
1873
1852
|
})),
|
|
1874
|
-
label: /*#__PURE__*/
|
|
1853
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
1875
1854
|
className: "sr-only"
|
|
1876
|
-
}, direction === 'previous' ? /*#__PURE__*/
|
|
1855
|
+
}, direction === 'previous' ? /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
1877
1856
|
id: "zYH/31",
|
|
1878
1857
|
defaultMessage: [{
|
|
1879
1858
|
"type": 0,
|
|
1880
1859
|
"value": "Go to previous screen"
|
|
1881
1860
|
}]
|
|
1882
|
-
}) : /*#__PURE__*/
|
|
1861
|
+
}) : /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
1883
1862
|
id: "v9bqYj",
|
|
1884
1863
|
defaultMessage: [{
|
|
1885
1864
|
"type": 0,
|
|
@@ -1894,18 +1873,18 @@ NavigationButton.defaultProps = defaultProps$7;
|
|
|
1894
1873
|
var styles$3 = {"container":"micromag-viewer-partials-arrow-hint-container","inner":"micromag-viewer-partials-arrow-hint-inner","shadowFade":"micromag-viewer-partials-arrow-hint-shadowFade","arrow":"micromag-viewer-partials-arrow-hint-arrow","panX":"micromag-viewer-partials-arrow-hint-panX"};
|
|
1895
1874
|
|
|
1896
1875
|
var propTypes$6 = {
|
|
1897
|
-
className:
|
|
1876
|
+
className: PropTypes.string
|
|
1898
1877
|
};
|
|
1899
1878
|
var defaultProps$6 = {
|
|
1900
1879
|
className: null
|
|
1901
1880
|
};
|
|
1902
1881
|
var ArrowHint = function ArrowHint(_ref) {
|
|
1903
1882
|
var className = _ref.className;
|
|
1904
|
-
return /*#__PURE__*/
|
|
1905
|
-
className:
|
|
1906
|
-
}, /*#__PURE__*/
|
|
1883
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1884
|
+
className: classNames([styles$3.container, _defineProperty({}, className, className !== null)])
|
|
1885
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1907
1886
|
className: styles$3.inner
|
|
1908
|
-
}, /*#__PURE__*/
|
|
1887
|
+
}, /*#__PURE__*/React.createElement(components.ArrowIcon, {
|
|
1909
1888
|
className: styles$3.arrow
|
|
1910
1889
|
})));
|
|
1911
1890
|
};
|
|
@@ -1941,7 +1920,7 @@ function getFormattedTimestamp() {
|
|
|
1941
1920
|
}
|
|
1942
1921
|
var parts = "".concat(secondsWithMs).split('.');
|
|
1943
1922
|
var _ref = parts || [],
|
|
1944
|
-
_ref2 =
|
|
1923
|
+
_ref2 = _slicedToArray(_ref, 1),
|
|
1945
1924
|
_ref2$ = _ref2[0],
|
|
1946
1925
|
fullSeconds = _ref2$ === void 0 ? 0 : _ref2$;
|
|
1947
1926
|
var finalFullSeconds = Math.round(fullSeconds);
|
|
@@ -1953,20 +1932,20 @@ function getFormattedTimestamp() {
|
|
|
1953
1932
|
var SHOW_MILLISECONDS_THRESHOLD = 5; // show milliseconds when scrubbing if length of video is shorter than 5 seconds
|
|
1954
1933
|
|
|
1955
1934
|
var propTypes$5 = {
|
|
1956
|
-
media:
|
|
1957
|
-
current:
|
|
1935
|
+
media: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
1936
|
+
current: PropTypes.any
|
|
1958
1937
|
}) // eslint-disable-line
|
|
1959
1938
|
]),
|
|
1960
1939
|
|
|
1961
|
-
playing:
|
|
1962
|
-
backgroundColor:
|
|
1963
|
-
progressColor:
|
|
1964
|
-
onSeek:
|
|
1965
|
-
onSeekStart:
|
|
1966
|
-
onSeekEnd:
|
|
1967
|
-
focusable:
|
|
1968
|
-
className:
|
|
1969
|
-
withSeekHead:
|
|
1940
|
+
playing: PropTypes.bool,
|
|
1941
|
+
backgroundColor: PropTypes.string,
|
|
1942
|
+
progressColor: PropTypes.string,
|
|
1943
|
+
onSeek: PropTypes.func,
|
|
1944
|
+
onSeekStart: PropTypes.func,
|
|
1945
|
+
onSeekEnd: PropTypes.func,
|
|
1946
|
+
focusable: PropTypes.bool,
|
|
1947
|
+
className: PropTypes.string,
|
|
1948
|
+
withSeekHead: PropTypes.bool
|
|
1970
1949
|
};
|
|
1971
1950
|
var defaultProps$5 = {
|
|
1972
1951
|
media: null,
|
|
@@ -1981,7 +1960,6 @@ var defaultProps$5 = {
|
|
|
1981
1960
|
withSeekHead: true
|
|
1982
1961
|
};
|
|
1983
1962
|
var SeekBar = function SeekBar(_ref3) {
|
|
1984
|
-
var _ref6;
|
|
1985
1963
|
var media = _ref3.media,
|
|
1986
1964
|
playing = _ref3.playing,
|
|
1987
1965
|
backgroundColor = _ref3.backgroundColor,
|
|
@@ -2002,11 +1980,11 @@ var SeekBar = function SeekBar(_ref3) {
|
|
|
2002
1980
|
_ref4$duration = _ref4.duration,
|
|
2003
1981
|
duration = _ref4$duration === void 0 ? null : _ref4$duration;
|
|
2004
1982
|
var _useState = React.useState(false),
|
|
2005
|
-
_useState2 =
|
|
1983
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2006
1984
|
showTimestamp = _useState2[0],
|
|
2007
1985
|
setShowTimestamp = _useState2[1];
|
|
2008
1986
|
var onDrag = React.useCallback(function (_ref5) {
|
|
2009
|
-
var _ref5$xy =
|
|
1987
|
+
var _ref5$xy = _slicedToArray(_ref5.xy, 1),
|
|
2010
1988
|
x = _ref5$xy[0],
|
|
2011
1989
|
elapsedTime = _ref5.elapsedTime,
|
|
2012
1990
|
active = _ref5.active,
|
|
@@ -2047,35 +2025,35 @@ var SeekBar = function SeekBar(_ref3) {
|
|
|
2047
2025
|
filterTaps: true
|
|
2048
2026
|
}
|
|
2049
2027
|
});
|
|
2050
|
-
return /*#__PURE__*/
|
|
2051
|
-
className:
|
|
2052
|
-
}, stopDragEventsPropagation), /*#__PURE__*/
|
|
2028
|
+
return /*#__PURE__*/React.createElement("div", Object.assign({
|
|
2029
|
+
className: classNames([styles$2.container, _defineProperty(_defineProperty(_defineProperty({}, className, className !== null), styles$2.withSeekHead, withSeekHead), styles$2.showTimestamp, showTimestamp)])
|
|
2030
|
+
}, stopDragEventsPropagation), /*#__PURE__*/React.createElement("div", {
|
|
2053
2031
|
className: styles$2.inner
|
|
2054
|
-
}, /*#__PURE__*/
|
|
2032
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2055
2033
|
className: styles$2.progressBarContainer
|
|
2056
|
-
}, /*#__PURE__*/
|
|
2034
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2057
2035
|
className: styles$2.progressBar,
|
|
2058
2036
|
style: {
|
|
2059
2037
|
backgroundColor: backgroundColor
|
|
2060
2038
|
}
|
|
2061
|
-
}), /*#__PURE__*/
|
|
2039
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
2062
2040
|
className: styles$2.playHead,
|
|
2063
2041
|
style: {
|
|
2064
2042
|
left: "".concat(progress * 100, "%"),
|
|
2065
2043
|
backgroundColor: progressColor
|
|
2066
2044
|
}
|
|
2067
|
-
}, /*#__PURE__*/
|
|
2045
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2068
2046
|
className: styles$2.scrubbedTime,
|
|
2069
2047
|
style: {
|
|
2070
2048
|
borderColor: progressColor
|
|
2071
2049
|
}
|
|
2072
|
-
}, getFormattedTimestamp(currentTime, duration < SHOW_MILLISECONDS_THRESHOLD))), /*#__PURE__*/
|
|
2050
|
+
}, getFormattedTimestamp(currentTime, duration < SHOW_MILLISECONDS_THRESHOLD))), /*#__PURE__*/React.createElement("div", {
|
|
2073
2051
|
className: styles$2.progress,
|
|
2074
2052
|
style: {
|
|
2075
2053
|
transform: "scaleX(".concat(progress, ")"),
|
|
2076
2054
|
backgroundColor: progressColor
|
|
2077
2055
|
}
|
|
2078
|
-
})), /*#__PURE__*/
|
|
2056
|
+
})), /*#__PURE__*/React.createElement("button", Object.assign({}, bind(), {
|
|
2079
2057
|
type: "button",
|
|
2080
2058
|
className: styles$2.track,
|
|
2081
2059
|
title: intl.formatMessage({
|
|
@@ -2101,17 +2079,17 @@ SeekBar.defaultProps = defaultProps$5;
|
|
|
2101
2079
|
var styles$1 = {"playPauseButton":"micromag-viewer-partials-playback-controls-playPauseButton","muteButton":"micromag-viewer-partials-playback-controls-muteButton","container":"micromag-viewer-partials-playback-controls-container","icon":"micromag-viewer-partials-playback-controls-icon","spinner":"micromag-viewer-partials-playback-controls-spinner","withPlayPause":"micromag-viewer-partials-playback-controls-withPlayPause","isCollapsed":"micromag-viewer-partials-playback-controls-isCollapsed","loading":"micromag-viewer-partials-playback-controls-loading","isMuted":"micromag-viewer-partials-playback-controls-isMuted","withMute":"micromag-viewer-partials-playback-controls-withMute","withSeekBar":"micromag-viewer-partials-playback-controls-withSeekBar","seekBar":"micromag-viewer-partials-playback-controls-seekBar","withSeekBarOnly":"micromag-viewer-partials-playback-controls-withSeekBarOnly"};
|
|
2102
2080
|
|
|
2103
2081
|
var propTypes$4 = {
|
|
2104
|
-
defaultColor:
|
|
2105
|
-
color:
|
|
2106
|
-
alpha:
|
|
2082
|
+
defaultColor: PropTypes.shape({
|
|
2083
|
+
color: PropTypes.string,
|
|
2084
|
+
alpha: PropTypes.number
|
|
2107
2085
|
}),
|
|
2108
|
-
defaultProgressColor:
|
|
2109
|
-
color:
|
|
2110
|
-
alpha:
|
|
2086
|
+
defaultProgressColor: PropTypes.shape({
|
|
2087
|
+
color: PropTypes.string,
|
|
2088
|
+
alpha: PropTypes.number
|
|
2111
2089
|
}),
|
|
2112
|
-
withLoading:
|
|
2113
|
-
className:
|
|
2114
|
-
collapsedClassName:
|
|
2090
|
+
withLoading: PropTypes.bool,
|
|
2091
|
+
className: PropTypes.string,
|
|
2092
|
+
collapsedClassName: PropTypes.string
|
|
2115
2093
|
};
|
|
2116
2094
|
var defaultProps$4 = {
|
|
2117
2095
|
defaultColor: {
|
|
@@ -2127,7 +2105,6 @@ var defaultProps$4 = {
|
|
|
2127
2105
|
collapsedClassName: null
|
|
2128
2106
|
};
|
|
2129
2107
|
function PlaybackControls(_ref) {
|
|
2130
|
-
var _ref4;
|
|
2131
2108
|
var defaultColor = _ref.defaultColor,
|
|
2132
2109
|
defaultProgressColor = _ref.defaultProgressColor,
|
|
2133
2110
|
withLoading = _ref.withLoading,
|
|
@@ -2150,7 +2127,7 @@ function PlaybackControls(_ref) {
|
|
|
2150
2127
|
controlsTheme = _usePlaybackContext.controlsTheme,
|
|
2151
2128
|
showControls = _usePlaybackContext.showControls;
|
|
2152
2129
|
var _useState = React.useState(false),
|
|
2153
|
-
_useState2 =
|
|
2130
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2154
2131
|
showLoading = _useState2[0],
|
|
2155
2132
|
setShowLoading = _useState2[1];
|
|
2156
2133
|
var mediaUrl = mediaElement !== null ? mediaElement.src : null;
|
|
@@ -2177,11 +2154,11 @@ function PlaybackControls(_ref) {
|
|
|
2177
2154
|
progressColor: utils.getColorAsString(defaultColor),
|
|
2178
2155
|
seekBarOnly: false
|
|
2179
2156
|
}),
|
|
2180
|
-
_useState4 =
|
|
2157
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
2181
2158
|
customControlsTheme = _useState4[0],
|
|
2182
2159
|
setCustomControlsTheme = _useState4[1];
|
|
2183
2160
|
var _useState5 = React.useState(false),
|
|
2184
|
-
_useState6 =
|
|
2161
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
2185
2162
|
wasPlaying = _useState6[0],
|
|
2186
2163
|
setWasPlaying = _useState6[1];
|
|
2187
2164
|
React.useEffect(function () {
|
|
@@ -2245,9 +2222,9 @@ function PlaybackControls(_ref) {
|
|
|
2245
2222
|
progressColor = _ref3.progressColor,
|
|
2246
2223
|
seekBarOnly = _ref3.seekBarOnly;
|
|
2247
2224
|
var isCollapsed = controls && !controlsVisible && playing || !controls && mediaHasAudio;
|
|
2248
|
-
var playIcon = playing ? /*#__PURE__*/
|
|
2225
|
+
var playIcon = playing ? /*#__PURE__*/React.createElement(components.PauseIcon, {
|
|
2249
2226
|
className: styles$1.icon
|
|
2250
|
-
}) : /*#__PURE__*/
|
|
2227
|
+
}) : /*#__PURE__*/React.createElement(components.PlayIcon, {
|
|
2251
2228
|
className: styles$1.icon
|
|
2252
2229
|
});
|
|
2253
2230
|
var playLabel = playing ? intl.formatMessage({
|
|
@@ -2263,17 +2240,17 @@ function PlaybackControls(_ref) {
|
|
|
2263
2240
|
"value": "Play"
|
|
2264
2241
|
}]
|
|
2265
2242
|
});
|
|
2266
|
-
return /*#__PURE__*/
|
|
2267
|
-
className:
|
|
2268
|
-
}, /*#__PURE__*/
|
|
2269
|
-
className:
|
|
2243
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2244
|
+
className: classNames([styles$1.container, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, className, className !== null), styles$1.withPlayPause, controls && !seekBarOnly), styles$1.withMute, hasMedia || controls), styles$1.withSeekBar, controls), styles$1.withSeekBarOnly, seekBarOnly), styles$1.isCollapsed, isCollapsed), styles$1.isMuted, muted), collapsedClassName, collapsedClassName !== null && isCollapsed)])
|
|
2245
|
+
}, /*#__PURE__*/React.createElement(components.Button, {
|
|
2246
|
+
className: classNames([styles$1.playPauseButton, _defineProperty({}, styles$1.loading, finalShowLoading)]),
|
|
2270
2247
|
style: {
|
|
2271
2248
|
color: color
|
|
2272
2249
|
},
|
|
2273
2250
|
onClick: playing ? onPause : onPlay,
|
|
2274
2251
|
focusable: controlsVisible,
|
|
2275
2252
|
disabled: finalShowLoading,
|
|
2276
|
-
icon: finalShowLoading ? /*#__PURE__*/
|
|
2253
|
+
icon: finalShowLoading ? /*#__PURE__*/React.createElement(components.Spinner, {
|
|
2277
2254
|
className: styles$1.spinner
|
|
2278
2255
|
}) : playIcon,
|
|
2279
2256
|
"aria-label": finalShowLoading ? intl.formatMessage({
|
|
@@ -2284,7 +2261,7 @@ function PlaybackControls(_ref) {
|
|
|
2284
2261
|
}]
|
|
2285
2262
|
}) : playLabel,
|
|
2286
2263
|
withoutBootstrapStyles: true
|
|
2287
|
-
}), /*#__PURE__*/
|
|
2264
|
+
}), /*#__PURE__*/React.createElement(SeekBar, {
|
|
2288
2265
|
className: styles$1.seekBar,
|
|
2289
2266
|
media: mediaElement,
|
|
2290
2267
|
playing: playing,
|
|
@@ -2295,16 +2272,16 @@ function PlaybackControls(_ref) {
|
|
|
2295
2272
|
withSeekHead: !isCollapsed && !seekBarOnly,
|
|
2296
2273
|
backgroundColor: color,
|
|
2297
2274
|
progressColor: progressColor
|
|
2298
|
-
}), /*#__PURE__*/
|
|
2275
|
+
}), /*#__PURE__*/React.createElement(components.Button, {
|
|
2299
2276
|
className: styles$1.muteButton,
|
|
2300
2277
|
style: {
|
|
2301
2278
|
color: color
|
|
2302
2279
|
},
|
|
2303
2280
|
onClick: muted ? onUnmute : onMute,
|
|
2304
2281
|
focusable: controlsVisible || mediaHasAudio,
|
|
2305
|
-
icon: muted ? /*#__PURE__*/
|
|
2282
|
+
icon: muted ? /*#__PURE__*/React.createElement(components.UnmuteIcon, {
|
|
2306
2283
|
className: styles$1.icon
|
|
2307
|
-
}) : /*#__PURE__*/
|
|
2284
|
+
}) : /*#__PURE__*/React.createElement(components.MuteIcon, {
|
|
2308
2285
|
className: styles$1.icon
|
|
2309
2286
|
}),
|
|
2310
2287
|
"aria-label": muted ? intl.formatMessage({
|
|
@@ -2330,15 +2307,14 @@ var styles = {"container":"micromag-viewer-partials-web-view-container","opened"
|
|
|
2330
2307
|
|
|
2331
2308
|
var _excluded$2 = ["opened", "close", "open", "update", "url"];
|
|
2332
2309
|
var propTypes$3 = {
|
|
2333
|
-
className:
|
|
2334
|
-
style:
|
|
2310
|
+
className: PropTypes.string,
|
|
2311
|
+
style: PropTypes.object
|
|
2335
2312
|
};
|
|
2336
2313
|
var defaultProps$3 = {
|
|
2337
2314
|
className: null,
|
|
2338
2315
|
style: null
|
|
2339
2316
|
};
|
|
2340
2317
|
function WebViewContainer(_ref) {
|
|
2341
|
-
var _ref2;
|
|
2342
2318
|
var className = _ref.className,
|
|
2343
2319
|
style = _ref.style;
|
|
2344
2320
|
var _useViewerWebView = contexts.useViewerWebView(),
|
|
@@ -2348,7 +2324,7 @@ function WebViewContainer(_ref) {
|
|
|
2348
2324
|
_useViewerWebView.update;
|
|
2349
2325
|
var _useViewerWebView$url = _useViewerWebView.url,
|
|
2350
2326
|
url = _useViewerWebView$url === void 0 ? null : _useViewerWebView$url,
|
|
2351
|
-
webViewProps =
|
|
2327
|
+
webViewProps = _objectWithoutProperties(_useViewerWebView, _excluded$2);
|
|
2352
2328
|
var _useViewerInteraction = contexts.useViewerInteraction(),
|
|
2353
2329
|
disableInteraction = _useViewerInteraction.disableInteraction,
|
|
2354
2330
|
enableInteraction = _useViewerInteraction.enableInteraction;
|
|
@@ -2357,7 +2333,7 @@ function WebViewContainer(_ref) {
|
|
|
2357
2333
|
setPlaying = _usePlaybackContext.setPlaying;
|
|
2358
2334
|
var wasPlayingRef = React.useRef(playing);
|
|
2359
2335
|
var _useState = React.useState(url),
|
|
2360
|
-
_useState2 =
|
|
2336
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2361
2337
|
currentUrl = _useState2[0],
|
|
2362
2338
|
setCurrentUrl = _useState2[1];
|
|
2363
2339
|
|
|
@@ -2389,11 +2365,11 @@ function WebViewContainer(_ref) {
|
|
|
2389
2365
|
}
|
|
2390
2366
|
}
|
|
2391
2367
|
}, [opened]);
|
|
2392
|
-
return /*#__PURE__*/
|
|
2393
|
-
className:
|
|
2368
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2369
|
+
className: classNames([styles.container, _defineProperty(_defineProperty({}, styles.opened, opened), className, className !== null)]),
|
|
2394
2370
|
style: style,
|
|
2395
2371
|
onTransitionEnd: onTransitionEnd
|
|
2396
|
-
}, /*#__PURE__*/
|
|
2372
|
+
}, /*#__PURE__*/React.createElement(WebView, Object.assign({
|
|
2397
2373
|
url: url || currentUrl
|
|
2398
2374
|
}, webViewProps, {
|
|
2399
2375
|
closeable: true,
|
|
@@ -2417,48 +2393,48 @@ var SHARE_INCENTIVE_TIMEOUT = 6000;
|
|
|
2417
2393
|
var propTypes$2 = {
|
|
2418
2394
|
story: core.PropTypes.story,
|
|
2419
2395
|
// .isRequired,
|
|
2420
|
-
basePath:
|
|
2396
|
+
basePath: PropTypes.string,
|
|
2421
2397
|
theme: core.PropTypes.viewerTheme,
|
|
2422
|
-
width:
|
|
2423
|
-
height:
|
|
2424
|
-
screen:
|
|
2425
|
-
screenState:
|
|
2398
|
+
width: PropTypes.number,
|
|
2399
|
+
height: PropTypes.number,
|
|
2400
|
+
screen: PropTypes.string,
|
|
2401
|
+
screenState: PropTypes.string,
|
|
2426
2402
|
deviceScreens: core.PropTypes.deviceScreens,
|
|
2427
2403
|
renderContext: core.PropTypes.renderContext,
|
|
2428
|
-
onScreenChange:
|
|
2429
|
-
tapNextScreenWidthPercent:
|
|
2430
|
-
storyIsParsed:
|
|
2431
|
-
neighborScreensActive:
|
|
2432
|
-
neighborScreenOffset:
|
|
2433
|
-
neighborScreenScale:
|
|
2434
|
-
withMetadata:
|
|
2435
|
-
withoutGestures:
|
|
2436
|
-
withoutMenu:
|
|
2437
|
-
withoutScreensMenu:
|
|
2438
|
-
withoutShareMenu:
|
|
2439
|
-
withoutMenuShadow:
|
|
2440
|
-
withoutFullscreen:
|
|
2441
|
-
withoutNavigationArrow:
|
|
2442
|
-
withoutTransitions:
|
|
2443
|
-
withNeighborScreens:
|
|
2444
|
-
withNavigationHint:
|
|
2445
|
-
withoutPlaybackControls:
|
|
2446
|
-
closeable:
|
|
2447
|
-
onClose:
|
|
2448
|
-
onInteraction:
|
|
2449
|
-
onEnd:
|
|
2450
|
-
onViewModeChange:
|
|
2451
|
-
onMenuChange:
|
|
2404
|
+
onScreenChange: PropTypes.func,
|
|
2405
|
+
tapNextScreenWidthPercent: PropTypes.number,
|
|
2406
|
+
storyIsParsed: PropTypes.bool,
|
|
2407
|
+
neighborScreensActive: PropTypes.number,
|
|
2408
|
+
neighborScreenOffset: PropTypes.number,
|
|
2409
|
+
neighborScreenScale: PropTypes.number,
|
|
2410
|
+
withMetadata: PropTypes.bool,
|
|
2411
|
+
withoutGestures: PropTypes.bool,
|
|
2412
|
+
withoutMenu: PropTypes.bool,
|
|
2413
|
+
withoutScreensMenu: PropTypes.bool,
|
|
2414
|
+
withoutShareMenu: PropTypes.bool,
|
|
2415
|
+
withoutMenuShadow: PropTypes.bool,
|
|
2416
|
+
withoutFullscreen: PropTypes.bool,
|
|
2417
|
+
withoutNavigationArrow: PropTypes.bool,
|
|
2418
|
+
withoutTransitions: PropTypes.bool,
|
|
2419
|
+
withNeighborScreens: PropTypes.bool,
|
|
2420
|
+
withNavigationHint: PropTypes.bool,
|
|
2421
|
+
withoutPlaybackControls: PropTypes.bool,
|
|
2422
|
+
closeable: PropTypes.bool,
|
|
2423
|
+
onClose: PropTypes.func,
|
|
2424
|
+
onInteraction: PropTypes.func,
|
|
2425
|
+
onEnd: PropTypes.func,
|
|
2426
|
+
onViewModeChange: PropTypes.func,
|
|
2427
|
+
onMenuChange: PropTypes.func,
|
|
2452
2428
|
currentScreenMedia: core.PropTypes.ref,
|
|
2453
|
-
menuIsScreenWidth:
|
|
2454
|
-
menuHeader:
|
|
2429
|
+
menuIsScreenWidth: PropTypes.bool,
|
|
2430
|
+
menuHeader: PropTypes.node,
|
|
2455
2431
|
screensMedias: core.PropTypes.ref,
|
|
2456
|
-
screenSizeOptions:
|
|
2457
|
-
withoutMaxSize:
|
|
2458
|
-
desktopHeightRatio:
|
|
2459
|
-
screenRatio:
|
|
2432
|
+
screenSizeOptions: PropTypes.shape({
|
|
2433
|
+
withoutMaxSize: PropTypes.bool,
|
|
2434
|
+
desktopHeightRatio: PropTypes.number,
|
|
2435
|
+
screenRatio: PropTypes.number
|
|
2460
2436
|
}),
|
|
2461
|
-
className:
|
|
2437
|
+
className: PropTypes.string
|
|
2462
2438
|
};
|
|
2463
2439
|
var defaultProps$2 = {
|
|
2464
2440
|
story: null,
|
|
@@ -2502,7 +2478,6 @@ var defaultProps$2 = {
|
|
|
2502
2478
|
className: null
|
|
2503
2479
|
};
|
|
2504
2480
|
var Viewer = function Viewer(_ref) {
|
|
2505
|
-
var _ref21;
|
|
2506
2481
|
var story = _ref.story,
|
|
2507
2482
|
basePath = _ref.basePath,
|
|
2508
2483
|
viewerTheme = _ref.theme,
|
|
@@ -2558,7 +2533,7 @@ var Viewer = function Viewer(_ref) {
|
|
|
2558
2533
|
fonts = _parsedStory$fonts === void 0 ? null : _parsedStory$fonts;
|
|
2559
2534
|
var screensCount = screens.length;
|
|
2560
2535
|
var eventsManager = React.useMemo(function () {
|
|
2561
|
-
return new
|
|
2536
|
+
return new EventEmitter();
|
|
2562
2537
|
}, [parsedStory]);
|
|
2563
2538
|
var screenIndex = React.useMemo(function () {
|
|
2564
2539
|
return Math.max(0, screens.findIndex(function (it) {
|
|
@@ -2577,7 +2552,7 @@ var Viewer = function Viewer(_ref) {
|
|
|
2577
2552
|
screenDescription = _ref4$description === void 0 ? null : _ref4$description;
|
|
2578
2553
|
var finalTitle = screenTitle !== null ? screenTitle : title;
|
|
2579
2554
|
var finalMetadata = React.useMemo(function () {
|
|
2580
|
-
return screenDescription !== null ?
|
|
2555
|
+
return screenDescription !== null ? _objectSpread(_objectSpread({}, metadata), {}, {
|
|
2581
2556
|
description: screenDescription
|
|
2582
2557
|
}) : metadata;
|
|
2583
2558
|
}, [metadata, screenDescription]);
|
|
@@ -2603,7 +2578,7 @@ var Viewer = function Viewer(_ref) {
|
|
|
2603
2578
|
|
|
2604
2579
|
// Fonts
|
|
2605
2580
|
var finalFonts = React.useMemo(function () {
|
|
2606
|
-
return [].concat(
|
|
2581
|
+
return [].concat(_toConsumableArray(fonts || []), [themeFont]).filter(function (font) {
|
|
2607
2582
|
return font !== null;
|
|
2608
2583
|
});
|
|
2609
2584
|
}, [fonts]);
|
|
@@ -2628,7 +2603,7 @@ var Viewer = function Viewer(_ref) {
|
|
|
2628
2603
|
_useDimensionObserver2 = _useDimensionObserver.height,
|
|
2629
2604
|
playbackControlsContainerHeight = _useDimensionObserver2 === void 0 ? 0 : _useDimensionObserver2;
|
|
2630
2605
|
var trackScreenView = hooks.useTrackScreenView();
|
|
2631
|
-
var _useScreenSizeFromEle = hooks.useScreenSizeFromElement(
|
|
2606
|
+
var _useScreenSizeFromEle = hooks.useScreenSizeFromElement(_objectSpread({
|
|
2632
2607
|
width: width,
|
|
2633
2608
|
height: height,
|
|
2634
2609
|
screens: deviceScreens
|
|
@@ -2713,7 +2688,7 @@ var Viewer = function Viewer(_ref) {
|
|
|
2713
2688
|
changeIndex(Math.min(screens.length - 1, screenIndex + 1));
|
|
2714
2689
|
}, [changeIndex, screenIndex]);
|
|
2715
2690
|
var _useState = React.useState(false),
|
|
2716
|
-
_useState2 =
|
|
2691
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2717
2692
|
hasInteracted = _useState2[0],
|
|
2718
2693
|
setHasInteracted = _useState2[1];
|
|
2719
2694
|
var onInteractionPrivate = React.useCallback(function () {
|
|
@@ -2741,7 +2716,7 @@ var Viewer = function Viewer(_ref) {
|
|
|
2741
2716
|
var currentTarget = _ref10.currentTarget,
|
|
2742
2717
|
event = _ref10.event,
|
|
2743
2718
|
target = _ref10.target,
|
|
2744
|
-
_ref10$xy =
|
|
2719
|
+
_ref10$xy = _slicedToArray(_ref10.xy, 2),
|
|
2745
2720
|
x = _ref10$xy[0],
|
|
2746
2721
|
y = _ref10$xy[1];
|
|
2747
2722
|
if (event) {
|
|
@@ -2758,9 +2733,9 @@ var Viewer = function Viewer(_ref) {
|
|
|
2758
2733
|
}, [interactWithScreen, screenIndex]);
|
|
2759
2734
|
var computeScreenProgress = React.useCallback(function (_ref11) {
|
|
2760
2735
|
var active = _ref11.active,
|
|
2761
|
-
_ref11$movement =
|
|
2736
|
+
_ref11$movement = _slicedToArray(_ref11.movement, 1),
|
|
2762
2737
|
mx = _ref11$movement[0],
|
|
2763
|
-
_ref11$velocity =
|
|
2738
|
+
_ref11$velocity = _slicedToArray(_ref11.velocity, 1),
|
|
2764
2739
|
vx = _ref11$velocity[0];
|
|
2765
2740
|
var p = mx / screenContainerWidth; // drag "ratio": how much of the screen width has been swiped?
|
|
2766
2741
|
var forwards = mx < 0; // true if swiping to left (to navigate forwards)
|
|
@@ -2786,7 +2761,7 @@ var Viewer = function Viewer(_ref) {
|
|
|
2786
2761
|
}
|
|
2787
2762
|
}, [onScreenNavigate, screenIndex]);
|
|
2788
2763
|
var _useState3 = React.useState(true),
|
|
2789
|
-
_useState4 =
|
|
2764
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
2790
2765
|
transitioned = _useState4[0],
|
|
2791
2766
|
setTransitioned = _useState4[1];
|
|
2792
2767
|
var onTransitionStart = React.useCallback(function () {
|
|
@@ -2885,7 +2860,7 @@ var Viewer = function Viewer(_ref) {
|
|
|
2885
2860
|
}, [landscape]);
|
|
2886
2861
|
|
|
2887
2862
|
// hmm?
|
|
2888
|
-
var overscrollStyle = /*#__PURE__*/
|
|
2863
|
+
var overscrollStyle = /*#__PURE__*/React.createElement("style", {
|
|
2889
2864
|
type: "text/css"
|
|
2890
2865
|
}, "body { overscroll-behavior: contain; }");
|
|
2891
2866
|
var keyboardShortcuts = React.useMemo(function () {
|
|
@@ -2908,11 +2883,11 @@ var Viewer = function Viewer(_ref) {
|
|
|
2908
2883
|
disabled: renderContext !== 'view'
|
|
2909
2884
|
});
|
|
2910
2885
|
var _useState5 = React.useState(null),
|
|
2911
|
-
_useState6 =
|
|
2886
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
2912
2887
|
currentShareIncentive = _useState6[0],
|
|
2913
2888
|
setCurrentShareIncentive = _useState6[1];
|
|
2914
2889
|
var _useState7 = React.useState(false),
|
|
2915
|
-
_useState8 =
|
|
2890
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
2916
2891
|
shareIncentiveVisible = _useState8[0],
|
|
2917
2892
|
setShareIncentiveVisible = _useState8[1];
|
|
2918
2893
|
var _ref15 = currentScreen || {},
|
|
@@ -2949,11 +2924,11 @@ var Viewer = function Viewer(_ref) {
|
|
|
2949
2924
|
clearTimeout(timeout);
|
|
2950
2925
|
};
|
|
2951
2926
|
}, [shareIncentiveLabel, setShareIncentiveVisible, hasShareIncentive, incentiveLabel, currentIncentiveLabel, setCurrentShareIncentive, isView]);
|
|
2952
|
-
return /*#__PURE__*/
|
|
2927
|
+
return /*#__PURE__*/React.createElement(contexts.StoryProvider, {
|
|
2953
2928
|
story: parsedStory
|
|
2954
|
-
}, /*#__PURE__*/
|
|
2929
|
+
}, /*#__PURE__*/React.createElement(contexts.ScreenSizeProvider, {
|
|
2955
2930
|
size: screenSize
|
|
2956
|
-
}, /*#__PURE__*/
|
|
2931
|
+
}, /*#__PURE__*/React.createElement(contexts.ViewerProvider, {
|
|
2957
2932
|
containerRef: containerRef,
|
|
2958
2933
|
events: eventsManager,
|
|
2959
2934
|
menuVisible: menuVisible,
|
|
@@ -2967,18 +2942,18 @@ var Viewer = function Viewer(_ref) {
|
|
|
2967
2942
|
gotoNextScreen: gotoNextScreen,
|
|
2968
2943
|
disableInteraction: disableInteraction,
|
|
2969
2944
|
enableInteraction: enableInteraction
|
|
2970
|
-
}, withMetadata ? /*#__PURE__*/
|
|
2945
|
+
}, withMetadata ? /*#__PURE__*/React.createElement(components.Meta, {
|
|
2971
2946
|
title: finalTitle,
|
|
2972
2947
|
metadata: finalMetadata
|
|
2973
|
-
}, overscrollStyle) : /*#__PURE__*/
|
|
2948
|
+
}, overscrollStyle) : /*#__PURE__*/React.createElement(reactHelmet.Helmet, null, overscrollStyle), /*#__PURE__*/React.createElement(components.FontFaces, {
|
|
2974
2949
|
fonts: finalFonts
|
|
2975
|
-
}), /*#__PURE__*/
|
|
2976
|
-
className:
|
|
2950
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
2951
|
+
className: classNames([styles$6.container, screenSize.screens.map(function (screenName) {
|
|
2977
2952
|
return "story-screen-".concat(screenName);
|
|
2978
|
-
}), (
|
|
2953
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, styles$6.landscape, landscape), styles$6.withoutGestures, withoutGestures), styles$6.hideMenu, !menuVisible), styles$6.disableMenu, navigationDisabled), styles$6.fadeMenu, playing && playbackControls && !playbackcontrolsVisible), styles$6.ready, ready || withoutScreensTransforms), styles$6.hasInteracted, hasInteracted), styles$6.isDragging, isDragging), className, className)]),
|
|
2979
2954
|
ref: containerRef,
|
|
2980
2955
|
onContextMenu: onContextMenu
|
|
2981
|
-
}, !withoutMenu ? /*#__PURE__*/
|
|
2956
|
+
}, !withoutMenu ? /*#__PURE__*/React.createElement(ViewerMenu$1, {
|
|
2982
2957
|
story: parsedStory,
|
|
2983
2958
|
currentScreenIndex: screenIndex,
|
|
2984
2959
|
withShadow: menuOverScreen && !withoutMenuShadow,
|
|
@@ -2999,13 +2974,13 @@ var Viewer = function Viewer(_ref) {
|
|
|
2999
2974
|
withoutScreensMenu: withoutScreensMenu,
|
|
3000
2975
|
withoutShareMenu: withoutShareMenu,
|
|
3001
2976
|
refDots: menuDotsContainerRef
|
|
3002
|
-
}) : null, ready || withoutScreensTransforms ? /*#__PURE__*/
|
|
2977
|
+
}) : null, ready || withoutScreensTransforms ? /*#__PURE__*/React.createElement("div", Object.assign({
|
|
3003
2978
|
className: styles$6.content
|
|
3004
|
-
}, dragContentBind()), !withoutNavigationArrow && !withNeighborScreens && !navigationDisabled && screenIndex > 0 && screens.length > 1 ? /*#__PURE__*/
|
|
2979
|
+
}, dragContentBind()), !withoutNavigationArrow && !withNeighborScreens && !navigationDisabled && screenIndex > 0 && screens.length > 1 ? /*#__PURE__*/React.createElement(NavigationButton, {
|
|
3005
2980
|
direction: "previous",
|
|
3006
|
-
className:
|
|
2981
|
+
className: classNames([styles$6.navButton, styles$6.previous]),
|
|
3007
2982
|
onClick: gotoPreviousScreen
|
|
3008
|
-
}) : null, /*#__PURE__*/
|
|
2983
|
+
}) : null, /*#__PURE__*/React.createElement("div", {
|
|
3009
2984
|
className: styles$6.screensFrame,
|
|
3010
2985
|
style: {
|
|
3011
2986
|
width: screenContainerWidth,
|
|
@@ -3016,11 +2991,11 @@ var Viewer = function Viewer(_ref) {
|
|
|
3016
2991
|
var current = screenIndex === i;
|
|
3017
2992
|
var active = i >= screenIndex - neighborScreensActive && i <= screenIndex + neighborScreensActive;
|
|
3018
2993
|
var screenStyles = getScreenStylesByIndex(i, progressSpring);
|
|
3019
|
-
return /*#__PURE__*/
|
|
2994
|
+
return /*#__PURE__*/React.createElement(web.animated.div, {
|
|
3020
2995
|
key: "screen-viewer-".concat(screen.id || '', "-").concat(i + 1),
|
|
3021
2996
|
style: screenStyles,
|
|
3022
|
-
className:
|
|
3023
|
-
}, screen !== null ? /*#__PURE__*/
|
|
2997
|
+
className: classNames([styles$6.screenContainer, _defineProperty({}, styles$6.current, current)])
|
|
2998
|
+
}, screen !== null ? /*#__PURE__*/React.createElement(ViewerScreen, {
|
|
3024
2999
|
className: styles$6.screen,
|
|
3025
3000
|
screen: screen,
|
|
3026
3001
|
screenState: current ? screenState : null,
|
|
@@ -3036,25 +3011,25 @@ var Viewer = function Viewer(_ref) {
|
|
|
3036
3011
|
height: screenHeight,
|
|
3037
3012
|
scale: screenScale
|
|
3038
3013
|
}) : null);
|
|
3039
|
-
})), !withoutNavigationArrow && !withNeighborScreens && !navigationDisabled && screenIndex < screens.length - 1 ? /*#__PURE__*/
|
|
3014
|
+
})), !withoutNavigationArrow && !withNeighborScreens && !navigationDisabled && screenIndex < screens.length - 1 ? /*#__PURE__*/React.createElement(NavigationButton, {
|
|
3040
3015
|
direction: "next",
|
|
3041
|
-
className:
|
|
3016
|
+
className: classNames([styles$6.navButton, styles$6.next]),
|
|
3042
3017
|
onClick: gotoNextScreen
|
|
3043
|
-
}) : null, !withoutPlaybackControls ? /*#__PURE__*/
|
|
3018
|
+
}) : null, !withoutPlaybackControls ? /*#__PURE__*/React.createElement("div", {
|
|
3044
3019
|
className: styles$6.playbackControls,
|
|
3045
3020
|
ref: playbackControlsContainerRef
|
|
3046
|
-
}, /*#__PURE__*/
|
|
3021
|
+
}, /*#__PURE__*/React.createElement(PlaybackControls, {
|
|
3047
3022
|
className: styles$6.controls
|
|
3048
|
-
})) : null, withNavigationHint && !withNeighborScreens && !navigationDisabled && screenIndex === 0 && !hasInteracted ? /*#__PURE__*/
|
|
3023
|
+
})) : null, withNavigationHint && !withNeighborScreens && !navigationDisabled && screenIndex === 0 && !hasInteracted ? /*#__PURE__*/React.createElement(ArrowHint, {
|
|
3049
3024
|
className: styles$6.arrowHint
|
|
3050
|
-
}) : null) : null, /*#__PURE__*/
|
|
3051
|
-
className:
|
|
3025
|
+
}) : null) : null, /*#__PURE__*/React.createElement("div", {
|
|
3026
|
+
className: classNames([styles$6.shareIncentiveContainer, _defineProperty({}, styles$6.shareIncentiveVisible, hasShareIncentive && shareIncentiveVisible)]),
|
|
3052
3027
|
style: {
|
|
3053
3028
|
top: isEditor ? 10 : menuDotsContainerHeight - 10
|
|
3054
3029
|
}
|
|
3055
|
-
}, /*#__PURE__*/
|
|
3030
|
+
}, /*#__PURE__*/React.createElement(all.ShareIncentive, Object.assign({
|
|
3056
3031
|
className: styles$6.shareIncentive
|
|
3057
|
-
}, currentShareIncentive))), /*#__PURE__*/
|
|
3032
|
+
}, currentShareIncentive))), /*#__PURE__*/React.createElement(WebViewContainer, {
|
|
3058
3033
|
className: styles$6.webView,
|
|
3059
3034
|
style: {
|
|
3060
3035
|
maxWidth: Math.max(screenContainerWidth, 600)
|
|
@@ -3068,9 +3043,9 @@ var _excluded$1 = ["story", "pathWithIndex", "children", "onScreenChange"];
|
|
|
3068
3043
|
var propTypes$1 = {
|
|
3069
3044
|
story: core.PropTypes.story,
|
|
3070
3045
|
// .isRequired,
|
|
3071
|
-
pathWithIndex:
|
|
3072
|
-
children:
|
|
3073
|
-
onScreenChange:
|
|
3046
|
+
pathWithIndex: PropTypes.bool,
|
|
3047
|
+
children: PropTypes.func,
|
|
3048
|
+
onScreenChange: PropTypes.func
|
|
3074
3049
|
};
|
|
3075
3050
|
var defaultProps$1 = {
|
|
3076
3051
|
story: null,
|
|
@@ -3083,7 +3058,7 @@ var ViewerRoutes = function ViewerRoutes(_ref) {
|
|
|
3083
3058
|
pathWithIndex = _ref.pathWithIndex;
|
|
3084
3059
|
_ref.children;
|
|
3085
3060
|
var onScreenChange = _ref.onScreenChange,
|
|
3086
|
-
otherProps =
|
|
3061
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
3087
3062
|
var routes = contexts.useRoutes();
|
|
3088
3063
|
var push = contexts.useRoutePush();
|
|
3089
3064
|
var _ref2 = story || {},
|
|
@@ -3101,23 +3076,23 @@ var ViewerRoutes = function ViewerRoutes(_ref) {
|
|
|
3101
3076
|
onScreenChange(it);
|
|
3102
3077
|
}
|
|
3103
3078
|
}, [push, pathWithIndex, screens, onScreenChange]);
|
|
3104
|
-
return /*#__PURE__*/
|
|
3079
|
+
return /*#__PURE__*/React.createElement(reactRouter.Switch, null, /*#__PURE__*/React.createElement(reactRouter.Route, {
|
|
3105
3080
|
path: routes.home,
|
|
3106
3081
|
exact: true,
|
|
3107
3082
|
render: function render() {
|
|
3108
|
-
return /*#__PURE__*/
|
|
3083
|
+
return /*#__PURE__*/React.createElement(Viewer, Object.assign({}, otherProps, {
|
|
3109
3084
|
story: story,
|
|
3110
3085
|
onScreenChange: finalOnScreenChange
|
|
3111
3086
|
}));
|
|
3112
3087
|
}
|
|
3113
|
-
}), /*#__PURE__*/
|
|
3088
|
+
}), /*#__PURE__*/React.createElement(reactRouter.Route, {
|
|
3114
3089
|
path: routes.screen,
|
|
3115
3090
|
render: function render(_ref3) {
|
|
3116
3091
|
var _ref3$match$params$sc = _ref3.match.params.screen,
|
|
3117
3092
|
screenParam = _ref3$match$params$sc === void 0 ? null : _ref3$match$params$sc;
|
|
3118
3093
|
var screenFromIndex = pathWithIndex && screenParam !== null ? screens[parseInt(screenParam, 10) - 1] || null : null;
|
|
3119
3094
|
var screenId = pathWithIndex ? (screenFromIndex || {}).id || null : screenParam;
|
|
3120
|
-
return /*#__PURE__*/
|
|
3095
|
+
return /*#__PURE__*/React.createElement(Viewer, Object.assign({}, otherProps, {
|
|
3121
3096
|
story: story,
|
|
3122
3097
|
screen: screenId,
|
|
3123
3098
|
onScreenChange: finalOnScreenChange
|
|
@@ -3138,21 +3113,21 @@ var defaultRoutes = {
|
|
|
3138
3113
|
var _excluded = ["story", "paused", "screenComponents", "memoryRouter", "basePath", "routes", "withoutRouter", "googleApiKey", "visitor", "trackingVariables", "locale", "locales", "translations", "pathWithIndex"];
|
|
3139
3114
|
var propTypes = {
|
|
3140
3115
|
story: core.PropTypes.story,
|
|
3141
|
-
paused:
|
|
3142
|
-
screen:
|
|
3143
|
-
screenComponents:
|
|
3144
|
-
memoryRouter:
|
|
3145
|
-
basePath:
|
|
3116
|
+
paused: PropTypes.bool,
|
|
3117
|
+
screen: PropTypes.string,
|
|
3118
|
+
screenComponents: PropTypes.objectOf(PropTypes.elementType),
|
|
3119
|
+
memoryRouter: PropTypes.bool,
|
|
3120
|
+
basePath: PropTypes.string,
|
|
3146
3121
|
routes: routes,
|
|
3147
|
-
withoutRouter:
|
|
3148
|
-
googleApiKey:
|
|
3122
|
+
withoutRouter: PropTypes.bool,
|
|
3123
|
+
googleApiKey: PropTypes.string,
|
|
3149
3124
|
visitor: core.PropTypes.visitor,
|
|
3150
3125
|
trackingVariables: core.PropTypes.trackingVariables,
|
|
3151
|
-
locale:
|
|
3152
|
-
locales:
|
|
3153
|
-
translations:
|
|
3154
|
-
pathWithIndex:
|
|
3155
|
-
children:
|
|
3126
|
+
locale: PropTypes.string,
|
|
3127
|
+
locales: PropTypes.arrayOf(PropTypes.string),
|
|
3128
|
+
translations: PropTypes.objectOf(PropTypes.string),
|
|
3129
|
+
pathWithIndex: PropTypes.bool,
|
|
3130
|
+
children: PropTypes.func
|
|
3156
3131
|
};
|
|
3157
3132
|
var defaultProps = {
|
|
3158
3133
|
story: null,
|
|
@@ -3187,7 +3162,7 @@ var ViewerContainer = function ViewerContainer(_ref) {
|
|
|
3187
3162
|
locales = _ref.locales,
|
|
3188
3163
|
translations = _ref.translations,
|
|
3189
3164
|
pathWithIndex = _ref.pathWithIndex,
|
|
3190
|
-
otherProps =
|
|
3165
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
3191
3166
|
var Router = memoryRouter ? reactRouter.MemoryRouter : reactRouterDom.BrowserRouter;
|
|
3192
3167
|
var finalTrackingVariables = React.useMemo(function () {
|
|
3193
3168
|
if (story === null && trackingVariables === null) {
|
|
@@ -3201,7 +3176,7 @@ var ViewerContainer = function ViewerContainer(_ref) {
|
|
|
3201
3176
|
title = _story$title === void 0 ? null : _story$title,
|
|
3202
3177
|
_story$components = story.components,
|
|
3203
3178
|
components = _story$components === void 0 ? [] : _story$components;
|
|
3204
|
-
return
|
|
3179
|
+
return _objectSpread({
|
|
3205
3180
|
storyId: id,
|
|
3206
3181
|
storySlug: slug,
|
|
3207
3182
|
storyTitle: title,
|
|
@@ -3213,36 +3188,36 @@ var ViewerContainer = function ViewerContainer(_ref) {
|
|
|
3213
3188
|
var _ref3 = metadata || {},
|
|
3214
3189
|
_ref3$language = _ref3.language,
|
|
3215
3190
|
finalLocale = _ref3$language === void 0 ? locale : _ref3$language;
|
|
3216
|
-
var content = /*#__PURE__*/
|
|
3191
|
+
var content = /*#__PURE__*/React.createElement(intl.IntlProvider, {
|
|
3217
3192
|
locale: finalLocale,
|
|
3218
3193
|
locales: locales,
|
|
3219
3194
|
extraMessages: translations
|
|
3220
|
-
}, /*#__PURE__*/
|
|
3195
|
+
}, /*#__PURE__*/React.createElement(contexts.GoogleKeysProvider, {
|
|
3221
3196
|
apiKey: googleApiKey
|
|
3222
|
-
}, /*#__PURE__*/
|
|
3197
|
+
}, /*#__PURE__*/React.createElement(contexts.GoogleMapsClientProvider, {
|
|
3223
3198
|
locale: finalLocale
|
|
3224
|
-
}, /*#__PURE__*/
|
|
3225
|
-
manager:
|
|
3226
|
-
}, /*#__PURE__*/
|
|
3199
|
+
}, /*#__PURE__*/React.createElement(contexts.FieldsProvider, {
|
|
3200
|
+
manager: fieldsManager
|
|
3201
|
+
}, /*#__PURE__*/React.createElement(screens.ScreensProvider, null, /*#__PURE__*/React.createElement(contexts.ComponentsProvider, {
|
|
3227
3202
|
namespace: contexts.SCREENS_NAMESPACE,
|
|
3228
3203
|
components: screenComponents || {}
|
|
3229
|
-
}, /*#__PURE__*/
|
|
3204
|
+
}, /*#__PURE__*/React.createElement(contexts.VisitorProvider, {
|
|
3230
3205
|
visitor: visitor
|
|
3231
|
-
}, /*#__PURE__*/
|
|
3206
|
+
}, /*#__PURE__*/React.createElement(contexts.PlaybackProvider, {
|
|
3232
3207
|
paused: paused
|
|
3233
|
-
}, /*#__PURE__*/
|
|
3208
|
+
}, /*#__PURE__*/React.createElement(contexts.TrackingProvider, {
|
|
3234
3209
|
variables: finalTrackingVariables
|
|
3235
|
-
}, withoutRouter ? /*#__PURE__*/
|
|
3210
|
+
}, withoutRouter ? /*#__PURE__*/React.createElement(Viewer, Object.assign({
|
|
3236
3211
|
story: story,
|
|
3237
3212
|
basePath: basePath
|
|
3238
|
-
}, otherProps)) : /*#__PURE__*/
|
|
3213
|
+
}, otherProps)) : /*#__PURE__*/React.createElement(ViewerRoutes, Object.assign({
|
|
3239
3214
|
story: story,
|
|
3240
3215
|
basePath: basePath,
|
|
3241
3216
|
pathWithIndex: pathWithIndex
|
|
3242
3217
|
}, otherProps)))))))))));
|
|
3243
|
-
return withoutRouter ? content : /*#__PURE__*/
|
|
3218
|
+
return withoutRouter ? content : /*#__PURE__*/React.createElement(Router, {
|
|
3244
3219
|
basename: !memoryRouter ? basePath : null
|
|
3245
|
-
}, /*#__PURE__*/
|
|
3220
|
+
}, /*#__PURE__*/React.createElement(contexts.RoutesProvider, {
|
|
3246
3221
|
routes: routes
|
|
3247
3222
|
}, content));
|
|
3248
3223
|
};
|
|
@@ -3250,4 +3225,4 @@ ViewerContainer.propTypes = propTypes;
|
|
|
3250
3225
|
ViewerContainer.defaultProps = defaultProps;
|
|
3251
3226
|
|
|
3252
3227
|
exports.Viewer = Viewer;
|
|
3253
|
-
exports
|
|
3228
|
+
exports.default = ViewerContainer;
|