@sledge-app/react-instant-search 2.0.4 → 2.0.6
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.
|
@@ -1107,46 +1107,34 @@ const rowRenderer = ({ virtualized, item, id, labelStyle }) => {
|
|
|
1107
1107
|
] });
|
|
1108
1108
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge__radio-group-item-flex", children: content }, key || index);
|
|
1109
1109
|
};
|
|
1110
|
-
const RadioGroup = ({ id, name, required,
|
|
1111
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge__radio-group-wrapper", children: /* @__PURE__ */ jsxRuntimeExports.jsx("form", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1112
|
-
|
|
1110
|
+
const RadioGroup = ({ id, name, required, value, items, labelStyle = {}, onValueChange, useVirtualized = false, scrollElement, selector, parentRef }) => {
|
|
1111
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge__radio-group-wrapper", children: /* @__PURE__ */ jsxRuntimeExports.jsx("form", { children: /* @__PURE__ */ jsxRuntimeExports.jsx($f99a8c78507165f7$export$be92b6f5f03c0fe9, { className: "sledge__radio-group-root", "aria-label": "View density", id, name, required, onValueChange, value: String(value), children: useVirtualized ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1112
|
+
VirtualizedList,
|
|
1113
1113
|
{
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1114
|
+
rowCount: items == null ? void 0 : items.length,
|
|
1115
|
+
rowRenderer: ({ index, key }) => rowRenderer({
|
|
1116
|
+
virtualized: {
|
|
1117
|
+
index,
|
|
1118
|
+
key
|
|
1119
|
+
},
|
|
1120
|
+
item: items[index],
|
|
1121
|
+
id,
|
|
1122
|
+
labelStyle
|
|
1123
|
+
}),
|
|
1124
|
+
scrollElement,
|
|
1125
|
+
selector,
|
|
1126
|
+
parentRef
|
|
1127
|
+
}
|
|
1128
|
+
) : items.map(
|
|
1129
|
+
(item, index) => rowRenderer({
|
|
1130
|
+
virtualized: {
|
|
1131
|
+
index
|
|
1132
|
+
},
|
|
1133
|
+
item,
|
|
1117
1134
|
id,
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
children: useVirtualized ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1122
|
-
VirtualizedList,
|
|
1123
|
-
{
|
|
1124
|
-
rowCount: items == null ? void 0 : items.length,
|
|
1125
|
-
rowRenderer: ({ index, key }) => rowRenderer({
|
|
1126
|
-
virtualized: {
|
|
1127
|
-
index,
|
|
1128
|
-
key
|
|
1129
|
-
},
|
|
1130
|
-
item: items[index],
|
|
1131
|
-
id,
|
|
1132
|
-
labelStyle
|
|
1133
|
-
}),
|
|
1134
|
-
scrollElement,
|
|
1135
|
-
selector,
|
|
1136
|
-
parentRef
|
|
1137
|
-
}
|
|
1138
|
-
) : items.map(
|
|
1139
|
-
(item, index) => rowRenderer({
|
|
1140
|
-
virtualized: {
|
|
1141
|
-
index
|
|
1142
|
-
},
|
|
1143
|
-
item,
|
|
1144
|
-
id,
|
|
1145
|
-
labelStyle
|
|
1146
|
-
})
|
|
1147
|
-
)
|
|
1148
|
-
}
|
|
1149
|
-
) }) });
|
|
1135
|
+
labelStyle
|
|
1136
|
+
})
|
|
1137
|
+
) }) }) });
|
|
1150
1138
|
};
|
|
1151
1139
|
const ColorSwatch$1 = "";
|
|
1152
1140
|
const ColorSwatch = ({ id, name, value, rgb, image, required, checked, onClick }) => {
|
|
@@ -7732,7 +7720,7 @@ const Facet = (props) => {
|
|
|
7732
7720
|
value: value2
|
|
7733
7721
|
};
|
|
7734
7722
|
}),
|
|
7735
|
-
|
|
7723
|
+
value: clickedFacets && ((_d = clickedFacets[value]) == null ? void 0 : _d.length) ? clickedFacets[value][0] : "",
|
|
7736
7724
|
labelStyle: filter_option_style,
|
|
7737
7725
|
useVirtualized: true,
|
|
7738
7726
|
selector: scrollElementSelector,
|
|
@@ -7981,7 +7969,7 @@ const ProductGridPaginationWrapper = (props) => {
|
|
|
7981
7969
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge-instant-search__result-product-grid-pagination-wrapper", children });
|
|
7982
7970
|
};
|
|
7983
7971
|
const FilterVerticalLayout = (props) => {
|
|
7984
|
-
var _a;
|
|
7972
|
+
var _a, _b;
|
|
7985
7973
|
const {
|
|
7986
7974
|
displaySettings,
|
|
7987
7975
|
allowedFilter,
|
|
@@ -8032,7 +8020,7 @@ const FilterVerticalLayout = (props) => {
|
|
|
8032
8020
|
isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: productGridSkeleton }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8033
8021
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SummaryTextVertical, { className: "sledge-instant-search__result-summary-text-with-column-grid-selector-wrapper", children: [
|
|
8034
8022
|
summaryText,
|
|
8035
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector })
|
|
8023
|
+
((_b = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _b.show_switch_view_option) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector }) : null
|
|
8036
8024
|
] }),
|
|
8037
8025
|
(searchResult == null ? void 0 : searchResult.length) ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8038
8026
|
productGrid,
|
|
@@ -8043,7 +8031,7 @@ const FilterVerticalLayout = (props) => {
|
|
|
8043
8031
|
] }) });
|
|
8044
8032
|
};
|
|
8045
8033
|
const FilterHorizontalLayout = (props) => {
|
|
8046
|
-
var _a;
|
|
8034
|
+
var _a, _b;
|
|
8047
8035
|
const { displaySettings, allowedFilter, isFirstLoading, isLoading, isLoadingProduct, isLoadingSetting, searchResult = [], propsData, hideFilterWhenOneValue, components, skeleton } = props;
|
|
8048
8036
|
const {
|
|
8049
8037
|
filterHorizontal = null,
|
|
@@ -8077,7 +8065,7 @@ const FilterHorizontalLayout = (props) => {
|
|
|
8077
8065
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SelectFieldWrapper, { children: [
|
|
8078
8066
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: sort }),
|
|
8079
8067
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: limit }),
|
|
8080
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector })
|
|
8068
|
+
((_b = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _b.show_switch_view_option) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector }) : null
|
|
8081
8069
|
] })
|
|
8082
8070
|
] }),
|
|
8083
8071
|
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: [
|
|
@@ -8088,7 +8076,7 @@ const FilterHorizontalLayout = (props) => {
|
|
|
8088
8076
|
] });
|
|
8089
8077
|
};
|
|
8090
8078
|
const FilterFlyoutLayout$1 = (props) => {
|
|
8091
|
-
var _a;
|
|
8079
|
+
var _a, _b;
|
|
8092
8080
|
const {
|
|
8093
8081
|
displaySettings,
|
|
8094
8082
|
languageSettings,
|
|
@@ -8157,7 +8145,7 @@ const FilterFlyoutLayout$1 = (props) => {
|
|
|
8157
8145
|
isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: productGridSkeleton }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8158
8146
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SummaryTextVertical, { className: "sledge-instant-search__result-summary-text-with-column-grid-selector-wrapper", children: [
|
|
8159
8147
|
summaryText,
|
|
8160
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector })
|
|
8148
|
+
((_b = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _b.show_switch_view_option) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector }) : null
|
|
8161
8149
|
] }),
|
|
8162
8150
|
(searchResult == null ? void 0 : searchResult.length) ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8163
8151
|
productGrid,
|
|
@@ -8168,7 +8156,7 @@ const FilterFlyoutLayout$1 = (props) => {
|
|
|
8168
8156
|
] });
|
|
8169
8157
|
};
|
|
8170
8158
|
const EnterpriseLayout = (props) => {
|
|
8171
|
-
var _a, _b;
|
|
8159
|
+
var _a, _b, _c;
|
|
8172
8160
|
const {
|
|
8173
8161
|
displaySettings,
|
|
8174
8162
|
allowedFilter,
|
|
@@ -8214,7 +8202,7 @@ const EnterpriseLayout = (props) => {
|
|
|
8214
8202
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FilterIcon, { width: 18, height: 18, color: "#393d4e" })
|
|
8215
8203
|
] }),
|
|
8216
8204
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: sort }),
|
|
8217
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldWrapper, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector }) })
|
|
8205
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldWrapper, { children: ((_c = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _c.show_switch_view_option) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector }) : null })
|
|
8218
8206
|
] }),
|
|
8219
8207
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(ResultData, { children: [
|
|
8220
8208
|
/* @__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({
|
|
@@ -8229,7 +8217,7 @@ const EnterpriseLayout = (props) => {
|
|
|
8229
8217
|
] }) });
|
|
8230
8218
|
};
|
|
8231
8219
|
const YuvaLayout = (props) => {
|
|
8232
|
-
var _a, _b;
|
|
8220
|
+
var _a, _b, _c;
|
|
8233
8221
|
const {
|
|
8234
8222
|
displaySettings,
|
|
8235
8223
|
allowedFilter,
|
|
@@ -8276,24 +8264,24 @@ const YuvaLayout = (props) => {
|
|
|
8276
8264
|
] }),
|
|
8277
8265
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SelectFieldWrapper, { children: [
|
|
8278
8266
|
summaryText,
|
|
8279
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector }),
|
|
8267
|
+
((_c = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _c.show_switch_view_option) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector }) : null,
|
|
8280
8268
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: sort })
|
|
8281
8269
|
] })
|
|
8282
8270
|
] }),
|
|
8283
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
8271
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ResultData, { children: [
|
|
8284
8272
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `sledge-instant-search__result-filter-toggle-panel ${""}`, "data-filter-toggle": openFilterToggle ? "open" : "closed", children: filterVertical == null ? void 0 : filterVertical({
|
|
8285
8273
|
filterLayoutType: "standard",
|
|
8286
8274
|
isSkeleton: Boolean(!isAllowedFilterTree && isFirstLoading || isAllowedFilterTree && isLoadingProduct || isLoadingSetting)
|
|
8287
8275
|
}) }),
|
|
8288
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ProductGridPaginationWrapper, { children: (searchResult == null ? void 0 : searchResult.length) ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8276
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge-instant-search__result-data-flex", children: isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: productGridSkeleton }) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ProductGridPaginationWrapper, { children: (searchResult == null ? void 0 : searchResult.length) ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8289
8277
|
productGrid,
|
|
8290
8278
|
pagination
|
|
8291
|
-
] }) : resultEmpty })
|
|
8292
|
-
] })
|
|
8279
|
+
] }) : resultEmpty }) }) })
|
|
8280
|
+
] })
|
|
8293
8281
|
] }) });
|
|
8294
8282
|
};
|
|
8295
8283
|
const ToyoLayout = (props) => {
|
|
8296
|
-
var _a, _b;
|
|
8284
|
+
var _a, _b, _c;
|
|
8297
8285
|
const { displaySettings, allowedFilter, isFirstLoading, isLoading, isLoadingProduct, isLoadingSetting, searchResult = [], propsData, hideFilterWhenOneValue, components, skeleton } = props;
|
|
8298
8286
|
const {
|
|
8299
8287
|
filterHorizontal = null,
|
|
@@ -8328,7 +8316,7 @@ const ToyoLayout = (props) => {
|
|
|
8328
8316
|
sort
|
|
8329
8317
|
}
|
|
8330
8318
|
}) : null,
|
|
8331
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldWrapper, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector }) })
|
|
8319
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldWrapper, { children: ((_c = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _c.show_switch_view_option) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector }) : null })
|
|
8332
8320
|
] }),
|
|
8333
8321
|
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: [
|
|
8334
8322
|
filterActive == null ? void 0 : filterActive(),
|
|
@@ -8338,7 +8326,7 @@ const ToyoLayout = (props) => {
|
|
|
8338
8326
|
] }) }) });
|
|
8339
8327
|
};
|
|
8340
8328
|
const FilterHorizontalGroupLayout = (props) => {
|
|
8341
|
-
var _a;
|
|
8329
|
+
var _a, _b;
|
|
8342
8330
|
const { displaySettings, allowedFilter, isFirstLoading, isLoading, isLoadingProduct, isLoadingSetting, searchResult = [], propsData, hideFilterWhenOneValue, components, skeleton } = props;
|
|
8343
8331
|
const {
|
|
8344
8332
|
filterHorizontal = null,
|
|
@@ -8373,7 +8361,7 @@ const FilterHorizontalGroupLayout = (props) => {
|
|
|
8373
8361
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SelectFieldWrapper, { children: [
|
|
8374
8362
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: sort }),
|
|
8375
8363
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectFieldItem, { children: limit }),
|
|
8376
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector })
|
|
8364
|
+
((_b = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _b.show_switch_view_option) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnGridSelectorWrapper, { children: columnGridSelector }) : null
|
|
8377
8365
|
] })
|
|
8378
8366
|
] }),
|
|
8379
8367
|
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: [
|