@websolutespa/bom-mixer-ui 1.7.9 → 1.7.10
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/CHANGELOG.md +11 -0
- package/dist/cjs/index.js +43 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/media/media.js +8 -1
- package/dist/esm/components/media/media.js.map +1 -1
- package/dist/esm/components/meta/meta.js +6 -4
- package/dist/esm/components/meta/meta.js.map +1 -1
- package/dist/esm/components/svg-animation/svg-animation.js +30 -5
- package/dist/esm/components/svg-animation/svg-animation.js.map +1 -1
- package/dist/types/components/media/media.d.ts.map +1 -1
- package/dist/types/components/meta/meta.d.ts +4 -1
- package/dist/types/components/meta/meta.d.ts.map +1 -1
- package/dist/types/components/svg-animation/svg-animation.d.ts +1 -0
- package/dist/types/components/svg-animation/svg-animation.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/media/media.tsx +8 -1
- package/src/components/meta/meta.tsx +18 -6
- package/src/components/svg-animation/svg-animation.tsx +36 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @websolutespa/bom-mixer-ui
|
|
2
2
|
|
|
3
|
+
## 1.7.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Modified: Media, Meta
|
|
8
|
+
- Added: SvgAnimation mode overOut
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
- @websolutespa/bom-core@1.7.5
|
|
12
|
+
- @websolutespa/bom-mixer-models@1.7.4
|
|
13
|
+
|
|
3
14
|
## 1.7.9
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -4649,6 +4649,13 @@ const MediaBase = /*#__PURE__*/React.forwardRef((_a, ref) => {
|
|
|
4649
4649
|
'media--gallery': id
|
|
4650
4650
|
});
|
|
4651
4651
|
// console.log('props.width', props.width, 'props.height', props.height);
|
|
4652
|
+
const style = {};
|
|
4653
|
+
if (typeof width === 'string' && width.indexOf('px') !== -1) {
|
|
4654
|
+
style.width = width;
|
|
4655
|
+
}
|
|
4656
|
+
if (typeof height === 'string' && height.indexOf('px') !== -1) {
|
|
4657
|
+
style.height = height;
|
|
4658
|
+
}
|
|
4652
4659
|
const mediaChildren = item && !children ? getMediaItems(item, {
|
|
4653
4660
|
width,
|
|
4654
4661
|
height,
|
|
@@ -4669,7 +4676,7 @@ const MediaBase = /*#__PURE__*/React.forwardRef((_a, ref) => {
|
|
|
4669
4676
|
className: classNames,
|
|
4670
4677
|
ref: ref,
|
|
4671
4678
|
as: as
|
|
4672
|
-
}, props, {
|
|
4679
|
+
}, props, style, {
|
|
4673
4680
|
children: mediaChildren
|
|
4674
4681
|
}));
|
|
4675
4682
|
});
|
|
@@ -5418,7 +5425,9 @@ MediaGallery.displayName = 'MediaGallery';
|
|
|
5418
5425
|
|
|
5419
5426
|
function Meta(_ref) {
|
|
5420
5427
|
let {
|
|
5421
|
-
children
|
|
5428
|
+
children,
|
|
5429
|
+
websiteName = 'WebsiteName',
|
|
5430
|
+
structuredDataCollections
|
|
5422
5431
|
} = _ref;
|
|
5423
5432
|
var _a, _b, _e;
|
|
5424
5433
|
const page = bomMixerHooks.usePage();
|
|
@@ -5459,14 +5468,14 @@ function Meta(_ref) {
|
|
|
5459
5468
|
}
|
|
5460
5469
|
}
|
|
5461
5470
|
// structuredData
|
|
5462
|
-
const structuredData = bomMixerModels.resolveStructuredData(page);
|
|
5471
|
+
const structuredData = bomMixerModels.resolveStructuredData(page, websiteName, structuredDataCollections);
|
|
5463
5472
|
return jsxRuntime.jsxs(Head__default.default, {
|
|
5464
5473
|
children: [jsxRuntime.jsx("title", {
|
|
5465
5474
|
children: title
|
|
5466
5475
|
}), jsxRuntime.jsx("meta", {
|
|
5467
5476
|
name: "description",
|
|
5468
5477
|
content: description
|
|
5469
|
-
}), false , bomCore.
|
|
5478
|
+
}), false , bomCore.getIsProduction() ? jsxRuntime.jsx("meta", {
|
|
5470
5479
|
name: "robots",
|
|
5471
5480
|
content: ((_e = page.meta) === null || _e === void 0 ? void 0 : _e.robots) || 'index, follow'
|
|
5472
5481
|
}) : jsxRuntime.jsx("meta", {
|
|
@@ -6701,6 +6710,7 @@ const SvgAnimationStrategy = {
|
|
|
6701
6710
|
Once: 'once',
|
|
6702
6711
|
Scroll: 'scroll',
|
|
6703
6712
|
Over: 'over',
|
|
6713
|
+
OverOut: 'overOut',
|
|
6704
6714
|
Controlled: 'controlled'
|
|
6705
6715
|
};
|
|
6706
6716
|
// export type SvgAnimationComponent<C extends React.ElementType = 'div'> = UIComponentWithRef<C, Props>;
|
|
@@ -6791,6 +6801,9 @@ const SvgAnimation = /*#__PURE__*/React.forwardRef((_a, forwardedRef) => {
|
|
|
6791
6801
|
case SvgAnimationStrategy.Over:
|
|
6792
6802
|
playerRef.current.goToAndStop(playerRef.current.totalFrames - 1, true);
|
|
6793
6803
|
break;
|
|
6804
|
+
case SvgAnimationStrategy.OverOut:
|
|
6805
|
+
playerRef.current.goToAndStop(0, true);
|
|
6806
|
+
break;
|
|
6794
6807
|
}
|
|
6795
6808
|
}
|
|
6796
6809
|
} else {
|
|
@@ -6838,9 +6851,19 @@ const SvgAnimation = /*#__PURE__*/React.forwardRef((_a, forwardedRef) => {
|
|
|
6838
6851
|
if (!playerRef.current) {
|
|
6839
6852
|
return;
|
|
6840
6853
|
}
|
|
6841
|
-
|
|
6842
|
-
|
|
6854
|
+
switch (mode) {
|
|
6855
|
+
case SvgAnimationStrategy.Default:
|
|
6856
|
+
case SvgAnimationStrategy.Once:
|
|
6857
|
+
playerRef.current.goToAndPlay(0);
|
|
6858
|
+
break;
|
|
6859
|
+
case SvgAnimationStrategy.Over:
|
|
6860
|
+
playerRef.current.goToAndStop(playerRef.current.totalFrames - 1, true);
|
|
6861
|
+
break;
|
|
6862
|
+
case SvgAnimationStrategy.OverOut:
|
|
6863
|
+
playerRef.current.goToAndStop(0, true);
|
|
6864
|
+
break;
|
|
6843
6865
|
}
|
|
6866
|
+
// console.log('onLoad', playerRef.current);
|
|
6844
6867
|
};
|
|
6845
6868
|
const onMouseEnter = event => {
|
|
6846
6869
|
if (typeof props.onMouseEnter === 'function') {
|
|
@@ -6849,9 +6872,18 @@ const SvgAnimation = /*#__PURE__*/React.forwardRef((_a, forwardedRef) => {
|
|
|
6849
6872
|
if (!playerRef.current) {
|
|
6850
6873
|
return;
|
|
6851
6874
|
}
|
|
6852
|
-
if (mode === SvgAnimationStrategy.Over
|
|
6875
|
+
if (mode === SvgAnimationStrategy.Over) {
|
|
6853
6876
|
playerRef.current.goToAndPlay(0);
|
|
6854
6877
|
}
|
|
6878
|
+
if (mode === SvgAnimationStrategy.OverOut) {
|
|
6879
|
+
playerRef.current.setDirection(1);
|
|
6880
|
+
playerRef.current.setSpeed(1);
|
|
6881
|
+
if (playerRef.current.currentFrame === playerRef.current.totalFrames - 1) {
|
|
6882
|
+
playerRef.current.goToAndPlay(0);
|
|
6883
|
+
} else {
|
|
6884
|
+
playerRef.current.play();
|
|
6885
|
+
}
|
|
6886
|
+
}
|
|
6855
6887
|
};
|
|
6856
6888
|
const onMouseLeave = event => {
|
|
6857
6889
|
if (typeof props.onMouseLeave === 'function') {
|
|
@@ -6860,8 +6892,10 @@ const SvgAnimation = /*#__PURE__*/React.forwardRef((_a, forwardedRef) => {
|
|
|
6860
6892
|
if (!playerRef.current) {
|
|
6861
6893
|
return;
|
|
6862
6894
|
}
|
|
6863
|
-
if (mode === SvgAnimationStrategy.
|
|
6864
|
-
playerRef.current.
|
|
6895
|
+
if (mode === SvgAnimationStrategy.OverOut) {
|
|
6896
|
+
playerRef.current.setDirection(-1);
|
|
6897
|
+
playerRef.current.setSpeed(1.5);
|
|
6898
|
+
playerRef.current.play();
|
|
6865
6899
|
}
|
|
6866
6900
|
};
|
|
6867
6901
|
const classNames = bomCore.getClassNames('lottie', className, {
|