@acorex/components 3.0.33 → 3.0.37
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/acorex-components.metadata.json +1 -1
- package/bundles/acorex-components.umd.js +46 -18
- package/bundles/acorex-components.umd.js.map +1 -1
- package/bundles/acorex-components.umd.min.js +1 -1
- package/bundles/acorex-components.umd.min.js.map +1 -1
- package/esm2015/lib/checkbox/checkbox.component.js +2 -2
- package/esm2015/lib/tab-page/tab-page.module.js +2 -3
- package/esm2015/lib/tree-view/tree-view.component.js +45 -17
- package/esm5/lib/checkbox/checkbox.component.js +2 -2
- package/esm5/lib/tab-page/tab-page.module.js +2 -3
- package/esm5/lib/tree-view/tree-view.component.js +45 -17
- package/fesm2015/acorex-components.js +46 -18
- package/fesm2015/acorex-components.js.map +1 -1
- package/fesm5/acorex-components.js +46 -18
- package/fesm5/acorex-components.js.map +1 -1
- package/lib/tree-view/tree-view.component.d.ts +4 -1
- package/package.json +1 -1
|
@@ -3822,7 +3822,7 @@
|
|
|
3822
3822
|
AXCheckBoxComponent = __decorate([
|
|
3823
3823
|
core.Component({
|
|
3824
3824
|
selector: 'ax-check-box',
|
|
3825
|
-
template: "<!-- <label class=\"ax checkbox {{size}}\" for=\"{{uid}}\" [ngClass]=\"{ 'disabled': disabled, 'readonly': readonly }\"\r\n (click)=\"handleClick($event)\">\r\n {{ label }}\r\n <input #input type=\"checkbox\" id=\"{{uid}}\" [readonly]=\"readonly\" [checked]=\"value\"\r\n [disabled]=\"disabled || readonly\" />\r\n <span class=\"checkmark\" [ngClass]=\"{'indeterminate': indeterminate && value == null}\"></span>\r\n\r\n</label> -->\r\n\r\n<label for=\"{{uid}}\" class=\"ax-checkbox-container\" (click)=\"handleClick($event)\">\r\n <input #input type=\"checkbox\" class=\"ax-checkbox\" [ngClass]=\"{'indeterminate': indeterminate && value == null}\"\r\n id=\"{{uid}}\" [readonly]=\"readonly\" [checked]=\"value\" [(ngModel)]=\"value\" [disabled]=\"disabled || readonly\" />\r\n <span>{{ label ? label : ' ' }}</span>\r\n</label>",
|
|
3825
|
+
template: "<!-- <label class=\"ax checkbox {{size}}\" for=\"{{uid}}\" [ngClass]=\"{ 'disabled': disabled, 'readonly': readonly }\"\r\n (click)=\"handleClick($event)\">\r\n {{ label }}\r\n <input #input type=\"checkbox\" id=\"{{uid}}\" [readonly]=\"readonly\" [checked]=\"value\"\r\n [disabled]=\"disabled || readonly\" />\r\n <span class=\"checkmark\" [ngClass]=\"{'indeterminate': indeterminate && value == null}\"></span>\r\n\r\n</label> -->\r\n\r\n<label for=\"{{uid}}\" class=\"ax-checkbox-container\" [ngClass]=\"{ 'disabled': disabled, 'readonly': readonly }\"\r\n (click)=\"handleClick($event)\">\r\n <input #input type=\"checkbox\" class=\"ax-checkbox\" [ngClass]=\"{'indeterminate': indeterminate && value == null}\"\r\n id=\"{{uid}}\" [readonly]=\"readonly\" [checked]=\"value\" [(ngModel)]=\"value\" [disabled]=\"disabled || readonly\" />\r\n <span>{{ label ? label : ' ' }}</span>\r\n</label>",
|
|
3826
3826
|
encapsulation: core.ViewEncapsulation.None,
|
|
3827
3827
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
3828
3828
|
}),
|
|
@@ -11809,7 +11809,7 @@
|
|
|
11809
11809
|
imports: [common.CommonModule, AXLoadingModule],
|
|
11810
11810
|
exports: [AXTabPageRendererComponent],
|
|
11811
11811
|
entryComponents: [AXTabPageRendererComponent, AXTabPageHostComponent],
|
|
11812
|
-
providers: [
|
|
11812
|
+
providers: [],
|
|
11813
11813
|
})
|
|
11814
11814
|
], AXTabPageModule);
|
|
11815
11815
|
return AXTabPageModule;
|
|
@@ -13912,7 +13912,10 @@
|
|
|
13912
13912
|
//seletedKeyFields set id of nodes and parents
|
|
13913
13913
|
//selectedFieldName set name of fields that set selectes
|
|
13914
13914
|
_this.selectedFieldName = null;
|
|
13915
|
-
|
|
13915
|
+
// @Input()
|
|
13916
|
+
// selectNodesRecursive: 'all' | 'parents' | 'childs' | 'none' = 'all'; //leaf
|
|
13917
|
+
_this.checkParents = true;
|
|
13918
|
+
_this.checkChilds = true;
|
|
13916
13919
|
_this.seletedKeyFields = [];
|
|
13917
13920
|
_this.keyField = 'id';
|
|
13918
13921
|
_this.hasChildField = 'child';
|
|
@@ -13927,6 +13930,7 @@
|
|
|
13927
13930
|
_this.onItemClosing = new core.EventEmitter();
|
|
13928
13931
|
_this.onItemDrag = new core.EventEmitter();
|
|
13929
13932
|
_this.onItemMoved = new core.EventEmitter();
|
|
13933
|
+
_this.selectableField = '';
|
|
13930
13934
|
_this.onContextMenuItemClick = new core.EventEmitter();
|
|
13931
13935
|
_this.showSelectBox = false;
|
|
13932
13936
|
_this.loading = false;
|
|
@@ -14046,7 +14050,8 @@
|
|
|
14046
14050
|
};
|
|
14047
14051
|
AXTreeViewComponent.prototype.changeChildSelect = function (item, s) {
|
|
14048
14052
|
var _this = this;
|
|
14049
|
-
if (this.selectNodesRecursive == 'all' || this.selectNodesRecursive == 'childs') {
|
|
14053
|
+
// if (this.selectNodesRecursive == 'all' || this.selectNodesRecursive == 'childs') {
|
|
14054
|
+
if (this.checkChilds == true) {
|
|
14050
14055
|
item.select = s;
|
|
14051
14056
|
if (item[this.hasChildField] === true && item[this.childField] && item[this.childField].length > 0) {
|
|
14052
14057
|
item[this.childField].forEach(function (elm) {
|
|
@@ -14080,7 +14085,8 @@
|
|
|
14080
14085
|
};
|
|
14081
14086
|
AXTreeViewComponent.prototype.changeParentSelect = function (item) {
|
|
14082
14087
|
var _this = this;
|
|
14083
|
-
if (this.selectNodesRecursive == 'all' || this.selectNodesRecursive == 'parents') {
|
|
14088
|
+
//if (this.selectNodesRecursive == 'all' || this.selectNodesRecursive == 'parents') {
|
|
14089
|
+
if (this.checkParents) {
|
|
14084
14090
|
var allselect = true;
|
|
14085
14091
|
var alldeselect = true;
|
|
14086
14092
|
var oneselect = false;
|
|
@@ -14188,7 +14194,7 @@
|
|
|
14188
14194
|
_this.hideLoading(null);
|
|
14189
14195
|
_this.list = _data.data.result;
|
|
14190
14196
|
_this.list.forEach(function (el) {
|
|
14191
|
-
el.disabledCheckBox = false;
|
|
14197
|
+
el.disabledCheckBox = _this.selectableField != '' ? el[_this.selectableField] : false;
|
|
14192
14198
|
el.select = false;
|
|
14193
14199
|
if (_this.selectionLevel == 'nodes' && el[_this.hasChildField] == true) {
|
|
14194
14200
|
el.disabledCheckBox = true;
|
|
@@ -14200,9 +14206,11 @@
|
|
|
14200
14206
|
_this.seletedKeyFields.forEach(function (n) {
|
|
14201
14207
|
if (n.includes(el[_this.keyField])) {
|
|
14202
14208
|
if (el[_this.hasChildField] == true) {
|
|
14203
|
-
|
|
14209
|
+
if (_this.checkParents == false && _this.checkChilds == false) {
|
|
14210
|
+
//select parent when check child and check parent is false TODO check this Action
|
|
14211
|
+
_this.selectItem(el);
|
|
14212
|
+
}
|
|
14204
14213
|
_this.open(el);
|
|
14205
|
-
// }
|
|
14206
14214
|
}
|
|
14207
14215
|
else {
|
|
14208
14216
|
_this.selectItem(el);
|
|
@@ -14213,9 +14221,11 @@
|
|
|
14213
14221
|
}
|
|
14214
14222
|
else if (_this.selectedFieldName != null) {
|
|
14215
14223
|
if (el[_this.hasChildField] == true && el[_this.selectedFieldName] == true) {
|
|
14216
|
-
|
|
14224
|
+
if (_this.checkParents == false && _this.checkChilds == false) {
|
|
14225
|
+
//select parent when check child and check parent is false TODO check this Action
|
|
14226
|
+
_this.selectItem(el);
|
|
14227
|
+
}
|
|
14217
14228
|
_this.open(el);
|
|
14218
|
-
// }
|
|
14219
14229
|
}
|
|
14220
14230
|
else if (el[_this.selectedFieldName] == true) {
|
|
14221
14231
|
_this.selectItem(el);
|
|
@@ -14234,7 +14244,7 @@
|
|
|
14234
14244
|
if (_this.list.length !== 0) {
|
|
14235
14245
|
if (_this.itemRow[_this.childField] && _this.itemRow[_this.childField].length > 0) {
|
|
14236
14246
|
result_1.forEach(function (el) {
|
|
14237
|
-
el.disabledCheckBox = false;
|
|
14247
|
+
el.disabledCheckBox = _this.selectableField != '' ? el[_this.selectableField] : false;
|
|
14238
14248
|
_this.itemRow[_this.childField][_this.itemRow[_this.childField].length] = el;
|
|
14239
14249
|
});
|
|
14240
14250
|
}
|
|
@@ -14248,7 +14258,8 @@
|
|
|
14248
14258
|
if (_this.selectionLevel == 'parents' && result_1[i][_this.hasChildField] == false) {
|
|
14249
14259
|
result_1[i].disabledCheckBox = true;
|
|
14250
14260
|
}
|
|
14251
|
-
if (
|
|
14261
|
+
// if (this.selectionMode !== 'single' && (this.selectNodesRecursive == 'all' || this.selectNodesRecursive == 'childs')) {
|
|
14262
|
+
if (_this.selectionMode !== 'single' && _this.checkChilds == true) {
|
|
14252
14263
|
result_1[i].select = _this.itemRow.select === (undefined || null) ? false : _this.itemRow.select;
|
|
14253
14264
|
if (_this.itemRow.select === true && _this.selectionMode == 'multiple' && result_1[i][_this.hasChildField] === false) {
|
|
14254
14265
|
_this.selectedItems = _this.selectedItems.filter(function (c) { return c[_this.keyField] !== result_1[i][_this.keyField]; });
|
|
@@ -14263,9 +14274,11 @@
|
|
|
14263
14274
|
_this.seletedKeyFields.forEach(function (n) {
|
|
14264
14275
|
if (n.includes(result_1[i][_this.keyField])) {
|
|
14265
14276
|
if (result_1[i][_this.hasChildField] == true) {
|
|
14266
|
-
|
|
14277
|
+
if (_this.checkParents == false && _this.checkChilds == false) {
|
|
14278
|
+
//select parent when check child and check parent is false TODO check this Action
|
|
14279
|
+
_this.selectItem(result_1[i]);
|
|
14280
|
+
}
|
|
14267
14281
|
_this.open(result_1[i]);
|
|
14268
|
-
// }
|
|
14269
14282
|
}
|
|
14270
14283
|
else {
|
|
14271
14284
|
_this.selectItem(result_1[i]);
|
|
@@ -14276,9 +14289,11 @@
|
|
|
14276
14289
|
}
|
|
14277
14290
|
else if (_this.selectedFieldName != null) {
|
|
14278
14291
|
if (result_1[i][_this.hasChildField] == true && result_1[i][_this.selectedFieldName] == true) {
|
|
14279
|
-
|
|
14292
|
+
if (_this.checkParents == false && _this.checkChilds == false) {
|
|
14293
|
+
//select parent when check child and check parent is false TODO check this Action
|
|
14294
|
+
_this.selectItem(result_1[i]);
|
|
14295
|
+
}
|
|
14280
14296
|
_this.open(result_1[i]);
|
|
14281
|
-
// }
|
|
14282
14297
|
}
|
|
14283
14298
|
else if (result_1[i][_this.selectedFieldName] == true) {
|
|
14284
14299
|
_this.selectItem(result_1[i]);
|
|
@@ -14450,6 +14465,11 @@
|
|
|
14450
14465
|
this.internalSelectItem(item, false);
|
|
14451
14466
|
}
|
|
14452
14467
|
};
|
|
14468
|
+
AXTreeViewComponent.prototype.unSelectItem = function (item) {
|
|
14469
|
+
if (item['select'] == true) {
|
|
14470
|
+
this.internalSelectItem(item, false);
|
|
14471
|
+
}
|
|
14472
|
+
};
|
|
14453
14473
|
AXTreeViewComponent.prototype.open = function (item) {
|
|
14454
14474
|
if (item['toggle'] !== true) {
|
|
14455
14475
|
this.toggleNode(item, true);
|
|
@@ -14533,8 +14553,12 @@
|
|
|
14533
14553
|
], AXTreeViewComponent.prototype, "selectedFieldName", void 0);
|
|
14534
14554
|
__decorate([
|
|
14535
14555
|
core.Input(),
|
|
14536
|
-
__metadata("design:type",
|
|
14537
|
-
], AXTreeViewComponent.prototype, "
|
|
14556
|
+
__metadata("design:type", Boolean)
|
|
14557
|
+
], AXTreeViewComponent.prototype, "checkParents", void 0);
|
|
14558
|
+
__decorate([
|
|
14559
|
+
core.Input(),
|
|
14560
|
+
__metadata("design:type", Boolean)
|
|
14561
|
+
], AXTreeViewComponent.prototype, "checkChilds", void 0);
|
|
14538
14562
|
__decorate([
|
|
14539
14563
|
core.Input(),
|
|
14540
14564
|
__metadata("design:type", Array)
|
|
@@ -14591,6 +14615,10 @@
|
|
|
14591
14615
|
core.Output(),
|
|
14592
14616
|
__metadata("design:type", core.EventEmitter)
|
|
14593
14617
|
], AXTreeViewComponent.prototype, "onItemMoved", void 0);
|
|
14618
|
+
__decorate([
|
|
14619
|
+
core.Input(),
|
|
14620
|
+
__metadata("design:type", String)
|
|
14621
|
+
], AXTreeViewComponent.prototype, "selectableField", void 0);
|
|
14594
14622
|
__decorate([
|
|
14595
14623
|
core.Output(),
|
|
14596
14624
|
__metadata("design:type", core.EventEmitter)
|