linear-react-components-ui 0.4.76-beta.13 → 0.4.76-beta.18
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.
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
@import 'colors.scss';
|
|
2
|
-
|
|
3
|
-
$panel-header-height: 40px;
|
|
4
2
|
.panel-component {
|
|
5
3
|
font-family: 'Roboto';
|
|
6
4
|
border: 0;
|
|
@@ -8,8 +6,6 @@ $panel-header-height: 40px;
|
|
|
8
6
|
height: 100%;
|
|
9
7
|
margin-bottom: 20px;
|
|
10
8
|
border: solid 1px $component-border-color;
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
9
|
&.panel-shadow {
|
|
14
10
|
box-shadow: 0 2px 5px 0 rgba(0,0,0,.16), 0 2px 10px 0 rgba(0,0,0,.12);
|
|
15
11
|
}
|
|
@@ -51,7 +47,7 @@ $panel-header-height: 40px;
|
|
|
51
47
|
}
|
|
52
48
|
}
|
|
53
49
|
> .panel-content {
|
|
54
|
-
height:
|
|
50
|
+
height: auto;
|
|
55
51
|
padding: 15px;
|
|
56
52
|
}
|
|
57
53
|
}
|
|
@@ -45,6 +45,8 @@
|
|
|
45
45
|
display: flex;
|
|
46
46
|
justify-content: flex-start;
|
|
47
47
|
align-items: center;
|
|
48
|
+
min-height: 25px;
|
|
49
|
+
color: $font-color-soft;
|
|
48
50
|
>.node-menu {
|
|
49
51
|
animation: revealelement 0.3s forwards ease-in-out;
|
|
50
52
|
margin-left: 10px;
|
|
@@ -62,7 +64,9 @@
|
|
|
62
64
|
margin-left: 10px;
|
|
63
65
|
}
|
|
64
66
|
&:hover {
|
|
67
|
+
cursor: pointer;
|
|
65
68
|
background-color: rgb(209, 209, 209);
|
|
69
|
+
text-decoration: underline;
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
72
|
> .nodelist {
|
package/lib/panel/Content.js
CHANGED
|
@@ -21,15 +21,12 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
23
|
|
|
24
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
|
-
|
|
26
24
|
var observer = null;
|
|
27
25
|
|
|
28
26
|
var PanelContent = function PanelContent(props) {
|
|
29
27
|
var customClass = props.customClass,
|
|
30
28
|
children = props.children,
|
|
31
|
-
style = props.style
|
|
32
|
-
overflow = props.overflow;
|
|
29
|
+
style = props.style;
|
|
33
30
|
|
|
34
31
|
var _useContext = (0, _react.useContext)(_helpers["default"]),
|
|
35
32
|
opened = _useContext.opened,
|
|
@@ -74,9 +71,7 @@ var PanelContent = function PanelContent(props) {
|
|
|
74
71
|
return hideContent ? /*#__PURE__*/_react["default"].createElement(_noPermission["default"], null) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
75
72
|
ref: rootElementRef,
|
|
76
73
|
className: "panel-content ".concat(customClass),
|
|
77
|
-
style:
|
|
78
|
-
overflow: overflow
|
|
79
|
-
})
|
|
74
|
+
style: style
|
|
80
75
|
}, opened && children, onEndReached ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
81
76
|
ref: observedElement
|
|
82
77
|
}) : /*#__PURE__*/_react["default"].createElement("noscript", null));
|
|
@@ -85,14 +80,12 @@ var PanelContent = function PanelContent(props) {
|
|
|
85
80
|
PanelContent.propTypes = {
|
|
86
81
|
children: _propTypes["default"].any,
|
|
87
82
|
customClass: _propTypes["default"].string,
|
|
88
|
-
style: _propTypes["default"].object
|
|
89
|
-
overflow: _propTypes["default"].oneOf(['visible', 'hidden', 'scroll', 'auto'])
|
|
83
|
+
style: _propTypes["default"].object
|
|
90
84
|
};
|
|
91
85
|
PanelContent.defaultProps = {
|
|
92
86
|
customClass: '',
|
|
93
87
|
style: {},
|
|
94
|
-
children: null
|
|
95
|
-
overflow: 'auto'
|
|
88
|
+
children: null
|
|
96
89
|
};
|
|
97
90
|
var _default = PanelContent;
|
|
98
91
|
exports["default"] = _default;
|
package/lib/treeview/Node.js
CHANGED
|
@@ -27,6 +27,8 @@ var _list = _interopRequireWildcard(require("../list"));
|
|
|
27
27
|
|
|
28
28
|
var _toolbar = _interopRequireWildcard(require("../toolbar"));
|
|
29
29
|
|
|
30
|
+
var _SpinnerLoading = _interopRequireDefault(require("../spinner/SpinnerLoading"));
|
|
31
|
+
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
33
|
|
|
32
34
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -155,6 +157,9 @@ var TreeNode = /*#__PURE__*/function (_Component) {
|
|
|
155
157
|
className: "treeviewitem"
|
|
156
158
|
}, _this2.getSpan(), /*#__PURE__*/_react["default"].createElement("div", {
|
|
157
159
|
className: "label",
|
|
160
|
+
style: !onNodeClick ? {
|
|
161
|
+
textDecoration: 'none'
|
|
162
|
+
} : null,
|
|
158
163
|
ref: _this2.labelRef,
|
|
159
164
|
role: "button",
|
|
160
165
|
onKeyPress: null,
|
|
@@ -240,8 +245,11 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
240
245
|
enumerable: true,
|
|
241
246
|
writable: true,
|
|
242
247
|
value: function value() {
|
|
243
|
-
var
|
|
248
|
+
var _this3$props = _this3.props,
|
|
249
|
+
alwaysShowArrow = _this3$props.alwaysShowArrow,
|
|
250
|
+
idsInLoading = _this3$props.idsInLoading;
|
|
244
251
|
var node = _this3.state.node;
|
|
252
|
+
var isLoading = idsInLoading.includes(node.id);
|
|
245
253
|
|
|
246
254
|
var span = /*#__PURE__*/_react["default"].createElement("noscript", null);
|
|
247
255
|
|
|
@@ -250,11 +258,17 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
250
258
|
onKeyPress: null,
|
|
251
259
|
tabIndex: 0,
|
|
252
260
|
role: "button",
|
|
261
|
+
style: isLoading ? {
|
|
262
|
+
marginLeft: '-30px',
|
|
263
|
+
marginTop: '-5px'
|
|
264
|
+
} : null,
|
|
253
265
|
className: "opencloseicon",
|
|
254
266
|
onClick: function onClick() {
|
|
255
267
|
return _this3.openCloseTree(node);
|
|
256
268
|
}
|
|
257
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
269
|
+
}, isLoading ? /*#__PURE__*/_react["default"].createElement(_SpinnerLoading["default"], {
|
|
270
|
+
size: "35px"
|
|
271
|
+
}) : /*#__PURE__*/_react["default"].createElement(_icons["default"], {
|
|
258
272
|
name: _this3.state.isVisible ? 'up' : 'down',
|
|
259
273
|
size: 10
|
|
260
274
|
}));
|
|
@@ -431,7 +445,8 @@ TreeNode.propTypes = {
|
|
|
431
445
|
onNodeClick: _propTypes["default"].func,
|
|
432
446
|
handlerOnNodeOpen: _propTypes["default"].func,
|
|
433
447
|
nodeElementsValidations: _propTypes["default"].object,
|
|
434
|
-
startNodesOpened: _propTypes["default"].bool.isRequired
|
|
448
|
+
startNodesOpened: _propTypes["default"].bool.isRequired,
|
|
449
|
+
idsInLoading: _propTypes["default"].arrayOf(_propTypes["default"].number)
|
|
435
450
|
};
|
|
436
451
|
TreeNode.defaultProps = {
|
|
437
452
|
childrenIds: [],
|
|
@@ -444,7 +459,8 @@ TreeNode.defaultProps = {
|
|
|
444
459
|
nodeMenuButtonSize: 'small',
|
|
445
460
|
onNodeClick: undefined,
|
|
446
461
|
handlerOnNodeOpen: undefined,
|
|
447
|
-
nodeElementsValidations: undefined
|
|
462
|
+
nodeElementsValidations: undefined,
|
|
463
|
+
idsInLoading: []
|
|
448
464
|
};
|
|
449
465
|
TreeNode.contextType = _constants.TreeviewContext;
|
|
450
466
|
var _default = TreeNode;
|
package/lib/treeview/index.js
CHANGED
|
@@ -463,7 +463,8 @@ var TreeView = /*#__PURE__*/function (_Component) {
|
|
|
463
463
|
nodeToolbarElements = _this$props3.nodeToolbarElements,
|
|
464
464
|
nodeMenuButtonSize = _this$props3.nodeMenuButtonSize,
|
|
465
465
|
alwaysShowArrow = _this$props3.alwaysShowArrow,
|
|
466
|
-
startNodesOpened = _this$props3.startNodesOpened
|
|
466
|
+
startNodesOpened = _this$props3.startNodesOpened,
|
|
467
|
+
idsInLoading = _this$props3.idsInLoading;
|
|
467
468
|
var childrenIds = [];
|
|
468
469
|
|
|
469
470
|
if (node.itens && node.itens.length > 0) {
|
|
@@ -481,6 +482,7 @@ var TreeView = /*#__PURE__*/function (_Component) {
|
|
|
481
482
|
return /*#__PURE__*/_react["default"].createElement(_Node["default"], {
|
|
482
483
|
key: "node-".concat(node.id),
|
|
483
484
|
node: node,
|
|
485
|
+
idsInLoading: idsInLoading,
|
|
484
486
|
startNodesOpened: startNodesOpened,
|
|
485
487
|
alwaysShowArrow: alwaysShowArrow,
|
|
486
488
|
childrenIds: childrenIds,
|
|
@@ -596,7 +598,8 @@ TreeView.propTypes = {
|
|
|
596
598
|
onNodeClick: _propTypes["default"].func,
|
|
597
599
|
onNodeOpen: _propTypes["default"].func,
|
|
598
600
|
nodeElementsValidations: _propTypes["default"].object,
|
|
599
|
-
enableDynamicData: _propTypes["default"].bool
|
|
601
|
+
enableDynamicData: _propTypes["default"].bool,
|
|
602
|
+
idsInLoading: _propTypes["default"].arrayOf(_propTypes["default"].number)
|
|
600
603
|
};
|
|
601
604
|
TreeView.defaultProps = {
|
|
602
605
|
customClass: '',
|
|
@@ -618,7 +621,8 @@ TreeView.defaultProps = {
|
|
|
618
621
|
onNodeClick: undefined,
|
|
619
622
|
onNodeOpen: undefined,
|
|
620
623
|
nodeElementsValidations: undefined,
|
|
621
|
-
enableDynamicData: false
|
|
624
|
+
enableDynamicData: false,
|
|
625
|
+
idsInLoading: []
|
|
622
626
|
};
|
|
623
627
|
var _default = TreeView;
|
|
624
628
|
exports["default"] = _default;
|