@trafilea/afrodita-components 6.58.1 → 6.59.0

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.
@@ -4120,6 +4120,11 @@ var getIconDimension = function (dimension) {
4120
4120
  return "".concat(dimension, "rem");
4121
4121
  };
4122
4122
 
4123
+ var transformImageProperties = function (_a) {
4124
+ var title = _a.title, name = _a.name, height = _a.height, width = _a.width, testId = _a.testId, rest = __rest(_a, ["title", "name", "height", "width", "testId"]);
4125
+ return __assign$1({ alt: title !== null && title !== void 0 ? title : name, 'data-testid': testId, height: height, width: width }, rest);
4126
+ };
4127
+
4123
4128
  var UnmemoIconFromExtSource = function (_a) {
4124
4129
  var height = _a.height, width = _a.width, title = _a.title, testId = _a.testId, fill = _a.fill, name = _a.name, svgProps = _a.svgProps, iconURL = _a.iconURL, svgId = _a.svgId, _b = _a.showTooltipTitle, showTooltipTitle = _b === void 0 ? true : _b, rest = __rest(_a, ["height", "width", "title", "testId", "fill", "name", "svgProps", "iconURL", "svgId", "showTooltipTitle"]);
4125
4130
  var _c = useState(false), error = _c[0], setError = _c[1];
@@ -4147,16 +4152,13 @@ var UnmemoIconFromExtSource = function (_a) {
4147
4152
  fetchIcon();
4148
4153
  }
4149
4154
  }, [iconURL]);
4150
- var imageProperties = __assign$1({ alt: title !== null && title !== void 0 ? title : name, 'data-testid': testId, height: height, width: width }, rest);
4151
4155
  if (error) {
4156
+ var imageProperties = transformImageProperties(__assign$1({ title: title, name: name, height: height, width: width, testId: testId }, rest));
4152
4157
  return jsx$1(StyledImageWrapper, __assign$1({}, imageProperties, { src: iconURL }), void 0);
4153
4158
  }
4154
4159
  if (!localSource) {
4155
4160
  return jsx$1(SkeletonBox, { width: width, height: height }, void 0);
4156
4161
  }
4157
- if (!fill && !svgProps) {
4158
- return jsx$1(StyledImageWrapper, __assign$1({}, imageProperties, rest, { src: localSource.src }), void 0);
4159
- }
4160
4162
  return (jsxs$1(StyledSvgWrapper, __assign$1({ "data-testid": testId, fill: fill, height: height, type: "image/svg+xml", width: width }, rest, svgProps, { showTooltipTitle: showTooltipTitle }, { children: [showTooltipTitle && jsx$1("title", { children: title !== null && title !== void 0 ? title : name }, void 0), jsx$1("use", { href: "".concat(localSource.src, "#").concat(svgId) }, void 0)] }), void 0));
4161
4163
  };
4162
4164
  var IconFromExtSource = React__default.memo(UnmemoIconFromExtSource);
@@ -4173,6 +4175,10 @@ var UnmemoIcon = function (_a) {
4173
4175
  if (assets.isSameOriginIcons) {
4174
4176
  return (jsxs$1(StyledSvgWrapper, __assign$1({ "data-testid": testId, fill: fill, height: newHeight, type: "image/svg+xml", width: newWidth }, rest, svgProps, { showTooltipTitle: showTooltipTitle }, { children: [showTooltipTitle && jsx$1("title", { children: title !== null && title !== void 0 ? title : name }, void 0), jsx$1("use", { href: "".concat(iconURL, "#").concat(svgId) }, void 0)] }), void 0));
4175
4177
  }
4178
+ if (!fill && !svgProps) {
4179
+ var imageProperties = transformImageProperties(__assign$1({ title: title, name: name, height: newHeight, width: newWidth, testId: testId }, rest));
4180
+ return jsx$1(StyledImageWrapper, __assign$1({}, imageProperties, rest, { src: iconURL }), void 0);
4181
+ }
4176
4182
  return (jsx$1(IconFromExtSource, __assign$1({ svgId: svgId, iconURL: iconURL, testId: testId, fill: fill, height: newHeight, svgProps: svgProps, width: newWidth, name: name, title: title, showTooltipTitle: showTooltipTitle }, rest), void 0));
4177
4183
  };
4178
4184
  var Icon$1 = React__default.memo(UnmemoIcon, function (prevProps, nextProps) { return prevProps.name !== nextProps.name; });
@@ -8563,7 +8569,9 @@ var Filters = function (_a) {
8563
8569
  }
8564
8570
  }
8565
8571
  return checked
8566
- ? __spreadArray(__spreadArray([], (currentFilter.isMultiselect ? prev : []), true), [
8572
+ ? __spreadArray(__spreadArray([], (currentFilter.isMultiselect
8573
+ ? prev
8574
+ : prev.filter(function (filter) { return filter.sectionIndex !== sectionIndex; })), true), [
8567
8575
  {
8568
8576
  sectionIndex: sectionIndex,
8569
8577
  itemIndex: itemIndex,