@vitrosoftware/common-ui-ts 1.1.230 → 1.1.232

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.
@@ -0,0 +1,6 @@
1
+ .vitro-icon-default {
2
+ flex-shrink: 0;
3
+ border-radius: 50%;
4
+ width: 8px;
5
+ height: 8px;
6
+ }
@@ -25,6 +25,8 @@
25
25
  display: flex;
26
26
  align-items: center;
27
27
  grid-gap: 8px;
28
+ position: relative;
29
+ min-height: 37px;
28
30
  }
29
31
 
30
32
  .vitro-value-list .vitro-item:last-child {
@@ -104,4 +106,17 @@
104
106
  .vitro-button:active,
105
107
  .vitro-button:focus {
106
108
  background-color: #F3F8FF;
109
+ }
110
+
111
+ .vitro-disabled::before {
112
+ content: "";
113
+ display: block;
114
+ background: #fff;
115
+ width: 100%;
116
+ height: 100%;
117
+ position: absolute;
118
+ left: 0;
119
+ top: 0;
120
+ opacity: 0.5;
121
+ cursor: initial;
107
122
  }
@@ -158,4 +158,5 @@
158
158
 
159
159
  .vitro-lookup-picker-multi-select :global(.ps__rail-x) {
160
160
  background-color: transparent !important;
161
+ color: #4A556C;
161
162
  }
@@ -0,0 +1,4 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M21 11V17C21 19.2091 19.2091 21 17 21H7C4.79086 21 3 19.2091 3 17V7C3 4.79086 4.79086 3 7 3H13" stroke="#222D44" stroke-linecap="round"/>
3
+ <path d="M22 4.1001L12.3289 13.9001L8 10.0024" stroke="#222D44" stroke-linecap="round" stroke-linejoin="round"/>
4
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M21 11V17C21 19.2091 19.2091 21 17 21H7C4.79086 21 3 19.2091 3 17V7C3 4.79086 4.79086 3 7 3H13" stroke="#222D44" stroke-linecap="round"/>
3
+ <path d="M17.9227 3.52798C18.2607 3.18992 18.7193 3 19.1973 3C19.6754 3 20.134 3.18992 20.472 3.52798C20.8101 3.86605 21 4.32456 21 4.80265C21 5.28075 20.8101 5.73926 20.472 6.07732L12.3991 14.1502L9 15L9.84978 11.6009L17.9227 3.52798Z" stroke="#222D44" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M16 6L18 8" stroke="#222D44" stroke-linecap="round" stroke-linejoin="round"/>
5
+ </svg>
@@ -8219,4 +8219,28 @@ dialog .separator {
8219
8219
  .compare-dlg_doc-b_name.field-grp {
8220
8220
  margin-bottom: 14px !important;
8221
8221
  margin-top: 1px !important;
8222
+ }
8223
+
8224
+ .context-menu-icon-edit:before {
8225
+ content: url('img/edit.svg');
8226
+ }
8227
+
8228
+ .context-menu-icon-end-edit:before {
8229
+ content: url('img/edit-done.svg');
8230
+ }/*
8231
+
8232
+ .pointer-events-none {
8233
+ pointer-events: none !important;
8234
+ }*/
8235
+
8236
+ .svgsketch-wrap {
8237
+ z-index: 150;
8238
+ }
8239
+
8240
+ .svgsketch-wrap svg > * {
8241
+ pointer-events: auto !important;
8242
+ }
8243
+
8244
+ .to-bg {
8245
+ z-index: 50;
8222
8246
  }
@@ -1217,4 +1217,28 @@ dialog .separator {
1217
1217
  .compare-dlg_doc-b_name.field-grp {
1218
1218
  margin-bottom: 14px !important;
1219
1219
  margin-top: 1px !important;
1220
+ }
1221
+
1222
+ .context-menu-icon-edit:before {
1223
+ content: url('img/edit.svg');
1224
+ }
1225
+
1226
+ .context-menu-icon-end-edit:before {
1227
+ content: url('img/edit-done.svg');
1228
+ }/*
1229
+
1230
+ .pointer-events-none {
1231
+ pointer-events: none !important;
1232
+ }*/
1233
+
1234
+ .svgsketch-wrap {
1235
+ z-index: 150;
1236
+ }
1237
+
1238
+ .svgsketch-wrap svg > * {
1239
+ pointer-events: auto !important;
1240
+ }
1241
+
1242
+ .to-bg {
1243
+ z-index: 50;
1220
1244
  }
@@ -38,14 +38,14 @@
38
38
  align-items: center;
39
39
  }
40
40
 
41
- .TWCell .vitro-flex > .vitro-image {
41
+ .TWCell div > .vitro-image {
42
42
  margin-right: 4px !important;
43
43
  line-height: 24px;
44
44
  width: 24px;
45
45
  height: 24px;
46
46
  }
47
47
 
48
- .TWCell .vitro-flex > .vitro-avatar {
48
+ .TWCell div > .vitro-avatar {
49
49
  width: 28px;
50
50
  height: 28px;
51
51
  min-width: 28px;
@@ -54,17 +54,8 @@
54
54
  margin-right: 4px;
55
55
  }
56
56
 
57
- .TWCell .vitro-task-status {
58
- display: flex;
57
+ .TWCell .vitro-icon {
59
58
  gap: 12px;
60
- align-items: center;
61
- }
62
-
63
- .TWCell .vitro-task-status > div {
64
- width: 8px;
65
- height: 8px;
66
- border-radius: 50%;
67
- flex-shrink: 0;
68
59
  }
69
60
 
70
61
  .TWClassHoveredCell,
package/dist/index.css CHANGED
@@ -4177,6 +4177,7 @@ div._component-loader_vitro-component-loader_3J3a2or {
4177
4177
 
4178
4178
  ._lookup-picker_vitro-lookup-picker-multi-select_3Lkq2tk .ps__rail-x {
4179
4179
  background-color: transparent !important;
4180
+ color: #4A556C;
4180
4181
  }
4181
4182
  ._lookup-picker-html-value_vitro-item-html-value_2QBoTey {
4182
4183
  height: -moz-fit-content;
@@ -4212,6 +4213,8 @@ div._component-loader_vitro-component-loader_3J3a2or {
4212
4213
  display: flex;
4213
4214
  align-items: center;
4214
4215
  grid-gap: 8px;
4216
+ position: relative;
4217
+ min-height: 37px;
4215
4218
  }
4216
4219
 
4217
4220
  ._lookup-picker-value-list_vitro-value-list_LSdCMjq ._lookup-picker-value-list_vitro-item_7yZBz5u:last-child {
@@ -4293,6 +4296,19 @@ div._component-loader_vitro-component-loader_3J3a2or {
4293
4296
  ._lookup-picker-value-list_vitro-button_3MejXb_:active,
4294
4297
  ._lookup-picker-value-list_vitro-button_3MejXb_:focus {
4295
4298
  background-color: #F3F8FF;
4299
+ }
4300
+
4301
+ ._lookup-picker-value-list_vitro-disabled_11rNtMo::before {
4302
+ content: "";
4303
+ display: block;
4304
+ background: #fff;
4305
+ width: 100%;
4306
+ height: 100%;
4307
+ position: absolute;
4308
+ left: 0;
4309
+ top: 0;
4310
+ opacity: 0.5;
4311
+ cursor: initial;
4296
4312
  }
4297
4313
  ._error-message_vitro-error-message_2lHJjgO {
4298
4314
  display: inline-block;
@@ -9269,3 +9285,10 @@ div._component-loader_vitro-component-loader_3J3a2or {
9269
9285
  height: 24px;
9270
9286
  filter: brightness(0) saturate(100%) invert(47%) sepia(82%) saturate(2920%) hue-rotate(196deg) brightness(92%) contrast(88%);
9271
9287
  }
9288
+
9289
+ ._icon_vitro-icon-default_3ZVGmps {
9290
+ flex-shrink: 0;
9291
+ border-radius: 50%;
9292
+ width: 8px;
9293
+ height: 8px;
9294
+ }
package/dist/index.js CHANGED
@@ -21425,6 +21425,7 @@ var TableViewServiceImpl = /*#__PURE__*/function () {
21425
21425
  this.searchCriterionMap = new Map();
21426
21426
  this.visibleColumnList = [];
21427
21427
  this.disabledActionList = [];
21428
+ this.disabledColumnList = [];
21428
21429
  this.grid = grid;
21429
21430
  this.id = grid.id;
21430
21431
  this.grid.Source.Upload.Format = this.gridChangesFormat;
@@ -63238,22 +63239,26 @@ var SelectedValueList = function SelectedValueList(props) {
63238
63239
  }));
63239
63240
  };
63240
63241
 
63241
- 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_"};
63242
+ 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"};
63242
63243
 
63243
63244
  var ValueListItem = function ValueListItem(props) {
63245
+ var isDisabled = props.item.isEnabled === false;
63244
63246
  var onKeyDown = function onKeyDown(e) {
63245
- if (e.keyCode === 13 && !e.shiftKey) {
63247
+ if (e.keyCode === 13 && !e.shiftKey && !isDisabled) {
63246
63248
  e.preventDefault();
63247
63249
  props.onSelect(props.item.id);
63248
63250
  }
63249
63251
  };
63252
+ var onMouseDown = function onMouseDown() {
63253
+ if (!isDisabled) {
63254
+ props.onSelect(props.item.id);
63255
+ }
63256
+ };
63250
63257
  return React__default.createElement("div", {
63251
63258
  key: props.item.id,
63252
- className: valueListStyles['vitro-item'],
63259
+ className: valueListStyles['vitro-item'] + (isDisabled ? CTRL.SPACE + valueListStyles['vitro-disabled'] : CTRL.EMPTY),
63253
63260
  onKeyDown: onKeyDown,
63254
- onMouseDown: function onMouseDown() {
63255
- return props.onSelect(props.item.id);
63256
- },
63261
+ onMouseDown: onMouseDown,
63257
63262
  tabIndex: 0
63258
63263
  }, props.htmlValue ? React__default.createElement("div", {
63259
63264
  className: htmlValueStyles['vitro-item-html-value']
@@ -63414,7 +63419,7 @@ var RightButtonGroup = React.forwardRef(function (props, ref) {
63414
63419
  }), props.isEditable && props.isShowSearchButton && props.onClickSearchButton && React__default.createElement(ImageButton, {
63415
63420
  onClick: props.onClickSearchButton,
63416
63421
  className: styles$N['vitro-library-button']
63417
- }), props.isReadOnly ? React__default.createElement(CopyButton, {
63422
+ }), props.isReadOnly && props.isShowCopyButton !== false ? React__default.createElement(CopyButton, {
63418
63423
  className: styles$N['vitro-copy-button'],
63419
63424
  value: props.selectedValueList.map(function (x) {
63420
63425
  return props.selectedValueTemplate(x);
@@ -63455,6 +63460,7 @@ var LookupPicker = React.forwardRef(function (props, ref) {
63455
63460
  setState = _useState7[1];
63456
63461
  var localeService = props.container ? props.container.get(SERVICE.LOCALE) : inversifyReact.useInjection(SERVICE.LOCALE);
63457
63462
  var isEditable = !props.isDisabled && !props.isReadOnly;
63463
+ var isInputReadOnly = !(props.getValueList || props.getAllValueList || props.valueList);
63458
63464
  var inputRef = React.useRef(null);
63459
63465
  var contentRef = React.useRef(null);
63460
63466
  var containerRef = React.useRef(null);
@@ -63690,7 +63696,8 @@ var LookupPicker = React.forwardRef(function (props, ref) {
63690
63696
  scrollBarRef.current.scrollTop = scrollBarRef.current.scrollHeight;
63691
63697
  }
63692
63698
  if (!valueListVisible) {
63693
- onInputValueUpdated(e.target.value);
63699
+ var _e$target;
63700
+ onInputValueUpdated((e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value) || CTRL.EMPTY);
63694
63701
  }
63695
63702
  isShowTooltipRef.current = false;
63696
63703
  setState(styles$N['vitro-focus']);
@@ -63745,6 +63752,11 @@ var LookupPicker = React.forwardRef(function (props, ref) {
63745
63752
  });
63746
63753
  }
63747
63754
  };
63755
+ var onClickInput = function onClickInput() {
63756
+ if (isInputReadOnly && props.isShowSearchButton) {
63757
+ onSearch();
63758
+ }
63759
+ };
63748
63760
  var content = React__default.createElement(React__default.Fragment, null, selectedValueList && selectedValueList.length > 0 && (props.isMultiSelect ? true : inputValue.length === 0) ? React__default.createElement(SelectedValueList, {
63749
63761
  list: selectedValueList,
63750
63762
  onOptionValueDelete: onOptionValueDelete,
@@ -63759,7 +63771,9 @@ var LookupPicker = React.forwardRef(function (props, ref) {
63759
63771
  ref: inputRef,
63760
63772
  value: inputValue,
63761
63773
  onKeyDown: onKeyDown,
63762
- onChange: onChange
63774
+ onChange: onChange,
63775
+ readOnly: isInputReadOnly,
63776
+ onClick: onClickInput
63763
63777
  }), !props.isDisabled && props.children);
63764
63778
  var isShowButtonClear = props.isShowButtonClear !== false && !props.isMultiSelect && selectedValueList && selectedValueList.length > 0 && isEditable;
63765
63779
  return React__default.createElement("div", {
@@ -63790,6 +63804,7 @@ var LookupPicker = React.forwardRef(function (props, ref) {
63790
63804
  isValueListVisible: valueListVisible,
63791
63805
  isShowExpandButton: props.filterMinLength == 0,
63792
63806
  isShowSearchButton: props.isShowSearchButton,
63807
+ isShowCopyButton: props.isShowCopyButton,
63793
63808
  onClickSearchButton: onSearch,
63794
63809
  onOptionValueDelete: onOptionValueDelete,
63795
63810
  onCollapseButtonClick: onCollapseButtonClick,
@@ -63948,7 +63963,7 @@ var BaseLookupPicker = function BaseLookupPicker(props) {
63948
63963
  }
63949
63964
  }, [itemSelectDialogService, itemService]);
63950
63965
  var getSettings = React.useCallback(function (props) {
63951
- var _props$data, _props$data2, _props$data4, _props$data5, _props$data6, _props$data7, _props$data9, _props$data10, _props$data11, _props$data12;
63966
+ var _props$data, _props$data2, _props$data4, _props$data5, _props$data6, _props$data7, _props$data9, _props$data10, _props$data13, _props$data14;
63952
63967
  var searchSymbolCount = 2;
63953
63968
  if (((_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.search_symbol_count) === 0) {
63954
63969
  searchSymbolCount = 0;
@@ -63970,12 +63985,14 @@ var BaseLookupPicker = function BaseLookupPicker(props) {
63970
63985
  var fieldId = props.id;
63971
63986
  var query = (_props$data9 = props.data) !== null && _props$data9 !== void 0 && _props$data9.lookup_field_filter_query ? (_props$data10 = props.data) === null || _props$data10 === void 0 ? void 0 : _props$data10.lookup_field_filter_query : undefined;
63972
63987
  var getValueList = function getValueList(searchValue) {
63973
- return lookupListItemService.getFilteredItemList(fieldId, searchValue, query);
63988
+ var _props$data11;
63989
+ return lookupListItemService.getFilteredItemList(searchValue, (_props$data11 = props.data) === null || _props$data11 === void 0 ? void 0 : _props$data11.list, query, fieldId);
63974
63990
  };
63975
63991
  var getAllValueList = function getAllValueList() {
63976
- return lookupListItemService.getFilteredItemList(fieldId, CTRL.EMPTY, query);
63992
+ var _props$data12;
63993
+ return lookupListItemService.getFilteredItemList(CTRL.EMPTY, (_props$data12 = props.data) === null || _props$data12 === void 0 ? void 0 : _props$data12.list, query, fieldId);
63977
63994
  };
63978
- var placeholder = (_props$data11 = props.data) !== null && _props$data11 !== void 0 && _props$data11.placeholder ? (_props$data12 = props.data) === null || _props$data12 === void 0 ? void 0 : _props$data12.placeholder : CTRL.EMPTY;
63995
+ var placeholder = (_props$data13 = props.data) !== null && _props$data13 !== void 0 && _props$data13.placeholder ? (_props$data14 = props.data) === null || _props$data14 === void 0 ? void 0 : _props$data14.placeholder : CTRL.EMPTY;
63979
63996
  var settings = {
63980
63997
  filterMinLength: props.filterMinLength !== undefined ? props.filterMinLength : searchSymbolCount,
63981
63998
  selectedValueTemplate: props.selectedValueTemplate ? props.selectedValueTemplate : valueTemplate,
@@ -65468,6 +65485,8 @@ CONTROL.PASSWORD = 'Password';
65468
65485
  CONTROL.TIME_PICKER = 'TimePicker';
65469
65486
  CONTROL.FILE_PICKER = 'FilePicker';
65470
65487
  CONTROL.LINK_INPUT = 'LinkInput';
65488
+ CONTROL.IMAGE = 'Image';
65489
+ CONTROL.ICON = 'Icon';
65471
65490
 
65472
65491
  var CSS_CLASS_LABEL_GRAY = 'vitro-label-grey';
65473
65492
  var CSS_CLASS_FILTER_CONTAINER = 'vitro-filter-container';
@@ -66894,7 +66913,7 @@ var Viewer = function Viewer(props) {
66894
66913
  };
66895
66914
 
66896
66915
  var name = "@vitrosoftware/common-ui-ts";
66897
- var version$1 = "1.1.230";
66916
+ var version$1 = "1.1.232";
66898
66917
  var description = "vitro software common ui ts";
66899
66918
  var author = "";
66900
66919
  var license = "MIT";
@@ -85987,6 +86006,23 @@ var SlideUpButton = function SlideUpButton(props) {
85987
86006
  }), props.children)));
85988
86007
  };
85989
86008
 
86009
+ var styles$22 = {"vitro-icon-default":"_icon_vitro-icon-default_3ZVGmps"};
86010
+
86011
+ var Icon = function Icon(props) {
86012
+ var style = props.style ? _extends({}, props.style, {
86013
+ backgroundColor: props.color
86014
+ }) : {
86015
+ backgroundColor: props.color
86016
+ };
86017
+ if (!style) {
86018
+ return null;
86019
+ }
86020
+ return React__default.createElement("div", {
86021
+ style: style,
86022
+ className: props.style ? CTRL.EMPTY : styles$22['vitro-icon-default']
86023
+ });
86024
+ };
86025
+
85990
86026
  exports.ACTION_HANDLER = ActionHandlerConstants;
85991
86027
  exports.ALERT = AlertConstants;
85992
86028
  exports.ActionHandler = ActionHandler;
@@ -86049,6 +86085,7 @@ exports.Header = Header;
86049
86085
  exports.HeaderNavBar = HeaderNavBar;
86050
86086
  exports.HeaderNavService = HeaderNavService;
86051
86087
  exports.Heading = Heading;
86088
+ exports.Icon = Icon;
86052
86089
  exports.Image = Image;
86053
86090
  exports.ImageButton = ImageButton;
86054
86091
  exports.ImagePicker = ImagePicker;