@graphcommerce/magento-search-overlay 9.1.0-canary.28 → 9.1.0-canary.31
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 +6 -0
- package/components/SearchOverlayCategories.tsx +3 -12
- package/index.ts +18 -1
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { useQuery } from '@graphcommerce/graphql'
|
|
2
1
|
import { productListLink } from '@graphcommerce/magento-product'
|
|
3
|
-
import {
|
|
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
|
|
81
|
-
|
|
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.
|
|
5
|
+
"version": "9.1.0-canary.31",
|
|
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.
|
|
16
|
-
"@graphcommerce/eslint-config-pwa": "^9.1.0-canary.
|
|
17
|
-
"@graphcommerce/framer-utils": "^9.1.0-canary.
|
|
18
|
-
"@graphcommerce/graphql": "^9.1.0-canary.
|
|
19
|
-
"@graphcommerce/image": "^9.1.0-canary.
|
|
20
|
-
"@graphcommerce/magento-product": "^9.1.0-canary.
|
|
21
|
-
"@graphcommerce/magento-search": "^9.1.0-canary.
|
|
22
|
-
"@graphcommerce/magento-store": "^9.1.0-canary.
|
|
23
|
-
"@graphcommerce/next-ui": "^9.1.0-canary.
|
|
24
|
-
"@graphcommerce/prettier-config-pwa": "^9.1.0-canary.
|
|
25
|
-
"@graphcommerce/react-hook-form": "^9.1.0-canary.
|
|
26
|
-
"@graphcommerce/typescript-config-pwa": "^9.1.0-canary.
|
|
15
|
+
"@graphcommerce/ecommerce-ui": "^9.1.0-canary.31",
|
|
16
|
+
"@graphcommerce/eslint-config-pwa": "^9.1.0-canary.31",
|
|
17
|
+
"@graphcommerce/framer-utils": "^9.1.0-canary.31",
|
|
18
|
+
"@graphcommerce/graphql": "^9.1.0-canary.31",
|
|
19
|
+
"@graphcommerce/image": "^9.1.0-canary.31",
|
|
20
|
+
"@graphcommerce/magento-product": "^9.1.0-canary.31",
|
|
21
|
+
"@graphcommerce/magento-search": "^9.1.0-canary.31",
|
|
22
|
+
"@graphcommerce/magento-store": "^9.1.0-canary.31",
|
|
23
|
+
"@graphcommerce/next-ui": "^9.1.0-canary.31",
|
|
24
|
+
"@graphcommerce/prettier-config-pwa": "^9.1.0-canary.31",
|
|
25
|
+
"@graphcommerce/react-hook-form": "^9.1.0-canary.31",
|
|
26
|
+
"@graphcommerce/typescript-config-pwa": "^9.1.0-canary.31",
|
|
27
27
|
"@lingui/core": "^4.2.1",
|
|
28
28
|
"@lingui/macro": "^4.2.1",
|
|
29
29
|
"@lingui/react": "^4.2.1",
|