@micromag/core 0.3.111 → 0.3.117
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/es/components.js +178 -115
- package/es/hooks.js +25 -2
- package/es/index.js +2 -0
- package/es/utils.js +138 -1
- package/lib/components.js +195 -113
- package/lib/hooks.js +24 -0
- package/lib/index.js +2 -0
- package/lib/utils.js +140 -0
- package/package.json +2 -2
package/es/components.js
CHANGED
|
@@ -2,7 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import PropTypes$1 from 'prop-types';
|
|
5
|
-
import React, { useCallback, useState, useEffect, useRef, useMemo } from 'react';
|
|
5
|
+
import React, { useCallback, useState, useEffect, useRef, useMemo, Suspense } from 'react';
|
|
6
6
|
import { Link as Link$1 } from 'react-router-dom';
|
|
7
7
|
import { PropTypes } from '@micromag/core';
|
|
8
8
|
import { FormattedMessage, defineMessages, FormattedDate, FormattedTime } from 'react-intl';
|
|
@@ -16,7 +16,6 @@ import { useForm, useDocumentEvent, useIntersectionObserver, useResizeObserver }
|
|
|
16
16
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
17
17
|
import get from 'lodash/get';
|
|
18
18
|
import ReactDOM from 'react-dom';
|
|
19
|
-
import { DashboardModal } from '@uppy/react';
|
|
20
19
|
import isArray from 'lodash/isArray';
|
|
21
20
|
import { faAngleDown } from '@fortawesome/free-solid-svg-icons/faAngleDown';
|
|
22
21
|
import { faAngleUp } from '@fortawesome/free-solid-svg-icons/faAngleUp';
|
|
@@ -46,13 +45,13 @@ import { animated } from '@react-spring/web';
|
|
|
46
45
|
var styles$v = {"container":"micromag-core-buttons-button-container","asLink":"micromag-core-buttons-button-asLink","withoutStyle":"micromag-core-buttons-button-withoutStyle","icon":"micromag-core-buttons-button-icon","withIcon":"micromag-core-buttons-button-withIcon","label":"micromag-core-buttons-button-label","right":"micromag-core-buttons-button-right","withIconColumns":"micromag-core-buttons-button-withIconColumns","linkDisabled":"micromag-core-buttons-button-linkDisabled"};
|
|
47
46
|
|
|
48
47
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
49
|
-
var propTypes$
|
|
48
|
+
var propTypes$L = {
|
|
50
49
|
children: PropTypes.label.isRequired,
|
|
51
50
|
isHtml: PropTypes$1.bool,
|
|
52
51
|
values: PropTypes$1.object // eslint-disable-line react/forbid-prop-types
|
|
53
52
|
|
|
54
53
|
};
|
|
55
|
-
var defaultProps$
|
|
54
|
+
var defaultProps$L = {
|
|
56
55
|
isHtml: false,
|
|
57
56
|
values: {}
|
|
58
57
|
};
|
|
@@ -67,11 +66,11 @@ var Label = function Label(_ref) {
|
|
|
67
66
|
}, children)) : children;
|
|
68
67
|
};
|
|
69
68
|
|
|
70
|
-
Label.propTypes = propTypes$
|
|
71
|
-
Label.defaultProps = defaultProps$
|
|
69
|
+
Label.propTypes = propTypes$L;
|
|
70
|
+
Label.defaultProps = defaultProps$L;
|
|
72
71
|
|
|
73
72
|
var _excluded$a = ["type", "theme", "size", "href", "external", "direct", "target", "label", "children", "focusable", "active", "icon", "iconPosition", "disabled", "loading", "disableOnLoading", "small", "big", "withShadow", "withoutStyle", "withoutTheme", "asLink", "outline", "onClick", "className", "iconClassName", "labelClassName", "refButton"];
|
|
74
|
-
var propTypes$
|
|
73
|
+
var propTypes$K = {
|
|
75
74
|
type: PropTypes$1.string,
|
|
76
75
|
theme: PropTypes.buttonTheme,
|
|
77
76
|
size: PropTypes.buttonSize,
|
|
@@ -104,7 +103,7 @@ var propTypes$J = {
|
|
|
104
103
|
|
|
105
104
|
})])
|
|
106
105
|
};
|
|
107
|
-
var defaultProps$
|
|
106
|
+
var defaultProps$K = {
|
|
108
107
|
type: 'button',
|
|
109
108
|
theme: null,
|
|
110
109
|
size: null,
|
|
@@ -220,13 +219,13 @@ var Button$1 = function Button(_ref) {
|
|
|
220
219
|
}), content);
|
|
221
220
|
};
|
|
222
221
|
|
|
223
|
-
Button$1.propTypes = propTypes$
|
|
224
|
-
Button$1.defaultProps = defaultProps$
|
|
222
|
+
Button$1.propTypes = propTypes$K;
|
|
223
|
+
Button$1.defaultProps = defaultProps$K;
|
|
225
224
|
|
|
226
225
|
var styles$u = {};
|
|
227
226
|
|
|
228
227
|
var _excluded$9 = ["className", "onClick", "theme"];
|
|
229
|
-
var propTypes$
|
|
228
|
+
var propTypes$J = {
|
|
230
229
|
buttons: PropTypes.buttons,
|
|
231
230
|
size: PropTypes.buttonSize,
|
|
232
231
|
theme: PropTypes.buttonTheme,
|
|
@@ -235,7 +234,7 @@ var propTypes$I = {
|
|
|
235
234
|
className: PropTypes$1.string,
|
|
236
235
|
buttonClassName: PropTypes$1.string
|
|
237
236
|
};
|
|
238
|
-
var defaultProps$
|
|
237
|
+
var defaultProps$J = {
|
|
239
238
|
buttons: [],
|
|
240
239
|
size: null,
|
|
241
240
|
theme: undefined,
|
|
@@ -285,14 +284,14 @@ var Buttons = function Buttons(_ref) {
|
|
|
285
284
|
}));
|
|
286
285
|
};
|
|
287
286
|
|
|
288
|
-
Buttons.propTypes = propTypes$
|
|
289
|
-
Buttons.defaultProps = defaultProps$
|
|
287
|
+
Buttons.propTypes = propTypes$J;
|
|
288
|
+
Buttons.defaultProps = defaultProps$J;
|
|
290
289
|
|
|
291
290
|
var _excluded$8 = ["className"];
|
|
292
|
-
var propTypes$
|
|
291
|
+
var propTypes$I = {
|
|
293
292
|
className: PropTypes$1.string
|
|
294
293
|
};
|
|
295
|
-
var defaultProps$
|
|
294
|
+
var defaultProps$I = {
|
|
296
295
|
className: null
|
|
297
296
|
};
|
|
298
297
|
|
|
@@ -310,14 +309,14 @@ var BackButton = function BackButton(_ref) {
|
|
|
310
309
|
}, props));
|
|
311
310
|
};
|
|
312
311
|
|
|
313
|
-
BackButton.propTypes = propTypes$
|
|
314
|
-
BackButton.defaultProps = defaultProps$
|
|
312
|
+
BackButton.propTypes = propTypes$I;
|
|
313
|
+
BackButton.defaultProps = defaultProps$I;
|
|
315
314
|
|
|
316
315
|
var styles$t = {"actions":"micromag-core-forms-form-actions","left":"micromag-core-forms-form-left","right":"micromag-core-forms-form-right"};
|
|
317
316
|
|
|
318
317
|
var _excluded$7 = ["type"],
|
|
319
318
|
_excluded2 = ["component", "id", "settings"];
|
|
320
|
-
var propTypes$
|
|
319
|
+
var propTypes$H = {
|
|
321
320
|
name: PropTypes$1.string,
|
|
322
321
|
// .isRequired,
|
|
323
322
|
value: PropTypes.component,
|
|
@@ -331,7 +330,7 @@ var propTypes$G = {
|
|
|
331
330
|
fieldContext: PropTypes$1.any // eslint-disable-line react/forbid-prop-types
|
|
332
331
|
|
|
333
332
|
};
|
|
334
|
-
var defaultProps$
|
|
333
|
+
var defaultProps$H = {
|
|
335
334
|
name: null,
|
|
336
335
|
form: null,
|
|
337
336
|
formComponents: {},
|
|
@@ -418,10 +417,10 @@ var FieldForm = function FieldForm(_ref) {
|
|
|
418
417
|
}, formProps))) : null;
|
|
419
418
|
};
|
|
420
419
|
|
|
421
|
-
FieldForm.propTypes = propTypes$
|
|
422
|
-
FieldForm.defaultProps = defaultProps$
|
|
420
|
+
FieldForm.propTypes = propTypes$H;
|
|
421
|
+
FieldForm.defaultProps = defaultProps$H;
|
|
423
422
|
|
|
424
|
-
var propTypes$
|
|
423
|
+
var propTypes$G = {
|
|
425
424
|
action: PropTypes$1.string.isRequired,
|
|
426
425
|
method: PropTypes$1.string,
|
|
427
426
|
fields: PropTypes.formFields,
|
|
@@ -448,7 +447,7 @@ var propTypes$F = {
|
|
|
448
447
|
actionsClassName: PropTypes$1.string,
|
|
449
448
|
cancelClassName: PropTypes$1.string
|
|
450
449
|
};
|
|
451
|
-
var defaultProps$
|
|
450
|
+
var defaultProps$G = {
|
|
452
451
|
method: 'POST',
|
|
453
452
|
fields: [],
|
|
454
453
|
initialValue: null,
|
|
@@ -662,13 +661,13 @@ var Form = function Form(_ref) {
|
|
|
662
661
|
})) : null) : null);
|
|
663
662
|
};
|
|
664
663
|
|
|
665
|
-
Form.propTypes = propTypes$
|
|
666
|
-
Form.defaultProps = defaultProps$
|
|
664
|
+
Form.propTypes = propTypes$G;
|
|
665
|
+
Form.defaultProps = defaultProps$G;
|
|
667
666
|
|
|
668
667
|
var styles$s = {"withoutStyle":"micromag-core-partials-link-withoutStyle"};
|
|
669
668
|
|
|
670
669
|
var _excluded$6 = ["href", "external", "children", "target", "rel", "className", "withoutStyle"];
|
|
671
|
-
var propTypes$
|
|
670
|
+
var propTypes$F = {
|
|
672
671
|
href: PropTypes$1.string,
|
|
673
672
|
external: PropTypes$1.bool,
|
|
674
673
|
target: PropTypes$1.string,
|
|
@@ -677,7 +676,7 @@ var propTypes$E = {
|
|
|
677
676
|
withoutStyle: PropTypes$1.bool,
|
|
678
677
|
className: PropTypes$1.string
|
|
679
678
|
};
|
|
680
|
-
var defaultProps$
|
|
679
|
+
var defaultProps$F = {
|
|
681
680
|
href: '',
|
|
682
681
|
external: false,
|
|
683
682
|
target: '_blank',
|
|
@@ -708,11 +707,11 @@ var Link = function Link(_ref) {
|
|
|
708
707
|
}, props), /*#__PURE__*/React.createElement(Label, null, children));
|
|
709
708
|
};
|
|
710
709
|
|
|
711
|
-
Link.propTypes = propTypes$
|
|
712
|
-
Link.defaultProps = defaultProps$
|
|
710
|
+
Link.propTypes = propTypes$F;
|
|
711
|
+
Link.defaultProps = defaultProps$F;
|
|
713
712
|
|
|
714
713
|
var _excluded$5 = ["label", "className"];
|
|
715
|
-
var propTypes$
|
|
714
|
+
var propTypes$E = {
|
|
716
715
|
href: PropTypes$1.string,
|
|
717
716
|
header: PropTypes$1.node,
|
|
718
717
|
image: PropTypes$1.node,
|
|
@@ -741,7 +740,7 @@ var propTypes$D = {
|
|
|
741
740
|
onClickBody: PropTypes$1.func,
|
|
742
741
|
onClickFooter: PropTypes$1.func
|
|
743
742
|
};
|
|
744
|
-
var defaultProps$
|
|
743
|
+
var defaultProps$E = {
|
|
745
744
|
href: null,
|
|
746
745
|
header: null,
|
|
747
746
|
image: null,
|
|
@@ -862,15 +861,15 @@ var Card = function Card(_ref) {
|
|
|
862
861
|
}, cardInner);
|
|
863
862
|
};
|
|
864
863
|
|
|
865
|
-
Card.propTypes = propTypes$
|
|
866
|
-
Card.defaultProps = defaultProps$
|
|
864
|
+
Card.propTypes = propTypes$E;
|
|
865
|
+
Card.defaultProps = defaultProps$E;
|
|
867
866
|
|
|
868
|
-
var propTypes$
|
|
867
|
+
var propTypes$D = {
|
|
869
868
|
animated: PropTypes$1.bool,
|
|
870
869
|
color: PropTypes$1.string,
|
|
871
870
|
className: PropTypes$1.string
|
|
872
871
|
};
|
|
873
|
-
var defaultProps$
|
|
872
|
+
var defaultProps$D = {
|
|
874
873
|
animated: true,
|
|
875
874
|
color: 'currentColor',
|
|
876
875
|
className: null
|
|
@@ -935,19 +934,19 @@ var Spinner = function Spinner(_ref) {
|
|
|
935
934
|
}) : null))));
|
|
936
935
|
};
|
|
937
936
|
|
|
938
|
-
Spinner.propTypes = propTypes$
|
|
939
|
-
Spinner.defaultProps = defaultProps$
|
|
937
|
+
Spinner.propTypes = propTypes$D;
|
|
938
|
+
Spinner.defaultProps = defaultProps$D;
|
|
940
939
|
|
|
941
940
|
var styles$r = {};
|
|
942
941
|
|
|
943
942
|
var _excluded$4 = ["description", "loading", "children", "className"];
|
|
944
|
-
var propTypes$
|
|
943
|
+
var propTypes$C = {
|
|
945
944
|
description: PropTypes$1.node,
|
|
946
945
|
loading: PropTypes$1.bool,
|
|
947
946
|
children: PropTypes$1.node,
|
|
948
947
|
className: PropTypes$1.string
|
|
949
948
|
};
|
|
950
|
-
var defaultProps$
|
|
949
|
+
var defaultProps$C = {
|
|
951
950
|
description: null,
|
|
952
951
|
loading: false,
|
|
953
952
|
children: null,
|
|
@@ -966,12 +965,12 @@ var FormPanel = function FormPanel(_ref) {
|
|
|
966
965
|
}, props), description, loading ? /*#__PURE__*/React.createElement(Spinner, null) : children);
|
|
967
966
|
};
|
|
968
967
|
|
|
969
|
-
FormPanel.propTypes = propTypes$
|
|
970
|
-
FormPanel.defaultProps = defaultProps$
|
|
968
|
+
FormPanel.propTypes = propTypes$C;
|
|
969
|
+
FormPanel.defaultProps = defaultProps$C;
|
|
971
970
|
|
|
972
971
|
var styles$q = {"container":"micromag-core-menus-breadcrumb-container","arrow":"micromag-core-menus-breadcrumb-arrow"};
|
|
973
972
|
|
|
974
|
-
var propTypes$
|
|
973
|
+
var propTypes$B = {
|
|
975
974
|
items: PropTypes.menuItems,
|
|
976
975
|
theme: PropTypes.bootstrapThemes,
|
|
977
976
|
separator: PropTypes$1.oneOf([null, 'arrow']),
|
|
@@ -979,7 +978,7 @@ var propTypes$A = {
|
|
|
979
978
|
noWrap: PropTypes$1.bool,
|
|
980
979
|
className: PropTypes$1.string
|
|
981
980
|
};
|
|
982
|
-
var defaultProps$
|
|
981
|
+
var defaultProps$B = {
|
|
983
982
|
items: [],
|
|
984
983
|
theme: null,
|
|
985
984
|
separator: null,
|
|
@@ -1029,11 +1028,11 @@ var Breadcrumb = function Breadcrumb(_ref) {
|
|
|
1029
1028
|
})));
|
|
1030
1029
|
};
|
|
1031
1030
|
|
|
1032
|
-
Breadcrumb.propTypes = propTypes$
|
|
1033
|
-
Breadcrumb.defaultProps = defaultProps$
|
|
1031
|
+
Breadcrumb.propTypes = propTypes$B;
|
|
1032
|
+
Breadcrumb.defaultProps = defaultProps$B;
|
|
1034
1033
|
|
|
1035
1034
|
var _excluded$3 = ["type", "className", "label", "children", "onClick", "active"];
|
|
1036
|
-
var propTypes$
|
|
1035
|
+
var propTypes$A = {
|
|
1037
1036
|
items: PropTypes.menuItems,
|
|
1038
1037
|
children: PropTypes$1.node,
|
|
1039
1038
|
visible: PropTypes$1.bool,
|
|
@@ -1043,7 +1042,7 @@ var propTypes$z = {
|
|
|
1043
1042
|
onClickItem: PropTypes$1.func,
|
|
1044
1043
|
onClickOutside: PropTypes$1.func
|
|
1045
1044
|
};
|
|
1046
|
-
var defaultProps$
|
|
1045
|
+
var defaultProps$A = {
|
|
1047
1046
|
items: [],
|
|
1048
1047
|
children: null,
|
|
1049
1048
|
visible: false,
|
|
@@ -1141,11 +1140,11 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
1141
1140
|
}));
|
|
1142
1141
|
};
|
|
1143
1142
|
|
|
1144
|
-
Dropdown.propTypes = propTypes$
|
|
1145
|
-
Dropdown.defaultProps = defaultProps$
|
|
1143
|
+
Dropdown.propTypes = propTypes$A;
|
|
1144
|
+
Dropdown.defaultProps = defaultProps$A;
|
|
1146
1145
|
|
|
1147
1146
|
var _excluded$2 = ["id", "className", "linkClassName", "href", "label", "external", "items", "dropdown", "active", "onClick"];
|
|
1148
|
-
var propTypes$
|
|
1147
|
+
var propTypes$z = {
|
|
1149
1148
|
items: PropTypes.menuItems,
|
|
1150
1149
|
tagName: PropTypes$1.string,
|
|
1151
1150
|
itemTagName: PropTypes$1.string,
|
|
@@ -1164,7 +1163,7 @@ var propTypes$y = {
|
|
|
1164
1163
|
dropdownLinkClassName: PropTypes$1.string,
|
|
1165
1164
|
dropdownAlign: PropTypes.dropdownAlign
|
|
1166
1165
|
};
|
|
1167
|
-
var defaultProps$
|
|
1166
|
+
var defaultProps$z = {
|
|
1168
1167
|
items: [],
|
|
1169
1168
|
tagName: 'ul',
|
|
1170
1169
|
itemTagName: 'li',
|
|
@@ -1288,12 +1287,12 @@ var Menu = function Menu(_ref) {
|
|
|
1288
1287
|
}));
|
|
1289
1288
|
};
|
|
1290
1289
|
|
|
1291
|
-
Menu.propTypes = propTypes$
|
|
1292
|
-
Menu.defaultProps = defaultProps$
|
|
1290
|
+
Menu.propTypes = propTypes$z;
|
|
1291
|
+
Menu.defaultProps = defaultProps$z;
|
|
1293
1292
|
|
|
1294
1293
|
var styles$p = {"collapse":"micromag-core-menus-navbar-collapse"};
|
|
1295
1294
|
|
|
1296
|
-
var propTypes$
|
|
1295
|
+
var propTypes$y = {
|
|
1297
1296
|
brand: PropTypes$1.node,
|
|
1298
1297
|
brandLink: PropTypes$1.string,
|
|
1299
1298
|
breadcrumbs: PropTypes$1.node,
|
|
@@ -1309,7 +1308,7 @@ var propTypes$x = {
|
|
|
1309
1308
|
breadCrumbsClassName: PropTypes$1.string,
|
|
1310
1309
|
collapseClassName: PropTypes$1.string
|
|
1311
1310
|
};
|
|
1312
|
-
var defaultProps$
|
|
1311
|
+
var defaultProps$y = {
|
|
1313
1312
|
brand: null,
|
|
1314
1313
|
brandLink: null,
|
|
1315
1314
|
breadcrumbs: null,
|
|
@@ -1385,8 +1384,8 @@ var Navbar = function Navbar(_ref) {
|
|
|
1385
1384
|
}, children) : children));
|
|
1386
1385
|
};
|
|
1387
1386
|
|
|
1388
|
-
Navbar.propTypes = propTypes$
|
|
1389
|
-
Navbar.defaultProps = defaultProps$
|
|
1387
|
+
Navbar.propTypes = propTypes$y;
|
|
1388
|
+
Navbar.defaultProps = defaultProps$y;
|
|
1390
1389
|
|
|
1391
1390
|
var styles$o = {};
|
|
1392
1391
|
|
|
@@ -1406,7 +1405,7 @@ var messages = defineMessages({
|
|
|
1406
1405
|
}]
|
|
1407
1406
|
}
|
|
1408
1407
|
});
|
|
1409
|
-
var propTypes$
|
|
1408
|
+
var propTypes$x = {
|
|
1410
1409
|
page: PropTypes$1.number,
|
|
1411
1410
|
total: PropTypes$1.number,
|
|
1412
1411
|
url: PropTypes$1.string,
|
|
@@ -1417,7 +1416,7 @@ var propTypes$w = {
|
|
|
1417
1416
|
linkClassName: PropTypes$1.string,
|
|
1418
1417
|
onClickPage: PropTypes$1.func
|
|
1419
1418
|
};
|
|
1420
|
-
var defaultProps$
|
|
1419
|
+
var defaultProps$x = {
|
|
1421
1420
|
page: 1,
|
|
1422
1421
|
total: 1,
|
|
1423
1422
|
url: null,
|
|
@@ -1491,12 +1490,12 @@ var PaginationMenu = function PaginationMenu(_ref) {
|
|
|
1491
1490
|
}, /*#__PURE__*/React.createElement(Label, null, messages.next))) : null));
|
|
1492
1491
|
};
|
|
1493
1492
|
|
|
1494
|
-
PaginationMenu.propTypes = propTypes$
|
|
1495
|
-
PaginationMenu.defaultProps = defaultProps$
|
|
1493
|
+
PaginationMenu.propTypes = propTypes$x;
|
|
1494
|
+
PaginationMenu.defaultProps = defaultProps$x;
|
|
1496
1495
|
|
|
1497
1496
|
var styles$n = {"container":"micromag-core-menus-tabs-container"};
|
|
1498
1497
|
|
|
1499
|
-
var propTypes$
|
|
1498
|
+
var propTypes$w = {
|
|
1500
1499
|
items: PropTypes.menuItems,
|
|
1501
1500
|
size: PropTypes.buttonSize,
|
|
1502
1501
|
theme: PropTypes.buttonTheme,
|
|
@@ -1505,7 +1504,7 @@ var propTypes$v = {
|
|
|
1505
1504
|
className: PropTypes$1.string,
|
|
1506
1505
|
onClickItem: PropTypes$1.func
|
|
1507
1506
|
};
|
|
1508
|
-
var defaultProps$
|
|
1507
|
+
var defaultProps$w = {
|
|
1509
1508
|
items: [],
|
|
1510
1509
|
size: null,
|
|
1511
1510
|
theme: 'secondary',
|
|
@@ -1536,17 +1535,17 @@ var TabsMenu = function TabsMenu(_ref) {
|
|
|
1536
1535
|
}));
|
|
1537
1536
|
};
|
|
1538
1537
|
|
|
1539
|
-
TabsMenu.propTypes = propTypes$
|
|
1540
|
-
TabsMenu.defaultProps = defaultProps$
|
|
1538
|
+
TabsMenu.propTypes = propTypes$w;
|
|
1539
|
+
TabsMenu.defaultProps = defaultProps$w;
|
|
1541
1540
|
|
|
1542
1541
|
var styles$m = {"container":"micromag-core-modals-container","modals":"micromag-core-modals-modals","hasModals":"micromag-core-modals-hasModals"};
|
|
1543
1542
|
|
|
1544
|
-
var propTypes$
|
|
1543
|
+
var propTypes$v = {
|
|
1545
1544
|
modals: PropTypes.modals.isRequired,
|
|
1546
1545
|
setModalsContainer: PropTypes$1.func.isRequired,
|
|
1547
1546
|
className: PropTypes$1.string
|
|
1548
1547
|
};
|
|
1549
|
-
var defaultProps$
|
|
1548
|
+
var defaultProps$v = {
|
|
1550
1549
|
className: null
|
|
1551
1550
|
};
|
|
1552
1551
|
|
|
@@ -1566,12 +1565,12 @@ var ModalsContainer = function ModalsContainer(_ref) {
|
|
|
1566
1565
|
}));
|
|
1567
1566
|
};
|
|
1568
1567
|
|
|
1569
|
-
ModalsContainer.propTypes = propTypes$
|
|
1570
|
-
ModalsContainer.defaultProps = defaultProps$
|
|
1568
|
+
ModalsContainer.propTypes = propTypes$v;
|
|
1569
|
+
ModalsContainer.defaultProps = defaultProps$v;
|
|
1571
1570
|
var Modals = withModals(ModalsContainer);
|
|
1572
1571
|
|
|
1573
1572
|
/* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
|
|
1574
|
-
var propTypes$
|
|
1573
|
+
var propTypes$u = {
|
|
1575
1574
|
id: PropTypes$1.string,
|
|
1576
1575
|
data: PropTypes$1.object,
|
|
1577
1576
|
// eslint-disable-line react/forbid-prop-types
|
|
@@ -1581,7 +1580,7 @@ var propTypes$t = {
|
|
|
1581
1580
|
unregister: PropTypes$1.func,
|
|
1582
1581
|
children: PropTypes$1.node
|
|
1583
1582
|
};
|
|
1584
|
-
var defaultProps$
|
|
1583
|
+
var defaultProps$u = {
|
|
1585
1584
|
id: null,
|
|
1586
1585
|
data: null,
|
|
1587
1586
|
container: null,
|
|
@@ -1614,17 +1613,17 @@ var ElementPortal = function ElementPortal(_ref) {
|
|
|
1614
1613
|
return container !== null ? /*#__PURE__*/ReactDOM.createPortal(children, container) : null;
|
|
1615
1614
|
};
|
|
1616
1615
|
|
|
1617
|
-
ElementPortal.propTypes = propTypes$
|
|
1618
|
-
ElementPortal.defaultProps = defaultProps$
|
|
1616
|
+
ElementPortal.propTypes = propTypes$u;
|
|
1617
|
+
ElementPortal.defaultProps = defaultProps$u;
|
|
1619
1618
|
|
|
1620
1619
|
/* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
|
|
1621
|
-
var propTypes$
|
|
1620
|
+
var propTypes$t = {
|
|
1622
1621
|
id: PropTypes$1.string,
|
|
1623
1622
|
data: PropTypes$1.object,
|
|
1624
1623
|
// eslint-disable-line react/forbid-prop-types
|
|
1625
1624
|
children: PropTypes$1.node
|
|
1626
1625
|
};
|
|
1627
|
-
var defaultProps$
|
|
1626
|
+
var defaultProps$t = {
|
|
1628
1627
|
id: null,
|
|
1629
1628
|
data: null,
|
|
1630
1629
|
children: null
|
|
@@ -1651,18 +1650,18 @@ var ModalPortal = function ModalPortal(_ref) {
|
|
|
1651
1650
|
}, children);
|
|
1652
1651
|
};
|
|
1653
1652
|
|
|
1654
|
-
ModalPortal.propTypes = propTypes$
|
|
1655
|
-
ModalPortal.defaultProps = defaultProps$
|
|
1653
|
+
ModalPortal.propTypes = propTypes$t;
|
|
1654
|
+
ModalPortal.defaultProps = defaultProps$t;
|
|
1656
1655
|
|
|
1657
1656
|
var styles$l = {"container":"micromag-core-modals-modal-container","center":"micromag-core-modals-modal-center","inner":"micromag-core-modals-modal-inner","top":"micromag-core-modals-modal-top"};
|
|
1658
1657
|
|
|
1659
|
-
var propTypes$
|
|
1658
|
+
var propTypes$s = {
|
|
1660
1659
|
id: PropTypes$1.string,
|
|
1661
1660
|
title: PropTypes$1.string,
|
|
1662
1661
|
position: PropTypes$1.oneOf(['center', 'top']),
|
|
1663
1662
|
children: PropTypes$1.node
|
|
1664
1663
|
};
|
|
1665
|
-
var defaultProps$
|
|
1664
|
+
var defaultProps$s = {
|
|
1666
1665
|
id: null,
|
|
1667
1666
|
title: null,
|
|
1668
1667
|
position: 'center',
|
|
@@ -1692,12 +1691,12 @@ var Modal = function Modal(_ref) {
|
|
|
1692
1691
|
}, children)));
|
|
1693
1692
|
};
|
|
1694
1693
|
|
|
1695
|
-
Modal.propTypes = propTypes$
|
|
1696
|
-
Modal.defaultProps = defaultProps$
|
|
1694
|
+
Modal.propTypes = propTypes$s;
|
|
1695
|
+
Modal.defaultProps = defaultProps$s;
|
|
1697
1696
|
|
|
1698
1697
|
var styles$k = {"container":"micromag-core-modals-dialog-container"};
|
|
1699
1698
|
|
|
1700
|
-
var propTypes$
|
|
1699
|
+
var propTypes$r = {
|
|
1701
1700
|
title: PropTypes.label,
|
|
1702
1701
|
header: PropTypes$1.node,
|
|
1703
1702
|
children: PropTypes$1.node,
|
|
@@ -1707,7 +1706,7 @@ var propTypes$q = {
|
|
|
1707
1706
|
onClickClose: PropTypes$1.func,
|
|
1708
1707
|
className: PropTypes$1.string
|
|
1709
1708
|
};
|
|
1710
|
-
var defaultProps$
|
|
1709
|
+
var defaultProps$r = {
|
|
1711
1710
|
title: null,
|
|
1712
1711
|
header: null,
|
|
1713
1712
|
children: null,
|
|
@@ -1755,18 +1754,26 @@ var ModalDialog = function ModalDialog(_ref) {
|
|
|
1755
1754
|
}) : null) : null));
|
|
1756
1755
|
};
|
|
1757
1756
|
|
|
1758
|
-
ModalDialog.propTypes = propTypes$
|
|
1759
|
-
ModalDialog.defaultProps = defaultProps$
|
|
1757
|
+
ModalDialog.propTypes = propTypes$r;
|
|
1758
|
+
ModalDialog.defaultProps = defaultProps$r;
|
|
1760
1759
|
|
|
1761
1760
|
// import classNames from 'classnames';
|
|
1762
|
-
var
|
|
1761
|
+
var DashboardModal = /*#__PURE__*/React.lazy(function () {
|
|
1762
|
+
return import('@uppy/react').then(function (_ref) {
|
|
1763
|
+
var Component = _ref.DashboardModal;
|
|
1764
|
+
return {
|
|
1765
|
+
"default": Component
|
|
1766
|
+
};
|
|
1767
|
+
});
|
|
1768
|
+
});
|
|
1769
|
+
var propTypes$q = {
|
|
1763
1770
|
type: PropTypes$1.oneOfType([PropTypes.mediaTypes, PropTypes$1.array]),
|
|
1764
1771
|
opened: PropTypes$1.bool,
|
|
1765
1772
|
sources: PropTypes$1.arrayOf(PropTypes$1.string),
|
|
1766
1773
|
onUploaded: PropTypes$1.func,
|
|
1767
1774
|
onRequestClose: PropTypes$1.func
|
|
1768
1775
|
};
|
|
1769
|
-
var defaultProps$
|
|
1776
|
+
var defaultProps$q = {
|
|
1770
1777
|
type: null,
|
|
1771
1778
|
opened: false,
|
|
1772
1779
|
sources: ['webcam', 'facebook', 'instagram', 'dropbox', 'google-drive'],
|
|
@@ -1774,12 +1781,12 @@ var defaultProps$p = {
|
|
|
1774
1781
|
onRequestClose: null
|
|
1775
1782
|
};
|
|
1776
1783
|
|
|
1777
|
-
var UploadModal = function UploadModal(
|
|
1778
|
-
var type =
|
|
1779
|
-
opened =
|
|
1780
|
-
sources =
|
|
1781
|
-
onUploaded =
|
|
1782
|
-
onRequestClose =
|
|
1784
|
+
var UploadModal = function UploadModal(_ref2) {
|
|
1785
|
+
var type = _ref2.type,
|
|
1786
|
+
opened = _ref2.opened,
|
|
1787
|
+
sources = _ref2.sources,
|
|
1788
|
+
onUploaded = _ref2.onUploaded,
|
|
1789
|
+
onRequestClose = _ref2.onRequestClose;
|
|
1783
1790
|
var onUppyComplete = useCallback(function (response) {
|
|
1784
1791
|
if (onUploaded !== null) {
|
|
1785
1792
|
onUploaded(response);
|
|
@@ -1806,26 +1813,28 @@ var UploadModal = function UploadModal(_ref) {
|
|
|
1806
1813
|
uppy.reset();
|
|
1807
1814
|
}
|
|
1808
1815
|
}, [uppy, opened]);
|
|
1809
|
-
return uppy !== null ? /*#__PURE__*/React.createElement(
|
|
1816
|
+
return uppy !== null ? /*#__PURE__*/React.createElement(Suspense, {
|
|
1817
|
+
fallback: /*#__PURE__*/React.createElement("div", null)
|
|
1818
|
+
}, /*#__PURE__*/React.createElement(DashboardModal, {
|
|
1810
1819
|
uppy: uppy,
|
|
1811
1820
|
open: opened,
|
|
1812
1821
|
closeAfterFinish: true,
|
|
1813
1822
|
onRequestClose: onRequestClose,
|
|
1814
1823
|
plugins: sources
|
|
1815
|
-
}) : null;
|
|
1824
|
+
})) : null;
|
|
1816
1825
|
};
|
|
1817
1826
|
|
|
1818
|
-
UploadModal.propTypes = propTypes$
|
|
1819
|
-
UploadModal.defaultProps = defaultProps$
|
|
1827
|
+
UploadModal.propTypes = propTypes$q;
|
|
1828
|
+
UploadModal.defaultProps = defaultProps$q;
|
|
1820
1829
|
|
|
1821
1830
|
var styles$j = {"container":"micromag-core-panels-container"};
|
|
1822
1831
|
|
|
1823
|
-
var propTypes$
|
|
1832
|
+
var propTypes$p = {
|
|
1824
1833
|
panels: PropTypes.panels,
|
|
1825
1834
|
setPanelsContainer: PropTypes$1.func,
|
|
1826
1835
|
className: PropTypes$1.string
|
|
1827
1836
|
};
|
|
1828
|
-
var defaultProps$
|
|
1837
|
+
var defaultProps$p = {
|
|
1829
1838
|
panels: [],
|
|
1830
1839
|
setPanelsContainer: null,
|
|
1831
1840
|
className: null
|
|
@@ -1847,18 +1856,18 @@ var PanelsContainer = function PanelsContainer(_ref) {
|
|
|
1847
1856
|
}));
|
|
1848
1857
|
};
|
|
1849
1858
|
|
|
1850
|
-
PanelsContainer.propTypes = propTypes$
|
|
1851
|
-
PanelsContainer.defaultProps = defaultProps$
|
|
1859
|
+
PanelsContainer.propTypes = propTypes$p;
|
|
1860
|
+
PanelsContainer.defaultProps = defaultProps$p;
|
|
1852
1861
|
var Panels = withPanels(PanelsContainer);
|
|
1853
1862
|
|
|
1854
1863
|
/* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
|
|
1855
|
-
var propTypes$
|
|
1864
|
+
var propTypes$o = {
|
|
1856
1865
|
id: PropTypes$1.string,
|
|
1857
1866
|
data: PropTypes$1.object,
|
|
1858
1867
|
// eslint-disable-line react/forbid-prop-types
|
|
1859
1868
|
children: PropTypes$1.node
|
|
1860
1869
|
};
|
|
1861
|
-
var defaultProps$
|
|
1870
|
+
var defaultProps$o = {
|
|
1862
1871
|
id: null,
|
|
1863
1872
|
data: null,
|
|
1864
1873
|
children: null
|
|
@@ -1891,18 +1900,18 @@ var PanelPortal = function PanelPortal(_ref) {
|
|
|
1891
1900
|
}, children);
|
|
1892
1901
|
};
|
|
1893
1902
|
|
|
1894
|
-
PanelPortal.propTypes = propTypes$
|
|
1895
|
-
PanelPortal.defaultProps = defaultProps$
|
|
1903
|
+
PanelPortal.propTypes = propTypes$o;
|
|
1904
|
+
PanelPortal.defaultProps = defaultProps$o;
|
|
1896
1905
|
|
|
1897
1906
|
var styles$i = {"container":"micromag-core-panels-panel-container"};
|
|
1898
1907
|
|
|
1899
1908
|
/* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
|
|
1900
|
-
var propTypes$
|
|
1909
|
+
var propTypes$n = {
|
|
1901
1910
|
id: PropTypes$1.string,
|
|
1902
1911
|
title: PropTypes$1.string,
|
|
1903
1912
|
children: PropTypes$1.node
|
|
1904
1913
|
};
|
|
1905
|
-
var defaultProps$
|
|
1914
|
+
var defaultProps$n = {
|
|
1906
1915
|
id: null,
|
|
1907
1916
|
title: null,
|
|
1908
1917
|
children: null
|
|
@@ -1928,12 +1937,12 @@ var Panel = function Panel(_ref) {
|
|
|
1928
1937
|
}, children));
|
|
1929
1938
|
};
|
|
1930
1939
|
|
|
1931
|
-
Panel.propTypes = propTypes$
|
|
1932
|
-
Panel.defaultProps = defaultProps$
|
|
1940
|
+
Panel.propTypes = propTypes$n;
|
|
1941
|
+
Panel.defaultProps = defaultProps$n;
|
|
1933
1942
|
|
|
1934
1943
|
var styles$h = {"container":"micromag-core-partials-collapsable-panel-container","top":"micromag-core-partials-collapsable-panel-top","button":"micromag-core-partials-collapsable-panel-button","label":"micromag-core-partials-collapsable-panel-label","content":"micromag-core-partials-collapsable-panel-content","isOpened":"micromag-core-partials-collapsable-panel-isOpened"};
|
|
1935
1944
|
|
|
1936
|
-
var propTypes$
|
|
1945
|
+
var propTypes$m = {
|
|
1937
1946
|
title: PropTypes$1.node,
|
|
1938
1947
|
children: PropTypes$1.node,
|
|
1939
1948
|
className: PropTypes$1.string,
|
|
@@ -1942,7 +1951,7 @@ var propTypes$l = {
|
|
|
1942
1951
|
openedClassName: PropTypes$1.string,
|
|
1943
1952
|
buttonClassName: PropTypes$1.string
|
|
1944
1953
|
};
|
|
1945
|
-
var defaultProps$
|
|
1954
|
+
var defaultProps$m = {
|
|
1946
1955
|
title: null,
|
|
1947
1956
|
children: null,
|
|
1948
1957
|
className: null,
|
|
@@ -1990,8 +1999,62 @@ var CollapsablePanel = function CollapsablePanel(_ref) {
|
|
|
1990
1999
|
}, children));
|
|
1991
2000
|
};
|
|
1992
2001
|
|
|
1993
|
-
CollapsablePanel.propTypes = propTypes$
|
|
1994
|
-
CollapsablePanel.defaultProps = defaultProps$
|
|
2002
|
+
CollapsablePanel.propTypes = propTypes$m;
|
|
2003
|
+
CollapsablePanel.defaultProps = defaultProps$m;
|
|
2004
|
+
|
|
2005
|
+
var propTypes$l = {
|
|
2006
|
+
stroke: PropTypes$1.string,
|
|
2007
|
+
border: PropTypes$1.string,
|
|
2008
|
+
fill: PropTypes$1.string,
|
|
2009
|
+
className: PropTypes$1.string
|
|
2010
|
+
};
|
|
2011
|
+
var defaultProps$l = {
|
|
2012
|
+
stroke: 'currentColor',
|
|
2013
|
+
border: 'rgba(0,0,0,0.67)',
|
|
2014
|
+
fill: '#fff',
|
|
2015
|
+
className: null
|
|
2016
|
+
};
|
|
2017
|
+
|
|
2018
|
+
var Close = function Close(_ref) {
|
|
2019
|
+
var stroke = _ref.stroke,
|
|
2020
|
+
border = _ref.border,
|
|
2021
|
+
fill = _ref.fill,
|
|
2022
|
+
className = _ref.className;
|
|
2023
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
2024
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2025
|
+
width: "42.9",
|
|
2026
|
+
height: "42.9",
|
|
2027
|
+
viewBox: "0 0 42.9 42.9",
|
|
2028
|
+
className: className
|
|
2029
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
2030
|
+
transform: "translate(-352.531 -47.531)"
|
|
2031
|
+
}, border ? /*#__PURE__*/React.createElement("path", {
|
|
2032
|
+
fill: border,
|
|
2033
|
+
d: "M374,47.5c11.9,0,21.5,9.6,21.5,21.5s-9.6,21.5-21.5,21.5s-21.5-9.6-21.5-21.5c0,0,0,0,0,0 C352.5,57.1,362.1,47.5,374,47.5z"
|
|
2034
|
+
}) : null, /*#__PURE__*/React.createElement("path", {
|
|
2035
|
+
fill: fill,
|
|
2036
|
+
d: "M374,50c10.5,0,19,8.5,19,19s-8.5,19-19,19s-19-8.5-19-19S363.5,50,374,50z"
|
|
2037
|
+
}), /*#__PURE__*/React.createElement("g", {
|
|
2038
|
+
transform: "translate(366.893 61.893)"
|
|
2039
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
2040
|
+
transform: "translate(0 0)"
|
|
2041
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
2042
|
+
fill: fill,
|
|
2043
|
+
stroke: stroke,
|
|
2044
|
+
strokeWidth: "2",
|
|
2045
|
+
strokeLinecap: "round",
|
|
2046
|
+
d: "M14.2,0.3L0,13.9"
|
|
2047
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
2048
|
+
fill: fill,
|
|
2049
|
+
stroke: stroke,
|
|
2050
|
+
strokeWidth: "2",
|
|
2051
|
+
strokeLinecap: "round",
|
|
2052
|
+
d: "M0.3,0l13.7,14.2"
|
|
2053
|
+
})))));
|
|
2054
|
+
};
|
|
2055
|
+
|
|
2056
|
+
Close.propTypes = propTypes$l;
|
|
2057
|
+
Close.defaultProps = defaultProps$l;
|
|
1995
2058
|
|
|
1996
2059
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
1997
2060
|
var propTypes$k = {
|
|
@@ -4280,4 +4343,4 @@ var LinkStyle = function LinkStyle(_ref) {
|
|
|
4280
4343
|
LinkStyle.propTypes = propTypes;
|
|
4281
4344
|
LinkStyle.defaultProps = defaultProps;
|
|
4282
4345
|
|
|
4283
|
-
export { BackButton, Breadcrumb, Button$1 as Button, Buttons, Card, CollapsablePanel, Date$1 as Date, Detector, Dropdown as DropdownMenu, ElementComponent as Element, Empty, FieldForm, FontFaces, Form, FormPanel, HighlightStyle, Label, Link, LinkStyle, Media, Menu, Meta, Modal, ModalDialog, ModalPortal, Modals, Navbar, PaginationMenu as Pagination, Panel, PanelPortal, Panels, AdFrame as PlaceholderAdFrame, AdImage as PlaceholderAdImage, Audio as PlaceholderAudio, Button as PlaceholderButton, Image as PlaceholderImage, Line as PlaceholderLine, Map as PlaceholderMap, MapPath as PlaceholderMapPath, Quote as PlaceholderQuote, ShortText as PlaceholderShortText, Subtitle as PlaceholderSubtitle, TextPlaceholder as PlaceholderText, Timeline as PlaceholderTimeline, Title as PlaceholderTitle, Video as PlaceholderVideo, Video360 as PlaceholderVideo360, VideoLoop as PlaceholderVideoLoop, Screen$1 as Screen, ScreenElement, Placeholder as ScreenPlaceholder, Preview as ScreenPreview, ScreenSizer, Screens, Slideshow, Spinner, TabsMenu as Tabs, Transitions, TransitionsStagger, UploadModal };
|
|
4346
|
+
export { BackButton, Breadcrumb, Button$1 as Button, Buttons, Card, Close, CollapsablePanel, Date$1 as Date, Detector, Dropdown as DropdownMenu, ElementComponent as Element, Empty, FieldForm, FontFaces, Form, FormPanel, HighlightStyle, Label, Link, LinkStyle, Media, Menu, Meta, Modal, ModalDialog, ModalPortal, Modals, Navbar, PaginationMenu as Pagination, Panel, PanelPortal, Panels, AdFrame as PlaceholderAdFrame, AdImage as PlaceholderAdImage, Audio as PlaceholderAudio, Button as PlaceholderButton, Image as PlaceholderImage, Line as PlaceholderLine, Map as PlaceholderMap, MapPath as PlaceholderMapPath, Quote as PlaceholderQuote, ShortText as PlaceholderShortText, Subtitle as PlaceholderSubtitle, TextPlaceholder as PlaceholderText, Timeline as PlaceholderTimeline, Title as PlaceholderTitle, Video as PlaceholderVideo, Video360 as PlaceholderVideo360, VideoLoop as PlaceholderVideoLoop, Screen$1 as Screen, ScreenElement, Placeholder as ScreenPlaceholder, Preview as ScreenPreview, ScreenSizer, Screens, Slideshow, Spinner, TabsMenu as Tabs, Transitions, TransitionsStagger, UploadModal };
|