@micromag/editor 0.4.89 → 0.4.90-alpha.2
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 -9
- package/es/index.d.ts +15 -15
- package/es/index.js +352 -435
- package/es/styles.css +16 -9
- package/package.json +9 -8
package/es/index.js
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import { c } from 'react/compiler-runtime';
|
|
2
|
-
import
|
|
3
|
-
import React, { useRef, useMemo, useCallback, useState, useEffect } from 'react';
|
|
2
|
+
import { useRouteMatcher, createPathToRegexpParser } from '@folklore/routes';
|
|
4
3
|
import { useIntl, FormattedMessage } from 'react-intl';
|
|
5
|
-
import {
|
|
4
|
+
import { useLocation, Switch, Route, Router } from 'wouter';
|
|
5
|
+
import { memoryLocation } from 'wouter/memory-location';
|
|
6
|
+
import { UppyProvider } from '@panneau/uppy';
|
|
6
7
|
import { useRoutes, useScreenDefinition, useFormsComponents, useScreensManager, useFieldsManager, useFieldsComponentsManager, useUrlGenerator, useRoutePush, ScreenProvider, useScreenSize, PlaybackProvider, ModalsProvider, PanelsProvider, ScreenSizeProvider, useFieldComponent, ComponentsProvider, FORMS_NAMESPACE, FontsProvider, EditorProvider, VisitorProvider, ComponentsContext, RoutesProvider, GoogleMapsClientProvider, GoogleKeysProvider, StoryProvider } from '@micromag/core/contexts';
|
|
7
|
-
import { useIsVisible, useParsedStory, useDimensionObserver, useScreenSizeFromElement, useMediasParser } from '@micromag/core/hooks';
|
|
8
8
|
import { getScreenFieldsWithStates, getScreenExtraField, isMessage, slug, getComponentFromName, getDeviceScreens } from '@micromag/core/utils';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { Fields, FieldsProvider } from '@micromag/fields';
|
|
10
|
+
import { ScreensProvider } from '@micromag/screens';
|
|
11
|
+
import classNames from 'classnames';
|
|
12
|
+
import { useRef, useMemo, useCallback, useState, useEffect } from 'react';
|
|
13
|
+
import { Button, FieldForm, BackButton, Breadcrumb as Breadcrumb$1, Navbar, DropdownMenu, Empty, Tabs, ScreenPlaceholder, ScreenPreview, Label, Modals } from '@micromag/core/components';
|
|
14
|
+
import { useIsVisible, useParsedStory, useDimensionObserver, useScreenSizeFromElement, useMediasParser } from '@micromag/core/hooks';
|
|
11
15
|
import { easings, useTransition, animated } from '@react-spring/web';
|
|
12
16
|
import { faCogs } from '@fortawesome/free-solid-svg-icons/faCogs';
|
|
13
17
|
import { faEllipsisV } from '@fortawesome/free-solid-svg-icons/faEllipsisV';
|
|
14
18
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
15
19
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
16
|
-
import
|
|
20
|
+
import ConfirmModal from '@panneau/modal-confirm';
|
|
17
21
|
import { v1 } from 'uuid';
|
|
18
22
|
import { getSizeWithinBounds } from '@folklore/size';
|
|
19
23
|
import { Viewer } from '@micromag/viewer';
|
|
@@ -29,10 +33,8 @@ import { CSS } from '@dnd-kit/utilities';
|
|
|
29
33
|
import { faAngleDown } from '@fortawesome/free-solid-svg-icons/faAngleDown';
|
|
30
34
|
import { faGripLines } from '@fortawesome/free-solid-svg-icons/faGripLines';
|
|
31
35
|
import { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes';
|
|
36
|
+
import Dialog from '@panneau/modal-dialog';
|
|
32
37
|
import orderBy from 'lodash/orderBy';
|
|
33
|
-
import { memoryLocation } from 'wouter/memory-location';
|
|
34
|
-
import { UppyProvider } from '@panneau/uppy';
|
|
35
|
-
import { ScreensProvider } from '@micromag/screens';
|
|
36
38
|
|
|
37
39
|
const useRouteParams = t0 => {
|
|
38
40
|
const $ = c(12);
|
|
@@ -247,55 +249,47 @@ const getFieldByName = (fields, name) => fields.reduce((foundField, it) => {
|
|
|
247
249
|
}, null);
|
|
248
250
|
|
|
249
251
|
function SettingsButton(t0) {
|
|
250
|
-
const $ = c(
|
|
252
|
+
const $ = c(8);
|
|
251
253
|
let props;
|
|
252
254
|
let t1;
|
|
253
|
-
let t2;
|
|
254
255
|
if ($[0] !== t0) {
|
|
255
256
|
({
|
|
256
|
-
|
|
257
|
-
dots: t2,
|
|
257
|
+
dots: t1,
|
|
258
258
|
...props
|
|
259
259
|
} = t0);
|
|
260
260
|
$[0] = t0;
|
|
261
261
|
$[1] = props;
|
|
262
262
|
$[2] = t1;
|
|
263
|
-
$[3] = t2;
|
|
264
263
|
} else {
|
|
265
264
|
props = $[1];
|
|
266
265
|
t1 = $[2];
|
|
267
|
-
t2 = $[3];
|
|
268
266
|
}
|
|
269
|
-
const
|
|
270
|
-
const
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
icon: t3
|
|
267
|
+
const dots = t1 === undefined ? false : t1;
|
|
268
|
+
const t2 = dots ? faEllipsisV : faCogs;
|
|
269
|
+
let t3;
|
|
270
|
+
if ($[3] !== t2) {
|
|
271
|
+
t3 = /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
272
|
+
icon: t2
|
|
276
273
|
});
|
|
274
|
+
$[3] = t2;
|
|
277
275
|
$[4] = t3;
|
|
278
|
-
$[5] = t4;
|
|
279
276
|
} else {
|
|
280
|
-
|
|
277
|
+
t3 = $[4];
|
|
281
278
|
}
|
|
282
|
-
let
|
|
283
|
-
if ($[
|
|
284
|
-
|
|
285
|
-
className: className,
|
|
286
|
-
theme: "secondary",
|
|
279
|
+
let t4;
|
|
280
|
+
if ($[5] !== props || $[6] !== t3) {
|
|
281
|
+
t4 = /*#__PURE__*/jsx(Button, {
|
|
287
282
|
size: "sm",
|
|
288
|
-
icon:
|
|
283
|
+
icon: t3,
|
|
289
284
|
...props
|
|
290
285
|
});
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
294
|
-
$[9] = t5;
|
|
286
|
+
$[5] = props;
|
|
287
|
+
$[6] = t3;
|
|
288
|
+
$[7] = t4;
|
|
295
289
|
} else {
|
|
296
|
-
|
|
290
|
+
t4 = $[7];
|
|
297
291
|
}
|
|
298
|
-
return
|
|
292
|
+
return t4;
|
|
299
293
|
}
|
|
300
294
|
|
|
301
295
|
function FieldWithContexts(t0) {
|
|
@@ -355,24 +349,19 @@ function FieldWithContexts(t0) {
|
|
|
355
349
|
finalNameParts = (repeatable || fieldName !== null) && nameParts.length <= (repeatable ? 2 : 1) ? [fieldName || stateId, ...nameParts.slice(1)] : nameParts.slice(1);
|
|
356
350
|
}
|
|
357
351
|
const formComponents = useFormsComponents();
|
|
358
|
-
return definition !== null ? /*#__PURE__*/jsx(
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
...props
|
|
368
|
-
}) : /*#__PURE__*/jsx(Fields, {
|
|
369
|
-
fields: stateFields,
|
|
370
|
-
...props
|
|
371
|
-
})
|
|
352
|
+
return definition !== null ? finalNameParts.length > 0 ? /*#__PURE__*/jsx(FieldForm, {
|
|
353
|
+
fields: finalScreenFields,
|
|
354
|
+
formComponents: formComponents,
|
|
355
|
+
name: finalNameParts.join("."),
|
|
356
|
+
form: form,
|
|
357
|
+
...props
|
|
358
|
+
}) : /*#__PURE__*/jsx(Fields, {
|
|
359
|
+
fields: stateFields,
|
|
360
|
+
...props
|
|
372
361
|
}) : null;
|
|
373
362
|
}
|
|
374
363
|
|
|
375
|
-
var styles$
|
|
364
|
+
var styles$g = {"container":"micromag-editor-forms-screen-container","inner":"micromag-editor-forms-screen-inner"};
|
|
376
365
|
|
|
377
366
|
function ScreenForm(t0) {
|
|
378
367
|
const $ = c(15);
|
|
@@ -400,7 +389,7 @@ function ScreenForm(t0) {
|
|
|
400
389
|
const fields = t5;
|
|
401
390
|
let t6;
|
|
402
391
|
if ($[2] !== className) {
|
|
403
|
-
t6 = classNames([styles$
|
|
392
|
+
t6 = classNames([styles$g.container, className]);
|
|
404
393
|
$[2] = className;
|
|
405
394
|
$[3] = t6;
|
|
406
395
|
} else {
|
|
@@ -427,7 +416,7 @@ function ScreenForm(t0) {
|
|
|
427
416
|
let t8;
|
|
428
417
|
if ($[10] !== t7) {
|
|
429
418
|
t8 = /*#__PURE__*/jsx("div", {
|
|
430
|
-
className: styles$
|
|
419
|
+
className: styles$g.inner,
|
|
431
420
|
children: t7
|
|
432
421
|
});
|
|
433
422
|
$[10] = t7;
|
|
@@ -450,7 +439,7 @@ function ScreenForm(t0) {
|
|
|
450
439
|
return t9;
|
|
451
440
|
}
|
|
452
441
|
|
|
453
|
-
var styles$
|
|
442
|
+
var styles$f = {"container":"micromag-editor-menus-breadcrumb-container"};
|
|
454
443
|
|
|
455
444
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
456
445
|
|
|
@@ -633,143 +622,68 @@ function Breadcrumb({
|
|
|
633
622
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
634
623
|
children: [withBack ? /*#__PURE__*/jsx(BackButton, {
|
|
635
624
|
onClick: onClickBack,
|
|
636
|
-
className: "me-2
|
|
625
|
+
className: "me-2",
|
|
626
|
+
outline: true,
|
|
627
|
+
size: "sm"
|
|
637
628
|
}) : null, /*#__PURE__*/jsx(Breadcrumb$1, {
|
|
638
629
|
items: items,
|
|
639
|
-
theme: "secondary",
|
|
640
630
|
withoutBar: true,
|
|
641
631
|
noWrap: true,
|
|
642
|
-
className: classNames([styles$
|
|
632
|
+
className: classNames([styles$f.container, 'text-truncate', className])
|
|
643
633
|
})]
|
|
644
634
|
});
|
|
645
635
|
}
|
|
646
636
|
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
const {
|
|
652
|
-
className: t1,
|
|
653
|
-
onConfirm: t2,
|
|
654
|
-
onCancel: t3
|
|
655
|
-
} = t0;
|
|
656
|
-
const className = t1 === undefined ? null : t1;
|
|
657
|
-
const onConfirm = t2 === undefined ? null : t2;
|
|
658
|
-
const onCancel = t3 === undefined ? null : t3;
|
|
659
|
-
let t4;
|
|
637
|
+
function DeleteScreenModal(props) {
|
|
638
|
+
const $ = c(5);
|
|
639
|
+
let t0;
|
|
640
|
+
let t1;
|
|
660
641
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
661
|
-
|
|
642
|
+
t0 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
662
643
|
id: "p6q/+/",
|
|
663
644
|
defaultMessage: "Delete screen"
|
|
664
645
|
});
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
let t5;
|
|
670
|
-
if ($[1] !== className) {
|
|
671
|
-
t5 = classNames([styles$g.container, className]);
|
|
672
|
-
$[1] = className;
|
|
673
|
-
$[2] = t5;
|
|
674
|
-
} else {
|
|
675
|
-
t5 = $[2];
|
|
676
|
-
}
|
|
677
|
-
let t6;
|
|
678
|
-
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
679
|
-
t6 = /*#__PURE__*/jsx("div", {
|
|
680
|
-
className: styles$g.description,
|
|
681
|
-
children: /*#__PURE__*/jsx(Label, {
|
|
682
|
-
children: /*#__PURE__*/jsx(FormattedMessage, {
|
|
683
|
-
id: "q/tLk0",
|
|
684
|
-
defaultMessage: "Are you sure you want to delete this screen?"
|
|
685
|
-
})
|
|
646
|
+
t1 = {
|
|
647
|
+
label: /*#__PURE__*/jsx(FormattedMessage, {
|
|
648
|
+
id: "gRxcTc",
|
|
649
|
+
defaultMessage: "Delete screen"
|
|
686
650
|
})
|
|
687
|
-
}
|
|
688
|
-
$[
|
|
689
|
-
|
|
690
|
-
t6 = $[3];
|
|
691
|
-
}
|
|
692
|
-
let t7;
|
|
693
|
-
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
694
|
-
t7 = /*#__PURE__*/jsx(Label, {
|
|
695
|
-
children: /*#__PURE__*/jsx(FormattedMessage, {
|
|
696
|
-
id: "0GT0SI",
|
|
697
|
-
defaultMessage: "Cancel"
|
|
698
|
-
})
|
|
699
|
-
});
|
|
700
|
-
$[4] = t7;
|
|
701
|
-
} else {
|
|
702
|
-
t7 = $[4];
|
|
703
|
-
}
|
|
704
|
-
let t8;
|
|
705
|
-
if ($[5] !== onCancel) {
|
|
706
|
-
t8 = /*#__PURE__*/jsx(Button, {
|
|
707
|
-
onClick: onCancel,
|
|
708
|
-
className: "btn-outline-secondary me-2",
|
|
709
|
-
children: t7
|
|
710
|
-
});
|
|
711
|
-
$[5] = onCancel;
|
|
712
|
-
$[6] = t8;
|
|
713
|
-
} else {
|
|
714
|
-
t8 = $[6];
|
|
715
|
-
}
|
|
716
|
-
let t9;
|
|
717
|
-
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
718
|
-
t9 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
719
|
-
id: "gRxcTc",
|
|
720
|
-
defaultMessage: "Delete screen"
|
|
721
|
-
});
|
|
722
|
-
$[7] = t9;
|
|
723
|
-
} else {
|
|
724
|
-
t9 = $[7];
|
|
725
|
-
}
|
|
726
|
-
let t10;
|
|
727
|
-
if ($[8] !== onConfirm) {
|
|
728
|
-
t10 = /*#__PURE__*/jsx(Button, {
|
|
729
|
-
onClick: onConfirm,
|
|
730
|
-
theme: "danger",
|
|
731
|
-
label: t9
|
|
732
|
-
});
|
|
733
|
-
$[8] = onConfirm;
|
|
734
|
-
$[9] = t10;
|
|
651
|
+
};
|
|
652
|
+
$[0] = t0;
|
|
653
|
+
$[1] = t1;
|
|
735
654
|
} else {
|
|
736
|
-
|
|
655
|
+
t0 = $[0];
|
|
656
|
+
t1 = $[1];
|
|
737
657
|
}
|
|
738
|
-
let
|
|
739
|
-
if ($[
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
658
|
+
let t2;
|
|
659
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
660
|
+
t2 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
661
|
+
id: "q/tLk0",
|
|
662
|
+
defaultMessage: "Are you sure you want to delete this screen?"
|
|
743
663
|
});
|
|
744
|
-
$[
|
|
745
|
-
$[11] = t8;
|
|
746
|
-
$[12] = t11;
|
|
664
|
+
$[2] = t2;
|
|
747
665
|
} else {
|
|
748
|
-
|
|
666
|
+
t2 = $[2];
|
|
749
667
|
}
|
|
750
|
-
let
|
|
751
|
-
if ($[
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
})
|
|
668
|
+
let t3;
|
|
669
|
+
if ($[3] !== props) {
|
|
670
|
+
t3 = /*#__PURE__*/jsx(ConfirmModal, {
|
|
671
|
+
id: "delete-screen",
|
|
672
|
+
title: t0,
|
|
673
|
+
confirmButton: t1,
|
|
674
|
+
...props,
|
|
675
|
+
children: t2
|
|
759
676
|
});
|
|
760
|
-
$[
|
|
761
|
-
$[
|
|
762
|
-
$[15] = t5;
|
|
763
|
-
$[16] = t12;
|
|
677
|
+
$[3] = props;
|
|
678
|
+
$[4] = t3;
|
|
764
679
|
} else {
|
|
765
|
-
|
|
680
|
+
t3 = $[4];
|
|
766
681
|
}
|
|
767
|
-
return
|
|
682
|
+
return t3;
|
|
768
683
|
}
|
|
769
684
|
|
|
770
|
-
var styles$
|
|
685
|
+
var styles$e = {"content":"micromag-editor-form-content","navbar":"micromag-editor-form-navbar","panel":"micromag-editor-form-panel"};
|
|
771
686
|
|
|
772
|
-
/* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
|
|
773
687
|
function EditForm({
|
|
774
688
|
value = null,
|
|
775
689
|
isTheme = false,
|
|
@@ -804,7 +718,7 @@ function EditForm({
|
|
|
804
718
|
// Get transition direction
|
|
805
719
|
const {
|
|
806
720
|
direction
|
|
807
|
-
} = useFormTransition(url, screenIndex, styles$
|
|
721
|
+
} = useFormTransition(url, screenIndex, styles$e);
|
|
808
722
|
const [screenSettingsOpened, setScreenSettingsOpened] = useState(false);
|
|
809
723
|
const [deleteScreenModalOpened, setDeleteScreenModalOpened] = useState(false);
|
|
810
724
|
const [fieldForms, setFieldForms] = useState({});
|
|
@@ -945,7 +859,7 @@ function EditForm({
|
|
|
945
859
|
triggerOnChange(deleteScreen(value, screenId));
|
|
946
860
|
setDeleteScreenModalOpened(false);
|
|
947
861
|
}, [value, triggerOnChange, screenId, setScreenSettingsOpened, routePush, screens]);
|
|
948
|
-
const
|
|
862
|
+
const onDeleteModalClosed = useCallback(() => {
|
|
949
863
|
setDeleteScreenModalOpened(false);
|
|
950
864
|
}, [setDeleteScreenModalOpened]);
|
|
951
865
|
const dropdownItems = [!isTheme ? {
|
|
@@ -971,7 +885,7 @@ function EditForm({
|
|
|
971
885
|
compact: true,
|
|
972
886
|
noWrap: true,
|
|
973
887
|
withoutCollapse: true,
|
|
974
|
-
className: classNames(['sticky-top', 'border-bottom',
|
|
888
|
+
className: classNames(['sticky-top', 'border-bottom', styles$e.navbar]),
|
|
975
889
|
children: [/*#__PURE__*/jsx(Breadcrumb, {
|
|
976
890
|
story: value,
|
|
977
891
|
url: url,
|
|
@@ -984,8 +898,7 @@ function EditForm({
|
|
|
984
898
|
children: [/*#__PURE__*/jsx(SettingsButton, {
|
|
985
899
|
onClick: onSettingsClick,
|
|
986
900
|
dots: true,
|
|
987
|
-
className: "py-0"
|
|
988
|
-
theme: "default"
|
|
901
|
+
className: "py-0"
|
|
989
902
|
}), /*#__PURE__*/jsx(DropdownMenu, {
|
|
990
903
|
align: "end",
|
|
991
904
|
items: dropdownItems,
|
|
@@ -994,14 +907,14 @@ function EditForm({
|
|
|
994
907
|
})]
|
|
995
908
|
}) : null]
|
|
996
909
|
}) : null, /*#__PURE__*/jsx("div", {
|
|
997
|
-
className: classNames(['flex-grow-1', 'd-flex', 'w-100', styles$
|
|
910
|
+
className: classNames(['flex-grow-1', 'd-flex', 'w-100', styles$e.content]),
|
|
998
911
|
children: screen !== null ? /*#__PURE__*/jsx("div", {
|
|
999
912
|
className: "w-100 flex-grow-1",
|
|
1000
913
|
style: {
|
|
1001
914
|
position: 'relative'
|
|
1002
915
|
},
|
|
1003
916
|
children: panelTransitions((springStyle, item_0) => item_0 !== null ? /*#__PURE__*/jsx(animated.div, {
|
|
1004
|
-
className: classNames(['w-100', styles$
|
|
917
|
+
className: classNames(['w-100', styles$e.panel]),
|
|
1005
918
|
style: {
|
|
1006
919
|
...springStyle,
|
|
1007
920
|
...(item_0.key !== transitionItem?.key ? {
|
|
@@ -1021,14 +934,14 @@ function EditForm({
|
|
|
1021
934
|
name: item_0.fieldParams.replace(/\//g, '.'),
|
|
1022
935
|
value: item_0.screen,
|
|
1023
936
|
form: item_0.formParams,
|
|
1024
|
-
className: styles$
|
|
937
|
+
className: styles$e.form,
|
|
1025
938
|
gotoFieldForm: gotoFieldForm,
|
|
1026
939
|
closeFieldForm: closeFieldForm,
|
|
1027
940
|
fieldContext: fieldContext,
|
|
1028
941
|
onChange: onScreenFormChange
|
|
1029
942
|
}) : /*#__PURE__*/jsx(ScreenForm, {
|
|
1030
943
|
value: item_0.screen,
|
|
1031
|
-
className: styles$
|
|
944
|
+
className: styles$e.form,
|
|
1032
945
|
onChange: onScreenFormChange,
|
|
1033
946
|
gotoFieldForm: gotoFieldForm,
|
|
1034
947
|
closeFieldForm: closeFieldForm
|
|
@@ -1045,7 +958,7 @@ function EditForm({
|
|
|
1045
958
|
})
|
|
1046
959
|
}), deleteScreenModalOpened ? /*#__PURE__*/jsx(DeleteScreenModal, {
|
|
1047
960
|
onConfirm: onDeleteScreenConfirm,
|
|
1048
|
-
|
|
961
|
+
onClosed: onDeleteModalClosed
|
|
1049
962
|
}) : null]
|
|
1050
963
|
});
|
|
1051
964
|
}
|
|
@@ -1229,7 +1142,7 @@ var DeviceIcons = /*#__PURE__*/Object.freeze({
|
|
|
1229
1142
|
Mobile: MobileIcon
|
|
1230
1143
|
});
|
|
1231
1144
|
|
|
1232
|
-
var styles$
|
|
1145
|
+
var styles$d = {"container":"micromag-editor-buttons-device-container","icon":"micromag-editor-buttons-device-icon"};
|
|
1233
1146
|
|
|
1234
1147
|
function DeviceButton(t0) {
|
|
1235
1148
|
const $ = c(16);
|
|
@@ -1269,7 +1182,7 @@ function DeviceButton(t0) {
|
|
|
1269
1182
|
const DeviceIcon = t3;
|
|
1270
1183
|
let t4;
|
|
1271
1184
|
if ($[8] !== className) {
|
|
1272
|
-
t4 = classNames([styles$
|
|
1185
|
+
t4 = classNames([styles$d.container, className]);
|
|
1273
1186
|
$[8] = className;
|
|
1274
1187
|
$[9] = t4;
|
|
1275
1188
|
} else {
|
|
@@ -1278,7 +1191,7 @@ function DeviceButton(t0) {
|
|
|
1278
1191
|
let t5;
|
|
1279
1192
|
if ($[10] !== DeviceIcon) {
|
|
1280
1193
|
t5 = /*#__PURE__*/jsx(DeviceIcon, {
|
|
1281
|
-
className: styles$
|
|
1194
|
+
className: styles$d.icon
|
|
1282
1195
|
});
|
|
1283
1196
|
$[10] = DeviceIcon;
|
|
1284
1197
|
$[11] = t5;
|
|
@@ -1302,7 +1215,7 @@ function DeviceButton(t0) {
|
|
|
1302
1215
|
return t6;
|
|
1303
1216
|
}
|
|
1304
1217
|
|
|
1305
|
-
var styles$
|
|
1218
|
+
var styles$c = {"container":"micromag-editor-menus-devices-container","button":"micromag-editor-menus-devices-button"};
|
|
1306
1219
|
|
|
1307
1220
|
const emptyArray$1 = [];
|
|
1308
1221
|
function DevicesMenu(t0) {
|
|
@@ -1317,7 +1230,7 @@ function DevicesMenu(t0) {
|
|
|
1317
1230
|
const onClickItem = t3 === undefined ? null : t3;
|
|
1318
1231
|
let t4;
|
|
1319
1232
|
if ($[0] !== className) {
|
|
1320
|
-
t4 = classNames([styles$
|
|
1233
|
+
t4 = classNames([styles$c.container, className]);
|
|
1321
1234
|
$[0] = className;
|
|
1322
1235
|
$[1] = t4;
|
|
1323
1236
|
} else {
|
|
@@ -1334,7 +1247,7 @@ function DevicesMenu(t0) {
|
|
|
1334
1247
|
device: id,
|
|
1335
1248
|
...props,
|
|
1336
1249
|
...itemProps,
|
|
1337
|
-
className: styles$
|
|
1250
|
+
className: styles$c.button,
|
|
1338
1251
|
onClick: e => onClickItem !== null ? onClickItem(e, item, index) : null
|
|
1339
1252
|
});
|
|
1340
1253
|
};
|
|
@@ -1361,10 +1274,10 @@ function DevicesMenu(t0) {
|
|
|
1361
1274
|
return t6;
|
|
1362
1275
|
}
|
|
1363
1276
|
|
|
1364
|
-
var styles$
|
|
1277
|
+
var styles$b = {"container":"micromag-editor-buttons-screen-container","button":"micromag-editor-buttons-screen-button","screen":"micromag-editor-buttons-screen-screen","inner":"micromag-editor-buttons-screen-inner","icon":"micromag-editor-buttons-screen-icon","label":"micromag-editor-buttons-screen-label","active":"micromag-editor-buttons-screen-active"};
|
|
1365
1278
|
|
|
1366
1279
|
function ScreenButton(t0) {
|
|
1367
|
-
const $ = c(
|
|
1280
|
+
const $ = c(23);
|
|
1368
1281
|
const {
|
|
1369
1282
|
active: t1,
|
|
1370
1283
|
id: t2,
|
|
@@ -1375,7 +1288,7 @@ function ScreenButton(t0) {
|
|
|
1375
1288
|
children: t7,
|
|
1376
1289
|
title: t8,
|
|
1377
1290
|
onClick: t9,
|
|
1378
|
-
|
|
1291
|
+
ref: t10
|
|
1379
1292
|
} = t0;
|
|
1380
1293
|
const active = t1 === undefined ? false : t1;
|
|
1381
1294
|
const id = t2 === undefined ? null : t2;
|
|
@@ -1389,8 +1302,8 @@ function ScreenButton(t0) {
|
|
|
1389
1302
|
const refButton = t10 === undefined ? null : t10;
|
|
1390
1303
|
let t11;
|
|
1391
1304
|
if ($[0] !== active || $[1] !== className) {
|
|
1392
|
-
t11 = classNames([styles$
|
|
1393
|
-
[styles$
|
|
1305
|
+
t11 = classNames([styles$b.container, className, {
|
|
1306
|
+
[styles$b.active]: active
|
|
1394
1307
|
}]);
|
|
1395
1308
|
$[0] = active;
|
|
1396
1309
|
$[1] = className;
|
|
@@ -1401,14 +1314,14 @@ function ScreenButton(t0) {
|
|
|
1401
1314
|
let t12;
|
|
1402
1315
|
if ($[3] !== children || $[4] !== icon || $[5] !== label) {
|
|
1403
1316
|
t12 = children !== null ? children : /*#__PURE__*/jsx("div", {
|
|
1404
|
-
className: styles$
|
|
1317
|
+
className: styles$b.screen,
|
|
1405
1318
|
children: /*#__PURE__*/jsxs("div", {
|
|
1406
|
-
className: styles$
|
|
1319
|
+
className: styles$b.inner,
|
|
1407
1320
|
children: [icon !== null ? /*#__PURE__*/jsx("div", {
|
|
1408
|
-
className: styles$
|
|
1321
|
+
className: styles$b.icon,
|
|
1409
1322
|
children: icon
|
|
1410
1323
|
}) : null, label !== null ? /*#__PURE__*/jsx("div", {
|
|
1411
|
-
className: styles$
|
|
1324
|
+
className: styles$b.label,
|
|
1412
1325
|
children: label
|
|
1413
1326
|
}) : null]
|
|
1414
1327
|
})
|
|
@@ -1420,69 +1333,68 @@ function ScreenButton(t0) {
|
|
|
1420
1333
|
} else {
|
|
1421
1334
|
t12 = $[6];
|
|
1422
1335
|
}
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1336
|
+
const t13 = !active;
|
|
1337
|
+
let t14;
|
|
1338
|
+
if ($[7] !== active || $[8] !== t13) {
|
|
1339
|
+
t14 = classNames(["position-absolute top-0 start-0 w-100 h-100 border border-primary border-3 fade", {
|
|
1340
|
+
"opacity-0": t13,
|
|
1341
|
+
"opacity-100": active
|
|
1342
|
+
}]);
|
|
1343
|
+
$[7] = active;
|
|
1344
|
+
$[8] = t13;
|
|
1345
|
+
$[9] = t14;
|
|
1346
|
+
} else {
|
|
1347
|
+
t14 = $[9];
|
|
1348
|
+
}
|
|
1349
|
+
let t15;
|
|
1350
|
+
if ($[10] !== t14) {
|
|
1351
|
+
t15 = /*#__PURE__*/jsx("span", {
|
|
1352
|
+
className: t14
|
|
1427
1353
|
});
|
|
1428
|
-
$[
|
|
1354
|
+
$[10] = t14;
|
|
1355
|
+
$[11] = t15;
|
|
1429
1356
|
} else {
|
|
1430
|
-
|
|
1357
|
+
t15 = $[11];
|
|
1431
1358
|
}
|
|
1432
|
-
let
|
|
1433
|
-
if ($[
|
|
1434
|
-
|
|
1435
|
-
className: styles$
|
|
1359
|
+
let t16;
|
|
1360
|
+
if ($[12] !== href || $[13] !== id || $[14] !== onClick || $[15] !== refButton || $[16] !== t15 || $[17] !== title) {
|
|
1361
|
+
t16 = /*#__PURE__*/jsx(Button, {
|
|
1362
|
+
className: styles$b.button,
|
|
1436
1363
|
withoutStyle: true,
|
|
1437
1364
|
id: id,
|
|
1438
1365
|
href: href,
|
|
1439
1366
|
title: title,
|
|
1440
1367
|
onClick: onClick,
|
|
1441
1368
|
refButton: refButton,
|
|
1442
|
-
children:
|
|
1369
|
+
children: t15
|
|
1443
1370
|
});
|
|
1444
|
-
$[
|
|
1445
|
-
$[
|
|
1446
|
-
$[
|
|
1447
|
-
$[
|
|
1448
|
-
$[
|
|
1449
|
-
$[
|
|
1371
|
+
$[12] = href;
|
|
1372
|
+
$[13] = id;
|
|
1373
|
+
$[14] = onClick;
|
|
1374
|
+
$[15] = refButton;
|
|
1375
|
+
$[16] = t15;
|
|
1376
|
+
$[17] = title;
|
|
1377
|
+
$[18] = t16;
|
|
1450
1378
|
} else {
|
|
1451
|
-
|
|
1379
|
+
t16 = $[18];
|
|
1452
1380
|
}
|
|
1453
|
-
let
|
|
1454
|
-
if ($[
|
|
1455
|
-
|
|
1381
|
+
let t17;
|
|
1382
|
+
if ($[19] !== t11 || $[20] !== t12 || $[21] !== t16) {
|
|
1383
|
+
t17 = /*#__PURE__*/jsxs("div", {
|
|
1456
1384
|
className: t11,
|
|
1457
|
-
children: [t12,
|
|
1385
|
+
children: [t12, t16]
|
|
1458
1386
|
});
|
|
1459
|
-
$[
|
|
1460
|
-
$[
|
|
1461
|
-
$[
|
|
1462
|
-
$[
|
|
1387
|
+
$[19] = t11;
|
|
1388
|
+
$[20] = t12;
|
|
1389
|
+
$[21] = t16;
|
|
1390
|
+
$[22] = t17;
|
|
1463
1391
|
} else {
|
|
1464
|
-
|
|
1392
|
+
t17 = $[22];
|
|
1465
1393
|
}
|
|
1466
|
-
return
|
|
1394
|
+
return t17;
|
|
1467
1395
|
}
|
|
1468
|
-
var ScreenButton$1 = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
1469
|
-
const $ = c(3);
|
|
1470
|
-
let t0;
|
|
1471
|
-
if ($[0] !== props || $[1] !== ref) {
|
|
1472
|
-
t0 = /*#__PURE__*/jsx(ScreenButton, {
|
|
1473
|
-
...props,
|
|
1474
|
-
refButton: ref
|
|
1475
|
-
});
|
|
1476
|
-
$[0] = props;
|
|
1477
|
-
$[1] = ref;
|
|
1478
|
-
$[2] = t0;
|
|
1479
|
-
} else {
|
|
1480
|
-
t0 = $[2];
|
|
1481
|
-
}
|
|
1482
|
-
return t0;
|
|
1483
|
-
});
|
|
1484
1396
|
|
|
1485
|
-
var styles$
|
|
1397
|
+
var styles$a = {"button":"micromag-editor-buttons-screen-with-preview-button","index":"micromag-editor-buttons-screen-with-preview-index","name":"micromag-editor-buttons-screen-with-preview-name","deleteButton":"micromag-editor-buttons-screen-with-preview-deleteButton","withIndex":"micromag-editor-buttons-screen-with-preview-withIndex"};
|
|
1486
1398
|
|
|
1487
1399
|
function ScreenWithPreview(t0) {
|
|
1488
1400
|
const $ = c(40);
|
|
@@ -1543,8 +1455,8 @@ function ScreenWithPreview(t0) {
|
|
|
1543
1455
|
const t16 = withIndexIndicator || withName;
|
|
1544
1456
|
let t17;
|
|
1545
1457
|
if ($[4] !== className || $[5] !== t16) {
|
|
1546
|
-
t17 = classNames([styles$
|
|
1547
|
-
[styles$
|
|
1458
|
+
t17 = classNames([styles$a.button, className, {
|
|
1459
|
+
[styles$a.withIndex]: t16
|
|
1548
1460
|
}]);
|
|
1549
1461
|
$[4] = className;
|
|
1550
1462
|
$[5] = t16;
|
|
@@ -1576,7 +1488,7 @@ function ScreenWithPreview(t0) {
|
|
|
1576
1488
|
t20 = /*#__PURE__*/jsx(ScreenComponent, {
|
|
1577
1489
|
screen: screen,
|
|
1578
1490
|
screenState: screenState,
|
|
1579
|
-
className: styles$
|
|
1491
|
+
className: styles$a.screen,
|
|
1580
1492
|
hidden: t19,
|
|
1581
1493
|
withSize: true
|
|
1582
1494
|
});
|
|
@@ -1591,7 +1503,7 @@ function ScreenWithPreview(t0) {
|
|
|
1591
1503
|
let t21;
|
|
1592
1504
|
if ($[17] !== index || $[18] !== withIndexIndicator) {
|
|
1593
1505
|
t21 = index !== null && withIndexIndicator ? /*#__PURE__*/jsx("div", {
|
|
1594
|
-
className: styles$
|
|
1506
|
+
className: styles$a.index,
|
|
1595
1507
|
children: index + 1
|
|
1596
1508
|
}) : null;
|
|
1597
1509
|
$[17] = index;
|
|
@@ -1603,7 +1515,7 @@ function ScreenWithPreview(t0) {
|
|
|
1603
1515
|
let t22;
|
|
1604
1516
|
if ($[20] !== finalTitle || $[21] !== withIndexIndicator || $[22] !== withName) {
|
|
1605
1517
|
t22 = withName && !withIndexIndicator ? /*#__PURE__*/jsx("div", {
|
|
1606
|
-
className: styles$
|
|
1518
|
+
className: styles$a.name,
|
|
1607
1519
|
children: finalTitle || null
|
|
1608
1520
|
}) : null;
|
|
1609
1521
|
$[20] = finalTitle;
|
|
@@ -1616,7 +1528,7 @@ function ScreenWithPreview(t0) {
|
|
|
1616
1528
|
let t23;
|
|
1617
1529
|
if ($[24] !== onDeleteButtonClick || $[25] !== withDeleteButtonOnRepeatables) {
|
|
1618
1530
|
t23 = withDeleteButtonOnRepeatables ? /*#__PURE__*/jsx("div", {
|
|
1619
|
-
className: styles$
|
|
1531
|
+
className: styles$a.deleteButton,
|
|
1620
1532
|
onClick: onDeleteButtonClick,
|
|
1621
1533
|
children: /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
1622
1534
|
icon: faTimesCircle
|
|
@@ -1630,7 +1542,7 @@ function ScreenWithPreview(t0) {
|
|
|
1630
1542
|
}
|
|
1631
1543
|
let t24;
|
|
1632
1544
|
if ($[27] !== active || $[28] !== finalTitle || $[29] !== href || $[30] !== t17 || $[31] !== t18 || $[32] !== t20 || $[33] !== t21 || $[34] !== t22 || $[35] !== t23) {
|
|
1633
|
-
t24 = /*#__PURE__*/jsxs(ScreenButton
|
|
1545
|
+
t24 = /*#__PURE__*/jsxs(ScreenButton, {
|
|
1634
1546
|
href: href,
|
|
1635
1547
|
active: active,
|
|
1636
1548
|
className: t17,
|
|
@@ -1666,7 +1578,7 @@ function ScreenWithPreview(t0) {
|
|
|
1666
1578
|
return t25;
|
|
1667
1579
|
}
|
|
1668
1580
|
|
|
1669
|
-
var styles$
|
|
1581
|
+
var styles$9 = {"container":"micromag-editor-partials-screen-states-container","button":"micromag-editor-partials-screen-states-button","addButton":"micromag-editor-partials-screen-states-addButton","title":"micromag-editor-partials-screen-states-title","settings":"micromag-editor-partials-screen-states-settings"};
|
|
1670
1582
|
|
|
1671
1583
|
/* eslint-disable react/button-has-type, react/jsx-props-no-spreading */
|
|
1672
1584
|
function ScreenStates({
|
|
@@ -1688,16 +1600,16 @@ function ScreenStates({
|
|
|
1688
1600
|
id
|
|
1689
1601
|
}) => id === stateParam) !== -1 ? stateParam : null;
|
|
1690
1602
|
return /*#__PURE__*/jsx("div", {
|
|
1691
|
-
className: classNames([styles$
|
|
1603
|
+
className: classNames([styles$9.container, className]),
|
|
1692
1604
|
children: /*#__PURE__*/jsxs("div", {
|
|
1693
1605
|
className: "d-flex align-items-end m-n1",
|
|
1694
1606
|
children: [/*#__PURE__*/jsxs("div", {
|
|
1695
|
-
className: classNames(['p-1 align-self-stretch d-flex flex-column', styles$
|
|
1607
|
+
className: classNames(['p-1 align-self-stretch d-flex flex-column', styles$9.settings]),
|
|
1696
1608
|
children: [/*#__PURE__*/jsx("h6", {
|
|
1697
|
-
className: classNames(['fw-normal', 'invisible', styles$
|
|
1609
|
+
className: classNames(['fw-normal', 'invisible', styles$9.title]),
|
|
1698
1610
|
children: "Settings"
|
|
1699
1611
|
}), /*#__PURE__*/jsx(Button, {
|
|
1700
|
-
className: classNames([styles$
|
|
1612
|
+
className: classNames([styles$9.button, 'p-0', 'flex-grow-1', 'justify-content-center']),
|
|
1701
1613
|
theme: screenParam !== null && field === null ? 'primary' : 'secondary',
|
|
1702
1614
|
outline: screenParam === null || field !== null,
|
|
1703
1615
|
size: "lg",
|
|
@@ -1767,7 +1679,7 @@ function ScreenStates({
|
|
|
1767
1679
|
return /*#__PURE__*/jsxs("div", {
|
|
1768
1680
|
className: "p-1 align-self-stretch d-flex flex-column",
|
|
1769
1681
|
children: [/*#__PURE__*/jsx("h6", {
|
|
1770
|
-
className: classNames(['fw-normal', 'text-body-secondary', styles$
|
|
1682
|
+
className: classNames(['fw-normal', 'text-body-secondary', styles$9.title]),
|
|
1771
1683
|
children: /*#__PURE__*/jsx(FormattedMessage, {
|
|
1772
1684
|
...label
|
|
1773
1685
|
})
|
|
@@ -1781,7 +1693,7 @@ function ScreenStates({
|
|
|
1781
1693
|
withDeleteButtonOnRepeatables: true,
|
|
1782
1694
|
screen: screen,
|
|
1783
1695
|
screenState: `${id_0}.${index}`,
|
|
1784
|
-
className: styles$
|
|
1696
|
+
className: styles$9.button,
|
|
1785
1697
|
active: currentState !== null && id_0 === currentState.split('.')[0] && stateIndex !== null && parseInt(stateIndex, 10) === index,
|
|
1786
1698
|
href: url('screen.field', {
|
|
1787
1699
|
screen: screen.id,
|
|
@@ -1792,7 +1704,7 @@ function ScreenStates({
|
|
|
1792
1704
|
}, index)), !withoutCreate ? /*#__PURE__*/jsx("li", {
|
|
1793
1705
|
className: "p-1",
|
|
1794
1706
|
children: /*#__PURE__*/jsx(Button, {
|
|
1795
|
-
className: classNames([styles$
|
|
1707
|
+
className: classNames([styles$9.button, styles$9.addButton, 'h-100', 'p-0', 'justify-content-center']),
|
|
1796
1708
|
theme: "secondary",
|
|
1797
1709
|
outline: true,
|
|
1798
1710
|
size: "lg",
|
|
@@ -1805,7 +1717,7 @@ function ScreenStates({
|
|
|
1805
1717
|
}) : /*#__PURE__*/jsx(ScreenWithPreview, {
|
|
1806
1718
|
screen: screen,
|
|
1807
1719
|
screenState: id_0,
|
|
1808
|
-
className: styles$
|
|
1720
|
+
className: styles$9.button,
|
|
1809
1721
|
active: id_0 === currentState,
|
|
1810
1722
|
href: url('screen.field', {
|
|
1811
1723
|
screen: screen.id,
|
|
@@ -1823,7 +1735,7 @@ function ScreenStates({
|
|
|
1823
1735
|
});
|
|
1824
1736
|
}
|
|
1825
1737
|
|
|
1826
|
-
var styles$
|
|
1738
|
+
var styles$8 = {"container":"micromag-editor-preview-container","inner":"micromag-editor-preview-inner","top":"micromag-editor-preview-top","bottom":"micromag-editor-preview-bottom","preview":"micromag-editor-preview-preview","viewerContainer":"micromag-editor-preview-viewerContainer","deviceMenu":"micromag-editor-preview-deviceMenu","devices":"micromag-editor-preview-devices","noStory":"micromag-editor-preview-noStory","story":"micromag-editor-preview-story"};
|
|
1827
1739
|
|
|
1828
1740
|
function EditorPreview(t0) {
|
|
1829
1741
|
const $ = c(69);
|
|
@@ -2060,13 +1972,13 @@ function EditorPreview(t0) {
|
|
|
2060
1972
|
t31 = $[38];
|
|
2061
1973
|
}
|
|
2062
1974
|
const currentScreenStateId = t31;
|
|
2063
|
-
const t32 = classNames([styles$
|
|
2064
|
-
[styles$
|
|
1975
|
+
const t32 = classNames([styles$8.container, screens.map(_temp2$1), className, {
|
|
1976
|
+
[styles$8.withoutDevicesSizes]: withoutDevicesSizes
|
|
2065
1977
|
}]);
|
|
2066
1978
|
let t33;
|
|
2067
1979
|
if ($[39] !== currentScreen || $[40] !== currentScreenStateId || $[41] !== currentScreenStates || $[42] !== onChange || $[43] !== value) {
|
|
2068
1980
|
t33 = currentScreenStates !== null && currentScreen !== null ? /*#__PURE__*/jsx("div", {
|
|
2069
|
-
className: classNames([styles$
|
|
1981
|
+
className: classNames([styles$8.top, "px-1"]),
|
|
2070
1982
|
children: /*#__PURE__*/jsx(ScreenStates, {
|
|
2071
1983
|
screen: currentScreen,
|
|
2072
1984
|
screenState: currentScreenStateId,
|
|
@@ -2086,14 +1998,14 @@ function EditorPreview(t0) {
|
|
|
2086
1998
|
let t34;
|
|
2087
1999
|
if ($[45] !== currentScreenStateId || $[46] !== onScreenChange || $[47] !== screenId || $[48] !== valueParsed || $[49] !== viewerTheme) {
|
|
2088
2000
|
t34 = /*#__PURE__*/jsx("div", {
|
|
2089
|
-
className: styles$
|
|
2001
|
+
className: styles$8.viewerContainer,
|
|
2090
2002
|
children: /*#__PURE__*/jsx(PlaybackProvider, {
|
|
2091
2003
|
children: /*#__PURE__*/jsx(Viewer, {
|
|
2092
2004
|
story: valueParsed,
|
|
2093
2005
|
storyIsParsed: true,
|
|
2094
2006
|
screen: screenId,
|
|
2095
2007
|
screenState: currentScreenStateId,
|
|
2096
|
-
className: styles$
|
|
2008
|
+
className: styles$8.story,
|
|
2097
2009
|
theme: viewerTheme,
|
|
2098
2010
|
interactions: null,
|
|
2099
2011
|
renderContext: "edit",
|
|
@@ -2118,7 +2030,7 @@ function EditorPreview(t0) {
|
|
|
2118
2030
|
let t35;
|
|
2119
2031
|
if ($[51] !== previewStyle || $[52] !== t34) {
|
|
2120
2032
|
t35 = /*#__PURE__*/jsx("div", {
|
|
2121
|
-
className: styles$
|
|
2033
|
+
className: styles$8.preview,
|
|
2122
2034
|
style: previewStyle,
|
|
2123
2035
|
children: t34
|
|
2124
2036
|
});
|
|
@@ -2131,9 +2043,9 @@ function EditorPreview(t0) {
|
|
|
2131
2043
|
let t36;
|
|
2132
2044
|
if ($[54] !== bottomRef || $[55] !== t35) {
|
|
2133
2045
|
t36 = /*#__PURE__*/jsx("div", {
|
|
2134
|
-
className: styles$
|
|
2046
|
+
className: styles$8.bottom,
|
|
2135
2047
|
children: /*#__PURE__*/jsx("div", {
|
|
2136
|
-
className: styles$
|
|
2048
|
+
className: styles$8.inner,
|
|
2137
2049
|
ref: bottomRef,
|
|
2138
2050
|
children: t35
|
|
2139
2051
|
})
|
|
@@ -2147,14 +2059,14 @@ function EditorPreview(t0) {
|
|
|
2147
2059
|
let t37;
|
|
2148
2060
|
if ($[57] !== deviceId || $[58] !== devices || $[59] !== onClickDeviceItem || $[60] !== withoutDevicesSizes) {
|
|
2149
2061
|
t37 = !withoutDevicesSizes ? /*#__PURE__*/jsx("div", {
|
|
2150
|
-
className: styles$
|
|
2062
|
+
className: styles$8.deviceMenu,
|
|
2151
2063
|
children: /*#__PURE__*/jsx(DevicesMenu, {
|
|
2152
2064
|
items: devices.map(it_2 => ({
|
|
2153
2065
|
...it_2,
|
|
2154
2066
|
active: it_2.id === deviceId
|
|
2155
2067
|
})),
|
|
2156
2068
|
onClickItem: onClickDeviceItem,
|
|
2157
|
-
className: styles$
|
|
2069
|
+
className: styles$8.devices
|
|
2158
2070
|
})
|
|
2159
2071
|
}) : null;
|
|
2160
2072
|
$[57] = deviceId;
|
|
@@ -2168,7 +2080,7 @@ function EditorPreview(t0) {
|
|
|
2168
2080
|
let t38;
|
|
2169
2081
|
if ($[62] !== t33 || $[63] !== t36 || $[64] !== t37) {
|
|
2170
2082
|
t38 = /*#__PURE__*/jsxs("div", {
|
|
2171
|
-
className: styles$
|
|
2083
|
+
className: styles$8.inner,
|
|
2172
2084
|
children: [t33, t36, t37]
|
|
2173
2085
|
});
|
|
2174
2086
|
$[62] = t33;
|
|
@@ -2193,7 +2105,7 @@ function EditorPreview(t0) {
|
|
|
2193
2105
|
return t39;
|
|
2194
2106
|
}
|
|
2195
2107
|
function _temp2$1(screenName) {
|
|
2196
|
-
return styles$
|
|
2108
|
+
return styles$8[`screen-${screenName}`];
|
|
2197
2109
|
}
|
|
2198
2110
|
function _temp$3(it_1) {
|
|
2199
2111
|
return it_1.match(/^[0-9]+$/) !== null;
|
|
@@ -2520,10 +2432,10 @@ const sortableTreeKeyboardCoordinates = (context, indentationWidth) => (event, {
|
|
|
2520
2432
|
return undefined;
|
|
2521
2433
|
};
|
|
2522
2434
|
|
|
2523
|
-
var styles$
|
|
2435
|
+
var styles$7 = {"wrapper":"micromag-editor-sortable-sortable-tree-item-actions-wrapper","inner":"micromag-editor-sortable-sortable-tree-item-actions-inner","button":"micromag-editor-sortable-sortable-tree-item-actions-button","handle":"micromag-editor-sortable-sortable-tree-item-actions-handle","icon":"micromag-editor-sortable-sortable-tree-item-actions-icon","count":"micromag-editor-sortable-sortable-tree-item-actions-count","collapsedCount":"micromag-editor-sortable-sortable-tree-item-actions-collapsedCount","disableInteraction":"micromag-editor-sortable-sortable-tree-item-actions-disableInteraction","disableSelection":"micromag-editor-sortable-sortable-tree-item-actions-disableSelection","clone":"micromag-editor-sortable-sortable-tree-item-actions-clone","collapse":"micromag-editor-sortable-sortable-tree-item-actions-collapse","collapsed":"micromag-editor-sortable-sortable-tree-item-actions-collapsed","children":"micromag-editor-sortable-sortable-tree-item-actions-children","withChildren":"micromag-editor-sortable-sortable-tree-item-actions-withChildren","ghost":"micromag-editor-sortable-sortable-tree-item-actions-ghost","indicator":"micromag-editor-sortable-sortable-tree-item-actions-indicator"};
|
|
2524
2436
|
|
|
2525
2437
|
const SortableTreeItemActions = function (t0) {
|
|
2526
|
-
const $ = c(
|
|
2438
|
+
const $ = c(71);
|
|
2527
2439
|
let depth;
|
|
2528
2440
|
let indentationWidth;
|
|
2529
2441
|
let props;
|
|
@@ -2635,15 +2547,17 @@ const SortableTreeItemActions = function (t0) {
|
|
|
2635
2547
|
const children = t18 === undefined ? null : t18;
|
|
2636
2548
|
const containerRef = t19 === undefined ? null : t19;
|
|
2637
2549
|
const t20 = onCollapse !== null;
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
[styles$
|
|
2643
|
-
[styles$
|
|
2644
|
-
[styles$
|
|
2645
|
-
[styles$
|
|
2646
|
-
[styles$
|
|
2550
|
+
const t21 = onCollapse !== null;
|
|
2551
|
+
let t22;
|
|
2552
|
+
if ($[23] !== clone || $[24] !== disableInteraction || $[25] !== disableSelection || $[26] !== ghost || $[27] !== indicator || $[28] !== t20 || $[29] !== t21) {
|
|
2553
|
+
t22 = classNames([styles$7.wrapper, "text-body", {
|
|
2554
|
+
[styles$7.clone]: clone,
|
|
2555
|
+
[styles$7.ghost]: ghost,
|
|
2556
|
+
[styles$7.indicator]: indicator,
|
|
2557
|
+
[styles$7.disableSelection]: disableSelection,
|
|
2558
|
+
[styles$7.disableInteraction]: disableInteraction,
|
|
2559
|
+
[styles$7.withChildren]: t20,
|
|
2560
|
+
"bg-body-secondary": t21
|
|
2647
2561
|
}]);
|
|
2648
2562
|
$[23] = clone;
|
|
2649
2563
|
$[24] = disableInteraction;
|
|
@@ -2652,165 +2566,166 @@ const SortableTreeItemActions = function (t0) {
|
|
|
2652
2566
|
$[27] = indicator;
|
|
2653
2567
|
$[28] = t20;
|
|
2654
2568
|
$[29] = t21;
|
|
2569
|
+
$[30] = t22;
|
|
2655
2570
|
} else {
|
|
2656
|
-
|
|
2571
|
+
t22 = $[30];
|
|
2657
2572
|
}
|
|
2658
|
-
const
|
|
2659
|
-
const
|
|
2660
|
-
let
|
|
2661
|
-
if ($[
|
|
2662
|
-
|
|
2663
|
-
marginLeft:
|
|
2664
|
-
marginRight:
|
|
2573
|
+
const t23 = `${indentationWidth * depth}px`;
|
|
2574
|
+
const t24 = `${5 * depth}px`;
|
|
2575
|
+
let t25;
|
|
2576
|
+
if ($[31] !== t23 || $[32] !== t24) {
|
|
2577
|
+
t25 = {
|
|
2578
|
+
marginLeft: t23,
|
|
2579
|
+
marginRight: t24
|
|
2665
2580
|
};
|
|
2666
|
-
$[30] = t22;
|
|
2667
2581
|
$[31] = t23;
|
|
2668
2582
|
$[32] = t24;
|
|
2669
|
-
} else {
|
|
2670
|
-
t24 = $[32];
|
|
2671
|
-
}
|
|
2672
|
-
let t25;
|
|
2673
|
-
if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2674
|
-
t25 = classNames([styles$8.button, styles$8.handle]);
|
|
2675
2583
|
$[33] = t25;
|
|
2676
2584
|
} else {
|
|
2677
2585
|
t25 = $[33];
|
|
2678
2586
|
}
|
|
2679
2587
|
let t26;
|
|
2680
2588
|
if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2681
|
-
t26 =
|
|
2682
|
-
className: styles$8.icon,
|
|
2683
|
-
icon: faGripLines
|
|
2684
|
-
});
|
|
2589
|
+
t26 = classNames([styles$7.button, styles$7.handle]);
|
|
2685
2590
|
$[34] = t26;
|
|
2686
2591
|
} else {
|
|
2687
2592
|
t26 = $[34];
|
|
2688
2593
|
}
|
|
2689
2594
|
let t27;
|
|
2690
|
-
if ($[35]
|
|
2691
|
-
t27 = /*#__PURE__*/jsx(
|
|
2692
|
-
className:
|
|
2595
|
+
if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2596
|
+
t27 = /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
2597
|
+
className: styles$7.icon,
|
|
2598
|
+
icon: faGripLines
|
|
2599
|
+
});
|
|
2600
|
+
$[35] = t27;
|
|
2601
|
+
} else {
|
|
2602
|
+
t27 = $[35];
|
|
2603
|
+
}
|
|
2604
|
+
let t28;
|
|
2605
|
+
if ($[36] !== handleProps) {
|
|
2606
|
+
t28 = /*#__PURE__*/jsx("button", {
|
|
2607
|
+
className: t26,
|
|
2693
2608
|
type: "button",
|
|
2694
2609
|
...handleProps,
|
|
2695
|
-
children:
|
|
2610
|
+
children: t27
|
|
2696
2611
|
});
|
|
2697
|
-
$[
|
|
2698
|
-
$[
|
|
2612
|
+
$[36] = handleProps;
|
|
2613
|
+
$[37] = t28;
|
|
2699
2614
|
} else {
|
|
2700
|
-
|
|
2615
|
+
t28 = $[37];
|
|
2701
2616
|
}
|
|
2702
|
-
let
|
|
2703
|
-
if ($[
|
|
2704
|
-
|
|
2617
|
+
let t29;
|
|
2618
|
+
if ($[38] !== clone || $[39] !== onRemove) {
|
|
2619
|
+
t29 = !clone && onRemove ? /*#__PURE__*/jsx("button", {
|
|
2705
2620
|
type: "button",
|
|
2706
2621
|
onClick: onRemove,
|
|
2707
2622
|
children: /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
2708
2623
|
icon: faTimes
|
|
2709
2624
|
})
|
|
2710
2625
|
}) : null;
|
|
2711
|
-
$[
|
|
2712
|
-
$[
|
|
2713
|
-
$[
|
|
2626
|
+
$[38] = clone;
|
|
2627
|
+
$[39] = onRemove;
|
|
2628
|
+
$[40] = t29;
|
|
2714
2629
|
} else {
|
|
2715
|
-
|
|
2630
|
+
t29 = $[40];
|
|
2716
2631
|
}
|
|
2717
|
-
let
|
|
2718
|
-
if ($[
|
|
2719
|
-
|
|
2720
|
-
className: styles$
|
|
2632
|
+
let t30;
|
|
2633
|
+
if ($[41] !== childCount || $[42] !== clone || $[43] !== showCount) {
|
|
2634
|
+
t30 = clone && showCount && childCount && childCount > 1 ? /*#__PURE__*/jsx("span", {
|
|
2635
|
+
className: styles$7.count,
|
|
2721
2636
|
children: childCount
|
|
2722
2637
|
}) : null;
|
|
2723
|
-
$[
|
|
2724
|
-
$[
|
|
2725
|
-
$[
|
|
2726
|
-
$[
|
|
2638
|
+
$[41] = childCount;
|
|
2639
|
+
$[42] = clone;
|
|
2640
|
+
$[43] = showCount;
|
|
2641
|
+
$[44] = t30;
|
|
2727
2642
|
} else {
|
|
2728
|
-
|
|
2643
|
+
t30 = $[44];
|
|
2729
2644
|
}
|
|
2730
|
-
let
|
|
2731
|
-
if ($[
|
|
2732
|
-
|
|
2733
|
-
className: styles$
|
|
2645
|
+
let t31;
|
|
2646
|
+
if ($[45] !== childCount || $[46] !== collapsed || $[47] !== onCollapse || $[48] !== showCollapsedCount) {
|
|
2647
|
+
t31 = showCollapsedCount && onCollapse && collapsed && childCount !== null && childCount > 0 ? /*#__PURE__*/jsx("span", {
|
|
2648
|
+
className: styles$7.collapsedCount,
|
|
2734
2649
|
children: childCount
|
|
2735
2650
|
}) : null;
|
|
2736
|
-
$[
|
|
2737
|
-
$[
|
|
2738
|
-
$[
|
|
2739
|
-
$[
|
|
2740
|
-
$[
|
|
2651
|
+
$[45] = childCount;
|
|
2652
|
+
$[46] = collapsed;
|
|
2653
|
+
$[47] = onCollapse;
|
|
2654
|
+
$[48] = showCollapsedCount;
|
|
2655
|
+
$[49] = t31;
|
|
2741
2656
|
} else {
|
|
2742
|
-
|
|
2657
|
+
t31 = $[49];
|
|
2743
2658
|
}
|
|
2744
|
-
let
|
|
2745
|
-
if ($[
|
|
2746
|
-
|
|
2659
|
+
let t32;
|
|
2660
|
+
if ($[50] !== collapsed || $[51] !== depth || $[52] !== onCollapse) {
|
|
2661
|
+
t32 = onCollapse && depth === 0 ? /*#__PURE__*/jsx("button", {
|
|
2747
2662
|
type: "button",
|
|
2748
2663
|
onClick: onCollapse,
|
|
2749
|
-
className: classNames(styles$
|
|
2664
|
+
className: classNames(styles$7.button, styles$7.collapse, collapsed && styles$7.collapsed),
|
|
2750
2665
|
children: /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
2751
2666
|
icon: faAngleDown
|
|
2752
2667
|
})
|
|
2753
2668
|
}) : null;
|
|
2754
|
-
$[
|
|
2755
|
-
$[
|
|
2756
|
-
$[
|
|
2757
|
-
$[
|
|
2669
|
+
$[50] = collapsed;
|
|
2670
|
+
$[51] = depth;
|
|
2671
|
+
$[52] = onCollapse;
|
|
2672
|
+
$[53] = t32;
|
|
2758
2673
|
} else {
|
|
2759
|
-
|
|
2674
|
+
t32 = $[53];
|
|
2760
2675
|
}
|
|
2761
|
-
let
|
|
2762
|
-
if ($[
|
|
2763
|
-
|
|
2764
|
-
className: styles$
|
|
2676
|
+
let t33;
|
|
2677
|
+
if ($[54] !== children) {
|
|
2678
|
+
t33 = /*#__PURE__*/jsx("div", {
|
|
2679
|
+
className: styles$7.children,
|
|
2765
2680
|
children: children
|
|
2766
2681
|
});
|
|
2767
|
-
$[
|
|
2768
|
-
$[
|
|
2682
|
+
$[54] = children;
|
|
2683
|
+
$[55] = t33;
|
|
2769
2684
|
} else {
|
|
2770
|
-
|
|
2685
|
+
t33 = $[55];
|
|
2771
2686
|
}
|
|
2772
|
-
let
|
|
2773
|
-
if ($[
|
|
2774
|
-
|
|
2775
|
-
className: styles$
|
|
2687
|
+
let t34;
|
|
2688
|
+
if ($[56] !== containerRef || $[57] !== style || $[58] !== t28 || $[59] !== t29 || $[60] !== t30 || $[61] !== t31 || $[62] !== t32 || $[63] !== t33) {
|
|
2689
|
+
t34 = /*#__PURE__*/jsxs("div", {
|
|
2690
|
+
className: styles$7.inner,
|
|
2776
2691
|
ref: containerRef,
|
|
2777
2692
|
style: style,
|
|
2778
|
-
children: [
|
|
2693
|
+
children: [t28, t29, t30, t31, t32, t33]
|
|
2779
2694
|
});
|
|
2780
|
-
$[
|
|
2781
|
-
$[
|
|
2782
|
-
$[57] = t27;
|
|
2695
|
+
$[56] = containerRef;
|
|
2696
|
+
$[57] = style;
|
|
2783
2697
|
$[58] = t28;
|
|
2784
2698
|
$[59] = t29;
|
|
2785
2699
|
$[60] = t30;
|
|
2786
2700
|
$[61] = t31;
|
|
2787
2701
|
$[62] = t32;
|
|
2788
2702
|
$[63] = t33;
|
|
2703
|
+
$[64] = t34;
|
|
2789
2704
|
} else {
|
|
2790
|
-
|
|
2705
|
+
t34 = $[64];
|
|
2791
2706
|
}
|
|
2792
|
-
let
|
|
2793
|
-
if ($[
|
|
2794
|
-
|
|
2795
|
-
className:
|
|
2707
|
+
let t35;
|
|
2708
|
+
if ($[65] !== props || $[66] !== t22 || $[67] !== t25 || $[68] !== t34 || $[69] !== wrapperRef) {
|
|
2709
|
+
t35 = /*#__PURE__*/jsx("div", {
|
|
2710
|
+
className: t22,
|
|
2796
2711
|
ref: wrapperRef,
|
|
2797
|
-
style:
|
|
2712
|
+
style: t25,
|
|
2798
2713
|
...props,
|
|
2799
|
-
children:
|
|
2714
|
+
children: t34
|
|
2800
2715
|
});
|
|
2801
|
-
$[
|
|
2802
|
-
$[
|
|
2803
|
-
$[
|
|
2804
|
-
$[
|
|
2805
|
-
$[
|
|
2806
|
-
$[
|
|
2716
|
+
$[65] = props;
|
|
2717
|
+
$[66] = t22;
|
|
2718
|
+
$[67] = t25;
|
|
2719
|
+
$[68] = t34;
|
|
2720
|
+
$[69] = wrapperRef;
|
|
2721
|
+
$[70] = t35;
|
|
2807
2722
|
} else {
|
|
2808
|
-
|
|
2723
|
+
t35 = $[70];
|
|
2809
2724
|
}
|
|
2810
|
-
return
|
|
2725
|
+
return t35;
|
|
2811
2726
|
};
|
|
2812
2727
|
|
|
2813
|
-
var styles$
|
|
2728
|
+
var styles$6 = {"container":"micromag-editor-sortable-sortable-tree-item-container","parent":"micromag-editor-sortable-sortable-tree-item-parent","child":"micromag-editor-sortable-sortable-tree-item-child"};
|
|
2814
2729
|
|
|
2815
2730
|
const animateLayoutChanges = ({
|
|
2816
2731
|
isSorting,
|
|
@@ -2982,7 +2897,7 @@ function SortableTreeItem(t0) {
|
|
|
2982
2897
|
const cancellingPointerUp = t17;
|
|
2983
2898
|
let t18;
|
|
2984
2899
|
if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2985
|
-
t18 = classNames([styles$
|
|
2900
|
+
t18 = classNames([styles$6.container]);
|
|
2986
2901
|
$[30] = t18;
|
|
2987
2902
|
} else {
|
|
2988
2903
|
t18 = $[30];
|
|
@@ -3006,7 +2921,7 @@ function SortableTreeItem(t0) {
|
|
|
3006
2921
|
let t20;
|
|
3007
2922
|
if ($[36] !== Component || $[37] !== value) {
|
|
3008
2923
|
t20 = Component !== null ? /*#__PURE__*/jsx("div", {
|
|
3009
|
-
className: styles$
|
|
2924
|
+
className: styles$6.parent,
|
|
3010
2925
|
children: /*#__PURE__*/jsx(Component, {
|
|
3011
2926
|
...value
|
|
3012
2927
|
})
|
|
@@ -3020,7 +2935,7 @@ function SortableTreeItem(t0) {
|
|
|
3020
2935
|
let t21;
|
|
3021
2936
|
if ($[39] !== Component || $[40] !== childValue) {
|
|
3022
2937
|
t21 = childValue !== null ? /*#__PURE__*/jsx("div", {
|
|
3023
|
-
className: styles$
|
|
2938
|
+
className: styles$6.child,
|
|
3024
2939
|
children: /*#__PURE__*/jsx(Component, {
|
|
3025
2940
|
...childValue
|
|
3026
2941
|
})
|
|
@@ -3069,7 +2984,7 @@ function SortableTreeItem(t0) {
|
|
|
3069
2984
|
return t22;
|
|
3070
2985
|
}
|
|
3071
2986
|
|
|
3072
|
-
var styles$
|
|
2987
|
+
var styles$5 = {"item":"micromag-editor-sortable-sortable-tree-item","parent":"micromag-editor-sortable-sortable-tree-parent","group":"micromag-editor-sortable-sortable-tree-group","isLastChild":"micromag-editor-sortable-sortable-tree-isLastChild"};
|
|
3073
2988
|
|
|
3074
2989
|
const initialItems = [{
|
|
3075
2990
|
id: 'Home',
|
|
@@ -3378,10 +3293,11 @@ function SortableTree({
|
|
|
3378
3293
|
parentId: parentId_1 = null
|
|
3379
3294
|
}) => parentId_1 === id_16) : null;
|
|
3380
3295
|
return /*#__PURE__*/jsx("div", {
|
|
3381
|
-
className: classNames([styles$
|
|
3382
|
-
[styles$
|
|
3383
|
-
[styles$
|
|
3384
|
-
|
|
3296
|
+
className: classNames([styles$5.item, 'pb-2', {
|
|
3297
|
+
[styles$5.parent]: onCollapse !== null && !collapsed_1,
|
|
3298
|
+
[styles$5.group]: depth_0 === 1,
|
|
3299
|
+
'bg-body-secondary': depth_0 === 1,
|
|
3300
|
+
[styles$5.isLastChild]: next === null
|
|
3385
3301
|
}]),
|
|
3386
3302
|
children: /*#__PURE__*/jsx(SortableTreeItem, {
|
|
3387
3303
|
id: id_16,
|
|
@@ -3403,7 +3319,7 @@ function SortableTree({
|
|
|
3403
3319
|
dropAnimation: dropAnimation,
|
|
3404
3320
|
modifiers: indicator ? [adjustTranslate] : undefined,
|
|
3405
3321
|
children: activeId && activeItem ? /*#__PURE__*/jsx("div", {
|
|
3406
|
-
className: styles$
|
|
3322
|
+
className: styles$5.item,
|
|
3407
3323
|
children: /*#__PURE__*/jsx(SortableTreeItem, {
|
|
3408
3324
|
id: activeId,
|
|
3409
3325
|
depth: activeItem.depth,
|
|
@@ -3423,7 +3339,7 @@ function SortableTree({
|
|
|
3423
3339
|
});
|
|
3424
3340
|
}
|
|
3425
3341
|
|
|
3426
|
-
var styles$
|
|
3342
|
+
var styles$4 = {"items":"micromag-editor-menus-screens-items","item":"micromag-editor-menus-screens-item","container":"micromag-editor-menus-screens-container","settings":"micromag-editor-menus-screens-settings","noWrap":"micromag-editor-menus-screens-noWrap","isVertical":"micromag-editor-menus-screens-isVertical","withPlaceholder":"micromag-editor-menus-screens-withPlaceholder"};
|
|
3427
3343
|
|
|
3428
3344
|
const emptyArray = [];
|
|
3429
3345
|
function ScreensMenu(t0) {
|
|
@@ -3476,7 +3392,7 @@ function ScreensMenu(t0) {
|
|
|
3476
3392
|
const itemCustomClassName = t18 === undefined ? null : t18;
|
|
3477
3393
|
const onClick = t19 === undefined ? null : t19;
|
|
3478
3394
|
return /*#__PURE__*/jsxs("li", {
|
|
3479
|
-
className: classNames([styles$
|
|
3395
|
+
className: classNames([styles$4.item, itemCustomClassName, itemClassName, {}]),
|
|
3480
3396
|
"data-screen-id": item.id,
|
|
3481
3397
|
children: [/*#__PURE__*/jsx(ScreenWithPreview, {
|
|
3482
3398
|
index: index,
|
|
@@ -3494,7 +3410,7 @@ function ScreensMenu(t0) {
|
|
|
3494
3410
|
onClick: onClick,
|
|
3495
3411
|
onClickItem: onClickItem
|
|
3496
3412
|
}), settings !== null ? /*#__PURE__*/jsx("div", {
|
|
3497
|
-
className: classNames([settingsClassName, styles$
|
|
3413
|
+
className: classNames([settingsClassName, styles$4.settings, "p-2"]),
|
|
3498
3414
|
children: isFunction(settings) ? settings(index) : settings
|
|
3499
3415
|
}) : null]
|
|
3500
3416
|
}, item.id);
|
|
@@ -3526,11 +3442,11 @@ function ScreensMenu(t0) {
|
|
|
3526
3442
|
const sortableItems = t17;
|
|
3527
3443
|
let t18;
|
|
3528
3444
|
if ($[14] !== className || $[15] !== isTree || $[16] !== isVertical || $[17] !== noWrap || $[18] !== withPlaceholder) {
|
|
3529
|
-
t18 = classNames([styles$
|
|
3530
|
-
[styles$
|
|
3531
|
-
[styles$
|
|
3532
|
-
[styles$
|
|
3533
|
-
[styles$
|
|
3445
|
+
t18 = classNames([styles$4.container, className, {
|
|
3446
|
+
[styles$4.noWrap]: noWrap,
|
|
3447
|
+
[styles$4.isVertical]: isVertical,
|
|
3448
|
+
[styles$4.isTree]: isTree,
|
|
3449
|
+
[styles$4.withPlaceholder]: withPlaceholder
|
|
3534
3450
|
}]);
|
|
3535
3451
|
$[14] = className;
|
|
3536
3452
|
$[15] = isTree;
|
|
@@ -3567,7 +3483,7 @@ function ScreensMenu(t0) {
|
|
|
3567
3483
|
delayOnTouchStart: true,
|
|
3568
3484
|
delay: 2,
|
|
3569
3485
|
tag: "ul",
|
|
3570
|
-
className: styles$
|
|
3486
|
+
className: styles$4.items,
|
|
3571
3487
|
children: itemsElements
|
|
3572
3488
|
}) : null;
|
|
3573
3489
|
$[26] = isTree;
|
|
@@ -3583,7 +3499,7 @@ function ScreensMenu(t0) {
|
|
|
3583
3499
|
let t21;
|
|
3584
3500
|
if ($[33] !== isTree || $[34] !== items.length || $[35] !== itemsElements || $[36] !== sortable) {
|
|
3585
3501
|
t21 = !isTree && (!sortable || items.length < 1) ? /*#__PURE__*/jsx("ul", {
|
|
3586
|
-
className: styles$
|
|
3502
|
+
className: styles$4.items,
|
|
3587
3503
|
children: itemsElements
|
|
3588
3504
|
}) : null;
|
|
3589
3505
|
$[33] = isTree;
|
|
@@ -3649,9 +3565,8 @@ function _temp$2(t0) {
|
|
|
3649
3565
|
};
|
|
3650
3566
|
}
|
|
3651
3567
|
|
|
3652
|
-
var styles$
|
|
3568
|
+
var styles$3 = {"container":"micromag-editor-menus-screen-types-container","row":"micromag-editor-menus-screen-types-row","screen":"micromag-editor-menus-screen-types-screen"};
|
|
3653
3569
|
|
|
3654
|
-
/* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
|
|
3655
3570
|
function ScreenTypes({
|
|
3656
3571
|
screens = null,
|
|
3657
3572
|
selectedTypes = null,
|
|
@@ -3704,9 +3619,9 @@ function ScreenTypes({
|
|
|
3704
3619
|
screen: definition,
|
|
3705
3620
|
title,
|
|
3706
3621
|
className: classNames({
|
|
3707
|
-
'bg-
|
|
3622
|
+
'bg-body': !selected,
|
|
3708
3623
|
'bg-primary': selected,
|
|
3709
|
-
[styles$
|
|
3624
|
+
[styles$3.selected]: selected
|
|
3710
3625
|
})
|
|
3711
3626
|
};
|
|
3712
3627
|
return groupIndex !== -1 ? [...allGroups.slice(0, groupIndex), {
|
|
@@ -3722,30 +3637,30 @@ function ScreenTypes({
|
|
|
3722
3637
|
return orderBy(groupItems, ['order', 'name'], ['asc', 'asc']);
|
|
3723
3638
|
}, [finalDefinitions, selectedTypes]);
|
|
3724
3639
|
return /*#__PURE__*/jsx("div", {
|
|
3725
|
-
className: classNames([styles$
|
|
3640
|
+
className: classNames([styles$3.container, className]),
|
|
3726
3641
|
children: /*#__PURE__*/jsx("div", {
|
|
3727
|
-
className: styles$
|
|
3642
|
+
className: styles$3.rows,
|
|
3728
3643
|
children: groups.map(({
|
|
3729
3644
|
id: id_1,
|
|
3730
3645
|
name,
|
|
3731
3646
|
items
|
|
3732
3647
|
}) => /*#__PURE__*/jsxs("div", {
|
|
3733
|
-
className: styles$
|
|
3648
|
+
className: styles$3.row,
|
|
3734
3649
|
children: [/*#__PURE__*/jsx(Label, {
|
|
3735
3650
|
children: name
|
|
3736
3651
|
}), /*#__PURE__*/jsx("div", {
|
|
3737
|
-
className: styles$
|
|
3652
|
+
className: styles$3.layouts,
|
|
3738
3653
|
children: /*#__PURE__*/jsx(ScreensMenu, {
|
|
3739
3654
|
items: items,
|
|
3740
3655
|
withPlaceholder: true,
|
|
3741
3656
|
withName: true,
|
|
3742
|
-
itemClassName: classNames([styles$
|
|
3657
|
+
itemClassName: classNames([styles$3.screen, 'border', 'rounded', {
|
|
3743
3658
|
'border-secondary': selectedTypes === null,
|
|
3744
|
-
|
|
3659
|
+
border: selectedTypes !== null,
|
|
3745
3660
|
'bg-secondary': selectedTypes === null,
|
|
3746
3661
|
'text-secondary': selectedTypes !== null
|
|
3747
3662
|
}]),
|
|
3748
|
-
buttonClassName: styles$
|
|
3663
|
+
buttonClassName: styles$3.button,
|
|
3749
3664
|
onClickItem: onClickItem
|
|
3750
3665
|
})
|
|
3751
3666
|
})]
|
|
@@ -3754,63 +3669,66 @@ function ScreenTypes({
|
|
|
3754
3669
|
});
|
|
3755
3670
|
}
|
|
3756
3671
|
|
|
3757
|
-
var styles$3 = {"container":"micromag-editor-modals-screen-types-container"};
|
|
3758
|
-
|
|
3759
3672
|
function ScreenTypesModal(t0) {
|
|
3760
3673
|
const $ = c(10);
|
|
3761
3674
|
const {
|
|
3762
3675
|
selectedTypes: t1,
|
|
3763
3676
|
className: t2,
|
|
3764
|
-
|
|
3677
|
+
onClosed: t3,
|
|
3765
3678
|
onClickScreenType: t4
|
|
3766
3679
|
} = t0;
|
|
3767
3680
|
const selectedTypes = t1 === undefined ? null : t1;
|
|
3768
3681
|
const className = t2 === undefined ? null : t2;
|
|
3769
|
-
const
|
|
3682
|
+
const onClosed = t3 === undefined ? null : t3;
|
|
3770
3683
|
const onClickScreenType = t4 === undefined ? null : t4;
|
|
3684
|
+
const [opened, setOpened] = useState(true);
|
|
3771
3685
|
let t5;
|
|
3772
3686
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3773
|
-
t5 =
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
});
|
|
3687
|
+
t5 = () => {
|
|
3688
|
+
setOpened(false);
|
|
3689
|
+
};
|
|
3777
3690
|
$[0] = t5;
|
|
3778
3691
|
} else {
|
|
3779
3692
|
t5 = $[0];
|
|
3780
3693
|
}
|
|
3694
|
+
const requestClose = t5;
|
|
3781
3695
|
let t6;
|
|
3782
|
-
if ($[1]
|
|
3783
|
-
t6 =
|
|
3784
|
-
|
|
3785
|
-
|
|
3696
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3697
|
+
t6 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
3698
|
+
id: "QBaiO0",
|
|
3699
|
+
defaultMessage: "Add a screen"
|
|
3700
|
+
});
|
|
3701
|
+
$[1] = t6;
|
|
3786
3702
|
} else {
|
|
3787
|
-
t6 = $[
|
|
3703
|
+
t6 = $[1];
|
|
3788
3704
|
}
|
|
3789
3705
|
let t7;
|
|
3790
|
-
if ($[
|
|
3706
|
+
if ($[2] !== onClickScreenType || $[3] !== selectedTypes) {
|
|
3791
3707
|
t7 = /*#__PURE__*/jsx(ScreenTypes, {
|
|
3792
3708
|
selectedTypes: selectedTypes,
|
|
3793
|
-
className: styles$3.menu,
|
|
3794
3709
|
onClickItem: onClickScreenType
|
|
3795
3710
|
});
|
|
3796
|
-
$[
|
|
3797
|
-
$[
|
|
3798
|
-
$[
|
|
3711
|
+
$[2] = onClickScreenType;
|
|
3712
|
+
$[3] = selectedTypes;
|
|
3713
|
+
$[4] = t7;
|
|
3799
3714
|
} else {
|
|
3800
|
-
t7 = $[
|
|
3715
|
+
t7 = $[4];
|
|
3801
3716
|
}
|
|
3802
3717
|
let t8;
|
|
3803
|
-
if ($[6] !==
|
|
3804
|
-
t8 = /*#__PURE__*/jsx(
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3718
|
+
if ($[5] !== className || $[6] !== onClosed || $[7] !== opened || $[8] !== t7) {
|
|
3719
|
+
t8 = /*#__PURE__*/jsx(Dialog, {
|
|
3720
|
+
id: "screen-types",
|
|
3721
|
+
title: t6,
|
|
3722
|
+
size: "lg",
|
|
3723
|
+
visible: opened,
|
|
3724
|
+
requestClose: requestClose,
|
|
3725
|
+
onClosed: onClosed,
|
|
3726
|
+
className: className,
|
|
3727
|
+
children: t7
|
|
3811
3728
|
});
|
|
3812
|
-
$[
|
|
3813
|
-
$[
|
|
3729
|
+
$[5] = className;
|
|
3730
|
+
$[6] = onClosed;
|
|
3731
|
+
$[7] = opened;
|
|
3814
3732
|
$[8] = t7;
|
|
3815
3733
|
$[9] = t8;
|
|
3816
3734
|
} else {
|
|
@@ -3945,14 +3863,14 @@ function EditorScreens({
|
|
|
3945
3863
|
onClickScreen(currentScreen);
|
|
3946
3864
|
}, [screens, isTheme, createScreenFromDefinition, push, onClickScreen]);
|
|
3947
3865
|
const onClickAdd = useCallback(() => setCreateModalOpened(true), [setCreateModalOpened]);
|
|
3948
|
-
const
|
|
3866
|
+
const onCreateModalClosed = useCallback(() => setCreateModalOpened(false), [setCreateModalOpened]);
|
|
3949
3867
|
return /*#__PURE__*/jsxs("div", {
|
|
3950
3868
|
className: classNames(['d-flex', 'flex-column', styles$2.container, className]),
|
|
3951
3869
|
children: [/*#__PURE__*/jsxs(Navbar, {
|
|
3952
3870
|
compact: true,
|
|
3953
3871
|
noWrap: true,
|
|
3954
3872
|
withoutCollapse: true,
|
|
3955
|
-
className: classNames(['sticky-top', styles$2.navbar]),
|
|
3873
|
+
className: classNames(['sticky-top', 'border-bottom', styles$2.navbar]),
|
|
3956
3874
|
children: [/*#__PURE__*/jsx("strong", {
|
|
3957
3875
|
className: "mb-0 me-auto",
|
|
3958
3876
|
children: /*#__PURE__*/jsx(FormattedMessage, {
|
|
@@ -4036,7 +3954,7 @@ function EditorScreens({
|
|
|
4036
3954
|
type: type_0
|
|
4037
3955
|
}) => type_0) : [],
|
|
4038
3956
|
onClickScreenType: onClickScreenType,
|
|
4039
|
-
|
|
3957
|
+
onClosed: onCreateModalClosed
|
|
4040
3958
|
}) : null]
|
|
4041
3959
|
});
|
|
4042
3960
|
}
|
|
@@ -4263,7 +4181,7 @@ function Editor(t0) {
|
|
|
4263
4181
|
useEffect(t26, t27);
|
|
4264
4182
|
let t28;
|
|
4265
4183
|
if ($[30] !== className || $[31] !== fullscreen || $[32] !== screenSize) {
|
|
4266
|
-
t28 = classNames([styles$1.container, screenSize !== null ? screenSize.screens.map(_temp$1) : null, className, {
|
|
4184
|
+
t28 = classNames([styles$1.container, "bg-body-tertiary", "text-body", screenSize !== null ? screenSize.screens.map(_temp$1) : null, className, {
|
|
4267
4185
|
[styles$1.fullscreen]: fullscreen
|
|
4268
4186
|
}]);
|
|
4269
4187
|
$[30] = className;
|
|
@@ -4321,7 +4239,6 @@ function Editor(t0) {
|
|
|
4321
4239
|
let t32;
|
|
4322
4240
|
if ($[39] !== t29 || $[40] !== t30 || $[41] !== t31) {
|
|
4323
4241
|
t32 = /*#__PURE__*/jsxs(Navbar, {
|
|
4324
|
-
theme: "light",
|
|
4325
4242
|
compact: true,
|
|
4326
4243
|
noWrap: true,
|
|
4327
4244
|
withoutCollapse: true,
|
|
@@ -4386,7 +4303,7 @@ function Editor(t0) {
|
|
|
4386
4303
|
const t38 = !isMobile || mobileView === "preview";
|
|
4387
4304
|
let t39;
|
|
4388
4305
|
if ($[55] !== t38) {
|
|
4389
|
-
t39 = classNames([styles$1.center, {
|
|
4306
|
+
t39 = classNames([styles$1.center, "bg-body-secondary", {
|
|
4390
4307
|
[styles$1.visible]: t38
|
|
4391
4308
|
}]);
|
|
4392
4309
|
$[55] = t38;
|