@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.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default, { Component, useState,
|
|
1
|
+
import React__default, { Component, useState, createContext, createElement } from 'react';
|
|
2
2
|
import Row from 'react-bootstrap/Row';
|
|
3
3
|
import Col from 'react-bootstrap/Col';
|
|
4
4
|
import Card from 'react-bootstrap/Card';
|
|
@@ -1085,6 +1085,13 @@ var LeftNav = function LeftNav(props) {
|
|
|
1085
1085
|
var leftItems = props.leftItems;
|
|
1086
1086
|
|
|
1087
1087
|
|
|
1088
|
+
var checkUrlIsExternal = function checkUrlIsExternal(url) {
|
|
1089
|
+
if (/(http|https?)([^\s]+)/g.test(url)) {
|
|
1090
|
+
return true;
|
|
1091
|
+
}
|
|
1092
|
+
return false;
|
|
1093
|
+
};
|
|
1094
|
+
|
|
1088
1095
|
return React__default.createElement(
|
|
1089
1096
|
'section',
|
|
1090
1097
|
null,
|
|
@@ -1123,7 +1130,11 @@ var LeftNav = function LeftNav(props) {
|
|
|
1123
1130
|
React__default.createElement(
|
|
1124
1131
|
ListGroup.Item,
|
|
1125
1132
|
{ as: 'li' },
|
|
1126
|
-
React__default.createElement(
|
|
1133
|
+
checkUrlIsExternal(subRow.url) ? React__default.createElement(
|
|
1134
|
+
'a',
|
|
1135
|
+
{ target: '_blank', href: subRow.url },
|
|
1136
|
+
subRow.name
|
|
1137
|
+
) : React__default.createElement(
|
|
1127
1138
|
Link,
|
|
1128
1139
|
{ href: subRow.url || '#' },
|
|
1129
1140
|
React__default.createElement(
|