@micromag/core 0.3.107 → 0.3.111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components.js +18 -3
- package/es/contexts.js +9 -3
- package/es/index.js +1 -1
- package/es/utils.js +31 -15
- package/lib/components.js +36 -21
- package/lib/contexts.js +9 -3
- package/lib/index.js +1 -1
- package/lib/utils.js +31 -14
- package/package.json +2 -2
package/es/components.js
CHANGED
|
@@ -8,7 +8,7 @@ import { PropTypes } from '@micromag/core';
|
|
|
8
8
|
import { FormattedMessage, defineMessages, FormattedDate, FormattedTime } from 'react-intl';
|
|
9
9
|
import { isMessage, getFieldFromPath, getComponentFromName, setFieldValue, validateFields, getDisplayName, pascalCase, convertStyleToString } from '@micromag/core/utils';
|
|
10
10
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
11
|
-
import { faAngleLeft
|
|
11
|
+
import { faAngleLeft } from '@fortawesome/free-solid-svg-icons/faAngleLeft';
|
|
12
12
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
13
13
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
14
14
|
import { useFieldsManager, useFieldComponent, FieldContextProvider, withModals, useModals, useUppy, withPanels, usePanels, ScreenSizeProvider, useScreenComponent, ScreenProvider, useScreenRenderContext, useScreenSize } from '@micromag/core/contexts';
|
|
@@ -16,16 +16,30 @@ import { useForm, useDocumentEvent, useIntersectionObserver, useResizeObserver }
|
|
|
16
16
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
17
17
|
import get from 'lodash/get';
|
|
18
18
|
import ReactDOM from 'react-dom';
|
|
19
|
-
import isArray from 'lodash/isArray';
|
|
20
19
|
import { DashboardModal } from '@uppy/react';
|
|
20
|
+
import isArray from 'lodash/isArray';
|
|
21
|
+
import { faAngleDown } from '@fortawesome/free-solid-svg-icons/faAngleDown';
|
|
22
|
+
import { faAngleUp } from '@fortawesome/free-solid-svg-icons/faAngleUp';
|
|
21
23
|
import dayjs from 'dayjs';
|
|
22
24
|
import throttle from 'lodash/throttle';
|
|
23
25
|
import isObject from 'lodash/isObject';
|
|
24
26
|
import { Helmet } from 'react-helmet';
|
|
25
27
|
import isString from 'lodash/isString';
|
|
26
28
|
import 'snake-case';
|
|
29
|
+
import { faAd } from '@fortawesome/free-solid-svg-icons/faAd';
|
|
30
|
+
import { faImage } from '@fortawesome/free-solid-svg-icons/faImage';
|
|
31
|
+
import { faMusic } from '@fortawesome/free-solid-svg-icons/faMusic';
|
|
27
32
|
import isNumber from 'lodash/isNumber';
|
|
33
|
+
import { faMapMarkerAlt } from '@fortawesome/free-solid-svg-icons/faMapMarkerAlt';
|
|
34
|
+
import { faMapMarkedAlt } from '@fortawesome/free-solid-svg-icons/faMapMarkedAlt';
|
|
35
|
+
import { faVideo } from '@fortawesome/free-solid-svg-icons/faVideo';
|
|
36
|
+
import { faPlay } from '@fortawesome/free-solid-svg-icons/faPlay';
|
|
37
|
+
import { faRedo } from '@fortawesome/free-solid-svg-icons/faRedo';
|
|
28
38
|
import { getSizeWithinBounds } from '@folklore/size';
|
|
39
|
+
import { faCommentDots } from '@fortawesome/free-solid-svg-icons/faCommentDots';
|
|
40
|
+
import { faCheck } from '@fortawesome/free-solid-svg-icons/faCheck';
|
|
41
|
+
import { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes';
|
|
42
|
+
import { faPercent } from '@fortawesome/free-solid-svg-icons/faPercent';
|
|
29
43
|
import { useSpring } from '@react-spring/core';
|
|
30
44
|
import { animated } from '@react-spring/web';
|
|
31
45
|
|
|
@@ -1744,6 +1758,7 @@ var ModalDialog = function ModalDialog(_ref) {
|
|
|
1744
1758
|
ModalDialog.propTypes = propTypes$q;
|
|
1745
1759
|
ModalDialog.defaultProps = defaultProps$q;
|
|
1746
1760
|
|
|
1761
|
+
// import classNames from 'classnames';
|
|
1747
1762
|
var propTypes$p = {
|
|
1748
1763
|
type: PropTypes$1.oneOfType([PropTypes.mediaTypes, PropTypes$1.array]),
|
|
1749
1764
|
opened: PropTypes$1.bool,
|
|
@@ -2627,7 +2642,7 @@ PropTypes$1.shape({
|
|
|
2627
2642
|
loop: PropTypes$1.bool,
|
|
2628
2643
|
closedCaptions: closedCaptionsMedia,
|
|
2629
2644
|
withSeekBar: PropTypes$1.bool,
|
|
2630
|
-
|
|
2645
|
+
withControls: PropTypes$1.bool
|
|
2631
2646
|
});
|
|
2632
2647
|
var visualElement = PropTypes$1.shape({
|
|
2633
2648
|
media: imageMedia
|
package/es/contexts.js
CHANGED
|
@@ -1094,6 +1094,7 @@ var TrackingProvider = function TrackingProvider(_ref) {
|
|
|
1094
1094
|
TrackingProvider.propTypes = propTypes$3;
|
|
1095
1095
|
TrackingProvider.defaultProps = defaultProps$3;
|
|
1096
1096
|
|
|
1097
|
+
var _excluded$3 = ["Uppy"];
|
|
1097
1098
|
/**
|
|
1098
1099
|
* Locale loader
|
|
1099
1100
|
*/
|
|
@@ -1120,12 +1121,17 @@ var useUppyCore = function useUppyCore() {
|
|
|
1120
1121
|
}
|
|
1121
1122
|
|
|
1122
1123
|
import('@uppy/core').then(function (_ref) {
|
|
1123
|
-
var Uppy = _ref.Uppy
|
|
1124
|
-
|
|
1124
|
+
var Uppy = _ref.Uppy,
|
|
1125
|
+
other = _objectWithoutProperties(_ref, _excluded$3);
|
|
1126
|
+
|
|
1127
|
+
var _ref2 = other || {},
|
|
1128
|
+
defaultPackage = _ref2["default"];
|
|
1129
|
+
|
|
1130
|
+
packageCache = Uppy || defaultPackage;
|
|
1125
1131
|
|
|
1126
1132
|
if (!canceled) {
|
|
1127
1133
|
setLoadedPackage({
|
|
1128
|
-
"package": Uppy
|
|
1134
|
+
"package": Uppy || defaultPackage
|
|
1129
1135
|
});
|
|
1130
1136
|
}
|
|
1131
1137
|
});
|
package/es/index.js
CHANGED
|
@@ -287,7 +287,7 @@ var videoElement = PropTypes$1.shape({
|
|
|
287
287
|
loop: PropTypes$1.bool,
|
|
288
288
|
closedCaptions: closedCaptionsMedia,
|
|
289
289
|
withSeekBar: PropTypes$1.bool,
|
|
290
|
-
|
|
290
|
+
withControls: PropTypes$1.bool
|
|
291
291
|
});
|
|
292
292
|
var visualElement = PropTypes$1.shape({
|
|
293
293
|
media: imageMedia
|
package/es/utils.js
CHANGED
|
@@ -404,6 +404,15 @@ var getScreenExtraField = function getScreenExtraField(intl) {
|
|
|
404
404
|
};
|
|
405
405
|
};
|
|
406
406
|
|
|
407
|
+
function getShadowCoords(angle, distance) {
|
|
408
|
+
var x = (Math.cos(angle) * distance).toFixed(3);
|
|
409
|
+
var y = (Math.sin(angle) * distance).toFixed(3);
|
|
410
|
+
return {
|
|
411
|
+
x: x,
|
|
412
|
+
y: y
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
|
|
407
416
|
var getStyleFromColor = function getStyleFromColor() {
|
|
408
417
|
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
409
418
|
var property = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'backgroundColor';
|
|
@@ -436,17 +445,24 @@ var getStyleFromShadow = function getStyleFromShadow(value) {
|
|
|
436
445
|
}
|
|
437
446
|
|
|
438
447
|
var _ref = value || {},
|
|
439
|
-
_ref$
|
|
440
|
-
|
|
441
|
-
_ref$
|
|
442
|
-
|
|
448
|
+
_ref$shadowAngle = _ref.shadowAngle,
|
|
449
|
+
shadowAngle = _ref$shadowAngle === void 0 ? null : _ref$shadowAngle,
|
|
450
|
+
_ref$shadowDistance = _ref.shadowDistance,
|
|
451
|
+
shadowDistance = _ref$shadowDistance === void 0 ? null : _ref$shadowDistance,
|
|
443
452
|
_ref$shadowBlur = _ref.shadowBlur,
|
|
444
|
-
shadowBlur = _ref$shadowBlur === void 0 ?
|
|
453
|
+
shadowBlur = _ref$shadowBlur === void 0 ? null : _ref$shadowBlur,
|
|
445
454
|
_ref$shadowColor = _ref.shadowColor,
|
|
446
|
-
shadowColor = _ref$shadowColor === void 0 ?
|
|
455
|
+
shadowColor = _ref$shadowColor === void 0 ? null : _ref$shadowColor;
|
|
456
|
+
|
|
457
|
+
if (!shadowAngle) return null;
|
|
458
|
+
var blur = shadowBlur || '0';
|
|
459
|
+
var color = getColorAsString(shadowColor) || '#000000';
|
|
460
|
+
|
|
461
|
+
var _getShadowCoords = getShadowCoords(shadowAngle, shadowDistance),
|
|
462
|
+
x = _getShadowCoords.x,
|
|
463
|
+
y = _getShadowCoords.y;
|
|
447
464
|
|
|
448
|
-
var
|
|
449
|
-
var boxShadow = "".concat(shadowHorizontalOffset, "px ").concat(shadowVerticalOffset, "px ").concat(shadowBlur, "px 0 ").concat(color);
|
|
465
|
+
var boxShadow = "".concat(x, "px ").concat(y, "px ").concat(blur, "px 0 ").concat(color);
|
|
450
466
|
return {
|
|
451
467
|
boxShadow: boxShadow
|
|
452
468
|
};
|
|
@@ -477,10 +493,10 @@ var getStyleFromBox = function getStyleFromBox(value) {
|
|
|
477
493
|
borderStyle = _value$borderStyle === void 0 ? null : _value$borderStyle,
|
|
478
494
|
_value$borderColor = value.borderColor,
|
|
479
495
|
borderColor = _value$borderColor === void 0 ? null : _value$borderColor,
|
|
480
|
-
_value$
|
|
481
|
-
|
|
482
|
-
_value$
|
|
483
|
-
|
|
496
|
+
_value$shadowAngle = value.shadowAngle,
|
|
497
|
+
shadowAngle = _value$shadowAngle === void 0 ? null : _value$shadowAngle,
|
|
498
|
+
_value$shadowDistance = value.shadowDistance,
|
|
499
|
+
shadowDistance = _value$shadowDistance === void 0 ? null : _value$shadowDistance,
|
|
484
500
|
_value$shadowBlur = value.shadowBlur,
|
|
485
501
|
shadowBlur = _value$shadowBlur === void 0 ? null : _value$shadowBlur,
|
|
486
502
|
_value$shadowColor = value.shadowColor,
|
|
@@ -491,8 +507,8 @@ var getStyleFromBox = function getStyleFromBox(value) {
|
|
|
491
507
|
color: borderColor
|
|
492
508
|
};
|
|
493
509
|
var shadow = {
|
|
494
|
-
|
|
495
|
-
|
|
510
|
+
shadowAngle: shadowAngle,
|
|
511
|
+
shadowDistance: shadowDistance,
|
|
496
512
|
shadowBlur: shadowBlur,
|
|
497
513
|
shadowColor: shadowColor
|
|
498
514
|
};
|
|
@@ -836,4 +852,4 @@ var getContrastingColor = function getContrastingColor(backgroundColor) {
|
|
|
836
852
|
return tinycolor(color).spin(30).toString();
|
|
837
853
|
};
|
|
838
854
|
|
|
839
|
-
export { convertStyleToString, createNullableOnChange, createUseEvent, getColorAsString, getComponentFromName, getContrastingColor, getDeviceScreens, getDisplayName, getFieldByName, getFieldFromPath, getFileName, getFontFamily as getFontFamilyFromFont, getGridLayoutName, largestRemainderRound as getLargestRemainderRound, getLayersFromBackground, getLayoutParts, getMediaFilesAsArray, getOptimalImageUrl, getScreenExtraField, getSecondsFromTime, getStyleFromBorder, getStyleFromBox, getStyleFromColor, getStyleFromContainer, getStyleFromHighlight, getStyleFromImage, getStyleFromLink, getStyleFromMargin, getStyleFromText, isImageFilled, isIos, isTextFilled$1 as isLabelFilled, isMessage, isTextFilled, isValidUrl, schemaId, setValue as setFieldValue, slug, unique, validateFields };
|
|
855
|
+
export { convertStyleToString, createNullableOnChange, createUseEvent, getColorAsString, getComponentFromName, getContrastingColor, getDeviceScreens, getDisplayName, getFieldByName, getFieldFromPath, getFileName, getFontFamily as getFontFamilyFromFont, getGridLayoutName, largestRemainderRound as getLargestRemainderRound, getLayersFromBackground, getLayoutParts, getMediaFilesAsArray, getOptimalImageUrl, getScreenExtraField, getSecondsFromTime, getShadowCoords, getStyleFromBorder, getStyleFromBox, getStyleFromColor, getStyleFromContainer, getStyleFromHighlight, getStyleFromImage, getStyleFromLink, getStyleFromMargin, getStyleFromText, isImageFilled, isIos, isTextFilled$1 as isLabelFilled, isMessage, isTextFilled, isValidUrl, schemaId, setValue as setFieldValue, slug, unique, validateFields };
|
package/lib/components.js
CHANGED
|
@@ -12,7 +12,7 @@ var core = require('@micromag/core');
|
|
|
12
12
|
var reactIntl = require('react-intl');
|
|
13
13
|
var utils = require('@micromag/core/utils');
|
|
14
14
|
var reactFontawesome = require('@fortawesome/react-fontawesome');
|
|
15
|
-
var
|
|
15
|
+
var faAngleLeft = require('@fortawesome/free-solid-svg-icons/faAngleLeft');
|
|
16
16
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
17
17
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
18
18
|
var contexts = require('@micromag/core/contexts');
|
|
@@ -20,16 +20,30 @@ var hooks = require('@micromag/core/hooks');
|
|
|
20
20
|
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
21
21
|
var get = require('lodash/get');
|
|
22
22
|
var ReactDOM = require('react-dom');
|
|
23
|
-
var isArray = require('lodash/isArray');
|
|
24
23
|
var react = require('@uppy/react');
|
|
24
|
+
var isArray = require('lodash/isArray');
|
|
25
|
+
var faAngleDown = require('@fortawesome/free-solid-svg-icons/faAngleDown');
|
|
26
|
+
var faAngleUp = require('@fortawesome/free-solid-svg-icons/faAngleUp');
|
|
25
27
|
var dayjs = require('dayjs');
|
|
26
28
|
var throttle = require('lodash/throttle');
|
|
27
29
|
var isObject = require('lodash/isObject');
|
|
28
30
|
var reactHelmet = require('react-helmet');
|
|
29
31
|
var isString = require('lodash/isString');
|
|
30
32
|
require('snake-case');
|
|
33
|
+
var faAd = require('@fortawesome/free-solid-svg-icons/faAd');
|
|
34
|
+
var faImage = require('@fortawesome/free-solid-svg-icons/faImage');
|
|
35
|
+
var faMusic = require('@fortawesome/free-solid-svg-icons/faMusic');
|
|
31
36
|
var isNumber = require('lodash/isNumber');
|
|
37
|
+
var faMapMarkerAlt = require('@fortawesome/free-solid-svg-icons/faMapMarkerAlt');
|
|
38
|
+
var faMapMarkedAlt = require('@fortawesome/free-solid-svg-icons/faMapMarkedAlt');
|
|
39
|
+
var faVideo = require('@fortawesome/free-solid-svg-icons/faVideo');
|
|
40
|
+
var faPlay = require('@fortawesome/free-solid-svg-icons/faPlay');
|
|
41
|
+
var faRedo = require('@fortawesome/free-solid-svg-icons/faRedo');
|
|
32
42
|
var size = require('@folklore/size');
|
|
43
|
+
var faCommentDots = require('@fortawesome/free-solid-svg-icons/faCommentDots');
|
|
44
|
+
var faCheck = require('@fortawesome/free-solid-svg-icons/faCheck');
|
|
45
|
+
var faTimes = require('@fortawesome/free-solid-svg-icons/faTimes');
|
|
46
|
+
var faPercent = require('@fortawesome/free-solid-svg-icons/faPercent');
|
|
33
47
|
var core$1 = require('@react-spring/core');
|
|
34
48
|
var web = require('@react-spring/web');
|
|
35
49
|
|
|
@@ -313,7 +327,7 @@ var BackButton = function BackButton(_ref) {
|
|
|
313
327
|
className: classNames__default["default"](['px-2', _defineProperty__default["default"]({}, className, className)]),
|
|
314
328
|
size: "sm",
|
|
315
329
|
icon: /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
316
|
-
icon:
|
|
330
|
+
icon: faAngleLeft.faAngleLeft,
|
|
317
331
|
size: "lg"
|
|
318
332
|
})
|
|
319
333
|
}, props));
|
|
@@ -1767,6 +1781,7 @@ var ModalDialog = function ModalDialog(_ref) {
|
|
|
1767
1781
|
ModalDialog.propTypes = propTypes$q;
|
|
1768
1782
|
ModalDialog.defaultProps = defaultProps$q;
|
|
1769
1783
|
|
|
1784
|
+
// import classNames from 'classnames';
|
|
1770
1785
|
var propTypes$p = {
|
|
1771
1786
|
type: PropTypes__default["default"].oneOfType([core.PropTypes.mediaTypes, PropTypes__default["default"].array]),
|
|
1772
1787
|
opened: PropTypes__default["default"].bool,
|
|
@@ -1987,7 +2002,7 @@ var CollapsablePanel = function CollapsablePanel(_ref) {
|
|
|
1987
2002
|
withoutStyle: true,
|
|
1988
2003
|
className: classNames__default["default"]([styles$h.button, _defineProperty__default["default"]({}, buttonClassName, buttonClassName !== null)]),
|
|
1989
2004
|
icon: /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
1990
|
-
icon: opened ?
|
|
2005
|
+
icon: opened ? faAngleUp.faAngleUp : faAngleDown.faAngleDown,
|
|
1991
2006
|
className: styles$h.icon
|
|
1992
2007
|
}),
|
|
1993
2008
|
iconPosition: "right",
|
|
@@ -2650,7 +2665,7 @@ PropTypes__default["default"].shape({
|
|
|
2650
2665
|
loop: PropTypes__default["default"].bool,
|
|
2651
2666
|
closedCaptions: closedCaptionsMedia,
|
|
2652
2667
|
withSeekBar: PropTypes__default["default"].bool,
|
|
2653
|
-
|
|
2668
|
+
withControls: PropTypes__default["default"].bool
|
|
2654
2669
|
});
|
|
2655
2670
|
var visualElement = PropTypes__default["default"].shape({
|
|
2656
2671
|
media: imageMedia
|
|
@@ -3167,7 +3182,7 @@ var AdFrame = function AdFrame(_ref) {
|
|
|
3167
3182
|
height: height,
|
|
3168
3183
|
className: className
|
|
3169
3184
|
}, /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3170
|
-
icon:
|
|
3185
|
+
icon: faAd.faAd,
|
|
3171
3186
|
className: styles$c.icon
|
|
3172
3187
|
}));
|
|
3173
3188
|
};
|
|
@@ -3182,7 +3197,7 @@ var AdImage = function AdImage(_ref) {
|
|
|
3182
3197
|
height: height,
|
|
3183
3198
|
className: className
|
|
3184
3199
|
}, /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3185
|
-
icon:
|
|
3200
|
+
icon: faImage.faImage,
|
|
3186
3201
|
className: styles$c.icon
|
|
3187
3202
|
}));
|
|
3188
3203
|
};
|
|
@@ -3199,7 +3214,7 @@ var Audio = function Audio(_ref) {
|
|
|
3199
3214
|
height: height,
|
|
3200
3215
|
className: className
|
|
3201
3216
|
}, /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3202
|
-
icon:
|
|
3217
|
+
icon: faMusic.faMusic,
|
|
3203
3218
|
className: styles$c.icon
|
|
3204
3219
|
}));
|
|
3205
3220
|
};
|
|
@@ -3279,7 +3294,7 @@ var Image = function Image(_ref) {
|
|
|
3279
3294
|
height: height,
|
|
3280
3295
|
className: className
|
|
3281
3296
|
}, /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3282
|
-
icon:
|
|
3297
|
+
icon: faImage.faImage,
|
|
3283
3298
|
className: styles$c.icon
|
|
3284
3299
|
}));
|
|
3285
3300
|
};
|
|
@@ -3301,16 +3316,16 @@ var Map = function Map(props) {
|
|
|
3301
3316
|
height: "100%",
|
|
3302
3317
|
className: classNames__default["default"]([styles$a.container, _defineProperty__default["default"]({}, props.className, props.className !== null)])
|
|
3303
3318
|
}), /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3304
|
-
icon: props.withImages ?
|
|
3319
|
+
icon: props.withImages ? faImage.faImage : faMapMarkerAlt.faMapMarkerAlt,
|
|
3305
3320
|
className: styles$a.icon
|
|
3306
3321
|
}), /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3307
|
-
icon: props.withImages ?
|
|
3322
|
+
icon: props.withImages ? faImage.faImage : faMapMarkerAlt.faMapMarkerAlt,
|
|
3308
3323
|
className: styles$a.icon
|
|
3309
3324
|
}), /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3310
|
-
icon: props.withImages ?
|
|
3325
|
+
icon: props.withImages ? faImage.faImage : faMapMarkerAlt.faMapMarkerAlt,
|
|
3311
3326
|
className: styles$a.icon
|
|
3312
3327
|
}), /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3313
|
-
icon: props.withImages ?
|
|
3328
|
+
icon: props.withImages ? faImage.faImage : faMapMarkerAlt.faMapMarkerAlt,
|
|
3314
3329
|
className: styles$a.icon
|
|
3315
3330
|
}));
|
|
3316
3331
|
};
|
|
@@ -3322,7 +3337,7 @@ var MapPath = function MapPath(props) {
|
|
|
3322
3337
|
height: "70%",
|
|
3323
3338
|
className: classNames__default["default"]([props.className, styles$c.mapPath])
|
|
3324
3339
|
}), /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3325
|
-
icon:
|
|
3340
|
+
icon: faMapMarkedAlt.faMapMarkedAlt,
|
|
3326
3341
|
size: "lg",
|
|
3327
3342
|
className: styles$c.icon
|
|
3328
3343
|
}));
|
|
@@ -3399,7 +3414,7 @@ var Video = function Video(_ref) {
|
|
|
3399
3414
|
height: height,
|
|
3400
3415
|
className: className
|
|
3401
3416
|
}, /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3402
|
-
icon:
|
|
3417
|
+
icon: faVideo.faVideo,
|
|
3403
3418
|
className: styles$c.icon
|
|
3404
3419
|
}));
|
|
3405
3420
|
};
|
|
@@ -3416,7 +3431,7 @@ var Video360 = function Video360(_ref) {
|
|
|
3416
3431
|
className: classNames__default["default"]([styles$9.container, _defineProperty__default["default"]({}, className, className !== null)]),
|
|
3417
3432
|
boxClassName: styles$9.box
|
|
3418
3433
|
}, /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3419
|
-
icon:
|
|
3434
|
+
icon: faVideo.faVideo,
|
|
3420
3435
|
className: styles$9.icon
|
|
3421
3436
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3422
3437
|
className: styles$9.label
|
|
@@ -3433,10 +3448,10 @@ var VideoLoop = function VideoLoop(_ref) {
|
|
|
3433
3448
|
height: height,
|
|
3434
3449
|
className: className
|
|
3435
3450
|
}, /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3436
|
-
icon:
|
|
3451
|
+
icon: faPlay.faPlay,
|
|
3437
3452
|
className: styles$c.icon
|
|
3438
3453
|
}), /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3439
|
-
icon:
|
|
3454
|
+
icon: faRedo.faRedo,
|
|
3440
3455
|
className: styles$c.icon
|
|
3441
3456
|
}));
|
|
3442
3457
|
};
|
|
@@ -3760,7 +3775,7 @@ var Conversation = function Conversation() {
|
|
|
3760
3775
|
className: classNames__default["default"]([styles$4.message, styles$4["placeholderMessage".concat(idx)]])
|
|
3761
3776
|
});
|
|
3762
3777
|
}), /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3763
|
-
icon:
|
|
3778
|
+
icon: faCommentDots.faCommentDots,
|
|
3764
3779
|
className: styles$4.icon
|
|
3765
3780
|
}));
|
|
3766
3781
|
};
|
|
@@ -3798,7 +3813,7 @@ var Answer$1 = function Answer(_ref) {
|
|
|
3798
3813
|
className: styles$3.answer
|
|
3799
3814
|
}, /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3800
3815
|
className: styles$3.answerIcon,
|
|
3801
|
-
icon: good ?
|
|
3816
|
+
icon: good ? faCheck.faCheck : faTimes.faTimes
|
|
3802
3817
|
})), /*#__PURE__*/React__default["default"].createElement(PlaceholderBlock, {
|
|
3803
3818
|
outline: true,
|
|
3804
3819
|
width: width,
|
|
@@ -3832,7 +3847,7 @@ var Answer = function Answer(_ref) {
|
|
|
3832
3847
|
className: styles$2.percent
|
|
3833
3848
|
}, /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3834
3849
|
className: styles$2.percentIcon,
|
|
3835
|
-
icon:
|
|
3850
|
+
icon: faPercent.faPercent
|
|
3836
3851
|
})));
|
|
3837
3852
|
};
|
|
3838
3853
|
|
package/lib/contexts.js
CHANGED
|
@@ -1129,6 +1129,7 @@ var TrackingProvider = function TrackingProvider(_ref) {
|
|
|
1129
1129
|
TrackingProvider.propTypes = propTypes$3;
|
|
1130
1130
|
TrackingProvider.defaultProps = defaultProps$3;
|
|
1131
1131
|
|
|
1132
|
+
var _excluded$3 = ["Uppy"];
|
|
1132
1133
|
/**
|
|
1133
1134
|
* Locale loader
|
|
1134
1135
|
*/
|
|
@@ -1155,12 +1156,17 @@ var useUppyCore = function useUppyCore() {
|
|
|
1155
1156
|
}
|
|
1156
1157
|
|
|
1157
1158
|
Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@uppy/core')); }).then(function (_ref) {
|
|
1158
|
-
var Uppy = _ref.Uppy
|
|
1159
|
-
|
|
1159
|
+
var Uppy = _ref.Uppy,
|
|
1160
|
+
other = _objectWithoutProperties__default["default"](_ref, _excluded$3);
|
|
1161
|
+
|
|
1162
|
+
var _ref2 = other || {},
|
|
1163
|
+
defaultPackage = _ref2["default"];
|
|
1164
|
+
|
|
1165
|
+
packageCache = Uppy || defaultPackage;
|
|
1160
1166
|
|
|
1161
1167
|
if (!canceled) {
|
|
1162
1168
|
setLoadedPackage({
|
|
1163
|
-
"package": Uppy
|
|
1169
|
+
"package": Uppy || defaultPackage
|
|
1164
1170
|
});
|
|
1165
1171
|
}
|
|
1166
1172
|
});
|
package/lib/index.js
CHANGED
|
@@ -314,7 +314,7 @@ var videoElement = PropTypes__default["default"].shape({
|
|
|
314
314
|
loop: PropTypes__default["default"].bool,
|
|
315
315
|
closedCaptions: closedCaptionsMedia,
|
|
316
316
|
withSeekBar: PropTypes__default["default"].bool,
|
|
317
|
-
|
|
317
|
+
withControls: PropTypes__default["default"].bool
|
|
318
318
|
});
|
|
319
319
|
var visualElement = PropTypes__default["default"].shape({
|
|
320
320
|
media: imageMedia
|
package/lib/utils.js
CHANGED
|
@@ -421,6 +421,15 @@ var getScreenExtraField = function getScreenExtraField(intl) {
|
|
|
421
421
|
};
|
|
422
422
|
};
|
|
423
423
|
|
|
424
|
+
function getShadowCoords(angle, distance) {
|
|
425
|
+
var x = (Math.cos(angle) * distance).toFixed(3);
|
|
426
|
+
var y = (Math.sin(angle) * distance).toFixed(3);
|
|
427
|
+
return {
|
|
428
|
+
x: x,
|
|
429
|
+
y: y
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
|
|
424
433
|
var getStyleFromColor = function getStyleFromColor() {
|
|
425
434
|
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
426
435
|
var property = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'backgroundColor';
|
|
@@ -453,17 +462,24 @@ var getStyleFromShadow = function getStyleFromShadow(value) {
|
|
|
453
462
|
}
|
|
454
463
|
|
|
455
464
|
var _ref = value || {},
|
|
456
|
-
_ref$
|
|
457
|
-
|
|
458
|
-
_ref$
|
|
459
|
-
|
|
465
|
+
_ref$shadowAngle = _ref.shadowAngle,
|
|
466
|
+
shadowAngle = _ref$shadowAngle === void 0 ? null : _ref$shadowAngle,
|
|
467
|
+
_ref$shadowDistance = _ref.shadowDistance,
|
|
468
|
+
shadowDistance = _ref$shadowDistance === void 0 ? null : _ref$shadowDistance,
|
|
460
469
|
_ref$shadowBlur = _ref.shadowBlur,
|
|
461
|
-
shadowBlur = _ref$shadowBlur === void 0 ?
|
|
470
|
+
shadowBlur = _ref$shadowBlur === void 0 ? null : _ref$shadowBlur,
|
|
462
471
|
_ref$shadowColor = _ref.shadowColor,
|
|
463
|
-
shadowColor = _ref$shadowColor === void 0 ?
|
|
472
|
+
shadowColor = _ref$shadowColor === void 0 ? null : _ref$shadowColor;
|
|
473
|
+
|
|
474
|
+
if (!shadowAngle) return null;
|
|
475
|
+
var blur = shadowBlur || '0';
|
|
476
|
+
var color = getColorAsString(shadowColor) || '#000000';
|
|
477
|
+
|
|
478
|
+
var _getShadowCoords = getShadowCoords(shadowAngle, shadowDistance),
|
|
479
|
+
x = _getShadowCoords.x,
|
|
480
|
+
y = _getShadowCoords.y;
|
|
464
481
|
|
|
465
|
-
var
|
|
466
|
-
var boxShadow = "".concat(shadowHorizontalOffset, "px ").concat(shadowVerticalOffset, "px ").concat(shadowBlur, "px 0 ").concat(color);
|
|
482
|
+
var boxShadow = "".concat(x, "px ").concat(y, "px ").concat(blur, "px 0 ").concat(color);
|
|
467
483
|
return {
|
|
468
484
|
boxShadow: boxShadow
|
|
469
485
|
};
|
|
@@ -494,10 +510,10 @@ var getStyleFromBox = function getStyleFromBox(value) {
|
|
|
494
510
|
borderStyle = _value$borderStyle === void 0 ? null : _value$borderStyle,
|
|
495
511
|
_value$borderColor = value.borderColor,
|
|
496
512
|
borderColor = _value$borderColor === void 0 ? null : _value$borderColor,
|
|
497
|
-
_value$
|
|
498
|
-
|
|
499
|
-
_value$
|
|
500
|
-
|
|
513
|
+
_value$shadowAngle = value.shadowAngle,
|
|
514
|
+
shadowAngle = _value$shadowAngle === void 0 ? null : _value$shadowAngle,
|
|
515
|
+
_value$shadowDistance = value.shadowDistance,
|
|
516
|
+
shadowDistance = _value$shadowDistance === void 0 ? null : _value$shadowDistance,
|
|
501
517
|
_value$shadowBlur = value.shadowBlur,
|
|
502
518
|
shadowBlur = _value$shadowBlur === void 0 ? null : _value$shadowBlur,
|
|
503
519
|
_value$shadowColor = value.shadowColor,
|
|
@@ -508,8 +524,8 @@ var getStyleFromBox = function getStyleFromBox(value) {
|
|
|
508
524
|
color: borderColor
|
|
509
525
|
};
|
|
510
526
|
var shadow = {
|
|
511
|
-
|
|
512
|
-
|
|
527
|
+
shadowAngle: shadowAngle,
|
|
528
|
+
shadowDistance: shadowDistance,
|
|
513
529
|
shadowBlur: shadowBlur,
|
|
514
530
|
shadowColor: shadowColor
|
|
515
531
|
};
|
|
@@ -881,6 +897,7 @@ exports.getMediaFilesAsArray = getMediaFilesAsArray;
|
|
|
881
897
|
exports.getOptimalImageUrl = getOptimalImageUrl;
|
|
882
898
|
exports.getScreenExtraField = getScreenExtraField;
|
|
883
899
|
exports.getSecondsFromTime = getSecondsFromTime;
|
|
900
|
+
exports.getShadowCoords = getShadowCoords;
|
|
884
901
|
exports.getStyleFromBorder = getStyleFromBorder;
|
|
885
902
|
exports.getStyleFromBox = getStyleFromBox;
|
|
886
903
|
exports.getStyleFromColor = getStyleFromColor;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.111",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -132,5 +132,5 @@
|
|
|
132
132
|
"publishConfig": {
|
|
133
133
|
"access": "public"
|
|
134
134
|
},
|
|
135
|
-
"gitHead": "
|
|
135
|
+
"gitHead": "0b8e0748efe102dae09d162dc4f06a0b0797ea35"
|
|
136
136
|
}
|