@sledge-app/react-instant-search 0.0.56 → 0.0.58
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/SearchIconWidget/SearchIconWidget.d.ts.map +1 -1
- package/dist/components/SearchIconWidget/SearchIconWidgetPopup.d.ts.map +1 -1
- package/dist/components/SearchResultWidget/SearchResultWidget.d.ts.map +1 -1
- package/dist/components/SearchWidget/SearchWidget.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 +1 -16
- package/dist/sledge-react-instant-search.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -5
|
@@ -52,7 +52,6 @@ const scrollToElement = (element, headerOffset) => {
|
|
|
52
52
|
behavior: "smooth"
|
|
53
53
|
});
|
|
54
54
|
};
|
|
55
|
-
const SearchIconWidget$1 = "";
|
|
56
55
|
const root = "";
|
|
57
56
|
const Loading = "";
|
|
58
57
|
const ConfirmationPopup = "";
|
|
@@ -518,7 +517,6 @@ const addToCart = async (data) => {
|
|
|
518
517
|
return;
|
|
519
518
|
});
|
|
520
519
|
};
|
|
521
|
-
const Badge = "";
|
|
522
520
|
const addWishlist = async (data) => {
|
|
523
521
|
const { productId, productVariantId, productName, productVendor, productSku, productVariantName, productLink, productImage, productCurrency, productPrice } = data;
|
|
524
522
|
let sledgeAuthApp = localStorage.getItem(LOCAL_STORAGE_KEY.AUTH_APP);
|
|
@@ -627,8 +625,6 @@ const addToCartTrigger$1 = async (data) => {
|
|
|
627
625
|
return;
|
|
628
626
|
});
|
|
629
627
|
};
|
|
630
|
-
const ButtonDetail = "";
|
|
631
|
-
const Trigger$1 = "";
|
|
632
628
|
const Trigger = (props) => {
|
|
633
629
|
var _a, _b, _c;
|
|
634
630
|
const { data, forceActive = false, hidden = false, onAfterAddWishlist, onAfterRemoveWishlist } = props;
|
|
@@ -780,7 +776,6 @@ const Trigger = (props) => {
|
|
|
780
776
|
}
|
|
781
777
|
) }) });
|
|
782
778
|
};
|
|
783
|
-
const Widget$1 = "";
|
|
784
779
|
const WidgetHeaderClearTrigger = ({ buttonText, shareId, dataSettings, isFirstLoading }) => {
|
|
785
780
|
var _a, _b, _c, _d, _e;
|
|
786
781
|
const { sledgeAnonymId } = React__default.useContext(SledgeContext);
|
|
@@ -1152,8 +1147,6 @@ const usePrevious = (value) => {
|
|
|
1152
1147
|
});
|
|
1153
1148
|
return ref.current;
|
|
1154
1149
|
};
|
|
1155
|
-
const WidgetPopup = "";
|
|
1156
|
-
const Rating$1 = "";
|
|
1157
1150
|
const getReviewInfo = async (id) => {
|
|
1158
1151
|
let convertId = sanitizeDataId(id);
|
|
1159
1152
|
let sledgeAuthApp = localStorage.getItem(LOCAL_STORAGE_KEY.AUTH_APP);
|
|
@@ -1237,11 +1230,9 @@ const Rating = (props) => {
|
|
|
1237
1230
|
React__default.useEffect(() => {
|
|
1238
1231
|
if (!(isRenderApp == null ? void 0 : isRenderApp.productReview))
|
|
1239
1232
|
return;
|
|
1233
|
+
console.log("triggered add product review");
|
|
1240
1234
|
if (typeof window !== "undefined") {
|
|
1241
1235
|
window.sledgeProductReviewRatingUpdate = () => {
|
|
1242
|
-
var _a2, _b;
|
|
1243
|
-
if (((_b = (_a2 = triggerRenderMultipleComponent == null ? void 0 : triggerRenderMultipleComponent.productReview) == null ? void 0 : _a2.rating) == null ? void 0 : _b.value) !== productId)
|
|
1244
|
-
return;
|
|
1245
1236
|
handleProductRatingInfo();
|
|
1246
1237
|
};
|
|
1247
1238
|
}
|
|
@@ -1311,7 +1302,6 @@ const Rating = (props) => {
|
|
|
1311
1302
|
] })
|
|
1312
1303
|
] }) });
|
|
1313
1304
|
};
|
|
1314
|
-
const Widget = "";
|
|
1315
1305
|
const WidgetHeaderAddTrigger = ({ isFirstLoading, text, dataSettings, data, onAfterAddReview }) => {
|
|
1316
1306
|
var _a, _b, _c;
|
|
1317
1307
|
const {
|
|
@@ -1569,8 +1559,6 @@ const WidgetHeader = (props) => {
|
|
|
1569
1559
|
WidgetHeader.Sort = WidgetHeaderSort;
|
|
1570
1560
|
WidgetHeader.AddTrigger = WidgetHeaderAddTrigger;
|
|
1571
1561
|
WidgetHeader.Summary = WidgetHeaderSummary;
|
|
1572
|
-
const WidgetPopupDetail = "";
|
|
1573
|
-
const WidgetFormAdd = "";
|
|
1574
1562
|
const fetchApi = async (url, method, body) => {
|
|
1575
1563
|
let sledgeInstantSearchAuthApp = localStorage.getItem(LOCAL_STORAGE_KEY.INSTANT_SEARCH_AUTH_APP);
|
|
1576
1564
|
var myHeaders = new Headers();
|
|
@@ -2285,7 +2273,6 @@ const SearchIconWidget = (props) => {
|
|
|
2285
2273
|
};
|
|
2286
2274
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sledge-instant-search__icon-widget", onClick: handleShowWidget, children: /* @__PURE__ */ jsxRuntimeExports.jsx(SearchIcon, { ...sizing, color: "currentColor" }) });
|
|
2287
2275
|
};
|
|
2288
|
-
const SearchIconWidgetPopup$1 = "";
|
|
2289
2276
|
const OtherIndexLists = ({ listsComponent, name, items, isComponentJsVersion }) => {
|
|
2290
2277
|
const getListsComponent = listsComponent ? listsComponent({ name, items }) : null;
|
|
2291
2278
|
return listsComponent ? isComponentJsVersion ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { dangerouslySetInnerHTML: { __html: getListsComponent } }) : getListsComponent : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
@@ -2647,7 +2634,6 @@ const SearchIconWidgetPopup = () => {
|
|
|
2647
2634
|
] })
|
|
2648
2635
|
] }) });
|
|
2649
2636
|
};
|
|
2650
|
-
const SearchResultWidget$1 = "";
|
|
2651
2637
|
const SearchResultWidget = (props) => {
|
|
2652
2638
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
2653
2639
|
const { isRenderApp, isJsVersion } = React__default.useContext(SledgeContext);
|
|
@@ -3922,7 +3908,6 @@ const ResultEmpty = (props) => {
|
|
|
3922
3908
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge-instant-search__result-empty-description", dangerouslySetInnerHTML: { __html: description } })
|
|
3923
3909
|
] });
|
|
3924
3910
|
};
|
|
3925
|
-
const SearchWidget$1 = "";
|
|
3926
3911
|
const SearchWidget = (props) => {
|
|
3927
3912
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
3928
3913
|
const { isRenderApp, isJsVersion } = React__default.useContext(SledgeContext);
|