From 0853b4585f4cce6cf799b0b6a4cc4947ec034f13 Mon Sep 17 00:00:00 2001 From: Hiago Lucas Cardeal de Melo Silva Date: Mon, 9 Sep 2024 14:45:07 -0300 Subject: [PATCH 01/24] . --- react/FilterNavigator.js | 5 +- react/FilterNavigatorFlexible.js | 2 + react/SearchResultFlexible.js | 11 +- react/components/AvailableFilters.js | 25 +++++ react/components/FacetItem.js | 129 ++++++++++++++++++++-- react/components/SearchFilter.js | 3 + react/components/SearchQuery.js | 1 + react/components/ShippingActionButton.tsx | 24 ++++ react/hooks/useShouldDisableFacet.js | 17 ++- react/searchResult.css | 11 ++ react/typings/vtex.styleguide.d.ts | 1 + react/utils/compatibilityLayer.js | 3 + react/utils/getFilters.js | 2 + 13 files changed, 222 insertions(+), 12 deletions(-) create mode 100644 react/components/ShippingActionButton.tsx diff --git a/react/FilterNavigator.js b/react/FilterNavigator.js index 6186c1783..5094483bf 100644 --- a/react/FilterNavigator.js +++ b/react/FilterNavigator.js @@ -73,6 +73,7 @@ const FilterNavigator = ({ priceRange, tree = [], specificationFilters = [], + deliveries = [], priceRanges = [], brands = [], loading = false, @@ -160,7 +161,7 @@ const FilterNavigator = ({ const selectedFilters = useMemo(() => { const options = [ - ...specificationFilters.map(filter => { + ...specificationFilters.concat(deliveries).map(filter => { return filter.facets.map(facet => { return { ...newNamedFacet({ ...facet, title: filter.name }), @@ -173,7 +174,7 @@ const FilterNavigator = ({ ] return flatten(options) - }, [brands, priceRanges, specificationFilters]).filter( + }, [brands, priceRanges, specificationFilters, deliveries]).filter( facet => facet.selected ) diff --git a/react/FilterNavigatorFlexible.js b/react/FilterNavigatorFlexible.js index becb16071..475f68efd 100644 --- a/react/FilterNavigatorFlexible.js +++ b/react/FilterNavigatorFlexible.js @@ -63,6 +63,7 @@ const withSearchPageContextProps = specificationFilters, categoriesTrees, queryArgs, + deliveries, } = facets const sortedFilters = useMemo( @@ -113,6 +114,7 @@ const withSearchPageContextProps = priceRangeLayout={priceRangeLayout} drawerDirectionMobile={drawerDirectionMobile} showQuantityBadgeOnMobile={showQuantityBadgeOnMobile} + deliveries={deliveries} /> diff --git a/react/SearchResultFlexible.js b/react/SearchResultFlexible.js index 9d59ccb43..f4f5e87f2 100644 --- a/react/SearchResultFlexible.js +++ b/react/SearchResultFlexible.js @@ -82,6 +82,7 @@ const SearchResultFlexible = ({ priceRanges, specificationFilters, categoriesTrees, + deliveries, } = facets const filters = useMemo( @@ -92,8 +93,16 @@ const SearchResultFlexible = ({ brands, brandsQuantity, hiddenFacets, + deliveries, }), - [brands, hiddenFacets, priceRanges, specificationFilters, brandsQuantity] + [ + brands, + hiddenFacets, + priceRanges, + specificationFilters, + brandsQuantity, + deliveries, + ] ) const handles = useCssHandles(CSS_HANDLES) diff --git a/react/components/AvailableFilters.js b/react/components/AvailableFilters.js index eda4ee871..1a47e821b 100644 --- a/react/components/AvailableFilters.js +++ b/react/components/AvailableFilters.js @@ -60,6 +60,31 @@ const Filter = ({ /> ) + case 'DELIVERY': + return ( + + ) + default: return ( { + const isSSR = useSSR() + const { push } = usePixel() + + const actionType = shippingActionTypes[facet.value] + const eventIdentifier = eventIdentifiers[actionType] + + const [actionLabel, setActionLabel] = useState(placeHolders[actionType]) + const [isAddressSet, setIsAddressSet] = useState(false) + const [isPickupSet, setIsPickupSet] = useState(false) + + usePixelEventCallback({ + eventId: `shipping-option-${eventIdentifier}`, + handler: e => { + if (e?.data?.label) { + setActionLabel(e.data.label) + + if (eventIdentifier === 'addressLabel') { + setIsAddressSet(true) + } + + if (eventIdentifier === 'pickupPointLabel') { + setIsPickupSet(true) + } + } else { + setActionLabel(placeHolders[actionType]) + + if (eventIdentifier === 'addressLabel') { + setIsAddressSet(false) + } + + if (eventIdentifier === 'pickupPointLabel') { + setIsPickupSet(false) + } + } + }, + }) + + useEffect(() => { + if (!isSSR) { + return + } + + const windowLabel = window[eventIdentifier] + + if (windowLabel) { + setActionLabel(windowLabel) + + if (eventIdentifier === 'addressLabel') { + setIsAddressSet(true) + } + + if (eventIdentifier === 'pickupPointLabel') { + setIsPickupSet(true) + } + } else { + setActionLabel(placeHolders[actionType]) + + if (eventIdentifier === 'addressLabel') { + setIsAddressSet(false) + } + + if (eventIdentifier === 'pickupPointLabel') { + setIsPickupSet(false) + } + } + }, [actionType, eventIdentifier, isSSR]) + + const openDrawer = useCallback(() => { + push({ + id: drawerEvent[actionType], + }) + }, [actionType, push]) + const { showFacetQuantity } = useContext(SettingsContext) const [selected, setSelected] = useState(facet.selected) - const { push } = usePixel() const handles = useCssHandles(CSS_HANDLES) const classes = classNames( applyModifiers(handles.filterItem, facet.value), @@ -61,7 +163,7 @@ const FacetItem = ({ // eslint-disable-next-line react-hooks/exhaustive-deps }, [facet.selected]) - const shouldDisable = useShouldDisableFacet(facet) + const shouldDisable = useShouldDisableFacet(facet, isAddressSet, isPickupSet) const facetLabel = useMemo(() => { const labelElement = @@ -75,6 +177,11 @@ const FacetItem = ({ ({facet.quantity}) + ) : showActionButton && actionType && facet.value !== 'pickup-nearby' ? ( +
+ {facet.name} + +
) : ( facet.name ) @@ -90,13 +197,19 @@ const FacetItem = ({ return labelElement }, [ - facet, + showFacetQuantity, + sampling, + facet.name, + facet.value, + facet.quantity, handles.productCount, handles.filterItemTitle, - facetTitle, + showActionButton, + actionType, + actionLabel, + openDrawer, showTitle, - showFacetQuantity, - sampling, + facetTitle, ]) return ( diff --git a/react/components/SearchFilter.js b/react/components/SearchFilter.js index f39138dcd..07c684083 100644 --- a/react/components/SearchFilter.js +++ b/react/components/SearchFilter.js @@ -27,6 +27,7 @@ const SearchFilter = ({ closeOnOutsideClick, appliedFiltersOverview, showClearByFilter, + type = 'TEXT', }) => { const intl = useIntl() const sampleFacet = facets && facets.length > 0 ? facets[0] : null @@ -59,6 +60,7 @@ const SearchFilter = ({ facet={facet} preventRouteChange={preventRouteChange} navigateToFacet={navigateToFacet} + showActionButton={type === 'DELIVERY'} /> )} @@ -93,6 +95,7 @@ SearchFilter.propTypes = { /** Whether an overview of the applied filters should be displayed (`"show"`) or not (`"hide"`). */ appliedFiltersOverview: PropTypes.string, showClearByFilter: PropTypes.bool, + type: PropTypes.string, } export default SearchFilter diff --git a/react/components/SearchQuery.js b/react/components/SearchQuery.js index 5a8a0d291..bf383ff88 100644 --- a/react/components/SearchQuery.js +++ b/react/components/SearchQuery.js @@ -248,6 +248,7 @@ const useQueries = (variables, facetsArgs, price) => { specificationFilters: [], categoriesTrees: [], priceRanges: [], + deliveries: [], } const selectedFacetsOutput = diff --git a/react/components/ShippingActionButton.tsx b/react/components/ShippingActionButton.tsx new file mode 100644 index 000000000..b300dd99d --- /dev/null +++ b/react/components/ShippingActionButton.tsx @@ -0,0 +1,24 @@ +import React from 'react' +import { useCssHandles } from 'vtex.css-handles' + +const CSS_HANDLES = ['shippingActionButton'] + +interface Props { + label: string + openDrawer: () => void +} + +const ShippingActionButton = ({ label, openDrawer }: Props) => { + const handles = useCssHandles(CSS_HANDLES) + + return ( + + ) +} + +export default ShippingActionButton diff --git a/react/hooks/useShouldDisableFacet.js b/react/hooks/useShouldDisableFacet.js index 759d53e42..a9dc40d82 100644 --- a/react/hooks/useShouldDisableFacet.js +++ b/react/hooks/useShouldDisableFacet.js @@ -2,9 +2,24 @@ import { useSearchPage } from 'vtex.search-page-context/SearchPageContext' import { MAP_VALUES_SEP } from '../constants' -export default function useShouldDisableFacet(facet) { +export default function useShouldDisableFacet( + facet, + isAddressSet, + isPickupSet +) { const { map } = useSearchPage() + if ( + (facet.value === 'delivery' || facet.value === 'pickup-nearby') && + !isAddressSet + ) { + return true + } + + if (facet.value === 'pickup-in-point' && !isPickupSet) { + return true + } + if (!facet.selected || !map) { return false } diff --git a/react/searchResult.css b/react/searchResult.css index 63948a915..ffefb8280 100644 --- a/react/searchResult.css +++ b/react/searchResult.css @@ -258,3 +258,14 @@ .notFound--layout { } + +.shippingActionButton { + border: 0; + padding: 0; + font-size: 14px; + background: unset; + cursor: pointer; + text-align: left; + font-weight: 500; + color: #134CD8; +} diff --git a/react/typings/vtex.styleguide.d.ts b/react/typings/vtex.styleguide.d.ts index e2c82da55..e2c402bc6 100644 --- a/react/typings/vtex.styleguide.d.ts +++ b/react/typings/vtex.styleguide.d.ts @@ -2,4 +2,5 @@ declare module 'vtex.styleguide' { import type { ComponentType } from 'react' export const Spinner: ComponentType> + export const RadioGroup: ComponentType> } diff --git a/react/utils/compatibilityLayer.js b/react/utils/compatibilityLayer.js index 583bff626..00daff44e 100644 --- a/react/utils/compatibilityLayer.js +++ b/react/utils/compatibilityLayer.js @@ -79,6 +79,8 @@ export const detachFiltersByType = facets => { groupedFilters.TEXT || [] ) + const deliveries = groupedFilters.DELIVERY || [] + const categoriesTrees = pathOr( [], ['CATEGORYTREE', 0, 'facets'], @@ -102,6 +104,7 @@ export const detachFiltersByType = facets => { specificationFilters, categoriesTrees, priceRanges, + deliveries, } } diff --git a/react/utils/getFilters.js b/react/utils/getFilters.js index 1a25feb3a..b3b53c66d 100644 --- a/react/utils/getFilters.js +++ b/react/utils/getFilters.js @@ -12,6 +12,7 @@ const getFilters = ({ specificationFilters = [], priceRanges = [], brands = [], + deliveries = [], brandsQuantity = 0, hiddenFacets = {}, }) => { @@ -35,6 +36,7 @@ const getFilters = ({ : [] return [ + ...deliveries, ...mappedSpecificationFilters, !hiddenFacets.brands && !isEmpty(brands) && { From 9f35164ff9fb35f047fa26dde581838b5b4f82c4 Mon Sep 17 00:00:00 2001 From: Hiago Lucas Cardeal de Melo Silva Date: Sun, 22 Sep 2024 17:19:46 -0300 Subject: [PATCH 02/24] add buttons to mobile --- react/components/AccordionFilterContainer.js | 24 ++++ react/components/AccordionFilterGroup.js | 2 + react/components/FacetCheckboxList.js | 52 ++------ react/components/FacetCheckboxListItem.js | 73 ++++++++++ react/components/FacetItem.js | 110 +--------------- react/hooks/useShippingActions.js | 132 +++++++++++++++++++ react/hooks/useShouldDisableFacet.js | 4 +- 7 files changed, 252 insertions(+), 145 deletions(-) create mode 100644 react/components/FacetCheckboxListItem.js create mode 100644 react/hooks/useShippingActions.js diff --git a/react/components/AccordionFilterContainer.js b/react/components/AccordionFilterContainer.js index 879d2e63f..25058b37b 100644 --- a/react/components/AccordionFilterContainer.js +++ b/react/components/AccordionFilterContainer.js @@ -185,6 +185,30 @@ const AccordionFilterContainer = ({ /> ) + case 'DELIVERY': + return ( + + ) + default: return ( { const handles = useCssHandles(CSS_HANDLES) const filters = useSelectedFilters(facets) @@ -67,6 +68,7 @@ const AccordionFilterGroup = ({ navigationType={navigationType} truncatedFacetsFetched={truncatedFacetsFetched} setTruncatedFacetsFetched={setTruncatedFacetsFetched} + showActionButton={type === 'DELIVERY'} /> diff --git a/react/components/FacetCheckboxList.js b/react/components/FacetCheckboxList.js index 57ff8aba0..ea216c4bc 100644 --- a/react/components/FacetCheckboxList.js +++ b/react/components/FacetCheckboxList.js @@ -1,17 +1,12 @@ -import classNames from 'classnames' import React, { useContext, useState, useMemo } from 'react' -import { Checkbox } from 'vtex.styleguide' -import { applyModifiers } from 'vtex.css-handles' import { useRuntime } from 'vtex.render-runtime' -import { usePixel } from 'vtex.pixel-manager' import { useSearchPage } from 'vtex.search-page-context/SearchPageContext' -import { pushFilterManipulationPixelEvent } from '../utils/filterManipulationPixelEvents' -import styles from '../searchResult.css' import SettingsContext from './SettingsContext' import { SearchFilterBar } from './SearchFilterBar' import { FACETS_RENDER_THRESHOLD } from '../constants/filterConstants' import ShowMoreFilterButton from './ShowMoreFilterButton' +import FacetCheckboxListItem from './FacetCheckboxListItem' const useSettings = () => useContext(SettingsContext) @@ -24,8 +19,8 @@ const FacetCheckboxList = ({ navigationType, truncatedFacetsFetched, setTruncatedFacetsFetched, + showActionButton, }) => { - const { push } = usePixel() const { searchQuery } = useSearchPage() const { showFacetQuantity } = useContext(SettingsContext) const { getSettings } = useRuntime() @@ -76,40 +71,17 @@ const FacetCheckboxList = ({ ) : null} {filteredFacets.slice(0, endSlice).map(facet => { - const { name, value: slugifiedName } = facet - return ( -
- { - pushFilterManipulationPixelEvent({ - name: facetTitle, - value: name, - products: searchQuery?.products ?? [], - push, - }) - - onFilterCheck({ ...facet, title: facetTitle }) - }} - value={name} - /> -
+ ) })} {shouldTruncate && ( diff --git a/react/components/FacetCheckboxListItem.js b/react/components/FacetCheckboxListItem.js new file mode 100644 index 000000000..90b5db724 --- /dev/null +++ b/react/components/FacetCheckboxListItem.js @@ -0,0 +1,73 @@ +import classNames from 'classnames' +import React from 'react' +import { applyModifiers } from 'vtex.css-handles' +import { Checkbox } from 'vtex.styleguide' +import { usePixel } from 'vtex.pixel-manager' + +import styles from '../searchResult.css' +import { pushFilterManipulationPixelEvent } from '../utils/filterManipulationPixelEvents' +import useShippingActions from '../hooks/useShippingActions' +import ShippingActionButton from './ShippingActionButton' + +const FacetCheckboxListItem = ({ + facet, + showFacetQuantity, + sampling, + facetTitle, + searchQuery, + onFilterCheck, + showActionButton, +}) => { + const { push } = usePixel() + + const { actionLabel, actionType, openDrawer, shouldDisable } = + useShippingActions(facet) + + const { name, value: slugifiedName } = facet + + return ( +
+ + {facet.name} + +
+ ) : ( + facet.name + ) + } + name={name} + onChange={() => { + pushFilterManipulationPixelEvent({ + name: facetTitle, + value: name, + products: searchQuery?.products ?? [], + push, + }) + + onFilterCheck({ ...facet, title: facetTitle }) + }} + value={name} + /> + + ) +} + +export default FacetCheckboxListItem diff --git a/react/components/FacetItem.js b/react/components/FacetItem.js index 9911c50e5..a285da50a 100644 --- a/react/components/FacetItem.js +++ b/react/components/FacetItem.js @@ -1,21 +1,14 @@ -import React, { - useContext, - useState, - useEffect, - useMemo, - useCallback, -} from 'react' +import React, { useContext, useState, useEffect, useMemo } from 'react' import { Checkbox } from 'vtex.styleguide' import { useCssHandles, applyModifiers } from 'vtex.css-handles' import classNames from 'classnames' import { useSearchPage } from 'vtex.search-page-context/SearchPageContext' -import { usePixel, usePixelEventCallback } from 'vtex.pixel-manager' -import { useSSR } from 'vtex.render-runtime/react/components/NoSSR' +import { usePixel } from 'vtex.pixel-manager' import { pushFilterManipulationPixelEvent } from '../utils/filterManipulationPixelEvents' import SettingsContext from './SettingsContext' -import useShouldDisableFacet from '../hooks/useShouldDisableFacet' import ShippingActionButton from './ShippingActionButton' +import useShippingActions from '../hooks/useShippingActions' const CSS_HANDLES = ['filterItem', 'productCount', 'filterItemTitle'] @@ -30,27 +23,6 @@ const reservedVariableNames = [ 'parent', ] -const shippingActionTypes = { - delivery: 'DELIVERY', - 'pickup-nearby': 'DELIVERY', - 'pickup-in-point': 'PICKUP_POINT', -} - -const eventIdentifiers = { - DELIVERY: 'addressLabel', - PICKUP_POINT: 'pickupPointLabel', -} - -const placeHolders = { - DELIVERY: 'Enter location', - PICKUP_POINT: 'Enter store', -} - -const drawerEvent = { - DELIVERY: 'shipping-option-deliver-to', - PICKUP_POINT: 'shipping-option-store', -} - const FacetItem = ({ navigateToFacet, facetTitle, @@ -60,78 +32,10 @@ const FacetItem = ({ showTitle = false, showActionButton, }) => { - const isSSR = useSSR() const { push } = usePixel() - const actionType = shippingActionTypes[facet.value] - const eventIdentifier = eventIdentifiers[actionType] - - const [actionLabel, setActionLabel] = useState(placeHolders[actionType]) - const [isAddressSet, setIsAddressSet] = useState(false) - const [isPickupSet, setIsPickupSet] = useState(false) - - usePixelEventCallback({ - eventId: `shipping-option-${eventIdentifier}`, - handler: e => { - if (e?.data?.label) { - setActionLabel(e.data.label) - - if (eventIdentifier === 'addressLabel') { - setIsAddressSet(true) - } - - if (eventIdentifier === 'pickupPointLabel') { - setIsPickupSet(true) - } - } else { - setActionLabel(placeHolders[actionType]) - - if (eventIdentifier === 'addressLabel') { - setIsAddressSet(false) - } - - if (eventIdentifier === 'pickupPointLabel') { - setIsPickupSet(false) - } - } - }, - }) - - useEffect(() => { - if (!isSSR) { - return - } - - const windowLabel = window[eventIdentifier] - - if (windowLabel) { - setActionLabel(windowLabel) - - if (eventIdentifier === 'addressLabel') { - setIsAddressSet(true) - } - - if (eventIdentifier === 'pickupPointLabel') { - setIsPickupSet(true) - } - } else { - setActionLabel(placeHolders[actionType]) - - if (eventIdentifier === 'addressLabel') { - setIsAddressSet(false) - } - - if (eventIdentifier === 'pickupPointLabel') { - setIsPickupSet(false) - } - } - }, [actionType, eventIdentifier, isSSR]) - - const openDrawer = useCallback(() => { - push({ - id: drawerEvent[actionType], - }) - }, [actionType, push]) + const { actionLabel, actionType, openDrawer, shouldDisable } = + useShippingActions(facet) const { showFacetQuantity } = useContext(SettingsContext) @@ -163,8 +67,6 @@ const FacetItem = ({ // eslint-disable-next-line react-hooks/exhaustive-deps }, [facet.selected]) - const shouldDisable = useShouldDisableFacet(facet, isAddressSet, isPickupSet) - const facetLabel = useMemo(() => { const labelElement = showFacetQuantity && !sampling ? ( @@ -177,7 +79,7 @@ const FacetItem = ({ ({facet.quantity}) - ) : showActionButton && actionType && facet.value !== 'pickup-nearby' ? ( + ) : showActionButton && actionType ? (
{facet.name} diff --git a/react/hooks/useShippingActions.js b/react/hooks/useShippingActions.js new file mode 100644 index 000000000..d163b352b --- /dev/null +++ b/react/hooks/useShippingActions.js @@ -0,0 +1,132 @@ +import { useCallback, useEffect, useState } from 'react' +import { usePixel, usePixelEventCallback } from 'vtex.pixel-manager' +import { useSSR } from 'vtex.render-runtime/react/components/NoSSR' + +import useShouldDisableFacet from './useShouldDisableFacet' + +const shippingActionTypes = { + delivery: 'DELIVERY', + 'pickup-nearby': 'DELIVERY', + pickup: 'DELIVERY', + 'pickup-in-point': 'PICKUP_POINT', +} + +const eventIdentifiers = { + DELIVERY: 'addressLabel', + PICKUP_POINT: 'pickupPointLabel', +} + +const placeHolders = { + DELIVERY: 'Enter location', + PICKUP_POINT: 'Enter store', +} + +const drawerEvent = { + DELIVERY: 'shipping-option-deliver-to', + PICKUP_POINT: 'shipping-option-store', +} + +const addressDependentValues = [ + 'delivery', + 'pickup-in-point', + 'pickup-nearby', + 'pickup', +] + +const useShippingActions = facet => { + const actionType = shippingActionTypes[facet.value] + const eventIdentifier = actionType ? eventIdentifiers[actionType] : null + + const [actionLabel, setActionLabel] = useState(placeHolders[actionType]) + const [isAddressSet, setIsAddressSet] = useState(false) + const [isPickupSet, setIsPickupSet] = useState(false) + + const isAddressDependent = + addressDependentValues.findIndex(value => facet.value === value) > -1 + + const isSSR = useSSR() + const { push } = usePixel() + + usePixelEventCallback({ + eventId: `shipping-option-${eventIdentifier}`, + handler: e => { + if (e?.data?.label) { + setActionLabel(e.data.label) + + if (isAddressDependent) { + setIsAddressSet(true) + } + + if (eventIdentifier === 'pickupPointLabel') { + setIsPickupSet(true) + } + } else { + setActionLabel(placeHolders[actionType]) + + if (isAddressDependent) { + setIsAddressSet(false) + } + + if (eventIdentifier === 'pickupPointLabel') { + setIsPickupSet(false) + } + } + }, + }) + + useEffect(() => { + if (!isSSR) { + return + } + + const windowLabel = window[eventIdentifier] + + if (windowLabel) { + setActionLabel(windowLabel) + + if (isAddressDependent) { + setIsAddressSet(true) + } + + if (eventIdentifier === 'pickupPointLabel') { + setIsPickupSet(true) + } + } else { + setActionLabel(placeHolders[actionType]) + + if (isAddressDependent) { + setIsAddressSet(false) + } + + if (eventIdentifier === 'pickupPointLabel') { + setIsPickupSet(false) + } + } + }, [actionType, eventIdentifier, isSSR, isAddressDependent]) + + const openDrawer = useCallback(() => { + push({ + id: drawerEvent[actionType], + }) + }, [actionType, push]) + + const shouldDisable = useShouldDisableFacet(facet, isAddressSet, isPickupSet) + + if (facet.value === 'pickup-nearby' || facet.value === 'pickup') { + return { + actionLabel: null, + actionType: null, + openDrawer: null, + shouldDisable, + } + } + + return { + actionType, + actionLabel, + openDrawer, + shouldDisable, + } +} + +export default useShippingActions diff --git a/react/hooks/useShouldDisableFacet.js b/react/hooks/useShouldDisableFacet.js index a9dc40d82..0ab25774a 100644 --- a/react/hooks/useShouldDisableFacet.js +++ b/react/hooks/useShouldDisableFacet.js @@ -10,7 +10,9 @@ export default function useShouldDisableFacet( const { map } = useSearchPage() if ( - (facet.value === 'delivery' || facet.value === 'pickup-nearby') && + (facet.value === 'delivery' || + facet.value === 'pickup-nearby' || + facet.value === 'pickup') && !isAddressSet ) { return true From 73a0dc082ef5e6850b7bfaf7f3c72933a655e74c Mon Sep 17 00:00:00 2001 From: Hiago Lucas Cardeal de Melo Silva Date: Sun, 22 Sep 2024 17:44:24 -0300 Subject: [PATCH 03/24] fix zindex --- react/components/AccordionFilterContainer.js | 2 +- react/components/SideBar.js | 4 ++-- react/searchResult.css | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/react/components/AccordionFilterContainer.js b/react/components/AccordionFilterContainer.js index 25058b37b..90d263331 100644 --- a/react/components/AccordionFilterContainer.js +++ b/react/components/AccordionFilterContainer.js @@ -238,7 +238,7 @@ const AccordionFilterContainer = ({ style={{ background: 'rgba(3, 4, 78, 0.4)' }} className={classNames( handles.filterLoadingOverlay, - 'fixed dim top-0 w-100 vh-100 left-0 z-9999 justify-center items-center justify-center items-center flex' + 'fixed dim top-0 w-100 vh-100 left-0 z-999 justify-center items-center justify-center items-center flex' )} > diff --git a/react/components/SideBar.js b/react/components/SideBar.js index 005ca787d..76eddca84 100644 --- a/react/components/SideBar.js +++ b/react/components/SideBar.js @@ -42,14 +42,14 @@ class Sidebar extends Component { } const scrimClasses = classNames( - 'fixed dim bg-base--inverted top-0 z-9999 w-100 vh-100 o-40 left-0', + `${searchResult.scrim} fixed dim bg-base--inverted top-0 w-100 vh-100 o-40 left-0`, { dn: !isOpen, } ) const sidebarClasses = classNames( - `${searchResult.sidebar} w-auto-ns h-100 fixed top-0 z-9999 bg-base shadow-2 flex flex-column`, + `${searchResult.sidebar} w-auto-ns h-100 fixed top-0 bg-base shadow-2 flex flex-column`, this.props.fullWidth ? 'w-100' : 'w-80', filtersDrawerDirectionMobile === 'drawerLeft' ? 'right-0' : 'left-0' ) diff --git a/react/searchResult.css b/react/searchResult.css index ffefb8280..c2026798c 100644 --- a/react/searchResult.css +++ b/react/searchResult.css @@ -269,3 +269,7 @@ font-weight: 500; color: #134CD8; } + +.scrim, .sidebar { + z-index: 999; +} From 91422da7610872f1826390067a7d3a53ef3c8bd4 Mon Sep 17 00:00:00 2001 From: Luara Kerlen dos Santos Rangel Date: Tue, 1 Oct 2024 11:11:18 -0300 Subject: [PATCH 04/24] feat: add shipping filter messages --- messages/context.json | 5 +++++ messages/en.json | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/messages/context.json b/messages/context.json index a10ab84b7..75deb21eb 100644 --- a/messages/context.json +++ b/messages/context.json @@ -65,6 +65,11 @@ "store/search.filter.placeholder": "Search by {filterName}", "store/search.filter.title.brands": "Brands", "store/search.filter.title.price-ranges": "Price Ranges", + "store/search.filter.title.shipping": "Shipping", + "store/search.filter.shipping.name.delivery": "Deliver to", + "store/search.filter.shipping.name.pickup-in-point": "Pickup at", + "store/search.filter.shipping.name.pickup-nearby": "Pickup nearby", + "store/search.filter.shipping.name.pickup-all": "Pickup", "store/search.text": "Showing {from}-{to} from {recordsFiltered} records", "store/search.selected-filters": "Filtered by:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {Product} other {Products}}", diff --git a/messages/en.json b/messages/en.json index bd7a11e1c..5969aab5d 100644 --- a/messages/en.json +++ b/messages/en.json @@ -66,6 +66,11 @@ "store/search.filter.title.brands": "Brands", "store/search.filter.title.price-ranges": "Price ranges", "store/search.text": "Showing {from}–{to} of {recordsFiltered} results", + "store/search.filter.title.shipping": "Shipping", + "store/search.filter.shipping.name.delivery": "Deliver to", + "store/search.filter.shipping.name.pickup-in-point": "Pickup at", + "store/search.filter.shipping.name.pickup-nearby": "Pickup nearby", + "store/search.filter.shipping.name.pickup-all": "Pickup", "store/search.selected-filters": "Filtered by:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {product} other {products}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {product} other {products}}", From 7636e1fd89adaa6a63e2b9ed6c2c6e244692c951 Mon Sep 17 00:00:00 2001 From: Luara Kerlen dos Santos Rangel Date: Tue, 1 Oct 2024 11:11:40 -0300 Subject: [PATCH 05/24] feat: add shipping filter options and messages --- react/utils/getFilters.js | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/react/utils/getFilters.js b/react/utils/getFilters.js index b3b53c66d..57af5513b 100644 --- a/react/utils/getFilters.js +++ b/react/utils/getFilters.js @@ -1,5 +1,7 @@ import { path, contains, isEmpty } from 'ramda' +import { useIntl } from 'react-intl' +export const SHIPPING_TITLE = 'store/search.filter.title.shipping' export const CATEGORIES_TITLE = 'store/search.filter.title.categories' export const BRANDS_TITLE = 'store/search.filter.title.brands' export const PRICE_RANGES_TITLE = 'store/search.filter.title.price-ranges' @@ -8,6 +10,13 @@ const BRANDS_TYPE = 'Brands' const PRICE_RANGES_TYPE = 'PriceRanges' const SPECIFICATION_FILTERS_TYPE = 'SpecificationFilters' +const SHIPPING_OPTIONS = { + delivery: 'store/search.filter.shipping.name.delivery', + 'pickup-in-point': 'store/search.filter.shipping.name.pickup-in-point', + 'pickup-nearby': 'store/search.filter.shipping.name.pickup-nearby', + 'pickup-all': 'store/search.filter.shipping.name.pickup-all', +} + const getFilters = ({ specificationFilters = [], priceRanges = [], @@ -16,6 +25,17 @@ const getFilters = ({ brandsQuantity = 0, hiddenFacets = {}, }) => { + const intl = useIntl() + + const shipping = deliveries.map((delivery) => ({ + ...delivery, + title: SHIPPING_TITLE, + facets: delivery.facets.map((facet) => ({ + ...facet, + name: intl.formatMessage({ id: SHIPPING_OPTIONS[facet.name] }) , + })) + })) + const hiddenFacetsNames = ( path(['specificationFilters', 'hiddenFilters'], hiddenFacets) || [] ).map(filter => filter.name) @@ -36,7 +56,7 @@ const getFilters = ({ : [] return [ - ...deliveries, + ...shipping, ...mappedSpecificationFilters, !hiddenFacets.brands && !isEmpty(brands) && { From 304ee18ef8d18a2e05a05e2cdf86f6547a59f29b Mon Sep 17 00:00:00 2001 From: Luara Kerlen dos Santos Rangel Date: Tue, 1 Oct 2024 11:14:56 -0300 Subject: [PATCH 06/24] feat: refactor components to remove code repetition --- react/components/AccordionFilterContainer.js | 24 -------------------- react/components/AccordionFilterGroup.js | 2 -- react/components/FacetCheckboxList.js | 2 -- react/components/FacetCheckboxListItem.js | 2 +- 4 files changed, 1 insertion(+), 29 deletions(-) diff --git a/react/components/AccordionFilterContainer.js b/react/components/AccordionFilterContainer.js index 90d263331..cfcf585a5 100644 --- a/react/components/AccordionFilterContainer.js +++ b/react/components/AccordionFilterContainer.js @@ -185,30 +185,6 @@ const AccordionFilterContainer = ({ /> ) - case 'DELIVERY': - return ( - - ) - default: return ( { const handles = useCssHandles(CSS_HANDLES) const filters = useSelectedFilters(facets) @@ -68,7 +67,6 @@ const AccordionFilterGroup = ({ navigationType={navigationType} truncatedFacetsFetched={truncatedFacetsFetched} setTruncatedFacetsFetched={setTruncatedFacetsFetched} - showActionButton={type === 'DELIVERY'} />
diff --git a/react/components/FacetCheckboxList.js b/react/components/FacetCheckboxList.js index ea216c4bc..183dbff0d 100644 --- a/react/components/FacetCheckboxList.js +++ b/react/components/FacetCheckboxList.js @@ -19,7 +19,6 @@ const FacetCheckboxList = ({ navigationType, truncatedFacetsFetched, setTruncatedFacetsFetched, - showActionButton, }) => { const { searchQuery } = useSearchPage() const { showFacetQuantity } = useContext(SettingsContext) @@ -80,7 +79,6 @@ const FacetCheckboxList = ({ searchQuery={searchQuery} showFacetQuantity={showFacetQuantity} key={facet.name} - showActionButton={showActionButton} /> ) })} diff --git a/react/components/FacetCheckboxListItem.js b/react/components/FacetCheckboxListItem.js index 90b5db724..a0940f801 100644 --- a/react/components/FacetCheckboxListItem.js +++ b/react/components/FacetCheckboxListItem.js @@ -16,12 +16,12 @@ const FacetCheckboxListItem = ({ facetTitle, searchQuery, onFilterCheck, - showActionButton, }) => { const { push } = usePixel() const { actionLabel, actionType, openDrawer, shouldDisable } = useShippingActions(facet) + const showActionButton = !!actionType const { name, value: slugifiedName } = facet From 4a8c3824ebe47279f79684e633ed8f0c46eb694a Mon Sep 17 00:00:00 2001 From: Luara Kerlen dos Santos Rangel Date: Tue, 1 Oct 2024 11:17:31 -0300 Subject: [PATCH 07/24] feat: refactor components to remove code repetition --- react/components/AvailableFilters.js | 25 ------------------------- react/components/FacetItem.js | 2 +- react/components/SearchFilter.js | 2 -- 3 files changed, 1 insertion(+), 28 deletions(-) diff --git a/react/components/AvailableFilters.js b/react/components/AvailableFilters.js index 1a47e821b..eda4ee871 100644 --- a/react/components/AvailableFilters.js +++ b/react/components/AvailableFilters.js @@ -60,31 +60,6 @@ const Filter = ({ /> ) - case 'DELIVERY': - return ( - - ) - default: return ( { const { push } = usePixel() const { actionLabel, actionType, openDrawer, shouldDisable } = useShippingActions(facet) + const showActionButton = !!actionType const { showFacetQuantity } = useContext(SettingsContext) diff --git a/react/components/SearchFilter.js b/react/components/SearchFilter.js index 07c684083..a8700203f 100644 --- a/react/components/SearchFilter.js +++ b/react/components/SearchFilter.js @@ -27,7 +27,6 @@ const SearchFilter = ({ closeOnOutsideClick, appliedFiltersOverview, showClearByFilter, - type = 'TEXT', }) => { const intl = useIntl() const sampleFacet = facets && facets.length > 0 ? facets[0] : null @@ -60,7 +59,6 @@ const SearchFilter = ({ facet={facet} preventRouteChange={preventRouteChange} navigateToFacet={navigateToFacet} - showActionButton={type === 'DELIVERY'} /> )} From 86c01d27bb14c937268d5a5dc703af1345cadbc3 Mon Sep 17 00:00:00 2001 From: Luara Kerlen dos Santos Rangel Date: Tue, 1 Oct 2024 11:17:54 -0300 Subject: [PATCH 08/24] feat: refactor components to improve code reuse and maintainability --- react/components/FacetCheckboxListItem.js | 46 +++++++++++++++-------- react/components/FacetItem.js | 27 +++++++------ 2 files changed, 46 insertions(+), 27 deletions(-) diff --git a/react/components/FacetCheckboxListItem.js b/react/components/FacetCheckboxListItem.js index a0940f801..cbdc96a06 100644 --- a/react/components/FacetCheckboxListItem.js +++ b/react/components/FacetCheckboxListItem.js @@ -25,6 +25,36 @@ const FacetCheckboxListItem = ({ const { name, value: slugifiedName } = facet + const facetLabel = useMemo(() => { + let labelElement = facet.name + + if (showFacetQuantity && !sampling) { + labelElement = (`${labelElement} (${facet.quantity})`) + } + + if (showActionButton) { + labelElement = ( +
+ {labelElement} + +
+ ) + } + + return labelElement + }, [ + showFacetQuantity, + sampling, + facet.name, + facet.quantity, + showActionButton, + actionLabel, + openDrawer, + ]) + return (
- {facet.name} - -
- ) : ( - facet.name - ) - } + label={facetLabel} name={name} onChange={() => { pushFilterManipulationPixelEvent({ diff --git a/react/components/FacetItem.js b/react/components/FacetItem.js index 054a928ee..b23a0d756 100644 --- a/react/components/FacetItem.js +++ b/react/components/FacetItem.js @@ -68,10 +68,12 @@ const FacetItem = ({ }, [facet.selected]) const facetLabel = useMemo(() => { - const labelElement = - showFacetQuantity && !sampling ? ( + let labelElement = facet.name + + if (showFacetQuantity && !sampling) { + labelElement = ( <> - {facet.name}{' '} + {labelElement}{' '} - ) : showActionButton && actionType ? ( -
- {facet.name} + ) + } + + if (showActionButton) { + labelElement = ( +
+ {labelElement}
- ) : ( - facet.name ) + } if (showTitle) { - return ( + labelElement = ( <> - {facetTitle}:{' '} - {labelElement} + {facetTitle}: {labelElement} ) } @@ -107,7 +111,6 @@ const FacetItem = ({ handles.productCount, handles.filterItemTitle, showActionButton, - actionType, actionLabel, openDrawer, showTitle, From 13fb4ec1736784aeea20820478a245d94555b251 Mon Sep 17 00:00:00 2001 From: Luara Kerlen dos Santos Rangel Date: Tue, 1 Oct 2024 11:59:27 -0300 Subject: [PATCH 09/24] feat: Adjust selected shipping filter options messages --- react/FilterNavigator.js | 17 +++++++++++++---- react/utils/getFilters.js | 10 +++++----- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/react/FilterNavigator.js b/react/FilterNavigator.js index 5094483bf..5a514ce16 100644 --- a/react/FilterNavigator.js +++ b/react/FilterNavigator.js @@ -8,7 +8,7 @@ import { useCssHandles, applyModifiers } from 'vtex.css-handles' import { useSearchPage } from 'vtex.search-page-context/SearchPageContext' // eslint-disable-next-line no-restricted-imports import { flatten } from 'ramda' -import { FormattedMessage } from 'react-intl' +import { FormattedMessage, useIntl } from 'react-intl' import { Button } from 'vtex.styleguide' import FilterSidebar from './components/FilterSidebar' @@ -23,7 +23,7 @@ import { import useFacetNavigation from './hooks/useFacetNavigation' import FilterNavigatorTitleTag from './components/FilterNavigatorTitleTag' import styles from './searchResult.css' -import { CATEGORIES_TITLE } from './utils/getFilters' +import { CATEGORIES_TITLE, SHIPPING_OPTIONS } from './utils/getFilters' import { newFacetPathName } from './utils/slug' import { FACETS_RENDER_THRESHOLD } from './constants/filterConstants' @@ -102,6 +102,7 @@ const FilterNavigator = ({ priceRangeLayout = 'slider', showQuantityBadgeOnMobile = false, }) => { + const intl = useIntl() const { isMobile } = useDevice() const handles = useCssHandles(CSS_HANDLES) const [truncatedFacetsFetched, setTruncatedFacetsFetched] = useState(false) @@ -159,9 +160,17 @@ const FilterNavigator = ({ } }, [filters, filtersFetchMore, truncatedFacetsFetched, loading]) + const shipping = deliveries.map((delivery) => ({ + ...delivery, + facets: delivery.facets.map((facet) => ({ + ...facet, + name: intl.formatMessage({ id: SHIPPING_OPTIONS[facet.name] }) , + })) + })) + const selectedFilters = useMemo(() => { const options = [ - ...specificationFilters.concat(deliveries).map(filter => { + ...specificationFilters.concat(shipping).map(filter => { return filter.facets.map(facet => { return { ...newNamedFacet({ ...facet, title: filter.name }), @@ -174,7 +183,7 @@ const FilterNavigator = ({ ] return flatten(options) - }, [brands, priceRanges, specificationFilters, deliveries]).filter( + }, [brands, priceRanges, specificationFilters, shipping]).filter( facet => facet.selected ) diff --git a/react/utils/getFilters.js b/react/utils/getFilters.js index 57af5513b..17cf59bc9 100644 --- a/react/utils/getFilters.js +++ b/react/utils/getFilters.js @@ -6,17 +6,17 @@ export const CATEGORIES_TITLE = 'store/search.filter.title.categories' export const BRANDS_TITLE = 'store/search.filter.title.brands' export const PRICE_RANGES_TITLE = 'store/search.filter.title.price-ranges' -const BRANDS_TYPE = 'Brands' -const PRICE_RANGES_TYPE = 'PriceRanges' -const SPECIFICATION_FILTERS_TYPE = 'SpecificationFilters' - -const SHIPPING_OPTIONS = { +export const SHIPPING_OPTIONS = { delivery: 'store/search.filter.shipping.name.delivery', 'pickup-in-point': 'store/search.filter.shipping.name.pickup-in-point', 'pickup-nearby': 'store/search.filter.shipping.name.pickup-nearby', 'pickup-all': 'store/search.filter.shipping.name.pickup-all', } +const BRANDS_TYPE = 'Brands' +const PRICE_RANGES_TYPE = 'PriceRanges' +const SPECIFICATION_FILTERS_TYPE = 'SpecificationFilters' + const getFilters = ({ specificationFilters = [], priceRanges = [], From a961f2bc115a2c53aff608b23641acf893d21e40 Mon Sep 17 00:00:00 2001 From: Luara Kerlen dos Santos Rangel Date: Thu, 3 Oct 2024 11:50:02 -0300 Subject: [PATCH 10/24] refactor: adjust FaceItem component to improve User Interface --- react/components/FacetItem.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/react/components/FacetItem.js b/react/components/FacetItem.js index b23a0d756..a3494e985 100644 --- a/react/components/FacetItem.js +++ b/react/components/FacetItem.js @@ -87,7 +87,7 @@ const FacetItem = ({ if (showActionButton) { labelElement = (
- {labelElement} +
{labelElement}
) @@ -120,7 +120,7 @@ const FacetItem = ({ return (
From 075f079590f2c481183bbedb78844c60f3c25a81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Ferr=C3=A3o?= Date: Thu, 3 Oct 2024 15:56:21 -0300 Subject: [PATCH 11/24] feat: add facets default to the shipping filter --- react/SearchResultFlexible.js | 2 + react/hooks/useShouldDisableFacet.js | 6 ++- react/utils/getFilters.js | 74 +++++++++++++++++++++++++++- 3 files changed, 80 insertions(+), 2 deletions(-) diff --git a/react/SearchResultFlexible.js b/react/SearchResultFlexible.js index f4f5e87f2..84b3dca78 100644 --- a/react/SearchResultFlexible.js +++ b/react/SearchResultFlexible.js @@ -50,6 +50,7 @@ const SearchResultFlexible = ({ preventRouteChange = false, showFacetQuantity = false, showFacetTitle = false, + showShippingFacet = false, // Below are set by SearchContext searchQuery, maxItemsPerPage, @@ -94,6 +95,7 @@ const SearchResultFlexible = ({ brandsQuantity, hiddenFacets, deliveries, + showShippingFacet }), [ brands, diff --git a/react/hooks/useShouldDisableFacet.js b/react/hooks/useShouldDisableFacet.js index 0ab25774a..e31ef9738 100644 --- a/react/hooks/useShouldDisableFacet.js +++ b/react/hooks/useShouldDisableFacet.js @@ -8,7 +8,7 @@ export default function useShouldDisableFacet( isPickupSet ) { const { map } = useSearchPage() - + if ( (facet.value === 'delivery' || facet.value === 'pickup-nearby' || @@ -22,6 +22,10 @@ export default function useShouldDisableFacet( return true } + if(facet.quantity === 0) { + return true + } + if (!facet.selected || !map) { return false } diff --git a/react/utils/getFilters.js b/react/utils/getFilters.js index 17cf59bc9..7b4dbbbc6 100644 --- a/react/utils/getFilters.js +++ b/react/utils/getFilters.js @@ -16,6 +16,50 @@ export const SHIPPING_OPTIONS = { const BRANDS_TYPE = 'Brands' const PRICE_RANGES_TYPE = 'PriceRanges' const SPECIFICATION_FILTERS_TYPE = 'SpecificationFilters' +const SHIPPING_KEY = 'shipping' + +const facetDefault = { + id: null, + quantity: 0, + name: null, + key: SHIPPING_KEY, + selected: false, + value: null, + link: null, + linkEncoded: null, + href: null, + range: null, + children: null, + map: SHIPPING_KEY +} +const shippingFacetDefault = { + name: SHIPPING_KEY, + type: 'DELIVERY', + hidden: false, + quantity: 0, + facets: [ + { + ...facetDefault, + name: 'delivery', + value: 'delivery' + }, + { + ...facetDefault, + name: 'pickup-in-point', + value: 'pickup-in-point' + }, + { + ...facetDefault, + name: 'pickup-nearby', + value: 'pickup-nearby' + }, + { + ...facetDefault, + name: 'pickup-all', + value: 'pickup-all' + } + ] +} const getFilters = ({ specificationFilters = [], @@ -24,6 +68,7 @@ const getFilters = ({ deliveries = [], brandsQuantity = 0, hiddenFacets = {}, + showShippingFacet = false }) => { const intl = useIntl() @@ -54,9 +99,11 @@ const getFilters = ({ key: spec.facets?.[0].key, })) : [] + + const deliveriesFormatted = getFormattedDeliveries(shipping, showShippingFacet) return [ - ...shipping, + ...deliveriesFormatted, ...mappedSpecificationFilters, !hiddenFacets.brands && !isEmpty(brands) && { @@ -74,4 +121,29 @@ const getFilters = ({ ].filter(Boolean) } +const getFormattedDeliveries = (deliveries, showShippingFacet) => { + if(!showShippingFacet){ + return deliveries.filter((d) => d.name !== SHIPPING_KEY) + } + + const shippingFacet = deliveries.find((d) => d.name === SHIPPING_KEY ) + if(!shippingFacet) { + return [ + ...deliveries, + shippingFacetDefault + ] + } + + const facetsNotIncluded = shippingFacetDefault.facets.filter((facet) => + shippingFacet.facets.every((f) => f.value !== facet.value) + ) + + shippingFacet.facets = [ + ...shippingFacet.facets, + ...facetsNotIncluded + ] + + return deliveries.map((facet) => facet.name === SHIPPING_KEY ? shippingFacet : facet) +} + export default getFilters From 3a03dc601ae8d55f9257ea066530adbe34a224df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Ferr=C3=A3o?= Date: Fri, 4 Oct 2024 12:27:55 -0300 Subject: [PATCH 12/24] feat: update default facets to use formatMessage --- react/components/FacetCheckboxListItem.js | 14 ++- react/utils/getFilters.js | 105 +++++++++------------- 2 files changed, 48 insertions(+), 71 deletions(-) diff --git a/react/components/FacetCheckboxListItem.js b/react/components/FacetCheckboxListItem.js index cbdc96a06..c5d101a26 100644 --- a/react/components/FacetCheckboxListItem.js +++ b/react/components/FacetCheckboxListItem.js @@ -1,5 +1,5 @@ import classNames from 'classnames' -import React from 'react' +import React, { useMemo } from 'react' import { applyModifiers } from 'vtex.css-handles' import { Checkbox } from 'vtex.styleguide' import { usePixel } from 'vtex.pixel-manager' @@ -21,6 +21,7 @@ const FacetCheckboxListItem = ({ const { actionLabel, actionType, openDrawer, shouldDisable } = useShippingActions(facet) + const showActionButton = !!actionType const { name, value: slugifiedName } = facet @@ -29,20 +30,17 @@ const FacetCheckboxListItem = ({ let labelElement = facet.name if (showFacetQuantity && !sampling) { - labelElement = (`${labelElement} (${facet.quantity})`) + labelElement = `${labelElement} (${facet.quantity})` } - + if (showActionButton) { labelElement = (
{labelElement} - +
) - } + } return labelElement }, [ diff --git a/react/utils/getFilters.js b/react/utils/getFilters.js index 7b4dbbbc6..d52a3aa88 100644 --- a/react/utils/getFilters.js +++ b/react/utils/getFilters.js @@ -18,47 +18,20 @@ const PRICE_RANGES_TYPE = 'PriceRanges' const SPECIFICATION_FILTERS_TYPE = 'SpecificationFilters' const SHIPPING_KEY = 'shipping' -const facetDefault = { - id: null, - quantity: 0, - name: null, - key: SHIPPING_KEY, - selected: false, - value: null, - link: null, - linkEncoded: null, - href: null, - range: null, - children: null, - map: SHIPPING_KEY -} const shippingFacetDefault = { name: SHIPPING_KEY, type: 'DELIVERY', hidden: false, quantity: 0, - facets: [ - { - ...facetDefault, - name: 'delivery', - value: 'delivery' - }, - { - ...facetDefault, - name: 'pickup-in-point', - value: 'pickup-in-point' - }, - { - ...facetDefault, - name: 'pickup-nearby', - value: 'pickup-nearby' - }, - { - ...facetDefault, - name: 'pickup-all', - value: 'pickup-all' - } - ] + facets: Object.keys(SHIPPING_OPTIONS).map(option => ({ + id: null, + quantity: 0, + name: option, + key: SHIPPING_KEY, + selected: false, + map: SHIPPING_KEY, + value: option, + })), } const getFilters = ({ @@ -68,19 +41,10 @@ const getFilters = ({ deliveries = [], brandsQuantity = 0, hiddenFacets = {}, - showShippingFacet = false + showShippingFacet = false, }) => { const intl = useIntl() - const shipping = deliveries.map((delivery) => ({ - ...delivery, - title: SHIPPING_TITLE, - facets: delivery.facets.map((facet) => ({ - ...facet, - name: intl.formatMessage({ id: SHIPPING_OPTIONS[facet.name] }) , - })) - })) - const hiddenFacetsNames = ( path(['specificationFilters', 'hiddenFilters'], hiddenFacets) || [] ).map(filter => filter.name) @@ -99,8 +63,26 @@ const getFilters = ({ key: spec.facets?.[0].key, })) : [] - - const deliveriesFormatted = getFormattedDeliveries(shipping, showShippingFacet) + + const deliveriesFormatted = getFormattedDeliveries( + deliveries, + showShippingFacet + ) + + const shippingIndex = deliveriesFormatted.findIndex( + d => d.name === SHIPPING_KEY + ) + + if (shippingIndex !== -1) { + deliveriesFormatted[shippingIndex] = { + ...deliveriesFormatted[shippingIndex], + title: SHIPPING_TITLE, + facets: deliveriesFormatted[shippingIndex].facets.map(facet => ({ + ...facet, + name: intl.formatMessage({ id: SHIPPING_OPTIONS[facet.name] }), + })), + } + } return [ ...deliveriesFormatted, @@ -122,28 +104,25 @@ const getFilters = ({ } const getFormattedDeliveries = (deliveries, showShippingFacet) => { - if(!showShippingFacet){ - return deliveries.filter((d) => d.name !== SHIPPING_KEY) + if (!showShippingFacet) { + return deliveries.filter(d => d.name !== SHIPPING_KEY) } - const shippingFacet = deliveries.find((d) => d.name === SHIPPING_KEY ) - if(!shippingFacet) { - return [ - ...deliveries, - shippingFacetDefault - ] + const shippingFacet = deliveries.find(d => d.name === SHIPPING_KEY) + + if (!shippingFacet) { + return [...deliveries, shippingFacetDefault] } - const facetsNotIncluded = shippingFacetDefault.facets.filter((facet) => - shippingFacet.facets.every((f) => f.value !== facet.value) + const facetsNotIncluded = shippingFacetDefault.facets.filter(facet => + shippingFacet.facets.every(f => f.value !== facet.value) ) - shippingFacet.facets = [ - ...shippingFacet.facets, - ...facetsNotIncluded - ] + shippingFacet.facets = [...shippingFacet.facets, ...facetsNotIncluded] - return deliveries.map((facet) => facet.name === SHIPPING_KEY ? shippingFacet : facet) + return deliveries.map(facet => + facet.name === SHIPPING_KEY ? shippingFacet : facet + ) } export default getFilters From ae966bf5c433affd77d4ac41ed30f1fde889bba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Ferr=C3=A3o?= Date: Wed, 9 Oct 2024 18:28:44 -0300 Subject: [PATCH 13/24] fix: move default facets to compatiblityLayer --- react/utils/compatibilityLayer.js | 41 +++++++++++++++- react/utils/getFilters.js | 82 +++++++++---------------------- 2 files changed, 62 insertions(+), 61 deletions(-) diff --git a/react/utils/compatibilityLayer.js b/react/utils/compatibilityLayer.js index 00daff44e..2e880e9cf 100644 --- a/react/utils/compatibilityLayer.js +++ b/react/utils/compatibilityLayer.js @@ -2,6 +2,23 @@ import { groupBy, pathOr, zipObj } from 'ramda' import { PATH_SEPARATOR, MAP_VALUES_SEP } from '../constants' +import { SHIPPING_OPTIONS, SHIPPING_KEY } from './getFilters' + +const shippingFacetDefault = { + name: SHIPPING_KEY, + type: 'DELIVERY', + hidden: false, + quantity: 0, + facets: Object.keys(SHIPPING_OPTIONS).map(option => ({ + id: null, + quantity: 0, + name: option, + key: SHIPPING_KEY, + selected: false, + map: SHIPPING_KEY, + value: option, + })), +} export const getMainSearches = (query, map) => { const querySegments = (query && query.split(PATH_SEPARATOR)) || [] @@ -79,7 +96,7 @@ export const detachFiltersByType = facets => { groupedFilters.TEXT || [] ) - const deliveries = groupedFilters.DELIVERY || [] + const deliveries = getFormattedDeliveries(groupedFilters.DELIVERY || [], true) const categoriesTrees = pathOr( [], @@ -119,3 +136,25 @@ export const buildQueryArgsFromSelectedFacets = selectedFacets => { { query: '', map: '' } ) } + +const getFormattedDeliveries = (deliveries, showShippingFacet) => { + if (!showShippingFacet) { + return deliveries.filter(d => d.name !== SHIPPING_KEY) + } + + const shippingFacet = deliveries.find(d => d.name === SHIPPING_KEY) + + if (!shippingFacet) { + return [...deliveries, shippingFacetDefault] + } + + const facetsNotIncluded = shippingFacetDefault.facets.filter(facet => + shippingFacet.facets.every(f => f.value !== facet.value) + ) + + shippingFacet.facets = [...shippingFacet.facets, ...facetsNotIncluded] + + return deliveries.map(facet => + facet.name === SHIPPING_KEY ? shippingFacet : facet + ) +} diff --git a/react/utils/getFilters.js b/react/utils/getFilters.js index d52a3aa88..fa1b8fd4e 100644 --- a/react/utils/getFilters.js +++ b/react/utils/getFilters.js @@ -13,26 +13,11 @@ export const SHIPPING_OPTIONS = { 'pickup-all': 'store/search.filter.shipping.name.pickup-all', } +export const SHIPPING_KEY = 'shipping' + const BRANDS_TYPE = 'Brands' const PRICE_RANGES_TYPE = 'PriceRanges' const SPECIFICATION_FILTERS_TYPE = 'SpecificationFilters' -const SHIPPING_KEY = 'shipping' - -const shippingFacetDefault = { - name: SHIPPING_KEY, - type: 'DELIVERY', - hidden: false, - quantity: 0, - facets: Object.keys(SHIPPING_OPTIONS).map(option => ({ - id: null, - quantity: 0, - name: option, - key: SHIPPING_KEY, - selected: false, - map: SHIPPING_KEY, - value: option, - })), -} const getFilters = ({ specificationFilters = [], @@ -41,10 +26,29 @@ const getFilters = ({ deliveries = [], brandsQuantity = 0, hiddenFacets = {}, - showShippingFacet = false, + // showShippingFacet = false, }) => { const intl = useIntl() + let deliveriesFormatted = deliveries + + const shipping = deliveries.find(d => d.name === SHIPPING_KEY) + + if (shipping) { + const shippingFacet = { + ...shipping, + title: SHIPPING_TITLE, + facets: shipping.facets.map(facet => ({ + ...facet, + name: intl.formatMessage({ id: SHIPPING_OPTIONS[facet.name] }), + })), + } + + deliveriesFormatted = deliveries.map(facet => + facet.name === SHIPPING_KEY ? shippingFacet : facet + ) + } + const hiddenFacetsNames = ( path(['specificationFilters', 'hiddenFilters'], hiddenFacets) || [] ).map(filter => filter.name) @@ -64,26 +68,6 @@ const getFilters = ({ })) : [] - const deliveriesFormatted = getFormattedDeliveries( - deliveries, - showShippingFacet - ) - - const shippingIndex = deliveriesFormatted.findIndex( - d => d.name === SHIPPING_KEY - ) - - if (shippingIndex !== -1) { - deliveriesFormatted[shippingIndex] = { - ...deliveriesFormatted[shippingIndex], - title: SHIPPING_TITLE, - facets: deliveriesFormatted[shippingIndex].facets.map(facet => ({ - ...facet, - name: intl.formatMessage({ id: SHIPPING_OPTIONS[facet.name] }), - })), - } - } - return [ ...deliveriesFormatted, ...mappedSpecificationFilters, @@ -103,26 +87,4 @@ const getFilters = ({ ].filter(Boolean) } -const getFormattedDeliveries = (deliveries, showShippingFacet) => { - if (!showShippingFacet) { - return deliveries.filter(d => d.name !== SHIPPING_KEY) - } - - const shippingFacet = deliveries.find(d => d.name === SHIPPING_KEY) - - if (!shippingFacet) { - return [...deliveries, shippingFacetDefault] - } - - const facetsNotIncluded = shippingFacetDefault.facets.filter(facet => - shippingFacet.facets.every(f => f.value !== facet.value) - ) - - shippingFacet.facets = [...shippingFacet.facets, ...facetsNotIncluded] - - return deliveries.map(facet => - facet.name === SHIPPING_KEY ? shippingFacet : facet - ) -} - export default getFilters From 9a09adcf6d9c8a2aea8d380c97449a615c547bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Ferr=C3=A3o?= Date: Thu, 10 Oct 2024 12:10:11 -0300 Subject: [PATCH 14/24] Add contidion to remove Shipping facet --- react/SearchResultFlexible.js | 3 ++- react/utils/compatibilityLayer.js | 8 ++------ react/utils/getFilters.js | 8 +++++++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/react/SearchResultFlexible.js b/react/SearchResultFlexible.js index 84b3dca78..49b6526bc 100644 --- a/react/SearchResultFlexible.js +++ b/react/SearchResultFlexible.js @@ -95,7 +95,7 @@ const SearchResultFlexible = ({ brandsQuantity, hiddenFacets, deliveries, - showShippingFacet + showShippingFacet, }), [ brands, @@ -104,6 +104,7 @@ const SearchResultFlexible = ({ specificationFilters, brandsQuantity, deliveries, + showShippingFacet, ] ) diff --git a/react/utils/compatibilityLayer.js b/react/utils/compatibilityLayer.js index 2e880e9cf..f176da6c4 100644 --- a/react/utils/compatibilityLayer.js +++ b/react/utils/compatibilityLayer.js @@ -96,7 +96,7 @@ export const detachFiltersByType = facets => { groupedFilters.TEXT || [] ) - const deliveries = getFormattedDeliveries(groupedFilters.DELIVERY || [], true) + const deliveries = getFormattedDeliveries(groupedFilters.DELIVERY || []) const categoriesTrees = pathOr( [], @@ -137,11 +137,7 @@ export const buildQueryArgsFromSelectedFacets = selectedFacets => { ) } -const getFormattedDeliveries = (deliveries, showShippingFacet) => { - if (!showShippingFacet) { - return deliveries.filter(d => d.name !== SHIPPING_KEY) - } - +const getFormattedDeliveries = deliveries => { const shippingFacet = deliveries.find(d => d.name === SHIPPING_KEY) if (!shippingFacet) { diff --git a/react/utils/getFilters.js b/react/utils/getFilters.js index fa1b8fd4e..eab267f7a 100644 --- a/react/utils/getFilters.js +++ b/react/utils/getFilters.js @@ -26,7 +26,7 @@ const getFilters = ({ deliveries = [], brandsQuantity = 0, hiddenFacets = {}, - // showShippingFacet = false, + showShippingFacet = false, }) => { const intl = useIntl() @@ -49,6 +49,12 @@ const getFilters = ({ ) } + if (!showShippingFacet) { + deliveriesFormatted = deliveriesFormatted.filter( + d => d.name !== SHIPPING_KEY + ) + } + const hiddenFacetsNames = ( path(['specificationFilters', 'hiddenFilters'], hiddenFacets) || [] ).map(filter => filter.name) From 4d0231381ef6c8d1af1c3b5baebd8d48ef352bbe Mon Sep 17 00:00:00 2001 From: kaio-donadelli Date: Fri, 11 Oct 2024 17:20:34 -0300 Subject: [PATCH 15/24] Updated English, Spanish and Portuguese translations. --- CHANGELOG.md | 4 ++++ messages/es.json | 5 +++++ messages/pt.json | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24310e956..2984bc409 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Fixed + +- Updated English, Spanish and Portuguese translations. + ## [3.134.1] - 2024-11-07 ### Fixed diff --git a/messages/es.json b/messages/es.json index b1e9c69bd..77af63e1f 100644 --- a/messages/es.json +++ b/messages/es.json @@ -66,6 +66,11 @@ "store/search.filter.title.brands": "Marcas", "store/search.filter.title.price-ranges": "Rangos de precio", "store/search.text": "Mostrando {from}-{to} de {recordsFiltered} resultados", + "store/search.filter.title.shipping": "Envío", + "store/search.filter.shipping.name.delivery": "Entregar a", + "store/search.filter.shipping.name.pickup-in-point": "Recogida en", + "store/search.filter.shipping.name.pickup-nearby": "Recogida cerca de", + "store/search.filter.shipping.name.pickup-all": "Recogida", "store/search.selected-filters": "Filtrado por:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {producto} other {productos}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {producto} other {productos}}", diff --git a/messages/pt.json b/messages/pt.json index 36a67d303..dd8a1524f 100644 --- a/messages/pt.json +++ b/messages/pt.json @@ -66,6 +66,11 @@ "store/search.filter.title.brands": "Marcas", "store/search.filter.title.price-ranges": "Faixas de preço", "store/search.text": "Exibindo {from}–{to} de {recordsFiltered} resultados", + "store/search.filter.title.shipping": "Entrega", + "store/search.filter.shipping.name.delivery": "Entregar em", + "store/search.filter.shipping.name.pickup-in-point": "Retirada em", + "store/search.filter.shipping.name.pickup-nearby": "Retirada perto de", + "store/search.filter.shipping.name.pickup-all": "Retirada", "store/search.selected-filters": "Filtrado por:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {Produto} other {Produtos}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {Produto} other {Produtos}}", From 0371ef0cbe1e38c18d1c58302bca0e109c231421 Mon Sep 17 00:00:00 2001 From: kaio-donadelli Date: Fri, 18 Oct 2024 19:19:01 -0300 Subject: [PATCH 16/24] Fixed Portuguese and Spanish translations. Added new strings for remanining languages. --- CHANGELOG.md | 1 + messages/ar.json | 6 ++- messages/bg.json | 5 +++ messages/ca.json | 5 +++ messages/da.json | 5 +++ messages/de.json | 5 +++ messages/el.json | 5 +++ messages/es.json | 2 +- messages/fi.json | 5 +++ messages/fr.json | 5 +++ messages/hu.json | 6 ++- messages/id.json | 5 +++ messages/it.json | 5 +++ messages/ja.json | 111 +++++++++++++++++++++++++++++++++++++++++++++++ messages/ko.json | 5 +++ messages/nl.json | 5 +++ messages/nn.json | 5 +++ messages/no.json | 5 +++ messages/pl.json | 5 +++ messages/pt.json | 2 +- messages/ro.json | 5 +++ messages/ru.json | 5 +++ messages/sk.json | 5 +++ messages/sl.json | 5 +++ messages/sv.json | 5 +++ messages/th.json | 5 +++ messages/uk.json | 5 +++ 27 files changed, 229 insertions(+), 4 deletions(-) create mode 100644 messages/ja.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 2984bc409..f25d3ef54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - Updated English, Spanish and Portuguese translations. +- Added new strings to remaining languages. ## [3.134.1] - 2024-11-07 diff --git a/messages/ar.json b/messages/ar.json index b9ad437cb..ce8be7d66 100644 --- a/messages/ar.json +++ b/messages/ar.json @@ -66,6 +66,11 @@ "store/search.filter.title.brands": "العلامات التجارية", "store/search.filter.title.price-ranges": "نطاقات السعر", "store/search.text": "عرض {from}-{to} من {recordsFiltered} نتائج", + "store/search.filter.title.shipping": "الشحن", + "store/search.filter.shipping.name.delivery": "توصيل الى", + "store/search.filter.shipping.name.pickup-in-point": "الاستلام في", + "store/search.filter.shipping.name.pickup-nearby": "استلام بقرب", + "store/search.filter.shipping.name.pickup-all": "الإستلام", "store/search.selected-filters": "تصفية حسب:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {منتج} other {منتجات}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {منتج} other {منتجات}}", @@ -104,4 +109,3 @@ "admin/editor.search-result.fetch-button.button-behavior.button": "الزر", "admin/editor.search-result.fetch-button.button-behavior.link-to-page": "الرابط إلى الصفحة - تحسين SEO، قد يغير تصميم الزر" } - diff --git a/messages/bg.json b/messages/bg.json index 8c6d755d7..2041e8844 100644 --- a/messages/bg.json +++ b/messages/bg.json @@ -66,6 +66,11 @@ "store/search.filter.title.brands": "Брандове", "store/search.filter.title.price-ranges": "Ценови диапазони", "store/search.text": "Показване на {from}–{to} от {recordsFiltered} резултата", + "store/search.filter.title.shipping": "Доставка", + "store/search.filter.shipping.name.delivery": "Доставка до", + "store/search.filter.shipping.name.pickup-in-point": "Вземане от", + "store/search.filter.shipping.name.pickup-nearby": "Вземане наблизо", + "store/search.filter.shipping.name.pickup-all": "Вземане", "store/search.selected-filters": "Филтрирани по:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {продукт} other {продукта}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {продукт} other {продукта}}", diff --git a/messages/ca.json b/messages/ca.json index d348327ce..36a63ba02 100644 --- a/messages/ca.json +++ b/messages/ca.json @@ -66,6 +66,11 @@ "store/search.filter.title.brands": "Marques", "store/search.filter.title.price-ranges": "Intervals de preus", "store/search.text": "S'estan mostrant de {from} a {to} de {recordsFiltered} resultats", + "store/search.filter.title.shipping": "Enviament", + "store/search.filter.shipping.name.delivery": "Lliura a", + "store/search.filter.shipping.name.pickup-in-point": "Recollida a", + "store/search.filter.shipping.name.pickup-nearby": "Recollida a prop", + "store/search.filter.shipping.name.pickup-all": "Recollida", "store/search.selected-filters": "Filtrat per:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {product} other {products}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {product} other {products}}", diff --git a/messages/da.json b/messages/da.json index ea6d6f7e7..27651d53a 100644 --- a/messages/da.json +++ b/messages/da.json @@ -65,6 +65,11 @@ "store/search.filter.placeholder": "Søg efter {filterName}", "store/search.filter.title.brands": "Brands", "store/search.filter.title.price-ranges": "Prisintervaller", + "store/search.filter.title.shipping": "Forsendelse", + "store/search.filter.shipping.name.delivery": "Lever til", + "store/search.filter.shipping.name.pickup-in-point": "Afhentning ved", + "store/search.filter.shipping.name.pickup-nearby": "Afhentning i nærheden", + "store/search.filter.shipping.name.pickup-all": "Afhentning", "store/search.text": "Viser {from}-{to} fra {recordsFiltered} optegnelser", "store/search.selected-filters": "Filtreret efter:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {produkt} other {produkter}}", diff --git a/messages/de.json b/messages/de.json index c50ffa9d0..fb58761f3 100644 --- a/messages/de.json +++ b/messages/de.json @@ -66,6 +66,11 @@ "store/search.filter.title.brands": "Marken", "store/search.filter.title.price-ranges": "Preisspannen", "store/search.text": "Anzeigen {from}-{to} aus {recordsFiltered}-Ergebnissen", + "store/search.filter.title.shipping": "Versand", + "store/search.filter.shipping.name.delivery": "Liefern an", + "store/search.filter.shipping.name.pickup-in-point": "Abholung bei", + "store/search.filter.shipping.name.pickup-nearby": "Abholung in der Nähe", + "store/search.filter.shipping.name.pickup-all": "Abholung", "store/search.selected-filters": "Gefiltert nach:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {Produkt} other {Produkte}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {Produkt} other {Produkte}}", diff --git a/messages/el.json b/messages/el.json index 60fdcf95e..5114f3a03 100644 --- a/messages/el.json +++ b/messages/el.json @@ -66,6 +66,11 @@ "store/search.filter.title.brands": "Εμπορικές επωνυμίες", "store/search.filter.title.price-ranges": "Εύρος τιμών", "store/search.text": "Γίνεται εμφάνιση {from}–{to} από {recordsFiltered} αποτελέσματα", + "store/search.filter.title.shipping": "Μεταφορά", + "store/search.filter.shipping.name.delivery": "Παράδοση προς", + "store/search.filter.shipping.name.pickup-in-point": "Παραλαβή σε", + "store/search.filter.shipping.name.pickup-nearby": "Παραλαβή πλησίον", + "store/search.filter.shipping.name.pickup-all": "Παραλαβή", "store/search.selected-filters": "Φιλτράρισμα ανά:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {product} other {products}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {product} other {products}}", diff --git a/messages/es.json b/messages/es.json index 77af63e1f..0174e02b1 100644 --- a/messages/es.json +++ b/messages/es.json @@ -69,7 +69,7 @@ "store/search.filter.title.shipping": "Envío", "store/search.filter.shipping.name.delivery": "Entregar a", "store/search.filter.shipping.name.pickup-in-point": "Recogida en", - "store/search.filter.shipping.name.pickup-nearby": "Recogida cerca de", + "store/search.filter.shipping.name.pickup-nearby": "Recogida en tiendas cercanas", "store/search.filter.shipping.name.pickup-all": "Recogida", "store/search.selected-filters": "Filtrado por:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {producto} other {productos}}", diff --git a/messages/fi.json b/messages/fi.json index c38c84499..9df484f48 100644 --- a/messages/fi.json +++ b/messages/fi.json @@ -66,6 +66,11 @@ "store/search.filter.title.brands": "Brändit", "store/search.filter.title.price-ranges": "Hintaluokat", "store/search.text": "Näytetään {from}–{to} {recordsFiltered} tuloksesta", + "store/search.filter.title.shipping": "Toimitus", + "store/search.filter.shipping.name.delivery": "Toimitus osoitteeseen", + "store/search.filter.shipping.name.pickup-in-point": "Nouto myymälästä", + "store/search.filter.shipping.name.pickup-nearby": "Nouto läheltä", + "store/search.filter.shipping.name.pickup-all": "Nouto", "store/search.selected-filters": "Suodatus:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {tuote} other {tuotetta}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {tuote} other {tuotetta}}", diff --git a/messages/fr.json b/messages/fr.json index a97e7f0a6..55b1d51d2 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -66,6 +66,11 @@ "store/search.filter.title.brands": "Marques", "store/search.filter.title.price-ranges": "Gammes de prix", "store/search.text": "Afficher les {from}-{to} des {recordsFiltered} résultats", + "store/search.filter.title.shipping": "Expédition", + "store/search.filter.shipping.name.delivery": "Livrer à", + "store/search.filter.shipping.name.pickup-in-point": "Retrait à", + "store/search.filter.shipping.name.pickup-nearby": "Retrait à proximité", + "store/search.filter.shipping.name.pickup-all": "Point de retrait", "store/search.selected-filters": "Filtré par :", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {produit} other {produits}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {produit} other {produits}}", diff --git a/messages/hu.json b/messages/hu.json index 59eeaec20..fb2537649 100644 --- a/messages/hu.json +++ b/messages/hu.json @@ -66,6 +66,11 @@ "store/search.filter.title.brands": "Márkák", "store/search.filter.title.price-ranges": "Ártartományok", "store/search.text": "{from}-{to} eredmény megjelenítése a(z) {recordsFiltered} eredményből", + "store/search.filter.title.shipping": "Shipping", + "store/search.filter.shipping.name.delivery": "Deliver to", + "store/search.filter.shipping.name.pickup-in-point": "Pickup at", + "store/search.filter.shipping.name.pickup-nearby": "Pickup nearby", + "store/search.filter.shipping.name.pickup-all": "Pickup", "store/search.selected-filters": "Szűrés:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {termék} other {termék}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {termék} other {termék}}", @@ -104,4 +109,3 @@ "admin/editor.search-result.fetch-button.button-behavior.button": "Gomb", "admin/editor.search-result.fetch-button.button-behavior.link-to-page": "Link az oldalra – Javítja a SEO-t, megváltoztathatja a gomb megjelenését" } - \ No newline at end of file diff --git a/messages/id.json b/messages/id.json index 5dd73b883..ce3753696 100644 --- a/messages/id.json +++ b/messages/id.json @@ -66,6 +66,11 @@ "store/search.filter.title.brands": "Merek", "store/search.filter.title.price-ranges": "Rentang harga", "store/search.text": "Menampilka {from}–{to} dari {recordsFiltered} hasil", + "store/search.filter.title.shipping": "Pengiriman", + "store/search.filter.shipping.name.delivery": "Kirim ke", + "store/search.filter.shipping.name.pickup-in-point": "Ambil di", + "store/search.filter.shipping.name.pickup-nearby": "Pengambilan terdekat", + "store/search.filter.shipping.name.pickup-all": "Pengambilan", "store/search.selected-filters": "Difilter menurut:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, other {produk}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, other {produk}}", diff --git a/messages/it.json b/messages/it.json index 52fd0731a..5266f2d06 100644 --- a/messages/it.json +++ b/messages/it.json @@ -66,6 +66,11 @@ "store/search.filter.title.brands": "Brand", "store/search.filter.title.price-ranges": "Fasce di prezzo", "store/search.text": "Mostra {from}–{to} di {recordsFiltered} risultati", + "store/search.filter.title.shipping": "Spedizione", + "store/search.filter.shipping.name.delivery": "Consegna a", + "store/search.filter.shipping.name.pickup-in-point": "Ritiro presso", + "store/search.filter.shipping.name.pickup-nearby": "Ritiro nelle vicinanze", + "store/search.filter.shipping.name.pickup-all": "Ritiro", "store/search.selected-filters": "Filtrato per:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {prodotto} other {prodotti}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {prodotto} other {prodotti}}", diff --git a/messages/ja.json b/messages/ja.json new file mode 100644 index 000000000..e367cc519 --- /dev/null +++ b/messages/ja.json @@ -0,0 +1,111 @@ +{ + "admin/editor.search-result.title": "検索結果", + "admin/editor.search-result.query": "カスタムクエリ", + "admin/editor.search-result.query.description": "コンテキストがない場合に作成されるクエリ", + "admin/editor.search-result.query.enableCustomQuery": "カスタムクエリを有効にする", + "admin/editor.search-result.query.maxItemsPerPage": "検索結果1ページあたりに表示される最大項目数", + "admin/editor.search-result.query.hideUnavailableItems": "利用できない項目を非表示にする", + "admin/editor.search-result.query.skusFilter": "SKU フィルタ", + "admin/editor.search-result.query.skusFilter.description": "最初に利用できるフィルタを設定しておくと、クエリが早くなります!", + "admin/editor.search-result.query.skusFilter.none": "なし", + "admin/editor.search-result.query.skusFilter.first-available": "最初に利用できる", + "admin/editor.search-result.query.skusFilter.all-available": "すべて利用できる", + "admin/editor.search-result.query.simulationBehavior": "シミュレーション動作", + "admin/editor.search-result.query.simulationBehavior.description": "クエリを高速化したい場合、スキップに設定してください。ただし、SKU の価格と在庫は最新のものに更新されないことがあります", + "admin/editor.search-result.query.simulationBehavior.default": "デフォルト", + "admin/editor.search-result.query.simulationBehavior.skip": "シミュレーションをスキップ", + "admin/editor.search-result.query.installmentCriteria.title": "表示する分割払い", + "admin/editor.search-result.query.installmentCriteria.description": "表示する分割払いのタイプを選びます(例:金利込みの最大金額、金利を別にした最大金額)。", + "admin/editor.search-result.query.installmentCriteria.max-without-interest": "金利を別にした最大金額", + "admin/editor.search-result.query.installmentCriteria.max-with-interest": "金利込みの最大金額", + "admin/editor.search-result.pagination.title": "ページネーションのタイプ", + "admin/editor.search-result.pagination.show-more": "もっと見る", + "admin/editor.search-result.pagination.infinite-scroll": "無限スクロール", + "admin/editor.search-result.description": "検索結果のラッパー", + "admin/editor.search-result.maxItemsPerLine.title": "1行あたりに表示される最大項目数", + "admin/editor.search-result.mobileLayout": "モバイルレイアウトの切り替え", + "admin/editor.search-result.mobileLayout.mode1": "レイアウトモード1", + "admin/editor.search-result.mobileLayout.mode2": "レイアウトモード2", + "admin/editor.search-result.hiddenFacets": "非表示のフィルタ", + "admin/editor.search-result.hiddenFacets.brands": "ブランドフィルタを非表示にする", + "admin/editor.search-result.hiddenFacets.categories": "カテゴリフィルタを非表示にする", + "admin/editor.search-result.hiddenFacets.priceRange": "価格フィルタを非表示にする", + "admin/editor.search-result.hiddenFacets.specificationFilters": "仕様フィルタを非表示にする", + "admin/editor.search-result.hiddenFacets.specificationFilters.hideAll": "仕様フィルタをすべて非表示にする", + "admin/editor.search-result.hiddenFacets.specificationFilters.hiddenFilter": "非表示の仕様フィルタ", + "admin/editor.search-result.hiddenFacets.specificationFilters.hiddenFilter.name": "非表示の仕様フィルタ名", + "admin/editor.search-result.showTitle": "カテゴリタイトルを表示するか、またはギャラリーの上にある語句を検索する", + "admin/editor.search-result.gap.title": "ギャラリー項目間のギャップ", + "admin/editor.search-result.facet-quantity": "フィルタ項目数を表示する", + "admin/editor.search-result.advanced-settings.title": "高度な設定", + "admin/editor.search-result.advanced-settings.trackingId.title": "GTM 検索結果の名前", + "admin/editor.search-result.advanced-settings.trackingId.description": "Google Analytics で表示される名前。設定しない場合は「検索結果」となります", + "admin/editor.search-result.ordination.sort-by": "並べ替え", + "admin/editor.search-result.total-products": "製品の合計", + "store/search-result.show-more-button": "次を表示", + "store/search-result.show-previous-button": "前を表示", + "store/search-result.showing-products": "{value} 個を表示中", + "store/search-result.showing-products-count": "{productsLoaded, number} / {total, number}", + "store/search-result.showing-all-products": "全 {value} 個の製品を表示しました", + "store/search-result.showing-all-products-count": "{total, number}", + "store/search-result.filter-button.title": "フィルタ", + "store/search-result.filter-breadcrumbs.primary": "フィルタ", + "store/search-result.filter-button.apply": "適用", + "store/search-result.filter-button.clear": "クリア", + "store/search-result.filter-button.clearAll": "すべてクリア", + "store/search-result.orderby.title": "並べ替え", + "store/search-result.clear-filters.title": "クリア", + "store/search-result.filter-action.title": "フィルタ", + "store/search.filter.title.categories": "部門", + "store/search.filter.title.color": "色", + "store/filter.more-departments": "さらに {quantity} 個の部門を表示", + "store/filter.more-categories": "さらに {quantity} 個のカテゴリを表示", + "store/filter.more-items": "さらに {quantity} 個を表示", + "store/filter.less-items": "一部を表示", + "store/search.filter.placeholder": "{filterName} で検索", + "store/search.filter.title.brands": "ブランド", + "store/search.filter.title.price-ranges": "価格帯", + "store/search.filter.title.shipping": "発送方法", + "store/search.filter.shipping.name.delivery": "宛先", + "store/search.filter.shipping.name.pickup-in-point": "集荷場所", + "store/search.filter.shipping.name.pickup-nearby": "近くの集荷場所", + "store/search.filter.shipping.name.pickup-all": "集荷", + "store/search.text": "{from}-{to} に該当する {recordsFiltered} の記録を表示中", + "store/search.selected-filters": "検索条件:", + "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, other {製品}}", + "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, other {製品}}", + "store/search.empty-products": "「{term}」に関連した結果は見つかりませんでした", + "store/search.what-do-i-do": "以下を試してください", + "store/search.what-to-do.1": "入力した語句を確認してください。", + "store/search.what-to-do.2": "単語を1つにしてみてください。", + "store/search.what-to-do.3": "一般的な語句で検索してください。", + "store/search.what-to-do.4": "探している語句の類義語で検索してみてください。", + "store/search.no-products": "製品が見つかりません", + "store/ordenation.button": "並べ替え", + "store/ordenation.sort-by": "並べ替えの順番", + "store/ordenation.relevance": "関連度", + "store/ordenation.sales": "売上高", + "store/ordenation.release.date": "発売日", + "store/ordenation.discount": "割引率", + "store/ordenation.price.descending": "価格:高い順", + "store/ordenation.price.ascending": "価格:低い順", + "store/ordenation.name.ascending": "名前(昇順)", + "store/ordenation.name.descending": "名前(降順)", + "store/layoutModeSwitcher.inline": "行", + "store/layoutModeSwitcher.small": "小", + "store/layoutModeSwitcher.normal": "普通", + "store/gallery.gapType.none": "なし", + "store/gallery.gapType.small": "小", + "store/gallery.gapType.medium": "中", + "store/gallery.gapType.large": "大", + "admin/editor.search-result-layout-custom.title": "検索結果カスタム・フレキシブルレイアウト", + "admin/editor.search-result-layout.title": "検索結果フレキシブルレイアウト", + "admin/editor.search-result-mobile.title": "検索結果フレキシブルレイアウト・モバイル", + "admin/editor.search-result-desktop.title": "検索結果フレキシブルレイアウト・デスクトップ", + "store/search-result.price-ranges.submit": "進む", + "admin/editor.search-result.fetch-more": "さらに取得", + "admin/editor.search-result.fetch-previous": "前のを取得", + "admin/editor.search-result.fetch-button.button-behavior": "ボタンの動作", + "admin/editor.search-result.fetch-button.button-behavior.button": "ボタン", + "admin/editor.search-result.fetch-button.button-behavior.link-to-page": "ページへのリンク - SEO を改善します。ボタンの見た目が変わることがあります。" +} diff --git a/messages/ko.json b/messages/ko.json index b2d1748fb..e5eb0b8bc 100644 --- a/messages/ko.json +++ b/messages/ko.json @@ -66,6 +66,11 @@ "store/search.filter.title.brands": "브랜드", "store/search.filter.title.price-ranges": "가격 범위", "store/search.text": "{recordsFiltered} 결과 중 {from}–{to} 표시", + "store/search.filter.title.shipping": "배송", + "store/search.filter.shipping.name.delivery": "배송 대상", + "store/search.filter.shipping.name.pickup-in-point": "픽업 장소", + "store/search.filter.shipping.name.pickup-nearby": "근처 픽업", + "store/search.filter.shipping.name.pickup-all": "픽업", "store/search.selected-filters": "필터링 기준:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {제품} other {제품}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {제품} other {제품}}", diff --git a/messages/nl.json b/messages/nl.json index d6a446545..34f4b5dcf 100644 --- a/messages/nl.json +++ b/messages/nl.json @@ -70,6 +70,11 @@ "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {product} other {producten}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {product} other {producten}}", "store/search.empty-products": "We hebben geen resultaten gevonden die gerelateerd zijn aan \"{term}\"", + "store/search.filter.title.shipping": "Verzending", + "store/search.filter.shipping.name.delivery": "Leveren aan", + "store/search.filter.shipping.name.pickup-in-point": "Afhalen op", + "store/search.filter.shipping.name.pickup-nearby": "Afhalen in de buurt van", + "store/search.filter.shipping.name.pickup-all": "Afhalen", "store/search.what-do-i-do": "Wat moet ik doen?", "store/search.what-to-do.1": "Controleer de termen die u hebt getypt.", "store/search.what-to-do.2": "Probeer een enkel woord te gebruiken.", diff --git a/messages/nn.json b/messages/nn.json index c38d2e09b..a7282eb21 100644 --- a/messages/nn.json +++ b/messages/nn.json @@ -66,6 +66,11 @@ "store/search.filter.title.brands": "Merker", "store/search.filter.title.price-ranges": "Prisklasser", "store/search.text": "Viser {from}–{to} av {recordsFiltered} resultater", + "store/search.filter.title.shipping": "Forsendelse", + "store/search.filter.shipping.name.delivery": "Leveres til", + "store/search.filter.shipping.name.pickup-in-point": "Hent hos", + "store/search.filter.shipping.name.pickup-nearby": "Henting i nærheten", + "store/search.filter.shipping.name.pickup-all": "Hent", "store/search.selected-filters": "Filtrert etter:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {produkt} other {produkter}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {produkt} other {produkter}}", diff --git a/messages/no.json b/messages/no.json index c38d2e09b..a7282eb21 100644 --- a/messages/no.json +++ b/messages/no.json @@ -66,6 +66,11 @@ "store/search.filter.title.brands": "Merker", "store/search.filter.title.price-ranges": "Prisklasser", "store/search.text": "Viser {from}–{to} av {recordsFiltered} resultater", + "store/search.filter.title.shipping": "Forsendelse", + "store/search.filter.shipping.name.delivery": "Leveres til", + "store/search.filter.shipping.name.pickup-in-point": "Hent hos", + "store/search.filter.shipping.name.pickup-nearby": "Henting i nærheten", + "store/search.filter.shipping.name.pickup-all": "Hent", "store/search.selected-filters": "Filtrert etter:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {produkt} other {produkter}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {produkt} other {produkter}}", diff --git a/messages/pl.json b/messages/pl.json index bb13cb389..b284003d6 100644 --- a/messages/pl.json +++ b/messages/pl.json @@ -65,6 +65,11 @@ "store/search.filter.placeholder": "Wyszukaj według {filterName}", "store/search.filter.title.brands": "Marki", "store/search.filter.title.price-ranges": "Zakresy cenowe", + "store/search.filter.title.shipping": "Wysyłka", + "store/search.filter.shipping.name.delivery": "Dostarcz do", + "store/search.filter.shipping.name.pickup-in-point": "Odbiór w", + "store/search.filter.shipping.name.pickup-nearby": "Odbiór w pobliżu", + "store/search.filter.shipping.name.pickup-all": "Odbiór", "store/search.text": "Pokazuję {from}-{to} od {recordsFiltered} wpisów", "store/search.selected-filters": "Filtrowane według:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {produkt} few {produkty} many {produkty} other {produkty}}", diff --git a/messages/pt.json b/messages/pt.json index dd8a1524f..e7953a82d 100644 --- a/messages/pt.json +++ b/messages/pt.json @@ -69,7 +69,7 @@ "store/search.filter.title.shipping": "Entrega", "store/search.filter.shipping.name.delivery": "Entregar em", "store/search.filter.shipping.name.pickup-in-point": "Retirada em", - "store/search.filter.shipping.name.pickup-nearby": "Retirada perto de", + "store/search.filter.shipping.name.pickup-nearby": "Retirada em lojas próximas", "store/search.filter.shipping.name.pickup-all": "Retirada", "store/search.selected-filters": "Filtrado por:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {Produto} other {Produtos}}", diff --git a/messages/ro.json b/messages/ro.json index dda41ce2c..73d42ea2d 100644 --- a/messages/ro.json +++ b/messages/ro.json @@ -65,6 +65,11 @@ "store/search.filter.placeholder": "Caută după {filterName}", "store/search.filter.title.brands": "Branduri", "store/search.filter.title.price-ranges": "Intervale de prețuri", + "store/search.filter.title.shipping": "Transport", + "store/search.filter.shipping.name.delivery": "Livrează la", + "store/search.filter.shipping.name.pickup-in-point": "Ridicare la", + "store/search.filter.shipping.name.pickup-nearby": "Ridicare în apropiere", + "store/search.filter.shipping.name.pickup-all": "Ridicare", "store/search.text": "Afișează {from}-{to} de la {recordsFiltered} înregistrări", "store/search.selected-filters": "Filtru după:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {produs} few {produse} other {de produse}}", diff --git a/messages/ru.json b/messages/ru.json index 0beccfc3d..b59d26c97 100644 --- a/messages/ru.json +++ b/messages/ru.json @@ -75,6 +75,11 @@ "store/search.what-to-do.2": "Попробуйте ввести одно слово.", "store/search.what-to-do.3": "Ищите по общим терминам.", "store/search.what-to-do.4": "Попробуйте ввести синонимы.", + "store/search.filter.title.shipping": "Отправка", + "store/search.filter.shipping.name.delivery": "Место доставки", + "store/search.filter.shipping.name.pickup-in-point": "Место самовывоза", + "store/search.filter.shipping.name.pickup-nearby": "Самовывоз поблизости", + "store/search.filter.shipping.name.pickup-all": "Самовывоз", "store/search.no-products": "Ничего не найдено", "store/ordenation.button": "Сортировать", "store/ordenation.sort-by": "Критерий сортировки", diff --git a/messages/sk.json b/messages/sk.json index 405faf8eb..d3f83c996 100644 --- a/messages/sk.json +++ b/messages/sk.json @@ -66,6 +66,11 @@ "store/search.filter.title.brands": "Značky", "store/search.filter.title.price-ranges": "Rozsahy cien", "store/search.text": "Zobrazuje sa {from} – {to} z/zo {recordsFiltered} záznamov", + "store/search.filter.title.shipping": "Doprava", + "store/search.filter.shipping.name.delivery": "Doručiť na", + "store/search.filter.shipping.name.pickup-in-point": "Vyzdvihnúť na", + "store/search.filter.shipping.name.pickup-nearby": "Vyzdvihnúť v blízosti", + "store/search.filter.shipping.name.pickup-all": "Vyzdvihnúť", "store/search.selected-filters": "Filtrované podľa:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {product} few {products} many {products} other {products}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {product} few {products} many {products} other {products}}", diff --git a/messages/sl.json b/messages/sl.json index c96685277..0653a55d4 100644 --- a/messages/sl.json +++ b/messages/sl.json @@ -66,6 +66,11 @@ "store/search.filter.title.brands": "Znamke", "store/search.filter.title.price-ranges": "Cenovni razponi", "store/search.text": "Kažem {from}-{to} od {recordsFiltered} rezultatov", + "store/search.filter.title.shipping": "Odpošiljanje", + "store/search.filter.shipping.name.delivery": "Dostavi v", + "store/search.filter.shipping.name.pickup-in-point": "Prevzemi pri", + "store/search.filter.shipping.name.pickup-nearby": "Prevzemite blizu", + "store/search.filter.shipping.name.pickup-all": "Prevzemi", "store/search.selected-filters": "Filtrirano po:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {izdelek} two {izdelka} few {izdelkov} other {izdelki}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {izdelek} two {izdelka} few {izdelkov} other {izdelki}}", diff --git a/messages/sv.json b/messages/sv.json index 069fc3f7c..88b49be3d 100644 --- a/messages/sv.json +++ b/messages/sv.json @@ -66,6 +66,11 @@ "store/search.filter.title.brands": "Varumärken", "store/search.filter.title.price-ranges": "Prisklasser", "store/search.text": "Visar {from}–{to} av {recordsFiltered} resultat", + "store/search.filter.title.shipping": "Frakt", + "store/search.filter.shipping.name.delivery": "Leverera till", + "store/search.filter.shipping.name.pickup-in-point": "Hämta vid", + "store/search.filter.shipping.name.pickup-nearby": "Hämtning i närheten", + "store/search.filter.shipping.name.pickup-all": "Hämta", "store/search.selected-filters": "Filtrerad enligt:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {produkt} other {produkter}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {produkt} other {produkter}}", diff --git a/messages/th.json b/messages/th.json index 6d326e951..0fd9ecd72 100644 --- a/messages/th.json +++ b/messages/th.json @@ -66,6 +66,11 @@ "store/search.filter.title.brands": "แบรนด์", "store/search.filter.title.price-ranges": "ช่วงราคา", "store/search.text": "กำลังแสดงผล {from}–{to} ของ {recordsFiltered}", + "store/search.filter.title.shipping": "การส่ง", + "store/search.filter.shipping.name.delivery": "จัดส่งไปยัง", + "store/search.filter.shipping.name.pickup-in-point": "จุดรับสินค้าเอง", + "store/search.filter.shipping.name.pickup-nearby": "จุดรับสินค้าบริเวณใกล้เคียง", + "store/search.filter.shipping.name.pickup-all": "การรับสินค้าเอง", "store/search.selected-filters": "กรองตาม:", "store/search.total-products": "ผลิตภัณฑ์ {recordsFiltered} {recordsFiltered, plural, other {รายการ}}", "store/search.total-products-2": "ผลิตภัณฑ์ {recordsFiltered} {recordsFiltered, plural, other {รายการ}}", diff --git a/messages/uk.json b/messages/uk.json index 6f7aa71fc..a1670efbf 100644 --- a/messages/uk.json +++ b/messages/uk.json @@ -76,6 +76,11 @@ "store/search.what-to-do.3": "Пошукайте за узагальненою назвою.", "store/search.what-to-do.4": "Спробуйте ввести синоніми.", "store/search.no-products": "Товарів не знайдено", + "store/search.filter.title.shipping": "Відправлення", + "store/search.filter.shipping.name.delivery": "Місце доставки", + "store/search.filter.shipping.name.pickup-in-point": "Місце самовивозу", + "store/search.filter.shipping.name.pickup-nearby": "Самовивіз поблизу", + "store/search.filter.shipping.name.pickup-all": "Самовивіз", "store/ordenation.button": "Сортувати", "store/ordenation.sort-by": "Критерій сортування", "store/ordenation.relevance": "Релевантність", From 55f65404ac6deee2c071dfbb9088efc02073360a Mon Sep 17 00:00:00 2001 From: ArthurFerrao <15989443+ArthurFerrao@users.noreply.github.com> Date: Wed, 23 Oct 2024 14:58:33 +0000 Subject: [PATCH 17/24] Release v3.134.0 --- CHANGELOG.md | 2 ++ manifest.json | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f25d3ef54..d77c21e7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [3.134.0] - 2024-10-23 + ### Fixed - Updated English, Spanish and Portuguese translations. diff --git a/manifest.json b/manifest.json index 5ab505f31..74992827b 100644 --- a/manifest.json +++ b/manifest.json @@ -5,9 +5,7 @@ "title": "VTEX Search Result", "description": "A search result wrapper component", "mustUpdateAt": "2019-04-25", - "registries": [ - "smartcheckout" - ], + "registries": ["smartcheckout"], "scripts": { "postreleasy": "vtex publish --verbose" }, From 026e10c8661e4e9b9546ecfa58f21dea1574a610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Ferr=C3=A3o?= Date: Wed, 23 Oct 2024 13:16:17 -0300 Subject: [PATCH 18/24] feat: add action button labels to the messages folder --- messages/context.json | 2 ++ messages/en.json | 2 ++ react/components/FacetCheckboxListItem.js | 9 ++++++++- react/components/FacetItem.js | 18 +++++++++++++----- react/hooks/useShippingActions.js | 4 ++-- 5 files changed, 27 insertions(+), 8 deletions(-) diff --git a/messages/context.json b/messages/context.json index 75deb21eb..138b660d4 100644 --- a/messages/context.json +++ b/messages/context.json @@ -70,6 +70,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Pickup at", "store/search.filter.shipping.name.pickup-nearby": "Pickup nearby", "store/search.filter.shipping.name.pickup-all": "Pickup", + "store/search.filter.shipping.action-button.delivery": "Enter location", + "store/search.filter.shipping.action-button.pickup-in-point": "Enter store", "store/search.text": "Showing {from}-{to} from {recordsFiltered} records", "store/search.selected-filters": "Filtered by:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {Product} other {Products}}", diff --git a/messages/en.json b/messages/en.json index 5969aab5d..197088321 100644 --- a/messages/en.json +++ b/messages/en.json @@ -71,6 +71,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Pickup at", "store/search.filter.shipping.name.pickup-nearby": "Pickup nearby", "store/search.filter.shipping.name.pickup-all": "Pickup", + "store/search.filter.shipping.action-button.delivery": "Enter location", + "store/search.filter.shipping.action-button.pickup-in-point": "Enter store", "store/search.selected-filters": "Filtered by:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {product} other {products}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {product} other {products}}", diff --git a/react/components/FacetCheckboxListItem.js b/react/components/FacetCheckboxListItem.js index c5d101a26..27c839874 100644 --- a/react/components/FacetCheckboxListItem.js +++ b/react/components/FacetCheckboxListItem.js @@ -3,6 +3,7 @@ import React, { useMemo } from 'react' import { applyModifiers } from 'vtex.css-handles' import { Checkbox } from 'vtex.styleguide' import { usePixel } from 'vtex.pixel-manager' +import { useIntl } from 'react-intl' import styles from '../searchResult.css' import { pushFilterManipulationPixelEvent } from '../utils/filterManipulationPixelEvents' @@ -17,6 +18,8 @@ const FacetCheckboxListItem = ({ searchQuery, onFilterCheck, }) => { + const intl = useIntl() + const { push } = usePixel() const { actionLabel, actionType, openDrawer, shouldDisable } = @@ -37,7 +40,10 @@ const FacetCheckboxListItem = ({ labelElement = (
{labelElement} - +
) } @@ -51,6 +57,7 @@ const FacetCheckboxListItem = ({ showActionButton, actionLabel, openDrawer, + intl, ]) return ( diff --git a/react/components/FacetItem.js b/react/components/FacetItem.js index a3494e985..046a40c4a 100644 --- a/react/components/FacetItem.js +++ b/react/components/FacetItem.js @@ -4,6 +4,7 @@ import { useCssHandles, applyModifiers } from 'vtex.css-handles' import classNames from 'classnames' import { useSearchPage } from 'vtex.search-page-context/SearchPageContext' import { usePixel } from 'vtex.pixel-manager' +import { useIntl } from 'react-intl' import { pushFilterManipulationPixelEvent } from '../utils/filterManipulationPixelEvents' import SettingsContext from './SettingsContext' @@ -31,10 +32,12 @@ const FacetItem = ({ preventRouteChange, showTitle = false, }) => { + const intl = useIntl() const { push } = usePixel() const { actionLabel, actionType, openDrawer, shouldDisable } = useShippingActions(facet) + const showActionButton = !!actionType const { showFacetQuantity } = useContext(SettingsContext) @@ -81,22 +84,26 @@ const FacetItem = ({ ({facet.quantity}) - ) + ) } - + if (showActionButton) { labelElement = (
{labelElement}
- +
) - } + } if (showTitle) { labelElement = ( <> - {facetTitle}: {labelElement} + {facetTitle}:{' '} + {labelElement} ) } @@ -115,6 +122,7 @@ const FacetItem = ({ openDrawer, showTitle, facetTitle, + intl, ]) return ( diff --git a/react/hooks/useShippingActions.js b/react/hooks/useShippingActions.js index d163b352b..f868d47e6 100644 --- a/react/hooks/useShippingActions.js +++ b/react/hooks/useShippingActions.js @@ -17,8 +17,8 @@ const eventIdentifiers = { } const placeHolders = { - DELIVERY: 'Enter location', - PICKUP_POINT: 'Enter store', + DELIVERY: 'store/search.filter.shipping.action-button.delivery', + PICKUP_POINT: 'store/search.filter.shipping.action-button.pickup-in-point', } const drawerEvent = { From 091973d8e98c9d5994372b3ab2637ecc715e5ef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Ferr=C3=A3o?= Date: Tue, 29 Oct 2024 17:35:14 -0300 Subject: [PATCH 19/24] fix: filter sidebar closes when clicking drawer --- .../FilterNavigator/legacy/FilterSidebar.js | 7 +++++- react/components/FilterSidebar.js | 7 +++++- react/utils/isShippingOptionsComponent.js | 23 +++++++++++++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 react/utils/isShippingOptionsComponent.js diff --git a/react/components/FilterNavigator/legacy/FilterSidebar.js b/react/components/FilterNavigator/legacy/FilterSidebar.js index 1393332e6..a38d51d90 100644 --- a/react/components/FilterNavigator/legacy/FilterSidebar.js +++ b/react/components/FilterNavigator/legacy/FilterSidebar.js @@ -13,6 +13,7 @@ import { facetOptionShape } from '../../../constants/propTypes' import useSelectedFilters from './hooks/useSelectedFilters' import searchResult from './searchResult.css' import QueryContext from '../../QueryContext' +import isShippingOptionsComponent from '../../../utils/isShippingOptionsComponent' const FilterSidebar = ({ filters, preventRouteChange = false }) => { const { navigate, setQuery } = useRuntime() @@ -49,7 +50,11 @@ const FilterSidebar = ({ filters, preventRouteChange = false }) => { } } - const handleClose = () => { + const handleClose = e => { + if (isShippingOptionsComponent(e)) { + return + } + setOpen(false) } diff --git a/react/components/FilterSidebar.js b/react/components/FilterSidebar.js index 8a4ffeb20..52fc13931 100644 --- a/react/components/FilterSidebar.js +++ b/react/components/FilterSidebar.js @@ -23,6 +23,7 @@ import { filterCategoryDepartmentCollectionAndFT, } from '../utils/queryAndMapUtils' import { pushFilterManipulationPixelEvent } from '../utils/filterManipulationPixelEvents' +import isShippingOptionsComponent from '../utils/isShippingOptionsComponent' const CSS_HANDLES = [ 'filterPopupButton', @@ -110,7 +111,11 @@ const FilterSidebar = ({ } } - const handleClose = () => { + const handleClose = e => { + if (isShippingOptionsComponent(e)) { + return + } + setOpen(false) } diff --git a/react/utils/isShippingOptionsComponent.js b/react/utils/isShippingOptionsComponent.js new file mode 100644 index 000000000..4f004fdf4 --- /dev/null +++ b/react/utils/isShippingOptionsComponent.js @@ -0,0 +1,23 @@ +const SHIPPING_OPTION_COMPONENT_DRAWER_CLASS = + 'vtex-shipping-option-components-0-x-drawer' + +const SHIPPING_OPTION_COMPONENT_OVERLAY_CLASS = + 'vtex-shipping-option-components-0-x-overlay' + +const isShippingOptionsComponent = e => { + if (!e.target) { + return false + } + + const shippingOptionsDawerElement = e.target.closest( + `.${SHIPPING_OPTION_COMPONENT_DRAWER_CLASS}` + ) + + const isShippingOptionsOverlayElement = e.target.classList.contains( + SHIPPING_OPTION_COMPONENT_OVERLAY_CLASS + ) + + return shippingOptionsDawerElement || isShippingOptionsOverlayElement +} + +export default isShippingOptionsComponent From 9b4d4715bd0997aa8ead1b1be7d52a335d27c920 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Ferr=C3=A3o?= Date: Wed, 6 Nov 2024 13:52:14 -0300 Subject: [PATCH 20/24] feat: turn shipping options constants for camel case --- react/FilterNavigator.js | 10 +++++----- react/utils/compatibilityLayer.js | 4 ++-- react/utils/getFilters.js | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/react/FilterNavigator.js b/react/FilterNavigator.js index 5a514ce16..861871eea 100644 --- a/react/FilterNavigator.js +++ b/react/FilterNavigator.js @@ -23,7 +23,7 @@ import { import useFacetNavigation from './hooks/useFacetNavigation' import FilterNavigatorTitleTag from './components/FilterNavigatorTitleTag' import styles from './searchResult.css' -import { CATEGORIES_TITLE, SHIPPING_OPTIONS } from './utils/getFilters' +import { CATEGORIES_TITLE, shippingOptions } from './utils/getFilters' import { newFacetPathName } from './utils/slug' import { FACETS_RENDER_THRESHOLD } from './constants/filterConstants' @@ -160,12 +160,12 @@ const FilterNavigator = ({ } }, [filters, filtersFetchMore, truncatedFacetsFetched, loading]) - const shipping = deliveries.map((delivery) => ({ + const shipping = deliveries.map(delivery => ({ ...delivery, - facets: delivery.facets.map((facet) => ({ + facets: delivery.facets.map(facet => ({ ...facet, - name: intl.formatMessage({ id: SHIPPING_OPTIONS[facet.name] }) , - })) + name: intl.formatMessage({ id: shippingOptions[facet.name] }), + })), })) const selectedFilters = useMemo(() => { diff --git a/react/utils/compatibilityLayer.js b/react/utils/compatibilityLayer.js index f176da6c4..85cd92a78 100644 --- a/react/utils/compatibilityLayer.js +++ b/react/utils/compatibilityLayer.js @@ -2,14 +2,14 @@ import { groupBy, pathOr, zipObj } from 'ramda' import { PATH_SEPARATOR, MAP_VALUES_SEP } from '../constants' -import { SHIPPING_OPTIONS, SHIPPING_KEY } from './getFilters' +import { shippingOptions, SHIPPING_KEY } from './getFilters' const shippingFacetDefault = { name: SHIPPING_KEY, type: 'DELIVERY', hidden: false, quantity: 0, - facets: Object.keys(SHIPPING_OPTIONS).map(option => ({ + facets: Object.keys(shippingOptions).map(option => ({ id: null, quantity: 0, name: option, diff --git a/react/utils/getFilters.js b/react/utils/getFilters.js index eab267f7a..a394df656 100644 --- a/react/utils/getFilters.js +++ b/react/utils/getFilters.js @@ -6,7 +6,7 @@ export const CATEGORIES_TITLE = 'store/search.filter.title.categories' export const BRANDS_TITLE = 'store/search.filter.title.brands' export const PRICE_RANGES_TITLE = 'store/search.filter.title.price-ranges' -export const SHIPPING_OPTIONS = { +export const shippingOptions = { delivery: 'store/search.filter.shipping.name.delivery', 'pickup-in-point': 'store/search.filter.shipping.name.pickup-in-point', 'pickup-nearby': 'store/search.filter.shipping.name.pickup-nearby', @@ -40,7 +40,7 @@ const getFilters = ({ title: SHIPPING_TITLE, facets: shipping.facets.map(facet => ({ ...facet, - name: intl.formatMessage({ id: SHIPPING_OPTIONS[facet.name] }), + name: intl.formatMessage({ id: shippingOptions[facet.name] }), })), } From 5e979da197183b11be26986ff223b35fd04c97c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Ferr=C3=A3o?= Date: Wed, 6 Nov 2024 14:03:06 -0300 Subject: [PATCH 21/24] update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d77c21e7e..51534c5ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] -## [3.134.0] - 2024-10-23 +### Added + +- Shipping filter on filters section ### Fixed From e59f1677c87a136b11d7ee97eb59c53db54e4852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Ferr=C3=A3o?= Date: Thu, 7 Nov 2024 15:00:18 -0300 Subject: [PATCH 22/24] feat: add useSSR mock to fix some tests --- react/__mocks__/vtex.pixel-manager.js | 2 ++ react/__mocks__/vtex.render-runtime/react/components/NoSSR.js | 1 + 2 files changed, 3 insertions(+) create mode 100644 react/__mocks__/vtex.render-runtime/react/components/NoSSR.js diff --git a/react/__mocks__/vtex.pixel-manager.js b/react/__mocks__/vtex.pixel-manager.js index 1355be386..ff3042bb3 100644 --- a/react/__mocks__/vtex.pixel-manager.js +++ b/react/__mocks__/vtex.pixel-manager.js @@ -5,3 +5,5 @@ const PixelContext = createContext({ push: () => undefined }) export const usePixel = () => { return useContext(PixelContext) } + +export const usePixelEventCallback = () => {} diff --git a/react/__mocks__/vtex.render-runtime/react/components/NoSSR.js b/react/__mocks__/vtex.render-runtime/react/components/NoSSR.js new file mode 100644 index 000000000..9d1c4e77d --- /dev/null +++ b/react/__mocks__/vtex.render-runtime/react/components/NoSSR.js @@ -0,0 +1 @@ +export const useSSR = () => jest.fn() From d7d8854141cec4ec288af8dbe7c62f0649b8a196 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Ferr=C3=A3o?= Date: Thu, 7 Nov 2024 17:54:18 -0300 Subject: [PATCH 23/24] feat: resolve lint errors --- react/hooks/useShouldDisableFacet.js | 6 +++--- react/utils/getFilters.js | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/react/hooks/useShouldDisableFacet.js b/react/hooks/useShouldDisableFacet.js index e31ef9738..489515b4c 100644 --- a/react/hooks/useShouldDisableFacet.js +++ b/react/hooks/useShouldDisableFacet.js @@ -8,7 +8,7 @@ export default function useShouldDisableFacet( isPickupSet ) { const { map } = useSearchPage() - + if ( (facet.value === 'delivery' || facet.value === 'pickup-nearby' || @@ -22,10 +22,10 @@ export default function useShouldDisableFacet( return true } - if(facet.quantity === 0) { + if (facet.quantity === 0) { return true } - + if (!facet.selected || !map) { return false } diff --git a/react/utils/getFilters.js b/react/utils/getFilters.js index a394df656..8f4208668 100644 --- a/react/utils/getFilters.js +++ b/react/utils/getFilters.js @@ -28,6 +28,7 @@ const getFilters = ({ hiddenFacets = {}, showShippingFacet = false, }) => { + // eslint-disable-next-line react-hooks/rules-of-hooks const intl = useIntl() let deliveriesFormatted = deliveries From 94e1c09070a6686b830be7da627a3b108a254ee5 Mon Sep 17 00:00:00 2001 From: sheilagomes Date: Fri, 8 Nov 2024 18:35:33 -0300 Subject: [PATCH 24/24] Fix translations --- messages/ar.json | 2 ++ messages/bg.json | 2 ++ messages/ca.json | 2 ++ messages/da.json | 2 ++ messages/de.json | 2 ++ messages/el.json | 2 ++ messages/es.json | 2 ++ messages/fi.json | 2 ++ messages/fr.json | 2 ++ messages/hu.json | 2 ++ messages/id.json | 2 ++ messages/it.json | 2 ++ messages/ja.json | 2 ++ messages/ko.json | 2 ++ messages/nl.json | 2 ++ messages/nn.json | 2 ++ messages/no.json | 2 ++ messages/pl.json | 2 ++ messages/pt.json | 2 ++ messages/ro.json | 2 ++ messages/ru.json | 2 ++ messages/sk.json | 2 ++ messages/sl.json | 2 ++ messages/sv.json | 2 ++ messages/th.json | 2 ++ messages/uk.json | 2 ++ 26 files changed, 52 insertions(+) diff --git a/messages/ar.json b/messages/ar.json index ce8be7d66..36f6143d0 100644 --- a/messages/ar.json +++ b/messages/ar.json @@ -71,6 +71,8 @@ "store/search.filter.shipping.name.pickup-in-point": "الاستلام في", "store/search.filter.shipping.name.pickup-nearby": "استلام بقرب", "store/search.filter.shipping.name.pickup-all": "الإستلام", + "store/search.filter.shipping.action-button.delivery": "Enter location", + "store/search.filter.shipping.action-button.pickup-in-point": "Enter store", "store/search.selected-filters": "تصفية حسب:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {منتج} other {منتجات}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {منتج} other {منتجات}}", diff --git a/messages/bg.json b/messages/bg.json index 2041e8844..86c88f250 100644 --- a/messages/bg.json +++ b/messages/bg.json @@ -71,6 +71,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Вземане от", "store/search.filter.shipping.name.pickup-nearby": "Вземане наблизо", "store/search.filter.shipping.name.pickup-all": "Вземане", + "store/search.filter.shipping.action-button.delivery": "Въвеждане на местоположение", + "store/search.filter.shipping.action-button.pickup-in-point": "Въвеждане на магазин", "store/search.selected-filters": "Филтрирани по:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {продукт} other {продукта}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {продукт} other {продукта}}", diff --git a/messages/ca.json b/messages/ca.json index 36a63ba02..4eaef63a2 100644 --- a/messages/ca.json +++ b/messages/ca.json @@ -71,6 +71,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Recollida a", "store/search.filter.shipping.name.pickup-nearby": "Recollida a prop", "store/search.filter.shipping.name.pickup-all": "Recollida", + "store/search.filter.shipping.action-button.delivery": "Enter location", + "store/search.filter.shipping.action-button.pickup-in-point": "Enter store", "store/search.selected-filters": "Filtrat per:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {product} other {products}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {product} other {products}}", diff --git a/messages/da.json b/messages/da.json index 27651d53a..fd72e4b67 100644 --- a/messages/da.json +++ b/messages/da.json @@ -70,6 +70,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Afhentning ved", "store/search.filter.shipping.name.pickup-nearby": "Afhentning i nærheden", "store/search.filter.shipping.name.pickup-all": "Afhentning", + "store/search.filter.shipping.action-button.delivery": "Enter location", + "store/search.filter.shipping.action-button.pickup-in-point": "Enter store", "store/search.text": "Viser {from}-{to} fra {recordsFiltered} optegnelser", "store/search.selected-filters": "Filtreret efter:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {produkt} other {produkter}}", diff --git a/messages/de.json b/messages/de.json index fb58761f3..f242b9dea 100644 --- a/messages/de.json +++ b/messages/de.json @@ -71,6 +71,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Abholung bei", "store/search.filter.shipping.name.pickup-nearby": "Abholung in der Nähe", "store/search.filter.shipping.name.pickup-all": "Abholung", + "store/search.filter.shipping.action-button.delivery": "Ort eingeben", + "store/search.filter.shipping.action-button.pickup-in-point": "Geschäft eingeben", "store/search.selected-filters": "Gefiltert nach:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {Produkt} other {Produkte}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {Produkt} other {Produkte}}", diff --git a/messages/el.json b/messages/el.json index 5114f3a03..d641c3061 100644 --- a/messages/el.json +++ b/messages/el.json @@ -71,6 +71,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Παραλαβή σε", "store/search.filter.shipping.name.pickup-nearby": "Παραλαβή πλησίον", "store/search.filter.shipping.name.pickup-all": "Παραλαβή", + "store/search.filter.shipping.action-button.delivery": "Enter location", + "store/search.filter.shipping.action-button.pickup-in-point": "Enter store", "store/search.selected-filters": "Φιλτράρισμα ανά:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {product} other {products}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {product} other {products}}", diff --git a/messages/es.json b/messages/es.json index 0174e02b1..a4c1e4bbb 100644 --- a/messages/es.json +++ b/messages/es.json @@ -71,6 +71,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Recogida en", "store/search.filter.shipping.name.pickup-nearby": "Recogida en tiendas cercanas", "store/search.filter.shipping.name.pickup-all": "Recogida", + "store/search.filter.shipping.action-button.delivery": "Ingresa tu ubicación", + "store/search.filter.shipping.action-button.pickup-in-point": "Ingresa la tienda", "store/search.selected-filters": "Filtrado por:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {producto} other {productos}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {producto} other {productos}}", diff --git a/messages/fi.json b/messages/fi.json index 9df484f48..9f17a7ed9 100644 --- a/messages/fi.json +++ b/messages/fi.json @@ -71,6 +71,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Nouto myymälästä", "store/search.filter.shipping.name.pickup-nearby": "Nouto läheltä", "store/search.filter.shipping.name.pickup-all": "Nouto", + "store/search.filter.shipping.action-button.delivery": "Enter location", + "store/search.filter.shipping.action-button.pickup-in-point": "Enter store", "store/search.selected-filters": "Suodatus:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {tuote} other {tuotetta}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {tuote} other {tuotetta}}", diff --git a/messages/fr.json b/messages/fr.json index 55b1d51d2..e9ee9a8c0 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -71,6 +71,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Retrait à", "store/search.filter.shipping.name.pickup-nearby": "Retrait à proximité", "store/search.filter.shipping.name.pickup-all": "Point de retrait", + "store/search.filter.shipping.action-button.delivery": "Saisir la localisation", + "store/search.filter.shipping.action-button.pickup-in-point": "Saisir le magasin", "store/search.selected-filters": "Filtré par :", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {produit} other {produits}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {produit} other {produits}}", diff --git a/messages/hu.json b/messages/hu.json index fb2537649..925ce25ff 100644 --- a/messages/hu.json +++ b/messages/hu.json @@ -71,6 +71,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Pickup at", "store/search.filter.shipping.name.pickup-nearby": "Pickup nearby", "store/search.filter.shipping.name.pickup-all": "Pickup", + "store/search.filter.shipping.action-button.delivery": "Enter location", + "store/search.filter.shipping.action-button.pickup-in-point": "Enter store", "store/search.selected-filters": "Szűrés:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {termék} other {termék}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {termék} other {termék}}", diff --git a/messages/id.json b/messages/id.json index ce3753696..af34d2387 100644 --- a/messages/id.json +++ b/messages/id.json @@ -71,6 +71,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Ambil di", "store/search.filter.shipping.name.pickup-nearby": "Pengambilan terdekat", "store/search.filter.shipping.name.pickup-all": "Pengambilan", + "store/search.filter.shipping.action-button.delivery": "Enter location", + "store/search.filter.shipping.action-button.pickup-in-point": "Enter store", "store/search.selected-filters": "Difilter menurut:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, other {produk}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, other {produk}}", diff --git a/messages/it.json b/messages/it.json index 5266f2d06..8f5f84edf 100644 --- a/messages/it.json +++ b/messages/it.json @@ -71,6 +71,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Ritiro presso", "store/search.filter.shipping.name.pickup-nearby": "Ritiro nelle vicinanze", "store/search.filter.shipping.name.pickup-all": "Ritiro", + "store/search.filter.shipping.action-button.delivery": "Inserisci località", + "store/search.filter.shipping.action-button.pickup-in-point": "Inserisci negozio", "store/search.selected-filters": "Filtrato per:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {prodotto} other {prodotti}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {prodotto} other {prodotti}}", diff --git a/messages/ja.json b/messages/ja.json index e367cc519..ecdd7e7db 100644 --- a/messages/ja.json +++ b/messages/ja.json @@ -70,6 +70,8 @@ "store/search.filter.shipping.name.pickup-in-point": "集荷場所", "store/search.filter.shipping.name.pickup-nearby": "近くの集荷場所", "store/search.filter.shipping.name.pickup-all": "集荷", + "store/search.filter.shipping.action-button.delivery": "場所を入力", + "store/search.filter.shipping.action-button.pickup-in-point": "ストアを入力", "store/search.text": "{from}-{to} に該当する {recordsFiltered} の記録を表示中", "store/search.selected-filters": "検索条件:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, other {製品}}", diff --git a/messages/ko.json b/messages/ko.json index e5eb0b8bc..72222b573 100644 --- a/messages/ko.json +++ b/messages/ko.json @@ -71,6 +71,8 @@ "store/search.filter.shipping.name.pickup-in-point": "픽업 장소", "store/search.filter.shipping.name.pickup-nearby": "근처 픽업", "store/search.filter.shipping.name.pickup-all": "픽업", + "store/search.filter.shipping.action-button.delivery": "위치 입력", + "store/search.filter.shipping.action-button.pickup-in-point": "스토어 입력", "store/search.selected-filters": "필터링 기준:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {제품} other {제품}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {제품} other {제품}}", diff --git a/messages/nl.json b/messages/nl.json index 34f4b5dcf..4f7b6e5d2 100644 --- a/messages/nl.json +++ b/messages/nl.json @@ -75,6 +75,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Afhalen op", "store/search.filter.shipping.name.pickup-nearby": "Afhalen in de buurt van", "store/search.filter.shipping.name.pickup-all": "Afhalen", + "store/search.filter.shipping.action-button.delivery": "Voer locatie in", + "store/search.filter.shipping.action-button.pickup-in-point": "Winkel invoeren", "store/search.what-do-i-do": "Wat moet ik doen?", "store/search.what-to-do.1": "Controleer de termen die u hebt getypt.", "store/search.what-to-do.2": "Probeer een enkel woord te gebruiken.", diff --git a/messages/nn.json b/messages/nn.json index a7282eb21..57564abfa 100644 --- a/messages/nn.json +++ b/messages/nn.json @@ -71,6 +71,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Hent hos", "store/search.filter.shipping.name.pickup-nearby": "Henting i nærheten", "store/search.filter.shipping.name.pickup-all": "Hent", + "store/search.filter.shipping.action-button.delivery": "Enter location", + "store/search.filter.shipping.action-button.pickup-in-point": "Enter store", "store/search.selected-filters": "Filtrert etter:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {produkt} other {produkter}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {produkt} other {produkter}}", diff --git a/messages/no.json b/messages/no.json index a7282eb21..57564abfa 100644 --- a/messages/no.json +++ b/messages/no.json @@ -71,6 +71,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Hent hos", "store/search.filter.shipping.name.pickup-nearby": "Henting i nærheten", "store/search.filter.shipping.name.pickup-all": "Hent", + "store/search.filter.shipping.action-button.delivery": "Enter location", + "store/search.filter.shipping.action-button.pickup-in-point": "Enter store", "store/search.selected-filters": "Filtrert etter:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {produkt} other {produkter}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {produkt} other {produkter}}", diff --git a/messages/pl.json b/messages/pl.json index b284003d6..a71d05f06 100644 --- a/messages/pl.json +++ b/messages/pl.json @@ -70,6 +70,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Odbiór w", "store/search.filter.shipping.name.pickup-nearby": "Odbiór w pobliżu", "store/search.filter.shipping.name.pickup-all": "Odbiór", + "store/search.filter.shipping.action-button.delivery": "Wprowadź lokalizację", + "store/search.filter.shipping.action-button.pickup-in-point": "Wprowadź sklep", "store/search.text": "Pokazuję {from}-{to} od {recordsFiltered} wpisów", "store/search.selected-filters": "Filtrowane według:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {produkt} few {produkty} many {produkty} other {produkty}}", diff --git a/messages/pt.json b/messages/pt.json index e7953a82d..40722ab97 100644 --- a/messages/pt.json +++ b/messages/pt.json @@ -71,6 +71,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Retirada em", "store/search.filter.shipping.name.pickup-nearby": "Retirada em lojas próximas", "store/search.filter.shipping.name.pickup-all": "Retirada", + "store/search.filter.shipping.action-button.delivery": "Insira seu código postal", + "store/search.filter.shipping.action-button.pickup-in-point": "Insira a loja", "store/search.selected-filters": "Filtrado por:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {Produto} other {Produtos}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {Produto} other {Produtos}}", diff --git a/messages/ro.json b/messages/ro.json index 73d42ea2d..0b921a59a 100644 --- a/messages/ro.json +++ b/messages/ro.json @@ -70,6 +70,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Ridicare la", "store/search.filter.shipping.name.pickup-nearby": "Ridicare în apropiere", "store/search.filter.shipping.name.pickup-all": "Ridicare", + "store/search.filter.shipping.action-button.delivery": "Introdu locația", + "store/search.filter.shipping.action-button.pickup-in-point": "Introdu magazinul", "store/search.text": "Afișează {from}-{to} de la {recordsFiltered} înregistrări", "store/search.selected-filters": "Filtru după:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {produs} few {produse} other {de produse}}", diff --git a/messages/ru.json b/messages/ru.json index b59d26c97..6ad53ac9e 100644 --- a/messages/ru.json +++ b/messages/ru.json @@ -80,6 +80,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Место самовывоза", "store/search.filter.shipping.name.pickup-nearby": "Самовывоз поблизости", "store/search.filter.shipping.name.pickup-all": "Самовывоз", + "store/search.filter.shipping.action-button.delivery": "Enter location", + "store/search.filter.shipping.action-button.pickup-in-point": "Enter store", "store/search.no-products": "Ничего не найдено", "store/ordenation.button": "Сортировать", "store/ordenation.sort-by": "Критерий сортировки", diff --git a/messages/sk.json b/messages/sk.json index d3f83c996..b8a185a59 100644 --- a/messages/sk.json +++ b/messages/sk.json @@ -71,6 +71,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Vyzdvihnúť na", "store/search.filter.shipping.name.pickup-nearby": "Vyzdvihnúť v blízosti", "store/search.filter.shipping.name.pickup-all": "Vyzdvihnúť", + "store/search.filter.shipping.action-button.delivery": "Enter location", + "store/search.filter.shipping.action-button.pickup-in-point": "Enter store", "store/search.selected-filters": "Filtrované podľa:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {product} few {products} many {products} other {products}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {product} few {products} many {products} other {products}}", diff --git a/messages/sl.json b/messages/sl.json index 0653a55d4..fa732c9f8 100644 --- a/messages/sl.json +++ b/messages/sl.json @@ -71,6 +71,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Prevzemi pri", "store/search.filter.shipping.name.pickup-nearby": "Prevzemite blizu", "store/search.filter.shipping.name.pickup-all": "Prevzemi", + "store/search.filter.shipping.action-button.delivery": "Enter location", + "store/search.filter.shipping.action-button.pickup-in-point": "Enter store", "store/search.selected-filters": "Filtrirano po:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {izdelek} two {izdelka} few {izdelkov} other {izdelki}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {izdelek} two {izdelka} few {izdelkov} other {izdelki}}", diff --git a/messages/sv.json b/messages/sv.json index 88b49be3d..8fe6e6fbc 100644 --- a/messages/sv.json +++ b/messages/sv.json @@ -71,6 +71,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Hämta vid", "store/search.filter.shipping.name.pickup-nearby": "Hämtning i närheten", "store/search.filter.shipping.name.pickup-all": "Hämta", + "store/search.filter.shipping.action-button.delivery": "Enter location", + "store/search.filter.shipping.action-button.pickup-in-point": "Enter store", "store/search.selected-filters": "Filtrerad enligt:", "store/search.total-products": "{recordsFiltered} {recordsFiltered, plural, one {produkt} other {produkter}}", "store/search.total-products-2": "{recordsFiltered} {recordsFiltered, plural, one {produkt} other {produkter}}", diff --git a/messages/th.json b/messages/th.json index 0fd9ecd72..4f4e93837 100644 --- a/messages/th.json +++ b/messages/th.json @@ -71,6 +71,8 @@ "store/search.filter.shipping.name.pickup-in-point": "จุดรับสินค้าเอง", "store/search.filter.shipping.name.pickup-nearby": "จุดรับสินค้าบริเวณใกล้เคียง", "store/search.filter.shipping.name.pickup-all": "การรับสินค้าเอง", + "store/search.filter.shipping.action-button.delivery": "ใส่ตำแหน่งที่ตั้ง", + "store/search.filter.shipping.action-button.pickup-in-point": "ใส่ร้านค้า", "store/search.selected-filters": "กรองตาม:", "store/search.total-products": "ผลิตภัณฑ์ {recordsFiltered} {recordsFiltered, plural, other {รายการ}}", "store/search.total-products-2": "ผลิตภัณฑ์ {recordsFiltered} {recordsFiltered, plural, other {รายการ}}", diff --git a/messages/uk.json b/messages/uk.json index a1670efbf..bf13f7376 100644 --- a/messages/uk.json +++ b/messages/uk.json @@ -81,6 +81,8 @@ "store/search.filter.shipping.name.pickup-in-point": "Місце самовивозу", "store/search.filter.shipping.name.pickup-nearby": "Самовивіз поблизу", "store/search.filter.shipping.name.pickup-all": "Самовивіз", + "store/search.filter.shipping.action-button.delivery": "Enter location", + "store/search.filter.shipping.action-button.pickup-in-point": "Enter store", "store/ordenation.button": "Сортувати", "store/ordenation.sort-by": "Критерій сортування", "store/ordenation.relevance": "Релевантність",