@sledge-app/react-instant-search 2.0.50 → 2.0.52

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.
@@ -1506,15 +1506,6 @@ const FilterIcon = ({ width, height, color }) => {
1506
1506
  )
1507
1507
  ] }) });
1508
1508
  };
1509
- const InfoCircleIcon = ({ width, height, color }) => {
1510
- return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sledge-icon__info-circle", children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1511
- "path",
1512
- {
1513
- d: "M12 2.00293C6.49 2.00293 2 6.49293 2 12.0029C2 17.5129 6.49 22.0029 12 22.0029C17.51 22.0029 22 17.5129 22 12.0029C22 6.49293 17.51 2.00293 12 2.00293ZM11.25 8.00293C11.25 7.59293 11.59 7.25293 12 7.25293C12.41 7.25293 12.75 7.59293 12.75 8.00293V13.0029C12.75 13.4129 12.41 13.7529 12 13.7529C11.59 13.7529 11.25 13.4129 11.25 13.0029V8.00293ZM12.92 16.3829C12.87 16.5129 12.8 16.6129 12.71 16.7129C12.61 16.8029 12.5 16.8729 12.38 16.9229C12.26 16.9729 12.13 17.0029 12 17.0029C11.87 17.0029 11.74 16.9729 11.62 16.9229C11.5 16.8729 11.39 16.8029 11.29 16.7129C11.2 16.6129 11.13 16.5129 11.08 16.3829C11.03 16.2629 11 16.1329 11 16.0029C11 15.8729 11.03 15.7429 11.08 15.6229C11.13 15.5029 11.2 15.3929 11.29 15.2929C11.39 15.2029 11.5 15.1329 11.62 15.0829C11.86 14.9829 12.14 14.9829 12.38 15.0829C12.5 15.1329 12.61 15.2029 12.71 15.2929C12.8 15.3929 12.87 15.5029 12.92 15.6229C12.97 15.7429 13 15.8729 13 16.0029C13 16.1329 12.97 16.2629 12.92 16.3829Z",
1514
- fill: color
1515
- }
1516
- ) }) });
1517
- };
1518
1509
  const Button$1 = "";
1519
1510
  const Button = React__default.forwardRef((props, buttonRef) => {
1520
1511
  const { className = "", children, colorType = "light", fullWidth = false, elementType = "button", link = "", isActive, ...otherProps } = props;
@@ -5685,13 +5676,7 @@ const VirtualizedList = ({ scrollElement, rowCount, rowRenderer: rowRenderer2, s
5685
5676
  }
5686
5677
  );
5687
5678
  };
5688
- const Alert$1 = "";
5689
- const Alert = ({ children, className = "", type, icon = null }) => {
5690
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `sledge__alert ${className}`, "data-alert-type": type, children: [
5691
- icon && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: icon }),
5692
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children })
5693
- ] });
5694
- };
5679
+ const Alert = "";
5695
5680
  const SearchIconWidget = (props) => {
5696
5681
  const { isRenderApp, isJsVersion, componentRef } = React__default.useContext(SledgeContext);
5697
5682
  const { instantSearch: isRenderAppInstantSearch } = isRenderApp || {};
@@ -6107,16 +6092,10 @@ const SearchIconWidgetPopup = () => {
6107
6092
  isPreviewSettings: true
6108
6093
  });
6109
6094
  }, [handleFunctions == null ? void 0 : handleFunctions.instantSearchPreviewSettings]);
