@graphcommerce/magento-search-overlay 9.1.0-canary.28 → 9.1.0-canary.29

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 CHANGED
@@ -1,5 +1,7 @@
1
1
  # @graphcommerce/magento-search-overlay
2
2
 
3
+ ## 9.1.0-canary.29
4
+
3
5
  ## 9.1.0-canary.28
4
6
 
5
7
  ## 9.1.0-canary.27
@@ -1,7 +1,5 @@
1
- import { useQuery } from '@graphcommerce/graphql'
2
1
  import { productListLink } from '@graphcommerce/magento-product'
3
- import { CategorySearchDocument } from '@graphcommerce/magento-search'
4
- import type { CategorySearchResultFragment } from '@graphcommerce/magento-search'
2
+ import { useCategorySearch, type CategorySearchResultFragment } from '@graphcommerce/magento-search'
5
3
  import type { SectionContainerProps } from '@graphcommerce/next-ui'
6
4
  import { filterNonNullableKeys, NextLink, SectionContainer } from '@graphcommerce/next-ui'
7
5
  import { Trans } from '@lingui/macro'
@@ -77,15 +75,8 @@ export function SearchOverlayCategories(props: SearchOverlayCategoriesProps) {
77
75
  const { slotProps = {} } = props
78
76
  const { sectionContainer: sectionContainerProps = {} } = slotProps
79
77
 
80
- const categories = useQuery(CategorySearchDocument, {
81
- variables: { search, pageSize: 5 },
82
- skip: !search || search.length < 3,
83
- })
84
- const categoryItems = filterNonNullableKeys(
85
- categories.data?.categories?.items ?? categories.previousData?.categories?.items,
86
- ).filter((c) => c.include_in_menu)
87
-
88
- if (categories.error || categoryItems.length === 0 || !search) return null
78
+ const categoryItems = useCategorySearch({ search })
79
+ if (!categoryItems) return null
89
80
 
90
81
  return (
91
82
  <SectionContainer labelLeft={<Trans>Categories</Trans>} {...sectionContainerProps}>
package/index.ts CHANGED
@@ -1 +1,18 @@
1
- export {}
1
+ export * from './components/SearchOverlay'
2
+ export * from './components/SearchOverlayBodyBase'
3
+ export * from './components/SearchOverlayCategories'
4
+ export * from './components/SearchOverlayFab'
5
+ export * from './components/SearchOverlayHeader'
6
+ export * from './components/SearchOverlayInput'
7
+ export * from './components/SearchOverlayItem'
8
+ export * from './components/SearchOverlayLoader'
9
+ export * from './components/SearchOverlayProducts'
10
+ export * from './components/SearchOverlayProvider'
11
+ export * from './components/SearchOverlayRecent'
12
+ export * from './components/SearchOverlaySuggestions'
13
+ export * from './components/SearchPlaceholder'
14
+
15
+ export * from './hooks/useOpenWithShortKey'
16
+ export * from './hooks/useQuicksearch'
17
+ export * from './hooks/useRecentSearches'
18
+ export * from './hooks/useStickyHeaderOnScroll'
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-search-overlay",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.1.0-canary.28",
5
+ "version": "9.1.0-canary.29",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,18 +12,18 @@
12
12
  }
13
13
  },
14
14
  "peerDependencies": {
15
- "@graphcommerce/ecommerce-ui": "^9.1.0-canary.28",
16
- "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.28",
17
- "@graphcommerce/framer-utils": "^9.1.0-canary.28",
18
- "@graphcommerce/graphql": "^9.1.0-canary.28",
19
- "@graphcommerce/image": "^9.1.0-canary.28",
20
- "@graphcommerce/magento-product": "^9.1.0-canary.28",
21
- "@graphcommerce/magento-search": "^9.1.0-canary.28",
22
- "@graphcommerce/magento-store": "^9.1.0-canary.28",
23
- "@graphcommerce/next-ui": "^9.1.0-canary.28",
24
- "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.28",
25
- "@graphcommerce/react-hook-form": "^9.1.0-canary.28",
26
- "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.28",
15
+ "@graphcommerce/ecommerce-ui": "^9.1.0-canary.29",
16
+ "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.29",
17
+ "@graphcommerce/framer-utils": "^9.1.0-canary.29",
18
+ "@graphcommerce/graphql": "^9.1.0-canary.29",
19
+ "@graphcommerce/image": "^9.1.0-canary.29",
20
+ "@graphcommerce/magento-product": "^9.1.0-canary.29",
21
+ "@graphcommerce/magento-search": "^9.1.0-canary.29",
22
+ "@graphcommerce/magento-store": "^9.1.0-canary.29",
23
+ "@graphcommerce/next-ui": "^9.1.0-canary.29",
24
+ "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.29",
25
+ "@graphcommerce/react-hook-form": "^9.1.0-canary.29",
26
+ "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.29",
27
27
  "@lingui/core": "^4.2.1",
28
28
  "@lingui/macro": "^4.2.1",
29
29
  "@lingui/react": "^4.2.1",