@vitrosoftware/common-ui-ts 1.1.224 → 1.1.226

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.
@@ -8006,4 +8006,69 @@ dialog .separator {
8006
8006
  border-radius: 4px;
8007
8007
  height: 40px;
8008
8008
  width: 100%;
8009
+ }
8010
+
8011
+ #markupEditOutline {
8012
+ border: 1px dashed #4a8cf8;
8013
+ box-sizing: border-box;
8014
+ position: absolute;
8015
+ z-index: 1000;
8016
+ cursor: move;
8017
+ }
8018
+
8019
+ .vitro-markup-resizer {
8020
+ border: 2px solid #4a8cf8;
8021
+ background: #ffffff;
8022
+ position: absolute;
8023
+ width: 8px;
8024
+ height: 8px;
8025
+ box-sizing: border-box;
8026
+ }
8027
+
8028
+ .vitro-markup-resizer-tl {
8029
+ left: -7px;
8030
+ top: -7px;
8031
+ cursor: nwse-resize;
8032
+ }
8033
+
8034
+ .vitro-markup-resizer-tc {
8035
+ left: calc(50% - 6px);
8036
+ top: -7px;
8037
+ cursor: ns-resize;
8038
+ }
8039
+
8040
+ .vitro-markup-resizer-tr {
8041
+ right: -7px;
8042
+ top: -7px;
8043
+ cursor: nesw-resize;
8044
+ }
8045
+
8046
+ .vitro-markup-resizer-cl {
8047
+ left: -7px;
8048
+ top: calc(50% - 6px);
8049
+ cursor: ew-resize;
8050
+ }
8051
+
8052
+ .vitro-markup-resizer-cr {
8053
+ right: -7px;
8054
+ top: calc(50% - 6px);
8055
+ cursor: ew-resize;
8056
+ }
8057
+
8058
+ .vitro-markup-resizer-bl {
8059
+ left: -7px;
8060
+ bottom: -7px;
8061
+ cursor: nesw-resize;
8062
+ }
8063
+
8064
+ .vitro-markup-resizer-bc {
8065
+ left: calc(50% - 6px);
8066
+ bottom: -7px;
8067
+ cursor: ns-resize;
8068
+ }
8069
+
8070
+ .vitro-markup-resizer-br {
8071
+ right: -7px;
8072
+ bottom: -7px;
8073
+ cursor: nwse-resize;
8009
8074
  }
@@ -1004,4 +1004,69 @@ dialog .separator {
1004
1004
  border-radius: 4px;
1005
1005
  height: 40px;
1006
1006
  width: 100%;
1007
+ }
1008
+
1009
+ #markupEditOutline {
1010
+ border: 1px dashed #4a8cf8;
1011
+ box-sizing: border-box;
1012
+ position: absolute;
1013
+ z-index: 1000;
1014
+ cursor: move;
1015
+ }
1016
+
1017
+ .vitro-markup-resizer {
1018
+ border: 2px solid #4a8cf8;
1019
+ background: #ffffff;
1020
+ position: absolute;
1021
+ width: 8px;
1022
+ height: 8px;
1023
+ box-sizing: border-box;
1024
+ }
1025
+
1026
+ .vitro-markup-resizer-tl {
1027
+ left: -7px;
1028
+ top: -7px;
1029
+ cursor: nwse-resize;
1030
+ }
1031
+
1032
+ .vitro-markup-resizer-tc {
1033
+ left: calc(50% - 6px);
1034
+ top: -7px;
1035
+ cursor: ns-resize;
1036
+ }
1037
+
1038
+ .vitro-markup-resizer-tr {
1039
+ right: -7px;
1040
+ top: -7px;
1041
+ cursor: nesw-resize;
1042
+ }
1043
+
1044
+ .vitro-markup-resizer-cl {
1045
+ left: -7px;
1046
+ top: calc(50% - 6px);
1047
+ cursor: ew-resize;
1048
+ }
1049
+
1050
+ .vitro-markup-resizer-cr {
1051
+ right: -7px;
1052
+ top: calc(50% - 6px);
1053
+ cursor: ew-resize;
1054
+ }
1055
+
1056
+ .vitro-markup-resizer-bl {
1057
+ left: -7px;
1058
+ bottom: -7px;
1059
+ cursor: nesw-resize;
1060
+ }
1061
+
1062
+ .vitro-markup-resizer-bc {
1063
+ left: calc(50% - 6px);
1064
+ bottom: -7px;
1065
+ cursor: ns-resize;
1066
+ }
1067
+
1068
+ .vitro-markup-resizer-br {
1069
+ right: -7px;
1070
+ bottom: -7px;
1071
+ cursor: nwse-resize;
1007
1072
  }
