diy-template-components 0.0.72 → 0.0.75
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.es.js +16 -12
- package/build/index.es.js.map +1 -1
- package/build/index.js +16 -12
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -455,7 +455,11 @@ function useLinkBuilder(data) {
|
|
|
455
455
|
return null;
|
|
456
456
|
}
|
|
457
457
|
|
|
458
|
-
if (data?.isExistingLink
|
|
458
|
+
if (data?.isExistingLink) {
|
|
459
|
+
return data.link;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
if (data?.isExternal) {
|
|
459
463
|
return data.link;
|
|
460
464
|
}
|
|
461
465
|
|
|
@@ -497,8 +501,8 @@ const Button = /*#__PURE__*/React.forwardRef(function Button({
|
|
|
497
501
|
return data?.isLink ? /*#__PURE__*/React__default["default"].createElement("a", _extends({
|
|
498
502
|
ref: ref,
|
|
499
503
|
href: link,
|
|
500
|
-
target: data?.
|
|
501
|
-
rel: data?.
|
|
504
|
+
target: data?.isExternal ? '_blank' : null,
|
|
505
|
+
rel: data?.isExternal ? 'nofollow noopener' : null,
|
|
502
506
|
className: (active ? classes.active : '') + ' ' + classes[type] + ' ' + classes[size] + ' ' + classes.anchorClass,
|
|
503
507
|
style: styling
|
|
504
508
|
}, elementProps), data?.value) : /*#__PURE__*/React__default["default"].createElement("button", _extends({
|
|
@@ -981,7 +985,7 @@ function Dropdown(props) {
|
|
|
981
985
|
link: dt.slug,
|
|
982
986
|
isLink: true,
|
|
983
987
|
value: dt.title,
|
|
984
|
-
isExternal:
|
|
988
|
+
isExternal: 0
|
|
985
989
|
},
|
|
986
990
|
fluid: true,
|
|
987
991
|
active: dt.active,
|
|
@@ -1012,7 +1016,7 @@ function OptionList({
|
|
|
1012
1016
|
link: dt.slug,
|
|
1013
1017
|
active: dt.active,
|
|
1014
1018
|
isLink: true,
|
|
1015
|
-
|
|
1019
|
+
isExternal: 0
|
|
1016
1020
|
};
|
|
1017
1021
|
});
|
|
1018
1022
|
};
|
|
@@ -1063,7 +1067,7 @@ function OptionList({
|
|
|
1063
1067
|
link: headerData?.appLink,
|
|
1064
1068
|
isLink: 1,
|
|
1065
1069
|
value: 'Download App',
|
|
1066
|
-
|
|
1070
|
+
isExternal: 1
|
|
1067
1071
|
},
|
|
1068
1072
|
type: 'primary',
|
|
1069
1073
|
size: 'small',
|
|
@@ -1077,7 +1081,7 @@ function OptionList({
|
|
|
1077
1081
|
link: headerData?.loginCtaLink,
|
|
1078
1082
|
isLink: 1,
|
|
1079
1083
|
value: 'Login',
|
|
1080
|
-
|
|
1084
|
+
isExternal: 1
|
|
1081
1085
|
},
|
|
1082
1086
|
type: 'primary',
|
|
1083
1087
|
size: isMobile ? 'small' : 'medium',
|
|
@@ -1201,7 +1205,7 @@ function MobileHeader({
|
|
|
1201
1205
|
src: phoneIos,
|
|
1202
1206
|
alt: "iosUrl"
|
|
1203
1207
|
}),
|
|
1204
|
-
|
|
1208
|
+
isExternal: 1
|
|
1205
1209
|
},
|
|
1206
1210
|
type: '',
|
|
1207
1211
|
size: 'small',
|
|
@@ -1223,7 +1227,7 @@ function MobileHeader({
|
|
|
1223
1227
|
src: phoneAndroid,
|
|
1224
1228
|
alt: "iosUrl"
|
|
1225
1229
|
}),
|
|
1226
|
-
|
|
1230
|
+
isExternal: 1
|
|
1227
1231
|
},
|
|
1228
1232
|
type: '',
|
|
1229
1233
|
size: 'small',
|
|
@@ -1243,7 +1247,7 @@ function MobileHeader({
|
|
|
1243
1247
|
link: header?.iosUrl,
|
|
1244
1248
|
isLink: 1,
|
|
1245
1249
|
value: 'Download App',
|
|
1246
|
-
|
|
1250
|
+
isExternal: 1
|
|
1247
1251
|
},
|
|
1248
1252
|
type: 'primary',
|
|
1249
1253
|
size: 'small',
|
|
@@ -1256,7 +1260,7 @@ function MobileHeader({
|
|
|
1256
1260
|
link: header?.androidURL,
|
|
1257
1261
|
isLink: 1,
|
|
1258
1262
|
value: 'Download App',
|
|
1259
|
-
|
|
1263
|
+
isExternal: 1
|
|
1260
1264
|
},
|
|
1261
1265
|
type: 'primary',
|
|
1262
1266
|
size: 'small',
|
|
@@ -1273,7 +1277,7 @@ function MobileHeader({
|
|
|
1273
1277
|
link: header?.appLink,
|
|
1274
1278
|
isLink: 1,
|
|
1275
1279
|
value: 'Download App',
|
|
1276
|
-
|
|
1280
|
+
isExternal: 1
|
|
1277
1281
|
},
|
|
1278
1282
|
type: 'primary',
|
|
1279
1283
|
size: 'small',
|