@bonlineza/luxity-lib 2.38.0 → 2.38.2

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/LuxityFooter.js CHANGED
@@ -1931,10 +1931,10 @@
1931
1931
  var relativeInlineStyle = styled.css(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n position: relative;\n"])));
1932
1932
  var topMiddleBodyStyle = styled.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 1;\n bottom: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n"])));
1933
1933
  var getTopMiddleArrowAfterStyle = function getTopMiddleArrowAfterStyle(props) {
1934
- return styled.css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n /*Bottom Arrow*/\n top: 100%; /* At the bottom of the tooltip */\n left: calc(50% - ", ");\n border-width: ", ";\n border-style: solid;\n border-color: ", " transparent transparent transparent;\n"])), props.apexWidth, props.apexWidth, props.theme.colors.base);
1934
+ return styled.css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n /*Bottom Arrow*/\n top: 100%; /* At the bottom of the tooltip */\n left: calc(50% - ", ");\n border-width: ", ";\n border-style: solid;\n border-color: ", " transparent transparent transparent;\n"])), props.$apexWidth, props.$apexWidth, props.theme.colors.base);
1935
1935
  };
1936
1936
  var getBottomMiddleBodyStyle = function getBottomMiddleBodyStyle(props) {
1937
- return styled.css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n top: 100%;\n left: calc(50% - ", " / 2);\n"])), props.bodyWidth);
1937
+ return styled.css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n top: 100%;\n left: calc(50% - ", " / 2);\n"])), props.$bodyWidth);
1938
1938
  };
1939
1939
  var getBottomMiddleArrowAfterStyle = function getBottomMiddleArrowAfterStyle(props) {
1940
1940
  return styled.css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n /*Top Arrow*/\n bottom: 100%; /* At the top of the tooltip */\n top: initial;\n left: 50%;\n border-style: solid;\n border-color: transparent transparent ", " transparent;\n"])), props.theme.colors.base);
@@ -1944,10 +1944,10 @@
1944
1944
 
1945
1945
  var getBodyStyle = function getBodyStyle() {
1946
1946
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1947
- var _props$toolTipPositio = props.toolTipPosition,
1948
- toolTipPosition = _props$toolTipPositio === void 0 ? '' : _props$toolTipPositio;
1947
+ var _props$$toolTipPositi = props.$toolTipPosition,
1948
+ $toolTipPosition = _props$$toolTipPositi === void 0 ? '' : _props$$toolTipPositi;
1949
1949
 
1950
- switch (toolTipPosition) {
1950
+ switch ($toolTipPosition) {
1951
1951
  case 'top':
1952
1952
  return topMiddleBodyStyle;
1953
1953
 
@@ -1961,9 +1961,9 @@
1961
1961
 
1962
1962
  var getAfterStyling = function getAfterStyling() {
1963
1963
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1964
- var toolTipPosition = props.toolTipPosition;
1964
+ var $toolTipPosition = props.$toolTipPosition;
1965
1965
 
1966
- switch (toolTipPosition) {
1966
+ switch ($toolTipPosition) {
1967
1967
  case 'top':
1968
1968
  return getTopMiddleArrowAfterStyle(props);
1969
1969
 
@@ -1976,7 +1976,7 @@
1976
1976
  };
1977
1977
 
1978
1978
  var Body = styled__default.span(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n ", ";\n visibility: hidden;\n opacity: 0;\n width: ", ";\n transition: visibility 0.3s linear, opacity 0.3s linear;\n background-color: ", ";\n color: white;\n text-align: center;\n border-radius: 5px;\n ", "\n &::after {\n content: ' ';\n position: absolute;\n ", "\n }\n"])), relativeInlineStyle, function (props) {
1979
- return props.bodyWidth;
1979
+ return props.$bodyWidth;
1980
1980
  }, function (props) {
1981
1981
  return props.theme.colors.base || 'black';
1982
1982
  }, function (props) {
@@ -1988,33 +1988,33 @@
1988
1988
  var _templateObject$3;
1989
1989
  var Container = styled__default.div(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n ", ";\n cursor: pointer;\n &:hover ", " {\n opacity: 1;\n visibility: visible;\n }\n"])), relativeInlineStyle, Body);
1990
1990
 
1991
+ /* eslint-disable react/require-default-props */
1992
+
1991
1993
  var Tooltip = function Tooltip(_ref) {
1992
- var children = _ref.children,
1993
- toolTipText = _ref.toolTipText,
1994
- toolTipPosition = _ref.toolTipPosition,
1995
- bodyWidth = _ref.bodyWidth,
1996
- apexWidth = _ref.apexWidth,
1997
- containerClassName = _ref.containerClassName,
1998
- bodyClassName = _ref.bodyClassName;
1994
+ var _ref$children = _ref.children,
1995
+ children = _ref$children === void 0 ? null : _ref$children,
1996
+ _ref$toolTipText = _ref.toolTipText,
1997
+ toolTipText = _ref$toolTipText === void 0 ? '' : _ref$toolTipText,
1998
+ _ref$toolTipPosition = _ref.toolTipPosition,
1999
+ toolTipPosition = _ref$toolTipPosition === void 0 ? 'top' : _ref$toolTipPosition,
2000
+ _ref$bodyWidth = _ref.bodyWidth,
2001
+ bodyWidth = _ref$bodyWidth === void 0 ? '8em' : _ref$bodyWidth,
2002
+ _ref$apexWidth = _ref.apexWidth,
2003
+ apexWidth = _ref$apexWidth === void 0 ? '5px' : _ref$apexWidth,
2004
+ _ref$containerClassNa = _ref.containerClassName,
2005
+ containerClassName = _ref$containerClassNa === void 0 ? '' : _ref$containerClassNa,
2006
+ _ref$bodyClassName = _ref.bodyClassName,
2007
+ bodyClassName = _ref$bodyClassName === void 0 ? '' : _ref$bodyClassName;
1999
2008
  return /*#__PURE__*/React__default.createElement(Container, {
2000
2009
  className: containerClassName
2001
2010
  }, children, /*#__PURE__*/React__default.createElement(Body, {
2002
- toolTipPosition: toolTipPosition,
2003
- bodyWidth: bodyWidth,
2004
- apexWidth: apexWidth,
2011
+ $toolTipPosition: toolTipPosition,
2012
+ $bodyWidth: bodyWidth,
2013
+ $apexWidth: apexWidth,
2005
2014
  className: bodyClassName
2006
2015
  }, toolTipText));
2007
2016
  };
2008
2017
 
2009
- Tooltip.defaultProps = {
2010
- children: null,
2011
- toolTipText: '',
2012
- toolTipPosition: 'top',
2013
- bodyWidth: '8em',
2014
- apexWidth: '5px',
2015
- containerClassName: '',
2016
- bodyClassName: ''
2017
- };
2018
2018
  var Tooltip$1 = themed(Tooltip);
2019
2019
 
2020
2020
  var CurrencySelect = function CurrencySelect(_ref) {
@@ -2161,6 +2161,7 @@
2161
2161
  track: link === null || link === void 0 ? void 0 : link.track,
2162
2162
  target: link.target
2163
2163
  }, link.label) : /*#__PURE__*/React__default.createElement("div", {
2164
+ key: link.label,
2164
2165
  className: "footer__text"
2165
2166
  }, link.label);
2166
2167
  })));
@@ -1313,10 +1313,10 @@
1313
1313
  var relativeInlineStyle = styled.css(_templateObject$i || (_templateObject$i = _taggedTemplateLiteral(["\n position: relative;\n"])));
1314
1314
  var topMiddleBodyStyle = styled.css(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 1;\n bottom: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n"])));
1315
1315
  var getTopMiddleArrowAfterStyle = function getTopMiddleArrowAfterStyle(props) {
1316
- return styled.css(_templateObject3$1 || (_templateObject3$1 = _taggedTemplateLiteral(["\n /*Bottom Arrow*/\n top: 100%; /* At the bottom of the tooltip */\n left: calc(50% - ", ");\n border-width: ", ";\n border-style: solid;\n border-color: ", " transparent transparent transparent;\n"])), props.apexWidth, props.apexWidth, props.theme.colors.base);
1316
+ return styled.css(_templateObject3$1 || (_templateObject3$1 = _taggedTemplateLiteral(["\n /*Bottom Arrow*/\n top: 100%; /* At the bottom of the tooltip */\n left: calc(50% - ", ");\n border-width: ", ";\n border-style: solid;\n border-color: ", " transparent transparent transparent;\n"])), props.$apexWidth, props.$apexWidth, props.theme.colors.base);
1317
1317
  };
1318
1318
  var getBottomMiddleBodyStyle = function getBottomMiddleBodyStyle(props) {
1319
- return styled.css(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral(["\n position: absolute;\n top: 100%;\n left: calc(50% - ", " / 2);\n"])), props.bodyWidth);
1319
+ return styled.css(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral(["\n position: absolute;\n top: 100%;\n left: calc(50% - ", " / 2);\n"])), props.$bodyWidth);
1320
1320
  };
1321
1321
  var getBottomMiddleArrowAfterStyle = function getBottomMiddleArrowAfterStyle(props) {
1322
1322
  return styled.css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n /*Top Arrow*/\n bottom: 100%; /* At the top of the tooltip */\n top: initial;\n left: 50%;\n border-style: solid;\n border-color: transparent transparent ", " transparent;\n"])), props.theme.colors.base);
@@ -1326,10 +1326,10 @@
1326
1326
 
1327
1327
  var getBodyStyle = function getBodyStyle() {
1328
1328
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1329
- var _props$toolTipPositio = props.toolTipPosition,
1330
- toolTipPosition = _props$toolTipPositio === void 0 ? '' : _props$toolTipPositio;
1329
+ var _props$$toolTipPositi = props.$toolTipPosition,
1330
+ $toolTipPosition = _props$$toolTipPositi === void 0 ? '' : _props$$toolTipPositi;
1331
1331
 
1332
- switch (toolTipPosition) {
1332
+ switch ($toolTipPosition) {
1333
1333
  case 'top':
1334
1334
  return topMiddleBodyStyle;
1335
1335
 
@@ -1343,9 +1343,9 @@
1343
1343
 
1344
1344
  var getAfterStyling = function getAfterStyling() {
1345
1345
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1346
- var toolTipPosition = props.toolTipPosition;
1346
+ var $toolTipPosition = props.$toolTipPosition;
1347
1347
 
1348
- switch (toolTipPosition) {
1348
+ switch ($toolTipPosition) {
1349
1349
  case 'top':
1350
1350
  return getTopMiddleArrowAfterStyle(props);
1351
1351
 
@@ -1358,7 +1358,7 @@
1358
1358
  };
1359
1359
 
1360
1360
  var Body$1 = styled__default.span(_templateObject$j || (_templateObject$j = _taggedTemplateLiteral(["\n ", ";\n visibility: hidden;\n opacity: 0;\n width: ", ";\n transition: visibility 0.3s linear, opacity 0.3s linear;\n background-color: ", ";\n color: white;\n text-align: center;\n border-radius: 5px;\n ", "\n &::after {\n content: ' ';\n position: absolute;\n ", "\n }\n"])), relativeInlineStyle, function (props) {
1361
- return props.bodyWidth;
1361
+ return props.$bodyWidth;
1362
1362
  }, function (props) {
1363
1363
  return props.theme.colors.base || 'black';
1364
1364
  }, function (props) {
@@ -455,10 +455,10 @@
455
455
  var relativeInlineStyle = styled.css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n"])));
456
456
  var topMiddleBodyStyle = styled.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 1;\n bottom: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n"])));
457
457
  var getTopMiddleArrowAfterStyle = function getTopMiddleArrowAfterStyle(props) {
458
- return styled.css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n /*Bottom Arrow*/\n top: 100%; /* At the bottom of the tooltip */\n left: calc(50% - ", ");\n border-width: ", ";\n border-style: solid;\n border-color: ", " transparent transparent transparent;\n"])), props.apexWidth, props.apexWidth, props.theme.colors.base);
458
+ return styled.css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n /*Bottom Arrow*/\n top: 100%; /* At the bottom of the tooltip */\n left: calc(50% - ", ");\n border-width: ", ";\n border-style: solid;\n border-color: ", " transparent transparent transparent;\n"])), props.$apexWidth, props.$apexWidth, props.theme.colors.base);
459
459
  };
460
460
  var getBottomMiddleBodyStyle = function getBottomMiddleBodyStyle(props) {
461
- return styled.css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n top: 100%;\n left: calc(50% - ", " / 2);\n"])), props.bodyWidth);
461
+ return styled.css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n top: 100%;\n left: calc(50% - ", " / 2);\n"])), props.$bodyWidth);
462
462
  };
463
463
  var getBottomMiddleArrowAfterStyle = function getBottomMiddleArrowAfterStyle(props) {
464
464
  return styled.css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n /*Top Arrow*/\n bottom: 100%; /* At the top of the tooltip */\n top: initial;\n left: 50%;\n border-style: solid;\n border-color: transparent transparent ", " transparent;\n"])), props.theme.colors.base);
@@ -468,10 +468,10 @@
468
468
 
469
469
  var getBodyStyle = function getBodyStyle() {
470
470
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
471
- var _props$toolTipPositio = props.toolTipPosition,
472
- toolTipPosition = _props$toolTipPositio === void 0 ? '' : _props$toolTipPositio;
471
+ var _props$$toolTipPositi = props.$toolTipPosition,
472
+ $toolTipPosition = _props$$toolTipPositi === void 0 ? '' : _props$$toolTipPositi;
473
473
 
474
- switch (toolTipPosition) {
474
+ switch ($toolTipPosition) {
475
475
  case 'top':
476
476
  return topMiddleBodyStyle;
477
477
 
@@ -485,9 +485,9 @@
485
485
 
486
486
  var getAfterStyling = function getAfterStyling() {
487
487
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
488
- var toolTipPosition = props.toolTipPosition;
488
+ var $toolTipPosition = props.$toolTipPosition;
489
489
 
490
- switch (toolTipPosition) {
490
+ switch ($toolTipPosition) {
491
491
  case 'top':
492
492
  return getTopMiddleArrowAfterStyle(props);
493
493
 
@@ -500,7 +500,7 @@
500
500
  };
501
501
 
502
502
  var Body = styled__default.span(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n ", ";\n visibility: hidden;\n opacity: 0;\n width: ", ";\n transition: visibility 0.3s linear, opacity 0.3s linear;\n background-color: ", ";\n color: white;\n text-align: center;\n border-radius: 5px;\n ", "\n &::after {\n content: ' ';\n position: absolute;\n ", "\n }\n"])), relativeInlineStyle, function (props) {
503
- return props.bodyWidth;
503
+ return props.$bodyWidth;
504
504
  }, function (props) {
505
505
  return props.theme.colors.base || 'black';
506
506
  }, function (props) {
@@ -576,33 +576,33 @@
576
576
  });
577
577
  });
578
578
 
579
+ /* eslint-disable react/require-default-props */
580
+
579
581
  var Tooltip = function Tooltip(_ref) {
580
- var children = _ref.children,
581
- toolTipText = _ref.toolTipText,
582
- toolTipPosition = _ref.toolTipPosition,
583
- bodyWidth = _ref.bodyWidth,
584
- apexWidth = _ref.apexWidth,
585
- containerClassName = _ref.containerClassName,
586
- bodyClassName = _ref.bodyClassName;
582
+ var _ref$children = _ref.children,
583
+ children = _ref$children === void 0 ? null : _ref$children,
584
+ _ref$toolTipText = _ref.toolTipText,
585
+ toolTipText = _ref$toolTipText === void 0 ? '' : _ref$toolTipText,
586
+ _ref$toolTipPosition = _ref.toolTipPosition,
587
+ toolTipPosition = _ref$toolTipPosition === void 0 ? 'top' : _ref$toolTipPosition,
588
+ _ref$bodyWidth = _ref.bodyWidth,
589
+ bodyWidth = _ref$bodyWidth === void 0 ? '8em' : _ref$bodyWidth,
590
+ _ref$apexWidth = _ref.apexWidth,
591
+ apexWidth = _ref$apexWidth === void 0 ? '5px' : _ref$apexWidth,
592
+ _ref$containerClassNa = _ref.containerClassName,
593
+ containerClassName = _ref$containerClassNa === void 0 ? '' : _ref$containerClassNa,
594
+ _ref$bodyClassName = _ref.bodyClassName,
595
+ bodyClassName = _ref$bodyClassName === void 0 ? '' : _ref$bodyClassName;
587
596
  return /*#__PURE__*/React__default.createElement(Container, {
588
597
  className: containerClassName
589
598
  }, children, /*#__PURE__*/React__default.createElement(Body, {
590
- toolTipPosition: toolTipPosition,
591
- bodyWidth: bodyWidth,
592
- apexWidth: apexWidth,
599
+ $toolTipPosition: toolTipPosition,
600
+ $bodyWidth: bodyWidth,
601
+ $apexWidth: apexWidth,
593
602
  className: bodyClassName
594
603
  }, toolTipText));
595
604
  };
596
605
 
597
- Tooltip.defaultProps = {
598
- children: null,
599
- toolTipText: '',
600
- toolTipPosition: 'top',
601
- bodyWidth: '8em',
602
- apexWidth: '5px',
603
- containerClassName: '',
604
- bodyClassName: ''
605
- };
606
606
  var Tooltip$1 = themed(Tooltip);
607
607
 
608
608
  var CurrencySelect = function CurrencySelect(_ref) {
@@ -918,7 +918,7 @@
918
918
  };
919
919
 
920
920
  var SearchResults = function SearchResults(_ref) {
921
- var _searchResults$brands, _searchResults$produc, _searchResults$brands2, _searchResults$produc2, _initialSearchData$tr, _initialSearchData$la, _limitBrands, _limitBrands2, _initialSearchData$la2, _searchResults$produc3;
921
+ var _searchResults$brands, _searchResults$produc, _initialSearchData$tr, _initialSearchData$la, _limitBrands, _limitBrands2, _initialSearchData$la2, _searchResults$produc2;
922
922
 
923
923
  var searchValue = _ref.searchValue,
924
924
  searchResults = _ref.searchResults,
@@ -932,7 +932,10 @@
932
932
  currency = _ref.currency,
933
933
  currencySymbol = _ref.currencySymbol,
934
934
  onProductSearchResultClick = _ref.onProductSearchResultClick,
935
- onBrandSearchResultClick = _ref.onBrandSearchResultClick;
935
+ onBrandSearchResultClick = _ref.onBrandSearchResultClick,
936
+ onCreateInterests = _ref.onCreateInterests,
937
+ noResultsImage = _ref.noResultsImage,
938
+ showNoResults = _ref.showNoResults;
936
939
 
937
940
  var _useState = React.useState(false),
938
941
  _useState2 = _slicedToArray(_useState, 2),
@@ -950,15 +953,16 @@
950
953
  window.removeEventListener('resize', checkIfMobile);
951
954
  };
952
955
  }, []);
953
- var shouldShowInitialData = isSearchFocused && (!searchValue || searchValue.trim().length < 3) || (searchValue === null || searchValue === void 0 ? void 0 : searchValue.trim().length) >= 3 && !(searchResults !== null && searchResults !== void 0 && (_searchResults$brands = searchResults.brands) !== null && _searchResults$brands !== void 0 && _searchResults$brands.length) && !(searchResults !== null && searchResults !== void 0 && (_searchResults$produc = searchResults.products) !== null && _searchResults$produc !== void 0 && _searchResults$produc.length);
954
- var hasResults = (searchResults === null || searchResults === void 0 ? void 0 : (_searchResults$brands2 = searchResults.brands) === null || _searchResults$brands2 === void 0 ? void 0 : _searchResults$brands2.length) > 0 || (searchResults === null || searchResults === void 0 ? void 0 : (_searchResults$produc2 = searchResults.products) === null || _searchResults$produc2 === void 0 ? void 0 : _searchResults$produc2.length) > 0;
956
+ var hasSearchBeenPerformed = (searchValue === null || searchValue === void 0 ? void 0 : searchValue.trim().length) >= 3;
957
+ var hasResults = (searchResults === null || searchResults === void 0 ? void 0 : (_searchResults$brands = searchResults.brands) === null || _searchResults$brands === void 0 ? void 0 : _searchResults$brands.length) > 0 || (searchResults === null || searchResults === void 0 ? void 0 : (_searchResults$produc = searchResults.products) === null || _searchResults$produc === void 0 ? void 0 : _searchResults$produc.length) > 0;
955
958
  var hasInitialData = (initialSearchData === null || initialSearchData === void 0 ? void 0 : (_initialSearchData$tr = initialSearchData.trending_brands) === null || _initialSearchData$tr === void 0 ? void 0 : _initialSearchData$tr.length) > 0 || (initialSearchData === null || initialSearchData === void 0 ? void 0 : (_initialSearchData$la = initialSearchData.latest_products) === null || _initialSearchData$la === void 0 ? void 0 : _initialSearchData$la.length) > 0;
959
+ var shouldShowInitialData = isSearchFocused && (!hasSearchBeenPerformed || !hasResults && !showNoResults);
956
960
 
957
- if (!hasResults && !hasInitialData) {
961
+ if (!isSearchFocused) {
958
962
  return null;
959
963
  }
960
964
 
961
- if (!isSearchFocused) {
965
+ if (!hasResults && !hasInitialData && !showNoResults) {
962
966
  return null;
963
967
  }
964
968
 
@@ -1039,7 +1043,36 @@
1039
1043
  }
1040
1044
 
1041
1045
  return brands;
1042
- };
1046
+ }; // Show no results state
1047
+
1048
+
1049
+ if (showNoResults) {
1050
+ return /*#__PURE__*/React__default.createElement("div", {
1051
+ className: "search-results",
1052
+ ref: searchResultsRef
1053
+ }, /*#__PURE__*/React__default.createElement("div", {
1054
+ className: "search-results__no-results"
1055
+ }, /*#__PURE__*/React__default.createElement("h2", {
1056
+ className: "search-results__header"
1057
+ }, "TOP MATCHES"), /*#__PURE__*/React__default.createElement("div", {
1058
+ className: "search-results__no-results-content"
1059
+ }, /*#__PURE__*/React__default.createElement("div", {
1060
+ className: "search-results__no-results-image"
1061
+ }, /*#__PURE__*/React__default.createElement("img", {
1062
+ src: noResultsImage,
1063
+ alt: "No results"
1064
+ })), /*#__PURE__*/React__default.createElement("div", {
1065
+ className: "search-results__no-results-text"
1066
+ }, /*#__PURE__*/React__default.createElement("p", {
1067
+ className: "search-results__no-results-title"
1068
+ }, "There are currently no products in stock that match your selection"), /*#__PURE__*/React__default.createElement("p", {
1069
+ className: "search-results__no-results-description"
1070
+ }, "Create an interest now and receive instant notifications as your interests list."))), /*#__PURE__*/React__default.createElement("button", {
1071
+ type: "button",
1072
+ className: "search-results__create-interest-button",
1073
+ onClick: onCreateInterests
1074
+ }, "Create Interests")));
1075
+ }
1043
1076
 
1044
1077
  return /*#__PURE__*/React__default.createElement("div", {
1045
1078
  className: "search-results",
@@ -1096,7 +1129,7 @@
1096
1129
  }
1097
1130
  }, "View all items")), /*#__PURE__*/React__default.createElement("div", {
1098
1131
  className: "search-results__product-list"
1099
- }, shouldShowInitialData ? initialSearchData === null || initialSearchData === void 0 ? void 0 : (_initialSearchData$la2 = initialSearchData.latest_products) === null || _initialSearchData$la2 === void 0 ? void 0 : _initialSearchData$la2.map(renderProductCard) : searchResults === null || searchResults === void 0 ? void 0 : (_searchResults$produc3 = searchResults.products) === null || _searchResults$produc3 === void 0 ? void 0 : _searchResults$produc3.map(renderProductCard)), /*#__PURE__*/React__default.createElement("button", {
1132
+ }, shouldShowInitialData ? initialSearchData === null || initialSearchData === void 0 ? void 0 : (_initialSearchData$la2 = initialSearchData.latest_products) === null || _initialSearchData$la2 === void 0 ? void 0 : _initialSearchData$la2.map(renderProductCard) : searchResults === null || searchResults === void 0 ? void 0 : (_searchResults$produc2 = searchResults.products) === null || _searchResults$produc2 === void 0 ? void 0 : _searchResults$produc2.map(renderProductCard)), /*#__PURE__*/React__default.createElement("button", {
1100
1133
  type: "button",
1101
1134
  className: "search-results__view-all-button",
1102
1135
  onClick: function onClick() {
@@ -1123,7 +1156,7 @@
1123
1156
 
1124
1157
  var searchProductsFilter = function searchProductsFilter(search, limit, currencyCode) {
1125
1158
  return {
1126
- query: "\n query LUXITY_PRODUCTS_FILTER(\n $search: String!\n $limit: Int!\n $page: Int!\n $sort_by: String!\n $with_sold: Boolean!\n $currency_code: String!\n ) {\n luxity_products_filter(\n search: $search\n limit: $limit\n page: $page\n sort_by: $sort_by\n with_sold: $with_sold\n ) {\n data {\n id\n product {\n sku\n name\n price(currency_code: $currency_code)\n promotion_price(currency_code: $currency_code)\n est_retail_price(currency_code: $currency_code)\n condition\n currency_symbol(currency_code: $currency_code)\n }\n category_type\n gender\n status\n featured_image\n on_promotion\n promotion_discount\n luxity_brand {\n id\n name\n slug\n }\n }\n total\n }\n }\n ",
1159
+ query: "\n query LUXITY_PRODUCTS_FILTER(\n $search: String!\n $limit: Int!\n $page: Int!\n $sort_by: String!\n $with_sold: Boolean!\n $currency_code: String!\n ) {\n luxity_products_filter(\n search: $search\n limit: $limit\n page: $page\n sort_by: $sort_by\n with_sold: $with_sold\n ) {\n data {\n id\n product {\n sku\n name\n price(currency_code: $currency_code)\n promotion_price(currency_code: $currency_code)\n est_retail_price(currency_code: $currency_code)\n condition\n currency_symbol(currency_code: $currency_code)\n }\n product_slug\n category_type\n gender\n status\n featured_image\n on_promotion\n promotion_discount\n luxity_brand {\n id\n name\n slug\n }\n }\n total\n }\n }\n ",
1127
1160
  variables: {
1128
1161
  search: search,
1129
1162
  limit: limit,
@@ -1139,7 +1172,8 @@
1139
1172
  var endpoint = _ref.endpoint,
1140
1173
  onSearchLoading = _ref.onSearchLoading,
1141
1174
  currency = _ref.currency,
1142
- onSearchPreview = _ref.onSearchPreview;
1175
+ onSearchPreview = _ref.onSearchPreview,
1176
+ onNoResults = _ref.onNoResults;
1143
1177
  var currentSearchRequestToken = React.useRef(null);
1144
1178
  var debounce = React.useCallback(function (func, wait) {
1145
1179
  var timeout;
@@ -1176,7 +1210,12 @@
1176
1210
  setSearchResults({
1177
1211
  brands: [],
1178
1212
  products: []
1179
- });
1213
+ }); // Reset no results state when clearing search
1214
+
1215
+ if (typeof onNoResults === 'function') {
1216
+ onNoResults(false);
1217
+ }
1218
+
1180
1219
  return;
1181
1220
  } // Cancel any ongoing search request to prevent race conditions
1182
1221
 
@@ -1187,7 +1226,12 @@
1187
1226
 
1188
1227
 
1189
1228
  var newSearchToken = axios.CancelToken.source();
1190
- currentSearchRequestToken.current = newSearchToken; // Set loading to true when starting the search request
1229
+ currentSearchRequestToken.current = newSearchToken; // Reset no results state when starting new search (user is typing)
1230
+
1231
+ if (typeof onNoResults === 'function') {
1232
+ onNoResults(false);
1233
+ } // Set loading to true when starting the search request
1234
+
1191
1235
 
1192
1236
  if (typeof onSearchLoading === 'function') {
1193
1237
  onSearchLoading(true);
@@ -1223,11 +1267,15 @@
1223
1267
  }); // Map products to old structure with prices
1224
1268
 
1225
1269
  var products = productsData.map(function (product) {
1270
+ // Generate product link: /products/{category_type}/{brand_slug}/{product_slug}
1271
+ var categorySlug = product.category_type.toLowerCase().replace(/\s+/g, '-');
1272
+ var brandSlug = product.luxity_brand.slug;
1273
+ var productSlug = product.product_slug;
1274
+ var link = "/products/".concat(categorySlug, "/").concat(brandSlug, "/").concat(productSlug);
1226
1275
  return {
1227
1276
  name: product.product.name,
1228
1277
  brand: product.luxity_brand.name,
1229
- link: "/products/".concat(product.id),
1230
- // Using product ID for link
1278
+ link: link,
1231
1279
  price: product.product.price || 0,
1232
1280
  promotion_price: product.product.promotion_price || null,
1233
1281
  est_retail_price: product.product.est_retail_price || 0,
@@ -1236,9 +1284,9 @@
1236
1284
  featured_image: product.featured_image,
1237
1285
  on_promotion: product.on_promotion || false,
1238
1286
  promotion_discount: product.promotion_discount || 0,
1239
- // Keep new fields for potential future use
1240
1287
  id: product.id,
1241
1288
  category_type: product.category_type,
1289
+ product_slug: product.product_slug,
1242
1290
  luxity_brand: product.luxity_brand
1243
1291
  };
1244
1292
  });
@@ -1247,7 +1295,13 @@
1247
1295
  products: products,
1248
1296
  total: totalResults
1249
1297
  };
1250
- setSearchResults(searchResults);
1298
+ setSearchResults(searchResults); // Check if we have no results (empty aggregations)
1299
+
1300
+ var hasNoResults = brandsData.length === 0 && productsData.length === 0;
1301
+
1302
+ if (typeof onNoResults === 'function') {
1303
+ onNoResults(hasNoResults);
1304
+ }
1251
1305
 
1252
1306
  if (typeof onSearchPreview === 'function') {
1253
1307
  var hasResults = brands.length > 0 || products.length > 0;
@@ -1257,11 +1311,7 @@
1257
1311
  });
1258
1312
  }
1259
1313
 
1260
- currentSearchRequestToken.current = null; // Set loading to false when search completes successfully
1261
-
1262
- if (typeof onSearchLoading === 'function') {
1263
- onSearchLoading(false);
1264
- }
1314
+ currentSearchRequestToken.current = null;
1265
1315
  }
1266
1316
  }).catch(function (error) {
1267
1317
  if (!axios.isCancel(error)) {
@@ -1269,14 +1319,10 @@
1269
1319
  brands: [],
1270
1320
  products: []
1271
1321
  });
1272
- currentSearchRequestToken.current = null; // Set loading to false when search fails
1273
-
1274
- if (typeof onSearchLoading === 'function') {
1275
- onSearchLoading(false);
1276
- }
1322
+ currentSearchRequestToken.current = null;
1277
1323
  }
1278
1324
  });
1279
- }, [endpoint, currency, onSearchPreview, onSearchLoading]);
1325
+ }, [endpoint, currency, onSearchPreview, onSearchLoading, onNoResults]);
1280
1326
  var debouncedSearch = React.useMemo(function () {
1281
1327
  return debounce(function (searchQuery, setSearchResults) {
1282
1328
  return performSearch(searchQuery, setSearchResults);
@@ -1381,22 +1427,6 @@
1381
1427
  }
1382
1428
  }, [searchValue, immediateSearch, setIsSearchFocused, setSearchValue]);
1383
1429
  };
1384
- var useSearchUrlQuery = function useSearchUrlQuery(setSearchValue, debouncedSearch) {
1385
- var hasProcessedUrlQuery = React.useRef(false);
1386
- React.useEffect(function () {
1387
- if (hasProcessedUrlQuery.current) return;
1388
- var urlParams = new URLSearchParams(window.location.search);
1389
- var queryParam = urlParams.get('q');
1390
- var isSearchPage = window.location.pathname.includes('/search');
1391
-
1392
- if (queryParam && queryParam.trim() !== '' && isSearchPage) {
1393
- hasProcessedUrlQuery.current = true;
1394
- setSearchValue(queryParam);
1395
- debouncedSearch(queryParam);
1396
- }
1397
- }, [setSearchValue, debouncedSearch]);
1398
- return hasProcessedUrlQuery;
1399
- };
1400
1430
 
1401
1431
  var LuxityMobileHeader = function LuxityMobileHeader(_ref) {
1402
1432
  var logoSrc = _ref.logoSrc,
@@ -1452,61 +1482,69 @@
1452
1482
  shop = _ref.shop,
1453
1483
  app = _ref.app,
1454
1484
  categoryConfig = _ref.categoryConfig,
1455
- name = _ref.name;
1485
+ name = _ref.name,
1486
+ onCreateInterests = _ref.onCreateInterests,
1487
+ noResultsImage = _ref.noResultsImage;
1488
+
1489
+ var _useState = React.useState(false),
1490
+ _useState2 = _slicedToArray(_useState, 2),
1491
+ showNoResults = _useState2[0],
1492
+ setShowNoResults = _useState2[1];
1456
1493
 
1457
1494
  var _useSearch = useSearch({
1458
1495
  endpoint: endpoint,
1459
1496
  onSearchLoading: onSearchLoading,
1460
1497
  currency: currency,
1461
- onSearchPreview: onSearchPreview
1498
+ onSearchPreview: onSearchPreview,
1499
+ onNoResults: setShowNoResults
1462
1500
  }),
1463
1501
  fetchInitialSearchData = _useSearch.fetchInitialSearchData,
1464
1502
  createDebouncedSearch = _useSearch.createDebouncedSearch,
1465
1503
  createImmediateSearch = _useSearch.createImmediateSearch;
1466
1504
 
1467
- var _useState = React.useState(''),
1468
- _useState2 = _slicedToArray(_useState, 2),
1469
- searchValue = _useState2[0],
1470
- setSearchValue = _useState2[1];
1471
-
1472
- var _useState3 = React.useState(false),
1505
+ var _useState3 = React.useState(''),
1473
1506
  _useState4 = _slicedToArray(_useState3, 2),
1474
- showSearchBar = _useState4[0],
1475
- setShowSearchbar = _useState4[1];
1507
+ searchValue = _useState4[0],
1508
+ setSearchValue = _useState4[1];
1476
1509
 
1477
1510
  var _useState5 = React.useState(false),
1478
1511
  _useState6 = _slicedToArray(_useState5, 2),
1479
- showSideNav = _useState6[0],
1480
- setShowSideNav = _useState6[1];
1512
+ showSearchBar = _useState6[0],
1513
+ setShowSearchbar = _useState6[1];
1481
1514
 
1482
- var _useState7 = React.useState({
1483
- brands: [],
1484
- products: []
1485
- }),
1515
+ var _useState7 = React.useState(false),
1486
1516
  _useState8 = _slicedToArray(_useState7, 2),
1487
- searchResults = _useState8[0],
1488
- setSearchResults = _useState8[1];
1517
+ showSideNav = _useState8[0],
1518
+ setShowSideNav = _useState8[1];
1489
1519
 
1490
1520
  var _useState9 = React.useState({
1491
1521
  brands: [],
1492
1522
  products: []
1493
1523
  }),
1494
1524
  _useState10 = _slicedToArray(_useState9, 2),
1495
- cachedResults = _useState10[0],
1496
- setCachedResults = _useState10[1];
1525
+ searchResults = _useState10[0],
1526
+ setSearchResults = _useState10[1];
1497
1527
 
1498
- var _useState11 = React.useState(false),
1528
+ var _useState11 = React.useState({
1529
+ brands: [],
1530
+ products: []
1531
+ }),
1499
1532
  _useState12 = _slicedToArray(_useState11, 2),
1500
- isSearchFocused = _useState12[0],
1501
- setIsSearchFocused = _useState12[1];
1533
+ cachedResults = _useState12[0],
1534
+ setCachedResults = _useState12[1];
1502
1535
 
1503
- var _useState13 = React.useState({
1536
+ var _useState13 = React.useState(false),
1537
+ _useState14 = _slicedToArray(_useState13, 2),
1538
+ isSearchFocused = _useState14[0],
1539
+ setIsSearchFocused = _useState14[1];
1540
+
1541
+ var _useState15 = React.useState({
1504
1542
  trending_brands: [],
1505
1543
  latest_products: []
1506
1544
  }),
1507
- _useState14 = _slicedToArray(_useState13, 2),
1508
- initialSearchView = _useState14[0],
1509
- setInitialSearchView = _useState14[1];
1545
+ _useState16 = _slicedToArray(_useState15, 2),
1546
+ initialSearchView = _useState16[0],
1547
+ setInitialSearchView = _useState16[1];
1510
1548
 
1511
1549
  var searchResultsRef = React.useRef(null);
1512
1550
  var searchInputRef = React.useRef(null);
@@ -1516,7 +1554,6 @@
1516
1554
  });
1517
1555
  var immediateSearch = createImmediateSearch(setSearchValue, setSearchResults, onSearchSubmit);
1518
1556
  var handleChange = useSearchInputChange(setSearchValue, setIsSearchFocused, debouncedSearch, setSearchResults, setCachedResults);
1519
- useSearchUrlQuery(setSearchValue, debouncedSearch);
1520
1557
  var handleKeyDown = useSearchInputKeyDown(searchValue, immediateSearch, setIsSearchFocused, setSearchValue);
1521
1558
  React.useMemo(function () {
1522
1559
  if (!initialSearchData) {
@@ -1549,6 +1586,7 @@
1549
1586
  brands: [],
1550
1587
  products: []
1551
1588
  });
1589
+ setShowNoResults(false);
1552
1590
  }
1553
1591
  };
1554
1592
 
@@ -1733,6 +1771,7 @@
1733
1771
  products: []
1734
1772
  });
1735
1773
  setIsSearchFocused(false);
1774
+ setShowNoResults(false);
1736
1775
  },
1737
1776
  onSearchSubmit: onSearchSubmit,
1738
1777
  setSearchValue: setSearchValue,
@@ -1743,7 +1782,10 @@
1743
1782
  currency: currency,
1744
1783
  currencySymbol: currencySymbol,
1745
1784
  onProductSearchResultClick: onProductSearchResultClick,
1746
- onBrandSearchResultClick: onBrandSearchResultClick
1785
+ onBrandSearchResultClick: onBrandSearchResultClick,
1786
+ onCreateInterests: onCreateInterests,
1787
+ noResultsImage: noResultsImage,
1788
+ showNoResults: showNoResults
1747
1789
  }))), shop && /*#__PURE__*/React__default.createElement(LuxitySideNav, {
1748
1790
  accordionIcon: accordionIcon,
1749
1791
  logoSrc: logoSrc,