@vitrosoftware/common-ui-ts 1.1.88 → 1.1.89
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/css/std/controls/main/main.css +1 -1
- package/css/std/controls/sidebar/img/bottom-menu-button-next.svg +3 -0
- package/css/std/controls/sidebar/sidebar-item.css +19 -8
- package/css/std/controls/sidebar/sidebar.css +80 -25
- package/dist/index.css +101 -34
- package/dist/index.js +104 -42
- package/dist/index.js.map +1 -1
- package/dist/src/controls/Sidebar/GroupItem.d.ts +1 -0
- package/dist/src/controls/Sidebar/Item.d.ts +2 -0
- package/dist/src/controls/Sidebar/Section.d.ts +1 -0
- package/dist/src/controls/Sidebar/SectionList.d.ts +1 -0
- package/dist/src/controls/Sidebar/Sidebar.d.ts +2 -0
- package/dist/src/controls/Tooltip/Tooltip.d.ts +1 -2
- package/package.json +1 -1
- package/src/controls/BimViewer/js/bim-viewer.js +2 -2
- package/src/controls/PdfViewer/js/pdf-viewer.js +1 -1
- package/css/std/controls/sidebar/img/bottom-menu-button-more.svg +0 -5
package/dist/index.js
CHANGED
|
@@ -61472,6 +61472,9 @@ var TooltipConstants = {
|
|
|
61472
61472
|
var styles$n = {"vitro-tooltip":"_tooltip_vitro-tooltip_JvGPShz"};
|
|
61473
61473
|
|
|
61474
61474
|
var Tooltip$1 = function Tooltip(props) {
|
|
61475
|
+
if (!props.text) {
|
|
61476
|
+
return props.children;
|
|
61477
|
+
}
|
|
61475
61478
|
return React__default.createElement(OverlayTrigger, {
|
|
61476
61479
|
placement: props.placement || PLACEMENT$1.TOP,
|
|
61477
61480
|
delay: {
|
|
@@ -61669,7 +61672,7 @@ var Viewer = function Viewer(props) {
|
|
|
61669
61672
|
};
|
|
61670
61673
|
|
|
61671
61674
|
var name = "@vitrosoftware/common-ui-ts";
|
|
61672
|
-
var version$1 = "1.1.
|
|
61675
|
+
var version$1 = "1.1.89";
|
|
61673
61676
|
var description = "vitro software common ui ts";
|
|
61674
61677
|
var author = "";
|
|
61675
61678
|
var license = "MIT";
|
|
@@ -63087,17 +63090,39 @@ var CommandMenuDropdownButton = function CommandMenuDropdownButton(props) {
|
|
|
63087
63090
|
}), props.children));
|
|
63088
63091
|
};
|
|
63089
63092
|
|
|
63090
|
-
var styles$z = {"vitro-item":"_sidebar-item_vitro-item_1BR_7F0","vitro-image":"_sidebar-item_vitro-image_2A82YI0","vitro-
|
|
63093
|
+
var styles$z = {"vitro-item":"_sidebar-item_vitro-item_1BR_7F0","vitro-image":"_sidebar-item_vitro-image_2A82YI0","vitro-item-text":"_sidebar-item_vitro-item-text_1kK_aIZ","vitro-active":"_sidebar-item_vitro-active_7p5iOhY","vitro-hover":"_sidebar-item_vitro-hover_1mECzme","vitro-group-item":"_sidebar-item_vitro-group-item_ZADCctV","vitro-item-list":"_sidebar-item_vitro-item-list_17dWov1","vitro-expanded":"_sidebar-item_vitro-expanded_3qb1vOx","vitro-collapsed":"_sidebar-item_vitro-collapsed_2EhVmXL","vitro-display-none":"_sidebar-item_vitro-display-none_2WwKi5v","vitro-popup-container":"_sidebar-item_vitro-popup-container_2X7SVxe","vitro-scrollbar":"_sidebar-item_vitro-scrollbar___xylIx","vitro-popup-item-list":"_sidebar-item_vitro-popup-item-list_JUwcoZB","vitro-button-close":"_sidebar-item_vitro-button-close_2Kdf-ob"};
|
|
63091
63094
|
|
|
63092
63095
|
var Item$2 = function Item(props) {
|
|
63093
|
-
|
|
63096
|
+
var _useState = React.useState(false),
|
|
63097
|
+
isShowTooltip = _useState[0],
|
|
63098
|
+
setIsShowTooltip = _useState[1];
|
|
63099
|
+
var textRef = React.useRef(null);
|
|
63100
|
+
React.useEffect(function () {
|
|
63101
|
+
var isOverflow = textRef.current && textRef.current.offsetWidth < textRef.current.scrollWidth;
|
|
63102
|
+
if (!props.isMobileView && (!props.isSidebarExpanded || isOverflow)) {
|
|
63103
|
+
setIsShowTooltip(true);
|
|
63104
|
+
} else {
|
|
63105
|
+
setIsShowTooltip(false);
|
|
63106
|
+
}
|
|
63107
|
+
}, [props.isSidebarExpanded]);
|
|
63108
|
+
return React__default.createElement(Tooltip$1, {
|
|
63109
|
+
text: props.text || CTRL.EMPTY,
|
|
63110
|
+
placement: PLACEMENT$1.RIGHT,
|
|
63111
|
+
isShow: isShowTooltip ? undefined : false
|
|
63112
|
+
}, React__default.createElement("div", {
|
|
63113
|
+
className: props.className,
|
|
63114
|
+
style: props.width ? {
|
|
63115
|
+
minWidth: props.width + UNIT.PX
|
|
63116
|
+
} : {}
|
|
63117
|
+
}, React__default.createElement("div", null, props.imageUrl && React__default.createElement(Image, {
|
|
63094
63118
|
defaultUrl: props.imageUrl,
|
|
63095
63119
|
hoverUrl: props.imageHoverUrl,
|
|
63096
63120
|
isHover: props.isHover,
|
|
63097
63121
|
className: styles$z['vitro-image']
|
|
63098
63122
|
})), React__default.createElement("span", {
|
|
63123
|
+
ref: textRef,
|
|
63099
63124
|
className: styles$z['vitro-item-text'] + (!(props.isSidebarExpanded || props.isMobileView) ? CTRL.SPACE + styles$z['vitro-display-none'] : CTRL.EMPTY)
|
|
63100
|
-
}, props.text));
|
|
63125
|
+
}, props.text)));
|
|
63101
63126
|
};
|
|
63102
63127
|
|
|
63103
63128
|
var MODE;
|
|
@@ -63117,7 +63142,7 @@ var LinkItem$1 = function LinkItem(props) {
|
|
|
63117
63142
|
var _useState = React.useState(false),
|
|
63118
63143
|
isHover = _useState[0],
|
|
63119
63144
|
setIsHover = _useState[1];
|
|
63120
|
-
var isActive = !!props.link && (props.link === props.currentUrl || props.activeItem === props.id || props.altUrlList && props.altUrlList.includes(props.currentUrl));
|
|
63145
|
+
var isActive = !!props.link && (props.link === props.currentUrl && (!props.activeItem || props.activeItem === props.id) || props.altUrlList && props.altUrlList.includes(props.currentUrl));
|
|
63121
63146
|
var className = isActive ? styles$z['vitro-active'] : isHover ? styles$z['vitro-hover'] : CTRL.EMPTY;
|
|
63122
63147
|
var onClick = function onClick(e) {
|
|
63123
63148
|
if (props.onClick) {
|
|
@@ -63199,13 +63224,21 @@ var GroupItem = function GroupItem(props) {
|
|
|
63199
63224
|
React.useEffect(function () {
|
|
63200
63225
|
updateState();
|
|
63201
63226
|
}, [props.isSidebarExpanded, props.activeItem, props.currentUrl, isExpanded]);
|
|
63227
|
+
React.useEffect(function () {
|
|
63228
|
+
if (props.isMobileView && props.activeItem !== props.id) {
|
|
63229
|
+
setIsExpanded(false);
|
|
63230
|
+
setIsActive(false);
|
|
63231
|
+
}
|
|
63232
|
+
}, [props.activeItem]);
|
|
63202
63233
|
React.useEffect(function () {
|
|
63203
63234
|
if (props.isMobileView) {
|
|
63204
63235
|
setIsExpanded(false);
|
|
63205
63236
|
}
|
|
63206
63237
|
}, [props.currentUrl]);
|
|
63207
|
-
var className = isActive ? styles$z['vitro-active'] : isHover ? styles$z['vitro-hover'] : CTRL.EMPTY;
|
|
63208
63238
|
var onClick = function onClick(e) {
|
|
63239
|
+
if (props.isMobileView && !getIsActiveChildItem()) {
|
|
63240
|
+
props.setActiveItem(!isExpanded ? props.id : CTRL.EMPTY);
|
|
63241
|
+
}
|
|
63209
63242
|
setIsExpanded(!isExpanded);
|
|
63210
63243
|
};
|
|
63211
63244
|
var getIsActiveChildItem = function getIsActiveChildItem() {
|
|
@@ -63232,7 +63265,7 @@ var GroupItem = function GroupItem(props) {
|
|
|
63232
63265
|
setIsHover(false);
|
|
63233
63266
|
}
|
|
63234
63267
|
} else {
|
|
63235
|
-
if (isActiveChildItem) {
|
|
63268
|
+
if (isActiveChildItem || props.isMobileView && isExpanded) {
|
|
63236
63269
|
setIsActive(true);
|
|
63237
63270
|
} else {
|
|
63238
63271
|
setIsActive(false);
|
|
@@ -63254,7 +63287,7 @@ var GroupItem = function GroupItem(props) {
|
|
|
63254
63287
|
end: e.changedTouches[0].clientY
|
|
63255
63288
|
}));
|
|
63256
63289
|
if (swipePosition.start < e.changedTouches[0].clientY) {
|
|
63257
|
-
|
|
63290
|
+
closePopupMenu();
|
|
63258
63291
|
}
|
|
63259
63292
|
};
|
|
63260
63293
|
var onTouchMove = function onTouchMove(e) {
|
|
@@ -63264,6 +63297,11 @@ var GroupItem = function GroupItem(props) {
|
|
|
63264
63297
|
itemListRef.current.style.height = height + UNIT.PX;
|
|
63265
63298
|
}
|
|
63266
63299
|
};
|
|
63300
|
+
var closePopupMenu = function closePopupMenu() {
|
|
63301
|
+
setIsExpanded(false);
|
|
63302
|
+
props.setActiveItem(CTRL.EMPTY);
|
|
63303
|
+
};
|
|
63304
|
+
var className = isActive ? styles$z['vitro-active'] : isHover ? styles$z['vitro-hover'] : CTRL.EMPTY;
|
|
63267
63305
|
var content = React__default.createElement(React__default.Fragment, null, props.itemList && props.itemList.map(function (i) {
|
|
63268
63306
|
return i.link || i.onClick ? React__default.createElement(LinkItem$1, Object.assign({
|
|
63269
63307
|
link: i.link,
|
|
@@ -63273,18 +63311,17 @@ var GroupItem = function GroupItem(props) {
|
|
|
63273
63311
|
currentUrl: props.currentUrl,
|
|
63274
63312
|
isSidebarExpanded: props.isSidebarExpanded,
|
|
63275
63313
|
isMobileView: props.isMobileView
|
|
63276
|
-
}, i)) : i.itemList ? React__default.createElement(GroupItem, {
|
|
63314
|
+
}, i)) : i.itemList ? React__default.createElement(GroupItem, Object.assign({
|
|
63277
63315
|
isSidebarExpanded: props.isSidebarExpanded,
|
|
63278
|
-
id: i.id,
|
|
63279
|
-
text: i.text,
|
|
63280
63316
|
link: i.link,
|
|
63281
63317
|
itemList: i.itemList,
|
|
63282
63318
|
linkItemWidth: props.linkItemWidth,
|
|
63283
63319
|
activeItem: props.activeItem,
|
|
63320
|
+
setActiveItem: props.setActiveItem,
|
|
63284
63321
|
key: i.text,
|
|
63285
63322
|
currentUrl: props.currentUrl,
|
|
63286
63323
|
isMobileView: props.isMobileView
|
|
63287
|
-
}) : null;
|
|
63324
|
+
}, i)) : null;
|
|
63288
63325
|
}));
|
|
63289
63326
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement("li", {
|
|
63290
63327
|
style: {
|
|
@@ -63308,7 +63345,7 @@ var GroupItem = function GroupItem(props) {
|
|
|
63308
63345
|
className: className
|
|
63309
63346
|
}, React__default.createElement(Item$2, Object.assign({}, props, {
|
|
63310
63347
|
isHover: isHover || isActive
|
|
63311
|
-
})), props.isSidebarExpanded && React__default.createElement("span", {
|
|
63348
|
+
})), props.isSidebarExpanded && !props.isMobileView && React__default.createElement("span", {
|
|
63312
63349
|
className: isExpanded ? styles$z['vitro-expanded'] : styles$z['vitro-collapsed']
|
|
63313
63350
|
})), props.isMobileView ? React__default.createElement(Overlay$1, {
|
|
63314
63351
|
show: isExpanded,
|
|
@@ -63326,7 +63363,7 @@ var GroupItem = function GroupItem(props) {
|
|
|
63326
63363
|
onTouchEnd: onTouchEnd,
|
|
63327
63364
|
onTouchMove: onTouchMove,
|
|
63328
63365
|
onClick: function onClick() {
|
|
63329
|
-
return
|
|
63366
|
+
return closePopupMenu();
|
|
63330
63367
|
}
|
|
63331
63368
|
}), React__default.createElement(ScrollBar, {
|
|
63332
63369
|
className: styles$z['vitro-scrollbar']
|
|
@@ -63345,21 +63382,20 @@ var Section = function Section(props) {
|
|
|
63345
63382
|
currentUrl: props.currentUrl,
|
|
63346
63383
|
isSidebarExpanded: props.isExpanded,
|
|
63347
63384
|
isMobileView: props.isMobileView
|
|
63348
|
-
}, i)) : i.itemList ? React__default.createElement(GroupItem, {
|
|
63385
|
+
}, i)) : i.itemList ? React__default.createElement(GroupItem, Object.assign({
|
|
63349
63386
|
isSidebarExpanded: props.isExpanded,
|
|
63350
|
-
id: i.id,
|
|
63351
|
-
text: i.text,
|
|
63352
63387
|
itemList: i.itemList,
|
|
63353
63388
|
linkItemWidth: props.linkItemWidth,
|
|
63354
63389
|
activeItem: props.activeItem,
|
|
63390
|
+
setActiveItem: props.setActiveItem,
|
|
63355
63391
|
key: i.text,
|
|
63356
63392
|
currentUrl: props.currentUrl,
|
|
63357
63393
|
isMobileView: props.isMobileView
|
|
63358
|
-
}) : React__default.createElement("div", null);
|
|
63394
|
+
}, i)) : React__default.createElement("div", null);
|
|
63359
63395
|
})));
|
|
63360
63396
|
};
|
|
63361
63397
|
|
|
63362
|
-
var styles$A = {"vitro-sidebar":"_sidebar_vitro-sidebar_1IxGYiU","vitro-scrollbar":"_sidebar_vitro-scrollbar_2PtQGQD","vitro-sidebar-section-list":"_sidebar_vitro-sidebar-section-list_1nGto5m","vitro-scroll-container":"_sidebar_vitro-scroll-container_3K-iJy8","vitro-button-more":"_sidebar_vitro-button-more_3s9oZY9"};
|
|
63398
|
+
var styles$A = {"vitro-sidebar":"_sidebar_vitro-sidebar_1IxGYiU","vitro-scrollbar":"_sidebar_vitro-scrollbar_2PtQGQD","vitro-sidebar-section-list":"_sidebar_vitro-sidebar-section-list_1nGto5m","vitro-scroll-container":"_sidebar_vitro-scroll-container_3K-iJy8","vitro-button-more":"_sidebar_vitro-button-more_3s9oZY9","vitro-logo-container":"_sidebar_vitro-logo-container_31O5Ly-","vitro-logo":"_sidebar_vitro-logo_1qxi8L_","vitro-scroll-content":"_sidebar_vitro-scroll-content_2RUBhZd"};
|
|
63363
63399
|
|
|
63364
63400
|
var SectionList = React.forwardRef(function (props, ref) {
|
|
63365
63401
|
if (!props.itemList || props.itemList.length === 0) {
|
|
@@ -63375,7 +63411,8 @@ var SectionList = React.forwardRef(function (props, ref) {
|
|
|
63375
63411
|
currentUrl: props.currentUrl,
|
|
63376
63412
|
activeItem: props.activeItem,
|
|
63377
63413
|
isMobileView: props.isMobileView,
|
|
63378
|
-
container: props.container
|
|
63414
|
+
container: props.container,
|
|
63415
|
+
setActiveItem: props.setActiveItem
|
|
63379
63416
|
}, section));
|
|
63380
63417
|
}));
|
|
63381
63418
|
});
|
|
@@ -63396,22 +63433,26 @@ var Sidebar = function Sidebar(props) {
|
|
|
63396
63433
|
var _useState5 = React.useState(0),
|
|
63397
63434
|
linkItemWidth = _useState5[0],
|
|
63398
63435
|
setLinkItemWidth = _useState5[1];
|
|
63436
|
+
var _useState6 = React.useState(props.activeItem || CTRL.EMPTY),
|
|
63437
|
+
activeItem = _useState6[0],
|
|
63438
|
+
setActiveItem = _useState6[1];
|
|
63399
63439
|
var menuRef = React.useRef(null);
|
|
63400
|
-
var
|
|
63440
|
+
var scrollContentRef = React.useRef(null);
|
|
63401
63441
|
var handleHistoryChanged = function handleHistoryChanged(e) {
|
|
63402
63442
|
setCurrentUrl(e.detail.pathname);
|
|
63443
|
+
setActiveItem(CTRL.EMPTY);
|
|
63403
63444
|
};
|
|
63404
63445
|
React.useEffect(function () {
|
|
63405
63446
|
if (props.sidebar === MODE.TOGGLED_HOVERED && props.overflowItemList && props.overflowItemList.length > 0) {
|
|
63406
63447
|
setItemList([].concat(props.topItemList, props.overflowItemList));
|
|
63407
63448
|
} else if (isMobileView) {
|
|
63408
|
-
var list =
|
|
63449
|
+
var list = [].concat(props.topItemList, props.bottomItemList ? props.bottomItemList : []);
|
|
63409
63450
|
setItemList(list);
|
|
63410
63451
|
handleResize();
|
|
63411
63452
|
} else {
|
|
63412
63453
|
setItemList(props.topItemList);
|
|
63413
63454
|
}
|
|
63414
|
-
}, [props.sidebar, isMobileView]);
|
|
63455
|
+
}, [props.sidebar, props.topItemList, props.bottomItemList, isMobileView]);
|
|
63415
63456
|
React.useEffect(function () {
|
|
63416
63457
|
window.addEventListener(exports.EVENT.RESIZE, handleResize);
|
|
63417
63458
|
window.addEventListener(exports.EVENT.HISTORY_CHANGED, handleHistoryChanged);
|
|
@@ -63420,6 +63461,9 @@ var Sidebar = function Sidebar(props) {
|
|
|
63420
63461
|
window.removeEventListener(exports.EVENT.HISTORY_CHANGED, handleHistoryChanged);
|
|
63421
63462
|
};
|
|
63422
63463
|
}, []);
|
|
63464
|
+
React.useEffect(function () {
|
|
63465
|
+
setActiveItem(props.activeItem);
|
|
63466
|
+
}, [props.activeItem]);
|
|
63423
63467
|
React.useEffect(function () {
|
|
63424
63468
|
handleResize();
|
|
63425
63469
|
}, [window.innerWidth]);
|
|
@@ -63433,8 +63477,8 @@ var Sidebar = function Sidebar(props) {
|
|
|
63433
63477
|
};
|
|
63434
63478
|
var scroll = function scroll() {
|
|
63435
63479
|
var container = menuRef.current;
|
|
63436
|
-
var
|
|
63437
|
-
if (container &&
|
|
63480
|
+
var scrollContent = scrollContentRef.current;
|
|
63481
|
+
if (container && scrollContent) {
|
|
63438
63482
|
var info = container.getBoundingClientRect();
|
|
63439
63483
|
var width = info.right - info.left;
|
|
63440
63484
|
var translateValue = translate;
|
|
@@ -63444,7 +63488,7 @@ var Sidebar = function Sidebar(props) {
|
|
|
63444
63488
|
translateValue += width;
|
|
63445
63489
|
}
|
|
63446
63490
|
setTranslate(translateValue);
|
|
63447
|
-
|
|
63491
|
+
scrollContent.style.transform = "translate(-" + translateValue + "px)";
|
|
63448
63492
|
}
|
|
63449
63493
|
};
|
|
63450
63494
|
var updateLinkItemWidth = function updateLinkItemWidth(containerWidth) {
|
|
@@ -63457,33 +63501,53 @@ var Sidebar = function Sidebar(props) {
|
|
|
63457
63501
|
return React__default.createElement("div", {
|
|
63458
63502
|
className: className,
|
|
63459
63503
|
id: 'vitro-sidebar'
|
|
63460
|
-
}, !isMobileView ? React__default.createElement(ScrollBar, {
|
|
63504
|
+
}, !isMobileView ? React__default.createElement(React__default.Fragment, null, React__default.createElement(ScrollBar, {
|
|
63461
63505
|
className: styles$A['vitro-scrollbar']
|
|
63462
63506
|
}, React__default.createElement(SectionList, {
|
|
63463
63507
|
itemList: itemList,
|
|
63464
63508
|
currentUrl: currentUrl,
|
|
63465
|
-
activeItem:
|
|
63466
|
-
|
|
63509
|
+
activeItem: activeItem,
|
|
63510
|
+
setActiveItem: setActiveItem,
|
|
63511
|
+
isExpanded: !props.sidebar,
|
|
63467
63512
|
isMobileView: isMobileView
|
|
63468
|
-
}),
|
|
63469
|
-
itemList: props.bottomItemList,
|
|
63513
|
+
}), React__default.createElement(SectionList, {
|
|
63514
|
+
itemList: props.bottomItemList || [],
|
|
63470
63515
|
currentUrl: currentUrl,
|
|
63471
|
-
activeItem:
|
|
63472
|
-
|
|
63516
|
+
activeItem: activeItem,
|
|
63517
|
+
setActiveItem: setActiveItem,
|
|
63518
|
+
isExpanded: !props.sidebar,
|
|
63473
63519
|
isMobileView: isMobileView
|
|
63474
|
-
}))
|
|
63520
|
+
})), React__default.createElement("div", {
|
|
63521
|
+
className: styles$A['vitro-logo-container']
|
|
63522
|
+
}, React__default.createElement(Item$2, {
|
|
63523
|
+
text: props.logoText,
|
|
63524
|
+
imageUrl: props.logo,
|
|
63525
|
+
isSidebarExpanded: !props.sidebar,
|
|
63526
|
+
isMobileView: isMobileView,
|
|
63527
|
+
className: styles$A['vitro-logo']
|
|
63528
|
+
}))) : React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
63475
63529
|
className: styles$A['vitro-scroll-container'],
|
|
63476
63530
|
ref: menuRef
|
|
63531
|
+
}, React__default.createElement("div", {
|
|
63532
|
+
className: styles$A['vitro-scroll-content'],
|
|
63533
|
+
ref: scrollContentRef
|
|
63477
63534
|
}, React__default.createElement(SectionList, {
|
|
63478
63535
|
container: menuRef.current,
|
|
63479
63536
|
itemList: itemList,
|
|
63480
63537
|
currentUrl: currentUrl,
|
|
63481
|
-
activeItem:
|
|
63482
|
-
|
|
63538
|
+
activeItem: activeItem,
|
|
63539
|
+
setActiveItem: setActiveItem,
|
|
63483
63540
|
linkItemWidth: linkItemWidth,
|
|
63484
|
-
isExpanded:
|
|
63541
|
+
isExpanded: !props.sidebar,
|
|
63485
63542
|
isMobileView: isMobileView
|
|
63486
|
-
})
|
|
63543
|
+
}), React__default.createElement(Item$2, {
|
|
63544
|
+
text: props.logoText,
|
|
63545
|
+
imageUrl: props.logo,
|
|
63546
|
+
width: linkItemWidth,
|
|
63547
|
+
isSidebarExpanded: !props.sidebar,
|
|
63548
|
+
isMobileView: isMobileView,
|
|
63549
|
+
className: styles$A['vitro-logo']
|
|
63550
|
+
}))), React__default.createElement("button", {
|
|
63487
63551
|
onClick: scroll,
|
|
63488
63552
|
className: styles$A['vitro-button-more']
|
|
63489
63553
|
})));
|
|
@@ -65387,13 +65451,11 @@ var Header = function Header(props) {
|
|
|
65387
65451
|
}
|
|
65388
65452
|
}, [ref.current]);
|
|
65389
65453
|
React.useEffect(function () {
|
|
65390
|
-
if (props.sidebar >= 0) {
|
|
65454
|
+
if (props.sidebar >= 0 && props.sidebar !== null) {
|
|
65391
65455
|
localStorageService.setItem(LOCAL_STORAGE_KEY.SIDEBAR_MODE, props.sidebar);
|
|
65392
65456
|
} else {
|
|
65393
65457
|
var sidebarMode = localStorageService.getItem(LOCAL_STORAGE_KEY.SIDEBAR_MODE);
|
|
65394
|
-
|
|
65395
|
-
props.setSidebar(parseInt(sidebarMode) >= MODE.TOGGLED_PINNED ? parseInt(sidebarMode) : MODE.TOGGLED_PINNED);
|
|
65396
|
-
}
|
|
65458
|
+
props.setSidebar(parseInt(sidebarMode) >= MODE.TOGGLED_PINNED ? parseInt(sidebarMode) : MODE.TOGGLED_PINNED);
|
|
65397
65459
|
}
|
|
65398
65460
|
}, [props.sidebar]);
|
|
65399
65461
|
return React__default.createElement("div", {
|