@bydata/react-supertabs 1.1.1 → 1.1.3
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/ClickOutsideListener.js +5 -3
- package/dist/NotAvailable.js +14 -9
- package/dist/SuperLink.js +5 -2
- package/dist/SuperTabs.js +454 -419
- package/dist/TabContext.js +5 -3
- package/dist/TabList.js +112 -97
- package/dist/TabStack.js +42 -39
- package/package.json +12 -18
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
11
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
12
|
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
@@ -64,9 +65,10 @@ var ClickOutsideListener = exports["default"] = /*#__PURE__*/function (_React$Co
|
|
|
64
65
|
}, {
|
|
65
66
|
key: "render",
|
|
66
67
|
value: function render() {
|
|
67
|
-
return /*#__PURE__*/
|
|
68
|
-
ref: this.domRef
|
|
69
|
-
|
|
68
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
69
|
+
ref: this.domRef,
|
|
70
|
+
children: this.props.children
|
|
71
|
+
});
|
|
70
72
|
}
|
|
71
73
|
}]);
|
|
72
74
|
}(_react["default"].Component);
|
package/dist/NotAvailable.js
CHANGED
|
@@ -7,6 +7,7 @@ exports["default"] = void 0;
|
|
|
7
7
|
var _TabContext = require("./TabContext");
|
|
8
8
|
var _Utils = require("./Utils");
|
|
9
9
|
require("./NotAvailable.scss");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
11
|
var NotAvailable = function NotAvailable(_ref) {
|
|
11
12
|
var title = _ref.title,
|
|
12
13
|
description = _ref.description,
|
|
@@ -16,14 +17,18 @@ var NotAvailable = function NotAvailable(_ref) {
|
|
|
16
17
|
activeSubTab = _useTabContext.activeSubTab;
|
|
17
18
|
var heading = title !== null && title !== void 0 ? title : (0, _Utils.getTitle)(activeSubTab);
|
|
18
19
|
var subHeading = description !== null && description !== void 0 ? description : "".concat(subTabName, " is not available");
|
|
19
|
-
return /*#__PURE__*/
|
|
20
|
-
className: "not-availble-wrapper"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
21
|
+
className: "not-availble-wrapper",
|
|
22
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
23
|
+
className: "not-available-content",
|
|
24
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h3", {
|
|
25
|
+
className: "title",
|
|
26
|
+
children: heading.replace('Loading...', 'Untitled')
|
|
27
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
28
|
+
className: "description",
|
|
29
|
+
children: subHeading
|
|
30
|
+
})]
|
|
31
|
+
})
|
|
32
|
+
});
|
|
28
33
|
};
|
|
29
34
|
var _default = exports["default"] = NotAvailable;
|
package/dist/SuperLink.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _reactRouterDom = require("react-router-dom");
|
|
8
8
|
var _TabContext = require("./TabContext");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
10
|
var SuperLink = function SuperLink(_ref) {
|
|
10
11
|
var children = _ref.children,
|
|
11
12
|
tab = _ref.tab,
|
|
@@ -26,11 +27,13 @@ var SuperLink = function SuperLink(_ref) {
|
|
|
26
27
|
isSubTab: isSubTab
|
|
27
28
|
});
|
|
28
29
|
};
|
|
29
|
-
return /*#__PURE__*/
|
|
30
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.NavLink, {
|
|
30
31
|
to: tab.url,
|
|
31
32
|
title: tab.title || '',
|
|
32
33
|
onClick: handleSuperLinkClick
|
|
33
34
|
// exact
|
|
34
|
-
|
|
35
|
+
,
|
|
36
|
+
children: children
|
|
37
|
+
});
|
|
35
38
|
};
|
|
36
39
|
var _default = exports["default"] = SuperLink;
|