@vitrosoftware/common-ui-ts 1.1.35 → 1.1.36

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.
@@ -11,6 +11,7 @@ interface LinkItem {
11
11
  imageHoverUrl?: string;
12
12
  text: string;
13
13
  linkItemWidth?: number;
14
+ altUrlList?: string[];
14
15
  }
15
16
  export declare const LinkItem: (props: LinkItem) => JSX.Element;
16
17
  export {};
package/dist/index.js CHANGED
@@ -61279,13 +61279,20 @@ var DatePicker = function DatePicker(props) {
61279
61279
  if (props.maxValue) {
61280
61280
  config.max = props.maxValue;
61281
61281
  }
61282
+ if (config.value) {
61283
+ config.value = new Date(config.value);
61284
+ }
61282
61285
  $$3(ref.current).kendoDatePicker(config);
61283
61286
  var picker = $$3(ref.current).data(componentName);
61284
61287
  picker.enable(!props.isDisabled);
61285
61288
  picker.readonly(props.isReadOnly === true);
61286
61289
  }, [ref]);
61287
61290
  React.useEffect(function () {
61288
- $$3(ref.current).data(componentName).value(props.value);
61291
+ if (props.value) {
61292
+ $$3(ref.current).data(componentName).value(new Date(props.value));
61293
+ } else {
61294
+ $$3(ref.current).data(componentName).value(props.value);
61295
+ }
61289
61296
  }, [props.value]);
61290
61297
  React.useEffect(function () {
61291
61298
  if (props.minValue) $$3(ref.current).data(componentName).min(props.minValue);
@@ -61592,8 +61599,8 @@ var LookupPicker = function LookupPicker(props) {
61592
61599
  setSelectedValueList([]);
61593
61600
  }
61594
61601
  }, [props.selectedValue]);
61595
- React.useEffect(function () {
61596
- if (inputValue && inputValue.length && inputValue.length >= props.filterMinLength) {
61602
+ var onInputValueUpdated = function onInputValueUpdated() {
61603
+ if ((inputValue || inputValue === CTRL.EMPTY) && inputValue.length >= props.filterMinLength) {
61597
61604
  if (props.valueList) {
61598
61605
  updateFilteredValueList(props.valueList);
61599
61606
  } else if (props.getValueList) {
@@ -61610,6 +61617,9 @@ var LookupPicker = function LookupPicker(props) {
61610
61617
  });
61611
61618
  }
61612
61619
  }
61620
+ };
61621
+ React.useEffect(function () {
61622
+ onInputValueUpdated();
61613
61623
  }, [inputValue]);
61614
61624
  React.useEffect(function () {
61615
61625
  if (props.valueList && selectedValueList) {
@@ -61713,6 +61723,12 @@ var LookupPicker = function LookupPicker(props) {
61713
61723
  setState(styles$q['vitro-focus']);
61714
61724
  setValueListVisible(true);
61715
61725
  };
61726
+ var onCollapseButtonClick = function onCollapseButtonClick(valueListVisible) {
61727
+ setValueListVisible(!valueListVisible);
61728
+ if (!valueListVisible) {
61729
+ onInputValueUpdated();
61730
+ }
61731
+ };
61716
61732
  var copyValue = function copyValue() {
61717
61733
  navigator.clipboard.writeText(selectedValueList.join(CTRL.COMMA));
61718
61734
  };
@@ -61768,7 +61784,7 @@ var LookupPicker = function LookupPicker(props) {
61768
61784
  }
61769
61785
  }), !props.isDisabled && !props.isReadOnly && React__default.createElement("div", {
61770
61786
  onClick: function onClick() {
61771
- return setValueListVisible(!valueListVisible);
61787
+ return onCollapseButtonClick(valueListVisible);
61772
61788
  },
61773
61789
  className: valueListVisible ? styles$q['vitro-button-collapse-up'] : styles$q['vitro-button-collapse-bottom']
61774
61790
  }), props.isReadOnly ? React__default.createElement("span", {
@@ -63483,7 +63499,7 @@ var LinkItem$1 = function LinkItem(props) {
63483
63499
  var _useState = React.useState(false),
63484
63500
  isHover = _useState[0],
63485
63501
  setIsHover = _useState[1];
63486
- var isActive = props.link === props.currentUrl || props.activeItem === props.id;
63502
+ var isActive = props.link === props.currentUrl || props.activeItem === props.id || props.altUrlList && props.altUrlList.includes(props.currentUrl);
63487
63503
  var className = isActive ? styles$v['vitro-active'] : isHover ? styles$v['vitro-hover'] : CTRL.EMPTY;
63488
63504
  var onClick = function onClick(e) {
63489
63505
  if (props.link) {