@@ -60,6 +60,7 @@
60
60
  width: 8px;
61
61
  height: 8px;
62
62
  border-radius: 50%;
63
+ flex-shrink: 0;
63
64
  }
64
65
 
65
66
  .TWClassHoveredCell,
package/dist/index.js CHANGED
@@ -21412,6 +21412,7 @@ var CFG_ATTRIBUTE;
21412
21412
  CFG_ATTRIBUTE["SHOW_V_SCROLL"] = "ShowVScroll";
21413
21413
  CFG_ATTRIBUTE["MID_WIDTH"] = "MidWidth";
21414
21414
  CFG_ATTRIBUTE["RIGHT_WIDTH"] = "RightWidth";
21415
+ CFG_ATTRIBUTE["SCROLL_TOP"] = "ScrollTop";
21415
21416
  })(CFG_ATTRIBUTE || (CFG_ATTRIBUTE = {}));
21416
21417
  var URL;
21417
21418
  (function (URL) {
@@ -63645,9 +63646,10 @@ var CopyButton = function CopyButton(props) {
63645
63646
  });
63646
63647
  };
63647
63648
 
63648
- var RightButtonGroup = function RightButtonGroup(props) {
63649
+ var RightButtonGroup = React.forwardRef(function (props, ref) {
63649
63650
  return React__default.createElement(FlexBox, {
63650
- className: styles$N['vitro-right']
63651
+ className: styles$N['vitro-right'],
63652
+ ref: ref
63651
63653
  }, props.isShowButtonClear && React__default.createElement(ImageButton, {
63652
63654
  className: styles$N['vitro-button-close'],
63653
63655
  onClick: function onClick() {
@@ -63667,7 +63669,7 @@ var RightButtonGroup = function RightButtonGroup(props) {
63667
63669
  return props.selectedValueTemplate(x);
63668
63670
  }).join(CTRL.COMMA)
63669
63671
  }) : null);
63670
- };
63672
+ });
63671
63673
 
63672
63674
  var LOCALE$6;
