@micromag/core 0.3.311 → 0.3.318

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/lib/components.js CHANGED
@@ -89,23 +89,21 @@ var propTypes$L = {
89
89
  children: core.PropTypes.label.isRequired,
90
90
  isHtml: PropTypes__default["default"].bool,
91
91
  values: PropTypes__default["default"].object // eslint-disable-line react/forbid-prop-types
92
-
93
92
  };
93
+
94
94
  var defaultProps$L = {
95
95
  isHtml: false,
96
96
  values: {}
97
97
  };
98
-
99
98
  var Label = function Label(_ref) {
100
99
  var children = _ref.children,
101
- isHtml = _ref.isHtml,
102
- values = _ref.values;
100
+ isHtml = _ref.isHtml,
101
+ values = _ref.values;
103
102
  var Message = isHtml ? reactIntl.FormattedMessage : reactIntl.FormattedMessage;
104
103
  return utils.isMessage(children) ? /*#__PURE__*/React__default["default"].createElement(Message, Object.assign({
105
104
  values: values
106
105
  }, children)) : children;
107
106
  };
108
-
109
107
  Label.propTypes = propTypes$L;
110
108
  Label.defaultProps = defaultProps$L;
111
109
 
@@ -143,9 +141,9 @@ var propTypes$K = {
143
141
  onClick: PropTypes__default["default"].func,
144
142
  refButton: PropTypes__default["default"].oneOfType([PropTypes__default["default"].func, PropTypes__default["default"].shape({
145
143
  current: PropTypes__default["default"].any // eslint-disable-line
146
-
147
144
  })])
148
145
  };
