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