@bonlineza/luxity-lib 2.37.6 → 2.37.8
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/CurrencySelect.js +27 -27
- package/GraphQLDropdownSelector.js +8 -8
- package/LuxityDesktopHeader.js +31 -64
- package/LuxityFooter.js +28 -27
- package/LuxityGraphQLDropdownSelector.js +8 -8
- package/LuxityMobileHeader.js +31 -64
- package/LuxitySideNav.js +27 -27
- package/MaterialSelector.js +8 -8
- package/ModelSelector.js +8 -8
- package/Tooltip.js +27 -27
- package/build/bundle.css +1 -1
- package/build/bundle.js +32 -67
- package/package.json +1 -1
package/build/bundle.js
CHANGED
|
@@ -1565,10 +1565,10 @@
|
|
|
1565
1565
|
var relativeInlineStyle = styled.css(_templateObject$i || (_templateObject$i = _taggedTemplateLiteral(["\n position: relative;\n"])));
|
|
1566
1566
|
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"])));
|
|
1567
1567
|
var getTopMiddleArrowAfterStyle = function getTopMiddleArrowAfterStyle(props) {
|
|
1568
|
-
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
|
|
1568
|
+
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);
|
|
1569
1569
|
};
|
|
1570
1570
|
var getBottomMiddleBodyStyle = function getBottomMiddleBodyStyle(props) {
|
|
1571
|
-
return styled.css(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral(["\n position: absolute;\n top: 100%;\n left: calc(50% - ", " / 2);\n"])), props
|
|
1571
|
+
return styled.css(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral(["\n position: absolute;\n top: 100%;\n left: calc(50% - ", " / 2);\n"])), props.$bodyWidth);
|
|
1572
1572
|
};
|
|
1573
1573
|
var getBottomMiddleArrowAfterStyle = function getBottomMiddleArrowAfterStyle(props) {
|
|
1574
1574
|
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);
|
|
@@ -1578,10 +1578,10 @@
|
|
|
1578
1578
|
|
|
1579
1579
|
var getBodyStyle = function getBodyStyle() {
|
|
1580
1580
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1581
|
-
var _props
|
|
1582
|
-
toolTipPosition = _props
|
|
1581
|
+
var _props$$toolTipPositi = props.$toolTipPosition,
|
|
1582
|
+
$toolTipPosition = _props$$toolTipPositi === void 0 ? '' : _props$$toolTipPositi;
|
|
1583
1583
|
|
|
1584
|
-
switch (toolTipPosition) {
|
|
1584
|
+
switch ($toolTipPosition) {
|
|
1585
1585
|
case 'top':
|
|
1586
1586
|
return topMiddleBodyStyle;
|
|
1587
1587
|
|
|
@@ -1595,9 +1595,9 @@
|
|
|
1595
1595
|
|
|
1596
1596
|
var getAfterStyling = function getAfterStyling() {
|
|
1597
1597
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1598
|
-
var toolTipPosition = props
|
|
1598
|
+
var $toolTipPosition = props.$toolTipPosition;
|
|
1599
1599
|
|
|
1600
|
-
switch (toolTipPosition) {
|
|
1600
|
+
switch ($toolTipPosition) {
|
|
1601
1601
|
case 'top':
|
|
1602
1602
|
return getTopMiddleArrowAfterStyle(props);
|
|
1603
1603
|
|
|
@@ -1610,7 +1610,7 @@
|
|
|
1610
1610
|
};
|
|
1611
1611
|
|
|
1612
1612
|
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) {
|
|
1613
|
-
return props
|
|
1613
|
+
return props.$bodyWidth;
|
|
1614
1614
|
}, function (props) {
|
|
1615
1615
|
return props.theme.colors.base || 'black';
|
|
1616
1616
|
}, function (props) {
|
|
@@ -1622,33 +1622,33 @@
|
|
|
1622
1622
|
var _templateObject$k;
|
|
1623
1623
|
var Container = styled__default.div(_templateObject$k || (_templateObject$k = _taggedTemplateLiteral(["\n ", ";\n cursor: pointer;\n &:hover ", " {\n opacity: 1;\n visibility: visible;\n }\n"])), relativeInlineStyle, Body$1);
|
|
1624
1624
|
|
|
1625
|
+
/* eslint-disable react/require-default-props */
|
|
1626
|
+
|
|
1625
1627
|
var Tooltip = function Tooltip(_ref) {
|
|
1626
|
-
var children = _ref.children,
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1628
|
+
var _ref$children = _ref.children,
|
|
1629
|
+
children = _ref$children === void 0 ? null : _ref$children,
|
|
1630
|
+
_ref$toolTipText = _ref.toolTipText,
|
|
1631
|
+
toolTipText = _ref$toolTipText === void 0 ? '' : _ref$toolTipText,
|
|
1632
|
+
_ref$toolTipPosition = _ref.toolTipPosition,
|
|
1633
|
+
toolTipPosition = _ref$toolTipPosition === void 0 ? 'top' : _ref$toolTipPosition,
|
|
1634
|
+
_ref$bodyWidth = _ref.bodyWidth,
|
|
1635
|
+
bodyWidth = _ref$bodyWidth === void 0 ? '8em' : _ref$bodyWidth,
|
|
1636
|
+
_ref$apexWidth = _ref.apexWidth,
|
|
1637
|
+
apexWidth = _ref$apexWidth === void 0 ? '5px' : _ref$apexWidth,
|
|
1638
|
+
_ref$containerClassNa = _ref.containerClassName,
|
|
1639
|
+
containerClassName = _ref$containerClassNa === void 0 ? '' : _ref$containerClassNa,
|
|
1640
|
+
_ref$bodyClassName = _ref.bodyClassName,
|
|
1641
|
+
bodyClassName = _ref$bodyClassName === void 0 ? '' : _ref$bodyClassName;
|
|
1633
1642
|
return /*#__PURE__*/React__default.createElement(Container, {
|
|
1634
1643
|
className: containerClassName
|
|
1635
1644
|
}, children, /*#__PURE__*/React__default.createElement(Body$1, {
|
|
1636
|
-
toolTipPosition: toolTipPosition,
|
|
1637
|
-
bodyWidth: bodyWidth,
|
|
1638
|
-
apexWidth: apexWidth,
|
|
1645
|
+
$toolTipPosition: toolTipPosition,
|
|
1646
|
+
$bodyWidth: bodyWidth,
|
|
1647
|
+
$apexWidth: apexWidth,
|
|
1639
1648
|
className: bodyClassName
|
|
1640
1649
|
}, toolTipText));
|
|
1641
1650
|
};
|
|
1642
1651
|
|
|
1643
|
-
Tooltip.defaultProps = {
|
|
1644
|
-
children: null,
|
|
1645
|
-
toolTipText: '',
|
|
1646
|
-
toolTipPosition: 'top',
|
|
1647
|
-
bodyWidth: '8em',
|
|
1648
|
-
apexWidth: '5px',
|
|
1649
|
-
containerClassName: '',
|
|
1650
|
-
bodyClassName: ''
|
|
1651
|
-
};
|
|
1652
1652
|
var Tooltip$1 = themed(Tooltip);
|
|
1653
1653
|
|
|
1654
1654
|
var _templateObject$l, _templateObject2$2;
|
|
@@ -15500,6 +15500,7 @@
|
|
|
15500
15500
|
track: link === null || link === void 0 ? void 0 : link.track,
|
|
15501
15501
|
target: link.target
|
|
15502
15502
|
}, link.label) : /*#__PURE__*/React__default.createElement("div", {
|
|
15503
|
+
key: link.label,
|
|
15503
15504
|
className: "footer__text"
|
|
15504
15505
|
}, link.label);
|
|
15505
15506
|
})));
|
|
@@ -16000,7 +16001,6 @@
|
|
|
16000
16001
|
var useSearch = function useSearch(_ref) {
|
|
16001
16002
|
var endpoint = _ref.endpoint,
|
|
16002
16003
|
onProductIdsReceived = _ref.onProductIdsReceived,
|
|
16003
|
-
onSearchLoading = _ref.onSearchLoading,
|
|
16004
16004
|
currency = _ref.currency,
|
|
16005
16005
|
onSearchPreview = _ref.onSearchPreview;
|
|
16006
16006
|
var currentSearchRequestToken = React.useRef(null);
|
|
@@ -16051,12 +16051,7 @@
|
|
|
16051
16051
|
|
|
16052
16052
|
|
|
16053
16053
|
var newSearchToken = axios.CancelToken.source();
|
|
16054
|
-
currentSearchRequestToken.current = newSearchToken;
|
|
16055
|
-
|
|
16056
|
-
if (typeof onSearchLoading === 'function') {
|
|
16057
|
-
onSearchLoading(true);
|
|
16058
|
-
}
|
|
16059
|
-
|
|
16054
|
+
currentSearchRequestToken.current = newSearchToken;
|
|
16060
16055
|
axios.post(endpoint, searchProducts(searchQuery, 3, currency), {
|
|
16061
16056
|
cancelToken: newSearchToken.token
|
|
16062
16057
|
}).then(function (response) {
|
|
@@ -16078,11 +16073,7 @@
|
|
|
16078
16073
|
});
|
|
16079
16074
|
}
|
|
16080
16075
|
|
|
16081
|
-
currentSearchRequestToken.current = null;
|
|
16082
|
-
|
|
16083
|
-
if (typeof onSearchLoading === 'function') {
|
|
16084
|
-
onSearchLoading(false);
|
|
16085
|
-
}
|
|
16076
|
+
currentSearchRequestToken.current = null;
|
|
16086
16077
|
}
|
|
16087
16078
|
}).catch(function (error) {
|
|
16088
16079
|
if (!axios.isCancel(error)) {
|
|
@@ -16091,14 +16082,10 @@
|
|
|
16091
16082
|
products: [],
|
|
16092
16083
|
luxity_product_ids: []
|
|
16093
16084
|
});
|
|
16094
|
-
currentSearchRequestToken.current = null;
|
|
16095
|
-
|
|
16096
|
-
if (typeof onSearchLoading === 'function') {
|
|
16097
|
-
onSearchLoading(false);
|
|
16098
|
-
}
|
|
16085
|
+
currentSearchRequestToken.current = null;
|
|
16099
16086
|
}
|
|
16100
16087
|
});
|
|
16101
|
-
}, [endpoint, currency, onSearchPreview, onProductIdsReceived
|
|
16088
|
+
}, [endpoint, currency, onSearchPreview, onProductIdsReceived]);
|
|
16102
16089
|
var debouncedSearch = React.useMemo(function () {
|
|
16103
16090
|
return debounce(function (searchQuery, setSearchResults) {
|
|
16104
16091
|
return performSearch(searchQuery, setSearchResults);
|
|
@@ -16203,22 +16190,6 @@
|
|
|
16203
16190
|
}
|
|
16204
16191
|
}, [searchValue, immediateSearch, setIsSearchFocused, setSearchValue]);
|
|
16205
16192
|
};
|
|
16206
|
-
var useSearchUrlQuery = function useSearchUrlQuery(setSearchValue, debouncedSearch) {
|
|
16207
|
-
var hasProcessedUrlQuery = React.useRef(false);
|
|
16208
|
-
React.useEffect(function () {
|
|
16209
|
-
if (hasProcessedUrlQuery.current) return;
|
|
16210
|
-
var urlParams = new URLSearchParams(window.location.search);
|
|
16211
|
-
var queryParam = urlParams.get('q');
|
|
16212
|
-
var isSearchPage = window.location.pathname.includes('/search');
|
|
16213
|
-
|
|
16214
|
-
if (queryParam && queryParam.trim() !== '' && isSearchPage) {
|
|
16215
|
-
hasProcessedUrlQuery.current = true;
|
|
16216
|
-
setSearchValue(queryParam);
|
|
16217
|
-
debouncedSearch(queryParam);
|
|
16218
|
-
}
|
|
16219
|
-
}, [setSearchValue, debouncedSearch]);
|
|
16220
|
-
return hasProcessedUrlQuery;
|
|
16221
|
-
};
|
|
16222
16193
|
|
|
16223
16194
|
var removeCategoryByName = function removeCategoryByName(categories, name) {
|
|
16224
16195
|
var _categories$filter;
|
|
@@ -16255,7 +16226,6 @@
|
|
|
16255
16226
|
onProductSearchResultClick = _ref.onProductSearchResultClick,
|
|
16256
16227
|
onBrandSearchResultClick = _ref.onBrandSearchResultClick,
|
|
16257
16228
|
onProductIdsReceived = _ref.onProductIdsReceived,
|
|
16258
|
-
onSearchLoading = _ref.onSearchLoading,
|
|
16259
16229
|
currency = _ref.currency,
|
|
16260
16230
|
currencySymbol = _ref.currencySymbol,
|
|
16261
16231
|
currencyOptions = _ref.currencyOptions,
|
|
@@ -16274,7 +16244,6 @@
|
|
|
16274
16244
|
var _useSearch = useSearch({
|
|
16275
16245
|
endpoint: endpoint,
|
|
16276
16246
|
onProductIdsReceived: onProductIdsReceived,
|
|
16277
|
-
onSearchLoading: onSearchLoading,
|
|
16278
16247
|
currency: currency,
|
|
16279
16248
|
onSearchPreview: onSearchPreview
|
|
16280
16249
|
}),
|
|
@@ -16338,7 +16307,6 @@
|
|
|
16338
16307
|
});
|
|
16339
16308
|
var immediateSearch = createImmediateSearch(setSearchValue, setSearchResults, onSearchSubmit);
|
|
16340
16309
|
var handleChange = useSearchInputChange(setSearchValue, setIsSearchFocused, debouncedSearch, setSearchResults, setCachedResults);
|
|
16341
|
-
useSearchUrlQuery(setSearchValue, debouncedSearch);
|
|
16342
16310
|
useSearchClickOutside(searchResultsRef, searchResults, setCachedResults, setIsSearchFocused, setSearchResults);
|
|
16343
16311
|
|
|
16344
16312
|
var handleSearchClick = function handleSearchClick() {
|
|
@@ -17173,7 +17141,6 @@
|
|
|
17173
17141
|
onProductSearchResultClick = _ref.onProductSearchResultClick,
|
|
17174
17142
|
onBrandSearchResultClick = _ref.onBrandSearchResultClick,
|
|
17175
17143
|
onProductIdsReceived = _ref.onProductIdsReceived,
|
|
17176
|
-
onSearchLoading = _ref.onSearchLoading,
|
|
17177
17144
|
onLogoutClick = _ref.onLogoutClick,
|
|
17178
17145
|
onInterestClick = _ref.onInterestClick,
|
|
17179
17146
|
onAddressClick = _ref.onAddressClick,
|
|
@@ -17199,7 +17166,6 @@
|
|
|
17199
17166
|
var _useSearch = useSearch({
|
|
17200
17167
|
endpoint: endpoint,
|
|
17201
17168
|
onProductIdsReceived: onProductIdsReceived,
|
|
17202
|
-
onSearchLoading: onSearchLoading,
|
|
17203
17169
|
currency: currency,
|
|
17204
17170
|
onSearchPreview: onSearchPreview
|
|
17205
17171
|
}),
|
|
@@ -17259,7 +17225,6 @@
|
|
|
17259
17225
|
});
|
|
17260
17226
|
var immediateSearch = createImmediateSearch(setSearchValue, setSearchResults, onSearchSubmit);
|
|
17261
17227
|
var handleChange = useSearchInputChange(setSearchValue, setIsSearchFocused, debouncedSearch, setSearchResults, setCachedResults);
|
|
17262
|
-
useSearchUrlQuery(setSearchValue, debouncedSearch);
|
|
17263
17228
|
var handleKeyDown = useSearchInputKeyDown(searchValue, immediateSearch, setIsSearchFocused, setSearchValue);
|
|
17264
17229
|
React.useMemo(function () {
|
|
17265
17230
|
if (!initialSearchData) {
|