6110
- const alertFirstSyncComponent = !isLoading && !totalHitsProduct && (instantSearchSettings == null ? void 0 : instantSearchSettings.first_sync) ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Alert, { className: "sledge-instant-search__icon-widget-popup-alert-first-sync", type: "info", icon: /* @__PURE__ */ jsxRuntimeExports.jsx(InfoCircleIcon, { width: 24, height: 24, color: "#003a5a" }), children: [
6111
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Products and Collections indexing is in progress. Product Filter and Instant Search widgets may appear empty during this process." }),
6112
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", {}),
6113
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "The products and collections will become visible in the widgets once indexing is complete." })
6114
- ] }) : null;
6115
6095
  return /* @__PURE__ */ jsxRuntimeExports.jsx($5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9, { open: showInfo, onOpenChange: setShowInfo, children: /* @__PURE__ */ jsxRuntimeExports.jsxs($5d3850c4d0b4e6c7$export$602eac185826482c, { children: [
6116
6096
  /* @__PURE__ */ jsxRuntimeExports.jsx($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff, { className: "sledge__popup-overlay" }),
6117
6097
  /* @__PURE__ */ jsxRuntimeExports.jsx($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff, { className: "sledge__popup-overlay-blur" }),
6118
6098
  /* @__PURE__ */ jsxRuntimeExports.jsxs($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2, { className: "sledge-instant-search__icon-widget-popup-detail-content", "data-layout-type": ((_a = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _a.layout) || "", children: [
6119
- alertFirstSyncComponent,
6120
6099
  /* @__PURE__ */ jsxRuntimeExports.jsx(
6121
6100
  SearchInputField,
6122
6101
  {
@@ -6388,7 +6367,15 @@ const detectQueryStringFilter = ({ facets, facetsQueryStringObject, callback })
6388
6367
  for (const searchParamsKey in searchParamsObject) {
6389
6368
  let ifFacetsQueryStringObject = (facets == null ? void 0 : facets.length) && facets.includes(searchParamsKey);
6390
6369
  if (ifFacetsQueryStringObject && typeof facetsQueryStringObject === "object")
6391
- facetsQueryStringObject[searchParamsKey] = (_b = (_a = searchParamsObject[searchParamsKey].split(",")) == null ? void 0 : _a.map) == null ? void 0 : _b.call(_a, (item) => decodeURIComponent(item));
6370
+ facetsQueryStringObject[searchParamsKey] = (_b = (_a = searchParamsObject[searchParamsKey].split(",")) == null ? void 0 : _a.map) == null ? void 0 : _b.call(_a, (item) => {
6371
+ let facetItem = item;
6372
+ try {
6373
+ facetItem = decodeURIComponent(item);
6374
+ } catch (error) {
6375
+ facetItem = item;
6376
+ }
6377
+ return facetItem;
6378
+ });
6392
6379
  }
6393
6380
  if (facetsQueryStringObject && Object.keys(facetsQueryStringObject).length)
6394
6381
  callback(facetsQueryStringObject);
@@ -9924,11 +9911,6 @@ const SearchResultWidget = (props) => {
9924
9911
  const containerStyle = {
9925
9912
  maxWidth: width
9926
9913
  };
9927
- const alertFirstSyncComponent = !isFirstLoading && !totalHitsProduct && (instantSearchSettings == null ? void 0 : instantSearchSettings.first_sync) ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Alert, { className: "sledge-instant-search__alert-first-sync-product", type: "info", icon: /* @__PURE__ */ jsxRuntimeExports.jsx(InfoCircleIcon, { width: 24, height: 24, color: "#003a5a" }), children: [
9928
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Products and Collections indexing is in progress. Product Filter and Instant Search widgets may appear empty during this process." }),
9929
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", {}),
9930
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "The products and collections will become visible in the widgets once indexing is complete." })
9931
- ] }) : null;
9932
9914
  const tabItems = instantSearchPreviewSettings ? (_y = (_x = (_w = tabs == null ? void 0 : tabs.map) == null ? void 0 : _w.call(tabs, (allowedTab) => {
9933
9915
  var _a2, _b2;
9934
9916
  const { type } = allowedTab;
@@ -9943,7 +9925,6 @@ const SearchResultWidget = (props) => {
9943
9925
  };
9944
9926
  })) == null ? void 0 : _x.filter) == null ? void 0 : _y.call(_x, (item) => item) : allowedTabs;
9945
9927
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sledge-instant-search__result-container", ref: searchResultContainerRef, style: containerStyle, children: [
9946
- alertFirstSyncComponent,
9947
9928
  isFirstLoading ? tabSkeleton : layoutType === "default" && (allowedTabs == null ? void 0 : allowedTabs.length) ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tab, { items: tabItems, layoutType, clickedTabIndexId, handleChangeTab: handleChangeTabIndex }) : tabSkeleton,
9948
9929
  isFirstLoading && (layoutType == null ? void 0 : layoutType.length) && !propsData ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
9949
9930
  mobileFilterWithSearchAndSelectOptionSkeleton,