@micromag/core 0.3.420 → 0.3.429
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/css/styles.css +13 -13
- package/assets/css/vendor.css +1 -1
- package/es/components.js +76 -54
- package/es/hooks.js +9 -8
- package/es/index.js +202 -120
- package/es/utils.js +109 -5
- package/lib/components.js +1139 -1156
- package/lib/contexts.js +199 -233
- package/lib/hooks.js +89 -124
- package/lib/index.js +660 -603
- package/lib/utils.js +155 -73
- package/package.json +23 -7
- package/scss/styles.scss +1 -1
- package/scss/upload.scss +2 -2
- package/scss/vendor.scss +1 -1
package/lib/components.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
4
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
7
5
|
var classNames = require('classnames');
|
|
@@ -19,6 +17,7 @@ var hooks = require('@micromag/core/hooks');
|
|
|
19
17
|
var contexts = require('@micromag/core/contexts');
|
|
20
18
|
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
21
19
|
var get = require('lodash/get');
|
|
20
|
+
var queryString = require('query-string');
|
|
22
21
|
var ReactDOM = require('react-dom');
|
|
23
22
|
var isArray = require('lodash/isArray');
|
|
24
23
|
var faAngleDown = require('@fortawesome/free-solid-svg-icons/faAngleDown');
|
|
@@ -28,7 +27,6 @@ var throttle = require('lodash/throttle');
|
|
|
28
27
|
var isObject = require('lodash/isObject');
|
|
29
28
|
var reactHelmet = require('react-helmet');
|
|
30
29
|
var isString = require('lodash/isString');
|
|
31
|
-
require('snake-case');
|
|
32
30
|
var faAd = require('@fortawesome/free-solid-svg-icons/faAd');
|
|
33
31
|
var faImage = require('@fortawesome/free-solid-svg-icons/faImage');
|
|
34
32
|
var faMusic = require('@fortawesome/free-solid-svg-icons/faMusic');
|
|
@@ -47,48 +45,11 @@ var faPercent = require('@fortawesome/free-solid-svg-icons/faPercent');
|
|
|
47
45
|
var core$1 = require('@react-spring/core');
|
|
48
46
|
var web = require('@react-spring/web');
|
|
49
47
|
|
|
50
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
51
|
-
|
|
52
|
-
function _interopNamespace(e) {
|
|
53
|
-
if (e && e.__esModule) return e;
|
|
54
|
-
var n = Object.create(null);
|
|
55
|
-
if (e) {
|
|
56
|
-
Object.keys(e).forEach(function (k) {
|
|
57
|
-
if (k !== 'default') {
|
|
58
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
59
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
60
|
-
enumerable: true,
|
|
61
|
-
get: function () { return e[k]; }
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
n["default"] = e;
|
|
67
|
-
return Object.freeze(n);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
71
|
-
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
72
|
-
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
73
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
74
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
75
|
-
var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
|
|
76
|
-
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
77
|
-
var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread);
|
|
78
|
-
var get__default = /*#__PURE__*/_interopDefaultLegacy(get);
|
|
79
|
-
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
80
|
-
var isArray__default = /*#__PURE__*/_interopDefaultLegacy(isArray);
|
|
81
|
-
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
82
|
-
var throttle__default = /*#__PURE__*/_interopDefaultLegacy(throttle);
|
|
83
|
-
var isObject__default = /*#__PURE__*/_interopDefaultLegacy(isObject);
|
|
84
|
-
var isString__default = /*#__PURE__*/_interopDefaultLegacy(isString);
|
|
85
|
-
var isNumber__default = /*#__PURE__*/_interopDefaultLegacy(isNumber);
|
|
86
|
-
|
|
87
48
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
88
49
|
var propTypes$T = {
|
|
89
50
|
children: core.PropTypes.label.isRequired,
|
|
90
|
-
isHtml:
|
|
91
|
-
values:
|
|
51
|
+
isHtml: PropTypes.bool,
|
|
52
|
+
values: PropTypes.object // eslint-disable-line react/forbid-prop-types
|
|
92
53
|
};
|
|
93
54
|
|
|
94
55
|
var defaultProps$T = {
|
|
@@ -100,7 +61,7 @@ var Label = function Label(_ref) {
|
|
|
100
61
|
isHtml = _ref.isHtml,
|
|
101
62
|
values = _ref.values;
|
|
102
63
|
var Message = isHtml ? reactIntl.FormattedMessage : reactIntl.FormattedMessage;
|
|
103
|
-
return utils.isMessage(children) ? /*#__PURE__*/
|
|
64
|
+
return utils.isMessage(children) ? /*#__PURE__*/React.createElement(Message, Object.assign({
|
|
104
65
|
values: values
|
|
105
66
|
}, children)) : children;
|
|
106
67
|
};
|
|
@@ -111,36 +72,36 @@ var styles$x = {"container":"micromag-core-buttons-button-container","asLink":"m
|
|
|
111
72
|
|
|
112
73
|
var _excluded$b = ["type", "theme", "size", "href", "external", "direct", "target", "label", "children", "focusable", "active", "icon", "iconPosition", "disabled", "loading", "disableOnLoading", "small", "big", "withShadow", "withoutStyle", "withoutBootstrapStyles", "withoutTheme", "asLink", "outline", "onClick", "className", "iconClassName", "labelClassName", "refButton"];
|
|
113
74
|
var propTypes$S = {
|
|
114
|
-
type:
|
|
75
|
+
type: PropTypes.string,
|
|
115
76
|
theme: core.PropTypes.buttonTheme,
|
|
116
77
|
size: core.PropTypes.buttonSize,
|
|
117
|
-
href:
|
|
118
|
-
external:
|
|
119
|
-
direct:
|
|
120
|
-
target:
|
|
78
|
+
href: PropTypes.string,
|
|
79
|
+
external: PropTypes.bool,
|
|
80
|
+
direct: PropTypes.bool,
|
|
81
|
+
target: PropTypes.string,
|
|
121
82
|
label: core.PropTypes.label,
|
|
122
83
|
children: core.PropTypes.label,
|
|
123
|
-
focusable:
|
|
124
|
-
active:
|
|
125
|
-
icon:
|
|
126
|
-
iconPosition:
|
|
127
|
-
disabled:
|
|
128
|
-
loading:
|
|
129
|
-
disableOnLoading:
|
|
130
|
-
small:
|
|
131
|
-
big:
|
|
132
|
-
withShadow:
|
|
133
|
-
withoutStyle:
|
|
134
|
-
withoutBootstrapStyles:
|
|
135
|
-
withoutTheme:
|
|
136
|
-
outline:
|
|
137
|
-
asLink:
|
|
138
|
-
className:
|
|
139
|
-
iconClassName:
|
|
140
|
-
labelClassName:
|
|
141
|
-
onClick:
|
|
142
|
-
refButton:
|
|
143
|
-
current:
|
|
84
|
+
focusable: PropTypes.bool,
|
|
85
|
+
active: PropTypes.bool,
|
|
86
|
+
icon: PropTypes.node,
|
|
87
|
+
iconPosition: PropTypes.oneOf(['left', 'right', 'inline']),
|
|
88
|
+
disabled: PropTypes.bool,
|
|
89
|
+
loading: PropTypes.bool,
|
|
90
|
+
disableOnLoading: PropTypes.bool,
|
|
91
|
+
small: PropTypes.bool,
|
|
92
|
+
big: PropTypes.bool,
|
|
93
|
+
withShadow: PropTypes.bool,
|
|
94
|
+
withoutStyle: PropTypes.bool,
|
|
95
|
+
withoutBootstrapStyles: PropTypes.bool,
|
|
96
|
+
withoutTheme: PropTypes.bool,
|
|
97
|
+
outline: PropTypes.bool,
|
|
98
|
+
asLink: PropTypes.bool,
|
|
99
|
+
className: PropTypes.string,
|
|
100
|
+
iconClassName: PropTypes.string,
|
|
101
|
+
labelClassName: PropTypes.string,
|
|
102
|
+
onClick: PropTypes.func,
|
|
103
|
+
refButton: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
104
|
+
current: PropTypes.any // eslint-disable-line
|
|
144
105
|
})])
|
|
145
106
|
};
|
|
146
107
|
|
|
@@ -176,7 +137,7 @@ var defaultProps$S = {
|
|
|
176
137
|
refButton: null
|
|
177
138
|
};
|
|
178
139
|
var Button$1 = function Button(_ref) {
|
|
179
|
-
var
|
|
140
|
+
var _ref8;
|
|
180
141
|
var type = _ref.type,
|
|
181
142
|
theme = _ref.theme,
|
|
182
143
|
size = _ref.size,
|
|
@@ -206,40 +167,40 @@ var Button$1 = function Button(_ref) {
|
|
|
206
167
|
iconClassName = _ref.iconClassName,
|
|
207
168
|
labelClassName = _ref.labelClassName,
|
|
208
169
|
refButton = _ref.refButton,
|
|
209
|
-
props =
|
|
170
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
210
171
|
var finalLabel = label || children;
|
|
211
|
-
var text = finalLabel !== null ? /*#__PURE__*/
|
|
172
|
+
var text = finalLabel !== null ? /*#__PURE__*/React.createElement(Label, null, finalLabel) : null;
|
|
212
173
|
var hasChildren = label !== null && children !== null;
|
|
213
174
|
var hasIcon = icon !== null;
|
|
214
175
|
var hasInlineIcon = hasIcon && (iconPosition === 'inline' || text === null);
|
|
215
176
|
var hasIconColumns = hasIcon && !hasInlineIcon;
|
|
216
|
-
var content = /*#__PURE__*/
|
|
217
|
-
className:
|
|
218
|
-
}, icon), text !== null ? /*#__PURE__*/
|
|
219
|
-
className:
|
|
220
|
-
}, text) : null) : null, hasIconColumns ? /*#__PURE__*/
|
|
221
|
-
className:
|
|
222
|
-
}, iconPosition === 'left' ? icon : null), /*#__PURE__*/
|
|
223
|
-
className:
|
|
224
|
-
}, text), /*#__PURE__*/
|
|
225
|
-
className:
|
|
177
|
+
var content = /*#__PURE__*/React.createElement(React.Fragment, null, hasInlineIcon ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
178
|
+
className: classNames([styles$x.icon, _defineProperty({}, iconClassName, iconClassName !== null)])
|
|
179
|
+
}, icon), text !== null ? /*#__PURE__*/React.createElement("span", {
|
|
180
|
+
className: classNames([styles$x.label, _defineProperty({}, labelClassName, labelClassName !== null)])
|
|
181
|
+
}, text) : null) : null, hasIconColumns ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
182
|
+
className: classNames([styles$x.left, _defineProperty({}, iconClassName, iconClassName !== null && iconPosition === 'left')])
|
|
183
|
+
}, iconPosition === 'left' ? icon : null), /*#__PURE__*/React.createElement("span", {
|
|
184
|
+
className: classNames([styles$x.center, _defineProperty({}, labelClassName, labelClassName !== null)])
|
|
185
|
+
}, text), /*#__PURE__*/React.createElement("span", {
|
|
186
|
+
className: classNames([styles$x.right, _defineProperty({}, iconClassName, iconClassName !== null && iconPosition === 'right')])
|
|
226
187
|
}, iconPosition === 'right' ? icon : null), hasChildren ? children : null) : null, !hasIcon ? text : null, hasChildren ? children : null);
|
|
227
188
|
var withStyle = !withoutTheme && !withoutStyle && !asLink;
|
|
228
|
-
var buttonClassNames =
|
|
189
|
+
var buttonClassNames = classNames([!withoutBootstrapStyles ? _defineProperty(_defineProperty(_defineProperty({
|
|
229
190
|
btn: withStyle
|
|
230
|
-
},
|
|
191
|
+
}, "btn-".concat(outline ? 'outline-' : '').concat(theme), withStyle && theme !== null), "btn-".concat(size), withStyle && size !== null), "active", !withoutStyle && active) : null, styles$x.container, (_ref8 = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref8, styles$x.withoutStyle, withoutStyle), styles$x.withIcon, hasIcon), styles$x.withIconColumns, hasIconColumns), styles$x.withText, text !== null), styles$x.withShadow, withShadow), styles$x.isSmall, small), styles$x.isBig, big), styles$x.isLink, href !== null), styles$x.asLink, asLink), styles$x.isDisabled, disabled), _defineProperty(_defineProperty(_ref8, styles$x.isLoading, loading), className, className !== null))]);
|
|
231
192
|
if (href !== null) {
|
|
232
|
-
var linkClassNames =
|
|
193
|
+
var linkClassNames = classNames([buttonClassNames, _defineProperty({
|
|
233
194
|
disabled: disabled
|
|
234
195
|
}, styles$x.linkDisabled, disabled)]);
|
|
235
|
-
return external || direct ? /*#__PURE__*/
|
|
196
|
+
return external || direct ? /*#__PURE__*/React.createElement("a", Object.assign({}, props, {
|
|
236
197
|
href: disabled ? null : href,
|
|
237
198
|
className: linkClassNames,
|
|
238
199
|
onClick: onClick,
|
|
239
200
|
target: external ? target : null,
|
|
240
201
|
ref: refButton,
|
|
241
202
|
tabIndex: focusable ? '' : '-1'
|
|
242
|
-
}), content) : /*#__PURE__*/
|
|
203
|
+
}), content) : /*#__PURE__*/React.createElement(reactRouterDom.Link, {
|
|
243
204
|
to: href,
|
|
244
205
|
className: linkClassNames,
|
|
245
206
|
onClick: onClick,
|
|
@@ -247,7 +208,7 @@ var Button$1 = function Button(_ref) {
|
|
|
247
208
|
tabIndex: focusable ? '' : '-1'
|
|
248
209
|
}, content);
|
|
249
210
|
}
|
|
250
|
-
return /*#__PURE__*/
|
|
211
|
+
return /*#__PURE__*/React.createElement("button", Object.assign({}, props, {
|
|
251
212
|
type: type,
|
|
252
213
|
className: buttonClassNames,
|
|
253
214
|
onClick: onClick,
|
|
@@ -266,10 +227,10 @@ var propTypes$R = {
|
|
|
266
227
|
buttons: core.PropTypes.buttons,
|
|
267
228
|
size: core.PropTypes.buttonSize,
|
|
268
229
|
theme: core.PropTypes.buttonTheme,
|
|
269
|
-
renderButton:
|
|
270
|
-
onClickButton:
|
|
271
|
-
className:
|
|
272
|
-
buttonClassName:
|
|
230
|
+
renderButton: PropTypes.func,
|
|
231
|
+
onClickButton: PropTypes.func,
|
|
232
|
+
className: PropTypes.string,
|
|
233
|
+
buttonClassName: PropTypes.string
|
|
273
234
|
};
|
|
274
235
|
var defaultProps$R = {
|
|
275
236
|
buttons: [],
|
|
@@ -288,21 +249,20 @@ var Buttons = function Buttons(_ref) {
|
|
|
288
249
|
onClickButton = _ref.onClickButton,
|
|
289
250
|
buttonClassName = _ref.buttonClassName,
|
|
290
251
|
className = _ref.className;
|
|
291
|
-
return /*#__PURE__*/
|
|
292
|
-
className:
|
|
252
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
253
|
+
className: classNames(['btn-group', _defineProperty({}, "btn-group-".concat(size), size !== null), styles$w.container, _defineProperty({}, className, className !== null)]),
|
|
293
254
|
role: "group"
|
|
294
255
|
}, buttons.map(function (button, index) {
|
|
295
|
-
var _ref4;
|
|
296
256
|
var _button$className = button.className,
|
|
297
257
|
customClassName = _button$className === void 0 ? null : _button$className,
|
|
298
258
|
_button$onClick = button.onClick,
|
|
299
259
|
_onClick = _button$onClick === void 0 ? null : _button$onClick,
|
|
300
260
|
_button$theme = button.theme,
|
|
301
261
|
buttonTheme = _button$theme === void 0 ? null : _button$theme,
|
|
302
|
-
buttonProps =
|
|
262
|
+
buttonProps = _objectWithoutProperties(button, _excluded$a);
|
|
303
263
|
var fixedProps = {
|
|
304
264
|
key: "button-".concat(index),
|
|
305
|
-
className:
|
|
265
|
+
className: classNames([styles$w.button, _defineProperty(_defineProperty({}, buttonClassName, buttonClassName !== null), customClassName, customClassName !== null)]),
|
|
306
266
|
onClick: function onClick(e) {
|
|
307
267
|
if (_onClick !== null) {
|
|
308
268
|
_onClick(e, button, index);
|
|
@@ -313,7 +273,7 @@ var Buttons = function Buttons(_ref) {
|
|
|
313
273
|
},
|
|
314
274
|
theme: buttonTheme || theme
|
|
315
275
|
};
|
|
316
|
-
return renderButton !== null ? renderButton(button, index, fixedProps) : /*#__PURE__*/
|
|
276
|
+
return renderButton !== null ? renderButton(button, index, fixedProps) : /*#__PURE__*/React.createElement(Button$1, Object.assign({}, fixedProps, buttonProps));
|
|
317
277
|
}));
|
|
318
278
|
};
|
|
319
279
|
Buttons.propTypes = propTypes$R;
|
|
@@ -321,18 +281,18 @@ Buttons.defaultProps = defaultProps$R;
|
|
|
321
281
|
|
|
322
282
|
var _excluded$9 = ["className"];
|
|
323
283
|
var propTypes$Q = {
|
|
324
|
-
className:
|
|
284
|
+
className: PropTypes.string
|
|
325
285
|
};
|
|
326
286
|
var defaultProps$Q = {
|
|
327
287
|
className: null
|
|
328
288
|
};
|
|
329
289
|
var BackButton = function BackButton(_ref) {
|
|
330
290
|
var className = _ref.className,
|
|
331
|
-
props =
|
|
332
|
-
return /*#__PURE__*/
|
|
333
|
-
className:
|
|
291
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
292
|
+
return /*#__PURE__*/React.createElement(Button$1, Object.assign({
|
|
293
|
+
className: classNames(['px-2', _defineProperty({}, className, className)]),
|
|
334
294
|
size: "sm",
|
|
335
|
-
icon: /*#__PURE__*/
|
|
295
|
+
icon: /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
336
296
|
icon: faAngleLeft.faAngleLeft,
|
|
337
297
|
size: "lg"
|
|
338
298
|
})
|
|
@@ -344,17 +304,17 @@ BackButton.defaultProps = defaultProps$Q;
|
|
|
344
304
|
var _excluded$8 = ["type"],
|
|
345
305
|
_excluded2 = ["component", "id", "settings"];
|
|
346
306
|
var propTypes$P = {
|
|
347
|
-
name:
|
|
307
|
+
name: PropTypes.string,
|
|
348
308
|
// .isRequired,
|
|
349
309
|
value: core.PropTypes.component,
|
|
350
|
-
form:
|
|
310
|
+
form: PropTypes.string,
|
|
351
311
|
formComponents: core.PropTypes.components,
|
|
352
312
|
fields: core.PropTypes.fields,
|
|
353
|
-
className:
|
|
354
|
-
onChange:
|
|
355
|
-
gotoFieldForm:
|
|
356
|
-
closeFieldForm:
|
|
357
|
-
fieldContext:
|
|
313
|
+
className: PropTypes.string,
|
|
314
|
+
onChange: PropTypes.func,
|
|
315
|
+
gotoFieldForm: PropTypes.func.isRequired,
|
|
316
|
+
closeFieldForm: PropTypes.func.isRequired,
|
|
317
|
+
fieldContext: PropTypes.any // eslint-disable-line react/forbid-prop-types
|
|
358
318
|
};
|
|
359
319
|
|
|
360
320
|
var defaultProps$P = {
|
|
@@ -383,18 +343,18 @@ var FieldForm = function FieldForm(_ref) {
|
|
|
383
343
|
var _ref2 = field || {},
|
|
384
344
|
_ref2$type = _ref2.type,
|
|
385
345
|
type = _ref2$type === void 0 ? null : _ref2$type,
|
|
386
|
-
fieldProps =
|
|
346
|
+
fieldProps = _objectWithoutProperties(_ref2, _excluded$8);
|
|
387
347
|
var fieldDefinition = fieldsManager.getDefinition(type) || null;
|
|
388
|
-
var fieldData = fieldDefinition ||
|
|
348
|
+
var fieldData = fieldDefinition || _objectSpread({}, field);
|
|
389
349
|
var _ref3 = fieldData || {},
|
|
390
350
|
_ref3$component = _ref3.component,
|
|
391
351
|
fieldComponent = _ref3$component === void 0 ? null : _ref3$component;
|
|
392
352
|
_ref3.id;
|
|
393
353
|
_ref3.settings;
|
|
394
|
-
var definitionProps =
|
|
354
|
+
var definitionProps = _objectWithoutProperties(_ref3, _excluded2);
|
|
395
355
|
var FieldComponent = contexts.useFieldComponent(fieldComponent);
|
|
396
356
|
var FormComponent = utils.getComponentFromName(form, formComponents);
|
|
397
|
-
var fieldValue =
|
|
357
|
+
var fieldValue = get(value, name, null);
|
|
398
358
|
var onFieldChange = function onFieldChange(newFieldValue) {
|
|
399
359
|
// const { name, fields: subFields = null } = field || {};
|
|
400
360
|
var newValue = utils.setFieldValue(value, name.split('.'), newFieldValue
|
|
@@ -417,9 +377,9 @@ var FieldForm = function FieldForm(_ref) {
|
|
|
417
377
|
closeForm: closeForm
|
|
418
378
|
};
|
|
419
379
|
if (form !== null) {
|
|
420
|
-
return FormComponent !== null ? /*#__PURE__*/
|
|
380
|
+
return FormComponent !== null ? /*#__PURE__*/React.createElement(contexts.FieldContextProvider, {
|
|
421
381
|
context: fieldContext
|
|
422
|
-
}, /*#__PURE__*/
|
|
382
|
+
}, /*#__PURE__*/React.createElement(FormComponent, Object.assign({
|
|
423
383
|
field: field
|
|
424
384
|
}, formProps, {
|
|
425
385
|
className: className
|
|
@@ -427,9 +387,9 @@ var FieldForm = function FieldForm(_ref) {
|
|
|
427
387
|
}
|
|
428
388
|
|
|
429
389
|
// Use field component with isForm props
|
|
430
|
-
return FieldComponent !== null ? /*#__PURE__*/
|
|
390
|
+
return FieldComponent !== null ? /*#__PURE__*/React.createElement(contexts.FieldContextProvider, {
|
|
431
391
|
context: fieldContext
|
|
432
|
-
}, /*#__PURE__*/
|
|
392
|
+
}, /*#__PURE__*/React.createElement(FieldComponent, Object.assign({
|
|
433
393
|
className: className
|
|
434
394
|
}, definitionProps, fieldProps, {
|
|
435
395
|
isForm: true
|
|
@@ -441,40 +401,40 @@ FieldForm.defaultProps = defaultProps$P;
|
|
|
441
401
|
var styles$v = {"actions":"micromag-core-forms-form-actions","left":"micromag-core-forms-form-left","right":"micromag-core-forms-form-right"};
|
|
442
402
|
|
|
443
403
|
var propTypes$O = {
|
|
444
|
-
action:
|
|
445
|
-
method:
|
|
404
|
+
action: PropTypes.string.isRequired,
|
|
405
|
+
method: PropTypes.string,
|
|
446
406
|
fields: core.PropTypes.formFields,
|
|
447
|
-
initialValue:
|
|
407
|
+
initialValue: PropTypes.object,
|
|
448
408
|
// eslint-disable-line react/forbid-prop-types
|
|
449
|
-
postForm:
|
|
409
|
+
postForm: PropTypes.func,
|
|
450
410
|
submitButtonLabel: core.PropTypes.label,
|
|
451
411
|
submitButtonLoadingLabel: core.PropTypes.label,
|
|
452
|
-
submitButtonTheme:
|
|
453
|
-
cancelButtonTheme:
|
|
412
|
+
submitButtonTheme: PropTypes.string,
|
|
413
|
+
cancelButtonTheme: PropTypes.string,
|
|
454
414
|
buttons: core.PropTypes.buttons,
|
|
455
|
-
children:
|
|
456
|
-
actionsAlign:
|
|
457
|
-
withoutActions:
|
|
458
|
-
withoutComplete:
|
|
459
|
-
withoutBackButton:
|
|
460
|
-
onComplete:
|
|
461
|
-
onResponse:
|
|
462
|
-
onMessage:
|
|
463
|
-
onCancel:
|
|
464
|
-
onCancelHref:
|
|
465
|
-
onOpenFieldForm:
|
|
466
|
-
onCloseFieldForm:
|
|
467
|
-
className:
|
|
468
|
-
fieldsClassName:
|
|
469
|
-
actionsClassName:
|
|
470
|
-
cancelClassName:
|
|
415
|
+
children: PropTypes.node,
|
|
416
|
+
actionsAlign: PropTypes.oneOf(['left', 'right']),
|
|
417
|
+
withoutActions: PropTypes.bool,
|
|
418
|
+
withoutComplete: PropTypes.bool,
|
|
419
|
+
withoutBackButton: PropTypes.bool,
|
|
420
|
+
onComplete: PropTypes.func,
|
|
421
|
+
onResponse: PropTypes.func,
|
|
422
|
+
onMessage: PropTypes.func,
|
|
423
|
+
onCancel: PropTypes.func,
|
|
424
|
+
onCancelHref: PropTypes.string,
|
|
425
|
+
onOpenFieldForm: PropTypes.func,
|
|
426
|
+
onCloseFieldForm: PropTypes.func,
|
|
427
|
+
className: PropTypes.string,
|
|
428
|
+
fieldsClassName: PropTypes.string,
|
|
429
|
+
actionsClassName: PropTypes.string,
|
|
430
|
+
cancelClassName: PropTypes.string
|
|
471
431
|
};
|
|
472
432
|
var defaultProps$O = {
|
|
473
433
|
method: 'POST',
|
|
474
434
|
fields: [],
|
|
475
435
|
initialValue: null,
|
|
476
436
|
postForm: null,
|
|
477
|
-
submitButtonLabel: /*#__PURE__*/
|
|
437
|
+
submitButtonLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
478
438
|
id: "ZLDmja",
|
|
479
439
|
defaultMessage: [{
|
|
480
440
|
"type": 0,
|
|
@@ -503,7 +463,6 @@ var defaultProps$O = {
|
|
|
503
463
|
cancelClassName: null
|
|
504
464
|
};
|
|
505
465
|
var Form = function Form(_ref) {
|
|
506
|
-
var _ref4;
|
|
507
466
|
var action = _ref.action,
|
|
508
467
|
method = _ref.method,
|
|
509
468
|
initialFields = _ref.fields,
|
|
@@ -531,7 +490,7 @@ var Form = function Form(_ref) {
|
|
|
531
490
|
actionsClassName = _ref.actionsClassName,
|
|
532
491
|
cancelClassName = _ref.cancelClassName;
|
|
533
492
|
var _useState = React.useState(false),
|
|
534
|
-
_useState2 =
|
|
493
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
535
494
|
complete = _useState2[0],
|
|
536
495
|
setComplete = _useState2[1];
|
|
537
496
|
React.useEffect(function () {
|
|
@@ -579,21 +538,21 @@ var Form = function Form(_ref) {
|
|
|
579
538
|
}, [response, onResponse, onMessage]);
|
|
580
539
|
var canSave = utils.validateFields(fields, value);
|
|
581
540
|
var _useState3 = React.useState([]),
|
|
582
|
-
_useState4 =
|
|
541
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
583
542
|
fieldPaths = _useState4[0],
|
|
584
543
|
setFieldPaths = _useState4[1];
|
|
585
544
|
var gotoFieldForm = React.useCallback(function (field) {
|
|
586
545
|
var formName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
587
546
|
var fieldKey = "".concat(field).concat(formName !== null ? ":".concat(formName) : '');
|
|
588
|
-
setFieldPaths([].concat(
|
|
547
|
+
setFieldPaths([].concat(_toConsumableArray(fieldPaths), [fieldKey]));
|
|
589
548
|
if (onOpenFieldForm !== null) {
|
|
590
549
|
onOpenFieldForm();
|
|
591
550
|
}
|
|
592
551
|
}, [fieldPaths, setFieldPaths]);
|
|
593
552
|
var closeFieldForm = React.useCallback(function () {
|
|
594
|
-
var newFields =
|
|
553
|
+
var newFields = _toConsumableArray(fieldPaths);
|
|
595
554
|
newFields.pop();
|
|
596
|
-
setFieldPaths(
|
|
555
|
+
setFieldPaths(_toConsumableArray(newFields));
|
|
597
556
|
if (onCloseFieldForm !== null) {
|
|
598
557
|
onCloseFieldForm();
|
|
599
558
|
}
|
|
@@ -609,63 +568,63 @@ var Form = function Form(_ref) {
|
|
|
609
568
|
// styles,
|
|
610
569
|
// );
|
|
611
570
|
|
|
612
|
-
return /*#__PURE__*/
|
|
571
|
+
return /*#__PURE__*/React.createElement("form", {
|
|
613
572
|
action: action,
|
|
614
|
-
className:
|
|
573
|
+
className: classNames([styles$v.container, _defineProperty({}, className, className !== null)]),
|
|
615
574
|
method: method,
|
|
616
575
|
onSubmit: onSubmit
|
|
617
|
-
}, !withoutBackButton && fields !== null && fields.length > 0 && fieldParams !== null ? /*#__PURE__*/
|
|
576
|
+
}, !withoutBackButton && fields !== null && fields.length > 0 && fieldParams !== null ? /*#__PURE__*/React.createElement("div", {
|
|
618
577
|
className: "mb-2"
|
|
619
|
-
}, /*#__PURE__*/
|
|
578
|
+
}, /*#__PURE__*/React.createElement(BackButton, {
|
|
620
579
|
theme: "secondary",
|
|
621
580
|
outline: true,
|
|
622
581
|
onClick: closeFieldForm
|
|
623
|
-
})) : null, fields !== null && fields.length > 0 && fieldParams !== null ? /*#__PURE__*/
|
|
624
|
-
className:
|
|
582
|
+
})) : null, fields !== null && fields.length > 0 && fieldParams !== null ? /*#__PURE__*/React.createElement("div", {
|
|
583
|
+
className: classNames(['w-100', styles$v.panel]),
|
|
625
584
|
key: "field"
|
|
626
|
-
}, /*#__PURE__*/
|
|
585
|
+
}, /*#__PURE__*/React.createElement(FieldForm, {
|
|
627
586
|
name: fieldName,
|
|
628
587
|
fields: fields,
|
|
629
588
|
value: value,
|
|
630
589
|
onChange: setValue,
|
|
631
590
|
gotoFieldForm: gotoFieldForm,
|
|
632
591
|
closeFieldForm: closeFieldForm
|
|
633
|
-
})) : null, FieldsComponent && fields !== null && fields.length > 0 && fieldParams === null ? /*#__PURE__*/
|
|
592
|
+
})) : null, FieldsComponent && fields !== null && fields.length > 0 && fieldParams === null ? /*#__PURE__*/React.createElement(FieldsComponent, {
|
|
634
593
|
fields: fields,
|
|
635
594
|
value: value,
|
|
636
595
|
errors: errors,
|
|
637
596
|
onChange: setValue,
|
|
638
597
|
gotoFieldForm: gotoFieldForm,
|
|
639
598
|
closeFieldForm: closeFieldForm,
|
|
640
|
-
className:
|
|
641
|
-
}) : null, generalError ? /*#__PURE__*/
|
|
599
|
+
className: classNames([styles$v.fields, _defineProperty({}, fieldsClassName, fieldsClassName !== null)])
|
|
600
|
+
}) : null, generalError ? /*#__PURE__*/React.createElement("p", {
|
|
642
601
|
className: "text-danger my-1"
|
|
643
|
-
}, generalError) : null, children, !withoutActions && fieldParams === null ? /*#__PURE__*/
|
|
644
|
-
className:
|
|
645
|
-
}, onCancel !== null || onCancelHref !== null ? /*#__PURE__*/
|
|
602
|
+
}, generalError) : null, children, !withoutActions && fieldParams === null ? /*#__PURE__*/React.createElement("div", {
|
|
603
|
+
className: classNames([styles$v.actions, _defineProperty(_defineProperty({}, styles$v[actionsAlign], actionsAlign), actionsClassName, actionsClassName !== null)])
|
|
604
|
+
}, onCancel !== null || onCancelHref !== null ? /*#__PURE__*/React.createElement(Button$1, {
|
|
646
605
|
type: "button",
|
|
647
606
|
onClick: onCancel,
|
|
648
607
|
href: onCancelHref,
|
|
649
608
|
theme: cancelButtonTheme || 'secondary',
|
|
650
609
|
outline: true,
|
|
651
610
|
disabled: status === 'loading',
|
|
652
|
-
className:
|
|
653
|
-
}, /*#__PURE__*/
|
|
611
|
+
className: classNames(['me-2', _defineProperty({}, cancelClassName, cancelClassName !== null)])
|
|
612
|
+
}, /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
654
613
|
id: "PyxZY2",
|
|
655
614
|
defaultMessage: [{
|
|
656
615
|
"type": 0,
|
|
657
616
|
"value": "Cancel"
|
|
658
617
|
}]
|
|
659
|
-
})) : null, buttons !== null ? /*#__PURE__*/
|
|
618
|
+
})) : null, buttons !== null ? /*#__PURE__*/React.createElement(Buttons, {
|
|
660
619
|
buttons: buttons,
|
|
661
620
|
className: styles$v.buttons
|
|
662
|
-
}) : /*#__PURE__*/
|
|
621
|
+
}) : /*#__PURE__*/React.createElement(Button$1, {
|
|
663
622
|
type: "submit",
|
|
664
623
|
theme: submitButtonTheme || 'primary',
|
|
665
624
|
disabled: status === 'loading' || !canSave
|
|
666
|
-
}, status === 'loading' ? submitButtonLoadingLabel || submitButtonLabel : submitButtonLabel), complete ? /*#__PURE__*/
|
|
625
|
+
}, status === 'loading' ? submitButtonLoadingLabel || submitButtonLabel : submitButtonLabel), complete ? /*#__PURE__*/React.createElement("p", {
|
|
667
626
|
className: "text-success mx-2 my-1"
|
|
668
|
-
}, /*#__PURE__*/
|
|
627
|
+
}, /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
669
628
|
id: "BpZoQZ",
|
|
670
629
|
defaultMessage: [{
|
|
671
630
|
"type": 0,
|
|
@@ -680,13 +639,13 @@ var styles$u = {"withoutStyle":"micromag-core-partials-link-withoutStyle"};
|
|
|
680
639
|
|
|
681
640
|
var _excluded$7 = ["href", "external", "children", "target", "rel", "className", "withoutStyle"];
|
|
682
641
|
var propTypes$N = {
|
|
683
|
-
href:
|
|
684
|
-
external:
|
|
685
|
-
target:
|
|
642
|
+
href: PropTypes.string,
|
|
643
|
+
external: PropTypes.bool,
|
|
644
|
+
target: PropTypes.string,
|
|
686
645
|
children: core.PropTypes.label,
|
|
687
|
-
rel:
|
|
688
|
-
withoutStyle:
|
|
689
|
-
className:
|
|
646
|
+
rel: PropTypes.string,
|
|
647
|
+
withoutStyle: PropTypes.bool,
|
|
648
|
+
className: PropTypes.string
|
|
690
649
|
};
|
|
691
650
|
var defaultProps$N = {
|
|
692
651
|
href: '',
|
|
@@ -705,49 +664,49 @@ var Link = function Link(_ref) {
|
|
|
705
664
|
rel = _ref.rel,
|
|
706
665
|
className = _ref.className,
|
|
707
666
|
withoutStyle = _ref.withoutStyle,
|
|
708
|
-
props =
|
|
709
|
-
return external ? /*#__PURE__*/
|
|
710
|
-
className:
|
|
667
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
668
|
+
return external ? /*#__PURE__*/React.createElement("a", Object.assign({
|
|
669
|
+
className: classNames([className, _defineProperty({}, styles$u.withoutStyle, withoutStyle)]),
|
|
711
670
|
href: href,
|
|
712
671
|
target: target,
|
|
713
672
|
rel: rel
|
|
714
|
-
}, props), /*#__PURE__*/
|
|
715
|
-
className:
|
|
673
|
+
}, props), /*#__PURE__*/React.createElement(Label, null, children)) : /*#__PURE__*/React.createElement(reactRouterDom.Link, Object.assign({
|
|
674
|
+
className: classNames([className, _defineProperty({}, styles$u.withoutStyle, withoutStyle)]),
|
|
716
675
|
to: href
|
|
717
|
-
}, props), /*#__PURE__*/
|
|
676
|
+
}, props), /*#__PURE__*/React.createElement(Label, null, children));
|
|
718
677
|
};
|
|
719
678
|
Link.propTypes = propTypes$N;
|
|
720
679
|
Link.defaultProps = defaultProps$N;
|
|
721
680
|
|
|
722
681
|
var _excluded$6 = ["label", "className"];
|
|
723
682
|
var propTypes$M = {
|
|
724
|
-
href:
|
|
725
|
-
header:
|
|
726
|
-
image:
|
|
727
|
-
imageAlt:
|
|
728
|
-
imageOverlay:
|
|
729
|
-
beforeBody:
|
|
683
|
+
href: PropTypes.string,
|
|
684
|
+
header: PropTypes.node,
|
|
685
|
+
image: PropTypes.node,
|
|
686
|
+
imageAlt: PropTypes.string,
|
|
687
|
+
imageOverlay: PropTypes.bool,
|
|
688
|
+
beforeBody: PropTypes.node,
|
|
730
689
|
title: core.PropTypes.label,
|
|
731
690
|
subtitle: core.PropTypes.label,
|
|
732
|
-
children:
|
|
733
|
-
afterBody:
|
|
734
|
-
links:
|
|
691
|
+
children: PropTypes.node,
|
|
692
|
+
afterBody: PropTypes.node,
|
|
693
|
+
links: PropTypes.arrayOf(PropTypes.shape({
|
|
735
694
|
label: core.PropTypes.label,
|
|
736
|
-
href:
|
|
695
|
+
href: PropTypes.string
|
|
737
696
|
})),
|
|
738
|
-
linksInSameBody:
|
|
739
|
-
footer:
|
|
740
|
-
theme:
|
|
741
|
-
className:
|
|
742
|
-
imageClassName:
|
|
743
|
-
headerClassName:
|
|
744
|
-
titleClassName:
|
|
745
|
-
subtitleClassName:
|
|
746
|
-
bodyClassName:
|
|
747
|
-
footerClassName:
|
|
748
|
-
onClick:
|
|
749
|
-
onClickBody:
|
|
750
|
-
onClickFooter:
|
|
697
|
+
linksInSameBody: PropTypes.bool,
|
|
698
|
+
footer: PropTypes.node,
|
|
699
|
+
theme: PropTypes.oneOf([null, 'dark', 'primary', 'light']),
|
|
700
|
+
className: PropTypes.string,
|
|
701
|
+
imageClassName: PropTypes.string,
|
|
702
|
+
headerClassName: PropTypes.string,
|
|
703
|
+
titleClassName: PropTypes.string,
|
|
704
|
+
subtitleClassName: PropTypes.string,
|
|
705
|
+
bodyClassName: PropTypes.string,
|
|
706
|
+
footerClassName: PropTypes.string,
|
|
707
|
+
onClick: PropTypes.func,
|
|
708
|
+
onClickBody: PropTypes.func,
|
|
709
|
+
onClickFooter: PropTypes.func
|
|
751
710
|
};
|
|
752
711
|
var defaultProps$M = {
|
|
753
712
|
href: null,
|
|
@@ -776,7 +735,6 @@ var defaultProps$M = {
|
|
|
776
735
|
onClickFooter: null
|
|
777
736
|
};
|
|
778
737
|
var Card = function Card(_ref) {
|
|
779
|
-
var _ref10;
|
|
780
738
|
var href = _ref.href,
|
|
781
739
|
header = _ref.header,
|
|
782
740
|
image = _ref.image,
|
|
@@ -805,61 +763,61 @@ var Card = function Card(_ref) {
|
|
|
805
763
|
var label = _ref2.label,
|
|
806
764
|
_ref2$className = _ref2.className,
|
|
807
765
|
linkClassName = _ref2$className === void 0 ? null : _ref2$className,
|
|
808
|
-
linkProps =
|
|
809
|
-
return /*#__PURE__*/
|
|
766
|
+
linkProps = _objectWithoutProperties(_ref2, _excluded$6);
|
|
767
|
+
return /*#__PURE__*/React.createElement(Link, Object.assign({
|
|
810
768
|
key: "link-".concat(label, "-").concat(index),
|
|
811
|
-
className:
|
|
769
|
+
className: classNames(['card-link', _defineProperty({}, linkClassName, linkClassName !== null)])
|
|
812
770
|
}, linkProps), label);
|
|
813
771
|
});
|
|
814
|
-
var bodyInner = title !== null || subtitle !== null || children !== null || links !== null && linksInSameBody ? /*#__PURE__*/
|
|
815
|
-
className:
|
|
816
|
-
}, /*#__PURE__*/
|
|
817
|
-
className:
|
|
818
|
-
}, /*#__PURE__*/
|
|
772
|
+
var bodyInner = title !== null || subtitle !== null || children !== null || links !== null && linksInSameBody ? /*#__PURE__*/React.createElement(React.Fragment, null, title !== null ? /*#__PURE__*/React.createElement("h5", {
|
|
773
|
+
className: classNames(['card-title', _defineProperty({}, titleClassName, titleClassName !== null)])
|
|
774
|
+
}, /*#__PURE__*/React.createElement(Label, null, title)) : null, subtitle !== null ? /*#__PURE__*/React.createElement("h6", {
|
|
775
|
+
className: classNames(['card-subtitle', _defineProperty({}, subtitleClassName, subtitleClassName !== null)])
|
|
776
|
+
}, /*#__PURE__*/React.createElement(Label, null, subtitle)) : null, children, links !== null && linksInSameBody ? /*#__PURE__*/React.createElement("div", {
|
|
819
777
|
className: "d-flex"
|
|
820
778
|
}, linksElements) : null) : null;
|
|
821
|
-
var cardInner = /*#__PURE__*/
|
|
822
|
-
className:
|
|
823
|
-
}, /*#__PURE__*/
|
|
779
|
+
var cardInner = /*#__PURE__*/React.createElement(React.Fragment, null, header !== null ? /*#__PURE__*/React.createElement("div", {
|
|
780
|
+
className: classNames(['card-header', _defineProperty({}, headerClassName, headerClassName !== null)])
|
|
781
|
+
}, /*#__PURE__*/React.createElement(Label, null, header)) : null, typeof image === 'string' ? /*#__PURE__*/React.createElement("img", {
|
|
824
782
|
src: image,
|
|
825
783
|
alt: imageAlt,
|
|
826
|
-
className:
|
|
827
|
-
}) : image, beforeBody, bodyInner !== null ? onClickBody !== null ? /*#__PURE__*/
|
|
784
|
+
className: classNames(['card-img-top', _defineProperty({}, imageClassName, imageClassName !== null)])
|
|
785
|
+
}) : image, beforeBody, bodyInner !== null ? onClickBody !== null ? /*#__PURE__*/React.createElement("button", {
|
|
828
786
|
type: "button",
|
|
829
|
-
className:
|
|
787
|
+
className: classNames(_defineProperty({
|
|
830
788
|
'card-body': !imageOverlay,
|
|
831
789
|
'card-img-overlay': imageOverlay
|
|
832
790
|
}, bodyClassName, bodyClassName !== null)),
|
|
833
791
|
onClick: onClickBody
|
|
834
|
-
}, bodyInner) : /*#__PURE__*/
|
|
835
|
-
className:
|
|
792
|
+
}, bodyInner) : /*#__PURE__*/React.createElement("div", {
|
|
793
|
+
className: classNames(_defineProperty({
|
|
836
794
|
'card-body': !imageOverlay,
|
|
837
795
|
'card-img-overlay': imageOverlay
|
|
838
796
|
}, bodyClassName, bodyClassName !== null))
|
|
839
|
-
}, bodyInner) : null, afterBody, links !== null && linksElements !== null && !linksInSameBody ? /*#__PURE__*/
|
|
797
|
+
}, bodyInner) : null, afterBody, links !== null && linksElements !== null && !linksInSameBody ? /*#__PURE__*/React.createElement("div", {
|
|
840
798
|
className: "card-body"
|
|
841
|
-
}, linksElements) : null, footer !== null ? onClickFooter !== null ? /*#__PURE__*/
|
|
799
|
+
}, linksElements) : null, footer !== null ? onClickFooter !== null ? /*#__PURE__*/React.createElement("button", {
|
|
842
800
|
type: "button",
|
|
843
|
-
className:
|
|
801
|
+
className: classNames(['card-footer', _defineProperty({}, footerClassName, footerClassName !== null)]),
|
|
844
802
|
onClick: onClickFooter
|
|
845
|
-
}, /*#__PURE__*/
|
|
846
|
-
className:
|
|
847
|
-
}, /*#__PURE__*/
|
|
848
|
-
var cardClassName =
|
|
803
|
+
}, /*#__PURE__*/React.createElement(Label, null, footer)) : /*#__PURE__*/React.createElement("div", {
|
|
804
|
+
className: classNames(['card-footer', _defineProperty({}, footerClassName, footerClassName !== null)])
|
|
805
|
+
}, /*#__PURE__*/React.createElement(Label, null, footer)) : null);
|
|
806
|
+
var cardClassName = classNames(['card', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "bg-".concat(theme), !imageOverlay && theme !== 'dark'), 'bg-dark', imageOverlay || theme === 'dark'), 'text-dark', theme === 'light'), 'text-light', imageOverlay || theme === 'dark' || theme === 'primary'), className, className !== null)]);
|
|
849
807
|
if (href !== null) {
|
|
850
|
-
return /*#__PURE__*/
|
|
808
|
+
return /*#__PURE__*/React.createElement(Link, {
|
|
851
809
|
href: href,
|
|
852
810
|
className: cardClassName
|
|
853
811
|
}, cardInner);
|
|
854
812
|
}
|
|
855
813
|
if (onClick !== null) {
|
|
856
|
-
return /*#__PURE__*/
|
|
814
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
857
815
|
type: "button",
|
|
858
|
-
className:
|
|
816
|
+
className: classNames(['p-0', 'text-start', cardClassName]),
|
|
859
817
|
onClick: onClick
|
|
860
818
|
}, cardInner);
|
|
861
819
|
}
|
|
862
|
-
return /*#__PURE__*/
|
|
820
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
863
821
|
className: cardClassName
|
|
864
822
|
}, cardInner);
|
|
865
823
|
};
|
|
@@ -869,10 +827,10 @@ Card.defaultProps = defaultProps$M;
|
|
|
869
827
|
var styles$t = {"container":"micromag-core-partials-spinner-container","path":"micromag-core-partials-spinner-path","animated":"micromag-core-partials-spinner-animated","rotate":"micromag-core-partials-spinner-rotate","dash":"micromag-core-partials-spinner-dash"};
|
|
870
828
|
|
|
871
829
|
var propTypes$L = {
|
|
872
|
-
animated:
|
|
873
|
-
color:
|
|
874
|
-
strokeWidth:
|
|
875
|
-
className:
|
|
830
|
+
animated: PropTypes.bool,
|
|
831
|
+
color: PropTypes.string,
|
|
832
|
+
strokeWidth: PropTypes.number,
|
|
833
|
+
className: PropTypes.string
|
|
876
834
|
};
|
|
877
835
|
var defaultProps$L = {
|
|
878
836
|
animated: true,
|
|
@@ -881,18 +839,17 @@ var defaultProps$L = {
|
|
|
881
839
|
className: null
|
|
882
840
|
};
|
|
883
841
|
var Spinner = function Spinner(_ref) {
|
|
884
|
-
var _ref2;
|
|
885
842
|
var animated = _ref.animated,
|
|
886
843
|
color = _ref.color,
|
|
887
844
|
strokeWidth = _ref.strokeWidth,
|
|
888
845
|
className = _ref.className;
|
|
889
|
-
return /*#__PURE__*/
|
|
890
|
-
className:
|
|
846
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
847
|
+
className: classNames([styles$t.container, _defineProperty(_defineProperty({}, styles$t.animated, animated), className, className !== null)]),
|
|
891
848
|
width: "40",
|
|
892
849
|
height: "40",
|
|
893
850
|
viewBox: "0 0 40 40",
|
|
894
851
|
xmlns: "http://www.w3.org/2000/svg"
|
|
895
|
-
}, /*#__PURE__*/
|
|
852
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
896
853
|
className: styles$t.path,
|
|
897
854
|
cx: "20",
|
|
898
855
|
cy: "20",
|
|
@@ -909,10 +866,10 @@ var styles$s = {};
|
|
|
909
866
|
|
|
910
867
|
var _excluded$5 = ["description", "loading", "children", "className"];
|
|
911
868
|
var propTypes$K = {
|
|
912
|
-
description:
|
|
913
|
-
loading:
|
|
914
|
-
children:
|
|
915
|
-
className:
|
|
869
|
+
description: PropTypes.node,
|
|
870
|
+
loading: PropTypes.bool,
|
|
871
|
+
children: PropTypes.node,
|
|
872
|
+
className: PropTypes.string
|
|
916
873
|
};
|
|
917
874
|
var defaultProps$K = {
|
|
918
875
|
description: null,
|
|
@@ -925,17 +882,17 @@ var FormPanel = function FormPanel(_ref) {
|
|
|
925
882
|
loading = _ref.loading,
|
|
926
883
|
children = _ref.children,
|
|
927
884
|
className = _ref.className,
|
|
928
|
-
props =
|
|
929
|
-
return /*#__PURE__*/
|
|
930
|
-
className:
|
|
931
|
-
}, props), description, loading ? /*#__PURE__*/
|
|
885
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
886
|
+
return /*#__PURE__*/React.createElement(Card, Object.assign({
|
|
887
|
+
className: classNames([styles$s.container, _defineProperty({}, className, className !== null)])
|
|
888
|
+
}, props), description, loading ? /*#__PURE__*/React.createElement(Spinner, null) : children);
|
|
932
889
|
};
|
|
933
890
|
FormPanel.propTypes = propTypes$K;
|
|
934
891
|
FormPanel.defaultProps = defaultProps$K;
|
|
935
892
|
|
|
936
893
|
var propTypes$J = {
|
|
937
|
-
className:
|
|
938
|
-
color:
|
|
894
|
+
className: PropTypes.string,
|
|
895
|
+
color: PropTypes.string
|
|
939
896
|
};
|
|
940
897
|
var defaultProps$J = {
|
|
941
898
|
className: null,
|
|
@@ -944,14 +901,14 @@ var defaultProps$J = {
|
|
|
944
901
|
var ArrowIcon = function ArrowIcon(_ref) {
|
|
945
902
|
var color = _ref.color,
|
|
946
903
|
className = _ref.className;
|
|
947
|
-
return /*#__PURE__*/
|
|
904
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
948
905
|
width: "20",
|
|
949
906
|
height: "14",
|
|
950
907
|
viewBox: "0 0 20 14",
|
|
951
908
|
fill: "none",
|
|
952
909
|
xmlns: "http://www.w3.org/2000/svg",
|
|
953
910
|
className: className
|
|
954
|
-
}, /*#__PURE__*/
|
|
911
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
955
912
|
fillRule: "evenodd",
|
|
956
913
|
clipRule: "evenodd",
|
|
957
914
|
d: "M13.353 0.371014L19.319 6.33704C19.6851 6.70314 19.6851 7.29671 19.319 7.66282L13.353 13.6288C12.9869 13.9949 12.3933 13.9949 12.0272 13.6288C11.6611 13.2627 11.6611 12.6692 12.0272 12.3031L16.3929 7.9374H0V6.06246H16.3929L12.0272 1.6968C11.6611 1.33069 11.6611 0.737119 12.0272 0.371014C12.3933 0.0049094 12.9869 0.0049094 13.353 0.371014Z",
|
|
@@ -962,8 +919,8 @@ ArrowIcon.propTypes = propTypes$J;
|
|
|
962
919
|
ArrowIcon.defaultProps = defaultProps$J;
|
|
963
920
|
|
|
964
921
|
var propTypes$I = {
|
|
965
|
-
className:
|
|
966
|
-
color:
|
|
922
|
+
className: PropTypes.string,
|
|
923
|
+
color: PropTypes.string
|
|
967
924
|
};
|
|
968
925
|
var defaultProps$I = {
|
|
969
926
|
className: null,
|
|
@@ -972,19 +929,19 @@ var defaultProps$I = {
|
|
|
972
929
|
var CloseIcon = function CloseIcon(_ref) {
|
|
973
930
|
var color = _ref.color,
|
|
974
931
|
className = _ref.className;
|
|
975
|
-
return /*#__PURE__*/
|
|
932
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
976
933
|
width: "22",
|
|
977
934
|
height: "22",
|
|
978
935
|
viewBox: "0 0 22 22",
|
|
979
936
|
fill: "none",
|
|
980
937
|
xmlns: "http://www.w3.org/2000/svg",
|
|
981
938
|
className: className
|
|
982
|
-
}, /*#__PURE__*/
|
|
939
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
983
940
|
d: "M1 1L21 21",
|
|
984
941
|
stroke: color,
|
|
985
942
|
strokeWidth: "1.5",
|
|
986
943
|
strokeLinecap: "round"
|
|
987
|
-
}), /*#__PURE__*/
|
|
944
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
988
945
|
d: "M1 21L21 0.999998",
|
|
989
946
|
stroke: color,
|
|
990
947
|
strokeWidth: "1.5",
|
|
@@ -995,8 +952,8 @@ CloseIcon.propTypes = propTypes$I;
|
|
|
995
952
|
CloseIcon.defaultProps = defaultProps$I;
|
|
996
953
|
|
|
997
954
|
var propTypes$H = {
|
|
998
|
-
className:
|
|
999
|
-
color:
|
|
955
|
+
className: PropTypes.string,
|
|
956
|
+
color: PropTypes.string
|
|
1000
957
|
};
|
|
1001
958
|
var defaultProps$H = {
|
|
1002
959
|
className: null,
|
|
@@ -1005,14 +962,14 @@ var defaultProps$H = {
|
|
|
1005
962
|
var FullscreenIcon = function FullscreenIcon(_ref) {
|
|
1006
963
|
var color = _ref.color,
|
|
1007
964
|
className = _ref.className;
|
|
1008
|
-
return /*#__PURE__*/
|
|
965
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
1009
966
|
width: "16",
|
|
1010
967
|
height: "14",
|
|
1011
968
|
viewBox: "0 0 16 14",
|
|
1012
969
|
fill: "none",
|
|
1013
970
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1014
971
|
className: className
|
|
1015
|
-
}, /*#__PURE__*/
|
|
972
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1016
973
|
d: "M11.2 0H16V4.66667H14.4V1.55556H11.2V0ZM0 0H4.8V1.55556H1.6V4.66667H0V0ZM14.4 12.4444V9.33333H16V14H11.2V12.4444H14.4ZM1.6 12.4444H4.8V14H0V9.33333H1.6V12.4444Z",
|
|
1017
974
|
fill: color
|
|
1018
975
|
}));
|
|
@@ -1021,8 +978,8 @@ FullscreenIcon.propTypes = propTypes$H;
|
|
|
1021
978
|
FullscreenIcon.defaultProps = defaultProps$H;
|
|
1022
979
|
|
|
1023
980
|
var propTypes$G = {
|
|
1024
|
-
className:
|
|
1025
|
-
color:
|
|
981
|
+
className: PropTypes.string,
|
|
982
|
+
color: PropTypes.string
|
|
1026
983
|
};
|
|
1027
984
|
var defaultProps$G = {
|
|
1028
985
|
className: null,
|
|
@@ -1031,20 +988,20 @@ var defaultProps$G = {
|
|
|
1031
988
|
var LinkIcon = function LinkIcon(_ref) {
|
|
1032
989
|
var color = _ref.color,
|
|
1033
990
|
className = _ref.className;
|
|
1034
|
-
return /*#__PURE__*/
|
|
991
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
1035
992
|
width: "16",
|
|
1036
993
|
height: "16",
|
|
1037
994
|
viewBox: "0 0 16 16",
|
|
1038
995
|
fill: "none",
|
|
1039
996
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1040
997
|
className: className
|
|
1041
|
-
}, /*#__PURE__*/
|
|
998
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1042
999
|
d: "M6.60207 8.70208C7.75493 10.2515 9.95019 10.5697 11.4965 9.40761C11.6277 9.31077 11.7589 9.2001 11.8762 9.08251L13.9749 6.97975C15.3417 5.61018 15.3417 3.39674 13.9749 2.02717C12.608 0.657609 10.3989 0.657609 9.03205 2.02717L7.83086 3.22381",
|
|
1043
1000
|
stroke: color,
|
|
1044
1001
|
strokeWidth: "1.25",
|
|
1045
1002
|
strokeLinecap: "round",
|
|
1046
1003
|
strokeLinejoin: "round"
|
|
1047
|
-
}), /*#__PURE__*/
|
|
1004
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
1048
1005
|
d: "M9.39793 7.29793C8.24507 5.74852 6.04981 5.43034 4.50345 6.59239C4.37229 6.68923 4.24113 6.7999 4.12377 6.91749L2.02515 9.02026C0.658284 10.3898 0.658284 12.6033 2.02515 13.9728C3.39201 15.3424 5.60109 15.3424 6.96795 13.9728L8.16223 12.7762",
|
|
1049
1006
|
stroke: color,
|
|
1050
1007
|
strokeWidth: "1.25",
|
|
@@ -1056,8 +1013,8 @@ LinkIcon.propTypes = propTypes$G;
|
|
|
1056
1013
|
LinkIcon.defaultProps = defaultProps$G;
|
|
1057
1014
|
|
|
1058
1015
|
var propTypes$F = {
|
|
1059
|
-
className:
|
|
1060
|
-
color:
|
|
1016
|
+
className: PropTypes.string,
|
|
1017
|
+
color: PropTypes.string
|
|
1061
1018
|
};
|
|
1062
1019
|
var defaultProps$F = {
|
|
1063
1020
|
className: null,
|
|
@@ -1066,20 +1023,20 @@ var defaultProps$F = {
|
|
|
1066
1023
|
var MuteIcon = function MuteIcon(_ref) {
|
|
1067
1024
|
var color = _ref.color,
|
|
1068
1025
|
className = _ref.className;
|
|
1069
|
-
return /*#__PURE__*/
|
|
1026
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
1070
1027
|
width: "26",
|
|
1071
1028
|
height: "26",
|
|
1072
1029
|
viewBox: "0 0 26 26",
|
|
1073
1030
|
fill: "none",
|
|
1074
1031
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1075
1032
|
className: className
|
|
1076
|
-
}, /*#__PURE__*/
|
|
1033
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1077
1034
|
d: "M7.09929 8.77987H1C0.447715 8.77987 0 9.22758 0 9.77987V15.7799C0 16.3322 0.447715 16.7799 1 16.7799H7.1076C7.35984 16.7799 7.60276 16.8752 7.78768 17.0467L14.3199 23.1062C14.9599 23.6999 16 23.246 16 22.3731V3.00199C16 2.12221 14.9458 1.67117 14.3095 2.2787L7.78983 8.50316C7.6038 8.68077 7.35649 8.77987 7.09929 8.77987Z",
|
|
1078
1035
|
fill: color
|
|
1079
|
-
}), /*#__PURE__*/
|
|
1036
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
1080
1037
|
d: "M18 18.6875C21.3137 18.6875 24 16.0012 24 12.6875C24 9.37379 21.3137 6.6875 18 6.6875",
|
|
1081
1038
|
stroke: color
|
|
1082
|
-
}), /*#__PURE__*/
|
|
1039
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
1083
1040
|
d: "M18 15.6875C19.6569 15.6875 21 14.3444 21 12.6875C21 11.0306 19.6569 9.6875 18 9.6875",
|
|
1084
1041
|
stroke: color
|
|
1085
1042
|
}));
|
|
@@ -1088,8 +1045,8 @@ MuteIcon.propTypes = propTypes$F;
|
|
|
1088
1045
|
MuteIcon.defaultProps = defaultProps$F;
|
|
1089
1046
|
|
|
1090
1047
|
var propTypes$E = {
|
|
1091
|
-
className:
|
|
1092
|
-
color:
|
|
1048
|
+
className: PropTypes.string,
|
|
1049
|
+
color: PropTypes.string
|
|
1093
1050
|
};
|
|
1094
1051
|
var defaultProps$E = {
|
|
1095
1052
|
className: null,
|
|
@@ -1098,19 +1055,19 @@ var defaultProps$E = {
|
|
|
1098
1055
|
var PauseIcon = function PauseIcon(_ref) {
|
|
1099
1056
|
var color = _ref.color,
|
|
1100
1057
|
className = _ref.className;
|
|
1101
|
-
return /*#__PURE__*/
|
|
1058
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
1102
1059
|
className: className,
|
|
1103
1060
|
width: "14",
|
|
1104
1061
|
height: "18",
|
|
1105
1062
|
viewBox: "0 0 14 18",
|
|
1106
1063
|
fill: "none",
|
|
1107
1064
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1108
|
-
}, /*#__PURE__*/
|
|
1065
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
1109
1066
|
width: "6",
|
|
1110
1067
|
height: "18",
|
|
1111
1068
|
rx: "2",
|
|
1112
1069
|
fill: color
|
|
1113
|
-
}), /*#__PURE__*/
|
|
1070
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
1114
1071
|
x: "8",
|
|
1115
1072
|
width: "6",
|
|
1116
1073
|
height: "18",
|
|
@@ -1122,8 +1079,8 @@ PauseIcon.propTypes = propTypes$E;
|
|
|
1122
1079
|
PauseIcon.defaultProps = defaultProps$E;
|
|
1123
1080
|
|
|
1124
1081
|
var propTypes$D = {
|
|
1125
|
-
className:
|
|
1126
|
-
color:
|
|
1082
|
+
className: PropTypes.string,
|
|
1083
|
+
color: PropTypes.string
|
|
1127
1084
|
};
|
|
1128
1085
|
var defaultProps$D = {
|
|
1129
1086
|
className: null,
|
|
@@ -1132,14 +1089,14 @@ var defaultProps$D = {
|
|
|
1132
1089
|
var PlayIcon = function PlayIcon(_ref) {
|
|
1133
1090
|
var color = _ref.color,
|
|
1134
1091
|
className = _ref.className;
|
|
1135
|
-
return /*#__PURE__*/
|
|
1092
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
1136
1093
|
width: "20",
|
|
1137
1094
|
height: "23",
|
|
1138
1095
|
viewBox: "0 0 20 23",
|
|
1139
1096
|
fill: "none",
|
|
1140
1097
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1141
1098
|
className: className
|
|
1142
|
-
}, /*#__PURE__*/
|
|
1099
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1143
1100
|
d: "M16.25 12.5574L2.74999 20.3516C1.74999 20.9289 0.499993 20.2073 0.499993 19.0526L0.499994 3.4641C0.499994 2.3094 1.74999 1.58771 2.74999 2.16506L16.25 9.95929C17.25 10.5366 17.25 11.98 16.25 12.5574Z",
|
|
1144
1101
|
fill: color,
|
|
1145
1102
|
stroke: color
|
|
@@ -1149,8 +1106,8 @@ PlayIcon.propTypes = propTypes$D;
|
|
|
1149
1106
|
PlayIcon.defaultProps = defaultProps$D;
|
|
1150
1107
|
|
|
1151
1108
|
var propTypes$C = {
|
|
1152
|
-
className:
|
|
1153
|
-
color:
|
|
1109
|
+
className: PropTypes.string,
|
|
1110
|
+
color: PropTypes.string
|
|
1154
1111
|
};
|
|
1155
1112
|
var defaultProps$C = {
|
|
1156
1113
|
className: null,
|
|
@@ -1159,17 +1116,17 @@ var defaultProps$C = {
|
|
|
1159
1116
|
var UnmuteIcon = function UnmuteIcon(_ref) {
|
|
1160
1117
|
var color = _ref.color,
|
|
1161
1118
|
className = _ref.className;
|
|
1162
|
-
return /*#__PURE__*/
|
|
1119
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
1163
1120
|
width: "26",
|
|
1164
1121
|
height: "26",
|
|
1165
1122
|
viewBox: "0 0 26 26",
|
|
1166
1123
|
fill: "none",
|
|
1167
1124
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1168
1125
|
className: className
|
|
1169
|
-
}, /*#__PURE__*/
|
|
1126
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1170
1127
|
d: "M7.09929 8.77987H1C0.447715 8.77987 0 9.22758 0 9.77987V15.7799C0 16.3322 0.447715 16.7799 1 16.7799H7.1076C7.35984 16.7799 7.60276 16.8752 7.78768 17.0467L14.3199 23.1062C14.9599 23.6999 16 23.246 16 22.3731V3.00199C16 2.12221 14.9458 1.67117 14.3095 2.2787L7.78983 8.50316C7.6038 8.68077 7.35649 8.77987 7.09929 8.77987Z",
|
|
1171
1128
|
fill: color
|
|
1172
|
-
}), /*#__PURE__*/
|
|
1129
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
1173
1130
|
fillRule: "evenodd",
|
|
1174
1131
|
clipRule: "evenodd",
|
|
1175
1132
|
d: "M20.8536 13.3946L23 15.5411L23.7071 14.834L21.5607 12.6875L23.7071 10.5411L23 9.83398L20.8536 11.9804L18.7071 9.83398L18 10.5411L20.1464 12.6875L18 14.834L18.7071 15.5411L20.8536 13.3946Z",
|
|
@@ -1184,10 +1141,10 @@ var styles$r = {"container":"micromag-core-menus-breadcrumb-container","arrow":"
|
|
|
1184
1141
|
var propTypes$B = {
|
|
1185
1142
|
items: core.PropTypes.menuItems,
|
|
1186
1143
|
theme: core.PropTypes.bootstrapThemes,
|
|
1187
|
-
separator:
|
|
1188
|
-
withoutBar:
|
|
1189
|
-
noWrap:
|
|
1190
|
-
className:
|
|
1144
|
+
separator: PropTypes.oneOf([null, 'arrow']),
|
|
1145
|
+
withoutBar: PropTypes.bool,
|
|
1146
|
+
noWrap: PropTypes.bool,
|
|
1147
|
+
className: PropTypes.string
|
|
1191
1148
|
};
|
|
1192
1149
|
var defaultProps$B = {
|
|
1193
1150
|
items: [],
|
|
@@ -1204,36 +1161,35 @@ var Breadcrumb = function Breadcrumb(_ref) {
|
|
|
1204
1161
|
withoutBar = _ref.withoutBar,
|
|
1205
1162
|
noWrap = _ref.noWrap,
|
|
1206
1163
|
className = _ref.className;
|
|
1207
|
-
return /*#__PURE__*/
|
|
1164
|
+
return /*#__PURE__*/React.createElement("nav", {
|
|
1208
1165
|
className: className
|
|
1209
|
-
}, /*#__PURE__*/
|
|
1210
|
-
className:
|
|
1166
|
+
}, /*#__PURE__*/React.createElement("ol", {
|
|
1167
|
+
className: classNames([styles$r.container, 'breadcrumb', 'mb-0', {
|
|
1211
1168
|
'p-0': withoutBar,
|
|
1212
1169
|
'bg-transparent': withoutBar,
|
|
1213
1170
|
'rounded-0': withoutBar,
|
|
1214
1171
|
'flex-nowrap': noWrap
|
|
1215
1172
|
}])
|
|
1216
1173
|
}, items.map(function (_ref2, index) {
|
|
1217
|
-
var _ref3;
|
|
1218
1174
|
var url = _ref2.url,
|
|
1219
1175
|
label = _ref2.label,
|
|
1220
1176
|
_ref2$active = _ref2.active,
|
|
1221
1177
|
active = _ref2$active === void 0 ? false : _ref2$active,
|
|
1222
1178
|
_ref2$onClick = _ref2.onClick,
|
|
1223
1179
|
onClick = _ref2$onClick === void 0 ? null : _ref2$onClick;
|
|
1224
|
-
return /*#__PURE__*/
|
|
1225
|
-
className:
|
|
1180
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
1181
|
+
className: classNames(['breadcrumb-item', _defineProperty(_defineProperty({
|
|
1226
1182
|
active: active
|
|
1227
|
-
},
|
|
1183
|
+
}, styles$r.arrow, separator === 'arrow'), "text-".concat(theme), active && theme !== null)]),
|
|
1228
1184
|
key: "item-".concat(index)
|
|
1229
|
-
}, active ? /*#__PURE__*/
|
|
1185
|
+
}, active ? /*#__PURE__*/React.createElement(Label, null, label) : null, !active && url ? /*#__PURE__*/React.createElement(reactRouterDom.Link, {
|
|
1230
1186
|
to: url,
|
|
1231
1187
|
onClick: onClick,
|
|
1232
|
-
className:
|
|
1233
|
-
}, /*#__PURE__*/
|
|
1188
|
+
className: classNames(['font-weight-bold', 'text-decoration-none', _defineProperty({}, "text-".concat(theme), theme !== null)])
|
|
1189
|
+
}, /*#__PURE__*/React.createElement(Label, null, label)) : null, !active && onClick ? /*#__PURE__*/React.createElement(Button$1, {
|
|
1234
1190
|
onClick: onClick,
|
|
1235
|
-
className:
|
|
1236
|
-
}, /*#__PURE__*/
|
|
1191
|
+
className: classNames(['font-weight-bold', 'text-decoration-none', _defineProperty({}, "text-".concat(theme), theme !== null)])
|
|
1192
|
+
}, /*#__PURE__*/React.createElement(Label, null, label)) : null);
|
|
1237
1193
|
})));
|
|
1238
1194
|
};
|
|
1239
1195
|
Breadcrumb.propTypes = propTypes$B;
|
|
@@ -1242,13 +1198,13 @@ Breadcrumb.defaultProps = defaultProps$B;
|
|
|
1242
1198
|
var _excluded$4 = ["type", "className", "label", "children", "onClick", "active"];
|
|
1243
1199
|
var propTypes$A = {
|
|
1244
1200
|
items: core.PropTypes.menuItems,
|
|
1245
|
-
children:
|
|
1246
|
-
visible:
|
|
1201
|
+
children: PropTypes.node,
|
|
1202
|
+
visible: PropTypes.bool,
|
|
1247
1203
|
align: core.PropTypes.dropdownAlign,
|
|
1248
|
-
className:
|
|
1249
|
-
itemClassName:
|
|
1250
|
-
onClickItem:
|
|
1251
|
-
onClickOutside:
|
|
1204
|
+
className: PropTypes.string,
|
|
1205
|
+
itemClassName: PropTypes.string,
|
|
1206
|
+
onClickItem: PropTypes.func,
|
|
1207
|
+
onClickOutside: PropTypes.func
|
|
1252
1208
|
};
|
|
1253
1209
|
var defaultProps$A = {
|
|
1254
1210
|
items: [],
|
|
@@ -1261,7 +1217,6 @@ var defaultProps$A = {
|
|
|
1261
1217
|
onClickOutside: null
|
|
1262
1218
|
};
|
|
1263
1219
|
var Dropdown = function Dropdown(_ref) {
|
|
1264
|
-
var _ref2;
|
|
1265
1220
|
var items = _ref.items,
|
|
1266
1221
|
children = _ref.children,
|
|
1267
1222
|
visible = _ref.visible,
|
|
@@ -1272,7 +1227,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
1272
1227
|
onClickOutside = _ref.onClickOutside;
|
|
1273
1228
|
var refContainer = React.useRef(null);
|
|
1274
1229
|
var _useState = React.useState(visible),
|
|
1275
|
-
_useState2 =
|
|
1230
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1276
1231
|
enabled = _useState2[0],
|
|
1277
1232
|
setEnabled = _useState2[1];
|
|
1278
1233
|
var onDocumentClick = React.useCallback(function (e) {
|
|
@@ -1291,11 +1246,10 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
1291
1246
|
clearTimeout(id);
|
|
1292
1247
|
};
|
|
1293
1248
|
}, [visible, setEnabled]);
|
|
1294
|
-
return /*#__PURE__*/
|
|
1295
|
-
className:
|
|
1249
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1250
|
+
className: classNames(['dropdown-menu', _defineProperty(_defineProperty(_defineProperty({}, "dropdown-menu-".concat(align), align !== null), "show", visible), className, className !== null)]),
|
|
1296
1251
|
ref: refContainer
|
|
1297
1252
|
}, children !== null ? children : items.map(function (it, index) {
|
|
1298
|
-
var _ref3;
|
|
1299
1253
|
var _it$type = it.type,
|
|
1300
1254
|
type = _it$type === void 0 ? 'link' : _it$type,
|
|
1301
1255
|
_it$className = it.className,
|
|
@@ -1308,7 +1262,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
1308
1262
|
customOnClick = _it$onClick === void 0 ? null : _it$onClick,
|
|
1309
1263
|
_it$active = it.active,
|
|
1310
1264
|
active = _it$active === void 0 ? false : _it$active,
|
|
1311
|
-
itemProps =
|
|
1265
|
+
itemProps = _objectWithoutProperties(it, _excluded$4);
|
|
1312
1266
|
var ItemComponent = 'div';
|
|
1313
1267
|
if (type === 'link') {
|
|
1314
1268
|
ItemComponent = Link;
|
|
@@ -1327,17 +1281,17 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
1327
1281
|
onClickItem(e);
|
|
1328
1282
|
}
|
|
1329
1283
|
} : null;
|
|
1330
|
-
return ItemComponent !== null ? /*#__PURE__*/
|
|
1284
|
+
return ItemComponent !== null ? /*#__PURE__*/React.createElement("div", {
|
|
1331
1285
|
key: "item-".concat(index + 1, "-").concat(label, "-").concat(type)
|
|
1332
|
-
}, /*#__PURE__*/
|
|
1333
|
-
className:
|
|
1286
|
+
}, /*#__PURE__*/React.createElement(ItemComponent, Object.assign({
|
|
1287
|
+
className: classNames([_defineProperty(_defineProperty({
|
|
1334
1288
|
'dropdown-item': type === 'link' || type === 'button',
|
|
1335
1289
|
'dropdown-divider': type === 'divider',
|
|
1336
1290
|
'dropdown-header': type === 'header',
|
|
1337
1291
|
active: active
|
|
1338
|
-
},
|
|
1292
|
+
}, itemClassName, itemClassName !== null), customClassName, customClassName !== null)]),
|
|
1339
1293
|
onClick: finalOnClickItem
|
|
1340
|
-
}, itemProps), label !== null ? /*#__PURE__*/
|
|
1294
|
+
}, itemProps), label !== null ? /*#__PURE__*/React.createElement(Label, null, label) : itemChildren)) : null;
|
|
1341
1295
|
}));
|
|
1342
1296
|
};
|
|
1343
1297
|
Dropdown.propTypes = propTypes$A;
|
|
@@ -1346,21 +1300,21 @@ Dropdown.defaultProps = defaultProps$A;
|
|
|
1346
1300
|
var _excluded$3 = ["id", "className", "linkClassName", "href", "label", "external", "items", "dropdown", "active", "onClick"];
|
|
1347
1301
|
var propTypes$z = {
|
|
1348
1302
|
items: core.PropTypes.menuItems,
|
|
1349
|
-
tagName:
|
|
1350
|
-
itemTagName:
|
|
1351
|
-
children:
|
|
1352
|
-
linkAsItem:
|
|
1353
|
-
className:
|
|
1354
|
-
itemClassName:
|
|
1355
|
-
linkClassName:
|
|
1356
|
-
hasSubMenuClassName:
|
|
1357
|
-
subMenuClassName:
|
|
1358
|
-
subMenuItemClassName:
|
|
1359
|
-
subMenuLinkClassName:
|
|
1360
|
-
hasDropdownClassName:
|
|
1361
|
-
dropdownClassName:
|
|
1362
|
-
dropdownItemClassName:
|
|
1363
|
-
dropdownLinkClassName:
|
|
1303
|
+
tagName: PropTypes.string,
|
|
1304
|
+
itemTagName: PropTypes.string,
|
|
1305
|
+
children: PropTypes.node,
|
|
1306
|
+
linkAsItem: PropTypes.bool,
|
|
1307
|
+
className: PropTypes.string,
|
|
1308
|
+
itemClassName: PropTypes.string,
|
|
1309
|
+
linkClassName: PropTypes.string,
|
|
1310
|
+
hasSubMenuClassName: PropTypes.string,
|
|
1311
|
+
subMenuClassName: PropTypes.string,
|
|
1312
|
+
subMenuItemClassName: PropTypes.string,
|
|
1313
|
+
subMenuLinkClassName: PropTypes.string,
|
|
1314
|
+
hasDropdownClassName: PropTypes.string,
|
|
1315
|
+
dropdownClassName: PropTypes.string,
|
|
1316
|
+
dropdownItemClassName: PropTypes.string,
|
|
1317
|
+
dropdownLinkClassName: PropTypes.string,
|
|
1364
1318
|
dropdownAlign: core.PropTypes.dropdownAlign
|
|
1365
1319
|
};
|
|
1366
1320
|
var defaultProps$z = {
|
|
@@ -1403,14 +1357,13 @@ var Menu = function Menu(_ref) {
|
|
|
1403
1357
|
var _useState = React.useState(items.map(function () {
|
|
1404
1358
|
return false;
|
|
1405
1359
|
})),
|
|
1406
|
-
_useState2 =
|
|
1360
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1407
1361
|
dropdownsVisible = _useState2[0],
|
|
1408
1362
|
setDropdownsVisible = _useState2[1];
|
|
1409
1363
|
var ListComponent = linkAsItem ? 'div' : tagName;
|
|
1410
|
-
return /*#__PURE__*/
|
|
1364
|
+
return /*#__PURE__*/React.createElement(ListComponent, {
|
|
1411
1365
|
className: className
|
|
1412
1366
|
}, children !== null ? children : items.map(function (it, index) {
|
|
1413
|
-
var _classNames, _classNames2, _classNames3, _classNames4, _classNames5, _classNames6, _classNames7, _classNames8;
|
|
1414
1367
|
var id = it.id,
|
|
1415
1368
|
_it$className = it.className,
|
|
1416
1369
|
customClassName = _it$className === void 0 ? null : _it$className,
|
|
@@ -1429,51 +1382,51 @@ var Menu = function Menu(_ref) {
|
|
|
1429
1382
|
active = _it$active === void 0 ? false : _it$active,
|
|
1430
1383
|
_it$onClick = it.onClick,
|
|
1431
1384
|
customOnClick = _it$onClick === void 0 ? null : _it$onClick,
|
|
1432
|
-
itemProps =
|
|
1385
|
+
itemProps = _objectWithoutProperties(it, _excluded$3);
|
|
1433
1386
|
var onClickItem = dropdown !== null ? function (e) {
|
|
1434
1387
|
e.preventDefault();
|
|
1435
|
-
setDropdownsVisible([].concat(
|
|
1388
|
+
setDropdownsVisible([].concat(_toConsumableArray(dropdownsVisible.slice(0, index)), [!(dropdownsVisible[index] || false)], _toConsumableArray(dropdownsVisible.slice(index + 1))));
|
|
1436
1389
|
if (customOnClick !== null) {
|
|
1437
1390
|
customOnClick(e);
|
|
1438
1391
|
}
|
|
1439
1392
|
} : customOnClick;
|
|
1440
1393
|
var closeDropdown = dropdown !== null ? function () {
|
|
1441
|
-
setDropdownsVisible([].concat(
|
|
1394
|
+
setDropdownsVisible([].concat(_toConsumableArray(dropdownsVisible.slice(0, index)), [false], _toConsumableArray(dropdownsVisible.slice(index + 1))));
|
|
1442
1395
|
} : null;
|
|
1443
1396
|
var ItemComponent = itemTagName;
|
|
1444
|
-
return linkAsItem ? /*#__PURE__*/
|
|
1397
|
+
return linkAsItem ? /*#__PURE__*/React.createElement(Link, Object.assign({}, itemProps, {
|
|
1445
1398
|
key: "item-".concat(id || index),
|
|
1446
1399
|
onClick: onClickItem,
|
|
1447
1400
|
href: href,
|
|
1448
1401
|
external: external,
|
|
1449
|
-
className:
|
|
1402
|
+
className: classNames(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
1450
1403
|
active: active
|
|
1451
|
-
},
|
|
1452
|
-
}), label) : /*#__PURE__*/
|
|
1404
|
+
}, itemClassName, itemClassName !== null), customClassName, customClassName !== null), linkClassName, linkClassName !== null), customLinkClassName, customLinkClassName !== null))
|
|
1405
|
+
}), label) : /*#__PURE__*/React.createElement(ItemComponent, {
|
|
1453
1406
|
key: "item-".concat(id || index),
|
|
1454
|
-
className:
|
|
1407
|
+
className: classNames(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
1455
1408
|
dropdown: dropdown !== null,
|
|
1456
1409
|
active: active
|
|
1457
|
-
},
|
|
1458
|
-
}, href !== null ? /*#__PURE__*/
|
|
1410
|
+
}, itemClassName, itemClassName !== null), customClassName, customClassName !== null), hasSubMenuClassName, subItems !== null && hasSubMenuClassName !== null), hasDropdownClassName, subItems !== null && hasDropdownClassName !== null))
|
|
1411
|
+
}, href !== null ? /*#__PURE__*/React.createElement(Link, Object.assign({}, itemProps, {
|
|
1459
1412
|
onClick: onClickItem,
|
|
1460
1413
|
href: href,
|
|
1461
1414
|
external: external,
|
|
1462
|
-
className:
|
|
1463
|
-
}), label) : null, href === null && onClickItem !== null ? /*#__PURE__*/
|
|
1415
|
+
className: classNames(_defineProperty(_defineProperty(_defineProperty({}, linkClassName, linkClassName !== null), 'dropdown-toggle', dropdown !== null), customLinkClassName, customLinkClassName !== null))
|
|
1416
|
+
}), label) : null, href === null && onClickItem !== null ? /*#__PURE__*/React.createElement(Button$1, Object.assign({}, itemProps, {
|
|
1464
1417
|
onClick: onClickItem,
|
|
1465
|
-
className:
|
|
1466
|
-
}), label) : null, subItems !== null ? /*#__PURE__*/
|
|
1418
|
+
className: classNames(_defineProperty(_defineProperty(_defineProperty({}, linkClassName, linkClassName !== null), 'dropdown-toggle', dropdown !== null), customLinkClassName, customLinkClassName !== null))
|
|
1419
|
+
}), label) : null, subItems !== null ? /*#__PURE__*/React.createElement(Menu, {
|
|
1467
1420
|
items: subItems,
|
|
1468
1421
|
className: subMenuClassName,
|
|
1469
|
-
itemClassName:
|
|
1470
|
-
linkClassName:
|
|
1471
|
-
}) : null, dropdown !== null ? /*#__PURE__*/
|
|
1422
|
+
itemClassName: classNames(_defineProperty(_defineProperty({}, subMenuItemClassName, subMenuItemClassName !== null), itemClassName, subMenuItemClassName === null && itemClassName !== null)),
|
|
1423
|
+
linkClassName: classNames(_defineProperty(_defineProperty({}, subMenuLinkClassName, subMenuLinkClassName !== null), linkClassName, subMenuLinkClassName === null && linkClassName !== null))
|
|
1424
|
+
}) : null, dropdown !== null ? /*#__PURE__*/React.createElement(Dropdown, {
|
|
1472
1425
|
items: dropdown,
|
|
1473
1426
|
visible: dropdownsVisible[index] || false,
|
|
1474
1427
|
className: dropdownClassName,
|
|
1475
|
-
itemClassName:
|
|
1476
|
-
linkClassName:
|
|
1428
|
+
itemClassName: classNames(_defineProperty(_defineProperty({}, dropdownItemClassName, dropdownItemClassName !== null), itemClassName, dropdownItemClassName === null && itemClassName !== null)),
|
|
1429
|
+
linkClassName: classNames(_defineProperty(_defineProperty({}, dropdownLinkClassName, dropdownLinkClassName !== null), linkClassName, dropdownLinkClassName === null && linkClassName !== null)),
|
|
1477
1430
|
align: dropdownAlign,
|
|
1478
1431
|
onClickItem: closeDropdown,
|
|
1479
1432
|
onClickOutside: closeDropdown
|
|
@@ -1486,20 +1439,20 @@ Menu.defaultProps = defaultProps$z;
|
|
|
1486
1439
|
var styles$q = {"collapse":"micromag-core-menus-navbar-collapse"};
|
|
1487
1440
|
|
|
1488
1441
|
var propTypes$y = {
|
|
1489
|
-
brand:
|
|
1490
|
-
brandLink:
|
|
1491
|
-
breadcrumbs:
|
|
1492
|
-
theme:
|
|
1493
|
-
size:
|
|
1494
|
-
compact:
|
|
1495
|
-
noWrap:
|
|
1496
|
-
withoutCollapse:
|
|
1497
|
-
withoutCollapseToggle:
|
|
1498
|
-
children:
|
|
1499
|
-
className:
|
|
1500
|
-
brandClassName:
|
|
1501
|
-
breadCrumbsClassName:
|
|
1502
|
-
collapseClassName:
|
|
1442
|
+
brand: PropTypes.node,
|
|
1443
|
+
brandLink: PropTypes.string,
|
|
1444
|
+
breadcrumbs: PropTypes.node,
|
|
1445
|
+
theme: PropTypes.oneOf(['light', 'dark', 'primary', null]),
|
|
1446
|
+
size: PropTypes.oneOf(['sm', 'md', 'lg']),
|
|
1447
|
+
compact: PropTypes.bool,
|
|
1448
|
+
noWrap: PropTypes.bool,
|
|
1449
|
+
withoutCollapse: PropTypes.bool,
|
|
1450
|
+
withoutCollapseToggle: PropTypes.bool,
|
|
1451
|
+
children: PropTypes.node,
|
|
1452
|
+
className: PropTypes.string,
|
|
1453
|
+
brandClassName: PropTypes.string,
|
|
1454
|
+
breadCrumbsClassName: PropTypes.string,
|
|
1455
|
+
collapseClassName: PropTypes.string
|
|
1503
1456
|
};
|
|
1504
1457
|
var defaultProps$y = {
|
|
1505
1458
|
brand: null,
|
|
@@ -1518,7 +1471,6 @@ var defaultProps$y = {
|
|
|
1518
1471
|
collapseClassName: null
|
|
1519
1472
|
};
|
|
1520
1473
|
var Navbar = function Navbar(_ref) {
|
|
1521
|
-
var _ref2, _ref6;
|
|
1522
1474
|
var brand = _ref.brand,
|
|
1523
1475
|
brandLink = _ref.brandLink,
|
|
1524
1476
|
breadcrumbs = _ref.breadcrumbs,
|
|
@@ -1534,42 +1486,42 @@ var Navbar = function Navbar(_ref) {
|
|
|
1534
1486
|
breadCrumbsClassName = _ref.breadCrumbsClassName,
|
|
1535
1487
|
collapseClassName = _ref.collapseClassName;
|
|
1536
1488
|
var _useState = React.useState(false),
|
|
1537
|
-
_useState2 =
|
|
1489
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1538
1490
|
menuVisible = _useState2[0],
|
|
1539
1491
|
setMenuVisible = _useState2[1];
|
|
1540
1492
|
var onClickMenu = React.useCallback(function () {
|
|
1541
1493
|
return setMenuVisible(!menuVisible);
|
|
1542
1494
|
}, [setMenuVisible, menuVisible]);
|
|
1543
|
-
return /*#__PURE__*/
|
|
1544
|
-
className:
|
|
1545
|
-
}, /*#__PURE__*/
|
|
1546
|
-
className:
|
|
1495
|
+
return /*#__PURE__*/React.createElement("nav", {
|
|
1496
|
+
className: classNames(['navbar', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "bg-".concat(theme), theme !== null), "navbar-".concat(theme === 'light' ? 'light' : 'dark'), theme !== null), "text-".concat(theme === 'light' ? 'dark' : 'light'), theme !== null), "navbar-expand-".concat(size), !withoutCollapse), 'navbar-expand', withoutCollapse), 'py-2', compact), 'px-2', compact), 'flex-nowrap', noWrap), className, className !== null)])
|
|
1497
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1498
|
+
className: classNames(['container-fluid', {
|
|
1547
1499
|
'px-0': compact
|
|
1548
1500
|
}])
|
|
1549
|
-
}, brand !== null && brandLink !== null ? /*#__PURE__*/
|
|
1550
|
-
className:
|
|
1501
|
+
}, brand !== null && brandLink !== null ? /*#__PURE__*/React.createElement(Link, {
|
|
1502
|
+
className: classNames(['navbar-brand', _defineProperty({
|
|
1551
1503
|
'py-0': compact
|
|
1552
1504
|
}, brandClassName, brandClassName !== null)]),
|
|
1553
1505
|
to: brandLink
|
|
1554
|
-
}, brand) : null, brand !== null && brandLink === null ? /*#__PURE__*/
|
|
1555
|
-
className:
|
|
1506
|
+
}, brand) : null, brand !== null && brandLink === null ? /*#__PURE__*/React.createElement("span", {
|
|
1507
|
+
className: classNames(['navbar-brand', _defineProperty({
|
|
1556
1508
|
'py-0': compact
|
|
1557
1509
|
}, brandClassName, brandClassName !== null)])
|
|
1558
|
-
}, brand) : null, breadcrumbs !== null ? /*#__PURE__*/
|
|
1559
|
-
className:
|
|
1510
|
+
}, brand) : null, breadcrumbs !== null ? /*#__PURE__*/React.createElement("span", {
|
|
1511
|
+
className: classNames(['navbar-breadcrumbs', _defineProperty({
|
|
1560
1512
|
'py-0': compact
|
|
1561
1513
|
}, breadCrumbsClassName, breadCrumbsClassName !== null)])
|
|
1562
|
-
}, breadcrumbs) : null, !withoutCollapse && !withoutCollapseToggle ? /*#__PURE__*/
|
|
1514
|
+
}, breadcrumbs) : null, !withoutCollapse && !withoutCollapseToggle ? /*#__PURE__*/React.createElement(Button$1, {
|
|
1563
1515
|
className: "navbar-toggler",
|
|
1564
1516
|
onClick: onClickMenu,
|
|
1565
1517
|
withoutTheme: true,
|
|
1566
1518
|
"aria-controls": "navbarSupportedContent",
|
|
1567
1519
|
"aria-expanded": "false",
|
|
1568
1520
|
"aria-label": "Toggle navigation"
|
|
1569
|
-
}, /*#__PURE__*/
|
|
1521
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
1570
1522
|
className: "navbar-toggler-icon"
|
|
1571
|
-
})) : null, !withoutCollapse ? /*#__PURE__*/
|
|
1572
|
-
className:
|
|
1523
|
+
})) : null, !withoutCollapse ? /*#__PURE__*/React.createElement("div", {
|
|
1524
|
+
className: classNames(['navbar-collapse', 'collapse', styles$q.collapse, _defineProperty(_defineProperty({}, collapseClassName, collapseClassName !== null), "show", menuVisible)])
|
|
1573
1525
|
}, children) : children));
|
|
1574
1526
|
};
|
|
1575
1527
|
Navbar.propTypes = propTypes$y;
|
|
@@ -1594,20 +1546,27 @@ var messages = reactIntl.defineMessages({
|
|
|
1594
1546
|
}
|
|
1595
1547
|
});
|
|
1596
1548
|
var propTypes$x = {
|
|
1597
|
-
page:
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1549
|
+
page: PropTypes.number,
|
|
1550
|
+
lastPage: PropTypes.number,
|
|
1551
|
+
maxPages: PropTypes.number,
|
|
1552
|
+
total: PropTypes.number,
|
|
1553
|
+
url: PropTypes.string,
|
|
1554
|
+
query: PropTypes.object,
|
|
1555
|
+
// eslint-disable-line react/forbid-prop-types
|
|
1556
|
+
withPreviousNext: PropTypes.bool,
|
|
1557
|
+
className: PropTypes.string,
|
|
1558
|
+
paginationClassName: PropTypes.string,
|
|
1559
|
+
itemClassName: PropTypes.string,
|
|
1560
|
+
linkClassName: PropTypes.string,
|
|
1561
|
+
onClickPage: PropTypes.func
|
|
1606
1562
|
};
|
|
1607
1563
|
var defaultProps$x = {
|
|
1608
1564
|
page: 1,
|
|
1565
|
+
lastPage: 1,
|
|
1566
|
+
maxPages: 10,
|
|
1609
1567
|
total: 1,
|
|
1610
1568
|
url: null,
|
|
1569
|
+
query: null,
|
|
1611
1570
|
withPreviousNext: false,
|
|
1612
1571
|
className: null,
|
|
1613
1572
|
paginationClassName: null,
|
|
@@ -1616,9 +1575,12 @@ var defaultProps$x = {
|
|
|
1616
1575
|
onClickPage: null
|
|
1617
1576
|
};
|
|
1618
1577
|
var PaginationMenu = function PaginationMenu(_ref) {
|
|
1619
|
-
var
|
|
1620
|
-
|
|
1578
|
+
var parentPage = _ref.page,
|
|
1579
|
+
parentLastPage = _ref.lastPage,
|
|
1580
|
+
parentMaxPages = _ref.maxPages,
|
|
1581
|
+
parentTotal = _ref.total,
|
|
1621
1582
|
url = _ref.url,
|
|
1583
|
+
query = _ref.query,
|
|
1622
1584
|
withPreviousNext = _ref.withPreviousNext,
|
|
1623
1585
|
className = _ref.className,
|
|
1624
1586
|
paginationClassName = _ref.paginationClassName,
|
|
@@ -1626,53 +1588,80 @@ var PaginationMenu = function PaginationMenu(_ref) {
|
|
|
1626
1588
|
linkClassName = _ref.linkClassName,
|
|
1627
1589
|
onClickPage = _ref.onClickPage;
|
|
1628
1590
|
var getUrl = React.useCallback(function (currentPage) {
|
|
1629
|
-
return url !== null ? "".concat(url).concat(
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1591
|
+
return url !== null ? "".concat(url, "?").concat(queryString.stringify(_objectSpread(_objectSpread({}, query), {}, {
|
|
1592
|
+
page: currentPage
|
|
1593
|
+
}), {
|
|
1594
|
+
arrayFormat: 'bracket'
|
|
1595
|
+
})) : null;
|
|
1596
|
+
}, [url, query]);
|
|
1597
|
+
|
|
1598
|
+
// TODO: test this
|
|
1599
|
+
// const pages = [...Array(total).keys()].map((it) => it + 1);
|
|
1600
|
+
|
|
1601
|
+
var page = parseInt(parentPage, 10);
|
|
1602
|
+
var total = parseInt(parentTotal, 10);
|
|
1603
|
+
var maxPages = parseInt(parentMaxPages, 10);
|
|
1604
|
+
var lastPage = parseInt(parentLastPage, 10);
|
|
1605
|
+
var pageNumbers = Array.from({
|
|
1606
|
+
length: parseInt(lastPage, 10)
|
|
1607
|
+
}, function (_, i) {
|
|
1608
|
+
return i + 1;
|
|
1633
1609
|
});
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1610
|
+
var stripPages = maxPages !== null && lastPage > maxPages;
|
|
1611
|
+
var startPage = stripPages ? Math.min(Math.max(page - maxPages / 2, 1), lastPage - maxPages) : null;
|
|
1612
|
+
var endPage = stripPages ? startPage + maxPages : null;
|
|
1613
|
+
var strippedPages = stripPages ? pageNumbers.reduce(function (selectedPages, pageNumber) {
|
|
1614
|
+
if (pageNumber === 1 && startPage - 1 > 1) {
|
|
1615
|
+
return [pageNumber, '...'];
|
|
1616
|
+
}
|
|
1617
|
+
if (pageNumber === lastPage && endPage + 1 < lastPage) {
|
|
1618
|
+
return [].concat(_toConsumableArray(selectedPages), ['...', pageNumber]);
|
|
1619
|
+
}
|
|
1620
|
+
return pageNumber >= startPage && pageNumber <= endPage ? [].concat(_toConsumableArray(selectedPages), [pageNumber]) : selectedPages;
|
|
1621
|
+
}, []) : pageNumbers;
|
|
1622
|
+
var pages = strippedPages.length > 0 ? strippedPages : [1];
|
|
1623
|
+
return /*#__PURE__*/React.createElement("nav", {
|
|
1624
|
+
className: classNames([styles$p.container, _defineProperty({}, className, className !== null)])
|
|
1625
|
+
}, /*#__PURE__*/React.createElement("ul", {
|
|
1626
|
+
className: classNames(['pagination', _defineProperty({}, paginationClassName, paginationClassName !== null)])
|
|
1627
|
+
}, withPreviousNext ? /*#__PURE__*/React.createElement("li", {
|
|
1628
|
+
className: classNames(['page-item', _defineProperty({
|
|
1640
1629
|
disabled: page <= 1
|
|
1641
1630
|
}, itemClassName, itemClassName !== null)])
|
|
1642
|
-
}, page > 1 ? /*#__PURE__*/
|
|
1643
|
-
className:
|
|
1631
|
+
}, page > 1 ? /*#__PURE__*/React.createElement(Link, {
|
|
1632
|
+
className: classNames(['page-link', _defineProperty({}, linkClassName, linkClassName !== null)]),
|
|
1644
1633
|
href: getUrl(page - 1),
|
|
1645
1634
|
onClick: onClickPage !== null ? function () {
|
|
1646
1635
|
return onClickPage(page - 1);
|
|
1647
1636
|
} : null
|
|
1648
|
-
}, messages.previous) : /*#__PURE__*/
|
|
1649
|
-
className:
|
|
1650
|
-
}, /*#__PURE__*/
|
|
1651
|
-
return /*#__PURE__*/
|
|
1637
|
+
}, messages.previous) : /*#__PURE__*/React.createElement("span", {
|
|
1638
|
+
className: classNames(['page-link', _defineProperty({}, linkClassName, linkClassName !== null)])
|
|
1639
|
+
}, /*#__PURE__*/React.createElement(Label, null, messages.previous))) : null, pages.map(function (pageNumber) {
|
|
1640
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
1652
1641
|
key: "page-".concat(pageNumber),
|
|
1653
|
-
className:
|
|
1642
|
+
className: classNames(['page-item', _defineProperty({
|
|
1654
1643
|
active: pageNumber === page
|
|
1655
1644
|
}, itemClassName, itemClassName !== null)])
|
|
1656
|
-
}, /*#__PURE__*/
|
|
1657
|
-
className:
|
|
1645
|
+
}, /*#__PURE__*/React.createElement(Link, {
|
|
1646
|
+
className: classNames(['page-link', _defineProperty({}, linkClassName, linkClassName !== null)]),
|
|
1658
1647
|
href: getUrl(pageNumber),
|
|
1659
1648
|
onClick: onClickPage !== null ? function () {
|
|
1660
1649
|
return onClickPage(pageNumber);
|
|
1661
1650
|
} : null
|
|
1662
1651
|
}, pageNumber));
|
|
1663
|
-
}), withPreviousNext ? /*#__PURE__*/
|
|
1664
|
-
className:
|
|
1652
|
+
}), withPreviousNext ? /*#__PURE__*/React.createElement("li", {
|
|
1653
|
+
className: classNames(['page-item', _defineProperty({
|
|
1665
1654
|
disabled: page >= total
|
|
1666
1655
|
}, itemClassName, itemClassName !== null)])
|
|
1667
|
-
}, page < total ? /*#__PURE__*/
|
|
1668
|
-
className:
|
|
1656
|
+
}, page < total ? /*#__PURE__*/React.createElement(Link, {
|
|
1657
|
+
className: classNames(['page-link', _defineProperty({}, linkClassName, linkClassName !== null)]),
|
|
1669
1658
|
href: getUrl(page + 1),
|
|
1670
1659
|
onClick: onClickPage !== null ? function () {
|
|
1671
1660
|
return onClickPage(page + 1);
|
|
1672
1661
|
} : null
|
|
1673
|
-
}, messages.next) : /*#__PURE__*/
|
|
1674
|
-
className:
|
|
1675
|
-
}, /*#__PURE__*/
|
|
1662
|
+
}, messages.next) : /*#__PURE__*/React.createElement("span", {
|
|
1663
|
+
className: classNames(['page-link', _defineProperty({}, linkClassName, linkClassName !== null)])
|
|
1664
|
+
}, /*#__PURE__*/React.createElement(Label, null, messages.next))) : null));
|
|
1676
1665
|
};
|
|
1677
1666
|
PaginationMenu.propTypes = propTypes$x;
|
|
1678
1667
|
PaginationMenu.defaultProps = defaultProps$x;
|
|
@@ -1683,10 +1672,10 @@ var propTypes$w = {
|
|
|
1683
1672
|
items: core.PropTypes.menuItems,
|
|
1684
1673
|
size: core.PropTypes.buttonSize,
|
|
1685
1674
|
theme: core.PropTypes.buttonTheme,
|
|
1686
|
-
renderItemButton:
|
|
1687
|
-
buttonClassName:
|
|
1688
|
-
className:
|
|
1689
|
-
onClickItem:
|
|
1675
|
+
renderItemButton: PropTypes.func,
|
|
1676
|
+
buttonClassName: PropTypes.string,
|
|
1677
|
+
className: PropTypes.string,
|
|
1678
|
+
onClickItem: PropTypes.func
|
|
1690
1679
|
};
|
|
1691
1680
|
var defaultProps$w = {
|
|
1692
1681
|
items: [],
|
|
@@ -1705,16 +1694,16 @@ var TabsMenu = function TabsMenu(_ref) {
|
|
|
1705
1694
|
buttonClassName = _ref.buttonClassName,
|
|
1706
1695
|
className = _ref.className,
|
|
1707
1696
|
onClickItem = _ref.onClickItem;
|
|
1708
|
-
return /*#__PURE__*/
|
|
1709
|
-
className:
|
|
1710
|
-
}, /*#__PURE__*/
|
|
1697
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1698
|
+
className: classNames([styles$o.container, _defineProperty({}, className, className)])
|
|
1699
|
+
}, /*#__PURE__*/React.createElement(Buttons, {
|
|
1711
1700
|
buttons: items,
|
|
1712
1701
|
size: size,
|
|
1713
1702
|
theme: theme,
|
|
1714
1703
|
renderButton: renderItemButton,
|
|
1715
1704
|
onClickButton: onClickItem,
|
|
1716
1705
|
className: styles$o.buttons,
|
|
1717
|
-
buttonClassName:
|
|
1706
|
+
buttonClassName: classNames([styles$o.button, _defineProperty({}, buttonClassName, buttonClassName !== null)])
|
|
1718
1707
|
}));
|
|
1719
1708
|
};
|
|
1720
1709
|
TabsMenu.propTypes = propTypes$w;
|
|
@@ -1724,8 +1713,8 @@ var styles$n = {"container":"micromag-core-modals-container","modals":"micromag-
|
|
|
1724
1713
|
|
|
1725
1714
|
var propTypes$v = {
|
|
1726
1715
|
modals: core.PropTypes.modals.isRequired,
|
|
1727
|
-
setModalsContainer:
|
|
1728
|
-
className:
|
|
1716
|
+
setModalsContainer: PropTypes.func.isRequired,
|
|
1717
|
+
className: PropTypes.string
|
|
1729
1718
|
};
|
|
1730
1719
|
var defaultProps$v = {
|
|
1731
1720
|
className: null
|
|
@@ -1738,10 +1727,10 @@ var ModalsContainer = function ModalsContainer(_ref) {
|
|
|
1738
1727
|
React.useEffect(function () {
|
|
1739
1728
|
setModalsContainer(containerRef.current);
|
|
1740
1729
|
}, []);
|
|
1741
|
-
return /*#__PURE__*/
|
|
1742
|
-
className:
|
|
1743
|
-
}, /*#__PURE__*/
|
|
1744
|
-
className:
|
|
1730
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1731
|
+
className: classNames([styles$n.container, _defineProperty({}, className, className)])
|
|
1732
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1733
|
+
className: classNames([styles$n.modals, _defineProperty({}, styles$n.hasModals, modals.length > 0)]),
|
|
1745
1734
|
ref: containerRef
|
|
1746
1735
|
}));
|
|
1747
1736
|
};
|
|
@@ -1753,14 +1742,14 @@ var styles$m = {"container":"micromag-core-modals-modal-container","center":"mic
|
|
|
1753
1742
|
|
|
1754
1743
|
/* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
|
|
1755
1744
|
var propTypes$u = {
|
|
1756
|
-
id:
|
|
1757
|
-
data:
|
|
1745
|
+
id: PropTypes.string,
|
|
1746
|
+
data: PropTypes.object,
|
|
1758
1747
|
// eslint-disable-line react/forbid-prop-types
|
|
1759
|
-
container:
|
|
1748
|
+
container: PropTypes.object,
|
|
1760
1749
|
// eslint-disable-line react/forbid-prop-types
|
|
1761
|
-
register:
|
|
1762
|
-
unregister:
|
|
1763
|
-
children:
|
|
1750
|
+
register: PropTypes.func,
|
|
1751
|
+
unregister: PropTypes.func,
|
|
1752
|
+
children: PropTypes.node
|
|
1764
1753
|
};
|
|
1765
1754
|
var defaultProps$u = {
|
|
1766
1755
|
id: null,
|
|
@@ -1790,17 +1779,17 @@ var ElementPortal = function ElementPortal(_ref) {
|
|
|
1790
1779
|
}
|
|
1791
1780
|
};
|
|
1792
1781
|
}, [finalId, data]);
|
|
1793
|
-
return container !== null ? /*#__PURE__*/
|
|
1782
|
+
return container !== null ? /*#__PURE__*/ReactDOM.createPortal(children, container) : null;
|
|
1794
1783
|
};
|
|
1795
1784
|
ElementPortal.propTypes = propTypes$u;
|
|
1796
1785
|
ElementPortal.defaultProps = defaultProps$u;
|
|
1797
1786
|
|
|
1798
1787
|
/* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
|
|
1799
1788
|
var propTypes$t = {
|
|
1800
|
-
id:
|
|
1801
|
-
data:
|
|
1789
|
+
id: PropTypes.string,
|
|
1790
|
+
data: PropTypes.object,
|
|
1802
1791
|
// eslint-disable-line react/forbid-prop-types
|
|
1803
|
-
children:
|
|
1792
|
+
children: PropTypes.node
|
|
1804
1793
|
};
|
|
1805
1794
|
var defaultProps$t = {
|
|
1806
1795
|
id: null,
|
|
@@ -1817,7 +1806,7 @@ var ModalPortal = function ModalPortal(_ref) {
|
|
|
1817
1806
|
register = _useModals$register === void 0 ? null : _useModals$register,
|
|
1818
1807
|
_useModals$unregister = _useModals.unregister,
|
|
1819
1808
|
unregister = _useModals$unregister === void 0 ? null : _useModals$unregister;
|
|
1820
|
-
return /*#__PURE__*/
|
|
1809
|
+
return /*#__PURE__*/React.createElement(ElementPortal, {
|
|
1821
1810
|
id: id,
|
|
1822
1811
|
data: data,
|
|
1823
1812
|
container: container,
|
|
@@ -1829,10 +1818,10 @@ ModalPortal.propTypes = propTypes$t;
|
|
|
1829
1818
|
ModalPortal.defaultProps = defaultProps$t;
|
|
1830
1819
|
|
|
1831
1820
|
var propTypes$s = {
|
|
1832
|
-
id:
|
|
1833
|
-
title:
|
|
1834
|
-
position:
|
|
1835
|
-
children:
|
|
1821
|
+
id: PropTypes.string,
|
|
1822
|
+
title: PropTypes.string,
|
|
1823
|
+
position: PropTypes.oneOf(['center', 'top']),
|
|
1824
|
+
children: PropTypes.node
|
|
1836
1825
|
};
|
|
1837
1826
|
var defaultProps$s = {
|
|
1838
1827
|
id: null,
|
|
@@ -1853,13 +1842,13 @@ var Modal = function Modal(_ref) {
|
|
|
1853
1842
|
title: title
|
|
1854
1843
|
};
|
|
1855
1844
|
}, [title]);
|
|
1856
|
-
return /*#__PURE__*/
|
|
1845
|
+
return /*#__PURE__*/React.createElement(ModalPortal, {
|
|
1857
1846
|
id: finalId,
|
|
1858
1847
|
data: data
|
|
1859
|
-
}, /*#__PURE__*/
|
|
1860
|
-
className:
|
|
1861
|
-
}, /*#__PURE__*/
|
|
1862
|
-
className:
|
|
1848
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1849
|
+
className: classNames([styles$m.container, _defineProperty({}, styles$m[position], position !== null)])
|
|
1850
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1851
|
+
className: classNames([styles$m.inner, 'bg-dark'])
|
|
1863
1852
|
}, children)));
|
|
1864
1853
|
};
|
|
1865
1854
|
Modal.propTypes = propTypes$s;
|
|
@@ -1869,14 +1858,14 @@ var styles$l = {"container":"micromag-core-modals-dialog-container"};
|
|
|
1869
1858
|
|
|
1870
1859
|
var propTypes$r = {
|
|
1871
1860
|
title: core.PropTypes.label,
|
|
1872
|
-
header:
|
|
1873
|
-
children:
|
|
1874
|
-
footer:
|
|
1861
|
+
header: PropTypes.node,
|
|
1862
|
+
children: PropTypes.node,
|
|
1863
|
+
footer: PropTypes.node,
|
|
1875
1864
|
buttons: core.PropTypes.buttons,
|
|
1876
1865
|
// theme: PropTypes.oneOf([null, 'dark', 'light']),
|
|
1877
|
-
onClickClose:
|
|
1878
|
-
className:
|
|
1879
|
-
bodyClassName:
|
|
1866
|
+
onClickClose: PropTypes.func,
|
|
1867
|
+
className: PropTypes.string,
|
|
1868
|
+
bodyClassName: PropTypes.string
|
|
1880
1869
|
};
|
|
1881
1870
|
var defaultProps$r = {
|
|
1882
1871
|
title: null,
|
|
@@ -1898,29 +1887,29 @@ var ModalDialog = function ModalDialog(_ref) {
|
|
|
1898
1887
|
onClickClose = _ref.onClickClose,
|
|
1899
1888
|
className = _ref.className,
|
|
1900
1889
|
bodyClassName = _ref.bodyClassName;
|
|
1901
|
-
return /*#__PURE__*/
|
|
1902
|
-
className:
|
|
1890
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1891
|
+
className: classNames(['modal-dialog', styles$l.container, _defineProperty({}, className, className)]),
|
|
1903
1892
|
role: "dialog"
|
|
1904
|
-
}, /*#__PURE__*/
|
|
1893
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1905
1894
|
className: "modal-content"
|
|
1906
|
-
}, header || /*#__PURE__*/
|
|
1907
|
-
className:
|
|
1895
|
+
}, header || /*#__PURE__*/React.createElement("div", {
|
|
1896
|
+
className: classNames(['modal-header', 'p-2', styles$l.header, {
|
|
1908
1897
|
// 'bg-dark': theme === 'dark',
|
|
1909
1898
|
// 'border-dark': theme === 'dark',
|
|
1910
1899
|
// 'text-light': theme === 'dark',
|
|
1911
1900
|
}])
|
|
1912
|
-
}, /*#__PURE__*/
|
|
1901
|
+
}, /*#__PURE__*/React.createElement("h5", {
|
|
1913
1902
|
className: "modal-title"
|
|
1914
|
-
}, /*#__PURE__*/
|
|
1903
|
+
}, /*#__PURE__*/React.createElement(Label, null, title)), /*#__PURE__*/React.createElement("button", {
|
|
1915
1904
|
type: "button",
|
|
1916
1905
|
className: "btn-close",
|
|
1917
1906
|
"aria-label": "Close",
|
|
1918
1907
|
onClick: onClickClose
|
|
1919
|
-
})), /*#__PURE__*/
|
|
1920
|
-
className:
|
|
1921
|
-
}, children), footer !== null || buttons !== null ? /*#__PURE__*/
|
|
1922
|
-
className:
|
|
1923
|
-
}, footer, buttons !== null ? /*#__PURE__*/
|
|
1908
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
1909
|
+
className: classNames(['modal-body', 'p-2', styles$l.body, _defineProperty({}, bodyClassName, bodyClassName !== null)])
|
|
1910
|
+
}, children), footer !== null || buttons !== null ? /*#__PURE__*/React.createElement("div", {
|
|
1911
|
+
className: classNames(['modal-footer', styles$l.footer])
|
|
1912
|
+
}, footer, buttons !== null ? /*#__PURE__*/React.createElement(Buttons, {
|
|
1924
1913
|
buttons: buttons,
|
|
1925
1914
|
className: styles$l.buttons
|
|
1926
1915
|
}) : null) : null));
|
|
@@ -1929,8 +1918,9 @@ ModalDialog.propTypes = propTypes$r;
|
|
|
1929
1918
|
ModalDialog.defaultProps = defaultProps$r;
|
|
1930
1919
|
|
|
1931
1920
|
// import classNames from 'classnames';
|
|
1932
|
-
|
|
1933
|
-
|
|
1921
|
+
// import { DashboardModal } from '@uppy/react';
|
|
1922
|
+
var DashboardModal = /*#__PURE__*/React.lazy(function () {
|
|
1923
|
+
return import('@uppy/react').then(function (_ref) {
|
|
1934
1924
|
var Component = _ref.DashboardModal;
|
|
1935
1925
|
return {
|
|
1936
1926
|
"default": Component
|
|
@@ -1938,11 +1928,11 @@ var DashboardModal = /*#__PURE__*/React__default["default"].lazy(function () {
|
|
|
1938
1928
|
});
|
|
1939
1929
|
});
|
|
1940
1930
|
var propTypes$q = {
|
|
1941
|
-
type:
|
|
1942
|
-
opened:
|
|
1943
|
-
sources:
|
|
1944
|
-
onUploaded:
|
|
1945
|
-
onRequestClose:
|
|
1931
|
+
type: PropTypes.oneOfType([core.PropTypes.mediaTypes, PropTypes.array]),
|
|
1932
|
+
opened: PropTypes.bool,
|
|
1933
|
+
sources: PropTypes.arrayOf(PropTypes.string),
|
|
1934
|
+
onUploaded: PropTypes.func,
|
|
1935
|
+
onRequestClose: PropTypes.func
|
|
1946
1936
|
};
|
|
1947
1937
|
var defaultProps$q = {
|
|
1948
1938
|
type: null,
|
|
@@ -1963,7 +1953,7 @@ var UploadModal = function UploadModal(_ref2) {
|
|
|
1963
1953
|
}
|
|
1964
1954
|
}, [onUploaded]);
|
|
1965
1955
|
var fileTypes = React.useMemo(function () {
|
|
1966
|
-
if (
|
|
1956
|
+
if (isArray(type)) {
|
|
1967
1957
|
return type.map(function (t) {
|
|
1968
1958
|
return ['image', 'video', 'audio'].indexOf(t) !== -1 ? "".concat(t, "/*") : null;
|
|
1969
1959
|
}).filter(function (t) {
|
|
@@ -1982,9 +1972,9 @@ var UploadModal = function UploadModal(_ref2) {
|
|
|
1982
1972
|
uppy.reset();
|
|
1983
1973
|
}
|
|
1984
1974
|
}, [uppy, opened]);
|
|
1985
|
-
return uppy !== null ? /*#__PURE__*/
|
|
1986
|
-
fallback: /*#__PURE__*/
|
|
1987
|
-
}, /*#__PURE__*/
|
|
1975
|
+
return uppy !== null ? /*#__PURE__*/React.createElement(React.Suspense, {
|
|
1976
|
+
fallback: /*#__PURE__*/React.createElement("div", null)
|
|
1977
|
+
}, /*#__PURE__*/React.createElement(DashboardModal, {
|
|
1988
1978
|
uppy: uppy,
|
|
1989
1979
|
open: opened,
|
|
1990
1980
|
closeAfterFinish: true,
|
|
@@ -1999,8 +1989,8 @@ var styles$k = {"container":"micromag-core-panels-container"};
|
|
|
1999
1989
|
|
|
2000
1990
|
var propTypes$p = {
|
|
2001
1991
|
panels: core.PropTypes.panels,
|
|
2002
|
-
setPanelsContainer:
|
|
2003
|
-
className:
|
|
1992
|
+
setPanelsContainer: PropTypes.func,
|
|
1993
|
+
className: PropTypes.string
|
|
2004
1994
|
};
|
|
2005
1995
|
var defaultProps$p = {
|
|
2006
1996
|
panels: [],
|
|
@@ -2015,10 +2005,10 @@ var PanelsContainer = function PanelsContainer(_ref) {
|
|
|
2015
2005
|
React.useEffect(function () {
|
|
2016
2006
|
setPanelsContainer(containerRef.current);
|
|
2017
2007
|
}, []);
|
|
2018
|
-
return /*#__PURE__*/
|
|
2019
|
-
className:
|
|
2020
|
-
}, /*#__PURE__*/
|
|
2021
|
-
className:
|
|
2008
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2009
|
+
className: classNames([styles$k.container, _defineProperty({}, className, className)])
|
|
2010
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2011
|
+
className: classNames([styles$k.panels, _defineProperty({}, styles$k.hasPanels, panels.length > 0)]),
|
|
2022
2012
|
ref: containerRef
|
|
2023
2013
|
}));
|
|
2024
2014
|
};
|
|
@@ -2028,10 +2018,10 @@ var Panels = contexts.withPanels(PanelsContainer);
|
|
|
2028
2018
|
|
|
2029
2019
|
/* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
|
|
2030
2020
|
var propTypes$o = {
|
|
2031
|
-
id:
|
|
2032
|
-
data:
|
|
2021
|
+
id: PropTypes.string,
|
|
2022
|
+
data: PropTypes.object,
|
|
2033
2023
|
// eslint-disable-line react/forbid-prop-types
|
|
2034
|
-
children:
|
|
2024
|
+
children: PropTypes.node
|
|
2035
2025
|
};
|
|
2036
2026
|
var defaultProps$o = {
|
|
2037
2027
|
id: null,
|
|
@@ -2053,7 +2043,7 @@ var PanelPortal = function PanelPortal(_ref) {
|
|
|
2053
2043
|
if (panels === null) {
|
|
2054
2044
|
return children;
|
|
2055
2045
|
}
|
|
2056
|
-
return /*#__PURE__*/
|
|
2046
|
+
return /*#__PURE__*/React.createElement(ElementPortal, {
|
|
2057
2047
|
id: id,
|
|
2058
2048
|
data: data,
|
|
2059
2049
|
container: container,
|
|
@@ -2068,9 +2058,9 @@ var styles$j = {"container":"micromag-core-panels-panel-container"};
|
|
|
2068
2058
|
|
|
2069
2059
|
/* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
|
|
2070
2060
|
var propTypes$n = {
|
|
2071
|
-
id:
|
|
2072
|
-
title:
|
|
2073
|
-
children:
|
|
2061
|
+
id: PropTypes.string,
|
|
2062
|
+
title: PropTypes.string,
|
|
2063
|
+
children: PropTypes.node
|
|
2074
2064
|
};
|
|
2075
2065
|
var defaultProps$n = {
|
|
2076
2066
|
id: null,
|
|
@@ -2089,10 +2079,10 @@ var Panel = function Panel(_ref) {
|
|
|
2089
2079
|
title: title
|
|
2090
2080
|
};
|
|
2091
2081
|
}, [title]);
|
|
2092
|
-
return /*#__PURE__*/
|
|
2082
|
+
return /*#__PURE__*/React.createElement(PanelPortal, {
|
|
2093
2083
|
id: finalId,
|
|
2094
2084
|
data: data
|
|
2095
|
-
}, /*#__PURE__*/
|
|
2085
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2096
2086
|
className: styles$j.container
|
|
2097
2087
|
}, children));
|
|
2098
2088
|
};
|
|
@@ -2102,13 +2092,13 @@ Panel.defaultProps = defaultProps$n;
|
|
|
2102
2092
|
var styles$i = {"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"};
|
|
2103
2093
|
|
|
2104
2094
|
var propTypes$m = {
|
|
2105
|
-
title:
|
|
2106
|
-
children:
|
|
2107
|
-
className:
|
|
2108
|
-
topClassName:
|
|
2109
|
-
contentClassName:
|
|
2110
|
-
openedClassName:
|
|
2111
|
-
buttonClassName:
|
|
2095
|
+
title: PropTypes.node,
|
|
2096
|
+
children: PropTypes.node,
|
|
2097
|
+
className: PropTypes.string,
|
|
2098
|
+
topClassName: PropTypes.string,
|
|
2099
|
+
contentClassName: PropTypes.string,
|
|
2100
|
+
openedClassName: PropTypes.string,
|
|
2101
|
+
buttonClassName: PropTypes.string
|
|
2112
2102
|
};
|
|
2113
2103
|
var defaultProps$m = {
|
|
2114
2104
|
title: null,
|
|
@@ -2120,7 +2110,6 @@ var defaultProps$m = {
|
|
|
2120
2110
|
buttonClassName: null
|
|
2121
2111
|
};
|
|
2122
2112
|
var CollapsablePanel = function CollapsablePanel(_ref) {
|
|
2123
|
-
var _ref2;
|
|
2124
2113
|
var title = _ref.title,
|
|
2125
2114
|
children = _ref.children,
|
|
2126
2115
|
className = _ref.className,
|
|
@@ -2129,38 +2118,38 @@ var CollapsablePanel = function CollapsablePanel(_ref) {
|
|
|
2129
2118
|
openedClassName = _ref.openedClassName,
|
|
2130
2119
|
buttonClassName = _ref.buttonClassName;
|
|
2131
2120
|
var _useState = React.useState(false),
|
|
2132
|
-
_useState2 =
|
|
2121
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2133
2122
|
opened = _useState2[0],
|
|
2134
2123
|
setOpened = _useState2[1];
|
|
2135
2124
|
var onClick = React.useCallback(function () {
|
|
2136
2125
|
return setOpened(!opened);
|
|
2137
2126
|
}, [opened, setOpened]);
|
|
2138
|
-
return /*#__PURE__*/
|
|
2139
|
-
className:
|
|
2140
|
-
}, /*#__PURE__*/
|
|
2141
|
-
className:
|
|
2142
|
-
}, /*#__PURE__*/
|
|
2127
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2128
|
+
className: classNames([styles$i.container, _defineProperty(_defineProperty(_defineProperty({}, styles$i.isOpened, opened), openedClassName, opened && openedClassName !== null), className, className !== null)])
|
|
2129
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2130
|
+
className: classNames([styles$i.top, _defineProperty({}, topClassName, topClassName !== null)])
|
|
2131
|
+
}, /*#__PURE__*/React.createElement(Button$1, {
|
|
2143
2132
|
withoutStyle: true,
|
|
2144
|
-
className:
|
|
2145
|
-
icon: /*#__PURE__*/
|
|
2133
|
+
className: classNames([styles$i.button, _defineProperty({}, buttonClassName, buttonClassName !== null)]),
|
|
2134
|
+
icon: /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
2146
2135
|
icon: opened ? faAngleUp.faAngleUp : faAngleDown.faAngleDown,
|
|
2147
2136
|
className: styles$i.icon
|
|
2148
2137
|
}),
|
|
2149
2138
|
iconPosition: "right",
|
|
2150
2139
|
labelClassName: styles$i.label,
|
|
2151
2140
|
onClick: onClick
|
|
2152
|
-
}, title)), /*#__PURE__*/
|
|
2153
|
-
className:
|
|
2141
|
+
}, title)), /*#__PURE__*/React.createElement("div", {
|
|
2142
|
+
className: classNames([styles$i.content, _defineProperty({}, contentClassName, contentClassName !== null)])
|
|
2154
2143
|
}, children));
|
|
2155
2144
|
};
|
|
2156
2145
|
CollapsablePanel.propTypes = propTypes$m;
|
|
2157
2146
|
CollapsablePanel.defaultProps = defaultProps$m;
|
|
2158
2147
|
|
|
2159
2148
|
var propTypes$l = {
|
|
2160
|
-
stroke:
|
|
2161
|
-
border:
|
|
2162
|
-
fill:
|
|
2163
|
-
className:
|
|
2149
|
+
stroke: PropTypes.string,
|
|
2150
|
+
border: PropTypes.string,
|
|
2151
|
+
fill: PropTypes.string,
|
|
2152
|
+
className: PropTypes.string
|
|
2164
2153
|
};
|
|
2165
2154
|
var defaultProps$l = {
|
|
2166
2155
|
stroke: 'currentColor',
|
|
@@ -2173,31 +2162,31 @@ var Close = function Close(_ref) {
|
|
|
2173
2162
|
border = _ref.border,
|
|
2174
2163
|
fill = _ref.fill,
|
|
2175
2164
|
className = _ref.className;
|
|
2176
|
-
return /*#__PURE__*/
|
|
2165
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
2177
2166
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2178
2167
|
width: "42.9",
|
|
2179
2168
|
height: "42.9",
|
|
2180
2169
|
viewBox: "0 0 42.9 42.9",
|
|
2181
2170
|
className: className
|
|
2182
|
-
}, /*#__PURE__*/
|
|
2171
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
2183
2172
|
transform: "translate(-352.531 -47.531)"
|
|
2184
|
-
}, border ? /*#__PURE__*/
|
|
2173
|
+
}, border ? /*#__PURE__*/React.createElement("path", {
|
|
2185
2174
|
fill: border,
|
|
2186
2175
|
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"
|
|
2187
|
-
}) : null, /*#__PURE__*/
|
|
2176
|
+
}) : null, /*#__PURE__*/React.createElement("path", {
|
|
2188
2177
|
fill: fill,
|
|
2189
2178
|
d: "M374,50c10.5,0,19,8.5,19,19s-8.5,19-19,19s-19-8.5-19-19S363.5,50,374,50z"
|
|
2190
|
-
}), /*#__PURE__*/
|
|
2179
|
+
}), /*#__PURE__*/React.createElement("g", {
|
|
2191
2180
|
transform: "translate(366.893 61.893)"
|
|
2192
|
-
}, /*#__PURE__*/
|
|
2181
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
2193
2182
|
transform: "translate(0 0)"
|
|
2194
|
-
}, /*#__PURE__*/
|
|
2183
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
2195
2184
|
fill: fill,
|
|
2196
2185
|
stroke: stroke,
|
|
2197
2186
|
strokeWidth: "2",
|
|
2198
2187
|
strokeLinecap: "round",
|
|
2199
2188
|
d: "M14.2,0.3L0,13.9"
|
|
2200
|
-
}), /*#__PURE__*/
|
|
2189
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
2201
2190
|
fill: fill,
|
|
2202
2191
|
stroke: stroke,
|
|
2203
2192
|
strokeWidth: "2",
|
|
@@ -2210,9 +2199,9 @@ Close.defaultProps = defaultProps$l;
|
|
|
2210
2199
|
|
|
2211
2200
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
2212
2201
|
var propTypes$k = {
|
|
2213
|
-
date:
|
|
2214
|
-
withTime:
|
|
2215
|
-
timeSeparator:
|
|
2202
|
+
date: PropTypes.string,
|
|
2203
|
+
withTime: PropTypes.bool,
|
|
2204
|
+
timeSeparator: PropTypes.node
|
|
2216
2205
|
};
|
|
2217
2206
|
var defaultProps$k = {
|
|
2218
2207
|
date: null,
|
|
@@ -2224,14 +2213,14 @@ var Date$1 = function Date(_ref) {
|
|
|
2224
2213
|
withTime = _ref.withTime,
|
|
2225
2214
|
timeSeparator = _ref.timeSeparator;
|
|
2226
2215
|
var dateObject = React.useMemo(function () {
|
|
2227
|
-
return
|
|
2216
|
+
return dayjs(date).toDate();
|
|
2228
2217
|
}, [date]);
|
|
2229
|
-
return /*#__PURE__*/
|
|
2218
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(reactIntl.FormattedDate, {
|
|
2230
2219
|
value: dateObject,
|
|
2231
2220
|
year: "numeric",
|
|
2232
2221
|
month: "long",
|
|
2233
2222
|
day: "2-digit"
|
|
2234
|
-
}), withTime ? timeSeparator : null, withTime ? /*#__PURE__*/
|
|
2223
|
+
}), withTime ? timeSeparator : null, withTime ? /*#__PURE__*/React.createElement(reactIntl.FormattedTime, {
|
|
2235
2224
|
value: dateObject
|
|
2236
2225
|
}) : null);
|
|
2237
2226
|
};
|
|
@@ -2240,14 +2229,14 @@ Date$1.defaultProps = defaultProps$k;
|
|
|
2240
2229
|
|
|
2241
2230
|
/* eslint-disable react/no-danger */
|
|
2242
2231
|
var propTypes$j = {
|
|
2243
|
-
throttleDelay:
|
|
2244
|
-
threshold:
|
|
2245
|
-
onEnter:
|
|
2246
|
-
onLeave:
|
|
2247
|
-
onChange:
|
|
2248
|
-
disabled:
|
|
2249
|
-
children:
|
|
2250
|
-
className:
|
|
2232
|
+
throttleDelay: PropTypes.number,
|
|
2233
|
+
threshold: PropTypes.arrayOf(PropTypes.number),
|
|
2234
|
+
onEnter: PropTypes.func,
|
|
2235
|
+
onLeave: PropTypes.func,
|
|
2236
|
+
onChange: PropTypes.func,
|
|
2237
|
+
disabled: PropTypes.bool,
|
|
2238
|
+
children: PropTypes.node,
|
|
2239
|
+
className: PropTypes.string
|
|
2251
2240
|
};
|
|
2252
2241
|
var defaultProps$j = {
|
|
2253
2242
|
throttleDelay: null,
|
|
@@ -2292,7 +2281,7 @@ var Detector = function Detector(_ref) {
|
|
|
2292
2281
|
enteredRef.current = false;
|
|
2293
2282
|
}
|
|
2294
2283
|
};
|
|
2295
|
-
return throttleDelay !== null ?
|
|
2284
|
+
return throttleDelay !== null ? throttle(callback, throttleDelay, {
|
|
2296
2285
|
trailing: true,
|
|
2297
2286
|
leading: true
|
|
2298
2287
|
}) : callback;
|
|
@@ -2308,7 +2297,7 @@ var Detector = function Detector(_ref) {
|
|
|
2308
2297
|
}
|
|
2309
2298
|
};
|
|
2310
2299
|
}, [throttleDelay, isIntersecting, disabled, triggerChange]);
|
|
2311
|
-
return /*#__PURE__*/
|
|
2300
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2312
2301
|
className: className,
|
|
2313
2302
|
ref: ref
|
|
2314
2303
|
}, children);
|
|
@@ -2319,13 +2308,13 @@ Detector.defaultProps = defaultProps$j;
|
|
|
2319
2308
|
var styles$h = {"container":"micromag-core-partials-placeholder-block-container","outline":"micromag-core-partials-placeholder-block-outline","withInvertedColors":"micromag-core-partials-placeholder-block-withInvertedColors","box":"micromag-core-partials-placeholder-block-box"};
|
|
2320
2309
|
|
|
2321
2310
|
var propTypes$i = {
|
|
2322
|
-
width:
|
|
2323
|
-
height:
|
|
2324
|
-
outline:
|
|
2325
|
-
className:
|
|
2326
|
-
boxClassName:
|
|
2327
|
-
children:
|
|
2328
|
-
withInvertedColors:
|
|
2311
|
+
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
2312
|
+
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
2313
|
+
outline: PropTypes.bool,
|
|
2314
|
+
className: PropTypes.string,
|
|
2315
|
+
boxClassName: PropTypes.string,
|
|
2316
|
+
children: PropTypes.node,
|
|
2317
|
+
withInvertedColors: PropTypes.bool
|
|
2329
2318
|
};
|
|
2330
2319
|
var defaultProps$i = {
|
|
2331
2320
|
width: '100%',
|
|
@@ -2337,7 +2326,6 @@ var defaultProps$i = {
|
|
|
2337
2326
|
withInvertedColors: true
|
|
2338
2327
|
};
|
|
2339
2328
|
var PlaceholderBlock = function PlaceholderBlock(_ref) {
|
|
2340
|
-
var _ref2;
|
|
2341
2329
|
var width = _ref.width,
|
|
2342
2330
|
height = _ref.height,
|
|
2343
2331
|
outline = _ref.outline,
|
|
@@ -2345,10 +2333,10 @@ var PlaceholderBlock = function PlaceholderBlock(_ref) {
|
|
|
2345
2333
|
boxClassName = _ref.boxClassName,
|
|
2346
2334
|
withInvertedColors = _ref.withInvertedColors,
|
|
2347
2335
|
children = _ref.children;
|
|
2348
|
-
return /*#__PURE__*/
|
|
2349
|
-
className:
|
|
2350
|
-
}, /*#__PURE__*/
|
|
2351
|
-
className:
|
|
2336
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2337
|
+
className: classNames([styles$h.container, _defineProperty(_defineProperty(_defineProperty({}, className, className !== null), styles$h.outline, outline), styles$h.withInvertedColors, withInvertedColors)])
|
|
2338
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2339
|
+
className: classNames([styles$h.box, _defineProperty({}, boxClassName, boxClassName !== null)]),
|
|
2352
2340
|
style: {
|
|
2353
2341
|
width: width,
|
|
2354
2342
|
height: height
|
|
@@ -2363,14 +2351,14 @@ PlaceholderBlock.defaultProps = defaultProps$i;
|
|
|
2363
2351
|
// import { PropTypes as MicromagPropTypes } from '@micromag/core';
|
|
2364
2352
|
|
|
2365
2353
|
var propTypes$h = {
|
|
2366
|
-
name:
|
|
2367
|
-
components:
|
|
2354
|
+
name: PropTypes.string.isRequired,
|
|
2355
|
+
components: PropTypes.object.isRequired,
|
|
2368
2356
|
// eslint-disable-line
|
|
2369
|
-
props:
|
|
2357
|
+
props: PropTypes.object,
|
|
2370
2358
|
// eslint-disable-line
|
|
2371
|
-
isPlaceholder:
|
|
2372
|
-
className:
|
|
2373
|
-
placeholderProps:
|
|
2359
|
+
isPlaceholder: PropTypes.bool,
|
|
2360
|
+
className: PropTypes.string,
|
|
2361
|
+
placeholderProps: PropTypes.object // eslint-disable-line
|
|
2374
2362
|
};
|
|
2375
2363
|
|
|
2376
2364
|
var defaultProps$h = {
|
|
@@ -2392,13 +2380,13 @@ var ElementComponent = function ElementComponent(_ref) {
|
|
|
2392
2380
|
if (isPlaceholder) {
|
|
2393
2381
|
// TODO: figure out what this did
|
|
2394
2382
|
// const PlaceholderComponent = Placeholders[pascalCase(name)];
|
|
2395
|
-
return /*#__PURE__*/
|
|
2383
|
+
return /*#__PURE__*/React.createElement(PlaceholderBlock, placeholderProps);
|
|
2396
2384
|
}
|
|
2397
2385
|
var RealComponent = components[utils.pascalCase(name)];
|
|
2398
2386
|
if (!RealComponent) {
|
|
2399
2387
|
return 'Bad component';
|
|
2400
2388
|
}
|
|
2401
|
-
return /*#__PURE__*/
|
|
2389
|
+
return /*#__PURE__*/React.createElement(RealComponent, Object.assign({}, props, {
|
|
2402
2390
|
className: className
|
|
2403
2391
|
}));
|
|
2404
2392
|
};
|
|
@@ -2408,10 +2396,10 @@ ElementComponent.defaultProps = defaultProps$h;
|
|
|
2408
2396
|
var styles$g = {"container":"micromag-core-partials-empty-container","middle":"micromag-core-partials-empty-middle","withoutBorder":"micromag-core-partials-empty-withoutBorder","invertColor":"micromag-core-partials-empty-invertColor"};
|
|
2409
2397
|
|
|
2410
2398
|
var propTypes$g = {
|
|
2411
|
-
children:
|
|
2412
|
-
withoutBorder:
|
|
2413
|
-
light:
|
|
2414
|
-
className:
|
|
2399
|
+
children: PropTypes.node,
|
|
2400
|
+
withoutBorder: PropTypes.bool,
|
|
2401
|
+
light: PropTypes.bool,
|
|
2402
|
+
className: PropTypes.string
|
|
2415
2403
|
};
|
|
2416
2404
|
var defaultProps$g = {
|
|
2417
2405
|
children: null,
|
|
@@ -2420,16 +2408,15 @@ var defaultProps$g = {
|
|
|
2420
2408
|
className: null
|
|
2421
2409
|
};
|
|
2422
2410
|
var Empty = function Empty(_ref) {
|
|
2423
|
-
var _ref2;
|
|
2424
2411
|
var children = _ref.children,
|
|
2425
2412
|
withoutBorder = _ref.withoutBorder,
|
|
2426
2413
|
light = _ref.light,
|
|
2427
2414
|
className = _ref.className;
|
|
2428
|
-
return /*#__PURE__*/
|
|
2429
|
-
className:
|
|
2430
|
-
}, /*#__PURE__*/
|
|
2415
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2416
|
+
className: classNames([styles$g.container, _defineProperty(_defineProperty(_defineProperty({}, styles$g.withoutBorder, withoutBorder), styles$g.light, light), className, className)])
|
|
2417
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2431
2418
|
className: styles$g.middle
|
|
2432
|
-
}, /*#__PURE__*/
|
|
2419
|
+
}, /*#__PURE__*/React.createElement(Label, null, children)));
|
|
2433
2420
|
};
|
|
2434
2421
|
Empty.propTypes = propTypes$g;
|
|
2435
2422
|
Empty.defaultProps = defaultProps$g;
|
|
@@ -2447,16 +2434,16 @@ var getUrlsFromMedia = function getUrlsFromMedia(media, formats) {
|
|
|
2447
2434
|
_ref3$mime = _ref3.mime,
|
|
2448
2435
|
originalMime = _ref3$mime === void 0 ? null : _ref3$mime;
|
|
2449
2436
|
var urls = formats.reduce(function (currentUrls, format) {
|
|
2450
|
-
var finalFormat =
|
|
2451
|
-
var formatExtension =
|
|
2437
|
+
var finalFormat = isObject(format) ? format.format : format;
|
|
2438
|
+
var formatExtension = isObject(format) ? format.name : format;
|
|
2452
2439
|
var file = files["webfonts.".concat(formatExtension)] || files[formatExtension] || null;
|
|
2453
2440
|
if (file !== null) {
|
|
2454
|
-
return [].concat(
|
|
2441
|
+
return [].concat(_toConsumableArray(currentUrls), ["url(\"".concat(file.url, "?\") format(\"").concat(finalFormat, "\")")]);
|
|
2455
2442
|
}
|
|
2456
2443
|
var extensionRegExp = new RegExp(".".concat(formatExtension, "$"), 'i');
|
|
2457
2444
|
var mimeRegExp = new RegExp("".concat(finalFormat), 'i');
|
|
2458
2445
|
if (originalName !== null && originalName.match(extensionRegExp) !== null || originalMime !== null && originalMime.match(mimeRegExp) !== null) {
|
|
2459
|
-
return [].concat(
|
|
2446
|
+
return [].concat(_toConsumableArray(currentUrls), ["url(\"".concat(originalFile.url, "?\") format(\"").concat(finalFormat, "\")")]);
|
|
2460
2447
|
}
|
|
2461
2448
|
return currentUrls;
|
|
2462
2449
|
}, []);
|
|
@@ -2464,9 +2451,9 @@ var getUrlsFromMedia = function getUrlsFromMedia(media, formats) {
|
|
|
2464
2451
|
};
|
|
2465
2452
|
var propTypes$f = {
|
|
2466
2453
|
fonts: core.PropTypes.fonts,
|
|
2467
|
-
formats:
|
|
2468
|
-
name:
|
|
2469
|
-
format:
|
|
2454
|
+
formats: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
|
|
2455
|
+
name: PropTypes.string,
|
|
2456
|
+
format: PropTypes.string
|
|
2470
2457
|
})]))
|
|
2471
2458
|
};
|
|
2472
2459
|
var defaultProps$f = {
|
|
@@ -2483,7 +2470,7 @@ var FontFaces = function FontFaces(_ref4) {
|
|
|
2483
2470
|
var fonts = _ref4.fonts,
|
|
2484
2471
|
formats = _ref4.formats;
|
|
2485
2472
|
var fontFaces = (fonts || []).filter(function (it) {
|
|
2486
|
-
return
|
|
2473
|
+
return isObject(it) && it.type === 'custom' && (it.media || null) !== null;
|
|
2487
2474
|
}).reduce(function (fontFontFaces, _ref5) {
|
|
2488
2475
|
var _ref5$name = _ref5.name,
|
|
2489
2476
|
name = _ref5$name === void 0 ? null : _ref5$name,
|
|
@@ -2495,7 +2482,7 @@ var FontFaces = function FontFaces(_ref4) {
|
|
|
2495
2482
|
return fontFontFaces;
|
|
2496
2483
|
}
|
|
2497
2484
|
var urls = media !== null ? getUrlsFromMedia(media, formats) : null;
|
|
2498
|
-
return [].concat(
|
|
2485
|
+
return [].concat(_toConsumableArray(fontFontFaces), [urls !== null && urls.length > 0 ? "\n @font-face {\n font-family: \"".concat(name, "\";\n src: ").concat(urls.join(','), ";\n }\n ") : null], _toConsumableArray((variants || []).map(function (_ref6) {
|
|
2499
2486
|
var weight = _ref6.weight,
|
|
2500
2487
|
style = _ref6.style,
|
|
2501
2488
|
_ref6$media = _ref6.media,
|
|
@@ -2509,7 +2496,7 @@ var FontFaces = function FontFaces(_ref4) {
|
|
|
2509
2496
|
}, []).filter(function (it) {
|
|
2510
2497
|
return it !== null;
|
|
2511
2498
|
});
|
|
2512
|
-
return fontFaces.length > 0 ? /*#__PURE__*/
|
|
2499
|
+
return fontFaces.length > 0 ? /*#__PURE__*/React.createElement("style", {
|
|
2513
2500
|
type: "text/css"
|
|
2514
2501
|
}, fontFaces.join('\n')) : null;
|
|
2515
2502
|
};
|
|
@@ -2519,14 +2506,14 @@ FontFaces.defaultProps = defaultProps$f;
|
|
|
2519
2506
|
var styles$f = {};
|
|
2520
2507
|
|
|
2521
2508
|
var propTypes$e = {
|
|
2522
|
-
thumbnail:
|
|
2523
|
-
thumbnailAlign:
|
|
2524
|
-
children:
|
|
2509
|
+
thumbnail: PropTypes.node,
|
|
2510
|
+
thumbnailAlign: PropTypes.oneOf(['top', 'center', 'bottom']),
|
|
2511
|
+
children: PropTypes.node,
|
|
2525
2512
|
title: core.PropTypes.label,
|
|
2526
|
-
className:
|
|
2527
|
-
thumbnailClassName:
|
|
2528
|
-
bodyClassName:
|
|
2529
|
-
titleClassName:
|
|
2513
|
+
className: PropTypes.string,
|
|
2514
|
+
thumbnailClassName: PropTypes.string,
|
|
2515
|
+
bodyClassName: PropTypes.string,
|
|
2516
|
+
titleClassName: PropTypes.string
|
|
2530
2517
|
};
|
|
2531
2518
|
var defaultProps$e = {
|
|
2532
2519
|
thumbnail: null,
|
|
@@ -2547,21 +2534,21 @@ var Media = function Media(_ref) {
|
|
|
2547
2534
|
thumbnailClassName = _ref.thumbnailClassName,
|
|
2548
2535
|
bodyClassName = _ref.bodyClassName,
|
|
2549
2536
|
titleClassName = _ref.titleClassName;
|
|
2550
|
-
return /*#__PURE__*/
|
|
2551
|
-
className:
|
|
2552
|
-
}, typeof thumbnail === 'string' ? /*#__PURE__*/
|
|
2537
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2538
|
+
className: classNames(['card', styles$f.container, _defineProperty({}, className, className !== null)])
|
|
2539
|
+
}, typeof thumbnail === 'string' ? /*#__PURE__*/React.createElement("img", {
|
|
2553
2540
|
src: thumbnail,
|
|
2554
2541
|
alt: title,
|
|
2555
|
-
className:
|
|
2542
|
+
className: classNames(['me-3', styles$f.thumbnail, _defineProperty({
|
|
2556
2543
|
'align-self-start': thumbnailAlign === 'top',
|
|
2557
2544
|
'align-self-center': thumbnailAlign === 'center',
|
|
2558
2545
|
'align-self-end': thumbnailAlign === 'bottom'
|
|
2559
2546
|
}, thumbnailClassName, thumbnailClassName !== null)])
|
|
2560
|
-
}) : thumbnail, title !== null || children !== null ? /*#__PURE__*/
|
|
2561
|
-
className:
|
|
2562
|
-
}, title !== null ? /*#__PURE__*/
|
|
2563
|
-
className:
|
|
2564
|
-
}, /*#__PURE__*/
|
|
2547
|
+
}) : thumbnail, title !== null || children !== null ? /*#__PURE__*/React.createElement("div", {
|
|
2548
|
+
className: classNames(['card-body', styles$f.body, _defineProperty({}, bodyClassName, bodyClassName !== null)])
|
|
2549
|
+
}, title !== null ? /*#__PURE__*/React.createElement("h5", {
|
|
2550
|
+
className: classNames(['mt-0', 'text-truncate', styles$f.title, _defineProperty({}, titleClassName, titleClassName !== null)])
|
|
2551
|
+
}, /*#__PURE__*/React.createElement(Label, null, title)) : null, children) : null);
|
|
2565
2552
|
};
|
|
2566
2553
|
Media.propTypes = propTypes$e;
|
|
2567
2554
|
Media.defaultProps = defaultProps$e;
|
|
@@ -2569,358 +2556,358 @@ Media.defaultProps = defaultProps$e;
|
|
|
2569
2556
|
/**
|
|
2570
2557
|
* Core
|
|
2571
2558
|
*/
|
|
2572
|
-
|
|
2573
|
-
listen:
|
|
2574
|
-
push:
|
|
2559
|
+
PropTypes.shape({
|
|
2560
|
+
listen: PropTypes.func.isRequired,
|
|
2561
|
+
push: PropTypes.func.isRequired
|
|
2575
2562
|
});
|
|
2576
|
-
|
|
2577
|
-
pathname:
|
|
2578
|
-
search:
|
|
2563
|
+
PropTypes.shape({
|
|
2564
|
+
pathname: PropTypes.string,
|
|
2565
|
+
search: PropTypes.string
|
|
2579
2566
|
});
|
|
2580
|
-
|
|
2581
|
-
locale:
|
|
2582
|
-
formatMessage:
|
|
2567
|
+
PropTypes.shape({
|
|
2568
|
+
locale: PropTypes.string.isRequired,
|
|
2569
|
+
formatMessage: PropTypes.func.isRequired
|
|
2583
2570
|
});
|
|
2584
|
-
var defaultMessageContent =
|
|
2585
|
-
type:
|
|
2586
|
-
value:
|
|
2571
|
+
var defaultMessageContent = PropTypes.shape({
|
|
2572
|
+
type: PropTypes.number,
|
|
2573
|
+
value: PropTypes.string
|
|
2587
2574
|
});
|
|
2588
|
-
var defaultMessage =
|
|
2589
|
-
var message =
|
|
2590
|
-
id:
|
|
2575
|
+
var defaultMessage = PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(defaultMessageContent)]);
|
|
2576
|
+
var message = PropTypes.shape({
|
|
2577
|
+
id: PropTypes.string,
|
|
2591
2578
|
defaultMessage: defaultMessage.isRequired,
|
|
2592
|
-
description:
|
|
2579
|
+
description: PropTypes.string
|
|
2593
2580
|
});
|
|
2594
|
-
var text =
|
|
2595
|
-
var label =
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
current:
|
|
2599
|
-
}),
|
|
2600
|
-
var target =
|
|
2601
|
-
var interaction =
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
currentTime:
|
|
2606
|
-
duration:
|
|
2581
|
+
var text = PropTypes.oneOfType([message, PropTypes.string]);
|
|
2582
|
+
var label = PropTypes.oneOfType([message, PropTypes.node]);
|
|
2583
|
+
PropTypes.oneOf([401, 403, 404, 500]);
|
|
2584
|
+
PropTypes.oneOfType([PropTypes.shape({
|
|
2585
|
+
current: PropTypes.any // eslint-disable-line react/forbid-prop-types
|
|
2586
|
+
}), PropTypes.func]);
|
|
2587
|
+
var target = PropTypes.oneOf(['_blank', '_self', '_parent']);
|
|
2588
|
+
var interaction = PropTypes.oneOf(['tap', 'swipe']);
|
|
2589
|
+
PropTypes.arrayOf(interaction);
|
|
2590
|
+
PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.array]));
|
|
2591
|
+
PropTypes.shape({
|
|
2592
|
+
currentTime: PropTypes.number,
|
|
2593
|
+
duration: PropTypes.number
|
|
2607
2594
|
});
|
|
2608
2595
|
|
|
2609
2596
|
/**
|
|
2610
2597
|
* Site
|
|
2611
2598
|
*/
|
|
2612
|
-
|
|
2613
|
-
id:
|
|
2614
|
-
firstname:
|
|
2615
|
-
lastname:
|
|
2616
|
-
email:
|
|
2617
|
-
gender:
|
|
2618
|
-
birthdate:
|
|
2599
|
+
PropTypes.shape({
|
|
2600
|
+
id: PropTypes.number,
|
|
2601
|
+
firstname: PropTypes.string,
|
|
2602
|
+
lastname: PropTypes.string,
|
|
2603
|
+
email: PropTypes.string,
|
|
2604
|
+
gender: PropTypes.string,
|
|
2605
|
+
birthdate: PropTypes.string
|
|
2619
2606
|
});
|
|
2620
|
-
var menuItem =
|
|
2621
|
-
id:
|
|
2607
|
+
var menuItem = PropTypes.shape({
|
|
2608
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
2622
2609
|
label: label,
|
|
2623
|
-
url:
|
|
2624
|
-
external:
|
|
2625
|
-
active:
|
|
2610
|
+
url: PropTypes.string,
|
|
2611
|
+
external: PropTypes.bool,
|
|
2612
|
+
active: PropTypes.bool
|
|
2626
2613
|
});
|
|
2627
|
-
|
|
2628
|
-
var breadcrumb =
|
|
2614
|
+
PropTypes.arrayOf(menuItem);
|
|
2615
|
+
var breadcrumb = PropTypes.shape({
|
|
2629
2616
|
label: label,
|
|
2630
|
-
url:
|
|
2617
|
+
url: PropTypes.string
|
|
2631
2618
|
});
|
|
2632
|
-
|
|
2633
|
-
var device =
|
|
2634
|
-
id:
|
|
2619
|
+
PropTypes.arrayOf(breadcrumb);
|
|
2620
|
+
var device = PropTypes.shape({
|
|
2621
|
+
id: PropTypes.string.isRequired
|
|
2635
2622
|
});
|
|
2636
|
-
|
|
2637
|
-
var modal =
|
|
2638
|
-
id:
|
|
2623
|
+
PropTypes.arrayOf(device);
|
|
2624
|
+
var modal = PropTypes.shape({
|
|
2625
|
+
id: PropTypes.string.isRequired
|
|
2639
2626
|
});
|
|
2640
|
-
|
|
2641
|
-
var panel =
|
|
2642
|
-
id:
|
|
2627
|
+
PropTypes.arrayOf(modal);
|
|
2628
|
+
var panel = PropTypes.shape({
|
|
2629
|
+
id: PropTypes.string.isRequired
|
|
2643
2630
|
});
|
|
2644
|
-
|
|
2645
|
-
var button =
|
|
2631
|
+
PropTypes.arrayOf(panel);
|
|
2632
|
+
var button = PropTypes.shape({
|
|
2646
2633
|
label: label,
|
|
2647
|
-
onClick:
|
|
2634
|
+
onClick: PropTypes.func
|
|
2648
2635
|
});
|
|
2649
|
-
|
|
2636
|
+
PropTypes.arrayOf(button);
|
|
2650
2637
|
var bootstrapThemeStrings = ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark'];
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
var component =
|
|
2657
|
-
|
|
2638
|
+
PropTypes.oneOf(bootstrapThemeStrings);
|
|
2639
|
+
PropTypes.oneOf([].concat(bootstrapThemeStrings, ['outline-primary', 'outline-secondary', 'outline-success', 'outline-danger', 'outline-warning', 'outline-info', 'outline-light', 'outline-dark', 'outline-link', null]));
|
|
2640
|
+
PropTypes.oneOf(['lg', 'sm', null]);
|
|
2641
|
+
PropTypes.oneOf(['lg', 'sm', null]);
|
|
2642
|
+
PropTypes.oneOf(['start', 'end']);
|
|
2643
|
+
var component = PropTypes.oneOfType([PropTypes.object, PropTypes.func]);
|
|
2644
|
+
PropTypes.objectOf(component);
|
|
2658
2645
|
|
|
2659
2646
|
/**
|
|
2660
2647
|
* Forms
|
|
2661
2648
|
*/
|
|
2662
|
-
var errors =
|
|
2663
|
-
|
|
2664
|
-
var selectOption =
|
|
2665
|
-
value:
|
|
2649
|
+
var errors = PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]);
|
|
2650
|
+
PropTypes.objectOf(errors);
|
|
2651
|
+
var selectOption = PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
|
|
2652
|
+
value: PropTypes.any,
|
|
2666
2653
|
// eslint-disable-line
|
|
2667
2654
|
label: label
|
|
2668
2655
|
})]);
|
|
2669
|
-
|
|
2670
|
-
var formField =
|
|
2671
|
-
name:
|
|
2656
|
+
PropTypes.arrayOf(selectOption);
|
|
2657
|
+
var formField = PropTypes.shape({
|
|
2658
|
+
name: PropTypes.string,
|
|
2672
2659
|
component: component
|
|
2673
2660
|
});
|
|
2674
|
-
|
|
2661
|
+
PropTypes.arrayOf(formField);
|
|
2675
2662
|
|
|
2676
2663
|
/**
|
|
2677
2664
|
* Medias
|
|
2678
2665
|
*/
|
|
2679
2666
|
var mediaMetadataShape = {
|
|
2680
|
-
filename:
|
|
2681
|
-
size:
|
|
2682
|
-
mime:
|
|
2683
|
-
};
|
|
2684
|
-
var mediaFile =
|
|
2685
|
-
id:
|
|
2686
|
-
handle:
|
|
2687
|
-
type:
|
|
2688
|
-
mime:
|
|
2689
|
-
url:
|
|
2667
|
+
filename: PropTypes.string,
|
|
2668
|
+
size: PropTypes.number,
|
|
2669
|
+
mime: PropTypes.string
|
|
2670
|
+
};
|
|
2671
|
+
var mediaFile = PropTypes.shape({
|
|
2672
|
+
id: PropTypes.string,
|
|
2673
|
+
handle: PropTypes.string,
|
|
2674
|
+
type: PropTypes.string,
|
|
2675
|
+
mime: PropTypes.string,
|
|
2676
|
+
url: PropTypes.string
|
|
2690
2677
|
});
|
|
2691
2678
|
var mediaShape = {
|
|
2692
|
-
id:
|
|
2693
|
-
type:
|
|
2694
|
-
url:
|
|
2679
|
+
id: PropTypes.string,
|
|
2680
|
+
type: PropTypes.string.isRequired,
|
|
2681
|
+
url: PropTypes.string,
|
|
2695
2682
|
// .isRequired,
|
|
2696
|
-
thumbnail_url:
|
|
2697
|
-
name:
|
|
2698
|
-
metadata:
|
|
2699
|
-
files:
|
|
2700
|
-
};
|
|
2701
|
-
var media =
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
var imageMedia =
|
|
2705
|
-
type:
|
|
2706
|
-
metadata:
|
|
2707
|
-
width:
|
|
2708
|
-
height:
|
|
2683
|
+
thumbnail_url: PropTypes.string,
|
|
2684
|
+
name: PropTypes.string,
|
|
2685
|
+
metadata: PropTypes.shape(_objectSpread({}, mediaMetadataShape)),
|
|
2686
|
+
files: PropTypes.objectOf(mediaFile)
|
|
2687
|
+
};
|
|
2688
|
+
var media = PropTypes.shape(mediaShape);
|
|
2689
|
+
PropTypes.arrayOf(media);
|
|
2690
|
+
PropTypes.oneOf(['image', 'video', 'audio', 'closed-captions', 'font']);
|
|
2691
|
+
var imageMedia = PropTypes.shape(_objectSpread(_objectSpread({}, mediaShape), {}, {
|
|
2692
|
+
type: PropTypes.oneOf(['image', 'video']),
|
|
2693
|
+
metadata: PropTypes.shape(_objectSpread(_objectSpread({}, mediaMetadataShape), {}, {
|
|
2694
|
+
width: PropTypes.number,
|
|
2695
|
+
height: PropTypes.number
|
|
2709
2696
|
}))
|
|
2710
2697
|
}));
|
|
2711
|
-
|
|
2712
|
-
var fontMedia =
|
|
2713
|
-
type:
|
|
2714
|
-
metadata:
|
|
2698
|
+
PropTypes.arrayOf(imageMedia);
|
|
2699
|
+
var fontMedia = PropTypes.shape(_objectSpread(_objectSpread({}, mediaShape), {}, {
|
|
2700
|
+
type: PropTypes.oneOf(['font']),
|
|
2701
|
+
metadata: PropTypes.shape(_objectSpread({}, mediaMetadataShape))
|
|
2715
2702
|
}));
|
|
2716
|
-
|
|
2717
|
-
var videoMedia =
|
|
2718
|
-
type:
|
|
2719
|
-
metadata:
|
|
2720
|
-
width:
|
|
2721
|
-
height:
|
|
2722
|
-
duration:
|
|
2703
|
+
PropTypes.arrayOf(fontMedia);
|
|
2704
|
+
var videoMedia = PropTypes.shape(_objectSpread(_objectSpread({}, mediaShape), {}, {
|
|
2705
|
+
type: PropTypes.oneOf(['video']),
|
|
2706
|
+
metadata: PropTypes.shape(_objectSpread(_objectSpread({}, mediaMetadataShape), {}, {
|
|
2707
|
+
width: PropTypes.number,
|
|
2708
|
+
height: PropTypes.number,
|
|
2709
|
+
duration: PropTypes.number
|
|
2723
2710
|
}))
|
|
2724
2711
|
}));
|
|
2725
|
-
|
|
2726
|
-
var audioMedia =
|
|
2727
|
-
type:
|
|
2728
|
-
metadata:
|
|
2729
|
-
duration:
|
|
2712
|
+
PropTypes.arrayOf(videoMedia);
|
|
2713
|
+
var audioMedia = PropTypes.shape(_objectSpread(_objectSpread({}, mediaShape), {}, {
|
|
2714
|
+
type: PropTypes.oneOf(['audio']),
|
|
2715
|
+
metadata: PropTypes.shape(_objectSpread(_objectSpread({}, mediaMetadataShape), {}, {
|
|
2716
|
+
duration: PropTypes.number
|
|
2730
2717
|
}))
|
|
2731
2718
|
}));
|
|
2732
|
-
|
|
2733
|
-
var closedCaptionsMedia =
|
|
2734
|
-
type:
|
|
2719
|
+
PropTypes.arrayOf(audioMedia);
|
|
2720
|
+
var closedCaptionsMedia = PropTypes.shape(_objectSpread(_objectSpread({}, mediaShape), {}, {
|
|
2721
|
+
type: PropTypes.oneOf(['closed-captions'])
|
|
2735
2722
|
}));
|
|
2736
2723
|
|
|
2737
2724
|
/**
|
|
2738
2725
|
* Style
|
|
2739
2726
|
*/
|
|
2740
2727
|
|
|
2741
|
-
|
|
2742
|
-
type:
|
|
2743
|
-
name:
|
|
2728
|
+
PropTypes.shape({
|
|
2729
|
+
type: PropTypes.oneOf(['system', 'google', 'custom']),
|
|
2730
|
+
name: PropTypes.string,
|
|
2744
2731
|
media: fontMedia
|
|
2745
2732
|
});
|
|
2746
|
-
var font =
|
|
2747
|
-
|
|
2748
|
-
var textAlign =
|
|
2749
|
-
var color =
|
|
2750
|
-
color:
|
|
2751
|
-
alpha:
|
|
2733
|
+
var font = PropTypes.oneOfType([PropTypes.object, PropTypes.string]);
|
|
2734
|
+
PropTypes.arrayOf(font);
|
|
2735
|
+
var textAlign = PropTypes.oneOf(['left', 'right', 'center']);
|
|
2736
|
+
var color = PropTypes.shape({
|
|
2737
|
+
color: PropTypes.string,
|
|
2738
|
+
alpha: PropTypes.number
|
|
2752
2739
|
});
|
|
2753
|
-
var textStyle =
|
|
2740
|
+
var textStyle = PropTypes.shape({
|
|
2754
2741
|
fontFamily: font,
|
|
2755
|
-
fontSize:
|
|
2756
|
-
fontStyle:
|
|
2757
|
-
bold:
|
|
2758
|
-
italic:
|
|
2759
|
-
underline:
|
|
2760
|
-
upperCase:
|
|
2742
|
+
fontSize: PropTypes.number,
|
|
2743
|
+
fontStyle: PropTypes.shape({
|
|
2744
|
+
bold: PropTypes.bool,
|
|
2745
|
+
italic: PropTypes.bool,
|
|
2746
|
+
underline: PropTypes.bool,
|
|
2747
|
+
upperCase: PropTypes.bool
|
|
2761
2748
|
}),
|
|
2762
2749
|
align: textAlign,
|
|
2763
2750
|
color: color,
|
|
2764
|
-
letterSpacing:
|
|
2765
|
-
lineHeight:
|
|
2751
|
+
letterSpacing: PropTypes.number,
|
|
2752
|
+
lineHeight: PropTypes.number
|
|
2766
2753
|
});
|
|
2767
|
-
var borderTypes =
|
|
2768
|
-
var shadowType =
|
|
2769
|
-
shadowDistance:
|
|
2770
|
-
shadowBlur:
|
|
2754
|
+
var borderTypes = PropTypes.oneOf(['dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset', 'hidden']);
|
|
2755
|
+
var shadowType = PropTypes.shape({
|
|
2756
|
+
shadowDistance: PropTypes.number,
|
|
2757
|
+
shadowBlur: PropTypes.number,
|
|
2771
2758
|
shadowColor: color
|
|
2772
2759
|
});
|
|
2773
|
-
|
|
2774
|
-
width:
|
|
2760
|
+
PropTypes.shape({
|
|
2761
|
+
width: PropTypes.number,
|
|
2775
2762
|
style: borderTypes,
|
|
2776
|
-
radius:
|
|
2763
|
+
radius: PropTypes.number,
|
|
2777
2764
|
color: color
|
|
2778
2765
|
});
|
|
2779
|
-
var boxStyle =
|
|
2766
|
+
var boxStyle = PropTypes.shape({
|
|
2780
2767
|
backgroundColor: color,
|
|
2781
|
-
borderRadius:
|
|
2782
|
-
borderWidth:
|
|
2768
|
+
borderRadius: PropTypes.number,
|
|
2769
|
+
borderWidth: PropTypes.number,
|
|
2783
2770
|
borderColor: color,
|
|
2784
2771
|
borderStyle: borderTypes,
|
|
2785
2772
|
shadow: shadowType
|
|
2786
2773
|
});
|
|
2787
|
-
|
|
2788
|
-
top:
|
|
2789
|
-
bottom:
|
|
2774
|
+
PropTypes.shape({
|
|
2775
|
+
top: PropTypes.number,
|
|
2776
|
+
bottom: PropTypes.number
|
|
2790
2777
|
});
|
|
2791
|
-
|
|
2792
|
-
rows:
|
|
2793
|
-
columns:
|
|
2778
|
+
PropTypes.arrayOf(PropTypes.shape({
|
|
2779
|
+
rows: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]),
|
|
2780
|
+
columns: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)])
|
|
2794
2781
|
}));
|
|
2795
|
-
var objectFitSize =
|
|
2796
|
-
|
|
2782
|
+
var objectFitSize = PropTypes.oneOf(['cover', 'contain', null]);
|
|
2783
|
+
PropTypes.shape({
|
|
2797
2784
|
fit: objectFitSize,
|
|
2798
|
-
horizontalPosition:
|
|
2799
|
-
verticalPosition:
|
|
2785
|
+
horizontalPosition: PropTypes.oneOf(['left', 'center', 'right']),
|
|
2786
|
+
verticalPosition: PropTypes.oneOf(['top', 'center', 'bottom'])
|
|
2800
2787
|
});
|
|
2801
2788
|
|
|
2802
2789
|
/**
|
|
2803
2790
|
* Elements
|
|
2804
2791
|
*/
|
|
2805
2792
|
|
|
2806
|
-
var textElement =
|
|
2807
|
-
body:
|
|
2793
|
+
var textElement = PropTypes.shape({
|
|
2794
|
+
body: PropTypes.string,
|
|
2808
2795
|
textStyle: textStyle
|
|
2809
2796
|
});
|
|
2810
2797
|
var headingElement = textElement;
|
|
2811
|
-
|
|
2812
|
-
label:
|
|
2798
|
+
PropTypes.shape({
|
|
2799
|
+
label: PropTypes.string,
|
|
2813
2800
|
textStyle: textStyle
|
|
2814
2801
|
});
|
|
2815
|
-
var imageElement =
|
|
2802
|
+
var imageElement = PropTypes.shape({
|
|
2816
2803
|
media: imageMedia
|
|
2817
2804
|
});
|
|
2818
|
-
|
|
2819
|
-
|
|
2805
|
+
PropTypes.arrayOf(imageElement);
|
|
2806
|
+
PropTypes.shape({
|
|
2820
2807
|
media: videoMedia,
|
|
2821
|
-
autoPlay:
|
|
2822
|
-
loop:
|
|
2808
|
+
autoPlay: PropTypes.bool,
|
|
2809
|
+
loop: PropTypes.bool,
|
|
2823
2810
|
closedCaptions: closedCaptionsMedia,
|
|
2824
|
-
withSeekBar:
|
|
2825
|
-
withControls:
|
|
2811
|
+
withSeekBar: PropTypes.bool,
|
|
2812
|
+
withControls: PropTypes.bool
|
|
2826
2813
|
});
|
|
2827
|
-
var visualElement =
|
|
2814
|
+
var visualElement = PropTypes.shape({
|
|
2828
2815
|
media: imageMedia
|
|
2829
2816
|
});
|
|
2830
|
-
|
|
2831
|
-
|
|
2817
|
+
PropTypes.arrayOf(visualElement);
|
|
2818
|
+
PropTypes.shape({
|
|
2832
2819
|
media: audioMedia,
|
|
2833
|
-
autoPlay:
|
|
2834
|
-
loop:
|
|
2820
|
+
autoPlay: PropTypes.bool,
|
|
2821
|
+
loop: PropTypes.bool,
|
|
2835
2822
|
closedCaptions: closedCaptionsMedia,
|
|
2836
|
-
withPlayPause:
|
|
2823
|
+
withPlayPause: PropTypes.bool
|
|
2837
2824
|
});
|
|
2838
|
-
|
|
2825
|
+
PropTypes.shape({
|
|
2839
2826
|
media: closedCaptionsMedia
|
|
2840
2827
|
});
|
|
2841
|
-
var backgroundElement =
|
|
2828
|
+
var backgroundElement = PropTypes.shape({
|
|
2842
2829
|
color: color,
|
|
2843
2830
|
image: imageMedia,
|
|
2844
2831
|
video: videoMedia
|
|
2845
2832
|
});
|
|
2846
|
-
var imageElementWithCaption =
|
|
2833
|
+
var imageElementWithCaption = PropTypes.shape({
|
|
2847
2834
|
image: imageMedia,
|
|
2848
2835
|
caption: textElement
|
|
2849
2836
|
});
|
|
2850
|
-
|
|
2851
|
-
var stackDirection =
|
|
2852
|
-
var stackAlign =
|
|
2853
|
-
var stackSpacing =
|
|
2854
|
-
|
|
2837
|
+
PropTypes.arrayOf(imageElementWithCaption);
|
|
2838
|
+
var stackDirection = PropTypes.oneOf(['horizontal', 'vertical']);
|
|
2839
|
+
var stackAlign = PropTypes.oneOf(['start', 'center', 'end']);
|
|
2840
|
+
var stackSpacing = PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['between', 'evenly', 'around'])]);
|
|
2841
|
+
PropTypes.shape({
|
|
2855
2842
|
direction: stackDirection,
|
|
2856
2843
|
align: stackAlign,
|
|
2857
|
-
width:
|
|
2858
|
-
height:
|
|
2844
|
+
width: PropTypes.number,
|
|
2845
|
+
height: PropTypes.number,
|
|
2859
2846
|
spacing: stackSpacing,
|
|
2860
|
-
reverse:
|
|
2847
|
+
reverse: PropTypes.bool
|
|
2861
2848
|
});
|
|
2862
|
-
|
|
2863
|
-
layout:
|
|
2864
|
-
spacing:
|
|
2849
|
+
PropTypes.shape({
|
|
2850
|
+
layout: PropTypes.arrayOf(PropTypes.string),
|
|
2851
|
+
spacing: PropTypes.number
|
|
2865
2852
|
});
|
|
2866
|
-
var geoPosition =
|
|
2867
|
-
lat:
|
|
2868
|
-
lng:
|
|
2853
|
+
var geoPosition = PropTypes.shape({
|
|
2854
|
+
lat: PropTypes.number,
|
|
2855
|
+
lng: PropTypes.number
|
|
2869
2856
|
});
|
|
2870
2857
|
var markerShape = {
|
|
2871
|
-
id:
|
|
2858
|
+
id: PropTypes.number,
|
|
2872
2859
|
geoPosition: geoPosition,
|
|
2873
2860
|
title: headingElement,
|
|
2874
2861
|
subtitle: headingElement,
|
|
2875
2862
|
description: textElement
|
|
2876
2863
|
};
|
|
2877
|
-
var marker =
|
|
2878
|
-
|
|
2879
|
-
var markerWithImage =
|
|
2864
|
+
var marker = PropTypes.shape(_objectSpread({}, markerShape));
|
|
2865
|
+
PropTypes.arrayOf(marker);
|
|
2866
|
+
var markerWithImage = PropTypes.shape(_objectSpread(_objectSpread({}, markerShape), {}, {
|
|
2880
2867
|
image: imageMedia
|
|
2881
2868
|
}));
|
|
2882
|
-
|
|
2869
|
+
PropTypes.arrayOf(markerWithImage);
|
|
2883
2870
|
var answerShape = {
|
|
2884
|
-
id:
|
|
2871
|
+
id: PropTypes.string,
|
|
2885
2872
|
label: textElement
|
|
2886
2873
|
};
|
|
2887
|
-
var answer =
|
|
2888
|
-
var quizAnswer =
|
|
2889
|
-
good:
|
|
2874
|
+
var answer = PropTypes.shape(_objectSpread({}, answerShape));
|
|
2875
|
+
var quizAnswer = PropTypes.shape(_objectSpread(_objectSpread({}, answerShape), {}, {
|
|
2876
|
+
good: PropTypes.bool
|
|
2890
2877
|
}));
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
var callToActionTypes =
|
|
2894
|
-
var callToAction =
|
|
2895
|
-
active:
|
|
2878
|
+
PropTypes.arrayOf(answer);
|
|
2879
|
+
PropTypes.arrayOf(quizAnswer);
|
|
2880
|
+
var callToActionTypes = PropTypes.oneOf(['swipe-up', 'button']);
|
|
2881
|
+
var callToAction = PropTypes.shape({
|
|
2882
|
+
active: PropTypes.bool,
|
|
2896
2883
|
type: callToActionTypes,
|
|
2897
|
-
url:
|
|
2884
|
+
url: PropTypes.string,
|
|
2898
2885
|
label: textElement,
|
|
2899
2886
|
buttonStyle: boxStyle
|
|
2900
2887
|
});
|
|
2901
|
-
|
|
2902
|
-
active:
|
|
2888
|
+
PropTypes.shape({
|
|
2889
|
+
active: PropTypes.bool,
|
|
2903
2890
|
label: textElement,
|
|
2904
2891
|
boxStyle: boxStyle
|
|
2905
2892
|
});
|
|
2906
|
-
|
|
2907
|
-
active:
|
|
2893
|
+
PropTypes.shape({
|
|
2894
|
+
active: PropTypes.bool
|
|
2908
2895
|
});
|
|
2909
|
-
var speaker =
|
|
2910
|
-
id:
|
|
2911
|
-
name:
|
|
2896
|
+
var speaker = PropTypes.shape({
|
|
2897
|
+
id: PropTypes.string,
|
|
2898
|
+
name: PropTypes.string,
|
|
2912
2899
|
avatar: imageMedia,
|
|
2913
|
-
side:
|
|
2900
|
+
side: PropTypes.oneOf(['left', 'right']),
|
|
2914
2901
|
color: color
|
|
2915
2902
|
});
|
|
2916
|
-
var speakers =
|
|
2917
|
-
var conversationMessage =
|
|
2918
|
-
speaker:
|
|
2919
|
-
message:
|
|
2903
|
+
var speakers = PropTypes.arrayOf(speaker);
|
|
2904
|
+
var conversationMessage = PropTypes.shape({
|
|
2905
|
+
speaker: PropTypes.string,
|
|
2906
|
+
message: PropTypes.string,
|
|
2920
2907
|
image: imageMedia
|
|
2921
2908
|
});
|
|
2922
|
-
var conversationMessages =
|
|
2923
|
-
|
|
2909
|
+
var conversationMessages = PropTypes.arrayOf(conversationMessage);
|
|
2910
|
+
PropTypes.shape({
|
|
2924
2911
|
speakers: speakers,
|
|
2925
2912
|
textStyle: textStyle,
|
|
2926
2913
|
messages: conversationMessages
|
|
@@ -2931,54 +2918,54 @@ PropTypes__default["default"].shape({
|
|
|
2931
2918
|
*/
|
|
2932
2919
|
|
|
2933
2920
|
var fieldShape = {
|
|
2934
|
-
name:
|
|
2935
|
-
type:
|
|
2921
|
+
name: PropTypes.string,
|
|
2922
|
+
type: PropTypes.string.isRequired,
|
|
2936
2923
|
label: text
|
|
2937
2924
|
};
|
|
2938
|
-
var field =
|
|
2939
|
-
isSection:
|
|
2940
|
-
fields:
|
|
2925
|
+
var field = PropTypes.shape(_objectSpread(_objectSpread({}, fieldShape), {}, {
|
|
2926
|
+
isSection: PropTypes.bool,
|
|
2927
|
+
fields: PropTypes.arrayOf(PropTypes.shape(fieldShape))
|
|
2941
2928
|
}));
|
|
2942
|
-
var fields =
|
|
2943
|
-
var screenDefinition =
|
|
2944
|
-
id:
|
|
2945
|
-
type:
|
|
2929
|
+
var fields = PropTypes.arrayOf(field);
|
|
2930
|
+
var screenDefinition = PropTypes.shape({
|
|
2931
|
+
id: PropTypes.string.isRequired,
|
|
2932
|
+
type: PropTypes.oneOf(['screen']).isRequired,
|
|
2946
2933
|
title: text.isRequired,
|
|
2947
|
-
layouts:
|
|
2934
|
+
layouts: PropTypes.arrayOf(PropTypes.string),
|
|
2948
2935
|
fields: fields
|
|
2949
2936
|
});
|
|
2950
|
-
|
|
2951
|
-
var fieldDefinition =
|
|
2952
|
-
id:
|
|
2953
|
-
type:
|
|
2937
|
+
PropTypes.arrayOf(screenDefinition);
|
|
2938
|
+
var fieldDefinition = PropTypes.shape({
|
|
2939
|
+
id: PropTypes.string.isRequired,
|
|
2940
|
+
type: PropTypes.oneOf(['field']).isRequired,
|
|
2954
2941
|
title: text.isRequired,
|
|
2955
2942
|
fields: fields
|
|
2956
2943
|
});
|
|
2957
|
-
|
|
2944
|
+
PropTypes.arrayOf(fieldDefinition);
|
|
2958
2945
|
|
|
2959
2946
|
/**
|
|
2960
2947
|
* Components
|
|
2961
2948
|
*/
|
|
2962
2949
|
var storyComponentShape = {
|
|
2963
|
-
type:
|
|
2950
|
+
type: PropTypes.string.isRequired
|
|
2964
2951
|
};
|
|
2965
|
-
var storyComponent =
|
|
2966
|
-
|
|
2967
|
-
var screenComponent =
|
|
2968
|
-
var screenComponents =
|
|
2952
|
+
var storyComponent = PropTypes.shape(_objectSpread({}, storyComponentShape));
|
|
2953
|
+
PropTypes.arrayOf(storyComponent);
|
|
2954
|
+
var screenComponent = PropTypes.shape(_objectSpread({}, storyComponentShape));
|
|
2955
|
+
var screenComponents = PropTypes.arrayOf(screenComponent);
|
|
2969
2956
|
|
|
2970
2957
|
/**
|
|
2971
2958
|
* Theme
|
|
2972
2959
|
*/
|
|
2973
|
-
var theme =
|
|
2974
|
-
id:
|
|
2975
|
-
textStyles:
|
|
2960
|
+
var theme = PropTypes.shape({
|
|
2961
|
+
id: PropTypes.string,
|
|
2962
|
+
textStyles: PropTypes.objectOf(textStyle),
|
|
2976
2963
|
// renamed to textstyles
|
|
2977
2964
|
background: backgroundElement,
|
|
2978
|
-
colors:
|
|
2965
|
+
colors: PropTypes.objectOf(color),
|
|
2979
2966
|
components: screenComponents
|
|
2980
2967
|
});
|
|
2981
|
-
|
|
2968
|
+
PropTypes.shape(_objectSpread({
|
|
2982
2969
|
logo: imageMedia
|
|
2983
2970
|
}, theme));
|
|
2984
2971
|
|
|
@@ -2997,23 +2984,23 @@ PropTypes__default["default"].shape(_objectSpread__default["default"]({
|
|
|
2997
2984
|
/**
|
|
2998
2985
|
* Metadata
|
|
2999
2986
|
*/
|
|
3000
|
-
var metadata =
|
|
3001
|
-
description:
|
|
3002
|
-
shareUrl:
|
|
2987
|
+
var metadata = PropTypes.shape({
|
|
2988
|
+
description: PropTypes.string,
|
|
2989
|
+
shareUrl: PropTypes.string,
|
|
3003
2990
|
shareImage: imageMedia,
|
|
3004
2991
|
favIcon: imageMedia
|
|
3005
2992
|
});
|
|
3006
|
-
var tag =
|
|
3007
|
-
label:
|
|
3008
|
-
value:
|
|
2993
|
+
var tag = PropTypes.shape({
|
|
2994
|
+
label: PropTypes.string,
|
|
2995
|
+
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
3009
2996
|
});
|
|
3010
|
-
|
|
2997
|
+
PropTypes.arrayOf(tag);
|
|
3011
2998
|
|
|
3012
2999
|
/**
|
|
3013
3000
|
* Story
|
|
3014
3001
|
*/
|
|
3015
|
-
|
|
3016
|
-
id:
|
|
3002
|
+
PropTypes.shape({
|
|
3003
|
+
id: PropTypes.string,
|
|
3017
3004
|
theme: theme,
|
|
3018
3005
|
components: screenComponents,
|
|
3019
3006
|
metadata: metadata
|
|
@@ -3022,68 +3009,68 @@ PropTypes__default["default"].shape({
|
|
|
3022
3009
|
/**
|
|
3023
3010
|
* Render
|
|
3024
3011
|
*/
|
|
3025
|
-
var deviceScreen =
|
|
3026
|
-
name:
|
|
3027
|
-
mediaQuery:
|
|
3012
|
+
var deviceScreen = PropTypes.shape({
|
|
3013
|
+
name: PropTypes.string.isRequired,
|
|
3014
|
+
mediaQuery: PropTypes.string
|
|
3028
3015
|
});
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
screen:
|
|
3032
|
-
screens:
|
|
3033
|
-
width:
|
|
3034
|
-
height:
|
|
3035
|
-
landscape:
|
|
3016
|
+
PropTypes.arrayOf(deviceScreen);
|
|
3017
|
+
PropTypes.shape({
|
|
3018
|
+
screen: PropTypes.string,
|
|
3019
|
+
screens: PropTypes.arrayOf(PropTypes.string),
|
|
3020
|
+
width: PropTypes.number,
|
|
3021
|
+
height: PropTypes.number,
|
|
3022
|
+
landscape: PropTypes.bool
|
|
3036
3023
|
});
|
|
3037
|
-
|
|
3024
|
+
PropTypes.oneOf(['view', 'placeholder', 'edit', 'preview', 'static', 'capture']);
|
|
3038
3025
|
|
|
3039
3026
|
/**
|
|
3040
3027
|
* Screens
|
|
3041
3028
|
*/
|
|
3042
3029
|
|
|
3043
|
-
|
|
3044
|
-
width:
|
|
3045
|
-
height:
|
|
3030
|
+
PropTypes.shape({
|
|
3031
|
+
width: PropTypes.number,
|
|
3032
|
+
height: PropTypes.number
|
|
3046
3033
|
});
|
|
3047
|
-
|
|
3048
|
-
width:
|
|
3049
|
-
height:
|
|
3050
|
-
url:
|
|
3034
|
+
PropTypes.shape({
|
|
3035
|
+
width: PropTypes.number,
|
|
3036
|
+
height: PropTypes.number,
|
|
3037
|
+
url: PropTypes.string,
|
|
3051
3038
|
target: target,
|
|
3052
|
-
iframe:
|
|
3039
|
+
iframe: PropTypes.string,
|
|
3053
3040
|
image: imageMedia
|
|
3054
3041
|
});
|
|
3055
|
-
|
|
3056
|
-
src:
|
|
3057
|
-
track:
|
|
3058
|
-
trackLng:
|
|
3059
|
-
controls:
|
|
3042
|
+
PropTypes.shape({
|
|
3043
|
+
src: PropTypes.string,
|
|
3044
|
+
track: PropTypes.string,
|
|
3045
|
+
trackLng: PropTypes.number,
|
|
3046
|
+
controls: PropTypes.bool
|
|
3060
3047
|
});
|
|
3061
|
-
var slide =
|
|
3048
|
+
var slide = PropTypes.shape({
|
|
3062
3049
|
image: imageMedia,
|
|
3063
|
-
text:
|
|
3050
|
+
text: PropTypes.string
|
|
3064
3051
|
});
|
|
3065
|
-
|
|
3052
|
+
PropTypes.arrayOf(slide);
|
|
3066
3053
|
|
|
3067
3054
|
// export const imageStyle = PropTypes.shape({
|
|
3068
3055
|
// alt: PropTypes.string,
|
|
3069
3056
|
// fit: PropTypes.object,
|
|
3070
3057
|
// });
|
|
3071
3058
|
|
|
3072
|
-
|
|
3059
|
+
PropTypes.shape({});
|
|
3073
3060
|
|
|
3074
3061
|
/**
|
|
3075
3062
|
* Transitions
|
|
3076
3063
|
*/
|
|
3077
3064
|
|
|
3078
|
-
var transitionName =
|
|
3065
|
+
var transitionName = PropTypes.oneOf(['fade', 'scale', 'slide']);
|
|
3079
3066
|
var transitionParams = {
|
|
3080
|
-
duration:
|
|
3081
|
-
easing:
|
|
3067
|
+
duration: PropTypes.number,
|
|
3068
|
+
easing: PropTypes.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear'])
|
|
3082
3069
|
};
|
|
3083
|
-
var transition =
|
|
3070
|
+
var transition = PropTypes.oneOfType([transitionName.isRequired, PropTypes.shape(_objectSpread({
|
|
3084
3071
|
name: transitionName.isRequired
|
|
3085
3072
|
}, transitionParams))]);
|
|
3086
|
-
|
|
3073
|
+
PropTypes.shape({
|
|
3087
3074
|
"in": transition,
|
|
3088
3075
|
out: transition
|
|
3089
3076
|
});
|
|
@@ -3092,73 +3079,73 @@ PropTypes__default["default"].shape({
|
|
|
3092
3079
|
* Search
|
|
3093
3080
|
*/
|
|
3094
3081
|
|
|
3095
|
-
var searchFilter =
|
|
3096
|
-
type:
|
|
3097
|
-
value:
|
|
3082
|
+
var searchFilter = PropTypes.shape({
|
|
3083
|
+
type: PropTypes.string,
|
|
3084
|
+
value: PropTypes.oneOf([PropTypes.string, PropTypes.number])
|
|
3098
3085
|
});
|
|
3099
|
-
|
|
3086
|
+
PropTypes.arrayOf(searchFilter);
|
|
3100
3087
|
|
|
3101
3088
|
/**
|
|
3102
3089
|
* Payments
|
|
3103
3090
|
*/
|
|
3104
3091
|
|
|
3105
|
-
var paymentItem =
|
|
3106
|
-
id:
|
|
3107
|
-
date:
|
|
3108
|
-
type:
|
|
3109
|
-
invoice_link:
|
|
3110
|
-
amount:
|
|
3092
|
+
var paymentItem = PropTypes.shape({
|
|
3093
|
+
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
3094
|
+
date: PropTypes.string,
|
|
3095
|
+
type: PropTypes.string,
|
|
3096
|
+
invoice_link: PropTypes.string,
|
|
3097
|
+
amount: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
3111
3098
|
});
|
|
3112
|
-
|
|
3099
|
+
PropTypes.arrayOf(paymentItem);
|
|
3113
3100
|
|
|
3114
3101
|
/**
|
|
3115
3102
|
* Page Metadada
|
|
3116
3103
|
*/
|
|
3117
3104
|
|
|
3118
|
-
var pageMetadata =
|
|
3119
|
-
canonical:
|
|
3120
|
-
description:
|
|
3121
|
-
keywords:
|
|
3122
|
-
image:
|
|
3123
|
-
url:
|
|
3105
|
+
var pageMetadata = PropTypes.shape({
|
|
3106
|
+
canonical: PropTypes.string,
|
|
3107
|
+
description: PropTypes.string,
|
|
3108
|
+
keywords: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
|
|
3109
|
+
image: PropTypes.shape({
|
|
3110
|
+
url: PropTypes.string
|
|
3124
3111
|
}),
|
|
3125
|
-
favicon:
|
|
3126
|
-
url:
|
|
3112
|
+
favicon: PropTypes.shape({
|
|
3113
|
+
url: PropTypes.string
|
|
3127
3114
|
}),
|
|
3128
|
-
rssUrl:
|
|
3129
|
-
atomUrl:
|
|
3130
|
-
microformats:
|
|
3115
|
+
rssUrl: PropTypes.string,
|
|
3116
|
+
atomUrl: PropTypes.string,
|
|
3117
|
+
microformats: PropTypes.arrayOf(PropTypes.shape({}))
|
|
3131
3118
|
});
|
|
3132
|
-
|
|
3119
|
+
PropTypes.shape({
|
|
3133
3120
|
name: textElement,
|
|
3134
|
-
avatar:
|
|
3135
|
-
url:
|
|
3121
|
+
avatar: PropTypes.shape({
|
|
3122
|
+
url: PropTypes.string
|
|
3136
3123
|
})
|
|
3137
3124
|
});
|
|
3138
|
-
|
|
3139
|
-
id:
|
|
3140
|
-
name:
|
|
3125
|
+
PropTypes.shape({
|
|
3126
|
+
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
3127
|
+
name: PropTypes.string
|
|
3141
3128
|
});
|
|
3142
|
-
var badge =
|
|
3129
|
+
var badge = PropTypes.shape({
|
|
3143
3130
|
label: textElement,
|
|
3144
3131
|
buttonStyle: boxStyle
|
|
3145
3132
|
});
|
|
3146
|
-
|
|
3133
|
+
PropTypes.shape({
|
|
3147
3134
|
badge: badge
|
|
3148
3135
|
});
|
|
3149
|
-
|
|
3136
|
+
PropTypes.shape({
|
|
3150
3137
|
callToAction: callToAction
|
|
3151
3138
|
});
|
|
3152
|
-
|
|
3139
|
+
PropTypes.shape();
|
|
3153
3140
|
|
|
3154
3141
|
/* eslint-disable react/no-array-index-key */
|
|
3155
3142
|
var propTypes$d = {
|
|
3156
|
-
title:
|
|
3157
|
-
url:
|
|
3143
|
+
title: PropTypes.string,
|
|
3144
|
+
url: PropTypes.string,
|
|
3158
3145
|
metadata: pageMetadata,
|
|
3159
|
-
fullTitle:
|
|
3160
|
-
suffix:
|
|
3161
|
-
children:
|
|
3146
|
+
fullTitle: PropTypes.string,
|
|
3147
|
+
suffix: PropTypes.string,
|
|
3148
|
+
children: PropTypes.node
|
|
3162
3149
|
};
|
|
3163
3150
|
var defaultProps$d = {
|
|
3164
3151
|
title: null,
|
|
@@ -3208,68 +3195,68 @@ var Meta = function Meta(_ref) {
|
|
|
3208
3195
|
var _ref5 = favicon || {},
|
|
3209
3196
|
_ref5$url = _ref5.url,
|
|
3210
3197
|
faviconUrl = _ref5$url === void 0 ? null : _ref5$url;
|
|
3211
|
-
return /*#__PURE__*/
|
|
3198
|
+
return /*#__PURE__*/React.createElement(reactHelmet.Helmet, null, /*#__PURE__*/React.createElement("title", null, realTitle !== null && realTitle.length > 0 ? realTitle : 'Micromag'), description !== null ? /*#__PURE__*/React.createElement("meta", {
|
|
3212
3199
|
name: "description",
|
|
3213
3200
|
content: description
|
|
3214
|
-
}) : null, language !== null ? /*#__PURE__*/
|
|
3201
|
+
}) : null, language !== null ? /*#__PURE__*/React.createElement("meta", {
|
|
3215
3202
|
name: "language",
|
|
3216
3203
|
content: language
|
|
3217
|
-
}) : null, keywords !== null &&
|
|
3204
|
+
}) : null, keywords !== null && isString(keywords) ? /*#__PURE__*/React.createElement("meta", {
|
|
3218
3205
|
name: "keywords",
|
|
3219
3206
|
content: keywords
|
|
3220
|
-
}) : null, keywords !== null &&
|
|
3207
|
+
}) : null, keywords !== null && isArray(keywords) ? /*#__PURE__*/React.createElement("meta", {
|
|
3221
3208
|
name: "keywords",
|
|
3222
3209
|
content: keywords.join(',')
|
|
3223
|
-
}) : null, canonical !== null ? /*#__PURE__*/
|
|
3210
|
+
}) : null, canonical !== null ? /*#__PURE__*/React.createElement("link", {
|
|
3224
3211
|
rel: "canonical",
|
|
3225
3212
|
href: canonical
|
|
3226
|
-
}) : null, faviconUrl !== null ? /*#__PURE__*/
|
|
3213
|
+
}) : null, faviconUrl !== null ? /*#__PURE__*/React.createElement("link", {
|
|
3227
3214
|
rel: "icon",
|
|
3228
3215
|
type: "image/png",
|
|
3229
3216
|
href: faviconUrl
|
|
3230
|
-
}) : null, rssUrl !== null ? /*#__PURE__*/
|
|
3217
|
+
}) : null, rssUrl !== null ? /*#__PURE__*/React.createElement("link", {
|
|
3231
3218
|
rel: "alternate",
|
|
3232
3219
|
type: "application/rss+xml",
|
|
3233
3220
|
href: rssUrl
|
|
3234
|
-
}) : null, atomUrl !== null ? /*#__PURE__*/
|
|
3221
|
+
}) : null, atomUrl !== null ? /*#__PURE__*/React.createElement("link", {
|
|
3235
3222
|
rel: "alternate",
|
|
3236
3223
|
type: "application/atom+xml",
|
|
3237
3224
|
href: atomUrl
|
|
3238
|
-
}) : null, imageUrl !== null ? /*#__PURE__*/
|
|
3225
|
+
}) : null, imageUrl !== null ? /*#__PURE__*/React.createElement("meta", {
|
|
3239
3226
|
property: "og:image",
|
|
3240
3227
|
content: imageUrl
|
|
3241
|
-
}) : null, imageUrl !== null ? /*#__PURE__*/
|
|
3228
|
+
}) : null, imageUrl !== null ? /*#__PURE__*/React.createElement("meta", {
|
|
3242
3229
|
property: "og:image:url",
|
|
3243
3230
|
content: imageUrl
|
|
3244
|
-
}) : null, imageWidth !== null ? /*#__PURE__*/
|
|
3231
|
+
}) : null, imageWidth !== null ? /*#__PURE__*/React.createElement("meta", {
|
|
3245
3232
|
property: "og:image:width",
|
|
3246
3233
|
content: imageWidth
|
|
3247
|
-
}) : null, imageHeight !== null ? /*#__PURE__*/
|
|
3234
|
+
}) : null, imageHeight !== null ? /*#__PURE__*/React.createElement("meta", {
|
|
3248
3235
|
property: "og:image:height",
|
|
3249
3236
|
content: imageHeight
|
|
3250
|
-
}) : null, /*#__PURE__*/
|
|
3237
|
+
}) : null, /*#__PURE__*/React.createElement("meta", {
|
|
3251
3238
|
property: "og:title",
|
|
3252
3239
|
content: realTitle
|
|
3253
|
-
}), description !== null ? /*#__PURE__*/
|
|
3240
|
+
}), description !== null ? /*#__PURE__*/React.createElement("meta", {
|
|
3254
3241
|
property: "og:description",
|
|
3255
3242
|
content: description
|
|
3256
|
-
}) : null, url !== null ? /*#__PURE__*/
|
|
3243
|
+
}) : null, url !== null ? /*#__PURE__*/React.createElement("meta", {
|
|
3257
3244
|
property: "og:url",
|
|
3258
3245
|
content: url
|
|
3259
|
-
}) : null, /*#__PURE__*/
|
|
3246
|
+
}) : null, /*#__PURE__*/React.createElement("meta", {
|
|
3260
3247
|
name: "twitter:card",
|
|
3261
3248
|
content: imageUrl !== null ? 'summary_large_image' : 'summary'
|
|
3262
|
-
}), /*#__PURE__*/
|
|
3249
|
+
}), /*#__PURE__*/React.createElement("meta", {
|
|
3263
3250
|
name: "twitter:title",
|
|
3264
3251
|
content: realTitle
|
|
3265
|
-
}), description !== null ? /*#__PURE__*/
|
|
3252
|
+
}), description !== null ? /*#__PURE__*/React.createElement("meta", {
|
|
3266
3253
|
name: "twitter:description",
|
|
3267
3254
|
content: description
|
|
3268
|
-
}) : null, imageUrl !== null ? /*#__PURE__*/
|
|
3255
|
+
}) : null, imageUrl !== null ? /*#__PURE__*/React.createElement("meta", {
|
|
3269
3256
|
name: "twitter:image",
|
|
3270
3257
|
content: imageUrl
|
|
3271
3258
|
}) : null, (microformats || []).map(function (it) {
|
|
3272
|
-
return /*#__PURE__*/
|
|
3259
|
+
return /*#__PURE__*/React.createElement("script", {
|
|
3273
3260
|
type: "application/ld+json",
|
|
3274
3261
|
id: "".concat(it["@type"], "-").concat(it.identifier),
|
|
3275
3262
|
key: "microformat-".concat(it["@type"], "-").concat(it.identifier)
|
|
@@ -3282,13 +3269,13 @@ Meta.defaultProps = defaultProps$d;
|
|
|
3282
3269
|
var styles$e = {"container":"micromag-core-partials-slideshow-container","items":"micromag-core-partials-slideshow-items","item":"micromag-core-partials-slideshow-item","prev":"micromag-core-partials-slideshow-prev","current":"micromag-core-partials-slideshow-current","next":"micromag-core-partials-slideshow-next"};
|
|
3283
3270
|
|
|
3284
3271
|
var propTypes$c = {
|
|
3285
|
-
items:
|
|
3286
|
-
auto:
|
|
3287
|
-
delay:
|
|
3288
|
-
width:
|
|
3289
|
-
height:
|
|
3290
|
-
className:
|
|
3291
|
-
children:
|
|
3272
|
+
items: PropTypes.arrayOf(PropTypes.node),
|
|
3273
|
+
auto: PropTypes.bool,
|
|
3274
|
+
delay: PropTypes.number,
|
|
3275
|
+
width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
3276
|
+
height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
3277
|
+
className: PropTypes.string,
|
|
3278
|
+
children: PropTypes.node
|
|
3292
3279
|
};
|
|
3293
3280
|
var defaultProps$c = {
|
|
3294
3281
|
items: [],
|
|
@@ -3308,7 +3295,7 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
3308
3295
|
className = _ref.className,
|
|
3309
3296
|
children = _ref.children;
|
|
3310
3297
|
var _useState = React.useState(0),
|
|
3311
|
-
_useState2 =
|
|
3298
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
3312
3299
|
index = _useState2[0],
|
|
3313
3300
|
setIndex = _useState2[1];
|
|
3314
3301
|
React.useEffect(function () {
|
|
@@ -3332,16 +3319,15 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
3332
3319
|
width: width,
|
|
3333
3320
|
height: height
|
|
3334
3321
|
};
|
|
3335
|
-
return /*#__PURE__*/
|
|
3336
|
-
className:
|
|
3322
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3323
|
+
className: classNames([styles$e.container, _defineProperty({}, className, className)]),
|
|
3337
3324
|
style: style
|
|
3338
|
-
}, /*#__PURE__*/
|
|
3325
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3339
3326
|
className: styles$e.items
|
|
3340
3327
|
}, items.map(function (it, i) {
|
|
3341
|
-
|
|
3342
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3328
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3343
3329
|
key: "slide-".concat(i + 1),
|
|
3344
|
-
className:
|
|
3330
|
+
className: classNames([styles$e.item, _defineProperty(_defineProperty(_defineProperty({}, styles$e.prev, i < index), styles$e.current, i === index), styles$e.next, i > index)])
|
|
3345
3331
|
}, it);
|
|
3346
3332
|
})), children);
|
|
3347
3333
|
};
|
|
@@ -3355,11 +3341,11 @@ var AdFrame = function AdFrame(_ref) {
|
|
|
3355
3341
|
var width = _ref.width,
|
|
3356
3342
|
height = _ref.height,
|
|
3357
3343
|
className = _ref.className;
|
|
3358
|
-
return /*#__PURE__*/
|
|
3344
|
+
return /*#__PURE__*/React.createElement(PlaceholderBlock, {
|
|
3359
3345
|
width: width,
|
|
3360
3346
|
height: height,
|
|
3361
3347
|
className: className
|
|
3362
|
-
}, /*#__PURE__*/
|
|
3348
|
+
}, /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3363
3349
|
icon: faAd.faAd,
|
|
3364
3350
|
className: styles$d.icon
|
|
3365
3351
|
}));
|
|
@@ -3370,11 +3356,11 @@ var AdImage = function AdImage(_ref) {
|
|
|
3370
3356
|
var width = _ref.width,
|
|
3371
3357
|
height = _ref.height,
|
|
3372
3358
|
className = _ref.className;
|
|
3373
|
-
return /*#__PURE__*/
|
|
3359
|
+
return /*#__PURE__*/React.createElement(PlaceholderBlock, {
|
|
3374
3360
|
width: width,
|
|
3375
3361
|
height: height,
|
|
3376
3362
|
className: className
|
|
3377
|
-
}, /*#__PURE__*/
|
|
3363
|
+
}, /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3378
3364
|
icon: faImage.faImage,
|
|
3379
3365
|
className: styles$d.icon
|
|
3380
3366
|
}));
|
|
@@ -3387,11 +3373,11 @@ var Audio = function Audio(_ref) {
|
|
|
3387
3373
|
_ref$height = _ref.height,
|
|
3388
3374
|
height = _ref$height === void 0 ? '2em' : _ref$height,
|
|
3389
3375
|
className = _ref.className;
|
|
3390
|
-
return /*#__PURE__*/
|
|
3376
|
+
return /*#__PURE__*/React.createElement(PlaceholderBlock, {
|
|
3391
3377
|
width: width,
|
|
3392
3378
|
height: height,
|
|
3393
3379
|
className: className
|
|
3394
|
-
}, /*#__PURE__*/
|
|
3380
|
+
}, /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3395
3381
|
icon: faMusic.faMusic,
|
|
3396
3382
|
className: styles$d.icon
|
|
3397
3383
|
}));
|
|
@@ -3400,13 +3386,13 @@ var Audio = function Audio(_ref) {
|
|
|
3400
3386
|
var styles$c = {"container":"micromag-core-partials-placeholder-text-container","withInvertedColors":"micromag-core-partials-placeholder-text-withInvertedColors","line":"micromag-core-partials-placeholder-text-line"};
|
|
3401
3387
|
|
|
3402
3388
|
var propTypes$b = {
|
|
3403
|
-
lines:
|
|
3404
|
-
lineMargin:
|
|
3405
|
-
width:
|
|
3406
|
-
height:
|
|
3407
|
-
fontSize:
|
|
3408
|
-
className:
|
|
3409
|
-
withInvertedColors:
|
|
3389
|
+
lines: PropTypes.number,
|
|
3390
|
+
lineMargin: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
3391
|
+
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
3392
|
+
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
3393
|
+
fontSize: PropTypes.number,
|
|
3394
|
+
className: PropTypes.string,
|
|
3395
|
+
withInvertedColors: PropTypes.bool
|
|
3410
3396
|
};
|
|
3411
3397
|
var defaultProps$b = {
|
|
3412
3398
|
lines: 1,
|
|
@@ -3418,7 +3404,6 @@ var defaultProps$b = {
|
|
|
3418
3404
|
withInvertedColors: true
|
|
3419
3405
|
};
|
|
3420
3406
|
var PlaceholderText = function PlaceholderText(_ref) {
|
|
3421
|
-
var _ref2;
|
|
3422
3407
|
var lines = _ref.lines,
|
|
3423
3408
|
lineMargin = _ref.lineMargin,
|
|
3424
3409
|
width = _ref.width,
|
|
@@ -3426,12 +3411,12 @@ var PlaceholderText = function PlaceholderText(_ref) {
|
|
|
3426
3411
|
fontSize = _ref.fontSize,
|
|
3427
3412
|
className = _ref.className,
|
|
3428
3413
|
withInvertedColors = _ref.withInvertedColors;
|
|
3429
|
-
var lineHeight = height !== null &&
|
|
3430
|
-
var oddWidth =
|
|
3431
|
-
return /*#__PURE__*/
|
|
3432
|
-
className:
|
|
3433
|
-
},
|
|
3434
|
-
return /*#__PURE__*/
|
|
3414
|
+
var lineHeight = height !== null && isNumber(height) ? "".concat(Math.round(height * fontSize), "px") : height;
|
|
3415
|
+
var oddWidth = isNumber(width) ? width * 0.9 : '80%';
|
|
3416
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3417
|
+
className: classNames([styles$c.container, _defineProperty(_defineProperty({}, className, className), styles$c.withInvertedColors, withInvertedColors)])
|
|
3418
|
+
}, _toConsumableArray(Array(lines)).map(function (e, index) {
|
|
3419
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3435
3420
|
key: "line-".concat(index),
|
|
3436
3421
|
className: styles$c.line,
|
|
3437
3422
|
style: {
|
|
@@ -3453,12 +3438,12 @@ var Button = function Button(_ref) {
|
|
|
3453
3438
|
_ref$height = _ref.height,
|
|
3454
3439
|
height = _ref$height === void 0 ? '0.4em' : _ref$height,
|
|
3455
3440
|
className = _ref.className;
|
|
3456
|
-
return /*#__PURE__*/
|
|
3441
|
+
return /*#__PURE__*/React.createElement(PlaceholderBlock, {
|
|
3457
3442
|
outline: true,
|
|
3458
3443
|
width: width,
|
|
3459
3444
|
height: height,
|
|
3460
3445
|
className: className
|
|
3461
|
-
}, /*#__PURE__*/
|
|
3446
|
+
}, /*#__PURE__*/React.createElement(PlaceholderText, {
|
|
3462
3447
|
line: 1,
|
|
3463
3448
|
height: "0.1em"
|
|
3464
3449
|
}));
|
|
@@ -3469,12 +3454,12 @@ var Image = function Image(_ref) {
|
|
|
3469
3454
|
var width = _ref.width,
|
|
3470
3455
|
height = _ref.height,
|
|
3471
3456
|
className = _ref.className,
|
|
3472
|
-
props =
|
|
3473
|
-
return /*#__PURE__*/
|
|
3457
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
3458
|
+
return /*#__PURE__*/React.createElement(PlaceholderBlock, Object.assign({}, props, {
|
|
3474
3459
|
width: width,
|
|
3475
3460
|
height: height,
|
|
3476
3461
|
className: className
|
|
3477
|
-
}), /*#__PURE__*/
|
|
3462
|
+
}), /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3478
3463
|
icon: faImage.faImage,
|
|
3479
3464
|
className: styles$d.icon
|
|
3480
3465
|
}));
|
|
@@ -3482,8 +3467,8 @@ var Image = function Image(_ref) {
|
|
|
3482
3467
|
|
|
3483
3468
|
/* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
|
|
3484
3469
|
var Line = function Line(props) {
|
|
3485
|
-
return /*#__PURE__*/
|
|
3486
|
-
className:
|
|
3470
|
+
return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
|
|
3471
|
+
className: classNames([props.className, styles$d.shortText]),
|
|
3487
3472
|
height: 0.2,
|
|
3488
3473
|
lines: 1
|
|
3489
3474
|
}));
|
|
@@ -3492,20 +3477,20 @@ var Line = function Line(props) {
|
|
|
3492
3477
|
var styles$b = {"container":"micromag-core-placeholders-map-container","icon":"micromag-core-placeholders-map-icon"};
|
|
3493
3478
|
|
|
3494
3479
|
var Map = function Map(props) {
|
|
3495
|
-
return /*#__PURE__*/
|
|
3480
|
+
return /*#__PURE__*/React.createElement(PlaceholderBlock, Object.assign({}, props, {
|
|
3496
3481
|
width: "100%",
|
|
3497
3482
|
height: "100%",
|
|
3498
|
-
className:
|
|
3499
|
-
}), /*#__PURE__*/
|
|
3483
|
+
className: classNames([styles$b.container, _defineProperty({}, props.className, props.className !== null)])
|
|
3484
|
+
}), /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3500
3485
|
icon: props.withImages ? faImage.faImage : faMapMarkerAlt.faMapMarkerAlt,
|
|
3501
3486
|
className: styles$b.icon
|
|
3502
|
-
}), /*#__PURE__*/
|
|
3487
|
+
}), /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3503
3488
|
icon: props.withImages ? faImage.faImage : faMapMarkerAlt.faMapMarkerAlt,
|
|
3504
3489
|
className: styles$b.icon
|
|
3505
|
-
}), /*#__PURE__*/
|
|
3490
|
+
}), /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3506
3491
|
icon: props.withImages ? faImage.faImage : faMapMarkerAlt.faMapMarkerAlt,
|
|
3507
3492
|
className: styles$b.icon
|
|
3508
|
-
}), /*#__PURE__*/
|
|
3493
|
+
}), /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3509
3494
|
icon: props.withImages ? faImage.faImage : faMapMarkerAlt.faMapMarkerAlt,
|
|
3510
3495
|
className: styles$b.icon
|
|
3511
3496
|
}));
|
|
@@ -3513,11 +3498,11 @@ var Map = function Map(props) {
|
|
|
3513
3498
|
|
|
3514
3499
|
/* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
|
|
3515
3500
|
var MapPath = function MapPath(props) {
|
|
3516
|
-
return /*#__PURE__*/
|
|
3501
|
+
return /*#__PURE__*/React.createElement(PlaceholderBlock, Object.assign({}, props, {
|
|
3517
3502
|
width: "100%",
|
|
3518
3503
|
height: "70%",
|
|
3519
|
-
className:
|
|
3520
|
-
}), /*#__PURE__*/
|
|
3504
|
+
className: classNames([props.className, styles$d.mapPath])
|
|
3505
|
+
}), /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3521
3506
|
icon: faMapMarkedAlt.faMapMarkedAlt,
|
|
3522
3507
|
size: "lg",
|
|
3523
3508
|
className: styles$d.icon
|
|
@@ -3526,8 +3511,8 @@ var MapPath = function MapPath(props) {
|
|
|
3526
3511
|
|
|
3527
3512
|
/* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
|
|
3528
3513
|
var Quote = function Quote(props) {
|
|
3529
|
-
return /*#__PURE__*/
|
|
3530
|
-
className:
|
|
3514
|
+
return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
|
|
3515
|
+
className: classNames([props.className, styles$d.subtitle]),
|
|
3531
3516
|
height: 0.5,
|
|
3532
3517
|
lines: 6
|
|
3533
3518
|
}));
|
|
@@ -3535,8 +3520,8 @@ var Quote = function Quote(props) {
|
|
|
3535
3520
|
|
|
3536
3521
|
/* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
|
|
3537
3522
|
var ShortText = function ShortText(props) {
|
|
3538
|
-
return /*#__PURE__*/
|
|
3539
|
-
className:
|
|
3523
|
+
return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
|
|
3524
|
+
className: classNames([props.className, styles$d.shortText]),
|
|
3540
3525
|
height: 0.2,
|
|
3541
3526
|
lines: 2
|
|
3542
3527
|
}));
|
|
@@ -3544,8 +3529,8 @@ var ShortText = function ShortText(props) {
|
|
|
3544
3529
|
|
|
3545
3530
|
/* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
|
|
3546
3531
|
var Subtitle = function Subtitle(props) {
|
|
3547
|
-
return /*#__PURE__*/
|
|
3548
|
-
className:
|
|
3532
|
+
return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
|
|
3533
|
+
className: classNames([props.className, styles$d.subtitle]),
|
|
3549
3534
|
height: 0.3,
|
|
3550
3535
|
lines: 1
|
|
3551
3536
|
}));
|
|
@@ -3561,18 +3546,18 @@ var TextPlaceholder = function TextPlaceholder(props) {
|
|
|
3561
3546
|
lines = _props$lines === void 0 ? 4 : _props$lines,
|
|
3562
3547
|
_props$lineMargin = props.lineMargin,
|
|
3563
3548
|
lineMargin = _props$lineMargin === void 0 ? 2 : _props$lineMargin;
|
|
3564
|
-
return /*#__PURE__*/
|
|
3549
|
+
return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
|
|
3565
3550
|
height: height,
|
|
3566
3551
|
lines: lines,
|
|
3567
3552
|
lineMargin: lineMargin,
|
|
3568
|
-
className:
|
|
3553
|
+
className: classNames([className, styles$d.text])
|
|
3569
3554
|
}));
|
|
3570
3555
|
};
|
|
3571
3556
|
|
|
3572
3557
|
/* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
|
|
3573
3558
|
var Timeline = function Timeline(props) {
|
|
3574
|
-
return /*#__PURE__*/
|
|
3575
|
-
className:
|
|
3559
|
+
return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
|
|
3560
|
+
className: classNames([props.className, styles$d.timeline])
|
|
3576
3561
|
}));
|
|
3577
3562
|
};
|
|
3578
3563
|
|
|
@@ -3584,8 +3569,8 @@ var Title$1 = function Title(props) {
|
|
|
3584
3569
|
lines = _props$lines === void 0 ? 2 : _props$lines,
|
|
3585
3570
|
_props$lineMargin = props.lineMargin,
|
|
3586
3571
|
lineMargin = _props$lineMargin === void 0 ? 2 : _props$lineMargin;
|
|
3587
|
-
return /*#__PURE__*/
|
|
3588
|
-
className:
|
|
3572
|
+
return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
|
|
3573
|
+
className: classNames([props.className, styles$d.title]),
|
|
3589
3574
|
height: height,
|
|
3590
3575
|
lines: lines,
|
|
3591
3576
|
lineMargin: lineMargin
|
|
@@ -3597,11 +3582,11 @@ var Video = function Video(_ref) {
|
|
|
3597
3582
|
var width = _ref.width,
|
|
3598
3583
|
height = _ref.height,
|
|
3599
3584
|
className = _ref.className;
|
|
3600
|
-
return /*#__PURE__*/
|
|
3585
|
+
return /*#__PURE__*/React.createElement(PlaceholderBlock, {
|
|
3601
3586
|
width: width,
|
|
3602
3587
|
height: height,
|
|
3603
3588
|
className: className
|
|
3604
|
-
}, /*#__PURE__*/
|
|
3589
|
+
}, /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3605
3590
|
icon: faVideo.faVideo,
|
|
3606
3591
|
className: styles$d.icon
|
|
3607
3592
|
}));
|
|
@@ -3613,15 +3598,15 @@ var Video360 = function Video360(_ref) {
|
|
|
3613
3598
|
var width = _ref.width,
|
|
3614
3599
|
height = _ref.height,
|
|
3615
3600
|
className = _ref.className;
|
|
3616
|
-
return /*#__PURE__*/
|
|
3601
|
+
return /*#__PURE__*/React.createElement(PlaceholderBlock, {
|
|
3617
3602
|
width: width,
|
|
3618
3603
|
height: height,
|
|
3619
|
-
className:
|
|
3604
|
+
className: classNames([styles$a.container, _defineProperty({}, className, className !== null)]),
|
|
3620
3605
|
boxClassName: styles$a.box
|
|
3621
|
-
}, /*#__PURE__*/
|
|
3606
|
+
}, /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3622
3607
|
icon: faVideo.faVideo,
|
|
3623
3608
|
className: styles$a.icon
|
|
3624
|
-
}), /*#__PURE__*/
|
|
3609
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
3625
3610
|
className: styles$a.label
|
|
3626
3611
|
}, "360"));
|
|
3627
3612
|
};
|
|
@@ -3631,14 +3616,14 @@ var VideoLoop = function VideoLoop(_ref) {
|
|
|
3631
3616
|
var width = _ref.width,
|
|
3632
3617
|
height = _ref.height,
|
|
3633
3618
|
className = _ref.className;
|
|
3634
|
-
return /*#__PURE__*/
|
|
3619
|
+
return /*#__PURE__*/React.createElement(PlaceholderBlock, {
|
|
3635
3620
|
width: width,
|
|
3636
3621
|
height: height,
|
|
3637
3622
|
className: className
|
|
3638
|
-
}, /*#__PURE__*/
|
|
3623
|
+
}, /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3639
3624
|
icon: faPlay.faPlay,
|
|
3640
3625
|
className: styles$d.icon
|
|
3641
|
-
}), /*#__PURE__*/
|
|
3626
|
+
}), /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3642
3627
|
icon: faRedo.faRedo,
|
|
3643
3628
|
className: styles$d.icon
|
|
3644
3629
|
}));
|
|
@@ -3648,13 +3633,13 @@ var styles$9 = {"container":"micromag-core-screens-screen-sizer-container","fram
|
|
|
3648
3633
|
|
|
3649
3634
|
var devicePixelRatio = typeof window !== 'undefined' ? window.devicePixelRatio || 1 : 1;
|
|
3650
3635
|
var propTypes$a = {
|
|
3651
|
-
width:
|
|
3652
|
-
height:
|
|
3653
|
-
fit:
|
|
3654
|
-
screenWidth:
|
|
3655
|
-
screenHeight:
|
|
3656
|
-
className:
|
|
3657
|
-
children:
|
|
3636
|
+
width: PropTypes.number,
|
|
3637
|
+
height: PropTypes.number,
|
|
3638
|
+
fit: PropTypes.oneOf([null, 'cover', 'contain']),
|
|
3639
|
+
screenWidth: PropTypes.number,
|
|
3640
|
+
screenHeight: PropTypes.number,
|
|
3641
|
+
className: PropTypes.string,
|
|
3642
|
+
children: PropTypes.node.isRequired
|
|
3658
3643
|
};
|
|
3659
3644
|
var defaultProps$a = {
|
|
3660
3645
|
width: null,
|
|
@@ -3730,25 +3715,25 @@ var ScreenSizer = function ScreenSizer(_ref) {
|
|
|
3730
3715
|
};
|
|
3731
3716
|
}, [screenWidth, screenHeight, frameScale]);
|
|
3732
3717
|
var hasFrameSize = frameWidth !== null && frameHeight !== null;
|
|
3733
|
-
return /*#__PURE__*/
|
|
3734
|
-
className:
|
|
3718
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3719
|
+
className: classNames([styles$9.container, _defineProperty({}, className, className !== null)]),
|
|
3735
3720
|
ref: !hasSize ? refContainer : null
|
|
3736
|
-
}, hasFrameSize ? /*#__PURE__*/
|
|
3721
|
+
}, hasFrameSize ? /*#__PURE__*/React.createElement("div", {
|
|
3737
3722
|
className: styles$9.frame,
|
|
3738
3723
|
style: {
|
|
3739
3724
|
width: frameWidth,
|
|
3740
3725
|
height: frameHeight
|
|
3741
3726
|
}
|
|
3742
|
-
}, /*#__PURE__*/
|
|
3727
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3743
3728
|
className: styles$9.screen,
|
|
3744
3729
|
style: {
|
|
3745
3730
|
width: screenWidth,
|
|
3746
3731
|
height: screenHeight,
|
|
3747
3732
|
transform: screenTransform
|
|
3748
3733
|
}
|
|
3749
|
-
}, /*#__PURE__*/
|
|
3734
|
+
}, /*#__PURE__*/React.createElement(contexts.ScreenSizeProvider, {
|
|
3750
3735
|
size: screenSize
|
|
3751
|
-
}, /*#__PURE__*/
|
|
3736
|
+
}, /*#__PURE__*/React.cloneElement(children, {
|
|
3752
3737
|
width: screenWidth,
|
|
3753
3738
|
height: screenHeight
|
|
3754
3739
|
})))) : null);
|
|
@@ -3761,14 +3746,14 @@ var styles$8 = {"container":"micromag-core-screens-screen-container"};
|
|
|
3761
3746
|
var propTypes$9 = {
|
|
3762
3747
|
screen: core.PropTypes.storyComponent.isRequired,
|
|
3763
3748
|
renderContext: core.PropTypes.renderContext,
|
|
3764
|
-
screenState:
|
|
3765
|
-
index:
|
|
3766
|
-
active:
|
|
3767
|
-
current:
|
|
3768
|
-
component:
|
|
3749
|
+
screenState: PropTypes.string,
|
|
3750
|
+
index: PropTypes.number,
|
|
3751
|
+
active: PropTypes.bool,
|
|
3752
|
+
current: PropTypes.bool,
|
|
3753
|
+
component: PropTypes.node,
|
|
3769
3754
|
components: core.PropTypes.components,
|
|
3770
|
-
className:
|
|
3771
|
-
mediaRef:
|
|
3755
|
+
className: PropTypes.string,
|
|
3756
|
+
mediaRef: PropTypes.func
|
|
3772
3757
|
};
|
|
3773
3758
|
var defaultProps$9 = {
|
|
3774
3759
|
active: true,
|
|
@@ -3801,36 +3786,36 @@ var Screen = function Screen(_ref) {
|
|
|
3801
3786
|
|
|
3802
3787
|
// Comment
|
|
3803
3788
|
|
|
3804
|
-
return /*#__PURE__*/
|
|
3789
|
+
return /*#__PURE__*/React.createElement(contexts.ScreenProvider, {
|
|
3805
3790
|
data: screen,
|
|
3806
3791
|
renderContext: renderContext,
|
|
3807
3792
|
screenState: screenState
|
|
3808
|
-
}, ScreenComponent !== null ? /*#__PURE__*/
|
|
3809
|
-
className:
|
|
3810
|
-
}, /*#__PURE__*/
|
|
3793
|
+
}, ScreenComponent !== null ? /*#__PURE__*/React.createElement("div", {
|
|
3794
|
+
className: classNames([styles$8.container, _defineProperty({}, className, className !== null)])
|
|
3795
|
+
}, /*#__PURE__*/React.createElement(ScreenComponent, Object.assign({}, screen, {
|
|
3811
3796
|
index: index,
|
|
3812
3797
|
active: active,
|
|
3813
3798
|
current: current,
|
|
3814
3799
|
mediaRef: mediaRef
|
|
3815
|
-
}))) : /*#__PURE__*/
|
|
3800
|
+
}))) : /*#__PURE__*/React.createElement("div", {
|
|
3816
3801
|
className: className
|
|
3817
3802
|
}, component));
|
|
3818
3803
|
};
|
|
3819
3804
|
Screen.propTypes = propTypes$9;
|
|
3820
3805
|
Screen.defaultProps = defaultProps$9;
|
|
3821
|
-
var Screen$1 = /*#__PURE__*/
|
|
3806
|
+
var Screen$1 = /*#__PURE__*/React.memo(Screen);
|
|
3822
3807
|
|
|
3823
3808
|
var styles$7 = {"screen":"micromag-core-screens-screen-placeholder-screen"};
|
|
3824
3809
|
|
|
3825
3810
|
var _excluded$1 = ["screen", "layout", "screenWidth", "screenHeight", "screenState", "withSize", "className"];
|
|
3826
3811
|
var propTypes$8 = {
|
|
3827
3812
|
screen: core.PropTypes.component.isRequired,
|
|
3828
|
-
layout:
|
|
3829
|
-
screenWidth:
|
|
3830
|
-
screenHeight:
|
|
3831
|
-
screenState:
|
|
3832
|
-
withSize:
|
|
3833
|
-
className:
|
|
3813
|
+
layout: PropTypes.string,
|
|
3814
|
+
screenWidth: PropTypes.number,
|
|
3815
|
+
screenHeight: PropTypes.number,
|
|
3816
|
+
screenState: PropTypes.string,
|
|
3817
|
+
withSize: PropTypes.bool,
|
|
3818
|
+
className: PropTypes.string
|
|
3834
3819
|
};
|
|
3835
3820
|
var defaultProps$8 = {
|
|
3836
3821
|
layout: undefined,
|
|
@@ -3848,15 +3833,15 @@ var ScreenPlaceholder = function ScreenPlaceholder(_ref) {
|
|
|
3848
3833
|
screenState = _ref.screenState,
|
|
3849
3834
|
withSize = _ref.withSize,
|
|
3850
3835
|
className = _ref.className,
|
|
3851
|
-
props =
|
|
3852
|
-
var screenElement = /*#__PURE__*/
|
|
3836
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
3837
|
+
var screenElement = /*#__PURE__*/React.createElement(Screen$1, Object.assign({
|
|
3853
3838
|
screen: screen,
|
|
3854
3839
|
renderContext: "placeholder",
|
|
3855
3840
|
screenState: screenState,
|
|
3856
3841
|
layout: layout,
|
|
3857
|
-
className:
|
|
3842
|
+
className: classNames([styles$7.screen, _defineProperty({}, className, !withSize)])
|
|
3858
3843
|
}, props));
|
|
3859
|
-
return withSize ? /*#__PURE__*/
|
|
3844
|
+
return withSize ? /*#__PURE__*/React.createElement(ScreenSizer, {
|
|
3860
3845
|
className: className,
|
|
3861
3846
|
screenWidth: screenWidth,
|
|
3862
3847
|
screenHeight: screenHeight
|
|
@@ -3864,21 +3849,21 @@ var ScreenPlaceholder = function ScreenPlaceholder(_ref) {
|
|
|
3864
3849
|
};
|
|
3865
3850
|
ScreenPlaceholder.propTypes = propTypes$8;
|
|
3866
3851
|
ScreenPlaceholder.defaultProps = defaultProps$8;
|
|
3867
|
-
var Placeholder = /*#__PURE__*/
|
|
3852
|
+
var Placeholder = /*#__PURE__*/React.memo(ScreenPlaceholder);
|
|
3868
3853
|
|
|
3869
3854
|
var styles$6 = {"stack":"micromag-core-screens-preview-stack","stackScreen":"micromag-core-screens-preview-stackScreen","stackItem":"micromag-core-screens-preview-stackItem","screen":"micromag-core-screens-preview-screen"};
|
|
3870
3855
|
|
|
3871
3856
|
var _excluded = ["screen", "screenState", "width", "height", "screenWidth", "screenHeight", "className", "withSize", "hidden"];
|
|
3872
3857
|
var propTypes$7 = {
|
|
3873
3858
|
screen: core.PropTypes.component.isRequired,
|
|
3874
|
-
screenState:
|
|
3875
|
-
width:
|
|
3876
|
-
height:
|
|
3877
|
-
screenWidth:
|
|
3878
|
-
screenHeight:
|
|
3879
|
-
className:
|
|
3880
|
-
withSize:
|
|
3881
|
-
hidden:
|
|
3859
|
+
screenState: PropTypes.string,
|
|
3860
|
+
width: PropTypes.number,
|
|
3861
|
+
height: PropTypes.number,
|
|
3862
|
+
screenWidth: PropTypes.number,
|
|
3863
|
+
screenHeight: PropTypes.number,
|
|
3864
|
+
className: PropTypes.string,
|
|
3865
|
+
withSize: PropTypes.bool,
|
|
3866
|
+
hidden: PropTypes.bool
|
|
3882
3867
|
};
|
|
3883
3868
|
var defaultProps$7 = {
|
|
3884
3869
|
screenState: null,
|
|
@@ -3900,17 +3885,17 @@ var ScreenPreview = function ScreenPreview(_ref) {
|
|
|
3900
3885
|
className = _ref.className,
|
|
3901
3886
|
withSize = _ref.withSize,
|
|
3902
3887
|
hidden = _ref.hidden,
|
|
3903
|
-
props =
|
|
3904
|
-
var screenElement = /*#__PURE__*/
|
|
3888
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
3889
|
+
var screenElement = /*#__PURE__*/React.createElement(Screen$1, Object.assign({
|
|
3905
3890
|
screen: screen,
|
|
3906
3891
|
renderContext: "preview",
|
|
3907
3892
|
screenState: screenState,
|
|
3908
3893
|
width: !withSize ? width : undefined,
|
|
3909
3894
|
height: !withSize ? height : undefined,
|
|
3910
|
-
className:
|
|
3895
|
+
className: classNames([styles$6.screen, _defineProperty({}, className, !withSize)])
|
|
3911
3896
|
}, props));
|
|
3912
|
-
var element = !hidden ? screenElement : /*#__PURE__*/
|
|
3913
|
-
var screenWithSize = withSize ? /*#__PURE__*/
|
|
3897
|
+
var element = !hidden ? screenElement : /*#__PURE__*/React.createElement("div", null);
|
|
3898
|
+
var screenWithSize = withSize ? /*#__PURE__*/React.createElement(ScreenSizer, {
|
|
3914
3899
|
className: className,
|
|
3915
3900
|
screenWidth: screenWidth,
|
|
3916
3901
|
screenHeight: screenHeight,
|
|
@@ -3921,19 +3906,19 @@ var ScreenPreview = function ScreenPreview(_ref) {
|
|
|
3921
3906
|
};
|
|
3922
3907
|
ScreenPreview.propTypes = propTypes$7;
|
|
3923
3908
|
ScreenPreview.defaultProps = defaultProps$7;
|
|
3924
|
-
var Preview = /*#__PURE__*/
|
|
3909
|
+
var Preview = /*#__PURE__*/React.memo(ScreenPreview);
|
|
3925
3910
|
|
|
3926
3911
|
var styles$5 = {"container":"micromag-core-placeholders-conversation-container","icon":"micromag-core-placeholders-conversation-icon","message":"micromag-core-placeholders-conversation-message","placeholderMessage0":"micromag-core-placeholders-conversation-placeholderMessage0","placeholderMessage1":"micromag-core-placeholders-conversation-placeholderMessage1","placeholderMessage2":"micromag-core-placeholders-conversation-placeholderMessage2","placeholderMessage3":"micromag-core-placeholders-conversation-placeholderMessage3"};
|
|
3927
3912
|
|
|
3928
3913
|
var Conversation = function Conversation() {
|
|
3929
|
-
return /*#__PURE__*/
|
|
3914
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3930
3915
|
className: styles$5.container
|
|
3931
|
-
},
|
|
3932
|
-
return /*#__PURE__*/
|
|
3916
|
+
}, _toConsumableArray(Array(4)).map(function (e, idx) {
|
|
3917
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3933
3918
|
key: "message-".concat(idx + 1),
|
|
3934
|
-
className:
|
|
3919
|
+
className: classNames([styles$5.message, styles$5["placeholderMessage".concat(idx)]])
|
|
3935
3920
|
});
|
|
3936
|
-
}), /*#__PURE__*/
|
|
3921
|
+
}), /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3937
3922
|
icon: faCommentDots.faCommentDots,
|
|
3938
3923
|
className: styles$5.icon
|
|
3939
3924
|
}));
|
|
@@ -3946,7 +3931,7 @@ var InputText = function InputText(_ref) {
|
|
|
3946
3931
|
_ref$height = _ref.height,
|
|
3947
3932
|
height = _ref$height === void 0 ? '0.5em' : _ref$height,
|
|
3948
3933
|
className = _ref.className;
|
|
3949
|
-
return /*#__PURE__*/
|
|
3934
|
+
return /*#__PURE__*/React.createElement(PlaceholderBlock, {
|
|
3950
3935
|
outline: true,
|
|
3951
3936
|
width: width,
|
|
3952
3937
|
height: height,
|
|
@@ -3957,7 +3942,6 @@ var InputText = function InputText(_ref) {
|
|
|
3957
3942
|
var styles$4 = {"container":"micromag-core-placeholders-quiz-answer-container","block":"micromag-core-placeholders-quiz-answer-block","answer":"micromag-core-placeholders-quiz-answer-answer","answerIcon":"micromag-core-placeholders-quiz-answer-answerIcon","good":"micromag-core-placeholders-quiz-answer-good"};
|
|
3958
3943
|
|
|
3959
3944
|
var Answer$1 = function Answer(_ref) {
|
|
3960
|
-
var _ref2;
|
|
3961
3945
|
var _ref$width = _ref.width,
|
|
3962
3946
|
width = _ref$width === void 0 ? '75%' : _ref$width,
|
|
3963
3947
|
_ref$height = _ref.height,
|
|
@@ -3965,19 +3949,19 @@ var Answer$1 = function Answer(_ref) {
|
|
|
3965
3949
|
className = _ref.className,
|
|
3966
3950
|
_ref$good = _ref.good,
|
|
3967
3951
|
good = _ref$good === void 0 ? true : _ref$good;
|
|
3968
|
-
return /*#__PURE__*/
|
|
3969
|
-
className:
|
|
3970
|
-
}, /*#__PURE__*/
|
|
3952
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3953
|
+
className: classNames([styles$4.container, _defineProperty(_defineProperty({}, className, className !== null), styles$4.good, good)])
|
|
3954
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3971
3955
|
className: styles$4.answer
|
|
3972
|
-
}, /*#__PURE__*/
|
|
3956
|
+
}, /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3973
3957
|
className: styles$4.answerIcon,
|
|
3974
3958
|
icon: good ? faCheck.faCheck : faTimes.faTimes
|
|
3975
|
-
})), /*#__PURE__*/
|
|
3959
|
+
})), /*#__PURE__*/React.createElement(PlaceholderBlock, {
|
|
3976
3960
|
outline: true,
|
|
3977
3961
|
width: width,
|
|
3978
3962
|
height: height,
|
|
3979
3963
|
className: styles$4.block
|
|
3980
|
-
}, /*#__PURE__*/
|
|
3964
|
+
}, /*#__PURE__*/React.createElement(PlaceholderText, {
|
|
3981
3965
|
line: 1,
|
|
3982
3966
|
height: "0.2em"
|
|
3983
3967
|
})));
|
|
@@ -3986,24 +3970,24 @@ var Answer$1 = function Answer(_ref) {
|
|
|
3986
3970
|
var styles$3 = {"container":"micromag-core-placeholders-share-options-container","box":"micromag-core-placeholders-share-options-box","icon":"micromag-core-placeholders-share-options-icon","item":"micromag-core-placeholders-share-options-item","button":"micromag-core-placeholders-share-options-button"};
|
|
3987
3971
|
|
|
3988
3972
|
var Title = function Title(props) {
|
|
3989
|
-
return /*#__PURE__*/
|
|
3973
|
+
return /*#__PURE__*/React.createElement(PlaceholderBlock, Object.assign({}, props, {
|
|
3990
3974
|
width: "100%",
|
|
3991
3975
|
height: "100%",
|
|
3992
|
-
className:
|
|
3976
|
+
className: classNames([styles$3.container, _defineProperty({}, props.className, props.className !== null)]),
|
|
3993
3977
|
boxClassName: styles$3.box
|
|
3994
|
-
}), /*#__PURE__*/
|
|
3978
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
3995
3979
|
className: styles$3.item
|
|
3996
|
-
}, /*#__PURE__*/
|
|
3980
|
+
}, /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3997
3981
|
icon: faCircle.faCircle,
|
|
3998
3982
|
className: styles$3.icon
|
|
3999
|
-
})), /*#__PURE__*/
|
|
3983
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
4000
3984
|
className: styles$3.item
|
|
4001
|
-
}, /*#__PURE__*/
|
|
3985
|
+
}, /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
4002
3986
|
icon: faCircle.faCircle,
|
|
4003
3987
|
className: styles$3.icon
|
|
4004
|
-
})), /*#__PURE__*/
|
|
3988
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
4005
3989
|
className: styles$3.item
|
|
4006
|
-
}, /*#__PURE__*/
|
|
3990
|
+
}, /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
4007
3991
|
icon: faCircle.faCircle,
|
|
4008
3992
|
className: styles$3.icon
|
|
4009
3993
|
})));
|
|
@@ -4017,19 +4001,19 @@ var Answer = function Answer(_ref) {
|
|
|
4017
4001
|
_ref$height = _ref.height,
|
|
4018
4002
|
height = _ref$height === void 0 ? '0.3em' : _ref$height,
|
|
4019
4003
|
className = _ref.className;
|
|
4020
|
-
return /*#__PURE__*/
|
|
4021
|
-
className:
|
|
4022
|
-
}, /*#__PURE__*/
|
|
4004
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
4005
|
+
className: classNames([styles$2.container, _defineProperty({}, className, className !== null)])
|
|
4006
|
+
}, /*#__PURE__*/React.createElement(PlaceholderBlock, {
|
|
4023
4007
|
outline: true,
|
|
4024
4008
|
width: width,
|
|
4025
4009
|
height: height,
|
|
4026
4010
|
className: styles$2.block
|
|
4027
|
-
}, /*#__PURE__*/
|
|
4011
|
+
}, /*#__PURE__*/React.createElement(PlaceholderText, {
|
|
4028
4012
|
line: 1,
|
|
4029
4013
|
height: "0.2em"
|
|
4030
|
-
})), /*#__PURE__*/
|
|
4014
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
4031
4015
|
className: styles$2.percent
|
|
4032
|
-
}, /*#__PURE__*/
|
|
4016
|
+
}, /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
4033
4017
|
className: styles$2.percentIcon,
|
|
4034
4018
|
icon: faPercent.faPercent
|
|
4035
4019
|
})));
|
|
@@ -4063,15 +4047,15 @@ var Placeholders = /*#__PURE__*/Object.freeze({
|
|
|
4063
4047
|
|
|
4064
4048
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
4065
4049
|
var propTypes$6 = {
|
|
4066
|
-
children:
|
|
4067
|
-
placeholder:
|
|
4068
|
-
preview:
|
|
4069
|
-
empty:
|
|
4050
|
+
children: PropTypes.node,
|
|
4051
|
+
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
4052
|
+
preview: PropTypes.node,
|
|
4053
|
+
empty: PropTypes.node,
|
|
4070
4054
|
emptyLabel: core.PropTypes.label,
|
|
4071
|
-
isEmpty:
|
|
4072
|
-
placeholderProps:
|
|
4055
|
+
isEmpty: PropTypes.bool,
|
|
4056
|
+
placeholderProps: PropTypes.object,
|
|
4073
4057
|
// eslint-disable-line
|
|
4074
|
-
emptyClassName:
|
|
4058
|
+
emptyClassName: PropTypes.string
|
|
4075
4059
|
};
|
|
4076
4060
|
var defaultProps$6 = {
|
|
4077
4061
|
children: null,
|
|
@@ -4097,11 +4081,11 @@ var ScreenElement = function ScreenElement(_ref) {
|
|
|
4097
4081
|
isEdit = _useScreenRenderConte.isEdit,
|
|
4098
4082
|
isPreview = _useScreenRenderConte.isPreview;
|
|
4099
4083
|
if (isPlaceholder) {
|
|
4100
|
-
var PlaceholderComponent =
|
|
4101
|
-
return PlaceholderComponent !== null ? /*#__PURE__*/
|
|
4084
|
+
var PlaceholderComponent = isString(placeholder) ? utils.getComponentFromName(placeholder, Placeholders) : null;
|
|
4085
|
+
return PlaceholderComponent !== null ? /*#__PURE__*/React.createElement(PlaceholderComponent, placeholderProps) : placeholder;
|
|
4102
4086
|
}
|
|
4103
4087
|
if (isEdit && isEmpty) {
|
|
4104
|
-
return empty !== null ? empty : /*#__PURE__*/
|
|
4088
|
+
return empty !== null ? empty : /*#__PURE__*/React.createElement(Empty, {
|
|
4105
4089
|
className: emptyClassName
|
|
4106
4090
|
}, emptyLabel);
|
|
4107
4091
|
}
|
|
@@ -4117,8 +4101,8 @@ var styles$1 = {"container":"micromag-core-screens-container","screen":"micromag
|
|
|
4117
4101
|
|
|
4118
4102
|
var propTypes$5 = {
|
|
4119
4103
|
screens: core.PropTypes.storyComponents.isRequired,
|
|
4120
|
-
screen:
|
|
4121
|
-
className:
|
|
4104
|
+
screen: PropTypes.string,
|
|
4105
|
+
className: PropTypes.string
|
|
4122
4106
|
};
|
|
4123
4107
|
var defaultProps$5 = {
|
|
4124
4108
|
screen: null,
|
|
@@ -4128,14 +4112,14 @@ var Screens = function Screens(_ref) {
|
|
|
4128
4112
|
var screens = _ref.screens,
|
|
4129
4113
|
screenId = _ref.screen,
|
|
4130
4114
|
className = _ref.className;
|
|
4131
|
-
return /*#__PURE__*/
|
|
4132
|
-
className:
|
|
4115
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
4116
|
+
className: classNames([styles$1.container, _defineProperty({}, className, className)])
|
|
4133
4117
|
}, screens.map(function (screen) {
|
|
4134
4118
|
var id = screen.id;
|
|
4135
|
-
return /*#__PURE__*/
|
|
4119
|
+
return /*#__PURE__*/React.createElement(Screen$1, {
|
|
4136
4120
|
key: "screen-".concat(id),
|
|
4137
4121
|
screen: screen,
|
|
4138
|
-
className:
|
|
4122
|
+
className: classNames([styles$1.screen, _defineProperty({}, styles$1.visible, screenId === id)])
|
|
4139
4123
|
});
|
|
4140
4124
|
}));
|
|
4141
4125
|
};
|
|
@@ -4145,26 +4129,26 @@ Screens.defaultProps = defaultProps$5;
|
|
|
4145
4129
|
var styles = {"container":"micromag-core-transitions-transition-container","fullscreen":"micromag-core-transitions-transition-fullscreen"};
|
|
4146
4130
|
|
|
4147
4131
|
var propTypes$4 = {
|
|
4148
|
-
fullscreen:
|
|
4149
|
-
from:
|
|
4132
|
+
fullscreen: PropTypes.bool,
|
|
4133
|
+
from: PropTypes.objectOf(PropTypes.any),
|
|
4150
4134
|
// eslint-disable-line react/forbid-prop-types
|
|
4151
|
-
to:
|
|
4135
|
+
to: PropTypes.objectOf(PropTypes.any),
|
|
4152
4136
|
// eslint-disable-line react/forbid-prop-types
|
|
4153
|
-
playing:
|
|
4154
|
-
direction:
|
|
4155
|
-
delay:
|
|
4156
|
-
reversible:
|
|
4157
|
-
duration:
|
|
4158
|
-
easing:
|
|
4159
|
-
config:
|
|
4160
|
-
mass:
|
|
4161
|
-
friction:
|
|
4162
|
-
tension:
|
|
4137
|
+
playing: PropTypes.bool,
|
|
4138
|
+
direction: PropTypes.oneOf(['in', 'out']),
|
|
4139
|
+
delay: PropTypes.number,
|
|
4140
|
+
reversible: PropTypes.bool,
|
|
4141
|
+
duration: PropTypes.number,
|
|
4142
|
+
easing: PropTypes.func,
|
|
4143
|
+
config: PropTypes.shape({
|
|
4144
|
+
mass: PropTypes.number,
|
|
4145
|
+
friction: PropTypes.number,
|
|
4146
|
+
tension: PropTypes.number
|
|
4163
4147
|
}),
|
|
4164
|
-
children:
|
|
4165
|
-
className:
|
|
4166
|
-
onStart:
|
|
4167
|
-
onComplete:
|
|
4148
|
+
children: PropTypes.node,
|
|
4149
|
+
className: PropTypes.string,
|
|
4150
|
+
onStart: PropTypes.func,
|
|
4151
|
+
onComplete: PropTypes.func
|
|
4168
4152
|
};
|
|
4169
4153
|
var defaultProps$4 = {
|
|
4170
4154
|
fullscreen: false,
|
|
@@ -4183,7 +4167,6 @@ var defaultProps$4 = {
|
|
|
4183
4167
|
onComplete: null
|
|
4184
4168
|
};
|
|
4185
4169
|
function Transition(_ref) {
|
|
4186
|
-
var _ref2;
|
|
4187
4170
|
var fullscreen = _ref.fullscreen,
|
|
4188
4171
|
from = _ref.from,
|
|
4189
4172
|
to = _ref.to,
|
|
@@ -4201,7 +4184,7 @@ function Transition(_ref) {
|
|
|
4201
4184
|
var _useSpring = core$1.useSpring(function () {
|
|
4202
4185
|
return {};
|
|
4203
4186
|
}),
|
|
4204
|
-
_useSpring2 =
|
|
4187
|
+
_useSpring2 = _slicedToArray(_useSpring, 2),
|
|
4205
4188
|
springProps = _useSpring2[0],
|
|
4206
4189
|
setSpringProps = _useSpring2[1];
|
|
4207
4190
|
React.useEffect(function () {
|
|
@@ -4229,9 +4212,9 @@ function Transition(_ref) {
|
|
|
4229
4212
|
}
|
|
4230
4213
|
// console.log('fx', { reset, finalPlaying, immediate, reversible });
|
|
4231
4214
|
}, [playing, direction, delay, duration, reversible, easing, config, from, to, setSpringProps, onStart, onComplete]);
|
|
4232
|
-
return /*#__PURE__*/
|
|
4233
|
-
style:
|
|
4234
|
-
className:
|
|
4215
|
+
return /*#__PURE__*/React.createElement(web.animated.div, {
|
|
4216
|
+
style: _objectSpread({}, springProps),
|
|
4217
|
+
className: classNames([styles.container, _defineProperty(_defineProperty({}, className, className !== null), styles.fullscreen, fullscreen)])
|
|
4235
4218
|
}, children);
|
|
4236
4219
|
}
|
|
4237
4220
|
Transition.propTypes = propTypes$4;
|
|
@@ -4249,7 +4232,7 @@ function Fade(props) {
|
|
|
4249
4232
|
opacity: 1
|
|
4250
4233
|
};
|
|
4251
4234
|
}, []);
|
|
4252
|
-
return /*#__PURE__*/
|
|
4235
|
+
return /*#__PURE__*/React.createElement(Transition, Object.assign({}, props, {
|
|
4253
4236
|
from: from,
|
|
4254
4237
|
to: to
|
|
4255
4238
|
}));
|
|
@@ -4267,7 +4250,7 @@ function Scale(props) {
|
|
|
4267
4250
|
transform: 'scale(1)'
|
|
4268
4251
|
};
|
|
4269
4252
|
}, []);
|
|
4270
|
-
return /*#__PURE__*/
|
|
4253
|
+
return /*#__PURE__*/React.createElement(Transition, Object.assign({}, props, {
|
|
4271
4254
|
from: from,
|
|
4272
4255
|
to: to
|
|
4273
4256
|
}));
|
|
@@ -4279,13 +4262,13 @@ var TransitionComponents = {
|
|
|
4279
4262
|
};
|
|
4280
4263
|
|
|
4281
4264
|
var propTypes$3 = {
|
|
4282
|
-
fullscreen:
|
|
4283
|
-
playing:
|
|
4284
|
-
delay:
|
|
4265
|
+
fullscreen: PropTypes.bool,
|
|
4266
|
+
playing: PropTypes.bool,
|
|
4267
|
+
delay: PropTypes.number,
|
|
4285
4268
|
transitions: core.PropTypes.transitions,
|
|
4286
|
-
onComplete:
|
|
4287
|
-
disabled:
|
|
4288
|
-
children:
|
|
4269
|
+
onComplete: PropTypes.func,
|
|
4270
|
+
disabled: PropTypes.bool,
|
|
4271
|
+
children: PropTypes.node
|
|
4289
4272
|
};
|
|
4290
4273
|
var defaultProps$3 = {
|
|
4291
4274
|
fullscreen: false,
|
|
@@ -4338,22 +4321,22 @@ function Transitions(_ref) {
|
|
|
4338
4321
|
var sameTransitionInOut = transitionInName === transitionOutName;
|
|
4339
4322
|
var TransitionIn = finalTransitionIn !== null ? utils.getComponentFromName(transitionInName, TransitionComponents, null) : null;
|
|
4340
4323
|
var TransitionOut = finalTransitionOut !== null && !sameTransitionInOut ? utils.getComponentFromName(transitionOutName, TransitionComponents, null) : null;
|
|
4341
|
-
var transitionInProps = finalTransitionIn !== null ?
|
|
4324
|
+
var transitionInProps = finalTransitionIn !== null ? _objectSpread(_objectSpread({}, finalTransitionIn), {}, {
|
|
4342
4325
|
name: undefined,
|
|
4343
4326
|
delay: delay,
|
|
4344
4327
|
onComplete: onComplete
|
|
4345
4328
|
}) : null;
|
|
4346
|
-
var transitionOutProps = finalTransitionOut !== null ?
|
|
4329
|
+
var transitionOutProps = finalTransitionOut !== null ? _objectSpread(_objectSpread({}, finalTransitionOut), {}, {
|
|
4347
4330
|
name: undefined,
|
|
4348
4331
|
delay: delay,
|
|
4349
4332
|
onComplete: onComplete
|
|
4350
4333
|
}) : null;
|
|
4351
|
-
var renderTransitionOut = TransitionOut !== null && !disabled ? /*#__PURE__*/
|
|
4334
|
+
var renderTransitionOut = TransitionOut !== null && !disabled ? /*#__PURE__*/React.createElement(TransitionOut, Object.assign({
|
|
4352
4335
|
fullscreen: fullscreen,
|
|
4353
4336
|
playing: finalPlaying,
|
|
4354
4337
|
direction: "out"
|
|
4355
4338
|
}, transitionOutProps), children) : children;
|
|
4356
|
-
return TransitionIn !== null && !disabled ? /*#__PURE__*/
|
|
4339
|
+
return TransitionIn !== null && !disabled ? /*#__PURE__*/React.createElement(TransitionIn, Object.assign({
|
|
4357
4340
|
fullscreen: fullscreen,
|
|
4358
4341
|
playing: finalPlaying,
|
|
4359
4342
|
direction: !sameTransitionInOut ? 'in' : null
|
|
@@ -4364,12 +4347,12 @@ Transitions.defaultProps = defaultProps$3;
|
|
|
4364
4347
|
|
|
4365
4348
|
var propTypes$2 = {
|
|
4366
4349
|
transitions: core.PropTypes.transitions,
|
|
4367
|
-
stagger:
|
|
4368
|
-
playing:
|
|
4369
|
-
disabled:
|
|
4370
|
-
delay:
|
|
4371
|
-
fullscreen:
|
|
4372
|
-
children:
|
|
4350
|
+
stagger: PropTypes.number,
|
|
4351
|
+
playing: PropTypes.bool,
|
|
4352
|
+
disabled: PropTypes.bool,
|
|
4353
|
+
delay: PropTypes.number,
|
|
4354
|
+
fullscreen: PropTypes.bool,
|
|
4355
|
+
children: PropTypes.node
|
|
4373
4356
|
};
|
|
4374
4357
|
var defaultProps$2 = {
|
|
4375
4358
|
transitions: null,
|
|
@@ -4389,7 +4372,7 @@ var TransitionsStagger = function TransitionsStagger(_ref) {
|
|
|
4389
4372
|
fullscreen = _ref.fullscreen,
|
|
4390
4373
|
children = _ref.children;
|
|
4391
4374
|
var validIndex = 0;
|
|
4392
|
-
var elements =
|
|
4375
|
+
var elements = React.Children.map(children, function (child) {
|
|
4393
4376
|
if (!child) {
|
|
4394
4377
|
return null;
|
|
4395
4378
|
}
|
|
@@ -4401,7 +4384,7 @@ var TransitionsStagger = function TransitionsStagger(_ref) {
|
|
|
4401
4384
|
if (disabled || withoutTransitionsWrapper) {
|
|
4402
4385
|
return child;
|
|
4403
4386
|
}
|
|
4404
|
-
var el = /*#__PURE__*/
|
|
4387
|
+
var el = /*#__PURE__*/React.createElement(Transitions, {
|
|
4405
4388
|
transitions: transitions,
|
|
4406
4389
|
delay: delay + validIndex * stagger,
|
|
4407
4390
|
playing: playing,
|
|
@@ -4416,9 +4399,9 @@ TransitionsStagger.propTypes = propTypes$2;
|
|
|
4416
4399
|
TransitionsStagger.defaultProps = defaultProps$2;
|
|
4417
4400
|
|
|
4418
4401
|
var propTypes$1 = {
|
|
4419
|
-
selector:
|
|
4420
|
-
highlightSelector:
|
|
4421
|
-
style:
|
|
4402
|
+
selector: PropTypes.string,
|
|
4403
|
+
highlightSelector: PropTypes.string,
|
|
4404
|
+
style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))
|
|
4422
4405
|
};
|
|
4423
4406
|
var defaultProps$1 = {
|
|
4424
4407
|
selector: null,
|
|
@@ -4429,7 +4412,7 @@ var HighlightStyle = function HighlightStyle(_ref) {
|
|
|
4429
4412
|
var selector = _ref.selector,
|
|
4430
4413
|
highlightSelector = _ref.highlightSelector,
|
|
4431
4414
|
style = _ref.style;
|
|
4432
|
-
return style !== null ? /*#__PURE__*/
|
|
4415
|
+
return style !== null ? /*#__PURE__*/React.createElement("style", {
|
|
4433
4416
|
type: "text/css"
|
|
4434
4417
|
}, "".concat([selector, highlightSelector].filter(function (it) {
|
|
4435
4418
|
return it !== null;
|
|
@@ -4439,9 +4422,9 @@ HighlightStyle.propTypes = propTypes$1;
|
|
|
4439
4422
|
HighlightStyle.defaultProps = defaultProps$1;
|
|
4440
4423
|
|
|
4441
4424
|
var propTypes = {
|
|
4442
|
-
selector:
|
|
4443
|
-
linkSelector:
|
|
4444
|
-
style:
|
|
4425
|
+
selector: PropTypes.string,
|
|
4426
|
+
linkSelector: PropTypes.string,
|
|
4427
|
+
style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))
|
|
4445
4428
|
};
|
|
4446
4429
|
var defaultProps = {
|
|
4447
4430
|
selector: null,
|
|
@@ -4452,7 +4435,7 @@ var LinkStyle = function LinkStyle(_ref) {
|
|
|
4452
4435
|
var selector = _ref.selector,
|
|
4453
4436
|
linkSelector = _ref.linkSelector,
|
|
4454
4437
|
style = _ref.style;
|
|
4455
|
-
return style !== null ? /*#__PURE__*/
|
|
4438
|
+
return style !== null ? /*#__PURE__*/React.createElement("style", {
|
|
4456
4439
|
type: "text/css"
|
|
4457
4440
|
}, "".concat([selector, linkSelector].filter(function (it) {
|
|
4458
4441
|
return it !== null;
|