@sledge-app/react-instant-search 2.0.7 → 2.0.9
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/components/SearchResultWidget/components/FilterHorizontal.d.ts +1 -0
- package/dist/components/SearchResultWidget/components/FilterHorizontal.d.ts.map +1 -1
- package/dist/components/SearchResultWidget/layouts/DesktopLayout.d.ts +1 -1
- package/dist/components/SearchResultWidget/layouts/DesktopLayout.d.ts.map +1 -1
- package/dist/components/SearchResultWidget/layouts/Elements.d.ts +1 -0
- package/dist/components/SearchResultWidget/layouts/Elements.d.ts.map +1 -1
- package/dist/components/SearchResultWidget/layouts/MobileLayout.d.ts.map +1 -1
- package/dist/sledge-react-instant-search.cjs +1 -1
- package/dist/sledge-react-instant-search.cjs.map +1 -1
- package/dist/sledge-react-instant-search.js +146 -72
- package/dist/sledge-react-instant-search.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports, $ as $cb5cc270b50c6fcd$export$be92b6f5f03c0fe9, a as $cb5cc270b50c6fcd$export$41fb9f06171c75f4, b as $cb5cc270b50c6fcd$export$602eac185826482c, c as $cb5cc270b50c6fcd$export$7c6e2c02157bb7d2, d as $cb5cc270b50c6fcd$export$f39c2d165cd861fe, e as $cb5cc270b50c6fcd$export$21b07c8f274aebd5, f as $67824d98245208a0$export$be92b6f5f03c0fe9, g as $67824d98245208a0$export$adb584737d712b70, h as $e698a72e93240346$export$be92b6f5f03c0fe9, i as $e698a72e93240346$export$adb584737d712b70, k as $d94698215c4408a7$export$be92b6f5f03c0fe9, l as $faa2e61a3361514f$export$be92b6f5f03c0fe9, m as $faa2e61a3361514f$export$13921ac0cc260818, n as $faa2e61a3361514f$export$9a58ef0d7ad3278c, o as $faa2e61a3361514f$export$6521433ed15a34db, p as $f99a8c78507165f7$export$be92b6f5f03c0fe9, q as $f99a8c78507165f7$export$6d08773d2e66f8f2, r as $f99a8c78507165f7$export$adb584737d712b70, s as $cc7e05a45900e73f$export$6d08773d2e66f8f2, t as $cc7e05a45900e73f$export$d6e5bf9c43ea9319, u as $cc7e05a45900e73f$export$c3468e2714d175fa, v as $cc7e05a45900e73f$export$be92b6f5f03c0fe9, w as $cc7e05a45900e73f$export$41fb9f06171c75f4, x as $cc7e05a45900e73f$export$4c8d1a57a761ef94, y as $cc7e05a45900e73f$export$f04a61298a47a40f, z as $cc7e05a45900e73f$export$602eac185826482c, A as $cc7e05a45900e73f$export$7c6e2c02157bb7d2, B as $cc7e05a45900e73f$export$2f60d3ec9ad468f2, C as $cc7e05a45900e73f$export$d5c6c08dc2d3ca7, D as $cc7e05a45900e73f$export$bf1aedc3039c8d63, E as motion, F as client, G as $d94698215c4408a7$export$a455218a85c89869, H as $d94698215c4408a7$export$7a7fa4424cb20976, I as $d94698215c4408a7$export$f69c19e57285b83a, J as $a093c7e1ec25a057$export$2881499e37b75b9a, K as $a093c7e1ec25a057$export$be92b6f5f03c0fe9, L as $a093c7e1ec25a057$export$41fb9f06171c75f4, M as $a093c7e1ec25a057$export$602eac185826482c, N as $a093c7e1ec25a057$export$7c6e2c02157bb7d2, O as $a093c7e1ec25a057$export$21b07c8f274aebd5, P as $57acba87d6e25586$export$be92b6f5f03c0fe9, Q as $57acba87d6e25586$export$d5c6c08dc2d3ca7, R as $57acba87d6e25586$export$9a4e88b92edfce6b, S as $57acba87d6e25586$export$6521433ed15a34db, T as MasonryResponsive, U as Masonry, V as useEmblaCarousel, W as useVirtualizer, X as $5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9, Y as $5d3850c4d0b4e6c7$export$602eac185826482c, Z as $5d3850c4d0b4e6c7$export$c6fdb837b070b4ff, _ as $5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2 } from "./vendor-5ae8da85.js";
|
|
2
2
|
import React__default, { useState, useEffect, createElement } from "react";
|
|
3
3
|
import { SledgeContext, CustomComponents } from "@sledge-app/core";
|
|
4
|
-
import "react-dom";
|
|
4
|
+
import { createPortal } from "react-dom";
|
|
5
5
|
const ProductFilterWidget = (props) => {
|
|
6
6
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(SearchResultWidget, { layoutType: "product-filter", ...props });
|
|
7
7
|
};
|
|
@@ -5348,17 +5348,20 @@ const FlyoutSidebar = ({ title, content, footer = null, open, setOpen, position
|
|
|
5348
5348
|
}, 0);
|
|
5349
5349
|
}, [open]);
|
|
5350
5350
|
const showBlurEffect = withBlurEffect && !isScrollAtBottom;
|
|
5351
|
-
return
|
|
5352
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
5353
|
-
|
|
5354
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sledge__flyout-
|
|
5355
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5351
|
+
return createPortal(
|
|
5352
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `sledge__flyout-mobile ${className}`, "data-open": open, "data-position": position, children: [
|
|
5353
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge__flyout-overlay", onClick: () => setOpen(false) }),
|
|
5354
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sledge__flyout-mobile-wrapper", children: [
|
|
5355
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sledge__flyout-header", children: [
|
|
5356
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge__flyout-mobile-title", children: title }),
|
|
5357
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge__flyout-close-field-wrapper", children: /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "sledge__flyout-close-field", type: "button", onClick: () => setOpen(false), children: /* @__PURE__ */ jsxRuntimeExports.jsx(CloseIcon, { width: 14, height: 14, color: "#393d4e" }) }) })
|
|
5358
|
+
] }),
|
|
5359
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: contentContainerRef, className: `sledge__flyout-mobile-content ${showBlurEffect ? "sledge__flyout-mobile-content-blur-effect" : ""}`, children: isLoading ? null : content }),
|
|
5360
|
+
footer ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge__flyout-mobile-footer", children: isLoading ? null : footer }) : null
|
|
5361
|
+
] })
|
|
5362
|
+
] }),
|
|
5363
|
+
document.body
|
|
5364
|
+
);
|
|
5362
5365
|
};
|
|
5363
5366
|
const getElement = ({ selector, setUsedScrollElement }) => {
|
|
5364
5367
|
const element = document.querySelector(selector);
|
|
@@ -7246,7 +7249,7 @@ const FilterHorizontal = (props) => {
|
|
|
7246
7249
|
isHorizontalGroup = false,
|
|
7247
7250
|
allowedFilterSlider
|
|
7248
7251
|
} = props;
|
|
7249
|
-
const { sort = null } = components;
|
|
7252
|
+
const { sort = null, limit = null } = components;
|
|
7250
7253
|
const wrapperAdditionalProps = {
|
|
7251
7254
|
...isHorizontalGroup && { "horizontal-group": "" }
|
|
7252
7255
|
};
|
|
@@ -7274,7 +7277,8 @@ const FilterHorizontal = (props) => {
|
|
|
7274
7277
|
isHorizontalGroup
|
|
7275
7278
|
}
|
|
7276
7279
|
)),
|
|
7277
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge-instant-search__result-filter-horizontal-sort", children: sort })
|
|
7280
|
+
sort ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge-instant-search__result-filter-horizontal-sort", children: sort }) : null,
|
|
7281
|
+
limit ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge-instant-search__result-filter-horizontal-limit", children: limit }) : null
|
|
7278
7282
|
]
|
|
7279
7283
|
}
|
|
7280
7284
|
),
|
|
@@ -7971,8 +7975,8 @@ const SummaryTextVertical = (props) => {
|
|
|
7971
7975
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `sledge-instant-search__result-data-summary sledge-instant-search__result-data-summary-filter-vertical ${className}`, children });
|
|
7972
7976
|
};
|
|
7973
7977
|
const RenderLayout = (props) => {
|
|
7974
|
-
const { children, device, layout = "" } = props;
|
|
7975
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge-instant-search__render-layout", "data-render-device": device, "data-render-layout": layout, children });
|
|
7978
|
+
const { children, device, layout = "", additionalProps = {} } = props;
|
|
7979
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge-instant-search__render-layout", "data-render-device": device, "data-render-layout": layout, ...additionalProps, children });
|
|
7976
7980
|
};
|
|
7977
7981
|
const FilterHorizontalBlockMobile = (props) => {
|
|
7978
7982
|
const { children } = props;
|
|
@@ -7991,7 +7995,7 @@ const ProductGridPaginationWrapper = (props) => {
|
|
|
7991
7995
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge-instant-search__result-product-grid-pagination-wrapper", children });
|
|
7992
7996
|
};
|
|
7993
7997
|
const FilterVerticalLayout = (props) => {
|
|
7994
|
-
var _a, _b;
|
|
7998
|
+
var _a, _b, _c, _d;
|
|
7995
7999
|
const {
|
|
7996
8000
|
displaySettings,
|
|
7997
8001
|
allowedFilter,
|
|
@@ -8033,16 +8037,16 @@ const FilterVerticalLayout = (props) => {
|
|
|
8033
8037
|
}) : null,
|
|
8034
8038
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(ResultData, { children: [
|
|
8035
8039
|
isFirstLoading ? searchAndSelectOptionSkeleton : /* @__PURE__ */ jsxRuntimeExports.jsxs(ResultDataKeyword, { children: [
|
|
8036
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SearchFieldDesktop, { children: searchField }),
|
|
8040
|
+
((_b = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _b.hide_search_bar) ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(SearchFieldDesktop, { children: searchField }),
|
|
8037
8041
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SelectFieldWrapper, { children: [
|
|
8038
8042
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: sort }),
|
|
8039
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: limit })
|
|
8043
|
+
((_c = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _c.hide_limit_options) ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: limit })
|
|
8040
8044
|
] })
|
|
8041
8045
|
] }),
|
|
8042
8046
|
isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: productGridSkeleton }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8043
8047
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SummaryTextVertical, { className: "sledge-instant-search__result-summary-text-with-column-grid-selector-wrapper", children: [
|
|
8044
8048
|
summaryText,
|
|
8045
|
-
((
|
|
8049
|
+
((_d = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _d.show_switch_view_option) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector }) : null
|
|
8046
8050
|
] }),
|
|
8047
8051
|
(searchResult == null ? void 0 : searchResult.length) ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8048
8052
|
productGrid,
|
|
@@ -8053,8 +8057,21 @@ const FilterVerticalLayout = (props) => {
|
|
|
8053
8057
|
] }) });
|
|
8054
8058
|
};
|
|
8055
8059
|
const FilterHorizontalLayout = (props) => {
|
|
8056
|
-
var _a, _b;
|
|
8057
|
-
const {
|
|
8060
|
+
var _a, _b, _c, _d;
|
|
8061
|
+
const {
|
|
8062
|
+
displaySettings,
|
|
8063
|
+
allowedFilter,
|
|
8064
|
+
isFirstLoading,
|
|
8065
|
+
isLoading,
|
|
8066
|
+
isLoadingProduct,
|
|
8067
|
+
isLoadingSetting,
|
|
8068
|
+
searchResult = [],
|
|
8069
|
+
propsData,
|
|
8070
|
+
hideFilterWhenOneValue,
|
|
8071
|
+
components,
|
|
8072
|
+
skeleton,
|
|
8073
|
+
handleSearchResultFirstTime
|
|
8074
|
+
} = props;
|
|
8058
8075
|
const {
|
|
8059
8076
|
filterHorizontal = null,
|
|
8060
8077
|
summaryText = null,
|
|
@@ -8078,16 +8095,16 @@ const FilterHorizontalLayout = (props) => {
|
|
|
8078
8095
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8079
8096
|
isShowFilter ? filterHorizontal == null ? void 0 : filterHorizontal({
|
|
8080
8097
|
deviceType: "desktop",
|
|
8081
|
-
isSkeleton: Boolean(isFirstLoading && !propsData || isLoadingSetting && !propsData)
|
|
8098
|
+
isSkeleton: Boolean(handleSearchResultFirstTime || isFirstLoading && !propsData || isLoadingSetting && !propsData)
|
|
8082
8099
|
}) : null,
|
|
8083
8100
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ResultWrapper, { displaySettings, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ResultData, { children: [
|
|
8084
8101
|
isFirstLoading ? searchAndSelectOptionSkeleton : /* @__PURE__ */ jsxRuntimeExports.jsxs(ResultDataKeyword, { children: [
|
|
8085
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SummaryTextHorizontal, { children: summaryText }),
|
|
8086
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SearchFieldDesktop, { children: searchField }),
|
|
8102
|
+
handleSearchResultFirstTime ? summaryTextSkeleton : /* @__PURE__ */ jsxRuntimeExports.jsx(SummaryTextHorizontal, { children: summaryText }),
|
|
8103
|
+
((_b = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _b.hide_search_bar) ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(SearchFieldDesktop, { children: searchField }),
|
|
8087
8104
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SelectFieldWrapper, { children: [
|
|
8088
8105
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: sort }),
|
|
8089
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: limit }),
|
|
8090
|
-
((
|
|
8106
|
+
((_c = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _c.hide_limit_options) ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: limit }),
|
|
8107
|
+
((_d = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _d.show_switch_view_option) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector }) : null
|
|
8091
8108
|
] })
|
|
8092
8109
|
] }),
|
|
8093
8110
|
isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: productGridSkeleton }) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: (searchResult == null ? void 0 : searchResult.length) ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
@@ -8098,7 +8115,7 @@ const FilterHorizontalLayout = (props) => {
|
|
|
8098
8115
|
] });
|
|
8099
8116
|
};
|
|
8100
8117
|
const FilterFlyoutLayout$1 = (props) => {
|
|
8101
|
-
var _a, _b;
|
|
8118
|
+
var _a, _b, _c, _d;
|
|
8102
8119
|
const {
|
|
8103
8120
|
displaySettings,
|
|
8104
8121
|
languageSettings,
|
|
@@ -8157,17 +8174,17 @@ const FilterFlyoutLayout$1 = (props) => {
|
|
|
8157
8174
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: language_filter || "Filter" }),
|
|
8158
8175
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FilterIcon, { width: 18, height: 18, color: "#393d4e" })
|
|
8159
8176
|
] }),
|
|
8160
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SearchFieldDesktop, { children: searchField })
|
|
8177
|
+
((_b = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _b.hide_search_bar) ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(SearchFieldDesktop, { children: searchField })
|
|
8161
8178
|
] }),
|
|
8162
8179
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SelectFieldWrapper, { children: [
|
|
8163
8180
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: sort }),
|
|
8164
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: limit })
|
|
8181
|
+
((_c = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _c.hide_limit_options) ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: limit })
|
|
8165
8182
|
] })
|
|
8166
8183
|
] }),
|
|
8167
8184
|
isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: productGridSkeleton }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8168
8185
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SummaryTextVertical, { className: "sledge-instant-search__result-summary-text-with-column-grid-selector-wrapper", children: [
|
|
8169
8186
|
summaryText,
|
|
8170
|
-
((
|
|
8187
|
+
((_d = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _d.show_switch_view_option) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector }) : null
|
|
8171
8188
|
] }),
|
|
8172
8189
|
(searchResult == null ? void 0 : searchResult.length) ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8173
8190
|
productGrid,
|
|
@@ -8178,7 +8195,7 @@ const FilterFlyoutLayout$1 = (props) => {
|
|
|
8178
8195
|
] });
|
|
8179
8196
|
};
|
|
8180
8197
|
const EnterpriseLayout = (props) => {
|
|
8181
|
-
var _a, _b, _c;
|
|
8198
|
+
var _a, _b, _c, _d, _e;
|
|
8182
8199
|
const {
|
|
8183
8200
|
displaySettings,
|
|
8184
8201
|
allowedFilter,
|
|
@@ -8224,7 +8241,9 @@ const EnterpriseLayout = (props) => {
|
|
|
8224
8241
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FilterIcon, { width: 18, height: 18, color: "#393d4e" })
|
|
8225
8242
|
] }),
|
|
8226
8243
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: sort }),
|
|
8227
|
-
|
|
8244
|
+
((_c = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _c.hide_limit_options) ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: limit }),
|
|
8245
|
+
((_d = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _d.hide_search_bar) ? null : searchField,
|
|
8246
|
+
((_e = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _e.show_switch_view_option) ? /* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldWrapper, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector }) }) : null
|
|
8228
8247
|
] }),
|
|
8229
8248
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(ResultData, { children: [
|
|
8230
8249
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `sledge-instant-search__result-filter-toggle-panel ${"animated"}`, "data-filter-toggle": openFilterToggle ? "open" : "closed", children: filterVertical == null ? void 0 : filterVertical({
|
|
@@ -8239,7 +8258,7 @@ const EnterpriseLayout = (props) => {
|
|
|
8239
8258
|
] }) });
|
|
8240
8259
|
};
|
|
8241
8260
|
const YuvaLayout = (props) => {
|
|
8242
|
-
var _a, _b, _c;
|
|
8261
|
+
var _a, _b, _c, _d, _e;
|
|
8243
8262
|
const {
|
|
8244
8263
|
displaySettings,
|
|
8245
8264
|
allowedFilter,
|
|
@@ -8254,7 +8273,8 @@ const YuvaLayout = (props) => {
|
|
|
8254
8273
|
languageSettings,
|
|
8255
8274
|
openFilterToggle = false,
|
|
8256
8275
|
setOpenFilterToggle = () => {
|
|
8257
|
-
}
|
|
8276
|
+
},
|
|
8277
|
+
handleSearchResultFirstTime
|
|
8258
8278
|
} = props;
|
|
8259
8279
|
const { filter: language_filter } = languageSettings || {};
|
|
8260
8280
|
const {
|
|
@@ -8284,10 +8304,12 @@ const YuvaLayout = (props) => {
|
|
|
8284
8304
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: language_filter || "Filter" }),
|
|
8285
8305
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FilterIcon, { width: 18, height: 18, color: "#393d4e" })
|
|
8286
8306
|
] }),
|
|
8307
|
+
((_c = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _c.hide_search_bar) ? null : searchField,
|
|
8287
8308
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SelectFieldWrapper, { children: [
|
|
8288
|
-
summaryText,
|
|
8289
|
-
((
|
|
8290
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: sort })
|
|
8309
|
+
handleSearchResultFirstTime ? summaryTextSkeleton : summaryText,
|
|
8310
|
+
((_d = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _d.show_switch_view_option) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector }) : null,
|
|
8311
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: sort }),
|
|
8312
|
+
((_e = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _e.hide_limit_options) ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: limit })
|
|
8291
8313
|
] })
|
|
8292
8314
|
] }),
|
|
8293
8315
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(ResultData, { children: [
|
|
@@ -8303,8 +8325,21 @@ const YuvaLayout = (props) => {
|
|
|
8303
8325
|
] }) });
|
|
8304
8326
|
};
|
|
8305
8327
|
const ToyoLayout = (props) => {
|
|
8306
|
-
var _a, _b, _c;
|
|
8307
|
-
const {
|
|
8328
|
+
var _a, _b, _c, _d, _e;
|
|
8329
|
+
const {
|
|
8330
|
+
displaySettings,
|
|
8331
|
+
allowedFilter,
|
|
8332
|
+
isFirstLoading,
|
|
8333
|
+
isLoading,
|
|
8334
|
+
isLoadingProduct,
|
|
8335
|
+
isLoadingSetting,
|
|
8336
|
+
searchResult = [],
|
|
8337
|
+
propsData,
|
|
8338
|
+
hideFilterWhenOneValue,
|
|
8339
|
+
components,
|
|
8340
|
+
skeleton,
|
|
8341
|
+
handleSearchResultFirstTime
|
|
8342
|
+
} = props;
|
|
8308
8343
|
const {
|
|
8309
8344
|
filterHorizontal = null,
|
|
8310
8345
|
filterActive = null,
|
|
@@ -8327,18 +8362,22 @@ const ToyoLayout = (props) => {
|
|
|
8327
8362
|
} = skeleton || {};
|
|
8328
8363
|
const isShowFilter = ((_a = displaySettings == null ? void 0 : displaySettings.filter) == null ? void 0 : _a.enable_on_search) && ((_b = displaySettings == null ? void 0 : displaySettings.filter) == null ? void 0 : _b.layout) === "toyo" && !hideFilterWhenOneValue;
|
|
8329
8364
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ResultWrapper, { displaySettings, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ResultData, { children: [
|
|
8330
|
-
isFirstLoading ? searchAndSelectOptionSkeleton : /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
8331
|
-
|
|
8332
|
-
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
|
|
8341
|
-
|
|
8365
|
+
isFirstLoading ? searchAndSelectOptionSkeleton : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8366
|
+
((_c = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _c.hide_search_bar) ? null : searchField,
|
|
8367
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ResultDataKeyword, { children: [
|
|
8368
|
+
handleSearchResultFirstTime ? summaryTextSkeleton : /* @__PURE__ */ jsxRuntimeExports.jsx(SummaryTextHorizontal, { children: summaryText }),
|
|
8369
|
+
isShowFilter ? filterHorizontal == null ? void 0 : filterHorizontal({
|
|
8370
|
+
deviceType: "desktop",
|
|
8371
|
+
isSkeleton: Boolean(handleSearchResultFirstTime || isFirstLoading && !propsData || isLoadingSetting && !propsData),
|
|
8372
|
+
isHorizontalGroup: true,
|
|
8373
|
+
showOnlyItems: true,
|
|
8374
|
+
components: {
|
|
8375
|
+
sort,
|
|
8376
|
+
limit: ((_d = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _d.hide_limit_options) ? null : limit
|
|
8377
|
+
}
|
|
8378
|
+
}) : null,
|
|
8379
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldWrapper, { children: ((_e = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _e.show_switch_view_option) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector }) : null })
|
|
8380
|
+
] })
|
|
8342
8381
|
] }),
|
|
8343
8382
|
isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: productGridSkeleton }) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: (searchResult == null ? void 0 : searchResult.length) ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8344
8383
|
filterActive == null ? void 0 : filterActive(),
|
|
@@ -8348,8 +8387,21 @@ const ToyoLayout = (props) => {
|
|
|
8348
8387
|
] }) }) });
|
|
8349
8388
|
};
|
|
8350
8389
|
const FilterHorizontalGroupLayout = (props) => {
|
|
8351
|
-
var _a, _b;
|
|
8352
|
-
const {
|
|
8390
|
+
var _a, _b, _c, _d;
|
|
8391
|
+
const {
|
|
8392
|
+
displaySettings,
|
|
8393
|
+
allowedFilter,
|
|
8394
|
+
isFirstLoading,
|
|
8395
|
+
isLoading,
|
|
8396
|
+
isLoadingProduct,
|
|
8397
|
+
isLoadingSetting,
|
|
8398
|
+
searchResult = [],
|
|
8399
|
+
propsData,
|
|
8400
|
+
hideFilterWhenOneValue,
|
|
8401
|
+
components,
|
|
8402
|
+
skeleton,
|
|
8403
|
+
handleSearchResultFirstTime
|
|
8404
|
+
} = props;
|
|
8353
8405
|
const {
|
|
8354
8406
|
filterHorizontal = null,
|
|
8355
8407
|
summaryText = null,
|
|
@@ -8373,17 +8425,17 @@ const FilterHorizontalGroupLayout = (props) => {
|
|
|
8373
8425
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8374
8426
|
isShowFilter ? filterHorizontal == null ? void 0 : filterHorizontal({
|
|
8375
8427
|
deviceType: "desktop",
|
|
8376
|
-
isSkeleton: Boolean(isFirstLoading && !propsData || isLoadingSetting && !propsData),
|
|
8428
|
+
isSkeleton: Boolean(handleSearchResultFirstTime || isFirstLoading && !propsData || isLoadingSetting && !propsData),
|
|
8377
8429
|
isHorizontalGroup: true
|
|
8378
8430
|
}) : null,
|
|
8379
8431
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ResultWrapper, { displaySettings, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ResultData, { children: [
|
|
8380
8432
|
isFirstLoading ? searchAndSelectOptionSkeleton : /* @__PURE__ */ jsxRuntimeExports.jsxs(ResultDataKeyword, { children: [
|
|
8381
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SummaryTextHorizontal, { children: summaryText }),
|
|
8382
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SearchFieldDesktop, { children: searchField }),
|
|
8433
|
+
handleSearchResultFirstTime ? summaryTextSkeleton : /* @__PURE__ */ jsxRuntimeExports.jsx(SummaryTextHorizontal, { children: summaryText }),
|
|
8434
|
+
((_b = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _b.hide_search_bar) ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(SearchFieldDesktop, { children: searchField }),
|
|
8383
8435
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SelectFieldWrapper, { children: [
|
|
8384
8436
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: sort }),
|
|
8385
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: limit }),
|
|
8386
|
-
((
|
|
8437
|
+
((_c = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _c.hide_limit_options) ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: limit }),
|
|
8438
|
+
((_d = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _d.show_switch_view_option) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector }) : null
|
|
8387
8439
|
] })
|
|
8388
8440
|
] }),
|
|
8389
8441
|
isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: productGridSkeleton }) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: (searchResult == null ? void 0 : searchResult.length) ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
@@ -8394,7 +8446,7 @@ const FilterHorizontalGroupLayout = (props) => {
|
|
|
8394
8446
|
] });
|
|
8395
8447
|
};
|
|
8396
8448
|
const DesktopLayout = (props) => {
|
|
8397
|
-
var _a;
|
|
8449
|
+
var _a, _b, _c;
|
|
8398
8450
|
const { displaySettings } = props;
|
|
8399
8451
|
const renderLayout = () => {
|
|
8400
8452
|
var _a2;
|
|
@@ -8417,10 +8469,21 @@ const DesktopLayout = (props) => {
|
|
|
8417
8469
|
return null;
|
|
8418
8470
|
}
|
|
8419
8471
|
};
|
|
8420
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8472
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8473
|
+
RenderLayout,
|
|
8474
|
+
{
|
|
8475
|
+
device: "desktop",
|
|
8476
|
+
layout: (_a = displaySettings == null ? void 0 : displaySettings.filter) == null ? void 0 : _a.layout,
|
|
8477
|
+
additionalProps: {
|
|
8478
|
+
"data-hide-search-bar": (_b = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _b.hide_search_bar,
|
|
8479
|
+
"data-hide-limit-options": (_c = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _c.hide_limit_options
|
|
8480
|
+
},
|
|
8481
|
+
children: renderLayout()
|
|
8482
|
+
}
|
|
8483
|
+
);
|
|
8421
8484
|
};
|
|
8422
8485
|
const FilterFlyoutLayout = (props) => {
|
|
8423
|
-
var _a;
|
|
8486
|
+
var _a, _b, _c;
|
|
8424
8487
|
const {
|
|
8425
8488
|
displaySettings,
|
|
8426
8489
|
languageSettings,
|
|
@@ -8484,11 +8547,11 @@ const FilterFlyoutLayout = (props) => {
|
|
|
8484
8547
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: language_filter || "Filter" }),
|
|
8485
8548
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FilterIcon, { width: 18, height: 18, color: "#393d4e" })
|
|
8486
8549
|
] }),
|
|
8487
|
-
searchField
|
|
8550
|
+
((_b = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _b.hide_search_bar) ? null : searchField
|
|
8488
8551
|
] }) }),
|
|
8489
8552
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SelectFieldWrapper, { children: [
|
|
8490
8553
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: sort }),
|
|
8491
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: limit })
|
|
8554
|
+
((_c = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _c.hide_limit_options) ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: limit })
|
|
8492
8555
|
] })
|
|
8493
8556
|
] }) }),
|
|
8494
8557
|
isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: productGridSkeleton }) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: (searchResult == null ? void 0 : searchResult.length) ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
@@ -8499,7 +8562,7 @@ const FilterFlyoutLayout = (props) => {
|
|
|
8499
8562
|
] });
|
|
8500
8563
|
};
|
|
8501
8564
|
const FilterStandardLayout = (props) => {
|
|
8502
|
-
var _a;
|
|
8565
|
+
var _a, _b, _c;
|
|
8503
8566
|
const { displaySettings, languageSettings, allowedFilter, isFirstLoading, isLoading, isLoadingProduct, isLoadingSetting, searchResult = [], components, skeleton } = props;
|
|
8504
8567
|
const {
|
|
8505
8568
|
filterHorizontal = null,
|
|
@@ -8531,12 +8594,12 @@ const FilterStandardLayout = (props) => {
|
|
|
8531
8594
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SummaryTextHorizontal, { children: summaryText }),
|
|
8532
8595
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector }),
|
|
8533
8596
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(FilterHorizontalBlockMobile, { children: [
|
|
8534
|
-
searchField,
|
|
8597
|
+
((_b = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _b.hide_search_bar) ? null : searchField,
|
|
8535
8598
|
filterHorizontal == null ? void 0 : filterHorizontal({ deviceType: "mobile" })
|
|
8536
8599
|
] }),
|
|
8537
8600
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SelectFieldWrapper, { children: [
|
|
8538
8601
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: sort }),
|
|
8539
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: limit })
|
|
8602
|
+
((_c = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _c.hide_limit_options) ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: limit })
|
|
8540
8603
|
] })
|
|
8541
8604
|
] }) }),
|
|
8542
8605
|
isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: productGridSkeleton }) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: (searchResult == null ? void 0 : searchResult.length) ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
@@ -8546,7 +8609,7 @@ const FilterStandardLayout = (props) => {
|
|
|
8546
8609
|
] }) }) });
|
|
8547
8610
|
};
|
|
8548
8611
|
const StickyFilterButtonLayout = (props) => {
|
|
8549
|
-
var _a;
|
|
8612
|
+
var _a, _b, _c;
|
|
8550
8613
|
const {
|
|
8551
8614
|
displaySettings,
|
|
8552
8615
|
languageSettings,
|
|
@@ -8609,10 +8672,10 @@ const StickyFilterButtonLayout = (props) => {
|
|
|
8609
8672
|
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8610
8673
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SummaryTextHorizontal, { children: summaryText }),
|
|
8611
8674
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector }),
|
|
8612
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(FilterHorizontalBlockMobile, { children: searchField }),
|
|
8675
|
+
((_b = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _b.hide_search_bar) ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(FilterHorizontalBlockMobile, { children: searchField }),
|
|
8613
8676
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SelectFieldWrapper, { children: [
|
|
8614
8677
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: sort }),
|
|
8615
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: limit })
|
|
8678
|
+
((_c = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _c.hide_limit_options) ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: limit })
|
|
8616
8679
|
] })
|
|
8617
8680
|
] }) }),
|
|
8618
8681
|
isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: productGridSkeleton }) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: (searchResult == null ? void 0 : searchResult.length) ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
@@ -8623,7 +8686,7 @@ const StickyFilterButtonLayout = (props) => {
|
|
|
8623
8686
|
] });
|
|
8624
8687
|
};
|
|
8625
8688
|
const MobileLayout = (props) => {
|
|
8626
|
-
var _a;
|
|
8689
|
+
var _a, _b, _c;
|
|
8627
8690
|
const { displaySettings } = props;
|
|
8628
8691
|
const renderLayout = () => {
|
|
8629
8692
|
var _a2;
|
|
@@ -8638,7 +8701,18 @@ const MobileLayout = (props) => {
|
|
|
8638
8701
|
return null;
|
|
8639
8702
|
}
|
|
8640
8703
|
};
|
|
8641
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8704
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8705
|
+
RenderLayout,
|
|
8706
|
+
{
|
|
8707
|
+
device: "mobile",
|
|
8708
|
+
layout: (_a = displaySettings == null ? void 0 : displaySettings.filter) == null ? void 0 : _a.mobile_layout,
|
|
8709
|
+
additionalProps: {
|
|
8710
|
+
"data-hide-search-bar": (_b = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _b.hide_search_bar,
|
|
8711
|
+
"data-hide-limit-options": (_c = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _c.hide_limit_options
|
|
8712
|
+
},
|
|
8713
|
+
children: renderLayout()
|
|
8714
|
+
}
|
|
8715
|
+
);
|
|
8642
8716
|
};
|
|
8643
8717
|
const SearchResultWidget = (props) => {
|
|
8644
8718
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A;
|