@vitrosoftware/common-ui-ts 1.1.265 → 1.1.267

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.
@@ -15423,8 +15423,8 @@ div:focus-visible {
15423
15423
  max-width: 100%;
15424
15424
  }
15425
15425
 
15426
- #compareTreeContent,
15427
- .jstree-container-ul {
15426
+ #compareTreeContent,
15427
+ #compareTreeContent > .jstree-container-ul {
15428
15428
  width: 100%;
15429
15429
  }
15430
15430
 
@@ -1151,8 +1151,8 @@ div:focus-visible {
1151
1151
  max-width: 100%;
1152
1152
  }
1153
1153
 
1154
- #compareTreeContent,
1155
- .jstree-container-ul {
1154
+ #compareTreeContent,
1155
+ #compareTreeContent > .jstree-container-ul {
1156
1156
  width: 100%;
1157
1157
  }
1158
1158
 
@@ -34,7 +34,7 @@
34
34
 
35
35
  .vitro-name {
36
36
  white-space: normal;
37
- padding-top: 4px;
37
+ min-height: 24px;
38
38
  }
39
39
 
40
40
  .vitro-workflow-route:global(.vitro-expanded) .vitro-expand-collapse-button > div,
@@ -60,4 +60,24 @@
60
60
  width: 24px;
61
61
  height: 24px;
62
62
  flex-shrink: 0;
63
+ }
64
+
65
+ .vitro-dropdown-button-container.vitro-right {
66
+ margin-bottom: auto;
67
+ }
68
+
69
+ .vitro-data-container-mobile {
70
+ padding-top: 4px;
71
+ }
72
+
73
+ .vitro-link,
74
+ .vitro-link:visited,
75
+ .vitro-link-mobile,
76
+ .vitro-link-mobile:visited {
77
+ font-size: 14px;
78
+ line-height: 16px;
79
+ }
80
+
81
+ .vitro-link-mobile {
82
+ margin-bottom: auto;
63
83
  }
@@ -159,15 +159,6 @@
159
159
  position: relative;
160
160
  }
161
161
 
162
- .vitro-data-container::after {
163
- content: '';
164
- width: 100%;
165
- height: 1px;
166
- position: absolute;
167
- top: 100%;
168
- background-color: rgba(228, 230, 236, 0.5);
169
- }
170
-
171
162
  .vitro-date-container {
172
163
  padding: 4px;
173
164
  }
package/dist/index.css CHANGED
@@ -9711,15 +9711,6 @@ div._component-loader_vitro-component-loader_3J3a2or {
9711
9711
  position: relative;
9712
9712
  }
9713
9713
 
9714
- ._workflow-route-task_vitro-data-container_1xfMmR3::after {
9715
- content: '';
9716
- width: 100%;
9717
- height: 1px;
9718
- position: absolute;
9719
- top: 100%;
9720
- background-color: rgba(228, 230, 236, 0.5);
9721
- }
9722
-
9723
9714
  ._workflow-route-task_vitro-date-container_hSQMuDR {
9724
9715
  padding: 4px;
9725
9716
  }
