@mjhls/mjh-framework 1.0.26 → 1.0.27
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/index.es.js +13 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1092,6 +1092,13 @@ var LeftNav = function LeftNav(props) {
|
|
|
1092
1092
|
var leftItems = props.leftItems;
|
|
1093
1093
|
|
|
1094
1094
|
|
|
1095
|
+
var checkUrlIsExternal = function checkUrlIsExternal(url) {
|
|
1096
|
+
if (/(http|https?)([^\s]+)/g.test(url)) {
|
|
1097
|
+
return true;
|
|
1098
|
+
}
|
|
1099
|
+
return false;
|
|
1100
|
+
};
|
|
1101
|
+
|
|
1095
1102
|
return React__default.createElement(
|
|
1096
1103
|
'section',
|
|
1097
1104
|
null,
|
|
@@ -1130,7 +1137,11 @@ var LeftNav = function LeftNav(props) {
|
|
|
1130
1137
|
React__default.createElement(
|
|
1131
1138
|
ListGroup.Item,
|
|
1132
1139
|
{ as: 'li' },
|
|
1133
|
-
React__default.createElement(
|
|
1140
|
+
checkUrlIsExternal(subRow.url) ? React__default.createElement(
|
|
1141
|
+
'a',
|
|
1142
|
+
{ target: '_blank', href: subRow.url },
|
|
1143
|
+
subRow.name
|
|
1144
|
+
) : React__default.createElement(
|
|
1134
1145
|
Link,
|
|
1135
1146
|
{ href: subRow.url || '#' },
|
|
1136
1147
|
React__default.createElement(
|