@vitrosoftware/common-ui-ts 1.1.104 → 1.1.106
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/dropdown-button/dropdown-button.css +2 -5
- package/css/std/controls/file/file.css +2 -2
- package/css/std/controls/image-viewer/image-viewer.css +2 -1
- package/css/std/controls/site-select/site-item.css +4 -0
- package/css/std/controls/site-select/site-select.css +0 -2
- package/dist/index.css +11 -9
- package/dist/index.js +85 -42
- package/dist/index.js.map +1 -1
- package/dist/src/controls/ActivityItem/ActivityMessage.d.ts +1 -1
- package/dist/src/controls/ActivityItem/AttachedFileList.d.ts +1 -1
- package/dist/src/controls/ActivityItem/AttachedFileListItem.d.ts +1 -1
- package/dist/src/controls/DropdownButton/DropdownButton.d.ts +0 -1
- package/dist/src/controls/FlexBox/FlexBox.d.ts +1 -1
- package/dist/src/controls/ImageViewer/ImageViewer.d.ts +1 -0
- package/dist/src/controls/MessageInput/MessageInput.d.ts +1 -1
- package/dist/src/controls/ScrollBar/ScrollBar.d.ts +1 -0
- package/dist/src/controls/ScrollView/ScrollView.d.ts +1 -0
- 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
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.vitro-dropdown-button button::after {
|
|
27
|
-
display: none;
|
|
27
|
+
display: none !important;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.vitro-dropdown-icon {
|
|
@@ -62,12 +62,9 @@
|
|
|
62
62
|
padding: 0px;
|
|
63
63
|
font-weight: 400;
|
|
64
64
|
box-sizing: border-box;
|
|
65
|
-
-webkit-transform: none !important;
|
|
66
|
-
transform: none !important;
|
|
67
|
-
position: absolute;
|
|
68
65
|
z-index: 1150;
|
|
69
|
-
top: calc(100% + 6px) !important;
|
|
70
66
|
right: -4px !important;
|
|
67
|
+
margin-top: 6px;
|
|
71
68
|
}
|
|
72
69
|
|
|
73
70
|
.vitro-dropdown-button :global(.dropdown-menu)::before {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
.vitro-site-select {
|
|
2
2
|
position: relative;
|
|
3
3
|
z-index: 21;
|
|
4
|
-
margin-left: 32px;
|
|
5
4
|
max-width: 320px;
|
|
6
5
|
}
|
|
7
6
|
|
|
@@ -119,7 +118,6 @@
|
|
|
119
118
|
@media (max-width: 800px) {
|
|
120
119
|
.vitro-site-select {
|
|
121
120
|
z-index: 0;
|
|
122
|
-
margin: 0;
|
|
123
121
|
width: 100%;
|
|
124
122
|
max-width: unset;
|
|
125
123
|
}
|
package/dist/index.css
CHANGED
|
@@ -1918,7 +1918,7 @@ html, body {
|
|
|
1918
1918
|
}
|
|
1919
1919
|
|
|
1920
1920
|
._dropdown-button_vitro-dropdown-button_1myvkhB button::after {
|
|
1921
|
-
display: none;
|
|
1921
|
+
display: none !important;
|
|
1922
1922
|
}
|
|
1923
1923
|
|
|
1924
1924
|
._dropdown-button_vitro-dropdown-icon_2aKCNii {
|
|
@@ -1955,11 +1955,9 @@ html, body {
|
|
|
1955
1955
|
padding: 0px;
|
|
1956
1956
|
font-weight: 400;
|
|
1957
1957
|
box-sizing: border-box;
|
|
1958
|
-
transform: none !important;
|
|
1959
|
-
position: absolute;
|
|
1960
1958
|
z-index: 1150;
|
|
1961
|
-
top: calc(100% + 6px) !important;
|
|
1962
1959
|
right: -4px !important;
|
|
1960
|
+
margin-top: 6px;
|
|
1963
1961
|
}
|
|
1964
1962
|
|
|
1965
1963
|
._dropdown-button_vitro-dropdown-button_1myvkhB .dropdown-menu::before {
|
|
@@ -5640,8 +5638,8 @@ li:first-child ._command-menu-item_vitro-item_2pVhk23:hover {
|
|
|
5640
5638
|
}
|
|
5641
5639
|
|
|
5642
5640
|
._file_vitro-dropdown-button_3MgI2n9 .dropdown-menu {
|
|
5643
|
-
width:
|
|
5644
|
-
min-width:
|
|
5641
|
+
width: 184px;
|
|
5642
|
+
min-width: 184px;
|
|
5645
5643
|
}
|
|
5646
5644
|
|
|
5647
5645
|
._file_vitro-dropdown-button_3MgI2n9 .btn > span {
|
|
@@ -6806,7 +6804,8 @@ li:first-child ._command-menu-item_vitro-item_2pVhk23:hover {
|
|
|
6806
6804
|
z-index: 1;
|
|
6807
6805
|
padding: 20px;
|
|
6808
6806
|
display: flex;
|
|
6809
|
-
justify-content:
|
|
6807
|
+
justify-content: flex-end;
|
|
6808
|
+
grid-gap: 12px;
|
|
6810
6809
|
}
|
|
6811
6810
|
|
|
6812
6811
|
._image-viewer_vitro-button-close_36TY-iY {
|
|
@@ -7334,6 +7333,11 @@ li:first-child ._command-menu-item_vitro-item_2pVhk23:hover {
|
|
|
7334
7333
|
flex-shrink: 0;
|
|
7335
7334
|
}
|
|
7336
7335
|
|
|
7336
|
+
._site-item_vitro-image_3wrW9q4{
|
|
7337
|
+
-o-object-fit: contain;
|
|
7338
|
+
object-fit: contain;
|
|
7339
|
+
}
|
|
7340
|
+
|
|
7337
7341
|
._site-item_vitro-default-image_fcWWNwv {
|
|
7338
7342
|
background-size: 100%;
|
|
7339
7343
|
background-repeat: no-repeat;
|
|
@@ -7359,7 +7363,6 @@ li:first-child ._command-menu-item_vitro-item_2pVhk23:hover {
|
|
|
7359
7363
|
._site-select_vitro-site-select_2irDOFZ {
|
|
7360
7364
|
position: relative;
|
|
7361
7365
|
z-index: 21;
|
|
7362
|
-
margin-left: 32px;
|
|
7363
7366
|
max-width: 320px;
|
|
7364
7367
|
}
|
|
7365
7368
|
|
|
@@ -7481,7 +7484,6 @@ li:first-child ._command-menu-item_vitro-item_2pVhk23:hover {
|
|
|
7481
7484
|
@media (max-width: 800px) {
|
|
7482
7485
|
._site-select_vitro-site-select_2irDOFZ {
|
|
7483
7486
|
z-index: 0;
|
|
7484
|
-
margin: 0;
|
|
7485
7487
|
width: 100%;
|
|
7486
7488
|
max-width: unset;
|
|
7487
7489
|
}
|
package/dist/index.js
CHANGED
|
@@ -478,6 +478,7 @@ var ScrollBar = function ScrollBar(props) {
|
|
|
478
478
|
ref: ref,
|
|
479
479
|
className: props.className || CTRL.EMPTY
|
|
480
480
|
}, React__default.createElement("div", {
|
|
481
|
+
ref: props.contentRef,
|
|
481
482
|
className: styles$1['vitro-scrollbar-content'] + (props.contentClassName ? CTRL.SPACE + props.contentClassName : CTRL.EMPTY)
|
|
482
483
|
}, element && props.children));
|
|
483
484
|
};
|
|
@@ -60989,13 +60990,30 @@ var styles$n = {"vitro-dropdown-button":"_dropdown-button_vitro-dropdown-button_
|
|
|
60989
60990
|
|
|
60990
60991
|
var w$4 = window;
|
|
60991
60992
|
var ALIGN_END = 'end';
|
|
60993
|
+
var DROP_DOWN = 'down';
|
|
60992
60994
|
var POSITION_ABSOLUTE = 'absolute';
|
|
60993
60995
|
var DropdownButton = function DropdownButton(props) {
|
|
60996
|
+
var _useState = React.useState(props.itemList),
|
|
60997
|
+
itemList = _useState[0],
|
|
60998
|
+
setItemList = _useState[1];
|
|
60999
|
+
var _useState2 = React.useState(true),
|
|
61000
|
+
isReady = _useState2[0],
|
|
61001
|
+
setIsReady = _useState2[1];
|
|
61002
|
+
var buttonRef = React.useRef(null);
|
|
60994
61003
|
React.useEffect(function () {
|
|
60995
61004
|
return function () {
|
|
60996
61005
|
w$4.$('body > .dropdown-menu').remove();
|
|
60997
61006
|
};
|
|
60998
61007
|
}, []);
|
|
61008
|
+
React.useEffect(function () {
|
|
61009
|
+
setIsReady(false);
|
|
61010
|
+
setItemList(props.itemList.filter(function (x) {
|
|
61011
|
+
return !x.isOverflow;
|
|
61012
|
+
}));
|
|
61013
|
+
}, [props.itemList]);
|
|
61014
|
+
React.useEffect(function () {
|
|
61015
|
+
setIsReady(true);
|
|
61016
|
+
}, [itemList]);
|
|
60999
61017
|
var hideMenu = function hideMenu() {
|
|
61000
61018
|
var button = w$4.$('.vitro-dropdown-button-active');
|
|
61001
61019
|
if (button.length > 0) {
|
|
@@ -61028,13 +61046,13 @@ var DropdownButton = function DropdownButton(props) {
|
|
|
61028
61046
|
if (props.onToggle) {
|
|
61029
61047
|
props.onToggle(state, e);
|
|
61030
61048
|
}
|
|
61049
|
+
if (!state && buttonRef.current) {
|
|
61050
|
+
buttonRef.current.blur();
|
|
61051
|
+
}
|
|
61031
61052
|
};
|
|
61032
61053
|
var overflowItemList = props.itemList.filter(function (x) {
|
|
61033
61054
|
return x.isOverflow;
|
|
61034
61055
|
});
|
|
61035
|
-
var dropItemList = props.itemList.filter(function (x) {
|
|
61036
|
-
return !x.isOverflow;
|
|
61037
|
-
});
|
|
61038
61056
|
var isShowImage = props.itemList.find(function (item) {
|
|
61039
61057
|
return !!item.imageUrl;
|
|
61040
61058
|
}) ? true : false;
|
|
@@ -61052,18 +61070,21 @@ var DropdownButton = function DropdownButton(props) {
|
|
|
61052
61070
|
hoverUrl: item.imageHoverUrl,
|
|
61053
61071
|
className: styles$n['vitro-image']
|
|
61054
61072
|
}), React__default.createElement("span", null, item.text));
|
|
61055
|
-
}),
|
|
61073
|
+
}), itemList.length > 0 && isReady && React__default.createElement(BootstrapDropdown, {
|
|
61056
61074
|
align: ALIGN_END,
|
|
61057
|
-
onToggle: onDropdownToggle
|
|
61058
|
-
|
|
61075
|
+
onToggle: onDropdownToggle,
|
|
61076
|
+
drop: DROP_DOWN
|
|
61077
|
+
}, React__default.createElement(BootstrapDropdown.Toggle, {
|
|
61078
|
+
ref: buttonRef
|
|
61079
|
+
}, props.title && React__default.createElement("span", {
|
|
61059
61080
|
className: styles$n['vitro-title']
|
|
61060
61081
|
}, props.title), React__default.createElement("span", {
|
|
61061
61082
|
className: styles$n['vitro-dropdown-icon']
|
|
61062
61083
|
})), React__default.createElement(BootstrapDropdown.Menu, {
|
|
61063
61084
|
renderOnMount: true,
|
|
61064
|
-
flip: props.
|
|
61085
|
+
flip: props.isFlip !== false,
|
|
61065
61086
|
style: props.menuStyle || {}
|
|
61066
|
-
},
|
|
61087
|
+
}, itemList.map(function (x) {
|
|
61067
61088
|
return React__default.createElement(BootstrapDropdown.Item, {
|
|
61068
61089
|
key: x.key,
|
|
61069
61090
|
onClick: function onClick(e) {
|
|
@@ -61867,7 +61888,7 @@ var Viewer = function Viewer(props) {
|
|
|
61867
61888
|
};
|
|
61868
61889
|
|
|
61869
61890
|
var name = "@vitrosoftware/common-ui-ts";
|
|
61870
|
-
var version$1 = "1.1.
|
|
61891
|
+
var version$1 = "1.1.106";
|
|
61871
61892
|
var description = "vitro software common ui ts";
|
|
61872
61893
|
var author = "";
|
|
61873
61894
|
var license = "MIT";
|
|
@@ -64325,9 +64346,7 @@ var File = function File(props) {
|
|
|
64325
64346
|
className: className
|
|
64326
64347
|
}, props.actionList && props.actionList.length ? React__default.createElement(DropdownButton, {
|
|
64327
64348
|
itemList: props.actionList,
|
|
64328
|
-
className: styles$$['vitro-dropdown-button']
|
|
64329
|
-
isIgnoreOverflow: true,
|
|
64330
|
-
flip: false
|
|
64349
|
+
className: styles$$['vitro-dropdown-button']
|
|
64331
64350
|
}) : null, React__default.createElement(Tooltip$1, {
|
|
64332
64351
|
placement: PLACEMENT.TOP,
|
|
64333
64352
|
text: props.tooltip || CTRL.EMPTY
|
|
@@ -64356,7 +64375,7 @@ var AttachedFileListItem = function AttachedFileListItem(props) {
|
|
|
64356
64375
|
setHiddenFileList = _useState[1];
|
|
64357
64376
|
var onHiddenFileListClick = function onHiddenFileListClick(fileList) {
|
|
64358
64377
|
if (props.showHiddenFileList) {
|
|
64359
|
-
props.showHiddenFileList(fileList);
|
|
64378
|
+
props.showHiddenFileList(fileList, props.fileList);
|
|
64360
64379
|
} else {
|
|
64361
64380
|
setHiddenFileList(fileList);
|
|
64362
64381
|
}
|
|
@@ -64474,7 +64493,7 @@ var ActivityMessage = function ActivityMessage(props) {
|
|
|
64474
64493
|
}
|
|
64475
64494
|
return false;
|
|
64476
64495
|
};
|
|
64477
|
-
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
64496
|
+
return React__default.createElement(React__default.Fragment, null, props.changedValueList.length ? React__default.createElement("div", {
|
|
64478
64497
|
className: styles$11['vitro-activity-message']
|
|
64479
64498
|
}, props.changedValueList.map(function (item) {
|
|
64480
64499
|
return React__default.createElement("div", {
|
|
@@ -64496,7 +64515,7 @@ var ActivityMessage = function ActivityMessage(props) {
|
|
|
64496
64515
|
className: item.isMessage ? styles$11['vitro-message'] : styles$11['vitro-value'],
|
|
64497
64516
|
ref: newValueRef
|
|
64498
64517
|
}, item.newValue)));
|
|
64499
|
-
})), props.fileList && React__default.createElement(AttachedFileList, Object.assign({
|
|
64518
|
+
})) : null, props.fileList && React__default.createElement(AttachedFileList, Object.assign({
|
|
64500
64519
|
fileList: props.fileList
|
|
64501
64520
|
}, props)));
|
|
64502
64521
|
};
|
|
@@ -64576,14 +64595,15 @@ var AttachedFile = function AttachedFile(props) {
|
|
|
64576
64595
|
|
|
64577
64596
|
var styles$13 = {"vitro-flex-box":"_flex-box_vitro-flex-box_3jGTD6k"};
|
|
64578
64597
|
|
|
64579
|
-
var FlexBox = function
|
|
64598
|
+
var FlexBox = React.forwardRef(function (props, ref) {
|
|
64580
64599
|
return React__default.createElement("div", Object.assign({}, props, {
|
|
64600
|
+
ref: ref,
|
|
64581
64601
|
style: props.gap ? {
|
|
64582
64602
|
gridGap: props.gap + UNIT.PX
|
|
64583
64603
|
} : {},
|
|
64584
64604
|
className: styles$13['vitro-flex-box'] + (props.className ? CTRL.SPACE + props.className : CTRL.EMPTY)
|
|
64585
64605
|
}), props.children);
|
|
64586
|
-
};
|
|
64606
|
+
});
|
|
64587
64607
|
|
|
64588
64608
|
var styles$14 = {"vitro-message-input":"_message-input_vitro-message-input_3MkcjWD","vitro-control":"_message-input_vitro-control_1PUSjq9","vitro-message":"_message-input_vitro-message_2EJSy-9","vitro-placeholder":"_message-input_vitro-placeholder_1FBfIqN","vitro-button-add-file":"_message-input_vitro-button-add-file_1qdtHHq","vitro-button-send":"_message-input_vitro-button-send_1vktQrZ","vitro-display-none":"_message-input_vitro-display-none_2dYTZ22","vitro-attached-file-list":"_message-input_vitro-attached-file-list_l95S4VR","vitro-flex":"_message-input_vitro-flex_18M_7xU"};
|
|
64589
64609
|
|
|
@@ -64638,9 +64658,6 @@ var MessageInput = function MessageInput(props) {
|
|
|
64638
64658
|
inputRef.current.innerText = CTRL.EMPTY;
|
|
64639
64659
|
setIsShowPlaceholder(true);
|
|
64640
64660
|
}
|
|
64641
|
-
if (fileInputRef.current) {
|
|
64642
|
-
fileInputRef.current.value = CTRL.EMPTY;
|
|
64643
|
-
}
|
|
64644
64661
|
};
|
|
64645
64662
|
var onSelectFile = function onSelectFile(e) {
|
|
64646
64663
|
var fileArray = e.target.files ? Array.from(e.target.files) : null;
|
|
@@ -64651,17 +64668,28 @@ var MessageInput = function MessageInput(props) {
|
|
|
64651
64668
|
props.onSelectFiles(fileArray);
|
|
64652
64669
|
}
|
|
64653
64670
|
}
|
|
64671
|
+
if (fileInputRef.current) {
|
|
64672
|
+
fileInputRef.current.value = CTRL.EMPTY;
|
|
64673
|
+
}
|
|
64654
64674
|
};
|
|
64655
|
-
var
|
|
64675
|
+
var onPaste = function onPaste(e) {
|
|
64656
64676
|
if (e.clipboardData) {
|
|
64657
|
-
var
|
|
64658
|
-
if (
|
|
64659
|
-
var list = [].concat(fileList, fileArray);
|
|
64660
|
-
setFileList(list);
|
|
64677
|
+
var _fileList = e.clipboardData.files;
|
|
64678
|
+
if (_fileList && _fileList.length) {
|
|
64661
64679
|
e.preventDefault();
|
|
64662
|
-
|
|
64663
|
-
|
|
64664
|
-
|
|
64680
|
+
processFileList(_fileList);
|
|
64681
|
+
}
|
|
64682
|
+
}
|
|
64683
|
+
};
|
|
64684
|
+
var processFileList = function processFileList(list) {
|
|
64685
|
+
var fileArray = Array.from(list).filter(function (file) {
|
|
64686
|
+
return file.type;
|
|
64687
|
+
});
|
|
64688
|
+
if (fileArray.length) {
|
|
64689
|
+
var _list = [].concat(fileList, fileArray);
|
|
64690
|
+
setFileList(_list);
|
|
64691
|
+
if (props.onPasteFile) {
|
|
64692
|
+
props.onPasteFile(fileArray);
|
|
64665
64693
|
}
|
|
64666
64694
|
}
|
|
64667
64695
|
};
|
|
@@ -64675,6 +64703,13 @@ var MessageInput = function MessageInput(props) {
|
|
|
64675
64703
|
newFileList.splice(index, 1);
|
|
64676
64704
|
setFileList(newFileList);
|
|
64677
64705
|
};
|
|
64706
|
+
var onDrop = function onDrop(e) {
|
|
64707
|
+
var fileList = e.dataTransfer.files;
|
|
64708
|
+
if (fileList) {
|
|
64709
|
+
e.preventDefault();
|
|
64710
|
+
processFileList(fileList);
|
|
64711
|
+
}
|
|
64712
|
+
};
|
|
64678
64713
|
return React__default.createElement("div", {
|
|
64679
64714
|
className: styles$14['vitro-message-input'],
|
|
64680
64715
|
onDrop: props.onDrop
|
|
@@ -64701,7 +64736,8 @@ var MessageInput = function MessageInput(props) {
|
|
|
64701
64736
|
onKeyDown: onKeyDown,
|
|
64702
64737
|
onFocus: onFocus,
|
|
64703
64738
|
onBlur: onBlur,
|
|
64704
|
-
onPaste:
|
|
64739
|
+
onPaste: onPaste,
|
|
64740
|
+
onDrop: onDrop,
|
|
64705
64741
|
contentEditable: true
|
|
64706
64742
|
}, isShowPlaceholder && React__default.createElement("span", {
|
|
64707
64743
|
className: styles$14['vitro-placeholder']
|
|
@@ -66032,7 +66068,8 @@ var ScrollView = function ScrollView(props) {
|
|
|
66032
66068
|
navigatable: true,
|
|
66033
66069
|
contentHeight: CONTENT_HEIGHT + CTRL.PERCENT,
|
|
66034
66070
|
enablePager: props.isEnablePager,
|
|
66035
|
-
change: onChange
|
|
66071
|
+
change: onChange,
|
|
66072
|
+
page: props.activePage || 0
|
|
66036
66073
|
});
|
|
66037
66074
|
};
|
|
66038
66075
|
var destroy = function destroy() {
|
|
@@ -66048,8 +66085,9 @@ var ScrollView = function ScrollView(props) {
|
|
|
66048
66085
|
};
|
|
66049
66086
|
return React__default.createElement("div", {
|
|
66050
66087
|
ref: scrollViewRef,
|
|
66051
|
-
className: styles$1c['vitro-scroll-view'] + CTRL.SPACE + (props.className || CTRL.EMPTY)
|
|
66052
|
-
|
|
66088
|
+
className: styles$1c['vitro-scroll-view'] + CTRL.SPACE + (props.className || CTRL.EMPTY),
|
|
66089
|
+
tabIndex: 0
|
|
66090
|
+
}, props.itemList.map(function (item) {
|
|
66053
66091
|
return React__default.createElement(item.component, item.props);
|
|
66054
66092
|
}));
|
|
66055
66093
|
};
|
|
@@ -66093,9 +66131,9 @@ var ImageViewer = React.forwardRef(function (props, ref) {
|
|
|
66093
66131
|
});
|
|
66094
66132
|
React.useEffect(function () {
|
|
66095
66133
|
init();
|
|
66096
|
-
window.addEventListener(exports.EVENT.KEYDOWN, onEscClick
|
|
66134
|
+
window.addEventListener(exports.EVENT.KEYDOWN, onEscClick);
|
|
66097
66135
|
return function () {
|
|
66098
|
-
window.removeEventListener(exports.EVENT.KEYDOWN, onEscClick
|
|
66136
|
+
window.removeEventListener(exports.EVENT.KEYDOWN, onEscClick);
|
|
66099
66137
|
};
|
|
66100
66138
|
}, []);
|
|
66101
66139
|
var init = function init() {
|
|
@@ -66128,17 +66166,18 @@ var ImageViewer = React.forwardRef(function (props, ref) {
|
|
|
66128
66166
|
className: styles$1e['vitro-image-viewer']
|
|
66129
66167
|
}, React__default.createElement("div", {
|
|
66130
66168
|
className: styles$1e['vitro-header']
|
|
66131
|
-
}, React__default.createElement(
|
|
66132
|
-
className: styles$1e['vitro-button-close'],
|
|
66133
|
-
onClick: props.onCloseClick
|
|
66134
|
-
}), actionList.length ? React__default.createElement(DropdownButton, {
|
|
66169
|
+
}, actionList.length ? React__default.createElement(DropdownButton, {
|
|
66135
66170
|
itemList: actionList,
|
|
66136
66171
|
className: styles$1e['vitro-dropdown-button']
|
|
66137
|
-
}) : null
|
|
66172
|
+
}) : null, React__default.createElement("button", {
|
|
66173
|
+
className: styles$1e['vitro-button-close'],
|
|
66174
|
+
onClick: props.onCloseClick
|
|
66175
|
+
})), React__default.createElement(ScrollView, {
|
|
66138
66176
|
itemList: itemList,
|
|
66139
66177
|
onChange: onChange,
|
|
66140
66178
|
className: styles$1e['vitro-scroll-view'],
|
|
66141
|
-
isEnablePager: true
|
|
66179
|
+
isEnablePager: true,
|
|
66180
|
+
activePage: props.activePage
|
|
66142
66181
|
})) : null);
|
|
66143
66182
|
});
|
|
66144
66183
|
|
|
@@ -66710,6 +66749,7 @@ var SiteSelect = function SiteSelect(props) {
|
|
|
66710
66749
|
isMobileView = _useState3[0],
|
|
66711
66750
|
setIsMobileView = _useState3[1];
|
|
66712
66751
|
var listRef = React.useRef(null);
|
|
66752
|
+
var flexBoxRef = React.useRef(null);
|
|
66713
66753
|
React.useEffect(function () {
|
|
66714
66754
|
setVisibleItemList(function (prevState) {
|
|
66715
66755
|
return props.itemList.filter(function (item) {
|
|
@@ -66781,7 +66821,9 @@ var SiteSelect = function SiteSelect(props) {
|
|
|
66781
66821
|
setIsExpanded(!isExpanded);
|
|
66782
66822
|
};
|
|
66783
66823
|
var onMouseDown = function onMouseDown(e) {
|
|
66784
|
-
|
|
66824
|
+
var list = listRef.current;
|
|
66825
|
+
var flexBox = flexBoxRef.current;
|
|
66826
|
+
if (!isMobileView && list && !list.contains(e.target) && flexBox && !flexBox.contains(e.target)) {
|
|
66785
66827
|
setIsExpanded(false);
|
|
66786
66828
|
}
|
|
66787
66829
|
};
|
|
@@ -66805,7 +66847,8 @@ var SiteSelect = function SiteSelect(props) {
|
|
|
66805
66847
|
return React__default.createElement("div", {
|
|
66806
66848
|
className: styles$1v['vitro-site-select']
|
|
66807
66849
|
}, React__default.createElement(FlexBox, {
|
|
66808
|
-
className: 'vitro-flex'
|
|
66850
|
+
className: styles$1v['vitro-flex'],
|
|
66851
|
+
ref: flexBoxRef
|
|
66809
66852
|
}, React__default.createElement("h2", {
|
|
66810
66853
|
onClick: onClick
|
|
66811
66854
|
}, props.activeItem.name), React__default.createElement(ImageButton, {
|