@vitrosoftware/common-ui-ts 1.1.54 → 1.1.55
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.
|
@@ -16,8 +16,9 @@ export interface TableViewContext {
|
|
|
16
16
|
dragging: boolean;
|
|
17
17
|
filterOneLevel: boolean;
|
|
18
18
|
scope: string;
|
|
19
|
-
searchCriterionList: SearchCriterion[];
|
|
20
|
-
|
|
19
|
+
setSearchCriterionList(searchCriterionList: SearchCriterion[], searchId: string): void;
|
|
20
|
+
clearSearchCriterionList(searchId: string): void;
|
|
21
|
+
getSearchCriterionList(searchId?: string): SearchCriterion[];
|
|
21
22
|
acceptChanges(row?: TableViewRow): void;
|
|
22
23
|
hasGantt(): boolean;
|
|
23
24
|
getRowById(id: string, attr?: string, nofixed?: boolean): TableViewRow;
|
|
@@ -11,8 +11,7 @@ export declare class TreeGridTableViewContextImpl implements TableViewContext {
|
|
|
11
11
|
suggestValue: string;
|
|
12
12
|
filterOneLevel: boolean;
|
|
13
13
|
private readonly gridChangesFormat;
|
|
14
|
-
|
|
15
|
-
parentId: string;
|
|
14
|
+
private readonly searchCriterionMap;
|
|
16
15
|
constructor(grid: any);
|
|
17
16
|
get columnList(): any;
|
|
18
17
|
get columnNameList(): any;
|
|
@@ -27,6 +26,9 @@ export declare class TreeGridTableViewContextImpl implements TableViewContext {
|
|
|
27
26
|
set scope(value: string);
|
|
28
27
|
get pageLength(): any;
|
|
29
28
|
get header(): TableViewRow;
|
|
29
|
+
setSearchCriterionList(searchCriterionList: SearchCriterion[], searchId: string): void;
|
|
30
|
+
clearSearchCriterionList(searchId: string): void;
|
|
31
|
+
getSearchCriterionList(searchId?: string): SearchCriterion[];
|
|
30
32
|
acceptChanges(row?: TableViewRow): void;
|
|
31
33
|
addRow(parent: TableViewRow | null, next?: TableViewRow | null, show?: number, id?: string, def?: string): TableViewRow;
|
|
32
34
|
addPage(name: string, xml: string | null, count: number): TableViewRow;
|
package/dist/index.js
CHANGED
|
@@ -20503,12 +20503,45 @@ var TreeGridTableViewContextImpl = /*#__PURE__*/function () {
|
|
|
20503
20503
|
this.suggestValue = '';
|
|
20504
20504
|
this.filterOneLevel = false;
|
|
20505
20505
|
this.gridChangesFormat = 'JSON';
|
|
20506
|
+
this.searchCriterionMap = new Map();
|
|
20506
20507
|
this.grid = grid;
|
|
20507
20508
|
this.id = grid.id;
|
|
20508
20509
|
this.grid.Source.Upload.Format = this.gridChangesFormat;
|
|
20509
20510
|
tableViewList.set(this.id, this);
|
|
20510
20511
|
}
|
|
20511
20512
|
var _proto = TreeGridTableViewContextImpl.prototype;
|
|
20513
|
+
_proto.setSearchCriterionList = function setSearchCriterionList(searchCriterionList, searchId) {
|
|
20514
|
+
if (searchCriterionList && searchCriterionList.length) {
|
|
20515
|
+
this.searchCriterionMap.set(searchId, [].concat(searchCriterionList));
|
|
20516
|
+
} else {
|
|
20517
|
+
this.clearSearchCriterionList(searchId);
|
|
20518
|
+
}
|
|
20519
|
+
};
|
|
20520
|
+
_proto.clearSearchCriterionList = function clearSearchCriterionList(searchId) {
|
|
20521
|
+
if (this.searchCriterionMap.has(searchId)) {
|
|
20522
|
+
this.searchCriterionMap["delete"](searchId);
|
|
20523
|
+
}
|
|
20524
|
+
};
|
|
20525
|
+
_proto.getSearchCriterionList = function getSearchCriterionList(searchId) {
|
|
20526
|
+
var result = [];
|
|
20527
|
+
if (searchId) {
|
|
20528
|
+
if (this.searchCriterionMap.has(searchId)) {
|
|
20529
|
+
var searchCriterionList = this.searchCriterionMap.get(searchId);
|
|
20530
|
+
if (searchCriterionList) {
|
|
20531
|
+
searchCriterionList.forEach(function (searchCriterion) {
|
|
20532
|
+
return result.push(searchCriterion);
|
|
20533
|
+
});
|
|
20534
|
+
}
|
|
20535
|
+
}
|
|
20536
|
+
} else {
|
|
20537
|
+
this.searchCriterionMap.forEach(function (searchCriterionList) {
|
|
20538
|
+
return searchCriterionList.forEach(function (searchCriterion) {
|
|
20539
|
+
return result.push(searchCriterion);
|
|
20540
|
+
});
|
|
20541
|
+
});
|
|
20542
|
+
}
|
|
20543
|
+
return result;
|
|
20544
|
+
};
|
|
20512
20545
|
_proto.acceptChanges = function acceptChanges(row) {
|
|
20513
20546
|
this.grid.AcceptChanges(row);
|
|
20514
20547
|
};
|
|
@@ -20979,10 +21012,10 @@ var TreeGrid = function TreeGrid(props) {
|
|
|
20979
21012
|
if (tableView.filterOneLevel) {
|
|
20980
21013
|
newData = initData(newData, 'FilterOneLevel="1"');
|
|
20981
21014
|
}
|
|
20982
|
-
|
|
20983
|
-
|
|
20984
|
-
var
|
|
20985
|
-
var value = "SearchCriterionList='" +
|
|
21015
|
+
var searchCriterionList = tableView.getSearchCriterionList();
|
|
21016
|
+
if (searchCriterionList && searchCriterionList.length) {
|
|
21017
|
+
var searchCriterionListJson = JSON.stringify(searchCriterionList);
|
|
21018
|
+
var value = "SearchCriterionList='" + searchCriterionListJson + "'";
|
|
20986
21019
|
newData = initData(data, value);
|
|
20987
21020
|
}
|
|
20988
21021
|
return newData;
|
|
@@ -20993,10 +21026,6 @@ var TreeGrid = function TreeGrid(props) {
|
|
|
20993
21026
|
if (props.filterOneLevel) {
|
|
20994
21027
|
grid.filterOneLevel = props.filterOneLevel;
|
|
20995
21028
|
}
|
|
20996
|
-
if (props.searchCriterionList && props.searchParentId) {
|
|
20997
|
-
grid.searchCriterionList = props.searchCriterionList;
|
|
20998
|
-
grid.parentId = props.searchParentId;
|
|
20999
|
-
}
|
|
21000
21029
|
if (props.eventHandlerList) {
|
|
21001
21030
|
props.eventHandlerList.forEach(function (eventHandler) {
|
|
21002
21031
|
grid.setEventHandler(eventHandler);
|