@vitrosoftware/common-ui-ts 1.1.250 → 1.1.251
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/lookup-picker/lookup-picker-value-list.css +4 -0
- package/dist/index.css +4 -0
- package/dist/index.js +29 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/controls/BimViewer/js/bim-viewer.js +2 -2
- package/src/controls/DxfViewer/js/dxf-viewer.js +61 -30
- package/src/controls/PdfViewer/js/pdf-viewer.js +1 -1
package/dist/index.css
CHANGED
|
@@ -4474,6 +4474,10 @@ div._component-loader_vitro-component-loader_3J3a2or {
|
|
|
4474
4474
|
top: 0;
|
|
4475
4475
|
opacity: 0.5;
|
|
4476
4476
|
cursor: initial;
|
|
4477
|
+
}
|
|
4478
|
+
|
|
4479
|
+
._lookup-picker-value-list_vitro-progress-container_1wyhOOF {
|
|
4480
|
+
height: 88px;
|
|
4477
4481
|
}
|
|
4478
4482
|
._error-message_vitro-error-message_2lHJjgO {
|
|
4479
4483
|
display: inline-block;
|
package/dist/index.js
CHANGED
|
@@ -63570,7 +63570,7 @@ var SelectedValueList = function SelectedValueList(props) {
|
|
|
63570
63570
|
}));
|
|
63571
63571
|
};
|
|
63572
63572
|
|
|
63573
|
-
var valueListStyles = {"vitro-value-list":"_lookup-picker-value-list_vitro-value-list_LSdCMjq","vitro-item":"_lookup-picker-value-list_vitro-item_7yZBz5u","vitro-item-html-value":"_lookup-picker-value-list_vitro-item-html-value_1yl9tXx","vitro-placeholder-empty":"_lookup-picker-value-list_vitro-placeholder-empty_fTVHWwc","vitro-keyword-highlight":"_lookup-picker-value-list_vitro-keyword-highlight_1uESHan","vitro-display-none":"_lookup-picker-value-list_vitro-display-none_2kDzC6K","vitro-flex":"_lookup-picker-value-list_vitro-flex_2ClzE5b","vitro-button":"_lookup-picker-value-list_vitro-button_3MejXb_","vitro-disabled":"_lookup-picker-value-list_vitro-disabled_11rNtMo"};
|
|
63573
|
+
var valueListStyles = {"vitro-value-list":"_lookup-picker-value-list_vitro-value-list_LSdCMjq","vitro-item":"_lookup-picker-value-list_vitro-item_7yZBz5u","vitro-item-html-value":"_lookup-picker-value-list_vitro-item-html-value_1yl9tXx","vitro-placeholder-empty":"_lookup-picker-value-list_vitro-placeholder-empty_fTVHWwc","vitro-keyword-highlight":"_lookup-picker-value-list_vitro-keyword-highlight_1uESHan","vitro-display-none":"_lookup-picker-value-list_vitro-display-none_2kDzC6K","vitro-flex":"_lookup-picker-value-list_vitro-flex_2ClzE5b","vitro-button":"_lookup-picker-value-list_vitro-button_3MejXb_","vitro-disabled":"_lookup-picker-value-list_vitro-disabled_11rNtMo","vitro-progress-container":"_lookup-picker-value-list_vitro-progress-container_1wyhOOF"};
|
|
63574
63574
|
|
|
63575
63575
|
var ValueListItem = function ValueListItem(props) {
|
|
63576
63576
|
var isDisabled = props.item.isEnabled === false;
|
|
@@ -63610,7 +63610,23 @@ var ValueList = function ValueList(props) {
|
|
|
63610
63610
|
var _useState2 = React.useState(null),
|
|
63611
63611
|
style = _useState2[0],
|
|
63612
63612
|
setStyle = _useState2[1];
|
|
63613
|
+
var _useState3 = React.useState(false),
|
|
63614
|
+
isProgressVisible = _useState3[0],
|
|
63615
|
+
setIsProgressVisible = _useState3[1];
|
|
63613
63616
|
var reg = new RegExp(props.inputValue.replace(PATTERN, REPLACEMENT), FLAG);
|
|
63617
|
+
React.useEffect(function () {
|
|
63618
|
+
var timer;
|
|
63619
|
+
if (props.isPending) {
|
|
63620
|
+
timer = setTimeout(function () {
|
|
63621
|
+
return setIsProgressVisible(true);
|
|
63622
|
+
}, 400);
|
|
63623
|
+
} else {
|
|
63624
|
+
setIsProgressVisible(false);
|
|
63625
|
+
}
|
|
63626
|
+
return function () {
|
|
63627
|
+
return clearTimeout(timer);
|
|
63628
|
+
};
|
|
63629
|
+
}, [props.isPending]);
|
|
63614
63630
|
React.useEffect(function () {
|
|
63615
63631
|
if (scrollableElement && scrollableElement.scrollTop === 0) {
|
|
63616
63632
|
scrollableElement.scrollTop = 1;
|
|
@@ -63666,7 +63682,9 @@ var ValueList = function ValueList(props) {
|
|
|
63666
63682
|
}, React__default.createElement(ScrollBar, {
|
|
63667
63683
|
onInit: setScrollableElement,
|
|
63668
63684
|
isPreventParentScroll: true
|
|
63669
|
-
},
|
|
63685
|
+
}, isProgressVisible && React__default.createElement(FlexBox, {
|
|
63686
|
+
className: valueListStyles['vitro-progress-container']
|
|
63687
|
+
}, React__default.createElement(Progress, null)), !isProgressVisible && React__default.createElement(React__default.Fragment, null, props.list.length > 0 ? props.list.sort(sortValueList).map(function (x) {
|
|
63670
63688
|
return React__default.createElement(ValueListItem, {
|
|
63671
63689
|
item: x,
|
|
63672
63690
|
onSelect: props.onOptionValueSelect,
|
|
@@ -63801,16 +63819,9 @@ var LookupPicker = React.forwardRef(function (props, ref) {
|
|
|
63801
63819
|
var isShowTooltipRef = React.useRef(true);
|
|
63802
63820
|
var scrollBarRef = React.useRef(null);
|
|
63803
63821
|
var rightButtonGroupRef = React.useRef(null);
|
|
63804
|
-
var updatePending = function updatePending(valueList) {
|
|
63805
|
-
return setPending(valueList ? false : true);
|
|
63806
|
-
};
|
|
63807
|
-
React.useEffect(function () {
|
|
63808
|
-
updatePending(props.valueList);
|
|
63809
|
-
}, []);
|
|
63810
63822
|
React.useEffect(function () {
|
|
63811
63823
|
updateFilteredValueList(props.valueList || []);
|
|
63812
63824
|
setSelectedValueList(createDefaultSelectedValueList);
|
|
63813
|
-
updatePending(props.valueList);
|
|
63814
63825
|
}, [props.valueList]);
|
|
63815
63826
|
React.useEffect(function () {
|
|
63816
63827
|
if (props.selectedValueList && checkIsValueChanged(selectedValueList, props.selectedValueList)) {
|
|
@@ -63898,6 +63909,8 @@ var LookupPicker = React.forwardRef(function (props, ref) {
|
|
|
63898
63909
|
}
|
|
63899
63910
|
}, [state]);
|
|
63900
63911
|
var updateFilteredValueList = function updateFilteredValueList(valueList) {
|
|
63912
|
+
var _inputRef$current;
|
|
63913
|
+
var inputValue = ((_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value) || CTRL.EMPTY;
|
|
63901
63914
|
var availableValueList = inputValue ? filteredValueList : valueList;
|
|
63902
63915
|
if (inputValue && inputValue.length >= (props.charCount || 0)) {
|
|
63903
63916
|
availableValueList = valueList.filter(function (x) {
|
|
@@ -63937,6 +63950,8 @@ var LookupPicker = React.forwardRef(function (props, ref) {
|
|
|
63937
63950
|
}
|
|
63938
63951
|
};
|
|
63939
63952
|
var filterByText = function filterByText(value) {
|
|
63953
|
+
var _inputRef$current2;
|
|
63954
|
+
var inputValue = ((_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.value) || CTRL.EMPTY;
|
|
63940
63955
|
var isValueContainsInputValue = filterValueTemplate(value).toLowerCase().indexOf(inputValue.toLowerCase()) >= 0;
|
|
63941
63956
|
var isValueIsNotYetSelected = !selectedValueList.map(function (f) {
|
|
63942
63957
|
return f.id;
|
|
@@ -63996,8 +64011,8 @@ var LookupPicker = React.forwardRef(function (props, ref) {
|
|
|
63996
64011
|
};
|
|
63997
64012
|
var onOptionValueDelete = function onOptionValueDelete(id) {
|
|
63998
64013
|
if (!props.isDisabled) {
|
|
63999
|
-
var _inputRef$
|
|
64000
|
-
(_inputRef$
|
|
64014
|
+
var _inputRef$current3;
|
|
64015
|
+
(_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.focus();
|
|
64001
64016
|
var newSelectedValueList = id ? selectedValueList.filter(function (x) {
|
|
64002
64017
|
return x.id !== id;
|
|
64003
64018
|
}) : [];
|
|
@@ -64026,7 +64041,7 @@ var LookupPicker = React.forwardRef(function (props, ref) {
|
|
|
64026
64041
|
}
|
|
64027
64042
|
};
|
|
64028
64043
|
var onFocus = function onFocus(e) {
|
|
64029
|
-
var _inputRef$
|
|
64044
|
+
var _inputRef$current4;
|
|
64030
64045
|
if (scrollBarRef.current) {
|
|
64031
64046
|
scrollBarRef.current.scrollTop = scrollBarRef.current.scrollHeight;
|
|
64032
64047
|
}
|
|
@@ -64037,7 +64052,7 @@ var LookupPicker = React.forwardRef(function (props, ref) {
|
|
|
64037
64052
|
isShowTooltipRef.current = false;
|
|
64038
64053
|
setState(styles$O['vitro-focus']);
|
|
64039
64054
|
expandValueList();
|
|
64040
|
-
(_inputRef$
|
|
64055
|
+
(_inputRef$current4 = inputRef.current) === null || _inputRef$current4 === void 0 ? void 0 : _inputRef$current4.focus();
|
|
64041
64056
|
if (props.onFocus) {
|
|
64042
64057
|
props.onFocus(e);
|
|
64043
64058
|
}
|
|
@@ -67265,7 +67280,7 @@ var Viewer = function Viewer(props) {
|
|
|
67265
67280
|
};
|
|
67266
67281
|
|
|
67267
67282
|
var name = "@vitrosoftware/common-ui-ts";
|
|
67268
|
-
var version$1 = "1.1.
|
|
67283
|
+
var version$1 = "1.1.251";
|
|
67269
67284
|
var description = "vitro software common ui ts";
|
|
67270
67285
|
var author = "";
|
|
67271
67286
|
var license = "MIT";
|