@trafilea/afrodita-components 5.0.0-beta.67 → 5.0.0-beta.69
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.d.ts +3 -0
- package/build/index.esm.js +12 -5
- package/build/index.esm.js.map +1 -1
- package/build/index.js +12 -5
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -4211,7 +4211,7 @@ function SimpleDropdown(_a) {
|
|
|
4211
4211
|
if (value == null) {
|
|
4212
4212
|
return;
|
|
4213
4213
|
}
|
|
4214
|
-
if (options.
|
|
4214
|
+
if (options.findIndex(function (option) { return option.value === value.value; }) < 0) {
|
|
4215
4215
|
setSelectedValue(undefined);
|
|
4216
4216
|
return;
|
|
4217
4217
|
}
|
|
@@ -16971,6 +16971,16 @@ var Filters = function (_a) {
|
|
|
16971
16971
|
var sectionIndex = _a.sectionIndex, itemIndex = _a.itemIndex, checked = _a.checked;
|
|
16972
16972
|
setFilterSection({ sectionIndex: sectionIndex, itemIndex: itemIndex, checked: checked });
|
|
16973
16973
|
var currentFilter = filters[sectionIndex];
|
|
16974
|
+
var currentFilterItem = currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.items[itemIndex];
|
|
16975
|
+
if ((currentFilterItem === null || currentFilterItem === void 0 ? void 0 : currentFilterItem.isLinkItem) && (currentFilterItem === null || currentFilterItem === void 0 ? void 0 : currentFilterItem.link)) {
|
|
16976
|
+
if (checked) {
|
|
16977
|
+
window.location.assign(currentFilterItem.link);
|
|
16978
|
+
}
|
|
16979
|
+
else if (currentFilterItem === null || currentFilterItem === void 0 ? void 0 : currentFilterItem.uncheckedLink) {
|
|
16980
|
+
window.location.assign(currentFilterItem.uncheckedLink);
|
|
16981
|
+
}
|
|
16982
|
+
return;
|
|
16983
|
+
}
|
|
16974
16984
|
setCheckedItems(function (prev) {
|
|
16975
16985
|
if (!currentFilter.isMultiselect) {
|
|
16976
16986
|
resetCheckedItems(__spreadArray([], prev, true));
|
|
@@ -16986,10 +16996,7 @@ var Filters = function (_a) {
|
|
|
16986
16996
|
return filter;
|
|
16987
16997
|
}
|
|
16988
16998
|
return __assign$1(__assign$1({}, filter), { items: filter.items.map(function (value, indexItems) {
|
|
16989
|
-
return {
|
|
16990
|
-
label: value.label,
|
|
16991
|
-
checked: itemIndex === indexItems ? checked : filter.isMultiselect ? value.checked : false,
|
|
16992
|
-
};
|
|
16999
|
+
return __assign$1(__assign$1({}, value), { label: value.label, checked: itemIndex === indexItems ? checked : filter.isMultiselect ? value.checked : false });
|
|
16993
17000
|
}) });
|
|
16994
17001
|
});
|
|
16995
17002
|
});
|