@sonic-equipment/ui 221.0.0 → 222.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/algolia/algolia-search-provider.js +2 -2
- package/dist/carousel/carousel.js +1 -1
- package/dist/carousel/usp-carousel/usp-carousel.js +1 -1
- package/dist/exports.d.ts +5 -0
- package/dist/global-search/plugins/categories-plugin.js +1 -1
- package/dist/global-search/plugins/popular-categories-plugin.js +1 -1
- package/dist/global-search/plugins/popular-searches-plugin.d.ts +1 -1
- package/dist/global-search/plugins/popular-searches-plugin.js +1 -1
- package/dist/global-search/plugins/query-suggestions-plugin.d.ts +1 -1
- package/dist/global-search/plugins/query-suggestions-plugin.js +1 -1
- package/dist/global-search/plugins/quick-access-plugin.js +1 -1
- package/dist/global-search/plugins/recent-searches-plugin.d.ts +1 -1
- package/dist/global-search/plugins/recent-searches-plugin.js +1 -2
- package/dist/global-search/search-highlight/highlight.d.ts +1 -1
- package/dist/global-search/search-highlight/highlight.js +1 -1
- package/dist/index.js +5 -0
- package/dist/media/image-lightbox/image-lightbox.js +1 -1
- package/dist/node_modules/.pnpm/@algolia_autocomplete-core@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0_search-insights@2.17.3/node_modules/@algolia/autocomplete-core/dist/esm/createAutocomplete.js +1 -1
- package/dist/node_modules/.pnpm/@algolia_autocomplete-core@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0_search-insights@2.17.3/node_modules/@algolia/autocomplete-core/dist/esm/getDefaultProps.js +2 -2
- package/dist/node_modules/.pnpm/@algolia_autocomplete-core@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0_search-insights@2.17.3/node_modules/@algolia/autocomplete-core/dist/esm/index.js +2 -0
- package/dist/node_modules/.pnpm/@algolia_autocomplete-core@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0_search-insights@2.17.3/node_modules/@algolia/autocomplete-core/dist/esm/utils/getNormalizedSources.js +1 -1
- package/dist/node_modules/.pnpm/@algolia_autocomplete-plugin-query-suggestions@1.19.2_@algolia_client-search@4.24.0_alg_bf126b808dc57984d528cd690af7915e/node_modules/@algolia/autocomplete-plugin-query-suggestions/dist/esm/index.js +2 -0
- package/dist/node_modules/.pnpm/@algolia_autocomplete-preset-algolia@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/isPartHighlighted.js +27 -0
- package/dist/node_modules/.pnpm/@algolia_autocomplete-preset-algolia@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseHighlight.js +8 -0
- package/dist/node_modules/.pnpm/@algolia_autocomplete-preset-algolia@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseSnippet.js +8 -0
- package/dist/node_modules/.pnpm/@algolia_autocomplete-preset-algolia@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitSnippet.js +25 -0
- package/dist/node_modules/.pnpm/{@algolia_autocomplete-plugin-recent-searches@1.19.2_@algolia_client-search@4.24.0_algoliasear_fyqsds3bt3rvcvjy7dxjzgxvaa/node_modules/@algolia/autocomplete-plugin-recent-searches/dist/esm/addHighlightedAttribute.js → @algolia_autocomplete-preset-algolia@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/reverseHighlightedParts.js} +18 -12
- package/dist/node_modules/.pnpm/@algolia_autocomplete-preset-algolia@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/index.js +8 -0
- package/dist/node_modules/.pnpm/{@algolia_autocomplete-plugin-recent-searches@1.19.2_@algolia_client-search@4.24.0_algoliasear_fyqsds3bt3rvcvjy7dxjzgxvaa/node_modules/@algolia/autocomplete-plugin-recent-searches/dist/esm/createLocalStorageRecentSearchesPlugin.js → @algolia_autocomplete-preset-algolia@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/getAlgoliaFacets.js} +21 -39
- package/dist/node_modules/.pnpm/swiper@11.2.10/node_modules/swiper/swiper-react.js +8 -2
- package/dist/shims/algolia/autocomplete-core.d.ts +3 -0
- package/dist/shims/algolia/autocomplete-core.js +5 -0
- package/dist/shims/algolia/autocomplete-plugin-query-suggestions.d.ts +2 -0
- package/dist/shims/algolia/autocomplete-plugin-query-suggestions.js +5 -0
- package/dist/shims/algolia/autocomplete-plugin-recent-searches.d.ts +3 -0
- package/dist/shims/algolia/autocomplete-plugin-recent-searches.js +8 -0
- package/dist/shims/algolia/autocomplete-preset-algolia.d.ts +3 -0
- package/dist/shims/algolia/autocomplete-preset-algolia.js +5 -0
- package/dist/shims/swiper/react.d.ts +95 -0
- package/dist/shims/swiper/react.js +5 -0
- package/package.json +2 -2
- package/dist/node_modules/.pnpm/@algolia_autocomplete-plugin-recent-searches@1.19.2_@algolia_client-search@4.24.0_algoliasear_fyqsds3bt3rvcvjy7dxjzgxvaa/node_modules/@algolia/autocomplete-plugin-recent-searches/dist/esm/constants.js +0 -10
- package/dist/node_modules/.pnpm/@algolia_autocomplete-plugin-recent-searches@1.19.2_@algolia_client-search@4.24.0_algoliasear_fyqsds3bt3rvcvjy7dxjzgxvaa/node_modules/@algolia/autocomplete-plugin-recent-searches/dist/esm/createLocalStorage.js +0 -36
- package/dist/node_modules/.pnpm/@algolia_autocomplete-plugin-recent-searches@1.19.2_@algolia_client-search@4.24.0_algoliasear_fyqsds3bt3rvcvjy7dxjzgxvaa/node_modules/@algolia/autocomplete-plugin-recent-searches/dist/esm/createRecentSearchesPlugin.js +0 -137
- package/dist/node_modules/.pnpm/@algolia_autocomplete-plugin-recent-searches@1.19.2_@algolia_client-search@4.24.0_algoliasear_fyqsds3bt3rvcvjy7dxjzgxvaa/node_modules/@algolia/autocomplete-plugin-recent-searches/dist/esm/createStorageApi.js +0 -16
- package/dist/node_modules/.pnpm/@algolia_autocomplete-plugin-recent-searches@1.19.2_@algolia_client-search@4.24.0_algoliasear_fyqsds3bt3rvcvjy7dxjzgxvaa/node_modules/@algolia/autocomplete-plugin-recent-searches/dist/esm/getLocalStorage.js +0 -33
- package/dist/node_modules/.pnpm/@algolia_autocomplete-plugin-recent-searches@1.19.2_@algolia_client-search@4.24.0_algoliasear_fyqsds3bt3rvcvjy7dxjzgxvaa/node_modules/@algolia/autocomplete-plugin-recent-searches/dist/esm/getTemplates.js +0 -72
- package/dist/node_modules/.pnpm/@algolia_autocomplete-plugin-recent-searches@1.19.2_@algolia_client-search@4.24.0_algoliasear_fyqsds3bt3rvcvjy7dxjzgxvaa/node_modules/@algolia/autocomplete-plugin-recent-searches/dist/esm/search.js +0 -25
- package/dist/node_modules/.pnpm/{@algolia_autocomplete-plugin-algolia-insights@1.19.2_@algolia_client-search@4.24.0_algoliasea_57b3nqmtgbeobm4sw3iw2qdpxy → @algolia_autocomplete-plugin-algolia-insights@1.19.2_@algolia_client-search@4.24.0_algo_a07b7691870c05b2461c74a9a00d6a70}/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createAlgoliaInsightsPlugin.js +2 -2
- /package/dist/node_modules/.pnpm/{@algolia_autocomplete-plugin-algolia-insights@1.19.2_@algolia_client-search@4.24.0_algoliasea_57b3nqmtgbeobm4sw3iw2qdpxy → @algolia_autocomplete-plugin-algolia-insights@1.19.2_@algolia_client-search@4.24.0_algo_a07b7691870c05b2461c74a9a00d6a70}/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createClickedEvent.js +0 -0
- /package/dist/node_modules/.pnpm/{@algolia_autocomplete-plugin-algolia-insights@1.19.2_@algolia_client-search@4.24.0_algoliasea_57b3nqmtgbeobm4sw3iw2qdpxy → @algolia_autocomplete-plugin-algolia-insights@1.19.2_@algolia_client-search@4.24.0_algo_a07b7691870c05b2461c74a9a00d6a70}/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createSearchInsightsApi.js +0 -0
- /package/dist/node_modules/.pnpm/{@algolia_autocomplete-plugin-algolia-insights@1.19.2_@algolia_client-search@4.24.0_algoliasea_57b3nqmtgbeobm4sw3iw2qdpxy → @algolia_autocomplete-plugin-algolia-insights@1.19.2_@algolia_client-search@4.24.0_algo_a07b7691870c05b2461c74a9a00d6a70}/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createViewedEvents.js +0 -0
- /package/dist/node_modules/.pnpm/{@algolia_autocomplete-plugin-algolia-insights@1.19.2_@algolia_client-search@4.24.0_algoliasea_57b3nqmtgbeobm4sw3iw2qdpxy → @algolia_autocomplete-plugin-algolia-insights@1.19.2_@algolia_client-search@4.24.0_algo_a07b7691870c05b2461c74a9a00d6a70}/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isAlgoliaInsightsHit.js +0 -0
- /package/dist/node_modules/.pnpm/{@algolia_autocomplete-plugin-algolia-insights@1.19.2_@algolia_client-search@4.24.0_algoliasea_57b3nqmtgbeobm4sw3iw2qdpxy → @algolia_autocomplete-plugin-algolia-insights@1.19.2_@algolia_client-search@4.24.0_algo_a07b7691870c05b2461c74a9a00d6a70}/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isModernInsightsClient.js +0 -0
- /package/dist/node_modules/.pnpm/{@algolia_autocomplete-plugin-query-suggestions@1.19.2_@algolia_client-search@4.24.0_algoliase_q33j3oaxy2utuyscyksb32r6mu → @algolia_autocomplete-plugin-query-suggestions@1.19.2_@algolia_client-search@4.24.0_alg_bf126b808dc57984d528cd690af7915e}/node_modules/@algolia/autocomplete-plugin-query-suggestions/dist/esm/constants.js +0 -0
- /package/dist/node_modules/.pnpm/{@algolia_autocomplete-plugin-query-suggestions@1.19.2_@algolia_client-search@4.24.0_algoliase_q33j3oaxy2utuyscyksb32r6mu → @algolia_autocomplete-plugin-query-suggestions@1.19.2_@algolia_client-search@4.24.0_alg_bf126b808dc57984d528cd690af7915e}/node_modules/@algolia/autocomplete-plugin-query-suggestions/dist/esm/createQuerySuggestionsPlugin.js +0 -0
- /package/dist/node_modules/.pnpm/{@algolia_autocomplete-plugin-query-suggestions@1.19.2_@algolia_client-search@4.24.0_algoliase_q33j3oaxy2utuyscyksb32r6mu → @algolia_autocomplete-plugin-query-suggestions@1.19.2_@algolia_client-search@4.24.0_alg_bf126b808dc57984d528cd690af7915e}/node_modules/@algolia/autocomplete-plugin-query-suggestions/dist/esm/getTemplates.js +0 -0
|
@@ -12,11 +12,11 @@ import { useLanguageCode } from '../intl/use-language-code.js';
|
|
|
12
12
|
import { useDataLayer } from '../shared/ga/use-data-layer.js';
|
|
13
13
|
import { useDebouncedCallback } from '../shared/hooks/use-debounced-callback.js';
|
|
14
14
|
import { environment } from '../shared/utils/environment.js';
|
|
15
|
+
import { createAutocomplete } from '../shims/algolia/autocomplete-core.js';
|
|
16
|
+
import { getAlgoliaResults } from '../shims/algolia/autocomplete-preset-algolia.js';
|
|
15
17
|
import { getAlgoliaIndex } from './algolia-index-config.js';
|
|
16
18
|
import { AlgoliaInsightsProvider } from './algolia-insights-provider.js';
|
|
17
19
|
import { createSonicSearchClient } from './algolia-sonic-searchclient.js';
|
|
18
|
-
import { createAutocomplete } from '../node_modules/.pnpm/@algolia_autocomplete-core@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0_search-insights@2.17.3/node_modules/@algolia/autocomplete-core/dist/esm/createAutocomplete.js';
|
|
19
|
-
import { getAlgoliaResults } from '../node_modules/.pnpm/@algolia_autocomplete-preset-algolia@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/getAlgoliaResults.js';
|
|
20
20
|
|
|
21
21
|
const GlobalSearchContext = createContext(null);
|
|
22
22
|
function AlgoliaSearchProvider({ children, searchClient: _searchClient, }) {
|
|
@@ -4,9 +4,9 @@ import { useState, useRef, useMemo } from 'react';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import Navigation from '../node_modules/.pnpm/swiper@11.2.10/node_modules/swiper/modules/navigation.js';
|
|
6
6
|
import freeMode from '../node_modules/.pnpm/swiper@11.2.10/node_modules/swiper/modules/free-mode.js';
|
|
7
|
-
import { Swiper, SwiperSlide } from '../node_modules/.pnpm/swiper@11.2.10/node_modules/swiper/swiper-react.js';
|
|
8
7
|
import { breakpoints } from '../shared/utils/breakpoints.js';
|
|
9
8
|
import { deepMerge } from '../shared/utils/merge.js';
|
|
9
|
+
import { Swiper, SwiperSlide } from '../shims/swiper/react.js';
|
|
10
10
|
import { CarouselNavigationButton } from './carousel-navigation-button.js';
|
|
11
11
|
import styles from './carousel.module.css.js';
|
|
12
12
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useRef, useState } from 'react';
|
|
4
|
-
import { Swiper, SwiperSlide } from '../../
|
|
4
|
+
import { Swiper, SwiperSlide } from '../../shims/swiper/react.js';
|
|
5
5
|
import { CarouselPagination } from '../pagination/pagination.js';
|
|
6
6
|
import styles from './usp-carousel.module.css.js';
|
|
7
7
|
|
package/dist/exports.d.ts
CHANGED
|
@@ -462,6 +462,11 @@ export * from './shared/utils/string';
|
|
|
462
462
|
export * from './shared/utils/time';
|
|
463
463
|
export * from './shared/utils/types';
|
|
464
464
|
export * from './shared/utils/uuid';
|
|
465
|
+
export * from './shims/algolia/autocomplete-core';
|
|
466
|
+
export * from './shims/algolia/autocomplete-plugin-query-suggestions';
|
|
467
|
+
export * from './shims/algolia/autocomplete-plugin-recent-searches';
|
|
468
|
+
export * from './shims/algolia/autocomplete-preset-algolia';
|
|
469
|
+
export * from './shims/swiper/react';
|
|
465
470
|
export * from './sidebar/sidebar';
|
|
466
471
|
export * from './sidebar/sidebar-provider';
|
|
467
472
|
export * from './sidebar/toggle-sidebar-button';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { getAlgoliaResults } from '../../
|
|
2
|
+
import { getAlgoliaResults } from '../../shims/algolia/autocomplete-preset-algolia.js';
|
|
3
3
|
|
|
4
4
|
const categoriesPlugin = ({ productsIndexName, searchClient, }) => {
|
|
5
5
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { getAlgoliaResults } from '../../
|
|
2
|
+
import { getAlgoliaResults } from '../../shims/algolia/autocomplete-preset-algolia.js';
|
|
3
3
|
|
|
4
4
|
const popularCategoriesPlugin = ({ productsIndexName, searchClient, }) => {
|
|
5
5
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createQuerySuggestionsPlugin } from '@algolia/autocomplete-plugin-query-suggestions/dist/esm';
|
|
2
1
|
import { Hit } from '@algolia/client-search';
|
|
3
2
|
import { SearchClient } from 'algoliasearch';
|
|
3
|
+
import { createQuerySuggestionsPlugin } from '../../shims/algolia/autocomplete-plugin-query-suggestions';
|
|
4
4
|
export type PopularSearchHit = Hit<{
|
|
5
5
|
nb_words: number;
|
|
6
6
|
popularity: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { createQuerySuggestionsPlugin } from '../../
|
|
2
|
+
import { createQuerySuggestionsPlugin } from '../../shims/algolia/autocomplete-plugin-query-suggestions.js';
|
|
3
3
|
|
|
4
4
|
const popularSearchesPlugin = ({ searchClient, suggestionsIndexName, }) => createQuerySuggestionsPlugin({
|
|
5
5
|
getSearchParams() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createQuerySuggestionsPlugin } from '@algolia/autocomplete-plugin-query-suggestions/dist/esm';
|
|
2
1
|
import { Hit } from '@algolia/client-search';
|
|
3
2
|
import { SearchClient } from 'algoliasearch';
|
|
3
|
+
import { createQuerySuggestionsPlugin } from '../../shims/algolia/autocomplete-plugin-query-suggestions';
|
|
4
4
|
export type QuerySuggestionHit = Hit<{
|
|
5
5
|
nb_words: number;
|
|
6
6
|
popularity: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { createQuerySuggestionsPlugin } from '../../
|
|
2
|
+
import { createQuerySuggestionsPlugin } from '../../shims/algolia/autocomplete-plugin-query-suggestions.js';
|
|
3
3
|
|
|
4
4
|
const querySuggestionsPlugin = ({ searchClient, suggestionsIndexName, }) => createQuerySuggestionsPlugin({
|
|
5
5
|
getSearchParams({ state }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { getAlgoliaResults } from '../../
|
|
2
|
+
import { getAlgoliaResults } from '../../shims/algolia/autocomplete-preset-algolia.js';
|
|
3
3
|
|
|
4
4
|
const quickAccessPlugin = ({ productsIndexName, searchClient, }) => {
|
|
5
5
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createLocalStorageRecentSearchesPlugin } from '@algolia/autocomplete-plugin-recent-searches/dist/esm';
|
|
2
1
|
import { Hit } from '@algolia/client-search';
|
|
2
|
+
import { createLocalStorageRecentSearchesPlugin } from '../../shims/algolia/autocomplete-plugin-recent-searches';
|
|
3
3
|
export type RecentSearchHit = Hit<{
|
|
4
4
|
id: string;
|
|
5
5
|
label: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { createLocalStorageRecentSearchesPlugin } from '../../
|
|
3
|
-
import { search } from '../../node_modules/.pnpm/@algolia_autocomplete-plugin-recent-searches@1.19.2_@algolia_client-search@4.24.0_algoliasear_fyqsds3bt3rvcvjy7dxjzgxvaa/node_modules/@algolia/autocomplete-plugin-recent-searches/dist/esm/search.js';
|
|
2
|
+
import { createLocalStorageRecentSearchesPlugin, search } from '../../shims/algolia/autocomplete-plugin-recent-searches.js';
|
|
4
3
|
|
|
5
4
|
const recentSearchesPlugin = createLocalStorageRecentSearchesPlugin({
|
|
6
5
|
key: 'recent-algolia-searches',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
-
import { HighlightedHit } from '
|
|
2
|
+
import { HighlightedHit } from '../../shims/algolia/autocomplete-preset-algolia';
|
|
3
3
|
type HighlightHitParams<THit> = {
|
|
4
4
|
/**
|
|
5
5
|
* The attribute to retrieve the highlighted parts from.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { createElement, Fragment } from 'react';
|
|
3
|
-
import { parseAlgoliaHitHighlight } from '../../
|
|
3
|
+
import { parseAlgoliaHitHighlight } from '../../shims/algolia/autocomplete-preset-algolia.js';
|
|
4
4
|
|
|
5
5
|
function Highlight({ attribute, hit, tagName = 'mark', }) {
|
|
6
6
|
return createElement(Fragment, {}, parseAlgoliaHitHighlight({ attribute, hit }).map(({ isHighlighted, value }, index) => {
|
package/dist/index.js
CHANGED
|
@@ -461,6 +461,11 @@ export { camelCase } from './shared/utils/string.js';
|
|
|
461
461
|
export { TIME } from './shared/utils/time.js';
|
|
462
462
|
export { has, hasNo, isObject } from './shared/utils/types.js';
|
|
463
463
|
export { createUUID, isUUID } from './shared/utils/uuid.js';
|
|
464
|
+
export { createAutocomplete } from './shims/algolia/autocomplete-core.js';
|
|
465
|
+
export { createQuerySuggestionsPlugin } from './shims/algolia/autocomplete-plugin-query-suggestions.js';
|
|
466
|
+
export { createLocalStorageRecentSearchesPlugin, search } from './shims/algolia/autocomplete-plugin-recent-searches.js';
|
|
467
|
+
export { getAlgoliaResults, parseAlgoliaHitHighlight } from './shims/algolia/autocomplete-preset-algolia.js';
|
|
468
|
+
export { Swiper, SwiperSlide } from './shims/swiper/react.js';
|
|
464
469
|
export { Sidebar } from './sidebar/sidebar.js';
|
|
465
470
|
export { SidebarDetectBreakpoint, SidebarProvider } from './sidebar/sidebar-provider.js';
|
|
466
471
|
export { ToggleSidebarButton } from './sidebar/toggle-sidebar-button.js';
|
|
@@ -4,9 +4,9 @@ import { useState, useRef } from 'react';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import Navigation from '../../node_modules/.pnpm/swiper@11.2.10/node_modules/swiper/modules/navigation.js';
|
|
6
6
|
import Thumb from '../../node_modules/.pnpm/swiper@11.2.10/node_modules/swiper/modules/thumbs.js';
|
|
7
|
-
import { Swiper, SwiperSlide } from '../../node_modules/.pnpm/swiper@11.2.10/node_modules/swiper/swiper-react.js';
|
|
8
7
|
import { CarouselNavigationButton } from '../../carousel/carousel-navigation-button.js';
|
|
9
8
|
import { CarouselPagination } from '../../carousel/pagination/pagination.js';
|
|
9
|
+
import { Swiper, SwiperSlide } from '../../shims/swiper/react.js';
|
|
10
10
|
import { Image } from '../image/image.js';
|
|
11
11
|
import styles from './image-lightbox.module.css.js';
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@ import { getPropGetters } from './getPropGetters.js';
|
|
|
6
6
|
import { injectMetadata, getMetadata } from './metadata.js';
|
|
7
7
|
import { onInput } from './onInput.js';
|
|
8
8
|
import { stateReducer } from './stateReducer.js';
|
|
9
|
-
import { createAlgoliaInsightsPlugin } from '../../../../../../@algolia_autocomplete-plugin-algolia-insights@1.19.2_@algolia_client-search@4.24.
|
|
9
|
+
import { createAlgoliaInsightsPlugin } from '../../../../../../@algolia_autocomplete-plugin-algolia-insights@1.19.2_@algolia_client-search@4.24.0_algo_a07b7691870c05b2461c74a9a00d6a70/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createAlgoliaInsightsPlugin.js';
|
|
10
10
|
|
|
11
11
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
12
12
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getItemsCount } from '../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/getItemsCount.js';
|
|
2
|
-
import { generateAutocompleteId } from '../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/generateAutocompleteId.js';
|
|
3
1
|
import { getNormalizedSources } from './utils/getNormalizedSources.js';
|
|
2
|
+
import { generateAutocompleteId } from '../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/generateAutocompleteId.js';
|
|
3
|
+
import { getItemsCount } from '../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/getItemsCount.js';
|
|
4
4
|
import { flatten } from '../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/flatten.js';
|
|
5
5
|
|
|
6
6
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { invariant } from '../../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/invariant.js';
|
|
2
1
|
import { decycle } from '../../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/decycle.js';
|
|
2
|
+
import { invariant } from '../../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/invariant.js';
|
|
3
3
|
import { noop } from '../../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/noop.js';
|
|
4
4
|
|
|
5
5
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var htmlEscapes = {
|
|
2
|
+
'&': '&',
|
|
3
|
+
'<': '<',
|
|
4
|
+
'>': '>',
|
|
5
|
+
'"': '"',
|
|
6
|
+
''': "'"
|
|
7
|
+
};
|
|
8
|
+
var hasAlphanumeric = new RegExp(/\w/i);
|
|
9
|
+
var regexEscapedHtml = /&(amp|quot|lt|gt|#39);/g;
|
|
10
|
+
var regexHasEscapedHtml = RegExp(regexEscapedHtml.source);
|
|
11
|
+
function unescape(value) {
|
|
12
|
+
return value && regexHasEscapedHtml.test(value) ? value.replace(regexEscapedHtml, function (character) {
|
|
13
|
+
return htmlEscapes[character];
|
|
14
|
+
}) : value;
|
|
15
|
+
}
|
|
16
|
+
function isPartHighlighted(parts, i) {
|
|
17
|
+
var _parts, _parts2;
|
|
18
|
+
var current = parts[i];
|
|
19
|
+
var isNextHighlighted = ((_parts = parts[i + 1]) === null || _parts === void 0 ? void 0 : _parts.isHighlighted) || true;
|
|
20
|
+
var isPreviousHighlighted = ((_parts2 = parts[i - 1]) === null || _parts2 === void 0 ? void 0 : _parts2.isHighlighted) || true;
|
|
21
|
+
if (!hasAlphanumeric.test(unescape(current.value)) && isPreviousHighlighted === isNextHighlighted) {
|
|
22
|
+
return isPreviousHighlighted;
|
|
23
|
+
}
|
|
24
|
+
return current.isHighlighted;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { isPartHighlighted };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { parseAlgoliaHitHighlight } from './parseAlgoliaHitHighlight.js';
|
|
2
|
+
import { reverseHighlightedParts } from './reverseHighlightedParts.js';
|
|
3
|
+
|
|
4
|
+
function parseAlgoliaHitReverseHighlight(props) {
|
|
5
|
+
return reverseHighlightedParts(parseAlgoliaHitHighlight(props));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export { parseAlgoliaHitReverseHighlight };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { parseAlgoliaHitSnippet } from './parseAlgoliaHitSnippet.js';
|
|
2
|
+
import { reverseHighlightedParts } from './reverseHighlightedParts.js';
|
|
3
|
+
|
|
4
|
+
function parseAlgoliaHitReverseSnippet(props) {
|
|
5
|
+
return reverseHighlightedParts(parseAlgoliaHitSnippet(props));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export { parseAlgoliaHitReverseSnippet };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { parseAttribute } from './parseAttribute.js';
|
|
2
|
+
import { getAttributeValueByPath } from '../../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/getAttributeValueByPath.js';
|
|
3
|
+
import { warn } from '../../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/warn.js';
|
|
4
|
+
|
|
5
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
9
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
10
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
|
+
function parseAlgoliaHitSnippet(_ref) {
|
|
12
|
+
var hit = _ref.hit,
|
|
13
|
+
attribute = _ref.attribute;
|
|
14
|
+
var path = Array.isArray(attribute) ? attribute : [attribute];
|
|
15
|
+
var highlightedValue = getAttributeValueByPath(hit, ['_snippetResult'].concat(_toConsumableArray(path), ['value']));
|
|
16
|
+
if (typeof highlightedValue !== 'string') {
|
|
17
|
+
process.env.NODE_ENV !== 'production' ? warn(false, "The attribute \"".concat(path.join('.'), "\" described by the path ").concat(JSON.stringify(path), " does not exist on the hit. Did you set it in `attributesToSnippet`?") + '\nSee https://www.algolia.com/doc/api-reference/api-parameters/attributesToSnippet/') : void 0;
|
|
18
|
+
highlightedValue = getAttributeValueByPath(hit, path) || '';
|
|
19
|
+
}
|
|
20
|
+
return parseAttribute({
|
|
21
|
+
highlightedValue: highlightedValue
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { parseAlgoliaHitSnippet };
|
|
@@ -1,21 +1,27 @@
|
|
|
1
|
+
import { isPartHighlighted } from './isPartHighlighted.js';
|
|
2
|
+
|
|
1
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
8
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
function reverseHighlightedParts(parts) {
|
|
10
|
+
// We don't want to highlight the whole word when no parts match.
|
|
11
|
+
if (!parts.some(function (part) {
|
|
12
|
+
return part.isHighlighted;
|
|
13
|
+
})) {
|
|
14
|
+
return parts.map(function (part) {
|
|
15
|
+
return _objectSpread(_objectSpread({}, part), {}, {
|
|
16
|
+
isHighlighted: false
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return parts.map(function (part, i) {
|
|
21
|
+
return _objectSpread(_objectSpread({}, part), {}, {
|
|
22
|
+
isHighlighted: !isPartHighlighted(parts, i)
|
|
23
|
+
});
|
|
18
24
|
});
|
|
19
25
|
}
|
|
20
26
|
|
|
21
|
-
export {
|
|
27
|
+
export { reverseHighlightedParts };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { parseAlgoliaHitHighlight } from './highlight/parseAlgoliaHitHighlight.js';
|
|
2
|
+
export { parseAlgoliaHitReverseHighlight } from './highlight/parseAlgoliaHitReverseHighlight.js';
|
|
3
|
+
export { parseAlgoliaHitReverseSnippet } from './highlight/parseAlgoliaHitReverseSnippet.js';
|
|
4
|
+
export { parseAlgoliaHitSnippet } from './highlight/parseAlgoliaHitSnippet.js';
|
|
5
|
+
export { createRequester } from './requester/createRequester.js';
|
|
6
|
+
export { getAlgoliaFacets } from './requester/getAlgoliaFacets.js';
|
|
7
|
+
export { getAlgoliaResults } from './requester/getAlgoliaResults.js';
|
|
8
|
+
export { fetchAlgoliaResults } from './search/fetchAlgoliaResults.js';
|
|
@@ -1,49 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { createRecentSearchesPlugin } from './createRecentSearchesPlugin.js';
|
|
4
|
-
import { search } from './search.js';
|
|
1
|
+
import { createAlgoliaRequester } from './createAlgoliaRequester.js';
|
|
2
|
+
import { invariant } from '../../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/invariant.js';
|
|
5
3
|
|
|
6
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
7
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
11
8
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
limit: limit,
|
|
23
|
-
search: search
|
|
24
|
-
});
|
|
25
|
-
var recentSearchesPlugin = createRecentSearchesPlugin({
|
|
26
|
-
transformSource: transformSource,
|
|
27
|
-
storage: storage,
|
|
28
|
-
subscribe: subscribe,
|
|
29
|
-
translations: translations
|
|
30
|
-
});
|
|
31
|
-
return _objectSpread(_objectSpread({}, recentSearchesPlugin), {}, {
|
|
32
|
-
name: 'aa.localStorageRecentSearchesPlugin',
|
|
33
|
-
__autocomplete_pluginOptions: options
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
function getOptions(options) {
|
|
37
|
-
return _objectSpread(_objectSpread({
|
|
38
|
-
limit: 5,
|
|
39
|
-
search: search,
|
|
40
|
-
transformSource: function transformSource(_ref) {
|
|
41
|
-
var source = _ref.source;
|
|
42
|
-
return source;
|
|
9
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Retrieves Algolia facet hits from multiple indices.
|
|
13
|
+
*/
|
|
14
|
+
function getAlgoliaFacets(requestParams) {
|
|
15
|
+
invariant(_typeof(requestParams.searchClient) === 'object', 'The `searchClient` parameter is required for getAlgoliaFacets({ searchClient }).');
|
|
16
|
+
var requester = createAlgoliaRequester({
|
|
17
|
+
transformResponse: function transformResponse(response) {
|
|
18
|
+
return response.facetHits;
|
|
43
19
|
}
|
|
44
|
-
}, options), {}, {
|
|
45
|
-
translations: _objectSpread(_objectSpread({}, defaultTranslations), options.translations)
|
|
46
20
|
});
|
|
21
|
+
var queries = requestParams.queries.map(function (query) {
|
|
22
|
+
return _objectSpread(_objectSpread({}, query), {}, {
|
|
23
|
+
type: 'facet'
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
return requester(_objectSpread(_objectSpread({}, requestParams), {}, {
|
|
27
|
+
queries: queries
|
|
28
|
+
}));
|
|
47
29
|
}
|
|
48
30
|
|
|
49
|
-
export {
|
|
31
|
+
export { getAlgoliaFacets };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef, useState, useRef, useEffect, createContext, useLayoutEffect } from 'react';
|
|
1
|
+
import React, { forwardRef, useState, useRef, useEffect, createContext, useLayoutEffect, useContext } from 'react';
|
|
2
2
|
import { S as Swiper$1 } from './shared/swiper-core.js';
|
|
3
3
|
import { g as getParams, m as mountSwiper, a as getChangedParams, u as updateOnVirtualData } from './shared/update-on-virtual-data.js';
|
|
4
4
|
import { d as uniqueClasses, w as wrapperClass, n as needsNavigation, b as needsScrollbar, a as needsPagination, e as extend, u as updateSwiper } from './shared/update-swiper.js';
|
|
@@ -120,7 +120,13 @@ function useIsomorphicLayoutEffect(callback, deps) {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
const SwiperSlideContext = /*#__PURE__*/createContext(null);
|
|
123
|
+
const useSwiperSlide = () => {
|
|
124
|
+
return useContext(SwiperSlideContext);
|
|
125
|
+
};
|
|
123
126
|
const SwiperContext = /*#__PURE__*/createContext(null);
|
|
127
|
+
const useSwiper = () => {
|
|
128
|
+
return useContext(SwiperContext);
|
|
129
|
+
};
|
|
124
130
|
|
|
125
131
|
const Swiper = /*#__PURE__*/forwardRef(function (_temp, externalElRef) {
|
|
126
132
|
let {
|
|
@@ -386,4 +392,4 @@ const SwiperSlide = /*#__PURE__*/forwardRef(function (_temp, externalRef) {
|
|
|
386
392
|
});
|
|
387
393
|
SwiperSlide.displayName = 'SwiperSlide';
|
|
388
394
|
|
|
389
|
-
export { Swiper, SwiperSlide };
|
|
395
|
+
export { Swiper, SwiperSlide, useSwiper, useSwiperSlide };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as index from '../../node_modules/.pnpm/@algolia_autocomplete-core@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0_search-insights@2.17.3/node_modules/@algolia/autocomplete-core/dist/esm/index.js';
|
|
2
|
+
|
|
3
|
+
const { createAutocomplete } = index;
|
|
4
|
+
|
|
5
|
+
export { createAutocomplete };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as index from '../../node_modules/.pnpm/@algolia_autocomplete-plugin-query-suggestions@1.19.2_@algolia_client-search@4.24.0_alg_bf126b808dc57984d528cd690af7915e/node_modules/@algolia/autocomplete-plugin-query-suggestions/dist/esm/index.js';
|
|
2
|
+
|
|
3
|
+
const { createQuerySuggestionsPlugin } = index;
|
|
4
|
+
|
|
5
|
+
export { createQuerySuggestionsPlugin };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as module1 from '@algolia/autocomplete-plugin-recent-searches';
|
|
2
|
+
|
|
3
|
+
const { search } = module1;
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5
|
+
const createLocalStorageRecentSearchesPlugin = module1.default
|
|
6
|
+
.createLocalStorageRecentSearchesPlugin;
|
|
7
|
+
|
|
8
|
+
export { createLocalStorageRecentSearchesPlugin, search };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as requester from '@algolia/autocomplete-preset-algolia/dist/esm';
|
|
2
|
+
export declare const getAlgoliaResults: typeof requester.getAlgoliaResults, parseAlgoliaHitHighlight: typeof requester.parseAlgoliaHitHighlight;
|
|
3
|
+
export type { HighlightedHit } from '@algolia/autocomplete-preset-algolia/dist/esm';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as index from '../../node_modules/.pnpm/@algolia_autocomplete-preset-algolia@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/index.js';
|
|
2
|
+
|
|
3
|
+
const { getAlgoliaResults, parseAlgoliaHitHighlight } = index;
|
|
4
|
+
|
|
5
|
+
export { getAlgoliaResults, parseAlgoliaHitHighlight };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as module from 'swiper/react';
|
|
2
|
+
export declare const Swiper: React.FunctionComponent<React.RefAttributes<module.SwiperRef> & Omit<React.HTMLAttributes<HTMLElement>, "onClick" | "onKeyPress" | "onProgress" | "onResize" | "onDoubleClick" | "onTouchEnd" | "onTouchMove" | "onTouchStart" | "onScroll" | "onTransitionEnd"> & import("swiper/types").SwiperOptions & {
|
|
3
|
+
tag?: string;
|
|
4
|
+
wrapperTag?: string;
|
|
5
|
+
onSwiper?: (swiper: module.SwiperClass) => void;
|
|
6
|
+
onAutoplayStart?: (swiper: module.SwiperClass) => void;
|
|
7
|
+
onAutoplayStop?: (swiper: module.SwiperClass) => void;
|
|
8
|
+
onAutoplayPause?: (swiper: module.SwiperClass) => void;
|
|
9
|
+
onAutoplayResume?: (swiper: module.SwiperClass) => void;
|
|
10
|
+
onAutoplayTimeLeft?: (swiper: module.SwiperClass, timeLeft: number, percentage: number) => void;
|
|
11
|
+
onAutoplay?: (swiper: module.SwiperClass) => void;
|
|
12
|
+
onHashChange?: (swiper: module.SwiperClass) => void;
|
|
13
|
+
onHashSet?: (swiper: module.SwiperClass) => void;
|
|
14
|
+
onKeyPress?: (swiper: module.SwiperClass, keyCode: string) => void;
|
|
15
|
+
onNavigationHide?: (swiper: module.SwiperClass) => void;
|
|
16
|
+
onNavigationShow?: (swiper: module.SwiperClass) => void;
|
|
17
|
+
onNavigationPrev?: (swiper: module.SwiperClass) => void;
|
|
18
|
+
onNavigationNext?: (swiper: module.SwiperClass) => void;
|
|
19
|
+
onScroll?: (swiper: module.SwiperClass, event: WheelEvent) => void;
|
|
20
|
+
onScrollbarDragStart?: (swiper: module.SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
|
|
21
|
+
onScrollbarDragMove?: (swiper: module.SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
|
|
22
|
+
onScrollbarDragEnd?: (swiper: module.SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
|
|
23
|
+
onPaginationRender?: (swiper: module.SwiperClass, paginationEl: HTMLElement) => void;
|
|
24
|
+
onPaginationUpdate?: (swiper: module.SwiperClass, paginationEl: HTMLElement) => void;
|
|
25
|
+
onPaginationHide?: (swiper: module.SwiperClass) => void;
|
|
26
|
+
onPaginationShow?: (swiper: module.SwiperClass) => void;
|
|
27
|
+
onZoomChange?: (swiper: module.SwiperClass, scale: number, imageEl: HTMLElement, slideEl: HTMLElement) => void;
|
|
28
|
+
onInit?: (swiper: module.SwiperClass) => any;
|
|
29
|
+
onBeforeDestroy?: (swiper: module.SwiperClass) => void;
|
|
30
|
+
onSlidesUpdated?: (swiper: module.SwiperClass) => void;
|
|
31
|
+
onSlideChange?: (swiper: module.SwiperClass) => void;
|
|
32
|
+
onSlideChangeTransitionStart?: (swiper: module.SwiperClass) => void;
|
|
33
|
+
onSlideChangeTransitionEnd?: (swiper: module.SwiperClass) => void;
|
|
34
|
+
onSlideNextTransitionStart?: (swiper: module.SwiperClass) => void;
|
|
35
|
+
onSlideNextTransitionEnd?: (swiper: module.SwiperClass) => void;
|
|
36
|
+
onSlidePrevTransitionStart?: (swiper: module.SwiperClass) => void;
|
|
37
|
+
onSlidePrevTransitionEnd?: (swiper: module.SwiperClass) => void;
|
|
38
|
+
onTransitionStart?: (swiper: module.SwiperClass) => void;
|
|
39
|
+
onTransitionEnd?: (swiper: module.SwiperClass) => void;
|
|
40
|
+
onTouchStart?: (swiper: module.SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
|
|
41
|
+
onTouchMove?: (swiper: module.SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
|
|
42
|
+
onTouchMoveOpposite?: (swiper: module.SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
|
|
43
|
+
onSliderMove?: (swiper: module.SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
|
|
44
|
+
onTouchEnd?: (swiper: module.SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
|
|
45
|
+
onClick?: (swiper: module.SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
|
|
46
|
+
onTap?: (swiper: module.SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
|
|
47
|
+
onDoubleTap?: (swiper: module.SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
|
|
48
|
+
onProgress?: (swiper: module.SwiperClass, progress: number) => void;
|
|
49
|
+
onReachBeginning?: (swiper: module.SwiperClass) => void;
|
|
50
|
+
onReachEnd?: (swiper: module.SwiperClass) => void;
|
|
51
|
+
onToEdge?: (swiper: module.SwiperClass) => void;
|
|
52
|
+
onFromEdge?: (swiper: module.SwiperClass) => void;
|
|
53
|
+
onSetTranslate?: (swiper: module.SwiperClass, translate: number) => void;
|
|
54
|
+
onSetTransition?: (swiper: module.SwiperClass, transition: number) => void;
|
|
55
|
+
onResize?: (swiper: module.SwiperClass) => void;
|
|
56
|
+
onObserverUpdate?: (swiper: module.SwiperClass) => void;
|
|
57
|
+
onBeforeLoopFix?: (swiper: module.SwiperClass) => void;
|
|
58
|
+
onLoopFix?: (swiper: module.SwiperClass) => void;
|
|
59
|
+
onBreakpoint?: (swiper: module.SwiperClass, breakpointParams: import("swiper/types").SwiperOptions) => void;
|
|
60
|
+
_beforeBreakpoint?: (swiper: module.SwiperClass, breakpointParams: import("swiper/types").SwiperOptions) => void;
|
|
61
|
+
_containerClasses?: (swiper: module.SwiperClass, classNames: string) => void;
|
|
62
|
+
_slideClass?: (swiper: module.SwiperClass, slideEl: HTMLElement, classNames: string) => void;
|
|
63
|
+
_slideClasses?: (swiper: module.SwiperClass, slides: {
|
|
64
|
+
slideEl: HTMLElement;
|
|
65
|
+
classNames: string;
|
|
66
|
+
index: number;
|
|
67
|
+
}[]) => void;
|
|
68
|
+
_swiper?: (swiper: module.SwiperClass) => void;
|
|
69
|
+
_freeModeNoMomentumRelease?: (swiper: module.SwiperClass) => void;
|
|
70
|
+
onActiveIndexChange?: (swiper: module.SwiperClass) => void;
|
|
71
|
+
onSnapIndexChange?: (swiper: module.SwiperClass) => void;
|
|
72
|
+
onRealIndexChange?: (swiper: module.SwiperClass) => void;
|
|
73
|
+
onAfterInit?: (swiper: module.SwiperClass) => void;
|
|
74
|
+
onBeforeInit?: (swiper: module.SwiperClass) => void;
|
|
75
|
+
onBeforeResize?: (swiper: module.SwiperClass) => void;
|
|
76
|
+
onBeforeSlideChangeStart?: (swiper: module.SwiperClass) => void;
|
|
77
|
+
onBeforeTransitionStart?: (swiper: module.SwiperClass, speed: number, internal: any) => void;
|
|
78
|
+
onChangeDirection?: (swiper: module.SwiperClass) => void;
|
|
79
|
+
onDoubleClick?: (swiper: module.SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
|
|
80
|
+
onDestroy?: (swiper: module.SwiperClass) => void;
|
|
81
|
+
onMomentumBounce?: (swiper: module.SwiperClass) => void;
|
|
82
|
+
onOrientationchange?: (swiper: module.SwiperClass) => void;
|
|
83
|
+
onSlideResetTransitionStart?: (swiper: module.SwiperClass) => void;
|
|
84
|
+
onSlideResetTransitionEnd?: (swiper: module.SwiperClass) => void;
|
|
85
|
+
onSliderFirstMove?: (swiper: module.SwiperClass, event: TouchEvent) => void;
|
|
86
|
+
onSlidesLengthChange?: (swiper: module.SwiperClass) => void;
|
|
87
|
+
onSlidesGridLengthChange?: (swiper: module.SwiperClass) => void;
|
|
88
|
+
onSnapGridLengthChange?: (swiper: module.SwiperClass) => void;
|
|
89
|
+
onUpdate?: (swiper: module.SwiperClass) => void;
|
|
90
|
+
onLock?: (swiper: module.SwiperClass) => void;
|
|
91
|
+
onUnlock?: (swiper: module.SwiperClass) => void;
|
|
92
|
+
} & {
|
|
93
|
+
children?: React.ReactNode | undefined;
|
|
94
|
+
}>, SwiperSlide: React.FunctionComponent<module.SwiperSlideProps>;
|
|
95
|
+
export type { SwiperClass } from 'swiper/react';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sonic-equipment/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "222.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -149,5 +149,5 @@
|
|
|
149
149
|
"publishConfig": {
|
|
150
150
|
"access": "public"
|
|
151
151
|
},
|
|
152
|
-
"packageManager": "pnpm@
|
|
152
|
+
"packageManager": "pnpm@10.16.1"
|
|
153
153
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
var LOCAL_STORAGE_KEY = 'AUTOCOMPLETE_RECENT_SEARCHES';
|
|
2
|
-
var LOCAL_STORAGE_KEY_TEST = '__AUTOCOMPLETE_RECENT_SEARCHES_PLUGIN_TEST_KEY__';
|
|
3
|
-
var defaultTranslations = {
|
|
4
|
-
removeSearchTitle: 'Remove this search',
|
|
5
|
-
fillQueryTitle: function fillQueryTitle(text) {
|
|
6
|
-
return "Fill query with \"".concat(text, "\"");
|
|
7
|
-
}
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export { LOCAL_STORAGE_KEY, LOCAL_STORAGE_KEY_TEST, defaultTranslations };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { getLocalStorage } from './getLocalStorage.js';
|
|
2
|
-
|
|
3
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
7
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
8
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
-
function createLocalStorage(_ref) {
|
|
10
|
-
var key = _ref.key,
|
|
11
|
-
limit = _ref.limit,
|
|
12
|
-
search = _ref.search;
|
|
13
|
-
var storage = getLocalStorage({
|
|
14
|
-
key: key
|
|
15
|
-
});
|
|
16
|
-
return {
|
|
17
|
-
onAdd: function onAdd(item) {
|
|
18
|
-
storage.setItem([item].concat(_toConsumableArray(storage.getItem())));
|
|
19
|
-
},
|
|
20
|
-
onRemove: function onRemove(id) {
|
|
21
|
-
storage.setItem(storage.getItem().filter(function (x) {
|
|
22
|
-
return x.id !== id;
|
|
23
|
-
}));
|
|
24
|
-
},
|
|
25
|
-
getAll: function getAll() {
|
|
26
|
-
var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
27
|
-
return search({
|
|
28
|
-
query: query,
|
|
29
|
-
items: storage.getItem(),
|
|
30
|
-
limit: limit
|
|
31
|
-
}).slice(0, limit);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export { createLocalStorage };
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { defaultTranslations } from './constants.js';
|
|
2
|
-
import { createStorageApi } from './createStorageApi.js';
|
|
3
|
-
import { getTemplates } from './getTemplates.js';
|
|
4
|
-
import { createRef } from '../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/createRef.js';
|
|
5
|
-
import { warn } from '../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/warn.js';
|
|
6
|
-
|
|
7
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
8
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
9
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
12
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
13
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
14
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
19
|
-
function getDefaultSubscribe(store) {
|
|
20
|
-
return function subscribe(_ref) {
|
|
21
|
-
var onSelect = _ref.onSelect;
|
|
22
|
-
onSelect(function (_ref2) {
|
|
23
|
-
var item = _ref2.item,
|
|
24
|
-
state = _ref2.state,
|
|
25
|
-
source = _ref2.source;
|
|
26
|
-
var inputValue = source.getItemInputValue({
|
|
27
|
-
item: item,
|
|
28
|
-
state: state
|
|
29
|
-
});
|
|
30
|
-
if (source.sourceId === 'querySuggestionsPlugin' && inputValue) {
|
|
31
|
-
var recentItem = {
|
|
32
|
-
id: inputValue,
|
|
33
|
-
label: inputValue,
|
|
34
|
-
category: item.__autocomplete_qsCategory
|
|
35
|
-
};
|
|
36
|
-
store.addItem(recentItem);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function createRecentSearchesPlugin(options) {
|
|
42
|
-
var _getOptions = getOptions(options),
|
|
43
|
-
storage = _getOptions.storage,
|
|
44
|
-
transformSource = _getOptions.transformSource,
|
|
45
|
-
subscribe = _getOptions.subscribe,
|
|
46
|
-
translations = _getOptions.translations;
|
|
47
|
-
var store = createStorageApi(storage);
|
|
48
|
-
var lastItemsRef = createRef([]);
|
|
49
|
-
return {
|
|
50
|
-
name: 'aa.recentSearchesPlugin',
|
|
51
|
-
subscribe: subscribe !== null && subscribe !== void 0 ? subscribe : getDefaultSubscribe(store),
|
|
52
|
-
onSubmit: function onSubmit(_ref3) {
|
|
53
|
-
var state = _ref3.state;
|
|
54
|
-
var query = state.query;
|
|
55
|
-
if (query) {
|
|
56
|
-
var recentItem = {
|
|
57
|
-
id: query,
|
|
58
|
-
label: query
|
|
59
|
-
};
|
|
60
|
-
store.addItem(recentItem);
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
getSources: function getSources(_ref4) {
|
|
64
|
-
var query = _ref4.query,
|
|
65
|
-
setQuery = _ref4.setQuery,
|
|
66
|
-
refresh = _ref4.refresh,
|
|
67
|
-
state = _ref4.state;
|
|
68
|
-
lastItemsRef.current = store.getAll(query);
|
|
69
|
-
function onRemove(id) {
|
|
70
|
-
store.removeItem(id);
|
|
71
|
-
refresh();
|
|
72
|
-
}
|
|
73
|
-
function onTapAhead(item) {
|
|
74
|
-
setQuery(item.label);
|
|
75
|
-
refresh();
|
|
76
|
-
}
|
|
77
|
-
return Promise.resolve(lastItemsRef.current).then(function (items) {
|
|
78
|
-
if (items.length === 0) {
|
|
79
|
-
return [];
|
|
80
|
-
}
|
|
81
|
-
return [transformSource({
|
|
82
|
-
source: {
|
|
83
|
-
sourceId: 'recentSearchesPlugin',
|
|
84
|
-
getItemInputValue: function getItemInputValue(_ref5) {
|
|
85
|
-
var item = _ref5.item;
|
|
86
|
-
return item.label;
|
|
87
|
-
},
|
|
88
|
-
getItems: function getItems() {
|
|
89
|
-
return items;
|
|
90
|
-
},
|
|
91
|
-
templates: getTemplates({
|
|
92
|
-
onRemove: onRemove,
|
|
93
|
-
onTapAhead: onTapAhead,
|
|
94
|
-
translations: translations
|
|
95
|
-
})
|
|
96
|
-
},
|
|
97
|
-
onRemove: onRemove,
|
|
98
|
-
onTapAhead: onTapAhead,
|
|
99
|
-
state: state
|
|
100
|
-
})];
|
|
101
|
-
});
|
|
102
|
-
},
|
|
103
|
-
data: _objectSpread(_objectSpread({}, store), {}, {
|
|
104
|
-
// @ts-ignore SearchOptions `facetFilters` is ReadonlyArray
|
|
105
|
-
getAlgoliaSearchParams: function getAlgoliaSearchParams() {
|
|
106
|
-
var _params$facetFilters, _params$hitsPerPage;
|
|
107
|
-
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
108
|
-
// If the items returned by `store.getAll` are contained in a Promise,
|
|
109
|
-
// we cannot provide the search params in time when this function is called
|
|
110
|
-
// because we need to resolve the promise before getting the value.
|
|
111
|
-
if (!Array.isArray(lastItemsRef.current)) {
|
|
112
|
-
process.env.NODE_ENV !== 'production' ? warn(false, 'The `getAlgoliaSearchParams` function is not supported with storages that return promises in `getAll`.') : void 0;
|
|
113
|
-
return params;
|
|
114
|
-
}
|
|
115
|
-
return _objectSpread(_objectSpread({}, params), {}, {
|
|
116
|
-
facetFilters: [].concat(_toConsumableArray((_params$facetFilters = params.facetFilters) !== null && _params$facetFilters !== void 0 ? _params$facetFilters : []), _toConsumableArray(lastItemsRef.current.map(function (item) {
|
|
117
|
-
return ["objectID:-".concat(item.label)];
|
|
118
|
-
}))),
|
|
119
|
-
hitsPerPage: Math.max(1, ((_params$hitsPerPage = params.hitsPerPage) !== null && _params$hitsPerPage !== void 0 ? _params$hitsPerPage : 10) - lastItemsRef.current.length)
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
}),
|
|
123
|
-
__autocomplete_pluginOptions: options
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
function getOptions(options) {
|
|
127
|
-
return _objectSpread(_objectSpread({
|
|
128
|
-
transformSource: function transformSource(_ref6) {
|
|
129
|
-
var source = _ref6.source;
|
|
130
|
-
return source;
|
|
131
|
-
}
|
|
132
|
-
}, options), {}, {
|
|
133
|
-
translations: _objectSpread(_objectSpread({}, defaultTranslations), options.translations)
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export { createRecentSearchesPlugin };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
function createStorageApi(storage) {
|
|
2
|
-
return {
|
|
3
|
-
addItem: function addItem(item) {
|
|
4
|
-
storage.onRemove(item.id);
|
|
5
|
-
storage.onAdd(item);
|
|
6
|
-
},
|
|
7
|
-
removeItem: function removeItem(id) {
|
|
8
|
-
storage.onRemove(id);
|
|
9
|
-
},
|
|
10
|
-
getAll: function getAll(query) {
|
|
11
|
-
return storage.getAll(query);
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { createStorageApi };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { LOCAL_STORAGE_KEY_TEST } from './constants.js';
|
|
2
|
-
|
|
3
|
-
function isLocalStorageSupported() {
|
|
4
|
-
try {
|
|
5
|
-
localStorage.setItem(LOCAL_STORAGE_KEY_TEST, '');
|
|
6
|
-
localStorage.removeItem(LOCAL_STORAGE_KEY_TEST);
|
|
7
|
-
return true;
|
|
8
|
-
} catch (error) {
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
function getLocalStorage(_ref) {
|
|
13
|
-
var key = _ref.key;
|
|
14
|
-
if (!isLocalStorageSupported()) {
|
|
15
|
-
return {
|
|
16
|
-
setItem: function setItem() {},
|
|
17
|
-
getItem: function getItem() {
|
|
18
|
-
return [];
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
return {
|
|
23
|
-
setItem: function setItem(items) {
|
|
24
|
-
return window.localStorage.setItem(key, JSON.stringify(items));
|
|
25
|
-
},
|
|
26
|
-
getItem: function getItem() {
|
|
27
|
-
var items = window.localStorage.getItem(key);
|
|
28
|
-
return items ? JSON.parse(items) : [];
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { getLocalStorage };
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/** @jsxRuntime classic */
|
|
2
|
-
/** @jsx createElement */
|
|
3
|
-
|
|
4
|
-
function getTemplates(_ref) {
|
|
5
|
-
var onRemove = _ref.onRemove,
|
|
6
|
-
onTapAhead = _ref.onTapAhead,
|
|
7
|
-
translations = _ref.translations;
|
|
8
|
-
return {
|
|
9
|
-
item: function item(_ref2) {
|
|
10
|
-
var item = _ref2.item,
|
|
11
|
-
createElement = _ref2.createElement,
|
|
12
|
-
components = _ref2.components;
|
|
13
|
-
return createElement("div", {
|
|
14
|
-
className: "aa-ItemWrapper"
|
|
15
|
-
}, createElement("div", {
|
|
16
|
-
className: "aa-ItemContent"
|
|
17
|
-
}, createElement("div", {
|
|
18
|
-
className: "aa-ItemIcon aa-ItemIcon--noBorder"
|
|
19
|
-
}, createElement("svg", {
|
|
20
|
-
viewBox: "0 0 24 24",
|
|
21
|
-
fill: "currentColor"
|
|
22
|
-
}, createElement("path", {
|
|
23
|
-
d: "M12.516 6.984v5.25l4.5 2.672-0.75 1.266-5.25-3.188v-6h1.5zM12 20.016q3.281 0 5.648-2.367t2.367-5.648-2.367-5.648-5.648-2.367-5.648 2.367-2.367 5.648 2.367 5.648 5.648 2.367zM12 2.016q4.125 0 7.055 2.93t2.93 7.055-2.93 7.055-7.055 2.93-7.055-2.93-2.93-7.055 2.93-7.055 7.055-2.93z"
|
|
24
|
-
}))), createElement("div", {
|
|
25
|
-
className: "aa-ItemContentBody"
|
|
26
|
-
}, createElement("div", {
|
|
27
|
-
className: "aa-ItemContentTitle"
|
|
28
|
-
}, createElement(components.ReverseHighlight, {
|
|
29
|
-
hit: item,
|
|
30
|
-
attribute: "label"
|
|
31
|
-
}), item.category && createElement("span", {
|
|
32
|
-
className: "aa-ItemContentSubtitle aa-ItemContentSubtitle--inline"
|
|
33
|
-
}, createElement("span", {
|
|
34
|
-
className: "aa-ItemContentSubtitleIcon"
|
|
35
|
-
}), " in", ' ', createElement("span", {
|
|
36
|
-
className: "aa-ItemContentSubtitleCategory"
|
|
37
|
-
}, item.category))))), createElement("div", {
|
|
38
|
-
className: "aa-ItemActions"
|
|
39
|
-
}, createElement("button", {
|
|
40
|
-
type: "button",
|
|
41
|
-
className: "aa-ItemActionButton",
|
|
42
|
-
title: translations.removeSearchTitle,
|
|
43
|
-
onClick: function onClick(event) {
|
|
44
|
-
event.preventDefault();
|
|
45
|
-
event.stopPropagation();
|
|
46
|
-
onRemove(item.id);
|
|
47
|
-
}
|
|
48
|
-
}, createElement("svg", {
|
|
49
|
-
viewBox: "0 0 24 24",
|
|
50
|
-
fill: "currentColor"
|
|
51
|
-
}, createElement("path", {
|
|
52
|
-
d: "M18 7v13c0 0.276-0.111 0.525-0.293 0.707s-0.431 0.293-0.707 0.293h-10c-0.276 0-0.525-0.111-0.707-0.293s-0.293-0.431-0.293-0.707v-13zM17 5v-1c0-0.828-0.337-1.58-0.879-2.121s-1.293-0.879-2.121-0.879h-4c-0.828 0-1.58 0.337-2.121 0.879s-0.879 1.293-0.879 2.121v1h-4c-0.552 0-1 0.448-1 1s0.448 1 1 1h1v13c0 0.828 0.337 1.58 0.879 2.121s1.293 0.879 2.121 0.879h10c0.828 0 1.58-0.337 2.121-0.879s0.879-1.293 0.879-2.121v-13h1c0.552 0 1-0.448 1-1s-0.448-1-1-1zM9 5v-1c0-0.276 0.111-0.525 0.293-0.707s0.431-0.293 0.707-0.293h4c0.276 0 0.525 0.111 0.707 0.293s0.293 0.431 0.293 0.707v1zM9 11v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1zM13 11v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1z"
|
|
53
|
-
}))), createElement("button", {
|
|
54
|
-
type: "button",
|
|
55
|
-
className: "aa-ItemActionButton",
|
|
56
|
-
title: translations.fillQueryTitle(item.label),
|
|
57
|
-
onClick: function onClick(event) {
|
|
58
|
-
event.preventDefault();
|
|
59
|
-
event.stopPropagation();
|
|
60
|
-
onTapAhead(item);
|
|
61
|
-
}
|
|
62
|
-
}, createElement("svg", {
|
|
63
|
-
viewBox: "0 0 24 24",
|
|
64
|
-
fill: "currentColor"
|
|
65
|
-
}, createElement("path", {
|
|
66
|
-
d: "M8 17v-7.586l8.293 8.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-8.293-8.293h7.586c0.552 0 1-0.448 1-1s-0.448-1-1-1h-10c-0.552 0-1 0.448-1 1v10c0 0.552 0.448 1 1 1s1-0.448 1-1z"
|
|
67
|
-
})))));
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export { getTemplates };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { addHighlightedAttribute } from './addHighlightedAttribute.js';
|
|
2
|
-
|
|
3
|
-
function search(_ref) {
|
|
4
|
-
var query = _ref.query,
|
|
5
|
-
items = _ref.items,
|
|
6
|
-
limit = _ref.limit;
|
|
7
|
-
if (!query) {
|
|
8
|
-
return items.slice(0, limit).map(function (item) {
|
|
9
|
-
return addHighlightedAttribute({
|
|
10
|
-
item: item,
|
|
11
|
-
query: query
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
return items.filter(function (item) {
|
|
16
|
-
return item.label.toLowerCase().includes(query.toLowerCase());
|
|
17
|
-
}).slice(0, limit).map(function (item) {
|
|
18
|
-
return addHighlightedAttribute({
|
|
19
|
-
item: item,
|
|
20
|
-
query: query
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { search };
|
|
@@ -3,10 +3,10 @@ import { createSearchInsightsApi } from './createSearchInsightsApi.js';
|
|
|
3
3
|
import { createViewedEvents } from './createViewedEvents.js';
|
|
4
4
|
import { isAlgoliaInsightsHit } from './isAlgoliaInsightsHit.js';
|
|
5
5
|
import { safelyRunOnBrowser } from '../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/safelyRunOnBrowser.js';
|
|
6
|
-
import { debounce } from '../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/debounce.js';
|
|
7
6
|
import { isEqual } from '../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/isEqual.js';
|
|
8
|
-
import { createRef } from '../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/createRef.js';
|
|
9
7
|
import { noop } from '../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/noop.js';
|
|
8
|
+
import { debounce } from '../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/debounce.js';
|
|
9
|
+
import { createRef } from '../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/createRef.js';
|
|
10
10
|
|
|
11
11
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
12
12
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|