diy-template-components 0.0.73 → 0.0.76
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 +15 -11
- package/build/index.es.js.map +1 -1
- package/build/index.js +15 -11
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -447,6 +447,10 @@ function useLinkBuilder(data) {
|
|
|
447
447
|
return data.link;
|
|
448
448
|
}
|
|
449
449
|
|
|
450
|
+
if (data?.isExternal) {
|
|
451
|
+
return data.link;
|
|
452
|
+
}
|
|
453
|
+
|
|
450
454
|
if (!isPreview) {
|
|
451
455
|
const link = data.link === '/' ? '' : '/' + data.link;
|
|
452
456
|
return basePath ? `//${basePath}${link}` : null;
|
|
@@ -485,8 +489,8 @@ const Button = /*#__PURE__*/forwardRef(function Button({
|
|
|
485
489
|
return data?.isLink ? /*#__PURE__*/React.createElement("a", _extends({
|
|
486
490
|
ref: ref,
|
|
487
491
|
href: link,
|
|
488
|
-
target: data?.
|
|
489
|
-
rel: data?.
|
|
492
|
+
target: data?.isExternal ? '_blank' : null,
|
|
493
|
+
rel: data?.isExternal ? 'nofollow noopener' : null,
|
|
490
494
|
className: (active ? classes.active : '') + ' ' + classes[type] + ' ' + classes[size] + ' ' + classes.anchorClass,
|
|
491
495
|
style: styling
|
|
492
496
|
}, elementProps), data?.value) : /*#__PURE__*/React.createElement("button", _extends({
|
|
@@ -969,7 +973,7 @@ function Dropdown(props) {
|
|
|
969
973
|
link: dt.slug,
|
|
970
974
|
isLink: true,
|
|
971
975
|
value: dt.title,
|
|
972
|
-
isExternal:
|
|
976
|
+
isExternal: 0
|
|
973
977
|
},
|
|
974
978
|
fluid: true,
|
|
975
979
|
active: dt.active,
|
|
@@ -1000,7 +1004,7 @@ function OptionList({
|
|
|
1000
1004
|
link: dt.slug,
|
|
1001
1005
|
active: dt.active,
|
|
1002
1006
|
isLink: true,
|
|
1003
|
-
|
|
1007
|
+
isExternal: 0
|
|
1004
1008
|
};
|
|
1005
1009
|
});
|
|
1006
1010
|
};
|
|
@@ -1051,7 +1055,7 @@ function OptionList({
|
|
|
1051
1055
|
link: headerData?.appLink,
|
|
1052
1056
|
isLink: 1,
|
|
1053
1057
|
value: 'Download App',
|
|
1054
|
-
|
|
1058
|
+
isExternal: 1
|
|
1055
1059
|
},
|
|
1056
1060
|
type: 'primary',
|
|
1057
1061
|
size: 'small',
|
|
@@ -1065,7 +1069,7 @@ function OptionList({
|
|
|
1065
1069
|
link: headerData?.loginCtaLink,
|
|
1066
1070
|
isLink: 1,
|
|
1067
1071
|
value: 'Login',
|
|
1068
|
-
|
|
1072
|
+
isExternal: 1
|
|
1069
1073
|
},
|
|
1070
1074
|
type: 'primary',
|
|
1071
1075
|
size: isMobile ? 'small' : 'medium',
|
|
@@ -1189,7 +1193,7 @@ function MobileHeader({
|
|
|
1189
1193
|
src: phoneIos,
|
|
1190
1194
|
alt: "iosUrl"
|
|
1191
1195
|
}),
|
|
1192
|
-
|
|
1196
|
+
isExternal: 1
|
|
1193
1197
|
},
|
|
1194
1198
|
type: '',
|
|
1195
1199
|
size: 'small',
|
|
@@ -1211,7 +1215,7 @@ function MobileHeader({
|
|
|
1211
1215
|
src: phoneAndroid,
|
|
1212
1216
|
alt: "iosUrl"
|
|
1213
1217
|
}),
|
|
1214
|
-
|
|
1218
|
+
isExternal: 1
|
|
1215
1219
|
},
|
|
1216
1220
|
type: '',
|
|
1217
1221
|
size: 'small',
|
|
@@ -1231,7 +1235,7 @@ function MobileHeader({
|
|
|
1231
1235
|
link: header?.iosUrl,
|
|
1232
1236
|
isLink: 1,
|
|
1233
1237
|
value: 'Download App',
|
|
1234
|
-
|
|
1238
|
+
isExternal: 1
|
|
1235
1239
|
},
|
|
1236
1240
|
type: 'primary',
|
|
1237
1241
|
size: 'small',
|
|
@@ -1244,7 +1248,7 @@ function MobileHeader({
|
|
|
1244
1248
|
link: header?.androidURL,
|
|
1245
1249
|
isLink: 1,
|
|
1246
1250
|
value: 'Download App',
|
|
1247
|
-
|
|
1251
|
+
isExternal: 1
|
|
1248
1252
|
},
|
|
1249
1253
|
type: 'primary',
|
|
1250
1254
|
size: 'small',
|
|
@@ -1261,7 +1265,7 @@ function MobileHeader({
|
|
|
1261
1265
|
link: header?.appLink,
|
|
1262
1266
|
isLink: 1,
|
|
1263
1267
|
value: 'Download App',
|
|
1264
|
-
|
|
1268
|
+
isExternal: 1
|
|
1265
1269
|
},
|
|
1266
1270
|
type: 'primary',
|
|
1267
1271
|
size: 'small',
|