ba-js-common-header 0.0.74 → 1.0.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.
|
@@ -11771,16 +11771,9 @@ function useI18n() {
|
|
|
11771
11771
|
const { i18nFeed } = useSelector((state) => state.headerInfo);
|
|
11772
11772
|
const userLanguage = useSelector((state) => state.userLanguage);
|
|
11773
11773
|
const { data, error } = index(i18nFeed && userLanguage ? messageFormat(i18nFeed, [userLanguage]) : null, fetcher);
|
|
11774
|
-
return {
|
|
11775
|
-
i18n: new Jed({
|
|
11776
|
-
locale_data: data || {
|
|
11777
|
-
messages: {
|
|
11778
|
-
"": {}
|
|
11779
|
-
}
|
|
11780
|
-
}
|
|
11781
|
-
}),
|
|
11774
|
+
return __spreadProps(__spreadValues({}, data && { i18n: new Jed({ locale_data: data }) }), {
|
|
11782
11775
|
error
|
|
11783
|
-
};
|
|
11776
|
+
});
|
|
11784
11777
|
}
|
|
11785
11778
|
function isExternalLink(href) {
|
|
11786
11779
|
return href.match(/^(http|www).+/);
|
|
@@ -11829,7 +11822,7 @@ function Row(props) {
|
|
|
11829
11822
|
className: "col py-2 py-lg-0 px-0",
|
|
11830
11823
|
children: /* @__PURE__ */ jsxs("span", {
|
|
11831
11824
|
className: "px-lg-3 py-2 py-lg-1 d-block",
|
|
11832
|
-
children: [i18n.translate("label").fetch(), /* @__PURE__ */ jsx("span", {
|
|
11825
|
+
children: [i18n && i18n.translate("label").fetch(), /* @__PURE__ */ jsx("span", {
|
|
11833
11826
|
className: "float-end",
|
|
11834
11827
|
children: /* @__PURE__ */ jsx(commonThin.Lock, {
|
|
11835
11828
|
className: "hd-icon hd-icon-lock"
|
|
@@ -11889,10 +11882,10 @@ function Row(props) {
|
|
|
11889
11882
|
onClick: () => {
|
|
11890
11883
|
dispatch(setSelectedItem(id));
|
|
11891
11884
|
},
|
|
11892
|
-
children: i18n.translate(label).fetch()
|
|
11885
|
+
children: i18n && i18n.translate(label).fetch()
|
|
11893
11886
|
})) : /* @__PURE__ */ jsx("span", {
|
|
11894
11887
|
className: "ps-lg-3 pe-3 py-2",
|
|
11895
|
-
children: i18n.translate(label).fetch()
|
|
11888
|
+
children: i18n && i18n.translate(label).fetch()
|
|
11896
11889
|
})
|
|
11897
11890
|
}), hasChildren && /* @__PURE__ */ jsx("div", {
|
|
11898
11891
|
className: "col-auto p-2 d-block d-lg-none",
|
|
@@ -11916,7 +11909,7 @@ function Row(props) {
|
|
|
11916
11909
|
className: "col py-2 py-lg-0 px-0",
|
|
11917
11910
|
children: /* @__PURE__ */ jsx("div", {
|
|
11918
11911
|
className: "px-lg-3 d-block text-uppercase",
|
|
11919
|
-
children: i18n.translate(group).fetch()
|
|
11912
|
+
children: i18n && i18n.translate(group).fetch()
|
|
11920
11913
|
})
|
|
11921
11914
|
})
|
|
11922
11915
|
}), /* @__PURE__ */ jsxs("li", {
|
|
@@ -11938,10 +11931,10 @@ function Row(props) {
|
|
|
11938
11931
|
onClick: () => {
|
|
11939
11932
|
dispatch(setSelectedItem(id));
|
|
11940
11933
|
},
|
|
11941
|
-
children: i18n.translate(label).fetch()
|
|
11934
|
+
children: i18n && i18n.translate(label).fetch()
|
|
11942
11935
|
})) : /* @__PURE__ */ jsx("span", {
|
|
11943
11936
|
className: "px-lg-3 py-2 py-lg-1 d-block",
|
|
11944
|
-
children: i18n.translate(label).fetch()
|
|
11937
|
+
children: i18n && i18n.translate(label).fetch()
|
|
11945
11938
|
})
|
|
11946
11939
|
}), hasChildren && /* @__PURE__ */ jsx("div", {
|
|
11947
11940
|
className: "col-auto px-0",
|
|
@@ -11976,7 +11969,7 @@ function Row(props) {
|
|
|
11976
11969
|
onClick: () => {
|
|
11977
11970
|
dispatch(setSelectedItem(id));
|
|
11978
11971
|
},
|
|
11979
|
-
children: i18n.translate(label).fetch()
|
|
11972
|
+
children: i18n && i18n.translate(label).fetch()
|
|
11980
11973
|
}))
|
|
11981
11974
|
})
|
|
11982
11975
|
})
|
|
@@ -13660,7 +13653,7 @@ function HotelFinder(props) {
|
|
|
13660
13653
|
const {
|
|
13661
13654
|
i18n
|
|
13662
13655
|
} = useI18n();
|
|
13663
|
-
if (noMatchHotel.length === 1) {
|
|
13656
|
+
if (i18n && noMatchHotel.length === 1) {
|
|
13664
13657
|
noMatchHotel.unshift(i18n.translate("header.no_matches_please_try_again").fetch());
|
|
13665
13658
|
}
|
|
13666
13659
|
const [inputHotels, setInputHotels] = useState([]);
|
|
@@ -13758,7 +13751,7 @@ function HotelFinder(props) {
|
|
|
13758
13751
|
})), {
|
|
13759
13752
|
type: "text",
|
|
13760
13753
|
className: "form-control",
|
|
13761
|
-
placeholder: i18n.translate("header.type_property_name").fetch(),
|
|
13754
|
+
placeholder: i18n && i18n.translate("header.type_property_name").fetch(),
|
|
13762
13755
|
id: "hd-property-input",
|
|
13763
13756
|
value: ctrlInputValue
|
|
13764
13757
|
})), /* @__PURE__ */ jsx("ul", __spreadProps(__spreadValues({
|
|
@@ -13921,7 +13914,7 @@ function PropertySelector(props) {
|
|
|
13921
13914
|
className: "col",
|
|
13922
13915
|
children: [/* @__PURE__ */ jsx("small", {
|
|
13923
13916
|
className: "pt-2",
|
|
13924
|
-
children: i18n.translate(label).fetch()
|
|
13917
|
+
children: i18n && i18n.translate(label).fetch()
|
|
13925
13918
|
}), /* @__PURE__ */ jsx("span", {
|
|
13926
13919
|
className: "d-block",
|
|
13927
13920
|
id: "hd-property-name",
|
|
@@ -13977,7 +13970,7 @@ function HelpCenter() {
|
|
|
13977
13970
|
className: "ps-lg-3 pe-3 py-2 d-block",
|
|
13978
13971
|
children: [/* @__PURE__ */ jsx("span", {
|
|
13979
13972
|
className: "ps-lg-2",
|
|
13980
|
-
children: i18n.translate(label).fetch()
|
|
13973
|
+
children: i18n && i18n.translate(label).fetch()
|
|
13981
13974
|
}), /* @__PURE__ */ jsx("span", {
|
|
13982
13975
|
className: "d-none d-lg-inline ms-2",
|
|
13983
13976
|
children: /* @__PURE__ */ jsx(commonThin.ArrowAngleDown, {
|
|
@@ -14009,7 +14002,7 @@ function HelpCenter() {
|
|
|
14009
14002
|
}, isExternalLink(href) && {
|
|
14010
14003
|
target: "_blank"
|
|
14011
14004
|
}), {
|
|
14012
|
-
children: i18n.translate(lbl).fetch()
|
|
14005
|
+
children: i18n && i18n.translate(lbl).fetch()
|
|
14013
14006
|
}))
|
|
14014
14007
|
})
|
|
14015
14008
|
})
|
|
@@ -14049,7 +14042,7 @@ function UserManager() {
|
|
|
14049
14042
|
className: "col py-2 py-lg-0 px-0",
|
|
14050
14043
|
children: [/* @__PURE__ */ jsx("small", {
|
|
14051
14044
|
className: "pt-2 d-lg-none",
|
|
14052
|
-
children: i18n.translate(label).fetch()
|
|
14045
|
+
children: i18n && i18n.translate(label).fetch()
|
|
14053
14046
|
}), /* @__PURE__ */ jsxs("span", {
|
|
14054
14047
|
className: "ps-lg-3 pe-3 pt-lg-2 pb-2 d-block",
|
|
14055
14048
|
children: [/* @__PURE__ */ jsx("span", {
|
|
@@ -14091,7 +14084,7 @@ function UserManager() {
|
|
|
14091
14084
|
}, isExternalLink(href) && {
|
|
14092
14085
|
target: "_blank"
|
|
14093
14086
|
}), {
|
|
14094
|
-
children: i18n.translate(lbl).fetch()
|
|
14087
|
+
children: i18n && i18n.translate(lbl).fetch()
|
|
14095
14088
|
}))
|
|
14096
14089
|
})
|
|
14097
14090
|
})
|
|
@@ -14168,7 +14161,7 @@ function UserLanguage(props) {
|
|
|
14168
14161
|
className: "col py-2 py-lg-0 px-0",
|
|
14169
14162
|
children: [/* @__PURE__ */ jsx("small", {
|
|
14170
14163
|
className: "pt-2 d-lg-none",
|
|
14171
|
-
children: i18n.translate(label).fetch()
|
|
14164
|
+
children: i18n && i18n.translate(label).fetch()
|
|
14172
14165
|
}), /* @__PURE__ */ jsxs("span", {
|
|
14173
14166
|
className: "ps-lg-3 pe-3 pt-lg-2 pb-2 d-block",
|
|
14174
14167
|
children: [selectedLanguageName, /* @__PURE__ */ jsx("span", {
|
|
@@ -14274,7 +14267,7 @@ function Title() {
|
|
|
14274
14267
|
}), /* @__PURE__ */ jsx("span", {
|
|
14275
14268
|
className: "ms-3",
|
|
14276
14269
|
id: "hd-submenu-title",
|
|
14277
|
-
children: label && i18n.translate(label).fetch()
|
|
14270
|
+
children: label && i18n && i18n.translate(label).fetch()
|
|
14278
14271
|
})]
|
|
14279
14272
|
}));
|
|
14280
14273
|
}
|
|
@@ -14374,13 +14367,13 @@ function Breadcrumb() {
|
|
|
14374
14367
|
className: "breadcrumb mb-0",
|
|
14375
14368
|
children: [/* @__PURE__ */ jsx("li", {
|
|
14376
14369
|
className: "breadcrumb-item active",
|
|
14377
|
-
children: i18n.translate(breadcrumbs[0].label).fetch()
|
|
14370
|
+
children: i18n && i18n.translate(breadcrumbs[0].label).fetch()
|
|
14378
14371
|
}), breadcrumbs.length >= 2 && /* @__PURE__ */ jsx("li", {
|
|
14379
14372
|
className: "breadcrumb-item active",
|
|
14380
|
-
children: i18n.translate(breadcrumbs[1].label).fetch()
|
|
14373
|
+
children: i18n && i18n.translate(breadcrumbs[1].label).fetch()
|
|
14381
14374
|
}), breadcrumbs.length === 3 && /* @__PURE__ */ jsx("li", {
|
|
14382
14375
|
className: "breadcrumb-item active",
|
|
14383
|
-
children: i18n.translate(breadcrumbs[2].label).fetch()
|
|
14376
|
+
children: i18n && i18n.translate(breadcrumbs[2].label).fetch()
|
|
14384
14377
|
})]
|
|
14385
14378
|
})
|
|
14386
14379
|
})
|