@trafilea/afrodita-components 5.0.0-beta.107 → 5.0.0-beta.108

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/build/index.js CHANGED
@@ -17494,7 +17494,7 @@ var Filters = function (_a) {
17494
17494
  var checkedItems = [];
17495
17495
  values.forEach(function (filter, sectionIndex) {
17496
17496
  filter.items.forEach(function (item, itemIndex) {
17497
- if (item.checked) {
17497
+ if (item.checked && !item.blockUncheck) {
17498
17498
  checkedItems.push({
17499
17499
  sectionIndex: sectionIndex,
17500
17500
  itemIndex: itemIndex,
@@ -17562,18 +17562,15 @@ var Filters = function (_a) {
17562
17562
  setFilter(function (prev) {
17563
17563
  return prev.map(function (filter) {
17564
17564
  return __assign$1(__assign$1({}, filter), { items: filter.items.map(function (value) {
17565
- return {
17566
- label: value.label,
17567
- checked: false,
17568
- };
17565
+ return __assign$1(__assign$1({}, value), { checked: !value.blockUncheck ? false : value.checked });
17569
17566
  }) });
17570
17567
  });
17571
17568
  });
17572
17569
  onResetValues();
17573
17570
  };
17574
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!isMobile ? (jsxRuntime.jsxs("div", __assign$1({ "data-testid": "DesktopHeader" }, { children: [jsxRuntime.jsxs(Header, { children: [jsxRuntime.jsxs(H4, __assign$1({ color: theme.colors.shades['700'].color }, { children: [filterByText, " (", checkedItems.length, ")"] }), void 0), jsxRuntime.jsx(ClearAll, __assign$1({ onClick: handleClearAllClick, color: theme.colors.shades['700'].color, "data-testid": "desktop-clear-all" }, { children: clearAllText }), void 0)] }, void 0), jsxRuntime.jsx(Tags, { color: tagsColor, items: checkedItems.map(function (item) {
17575
- return item.label === '$75 And Above' ? '+$75' : item.label;
17576
- }), onCloseClick: function (index) { return handleCloseClick(checkedItems[index]); } }, void 0)] }), void 0)) : (jsxRuntime.jsxs(MobileHeader, __assign$1({ "data-testid": "MobileHeader" }, { children: [jsxRuntime.jsx(MobileIconsContainer, __assign$1({ onClick: mobileBackArrowClick, "data-testid": "mobileBackArrow" }, { children: jsxRuntime.jsx(Icon.Arrows.ChevronRightVariant, { fill: theme.colors.shades['700'].color }, void 0) }), void 0), jsxRuntime.jsxs(H4, __assign$1({ color: theme.colors.shades['700'].color }, { children: [filtersSelectText, " (", checkedItems.length, ")"] }), void 0)] }), void 0)), filters
17571
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!isMobile ? (jsxRuntime.jsx("div", __assign$1({ "data-testid": "DesktopHeader" }, { children: !!checkedItems.length && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Header, { children: [jsxRuntime.jsxs(H4, __assign$1({ color: theme.colors.shades['700'].color }, { children: [filterByText, " (", checkedItems.length, ")"] }), void 0), jsxRuntime.jsx(ClearAll, __assign$1({ onClick: handleClearAllClick, color: theme.colors.shades['700'].color, "data-testid": "desktop-clear-all" }, { children: clearAllText }), void 0)] }, void 0), jsxRuntime.jsx(Tags, { color: tagsColor, items: checkedItems.map(function (item) {
17572
+ return item.label === '$75 And Above' ? '+$75' : item.label;
17573
+ }), onCloseClick: function (index) { return handleCloseClick(checkedItems[index]); } }, void 0)] }, void 0)) }), void 0)) : (jsxRuntime.jsxs(MobileHeader, __assign$1({ "data-testid": "MobileHeader" }, { children: [jsxRuntime.jsx(MobileIconsContainer, __assign$1({ onClick: mobileBackArrowClick, "data-testid": "mobileBackArrow" }, { children: jsxRuntime.jsx(Icon.Arrows.ChevronRightVariant, { fill: theme.colors.shades['700'].color }, void 0) }), void 0), !!checkedItems.length && (jsxRuntime.jsxs(H4, __assign$1({ color: theme.colors.shades['700'].color }, { children: [filtersSelectText, " (", checkedItems.length, ")"] }), void 0))] }), void 0)), filters
17577
17574
  .filter(function (filter) { return filter.isLinkOption; })
17578
17575
  .map(function (option, index) { return (jsxRuntime.jsx(OptionContainer, { children: jsxRuntime.jsx(FilterLink, __assign$1({ color: option.color || theme.colors.shades['550'].color, href: option.link }, { children: option.title }), void 0) }, index)); }), filters
17579
17576
  .filter(function (filter) { return !filter.isLinkOption; })