Skip to content

Commit

Permalink
build: update build files
Browse files Browse the repository at this point in the history
  • Loading branch information
aliceoq committed Feb 27, 2024
1 parent 4e6c68a commit 7407cf2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
1 change: 1 addition & 0 deletions dist/index.d.mts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ interface AlgoliaConfig {
algoliaOptions?: AlgoliaSearchOptions;
customOptions?: any;
instantSearchConfigs?: any;
useLanguageFilter?: boolean;
}
declare const createAlgoliaClient: (config: AlgoliaConfig) => void;

Expand Down
32 changes: 24 additions & 8 deletions dist/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js
// node_modules/react-is/cjs/react-is.production.min.js
var require_react_is_production_min = __commonJS({
"node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js"(exports) {
"node_modules/react-is/cjs/react-is.production.min.js"(exports) {
"use strict";
var b = "function" === typeof Symbol && Symbol.for;
var c = b ? Symbol.for("react.element") : 60103;
Expand Down Expand Up @@ -145,9 +145,9 @@ var require_react_is_production_min = __commonJS({
}
});

// node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js
// node_modules/react-is/cjs/react-is.development.js
var require_react_is_development = __commonJS({
"node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js"(exports) {
"node_modules/react-is/cjs/react-is.development.js"(exports) {
"use strict";
if (process.env.NODE_ENV !== "production") {
(function() {
Expand Down Expand Up @@ -300,9 +300,9 @@ var require_react_is_development = __commonJS({
}
});

// node_modules/prop-types/node_modules/react-is/index.js
// node_modules/react-is/index.js
var require_react_is = __commonJS({
"node_modules/prop-types/node_modules/react-is/index.js"(exports, module) {
"node_modules/react-is/index.js"(exports, module) {
"use strict";
if (process.env.NODE_ENV === "production") {
module.exports = require_react_is_production_min();
Expand Down Expand Up @@ -9126,7 +9126,15 @@ import aa2 from "search-insights";
var searchClient = {};
var searchIndex = "";
var createAlgoliaClient = (config) => {
const { apiKey, appId, index, algoliaOptions, customOptions, instantSearchConfigs } = config;
const {
apiKey,
appId,
index,
algoliaOptions,
customOptions,
instantSearchConfigs,
useLanguageFilter = false
} = config;
searchIndex = index;
aa2("init", {
appId: appId || "",
Expand All @@ -9144,6 +9152,7 @@ var createAlgoliaClient = (config) => {
...algoliaClient,
...customOptions,
instantSearchConfigs,
useLanguageFilter,
search(requests) {
if (requests.every(({ params }) => !params?.query))
return;
Expand All @@ -9167,7 +9176,14 @@ function SearchInput() {
};
return /* @__PURE__ */ jsxs31(InstantSearch, { searchClient, indexName: searchIndex, children: [
searchClient.instantSearchConfigs && /* @__PURE__ */ jsx38(Configure, { ...searchClient.instantSearchConfigs }),
/* @__PURE__ */ jsx38(Configure, { clickAnalytics: true, facetFilters: [`language:${locale}`] }),
searchClient.useLanguageFilter && /* @__PURE__ */ jsx38(
Configure,
{
clickAnalytics: true,
facetFilters: [`language:${locale}`]
}
),
!searchClient.useLanguageFilter && /* @__PURE__ */ jsx38(Configure, { clickAnalytics: true }),
/* @__PURE__ */ jsxs31(Box15, { onFocus: () => setfocusOut({ modaltoggle: true }), ref: resultsBox2, children: [
/* @__PURE__ */ jsx38(search_box_default, { changeFocus }),
focusOut.modaltoggle && /* @__PURE__ */ jsx38(results_box_default, { changeFocus })
Expand Down
2 changes: 1 addition & 1 deletion dist/index.mjs.map

Large diffs are not rendered by default.

0 comments on commit 7407cf2

Please sign in to comment.