146
+
149
147
  var defaultProps$K = {
150
148
  type: 'button',
151
149
  theme: null,
@@ -177,41 +175,38 @@ var defaultProps$K = {
177
175
  onClick: null,
178
176
  refButton: null
179
177
  };
180
-
181
178
  var Button$1 = function Button(_ref) {
182
179
  var _ref7, _ref8;
183
-
184
180
  var type = _ref.type,
185
- theme = _ref.theme,
186
- size = _ref.size,
187
- href = _ref.href,
188
- external = _ref.external,
189
- direct = _ref.direct,
190
- target = _ref.target,
191
- label = _ref.label,
192
- children = _ref.children,
193
- focusable = _ref.focusable,
194
- active = _ref.active,
195
- icon = _ref.icon,
196
- iconPosition = _ref.iconPosition,
197
- disabled = _ref.disabled,
198
- loading = _ref.loading,
199
- disableOnLoading = _ref.disableOnLoading,
200
- small = _ref.small,
201
- big = _ref.big,
202
- withShadow = _ref.withShadow,
203
- withoutStyle = _ref.withoutStyle,
204
- withoutBootstrapStyles = _ref.withoutBootstrapStyles,
205
- withoutTheme = _ref.withoutTheme,
206
- asLink = _ref.asLink,
207
- outline = _ref.outline,
208
- onClick = _ref.onClick,
209
- className = _ref.className,
210
- iconClassName = _ref.iconClassName,
211
- labelClassName = _ref.labelClassName,
212
- refButton = _ref.refButton,
213
- props = _objectWithoutProperties__default["default"](_ref, _excluded$b);
214
-
181
+ theme = _ref.theme,
182
+ size = _ref.size,
183
+ href = _ref.href,
184
+ external = _ref.external,
185
+ direct = _ref.direct,
186
+ target = _ref.target,
187
+ label = _ref.label,
188
+ children = _ref.children,
189
+ focusable = _ref.focusable,
190
+ active = _ref.active,
191
+ icon = _ref.icon,
192
+ iconPosition = _ref.iconPosition,
193
+ disabled = _ref.disabled,
194
+ loading = _ref.loading,
195
+ disableOnLoading = _ref.disableOnLoading,
196
+ small = _ref.small,
197
+ big = _ref.big,
198
+ withShadow = _ref.withShadow,
199
+ withoutStyle = _ref.withoutStyle,
200
+ withoutBootstrapStyles = _ref.withoutBootstrapStyles,
201
+ withoutTheme = _ref.withoutTheme,
202
+ asLink = _ref.asLink,
203
+ outline = _ref.outline,
204
+ onClick = _ref.onClick,
205
+ className = _ref.className,
206
+ iconClassName = _ref.iconClassName,
207
+ labelClassName = _ref.labelClassName,
208
+ refButton = _ref.refButton,
209
+ props = _objectWithoutProperties__default["default"](_ref, _excluded$b);
215
210
  var finalLabel = label || children;
216
211
  var text = finalLabel !== null ? /*#__PURE__*/React__default["default"].createElement(Label, null, finalLabel) : null;
217
212
  var hasChildren = label !== null && children !== null;
@@ -233,7 +228,6 @@ var Button$1 = function Button(_ref) {
233
228
  var buttonClassNames = classNames__default["default"]([!withoutBootstrapStyles ? (_ref7 = {
234
229
  btn: withStyle
235
230
  }, _defineProperty__default["default"](_ref7, "btn-".concat(outline ? 'outline-' : '').concat(theme), withStyle && theme !== null), _defineProperty__default["default"](_ref7, "btn-".concat(size), withStyle && size !== null), _defineProperty__default["default"](_ref7, "active", !withoutStyle && active), _ref7) : null, styles$w.container, (_ref8 = {}, _defineProperty__default["default"](_ref8, styles$w.withoutStyle, withoutStyle), _defineProperty__default["default"](_ref8, styles$w.withIcon, hasIcon), _defineProperty__default["default"](_ref8, styles$w.withIconColumns, hasIconColumns), _defineProperty__default["default"](_ref8, styles$w.withText, text !== null), _defineProperty__default["default"](_ref8, styles$w.withShadow, withShadow), _defineProperty__default["default"](_ref8, styles$w.isSmall, small), _defineProperty__default["default"](_ref8, styles$w.isBig, big), _defineProperty__default["default"](_ref8, styles$w.isLink, href !== null), _defineProperty__default["default"](_ref8, styles$w.asLink, asLink), _defineProperty__default["default"](_ref8, styles$w.isDisabled, disabled), _defineProperty__default["default"](_ref8, styles$w.isLoading, loading), _defineProperty__default["default"](_ref8, className, className !== null), _ref8)]);
236
-
237
231
  if (href !== null) {
238
232
  var linkClassNames = classNames__default["default"]([buttonClassNames, _defineProperty__default["default"]({
239
233
  disabled: disabled
@@ -253,7 +247,6 @@ var Button$1 = function Button(_ref) {
253
247
  tabIndex: focusable ? '' : '-1'
254
248
  }, content);
255
249
  }
256
-
257
250
  return /*#__PURE__*/React__default["default"].createElement("button", Object.assign({}, props, {
258
251
  type: type,
259
252
  className: buttonClassNames,
@@ -263,7 +256,6 @@ var Button$1 = function Button(_ref) {
263
256
  tabIndex: focusable ? '0' : '-1'
264
257
  }), content);
265
258
  };
266
-
267
259
  Button$1.propTypes = propTypes$K;
268
260
  Button$1.defaultProps = defaultProps$K;
269
261
 
@@ -288,29 +280,26 @@ var defaultProps$J = {
288
280
  className: null,
289
281
  buttonClassName: null
290
282
  };
291
-
292
283
  var Buttons = function Buttons(_ref) {
293
284
  var buttons = _ref.buttons,
294
- size = _ref.size,
295
- theme = _ref.theme,
296
- renderButton = _ref.renderButton,
297
- onClickButton = _ref.onClickButton,
298
- buttonClassName = _ref.buttonClassName,
299
- className = _ref.className;
285
+ size = _ref.size,
286
+ theme = _ref.theme,
287
+ renderButton = _ref.renderButton,
288
+ onClickButton = _ref.onClickButton,
289
+ buttonClassName = _ref.buttonClassName,
290
+ className = _ref.className;
300
291
  return /*#__PURE__*/React__default["default"].createElement("div", {
301
292
  className: classNames__default["default"](['btn-group', _defineProperty__default["default"]({}, "btn-group-".concat(size), size !== null), styles$v.container, _defineProperty__default["default"]({}, className, className !== null)]),
302
293
  role: "group"
303
294
  }, buttons.map(function (button, index) {
304
295
  var _ref4;
305
-
306
296
  var _button$className = button.className,
307
- customClassName = _button$className === void 0 ? null : _button$className,
308
- _button$onClick = button.onClick,
309
- _onClick = _button$onClick === void 0 ? null : _button$onClick,
310
- _button$theme = button.theme,
311
- buttonTheme = _button$theme === void 0 ? null : _button$theme,
312
- buttonProps = _objectWithoutProperties__default["default"](button, _excluded$a);
313
-
297
+ customClassName = _button$className === void 0 ? null : _button$className,
298
+ _button$onClick = button.onClick,
299
+ _onClick = _button$onClick === void 0 ? null : _button$onClick,
300
+ _button$theme = button.theme,
301
+ buttonTheme = _button$theme === void 0 ? null : _button$theme,
302
+ buttonProps = _objectWithoutProperties__default["default"](button, _excluded$a);
314
303
  var fixedProps = {
315
304
  key: "button-".concat(index),
316
305
  className: classNames__default["default"]([styles$v.button, (_ref4 = {}, _defineProperty__default["default"](_ref4, buttonClassName, buttonClassName !== null), _defineProperty__default["default"](_ref4, customClassName, customClassName !== null), _ref4)]),
@@ -318,7 +307,6 @@ var Buttons = function Buttons(_ref) {
318
307
  if (_onClick !== null) {
319
308
  _onClick(e, button, index);
320
309
  }
321
-
322
310
  if (onClickButton !== null) {
323
311
  onClickButton(e, button, index);
324
312
  }
@@ -328,7 +316,6 @@ var Buttons = function Buttons(_ref) {
328
316
  return renderButton !== null ? renderButton(button, index, fixedProps) : /*#__PURE__*/React__default["default"].createElement(Button$1, Object.assign({}, fixedProps, buttonProps));
329
317
  }));
330
318
  };
331
-
332
319
  Buttons.propTypes = propTypes$J;
333
320
  Buttons.defaultProps = defaultProps$J;
334
321
 
@@ -339,11 +326,9 @@ var propTypes$I = {
339
326
  var defaultProps$I = {
340
327
  className: null
341
328
  };
342
-
343
329
  var BackButton = function BackButton(_ref) {
344
330
  var className = _ref.className,
345
- props = _objectWithoutProperties__default["default"](_ref, _excluded$9);
346
-
331
+ props = _objectWithoutProperties__default["default"](_ref, _excluded$9);
347
332
  return /*#__PURE__*/React__default["default"].createElement(Button$1, Object.assign({
348
333
  className: classNames__default["default"](['px-2', _defineProperty__default["default"]({}, className, className)]),
349
334
  size: "sm",
@@ -353,14 +338,13 @@ var BackButton = function BackButton(_ref) {
353
338
  })
354
339
  }, props));
355
340
  };
356
-
357
341
  BackButton.propTypes = propTypes$I;
358
342
  BackButton.defaultProps = defaultProps$I;
359
343
 
360
344
  var styles$u = {"actions":"micromag-core-forms-form-actions","left":"micromag-core-forms-form-left","right":"micromag-core-forms-form-right"};
361
345
 
362
346
  var _excluded$8 = ["type"],
363
- _excluded2 = ["component", "id", "settings"];
347
+ _excluded2 = ["component", "id", "settings"];
364
348
  var propTypes$H = {
365
349
  name: PropTypes__default["default"].string,
366
350
  // .isRequired,
@@ -373,8 +357,8 @@ var propTypes$H = {
373
357
  gotoFieldForm: PropTypes__default["default"].func.isRequired,
374
358
  closeFieldForm: PropTypes__default["default"].func.isRequired,
375
359
  fieldContext: PropTypes__default["default"].any // eslint-disable-line react/forbid-prop-types
376
-
377
360
  };
361
+
378
362
  var defaultProps$H = {
379
363
  name: null,
380
364
  form: null,
@@ -385,51 +369,44 @@ var defaultProps$H = {
385
369
  onChange: null,
386
370
  fieldContext: null
387
371
  };
388
-
389
372
  var FieldForm = function FieldForm(_ref) {
390
373
  var name = _ref.name,
391
- value = _ref.value,
392
- form = _ref.form,
393
- formComponents = _ref.formComponents,
394
- fields = _ref.fields,
395
- className = _ref.className,
396
- onChange = _ref.onChange,
397
- gotoFieldForm = _ref.gotoFieldForm,
398
- closeFieldForm = _ref.closeFieldForm,
399
- fieldContext = _ref.fieldContext;
374
+ value = _ref.value,
375
+ form = _ref.form,
376
+ formComponents = _ref.formComponents,
377
+ fields = _ref.fields,
378
+ className = _ref.className,
379
+ onChange = _ref.onChange,
380
+ gotoFieldForm = _ref.gotoFieldForm,
381
+ closeFieldForm = _ref.closeFieldForm,
382
+ fieldContext = _ref.fieldContext;
400
383
  var fieldsManager = contexts.useFieldsManager();
401
384
  var field = utils.getFieldFromPath(name.split('.'), fields, fieldsManager);
402
-
403
385
  var _ref2 = field || {},
404
- _ref2$type = _ref2.type,
405
- type = _ref2$type === void 0 ? null : _ref2$type,
406
- fieldProps = _objectWithoutProperties__default["default"](_ref2, _excluded$8);
407
-
386
+ _ref2$type = _ref2.type,
387
+ type = _ref2$type === void 0 ? null : _ref2$type,
388
+ fieldProps = _objectWithoutProperties__default["default"](_ref2, _excluded$8);
408
389
  var fieldDefinition = fieldsManager.getDefinition(type) || null;
409
-
410
390
  var fieldData = fieldDefinition || _objectSpread__default["default"]({}, field);
411
-
412
391
  var _ref3 = fieldData || {},
413
- _ref3$component = _ref3.component,
414
- fieldComponent = _ref3$component === void 0 ? null : _ref3$component;
415
- _ref3.id;
416
- _ref3.settings;
417
- var definitionProps = _objectWithoutProperties__default["default"](_ref3, _excluded2);
418
-
392
+ _ref3$component = _ref3.component,
393
+ fieldComponent = _ref3$component === void 0 ? null : _ref3$component;
394
+ _ref3.id;
395
+ _ref3.settings;
396
+ var definitionProps = _objectWithoutProperties__default["default"](_ref3, _excluded2);
419
397
  var FieldComponent = contexts.useFieldComponent(fieldComponent);
420
398
  var FormComponent = utils.getComponentFromName(form, formComponents);
421
399
  var fieldValue = get__default["default"](value, name, null);
422
-
423
400
  var onFieldChange = function onFieldChange(newFieldValue) {
424
401
  // const { name, fields: subFields = null } = field || {};
425
- var newValue = utils.setFieldValue(value, name.split('.'), newFieldValue // field === null || subFields !== null ? newFieldValue : newFieldValue[name],
402
+ var newValue = utils.setFieldValue(value, name.split('.'), newFieldValue
403
+ // field === null || subFields !== null ? newFieldValue : newFieldValue[name],
426
404
  );
427
405
 
428
406
  if (onChange !== null) {
429
407
  onChange(newValue);
430
408
  }
431
409
  };
432
-
433
410
  var closeForm = React.useCallback(function () {
434
411
  return closeFieldForm(name, form);
435
412
  }, [name, form, closeFieldForm]);
@@ -441,7 +418,6 @@ var FieldForm = function FieldForm(_ref) {
441
418
  closeFieldForm: closeFieldForm,
442
419
  closeForm: closeForm
443
420
  };
444
-
445
421
  if (form !== null) {
446
422
  return FormComponent !== null ? /*#__PURE__*/React__default["default"].createElement(contexts.FieldContextProvider, {
447
423
  context: fieldContext
@@ -450,9 +426,9 @@ var FieldForm = function FieldForm(_ref) {
450
426
  }, formProps, {
451
427
  className: className
452
428
  }))) : null;
453
- } // Use field component with isForm props
454
-
429
+ }
455
430
 
431
+ // Use field component with isForm props
456
432
  return FieldComponent !== null ? /*#__PURE__*/React__default["default"].createElement(contexts.FieldContextProvider, {
457
433
  context: fieldContext
458
434
  }, /*#__PURE__*/React__default["default"].createElement(FieldComponent, Object.assign({
@@ -461,7 +437,6 @@ var FieldForm = function FieldForm(_ref) {
461
437
  isForm: true
462
438
  }, formProps))) : null;
463
439
  };
464
-
465
440
  FieldForm.propTypes = propTypes$H;
466
441
  FieldForm.defaultProps = defaultProps$H;
467
442
 
@@ -523,49 +498,43 @@ var defaultProps$G = {
523
498
  actionsClassName: null,
524
499
  cancelClassName: null
525
500
  };
526
-
527
501
  var Form = function Form(_ref) {
528
502
  var _ref4;
529
-
530
503
  var action = _ref.action,
531
- method = _ref.method,
532
- initialFields = _ref.fields,
533
- initialValue = _ref.initialValue,
534
- postForm = _ref.postForm,
535
- submitButtonLabel = _ref.submitButtonLabel,
536
- submitButtonLoadingLabel = _ref.submitButtonLoadingLabel,
537
- buttons = _ref.buttons,
538
- children = _ref.children,
539
- actionsAlign = _ref.actionsAlign,
540
- withoutActions = _ref.withoutActions,
541
- withoutComplete = _ref.withoutComplete,
542
- withoutBackButton = _ref.withoutBackButton,
543
- onComplete = _ref.onComplete,
544
- onResponse = _ref.onResponse,
545
- onMessage = _ref.onMessage,
546
- onCancel = _ref.onCancel,
547
- onCancelHref = _ref.onCancelHref,
548
- onOpenFieldForm = _ref.onOpenFieldForm,
549
- onCloseFieldForm = _ref.onCloseFieldForm,
550
- className = _ref.className,
551
- fieldsClassName = _ref.fieldsClassName,
552
- actionsClassName = _ref.actionsClassName,
553
- cancelClassName = _ref.cancelClassName;
554
-
504
+ method = _ref.method,
505
+ initialFields = _ref.fields,
506
+ initialValue = _ref.initialValue,
507
+ postForm = _ref.postForm,
508
+ submitButtonLabel = _ref.submitButtonLabel,
509
+ submitButtonLoadingLabel = _ref.submitButtonLoadingLabel,
510
+ buttons = _ref.buttons,
511
+ children = _ref.children,
512
+ actionsAlign = _ref.actionsAlign,
513
+ withoutActions = _ref.withoutActions,
514
+ withoutComplete = _ref.withoutComplete,
515
+ withoutBackButton = _ref.withoutBackButton,
516
+ onComplete = _ref.onComplete,
517
+ onResponse = _ref.onResponse,
518
+ onMessage = _ref.onMessage,
519
+ onCancel = _ref.onCancel,
520
+ onCancelHref = _ref.onCancelHref,
521
+ onOpenFieldForm = _ref.onOpenFieldForm,
522
+ onCloseFieldForm = _ref.onCloseFieldForm,
523
+ className = _ref.className,
524
+ fieldsClassName = _ref.fieldsClassName,
525
+ actionsClassName = _ref.actionsClassName,
526
+ cancelClassName = _ref.cancelClassName;
555
527
  var _useState = React.useState(false),
556
- _useState2 = _slicedToArray__default["default"](_useState, 2),
557
- complete = _useState2[0],
558
- setComplete = _useState2[1];
559
-
528
+ _useState2 = _slicedToArray__default["default"](_useState, 2),
529
+ complete = _useState2[0],
530
+ setComplete = _useState2[1];
560
531
  React.useEffect(function () {
561
532
  var id = null;
562
-
563
533
  if (complete) {
564
534
  id = setTimeout(function () {
565
535
  setComplete(false);
566
536
  }, 3000);
567
537
  }
568
-
569
538
  return function () {
570
539
  clearTimeout(id);
571
540
  };
@@ -574,68 +543,61 @@ var Form = function Form(_ref) {
574
543
  if (onComplete !== null) {
575
544
  onComplete(data);
576
545
  }
577
-
578
546
  if (!withoutComplete) {
579
547
  setComplete(true);
580
548
  }
581
549
  }, [onComplete, setComplete]);
582
-
583
550
  var _useForm = hooks.useForm({
584
- value: initialValue,
585
- action: action,
586
- fields: initialFields,
587
- postForm: postForm,
588
- onComplete: onCompleteForm
589
- }),
590
- onSubmit = _useForm.onSubmit,
591
- fields = _useForm.fields,
592
- status = _useForm.status,
593
- value = _useForm.value,
594
- setValue = _useForm.setValue,
595
- errors = _useForm.errors,
596
- response = _useForm.response,
597
- generalError = _useForm.generalError;
598
-
551
+ value: initialValue,
552
+ action: action,
553
+ fields: initialFields,
554
+ postForm: postForm,
555
+ onComplete: onCompleteForm
556
+ }),
557
+ onSubmit = _useForm.onSubmit,
558
+ fields = _useForm.fields,
559
+ status = _useForm.status,
560
+ value = _useForm.value,
561
+ setValue = _useForm.setValue,
562
+ errors = _useForm.errors,
563
+ response = _useForm.response,
564
+ generalError = _useForm.generalError;
599
565
  var FieldsComponent = contexts.useFieldComponent('fields');
600
-
601
566
  React.useEffect(function () {
602
567
  if (onResponse !== null) {
603
568
  onResponse(response);
604
-
605
569
  if (onMessage !== null && response && response.message) {
606
570
  onMessage(response.message);
607
571
  }
608
572
  }
609
573
  }, [response, onResponse, onMessage]);
610
574
  var canSave = utils.validateFields(fields, value);
611
-
612
575
  var _useState3 = React.useState([]),
613
- _useState4 = _slicedToArray__default["default"](_useState3, 2),
614
- fieldPaths = _useState4[0],
615
- setFieldPaths = _useState4[1];
616
-
576
+ _useState4 = _slicedToArray__default["default"](_useState3, 2),
577
+ fieldPaths = _useState4[0],
578
+ setFieldPaths = _useState4[1];
617
579
  var gotoFieldForm = React.useCallback(function (field) {
618
580
  var formName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
619
581
  var fieldKey = "".concat(field).concat(formName !== null ? ":".concat(formName) : '');
620
582
  setFieldPaths([].concat(_toConsumableArray__default["default"](fieldPaths), [fieldKey]));
621
-
622
583
  if (onOpenFieldForm !== null) {
623
584
  onOpenFieldForm();
624
585
  }
625
586
  }, [fieldPaths, setFieldPaths]);
626
587
  var closeFieldForm = React.useCallback(function () {
627
588
  var newFields = _toConsumableArray__default["default"](fieldPaths);
628
-
629
589
  newFields.pop();
630
590
  setFieldPaths(_toConsumableArray__default["default"](newFields));
631
-
632
591
  if (onCloseFieldForm !== null) {
633
592
  onCloseFieldForm();
634
593
  }
635
- }, [fieldPaths, setFieldPaths]); // The last path
594
+ }, [fieldPaths, setFieldPaths]);
636
595
 
596
+ // The last path
637
597
  var fieldParams = fieldPaths.length > 0 ? fieldPaths[fieldPaths.length - 1] : null;
638
- var fieldName = fieldParams !== null ? fieldParams.replace(/\//g, '.') : null; // Get transition value
598
+ var fieldName = fieldParams !== null ? fieldParams.replace(/\//g, '.') : null;
599
+
600
+ // Get transition value
639
601
  // const { name: transitionName, timeout: transitionTimeout } = useFormTransition(
640
602
  // fieldPaths,
641
603
  // styles,
@@ -705,7 +667,6 @@ var Form = function Form(_ref) {
705
667
  }]
706
668
  })) : null) : null);
707
669
  };
708
-
709
670
  Form.propTypes = propTypes$G;
710
671
  Form.defaultProps = defaultProps$G;
711
672
 
@@ -730,17 +691,15 @@ var defaultProps$F = {
730
691
  withoutStyle: false,
731
692
  className: null
732
693
  };
733
-
734
694
  var Link = function Link(_ref) {
735
695
  var href = _ref.href,
736
- external = _ref.external,
737
- children = _ref.children,
738
- target = _ref.target,
739
- rel = _ref.rel,
740
- className = _ref.className,
741
- withoutStyle = _ref.withoutStyle,
742
- props = _objectWithoutProperties__default["default"](_ref, _excluded$7);
743
-
696
+ external = _ref.external,
697
+ children = _ref.children,
698
+ target = _ref.target,
699
+ rel = _ref.rel,
700
+ className = _ref.className,
701
+ withoutStyle = _ref.withoutStyle,
702
+ props = _objectWithoutProperties__default["default"](_ref, _excluded$7);
744
703
  return external ? /*#__PURE__*/React__default["default"].createElement("a", Object.assign({
745
704
  className: classNames__default["default"]([className, _defineProperty__default["default"]({}, styles$t.withoutStyle, withoutStyle)]),
746
705
  href: href,
@@ -751,7 +710,6 @@ var Link = function Link(_ref) {
751
710
  to: href
752
711
  }, props), /*#__PURE__*/React__default["default"].createElement(Label, null, children));
753
712
  };
754
-
755
713
  Link.propTypes = propTypes$F;
756
714
  Link.defaultProps = defaultProps$F;
757
715
 
@@ -811,40 +769,37 @@ var defaultProps$E = {
811
769
  onClickBody: null,
812
770
  onClickFooter: null
813
771
  };
814
-
815
772
  var Card = function Card(_ref) {
816
773
  var _ref10;
817
-
818
774
  var href = _ref.href,
819
- header = _ref.header,
820
- image = _ref.image,
821
- imageAlt = _ref.imageAlt,
822
- imageOverlay = _ref.imageOverlay,
823
- beforeBody = _ref.beforeBody,
824
- title = _ref.title,
825
- subtitle = _ref.subtitle,
826
- children = _ref.children,
827
- afterBody = _ref.afterBody,
828
- links = _ref.links,
829
- linksInSameBody = _ref.linksInSameBody,
830
- footer = _ref.footer,
831
- theme = _ref.theme,
832
- className = _ref.className,
833
- imageClassName = _ref.imageClassName,
834
- headerClassName = _ref.headerClassName,
835
- titleClassName = _ref.titleClassName,
836
- subtitleClassName = _ref.subtitleClassName,
837
- bodyClassName = _ref.bodyClassName,
838
- footerClassName = _ref.footerClassName,
839
- onClick = _ref.onClick,
840
- onClickBody = _ref.onClickBody,
841
- onClickFooter = _ref.onClickFooter;
775
+ header = _ref.header,
776
+ image = _ref.image,
777
+ imageAlt = _ref.imageAlt,
778
+ imageOverlay = _ref.imageOverlay,
779
+ beforeBody = _ref.beforeBody,
780
+ title = _ref.title,
781
+ subtitle = _ref.subtitle,
782
+ children = _ref.children,
783
+ afterBody = _ref.afterBody,
784
+ links = _ref.links,
785
+ linksInSameBody = _ref.linksInSameBody,
786
+ footer = _ref.footer,
787
+ theme = _ref.theme,
788
+ className = _ref.className,
789
+ imageClassName = _ref.imageClassName,
790
+ headerClassName = _ref.headerClassName,
791
+ titleClassName = _ref.titleClassName,
792
+ subtitleClassName = _ref.subtitleClassName,
793
+ bodyClassName = _ref.bodyClassName,
794
+ footerClassName = _ref.footerClassName,
795
+ onClick = _ref.onClick,
796
+ onClickBody = _ref.onClickBody,
797
+ onClickFooter = _ref.onClickFooter;
842
798
  var linksElements = (links || []).map(function (_ref2, index) {
843
799
  var label = _ref2.label,
844
- _ref2$className = _ref2.className,
845
- linkClassName = _ref2$className === void 0 ? null : _ref2$className,
846
- linkProps = _objectWithoutProperties__default["default"](_ref2, _excluded$6);
847
-
800
+ _ref2$className = _ref2.className,
801
+ linkClassName = _ref2$className === void 0 ? null : _ref2$className,
802
+ linkProps = _objectWithoutProperties__default["default"](_ref2, _excluded$6);
848
803
  return /*#__PURE__*/React__default["default"].createElement(Link, Object.assign({
849
804
  key: "link-".concat(label, "-").concat(index),
850
805
  className: classNames__default["default"](['card-link', _defineProperty__default["default"]({}, linkClassName, linkClassName !== null)])
@@ -885,14 +840,12 @@ var Card = function Card(_ref) {
885
840
  className: classNames__default["default"](['card-footer', _defineProperty__default["default"]({}, footerClassName, footerClassName !== null)])
886
841
  }, /*#__PURE__*/React__default["default"].createElement(Label, null, footer)) : null);
887
842
  var cardClassName = classNames__default["default"](['card', (_ref10 = {}, _defineProperty__default["default"](_ref10, "bg-".concat(theme), !imageOverlay && theme !== 'dark'), _defineProperty__default["default"](_ref10, 'bg-dark', imageOverlay || theme === 'dark'), _defineProperty__default["default"](_ref10, 'text-dark', theme === 'light'), _defineProperty__default["default"](_ref10, 'text-light', imageOverlay || theme === 'dark' || theme === 'primary'), _defineProperty__default["default"](_ref10, className, className !== null), _ref10)]);
888
-
889
843
  if (href !== null) {
890
844
  return /*#__PURE__*/React__default["default"].createElement(Link, {
891
845
  href: href,
892
846
  className: cardClassName
893
847
  }, cardInner);
894
848
  }
895
-
896
849
  if (onClick !== null) {
897
850
  return /*#__PURE__*/React__default["default"].createElement("button", {
898
851
  type: "button",
@@ -900,12 +853,10 @@ var Card = function Card(_ref) {
900
853
  onClick: onClick
901
854
  }, cardInner);
902
855
  }
903
-
904
856
  return /*#__PURE__*/React__default["default"].createElement("div", {
905
857
  className: cardClassName
906
858
  }, cardInner);
907
859
  };
908
-
909
860
  Card.propTypes = propTypes$E;
910
861
  Card.defaultProps = defaultProps$E;
911
862
 
@@ -919,11 +870,10 @@ var defaultProps$D = {
919
870
  color: 'currentColor',
920
871
  className: null
921
872
  };
922
-
923
873
  var Spinner = function Spinner(_ref) {
924
874
  var animated = _ref.animated,
925
- color = _ref.color,
926
- className = _ref.className;
875
+ color = _ref.color,
876
+ className = _ref.className;
927
877
  return /*#__PURE__*/React__default["default"].createElement("svg", {
928
878
  className: classNames__default["default"]([_defineProperty__default["default"]({}, className, className !== null)]),
929
879
  width: "38",
@@ -978,7 +928,6 @@ var Spinner = function Spinner(_ref) {
978
928
  repeatCount: "indefinite"
979
929
  }) : null))));
980
930
  };
981
-
982
931
  Spinner.propTypes = propTypes$D;
983
932
  Spinner.defaultProps = defaultProps$D;
984
933
 
@@ -997,19 +946,16 @@ var defaultProps$C = {
997
946
  children: null,
998
947
  className: null
999
948
  };
1000
-
1001
949
  var FormPanel = function FormPanel(_ref) {
1002
950
  var description = _ref.description,
1003
- loading = _ref.loading,
1004
- children = _ref.children,
1005
- className = _ref.className,
1006
- props = _objectWithoutProperties__default["default"](_ref, _excluded$5);
1007
-
951
+ loading = _ref.loading,
952
+ children = _ref.children,
953
+ className = _ref.className,
954
+ props = _objectWithoutProperties__default["default"](_ref, _excluded$5);
1008
955
  return /*#__PURE__*/React__default["default"].createElement(Card, Object.assign({
1009
956
  className: classNames__default["default"]([styles$s.container, _defineProperty__default["default"]({}, className, className !== null)])
1010
957
  }, props), description, loading ? /*#__PURE__*/React__default["default"].createElement(Spinner, null) : children);
1011
958
  };
1012
-
1013
959
  FormPanel.propTypes = propTypes$C;
1014
960
  FormPanel.defaultProps = defaultProps$C;
1015
961
 
@@ -1031,14 +977,13 @@ var defaultProps$B = {
1031
977
  noWrap: false,
1032
978
  className: null
1033
979
  };
1034
-
1035
980
  var Breadcrumb = function Breadcrumb(_ref) {
1036
981
  var items = _ref.items,
1037
- theme = _ref.theme,
1038
- separator = _ref.separator,
1039
- withoutBar = _ref.withoutBar,
1040
- noWrap = _ref.noWrap,
1041
- className = _ref.className;
982
+ theme = _ref.theme,
983
+ separator = _ref.separator,
984
+ withoutBar = _ref.withoutBar,
985
+ noWrap = _ref.noWrap,
986
+ className = _ref.className;
1042
987
  return /*#__PURE__*/React__default["default"].createElement("nav", {
1043
988
  className: className
1044
989
  }, /*#__PURE__*/React__default["default"].createElement("ol", {
@@ -1050,13 +995,12 @@ var Breadcrumb = function Breadcrumb(_ref) {
1050
995
  }])
1051
996
  }, items.map(function (_ref2, index) {
1052
997
  var _ref3;
1053
-
1054
998
  var url = _ref2.url,
1055
- label = _ref2.label,
1056
- _ref2$active = _ref2.active,
1057
- active = _ref2$active === void 0 ? false : _ref2$active,
1058
- _ref2$onClick = _ref2.onClick,
1059
- onClick = _ref2$onClick === void 0 ? null : _ref2$onClick;
999
+ label = _ref2.label,
1000
+ _ref2$active = _ref2.active,
1001
+ active = _ref2$active === void 0 ? false : _ref2$active,
1002
+ _ref2$onClick = _ref2.onClick,
1003
+ onClick = _ref2$onClick === void 0 ? null : _ref2$onClick;
1060
1004
  return /*#__PURE__*/React__default["default"].createElement("li", {
1061
1005
  className: classNames__default["default"](['breadcrumb-item', (_ref3 = {
1062
1006
  active: active
@@ -1072,7 +1016,6 @@ var Breadcrumb = function Breadcrumb(_ref) {
1072
1016
  }, /*#__PURE__*/React__default["default"].createElement(Label, null, label)) : null);
1073
1017
  })));
1074
1018
  };
1075
-
1076
1019
  Breadcrumb.propTypes = propTypes$B;
1077
1020
  Breadcrumb.defaultProps = defaultProps$B;
1078
1021
 
@@ -1097,32 +1040,29 @@ var defaultProps$A = {
1097
1040
  onClickItem: null,
1098
1041
  onClickOutside: null
1099
1042
  };
1100
-
1101
1043
  var Dropdown = function Dropdown(_ref) {
1102
1044
  var _ref2;
1103
-
1104
1045
  var items = _ref.items,
1105
- children = _ref.children,
1106
- visible = _ref.visible,
1107
- align = _ref.align,
1108
- className = _ref.className,
1109
- itemClassName = _ref.itemClassName,
1110
- onClickItem = _ref.onClickItem,
1111
- onClickOutside = _ref.onClickOutside;
1046
+ children = _ref.children,
1047
+ visible = _ref.visible,
1048
+ align = _ref.align,
1049
+ className = _ref.className,
1050
+ itemClassName = _ref.itemClassName,
1051
+ onClickItem = _ref.onClickItem,
1052
+ onClickOutside = _ref.onClickOutside;
1112
1053
  var refContainer = React.useRef(null);
1113
-
1114
1054
  var _useState = React.useState(visible),
1115
- _useState2 = _slicedToArray__default["default"](_useState, 2),
1116
- enabled = _useState2[0],
1117
- setEnabled = _useState2[1];
1118
-
1055
+ _useState2 = _slicedToArray__default["default"](_useState, 2),
1056
+ enabled = _useState2[0],
1057
+ setEnabled = _useState2[1];
1119
1058
  var onDocumentClick = React.useCallback(function (e) {
1120
1059
  if (refContainer.current && !refContainer.current.contains(e.currentTarget) && onClickOutside !== null) {
1121
1060
  onClickOutside(e);
1122
1061
  }
1123
1062
  }, [refContainer.current, onClickOutside]);
1124
- hooks.useDocumentEvent('click', onDocumentClick, enabled); // Delay the outside click detection
1063
+ hooks.useDocumentEvent('click', onDocumentClick, enabled);
1125
1064
 
1065
+ // Delay the outside click detection
1126
1066
  React.useEffect(function () {
1127
1067
  var id = setTimeout(function () {
1128
1068
  setEnabled(visible);
@@ -1136,23 +1076,20 @@ var Dropdown = function Dropdown(_ref) {
1136
1076
  ref: refContainer
1137
1077
  }, children !== null ? children : items.map(function (it, index) {
1138
1078
  var _ref3;
1139
-
1140
1079
  var _it$type = it.type,
1141
- type = _it$type === void 0 ? 'link' : _it$type,
1142
- _it$className = it.className,
1143
- customClassName = _it$className === void 0 ? null : _it$className,
1144
- _it$label = it.label,
1145
- label = _it$label === void 0 ? null : _it$label,
1146
- _it$children = it.children,
1147
- itemChildren = _it$children === void 0 ? null : _it$children,
1148
- _it$onClick = it.onClick,
1149
- customOnClick = _it$onClick === void 0 ? null : _it$onClick,
1150
- _it$active = it.active,
1151
- active = _it$active === void 0 ? false : _it$active,
1152
- itemProps = _objectWithoutProperties__default["default"](it, _excluded$4);
1153
-
1080
+ type = _it$type === void 0 ? 'link' : _it$type,
1081
+ _it$className = it.className,
1082
+ customClassName = _it$className === void 0 ? null : _it$className,
1083
+ _it$label = it.label,
1084
+ label = _it$label === void 0 ? null : _it$label,
1085
+ _it$children = it.children,
1086
+ itemChildren = _it$children === void 0 ? null : _it$children,
1087
+ _it$onClick = it.onClick,
1088
+ customOnClick = _it$onClick === void 0 ? null : _it$onClick,
1089
+ _it$active = it.active,
1090
+ active = _it$active === void 0 ? false : _it$active,
1091
+ itemProps = _objectWithoutProperties__default["default"](it, _excluded$4);
1154
1092
  var ItemComponent = 'div';
1155
-
1156
1093
  if (type === 'link') {
1157
1094
  ItemComponent = Link;
1158
1095
  } else if (type === 'button') {
@@ -1162,12 +1099,10 @@ var Dropdown = function Dropdown(_ref) {
1162
1099
  } else if (type === 'divider') {
1163
1100
  ItemComponent = 'hr';
1164
1101
  }
1165
-
1166
1102
  var finalOnClickItem = customOnClick !== null || type === 'link' && onClickItem !== null ? function (e) {
1167
1103
  if (customOnClick !== null) {
1168
1104
  customOnClick(e);
1169
1105
  }
1170
-
1171
1106
  if (type === 'link' && onClickItem !== null) {
1172
1107
  onClickItem(e);
1173
1108
  }
@@ -1184,7 +1119,6 @@ var Dropdown = function Dropdown(_ref) {
1184
1119
  }, itemProps), label !== null ? /*#__PURE__*/React__default["default"].createElement(Label, null, label) : itemChildren)) : null;
1185
1120
  }));
1186
1121
  };
1187
-
1188
1122
  Dropdown.propTypes = propTypes$A;
1189
1123
  Dropdown.defaultProps = defaultProps$A;
1190
1124
 
@@ -1227,63 +1161,57 @@ var defaultProps$z = {
1227
1161
  dropdownLinkClassName: null,
1228
1162
  dropdownAlign: null
1229
1163
  };
1230
-
1231
1164
  var Menu = function Menu(_ref) {
1232
1165
  var items = _ref.items,
1233
- tagName = _ref.tagName,
1234
- itemTagName = _ref.itemTagName,
1235
- children = _ref.children,
1236
- linkAsItem = _ref.linkAsItem,
1237
- className = _ref.className,
1238
- itemClassName = _ref.itemClassName,
1239
- linkClassName = _ref.linkClassName,
1240
- hasSubMenuClassName = _ref.hasSubMenuClassName,
1241
- subMenuClassName = _ref.subMenuClassName,
1242
- subMenuItemClassName = _ref.subMenuItemClassName,
1243
- subMenuLinkClassName = _ref.subMenuLinkClassName,
1244
- hasDropdownClassName = _ref.hasDropdownClassName,
1245
- dropdownClassName = _ref.dropdownClassName,
1246
- dropdownItemClassName = _ref.dropdownItemClassName,
1247
- dropdownLinkClassName = _ref.dropdownLinkClassName,
1248
- dropdownAlign = _ref.dropdownAlign;
1249
-
1166
+ tagName = _ref.tagName,
1167
+ itemTagName = _ref.itemTagName,
1168
+ children = _ref.children,
1169
+ linkAsItem = _ref.linkAsItem,
1170
+ className = _ref.className,
1171
+ itemClassName = _ref.itemClassName,
1172
+ linkClassName = _ref.linkClassName,
1173
+ hasSubMenuClassName = _ref.hasSubMenuClassName,
1174
+ subMenuClassName = _ref.subMenuClassName,
1175
+ subMenuItemClassName = _ref.subMenuItemClassName,
1176
+ subMenuLinkClassName = _ref.subMenuLinkClassName,
1177
+ hasDropdownClassName = _ref.hasDropdownClassName,
1178
+ dropdownClassName = _ref.dropdownClassName,
1179
+ dropdownItemClassName = _ref.dropdownItemClassName,
1180
+ dropdownLinkClassName = _ref.dropdownLinkClassName,
1181
+ dropdownAlign = _ref.dropdownAlign;
1250
1182
  var _useState = React.useState(items.map(function () {
1251
- return false;
1252
- })),
1253
- _useState2 = _slicedToArray__default["default"](_useState, 2),
1254
- dropdownsVisible = _useState2[0],
1255
- setDropdownsVisible = _useState2[1];
1256
-
1183
+ return false;
1184
+ })),
1185
+ _useState2 = _slicedToArray__default["default"](_useState, 2),
1186
+ dropdownsVisible = _useState2[0],
1187
+ setDropdownsVisible = _useState2[1];
1257
1188
  var ListComponent = linkAsItem ? 'div' : tagName;
1258
1189
  return /*#__PURE__*/React__default["default"].createElement(ListComponent, {
1259
1190
  className: className
1260
1191
  }, children !== null ? children : items.map(function (it, index) {
1261
1192
  var _classNames, _classNames2, _classNames3, _classNames4, _classNames5, _classNames6, _classNames7, _classNames8;
1262
-
1263
1193
  var id = it.id,
1264
- _it$className = it.className,
1265
- customClassName = _it$className === void 0 ? null : _it$className,
1266
- _it$linkClassName = it.linkClassName,
1267
- customLinkClassName = _it$linkClassName === void 0 ? null : _it$linkClassName,
1268
- _it$href = it.href,
1269
- href = _it$href === void 0 ? null : _it$href,
1270
- label = it.label,
1271
- _it$external = it.external,
1272
- external = _it$external === void 0 ? false : _it$external,
1273
- _it$items = it.items,
1274
- subItems = _it$items === void 0 ? null : _it$items,
1275
- _it$dropdown = it.dropdown,
1276
- dropdown = _it$dropdown === void 0 ? null : _it$dropdown,
1277
- _it$active = it.active,
1278
- active = _it$active === void 0 ? false : _it$active,
1279
- _it$onClick = it.onClick,
1280
- customOnClick = _it$onClick === void 0 ? null : _it$onClick,
1281
- itemProps = _objectWithoutProperties__default["default"](it, _excluded$3);
1282
-
1194
+ _it$className = it.className,
1195
+ customClassName = _it$className === void 0 ? null : _it$className,
1196
+ _it$linkClassName = it.linkClassName,
1197
+ customLinkClassName = _it$linkClassName === void 0 ? null : _it$linkClassName,
1198
+ _it$href = it.href,
1199
+ href = _it$href === void 0 ? null : _it$href,
1200
+ label = it.label,
1201
+ _it$external = it.external,
1202
+ external = _it$external === void 0 ? false : _it$external,
1203
+ _it$items = it.items,
1204
+ subItems = _it$items === void 0 ? null : _it$items,
1205
+ _it$dropdown = it.dropdown,
1206
+ dropdown = _it$dropdown === void 0 ? null : _it$dropdown,
1207
+ _it$active = it.active,
1208
+ active = _it$active === void 0 ? false : _it$active,
1209
+ _it$onClick = it.onClick,
1210
+ customOnClick = _it$onClick === void 0 ? null : _it$onClick,
1211
+ itemProps = _objectWithoutProperties__default["default"](it, _excluded$3);
1283
1212
  var onClickItem = dropdown !== null ? function (e) {
1284
1213
  e.preventDefault();
1285
1214
  setDropdownsVisible([].concat(_toConsumableArray__default["default"](dropdownsVisible.slice(0, index)), [!(dropdownsVisible[index] || false)], _toConsumableArray__default["default"](dropdownsVisible.slice(index + 1))));
1286
-
1287
1215
  if (customOnClick !== null) {
1288
1216
  customOnClick(e);
1289
1217
  }
@@ -1331,7 +1259,6 @@ var Menu = function Menu(_ref) {
1331
1259
  }) : null);
1332
1260
  }));
1333
1261
  };
1334
-
1335
1262
  Menu.propTypes = propTypes$z;
1336
1263
  Menu.defaultProps = defaultProps$z;
1337
1264
 
@@ -1369,30 +1296,26 @@ var defaultProps$y = {
1369
1296
  breadCrumbsClassName: null,
1370
1297
  collapseClassName: null
1371
1298
  };
1372
-
1373
1299
  var Navbar = function Navbar(_ref) {
1374
1300
  var _ref2, _ref6;
1375
-
1376
1301
  var brand = _ref.brand,
1377
- brandLink = _ref.brandLink,
1378
- breadcrumbs = _ref.breadcrumbs,
1379
- theme = _ref.theme,
1380
- size = _ref.size,
1381
- compact = _ref.compact,
1382
- noWrap = _ref.noWrap,
1383
- withoutCollapse = _ref.withoutCollapse,
1384
- withoutCollapseToggle = _ref.withoutCollapseToggle,
1385
- children = _ref.children,
1386
- className = _ref.className,
1387
- brandClassName = _ref.brandClassName,
1388
- breadCrumbsClassName = _ref.breadCrumbsClassName,
1389
- collapseClassName = _ref.collapseClassName;
1390
-
1302
+ brandLink = _ref.brandLink,
1303
+ breadcrumbs = _ref.breadcrumbs,
1304
+ theme = _ref.theme,
1305
+ size = _ref.size,
1306
+ compact = _ref.compact,
1307
+ noWrap = _ref.noWrap,
1308
+ withoutCollapse = _ref.withoutCollapse,
1309
+ withoutCollapseToggle = _ref.withoutCollapseToggle,
1310
+ children = _ref.children,
1311
+ className = _ref.className,
1312
+ brandClassName = _ref.brandClassName,
1313
+ breadCrumbsClassName = _ref.breadCrumbsClassName,
1314
+ collapseClassName = _ref.collapseClassName;
1391
1315
  var _useState = React.useState(false),
1392
- _useState2 = _slicedToArray__default["default"](_useState, 2),
1393
- menuVisible = _useState2[0],
1394
- setMenuVisible = _useState2[1];
1395
-
1316
+ _useState2 = _slicedToArray__default["default"](_useState, 2),
1317
+ menuVisible = _useState2[0],
1318
+ setMenuVisible = _useState2[1];
1396
1319
  var onClickMenu = React.useCallback(function () {
1397
1320
  return setMenuVisible(!menuVisible);
1398
1321
  }, [setMenuVisible, menuVisible]);
@@ -1428,7 +1351,6 @@ var Navbar = function Navbar(_ref) {
1428
1351
  className: classNames__default["default"](['navbar-collapse', 'collapse', styles$q.collapse, (_ref6 = {}, _defineProperty__default["default"](_ref6, collapseClassName, collapseClassName !== null), _defineProperty__default["default"](_ref6, "show", menuVisible), _ref6)])
1429
1352
  }, children) : children));
1430
1353
  };
1431
-
1432
1354
  Navbar.propTypes = propTypes$y;
1433
1355
  Navbar.defaultProps = defaultProps$y;
1434
1356
 
@@ -1472,25 +1394,22 @@ var defaultProps$x = {
1472
1394
  linkClassName: null,
1473
1395
  onClickPage: null
1474
1396
  };
1475
-
1476
1397
  var PaginationMenu = function PaginationMenu(_ref) {
1477
1398
  var page = _ref.page,
1478
- total = _ref.total,
1479
- url = _ref.url,
1480
- withPreviousNext = _ref.withPreviousNext,
1481
- className = _ref.className,
1482
- paginationClassName = _ref.paginationClassName,
1483
- itemClassName = _ref.itemClassName,
1484
- linkClassName = _ref.linkClassName,
1485
- onClickPage = _ref.onClickPage;
1399
+ total = _ref.total,
1400
+ url = _ref.url,
1401
+ withPreviousNext = _ref.withPreviousNext,
1402
+ className = _ref.className,
1403
+ paginationClassName = _ref.paginationClassName,
1404
+ itemClassName = _ref.itemClassName,
1405
+ linkClassName = _ref.linkClassName,
1406
+ onClickPage = _ref.onClickPage;
1486
1407
  var getUrl = React.useCallback(function (currentPage) {
1487
1408
  return url !== null ? "".concat(url).concat(url.indexOf('?') !== -1 ? "&page=".concat(currentPage) : "?page=".concat(currentPage)) : null;
1488
1409
  }, [url]);
1489
-
1490
1410
  var pages = _toConsumableArray__default["default"](Array(total).keys()).map(function (it) {
1491
1411
  return it + 1;
1492
1412
  });
1493
-
1494
1413
  return /*#__PURE__*/React__default["default"].createElement("nav", {
1495
1414
  className: classNames__default["default"]([styles$p.container, _defineProperty__default["default"]({}, className, className !== null)])
1496
1415
  }, /*#__PURE__*/React__default["default"].createElement("ul", {
@@ -1534,7 +1453,6 @@ var PaginationMenu = function PaginationMenu(_ref) {
1534
1453
  className: classNames__default["default"](['page-link', _defineProperty__default["default"]({}, linkClassName, linkClassName !== null)])
1535
1454
  }, /*#__PURE__*/React__default["default"].createElement(Label, null, messages.next))) : null));
1536
1455
  };
1537
-
1538
1456
  PaginationMenu.propTypes = propTypes$x;
1539
1457
  PaginationMenu.defaultProps = defaultProps$x;
1540
1458
 
@@ -1558,15 +1476,14 @@ var defaultProps$w = {
1558
1476
  className: null,
1559
1477
  onClickItem: null
1560
1478
  };
1561
-
1562
1479
  var TabsMenu = function TabsMenu(_ref) {
1563
1480
  var items = _ref.items,
1564
- size = _ref.size,
1565
- theme = _ref.theme,
1566
- renderItemButton = _ref.renderItemButton,
1567
- buttonClassName = _ref.buttonClassName,
1568
- className = _ref.className,
1569
- onClickItem = _ref.onClickItem;
1481
+ size = _ref.size,
1482
+ theme = _ref.theme,
1483
+ renderItemButton = _ref.renderItemButton,
1484
+ buttonClassName = _ref.buttonClassName,
1485
+ className = _ref.className,
1486
+ onClickItem = _ref.onClickItem;
1570
1487
  return /*#__PURE__*/React__default["default"].createElement("div", {
1571
1488
  className: classNames__default["default"]([styles$o.container, _defineProperty__default["default"]({}, className, className)])
1572
1489
  }, /*#__PURE__*/React__default["default"].createElement(Buttons, {
@@ -1579,7 +1496,6 @@ var TabsMenu = function TabsMenu(_ref) {
1579
1496
  buttonClassName: classNames__default["default"]([styles$o.button, _defineProperty__default["default"]({}, buttonClassName, buttonClassName !== null)])
1580
1497
  }));
1581
1498
  };
1582
-
1583
1499
  TabsMenu.propTypes = propTypes$w;
1584
1500
  TabsMenu.defaultProps = defaultProps$w;
1585
1501
 
@@ -1593,11 +1509,10 @@ var propTypes$v = {
1593
1509
  var defaultProps$v = {
1594
1510
  className: null
1595
1511
  };
1596
-
1597
1512
  var ModalsContainer = function ModalsContainer(_ref) {
1598
1513
  var modals = _ref.modals,
1599
- setModalsContainer = _ref.setModalsContainer,
1600
- className = _ref.className;
1514
+ setModalsContainer = _ref.setModalsContainer,
1515
+ className = _ref.className;
1601
1516
  var containerRef = React.useRef(null);
1602
1517
  React.useEffect(function () {
1603
1518
  setModalsContainer(containerRef.current);
@@ -1609,7 +1524,6 @@ var ModalsContainer = function ModalsContainer(_ref) {
1609
1524
  ref: containerRef
1610
1525
  }));
1611
1526
  };
1612
-
1613
1527
  ModalsContainer.propTypes = propTypes$v;
1614
1528
  ModalsContainer.defaultProps = defaultProps$v;
1615
1529
  var Modals = contexts.withModals(ModalsContainer);
@@ -1635,14 +1549,13 @@ var defaultProps$u = {
1635
1549
  unregister: null,
1636
1550
  children: null
1637
1551
  };
1638
-
1639
1552
  var ElementPortal = function ElementPortal(_ref) {
1640
1553
  var id = _ref.id,
1641
- data = _ref.data,
1642
- children = _ref.children,
1643
- container = _ref.container,
1644
- register = _ref.register,
1645
- unregister = _ref.unregister;
1554
+ data = _ref.data,
1555
+ children = _ref.children,
1556
+ container = _ref.container,
1557
+ register = _ref.register,
1558
+ unregister = _ref.unregister;
1646
1559
  var finalId = React.useMemo(function () {
1647
1560
  return id || "element-".concat(new Date().getTime());
1648
1561
  }, [id]);
@@ -1650,7 +1563,6 @@ var ElementPortal = function ElementPortal(_ref) {
1650
1563
  if (register !== null) {
1651
1564
  register(finalId, data);
1652
1565
  }
1653
-
1654
1566
  return function () {
1655
1567
  if (unregister !== null) {
1656
1568
  unregister(finalId);
@@ -1659,7 +1571,6 @@ var ElementPortal = function ElementPortal(_ref) {
1659
1571
  }, [finalId, data]);
1660
1572
  return container !== null ? /*#__PURE__*/ReactDOM__default["default"].createPortal(children, container) : null;
1661
1573
  };
1662
-
1663
1574
  ElementPortal.propTypes = propTypes$u;
1664
1575
  ElementPortal.defaultProps = defaultProps$u;
1665
1576
 
@@ -1675,19 +1586,16 @@ var defaultProps$t = {
1675
1586
  data: null,
1676
1587
  children: null
1677
1588
  };
1678
-
1679
1589
  var ModalPortal = function ModalPortal(_ref) {
1680
1590
  var id = _ref.id,
1681
- data = _ref.data,
1682
- children = _ref.children;
1683
-
1591
+ data = _ref.data,
1592
+ children = _ref.children;
1684
1593
  var _useModals = contexts.useModals(),
1685
- container = _useModals.container,
1686
- _useModals$register = _useModals.register,
1687
- register = _useModals$register === void 0 ? null : _useModals$register,
1688
- _useModals$unregister = _useModals.unregister,
1689
- unregister = _useModals$unregister === void 0 ? null : _useModals$unregister;
1690
-
1594
+ container = _useModals.container,
1595
+ _useModals$register = _useModals.register,
1596
+ register = _useModals$register === void 0 ? null : _useModals$register,
1597
+ _useModals$unregister = _useModals.unregister,
1598
+ unregister = _useModals$unregister === void 0 ? null : _useModals$unregister;
1691
1599
  return /*#__PURE__*/React__default["default"].createElement(ElementPortal, {
1692
1600
  id: id,
1693
1601
  data: data,
@@ -1696,7 +1604,6 @@ var ModalPortal = function ModalPortal(_ref) {
1696
1604
  unregister: unregister
1697
1605
  }, children);
1698
1606
  };
1699
-
1700
1607
  ModalPortal.propTypes = propTypes$t;
1701
1608
  ModalPortal.defaultProps = defaultProps$t;
1702
1609
 
@@ -1712,12 +1619,11 @@ var defaultProps$s = {
1712
1619
  position: 'center',
1713
1620
  children: null
1714
1621
  };
1715
-
1716
1622
  var Modal = function Modal(_ref) {
1717
1623
  var id = _ref.id,
1718
- children = _ref.children,
1719
- position = _ref.position,
1720
- title = _ref.title;
1624
+ children = _ref.children,
1625
+ position = _ref.position,
1626
+ title = _ref.title;
1721
1627
  var finalId = React.useMemo(function () {
1722
1628
  return id || utils.getDisplayName(children.type);
1723
1629
  }, [id, children.type]);
@@ -1735,7 +1641,6 @@ var Modal = function Modal(_ref) {
1735
1641
  className: classNames__default["default"]([styles$m.inner, 'bg-dark'])
1736
1642
  }, children)));
1737
1643
  };
1738
-
1739
1644
  Modal.propTypes = propTypes$s;
1740
1645
  Modal.defaultProps = defaultProps$s;
1741
1646
 
@@ -1761,22 +1666,22 @@ var defaultProps$r = {
1761
1666
  onClickClose: null,
1762
1667
  className: null
1763
1668
  };
1764
-
1765
1669
  var ModalDialog = function ModalDialog(_ref) {
1766
1670
  var title = _ref.title,
1767
- header = _ref.header,
1768
- children = _ref.children,
1769
- buttons = _ref.buttons,
1770
- footer = _ref.footer,
1771
- onClickClose = _ref.onClickClose,
1772
- className = _ref.className;
1671
+ header = _ref.header,
1672
+ children = _ref.children,
1673
+ buttons = _ref.buttons,
1674
+ footer = _ref.footer,
1675
+ onClickClose = _ref.onClickClose,
1676
+ className = _ref.className;
1773
1677
  return /*#__PURE__*/React__default["default"].createElement("div", {
1774
1678
  className: classNames__default["default"](['modal-dialog', styles$l.container, _defineProperty__default["default"]({}, className, className)]),
1775
1679
  role: "dialog"
1776
1680
  }, /*#__PURE__*/React__default["default"].createElement("div", {
1777
1681
  className: "modal-content"
1778
1682
  }, header || /*#__PURE__*/React__default["default"].createElement("div", {
1779
- className: classNames__default["default"](['modal-header', 'p-2', styles$l.header, {// 'bg-dark': theme === 'dark',
1683
+ className: classNames__default["default"](['modal-header', 'p-2', styles$l.header, {
1684
+ // 'bg-dark': theme === 'dark',
1780
1685
  // 'border-dark': theme === 'dark',
1781
1686
  // 'text-light': theme === 'dark',
1782
1687
  }])
@@ -1788,7 +1693,8 @@ var ModalDialog = function ModalDialog(_ref) {
1788
1693
  "aria-label": "Close",
1789
1694
  onClick: onClickClose
1790
1695
  })), /*#__PURE__*/React__default["default"].createElement("div", {
1791
- className: classNames__default["default"](['modal-body', 'p-2', styles$l.body, {// [`bg-${theme}`]: theme !== null,
1696
+ className: classNames__default["default"](['modal-body', 'p-2', styles$l.body, {
1697
+ // [`bg-${theme}`]: theme !== null,
1792
1698
  // 'text-light': theme === 'dark',
1793
1699
  // 'bg-dark': theme === 'dark',
1794
1700
  }])
@@ -1799,7 +1705,6 @@ var ModalDialog = function ModalDialog(_ref) {
1799
1705
  className: styles$l.buttons
1800
1706
  }) : null) : null));
1801
1707
  };
1802
-
1803
1708
  ModalDialog.propTypes = propTypes$r;
1804
1709
  ModalDialog.defaultProps = defaultProps$r;
1805
1710
 
@@ -1826,13 +1731,12 @@ var defaultProps$q = {
1826
1731
  onUploaded: null,
1827
1732
  onRequestClose: null
1828
1733
  };
1829
-
1830
1734
  var UploadModal = function UploadModal(_ref2) {
1831
1735
  var type = _ref2.type,
1832
- opened = _ref2.opened,
1833
- sources = _ref2.sources,
1834
- onUploaded = _ref2.onUploaded,
1835
- onRequestClose = _ref2.onRequestClose;
1736
+ opened = _ref2.opened,
1737
+ sources = _ref2.sources,
1738
+ onUploaded = _ref2.onUploaded,
1739
+ onRequestClose = _ref2.onRequestClose;
1836
1740
  var onUppyComplete = React.useCallback(function (response) {
1837
1741
  if (onUploaded !== null) {
1838
1742
  onUploaded(response);
@@ -1846,7 +1750,6 @@ var UploadModal = function UploadModal(_ref2) {
1846
1750
  return t !== null;
1847
1751
  });
1848
1752
  }
1849
-
1850
1753
  return ['image', 'video', 'audio'].indexOf(type) !== -1 ? ["".concat(type, "/*")] : null;
1851
1754
  }, [type]);
1852
1755
  var uppy = contexts.useUppy({
@@ -1869,7 +1772,6 @@ var UploadModal = function UploadModal(_ref2) {
1869
1772
  plugins: sources
1870
1773
  })) : null;
1871
1774
  };
1872
-
1873
1775
  UploadModal.propTypes = propTypes$q;
1874
1776
  UploadModal.defaultProps = defaultProps$q;
1875
1777
 
@@ -1885,11 +1787,10 @@ var defaultProps$p = {
1885
1787
  setPanelsContainer: null,
1886
1788
  className: null
1887
1789
  };
1888
-
1889
1790
  var PanelsContainer = function PanelsContainer(_ref) {
1890
1791
  var panels = _ref.panels,
1891
- setPanelsContainer = _ref.setPanelsContainer,
1892
- className = _ref.className;
1792
+ setPanelsContainer = _ref.setPanelsContainer,
1793
+ className = _ref.className;
1893
1794
  var containerRef = React.useRef(null);
1894
1795
  React.useEffect(function () {
1895
1796
  setPanelsContainer(containerRef.current);
@@ -1901,7 +1802,6 @@ var PanelsContainer = function PanelsContainer(_ref) {
1901
1802
  ref: containerRef
1902
1803
  }));
1903
1804
  };
1904
-
1905
1805
  PanelsContainer.propTypes = propTypes$p;
1906
1806
  PanelsContainer.defaultProps = defaultProps$p;
1907
1807
  var Panels = contexts.withPanels(PanelsContainer);
@@ -1918,25 +1818,21 @@ var defaultProps$o = {
1918
1818
  data: null,
1919
1819
  children: null
1920
1820
  };
1921
-
1922
1821
  var PanelPortal = function PanelPortal(_ref) {
1923
1822
  var id = _ref.id,
1924
- data = _ref.data,
1925
- children = _ref.children;
1926
-
1823
+ data = _ref.data,
1824
+ children = _ref.children;
1927
1825
  var _usePanels = contexts.usePanels(),
1928
- _usePanels$panels = _usePanels.panels,
1929
- panels = _usePanels$panels === void 0 ? null : _usePanels$panels,
1930
- container = _usePanels.container,
1931
- _usePanels$register = _usePanels.register,
1932
- register = _usePanels$register === void 0 ? null : _usePanels$register,
1933
- _usePanels$unregister = _usePanels.unregister,
1934
- unregister = _usePanels$unregister === void 0 ? null : _usePanels$unregister;
1935
-
1826
+ _usePanels$panels = _usePanels.panels,
1827
+ panels = _usePanels$panels === void 0 ? null : _usePanels$panels,
1828
+ container = _usePanels.container,
1829
+ _usePanels$register = _usePanels.register,
1830
+ register = _usePanels$register === void 0 ? null : _usePanels$register,
1831
+ _usePanels$unregister = _usePanels.unregister,
1832
+ unregister = _usePanels$unregister === void 0 ? null : _usePanels$unregister;
1936
1833
  if (panels === null) {
1937
1834
  return children;
1938
1835
  }
1939
-
1940
1836
  return /*#__PURE__*/React__default["default"].createElement(ElementPortal, {
1941
1837
  id: id,
1942
1838
  data: data,
@@ -1945,7 +1841,6 @@ var PanelPortal = function PanelPortal(_ref) {
1945
1841
  unregister: unregister
1946
1842
  }, children);
1947
1843
  };
1948
-
1949
1844
  PanelPortal.propTypes = propTypes$o;
1950
1845
  PanelPortal.defaultProps = defaultProps$o;
1951
1846
 
@@ -1962,11 +1857,10 @@ var defaultProps$n = {
1962
1857
  title: null,
1963
1858
  children: null
1964
1859
  };
1965
-
1966
1860
  var Panel = function Panel(_ref) {
1967
1861
  var id = _ref.id,
1968
- children = _ref.children,
1969
- title = _ref.title;
1862
+ children = _ref.children,
1863
+ title = _ref.title;
1970
1864
  var finalId = React.useMemo(function () {
1971
1865
  return id || utils.getDisplayName(children.type);
1972
1866
  }, [id, children.type]);
@@ -1982,7 +1876,6 @@ var Panel = function Panel(_ref) {
1982
1876
  className: styles$j.container
1983
1877
  }, children));
1984
1878
  };
1985
-
1986
1879
  Panel.propTypes = propTypes$n;
1987
1880
  Panel.defaultProps = defaultProps$n;
1988
1881
 
@@ -2006,23 +1899,19 @@ var defaultProps$m = {
2006
1899
  openedClassName: null,
2007
1900
  buttonClassName: null
2008
1901
  };
2009
-
2010
1902
  var CollapsablePanel = function CollapsablePanel(_ref) {
2011
1903
  var _ref2;
2012
-
2013
1904
  var title = _ref.title,
2014
- children = _ref.children,
2015
- className = _ref.className,
2016
- topClassName = _ref.topClassName,
2017
- contentClassName = _ref.contentClassName,
2018
- openedClassName = _ref.openedClassName,
2019
- buttonClassName = _ref.buttonClassName;
2020
-
1905
+ children = _ref.children,
1906
+ className = _ref.className,
1907
+ topClassName = _ref.topClassName,
1908
+ contentClassName = _ref.contentClassName,
1909
+ openedClassName = _ref.openedClassName,
1910
+ buttonClassName = _ref.buttonClassName;
2021
1911
  var _useState = React.useState(false),
2022
- _useState2 = _slicedToArray__default["default"](_useState, 2),
2023
- opened = _useState2[0],
2024
- setOpened = _useState2[1];
2025
-
1912
+ _useState2 = _slicedToArray__default["default"](_useState, 2),
1913
+ opened = _useState2[0],
1914
+ setOpened = _useState2[1];
2026
1915
  var onClick = React.useCallback(function () {
2027
1916
  return setOpened(!opened);
2028
1917
  }, [opened, setOpened]);
@@ -2044,7 +1933,6 @@ var CollapsablePanel = function CollapsablePanel(_ref) {
2044
1933
  className: classNames__default["default"]([styles$i.content, _defineProperty__default["default"]({}, contentClassName, contentClassName !== null)])
2045
1934
  }, children));
2046
1935
  };
2047
-
2048
1936
  CollapsablePanel.propTypes = propTypes$m;
2049
1937
  CollapsablePanel.defaultProps = defaultProps$m;
2050
1938
 
@@ -2060,12 +1948,11 @@ var defaultProps$l = {
2060
1948
  fill: '#fff',
2061
1949
  className: null
2062
1950
  };
2063
-
2064
1951
  var Close = function Close(_ref) {
2065
1952
  var stroke = _ref.stroke,
2066
- border = _ref.border,
2067
- fill = _ref.fill,
2068
- className = _ref.className;
1953
+ border = _ref.border,
1954
+ fill = _ref.fill,
1955
+ className = _ref.className;
2069
1956
  return /*#__PURE__*/React__default["default"].createElement("svg", {
2070
1957
  xmlns: "http://www.w3.org/2000/svg",
2071
1958
  width: "42.9",
@@ -2098,7 +1985,6 @@ var Close = function Close(_ref) {
2098
1985
  d: "M0.3,0l13.7,14.2"
2099
1986
  })))));
2100
1987
  };
2101
-
2102
1988
  Close.propTypes = propTypes$l;
2103
1989
  Close.defaultProps = defaultProps$l;
2104
1990
 
@@ -2113,11 +1999,10 @@ var defaultProps$k = {
2113
1999
  withTime: false,
2114
2000
  timeSeparator: ', '
2115
2001
  };
2116
-
2117
2002
  var Date$1 = function Date(_ref) {
2118
2003
  var date = _ref.date,
2119
- withTime = _ref.withTime,
2120
- timeSeparator = _ref.timeSeparator;
2004
+ withTime = _ref.withTime,
2005
+ timeSeparator = _ref.timeSeparator;
2121
2006
  var dateObject = React.useMemo(function () {
2122
2007
  return dayjs__default["default"](date).toDate();
2123
2008
  }, [date]);
@@ -2130,7 +2015,6 @@ var Date$1 = function Date(_ref) {
2130
2015
  value: dateObject
2131
2016
  }) : null);
2132
2017
  };
2133
-
2134
2018
  Date$1.propTypes = propTypes$k;
2135
2019
  Date$1.defaultProps = defaultProps$k;
2136
2020
 
@@ -2155,47 +2039,39 @@ var defaultProps$j = {
2155
2039
  children: null,
2156
2040
  className: null
2157
2041
  };
2158
-
2159
2042
  var Detector = function Detector(_ref) {
2160
2043
  var throttleDelay = _ref.throttleDelay,
2161
- threshold = _ref.threshold,
2162
- onEnter = _ref.onEnter,
2163
- onLeave = _ref.onLeave,
2164
- onChange = _ref.onChange,
2165
- disabled = _ref.disabled,
2166
- children = _ref.children,
2167
- className = _ref.className;
2168
-
2044
+ threshold = _ref.threshold,
2045
+ onEnter = _ref.onEnter,
2046
+ onLeave = _ref.onLeave,
2047
+ onChange = _ref.onChange,
2048
+ disabled = _ref.disabled,
2049
+ children = _ref.children,
2050
+ className = _ref.className;
2169
2051
  var _useIntersectionObser = hooks.useIntersectionObserver({
2170
- threshold: threshold
2171
- }),
2172
- ref = _useIntersectionObser.ref,
2173
- isIntersecting = _useIntersectionObser.entry.isIntersecting;
2174
-
2052
+ threshold: threshold
2053
+ }),
2054
+ ref = _useIntersectionObser.ref,
2055
+ isIntersecting = _useIntersectionObser.entry.isIntersecting;
2175
2056
  var enteredRef = React.useRef(false);
