ba-js-common-header 0.0.70 → 0.0.73
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/dist/ba-js-common-header.es.js +20 -12
- package/dist/ba-js-common-header.umd.js +12 -12
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -14975,18 +14975,28 @@ function MenuBar() {
|
|
|
14975
14975
|
const {
|
|
14976
14976
|
origin,
|
|
14977
14977
|
pathname,
|
|
14978
|
-
search
|
|
14979
|
-
hash
|
|
14978
|
+
search
|
|
14980
14979
|
} = new URL(window.location.href);
|
|
14981
14980
|
const params = queryString.parse(search);
|
|
14981
|
+
const hrefs = items.filter((item) => !!item.href).map((item) => new URL(item.href, origin).pathname);
|
|
14982
|
+
const set2 = new Set(hrefs);
|
|
14983
|
+
const duplicates = hrefs.filter((href) => {
|
|
14984
|
+
if (set2.has(href)) {
|
|
14985
|
+
set2.delete(href);
|
|
14986
|
+
return void 0;
|
|
14987
|
+
}
|
|
14988
|
+
return href;
|
|
14989
|
+
});
|
|
14982
14990
|
const selectedItem = items.find((item) => {
|
|
14983
14991
|
const {
|
|
14984
14992
|
origin: itemOrigin,
|
|
14985
14993
|
pathname: itemPathname,
|
|
14986
|
-
search: itemSearch
|
|
14987
|
-
hash: itemHash
|
|
14994
|
+
search: itemSearch
|
|
14988
14995
|
} = new URL(item.href, origin);
|
|
14989
|
-
|
|
14996
|
+
if (duplicates.find((duplicate) => duplicate === itemPathname)) {
|
|
14997
|
+
return itemOrigin === origin && itemPathname === pathname && isMatch_1(params, queryString.parse(itemSearch));
|
|
14998
|
+
}
|
|
14999
|
+
return itemOrigin === origin && itemPathname === pathname;
|
|
14990
15000
|
});
|
|
14991
15001
|
if (selectedItem) {
|
|
14992
15002
|
dispatch(setSelectedItem(selectedItem.id));
|
|
@@ -15044,7 +15054,7 @@ function Notifications() {
|
|
|
15044
15054
|
} = useSelector((state) => state.notifications);
|
|
15045
15055
|
const hideNotificationsBell = isMobileOrTablet && isOpen;
|
|
15046
15056
|
const styles = useSpring({
|
|
15047
|
-
opacity: hideNotificationsBell ? 0 : 1
|
|
15057
|
+
opacity: hideNotificationsBell || notificationsLang.length === 0 ? 0 : 1
|
|
15048
15058
|
});
|
|
15049
15059
|
const ref = useRef();
|
|
15050
15060
|
const dispatch = useDispatch();
|
|
@@ -15072,7 +15082,7 @@ function Notifications() {
|
|
|
15072
15082
|
sixWksAgo = getYMD(sixWksAgo);
|
|
15073
15083
|
Object.keys(items).forEach((lang) => {
|
|
15074
15084
|
items[lang].forEach((langNotifs) => {
|
|
15075
|
-
langNotifs.items = langNotifs.items.filter((n2) => n2.date
|
|
15085
|
+
langNotifs.items = langNotifs.items.filter((n2) => !n2.date || getYMD(new Date(n2.date)) > sixWksAgo);
|
|
15076
15086
|
});
|
|
15077
15087
|
items[lang] = items[lang].filter((langNotifs) => langNotifs.items.length > 0);
|
|
15078
15088
|
});
|
|
@@ -15112,8 +15122,6 @@ function Notifications() {
|
|
|
15112
15122
|
}
|
|
15113
15123
|
}
|
|
15114
15124
|
}, [notificationDate]);
|
|
15115
|
-
if (!notificationsLang || notificationsLang.length === 0)
|
|
15116
|
-
return null;
|
|
15117
15125
|
return /* @__PURE__ */ jsx(animated.div, {
|
|
15118
15126
|
className: cn("col-auto", "pe-lg-0", "order-lg-4", {
|
|
15119
15127
|
"hd-ringing": !notified
|
|
@@ -16544,7 +16552,7 @@ function HotelFinder(props) {
|
|
|
16544
16552
|
i18n
|
|
16545
16553
|
} = useI18n();
|
|
16546
16554
|
if (noMatchHotel.length === 1) {
|
|
16547
|
-
noMatchHotel.unshift(i18n.translate("
|
|
16555
|
+
noMatchHotel.unshift(i18n.translate("header.no_matches_please_try_again").fetch());
|
|
16548
16556
|
}
|
|
16549
16557
|
const [inputHotels, setInputHotels] = useState([]);
|
|
16550
16558
|
const [ctrlInputValue, setCtrlInputValue] = useState(defaultHotel && defaultHotel[0] || "");
|
|
@@ -16641,7 +16649,7 @@ function HotelFinder(props) {
|
|
|
16641
16649
|
})), {
|
|
16642
16650
|
type: "text",
|
|
16643
16651
|
className: "form-control",
|
|
16644
|
-
placeholder: i18n.translate("
|
|
16652
|
+
placeholder: i18n.translate("header.type_property_name").fetch(),
|
|
16645
16653
|
id: "hd-property-input",
|
|
16646
16654
|
value: ctrlInputValue
|
|
16647
16655
|
})), /* @__PURE__ */ jsx("ul", __spreadProps(__spreadValues({
|
|
@@ -16656,7 +16664,7 @@ function HotelFinder(props) {
|
|
|
16656
16664
|
index: index2
|
|
16657
16665
|
})), {
|
|
16658
16666
|
children: [hotel[0], hotel === selectedHotel && /* @__PURE__ */ jsx(commonThin.Tick, {
|
|
16659
|
-
className: "hd-icon hd-icon-tick
|
|
16667
|
+
className: "hd-icon hd-icon-tick float-end"
|
|
16660
16668
|
})]
|
|
16661
16669
|
}), hotel[1]))
|
|
16662
16670
|
})), /* @__PURE__ */ jsx(commonThin.Search, {
|