@gem-sdk/core 1.53.0-dev.32 → 1.53.0-dev.34
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/dist/cjs/contexts/PageContext.js +1 -1
- package/dist/cjs/hooks/animation/useAnimationConfig.js +2 -1
- package/dist/cjs/hooks/animation/useApplyAnimation.js +5 -5
- package/dist/esm/contexts/PageContext.js +1 -1
- package/dist/esm/hooks/animation/useAnimationConfig.js +2 -1
- package/dist/esm/hooks/animation/useApplyAnimation.js +5 -5
- package/dist/types/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -25,13 +25,13 @@ const useApplyAnimation = ({ props })=>{
|
|
|
25
25
|
setAnimationOnFinish,
|
|
26
26
|
setToolbarActive
|
|
27
27
|
});
|
|
28
|
-
const generateAnimation = react.useCallback(({ target, setting, type })=>{
|
|
29
|
-
return animation[type](target, setting);
|
|
28
|
+
const generateAnimation = react.useCallback(({ target, setting, type, reverse })=>{
|
|
29
|
+
return animation[type](target, setting, reverse);
|
|
30
30
|
}, [
|
|
31
31
|
animation
|
|
32
32
|
]);
|
|
33
33
|
const initListAnimations = react.useCallback(()=>{
|
|
34
|
-
const { type, setting } = getAnimationConfig();
|
|
34
|
+
const { type, setting, reverse } = getAnimationConfig();
|
|
35
35
|
if (!type || type === animations.AnimationType.None || !targetObjects.current.length) {
|
|
36
36
|
cancelAnimation();
|
|
37
37
|
return;
|
|
@@ -39,9 +39,9 @@ const useApplyAnimation = ({ props })=>{
|
|
|
39
39
|
const listAnimations = targetObjects.current.map((item)=>generateAnimation({
|
|
40
40
|
type,
|
|
41
41
|
setting,
|
|
42
|
-
target: item.target
|
|
42
|
+
target: item.target,
|
|
43
|
+
reverse
|
|
43
44
|
}));
|
|
44
|
-
console.log('listAnimations', listAnimations);
|
|
45
45
|
cancelAnimation();
|
|
46
46
|
setAnimation(listAnimations);
|
|
47
47
|
}, [
|
|
@@ -21,13 +21,13 @@ const useApplyAnimation = ({ props })=>{
|
|
|
21
21
|
setAnimationOnFinish,
|
|
22
22
|
setToolbarActive
|
|
23
23
|
});
|
|
24
|
-
const generateAnimation = useCallback(({ target, setting, type })=>{
|
|
25
|
-
return animation[type](target, setting);
|
|
24
|
+
const generateAnimation = useCallback(({ target, setting, type, reverse })=>{
|
|
25
|
+
return animation[type](target, setting, reverse);
|
|
26
26
|
}, [
|
|
27
27
|
animation
|
|
28
28
|
]);
|
|
29
29
|
const initListAnimations = useCallback(()=>{
|
|
30
|
-
const { type, setting } = getAnimationConfig();
|
|
30
|
+
const { type, setting, reverse } = getAnimationConfig();
|
|
31
31
|
if (!type || type === AnimationType.None || !targetObjects.current.length) {
|
|
32
32
|
cancelAnimation();
|
|
33
33
|
return;
|
|
@@ -35,9 +35,9 @@ const useApplyAnimation = ({ props })=>{
|
|
|
35
35
|
const listAnimations = targetObjects.current.map((item)=>generateAnimation({
|
|
36
36
|
type,
|
|
37
37
|
setting,
|
|
38
|
-
target: item.target
|
|
38
|
+
target: item.target,
|
|
39
|
+
reverse
|
|
39
40
|
}));
|
|
40
|
-
console.log('listAnimations', listAnimations);
|
|
41
41
|
cancelAnimation();
|
|
42
42
|
setAnimation(listAnimations);
|
|
43
43
|
}, [
|
package/dist/types/index.d.ts
CHANGED
|
@@ -31389,7 +31389,7 @@ type PageContextProps = {
|
|
|
31389
31389
|
interactionData?: {
|
|
31390
31390
|
item?: Interaction;
|
|
31391
31391
|
isSelectOnPage?: boolean;
|
|
31392
|
-
selectType?: '
|
|
31392
|
+
selectType?: 'ELEMENT' | 'PAGE';
|
|
31393
31393
|
};
|
|
31394
31394
|
setDynamicProduct: (data: DynamicProduct) => void;
|
|
31395
31395
|
setDynamicCollection: (data: DynamicCollection) => void;
|
|
@@ -31398,7 +31398,7 @@ type PageContextProps = {
|
|
|
31398
31398
|
setPublicStoreFrontData: (publicStoreFrontData: PublicStoreFrontData | null) => void;
|
|
31399
31399
|
setInteractionItem: (item: Interaction) => void;
|
|
31400
31400
|
setInteractionIsSelectOnPage: (value: boolean) => void;
|
|
31401
|
-
setInteractionSelectType: (selectType: '
|
|
31401
|
+
setInteractionSelectType: (selectType: 'ELEMENT' | 'PAGE') => void;
|
|
31402
31402
|
};
|
|
31403
31403
|
type PageProviderProps = Pick<PageContextProps, 'dynamicProduct' | 'dynamicCollection' | 'productOffers'> & {
|
|
31404
31404
|
children: React.ReactNode;
|