63673
63675
  (function (LOCALE) {
@@ -63707,6 +63709,7 @@ var LookupPicker = React.forwardRef(function (props, ref) {
63707
63709
  var containerRef = React.useRef(null);
63708
63710
  var isShowTooltipRef = React.useRef(true);
63709
63711
  var scrollBarRef = React.useRef(null);
63712
+ var rightButtonGroupRef = React.useRef(null);
63710
63713
  var updatePending = function updatePending(valueList) {
63711
63714
  return setPending(valueList ? false : true);
63712
63715
  };
@@ -63782,9 +63785,6 @@ var LookupPicker = React.forwardRef(function (props, ref) {
63782
63785
  }
63783
63786
  }
63784
63787
  };
63785
- React.useEffect(function () {
63786
- onInputValueUpdated();
63787
- }, [inputValue]);
63788
63788
  React.useEffect(function () {
63789
63789
  if (props.valueList && selectedValueList) {
63790
63790
  updateFilteredValueList(props.valueList.filter(function (x) {
@@ -63826,11 +63826,10 @@ var LookupPicker = React.forwardRef(function (props, ref) {
63826
63826
  return props.selectedValueTemplate ? props.selectedValueTemplate(value) : value.title;
63827
63827
  };
63828
63828
  var onChange = function onChange(e) {
63829
- var _inputRef$current;
63830
63829
  setState(styles$N['vitro-focus']);
63831
63830
  setValueListVisible(true);
63832
63831
  setInputValue(e.target.value);
63833
- (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
63832
+ onInputValueUpdated();
63834
63833
  };
63835
63834
  var onKeyDown = function onKeyDown(e) {
63836
63835
  var keyBoardBackSpace = 8;
@@ -63899,8 +63898,8 @@ var LookupPicker = React.forwardRef(function (props, ref) {
63899
63898
  };
63900
63899
  var onOptionValueDelete = function onOptionValueDelete(id) {
63901
63900
  if (!props.isDisabled) {
63902
- var _inputRef$current2;
63903
- (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.focus();
63901
+ var _inputRef$current;
63902
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
63904
63903
  var newSelectedValueList = id ? selectedValueList.filter(function (x) {
63905
63904
  return x.id !== id;
63906
63905
  }) : [];
@@ -63917,7 +63916,7 @@ var LookupPicker = React.forwardRef(function (props, ref) {
63917
63916
  }
63918
63917
  var target = e.currentTarget;
63919
63918
  var isValueListItem = Boolean(props.isMultiSelect && ((_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 ? void 0 : _document$activeEleme.classList.contains(valueListStyles['vitro-item'])));
63920
- if (!target.contains(document.activeElement) && !isValueListItem) {
63919
+ if (!target.contains(document.activeElement) && !(e.target.parentElement == rightButtonGroupRef.current) && !isValueListItem) {
63921
63920
  setValueListVisible(false);
63922
63921
  setInputValue(CTRL.EMPTY);
63923
63922
  if (props.onBlur && !props.isDisabled) {
@@ -63929,7 +63928,7 @@ var LookupPicker = React.forwardRef(function (props, ref) {
63929
63928
  }
63930
63929
  };
63931
63930
  var onFocus = function onFocus(e) {
63932
- var _inputRef$current3;
63931
+ var _inputRef$current2;
63933
63932
  if (scrollBarRef.current) {
63934
63933
  scrollBarRef.current.scrollTop = scrollBarRef.current.scrollHeight;
63935
63934
  }
@@ -63937,16 +63936,14 @@ var LookupPicker = React.forwardRef(function (props, ref) {
63937
63936
  isShowTooltipRef.current = false;
63938
63937
  setState(styles$N['vitro-focus']);
63939
63938
  setValueListVisible(true);
63940
- (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.focus();
63939
+ (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.focus();
63941
63940
  if (props.onFocus) {
63942
63941
  props.onFocus(e);
63943
63942
  }
63944
63943
  };
63945
63944
  var onCollapseButtonClick = function onCollapseButtonClick(valueListVisible) {
63946
63945
  setValueListVisible(!valueListVisible);
63947
- if (!valueListVisible) {
63948
- onInputValueUpdated();
63949
- }
63946
+ onFocus(null);
63950
63947
  };
63951
63948
  var getClassName = function getClassName() {
63952
63949
  var classList = [styles$N['vitro-lookup-picker'], props.className];
@@ -63994,14 +63991,13 @@ var LookupPicker = React.forwardRef(function (props, ref) {
63994
63991
  isReadOnly: props.isReadOnly,
63995
63992
  isValueListVisible: valueListVisible,
63996
63993
  getHtmlValue: getHtmlValue
63997
- }) : !valueListVisible && React__default.createElement("div", {
63994
+ }) : !valueListVisible && props.placeholder && React__default.createElement("div", {
63998
63995
  className: styles$N['vitro-placeholder']
63999
63996
  }, props.placeholder), isEditable && React__default.createElement("input", {
64000
63997
  ref: inputRef,
64001
63998
  value: inputValue,
64002
63999
  onKeyDown: onKeyDown,
64003
- onChange: onChange,
64004
- onFocus: onFocus
64000
+ onChange: onChange
64005
64001
  }), !props.isDisabled && props.children);
64006
64002
  var isShowButtonClear = props.isShowButtonClear !== false && !props.isMultiSelect && selectedValueList && selectedValueList.length > 0 && isEditable;
64007
64003
  return React__default.createElement("div", {
@@ -64035,7 +64031,8 @@ var LookupPicker = React.forwardRef(function (props, ref) {
64035
64031
  onClickSearchButton: onSearch,
64036
64032
  onOptionValueDelete: onOptionValueDelete,
64037
64033
  onCollapseButtonClick: onCollapseButtonClick,
64038
- selectedValueTemplate: props.selectedValueTemplate
64034
+ selectedValueTemplate: props.selectedValueTemplate,
64035
+ ref: rightButtonGroupRef
64039
64036
  }) : null), isEditable && (!props.filterMinLength || props.filterMinLength <= inputValue.length) && React__default.createElement(ValueList, {
64040
64037
  isPending: pending,
64041
64038
  inputValue: inputValue,
@@ -66607,7 +66604,7 @@ var styles$W = {"vitro-search":"_search_vitro-search_QkJksC_","vitro-active":"_s
66607
66604
 
66608
66605
  var CONDITION_CONTAINS = 11;
66609
66606
  var CSS_CLASS_ACTIVE$1 = 'vitro-active';
66610
- var Search = function Search(props) {
66607
+ var Search = React.forwardRef(function (props, ref) {
66611
66608
  var _useState = React.useState(false),
66612
66609
  isShowDialog = _useState[0],
66613
66610
  setIsShowDialog = _useState[1];
@@ -66628,12 +66625,20 @@ var Search = function Search(props) {
66628
66625
  setSendedSearchCriterionList = _useState6[1];
66629
66626
  var searchInputRef = React.useRef(null);
66630
66627
  var searchRef = React.useRef(null);
66628
+ var destinationRef = React.useRef(props.destination);
66631
66629
  var eventService = inversifyReact.useInjection(SERVICE.EVENT);
66632
66630
  var localeService = inversifyReact.useInjection(SERVICE.LOCALE);
66633
66631
  var columnService = inversifyReact.useInjection(SERVICE.COLUMN);
66634
66632
  var guidService = inversifyReact.useInjection(SERVICE.GUID);
66635
66633
  var inputPlaceholder = localeService.create(LOCALE$8.SEARCH_INPUT_PLACEHOLDER);
66636
66634
  var defaultSearchFieldName = FIELD$1.NAME;
66635
+ React.useImperativeHandle(ref, function () {
66636
+ return {
66637
+ setDestination: function setDestination(destination) {
66638
+ destinationRef.current = destination;
66639
+ }
66640
+ };
66641
+ });
66637
66642
  React.useEffect(function () {
66638
66643
  if (props.searchCriterionList) {
66639
66644
  setSearchCriterionList(props.searchCriterionList);
@@ -66670,7 +66675,7 @@ var Search = function Search(props) {
66670
66675
  eventService.send(exports.EVENT.SEARCH, {
66671
66676
  searchCriterionList: list,
66672
66677
  source: props.id,
66673
- destination: props.destination
66678
+ destination: destinationRef.current
66674
66679
  });
66675
66680
  }
66676
66681
  }, [props.parentId]);
@@ -66783,7 +66788,7 @@ var Search = function Search(props) {
66783
66788
  eventService.send(exports.EVENT.SEARCH, {
66784
66789
  searchCriterionList: null,
66785
66790
  source: props.id,
66786
- destination: props.destination
66791
+ destination: destinationRef.current
66787
66792
  });
66788
66793
  };
66789
66794
  var getInputCriterionList = function getInputCriterionList(value) {
@@ -66836,7 +66841,7 @@ var Search = function Search(props) {
66836
66841
  eventService.send(exports.EVENT.SEARCH, {
66837
66842
  searchCriterionList: list,
66838
66843
  source: props.id,
66839
- destination: props.destination
66844
+ destination: destinationRef.current
66840
66845
  });
66841
66846
  };
66842
66847
  return React__default.createElement("div", {
@@ -66872,7 +66877,7 @@ var Search = function Search(props) {
66872
66877
  setSearchCriterionList: setSearchCriterionList,
66873
66878
  searchRef: searchRef
66874
66879
  }));
66875
- };
66880
+ });
66876
66881
 
66877
66882
  var styles$X = {"vitro-viewer-issue-list":"_viewer-issue-list_vitro-viewer-issue-list_NgsIC86","vitro-search-wrap":"_viewer-issue-list_vitro-search-wrap_1relfMg","vitro-issue-list-wrap":"_viewer-issue-list_vitro-issue-list-wrap_jT8ou5P"};
66878
66883
 
@@ -67107,7 +67112,7 @@ var Viewer = function Viewer(props) {
67107
67112
  };
67108
67113
 
67109
67114
  var name = "@vitrosoftware/common-ui-ts";
67110
- var version$1 = "1.1.224";
67115
+ var version$1 = "1.1.226";
67111
67116
  var description = "vitro software common ui ts";
67112
67117
  var author = "";
67113
67118
  var license = "MIT";