@@ -9864,7 +9855,7 @@ div._component-loader_vitro-component-loader_3J3a2or {
9864
9855
 
9865
9856
  ._workflow-route_vitro-name_28vFhFk {
9866
9857
  white-space: normal;
9867
- padding-top: 4px;
9858
+ min-height: 24px;
9868
9859
  }
9869
9860
 
9870
9861
  ._workflow-route_vitro-workflow-route_3dG_len.vitro-expanded ._workflow-route_vitro-expand-collapse-button_fnksjDH > div,
@@ -9890,4 +9881,24 @@ div._component-loader_vitro-component-loader_3J3a2or {
9890
9881
  width: 24px;
9891
9882
  height: 24px;
9892
9883
  flex-shrink: 0;
9884
+ }
9885
+
9886
+ ._workflow-route_vitro-dropdown-button-container_1YxXjBP._workflow-route_vitro-right_2M1Zu0u {
9887
+ margin-bottom: auto;
9888
+ }
9889
+
9890
+ ._workflow-route_vitro-data-container-mobile_33d2eWF {
9891
+ padding-top: 4px;
9892
+ }
9893
+
9894
+ ._workflow-route_vitro-link_11JiIao,
9895
+ ._workflow-route_vitro-link_11JiIao:visited,
9896
+ ._workflow-route_vitro-link-mobile_2SWgLD8,
9897
+ ._workflow-route_vitro-link-mobile_2SWgLD8:visited {
9898
+ font-size: 14px;
9899
+ line-height: 16px;
9900
+ }
9901
+
9902
+ ._workflow-route_vitro-link-mobile_2SWgLD8 {
9903
+ margin-bottom: auto;
9893
9904
  }
package/dist/index.js CHANGED
@@ -495,7 +495,17 @@ var ScrollBar = React.forwardRef(function (props, outerRef) {
495
495
  var scrollElementRef = React.useRef(null);
496
496
  var observerRef = React.useRef();
497
497
  React.useImperativeHandle(outerRef, function () {
498
- return ref.current;
498
+ var element = ref.current;
499
+ if (element) {
500
+ return Object.assign(element, {
501
+ update: function update() {
502
+ if (scrollElementRef.current) {
503
+ scrollElementRef.current.update();
504
+ }
505
+ }
506
+ });
507
+ }
508
+ return element;
499
509
  }, []);
500
510
  React.useEffect(function () {
501
511
  return function () {
@@ -504,6 +514,12 @@ var ScrollBar = React.forwardRef(function (props, outerRef) {
504
514
  }
505
515
  };
506
516
  }, []);
517
+ React.useEffect(function () {
518
+ if (scrollElementRef.current && scrollElementRef.current.settings) {
519
+ scrollElementRef.current.settings.wheelPropagation = props.isWheelPropagation;
520
+ scrollElementRef.current.update();
521
+ }
522
+ }, [props.isWheelPropagation]);
507
523
  var isDisplayNone = function isDisplayNone(element) {
508
524
  var style = window.getComputedStyle(element);
509
525
  return style.display === DISPLAY.NONE;
@@ -547,7 +563,8 @@ var ScrollBar = React.forwardRef(function (props, outerRef) {
547
563
  var init = function init() {
548
564
  if (w.PerfectScrollbar) {
549
565
  var scrollElement = new w.PerfectScrollbar(ref.current, {
550
- suppressScrollX: props.isHideScrollX
566
+ suppressScrollX: props.isHideScrollX,
567
+ wheelPropagation: props.isWheelPropagation
551
568
  });
552
569
  scrollElementRef.current = scrollElement;
553
570
  if (w.addResizeListener && ref.current) {
@@ -567,24 +584,18 @@ var ScrollBar = React.forwardRef(function (props, outerRef) {
567
584
  addObserver();
568
585
  }
569
586
  };
570
- var onWheel = function onWheel(e) {
571
- if (props.isPreventParentScroll) {
572
- e.stopPropagation();
573
- }
574
- };
575
587
  var onScrollY = function onScrollY(e) {
576
588
  if (ref.current && props.onScrollY) {
577
589
  props.onScrollY(e, ref.current);
578
590
  }
579
591
  };
580
- return React__default.createElement("div", {
592
+ return React__default.createElement("div", Object.assign({}, props, {
581
593
  ref: ref,
582
594
  className: props.className || CTRL.EMPTY
583
- }, React__default.createElement("div", Object.assign({}, props, {
595
+ }), React__default.createElement("div", {
584
596
  ref: props.contentRef,
585
- onWheel: onWheel,
586
597
  className: styles$1['vitro-scrollbar-content'] + (props.contentClassName ? CTRL.SPACE + props.contentClassName : CTRL.EMPTY)
587
- }), props.children));
598
+ }, props.children));
588
599
  });
589
600
 
590
601
  (function (EVENT) {
@@ -60490,6 +60501,7 @@ KEY_CODE.ESC = 27;
60490
60501
  KEY_CODE.ARROW_RIGHT = 39;
60491
60502
  KEY_CODE.ARROW_LEFT = 37;
60492
60503
  KEY_CODE.TAB = 9;
60504
+ KEY_CODE.BACKSPACE = 8;
60493
60505
 
60494
60506
  var styles$l = {"vitro-dialog":"_dialog_vitro-dialog_2NzcRZg","vitro-dialog-button-close":"_dialog_vitro-dialog-button-close_2TF5iry","vitro-hidden-content":"_dialog_vitro-hidden-content_niGbpGx","vitro-hidden":"_dialog_vitro-hidden_1kSAyNC","vitro-display-none":"_dialog_vitro-display-none_T-eWeyA"};
60495
60507
 
@@ -63888,7 +63900,7 @@ var ValueList = function ValueList(props) {
63888
63900
  onMouseDown: onMouseDown
63889
63901
  }, React__default.createElement(ScrollBar, {
63890
63902
  onInit: setScrollableElement,
63891
- isPreventParentScroll: true
63903
+ isWheelPropagation: false
63892
63904
  }, isProgressVisible && React__default.createElement(FlexBox, {
63893
63905
  className: valueListStyles['vitro-progress-container']
63894
63906
  }, React__default.createElement(Progress, null)), !isProgressVisible && React__default.createElement(React__default.Fragment, null, props.list.length > 0 ? props.list.sort(sortValueList).map(function (x) {
@@ -64017,6 +64029,12 @@ var LookupPicker = React.forwardRef(function (props, ref) {
64017
64029
  var _useState8 = React.useState(false),
64018
64030
  isSearchInProgress = _useState8[0],
64019
64031
  setIsSearchInProgress = _useState8[1];
64032
+ var _useState9 = React.useState(false),
64033
+ isValueSelected = _useState9[0],
64034
+ setIsValueSelected = _useState9[1];
64035
+ var _useState0 = React.useState(false),
64036
+ isValueDeleted = _useState0[0],
64037
+ setIsValueDeleted = _useState0[1];
64020
64038
  var localeService = props.container ? props.container.get(SERVICE.LOCALE) : inversifyReact.useInjection(SERVICE.LOCALE);
64021
64039
  var isEditable = !props.isDisabled && !props.isReadOnly;
64022
64040
  var isInputReadOnly = !(props.getValueList || props.getAllValueList || props.valueList);
@@ -64026,6 +64044,12 @@ var LookupPicker = React.forwardRef(function (props, ref) {
64026
64044
  var isShowTooltipRef = React.useRef(true);
64027
64045
  var scrollBarRef = React.useRef(null);
64028
64046
  var rightButtonGroupRef = React.useRef(null);
64047
+ var deletedIdListRef = React.useRef([]);
64048
+ var keyDownTimeout = React.useMemo(function () {
64049
+ return {
64050
+ id: null
64051
+ };
64052
+ }, []);
64029
64053
  React.useEffect(function () {
64030
64054
  updateFilteredValueList(props.valueList || []);
64031
64055
  setSelectedValueList(createDefaultSelectedValueList);
@@ -64152,11 +64176,25 @@ var LookupPicker = React.forwardRef(function (props, ref) {
64152
64176
  onInputValueUpdated(e.target.value);
64153
64177
  };
64154
64178
  var onKeyDown = function onKeyDown(e) {
64155
- var keyBoardBackSpace = 8;
64156
- if (e.keyCode === keyBoardBackSpace && e.target.value.length === 0 && selectedValueList.length > 0) {
64157
- var newValueList = [].concat(selectedValueList);
64158
- var lastValue = newValueList.pop();
64159
- onOptionValueDelete(lastValue.id);
64179
+ if (e.keyCode === KEY_CODE.BACKSPACE && e.target.value.length === 0) {
64180
+ var selectedList = selectedValueList.filter(function (item) {
64181
+ return !deletedIdListRef.current.includes(item.id);
64182
+ });
64183
+ if (selectedList.length > 0) {
64184
+ deletedIdListRef.current.push(selectedList.pop().id);
64185
+ if (keyDownTimeout.id) {
64186
+ clearTimeout(keyDownTimeout.id);
64187
+ }
64188
+ setSelectedValueList(selectedList);
64189
+ setIsValueDeleted(true);
64190
+ keyDownTimeout.id = setTimeout(function () {
64191
+ keyDownTimeout.id = null;
64192
+ props.onChange && props.onChange(props.isMultiSelect ? selectedList : selectedList.find(function (x) {
64193
+ return x;
64194
+ }), props.name);
64195
+ deletedIdListRef.current = [];
64196
+ }, 300);
64197
+ }
64160
64198
  }
64161
64199
  };
64162
64200
  var filterByText = function filterByText(value) {
@@ -64176,6 +64214,14 @@ var LookupPicker = React.forwardRef(function (props, ref) {
64176
64214
  setPending(true);
64177
64215
  }
64178
64216
  };
64217
+ React.useEffect(function () {
64218
+ if (isValueSelected) {
64219
+ if (scrollBarRef.current) {
64220
+ scrollBarRef.current.scrollTop = scrollBarRef.current.scrollHeight;
64221
+ }
64222
+ setIsValueSelected(false);
64223
+ }
64224
+ }, [isValueSelected]);
64179
64225
  var onOptionValueSelect = function onOptionValueSelect(id) {
64180
64226
  var valueList = props.valueList ? props.valueList : filteredValueList;
64181
64227
  var selectedValue = valueList.find(function (x) {
@@ -64190,6 +64236,7 @@ var LookupPicker = React.forwardRef(function (props, ref) {
64190
64236
  }
64191
64237
  if (props.isMultiSelect) {
64192
64238
  inputRef && inputRef.current && inputRef.current.focus();
64239
+ setIsValueSelected(true);
64193
64240
  } else {
64194
64241
  setValueListVisible(false);
64195
64242
  setState(CTRL.EMPTY);
@@ -64219,27 +64266,37 @@ var LookupPicker = React.forwardRef(function (props, ref) {
64219
64266
  return true;
64220
64267
  }
64221
64268
  };
64269
+ React.useEffect(function () {
64270
+ if (isValueDeleted) {
64271
+ if (scrollBarRef.current) {
64272
+ scrollBarRef.current.update();
64273
+ }
64274
+ setIsValueDeleted(false);
64275
+ }
64276
+ }, [isValueDeleted]);
64222
64277
  var onOptionValueDelete = function onOptionValueDelete(id) {
64223
64278
  if (!props.isDisabled) {
64224
64279
  var _inputRef$current3;
64225
- (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.focus();
64280
+ (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.focus({
64281
+ preventScroll: true
64282
+ });
64226
64283
  var newSelectedValueList = id ? selectedValueList.filter(function (x) {
64227
64284
  return x.id !== id;
64228
64285
  }) : [];
64229
64286
  setSelectedValueList(newSelectedValueList);
64287
+ setIsValueDeleted(true);
64230
64288
  props.onChange && props.onChange(props.isMultiSelect ? newSelectedValueList : newSelectedValueList.find(function (x) {
64231
64289
  return x;
64232
64290
  }), props.name);
64233
64291
  }
64234
64292
  };
64235
64293
  var onFocusOut = function onFocusOut(e) {
64236
- var _document$activeEleme;
64237
- if (scrollBarRef.current) {
64238
- scrollBarRef.current.scrollTop = 0;
64239
- }
64240
- var target = e.currentTarget;
64241
- var isValueListItem = Boolean(props.isMultiSelect && ((_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 ? void 0 : _document$activeEleme.classList.contains(valueListStyles['vitro-item'])));
64242
- if (!target.contains(document.activeElement) && !(e.target.parentElement == rightButtonGroupRef.current) && !isValueListItem) {
64294
+ var _e$relatedTarget;
64295
+ var isValueListItem = Boolean(props.isMultiSelect && ((_e$relatedTarget = e.relatedTarget) === null || _e$relatedTarget === void 0 ? void 0 : _e$relatedTarget.classList.contains(valueListStyles['vitro-item'])));
64296
+ if (!e.currentTarget.contains(e.relatedTarget) && !isValueListItem) {
64297
+ if (scrollBarRef.current) {
64298
+ scrollBarRef.current.scrollTop = 0;
64299
+ }
64243
64300
  setValueListVisible(false);
64244
64301
  setInputValue(CTRL.EMPTY);
64245
64302
  if (props.onBlur && !props.isDisabled) {
@@ -64251,20 +64308,22 @@ var LookupPicker = React.forwardRef(function (props, ref) {
64251
64308
  }
64252
64309
  };
64253
64310
  var onFocus = function onFocus(e) {
64254
- var _inputRef$current4;
64255
- if (scrollBarRef.current) {
64256
- scrollBarRef.current.scrollTop = scrollBarRef.current.scrollHeight;
64257
- }
64258
- if (!valueListVisible) {
64259
- var _e$target;
64260
- onInputValueUpdated((e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value) || CTRL.EMPTY);
64261
- }
64262
- isShowTooltipRef.current = false;
64263
- setState(styles$O['vitro-focus']);
64264
- expandValueList();
64265
- (_inputRef$current4 = inputRef.current) === null || _inputRef$current4 === void 0 ? void 0 : _inputRef$current4.focus();
64266
- if (props.onFocus) {
64267
- props.onFocus(e);
64311
+ if (state !== styles$O['vitro-focus']) {
64312
+ var _inputRef$current4;
64313
+ if (scrollBarRef.current) {
64314
+ scrollBarRef.current.scrollTop = scrollBarRef.current.scrollHeight;
64315
+ }
64316
+ if (!valueListVisible) {
64317
+ var _e$target;
64318
+ onInputValueUpdated((e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value) || CTRL.EMPTY);
64319
+ }
64320
+ isShowTooltipRef.current = false;
64321
+ setState(styles$O['vitro-focus']);
64322
+ expandValueList();
64323
+ (_inputRef$current4 = inputRef.current) === null || _inputRef$current4 === void 0 ? void 0 : _inputRef$current4.focus();
64324
+ if (props.onFocus) {
64325
+ props.onFocus(e);
64326
+ }
64268
64327
  }
64269
64328
  };
64270
64329
  var onCollapseButtonClick = function onCollapseButtonClick(valueListVisible) {
@@ -64356,7 +64415,8 @@ var LookupPicker = React.forwardRef(function (props, ref) {
64356
64415
  }, props.isMultiSelect ? React__default.createElement(ScrollBar, {
64357
64416
  contentClassName: styles$O['vitro-multi-value-container'],
64358
64417
  onClick: onFocus,
64359
- ref: scrollBarRef
64418
+ ref: scrollBarRef,
64419
+ isWheelPropagation: state === styles$O['vitro-focus'] ? false : true
64360
64420
  }, content) : React__default.createElement(FlexBox, {
64361
64421
  className: styles$O['vitro-value-container'],
64362
64422
  onClick: onFocus
@@ -67269,6 +67329,9 @@ var Search = React.forwardRef(function (props, ref) {
67269
67329
  return {
67270
67330
  setDestination: function setDestination(destination) {
67271
67331
  destinationRef.current = destination;
67332
+ },
67333
+ getDestination: function getDestination() {
67334
+ return destinationRef.current;
67272
67335
  }
67273
67336
  };
67274
67337
  });
@@ -67760,7 +67823,7 @@ var Viewer = function Viewer(props) {
67760
67823
  };
67761
67824
 
67762
67825
  var name = "@vitrosoftware/common-ui-ts";
67763
- var version$1 = "1.1.265";
67826
+ var version$1 = "1.1.267";
67764
67827
  var description = "vitro software common ui ts";
67765
67828
  var author = "";
67766
67829
  var license = "MIT";
@@ -87165,7 +87228,7 @@ var WorkflowRouteStep = function WorkflowRouteStep(props) {
87165
87228
  }, props.children);
87166
87229
  };
87167
87230
 
87168
- var styles$25 = {"vitro-workflow-route":"_workflow-route_vitro-workflow-route_3dG_len","vitro-resolved":"_workflow-route_vitro-resolved_kJ_qzSx","vitro-right":"_workflow-route_vitro-right_2M1Zu0u","vitro-workflow-route-header":"_workflow-route_vitro-workflow-route-header_35BWBU5","vitro-workflow-route-header-mobile":"_workflow-route_vitro-workflow-route-header-mobile_2AvvUfH","vitro-active":"_workflow-route_vitro-active_1_97-zX","vitro-workflow-route-content":"_workflow-route_vitro-workflow-route-content_32GXb3u","vitro-name":"_workflow-route_vitro-name_28vFhFk","vitro-expand-collapse-button":"_workflow-route_vitro-expand-collapse-button_fnksjDH","vitro-expand-collapse-button-mobile":"_workflow-route_vitro-expand-collapse-button-mobile_2FBiUgU","vitro-dropdown-button-container":"_workflow-route_vitro-dropdown-button-container_1YxXjBP","vitro-expand-collapse-button-empty":"_workflow-route_vitro-expand-collapse-button-empty_2dD9Q24"};
87231
+ var styles$25 = {"vitro-workflow-route":"_workflow-route_vitro-workflow-route_3dG_len","vitro-resolved":"_workflow-route_vitro-resolved_kJ_qzSx","vitro-right":"_workflow-route_vitro-right_2M1Zu0u","vitro-workflow-route-header":"_workflow-route_vitro-workflow-route-header_35BWBU5","vitro-workflow-route-header-mobile":"_workflow-route_vitro-workflow-route-header-mobile_2AvvUfH","vitro-active":"_workflow-route_vitro-active_1_97-zX","vitro-workflow-route-content":"_workflow-route_vitro-workflow-route-content_32GXb3u","vitro-name":"_workflow-route_vitro-name_28vFhFk","vitro-expand-collapse-button":"_workflow-route_vitro-expand-collapse-button_fnksjDH","vitro-expand-collapse-button-mobile":"_workflow-route_vitro-expand-collapse-button-mobile_2FBiUgU","vitro-dropdown-button-container":"_workflow-route_vitro-dropdown-button-container_1YxXjBP","vitro-expand-collapse-button-empty":"_workflow-route_vitro-expand-collapse-button-empty_2dD9Q24","vitro-data-container-mobile":"_workflow-route_vitro-data-container-mobile_33d2eWF","vitro-link":"_workflow-route_vitro-link_11JiIao","vitro-link-mobile":"_workflow-route_vitro-link-mobile_2SWgLD8"};
87169
87232
 
87170
87233
  var WorkflowRouteContent = function WorkflowRouteContent(props) {
87171
87234
  var nameContainerRef = React.useRef(null);
@@ -87177,9 +87240,15 @@ var WorkflowRouteContent = function WorkflowRouteContent(props) {
87177
87240
  isFullWidth: true,
87178
87241
  isColumn: true
87179
87242
  }, React__default.createElement(FlexBox, {
87180
- gap: 4,
87243
+ className: styles$25['vitro-data-container-mobile'],
87244
+ gap: 6,
87181
87245
  isFullWidth: true
87182
- }, React__default.createElement(ValueTooltip, {
87246
+ }, React__default.createElement(Link, {
87247
+ text: props.itemId,
87248
+ href: props.url,
87249
+ className: styles$25['vitro-link-mobile'],
87250
+ isTargetBlank: true
87251
+ }), React__default.createElement(ValueTooltip, {
87183
87252
  text: props.name,
87184
87253
  containerRef: nameContainerRef
87185
87254
  }, React__default.createElement("span", {
@@ -87202,7 +87271,12 @@ var WorkflowRouteContent = function WorkflowRouteContent(props) {
87202
87271
  className: styles$25['vitro-workflow-route-content'],
87203
87272
  gap: 6,
87204
87273
  isFullWidth: true
87205
- }, React__default.createElement(ValueTooltip, {
87274
+ }, React__default.createElement(Link, {
87275
+ text: props.itemId,
87276
+ href: props.url,
87277
+ className: styles$25['vitro-link'],
87278
+ isTargetBlank: true
87279
+ }), React__default.createElement(ValueTooltip, {
87206
87280
  text: props.name,
87207
87281
  containerRef: nameContainerRef
87208
87282
  }, React__default.createElement(Label, {