2176
2057
  var triggerChange = React.useMemo(function () {
2177
2058
  var callback = function callback(intersecting) {
2178
2059
  var entered = enteredRef.current;
2179
-
2180
2060
  if (onEnter !== null && intersecting && !entered) {
2181
2061
  onEnter();
2182
2062
  }
2183
-
2184
2063
  if (onLeave !== null && !intersecting && entered) {
2185
2064
  onLeave();
2186
2065
  }
2187
-
2188
2066
  if (onChange !== null) {
2189
2067
  onChange(intersecting);
2190
2068
  }
2191
-
2192
2069
  if (intersecting && !entered) {
2193
2070
  enteredRef.current = true;
2194
2071
  } else if (!intersecting && entered) {
2195
2072
  enteredRef.current = false;
2196
2073
  }
2197
2074
  };
2198
-
2199
2075
  return throttleDelay !== null ? throttle__default["default"](callback, throttleDelay, {
2200
2076
  trailing: true,
2201
2077
  leading: true
@@ -2205,7 +2081,6 @@ var Detector = function Detector(_ref) {
2205
2081
  if (disabled) {
2206
2082
  return function () {};
2207
2083
  }
2208
-
2209
2084
  triggerChange(isIntersecting);
2210
2085
  return function () {
2211
2086
  if (throttleDelay !== null) {
@@ -2218,7 +2093,6 @@ var Detector = function Detector(_ref) {
2218
2093
  ref: ref
2219
2094
  }, children);
2220
2095
  };
2221
-
2222
2096
  Detector.propTypes = propTypes$j;
2223
2097
  Detector.defaultProps = defaultProps$j;
2224
2098
 
@@ -2242,17 +2116,15 @@ var defaultProps$i = {
2242
2116
  children: null,
2243
2117
  withInvertedColors: true
2244
2118
  };
2245
-
2246
2119
  var PlaceholderBlock = function PlaceholderBlock(_ref) {
2247
2120
  var _ref2;
2248
-
2249
2121
  var width = _ref.width,
2250
- height = _ref.height,
2251
- outline = _ref.outline,
2252
- className = _ref.className,
2253
- boxClassName = _ref.boxClassName,
2254
- withInvertedColors = _ref.withInvertedColors,
2255
- children = _ref.children;
2122
+ height = _ref.height,
2123
+ outline = _ref.outline,
2124
+ className = _ref.className,
2125
+ boxClassName = _ref.boxClassName,
2126
+ withInvertedColors = _ref.withInvertedColors,
2127
+ children = _ref.children;
2256
2128
  return /*#__PURE__*/React__default["default"].createElement("div", {
2257
2129
  className: classNames__default["default"]([styles$h.container, (_ref2 = {}, _defineProperty__default["default"](_ref2, className, className !== null), _defineProperty__default["default"](_ref2, styles$h.outline, outline), _defineProperty__default["default"](_ref2, styles$h.withInvertedColors, withInvertedColors), _ref2)])
2258
2130
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -2263,12 +2135,13 @@ var PlaceholderBlock = function PlaceholderBlock(_ref) {
2263
2135
  }
2264
2136
  }, children));
2265
2137
  };
2266
-
2267
2138
  PlaceholderBlock.propTypes = propTypes$i;
2268
2139
  PlaceholderBlock.defaultProps = defaultProps$i;
2269
2140
 
2270
2141
  /* eslint-disable react/jsx-props-no-spreading */
2271
2142
 
2143
+ // import { PropTypes as MicromagPropTypes } from '@micromag/core';
2144
+
2272
2145
  var propTypes$h = {
2273
2146
  name: PropTypes__default["default"].string.isRequired,
2274
2147
  components: PropTypes__default["default"].object.isRequired,
@@ -2278,44 +2151,37 @@ var propTypes$h = {
2278
2151
  isPlaceholder: PropTypes__default["default"].bool,
2279
2152
  className: PropTypes__default["default"].string,
2280
2153
  placeholderProps: PropTypes__default["default"].object // eslint-disable-line
2281
-
2282
2154
  };
2155
+
2283
2156
  var defaultProps$h = {
2284
2157
  props: {},
2285
2158
  isPlaceholder: false,
2286
2159
  className: null,
2287
2160
  placeholderProps: null
2288
2161
  };
2289
-
2290
2162
  var ElementComponent = function ElementComponent(_ref) {
2291
2163
  var name = _ref.name,
2292
- components = _ref.components,
2293
- props = _ref.props,
2294
- isPlaceholder = _ref.isPlaceholder,
2295
- className = _ref.className,
2296
- placeholderProps = _ref.placeholderProps;
2297
-
2164
+ components = _ref.components,
2165
+ props = _ref.props,
2166
+ isPlaceholder = _ref.isPlaceholder,
2167
+ className = _ref.className,
2168
+ placeholderProps = _ref.placeholderProps;
2298
2169
  if (!name) {
2299
2170
  return 'Bad component name';
2300
2171
  }
2301
-
2302
2172
  if (isPlaceholder) {
2303
2173
  // TODO: figure out what this did
2304
2174
  // const PlaceholderComponent = Placeholders[pascalCase(name)];
2305
2175
  return /*#__PURE__*/React__default["default"].createElement(PlaceholderBlock, placeholderProps);
2306
2176
  }
2307
-
2308
2177
  var RealComponent = components[utils.pascalCase(name)];
2309
-
2310
2178
  if (!RealComponent) {
2311
2179
  return 'Bad component';
2312
2180
  }
2313
-
2314
2181
  return /*#__PURE__*/React__default["default"].createElement(RealComponent, Object.assign({}, props, {
2315
2182
  className: className
2316
2183
  }));
2317
2184
  };
2318
-
2319
2185
  ElementComponent.propTypes = propTypes$h;
2320
2186
  ElementComponent.defaultProps = defaultProps$h;
2321
2187
 
@@ -2333,60 +2199,49 @@ var defaultProps$g = {
2333
2199
  light: false,
2334
2200
  className: null
2335
2201
  };
2336
-
2337
2202
  var Empty = function Empty(_ref) {
2338
2203
  var _ref2;
2339
-
2340
2204
  var children = _ref.children,
2341
- withoutBorder = _ref.withoutBorder,
2342
- light = _ref.light,
2343
- className = _ref.className;
2205
+ withoutBorder = _ref.withoutBorder,
2206
+ light = _ref.light,
2207
+ className = _ref.className;
2344
2208
  return /*#__PURE__*/React__default["default"].createElement("div", {
2345
2209
  className: classNames__default["default"]([styles$g.container, (_ref2 = {}, _defineProperty__default["default"](_ref2, styles$g.withoutBorder, withoutBorder), _defineProperty__default["default"](_ref2, styles$g.light, light), _defineProperty__default["default"](_ref2, className, className), _ref2)])
2346
2210
  }, /*#__PURE__*/React__default["default"].createElement("div", {
2347
2211
  className: styles$g.middle
2348
2212
  }, /*#__PURE__*/React__default["default"].createElement(Label, null, children)));
2349
2213
  };
2350
-
2351
2214
  Empty.propTypes = propTypes$g;
2352
2215
  Empty.defaultProps = defaultProps$g;
2353
2216
 
2354
2217
  var getUrlsFromMedia = function getUrlsFromMedia(media, formats) {
2355
2218
  var _ref = media || {},
2356
- _ref$files = _ref.files,
2357
- files = _ref$files === void 0 ? {} : _ref$files;
2358
-
2219
+ _ref$files = _ref.files,
2220
+ files = _ref$files === void 0 ? {} : _ref$files;
2359
2221
  var _ref2 = files || {},
2360
- _ref2$original = _ref2.original,
2361
- originalFile = _ref2$original === void 0 ? null : _ref2$original;
2362
-
2222
+ _ref2$original = _ref2.original,
2223
+ originalFile = _ref2$original === void 0 ? null : _ref2$original;
2363
2224
  var _ref3 = originalFile || {},
2364
- _ref3$name = _ref3.name,
2365
- originalName = _ref3$name === void 0 ? null : _ref3$name,
2366
- _ref3$mime = _ref3.mime,
2367
- originalMime = _ref3$mime === void 0 ? null : _ref3$mime;
2368
-
2225
+ _ref3$name = _ref3.name,
2226
+ originalName = _ref3$name === void 0 ? null : _ref3$name,
2227
+ _ref3$mime = _ref3.mime,
2228
+ originalMime = _ref3$mime === void 0 ? null : _ref3$mime;
2369
2229
  var urls = formats.reduce(function (currentUrls, format) {
2370
2230
  var finalFormat = isObject__default["default"](format) ? format.format : format;
2371
2231
  var formatExtension = isObject__default["default"](format) ? format.name : format;
2372
2232
  var file = files["webfonts.".concat(formatExtension)] || files[formatExtension] || null;
2373
-
2374
2233
  if (file !== null) {
2375
2234
  return [].concat(_toConsumableArray__default["default"](currentUrls), ["url(\"".concat(file.url, "?\") format(\"").concat(finalFormat, "\")")]);
2376
2235
  }
2377
-
2378
2236
  var extensionRegExp = new RegExp(".".concat(formatExtension, "$"), 'i');
2379
2237
  var mimeRegExp = new RegExp("".concat(finalFormat), 'i');
2380
-
2381
2238
  if (originalName !== null && originalName.match(extensionRegExp) !== null || originalMime !== null && originalMime.match(mimeRegExp) !== null) {
2382
2239
  return [].concat(_toConsumableArray__default["default"](currentUrls), ["url(\"".concat(originalFile.url, "?\") format(\"").concat(finalFormat, "\")")]);
2383
2240
  }
2384
-
2385
2241
  return currentUrls;
2386
2242
  }, []);
2387
2243
  return urls;
2388
2244
  };
2389
-
2390
2245
  var propTypes$f = {
2391
2246
  fonts: core.PropTypes.fonts,
2392
2247
  formats: PropTypes__default["default"].arrayOf(PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].shape({
@@ -2404,35 +2259,30 @@ var defaultProps$f = {
2404
2259
  format: 'truetype'
2405
2260
  }, 'svg']
2406
2261
  };
2407
-
2408
2262
  var FontFaces = function FontFaces(_ref4) {
2409
2263
  var fonts = _ref4.fonts,
2410
- formats = _ref4.formats;
2264
+ formats = _ref4.formats;
2411
2265
  var fontFaces = (fonts || []).filter(function (it) {
2412
2266
  return isObject__default["default"](it) && it.type === 'custom' && (it.media || null) !== null;
2413
2267
  }).reduce(function (fontFontFaces, _ref5) {
2414
2268
  var _ref5$name = _ref5.name,
2415
- name = _ref5$name === void 0 ? null : _ref5$name,
2416
- _ref5$media = _ref5.media,
2417
- media = _ref5$media === void 0 ? null : _ref5$media,
2418
- _ref5$variants = _ref5.variants,
2419
- variants = _ref5$variants === void 0 ? [] : _ref5$variants;
2420
-
2269
+ name = _ref5$name === void 0 ? null : _ref5$name,
2270
+ _ref5$media = _ref5.media,
2271
+ media = _ref5$media === void 0 ? null : _ref5$media,
2272
+ _ref5$variants = _ref5.variants,
2273
+ variants = _ref5$variants === void 0 ? [] : _ref5$variants;
2421
2274
  if (name === null) {
2422
2275
  return fontFontFaces;
2423
2276
  }
2424
-
2425
2277
  var urls = media !== null ? getUrlsFromMedia(media, formats) : null;
2426
2278
  return [].concat(_toConsumableArray__default["default"](fontFontFaces), [urls !== null && urls.length > 0 ? "\n @font-face {\n font-family: \"".concat(name, "\";\n src: ").concat(urls.join(','), ";\n }\n ") : null], _toConsumableArray__default["default"]((variants || []).map(function (_ref6) {
2427
2279
  var weight = _ref6.weight,
2428
- style = _ref6.style,
2429
- _ref6$media = _ref6.media,
2430
- variantMedia = _ref6$media === void 0 ? null : _ref6$media;
2431
-
2280
+ style = _ref6.style,
2281
+ _ref6$media = _ref6.media,
2282
+ variantMedia = _ref6$media === void 0 ? null : _ref6$media;
2432
2283
  if (variantMedia == null) {
2433
2284
  return null;
2434
2285
  }
2435
-
2436
2286
  var variantUrls = getUrlsFromMedia(variantMedia, formats);
2437
2287
  return variantUrls !== null && variantUrls.length > 0 ? "\n @font-face {\n font-family: \"".concat(name, "\";\n ").concat(weight !== null ? "font-weight: ".concat(weight, ";") : '', "\n ").concat(style !== null ? "font-style: ".concat(style, ";") : '', "\n src: ").concat(variantUrls.join(','), ";\n }\n ") : null;
2438
2288
  })));
@@ -2443,7 +2293,6 @@ var FontFaces = function FontFaces(_ref4) {
2443
2293
  type: "text/css"
2444
2294
  }, fontFaces.join('\n')) : null;
2445
2295
  };
2446
-
2447
2296
  FontFaces.propTypes = propTypes$f;
2448
2297
  FontFaces.defaultProps = defaultProps$f;
2449
2298
 
@@ -2469,16 +2318,15 @@ var defaultProps$e = {
2469
2318
  bodyClassName: null,
2470
2319
  titleClassName: null
2471
2320
  };
2472
-
2473
2321
  var Media = function Media(_ref) {
2474
2322
  var thumbnail = _ref.thumbnail,
2475
- thumbnailAlign = _ref.thumbnailAlign,
2476
- children = _ref.children,
2477
- title = _ref.title,
2478
- className = _ref.className,
2479
- thumbnailClassName = _ref.thumbnailClassName,
2480
- bodyClassName = _ref.bodyClassName,
2481
- titleClassName = _ref.titleClassName;
2323
+ thumbnailAlign = _ref.thumbnailAlign,
2324
+ children = _ref.children,
2325
+ title = _ref.title,
2326
+ className = _ref.className,
2327
+ thumbnailClassName = _ref.thumbnailClassName,
2328
+ bodyClassName = _ref.bodyClassName,
2329
+ titleClassName = _ref.titleClassName;
2482
2330
  return /*#__PURE__*/React__default["default"].createElement("div", {
2483
2331
  className: classNames__default["default"](['card', styles$f.container, _defineProperty__default["default"]({}, className, className !== null)])
2484
2332
  }, typeof thumbnail === 'string' ? /*#__PURE__*/React__default["default"].createElement("img", {
@@ -2495,14 +2343,12 @@ var Media = function Media(_ref) {
2495
2343
  className: classNames__default["default"](['mt-0', 'text-truncate', styles$f.title, _defineProperty__default["default"]({}, titleClassName, titleClassName !== null)])
2496
2344
  }, /*#__PURE__*/React__default["default"].createElement(Label, null, title)) : null, children) : null);
2497
2345
  };
2498
-
2499
2346
  Media.propTypes = propTypes$e;
2500
2347
  Media.defaultProps = defaultProps$e;
2501
2348
 
2502
2349
  /**
2503
2350
  * Core
2504
2351
  */
2505
-
2506
2352
  PropTypes__default["default"].shape({
2507
2353
  listen: PropTypes__default["default"].func.isRequired,
2508
2354
  push: PropTypes__default["default"].func.isRequired
@@ -2530,7 +2376,6 @@ var label = PropTypes__default["default"].oneOfType([message, PropTypes__default
2530
2376
  PropTypes__default["default"].oneOf([401, 403, 404, 500]);
2531
2377
  PropTypes__default["default"].oneOfType([PropTypes__default["default"].shape({
2532
2378
  current: PropTypes__default["default"].any // eslint-disable-line react/forbid-prop-types
2533
-
2534
2379
  }), PropTypes__default["default"].func]);
2535
2380
  var target = PropTypes__default["default"].oneOf(['_blank', '_self', '_parent']);
2536
2381
  var interaction = PropTypes__default["default"].oneOf(['tap', 'swipe']);
@@ -2540,10 +2385,10 @@ PropTypes__default["default"].shape({
2540
2385
  currentTime: PropTypes__default["default"].number,
2541
2386
  duration: PropTypes__default["default"].number
2542
2387
  });
2388
+
2543
2389
  /**
2544
2390
  * Site
2545
2391
  */
2546
-
2547
2392
  PropTypes__default["default"].shape({
2548
2393
  id: PropTypes__default["default"].number,
2549
2394
  firstname: PropTypes__default["default"].string,
@@ -2590,10 +2435,10 @@ PropTypes__default["default"].oneOf(['lg', 'sm', null]);
2590
2435
  PropTypes__default["default"].oneOf(['start', 'end']);
2591
2436
  var component = PropTypes__default["default"].oneOfType([PropTypes__default["default"].object, PropTypes__default["default"].func]);
2592
2437
  PropTypes__default["default"].objectOf(component);
2438
+
2593
2439
  /**
2594
2440
  * Forms
2595
2441
  */
2596
-
2597
2442
  var errors = PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].arrayOf(PropTypes__default["default"].string)]);
2598
2443
  PropTypes__default["default"].objectOf(errors);
2599
2444
  var selectOption = PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].shape({
@@ -2607,10 +2452,10 @@ var formField = PropTypes__default["default"].shape({
2607
2452
  component: component
2608
2453
  });
2609
2454
  PropTypes__default["default"].arrayOf(formField);
2455
+
2610
2456
  /**
2611
2457
  * Medias
2612
2458
  */
2613
-
2614
2459
  var mediaMetadataShape = {
2615
2460
  filename: PropTypes__default["default"].string,
2616
2461
  size: PropTypes__default["default"].number,
@@ -2668,15 +2513,17 @@ PropTypes__default["default"].arrayOf(audioMedia);
2668
2513
  var closedCaptionsMedia = PropTypes__default["default"].shape(_objectSpread__default["default"](_objectSpread__default["default"]({}, mediaShape), {}, {
2669
2514
  type: PropTypes__default["default"].oneOf(['closed-captions'])
2670
2515
  }));
2516
+
2671
2517
  /**
2672
2518
  * Style
2673
2519
  */
2674
2520
 
2675
- var font = PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].shape({
2521
+ PropTypes__default["default"].shape({
2676
2522
  type: PropTypes__default["default"].oneOf(['system', 'google', 'custom']),
2677
2523
  name: PropTypes__default["default"].string,
2678
2524
  media: fontMedia
2679
- })]);
2525
+ });
2526
+ var font = PropTypes__default["default"].oneOfType([PropTypes__default["default"].object, PropTypes__default["default"].string]);
2680
2527
  PropTypes__default["default"].arrayOf(font);
2681
2528
  var textAlign = PropTypes__default["default"].oneOf(['left', 'right', 'center']);
2682
2529
  var color = PropTypes__default["default"].shape({
@@ -2731,6 +2578,7 @@ PropTypes__default["default"].shape({
2731
2578
  horizontalPosition: PropTypes__default["default"].oneOf(['left', 'center', 'right']),
2732
2579
  verticalPosition: PropTypes__default["default"].oneOf(['top', 'center', 'bottom'])
2733
2580
  });
2581
+
2734
2582
  /**
2735
2583
  * Elements
2736
2584
  */
@@ -2854,6 +2702,7 @@ PropTypes__default["default"].shape({
2854
2702
  textStyle: textStyle,
2855
2703
  messages: conversationMessages
2856
2704
  });
2705
+
2857
2706
  /**
2858
2707
  * Definitions
2859
2708
  */
@@ -2883,10 +2732,10 @@ var fieldDefinition = PropTypes__default["default"].shape({
2883
2732
  fields: fields
2884
2733
  });
2885
2734
  PropTypes__default["default"].arrayOf(fieldDefinition);
2735
+
2886
2736
  /**
2887
2737
  * Components
2888
2738
  */
2889
-
2890
2739
  var storyComponentShape = {
2891
2740
  type: PropTypes__default["default"].string.isRequired
2892
2741
  };
@@ -2898,7 +2747,6 @@ var screenComponents = PropTypes__default["default"].arrayOf(screenComponent);
2898
2747
  /**
2899
2748
  * Theme
2900
2749
  */
2901
-
2902
2750
  var theme = PropTypes__default["default"].shape({
2903
2751
  id: PropTypes__default["default"].string,
2904
2752
  textStyles: PropTypes__default["default"].objectOf(textStyle),
@@ -2910,9 +2758,11 @@ var theme = PropTypes__default["default"].shape({
2910
2758
  PropTypes__default["default"].shape(_objectSpread__default["default"]({
2911
2759
  logo: imageMedia
2912
2760
  }, theme));
2761
+
2913
2762
  /**
2914
2763
  * Branding
2915
2764
  */
2765
+
2916
2766
  // export const branding = PropTypes.shape({
2917
2767
  // logo: imageMedia,
2918
2768
  // primaryColor: color,
@@ -2924,27 +2774,26 @@ PropTypes__default["default"].shape(_objectSpread__default["default"]({
2924
2774
  /**
2925
2775
  * Metadata
2926
2776
  */
2927
-
2928
2777
  var metadata = PropTypes__default["default"].shape({
2929
2778
  description: PropTypes__default["default"].string,
2930
2779
  shareUrl: PropTypes__default["default"].string,
2931
2780
  shareImage: imageMedia,
2932
2781
  favIcon: imageMedia
2933
2782
  });
2783
+
2934
2784
  /**
2935
2785
  * Story
2936
2786
  */
2937
-
2938
2787
  PropTypes__default["default"].shape({
2939
2788
  id: PropTypes__default["default"].string,
2940
2789
  theme: theme,
2941
2790
  components: screenComponents,
2942
2791
  metadata: metadata
2943
2792
  });
2793
+
2944
2794
  /**
2945
2795
  * Render
2946
2796
  */
2947
-
2948
2797
  var deviceScreen = PropTypes__default["default"].shape({
2949
2798
  name: PropTypes__default["default"].string.isRequired,
2950
2799
  mediaQuery: PropTypes__default["default"].string
@@ -2958,6 +2807,7 @@ PropTypes__default["default"].shape({
2958
2807
  landscape: PropTypes__default["default"].bool
2959
2808
  });
2960
2809
  PropTypes__default["default"].oneOf(['view', 'placeholder', 'edit', 'preview', 'static', 'capture']);
2810
+
2961
2811
  /**
2962
2812
  * Screens
2963
2813
  */
@@ -2984,12 +2834,15 @@ var slide = PropTypes__default["default"].shape({
2984
2834
  image: imageMedia,
2985
2835
  text: PropTypes__default["default"].string
2986
2836
  });
2987
- PropTypes__default["default"].arrayOf(slide); // export const imageStyle = PropTypes.shape({
2837
+ PropTypes__default["default"].arrayOf(slide);
2838
+
2839
+ // export const imageStyle = PropTypes.shape({
2988
2840
  // alt: PropTypes.string,
2989
2841
  // fit: PropTypes.object,
2990
2842
  // });
2991
2843
 
2992
2844
  PropTypes__default["default"].shape({});
2845
+
2993
2846
  /**
2994
2847
  * Transitions
2995
2848
  */
@@ -3006,6 +2859,7 @@ PropTypes__default["default"].shape({
3006
2859
  "in": transition,
3007
2860
  out: transition
3008
2861
  });
2862
+
3009
2863
  /**
3010
2864
  * Search
3011
2865
  */
@@ -3015,6 +2869,7 @@ var searchFilter = PropTypes__default["default"].shape({
3015
2869
  value: PropTypes__default["default"].oneOf([PropTypes__default["default"].string, PropTypes__default["default"].number])
3016
2870
  });
3017
2871
  PropTypes__default["default"].arrayOf(searchFilter);
2872
+
3018
2873
  /**
3019
2874
  * Payments
3020
2875
  */
@@ -3027,6 +2882,7 @@ var paymentItem = PropTypes__default["default"].shape({
3027
2882
  amount: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].number])
3028
2883
  });
3029
2884
  PropTypes__default["default"].arrayOf(paymentItem);
2885
+
3030
2886
  /**
3031
2887
  * Page Metadada
3032
2888
  */
@@ -3073,53 +2929,46 @@ var defaultProps$d = {
3073
2929
  suffix: 'Micromag',
3074
2930
  children: null
3075
2931
  };
3076
-
3077
2932
  var Meta = function Meta(_ref) {
3078
2933
  var title = _ref.title,
3079
- url = _ref.url,
3080
- metadata = _ref.metadata,
3081
- fullTitle = _ref.fullTitle,
3082
- suffix = _ref.suffix,
3083
- children = _ref.children;
3084
-
2934
+ url = _ref.url,
2935
+ metadata = _ref.metadata,
2936
+ fullTitle = _ref.fullTitle,
2937
+ suffix = _ref.suffix,
2938
+ children = _ref.children;
3085
2939
  var _ref2 = metadata || {},
3086
- _ref2$canonical = _ref2.canonical,
3087
- canonical = _ref2$canonical === void 0 ? null : _ref2$canonical,
3088
- _ref2$description = _ref2.description,
3089
- description = _ref2$description === void 0 ? null : _ref2$description,
3090
- _ref2$keywords = _ref2.keywords,
3091
- keywords = _ref2$keywords === void 0 ? null : _ref2$keywords,
3092
- _ref2$image = _ref2.image,
3093
- image = _ref2$image === void 0 ? null : _ref2$image,
3094
- _ref2$favicon = _ref2.favicon,
3095
- favicon = _ref2$favicon === void 0 ? null : _ref2$favicon,
3096
- _ref2$rssUrl = _ref2.rssUrl,
3097
- rssUrl = _ref2$rssUrl === void 0 ? null : _ref2$rssUrl,
3098
- _ref2$atomUrl = _ref2.atomUrl,
3099
- atomUrl = _ref2$atomUrl === void 0 ? null : _ref2$atomUrl,
3100
- _ref2$microformats = _ref2.microformats,
3101
- microformats = _ref2$microformats === void 0 ? [] : _ref2$microformats,
3102
- _ref2$language = _ref2.language,
3103
- language = _ref2$language === void 0 ? null : _ref2$language;
3104
-
2940
+ _ref2$canonical = _ref2.canonical,
2941
+ canonical = _ref2$canonical === void 0 ? null : _ref2$canonical,
2942
+ _ref2$description = _ref2.description,
2943
+ description = _ref2$description === void 0 ? null : _ref2$description,
2944
+ _ref2$keywords = _ref2.keywords,
2945
+ keywords = _ref2$keywords === void 0 ? null : _ref2$keywords,
2946
+ _ref2$image = _ref2.image,
2947
+ image = _ref2$image === void 0 ? null : _ref2$image,
2948
+ _ref2$favicon = _ref2.favicon,
2949
+ favicon = _ref2$favicon === void 0 ? null : _ref2$favicon,
2950
+ _ref2$rssUrl = _ref2.rssUrl,
2951
+ rssUrl = _ref2$rssUrl === void 0 ? null : _ref2$rssUrl,
2952
+ _ref2$atomUrl = _ref2.atomUrl,
2953
+ atomUrl = _ref2$atomUrl === void 0 ? null : _ref2$atomUrl,
2954
+ _ref2$microformats = _ref2.microformats,
2955
+ microformats = _ref2$microformats === void 0 ? [] : _ref2$microformats,
2956
+ _ref2$language = _ref2.language,
2957
+ language = _ref2$language === void 0 ? null : _ref2$language;
3105
2958
  var realTitle = title !== null ? "".concat(title, " | ").concat(suffix) : fullTitle;
3106
-
3107
2959
  var _ref3 = image || {},
3108
- _ref3$url = _ref3.url,
3109
- imageUrl = _ref3$url === void 0 ? null : _ref3$url,
3110
- _ref3$metadata = _ref3.metadata,
3111
- imageMetadata = _ref3$metadata === void 0 ? {} : _ref3$metadata;
3112
-
2960
+ _ref3$url = _ref3.url,
2961
+ imageUrl = _ref3$url === void 0 ? null : _ref3$url,
2962
+ _ref3$metadata = _ref3.metadata,
2963
+ imageMetadata = _ref3$metadata === void 0 ? {} : _ref3$metadata;
3113
2964
  var _ref4 = imageMetadata || {},
3114
- _ref4$width = _ref4.width,
3115
- imageWidth = _ref4$width === void 0 ? null : _ref4$width,
3116
- _ref4$height = _ref4.height,
3117
- imageHeight = _ref4$height === void 0 ? null : _ref4$height;
3118
-
2965
+ _ref4$width = _ref4.width,
2966
+ imageWidth = _ref4$width === void 0 ? null : _ref4$width,
2967
+ _ref4$height = _ref4.height,
2968
+ imageHeight = _ref4$height === void 0 ? null : _ref4$height;
3119
2969
  var _ref5 = favicon || {},
3120
- _ref5$url = _ref5.url,
3121
- faviconUrl = _ref5$url === void 0 ? null : _ref5$url;
3122
-
2970
+ _ref5$url = _ref5.url,
2971
+ faviconUrl = _ref5$url === void 0 ? null : _ref5$url;
3123
2972
  return /*#__PURE__*/React__default["default"].createElement(reactHelmet.Helmet, null, /*#__PURE__*/React__default["default"].createElement("title", null, realTitle !== null && realTitle.length > 0 ? realTitle : 'Micromag'), description !== null ? /*#__PURE__*/React__default["default"].createElement("meta", {
3124
2973
  name: "description",
3125
2974
  content: description
@@ -3188,11 +3037,10 @@ var Meta = function Meta(_ref) {
3188
3037
  }, JSON.stringify(it));
3189
3038
  }), children);
3190
3039
  };
3191
-
3192
3040
  Meta.propTypes = propTypes$d;
3193
3041
  Meta.defaultProps = defaultProps$d;
3194
3042
 
3195
- var styles$e = {"container":"micromag-core-partials-slideshow-container","item":"micromag-core-partials-slideshow-item","items":"micromag-core-partials-slideshow-items","prev":"micromag-core-partials-slideshow-prev","current":"micromag-core-partials-slideshow-current","next":"micromag-core-partials-slideshow-next"};
3043
+ 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"};
3196
3044
 
3197
3045
  var propTypes$c = {
3198
3046
  items: PropTypes__default["default"].arrayOf(PropTypes__default["default"].node),
@@ -3212,24 +3060,20 @@ var defaultProps$c = {
3212
3060
  className: null,
3213
3061
  children: null
3214
3062
  };
3215
-
3216
3063
  var Slideshow = function Slideshow(_ref) {
3217
3064
  var items = _ref.items,
3218
- auto = _ref.auto,
3219
- delay = _ref.delay,
3220
- width = _ref.width,
3221
- height = _ref.height,
3222
- className = _ref.className,
3223
- children = _ref.children;
3224
-
3065
+ auto = _ref.auto,
3066
+ delay = _ref.delay,
3067
+ width = _ref.width,
3068
+ height = _ref.height,
3069
+ className = _ref.className,
3070
+ children = _ref.children;
3225
3071
  var _useState = React.useState(0),
3226
- _useState2 = _slicedToArray__default["default"](_useState, 2),
3227
- index = _useState2[0],
3228
- setIndex = _useState2[1];
3229
-
3072
+ _useState2 = _slicedToArray__default["default"](_useState, 2),
3073
+ index = _useState2[0],
3074
+ setIndex = _useState2[1];
3230
3075
  React.useEffect(function () {
3231
3076
  var id = null;
3232
-
3233
3077
  if (auto) {
3234
3078
  id = setTimeout(function () {
3235
3079
  if (index < items.length - 1) {
@@ -3241,7 +3085,6 @@ var Slideshow = function Slideshow(_ref) {
3241
3085
  }
3242
3086
  }, delay);
3243
3087
  }
3244
-
3245
3088
  return function () {
3246
3089
  clearTimeout(id);
3247
3090
  };
@@ -3257,14 +3100,12 @@ var Slideshow = function Slideshow(_ref) {
3257
3100
  className: styles$e.items
3258
3101
  }, items.map(function (it, i) {
3259
3102
  var _ref3;
3260
-
3261
3103
  return /*#__PURE__*/React__default["default"].createElement("div", {
3262
3104
  key: "slide-".concat(i + 1),
3263
3105
  className: classNames__default["default"]([styles$e.item, (_ref3 = {}, _defineProperty__default["default"](_ref3, styles$e.prev, i < index), _defineProperty__default["default"](_ref3, styles$e.current, i === index), _defineProperty__default["default"](_ref3, styles$e.next, i > index), _ref3)])
3264
3106
  }, it);
3265
3107
  })), children);
3266
3108
  };
3267
-
3268
3109
  Slideshow.propTypes = propTypes$c;
3269
3110
  Slideshow.defaultProps = defaultProps$c;
3270
3111
 
@@ -3273,8 +3114,8 @@ var styles$d = {"icon":"micromag-core-placeholders-icon"};
3273
3114
  /* eslint-disable react/prop-types */
3274
3115
  var AdFrame = function AdFrame(_ref) {
3275
3116
  var width = _ref.width,
3276
- height = _ref.height,
3277
- className = _ref.className;
3117
+ height = _ref.height,
3118
+ className = _ref.className;
3278
3119
  return /*#__PURE__*/React__default["default"].createElement(PlaceholderBlock, {
3279
3120
  width: width,
3280
3121
  height: height,
@@ -3288,8 +3129,8 @@ var AdFrame = function AdFrame(_ref) {
3288
3129
  /* eslint-disable react/prop-types */
3289
3130
  var AdImage = function AdImage(_ref) {
3290
3131
  var width = _ref.width,
3291
- height = _ref.height,
3292
- className = _ref.className;
3132
+ height = _ref.height,
3133
+ className = _ref.className;
3293
3134
  return /*#__PURE__*/React__default["default"].createElement(PlaceholderBlock, {
3294
3135
  width: width,
3295
3136
  height: height,
@@ -3303,10 +3144,10 @@ var AdImage = function AdImage(_ref) {
3303
3144
  /* eslint-disable react/destructuring-assignment, react/prop-types */
3304
3145
  var Audio = function Audio(_ref) {
3305
3146
  var _ref$width = _ref.width,
3306
- width = _ref$width === void 0 ? '100%' : _ref$width,
3307
- _ref$height = _ref.height,
3308
- height = _ref$height === void 0 ? '2em' : _ref$height,
3309
- className = _ref.className;
3147
+ width = _ref$width === void 0 ? '100%' : _ref$width,
3148
+ _ref$height = _ref.height,
3149
+ height = _ref$height === void 0 ? '2em' : _ref$height,
3150
+ className = _ref.className;
3310
3151
  return /*#__PURE__*/React__default["default"].createElement(PlaceholderBlock, {
3311
3152
  width: width,
3312
3153
  height: height,
@@ -3337,17 +3178,15 @@ var defaultProps$b = {
3337
3178
  className: null,
3338
3179
  withInvertedColors: true
3339
3180
  };
3340
-
3341
3181
  var PlaceholderText = function PlaceholderText(_ref) {
3342
3182
  var _ref2;
3343
-
3344
3183
  var lines = _ref.lines,
3345
- lineMargin = _ref.lineMargin,
3346
- width = _ref.width,
3347
- height = _ref.height,
3348
- fontSize = _ref.fontSize,
3349
- className = _ref.className,
3350
- withInvertedColors = _ref.withInvertedColors;
3184
+ lineMargin = _ref.lineMargin,
3185
+ width = _ref.width,
3186
+ height = _ref.height,
3187
+ fontSize = _ref.fontSize,
3188
+ className = _ref.className,
3189
+ withInvertedColors = _ref.withInvertedColors;
3351
3190
  var lineHeight = height !== null && isNumber__default["default"](height) ? "".concat(Math.round(height * fontSize), "px") : height;
3352
3191
  var oddWidth = isNumber__default["default"](width) ? width * 0.9 : '80%';
3353
3192
  return /*#__PURE__*/React__default["default"].createElement("div", {
@@ -3365,17 +3204,16 @@ var PlaceholderText = function PlaceholderText(_ref) {
3365
3204
  });
3366
3205
  }));
3367
3206
  };
3368
-
3369
3207
  PlaceholderText.propTypes = propTypes$b;
3370
3208
  PlaceholderText.defaultProps = defaultProps$b;
3371
3209
 
3372
3210
  /* eslint-disable react/destructuring-assignment, react/prop-types */
3373
3211
  var Button = function Button(_ref) {
3374
3212
  var _ref$width = _ref.width,
3375
- width = _ref$width === void 0 ? '75%' : _ref$width,
3376
- _ref$height = _ref.height,
3377
- height = _ref$height === void 0 ? '0.4em' : _ref$height,
3378
- className = _ref.className;
3213
+ width = _ref$width === void 0 ? '75%' : _ref$width,
3214
+ _ref$height = _ref.height,
3215
+ height = _ref$height === void 0 ? '0.4em' : _ref$height,
3216
+ className = _ref.className;
3379
3217
  return /*#__PURE__*/React__default["default"].createElement(PlaceholderBlock, {
3380
3218
  outline: true,
3381
3219
  width: width,
@@ -3390,10 +3228,9 @@ var Button = function Button(_ref) {
3390
3228
  var _excluded$2 = ["width", "height", "className"];
3391
3229
  var Image = function Image(_ref) {
3392
3230
  var width = _ref.width,
3393
- height = _ref.height,
3394
- className = _ref.className,
3395
- props = _objectWithoutProperties__default["default"](_ref, _excluded$2);
3396
-
3231
+ height = _ref.height,
3232
+ className = _ref.className,
3233
+ props = _objectWithoutProperties__default["default"](_ref, _excluded$2);
3397
3234
  return /*#__PURE__*/React__default["default"].createElement(PlaceholderBlock, Object.assign({}, props, {
3398
3235
  width: width,
3399
3236
  height: height,
@@ -3476,16 +3313,15 @@ var Subtitle = function Subtitle(props) {
3476
3313
  };
3477
3314
 
3478
3315
  /* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
3479
-
3480
3316
  var TextPlaceholder = function TextPlaceholder(props) {
3481
3317
  var _props$className = props.className,
3482
- className = _props$className === void 0 ? null : _props$className,
3483
- _props$height = props.height,
3484
- height = _props$height === void 0 ? 0.2 : _props$height,
3485
- _props$lines = props.lines,
3486
- lines = _props$lines === void 0 ? 4 : _props$lines,
3487
- _props$lineMargin = props.lineMargin,
3488
- lineMargin = _props$lineMargin === void 0 ? 2 : _props$lineMargin;
3318
+ className = _props$className === void 0 ? null : _props$className,
3319
+ _props$height = props.height,
3320
+ height = _props$height === void 0 ? 0.2 : _props$height,
3321
+ _props$lines = props.lines,
3322
+ lines = _props$lines === void 0 ? 4 : _props$lines,
3323
+ _props$lineMargin = props.lineMargin,
3324
+ lineMargin = _props$lineMargin === void 0 ? 2 : _props$lineMargin;
3489
3325
  return /*#__PURE__*/React__default["default"].createElement(PlaceholderText, Object.assign({}, props, {
3490
3326
  height: height,
3491
3327
  lines: lines,
@@ -3504,11 +3340,11 @@ var Timeline = function Timeline(props) {
3504
3340
  /* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
3505
3341
  var Title$1 = function Title(props) {
3506
3342
  var _props$height = props.height,
3507
- height = _props$height === void 0 ? 0.5 : _props$height,
3508
- _props$lines = props.lines,
3509
- lines = _props$lines === void 0 ? 2 : _props$lines,
3510
- _props$lineMargin = props.lineMargin,
3511
- lineMargin = _props$lineMargin === void 0 ? 2 : _props$lineMargin;
3343
+ height = _props$height === void 0 ? 0.5 : _props$height,
3344
+ _props$lines = props.lines,
3345
+ lines = _props$lines === void 0 ? 2 : _props$lines,
3346
+ _props$lineMargin = props.lineMargin,
3347
+ lineMargin = _props$lineMargin === void 0 ? 2 : _props$lineMargin;
3512
3348
  return /*#__PURE__*/React__default["default"].createElement(PlaceholderText, Object.assign({}, props, {
3513
3349
  className: classNames__default["default"]([props.className, styles$d.title]),
3514
3350
  height: height,
@@ -3520,8 +3356,8 @@ var Title$1 = function Title(props) {
3520
3356
  /* eslint-disable react/prop-types */
3521
3357
  var Video = function Video(_ref) {
3522
3358
  var width = _ref.width,
3523
- height = _ref.height,
3524
- className = _ref.className;
3359
+ height = _ref.height,
3360
+ className = _ref.className;
3525
3361
  return /*#__PURE__*/React__default["default"].createElement(PlaceholderBlock, {
3526
3362
  width: width,
3527
3363
  height: height,
@@ -3536,8 +3372,8 @@ var styles$a = {"container":"micromag-core-placeholders-video-360-container","bo
3536
3372
 
3537
3373
  var Video360 = function Video360(_ref) {
3538
3374
  var width = _ref.width,
3539
- height = _ref.height,
3540
- className = _ref.className;
3375
+ height = _ref.height,
3376
+ className = _ref.className;
3541
3377
  return /*#__PURE__*/React__default["default"].createElement(PlaceholderBlock, {
3542
3378
  width: width,
3543
3379
  height: height,
@@ -3554,8 +3390,8 @@ var Video360 = function Video360(_ref) {
3554
3390
  /* eslint-disable react/prop-types */
3555
3391
  var VideoLoop = function VideoLoop(_ref) {
3556
3392
  var width = _ref.width,
3557
- height = _ref.height,
3558
- className = _ref.className;
3393
+ height = _ref.height,
3394
+ className = _ref.className;
3559
3395
  return /*#__PURE__*/React__default["default"].createElement(PlaceholderBlock, {
3560
3396
  width: width,
3561
3397
  height: height,
@@ -3589,72 +3425,62 @@ var defaultProps$a = {
3589
3425
  screenHeight: 480,
3590
3426
  className: null
3591
3427
  };
3592
-
3593
3428
  var ScreenSizer = function ScreenSizer(_ref) {
3594
3429
  var width = _ref.width,
3595
- height = _ref.height,
3596
- fit = _ref.fit,
3597
- screenWidth = _ref.screenWidth,
3598
- screenHeight = _ref.screenHeight,
3599
- className = _ref.className,
3600
- children = _ref.children;
3430
+ height = _ref.height,
3431
+ fit = _ref.fit,
3432
+ screenWidth = _ref.screenWidth,
3433
+ screenHeight = _ref.screenHeight,
3434
+ className = _ref.className,
3435
+ children = _ref.children;
3601
3436
  var hasSize = width !== null || height !== null;
3602
-
3603
3437
  var _useDimensionObserver = hooks.useDimensionObserver(),
3604
- refContainer = _useDimensionObserver.ref,
3605
- _useDimensionObserver2 = _useDimensionObserver.width,
3606
- calculatedWidth = _useDimensionObserver2 === void 0 ? 0 : _useDimensionObserver2,
3607
- _useDimensionObserver3 = _useDimensionObserver.height,
3608
- calculatedHeight = _useDimensionObserver3 === void 0 ? 0 : _useDimensionObserver3;
3609
-
3438
+ refContainer = _useDimensionObserver.ref,
3439
+ _useDimensionObserver2 = _useDimensionObserver.width,
3440
+ calculatedWidth = _useDimensionObserver2 === void 0 ? 0 : _useDimensionObserver2,
3441
+ _useDimensionObserver3 = _useDimensionObserver.height,
3442
+ calculatedHeight = _useDimensionObserver3 === void 0 ? 0 : _useDimensionObserver3;
3610
3443
  var _useMemo = React.useMemo(function () {
3611
- var containerWidth = width || calculatedWidth || null;
3612
- var containerHeight = height || calculatedHeight || null;
3613
-
3614
- if (containerWidth === null && containerHeight === null) {
3615
- return {};
3616
- }
3617
-
3618
- var screenRatio = screenWidth / screenHeight;
3619
- var finalContainerWidth = hasSize ? width || containerHeight * screenRatio : containerWidth;
3620
- var finalContainerHeight = hasSize ? height || containerWidth / screenRatio : containerWidth / screenRatio;
3621
-
3622
- if (fit === null) {
3623
- var _screenScale = finalContainerWidth / screenWidth;
3624
-
3444
+ var containerWidth = width || calculatedWidth || null;
3445
+ var containerHeight = height || calculatedHeight || null;
3446
+ if (containerWidth === null && containerHeight === null) {
3447
+ return {};
3448
+ }
3449
+ var screenRatio = screenWidth / screenHeight;
3450
+ var finalContainerWidth = hasSize ? width || containerHeight * screenRatio : containerWidth;
3451
+ var finalContainerHeight = hasSize ? height || containerWidth / screenRatio : containerWidth / screenRatio;
3452
+ if (fit === null) {
3453
+ var _screenScale = finalContainerWidth / screenWidth;
3454
+ return {
3455
+ width: finalContainerWidth,
3456
+ height: finalContainerHeight,
3457
+ scale: _screenScale,
3458
+ transform: "scale(".concat(_screenScale, ")")
3459
+ };
3460
+ }
3461
+ var _getSizeWithinBounds = size.getSizeWithinBounds(screenWidth, screenHeight, finalContainerWidth, finalContainerHeight, {
3462
+ cover: fit === 'cover'
3463
+ }),
3464
+ screenScaledWidth = _getSizeWithinBounds.width,
3465
+ screenScaledHeight = _getSizeWithinBounds.height,
3466
+ screenScale = _getSizeWithinBounds.scale;
3467
+ var x = (finalContainerWidth - screenScaledWidth) / 2;
3468
+ var y = (finalContainerHeight - screenScaledHeight) / 2;
3625
3469
  return {
3626
3470
  width: finalContainerWidth,
3627
3471
  height: finalContainerHeight,
3628
- scale: _screenScale,
3629
- transform: "scale(".concat(_screenScale, ")")
3472
+ scale: screenScale,
3473
+ transform: "scale(".concat(screenScale, ") translate(").concat(x, "px, ").concat(y, "px)")
3630
3474
  };
3631
- }
3632
-
3633
- var _getSizeWithinBounds = size.getSizeWithinBounds(screenWidth, screenHeight, finalContainerWidth, finalContainerHeight, {
3634
- cover: fit === 'cover'
3635
- }),
3636
- screenScaledWidth = _getSizeWithinBounds.width,
3637
- screenScaledHeight = _getSizeWithinBounds.height,
3638
- screenScale = _getSizeWithinBounds.scale;
3639
-
3640
- var x = (finalContainerWidth - screenScaledWidth) / 2;
3641
- var y = (finalContainerHeight - screenScaledHeight) / 2;
3642
- return {
3643
- width: finalContainerWidth,
3644
- height: finalContainerHeight,
3645
- scale: screenScale,
3646
- transform: "scale(".concat(screenScale, ") translate(").concat(x, "px, ").concat(y, "px)")
3647
- };
3648
- }, [screenWidth, screenHeight, width, height, fit, calculatedWidth, calculatedHeight, hasSize]),
3649
- _useMemo$width = _useMemo.width,
3650
- frameWidth = _useMemo$width === void 0 ? null : _useMemo$width,
3651
- _useMemo$height = _useMemo.height,
3652
- frameHeight = _useMemo$height === void 0 ? null : _useMemo$height,
3653
- _useMemo$scale = _useMemo.scale,
3654
- frameScale = _useMemo$scale === void 0 ? null : _useMemo$scale,
3655
- _useMemo$transform = _useMemo.transform,
3656
- screenTransform = _useMemo$transform === void 0 ? null : _useMemo$transform;
3657
-
3475
+ }, [screenWidth, screenHeight, width, height, fit, calculatedWidth, calculatedHeight, hasSize]),
3476
+ _useMemo$width = _useMemo.width,
3477
+ frameWidth = _useMemo$width === void 0 ? null : _useMemo$width,
3478
+ _useMemo$height = _useMemo.height,
3479
+ frameHeight = _useMemo$height === void 0 ? null : _useMemo$height,
3480
+ _useMemo$scale = _useMemo.scale,
3481
+ frameScale = _useMemo$scale === void 0 ? null : _useMemo$scale,
3482
+ _useMemo$transform = _useMemo.transform,
3483
+ screenTransform = _useMemo$transform === void 0 ? null : _useMemo$transform;
3658
3484
  var screenSize = React.useMemo(function () {
3659
3485
  return {
3660
3486
  screen: 'mobile',
@@ -3688,7 +3514,6 @@ var ScreenSizer = function ScreenSizer(_ref) {
3688
3514
  height: screenHeight
3689
3515
  })))) : null);
3690
3516
  };
3691
-
3692
3517
  ScreenSizer.propTypes = propTypes$a;
3693
3518
  ScreenSizer.defaultProps = defaultProps$a;
3694
3519
 
@@ -3717,26 +3542,25 @@ var defaultProps$9 = {
3717
3542
  className: null,
3718
3543
  mediaRef: null
3719
3544
  };
3720
-
3721
3545
  var Screen = function Screen(_ref) {
3722
3546
  var screen = _ref.screen,
3723
- renderContext = _ref.renderContext,
3724
- screenState = _ref.screenState,
3725
- index = _ref.index,
3726
- active = _ref.active,
3727
- current = _ref.current,
3728
- components = _ref.components,
3729
- component = _ref.component,
3730
- className = _ref.className,
3731
- mediaRef = _ref.mediaRef;
3732
-
3547
+ renderContext = _ref.renderContext,
3548
+ screenState = _ref.screenState,
3549
+ index = _ref.index,
3550
+ active = _ref.active,
3551
+ current = _ref.current,
3552
+ components = _ref.components,
3553
+ component = _ref.component,
3554
+ className = _ref.className,
3555
+ mediaRef = _ref.mediaRef;
3733
3556
  var _ref2 = screen || {},
3734
- _ref2$type = _ref2.type,
3735
- type = _ref2$type === void 0 ? null : _ref2$type;
3736
-
3557
+ _ref2$type = _ref2.type,
3558
+ type = _ref2$type === void 0 ? null : _ref2$type;
3737
3559
  var CustomScreenComponent = components !== null ? utils.getComponentFromName(type, components) || null : null;
3738
3560
  var ContextScreenComponent = contexts.useScreenComponent(type);
3739
- var ScreenComponent = CustomScreenComponent || ContextScreenComponent; // Comment
3561
+ var ScreenComponent = CustomScreenComponent || ContextScreenComponent;
3562
+
3563
+ // Comment
3740
3564
 
3741
3565
  return /*#__PURE__*/React__default["default"].createElement(contexts.ScreenProvider, {
3742
3566
  data: screen,
@@ -3753,7 +3577,6 @@ var Screen = function Screen(_ref) {
3753
3577
  className: className
3754
3578
  }, component));
3755
3579
  };
3756
-
3757
3580
  Screen.propTypes = propTypes$9;
3758
3581
  Screen.defaultProps = defaultProps$9;
3759
3582
  var Screen$1 = /*#__PURE__*/React__default["default"].memo(Screen);
@@ -3778,17 +3601,15 @@ var defaultProps$8 = {
3778
3601
  withSize: false,
3779
3602
  className: null
3780
3603
  };
3781
-
3782
3604
  var ScreenPlaceholder = function ScreenPlaceholder(_ref) {
3783
3605
  var screen = _ref.screen,
3784
- layout = _ref.layout,
3785
- screenWidth = _ref.screenWidth,
3786
- screenHeight = _ref.screenHeight,
3787
- screenState = _ref.screenState,
3788
- withSize = _ref.withSize,
3789
- className = _ref.className,
3790
- props = _objectWithoutProperties__default["default"](_ref, _excluded$1);
3791
-
3606
+ layout = _ref.layout,
3607
+ screenWidth = _ref.screenWidth,
3608
+ screenHeight = _ref.screenHeight,
3609
+ screenState = _ref.screenState,
3610
+ withSize = _ref.withSize,
3611
+ className = _ref.className,
3612
+ props = _objectWithoutProperties__default["default"](_ref, _excluded$1);
3792
3613
  var screenElement = /*#__PURE__*/React__default["default"].createElement(Screen$1, Object.assign({
3793
3614
  screen: screen,
3794
3615
  renderContext: "placeholder",
@@ -3802,7 +3623,6 @@ var ScreenPlaceholder = function ScreenPlaceholder(_ref) {
3802
3623
  screenHeight: screenHeight
3803
3624
  }, screenElement) : screenElement;
3804
3625
  };
3805
-
3806
3626
  ScreenPlaceholder.propTypes = propTypes$8;
3807
3627
  ScreenPlaceholder.defaultProps = defaultProps$8;
3808
3628
  var Placeholder = /*#__PURE__*/React__default["default"].memo(ScreenPlaceholder);
@@ -3829,18 +3649,16 @@ var defaultProps$7 = {
3829
3649
  className: null,
3830
3650
  withSize: false
3831
3651
  };
3832
-
3833
3652
  var ScreenPreview = function ScreenPreview(_ref) {
3834
3653
  var screen = _ref.screen,
3835
- screenState = _ref.screenState,
3836
- width = _ref.width,
3837
- height = _ref.height,
3838
- screenWidth = _ref.screenWidth,
3839
- screenHeight = _ref.screenHeight,
3840
- className = _ref.className,
3841
- withSize = _ref.withSize,
3842
- props = _objectWithoutProperties__default["default"](_ref, _excluded);
3843
-
3654
+ screenState = _ref.screenState,
3655
+ width = _ref.width,
3656
+ height = _ref.height,
3657
+ screenWidth = _ref.screenWidth,
3658
+ screenHeight = _ref.screenHeight,
3659
+ className = _ref.className,
3660
+ withSize = _ref.withSize,
3661
+ props = _objectWithoutProperties__default["default"](_ref, _excluded);
3844
3662
  var screenElement = /*#__PURE__*/React__default["default"].createElement(Screen$1, Object.assign({
3845
3663
  screen: screen,
3846
3664
  renderContext: "preview",
@@ -3858,7 +3676,6 @@ var ScreenPreview = function ScreenPreview(_ref) {
3858
3676
  }, screenElement) : screenElement;
3859
3677
  return screenWithSize;
3860
3678
  };
3861
-
3862
3679
  ScreenPreview.propTypes = propTypes$7;
3863
3680
  ScreenPreview.defaultProps = defaultProps$7;
3864
3681
  var Preview = /*#__PURE__*/React__default["default"].memo(ScreenPreview);
@@ -3882,10 +3699,10 @@ var Conversation = function Conversation() {
3882
3699
  /* eslint-disable react/prop-types */
3883
3700
  var InputText = function InputText(_ref) {
3884
3701
  var _ref$width = _ref.width,
3885
- width = _ref$width === void 0 ? '75%' : _ref$width,
3886
- _ref$height = _ref.height,
3887
- height = _ref$height === void 0 ? '0.5em' : _ref$height,
3888
- className = _ref.className;
3702
+ width = _ref$width === void 0 ? '75%' : _ref$width,
3703
+ _ref$height = _ref.height,
3704
+ height = _ref$height === void 0 ? '0.5em' : _ref$height,
3705
+ className = _ref.className;
3889
3706
  return /*#__PURE__*/React__default["default"].createElement(PlaceholderBlock, {
3890
3707
  outline: true,
3891
3708
  width: width,
@@ -3898,14 +3715,13 @@ var styles$4 = {"container":"micromag-core-placeholders-quiz-answer-container","
3898
3715
 
3899
3716
  var Answer$1 = function Answer(_ref) {
3900
3717
  var _ref2;
3901
-
3902
3718
  var _ref$width = _ref.width,
3903
- width = _ref$width === void 0 ? '75%' : _ref$width,
3904
- _ref$height = _ref.height,
3905
- height = _ref$height === void 0 ? '0.3em' : _ref$height,
3906
- className = _ref.className,
3907
- _ref$good = _ref.good,
3908
- good = _ref$good === void 0 ? true : _ref$good;
3719
+ width = _ref$width === void 0 ? '75%' : _ref$width,
3720
+ _ref$height = _ref.height,
3721
+ height = _ref$height === void 0 ? '0.3em' : _ref$height,
3722
+ className = _ref.className,
3723
+ _ref$good = _ref.good,
3724
+ good = _ref$good === void 0 ? true : _ref$good;
3909
3725
  return /*#__PURE__*/React__default["default"].createElement("div", {
3910
3726
  className: classNames__default["default"]([styles$4.container, (_ref2 = {}, _defineProperty__default["default"](_ref2, className, className !== null), _defineProperty__default["default"](_ref2, styles$4.good, good), _ref2)])
3911
3727
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -3954,10 +3770,10 @@ var styles$2 = {"container":"micromag-core-placeholders-survey-answer-container"
3954
3770
 
3955
3771
  var Answer = function Answer(_ref) {
3956
3772
  var _ref$width = _ref.width,
3957
- width = _ref$width === void 0 ? '75%' : _ref$width,
3958
- _ref$height = _ref.height,
3959
- height = _ref$height === void 0 ? '0.3em' : _ref$height,
3960
- className = _ref.className;
3773
+ width = _ref$width === void 0 ? '75%' : _ref$width,
3774
+ _ref$height = _ref.height,
3775
+ height = _ref$height === void 0 ? '0.3em' : _ref$height,
3776
+ className = _ref.className;
3961
3777
  return /*#__PURE__*/React__default["default"].createElement("div", {
3962
3778
  className: classNames__default["default"]([styles$2.container, _defineProperty__default["default"]({}, className, className !== null)])
3963
3779
  }, /*#__PURE__*/React__default["default"].createElement(PlaceholderBlock, {
@@ -4024,40 +3840,33 @@ var defaultProps$6 = {
4024
3840
  placeholderProps: null,
4025
3841
  emptyClassName: null
4026
3842
  };
4027
-
4028
3843
  var ScreenElement = function ScreenElement(_ref) {
4029
3844
  var children = _ref.children,
4030
- placeholder = _ref.placeholder,
4031
- empty = _ref.empty,
4032
- emptyLabel = _ref.emptyLabel,
4033
- preview = _ref.preview,
4034
- isEmpty = _ref.isEmpty,
4035
- placeholderProps = _ref.placeholderProps,
4036
- emptyClassName = _ref.emptyClassName;
4037
-
3845
+ placeholder = _ref.placeholder,
3846
+ empty = _ref.empty,
3847
+ emptyLabel = _ref.emptyLabel,
3848
+ preview = _ref.preview,
3849
+ isEmpty = _ref.isEmpty,
3850
+ placeholderProps = _ref.placeholderProps,
3851
+ emptyClassName = _ref.emptyClassName;
4038
3852
  var _useScreenRenderConte = contexts.useScreenRenderContext(),
4039
- isPlaceholder = _useScreenRenderConte.isPlaceholder,
4040
- isEdit = _useScreenRenderConte.isEdit,
4041
- isPreview = _useScreenRenderConte.isPreview;
4042
-
3853
+ isPlaceholder = _useScreenRenderConte.isPlaceholder,
3854
+ isEdit = _useScreenRenderConte.isEdit,
3855
+ isPreview = _useScreenRenderConte.isPreview;
4043
3856
  if (isPlaceholder) {
4044
3857
  var PlaceholderComponent = isString__default["default"](placeholder) ? utils.getComponentFromName(placeholder, Placeholders) : null;
4045
3858
  return PlaceholderComponent !== null ? /*#__PURE__*/React__default["default"].createElement(PlaceholderComponent, placeholderProps) : placeholder;
4046
3859
  }
4047
-
4048
3860
  if (isEdit && isEmpty) {
4049
3861
  return empty !== null ? empty : /*#__PURE__*/React__default["default"].createElement(Empty, {
4050
3862
  className: emptyClassName
4051
3863
  }, emptyLabel);
4052
3864
  }
4053
-
4054
3865
  if (isPreview && preview !== null) {
4055
3866
  return preview;
4056
3867
  }
4057
-
4058
3868
  return children;
4059
3869
  };
4060
-
4061
3870
  ScreenElement.propTypes = propTypes$6;
4062
3871
  ScreenElement.defaultProps = defaultProps$6;
4063
3872
 
@@ -4072,11 +3881,10 @@ var defaultProps$5 = {
4072
3881
  screen: null,
4073
3882
  className: null
4074
3883
  };
4075
-
4076
3884
  var Screens = function Screens(_ref) {
4077
3885
  var screens = _ref.screens,
4078
- screenId = _ref.screen,
4079
- className = _ref.className;
3886
+ screenId = _ref.screen,
3887
+ className = _ref.className;
4080
3888
  return /*#__PURE__*/React__default["default"].createElement("div", {
4081
3889
  className: classNames__default["default"]([styles$1.container, _defineProperty__default["default"]({}, className, className)])
4082
3890
  }, screens.map(function (screen) {
@@ -4088,7 +3896,6 @@ var Screens = function Screens(_ref) {
4088
3896
  });
4089
3897
  }));
4090
3898
  };
4091
-
4092
3899
  Screens.propTypes = propTypes$5;
4093
3900
  Screens.defaultProps = defaultProps$5;
4094
3901
 
@@ -4097,12 +3904,20 @@ var styles = {"container":"micromag-core-transitions-transition-container","full
4097
3904
  var propTypes$4 = {
4098
3905
  fullscreen: PropTypes__default["default"].bool,
4099
3906
  from: PropTypes__default["default"].objectOf(PropTypes__default["default"].any),
3907
+ // eslint-disable-line react/forbid-prop-types
4100
3908
  to: PropTypes__default["default"].objectOf(PropTypes__default["default"].any),
3909
+ // eslint-disable-line react/forbid-prop-types
4101
3910
  playing: PropTypes__default["default"].bool,
4102
3911
  direction: PropTypes__default["default"].oneOf(['in', 'out']),
4103
3912
  delay: PropTypes__default["default"].number,
3913
+ reversible: PropTypes__default["default"].bool,
4104
3914
  duration: PropTypes__default["default"].number,
4105
3915
  easing: PropTypes__default["default"].func,
3916
+ config: PropTypes__default["default"].shape({
3917
+ mass: PropTypes__default["default"].number,
3918
+ friction: PropTypes__default["default"].number,
3919
+ tension: PropTypes__default["default"].number
3920
+ }),
4106
3921
  children: PropTypes__default["default"].node,
4107
3922
  className: PropTypes__default["default"].string,
4108
3923
  onStart: PropTypes__default["default"].func,
@@ -4115,84 +3930,71 @@ var defaultProps$4 = {
4115
3930
  playing: false,
4116
3931
  direction: null,
4117
3932
  delay: 0,
3933
+ reversible: true,
4118
3934
  duration: undefined,
4119
3935
  easing: undefined,
3936
+ config: null,
4120
3937
  children: null,
4121
3938
  className: null,
4122
3939
  onStart: null,
4123
3940
  onComplete: null
4124
3941
  };
4125
-
4126
3942
  function Transition(_ref) {
4127
3943
  var _ref2;
4128
-
4129
3944
  var fullscreen = _ref.fullscreen,
4130
- from = _ref.from,
4131
- to = _ref.to,
4132
- playing = _ref.playing,
4133
- direction = _ref.direction,
4134
- delay = _ref.delay,
4135
- duration = _ref.duration,
4136
- easing = _ref.easing,
4137
- children = _ref.children,
4138
- className = _ref.className,
4139
- onStart = _ref.onStart,
4140
- onComplete = _ref.onComplete;
4141
-
3945
+ from = _ref.from,
3946
+ to = _ref.to,
3947
+ playing = _ref.playing,
3948
+ direction = _ref.direction,
3949
+ delay = _ref.delay,
3950
+ reversible = _ref.reversible,
3951
+ duration = _ref.duration,
3952
+ easing = _ref.easing,
3953
+ config = _ref.config,
3954
+ children = _ref.children,
3955
+ className = _ref.className,
3956
+ onStart = _ref.onStart,
3957
+ onComplete = _ref.onComplete;
4142
3958
  var _useSpring = core$1.useSpring(function () {
4143
- return {};
4144
- }),
4145
- _useSpring2 = _slicedToArray__default["default"](_useSpring, 2),
4146
- springProps = _useSpring2[0],
4147
- setSpringProps = _useSpring2[1];
4148
-
3959
+ return {};
3960
+ }),
3961
+ _useSpring2 = _slicedToArray__default["default"](_useSpring, 2),
3962
+ springProps = _useSpring2[0],
3963
+ setSpringProps = _useSpring2[1];
4149
3964
  React.useEffect(function () {
4150
3965
  var immediate = !playing && direction === 'in' || playing && direction === 'out';
4151
3966
  var finalPlaying = immediate || playing;
4152
- var reset = playing && !immediate;
3967
+ var reset = reversible && playing && !immediate;
4153
3968
  var finalDuration = duration !== null ? duration : undefined;
3969
+ var withDelay = delay > 0 && playing && direction !== 'out';
3970
+ var finalConfig = easing !== null && web.config[easing] ? web.config[easing] || null : config;
4154
3971
  var props = {
4155
- from: from,
3972
+ from: finalPlaying ? from : to,
4156
3973
  to: finalPlaying ? to : from,
3974
+ immediate: immediate,
3975
+ delay: withDelay ? delay : null,
4157
3976
  reset: reset,
4158
3977
  onStart: onStart,
4159
3978
  onRest: onComplete,
4160
- config: {
3979
+ config: finalConfig !== null ? finalConfig : {
4161
3980
  duration: immediate ? 0 : finalDuration
4162
3981
  }
4163
3982
  };
4164
- var withDelay = delay > 0 && playing && direction !== 'out';
4165
- var timeout = null;
4166
-
4167
- if (withDelay) {
4168
- setSpringProps.start({
4169
- to: from,
4170
- immediate: true
4171
- });
4172
- timeout = setTimeout(function () {
4173
- setSpringProps.start(props);
4174
- }, delay);
4175
- } else {
3983
+ // Reversible always toggles between from-to (playing) to-from (!playing)
3984
+ if (finalPlaying || reversible) {
4176
3985
  setSpringProps.start(props);
4177
3986
  }
4178
-
4179
- return function () {
4180
- if (timeout !== null) {
4181
- clearTimeout(timeout);
4182
- }
4183
- };
4184
- }, [playing, direction, delay, duration, easing, from, to, setSpringProps, onStart, onComplete]);
3987
+ // console.log('fx', { reset, finalPlaying, immediate, reversible });
3988
+ }, [playing, direction, delay, duration, reversible, easing, config, from, to, setSpringProps, onStart, onComplete]);
4185
3989
  return /*#__PURE__*/React__default["default"].createElement(web.animated.div, {
4186
3990
  style: _objectSpread__default["default"]({}, springProps),
4187
3991
  className: classNames__default["default"]([styles.container, (_ref2 = {}, _defineProperty__default["default"](_ref2, className, className !== null), _defineProperty__default["default"](_ref2, styles.fullscreen, fullscreen), _ref2)])
4188
3992
  }, children);
4189
3993
  }
4190
-
4191
3994
  Transition.propTypes = propTypes$4;
4192
3995
  Transition.defaultProps = defaultProps$4;
4193
3996
 
4194
3997
  /* eslint-disable react/jsx-props-no-spreading */
4195
-
4196
3998
  function Fade(props) {
4197
3999
  var from = React.useMemo(function () {
4198
4000
  return {
@@ -4211,7 +4013,6 @@ function Fade(props) {
4211
4013
  }
4212
4014
 
4213
4015
  /* eslint-disable react/jsx-props-no-spreading */
4214
-
4215
4016
  function Scale(props) {
4216
4017
  var from = React.useMemo(function () {
4217
4018
  return {
@@ -4239,6 +4040,7 @@ var propTypes$3 = {
4239
4040
  playing: PropTypes__default["default"].bool,
4240
4041
  delay: PropTypes__default["default"].number,
4241
4042
  transitions: core.PropTypes.transitions,
4043
+ onComplete: PropTypes__default["default"].func,
4242
4044
  disabled: PropTypes__default["default"].bool,
4243
4045
  children: PropTypes__default["default"].node
4244
4046
  };
@@ -4247,21 +4049,22 @@ var defaultProps$3 = {
4247
4049
  playing: false,
4248
4050
  delay: 0,
4249
4051
  transitions: null,
4052
+ onComplete: null,
4250
4053
  disabled: false,
4251
4054
  children: null
4252
4055
  };
4253
-
4254
4056
  function Transitions(_ref) {
4255
4057
  var fullscreen = _ref.fullscreen,
4256
- playing = _ref.playing,
4257
- delay = _ref.delay,
4258
- transitions = _ref.transitions,
4259
- disabled = _ref.disabled,
4260
- children = _ref.children;
4261
-
4058
+ playing = _ref.playing,
4059
+ delay = _ref.delay,
4060
+ transitions = _ref.transitions,
4061
+ onComplete = _ref.onComplete,
4062
+ disabled = _ref.disabled,
4063
+ children = _ref.children;
4262
4064
  var _useScreenSize = contexts.useScreenSize(),
4263
- _useScreenSize$landsc = _useScreenSize.landscape,
4264
- landscape = _useScreenSize$landsc === void 0 ? false : _useScreenSize$landsc;
4065
+ _useScreenSize$landsc = _useScreenSize.landscape,
4066
+ landscape = _useScreenSize$landsc === void 0 ? true : _useScreenSize$landsc;
4067
+ // console.log({ landscape });
4265
4068
 
4266
4069
  var finalPlaying = playing || landscape;
4267
4070
  var finalTransitions = {
@@ -4280,30 +4083,29 @@ function Transitions(_ref) {
4280
4083
  } : currentTransition;
4281
4084
  });
4282
4085
  var _finalTransitions$in = finalTransitions["in"],
4283
- transitionIn = _finalTransitions$in === void 0 ? null : _finalTransitions$in,
4284
- _finalTransitions$out = finalTransitions.out,
4285
- transitionOut = _finalTransitions$out === void 0 ? null : _finalTransitions$out;
4086
+ transitionIn = _finalTransitions$in === void 0 ? null : _finalTransitions$in,
4087
+ _finalTransitions$out = finalTransitions.out,
4088
+ transitionOut = _finalTransitions$out === void 0 ? null : _finalTransitions$out;
4286
4089
  var finalTransitionIn = transitionIn !== null ? transitionIn : transitionOut;
4287
4090
  var finalTransitionOut = transitionOut !== null ? transitionOut : transitionIn;
4288
-
4289
4091
  var _ref2 = finalTransitionIn || {},
4290
- _ref2$name = _ref2.name,
4291
- transitionInName = _ref2$name === void 0 ? null : _ref2$name;
4292
-
4092
+ _ref2$name = _ref2.name,
4093
+ transitionInName = _ref2$name === void 0 ? null : _ref2$name;
4293
4094
  var _ref3 = finalTransitionOut || {},
4294
- _ref3$name = _ref3.name,
4295
- transitionOutName = _ref3$name === void 0 ? null : _ref3$name;
4296
-
4095
+ _ref3$name = _ref3.name,
4096
+ transitionOutName = _ref3$name === void 0 ? null : _ref3$name;
4297
4097
  var sameTransitionInOut = transitionInName === transitionOutName;
4298
4098
  var TransitionIn = finalTransitionIn !== null ? utils.getComponentFromName(transitionInName, TransitionComponents, null) : null;
4299
4099
  var TransitionOut = finalTransitionOut !== null && !sameTransitionInOut ? utils.getComponentFromName(transitionOutName, TransitionComponents, null) : null;
4300
4100
  var transitionInProps = finalTransitionIn !== null ? _objectSpread__default["default"](_objectSpread__default["default"]({}, finalTransitionIn), {}, {
4301
4101
  name: undefined,
4302
- delay: delay
4102
+ delay: delay,
4103
+ onComplete: onComplete
4303
4104
  }) : null;
4304
4105
  var transitionOutProps = finalTransitionOut !== null ? _objectSpread__default["default"](_objectSpread__default["default"]({}, finalTransitionOut), {}, {
4305
4106
  name: undefined,
4306
- delay: delay
4107
+ delay: delay,
4108
+ onComplete: onComplete
4307
4109
  }) : null;
4308
4110
  var renderTransitionOut = TransitionOut !== null && !disabled ? /*#__PURE__*/React__default["default"].createElement(TransitionOut, Object.assign({
4309
4111
  fullscreen: fullscreen,
@@ -4316,7 +4118,6 @@ function Transitions(_ref) {
4316
4118
  direction: !sameTransitionInOut ? 'in' : null
4317
4119
  }, transitionInProps), renderTransitionOut) : renderTransitionOut;
4318
4120
  }
4319
-
4320
4121
  Transitions.propTypes = propTypes$3;
4321
4122
  Transitions.defaultProps = defaultProps$3;
4322
4123
 
@@ -4338,32 +4139,27 @@ var defaultProps$2 = {
4338
4139
  fullscreen: false,
4339
4140
  children: null
4340
4141
  };
4341
-
4342
4142
  var TransitionsStagger = function TransitionsStagger(_ref) {
4343
4143
  var transitions = _ref.transitions,
4344
- stagger = _ref.stagger,
4345
- playing = _ref.playing,
4346
- disabled = _ref.disabled,
4347
- delay = _ref.delay,
4348
- fullscreen = _ref.fullscreen,
4349
- children = _ref.children;
4144
+ stagger = _ref.stagger,
4145
+ playing = _ref.playing,
4146
+ disabled = _ref.disabled,
4147
+ delay = _ref.delay,
4148
+ fullscreen = _ref.fullscreen,
4149
+ children = _ref.children;
4350
4150
  var validIndex = 0;
4351
4151
  var elements = React__default["default"].Children.map(children, function (child) {
4352
4152
  if (!child) {
4353
4153
  return null;
4354
4154
  }
4355
-
4356
4155
  var _child$type = child.type,
4357
- type = _child$type === void 0 ? null : _child$type;
4358
-
4156
+ type = _child$type === void 0 ? null : _child$type;
4359
4157
  var _ref2 = type || {},
4360
- _ref2$withoutTransiti = _ref2.withoutTransitionsWrapper,
4361
- withoutTransitionsWrapper = _ref2$withoutTransiti === void 0 ? false : _ref2$withoutTransiti;
4362
-
4158
+ _ref2$withoutTransiti = _ref2.withoutTransitionsWrapper,
4159
+ withoutTransitionsWrapper = _ref2$withoutTransiti === void 0 ? false : _ref2$withoutTransiti;
4363
4160
  if (disabled || withoutTransitionsWrapper) {
4364
4161
  return child;
4365
4162
  }
4366
-
4367
4163
  var el = /*#__PURE__*/React__default["default"].createElement(Transitions, {
4368
4164
  transitions: transitions,
4369
4165
  delay: delay + validIndex * stagger,
@@ -4375,7 +4171,6 @@ var TransitionsStagger = function TransitionsStagger(_ref) {
4375
4171
  });
4376
4172
  return elements;
4377
4173
  };
4378
-
4379
4174
  TransitionsStagger.propTypes = propTypes$2;
4380
4175
  TransitionsStagger.defaultProps = defaultProps$2;
4381
4176
 
@@ -4389,18 +4184,16 @@ var defaultProps$1 = {
4389
4184
  highlightSelector: 'mark',
4390
4185
  style: null
4391
4186
  };
4392
-
4393
4187
  var HighlightStyle = function HighlightStyle(_ref) {
4394
4188
  var selector = _ref.selector,
4395
- highlightSelector = _ref.highlightSelector,
4396
- style = _ref.style;
4189
+ highlightSelector = _ref.highlightSelector,
4190
+ style = _ref.style;
4397
4191
  return style !== null ? /*#__PURE__*/React__default["default"].createElement("style", {
4398
4192
  type: "text/css"
4399
4193
  }, "".concat([selector, highlightSelector].filter(function (it) {
4400
4194
  return it !== null;
4401
4195
  }).join(' '), "{").concat(utils.convertStyleToString(style), "}")) : null;
4402
4196
  };
4403
-
4404
4197
  HighlightStyle.propTypes = propTypes$1;
4405
4198
  HighlightStyle.defaultProps = defaultProps$1;
4406
4199
 
@@ -4414,18 +4207,16 @@ var defaultProps = {
4414
4207
  linkSelector: 'a',
4415
4208
  style: null
4416
4209
  };
4417
-
4418
4210
  var LinkStyle = function LinkStyle(_ref) {
4419
4211
  var selector = _ref.selector,
4420
- linkSelector = _ref.linkSelector,
4421
- style = _ref.style;
4212
+ linkSelector = _ref.linkSelector,
4213
+ style = _ref.style;
4422
4214
  return style !== null ? /*#__PURE__*/React__default["default"].createElement("style", {
4423
4215
  type: "text/css"
4424
4216
  }, "".concat([selector, linkSelector].filter(function (it) {
4425
4217
  return it !== null;
4426
4218
  }).join(' '), "{").concat(utils.convertStyleToString(style), "}")) : null;
4427
4219
  };
4428
-
4429
4220
  LinkStyle.propTypes = propTypes;
4430
4221
  LinkStyle.defaultProps = defaultProps;
4431
4222