@nuskin/nextgen-header 1.22.0 → 1.23.1
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/package-dist/index.js +29 -10
- package/package-dist/index.js.map +1 -1
- package/package-dist/index.mjs +29 -10
- package/package-dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/package-dist/index.mjs
CHANGED
|
@@ -100383,7 +100383,7 @@ var HEIGHT_MAP = {
|
|
|
100383
100383
|
|
|
100384
100384
|
;// ./src/utils/constants.js
|
|
100385
100385
|
var HEADER_CONTENT_ENTRY_UID = "global_header";
|
|
100386
|
-
var referenceFields = (/* unused pure expression or super */ null && (["top_navigation", "top_navigation.menu_items.menu_item", "top_navigation.menu_items.menu_item.sub_categories.category_section.items.product_category.category", "market_selector.regions.markets.languages"]));
|
|
100386
|
+
var referenceFields = (/* unused pure expression or super */ null && (["top_navigation", "top_navigation.menu_items.menu_item", "top_navigation.menu_items.menu_item.sub_categories.category_section.items.product_category.category", "market_selector.regions.markets.languages", "utility_links", "utility_links.loyalty_menu"]));
|
|
100387
100387
|
var CONTENTSTACK_API_KEY = process.env.CONTENTSTACK_API_KEY;
|
|
100388
100388
|
var CONTENTSTACK_DELIVERY_TOKEN = process.env.CONTENTSTACK_DELIVERY_TOKEN;
|
|
100389
100389
|
var CONTENTSTACK_ENVIRONMENT = process.env.CONTENTSTACK_ENVIRONMENT;
|
|
@@ -100708,6 +100708,7 @@ Brand.defaultProps = {
|
|
|
100708
100708
|
$: null
|
|
100709
100709
|
};
|
|
100710
100710
|
;// ./src/components/brand/brand.helpers.js
|
|
100711
|
+
function brand_helpers_typeof(o) { "@babel/helpers - typeof"; return brand_helpers_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, brand_helpers_typeof(o); }
|
|
100711
100712
|
function parseLogoData(logoData) {
|
|
100712
100713
|
if (!logoData) {
|
|
100713
100714
|
return {
|
|
@@ -100729,8 +100730,14 @@ function parseLogoData(logoData) {
|
|
|
100729
100730
|
var logoUrl;
|
|
100730
100731
|
if (header_logo) {
|
|
100731
100732
|
try {
|
|
100732
|
-
var
|
|
100733
|
-
var
|
|
100733
|
+
var _parsed;
|
|
100734
|
+
var parsed;
|
|
100735
|
+
if (typeof header_logo === "string") {
|
|
100736
|
+
parsed = JSON.parse(header_logo);
|
|
100737
|
+
} else if (brand_helpers_typeof(header_logo) === "object") {
|
|
100738
|
+
parsed = header_logo;
|
|
100739
|
+
}
|
|
100740
|
+
var imageArray = (_parsed = parsed) === null || _parsed === void 0 ? void 0 : _parsed.image;
|
|
100734
100741
|
if (Array.isArray(imageArray) && imageArray.length > 0) {
|
|
100735
100742
|
var _firstImage$selected, _firstImage$files, _firstImage$files2;
|
|
100736
100743
|
var firstImage = imageArray[0];
|
|
@@ -100750,21 +100757,31 @@ function parseLogoData(logoData) {
|
|
|
100750
100757
|
};
|
|
100751
100758
|
}
|
|
100752
100759
|
;// ./src/components/header/regions/HeaderLoyaltyRegion.jsx
|
|
100760
|
+
function HeaderLoyaltyRegion_typeof(o) { "@babel/helpers - typeof"; return HeaderLoyaltyRegion_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, HeaderLoyaltyRegion_typeof(o); }
|
|
100761
|
+
function HeaderLoyaltyRegion_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
100762
|
+
function HeaderLoyaltyRegion_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? HeaderLoyaltyRegion_ownKeys(Object(t), !0).forEach(function (r) { HeaderLoyaltyRegion_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : HeaderLoyaltyRegion_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
100763
|
+
function HeaderLoyaltyRegion_defineProperty(e, r, t) { return (r = HeaderLoyaltyRegion_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
100764
|
+
function HeaderLoyaltyRegion_toPropertyKey(t) { var i = HeaderLoyaltyRegion_toPrimitive(t, "string"); return "symbol" == HeaderLoyaltyRegion_typeof(i) ? i : i + ""; }
|
|
100765
|
+
function HeaderLoyaltyRegion_toPrimitive(t, r) { if ("object" != HeaderLoyaltyRegion_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != HeaderLoyaltyRegion_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
100753
100766
|
|
|
100754
100767
|
|
|
100755
100768
|
|
|
100756
100769
|
|
|
100757
100770
|
function HeaderLoyaltyRegion(_ref) {
|
|
100771
|
+
var _data$$;
|
|
100758
100772
|
var data = _ref.data;
|
|
100759
|
-
return /*#__PURE__*/(0,jsx_runtime_.jsx)(UtilityButton, {
|
|
100773
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(UtilityButton, HeaderLoyaltyRegion_objectSpread(HeaderLoyaltyRegion_objectSpread({
|
|
100760
100774
|
type: "button",
|
|
100761
|
-
|
|
100762
|
-
})
|
|
100775
|
+
href: data === null || data === void 0 ? void 0 : data.url
|
|
100776
|
+
}, data === null || data === void 0 || (_data$$ = data.$) === null || _data$$ === void 0 ? void 0 : _data$$.label), {}, {
|
|
100777
|
+
children: data === null || data === void 0 ? void 0 : data.label
|
|
100778
|
+
}));
|
|
100763
100779
|
}
|
|
100764
100780
|
HeaderLoyaltyRegion.propTypes = {
|
|
100765
100781
|
data: external_prop_types_["default"].shape({
|
|
100766
|
-
|
|
100767
|
-
|
|
100782
|
+
label: external_prop_types_["default"].string.isRequired,
|
|
100783
|
+
url: external_prop_types_["default"].string,
|
|
100784
|
+
$: external_prop_types_["default"].object
|
|
100768
100785
|
}).isRequired
|
|
100769
100786
|
};
|
|
100770
100787
|
;// ./src/components/header/HeaderIcons.jsx
|
|
@@ -104670,7 +104687,7 @@ var DEFAULT_TOP_RIBBON_LINKS = [{
|
|
|
104670
104687
|
ariaLabel: "Shop Gifts"
|
|
104671
104688
|
}];
|
|
104672
104689
|
function HeaderView(_ref) {
|
|
104673
|
-
var _headerEntry$logo, _headerEntry$locale_s, _headerEntry$
|
|
104690
|
+
var _headerEntry$logo, _headerEntry$locale_s, _headerEntry$utility_, _headerEntry$utility_2, _headerEntry$account, _headerEntry$cart, _headerEntry$search, _headerEntry$top_ribb, _headerEntry$navigati, _headerEntry$market_s, _ref2, _headerEntry$locale, _headerEntry$$;
|
|
104674
104691
|
var country = _ref.country,
|
|
104675
104692
|
language = _ref.language,
|
|
104676
104693
|
locale = _ref.locale,
|
|
@@ -104682,7 +104699,9 @@ function HeaderView(_ref) {
|
|
|
104682
104699
|
var mobileMarketTriggerMountRef = (0,external_react_.useRef)(null);
|
|
104683
104700
|
var logoData = parseLogoData((_headerEntry$logo = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.logo) !== null && _headerEntry$logo !== void 0 ? _headerEntry$logo : DEFAULT_LOGO);
|
|
104684
104701
|
var localeData = (_headerEntry$locale_s = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.locale_selector) !== null && _headerEntry$locale_s !== void 0 ? _headerEntry$locale_s : DEFAULT_LOCALE;
|
|
104685
|
-
var loyaltyData = (_headerEntry$
|
|
104702
|
+
var loyaltyData = (_headerEntry$utility_ = headerEntry === null || headerEntry === void 0 || (_headerEntry$utility_2 = headerEntry.utility_links) === null || _headerEntry$utility_2 === void 0 || (_headerEntry$utility_2 = _headerEntry$utility_2.find(function (link) {
|
|
104703
|
+
return link === null || link === void 0 ? void 0 : link.loyalty_menu;
|
|
104704
|
+
})) === null || _headerEntry$utility_2 === void 0 || (_headerEntry$utility_2 = _headerEntry$utility_2.loyalty_menu) === null || _headerEntry$utility_2 === void 0 ? void 0 : _headerEntry$utility_2[0]) !== null && _headerEntry$utility_ !== void 0 ? _headerEntry$utility_ : DEFAULT_LOYALTY;
|
|
104686
104705
|
var accountData = (_headerEntry$account = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.account) !== null && _headerEntry$account !== void 0 ? _headerEntry$account : DEFAULT_ACCOUNT;
|
|
104687
104706
|
var cartData = (_headerEntry$cart = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.cart) !== null && _headerEntry$cart !== void 0 ? _headerEntry$cart : DEFAULT_CART;
|
|
104688
104707
|
var searchData = (_headerEntry$search = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.search) !== null && _headerEntry$search !== void 0 ? _headerEntry$search : DEFAULT_SEARCH;
|