@micromag/viewer 0.3.832 → 0.4.6
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 +16 -16
- package/es/index.d.ts +95 -0
- package/es/index.js +571 -1044
- package/es/styles.css +20 -0
- package/package.json +24 -26
- package/scss/styles.scss +0 -1
package/es/index.js
CHANGED
|
@@ -4,10 +4,8 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
|
|
|
4
4
|
import { useRoutes, useUrlGenerator, useMemoryRouter, RoutesProvider } from '@folklore/routes';
|
|
5
5
|
import isEmpty from 'lodash/isEmpty';
|
|
6
6
|
import uniq from 'lodash/uniq';
|
|
7
|
-
import PropTypes from 'prop-types';
|
|
8
7
|
import React, { useEffect, useState, useCallback, useMemo, useRef } from 'react';
|
|
9
8
|
import { Link, useLocation, Switch, Route, Router } from 'wouter';
|
|
10
|
-
import { PropTypes as PropTypes$1 } from '@micromag/core';
|
|
11
9
|
import { useViewerSize, usePlaybackContext, useViewerWebView, useViewerInteraction, useStory, StoryProvider, ScreenSizeProvider, ViewerProvider, SettingsProvider, GoogleKeysProvider, GoogleMapsClientProvider, ComponentsProvider, SCREENS_NAMESPACE, VisitorProvider, PlaybackProvider, TrackingProvider } from '@micromag/core/contexts';
|
|
12
10
|
import { useIsVisible, useDimensionObserver, useTrackEvent, useDragProgress, useMediaProgress, useMediaCurrentTime, useMediaDuration, useMediaReady, useMediaState, useParsedStory, useLoadedFonts, useTrackScreenView, useScreenSizeFromElement, useFullscreen, useActivityDetector, useSupportsWebp } from '@micromag/core/hooks';
|
|
13
11
|
import { IntlProvider } from '@micromag/intl';
|
|
@@ -30,12 +28,6 @@ import { useGesture } from '@use-gesture/react';
|
|
|
30
28
|
import queryString from 'query-string';
|
|
31
29
|
import WebView from '@micromag/element-webview';
|
|
32
30
|
|
|
33
|
-
// eslint-disable-next-line import/prefer-default-export
|
|
34
|
-
var routes = PropTypes.shape({
|
|
35
|
-
home: PropTypes.string.isRequired,
|
|
36
|
-
screen: PropTypes.string.isRequired
|
|
37
|
-
});
|
|
38
|
-
|
|
39
31
|
function useKeyboardShortcuts() {
|
|
40
32
|
var shortcuts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
41
33
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
@@ -94,7 +86,11 @@ function checkClickable(el) {
|
|
|
94
86
|
// return true;
|
|
95
87
|
// }
|
|
96
88
|
|
|
97
|
-
|
|
89
|
+
// console.log('tags', tags, options);
|
|
90
|
+
|
|
91
|
+
if (tags.filter(function (t) {
|
|
92
|
+
return t !== null;
|
|
93
|
+
}).map(function (it) {
|
|
98
94
|
return it.toLowerCase();
|
|
99
95
|
}).indexOf(tagName.toLowerCase()) !== -1 || classList !== null && classList.contains('clickable')) {
|
|
100
96
|
return true;
|
|
@@ -225,88 +221,55 @@ function checkDraggable(el) {
|
|
|
225
221
|
return false;
|
|
226
222
|
}
|
|
227
223
|
|
|
228
|
-
var styles$i = {"container":"micromag-viewer-buttons-button-container","
|
|
224
|
+
var styles$i = {"container":"micromag-viewer-buttons-button-container","icon":"micromag-viewer-buttons-button-icon","label":"micromag-viewer-buttons-button-label","asLink":"micromag-viewer-buttons-button-asLink","withIcon":"micromag-viewer-buttons-button-withIcon","right":"micromag-viewer-buttons-button-right","icon-right":"micromag-viewer-buttons-button-icon-right","withIconColumns":"micromag-viewer-buttons-button-withIconColumns","linkDisabled":"micromag-viewer-buttons-button-linkDisabled"};
|
|
229
225
|
|
|
230
226
|
var _excluded$a = ["type", "theme", "size", "href", "external", "direct", "target", "label", "children", "focusable", "active", "icon", "iconPosition", "disabled", "loading", "disableOnLoading", "withoutTheme", "asLink", "ariaLabel", "onClick", "className", "iconClassName", "labelClassName", "refButton"];
|
|
231
|
-
|
|
232
|
-
type
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
external: PropTypes.bool,
|
|
237
|
-
direct: PropTypes.bool,
|
|
238
|
-
target: PropTypes.string,
|
|
239
|
-
label: PropTypes$1.label,
|
|
240
|
-
children: PropTypes$1.label,
|
|
241
|
-
focusable: PropTypes.bool,
|
|
242
|
-
active: PropTypes.bool,
|
|
243
|
-
icon: PropTypes.node,
|
|
244
|
-
iconPosition: PropTypes.oneOf(['left', 'right', 'inline']),
|
|
245
|
-
disabled: PropTypes.bool,
|
|
246
|
-
loading: PropTypes.bool,
|
|
247
|
-
disableOnLoading: PropTypes.bool,
|
|
248
|
-
withoutTheme: PropTypes.bool,
|
|
249
|
-
asLink: PropTypes.bool,
|
|
250
|
-
ariaLabel: PropTypes.string,
|
|
251
|
-
className: PropTypes.string,
|
|
252
|
-
iconClassName: PropTypes.string,
|
|
253
|
-
labelClassName: PropTypes.string,
|
|
254
|
-
onClick: PropTypes.func,
|
|
255
|
-
refButton: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
256
|
-
current: PropTypes.any // eslint-disable-line
|
|
257
|
-
})])
|
|
258
|
-
};
|
|
259
|
-
var defaultProps$r = {
|
|
260
|
-
type: 'button',
|
|
261
|
-
theme: null,
|
|
262
|
-
size: null,
|
|
263
|
-
href: null,
|
|
264
|
-
external: false,
|
|
265
|
-
direct: false,
|
|
266
|
-
target: '_blank',
|
|
267
|
-
label: null,
|
|
268
|
-
children: null,
|
|
269
|
-
focusable: true,
|
|
270
|
-
active: false,
|
|
271
|
-
icon: null,
|
|
272
|
-
iconPosition: 'inline',
|
|
273
|
-
disabled: false,
|
|
274
|
-
loading: false,
|
|
275
|
-
disableOnLoading: true,
|
|
276
|
-
withoutTheme: false,
|
|
277
|
-
asLink: false,
|
|
278
|
-
ariaLabel: null,
|
|
279
|
-
className: null,
|
|
280
|
-
iconClassName: null,
|
|
281
|
-
labelClassName: null,
|
|
282
|
-
onClick: null,
|
|
283
|
-
refButton: null
|
|
284
|
-
};
|
|
285
|
-
var Button = function Button(_ref) {
|
|
286
|
-
var type = _ref.type,
|
|
287
|
-
theme = _ref.theme;
|
|
227
|
+
function Button(_ref) {
|
|
228
|
+
var _ref$type = _ref.type,
|
|
229
|
+
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
230
|
+
_ref$theme = _ref.theme,
|
|
231
|
+
theme = _ref$theme === void 0 ? null : _ref$theme;
|
|
288
232
|
_ref.size;
|
|
289
|
-
var href = _ref.href,
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
233
|
+
var _ref$href = _ref.href,
|
|
234
|
+
href = _ref$href === void 0 ? null : _ref$href,
|
|
235
|
+
_ref$external = _ref.external,
|
|
236
|
+
external = _ref$external === void 0 ? false : _ref$external,
|
|
237
|
+
_ref$direct = _ref.direct,
|
|
238
|
+
direct = _ref$direct === void 0 ? false : _ref$direct,
|
|
239
|
+
_ref$target = _ref.target,
|
|
240
|
+
target = _ref$target === void 0 ? '_blank' : _ref$target,
|
|
241
|
+
_ref$label = _ref.label,
|
|
242
|
+
label = _ref$label === void 0 ? null : _ref$label,
|
|
243
|
+
_ref$children = _ref.children,
|
|
244
|
+
children = _ref$children === void 0 ? null : _ref$children,
|
|
245
|
+
_ref$focusable = _ref.focusable,
|
|
246
|
+
focusable = _ref$focusable === void 0 ? true : _ref$focusable;
|
|
296
247
|
_ref.active;
|
|
297
|
-
var icon = _ref.icon,
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
248
|
+
var _ref$icon = _ref.icon,
|
|
249
|
+
icon = _ref$icon === void 0 ? null : _ref$icon,
|
|
250
|
+
_ref$iconPosition = _ref.iconPosition,
|
|
251
|
+
iconPosition = _ref$iconPosition === void 0 ? 'inline' : _ref$iconPosition,
|
|
252
|
+
_ref$disabled = _ref.disabled,
|
|
253
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
254
|
+
_ref$loading = _ref.loading,
|
|
255
|
+
loading = _ref$loading === void 0 ? false : _ref$loading,
|
|
256
|
+
_ref$disableOnLoading = _ref.disableOnLoading,
|
|
257
|
+
disableOnLoading = _ref$disableOnLoading === void 0 ? true : _ref$disableOnLoading;
|
|
302
258
|
_ref.withoutTheme;
|
|
303
|
-
var asLink = _ref.asLink,
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
259
|
+
var _ref$asLink = _ref.asLink,
|
|
260
|
+
asLink = _ref$asLink === void 0 ? false : _ref$asLink,
|
|
261
|
+
_ref$ariaLabel = _ref.ariaLabel,
|
|
262
|
+
ariaLabel = _ref$ariaLabel === void 0 ? null : _ref$ariaLabel,
|
|
263
|
+
_ref$onClick = _ref.onClick,
|
|
264
|
+
onClick = _ref$onClick === void 0 ? null : _ref$onClick,
|
|
265
|
+
_ref$className = _ref.className,
|
|
266
|
+
className = _ref$className === void 0 ? null : _ref$className,
|
|
267
|
+
_ref$iconClassName = _ref.iconClassName,
|
|
268
|
+
iconClassName = _ref$iconClassName === void 0 ? null : _ref$iconClassName,
|
|
269
|
+
_ref$labelClassName = _ref.labelClassName,
|
|
270
|
+
labelClassName = _ref$labelClassName === void 0 ? null : _ref$labelClassName,
|
|
271
|
+
_ref$refButton = _ref.refButton,
|
|
272
|
+
refButton = _ref$refButton === void 0 ? null : _ref$refButton,
|
|
310
273
|
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
311
274
|
var finalLabel = label || children;
|
|
312
275
|
var text = finalLabel !== null ? /*#__PURE__*/React.createElement(Label, null, finalLabel) : null;
|
|
@@ -365,46 +328,30 @@ var Button = function Button(_ref) {
|
|
|
365
328
|
"aria-label": ariaLabel,
|
|
366
329
|
tabIndex: focusable ? '0' : '-1'
|
|
367
330
|
}), content);
|
|
368
|
-
}
|
|
369
|
-
Button.propTypes = propTypes$r;
|
|
370
|
-
Button.defaultProps = defaultProps$r;
|
|
331
|
+
}
|
|
371
332
|
|
|
372
333
|
var styles$h = {"container":"micromag-viewer-buttons-icon-button-container","label":"micromag-viewer-buttons-icon-button-label","icon":"micromag-viewer-buttons-icon-button-icon"};
|
|
373
334
|
|
|
374
335
|
var _excluded$9 = ["iconClassName", "className"];
|
|
375
|
-
|
|
376
|
-
iconClassName
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
iconClassName: null,
|
|
381
|
-
className: null
|
|
382
|
-
};
|
|
383
|
-
var IconButton = function IconButton(_ref) {
|
|
384
|
-
var iconClassName = _ref.iconClassName,
|
|
385
|
-
className = _ref.className,
|
|
336
|
+
function IconButton(_ref) {
|
|
337
|
+
var _ref$iconClassName = _ref.iconClassName,
|
|
338
|
+
iconClassName = _ref$iconClassName === void 0 ? null : _ref$iconClassName,
|
|
339
|
+
_ref$className = _ref.className,
|
|
340
|
+
className = _ref$className === void 0 ? null : _ref$className,
|
|
386
341
|
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
387
342
|
return /*#__PURE__*/React.createElement(Button, Object.assign({
|
|
388
343
|
className: classNames([styles$h.container, _defineProperty({}, className, className !== null)]),
|
|
389
344
|
labelClassName: styles$h.label,
|
|
390
345
|
iconClassName: classNames([styles$h.icon, _defineProperty({}, iconClassName, iconClassName !== null)])
|
|
391
346
|
}, props));
|
|
392
|
-
}
|
|
393
|
-
IconButton.propTypes = propTypes$q;
|
|
394
|
-
IconButton.defaultProps = defaultProps$q;
|
|
347
|
+
}
|
|
395
348
|
|
|
396
349
|
var _excluded$8 = ["single", "className"];
|
|
397
|
-
|
|
398
|
-
single
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
single: false,
|
|
403
|
-
className: null
|
|
404
|
-
};
|
|
405
|
-
var CloseMenuButton = function CloseMenuButton(_ref) {
|
|
406
|
-
var single = _ref.single,
|
|
407
|
-
className = _ref.className,
|
|
350
|
+
function CloseMenuButton(_ref) {
|
|
351
|
+
var _ref$single = _ref.single,
|
|
352
|
+
single = _ref$single === void 0 ? false : _ref$single,
|
|
353
|
+
_ref$className = _ref.className,
|
|
354
|
+
className = _ref$className === void 0 ? null : _ref$className,
|
|
408
355
|
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
409
356
|
var intl = useIntl();
|
|
410
357
|
return /*#__PURE__*/React.createElement(IconButton, Object.assign({
|
|
@@ -447,21 +394,12 @@ var CloseMenuButton = function CloseMenuButton(_ref) {
|
|
|
447
394
|
stroke: "currentColor"
|
|
448
395
|
}))
|
|
449
396
|
}, props));
|
|
450
|
-
}
|
|
451
|
-
CloseMenuButton.propTypes = propTypes$p;
|
|
452
|
-
CloseMenuButton.defaultProps = defaultProps$p;
|
|
397
|
+
}
|
|
453
398
|
|
|
454
399
|
var _excluded$7 = ["className", "iconClassName"];
|
|
455
|
-
|
|
456
|
-
className
|
|
457
|
-
|
|
458
|
-
};
|
|
459
|
-
var defaultProps$o = {
|
|
460
|
-
className: null,
|
|
461
|
-
iconClassName: null
|
|
462
|
-
};
|
|
463
|
-
var MenuButton = function MenuButton(_ref) {
|
|
464
|
-
var className = _ref.className;
|
|
400
|
+
function MenuButton(_ref) {
|
|
401
|
+
var _ref$className = _ref.className,
|
|
402
|
+
className = _ref$className === void 0 ? null : _ref$className;
|
|
465
403
|
_ref.iconClassName;
|
|
466
404
|
var props = _objectWithoutProperties(_ref, _excluded$7);
|
|
467
405
|
var intl = useIntl();
|
|
@@ -499,19 +437,12 @@ var MenuButton = function MenuButton(_ref) {
|
|
|
499
437
|
stroke: "currentColor"
|
|
500
438
|
}))
|
|
501
439
|
}, props));
|
|
502
|
-
}
|
|
503
|
-
MenuButton.propTypes = propTypes$o;
|
|
504
|
-
MenuButton.defaultProps = defaultProps$o;
|
|
440
|
+
}
|
|
505
441
|
|
|
506
442
|
var _excluded$6 = ["className"];
|
|
507
|
-
|
|
508
|
-
className
|
|
509
|
-
|
|
510
|
-
var defaultProps$n = {
|
|
511
|
-
className: null
|
|
512
|
-
};
|
|
513
|
-
var ShareButton = function ShareButton(_ref) {
|
|
514
|
-
var className = _ref.className,
|
|
443
|
+
function ShareButton(_ref) {
|
|
444
|
+
var _ref$className = _ref.className,
|
|
445
|
+
className = _ref$className === void 0 ? null : _ref$className,
|
|
515
446
|
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
516
447
|
var intl = useIntl();
|
|
517
448
|
return /*#__PURE__*/React.createElement(IconButton, Object.assign({
|
|
@@ -542,33 +473,21 @@ var ShareButton = function ShareButton(_ref) {
|
|
|
542
473
|
fill: "currentColor"
|
|
543
474
|
}))
|
|
544
475
|
}, props));
|
|
545
|
-
}
|
|
546
|
-
ShareButton.propTypes = propTypes$n;
|
|
547
|
-
ShareButton.defaultProps = defaultProps$n;
|
|
476
|
+
}
|
|
548
477
|
|
|
549
478
|
var styles$g = {"container":"micromag-viewer-buttons-toggle-button-container","normal":"micromag-viewer-buttons-toggle-button-normal","toggled":"micromag-viewer-buttons-toggle-button-toggled"};
|
|
550
479
|
|
|
551
|
-
|
|
552
|
-
className
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
button: null,
|
|
563
|
-
toggledButton: null,
|
|
564
|
-
toggledButtonClassName: null
|
|
565
|
-
};
|
|
566
|
-
var ToggleButton = function ToggleButton(_ref) {
|
|
567
|
-
var className = _ref.className,
|
|
568
|
-
progressSpring = _ref.progressSpring,
|
|
569
|
-
button = _ref.button,
|
|
570
|
-
toggledButton = _ref.toggledButton,
|
|
571
|
-
toggledButtonClassName = _ref.toggledButtonClassName;
|
|
480
|
+
function ToggleButton(_ref) {
|
|
481
|
+
var _ref$className = _ref.className,
|
|
482
|
+
className = _ref$className === void 0 ? null : _ref$className,
|
|
483
|
+
_ref$progressSpring = _ref.progressSpring,
|
|
484
|
+
progressSpring = _ref$progressSpring === void 0 ? null : _ref$progressSpring,
|
|
485
|
+
_ref$button = _ref.button,
|
|
486
|
+
button = _ref$button === void 0 ? null : _ref$button,
|
|
487
|
+
_ref$toggledButton = _ref.toggledButton,
|
|
488
|
+
toggledButton = _ref$toggledButton === void 0 ? null : _ref$toggledButton,
|
|
489
|
+
_ref$toggledButtonCla = _ref.toggledButtonClassName,
|
|
490
|
+
toggledButtonClassName = _ref$toggledButtonCla === void 0 ? null : _ref$toggledButtonCla;
|
|
572
491
|
if (button === null) return null;
|
|
573
492
|
return /*#__PURE__*/React.createElement("div", {
|
|
574
493
|
className: classNames([styles$g.container, _defineProperty({}, className, className !== null)])
|
|
@@ -587,30 +506,19 @@ var ToggleButton = function ToggleButton(_ref) {
|
|
|
587
506
|
})
|
|
588
507
|
}
|
|
589
508
|
}, toggledButton));
|
|
590
|
-
}
|
|
591
|
-
ToggleButton.propTypes = propTypes$m;
|
|
592
|
-
ToggleButton.defaultProps = defaultProps$m;
|
|
509
|
+
}
|
|
593
510
|
|
|
594
|
-
var styles$f = {"
|
|
511
|
+
var styles$f = {"container":"micromag-viewer-menus-menu-container-container","heightContainer":"micromag-viewer-menus-menu-container-heightContainer","backdrop":"micromag-viewer-menus-menu-container-backdrop"};
|
|
595
512
|
|
|
596
|
-
|
|
597
|
-
className
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
progressSpring: null,
|
|
606
|
-
theme: null,
|
|
607
|
-
children: null
|
|
608
|
-
};
|
|
609
|
-
var ViewerMenuContainer = function ViewerMenuContainer(_ref) {
|
|
610
|
-
var className = _ref.className,
|
|
611
|
-
progressSpring = _ref.progressSpring,
|
|
612
|
-
viewerTheme = _ref.theme,
|
|
613
|
-
children = _ref.children;
|
|
513
|
+
function ViewerMenuContainer(_ref) {
|
|
514
|
+
var _ref$className = _ref.className,
|
|
515
|
+
className = _ref$className === void 0 ? null : _ref$className,
|
|
516
|
+
_ref$progressSpring = _ref.progressSpring,
|
|
517
|
+
progressSpring = _ref$progressSpring === void 0 ? null : _ref$progressSpring,
|
|
518
|
+
_ref$theme = _ref.theme,
|
|
519
|
+
viewerTheme = _ref$theme === void 0 ? null : _ref$theme,
|
|
520
|
+
_ref$children = _ref.children,
|
|
521
|
+
children = _ref$children === void 0 ? null : _ref$children;
|
|
614
522
|
var _ref2 = viewerTheme || {},
|
|
615
523
|
_ref2$background = _ref2.background,
|
|
616
524
|
background = _ref2$background === void 0 ? null : _ref2$background;
|
|
@@ -645,44 +553,27 @@ var ViewerMenuContainer = function ViewerMenuContainer(_ref) {
|
|
|
645
553
|
})
|
|
646
554
|
}
|
|
647
555
|
}));
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
active: false,
|
|
670
|
-
colors: null,
|
|
671
|
-
count: 1,
|
|
672
|
-
subIndex: 0,
|
|
673
|
-
vertical: false,
|
|
674
|
-
onClick: null,
|
|
675
|
-
className: null
|
|
676
|
-
};
|
|
677
|
-
var ViewerMenuDot = function ViewerMenuDot(_ref) {
|
|
678
|
-
var current = _ref.current,
|
|
679
|
-
active = _ref.active,
|
|
680
|
-
colors = _ref.colors,
|
|
681
|
-
count = _ref.count,
|
|
682
|
-
subIndex = _ref.subIndex,
|
|
683
|
-
vertical = _ref.vertical,
|
|
684
|
-
_onClick = _ref.onClick,
|
|
685
|
-
className = _ref.className;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
var styles$e = {"container":"micromag-viewer-menus-menu-dot-container","dot":"micromag-viewer-menus-menu-dot-dot","progress":"micromag-viewer-menus-menu-dot-progress","vertical":"micromag-viewer-menus-menu-dot-vertical"};
|
|
559
|
+
|
|
560
|
+
function ViewerMenuDot(_ref) {
|
|
561
|
+
var _ref$current = _ref.current,
|
|
562
|
+
current = _ref$current === void 0 ? false : _ref$current,
|
|
563
|
+
_ref$active = _ref.active,
|
|
564
|
+
active = _ref$active === void 0 ? false : _ref$active,
|
|
565
|
+
_ref$colors = _ref.colors,
|
|
566
|
+
colors = _ref$colors === void 0 ? null : _ref$colors,
|
|
567
|
+
_ref$count = _ref.count,
|
|
568
|
+
count = _ref$count === void 0 ? 1 : _ref$count,
|
|
569
|
+
_ref$subIndex = _ref.subIndex,
|
|
570
|
+
subIndex = _ref$subIndex === void 0 ? 0 : _ref$subIndex,
|
|
571
|
+
_ref$vertical = _ref.vertical,
|
|
572
|
+
vertical = _ref$vertical === void 0 ? false : _ref$vertical,
|
|
573
|
+
_ref$onClick = _ref.onClick,
|
|
574
|
+
_onClick = _ref$onClick === void 0 ? null : _ref$onClick,
|
|
575
|
+
_ref$className = _ref.className,
|
|
576
|
+
className = _ref$className === void 0 ? null : _ref$className;
|
|
686
577
|
var _ref2 = colors || {},
|
|
687
578
|
_ref2$primary = _ref2.primary,
|
|
688
579
|
primary = _ref2$primary === void 0 ? 'rgba(255, 255, 255, 1)' : _ref2$primary,
|
|
@@ -734,54 +625,34 @@ var ViewerMenuDot = function ViewerMenuDot(_ref) {
|
|
|
734
625
|
backgroundColor: primary
|
|
735
626
|
})
|
|
736
627
|
})));
|
|
737
|
-
}
|
|
738
|
-
ViewerMenuDot.propTypes = propTypes$k;
|
|
739
|
-
ViewerMenuDot.defaultProps = defaultProps$k;
|
|
628
|
+
}
|
|
740
629
|
|
|
741
|
-
var styles$d = {"container":"micromag-viewer-menus-menu-dots-container","
|
|
630
|
+
var styles$d = {"container":"micromag-viewer-menus-menu-dots-container","dot":"micromag-viewer-menus-menu-dots-dot","withButtons":"micromag-viewer-menus-menu-dots-withButtons","closeButton":"micromag-viewer-menus-menu-dots-closeButton","buttons":"micromag-viewer-menus-menu-dots-buttons","vertical":"micromag-viewer-menus-menu-dots-vertical"};
|
|
742
631
|
|
|
743
632
|
var _excluded$5 = ["direction", "items", "onClickDot", "onClickScreensMenu", "colors", "closeable", "buttons", "withItemClick", "withoutScreensMenu", "onClose", "className"];
|
|
744
|
-
|
|
745
|
-
direction
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
closeable: false,
|
|
768
|
-
withItemClick: false,
|
|
769
|
-
withoutScreensMenu: false,
|
|
770
|
-
onClose: null,
|
|
771
|
-
className: null
|
|
772
|
-
};
|
|
773
|
-
var ViewerMenuDots = function ViewerMenuDots(_ref) {
|
|
774
|
-
var direction = _ref.direction,
|
|
775
|
-
items = _ref.items,
|
|
776
|
-
onClickDot = _ref.onClickDot,
|
|
777
|
-
onClickScreensMenu = _ref.onClickScreensMenu,
|
|
778
|
-
colors = _ref.colors,
|
|
779
|
-
closeable = _ref.closeable,
|
|
780
|
-
buttons = _ref.buttons,
|
|
781
|
-
withItemClick = _ref.withItemClick,
|
|
782
|
-
withoutScreensMenu = _ref.withoutScreensMenu,
|
|
783
|
-
onClose = _ref.onClose,
|
|
784
|
-
className = _ref.className,
|
|
633
|
+
function ViewerMenuDots(_ref) {
|
|
634
|
+
var _ref$direction = _ref.direction,
|
|
635
|
+
direction = _ref$direction === void 0 ? 'horizontal' : _ref$direction,
|
|
636
|
+
_ref$items = _ref.items,
|
|
637
|
+
items = _ref$items === void 0 ? [] : _ref$items,
|
|
638
|
+
_ref$onClickDot = _ref.onClickDot,
|
|
639
|
+
onClickDot = _ref$onClickDot === void 0 ? null : _ref$onClickDot,
|
|
640
|
+
_ref$onClickScreensMe = _ref.onClickScreensMenu,
|
|
641
|
+
onClickScreensMenu = _ref$onClickScreensMe === void 0 ? null : _ref$onClickScreensMe,
|
|
642
|
+
_ref$colors = _ref.colors,
|
|
643
|
+
colors = _ref$colors === void 0 ? null : _ref$colors,
|
|
644
|
+
_ref$closeable = _ref.closeable,
|
|
645
|
+
closeable = _ref$closeable === void 0 ? false : _ref$closeable,
|
|
646
|
+
_ref$buttons = _ref.buttons,
|
|
647
|
+
buttons = _ref$buttons === void 0 ? null : _ref$buttons,
|
|
648
|
+
_ref$withItemClick = _ref.withItemClick,
|
|
649
|
+
withItemClick = _ref$withItemClick === void 0 ? false : _ref$withItemClick,
|
|
650
|
+
_ref$withoutScreensMe = _ref.withoutScreensMenu,
|
|
651
|
+
withoutScreensMenu = _ref$withoutScreensMe === void 0 ? false : _ref$withoutScreensMe,
|
|
652
|
+
_ref$onClose = _ref.onClose,
|
|
653
|
+
onClose = _ref$onClose === void 0 ? null : _ref$onClose,
|
|
654
|
+
_ref$className = _ref.className,
|
|
655
|
+
className = _ref$className === void 0 ? null : _ref$className,
|
|
785
656
|
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
786
657
|
var _ref2 = colors || {},
|
|
787
658
|
_ref2$primary = _ref2.primary,
|
|
@@ -867,20 +738,11 @@ var ViewerMenuDots = function ViewerMenuDots(_ref) {
|
|
|
867
738
|
}, /*#__PURE__*/React.createElement(CloseIcon, null)) : null, buttons !== null ? /*#__PURE__*/React.createElement("div", {
|
|
868
739
|
className: styles$d.buttons
|
|
869
740
|
}, buttons) : null);
|
|
870
|
-
}
|
|
871
|
-
ViewerMenuDots.propTypes = propTypes$j;
|
|
872
|
-
ViewerMenuDots.defaultProps = defaultProps$j;
|
|
741
|
+
}
|
|
873
742
|
|
|
874
|
-
|
|
875
|
-
color
|
|
876
|
-
|
|
877
|
-
};
|
|
878
|
-
var defaultProps$i = {
|
|
879
|
-
color: 'currentColor',
|
|
880
|
-
className: null
|
|
881
|
-
};
|
|
882
|
-
var MicromagIcon = function MicromagIcon(_ref) {
|
|
883
|
-
var color = _ref.color,
|
|
743
|
+
function MicromagIcon(_ref) {
|
|
744
|
+
var _ref$color = _ref.color,
|
|
745
|
+
color = _ref$color === void 0 ? 'currentColor' : _ref$color,
|
|
884
746
|
_ref$className = _ref.className,
|
|
885
747
|
className = _ref$className === void 0 ? null : _ref$className;
|
|
886
748
|
return /*#__PURE__*/React.createElement("svg", {
|
|
@@ -926,19 +788,11 @@ var MicromagIcon = function MicromagIcon(_ref) {
|
|
|
926
788
|
fill: color,
|
|
927
789
|
d: "m313.68.68h-75.86c-1.15,0-2.08.93-2.08,2.08v31.54c0,1.15.93,2.08,2.08,2.08h75.86c1.15,0,2.08-.93,2.08-2.08V2.76c0-1.15-.93-2.08-2.08-2.08Zm-67,32.15c-4.53,0-6.31-2.34-6.31-9.87h3.49c0,5.34.77,6.38,2.83,6.38,1.64,0,2.27-.84,2.27-3.77s-.98-4.19-3.56-6.21c-2.48-1.92-4.85-3.84-4.85-8.41,0-4.12,1.74-6.73,5.79-6.73s5.93,2.62,5.93,8.48h-3.49c0-4.19-.94-4.99-2.44-4.99s-2.3.8-2.3,3.24,1.22,3.77,3.28,5.34c2.96,2.27,5.13,4.22,5.13,9.28,0,4.6-1.67,7.25-5.75,7.25Zm17.82-24.76h-3.94v24.41h-3.49V8.07h-3.94v-3.49h11.37v3.49Zm13.46,16.99c0,5.62-1.99,7.78-6.03,7.78s-6.03-2.16-6.03-7.78V4.58h3.49v20.47c0,3.24.52,4.29,2.55,4.29s2.55-1.05,2.55-4.29V4.58h3.49v20.47Zm13.88,0c0,6.03-2.34,7.43-7.95,7.43h-4.19V4.58h4.19c5.62,0,7.95,1.33,7.95,7.43v13.04Zm5.33,7.43h-3.49V4.58h3.49v27.9Zm13.81-7.43c0,5.62-1.99,7.78-6.03,7.78s-6.03-2.16-6.03-7.78v-13.04c0-5.62,1.99-7.78,6.03-7.78s6.03,2.16,6.03,7.78v13.04Z"
|
|
928
790
|
}));
|
|
929
|
-
}
|
|
930
|
-
MicromagIcon.propTypes = propTypes$i;
|
|
931
|
-
MicromagIcon.defaultProps = defaultProps$i;
|
|
791
|
+
}
|
|
932
792
|
|
|
933
793
|
var styles$c = {"container":"micromag-viewer-partials-micromag-branding-container","link":"micromag-viewer-partials-micromag-branding-link","text":"micromag-viewer-partials-micromag-branding-text","icon":"micromag-viewer-partials-micromag-branding-icon"};
|
|
934
794
|
|
|
935
|
-
|
|
936
|
-
className: PropTypes.string
|
|
937
|
-
};
|
|
938
|
-
var defaultProps$h = {
|
|
939
|
-
className: null
|
|
940
|
-
};
|
|
941
|
-
var MicromagBranding = function MicromagBranding(_ref) {
|
|
795
|
+
function MicromagBranding(_ref) {
|
|
942
796
|
var _ref$className = _ref.className,
|
|
943
797
|
className = _ref$className === void 0 ? null : _ref$className;
|
|
944
798
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -965,18 +819,11 @@ var MicromagBranding = function MicromagBranding(_ref) {
|
|
|
965
819
|
})), /*#__PURE__*/React.createElement(MicromagIcon, {
|
|
966
820
|
className: styles$c.icon
|
|
967
821
|
})));
|
|
968
|
-
}
|
|
969
|
-
MicromagBranding.propTypes = propTypes$h;
|
|
970
|
-
MicromagBranding.defaultProps = defaultProps$h;
|
|
822
|
+
}
|
|
971
823
|
|
|
972
|
-
|
|
973
|
-
className
|
|
974
|
-
|
|
975
|
-
var defaultProps$g = {
|
|
976
|
-
className: null
|
|
977
|
-
};
|
|
978
|
-
var StackIcon = function StackIcon(_ref) {
|
|
979
|
-
var className = _ref.className;
|
|
824
|
+
function StackIcon(_ref) {
|
|
825
|
+
var _ref$className = _ref.className,
|
|
826
|
+
className = _ref$className === void 0 ? null : _ref$className;
|
|
980
827
|
return /*#__PURE__*/React.createElement("svg", {
|
|
981
828
|
xmlns: "http://www.w3.org/2000/svg",
|
|
982
829
|
width: "11.5px",
|
|
@@ -989,38 +836,25 @@ var StackIcon = function StackIcon(_ref) {
|
|
|
989
836
|
}), /*#__PURE__*/React.createElement("polygon", {
|
|
990
837
|
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"
|
|
991
838
|
}));
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
onClick: null,
|
|
1012
|
-
screenSize: null,
|
|
1013
|
-
alwaysRender: false,
|
|
1014
|
-
focusable: true
|
|
1015
|
-
};
|
|
1016
|
-
var ViewerMenuScreen = function ViewerMenuScreen(_ref) {
|
|
1017
|
-
var className = _ref.className,
|
|
1018
|
-
item = _ref.item,
|
|
1019
|
-
index = _ref.index,
|
|
1020
|
-
_onClick = _ref.onClick,
|
|
1021
|
-
screenSize = _ref.screenSize,
|
|
1022
|
-
alwaysRender = _ref.alwaysRender,
|
|
1023
|
-
focusable = _ref.focusable;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
var styles$b = {"container":"micromag-viewer-menus-menu-screen-container","button":"micromag-viewer-menus-menu-screen-button","isCurrent":"micromag-viewer-menus-menu-screen-isCurrent","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","screen":"micromag-viewer-menus-menu-screen-screen"};
|
|
842
|
+
|
|
843
|
+
function ViewerMenuScreen(_ref) {
|
|
844
|
+
var _ref$className = _ref.className,
|
|
845
|
+
className = _ref$className === void 0 ? null : _ref$className,
|
|
846
|
+
_ref$item = _ref.item,
|
|
847
|
+
item = _ref$item === void 0 ? null : _ref$item,
|
|
848
|
+
_ref$index = _ref.index,
|
|
849
|
+
index = _ref$index === void 0 ? 0 : _ref$index,
|
|
850
|
+
_ref$onClick = _ref.onClick,
|
|
851
|
+
_onClick = _ref$onClick === void 0 ? null : _ref$onClick,
|
|
852
|
+
_ref$screenSize = _ref.screenSize,
|
|
853
|
+
screenSize = _ref$screenSize === void 0 ? null : _ref$screenSize,
|
|
854
|
+
_ref$alwaysRender = _ref.alwaysRender,
|
|
855
|
+
alwaysRender = _ref$alwaysRender === void 0 ? false : _ref$alwaysRender,
|
|
856
|
+
_ref$focusable = _ref.focusable,
|
|
857
|
+
focusable = _ref$focusable === void 0 ? true : _ref$focusable;
|
|
1024
858
|
var intl = useIntl();
|
|
1025
859
|
var _ref2 = item || {},
|
|
1026
860
|
_ref2$current = _ref2.current,
|
|
@@ -1093,69 +927,40 @@ var ViewerMenuScreen = function ViewerMenuScreen(_ref) {
|
|
|
1093
927
|
active: focusable,
|
|
1094
928
|
withSize: true
|
|
1095
929
|
}) : null));
|
|
1096
|
-
}
|
|
1097
|
-
ViewerMenuScreen.propTypes = propTypes$f;
|
|
1098
|
-
ViewerMenuScreen.defaultProps = defaultProps$f;
|
|
930
|
+
}
|
|
1099
931
|
|
|
1100
|
-
var styles$a = {"
|
|
932
|
+
var styles$a = {"container":"micromag-viewer-menus-menu-preview-container","content":"micromag-viewer-menus-menu-preview-content","scroll":"micromag-viewer-menus-menu-preview-scroll","scrollee":"micromag-viewer-menus-menu-preview-scrollee","titleContainer":"micromag-viewer-menus-menu-preview-titleContainer","headerContainer":"micromag-viewer-menus-menu-preview-headerContainer","title":"micromag-viewer-menus-menu-preview-title","nav":"micromag-viewer-menus-menu-preview-nav","items":"micromag-viewer-menus-menu-preview-items","item":"micromag-viewer-menus-menu-preview-item","inner":"micromag-viewer-menus-menu-preview-inner","frame":"micromag-viewer-menus-menu-preview-frame","screen":"micromag-viewer-menus-menu-preview-screen","micromagBrandingSeparator":"micromag-viewer-menus-menu-preview-micromagBrandingSeparator","micromagBrandingContainer":"micromag-viewer-menus-menu-preview-micromagBrandingContainer"};
|
|
1101
933
|
|
|
1102
934
|
var _excluded$4 = ["textAlign"];
|
|
1103
|
-
|
|
1104
|
-
viewerTheme
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
focusable: true,
|
|
1133
|
-
// shouldLoad: true,
|
|
1134
|
-
onClickScreen: null,
|
|
1135
|
-
maxThumbsWidth: 140,
|
|
1136
|
-
paddingTop: null,
|
|
1137
|
-
scrollDisabled: false,
|
|
1138
|
-
withMicromagBranding: false,
|
|
1139
|
-
// toggleFullscreen: null,
|
|
1140
|
-
// fullscreenActive: false,
|
|
1141
|
-
// fullscreenEnabled: false,
|
|
1142
|
-
className: null
|
|
1143
|
-
};
|
|
1144
|
-
var ViewerMenuPreview = function ViewerMenuPreview(_ref) {
|
|
1145
|
-
var viewerTheme = _ref.viewerTheme,
|
|
1146
|
-
header = _ref.header,
|
|
1147
|
-
footer = _ref.footer,
|
|
1148
|
-
screenSize = _ref.screenSize,
|
|
1149
|
-
title = _ref.title,
|
|
1150
|
-
menuWidth = _ref.menuWidth,
|
|
1151
|
-
items = _ref.items,
|
|
1152
|
-
focusable = _ref.focusable,
|
|
1153
|
-
onClickScreen = _ref.onClickScreen,
|
|
1154
|
-
maxThumbsWidth = _ref.maxThumbsWidth,
|
|
1155
|
-
paddingTop = _ref.paddingTop,
|
|
1156
|
-
scrollDisabled = _ref.scrollDisabled,
|
|
1157
|
-
withMicromagBranding = _ref.withMicromagBranding,
|
|
1158
|
-
className = _ref.className;
|
|
935
|
+
function ViewerMenuPreview(_ref) {
|
|
936
|
+
var _ref$viewerTheme = _ref.viewerTheme,
|
|
937
|
+
viewerTheme = _ref$viewerTheme === void 0 ? null : _ref$viewerTheme,
|
|
938
|
+
_ref$header = _ref.header,
|
|
939
|
+
header = _ref$header === void 0 ? null : _ref$header,
|
|
940
|
+
_ref$footer = _ref.footer,
|
|
941
|
+
footer = _ref$footer === void 0 ? null : _ref$footer,
|
|
942
|
+
_ref$screenSize = _ref.screenSize,
|
|
943
|
+
screenSize = _ref$screenSize === void 0 ? null : _ref$screenSize,
|
|
944
|
+
_ref$title = _ref.title,
|
|
945
|
+
title = _ref$title === void 0 ? null : _ref$title,
|
|
946
|
+
_ref$menuWidth = _ref.menuWidth,
|
|
947
|
+
menuWidth = _ref$menuWidth === void 0 ? null : _ref$menuWidth,
|
|
948
|
+
_ref$items = _ref.items,
|
|
949
|
+
items = _ref$items === void 0 ? [] : _ref$items,
|
|
950
|
+
_ref$focusable = _ref.focusable,
|
|
951
|
+
focusable = _ref$focusable === void 0 ? true : _ref$focusable,
|
|
952
|
+
_ref$onClickScreen = _ref.onClickScreen,
|
|
953
|
+
onClickScreen = _ref$onClickScreen === void 0 ? null : _ref$onClickScreen,
|
|
954
|
+
_ref$maxThumbsWidth = _ref.maxThumbsWidth,
|
|
955
|
+
maxThumbsWidth = _ref$maxThumbsWidth === void 0 ? 140 : _ref$maxThumbsWidth,
|
|
956
|
+
_ref$paddingTop = _ref.paddingTop,
|
|
957
|
+
paddingTop = _ref$paddingTop === void 0 ? null : _ref$paddingTop,
|
|
958
|
+
_ref$scrollDisabled = _ref.scrollDisabled,
|
|
959
|
+
scrollDisabled = _ref$scrollDisabled === void 0 ? false : _ref$scrollDisabled,
|
|
960
|
+
_ref$withMicromagBran = _ref.withMicromagBranding,
|
|
961
|
+
withMicromagBranding = _ref$withMicromagBran === void 0 ? false : _ref$withMicromagBran,
|
|
962
|
+
_ref$className = _ref.className,
|
|
963
|
+
className = _ref$className === void 0 ? null : _ref$className;
|
|
1159
964
|
var _useDimensionObserver = useDimensionObserver(),
|
|
1160
965
|
containerRef = _useDimensionObserver.ref,
|
|
1161
966
|
_useDimensionObserver2 = _useDimensionObserver.width,
|
|
@@ -1263,32 +1068,21 @@ var ViewerMenuPreview = function ViewerMenuPreview(_ref) {
|
|
|
1263
1068
|
}), /*#__PURE__*/React.createElement(MicromagBranding, {
|
|
1264
1069
|
className: styles$a.micromagBrandingContainer
|
|
1265
1070
|
})) : null)));
|
|
1266
|
-
}
|
|
1267
|
-
ViewerMenuPreview.propTypes = propTypes$e;
|
|
1268
|
-
ViewerMenuPreview.defaultProps = defaultProps$e;
|
|
1269
|
-
|
|
1270
|
-
var styles$9 = {"container":"micromag-viewer-partials-micromag-preview-container","cover":"micromag-viewer-partials-micromag-preview-cover","info":"micromag-viewer-partials-micromag-preview-info","url":"micromag-viewer-partials-micromag-preview-url","title":"micromag-viewer-partials-micromag-preview-title"};
|
|
1071
|
+
}
|
|
1271
1072
|
|
|
1272
|
-
var
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
};
|
|
1286
|
-
var MicromagPreview = function MicromagPreview(_ref) {
|
|
1287
|
-
var screen = _ref.screen,
|
|
1288
|
-
title = _ref.title,
|
|
1289
|
-
url = _ref.url,
|
|
1290
|
-
description = _ref.description,
|
|
1291
|
-
className = _ref.className;
|
|
1073
|
+
var styles$9 = {"container":"micromag-viewer-partials-micromag-preview-container","title":"micromag-viewer-partials-micromag-preview-title","cover":"micromag-viewer-partials-micromag-preview-cover","info":"micromag-viewer-partials-micromag-preview-info","url":"micromag-viewer-partials-micromag-preview-url"};
|
|
1074
|
+
|
|
1075
|
+
function MicromagPreview(_ref) {
|
|
1076
|
+
var _ref$screen = _ref.screen,
|
|
1077
|
+
screen = _ref$screen === void 0 ? null : _ref$screen,
|
|
1078
|
+
_ref$title = _ref.title,
|
|
1079
|
+
title = _ref$title === void 0 ? null : _ref$title,
|
|
1080
|
+
_ref$url = _ref.url,
|
|
1081
|
+
url = _ref$url === void 0 ? null : _ref$url,
|
|
1082
|
+
_ref$description = _ref.description,
|
|
1083
|
+
description = _ref$description === void 0 ? null : _ref$description,
|
|
1084
|
+
_ref$className = _ref.className,
|
|
1085
|
+
className = _ref$className === void 0 ? null : _ref$className;
|
|
1292
1086
|
return /*#__PURE__*/React.createElement("div", {
|
|
1293
1087
|
className: classNames([styles$9.container, _defineProperty({}, className, className)])
|
|
1294
1088
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1305,53 +1099,35 @@ var MicromagPreview = function MicromagPreview(_ref) {
|
|
|
1305
1099
|
}, title), url ? /*#__PURE__*/React.createElement("div", {
|
|
1306
1100
|
className: styles$9.url
|
|
1307
1101
|
}, url) : null, /*#__PURE__*/React.createElement("p", null, description)));
|
|
1308
|
-
}
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
currentScreenIndex: 0,
|
|
1338
|
-
shareUrl: null,
|
|
1339
|
-
onShare: null,
|
|
1340
|
-
className: null
|
|
1341
|
-
};
|
|
1342
|
-
var ViewerMenuShare = function ViewerMenuShare(_ref) {
|
|
1343
|
-
var viewerTheme = _ref.viewerTheme,
|
|
1344
|
-
menuWidth = _ref.menuWidth,
|
|
1345
|
-
title = _ref.title,
|
|
1346
|
-
description = _ref.description,
|
|
1347
|
-
items = _ref.items,
|
|
1348
|
-
shareOptions = _ref.shareOptions,
|
|
1349
|
-
focusable = _ref.focusable,
|
|
1350
|
-
paddingTop = _ref.paddingTop,
|
|
1351
|
-
currentScreenIndex = _ref.currentScreenIndex,
|
|
1352
|
-
shareUrl = _ref.shareUrl,
|
|
1353
|
-
onShare = _ref.onShare,
|
|
1354
|
-
className = _ref.className;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
var styles$8 = {"container":"micromag-viewer-menus-menu-share-container","content":"micromag-viewer-menus-menu-share-content","scroll":"micromag-viewer-menus-menu-share-scroll","inner":"micromag-viewer-menus-menu-share-inner","header":"micromag-viewer-menus-menu-share-header","mode":"micromag-viewer-menus-menu-share-mode","options":"micromag-viewer-menus-menu-share-options"};
|
|
1105
|
+
|
|
1106
|
+
function ViewerMenuShare(_ref) {
|
|
1107
|
+
var _ref$viewerTheme = _ref.viewerTheme,
|
|
1108
|
+
viewerTheme = _ref$viewerTheme === void 0 ? null : _ref$viewerTheme,
|
|
1109
|
+
_ref$menuWidth = _ref.menuWidth,
|
|
1110
|
+
menuWidth = _ref$menuWidth === void 0 ? null : _ref$menuWidth,
|
|
1111
|
+
_ref$title = _ref.title,
|
|
1112
|
+
title = _ref$title === void 0 ? null : _ref$title,
|
|
1113
|
+
_ref$description = _ref.description,
|
|
1114
|
+
description = _ref$description === void 0 ? null : _ref$description,
|
|
1115
|
+
_ref$items = _ref.items,
|
|
1116
|
+
items = _ref$items === void 0 ? [] : _ref$items,
|
|
1117
|
+
_ref$shareOptions = _ref.shareOptions,
|
|
1118
|
+
shareOptions = _ref$shareOptions === void 0 ? null : _ref$shareOptions,
|
|
1119
|
+
_ref$focusable = _ref.focusable,
|
|
1120
|
+
focusable = _ref$focusable === void 0 ? true : _ref$focusable,
|
|
1121
|
+
_ref$paddingTop = _ref.paddingTop,
|
|
1122
|
+
paddingTop = _ref$paddingTop === void 0 ? null : _ref$paddingTop,
|
|
1123
|
+
_ref$currentScreenInd = _ref.currentScreenIndex,
|
|
1124
|
+
currentScreenIndex = _ref$currentScreenInd === void 0 ? 0 : _ref$currentScreenInd,
|
|
1125
|
+
_ref$shareUrl = _ref.shareUrl,
|
|
1126
|
+
shareUrl = _ref$shareUrl === void 0 ? null : _ref$shareUrl,
|
|
1127
|
+
_ref$onShare = _ref.onShare,
|
|
1128
|
+
onShare = _ref$onShare === void 0 ? null : _ref$onShare,
|
|
1129
|
+
_ref$className = _ref.className,
|
|
1130
|
+
className = _ref$className === void 0 ? null : _ref$className;
|
|
1355
1131
|
// Viewer theme
|
|
1356
1132
|
var _ref2 = viewerTheme || {},
|
|
1357
1133
|
_ref2$background = _ref2.background,
|
|
@@ -1444,101 +1220,64 @@ var ViewerMenuShare = function ViewerMenuShare(_ref) {
|
|
|
1444
1220
|
theme: viewerTheme,
|
|
1445
1221
|
shareCurrentScreen: shareCurrentScreen
|
|
1446
1222
|
})))));
|
|
1447
|
-
}
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
var propTypes$b = {
|
|
1454
|
-
story: PropTypes$1.story.isRequired,
|
|
1455
|
-
menuItems: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.node])),
|
|
1456
|
-
currentScreenIndex: PropTypes.number,
|
|
1457
|
-
toggleFullscreen: PropTypes.func,
|
|
1458
|
-
fullscreenActive: PropTypes.bool,
|
|
1459
|
-
fullscreenEnabled: PropTypes.bool,
|
|
1460
|
-
menuDotsButtons: PropTypes.node,
|
|
1461
|
-
closeable: PropTypes.bool,
|
|
1462
|
-
withShadow: PropTypes.bool,
|
|
1463
|
-
trackingEnabled: PropTypes.bool,
|
|
1464
|
-
shareBasePath: PropTypes.string,
|
|
1465
|
-
shareOptions: PropTypes.arrayOf(PropTypes.string),
|
|
1466
|
-
theme: PropTypes$1.viewerTheme,
|
|
1467
|
-
screenSize: PropTypes$1.screenSize,
|
|
1468
|
-
menuWidth: PropTypes.number,
|
|
1469
|
-
previewHeader: PropTypes.node,
|
|
1470
|
-
previewFooter: PropTypes.node,
|
|
1471
|
-
afterShareMenuButton: PropTypes.node,
|
|
1472
|
-
beforeScreensMenuButton: PropTypes.node,
|
|
1473
|
-
withMicromagBranding: PropTypes.bool,
|
|
1474
|
-
withDotItemClick: PropTypes.bool,
|
|
1475
|
-
withoutScreensMenu: PropTypes.bool,
|
|
1476
|
-
withoutShareMenu: PropTypes.bool,
|
|
1477
|
-
onClickScreen: PropTypes.func,
|
|
1478
|
-
// onClickMenu: PropTypes.func,
|
|
1479
|
-
onClickCloseViewer: PropTypes.func,
|
|
1480
|
-
onChange: PropTypes.func,
|
|
1481
|
-
refDots: PropTypes.shape({
|
|
1482
|
-
current: PropTypes.any // eslint-disable-line
|
|
1483
|
-
})
|
|
1484
|
-
};
|
|
1485
|
-
var defaultProps$b = {
|
|
1486
|
-
menuItems: ['share', 'main'],
|
|
1487
|
-
currentScreenIndex: 0,
|
|
1488
|
-
toggleFullscreen: null,
|
|
1489
|
-
fullscreenActive: false,
|
|
1490
|
-
fullscreenEnabled: false,
|
|
1491
|
-
menuDotsButtons: null,
|
|
1492
|
-
closeable: false,
|
|
1493
|
-
withShadow: false,
|
|
1494
|
-
trackingEnabled: false,
|
|
1495
|
-
shareBasePath: null,
|
|
1496
|
-
shareOptions: null,
|
|
1497
|
-
theme: null,
|
|
1498
|
-
screenSize: null,
|
|
1499
|
-
menuWidth: null,
|
|
1500
|
-
previewHeader: null,
|
|
1501
|
-
previewFooter: null,
|
|
1502
|
-
afterShareMenuButton: null,
|
|
1503
|
-
beforeScreensMenuButton: null,
|
|
1504
|
-
withMicromagBranding: false,
|
|
1505
|
-
withDotItemClick: false,
|
|
1506
|
-
withoutScreensMenu: false,
|
|
1507
|
-
withoutShareMenu: false,
|
|
1508
|
-
onClickScreen: null,
|
|
1509
|
-
onChange: null,
|
|
1510
|
-
// onClickMenu: null,
|
|
1511
|
-
onClickCloseViewer: null,
|
|
1512
|
-
refDots: null
|
|
1513
|
-
};
|
|
1514
|
-
var ViewerMenu = function ViewerMenu(_ref) {
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
var styles$7 = {"container":"micromag-viewer-container","landscape":"micromag-viewer-landscape","screensFrame":"micromag-viewer-screensFrame","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","ariaAnnouncement":"micromag-viewer-ariaAnnouncement","accessibilityLinks":"micromag-viewer-accessibilityLinks","accessibilityButton":"micromag-viewer-accessibilityButton","disabled":"micromag-viewer-disabled","tooltip":"micromag-viewer-tooltip","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","menuContainer":"micromag-viewer-menuContainer","menuShare":"micromag-viewer-menuShare","menuPreview":"micromag-viewer-menuPreview","navButton":"micromag-viewer-navButton","previous":"micromag-viewer-previous","next":"micromag-viewer-next","screenContainer":"micromag-viewer-screenContainer","screen":"micromag-viewer-screen","preload":"micromag-viewer-preload","visible":"micromag-viewer-visible","current":"micromag-viewer-current","playbackControls":"micromag-viewer-playbackControls","navigationHint":"micromag-viewer-navigationHint","webView":"micromag-viewer-webView","shareIncentiveContainer":"micromag-viewer-shareIncentiveContainer","shareIncentive":"micromag-viewer-shareIncentive","shareIncentiveVisible":"micromag-viewer-shareIncentiveVisible"};
|
|
1226
|
+
|
|
1227
|
+
function ViewerMenu(_ref) {
|
|
1515
1228
|
var story = _ref.story,
|
|
1516
|
-
menuItems = _ref.menuItems,
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1229
|
+
_ref$menuItems = _ref.menuItems,
|
|
1230
|
+
menuItems = _ref$menuItems === void 0 ? ['share', 'main'] : _ref$menuItems,
|
|
1231
|
+
_ref$currentScreenInd = _ref.currentScreenIndex,
|
|
1232
|
+
currentScreenIndex = _ref$currentScreenInd === void 0 ? 0 : _ref$currentScreenInd,
|
|
1233
|
+
_ref$toggleFullscreen = _ref.toggleFullscreen,
|
|
1234
|
+
toggleFullscreen = _ref$toggleFullscreen === void 0 ? null : _ref$toggleFullscreen,
|
|
1235
|
+
_ref$fullscreenActive = _ref.fullscreenActive,
|
|
1236
|
+
fullscreenActive = _ref$fullscreenActive === void 0 ? false : _ref$fullscreenActive,
|
|
1237
|
+
_ref$fullscreenEnable = _ref.fullscreenEnabled,
|
|
1238
|
+
fullscreenEnabled = _ref$fullscreenEnable === void 0 ? false : _ref$fullscreenEnable,
|
|
1239
|
+
_ref$menuDotsButtons = _ref.menuDotsButtons,
|
|
1240
|
+
menuDotsButtons = _ref$menuDotsButtons === void 0 ? null : _ref$menuDotsButtons,
|
|
1241
|
+
_ref$closeable = _ref.closeable,
|
|
1242
|
+
closeable = _ref$closeable === void 0 ? false : _ref$closeable,
|
|
1243
|
+
_ref$withShadow = _ref.withShadow,
|
|
1244
|
+
withShadow = _ref$withShadow === void 0 ? false : _ref$withShadow,
|
|
1245
|
+
_ref$shareBasePath = _ref.shareBasePath,
|
|
1246
|
+
shareBasePath = _ref$shareBasePath === void 0 ? null : _ref$shareBasePath,
|
|
1247
|
+
_ref$shareOptions = _ref.shareOptions,
|
|
1248
|
+
shareOptions = _ref$shareOptions === void 0 ? null : _ref$shareOptions,
|
|
1249
|
+
_ref$trackingEnabled = _ref.trackingEnabled,
|
|
1250
|
+
trackingEnabled = _ref$trackingEnabled === void 0 ? false : _ref$trackingEnabled,
|
|
1251
|
+
_ref$theme = _ref.theme,
|
|
1252
|
+
viewerTheme = _ref$theme === void 0 ? null : _ref$theme,
|
|
1253
|
+
_ref$screenSize = _ref.screenSize,
|
|
1254
|
+
screenSize = _ref$screenSize === void 0 ? null : _ref$screenSize,
|
|
1255
|
+
_ref$menuWidth = _ref.menuWidth,
|
|
1256
|
+
menuWidth = _ref$menuWidth === void 0 ? null : _ref$menuWidth,
|
|
1257
|
+
_ref$previewHeader = _ref.previewHeader,
|
|
1258
|
+
previewHeader = _ref$previewHeader === void 0 ? null : _ref$previewHeader,
|
|
1259
|
+
_ref$previewFooter = _ref.previewFooter,
|
|
1260
|
+
previewFooter = _ref$previewFooter === void 0 ? null : _ref$previewFooter,
|
|
1261
|
+
_ref$afterShareMenuBu = _ref.afterShareMenuButton,
|
|
1262
|
+
afterShareMenuButton = _ref$afterShareMenuBu === void 0 ? null : _ref$afterShareMenuBu,
|
|
1263
|
+
_ref$beforeScreensMen = _ref.beforeScreensMenuButton,
|
|
1264
|
+
beforeScreensMenuButton = _ref$beforeScreensMen === void 0 ? null : _ref$beforeScreensMen,
|
|
1265
|
+
_ref$withMicromagBran = _ref.withMicromagBranding,
|
|
1266
|
+
withMicromagBranding = _ref$withMicromagBran === void 0 ? false : _ref$withMicromagBran,
|
|
1267
|
+
_ref$withDotItemClick = _ref.withDotItemClick,
|
|
1268
|
+
withDotItemClick = _ref$withDotItemClick === void 0 ? false : _ref$withDotItemClick,
|
|
1269
|
+
_ref$withoutScreensMe = _ref.withoutScreensMenu,
|
|
1270
|
+
withoutScreensMenu = _ref$withoutScreensMe === void 0 ? false : _ref$withoutScreensMe,
|
|
1271
|
+
_ref$withoutShareMenu = _ref.withoutShareMenu,
|
|
1272
|
+
withoutShareMenu = _ref$withoutShareMenu === void 0 ? false : _ref$withoutShareMenu,
|
|
1273
|
+
_ref$onClickScreen = _ref.onClickScreen,
|
|
1274
|
+
customOnClickScreen = _ref$onClickScreen === void 0 ? null : _ref$onClickScreen,
|
|
1275
|
+
_ref$onChange = _ref.onChange,
|
|
1276
|
+
onChange = _ref$onChange === void 0 ? null : _ref$onChange,
|
|
1277
|
+
_ref$onClickCloseView = _ref.onClickCloseViewer,
|
|
1278
|
+
onClickCloseViewer = _ref$onClickCloseView === void 0 ? null : _ref$onClickCloseView,
|
|
1279
|
+
_ref$refDots = _ref.refDots,
|
|
1280
|
+
refDots = _ref$refDots === void 0 ? null : _ref$refDots;
|
|
1542
1281
|
var _story$components = story.components,
|
|
1543
1282
|
screens = _story$components === void 0 ? [] : _story$components,
|
|
1544
1283
|
_story$title = story.title,
|
|
@@ -1916,56 +1655,35 @@ var ViewerMenu = function ViewerMenu(_ref) {
|
|
|
1916
1655
|
fullscreenEnabled: fullscreenEnabled,
|
|
1917
1656
|
withMicromagBranding: withMicromagBranding
|
|
1918
1657
|
})) : null));
|
|
1919
|
-
}
|
|
1920
|
-
ViewerMenu.propTypes = propTypes$b;
|
|
1921
|
-
ViewerMenu.defaultProps = defaultProps$b;
|
|
1922
|
-
var ViewerMenu$1 = /*#__PURE__*/React.memo(ViewerMenu);
|
|
1658
|
+
}
|
|
1923
1659
|
|
|
1924
1660
|
var styles$6 = {"container":"micromag-viewer-screen-container","inner":"micromag-viewer-screen-inner"};
|
|
1925
1661
|
|
|
1926
|
-
var propTypes$a = {
|
|
1927
|
-
screen: PropTypes$1.screenComponent,
|
|
1928
|
-
renderContext: PropTypes$1.renderContext,
|
|
1929
|
-
screenState: PropTypes.string,
|
|
1930
|
-
current: PropTypes.bool,
|
|
1931
|
-
active: PropTypes.bool,
|
|
1932
|
-
preload: PropTypes.bool,
|
|
1933
|
-
mediaRef: PropTypes.func,
|
|
1934
|
-
width: PropTypes.number,
|
|
1935
|
-
index: PropTypes.number,
|
|
1936
|
-
height: PropTypes.number,
|
|
1937
|
-
scale: PropTypes.number,
|
|
1938
|
-
// withNavigationHint: PropTypes.bool, // @todo
|
|
1939
|
-
className: PropTypes.string
|
|
1940
|
-
};
|
|
1941
|
-
var defaultProps$a = {
|
|
1942
|
-
screen: null,
|
|
1943
|
-
renderContext: null,
|
|
1944
|
-
screenState: null,
|
|
1945
|
-
current: false,
|
|
1946
|
-
active: true,
|
|
1947
|
-
preload: true,
|
|
1948
|
-
index: null,
|
|
1949
|
-
mediaRef: null,
|
|
1950
|
-
width: null,
|
|
1951
|
-
height: null,
|
|
1952
|
-
scale: null,
|
|
1953
|
-
// withNavigationHint: false,
|
|
1954
|
-
className: null
|
|
1955
|
-
};
|
|
1956
1662
|
function ViewerScreen(_ref) {
|
|
1957
|
-
var screen = _ref.screen,
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1663
|
+
var _ref$screen = _ref.screen,
|
|
1664
|
+
screen = _ref$screen === void 0 ? null : _ref$screen,
|
|
1665
|
+
_ref$renderContext = _ref.renderContext,
|
|
1666
|
+
renderContext = _ref$renderContext === void 0 ? null : _ref$renderContext,
|
|
1667
|
+
_ref$index = _ref.index,
|
|
1668
|
+
index = _ref$index === void 0 ? null : _ref$index,
|
|
1669
|
+
_ref$screenState = _ref.screenState,
|
|
1670
|
+
screenState = _ref$screenState === void 0 ? null : _ref$screenState,
|
|
1671
|
+
_ref$active = _ref.active,
|
|
1672
|
+
active = _ref$active === void 0 ? true : _ref$active,
|
|
1673
|
+
_ref$preload = _ref.preload,
|
|
1674
|
+
preload = _ref$preload === void 0 ? true : _ref$preload,
|
|
1675
|
+
_ref$current = _ref.current,
|
|
1676
|
+
current = _ref$current === void 0 ? false : _ref$current,
|
|
1677
|
+
_ref$mediaRef = _ref.mediaRef,
|
|
1678
|
+
mediaRef = _ref$mediaRef === void 0 ? null : _ref$mediaRef,
|
|
1679
|
+
_ref$width = _ref.width,
|
|
1680
|
+
width = _ref$width === void 0 ? null : _ref$width,
|
|
1681
|
+
_ref$height = _ref.height,
|
|
1682
|
+
height = _ref$height === void 0 ? null : _ref$height,
|
|
1683
|
+
_ref$scale = _ref.scale,
|
|
1684
|
+
scale = _ref$scale === void 0 ? null : _ref$scale,
|
|
1685
|
+
_ref$className = _ref.className,
|
|
1686
|
+
className = _ref$className === void 0 ? null : _ref$className;
|
|
1969
1687
|
var _useState = useState(active || current),
|
|
1970
1688
|
_useState2 = _slicedToArray(_useState, 2),
|
|
1971
1689
|
mounted = _useState2[0],
|
|
@@ -2008,26 +1726,17 @@ function ViewerScreen(_ref) {
|
|
|
2008
1726
|
mediaRef: mediaRef
|
|
2009
1727
|
}) : null));
|
|
2010
1728
|
}
|
|
2011
|
-
ViewerScreen.propTypes = propTypes$a;
|
|
2012
|
-
ViewerScreen.defaultProps = defaultProps$a;
|
|
2013
1729
|
|
|
2014
1730
|
var styles$5 = {"container":"micromag-viewer-buttons-navigation-button-container","arrow":"micromag-viewer-buttons-navigation-button-arrow","next":"micromag-viewer-buttons-navigation-button-next","previous":"micromag-viewer-buttons-navigation-button-previous"};
|
|
2015
1731
|
|
|
2016
1732
|
var _excluded$3 = ["direction", "onClick", "className"];
|
|
2017
|
-
|
|
2018
|
-
direction
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
onClick: null,
|
|
2025
|
-
className: null
|
|
2026
|
-
};
|
|
2027
|
-
var NavigationButton = function NavigationButton(_ref) {
|
|
2028
|
-
var direction = _ref.direction,
|
|
2029
|
-
_onClick = _ref.onClick,
|
|
2030
|
-
className = _ref.className,
|
|
1733
|
+
function NavigationButton(_ref) {
|
|
1734
|
+
var _ref$direction = _ref.direction,
|
|
1735
|
+
direction = _ref$direction === void 0 ? 'next' : _ref$direction,
|
|
1736
|
+
_ref$onClick = _ref.onClick,
|
|
1737
|
+
_onClick = _ref$onClick === void 0 ? null : _ref$onClick,
|
|
1738
|
+
_ref$className = _ref.className,
|
|
1739
|
+
className = _ref$className === void 0 ? null : _ref$className,
|
|
2031
1740
|
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
2032
1741
|
return /*#__PURE__*/React.createElement(IconButton, Object.assign({
|
|
2033
1742
|
className: classNames([styles$5.container, styles$5[direction], _defineProperty({}, className, className !== null)]),
|
|
@@ -2047,23 +1756,15 @@ var NavigationButton = function NavigationButton(_ref) {
|
|
|
2047
1756
|
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"
|
|
2048
1757
|
}))
|
|
2049
1758
|
}, props));
|
|
2050
|
-
}
|
|
2051
|
-
NavigationButton.propTypes = propTypes$9;
|
|
2052
|
-
NavigationButton.defaultProps = defaultProps$9;
|
|
1759
|
+
}
|
|
2053
1760
|
|
|
2054
1761
|
var styles$4 = {"container":"micromag-viewer-partials-arrow-hint-container","withoutShadow":"micromag-viewer-partials-arrow-hint-withoutShadow","inner":"micromag-viewer-partials-arrow-hint-inner","arrow":"micromag-viewer-partials-arrow-hint-arrow"};
|
|
2055
1762
|
|
|
2056
|
-
|
|
2057
|
-
withoutShadow
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
withoutShadow: false,
|
|
2062
|
-
className: null
|
|
2063
|
-
};
|
|
2064
|
-
var ArrowHint = function ArrowHint(_ref) {
|
|
2065
|
-
var withoutShadow = _ref.withoutShadow,
|
|
2066
|
-
className = _ref.className;
|
|
1763
|
+
function ArrowHint(_ref) {
|
|
1764
|
+
var _ref$withoutShadow = _ref.withoutShadow,
|
|
1765
|
+
withoutShadow = _ref$withoutShadow === void 0 ? false : _ref$withoutShadow,
|
|
1766
|
+
_ref$className = _ref.className,
|
|
1767
|
+
className = _ref$className === void 0 ? null : _ref$className;
|
|
2067
1768
|
return /*#__PURE__*/React.createElement("div", {
|
|
2068
1769
|
className: classNames([styles$4.container, _defineProperty(_defineProperty({}, styles$4.withoutShadow, withoutShadow), className, className !== null)])
|
|
2069
1770
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -2071,21 +1772,13 @@ var ArrowHint = function ArrowHint(_ref) {
|
|
|
2071
1772
|
}, /*#__PURE__*/React.createElement(ArrowIcon, {
|
|
2072
1773
|
className: styles$4.arrow
|
|
2073
1774
|
})));
|
|
2074
|
-
}
|
|
2075
|
-
ArrowHint.propTypes = propTypes$8;
|
|
2076
|
-
ArrowHint.defaultProps = defaultProps$8;
|
|
1775
|
+
}
|
|
2077
1776
|
|
|
2078
|
-
|
|
2079
|
-
color
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
color: 'currentColor',
|
|
2084
|
-
className: null
|
|
2085
|
-
};
|
|
2086
|
-
var HandIcon = function HandIcon(_ref) {
|
|
2087
|
-
var color = _ref.color,
|
|
2088
|
-
className = _ref.className;
|
|
1777
|
+
function HandIcon(_ref) {
|
|
1778
|
+
var _ref$color = _ref.color,
|
|
1779
|
+
color = _ref$color === void 0 ? 'currentColor' : _ref$color,
|
|
1780
|
+
_ref$className = _ref.className,
|
|
1781
|
+
className = _ref$className === void 0 ? null : _ref$className;
|
|
2089
1782
|
return /*#__PURE__*/React.createElement("svg", {
|
|
2090
1783
|
className: className,
|
|
2091
1784
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2096,23 +1789,15 @@ var HandIcon = function HandIcon(_ref) {
|
|
|
2096
1789
|
fill: color,
|
|
2097
1790
|
fillRule: "evenodd"
|
|
2098
1791
|
}));
|
|
2099
|
-
}
|
|
2100
|
-
HandIcon.propTypes = propTypes$7;
|
|
2101
|
-
HandIcon.defaultProps = defaultProps$7;
|
|
1792
|
+
}
|
|
2102
1793
|
|
|
2103
1794
|
var styles$3 = {"container":"micromag-viewer-partials-hand-tap-container","circle":"micromag-viewer-partials-hand-tap-circle","hand":"micromag-viewer-partials-hand-tap-hand","withoutShadow":"micromag-viewer-partials-hand-tap-withoutShadow","inner":"micromag-viewer-partials-hand-tap-inner"};
|
|
2104
1795
|
|
|
2105
|
-
|
|
2106
|
-
withoutShadow
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
withoutShadow: false,
|
|
2111
|
-
className: null
|
|
2112
|
-
};
|
|
2113
|
-
var HandTap = function HandTap(_ref) {
|
|
2114
|
-
var withoutShadow = _ref.withoutShadow,
|
|
2115
|
-
className = _ref.className;
|
|
1796
|
+
function HandTap(_ref) {
|
|
1797
|
+
var _ref$withoutShadow = _ref.withoutShadow,
|
|
1798
|
+
withoutShadow = _ref$withoutShadow === void 0 ? false : _ref$withoutShadow,
|
|
1799
|
+
_ref$className = _ref.className,
|
|
1800
|
+
className = _ref$className === void 0 ? null : _ref$className;
|
|
2116
1801
|
return /*#__PURE__*/React.createElement("div", {
|
|
2117
1802
|
className: classNames([styles$3.container, _defineProperty(_defineProperty({}, styles$3.withoutShadow, withoutShadow), className, className !== null)])
|
|
2118
1803
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -2122,11 +1807,9 @@ var HandTap = function HandTap(_ref) {
|
|
|
2122
1807
|
}), /*#__PURE__*/React.createElement(HandIcon, {
|
|
2123
1808
|
className: styles$3.hand
|
|
2124
1809
|
})));
|
|
2125
|
-
}
|
|
2126
|
-
HandTap.propTypes = propTypes$6;
|
|
2127
|
-
HandTap.defaultProps = defaultProps$6;
|
|
1810
|
+
}
|
|
2128
1811
|
|
|
2129
|
-
var styles$2 = {"
|
|
1812
|
+
var styles$2 = {"inner":"micromag-viewer-partials-seek-bar-inner","progressBarContainer":"micromag-viewer-partials-seek-bar-progressBarContainer","progressBar":"micromag-viewer-partials-seek-bar-progressBar","progress":"micromag-viewer-partials-seek-bar-progress","track":"micromag-viewer-partials-seek-bar-track","playHead":"micromag-viewer-partials-seek-bar-playHead","withSeekHead":"micromag-viewer-partials-seek-bar-withSeekHead","scrubbedTime":"micromag-viewer-partials-seek-bar-scrubbedTime","showTimestamp":"micromag-viewer-partials-seek-bar-showTimestamp"};
|
|
2130
1813
|
|
|
2131
1814
|
var stopDragEventsPropagation = {
|
|
2132
1815
|
onTouchMove: function onTouchMove(e) {
|
|
@@ -2166,50 +1849,31 @@ function getFormattedTimestamp() {
|
|
|
2166
1849
|
}
|
|
2167
1850
|
var SHOW_MILLISECONDS_THRESHOLD = 5; // show milliseconds when scrubbing if length of video is shorter than 5 seconds
|
|
2168
1851
|
|
|
2169
|
-
|
|
2170
|
-
media
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
onSeekEnd: null,
|
|
2195
|
-
collapsed: false,
|
|
2196
|
-
focusable: true,
|
|
2197
|
-
className: null,
|
|
2198
|
-
withSeekHead: true
|
|
2199
|
-
};
|
|
2200
|
-
var SeekBar = function SeekBar(_ref3) {
|
|
2201
|
-
var media = _ref3.media,
|
|
2202
|
-
playing = _ref3.playing,
|
|
2203
|
-
backgroundColor = _ref3.backgroundColor,
|
|
2204
|
-
progressColor = _ref3.progressColor,
|
|
2205
|
-
onClick = _ref3.onClick,
|
|
2206
|
-
onSeek = _ref3.onSeek,
|
|
2207
|
-
onSeekStart = _ref3.onSeekStart,
|
|
2208
|
-
onSeekEnd = _ref3.onSeekEnd,
|
|
2209
|
-
collapsed = _ref3.collapsed,
|
|
2210
|
-
focusable = _ref3.focusable,
|
|
2211
|
-
className = _ref3.className,
|
|
2212
|
-
withSeekHead = _ref3.withSeekHead;
|
|
1852
|
+
function SeekBar(_ref3) {
|
|
1853
|
+
var _ref3$media = _ref3.media,
|
|
1854
|
+
media = _ref3$media === void 0 ? null : _ref3$media,
|
|
1855
|
+
_ref3$playing = _ref3.playing,
|
|
1856
|
+
playing = _ref3$playing === void 0 ? false : _ref3$playing,
|
|
1857
|
+
_ref3$backgroundColor = _ref3.backgroundColor,
|
|
1858
|
+
backgroundColor = _ref3$backgroundColor === void 0 ? null : _ref3$backgroundColor,
|
|
1859
|
+
_ref3$progressColor = _ref3.progressColor,
|
|
1860
|
+
progressColor = _ref3$progressColor === void 0 ? null : _ref3$progressColor,
|
|
1861
|
+
_ref3$onClick = _ref3.onClick,
|
|
1862
|
+
onClick = _ref3$onClick === void 0 ? null : _ref3$onClick,
|
|
1863
|
+
_ref3$onSeek = _ref3.onSeek,
|
|
1864
|
+
onSeek = _ref3$onSeek === void 0 ? null : _ref3$onSeek,
|
|
1865
|
+
_ref3$onSeekStart = _ref3.onSeekStart,
|
|
1866
|
+
onSeekStart = _ref3$onSeekStart === void 0 ? null : _ref3$onSeekStart,
|
|
1867
|
+
_ref3$onSeekEnd = _ref3.onSeekEnd,
|
|
1868
|
+
onSeekEnd = _ref3$onSeekEnd === void 0 ? null : _ref3$onSeekEnd,
|
|
1869
|
+
_ref3$collapsed = _ref3.collapsed,
|
|
1870
|
+
collapsed = _ref3$collapsed === void 0 ? false : _ref3$collapsed,
|
|
1871
|
+
_ref3$focusable = _ref3.focusable,
|
|
1872
|
+
focusable = _ref3$focusable === void 0 ? true : _ref3$focusable,
|
|
1873
|
+
_ref3$className = _ref3.className,
|
|
1874
|
+
className = _ref3$className === void 0 ? null : _ref3$className,
|
|
1875
|
+
_ref3$withSeekHead = _ref3.withSeekHead,
|
|
1876
|
+
withSeekHead = _ref3$withSeekHead === void 0 ? true : _ref3$withSeekHead;
|
|
2213
1877
|
var intl = useIntl();
|
|
2214
1878
|
var progress = useMediaProgress(media, {
|
|
2215
1879
|
disabled: !playing
|
|
@@ -2350,47 +2014,31 @@ var SeekBar = function SeekBar(_ref3) {
|
|
|
2350
2014
|
}),
|
|
2351
2015
|
tabIndex: focusable ? '0' : '-1'
|
|
2352
2016
|
}))));
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
var styles$1 = {"container":"micromag-viewer-partials-playback-controls-container","playPauseButton":"micromag-viewer-partials-playback-controls-playPauseButton","muteButton":"micromag-viewer-partials-playback-controls-muteButton","icon":"micromag-viewer-partials-playback-controls-icon","offset":"micromag-viewer-partials-playback-controls-offset","spinner":"micromag-viewer-partials-playback-controls-spinner","withPlayPause":"micromag-viewer-partials-playback-controls-withPlayPause","withSuggestPlay":"micromag-viewer-partials-playback-controls-withSuggestPlay","isCollapsed":"micromag-viewer-partials-playback-controls-isCollapsed","loading":"micromag-viewer-partials-playback-controls-loading","hidden":"micromag-viewer-partials-playback-controls-hidden","suggest":"micromag-viewer-partials-playback-controls-suggest","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","withoutShadow":"micromag-viewer-partials-playback-controls-withoutShadow"};
|
|
2020
|
+
|
|
2021
|
+
var DEFAULT_COLOR = {
|
|
2022
|
+
color: '#FFFFFF',
|
|
2023
|
+
alpha: 1
|
|
2353
2024
|
};
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
var styles$1 = {"suggest":"micromag-viewer-partials-playback-controls-suggest","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","offset":"micromag-viewer-partials-playback-controls-offset","spinner":"micromag-viewer-partials-playback-controls-spinner","withPlayPause":"micromag-viewer-partials-playback-controls-withPlayPause","withSuggestPlay":"micromag-viewer-partials-playback-controls-withSuggestPlay","isCollapsed":"micromag-viewer-partials-playback-controls-isCollapsed","loading":"micromag-viewer-partials-playback-controls-loading","hidden":"micromag-viewer-partials-playback-controls-hidden","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","withoutShadow":"micromag-viewer-partials-playback-controls-withoutShadow"};
|
|
2358
|
-
|
|
2359
|
-
var propTypes$4 = {
|
|
2360
|
-
defaultColor: PropTypes.shape({
|
|
2361
|
-
color: PropTypes.string,
|
|
2362
|
-
alpha: PropTypes.number
|
|
2363
|
-
}),
|
|
2364
|
-
defaultProgressColor: PropTypes.shape({
|
|
2365
|
-
color: PropTypes.string,
|
|
2366
|
-
alpha: PropTypes.number
|
|
2367
|
-
}),
|
|
2368
|
-
withLoading: PropTypes.bool,
|
|
2369
|
-
withoutShadow: PropTypes.bool,
|
|
2370
|
-
className: PropTypes.string,
|
|
2371
|
-
collapsedClassName: PropTypes.string
|
|
2372
|
-
};
|
|
2373
|
-
var defaultProps$4 = {
|
|
2374
|
-
defaultColor: {
|
|
2375
|
-
color: '#FFFFFF',
|
|
2376
|
-
alpha: 1
|
|
2377
|
-
},
|
|
2378
|
-
defaultProgressColor: {
|
|
2379
|
-
color: '#666',
|
|
2380
|
-
alpha: 1
|
|
2381
|
-
},
|
|
2382
|
-
withLoading: true,
|
|
2383
|
-
withoutShadow: false,
|
|
2384
|
-
className: null,
|
|
2385
|
-
collapsedClassName: null
|
|
2025
|
+
var DEFAULT_PROGRESS_COLOR = {
|
|
2026
|
+
color: '#666',
|
|
2027
|
+
alpha: 1
|
|
2386
2028
|
};
|
|
2387
2029
|
function PlaybackControls(_ref) {
|
|
2388
|
-
var defaultColor = _ref.defaultColor,
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2030
|
+
var _ref$defaultColor = _ref.defaultColor,
|
|
2031
|
+
defaultColor = _ref$defaultColor === void 0 ? DEFAULT_COLOR : _ref$defaultColor,
|
|
2032
|
+
_ref$defaultProgressC = _ref.defaultProgressColor,
|
|
2033
|
+
defaultProgressColor = _ref$defaultProgressC === void 0 ? DEFAULT_PROGRESS_COLOR : _ref$defaultProgressC,
|
|
2034
|
+
_ref$withLoading = _ref.withLoading,
|
|
2035
|
+
withLoading = _ref$withLoading === void 0 ? true : _ref$withLoading,
|
|
2036
|
+
_ref$withoutShadow = _ref.withoutShadow,
|
|
2037
|
+
withoutShadow = _ref$withoutShadow === void 0 ? false : _ref$withoutShadow,
|
|
2038
|
+
_ref$className = _ref.className,
|
|
2039
|
+
className = _ref$className === void 0 ? null : _ref$className,
|
|
2040
|
+
_ref$collapsedClassNa = _ref.collapsedClassName,
|
|
2041
|
+
collapsedClassName = _ref$collapsedClassNa === void 0 ? null : _ref$collapsedClassNa;
|
|
2394
2042
|
var intl = useIntl();
|
|
2395
2043
|
var _usePlaybackContext = usePlaybackContext(),
|
|
2396
2044
|
_usePlaybackContext$m = _usePlaybackContext.media,
|
|
@@ -2606,29 +2254,19 @@ function PlaybackControls(_ref) {
|
|
|
2606
2254
|
withoutBootstrapStyles: true
|
|
2607
2255
|
}));
|
|
2608
2256
|
}
|
|
2609
|
-
PlaybackControls.propTypes = propTypes$4;
|
|
2610
|
-
PlaybackControls.defaultProps = defaultProps$4;
|
|
2611
2257
|
|
|
2612
2258
|
var styles = {"container":"micromag-viewer-partials-web-view-container","opened":"micromag-viewer-partials-web-view-opened","webView":"micromag-viewer-partials-web-view-webView"};
|
|
2613
2259
|
|
|
2614
2260
|
var _excluded$2 = ["opened", "close", "open", "update", "url", "source"];
|
|
2615
|
-
var propTypes$3 = {
|
|
2616
|
-
onChange: PropTypes.func,
|
|
2617
|
-
trackingEnabled: PropTypes.bool,
|
|
2618
|
-
className: PropTypes.string,
|
|
2619
|
-
style: PropTypes.object
|
|
2620
|
-
};
|
|
2621
|
-
var defaultProps$3 = {
|
|
2622
|
-
onChange: null,
|
|
2623
|
-
trackingEnabled: false,
|
|
2624
|
-
className: null,
|
|
2625
|
-
style: null
|
|
2626
|
-
};
|
|
2627
2261
|
function WebViewContainer(_ref) {
|
|
2628
|
-
var onChange = _ref.onChange,
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2262
|
+
var _ref$onChange = _ref.onChange,
|
|
2263
|
+
onChange = _ref$onChange === void 0 ? null : _ref$onChange,
|
|
2264
|
+
_ref$trackingEnabled = _ref.trackingEnabled,
|
|
2265
|
+
trackingEnabled = _ref$trackingEnabled === void 0 ? false : _ref$trackingEnabled,
|
|
2266
|
+
_ref$className = _ref.className,
|
|
2267
|
+
className = _ref$className === void 0 ? null : _ref$className,
|
|
2268
|
+
_ref$style = _ref.style,
|
|
2269
|
+
style = _ref$style === void 0 ? null : _ref$style;
|
|
2632
2270
|
var _useViewerWebView = useViewerWebView(),
|
|
2633
2271
|
opened = _useViewerWebView.opened,
|
|
2634
2272
|
close = _useViewerWebView.close;
|
|
@@ -2730,8 +2368,6 @@ function WebViewContainer(_ref) {
|
|
|
2730
2368
|
onClose: close
|
|
2731
2369
|
})));
|
|
2732
2370
|
}
|
|
2733
|
-
WebViewContainer.propTypes = propTypes$3;
|
|
2734
|
-
WebViewContainer.defaultProps = defaultProps$3;
|
|
2735
2371
|
|
|
2736
2372
|
// @todo export from somewhere else; or use as props in possible component for screen transitions
|
|
2737
2373
|
var SPRING_CONFIG_TIGHT = {
|
|
@@ -2743,190 +2379,122 @@ var DRAG_VELOCITY_ACTIVATION_THRESHOLD = 0.3;
|
|
|
2743
2379
|
var DEFAULT_TRANSITION_TYPE_LANDSCAPE = 'carousel';
|
|
2744
2380
|
var DEFAULT_TRANSITION_TYPE_PORTRAIT = 'stack';
|
|
2745
2381
|
var SHARE_INCENTIVE_TIMEOUT = 6000;
|
|
2746
|
-
|
|
2747
|
-
story
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
neighborScreenOffset: 105,
|
|
2828
|
-
neighborScreenScale: 0.8,
|
|
2829
|
-
neighborPreloadDelay: 2000,
|
|
2830
|
-
neighborPreloadBackward: true,
|
|
2831
|
-
neighborPreloadScreens: null,
|
|
2832
|
-
topSafezoneHeight: null,
|
|
2833
|
-
bottomSafezoneHeight: null,
|
|
2834
|
-
menuIsScreenWidth: false,
|
|
2835
|
-
menuHeader: null,
|
|
2836
|
-
menuFooter: null,
|
|
2837
|
-
menuItems: ['share', 'main'],
|
|
2838
|
-
shareBasePath: null,
|
|
2839
|
-
shareOptions: null,
|
|
2840
|
-
afterShareMenuButton: null,
|
|
2841
|
-
beforeScreensMenuButton: null,
|
|
2842
|
-
backToFirstScreenTimeout: null,
|
|
2843
|
-
menuDotsButtons: null,
|
|
2844
|
-
closeable: false,
|
|
2845
|
-
readyWithoutSize: false,
|
|
2846
|
-
withMetadata: false,
|
|
2847
|
-
withMicromagBranding: false,
|
|
2848
|
-
withNeighborScreens: false,
|
|
2849
|
-
withFullscreenWebView: false,
|
|
2850
|
-
withNavigationHint: 'hand',
|
|
2851
|
-
withoutGestures: false,
|
|
2852
|
-
withoutMenu: false,
|
|
2853
|
-
withoutScreensMenu: false,
|
|
2854
|
-
withoutShareMenu: false,
|
|
2855
|
-
withoutMenuShadow: false,
|
|
2856
|
-
withoutFullscreen: false,
|
|
2857
|
-
withoutTransitions: false,
|
|
2858
|
-
withoutNavigationArrow: false,
|
|
2859
|
-
withoutPlaybackControls: false,
|
|
2860
|
-
withoutAutoUnmute: false,
|
|
2861
|
-
onClose: null,
|
|
2862
|
-
onInteraction: null,
|
|
2863
|
-
onEnd: null,
|
|
2864
|
-
onViewModeChange: null,
|
|
2865
|
-
onMenuChange: null,
|
|
2866
|
-
currentScreenMedia: null,
|
|
2867
|
-
screensMedias: null,
|
|
2868
|
-
screenSizeOptions: null,
|
|
2869
|
-
className: null
|
|
2870
|
-
};
|
|
2871
|
-
var Viewer = function Viewer(_ref) {
|
|
2872
|
-
var story = _ref.story,
|
|
2873
|
-
basePath = _ref.basePath,
|
|
2874
|
-
viewerTheme = _ref.theme,
|
|
2875
|
-
width = _ref.width,
|
|
2876
|
-
height = _ref.height,
|
|
2877
|
-
screenId = _ref.screen,
|
|
2878
|
-
screenState = _ref.screenState,
|
|
2879
|
-
deviceScreens = _ref.deviceScreens,
|
|
2880
|
-
renderContext = _ref.renderContext,
|
|
2881
|
-
tapNextScreenWidthPercent = _ref.tapNextScreenWidthPercent,
|
|
2882
|
-
tapMaximumDuration = _ref.tapMaximumDuration,
|
|
2883
|
-
longPressPauseDelay = _ref.longPressPauseDelay,
|
|
2884
|
-
storyIsParsed = _ref.storyIsParsed,
|
|
2885
|
-
neighborScreensActive = _ref.neighborScreensActive,
|
|
2886
|
-
neighborScreenOffset = _ref.neighborScreenOffset,
|
|
2887
|
-
neighborScreenScale = _ref.neighborScreenScale,
|
|
2888
|
-
neighborPreloadDelay = _ref.neighborPreloadDelay,
|
|
2889
|
-
neighborPreloadBackward = _ref.neighborPreloadBackward,
|
|
2890
|
-
neighborPreloadScreens = _ref.neighborPreloadScreens,
|
|
2891
|
-
topSafezoneHeight = _ref.topSafezoneHeight,
|
|
2892
|
-
bottomSafezoneHeight = _ref.bottomSafezoneHeight,
|
|
2893
|
-
menuIsScreenWidth = _ref.menuIsScreenWidth,
|
|
2894
|
-
menuHeader = _ref.menuHeader,
|
|
2895
|
-
menuFooter = _ref.menuFooter,
|
|
2896
|
-
menuItems = _ref.menuItems,
|
|
2897
|
-
shareBasePath = _ref.shareBasePath,
|
|
2898
|
-
shareOptions = _ref.shareOptions,
|
|
2899
|
-
afterShareMenuButton = _ref.afterShareMenuButton,
|
|
2900
|
-
beforeScreensMenuButton = _ref.beforeScreensMenuButton,
|
|
2901
|
-
backToFirstScreenTimeout = _ref.backToFirstScreenTimeout,
|
|
2902
|
-
menuDotsButtons = _ref.menuDotsButtons,
|
|
2903
|
-
closeable = _ref.closeable,
|
|
2904
|
-
readyWithoutSize = _ref.readyWithoutSize,
|
|
2905
|
-
withMetadata = _ref.withMetadata,
|
|
2906
|
-
withMicromagBranding = _ref.withMicromagBranding,
|
|
2907
|
-
withoutGestures = _ref.withoutGestures,
|
|
2908
|
-
withoutMenu = _ref.withoutMenu,
|
|
2909
|
-
withoutScreensMenu = _ref.withoutScreensMenu,
|
|
2910
|
-
withoutShareMenu = _ref.withoutShareMenu,
|
|
2911
|
-
withoutMenuShadow = _ref.withoutMenuShadow;
|
|
2382
|
+
function Viewer(_ref) {
|
|
2383
|
+
var _ref$story = _ref.story,
|
|
2384
|
+
story = _ref$story === void 0 ? null : _ref$story,
|
|
2385
|
+
_ref$basePath = _ref.basePath,
|
|
2386
|
+
basePath = _ref$basePath === void 0 ? null : _ref$basePath,
|
|
2387
|
+
_ref$theme = _ref.theme,
|
|
2388
|
+
viewerTheme = _ref$theme === void 0 ? null : _ref$theme,
|
|
2389
|
+
_ref$width = _ref.width,
|
|
2390
|
+
width = _ref$width === void 0 ? null : _ref$width,
|
|
2391
|
+
_ref$height = _ref.height,
|
|
2392
|
+
height = _ref$height === void 0 ? null : _ref$height,
|
|
2393
|
+
_ref$screen = _ref.screen,
|
|
2394
|
+
screenId = _ref$screen === void 0 ? null : _ref$screen,
|
|
2395
|
+
_ref$screenState = _ref.screenState,
|
|
2396
|
+
screenState = _ref$screenState === void 0 ? null : _ref$screenState,
|
|
2397
|
+
_ref$deviceScreens = _ref.deviceScreens,
|
|
2398
|
+
deviceScreens = _ref$deviceScreens === void 0 ? getDeviceScreens() : _ref$deviceScreens,
|
|
2399
|
+
_ref$renderContext = _ref.renderContext,
|
|
2400
|
+
renderContext = _ref$renderContext === void 0 ? 'view' : _ref$renderContext,
|
|
2401
|
+
_ref$tapNextScreenWid = _ref.tapNextScreenWidthPercent,
|
|
2402
|
+
tapNextScreenWidthPercent = _ref$tapNextScreenWid === void 0 ? 0.8 : _ref$tapNextScreenWid,
|
|
2403
|
+
_ref$tapMaximumDurati = _ref.tapMaximumDuration,
|
|
2404
|
+
tapMaximumDuration = _ref$tapMaximumDurati === void 0 ? 1500 : _ref$tapMaximumDurati,
|
|
2405
|
+
_ref$longPressPauseDe = _ref.longPressPauseDelay,
|
|
2406
|
+
longPressPauseDelay = _ref$longPressPauseDe === void 0 ? 300 : _ref$longPressPauseDe,
|
|
2407
|
+
_ref$storyIsParsed = _ref.storyIsParsed,
|
|
2408
|
+
storyIsParsed = _ref$storyIsParsed === void 0 ? false : _ref$storyIsParsed,
|
|
2409
|
+
_ref$neighborScreensA = _ref.neighborScreensActive,
|
|
2410
|
+
neighborScreensActive = _ref$neighborScreensA === void 0 ? 1 : _ref$neighborScreensA,
|
|
2411
|
+
_ref$neighborScreenOf = _ref.neighborScreenOffset,
|
|
2412
|
+
neighborScreenOffset = _ref$neighborScreenOf === void 0 ? 105 : _ref$neighborScreenOf,
|
|
2413
|
+
_ref$neighborScreenSc = _ref.neighborScreenScale,
|
|
2414
|
+
neighborScreenScale = _ref$neighborScreenSc === void 0 ? 0.8 : _ref$neighborScreenSc,
|
|
2415
|
+
_ref$neighborPreloadD = _ref.neighborPreloadDelay,
|
|
2416
|
+
neighborPreloadDelay = _ref$neighborPreloadD === void 0 ? 2000 : _ref$neighborPreloadD,
|
|
2417
|
+
_ref$neighborPreloadB = _ref.neighborPreloadBackward,
|
|
2418
|
+
neighborPreloadBackward = _ref$neighborPreloadB === void 0 ? true : _ref$neighborPreloadB,
|
|
2419
|
+
_ref$neighborPreloadS = _ref.neighborPreloadScreens,
|
|
2420
|
+
neighborPreloadScreens = _ref$neighborPreloadS === void 0 ? null : _ref$neighborPreloadS,
|
|
2421
|
+
_ref$topSafezoneHeigh = _ref.topSafezoneHeight,
|
|
2422
|
+
topSafezoneHeight = _ref$topSafezoneHeigh === void 0 ? null : _ref$topSafezoneHeigh,
|
|
2423
|
+
_ref$bottomSafezoneHe = _ref.bottomSafezoneHeight,
|
|
2424
|
+
bottomSafezoneHeight = _ref$bottomSafezoneHe === void 0 ? null : _ref$bottomSafezoneHe,
|
|
2425
|
+
_ref$menuIsScreenWidt = _ref.menuIsScreenWidth,
|
|
2426
|
+
menuIsScreenWidth = _ref$menuIsScreenWidt === void 0 ? false : _ref$menuIsScreenWidt,
|
|
2427
|
+
_ref$menuHeader = _ref.menuHeader,
|
|
2428
|
+
menuHeader = _ref$menuHeader === void 0 ? null : _ref$menuHeader,
|
|
2429
|
+
_ref$menuFooter = _ref.menuFooter,
|
|
2430
|
+
menuFooter = _ref$menuFooter === void 0 ? null : _ref$menuFooter,
|
|
2431
|
+
_ref$menuItems = _ref.menuItems,
|
|
2432
|
+
menuItems = _ref$menuItems === void 0 ? ['share', 'main'] : _ref$menuItems,
|
|
2433
|
+
_ref$shareBasePath = _ref.shareBasePath,
|
|
2434
|
+
shareBasePath = _ref$shareBasePath === void 0 ? null : _ref$shareBasePath,
|
|
2435
|
+
_ref$shareOptions = _ref.shareOptions,
|
|
2436
|
+
shareOptions = _ref$shareOptions === void 0 ? null : _ref$shareOptions,
|
|
2437
|
+
_ref$afterShareMenuBu = _ref.afterShareMenuButton,
|
|
2438
|
+
afterShareMenuButton = _ref$afterShareMenuBu === void 0 ? null : _ref$afterShareMenuBu,
|
|
2439
|
+
_ref$beforeScreensMen = _ref.beforeScreensMenuButton,
|
|
2440
|
+
beforeScreensMenuButton = _ref$beforeScreensMen === void 0 ? null : _ref$beforeScreensMen,
|
|
2441
|
+
_ref$backToFirstScree = _ref.backToFirstScreenTimeout,
|
|
2442
|
+
backToFirstScreenTimeout = _ref$backToFirstScree === void 0 ? null : _ref$backToFirstScree,
|
|
2443
|
+
_ref$menuDotsButtons = _ref.menuDotsButtons,
|
|
2444
|
+
menuDotsButtons = _ref$menuDotsButtons === void 0 ? null : _ref$menuDotsButtons,
|
|
2445
|
+
_ref$closeable = _ref.closeable,
|
|
2446
|
+
closeable = _ref$closeable === void 0 ? false : _ref$closeable,
|
|
2447
|
+
_ref$readyWithoutSize = _ref.readyWithoutSize,
|
|
2448
|
+
readyWithoutSize = _ref$readyWithoutSize === void 0 ? false : _ref$readyWithoutSize,
|
|
2449
|
+
_ref$withMetadata = _ref.withMetadata,
|
|
2450
|
+
withMetadata = _ref$withMetadata === void 0 ? false : _ref$withMetadata,
|
|
2451
|
+
_ref$withMicromagBran = _ref.withMicromagBranding,
|
|
2452
|
+
withMicromagBranding = _ref$withMicromagBran === void 0 ? false : _ref$withMicromagBran,
|
|
2453
|
+
_ref$withoutGestures = _ref.withoutGestures,
|
|
2454
|
+
withoutGestures = _ref$withoutGestures === void 0 ? false : _ref$withoutGestures,
|
|
2455
|
+
_ref$withoutMenu = _ref.withoutMenu,
|
|
2456
|
+
withoutMenu = _ref$withoutMenu === void 0 ? false : _ref$withoutMenu,
|
|
2457
|
+
_ref$withoutScreensMe = _ref.withoutScreensMenu,
|
|
2458
|
+
withoutScreensMenu = _ref$withoutScreensMe === void 0 ? false : _ref$withoutScreensMe,
|
|
2459
|
+
_ref$withoutShareMenu = _ref.withoutShareMenu,
|
|
2460
|
+
withoutShareMenu = _ref$withoutShareMenu === void 0 ? false : _ref$withoutShareMenu,
|
|
2461
|
+
_ref$withoutMenuShado = _ref.withoutMenuShadow,
|
|
2462
|
+
withoutMenuShadow = _ref$withoutMenuShado === void 0 ? false : _ref$withoutMenuShado;
|
|
2912
2463
|
_ref.withoutFullscreen;
|
|
2913
|
-
var
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2464
|
+
var _ref$withoutNavigatio = _ref.withoutNavigationArrow,
|
|
2465
|
+
withoutNavigationArrow = _ref$withoutNavigatio === void 0 ? false : _ref$withoutNavigatio,
|
|
2466
|
+
_ref$withoutTransitio = _ref.withoutTransitions,
|
|
2467
|
+
withoutTransitions = _ref$withoutTransitio === void 0 ? false : _ref$withoutTransitio,
|
|
2468
|
+
_ref$withNeighborScre = _ref.withNeighborScreens,
|
|
2469
|
+
withNeighborScreens = _ref$withNeighborScre === void 0 ? false : _ref$withNeighborScre,
|
|
2470
|
+
_ref$withFullscreenWe = _ref.withFullscreenWebView,
|
|
2471
|
+
withFullscreenWebView = _ref$withFullscreenWe === void 0 ? false : _ref$withFullscreenWe,
|
|
2472
|
+
_ref$withNavigationHi = _ref.withNavigationHint,
|
|
2473
|
+
withNavigationHint = _ref$withNavigationHi === void 0 ? 'hand' : _ref$withNavigationHi,
|
|
2474
|
+
_ref$withoutPlaybackC = _ref.withoutPlaybackControls,
|
|
2475
|
+
withoutPlaybackControls = _ref$withoutPlaybackC === void 0 ? false : _ref$withoutPlaybackC,
|
|
2476
|
+
_ref$withoutAutoUnmut = _ref.withoutAutoUnmute,
|
|
2477
|
+
withoutAutoUnmute = _ref$withoutAutoUnmut === void 0 ? false : _ref$withoutAutoUnmut,
|
|
2478
|
+
_ref$onClose = _ref.onClose,
|
|
2479
|
+
onCloseViewer = _ref$onClose === void 0 ? null : _ref$onClose,
|
|
2480
|
+
_ref$onInteraction = _ref.onInteraction,
|
|
2481
|
+
onInteraction = _ref$onInteraction === void 0 ? null : _ref$onInteraction,
|
|
2482
|
+
_ref$onEnd = _ref.onEnd,
|
|
2483
|
+
onEnd = _ref$onEnd === void 0 ? null : _ref$onEnd,
|
|
2484
|
+
_ref$onScreenChange = _ref.onScreenChange,
|
|
2485
|
+
onScreenChange = _ref$onScreenChange === void 0 ? null : _ref$onScreenChange,
|
|
2486
|
+
_ref$onViewModeChange = _ref.onViewModeChange,
|
|
2487
|
+
onViewModeChange = _ref$onViewModeChange === void 0 ? null : _ref$onViewModeChange,
|
|
2488
|
+
_ref$onMenuChange = _ref.onMenuChange,
|
|
2489
|
+
onMenuChange = _ref$onMenuChange === void 0 ? null : _ref$onMenuChange,
|
|
2490
|
+
_ref$currentScreenMed = _ref.currentScreenMedia,
|
|
2491
|
+
currentScreenMedia = _ref$currentScreenMed === void 0 ? null : _ref$currentScreenMed,
|
|
2492
|
+
_ref$screensMedias = _ref.screensMedias,
|
|
2493
|
+
screensMedias = _ref$screensMedias === void 0 ? null : _ref$screensMedias,
|
|
2494
|
+
_ref$screenSizeOption = _ref.screenSizeOptions,
|
|
2495
|
+
screenSizeOptions = _ref$screenSizeOption === void 0 ? null : _ref$screenSizeOption,
|
|
2496
|
+
_ref$className = _ref.className,
|
|
2497
|
+
className = _ref$className === void 0 ? null : _ref$className;
|
|
2930
2498
|
var intl = useIntl();
|
|
2931
2499
|
/**
|
|
2932
2500
|
* Screen Data + Processing
|
|
@@ -3610,7 +3178,7 @@ var Viewer = function Viewer(_ref) {
|
|
|
3610
3178
|
"type": 0,
|
|
3611
3179
|
"value": "No controls available"
|
|
3612
3180
|
}]
|
|
3613
|
-
}))) : null) : null), !withoutMenu ? /*#__PURE__*/React.createElement(ViewerMenu
|
|
3181
|
+
}))) : null) : null), !withoutMenu ? /*#__PURE__*/React.createElement(ViewerMenu, {
|
|
3614
3182
|
story: parsedStory,
|
|
3615
3183
|
currentScreenIndex: screenIndex,
|
|
3616
3184
|
withShadow: menuOverScreen && !withoutMenuShadow,
|
|
@@ -3733,29 +3301,17 @@ var Viewer = function Viewer(_ref) {
|
|
|
3733
3301
|
maxWidth: withFullscreenWebView ? null : Math.max(screenContainerWidth, 600)
|
|
3734
3302
|
}
|
|
3735
3303
|
})))));
|
|
3736
|
-
}
|
|
3737
|
-
Viewer.propTypes = propTypes$2;
|
|
3738
|
-
Viewer.defaultProps = defaultProps$2;
|
|
3304
|
+
}
|
|
3739
3305
|
|
|
3740
3306
|
var _excluded$1 = ["story", "pathWithIndex", "children", "onScreenChange"];
|
|
3741
|
-
|
|
3742
|
-
story
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
onScreenChange: PropTypes.func
|
|
3747
|
-
};
|
|
3748
|
-
var defaultProps$1 = {
|
|
3749
|
-
story: null,
|
|
3750
|
-
pathWithIndex: false,
|
|
3751
|
-
children: null,
|
|
3752
|
-
onScreenChange: null
|
|
3753
|
-
};
|
|
3754
|
-
var ViewerRoutes = function ViewerRoutes(_ref) {
|
|
3755
|
-
var story = _ref.story,
|
|
3756
|
-
pathWithIndex = _ref.pathWithIndex;
|
|
3307
|
+
function ViewerRoutes(_ref) {
|
|
3308
|
+
var _ref$story = _ref.story,
|
|
3309
|
+
story = _ref$story === void 0 ? null : _ref$story,
|
|
3310
|
+
_ref$pathWithIndex = _ref.pathWithIndex,
|
|
3311
|
+
pathWithIndex = _ref$pathWithIndex === void 0 ? false : _ref$pathWithIndex;
|
|
3757
3312
|
_ref.children;
|
|
3758
|
-
var onScreenChange = _ref.onScreenChange,
|
|
3313
|
+
var _ref$onScreenChange = _ref.onScreenChange,
|
|
3314
|
+
onScreenChange = _ref$onScreenChange === void 0 ? null : _ref$onScreenChange,
|
|
3759
3315
|
otherProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
3760
3316
|
var routes = useRoutes();
|
|
3761
3317
|
var url = useUrlGenerator();
|
|
@@ -3793,9 +3349,7 @@ var ViewerRoutes = function ViewerRoutes(_ref) {
|
|
|
3793
3349
|
story: story,
|
|
3794
3350
|
onScreenChange: finalOnScreenChange
|
|
3795
3351
|
}))));
|
|
3796
|
-
}
|
|
3797
|
-
ViewerRoutes.propTypes = propTypes$1;
|
|
3798
|
-
ViewerRoutes.defaultProps = defaultProps$1;
|
|
3352
|
+
}
|
|
3799
3353
|
|
|
3800
3354
|
var home = "/";
|
|
3801
3355
|
var screen = "/:screen";
|
|
@@ -3805,70 +3359,45 @@ var defaultRoutes = {
|
|
|
3805
3359
|
};
|
|
3806
3360
|
|
|
3807
3361
|
var _excluded = ["story", "paused", "muted", "screenComponents", "memoryRouter", "basePath", "routes", "withoutRouter", "googleApiKey", "visitor", "locale", "locales", "translations", "pathWithIndex", "trackingVariables", "trackingDisabled", "trackingPaused", "settings"];
|
|
3808
|
-
var
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
trackingVariables: null,
|
|
3848
|
-
trackingDisabled: false,
|
|
3849
|
-
trackingPaused: false,
|
|
3850
|
-
settings: null,
|
|
3851
|
-
children: null
|
|
3852
|
-
};
|
|
3853
|
-
var ViewerContainer = function ViewerContainer(_ref) {
|
|
3854
|
-
var story = _ref.story,
|
|
3855
|
-
paused = _ref.paused,
|
|
3856
|
-
muted = _ref.muted,
|
|
3857
|
-
screenComponents = _ref.screenComponents,
|
|
3858
|
-
memoryRouter = _ref.memoryRouter,
|
|
3859
|
-
basePath = _ref.basePath,
|
|
3860
|
-
routes = _ref.routes,
|
|
3861
|
-
withoutRouter = _ref.withoutRouter,
|
|
3862
|
-
googleApiKey = _ref.googleApiKey,
|
|
3863
|
-
visitor = _ref.visitor,
|
|
3864
|
-
locale = _ref.locale,
|
|
3865
|
-
locales = _ref.locales,
|
|
3866
|
-
translations = _ref.translations,
|
|
3867
|
-
pathWithIndex = _ref.pathWithIndex,
|
|
3868
|
-
trackingVariables = _ref.trackingVariables,
|
|
3869
|
-
trackingDisabled = _ref.trackingDisabled,
|
|
3870
|
-
trackingPaused = _ref.trackingPaused,
|
|
3871
|
-
settings = _ref.settings,
|
|
3362
|
+
var emptyComponents = {};
|
|
3363
|
+
var defaultLocales = ['fr', 'en'];
|
|
3364
|
+
function ViewerContainer(_ref) {
|
|
3365
|
+
var _ref$story = _ref.story,
|
|
3366
|
+
story = _ref$story === void 0 ? null : _ref$story,
|
|
3367
|
+
_ref$paused = _ref.paused,
|
|
3368
|
+
paused = _ref$paused === void 0 ? false : _ref$paused,
|
|
3369
|
+
_ref$muted = _ref.muted,
|
|
3370
|
+
muted = _ref$muted === void 0 ? true : _ref$muted,
|
|
3371
|
+
_ref$screenComponents = _ref.screenComponents,
|
|
3372
|
+
screenComponents = _ref$screenComponents === void 0 ? null : _ref$screenComponents,
|
|
3373
|
+
_ref$memoryRouter = _ref.memoryRouter,
|
|
3374
|
+
memoryRouter = _ref$memoryRouter === void 0 ? false : _ref$memoryRouter,
|
|
3375
|
+
_ref$basePath = _ref.basePath,
|
|
3376
|
+
basePath = _ref$basePath === void 0 ? null : _ref$basePath,
|
|
3377
|
+
_ref$routes = _ref.routes,
|
|
3378
|
+
routes = _ref$routes === void 0 ? defaultRoutes : _ref$routes,
|
|
3379
|
+
_ref$withoutRouter = _ref.withoutRouter,
|
|
3380
|
+
withoutRouter = _ref$withoutRouter === void 0 ? false : _ref$withoutRouter,
|
|
3381
|
+
_ref$googleApiKey = _ref.googleApiKey,
|
|
3382
|
+
googleApiKey = _ref$googleApiKey === void 0 ? null : _ref$googleApiKey,
|
|
3383
|
+
_ref$visitor = _ref.visitor,
|
|
3384
|
+
visitor = _ref$visitor === void 0 ? null : _ref$visitor,
|
|
3385
|
+
_ref$locale = _ref.locale,
|
|
3386
|
+
locale = _ref$locale === void 0 ? 'en' : _ref$locale,
|
|
3387
|
+
_ref$locales = _ref.locales,
|
|
3388
|
+
locales = _ref$locales === void 0 ? defaultLocales : _ref$locales,
|
|
3389
|
+
_ref$translations = _ref.translations,
|
|
3390
|
+
translations = _ref$translations === void 0 ? null : _ref$translations,
|
|
3391
|
+
_ref$pathWithIndex = _ref.pathWithIndex,
|
|
3392
|
+
pathWithIndex = _ref$pathWithIndex === void 0 ? false : _ref$pathWithIndex,
|
|
3393
|
+
_ref$trackingVariable = _ref.trackingVariables,
|
|
3394
|
+
trackingVariables = _ref$trackingVariable === void 0 ? null : _ref$trackingVariable,
|
|
3395
|
+
_ref$trackingDisabled = _ref.trackingDisabled,
|
|
3396
|
+
trackingDisabled = _ref$trackingDisabled === void 0 ? false : _ref$trackingDisabled,
|
|
3397
|
+
_ref$trackingPaused = _ref.trackingPaused,
|
|
3398
|
+
trackingPaused = _ref$trackingPaused === void 0 ? false : _ref$trackingPaused,
|
|
3399
|
+
_ref$settings = _ref.settings,
|
|
3400
|
+
settings = _ref$settings === void 0 ? null : _ref$settings,
|
|
3872
3401
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
3873
3402
|
var finalTrackingVariables = useMemo(function () {
|
|
3874
3403
|
if (story === null && trackingVariables === null) {
|
|
@@ -3939,7 +3468,7 @@ var ViewerContainer = function ViewerContainer(_ref) {
|
|
|
3939
3468
|
locale: finalLocale
|
|
3940
3469
|
}, /*#__PURE__*/React.createElement(ScreensProvider, null, /*#__PURE__*/React.createElement(ComponentsProvider, {
|
|
3941
3470
|
namespace: SCREENS_NAMESPACE,
|
|
3942
|
-
components: screenComponents ||
|
|
3471
|
+
components: screenComponents || emptyComponents
|
|
3943
3472
|
}, /*#__PURE__*/React.createElement(VisitorProvider, {
|
|
3944
3473
|
visitor: visitor
|
|
3945
3474
|
}, /*#__PURE__*/React.createElement(PlaybackProvider, {
|
|
@@ -3970,8 +3499,6 @@ var ViewerContainer = function ViewerContainer(_ref) {
|
|
|
3970
3499
|
return withoutRouter ? content : /*#__PURE__*/React.createElement(Router, routerProps, /*#__PURE__*/React.createElement(RoutesProvider, {
|
|
3971
3500
|
routes: routes
|
|
3972
3501
|
}, content));
|
|
3973
|
-
}
|
|
3974
|
-
ViewerContainer.propTypes = propTypes;
|
|
3975
|
-
ViewerContainer.defaultProps = defaultProps;
|
|
3502
|
+
}
|
|
3976
3503
|
|
|
3977
3504
|
export { Viewer, ViewerContainer as default };
|