@sonic-equipment/ui 220.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/algolia/use-algolia-search.d.ts +1 -1
- 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.d.ts +1 -1
- package/dist/global-search/plugins/categories-plugin.js +1 -1
- package/dist/global-search/plugins/popular-categories-plugin.d.ts +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.d.ts +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 -1
- package/dist/global-search/search-highlight/highlight.d.ts +1 -1
- package/dist/global-search/search-highlight/highlight.js +1 -1
- package/dist/global-search/types.d.ts +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/checkOptions.js +7 -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/createAutocomplete.js +109 -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/createStore.js +31 -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/getAutocompleteSetters.js +51 -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/getCompletion.js +12 -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/getDefaultProps.js +135 -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/getPropGetters.js +355 -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/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/metadata.js +44 -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/onInput.js +148 -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/onKeyDown.js +202 -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/reshape.js +48 -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/resolve.js +119 -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/stateReducer.js +149 -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/createCancelablePromise.js +50 -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/createCancelablePromiseList.js +42 -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/createConcurrentSafePromise.js +38 -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/getActiveItem.js +79 -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/getAutocompleteElementId.js +12 -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/getNativeEvent.js +5 -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/getNextActiveItemId.js +31 -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 +53 -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/getPluginSubmitPromise.js +39 -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/isOrContainsNode.js +5 -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/isSamsung.js +6 -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/mapToAlgoliaResponse.js +25 -0
- package/dist/node_modules/.pnpm/@algolia_autocomplete-js@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0_search-insights@2.17.3/node_modules/@algolia/autocomplete-js/dist/esm/requesters/createAlgoliaRequester.js +16 -0
- package/dist/node_modules/.pnpm/@algolia_autocomplete-js@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0_search-insights@2.17.3/node_modules/@algolia/autocomplete-js/dist/esm/requesters/getAlgoliaResults.js +12 -0
- package/dist/node_modules/.pnpm/@algolia_autocomplete-js@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0_search-insights@2.17.3/node_modules/@algolia/autocomplete-js/dist/esm/userAgents.js +8 -0
- package/dist/node_modules/.pnpm/@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 +252 -0
- package/dist/node_modules/.pnpm/@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 +16 -0
- package/dist/node_modules/.pnpm/@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 +209 -0
- package/dist/node_modules/.pnpm/@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 +18 -0
- package/dist/node_modules/.pnpm/@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 +5 -0
- package/dist/node_modules/.pnpm/@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 +25 -0
- 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/constants.js +7 -0
- 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/createQuerySuggestionsPlugin.js +118 -0
- 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/getTemplates.js +64 -0
- 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/constants/index.js +4 -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/parseAlgoliaHitHighlight.js +25 -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-preset-algolia@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAttribute.js +51 -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/reverseHighlightedParts.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/index.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/requester/createAlgoliaRequester.js +6 -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/requester/createRequester.js +37 -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/requester/getAlgoliaFacets.js +31 -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/requester/getAlgoliaResults.js +19 -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/search/fetchAlgoliaResults.js +69 -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/utils/getAppIdAndApiKey.js +16 -0
- package/dist/node_modules/.pnpm/@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 +7 -0
- package/dist/node_modules/.pnpm/@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 +16 -0
- package/dist/node_modules/.pnpm/@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 +34 -0
- package/dist/node_modules/.pnpm/@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 +7 -0
- package/dist/node_modules/.pnpm/@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 +6 -0
- package/dist/node_modules/.pnpm/@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 +7 -0
- package/dist/node_modules/.pnpm/@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 +10 -0
- package/dist/node_modules/.pnpm/@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 +15 -0
- package/dist/node_modules/.pnpm/@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 +26 -0
- package/dist/node_modules/.pnpm/@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 +3 -0
- package/dist/node_modules/.pnpm/@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 +13 -0
- package/dist/node_modules/.pnpm/@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/userAgents.js +8 -0
- package/dist/node_modules/.pnpm/@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/version.js +3 -0
- package/dist/node_modules/.pnpm/@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 +26 -0
- package/dist/node_modules/.pnpm/swiper@11.2.10/node_modules/swiper/swiper-react.js +8 -2
- package/dist/shared/utils/uuid.js +1 -1
- 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
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { isPartHighlighted } from './isPartHighlighted.js';
|
|
2
|
+
|
|
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); }
|
|
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; }
|
|
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; }
|
|
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; }
|
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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); }
|
|
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
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
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';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
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
|
+
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
|
+
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
|
+
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
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
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 createRequester(fetcher, requesterId) {
|
|
8
|
+
function execute(fetcherParams) {
|
|
9
|
+
return fetcher({
|
|
10
|
+
searchClient: fetcherParams.searchClient,
|
|
11
|
+
queries: fetcherParams.requests.map(function (x) {
|
|
12
|
+
return x.query;
|
|
13
|
+
})
|
|
14
|
+
}).then(function (responses) {
|
|
15
|
+
return responses.map(function (response, index) {
|
|
16
|
+
var _fetcherParams$reques = fetcherParams.requests[index],
|
|
17
|
+
sourceId = _fetcherParams$reques.sourceId,
|
|
18
|
+
transformResponse = _fetcherParams$reques.transformResponse;
|
|
19
|
+
return {
|
|
20
|
+
items: response,
|
|
21
|
+
sourceId: sourceId,
|
|
22
|
+
transformResponse: transformResponse
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return function createSpecifiedRequester(requesterParams) {
|
|
28
|
+
return function requester(requestParams) {
|
|
29
|
+
return _objectSpread(_objectSpread({
|
|
30
|
+
requesterId: requesterId,
|
|
31
|
+
execute: execute
|
|
32
|
+
}, requesterParams), requestParams);
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { createRequester };
|
|
@@ -0,0 +1,31 @@
|
|
|
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';
|
|
3
|
+
|
|
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; }
|
|
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; }
|
|
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; }
|
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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); }
|
|
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;
|
|
19
|
+
}
|
|
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
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { getAlgoliaFacets };
|
|
@@ -0,0 +1,19 @@
|
|
|
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';
|
|
3
|
+
|
|
4
|
+
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); }
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Retrieves Algolia results from multiple indices.
|
|
8
|
+
*/
|
|
9
|
+
function getAlgoliaResults(requestParams) {
|
|
10
|
+
invariant(_typeof(requestParams.searchClient) === 'object', 'The `searchClient` parameter is required for getAlgoliaResults({ searchClient }).');
|
|
11
|
+
var requester = createAlgoliaRequester({
|
|
12
|
+
transformResponse: function transformResponse(response) {
|
|
13
|
+
return response.hits;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
return requester(requestParams);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { getAlgoliaResults };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { HIGHLIGHT_POST_TAG, HIGHLIGHT_PRE_TAG } from '../constants/index.js';
|
|
2
|
+
import { getAppIdAndApiKey } from '../utils/getAppIdAndApiKey.js';
|
|
3
|
+
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';
|
|
4
|
+
import { userAgents } from '../../../../../../../@algolia_autocomplete-shared@1.19.2_@algolia_client-search@4.24.0_algoliasearch@4.24.0/node_modules/@algolia/autocomplete-shared/dist/esm/userAgents.js';
|
|
5
|
+
|
|
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
|
+
var _excluded = ["params"];
|
|
8
|
+
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; }
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
12
|
+
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); }
|
|
13
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
15
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
16
|
+
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."); }
|
|
17
|
+
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); }
|
|
18
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
19
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
20
|
+
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; }
|
|
21
|
+
function fetchAlgoliaResults(_ref) {
|
|
22
|
+
var searchClient = _ref.searchClient,
|
|
23
|
+
queries = _ref.queries,
|
|
24
|
+
_ref$userAgents = _ref.userAgents,
|
|
25
|
+
userAgents$1 = _ref$userAgents === void 0 ? [] : _ref$userAgents;
|
|
26
|
+
if (typeof searchClient.addAlgoliaAgent === 'function') {
|
|
27
|
+
var algoliaAgents = [].concat(_toConsumableArray(userAgents), _toConsumableArray(userAgents$1));
|
|
28
|
+
algoliaAgents.forEach(function (_ref2) {
|
|
29
|
+
var segment = _ref2.segment,
|
|
30
|
+
version = _ref2.version;
|
|
31
|
+
searchClient.addAlgoliaAgent(segment, version);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
var _getAppIdAndApiKey = getAppIdAndApiKey(searchClient),
|
|
35
|
+
appId = _getAppIdAndApiKey.appId,
|
|
36
|
+
apiKey = _getAppIdAndApiKey.apiKey;
|
|
37
|
+
invariant(Boolean(appId), 'The Algolia `appId` was not accessible from the searchClient passed.');
|
|
38
|
+
invariant(Boolean(apiKey), 'The Algolia `apiKey` was not accessible from the searchClient passed.');
|
|
39
|
+
return searchClient.search(queries.map(function (searchParameters) {
|
|
40
|
+
var params = searchParameters.params,
|
|
41
|
+
headers = _objectWithoutProperties(searchParameters, _excluded);
|
|
42
|
+
return _objectSpread(_objectSpread({}, headers), {}, {
|
|
43
|
+
params: _objectSpread({
|
|
44
|
+
hitsPerPage: 5,
|
|
45
|
+
highlightPreTag: HIGHLIGHT_PRE_TAG,
|
|
46
|
+
highlightPostTag: HIGHLIGHT_POST_TAG
|
|
47
|
+
}, params)
|
|
48
|
+
});
|
|
49
|
+
})).then(function (response) {
|
|
50
|
+
return response.results.map(function (result, resultIndex) {
|
|
51
|
+
var _result$hits;
|
|
52
|
+
return _objectSpread(_objectSpread({}, result), {}, {
|
|
53
|
+
hits: (_result$hits = result.hits) === null || _result$hits === void 0 ? void 0 : _result$hits.map(function (hit) {
|
|
54
|
+
return _objectSpread(_objectSpread({}, hit), {}, {
|
|
55
|
+
// Bring support for the Insights plugin.
|
|
56
|
+
__autocomplete_indexName: result.index || queries[resultIndex].indexName,
|
|
57
|
+
__autocomplete_queryID: result.queryID,
|
|
58
|
+
__autocomplete_algoliaCredentials: {
|
|
59
|
+
appId: appId,
|
|
60
|
+
apiKey: apiKey
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export { fetchAlgoliaResults };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// typed as any, since it accepts the _real_ js clients, not the interface we otherwise expect
|
|
2
|
+
function getAppIdAndApiKey(searchClient) {
|
|
3
|
+
var transporter = searchClient.transporter || {};
|
|
4
|
+
var headers = transporter.headers || transporter.baseHeaders || {};
|
|
5
|
+
var queryParameters = transporter.queryParameters || transporter.baseQueryParameters || {};
|
|
6
|
+
var APP_ID = 'x-algolia-application-id';
|
|
7
|
+
var API_KEY = 'x-algolia-api-key';
|
|
8
|
+
var appId = headers[APP_ID] || queryParameters[APP_ID];
|
|
9
|
+
var apiKey = headers[API_KEY] || queryParameters[API_KEY];
|
|
10
|
+
return {
|
|
11
|
+
appId: appId,
|
|
12
|
+
apiKey: apiKey
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { getAppIdAndApiKey };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function debounce(fn, time) {
|
|
2
|
+
var timerId = undefined;
|
|
3
|
+
return function () {
|
|
4
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
5
|
+
args[_key] = arguments[_key];
|
|
6
|
+
}
|
|
7
|
+
if (timerId) {
|
|
8
|
+
clearTimeout(timerId);
|
|
9
|
+
}
|
|
10
|
+
timerId = setTimeout(function () {
|
|
11
|
+
return fn.apply(void 0, args);
|
|
12
|
+
}, time);
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { debounce };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = true, _d = false; try { if (_x = (_i = _i.call(arr)).next, 0 === i) ; else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = true, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
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
|
+
/**
|
|
9
|
+
* Decycles objects with circular references.
|
|
10
|
+
* This is used to print cyclic structures in development environment only.
|
|
11
|
+
*/
|
|
12
|
+
function decycle(obj) {
|
|
13
|
+
var seen = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Set();
|
|
14
|
+
if (!(process.env.NODE_ENV !== 'production') || !obj || _typeof(obj) !== 'object') {
|
|
15
|
+
return obj;
|
|
16
|
+
}
|
|
17
|
+
if (seen.has(obj)) {
|
|
18
|
+
return '[Circular]';
|
|
19
|
+
}
|
|
20
|
+
var newSeen = seen.add(obj);
|
|
21
|
+
if (Array.isArray(obj)) {
|
|
22
|
+
return obj.map(function (x) {
|
|
23
|
+
return decycle(x, newSeen);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return Object.fromEntries(Object.entries(obj).map(function (_ref) {
|
|
27
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
28
|
+
key = _ref2[0],
|
|
29
|
+
value = _ref2[1];
|
|
30
|
+
return [key, decycle(value, newSeen)];
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { decycle };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Throws an error if the condition is not met in development mode.
|
|
3
|
+
* This is used to make development a better experience to provide guidance as
|
|
4
|
+
* to where the error comes from.
|
|
5
|
+
*/
|
|
6
|
+
function invariant(condition, message) {
|
|
7
|
+
if (!(process.env.NODE_ENV !== 'production')) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
if (!condition) {
|
|
11
|
+
throw new Error("[Autocomplete] ".concat(typeof message === 'function' ? message() : message));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { invariant };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
function isPrimitive(obj) {
|
|
2
|
+
return obj !== Object(obj);
|
|
3
|
+
}
|
|
4
|
+
function isEqual(first, second) {
|
|
5
|
+
if (first === second) {
|
|
6
|
+
return true;
|
|
7
|
+
}
|
|
8
|
+
if (isPrimitive(first) || isPrimitive(second) || typeof first === 'function' || typeof second === 'function') {
|
|
9
|
+
return first === second;
|
|
10
|
+
}
|
|
11
|
+
if (Object.keys(first).length !== Object.keys(second).length) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
for (var _i = 0, _Object$keys = Object.keys(first); _i < _Object$keys.length; _i++) {
|
|
15
|
+
var key = _Object$keys[_i];
|
|
16
|
+
if (!(key in second)) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
if (!isEqual(first[key], second[key])) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { isEqual };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Safely runs code meant for browser environments only.
|
|
3
|
+
*/
|
|
4
|
+
function safelyRunOnBrowser(callback) {
|
|
5
|
+
if (typeof window !== 'undefined') {
|
|
6
|
+
return callback({
|
|
7
|
+
window: window
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { safelyRunOnBrowser };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var warnCache = {
|
|
2
|
+
current: {}
|
|
3
|
+
};
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Logs a warning if the condition is not met.
|
|
7
|
+
* This is used to log issues in development environment only.
|
|
8
|
+
*/
|
|
9
|
+
function warn(condition, message) {
|
|
10
|
+
if (!(process.env.NODE_ENV !== 'production')) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (condition) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
var sanitizedMessage = message.trim();
|
|
17
|
+
var hasAlreadyPrinted = warnCache.current[sanitizedMessage];
|
|
18
|
+
if (!hasAlreadyPrinted) {
|
|
19
|
+
warnCache.current[sanitizedMessage] = true;
|
|
20
|
+
|
|
21
|
+
// eslint-disable-next-line no-console
|
|
22
|
+
console.warn("[Autocomplete] ".concat(sanitizedMessage));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { warn, warnCache };
|
|
@@ -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 };
|
|
@@ -12,7 +12,7 @@ function createUUID() {
|
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
function isUUID(value) {
|
|
15
|
-
return /^[\da-f]{8}
|
|
15
|
+
return /^[\da-f]{8}(?:-[\da-f]{4}){2}-[89ab][\da-f]{3}-[\da-f]{12}$/.test(value);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export { createUUID, isUUID };
|
|
@@ -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';
|