jsl-ui 9.14.3 → 9.14.5
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/lib/components/tree-view/TreeViewComponent.d.ts +1 -0
- package/lib/components/tree-view/TreeViewComponent.js +4 -4
- package/lib/components/tree-view/TreeViewStyle.scss +2 -2
- package/lib/grid/filterDialogs/excelFilter.js +11 -10
- package/lib/index.css +2291 -423
- package/lib/index.css.map +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,6 +14,7 @@ export interface ITreeViewChild {
|
|
|
14
14
|
}
|
|
15
15
|
export declare class TreeViewComponent implements IJSLComponent {
|
|
16
16
|
private options;
|
|
17
|
+
private filteredData;
|
|
17
18
|
constructor(options: ITreeViewComponentOptions);
|
|
18
19
|
isEqual(node: IJSLComponent): boolean;
|
|
19
20
|
render(): IJSLVNode;
|
|
@@ -7,17 +7,17 @@ var TreeViewComponent = /** @class */ (function () {
|
|
|
7
7
|
return this.__proto__ === node.__proto__;
|
|
8
8
|
};
|
|
9
9
|
TreeViewComponent.prototype.render = function () {
|
|
10
|
-
var _a;
|
|
10
|
+
var _a, _b;
|
|
11
11
|
return {
|
|
12
12
|
tag: "div", attr: { style: this.options.style, class: "treeview-comp hover " + ((_a = this.options.class) !== null && _a !== void 0 ? _a : "") }, children: [
|
|
13
|
-
{ tag: "ul", children: [this.renderNode(this.options.data)] }
|
|
13
|
+
{ tag: "ul", attr: { class: "tv-input" }, children: [this.renderNode((_b = this.filteredData) !== null && _b !== void 0 ? _b : this.options.data)] }
|
|
14
14
|
]
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
TreeViewComponent.prototype.renderNode = function (el) {
|
|
18
18
|
var _this = this;
|
|
19
19
|
function getInput() {
|
|
20
|
-
var res = { tag: "input", attr: { type: "checkbox", id: el.id } };
|
|
20
|
+
var res = { tag: "input", attr: { class: "tv-input", type: "checkbox", id: el.id } };
|
|
21
21
|
if (el.collapsed) {
|
|
22
22
|
res.attr.checked = "checked";
|
|
23
23
|
}
|
|
@@ -27,7 +27,7 @@ var TreeViewComponent = /** @class */ (function () {
|
|
|
27
27
|
{ tag: "li", children: [
|
|
28
28
|
getInput(),
|
|
29
29
|
this.addChild({ tag: "label", attr: { for: el.id } }, this.options.renderItem != null ? this.options.renderItem(el) : el.content),
|
|
30
|
-
{ tag: "ul", children: el.children.map(function (c) { return _this.renderNode(c); }) }
|
|
30
|
+
{ tag: "ul", attr: { class: "tv-input" }, children: el.children.map(function (c) { return _this.renderNode(c); }) }
|
|
31
31
|
] } :
|
|
32
32
|
this.addChild({ tag: "li" }, this.options.renderItem != null ? this.options.renderItem(el) : el.content);
|
|
33
33
|
};
|
|
@@ -36,7 +36,7 @@ $defaultColor: rgba(50,50,50, 0.5);
|
|
|
36
36
|
// @include transition-duration(0.5s);
|
|
37
37
|
// }
|
|
38
38
|
|
|
39
|
-
ul {
|
|
39
|
+
.tv-ul {
|
|
40
40
|
// @include transition-duration;
|
|
41
41
|
list-style: none;
|
|
42
42
|
padding-left: 1em;
|
|
@@ -54,7 +54,7 @@ $defaultColor: rgba(50,50,50, 0.5);
|
|
|
54
54
|
// }
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
input{
|
|
57
|
+
.tv-input{
|
|
58
58
|
display: none;
|
|
59
59
|
|
|
60
60
|
&:checked ~ ul {
|
|
@@ -67,19 +67,20 @@ var ExcelFilter = /** @class */ (function () {
|
|
|
67
67
|
filters = this.grid.getFilters();
|
|
68
68
|
currentFilters = filters.filter(function (f) { return f.columnId === col.id; });
|
|
69
69
|
mode = this.grid.getOptions().mode;
|
|
70
|
-
if (!(mode === "client")) return [3 /*break*/, 1];
|
|
71
|
-
// remove any filters for this column
|
|
72
|
-
if (currentFilters.length > 0) {
|
|
73
|
-
this.grid.clearFilter(col.id);
|
|
74
|
-
}
|
|
75
|
-
values = this.getDistinctValues(col);
|
|
76
|
-
return [3 /*break*/, 3];
|
|
77
|
-
case 1:
|
|
78
70
|
filterOptions = this.grid.getOptions().getFilterValues;
|
|
79
|
-
if (filterOptions == null)
|
|
71
|
+
if (!(filterOptions == null)) return [3 /*break*/, 1];
|
|
72
|
+
if (mode === "client") {
|
|
73
|
+
// remove any filters for this column
|
|
74
|
+
if (currentFilters.length > 0) {
|
|
75
|
+
this.grid.clearFilter(col.id);
|
|
76
|
+
}
|
|
77
|
+
values = this.getDistinctValues(col);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
80
|
throw new Error("getFilterValues option has to be set when filter mode = server");
|
|
81
81
|
}
|
|
82
|
-
return [
|
|
82
|
+
return [3 /*break*/, 3];
|
|
83
|
+
case 1: return [4 /*yield*/, filterOptions(col)];
|
|
83
84
|
case 2:
|
|
84
85
|
values = _b.sent();
|
|
85
86
|
_b.label = 3;
|