@gem-sdk/pages 1.53.0-dev.149 → 1.53.0-dev.161

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.
@@ -4,15 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var core = require('@gem-sdk/core');
7
- var useSelectModeInteraction = require('../../libs/hooks/useSelectModeInteraction.js');
8
7
  var react = require('react');
9
8
 
10
9
  const InteractionSelectOnPageHeader = ()=>{
11
10
  const selectType = core.usePageStore((s)=>s.interactionData?.selectType);
12
11
  const settingType = core.usePageStore((s)=>s.interactionData?.settingType);
13
12
  const setInteractionSelectType = core.usePageStore((s)=>s.setInteractionSelectType);
14
- const { closeSelectOnPage } = core.useInteraction();
15
- const { changeSelectMode } = useSelectModeInteraction.useSelectModeInteraction();
13
+ const { closeSelectOnPage, changeSelectMode } = core.useInteraction();
16
14
  const [hoverOption, setHoverOption] = react.useState(null);
17
15
  const [openDropdown, setOpenDropdown] = react.useState(false);
18
16
  const popupRef = react.useRef(null);
@@ -1,14 +1,12 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import { usePageStore, useInteraction } from '@gem-sdk/core';
3
- import { useSelectModeInteraction } from '../../libs/hooks/useSelectModeInteraction.js';
4
3
  import { useState, useRef, useCallback, useEffect, useMemo } from 'react';
5
4
 
6
5
  const InteractionSelectOnPageHeader = ()=>{
7
6
  const selectType = usePageStore((s)=>s.interactionData?.selectType);
8
7
  const settingType = usePageStore((s)=>s.interactionData?.settingType);
9
8
  const setInteractionSelectType = usePageStore((s)=>s.setInteractionSelectType);
10
- const { closeSelectOnPage } = useInteraction();
11
- const { changeSelectMode } = useSelectModeInteraction();
9
+ const { closeSelectOnPage, changeSelectMode } = useInteraction();
12
10
  const [hoverOption, setHoverOption] = useState(null);
13
11
  const [openDropdown, setOpenDropdown] = useState(false);
14
12
  const popupRef = useRef(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/pages",
3
- "version": "1.53.0-dev.149",
3
+ "version": "1.53.0-dev.161",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -26,7 +26,7 @@
26
26
  "next": "latest"
27
27
  },
28
28
  "devDependencies": {
29
- "@gem-sdk/core": "1.53.0-dev.146",
29
+ "@gem-sdk/core": "1.53.0-dev.161",
30
30
  "@gem-sdk/plugin-cookie-bar": "1.53.0-dev.105",
31
31
  "@gem-sdk/plugin-quick-view": "1.53.0-dev.105",
32
32
  "@gem-sdk/plugin-sticky-add-to-cart": "1.53.0-dev.105"
@@ -1,16 +0,0 @@
1
- 'use strict';
2
-
3
- const useSelectModeInteraction = ()=>{
4
- const changeSelectMode = (mode)=>{
5
- const event = new CustomEvent('editor:interaction:change-select-mode', {
6
- bubbles: true,
7
- detail: mode
8
- });
9
- window.dispatchEvent(event);
10
- };
11
- return {
12
- changeSelectMode
13
- };
14
- };
15
-
16
- exports.useSelectModeInteraction = useSelectModeInteraction;
@@ -1,14 +0,0 @@
1
- const useSelectModeInteraction = ()=>{
2
- const changeSelectMode = (mode)=>{
3
- const event = new CustomEvent('editor:interaction:change-select-mode', {
4
- bubbles: true,
5
- detail: mode
6
- });
7
- window.dispatchEvent(event);
8
- };
9
- return {
10
- changeSelectMode
11
- };
12
- };
13
-
14
- export { useSelectModeInteraction };