@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.
@@ -65,7 +65,7 @@ const PageProvider = ({ children, dynamicProduct, dynamicCollection, productOffe
65
65
  productOffers,
66
66
  publicStoreFrontData,
67
67
  interactionData: {
68
- selectType: 'element'
68
+ selectType: 'ELEMENT'
69
69
  }
70
70
  }), [
71
71
  dynamicProduct,
@@ -14,7 +14,8 @@ const useAnimationConfig = (props)=>{
14
14
  const { animation, setting } = triggerConfig[trigger];
15
15
  return {
16
16
  type: animation,
17
- setting: setting[animation]
17
+ setting: setting[animation],
18
+ reverse: trigger === "hidden"
18
19
  };
19
20
  }, [
20
21
  configByDevices
@@ -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
  }, [
@@ -63,7 +63,7 @@ const PageProvider = ({ children, dynamicProduct, dynamicCollection, productOffe
63
63
  productOffers,
64
64
  publicStoreFrontData,
65
65
  interactionData: {
66
- selectType: 'element'
66
+ selectType: 'ELEMENT'
67
67
  }
68
68
  }), [
69
69
  dynamicProduct,
@@ -12,7 +12,8 @@ const useAnimationConfig = (props)=>{
12
12
  const { animation, setting } = triggerConfig[trigger];
13
13
  return {
14
14
  type: animation,
15
- setting: setting[animation]
15
+ setting: setting[animation],
16
+ reverse: trigger === "hidden"
16
17
  };
17
18
  }, [
18
19
  configByDevices
@@ -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
  }, [
@@ -31389,7 +31389,7 @@ type PageContextProps = {
31389
31389
  interactionData?: {
31390
31390
  item?: Interaction;
31391
31391
  isSelectOnPage?: boolean;
31392
- selectType?: 'element' | 'page';
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: 'element' | 'page') => void;
31401
+ setInteractionSelectType: (selectType: 'ELEMENT' | 'PAGE') => void;
31402
31402
  };
31403
31403
  type PageProviderProps = Pick<PageContextProps, 'dynamicProduct' | 'dynamicCollection' | 'productOffers'> & {
31404
31404
  children: React.ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.53.0-dev.32",
3
+ "version": "1.53.0-dev.34",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",