labsense-ui-kit 1.2.93 → 1.2.95
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.js +124 -101
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +124 -101
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9274,86 +9274,71 @@ var ProgressBar = function ProgressBar(_ref3) {
|
|
|
9274
9274
|
};
|
|
9275
9275
|
|
|
9276
9276
|
var _templateObject$n, _templateObject2$j, _templateObject3$c, _templateObject4$9, _templateObject5$8, _templateObject6$7, _templateObject7$5;
|
|
9277
|
-
var SidebarContainer = styled__default.div(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n width:
|
|
9278
|
-
var $
|
|
9279
|
-
|
|
9280
|
-
}, function (_ref2) {
|
|
9281
|
-
var $isExpanded = _ref2.$isExpanded;
|
|
9282
|
-
return $isExpanded ? '400px' : '68px';
|
|
9283
|
-
}, function (_ref3) {
|
|
9284
|
-
var $background = _ref3.$background,
|
|
9285
|
-
theme = _ref3.theme;
|
|
9277
|
+
var SidebarContainer = styled__default.div(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n width: 68px;\n max-width: 68px;\n height: 100vh;\n background: ", ";\n transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1);\n display: flex;\n flex-direction: column;\n align-items: start;\n padding: 20px;\n position: fixed;\n left: 0;\n top: 0;\n overflow: hidden;\n z-index: 10;\n justify-content: space-between;\n\n /* Expand on hover */\n &:hover {\n width: max-content;\n max-width: 400px;\n\n /* You can also add a class for children */\n span, .expandable {\n opacity: 1;\n visibility: visible;\n transform: translateX(0);\n }\n }\n"])), function (_ref) {
|
|
9278
|
+
var $background = _ref.$background,
|
|
9279
|
+
theme = _ref.theme;
|
|
9286
9280
|
return $background || theme.vms.accent.softBlue;
|
|
9287
9281
|
});
|
|
9288
|
-
var SidebarLink = styled__default(reactRouterDom.NavLink)(_templateObject2$j || (_templateObject2$j = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n height: 28px;\n width: 100%;\n gap: 10px;\n cursor: pointer;\n border-radius: 4px;\n text-decoration: none;\n transition: none;\n padding: ", ";\n color: ", ";\n\n /* Hover state */\n &:hover {\n color: ", ";\n background: ", ";\n \n /* Make icons white on hover */\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n\n /* Active link state */\n &.active {\n color: ", ";\n background: ", ";\n \n /* Make icons white when active */\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n"])), function (
|
|
9289
|
-
var $padding =
|
|
9282
|
+
var SidebarLink = styled__default(reactRouterDom.NavLink)(_templateObject2$j || (_templateObject2$j = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n height: 28px;\n width: 100%;\n gap: 10px;\n cursor: pointer;\n border-radius: 4px;\n text-decoration: none;\n transition: none;\n padding: ", ";\n color: ", ";\n\n /* Hover state */\n &:hover {\n color: ", ";\n background: ", ";\n \n /* Make icons white on hover */\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n\n /* Active link state */\n &.active {\n color: ", ";\n background: ", ";\n \n /* Make icons white when active */\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n"])), function (_ref2) {
|
|
9283
|
+
var $padding = _ref2.$padding;
|
|
9290
9284
|
return $padding;
|
|
9285
|
+
}, function (_ref3) {
|
|
9286
|
+
var theme = _ref3.theme;
|
|
9287
|
+
return theme.vms.text.medium;
|
|
9288
|
+
}, function (_ref4) {
|
|
9289
|
+
var theme = _ref4.theme;
|
|
9290
|
+
return theme.vms.text.white;
|
|
9291
9291
|
}, function (_ref5) {
|
|
9292
9292
|
var theme = _ref5.theme;
|
|
9293
|
-
return theme.vms.
|
|
9293
|
+
return theme.vms["default"].primary;
|
|
9294
9294
|
}, function (_ref6) {
|
|
9295
9295
|
var theme = _ref6.theme;
|
|
9296
9296
|
return theme.vms.text.white;
|
|
9297
9297
|
}, function (_ref7) {
|
|
9298
9298
|
var theme = _ref7.theme;
|
|
9299
|
-
return theme.vms
|
|
9299
|
+
return theme.vms.text.white;
|
|
9300
9300
|
}, function (_ref8) {
|
|
9301
9301
|
var theme = _ref8.theme;
|
|
9302
|
-
return theme.vms.
|
|
9302
|
+
return theme.vms["default"].primary;
|
|
9303
9303
|
}, function (_ref9) {
|
|
9304
9304
|
var theme = _ref9.theme;
|
|
9305
9305
|
return theme.vms.text.white;
|
|
9306
|
-
}, function (_ref10) {
|
|
9307
|
-
var theme = _ref10.theme;
|
|
9308
|
-
return theme.vms["default"].primary;
|
|
9309
|
-
}, function (_ref11) {
|
|
9310
|
-
var theme = _ref11.theme;
|
|
9311
|
-
return theme.vms.text.white;
|
|
9312
9306
|
});
|
|
9313
|
-
var IconWrapper$2 = styled__default.div(_templateObject3$c || (_templateObject3$c = _taggedTemplateLiteralLoose(["\n background: ", ";\n transition: none;\n padding: 4px;\n border-radius: 4px;\n width: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (
|
|
9314
|
-
var $selected =
|
|
9315
|
-
theme =
|
|
9307
|
+
var IconWrapper$2 = styled__default.div(_templateObject3$c || (_templateObject3$c = _taggedTemplateLiteralLoose(["\n background: ", ";\n transition: none;\n padding: 4px;\n border-radius: 4px;\n width: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (_ref10) {
|
|
9308
|
+
var $selected = _ref10.$selected,
|
|
9309
|
+
theme = _ref10.theme;
|
|
9316
9310
|
return $selected ? theme.vms["default"].primary : theme.vms["default"].tertiary;
|
|
9317
9311
|
});
|
|
9318
|
-
var StyledContainer = styled__default(Container)(_templateObject4$9 || (_templateObject4$9 = _taggedTemplateLiteralLoose(["\n transition: none;\n \n &:hover {\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n \n &.active {\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n"])), function (
|
|
9319
|
-
var theme =
|
|
9312
|
+
var StyledContainer = styled__default(Container)(_templateObject4$9 || (_templateObject4$9 = _taggedTemplateLiteralLoose(["\n transition: none;\n \n &:hover {\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n \n &.active {\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n"])), function (_ref11) {
|
|
9313
|
+
var theme = _ref11.theme;
|
|
9320
9314
|
return theme.vms.text.white;
|
|
9321
|
-
}, function (
|
|
9322
|
-
var theme =
|
|
9315
|
+
}, function (_ref12) {
|
|
9316
|
+
var theme = _ref12.theme;
|
|
9323
9317
|
return theme.vms.text.white;
|
|
9324
9318
|
});
|
|
9325
9319
|
var Logo = styled__default.div(_templateObject5$8 || (_templateObject5$8 = _taggedTemplateLiteralLoose(["\n transition: none;\n display: flex;\n width: 100%;\n min-width: max-content;\n height: 32px;\n align-items: center;\n justify-content: center;\n gap: 10px;\n"])));
|
|
9326
|
-
var TextContainer = styled__default.span(_templateObject6$7 || (_templateObject6$7 = _taggedTemplateLiteralLoose(["\n white-space: nowrap;\n padding: ", ";\n font-size: ", ";\n font-weight: ", ";\n
|
|
9327
|
-
var $padding =
|
|
9320
|
+
var TextContainer = styled__default.span(_templateObject6$7 || (_templateObject6$7 = _taggedTemplateLiteralLoose(["\n white-space: nowrap;\n opacity: 0;\n visibility: hidden;\n transform: translateX(-10px);\n transition: all 0.3s ease;\n padding: ", ";\n font-size: ", ";\n font-weight: ", ";\n\n ", ":hover & {\n opacity: 1;\n visibility: visible;\n transform: translateX(0);\n }\n"])), function (_ref13) {
|
|
9321
|
+
var $padding = _ref13.$padding;
|
|
9328
9322
|
return $padding;
|
|
9329
|
-
}, function (
|
|
9330
|
-
var $fontSize =
|
|
9323
|
+
}, function (_ref14) {
|
|
9324
|
+
var $fontSize = _ref14.$fontSize;
|
|
9331
9325
|
return $fontSize || '20px';
|
|
9332
|
-
}, function (
|
|
9333
|
-
var $fontWeight =
|
|
9326
|
+
}, function (_ref15) {
|
|
9327
|
+
var $fontWeight = _ref15.$fontWeight;
|
|
9334
9328
|
return $fontWeight || '500';
|
|
9335
|
-
},
|
|
9336
|
-
|
|
9337
|
-
|
|
9338
|
-
}, function (_ref19) {
|
|
9339
|
-
var $isExpanded = _ref19.$isExpanded;
|
|
9340
|
-
return $isExpanded ? 'visible' : 'hidden';
|
|
9341
|
-
}, function (_ref20) {
|
|
9342
|
-
var $isExpanded = _ref20.$isExpanded;
|
|
9343
|
-
return $isExpanded ? 'translateX(0)' : 'translateX(-10px)';
|
|
9344
|
-
});
|
|
9345
|
-
var NotificationBadge = styled__default.div(_templateObject7$5 || (_templateObject7$5 = _taggedTemplateLiteralLoose(["\n position: ", ";\n top: -4px;\n right: -4px;\n background: red;\n color: white;\n font-size: 10px;\n font-weight: bold;\n border-radius: 50%;\n padding: 2px 5px;\n min-width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (_ref21) {
|
|
9346
|
-
var $position = _ref21.$position;
|
|
9329
|
+
}, SidebarContainer);
|
|
9330
|
+
var NotificationBadge = styled__default.div(_templateObject7$5 || (_templateObject7$5 = _taggedTemplateLiteralLoose(["\n position: ", ";\n top: -4px;\n right: -4px;\n background: red;\n color: white;\n font-size: 10px;\n font-weight: bold;\n border-radius: 50%;\n padding: 2px 5px;\n min-width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (_ref16) {
|
|
9331
|
+
var $position = _ref16.$position;
|
|
9347
9332
|
return $position || 'absolute';
|
|
9348
9333
|
});
|
|
9349
|
-
var Sidebar = function Sidebar(
|
|
9350
|
-
var logo =
|
|
9351
|
-
content =
|
|
9352
|
-
background =
|
|
9353
|
-
ProfileContent =
|
|
9354
|
-
|
|
9355
|
-
isExpanded =
|
|
9356
|
-
setIsExpanded =
|
|
9334
|
+
var Sidebar = function Sidebar(_ref17) {
|
|
9335
|
+
var logo = _ref17.logo,
|
|
9336
|
+
content = _ref17.content,
|
|
9337
|
+
background = _ref17.background,
|
|
9338
|
+
ProfileContent = _ref17.ProfileContent,
|
|
9339
|
+
_ref17$isExpanded = _ref17.isExpanded,
|
|
9340
|
+
isExpanded = _ref17$isExpanded === void 0 ? false : _ref17$isExpanded,
|
|
9341
|
+
setIsExpanded = _ref17.setIsExpanded;
|
|
9357
9342
|
var location = reactRouterDom.useLocation();
|
|
9358
9343
|
var _useState = React.useState({}),
|
|
9359
9344
|
openMenus = _useState[0],
|
|
@@ -9391,9 +9376,8 @@ var Sidebar = function Sidebar(_ref22) {
|
|
|
9391
9376
|
return currentBase === getBasePath(child.activeUrl) || currentBase === getBasePath(child.url);
|
|
9392
9377
|
}));
|
|
9393
9378
|
};
|
|
9394
|
-
var ChildLink = React__default.memo(function (
|
|
9395
|
-
var child =
|
|
9396
|
-
isExpanded = _ref23.isExpanded;
|
|
9379
|
+
var ChildLink = React__default.memo(function (_ref18) {
|
|
9380
|
+
var child = _ref18.child;
|
|
9397
9381
|
var themeColors = styled.useTheme();
|
|
9398
9382
|
var location = reactRouterDom.useLocation();
|
|
9399
9383
|
var active = getBasePath(location.pathname) === getBasePath(child.activeUrl) || getBasePath(location.pathname) === getBasePath(child.url);
|
|
@@ -9421,7 +9405,6 @@ var Sidebar = function Sidebar(_ref22) {
|
|
|
9421
9405
|
"$justifyContent": 'space-between',
|
|
9422
9406
|
"$gap": '5px'
|
|
9423
9407
|
}, React__default.createElement(TextContainer, {
|
|
9424
|
-
"$isExpanded": isExpanded,
|
|
9425
9408
|
"$fontSize": '12px'
|
|
9426
9409
|
}, child.label), _getTotalNotifications(child) > 0 && React__default.createElement(NotificationBadge, {
|
|
9427
9410
|
"$position": 'unset'
|
|
@@ -9440,14 +9423,14 @@ var Sidebar = function Sidebar(_ref22) {
|
|
|
9440
9423
|
});
|
|
9441
9424
|
}));
|
|
9442
9425
|
};
|
|
9443
|
-
var SidebarItem = React__default.memo(function (
|
|
9444
|
-
var item =
|
|
9445
|
-
isActive =
|
|
9446
|
-
isOpen =
|
|
9447
|
-
hasChildren =
|
|
9448
|
-
isExpanded =
|
|
9449
|
-
onToggle =
|
|
9450
|
-
renderChildLinks =
|
|
9426
|
+
var SidebarItem = React__default.memo(function (_ref19) {
|
|
9427
|
+
var item = _ref19.item,
|
|
9428
|
+
isActive = _ref19.isActive,
|
|
9429
|
+
isOpen = _ref19.isOpen,
|
|
9430
|
+
hasChildren = _ref19.hasChildren,
|
|
9431
|
+
isExpanded = _ref19.isExpanded,
|
|
9432
|
+
onToggle = _ref19.onToggle,
|
|
9433
|
+
renderChildLinks = _ref19.renderChildLinks;
|
|
9451
9434
|
var themeColors = styled.useTheme();
|
|
9452
9435
|
var activeClass = isActive ? 'active' : '';
|
|
9453
9436
|
var handleClick = React__default.useCallback(function () {
|
|
@@ -9482,7 +9465,6 @@ var Sidebar = function Sidebar(_ref22) {
|
|
|
9482
9465
|
weight: item.iconWeight,
|
|
9483
9466
|
color: isActive ? themeColors.vms.text.white : themeColors.vms.text.medium
|
|
9484
9467
|
})), _getTotalNotifications(item) > 0 && React__default.createElement(NotificationBadge, null, _getTotalNotifications(item) > 99 ? '99+' : _getTotalNotifications(item))), React__default.createElement(TextContainer, {
|
|
9485
|
-
"$isExpanded": isExpanded,
|
|
9486
9468
|
"$fontSize": '14px'
|
|
9487
9469
|
}, item.label)), hasChildren && React__default.createElement(Container, {
|
|
9488
9470
|
"$padding": '9px',
|
|
@@ -9526,7 +9508,6 @@ var Sidebar = function Sidebar(_ref22) {
|
|
|
9526
9508
|
}, [setIsExpanded]);
|
|
9527
9509
|
return React__default.createElement(SidebarContainer, {
|
|
9528
9510
|
"$background": background,
|
|
9529
|
-
"$isExpanded": isExpanded,
|
|
9530
9511
|
onMouseEnter: function onMouseEnter() {
|
|
9531
9512
|
return handleSidebarExpansion(true);
|
|
9532
9513
|
},
|
|
@@ -9536,14 +9517,12 @@ var Sidebar = function Sidebar(_ref22) {
|
|
|
9536
9517
|
}, React__default.createElement(Container, {
|
|
9537
9518
|
"$flexDirection": 'column',
|
|
9538
9519
|
"$gap": '28px',
|
|
9539
|
-
"$width": '100%'
|
|
9520
|
+
"$width": '100%',
|
|
9521
|
+
"$overflow": 'hidden'
|
|
9540
9522
|
}, logo && (logo.icon ? React__default.createElement(Logo, null, React__default.createElement(Icon, {
|
|
9541
9523
|
icon: logo.icon,
|
|
9542
9524
|
color: logo.iconColor
|
|
9543
|
-
}), React__default.createElement(TextContainer, {
|
|
9544
|
-
"$isExpanded": isExpanded,
|
|
9545
|
-
"$fontWeight": '700'
|
|
9546
|
-
}, logo.name)) : logo.imageDetails && React__default.createElement(Logo, null, React__default.createElement("img", {
|
|
9525
|
+
}), React__default.createElement(TextContainer, null, logo.name)) : logo.imageDetails && React__default.createElement(Logo, null, React__default.createElement("img", {
|
|
9547
9526
|
src: logo.imageDetails.url,
|
|
9548
9527
|
alt: logo.imageDetails.altText,
|
|
9549
9528
|
width: logo.imageDetails.width,
|
|
@@ -9708,41 +9687,44 @@ var TableRow = function TableRow(_ref) {
|
|
|
9708
9687
|
};
|
|
9709
9688
|
|
|
9710
9689
|
var _templateObject$q, _templateObject2$l, _templateObject3$e, _templateObject4$b, _templateObject5$9;
|
|
9711
|
-
var TableContainer = styled__default.div(_templateObject$q || (_templateObject$q = _taggedTemplateLiteralLoose(["\n background: ", ";\n display: flex;\n flex-direction: column;\n border-radius: 8px;\n scrollbar-width: thin;\n flex: 1;\n"])), function (_ref) {
|
|
9690
|
+
var TableContainer = styled__default.div(_templateObject$q || (_templateObject$q = _taggedTemplateLiteralLoose(["\n background: ", ";\n display: flex;\n flex-direction: column;\n border-radius: 8px;\n scrollbar-width: thin;\n flex: 1;\n height: 100%;\n overflow: hidden;\n box-sizing: border-box;\n"])), function (_ref) {
|
|
9712
9691
|
var theme = _ref.theme;
|
|
9713
9692
|
return theme.vms.brand.light;
|
|
9714
9693
|
});
|
|
9715
|
-
var
|
|
9716
|
-
var $
|
|
9717
|
-
theme = _ref2.theme;
|
|
9718
|
-
return $hbcolor || theme.vms["default"].tertiary;
|
|
9719
|
-
}, function (_ref3) {
|
|
9720
|
-
var $tcolor = _ref3.$tcolor,
|
|
9721
|
-
theme = _ref3.theme;
|
|
9722
|
-
return $tcolor || theme.vms.text.white;
|
|
9723
|
-
});
|
|
9724
|
-
var TableData = styled__default.div(_templateObject3$e || (_templateObject3$e = _taggedTemplateLiteralLoose(["\n width: 100%;\n overflow-y: auto;\n scrollbar-width: thin;\n height: 100%;\n max-height: ", ";\n"])), function (_ref4) {
|
|
9725
|
-
var $isLegends = _ref4.$isLegends;
|
|
9694
|
+
var TableData = styled__default.div(_templateObject2$l || (_templateObject2$l = _taggedTemplateLiteralLoose(["\n width: 100%;\n overflow-y: auto;\n scrollbar-width: thin;\n height: 100%;\n max-height: ", ";\n /* Customize scrollbar */\n &::-webkit-scrollbar {\n width: 16px;\n }\n &::-webkit-scrollbar-track {\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.2);\n border-radius: 8px;\n border: 4px solid transparent;\n background-clip: content-box;\n }\n"])), function (_ref2) {
|
|
9695
|
+
var $isLegends = _ref2.$isLegends;
|
|
9726
9696
|
return $isLegends ? 'calc(100% - 56px)' : 'calc(100% - 36px)';
|
|
9727
9697
|
});
|
|
9728
|
-
var LegendDivider = styled__default.div(
|
|
9729
|
-
var theme =
|
|
9698
|
+
var LegendDivider = styled__default.div(_templateObject3$e || (_templateObject3$e = _taggedTemplateLiteralLoose(["\n flex: 1;\n height: 2px;\n background: ", ";\n margin-right: ", ";\n"])), function (_ref3) {
|
|
9699
|
+
var theme = _ref3.theme;
|
|
9730
9700
|
return theme.vms.border.extraLight;
|
|
9731
|
-
}, function (
|
|
9732
|
-
var $marginRight =
|
|
9701
|
+
}, function (_ref4) {
|
|
9702
|
+
var $marginRight = _ref4.$marginRight;
|
|
9733
9703
|
return $marginRight != null ? $marginRight : '0px';
|
|
9734
9704
|
});
|
|
9735
|
-
var Divider = styled__default.div(
|
|
9736
|
-
var theme =
|
|
9705
|
+
var Divider = styled__default.div(_templateObject4$b || (_templateObject4$b = _taggedTemplateLiteralLoose(["\n height: 2px;\n background: ", ";\n"])), function (_ref5) {
|
|
9706
|
+
var theme = _ref5.theme;
|
|
9737
9707
|
return theme.vms.border.extraLight;
|
|
9738
9708
|
});
|
|
9739
|
-
var
|
|
9740
|
-
var
|
|
9741
|
-
|
|
9742
|
-
|
|
9743
|
-
|
|
9744
|
-
|
|
9745
|
-
|
|
9709
|
+
var TableHeaderWithScrollbarAdjustment = styled__default.div(_templateObject5$9 || (_templateObject5$9 = _taggedTemplateLiteralLoose(["\n font-size: 14px;\n display: flex;\n background: ", ";\n color: ", ";\n min-height: 36px;\n align-items: center;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n padding: 9px 12px;\n padding-right: ", ";\n width: 100%;\n box-sizing: border-box;\n"])), function (_ref6) {
|
|
9710
|
+
var $hbcolor = _ref6.$hbcolor,
|
|
9711
|
+
theme = _ref6.theme;
|
|
9712
|
+
return $hbcolor || theme.vms["default"].tertiary;
|
|
9713
|
+
}, function (_ref7) {
|
|
9714
|
+
var $tcolor = _ref7.$tcolor,
|
|
9715
|
+
theme = _ref7.theme;
|
|
9716
|
+
return $tcolor || theme.vms.text.white;
|
|
9717
|
+
}, function (_ref8) {
|
|
9718
|
+
var $hasScrollbar = _ref8.$hasScrollbar;
|
|
9719
|
+
return $hasScrollbar ? '23px' : '12px';
|
|
9720
|
+
});
|
|
9721
|
+
var Table = function Table(_ref9) {
|
|
9722
|
+
var tableObject = _ref9.tableObject,
|
|
9723
|
+
_ref9$filter = _ref9.filter,
|
|
9724
|
+
filter = _ref9$filter === void 0 ? false : _ref9$filter,
|
|
9725
|
+
loading = _ref9.loading,
|
|
9726
|
+
_ref9$noDataText = _ref9.noDataText,
|
|
9727
|
+
noDataText = _ref9$noDataText === void 0 ? 'No Data Found!' : _ref9$noDataText;
|
|
9746
9728
|
var themeColors = useTheme();
|
|
9747
9729
|
var rowconfig = tableObject.rowconfig,
|
|
9748
9730
|
tableheaderconfig = tableObject.tableheaderconfig;
|
|
@@ -9752,6 +9734,10 @@ var Table = function Table(_ref8) {
|
|
|
9752
9734
|
var _useState2 = React.useState(false),
|
|
9753
9735
|
isAllSelected = _useState2[0],
|
|
9754
9736
|
setIsAllSelected = _useState2[1];
|
|
9737
|
+
var _useState3 = React.useState(false),
|
|
9738
|
+
hasScrollbar = _useState3[0],
|
|
9739
|
+
setHasScrollbar = _useState3[1];
|
|
9740
|
+
var tableDataRef = React__default.useRef(null);
|
|
9755
9741
|
var getRole = function getRole(row) {
|
|
9756
9742
|
var _row$rowData, _row$rowData$, _row$rowData$$CustomF, _row$rowData$$CustomF2, _row$rowData2, _row$rowData2$, _row$rowData2$$Custom, _row$rowData2$$Custom2;
|
|
9757
9743
|
return ((_row$rowData = row.rowData) === null || _row$rowData === void 0 ? void 0 : (_row$rowData$ = _row$rowData[1]) === null || _row$rowData$ === void 0 ? void 0 : (_row$rowData$$CustomF = _row$rowData$.CustomFunction) === null || _row$rowData$$CustomF === void 0 ? void 0 : (_row$rowData$$CustomF2 = _row$rowData$$CustomF.props) === null || _row$rowData$$CustomF2 === void 0 ? void 0 : _row$rowData$$CustomF2.text) || ((_row$rowData2 = row.rowData) === null || _row$rowData2 === void 0 ? void 0 : (_row$rowData2$ = _row$rowData2[1]) === null || _row$rowData2$ === void 0 ? void 0 : (_row$rowData2$$Custom = _row$rowData2$.CustomFunction) === null || _row$rowData2$$Custom === void 0 ? void 0 : (_row$rowData2$$Custom2 = _row$rowData2$$Custom.props) === null || _row$rowData2$$Custom2 === void 0 ? void 0 : _row$rowData2$$Custom2.$text) || 'Unassigned';
|
|
@@ -9791,7 +9777,42 @@ var Table = function Table(_ref8) {
|
|
|
9791
9777
|
});
|
|
9792
9778
|
setIsAllSelected(allChecked);
|
|
9793
9779
|
}, [rowconfig]);
|
|
9794
|
-
|
|
9780
|
+
React.useEffect(function () {
|
|
9781
|
+
var checkForScrollbar = function checkForScrollbar() {
|
|
9782
|
+
if (tableDataRef.current) {
|
|
9783
|
+
var hasVerticalScrollbar = tableDataRef.current.scrollHeight > tableDataRef.current.clientHeight;
|
|
9784
|
+
setHasScrollbar(hasVerticalScrollbar);
|
|
9785
|
+
}
|
|
9786
|
+
};
|
|
9787
|
+
checkForScrollbar();
|
|
9788
|
+
window.addEventListener('resize', checkForScrollbar);
|
|
9789
|
+
var timeoutId = setTimeout(checkForScrollbar, 100);
|
|
9790
|
+
return function () {
|
|
9791
|
+
window.removeEventListener('resize', checkForScrollbar);
|
|
9792
|
+
clearTimeout(timeoutId);
|
|
9793
|
+
};
|
|
9794
|
+
}, [rowconfig, filter, loading]);
|
|
9795
|
+
React.useEffect(function () {
|
|
9796
|
+
if (!tableDataRef.current) return;
|
|
9797
|
+
var checkForScrollbar = function checkForScrollbar() {
|
|
9798
|
+
if (tableDataRef.current) {
|
|
9799
|
+
var hasVerticalScrollbar = tableDataRef.current.scrollHeight > tableDataRef.current.clientHeight;
|
|
9800
|
+
setHasScrollbar(hasVerticalScrollbar);
|
|
9801
|
+
}
|
|
9802
|
+
};
|
|
9803
|
+
var handleScroll = function handleScroll() {
|
|
9804
|
+
checkForScrollbar();
|
|
9805
|
+
};
|
|
9806
|
+
tableDataRef.current.addEventListener('scroll', handleScroll);
|
|
9807
|
+
var intervalId = setInterval(checkForScrollbar, 1000);
|
|
9808
|
+
return function () {
|
|
9809
|
+
var _tableDataRef$current;
|
|
9810
|
+
clearInterval(intervalId);
|
|
9811
|
+
(_tableDataRef$current = tableDataRef.current) === null || _tableDataRef$current === void 0 ? void 0 : _tableDataRef$current.removeEventListener('scroll', handleScroll);
|
|
9812
|
+
};
|
|
9813
|
+
}, []);
|
|
9814
|
+
return React__default.createElement(TableContainer, null, React__default.createElement(TableHeaderWithScrollbarAdjustment, {
|
|
9815
|
+
"$hasScrollbar": hasScrollbar,
|
|
9795
9816
|
"$hbcolor": tableheaderconfig.headercolor,
|
|
9796
9817
|
"$tcolor": tableheaderconfig.textcolor
|
|
9797
9818
|
}, tableheaderconfig.isAllSelectable && React__default.createElement(Container, {
|
|
@@ -9854,12 +9875,13 @@ var Table = function Table(_ref8) {
|
|
|
9854
9875
|
"$padding": '24px 24px',
|
|
9855
9876
|
"$justifyContent": 'center'
|
|
9856
9877
|
}, React__default.createElement(Span, null, noDataText)) : filter ? React__default.createElement(TableData, {
|
|
9878
|
+
ref: tableDataRef,
|
|
9857
9879
|
"$isLegends": tableheaderconfig.headerdata.some(function (col) {
|
|
9858
9880
|
return !!col.groupTitle;
|
|
9859
9881
|
})
|
|
9860
|
-
}, Object.entries(roleGroups).map(function (
|
|
9861
|
-
var role =
|
|
9862
|
-
rows =
|
|
9882
|
+
}, Object.entries(roleGroups).map(function (_ref10) {
|
|
9883
|
+
var role = _ref10[0],
|
|
9884
|
+
rows = _ref10[1];
|
|
9863
9885
|
return React__default.createElement(React__default.Fragment, {
|
|
9864
9886
|
key: role
|
|
9865
9887
|
}, React__default.createElement(Container, {
|
|
@@ -9891,6 +9913,7 @@ var Table = function Table(_ref8) {
|
|
|
9891
9913
|
}), rows.length > 1 && index < rows.length - 1 && React__default.createElement(Divider, null));
|
|
9892
9914
|
}));
|
|
9893
9915
|
})) : React__default.createElement(TableData, {
|
|
9916
|
+
ref: tableDataRef,
|
|
9894
9917
|
"$isLegends": tableheaderconfig.headerdata.some(function (col) {
|
|
9895
9918
|
return !!col.groupTitle;
|
|
9896
9919
|
})
|