@vitrosoftware/common-ui-ts 1.1.34 → 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.
- package/dist/controls/Sidebar/LinkItem.d.ts +1 -0
- package/dist/controls/TableView/TableView.d.ts +1 -0
- package/dist/controls/TableView/TableViewContext.d.ts +1 -0
- package/dist/controls/TableView/TreeGridTableViewContextImpl.d.ts +2 -0
- package/dist/index.js +33 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ export interface TableViewContext {
|
|
|
13
13
|
readonly header: TableViewRow;
|
|
14
14
|
dragging: boolean;
|
|
15
15
|
filterOneLevel: boolean;
|
|
16
|
+
scope: string;
|
|
16
17
|
acceptChanges(row?: TableViewRow): void;
|
|
17
18
|
hasGantt(): boolean;
|
|
18
19
|
getRowById(id: string, attr?: string, nofixed?: boolean): TableViewRow;
|
|
@@ -19,6 +19,8 @@ export declare class TreeGridTableViewContextImpl implements TableViewContext {
|
|
|
19
19
|
get filter(): any;
|
|
20
20
|
get dragging(): boolean;
|
|
21
21
|
set dragging(value: boolean);
|
|
22
|
+
get scope(): string;
|
|
23
|
+
set scope(value: string);
|
|
22
24
|
get pageLength(): any;
|
|
23
25
|
get header(): TableViewRow;
|
|
24
26
|
acceptChanges(row?: TableViewRow): void;
|
package/dist/index.js
CHANGED
|
@@ -20677,6 +20677,14 @@ var TreeGridTableViewContextImpl = /*#__PURE__*/function () {
|
|
|
20677
20677
|
set: function set(value) {
|
|
20678
20678
|
this.grid.Dragging = value;
|
|
20679
20679
|
}
|
|
20680
|
+
}, {
|
|
20681
|
+
key: "scope",
|
|
20682
|
+
get: function get() {
|
|
20683
|
+
return this.grid.scope;
|
|
20684
|
+
},
|
|
20685
|
+
set: function set(value) {
|
|
20686
|
+
this.grid.scope = value;
|
|
20687
|
+
}
|
|
20680
20688
|
}, {
|
|
20681
20689
|
key: "pageLength",
|
|
20682
20690
|
get: function get() {
|
|
@@ -20960,7 +20968,8 @@ var TreeGrid = function TreeGrid(props) {
|
|
|
20960
20968
|
},
|
|
20961
20969
|
Debug: props.debug || '',
|
|
20962
20970
|
Cache: props.cache || CACHE.DEFAULT,
|
|
20963
|
-
CacheVersion: props.cacheVersion
|
|
20971
|
+
CacheVersion: props.cacheVersion,
|
|
20972
|
+
scope: props.scope
|
|
20964
20973
|
}, "vitro-table-view" + props.id);
|
|
20965
20974
|
} else {
|
|
20966
20975
|
w$2.TreeGrid({
|
|
@@ -20979,7 +20988,8 @@ var TreeGrid = function TreeGrid(props) {
|
|
|
20979
20988
|
},
|
|
20980
20989
|
Debug: props.debug || '',
|
|
20981
20990
|
Cache: props.cache || CACHE.DEFAULT,
|
|
20982
|
-
CacheVersion: props.cacheVersion
|
|
20991
|
+
CacheVersion: props.cacheVersion,
|
|
20992
|
+
scope: props.scope
|
|
20983
20993
|
}, "vitro-table-view" + props.id);
|
|
20984
20994
|
}
|
|
20985
20995
|
return function () {
|
|
@@ -61269,13 +61279,20 @@ var DatePicker = function DatePicker(props) {
|
|
|
61269
61279
|
if (props.maxValue) {
|
|
61270
61280
|
config.max = props.maxValue;
|
|
61271
61281
|
}
|
|
61282
|
+
if (config.value) {
|
|
61283
|
+
config.value = new Date(config.value);
|
|
61284
|
+
}
|
|
61272
61285
|
$$3(ref.current).kendoDatePicker(config);
|
|
61273
61286
|
var picker = $$3(ref.current).data(componentName);
|
|
61274
61287
|
picker.enable(!props.isDisabled);
|
|
61275
61288
|
picker.readonly(props.isReadOnly === true);
|
|
61276
61289
|
}, [ref]);
|
|
61277
61290
|
React.useEffect(function () {
|
|
61278
|
-
|
|
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
|
+
}
|
|
61279
61296
|
}, [props.value]);
|
|
61280
61297
|
React.useEffect(function () {
|
|
61281
61298
|
if (props.minValue) $$3(ref.current).data(componentName).min(props.minValue);
|
|
@@ -61582,8 +61599,8 @@ var LookupPicker = function LookupPicker(props) {
|
|
|
61582
61599
|
setSelectedValueList([]);
|
|
61583
61600
|
}
|
|
61584
61601
|
}, [props.selectedValue]);
|
|
61585
|
-
|
|
61586
|
-
if (inputValue
|
|
61602
|
+
var onInputValueUpdated = function onInputValueUpdated() {
|
|
61603
|
+
if ((inputValue || inputValue === CTRL.EMPTY) && inputValue.length >= props.filterMinLength) {
|
|
61587
61604
|
if (props.valueList) {
|
|
61588
61605
|
updateFilteredValueList(props.valueList);
|
|
61589
61606
|
} else if (props.getValueList) {
|
|
@@ -61600,6 +61617,9 @@ var LookupPicker = function LookupPicker(props) {
|
|
|
61600
61617
|
});
|
|
61601
61618
|
}
|
|
61602
61619
|
}
|
|
61620
|
+
};
|
|
61621
|
+
React.useEffect(function () {
|
|
61622
|
+
onInputValueUpdated();
|
|
61603
61623
|
}, [inputValue]);
|
|
61604
61624
|
React.useEffect(function () {
|
|
61605
61625
|
if (props.valueList && selectedValueList) {
|
|
@@ -61703,6 +61723,12 @@ var LookupPicker = function LookupPicker(props) {
|
|
|
61703
61723
|
setState(styles$q['vitro-focus']);
|
|
61704
61724
|
setValueListVisible(true);
|
|
61705
61725
|
};
|
|
61726
|
+
var onCollapseButtonClick = function onCollapseButtonClick(valueListVisible) {
|
|
61727
|
+
setValueListVisible(!valueListVisible);
|
|
61728
|
+
if (!valueListVisible) {
|
|
61729
|
+
onInputValueUpdated();
|
|
61730
|
+
}
|
|
61731
|
+
};
|
|
61706
61732
|
var copyValue = function copyValue() {
|
|
61707
61733
|
navigator.clipboard.writeText(selectedValueList.join(CTRL.COMMA));
|
|
61708
61734
|
};
|
|
@@ -61758,7 +61784,7 @@ var LookupPicker = function LookupPicker(props) {
|
|
|
61758
61784
|
}
|
|
61759
61785
|
}), !props.isDisabled && !props.isReadOnly && React__default.createElement("div", {
|
|
61760
61786
|
onClick: function onClick() {
|
|
61761
|
-
return
|
|
61787
|
+
return onCollapseButtonClick(valueListVisible);
|
|
61762
61788
|
},
|
|
61763
61789
|
className: valueListVisible ? styles$q['vitro-button-collapse-up'] : styles$q['vitro-button-collapse-bottom']
|
|
61764
61790
|
}), props.isReadOnly ? React__default.createElement("span", {
|
|
@@ -63473,7 +63499,7 @@ var LinkItem$1 = function LinkItem(props) {
|
|
|
63473
63499
|
var _useState = React.useState(false),
|
|
63474
63500
|
isHover = _useState[0],
|
|
63475
63501
|
setIsHover = _useState[1];
|
|
63476
|
-
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);
|
|
63477
63503
|
var className = isActive ? styles$v['vitro-active'] : isHover ? styles$v['vitro-hover'] : CTRL.EMPTY;
|
|
63478
63504
|
var onClick = function onClick(e) {
|
|
63479
63505
|
if (props.link) {
|