@cakemail-org/ui-components-v2 2.2.52 → 2.2.54
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/cjs/index.js +20 -17
- package/dist/esm/index.js +20 -17
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -986,29 +986,32 @@ function getBrandUrl(_a) {
|
|
|
986
986
|
var mainKey = _a.mainKey, elKey = _a.elKey, brand = _a.brand, locale = _a.locale;
|
|
987
987
|
if (!elKey || !brand)
|
|
988
988
|
return "";
|
|
989
|
-
var
|
|
990
|
-
if (!
|
|
989
|
+
var mainObject = mainKey && (brand === null || brand === void 0 ? void 0 : brand[mainKey]) ? brand === null || brand === void 0 ? void 0 : brand[mainKey] : brand === null || brand === void 0 ? void 0 : brand.images;
|
|
990
|
+
if (!mainObject)
|
|
991
991
|
return "";
|
|
992
992
|
var cLocale = ((_b = locale === null || locale === void 0 ? void 0 : locale.toLowerCase()) === null || _b === void 0 ? void 0 : _b.replace("-", "_")) || undefined;
|
|
993
|
-
var
|
|
994
|
-
var
|
|
995
|
-
if (
|
|
996
|
-
return getBrandUrlFromProperty(
|
|
993
|
+
var objectUrlViaUnderscore = mainObject === null || mainObject === void 0 ? void 0 : mainObject[elKey + "_" + cLocale];
|
|
994
|
+
var defaultUrlObject = getNestedProperty(mainObject, elKey);
|
|
995
|
+
if (objectUrlViaUnderscore) {
|
|
996
|
+
return getBrandUrlFromProperty(objectUrlViaUnderscore) || undefined;
|
|
997
997
|
}
|
|
998
|
-
else if (
|
|
999
|
-
if (typeof
|
|
1000
|
-
return
|
|
998
|
+
else if (defaultUrlObject) {
|
|
999
|
+
if (typeof defaultUrlObject === "string") {
|
|
1000
|
+
return defaultUrlObject;
|
|
1001
1001
|
}
|
|
1002
1002
|
else {
|
|
1003
1003
|
if (cLocale) {
|
|
1004
|
-
var
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1004
|
+
var isoLang_1 = cLocale === null || cLocale === void 0 ? void 0 : cLocale.substring(0, 2);
|
|
1005
|
+
var keys = Object.keys(defaultUrlObject);
|
|
1006
|
+
var localeKey = keys.find(function (k) { return k.toLowerCase() === cLocale; });
|
|
1007
|
+
var isoLangKey = keys.find(function (k) { return k.toLowerCase() === isoLang_1; });
|
|
1008
|
+
return getBrandUrlFromProperty(localeKey ? defaultUrlObject[localeKey] : undefined) ||
|
|
1009
|
+
getBrandUrlFromProperty(isoLangKey ? defaultUrlObject[isoLangKey] : undefined) ||
|
|
1010
|
+
getBrandUrlFromProperty(defaultUrlObject === null || defaultUrlObject === void 0 ? void 0 : defaultUrlObject.en) ||
|
|
1011
|
+
getBrandUrlFromProperty(defaultUrlObject) || undefined;
|
|
1009
1012
|
}
|
|
1010
|
-
return getBrandUrlFromProperty(
|
|
1011
|
-
getBrandUrlFromProperty(
|
|
1013
|
+
return getBrandUrlFromProperty(defaultUrlObject === null || defaultUrlObject === void 0 ? void 0 : defaultUrlObject.en) ||
|
|
1014
|
+
getBrandUrlFromProperty(defaultUrlObject) || undefined;
|
|
1012
1015
|
}
|
|
1013
1016
|
}
|
|
1014
1017
|
else {
|
|
@@ -9286,7 +9289,7 @@ function Link(_a) {
|
|
|
9286
9289
|
return React.createElement(material.Link, __assign({}, props, { variant: variant, color: color, className: classes }), children);
|
|
9287
9290
|
}
|
|
9288
9291
|
|
|
9289
|
-
var css_248z$b = ".subNav-component-v2 {\n flex-wrap: wrap;\n}\n.subNav-component-v2.dir-row button:not(:last-child) {\n margin-right: 2px;\n}\n.subNav-component-v2.dir-column button:not(:first-child) {\n margin-top: 1.25rem;\n}\n.subNav-component-v2 button.default, .subNav-component-v2 button.text {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n outline: none;\n}\n.subNav-component-v2 button.default span, .subNav-component-v2 button.text span {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}\n.subNav-component-v2 button.default:not(:hover), .subNav-component-v2 button.text:not(:hover) {\n background: none;\n}\n.subNav-component-v2 button.default:hover, .subNav-component-v2 button.text:hover {\n outline: none;\n}\n.subNav-component-v2 button.default:active, .subNav-component-v2 button.text:active {\n outline: none !important;\n}\n.subNav-component-v2 button.default {\n text-transform: none;\n}\n.subNav-component-v2 button.default span {\n text-transform: none;\n}\n.subNav-component-v2 button.default.selected {\n
|
|
9292
|
+
var css_248z$b = ".subNav-component-v2 {\n flex-wrap: wrap;\n}\n.subNav-component-v2.dir-row button:not(:last-child) {\n margin-right: 2px;\n}\n.subNav-component-v2.dir-column button:not(:first-child) {\n margin-top: 1.25rem;\n}\n.subNav-component-v2 button.selected {\n pointer-events: none;\n}\n.subNav-component-v2 button.default, .subNav-component-v2 button.text {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n outline: none;\n}\n.subNav-component-v2 button.default span, .subNav-component-v2 button.text span {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}\n.subNav-component-v2 button.default:not(:hover), .subNav-component-v2 button.text:not(:hover) {\n background: none;\n}\n.subNav-component-v2 button.default:hover, .subNav-component-v2 button.text:hover {\n outline: none;\n}\n.subNav-component-v2 button.default:active, .subNav-component-v2 button.text:active {\n outline: none !important;\n}\n.subNav-component-v2 button.default {\n text-transform: none;\n}\n.subNav-component-v2 button.default span {\n text-transform: none;\n}\n.subNav-component-v2 button.default.selected {\n background-color: var(--cloud, #F4F4F4);\n}\n.subNav-component-v2 button.text span {\n color: var(--silver, #9B9B9B);\n}\n.subNav-component-v2 button.text:hover, .subNav-component-v2 button.text.selected {\n background: none;\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}\n.subNav-component-v2 button.text:hover span, .subNav-component-v2 button.text.selected span {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}";
|
|
9290
9293
|
styleInject(css_248z$b);
|
|
9291
9294
|
|
|
9292
9295
|
function SubNav(_a) {
|
package/dist/esm/index.js
CHANGED
|
@@ -966,29 +966,32 @@ function getBrandUrl(_a) {
|
|
|
966
966
|
var mainKey = _a.mainKey, elKey = _a.elKey, brand = _a.brand, locale = _a.locale;
|
|
967
967
|
if (!elKey || !brand)
|
|
968
968
|
return "";
|
|
969
|
-
var
|
|
970
|
-
if (!
|
|
969
|
+
var mainObject = mainKey && (brand === null || brand === void 0 ? void 0 : brand[mainKey]) ? brand === null || brand === void 0 ? void 0 : brand[mainKey] : brand === null || brand === void 0 ? void 0 : brand.images;
|
|
970
|
+
if (!mainObject)
|
|
971
971
|
return "";
|
|
972
972
|
var cLocale = ((_b = locale === null || locale === void 0 ? void 0 : locale.toLowerCase()) === null || _b === void 0 ? void 0 : _b.replace("-", "_")) || undefined;
|
|
973
|
-
var
|
|
974
|
-
var
|
|
975
|
-
if (
|
|
976
|
-
return getBrandUrlFromProperty(
|
|
973
|
+
var objectUrlViaUnderscore = mainObject === null || mainObject === void 0 ? void 0 : mainObject[elKey + "_" + cLocale];
|
|
974
|
+
var defaultUrlObject = getNestedProperty(mainObject, elKey);
|
|
975
|
+
if (objectUrlViaUnderscore) {
|
|
976
|
+
return getBrandUrlFromProperty(objectUrlViaUnderscore) || undefined;
|
|
977
977
|
}
|
|
978
|
-
else if (
|
|
979
|
-
if (typeof
|
|
980
|
-
return
|
|
978
|
+
else if (defaultUrlObject) {
|
|
979
|
+
if (typeof defaultUrlObject === "string") {
|
|
980
|
+
return defaultUrlObject;
|
|
981
981
|
}
|
|
982
982
|
else {
|
|
983
983
|
if (cLocale) {
|
|
984
|
-
var
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
984
|
+
var isoLang_1 = cLocale === null || cLocale === void 0 ? void 0 : cLocale.substring(0, 2);
|
|
985
|
+
var keys = Object.keys(defaultUrlObject);
|
|
986
|
+
var localeKey = keys.find(function (k) { return k.toLowerCase() === cLocale; });
|
|
987
|
+
var isoLangKey = keys.find(function (k) { return k.toLowerCase() === isoLang_1; });
|
|
988
|
+
return getBrandUrlFromProperty(localeKey ? defaultUrlObject[localeKey] : undefined) ||
|
|
989
|
+
getBrandUrlFromProperty(isoLangKey ? defaultUrlObject[isoLangKey] : undefined) ||
|
|
990
|
+
getBrandUrlFromProperty(defaultUrlObject === null || defaultUrlObject === void 0 ? void 0 : defaultUrlObject.en) ||
|
|
991
|
+
getBrandUrlFromProperty(defaultUrlObject) || undefined;
|
|
989
992
|
}
|
|
990
|
-
return getBrandUrlFromProperty(
|
|
991
|
-
getBrandUrlFromProperty(
|
|
993
|
+
return getBrandUrlFromProperty(defaultUrlObject === null || defaultUrlObject === void 0 ? void 0 : defaultUrlObject.en) ||
|
|
994
|
+
getBrandUrlFromProperty(defaultUrlObject) || undefined;
|
|
992
995
|
}
|
|
993
996
|
}
|
|
994
997
|
else {
|
|
@@ -9266,7 +9269,7 @@ function Link(_a) {
|
|
|
9266
9269
|
return React__default.createElement(Link$1, __assign({}, props, { variant: variant, color: color, className: classes }), children);
|
|
9267
9270
|
}
|
|
9268
9271
|
|
|
9269
|
-
var css_248z$b = ".subNav-component-v2 {\n flex-wrap: wrap;\n}\n.subNav-component-v2.dir-row button:not(:last-child) {\n margin-right: 2px;\n}\n.subNav-component-v2.dir-column button:not(:first-child) {\n margin-top: 1.25rem;\n}\n.subNav-component-v2 button.default, .subNav-component-v2 button.text {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n outline: none;\n}\n.subNav-component-v2 button.default span, .subNav-component-v2 button.text span {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}\n.subNav-component-v2 button.default:not(:hover), .subNav-component-v2 button.text:not(:hover) {\n background: none;\n}\n.subNav-component-v2 button.default:hover, .subNav-component-v2 button.text:hover {\n outline: none;\n}\n.subNav-component-v2 button.default:active, .subNav-component-v2 button.text:active {\n outline: none !important;\n}\n.subNav-component-v2 button.default {\n text-transform: none;\n}\n.subNav-component-v2 button.default span {\n text-transform: none;\n}\n.subNav-component-v2 button.default.selected {\n
|
|
9272
|
+
var css_248z$b = ".subNav-component-v2 {\n flex-wrap: wrap;\n}\n.subNav-component-v2.dir-row button:not(:last-child) {\n margin-right: 2px;\n}\n.subNav-component-v2.dir-column button:not(:first-child) {\n margin-top: 1.25rem;\n}\n.subNav-component-v2 button.selected {\n pointer-events: none;\n}\n.subNav-component-v2 button.default, .subNav-component-v2 button.text {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n outline: none;\n}\n.subNav-component-v2 button.default span, .subNav-component-v2 button.text span {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}\n.subNav-component-v2 button.default:not(:hover), .subNav-component-v2 button.text:not(:hover) {\n background: none;\n}\n.subNav-component-v2 button.default:hover, .subNav-component-v2 button.text:hover {\n outline: none;\n}\n.subNav-component-v2 button.default:active, .subNav-component-v2 button.text:active {\n outline: none !important;\n}\n.subNav-component-v2 button.default {\n text-transform: none;\n}\n.subNav-component-v2 button.default span {\n text-transform: none;\n}\n.subNav-component-v2 button.default.selected {\n background-color: var(--cloud, #F4F4F4);\n}\n.subNav-component-v2 button.text span {\n color: var(--silver, #9B9B9B);\n}\n.subNav-component-v2 button.text:hover, .subNav-component-v2 button.text.selected {\n background: none;\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}\n.subNav-component-v2 button.text:hover span, .subNav-component-v2 button.text.selected span {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}";
|
|
9270
9273
|
styleInject(css_248z$b);
|
|
9271
9274
|
|
|
9272
9275
|
function SubNav(_a) {
|