@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
|
@@ -3616,7 +3616,7 @@ var AXCheckBoxComponent = /** @class */ (function (_super) {
|
|
|
3616
3616
|
AXCheckBoxComponent = __decorate([
|
|
3617
3617
|
Component({
|
|
3618
3618
|
selector: 'ax-check-box',
|
|
3619
|
-
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>",
|
|
3619
|
+
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>",
|
|
3620
3620
|
encapsulation: ViewEncapsulation.None,
|
|
3621
3621
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
3622
3622
|
}),
|
|
@@ -11603,7 +11603,7 @@ var AXTabPageModule = /** @class */ (function () {
|
|
|
11603
11603
|
imports: [CommonModule, AXLoadingModule],
|
|
11604
11604
|
exports: [AXTabPageRendererComponent],
|
|
11605
11605
|
entryComponents: [AXTabPageRendererComponent, AXTabPageHostComponent],
|
|
11606
|
-
providers: [
|
|
11606
|
+
providers: [],
|
|
11607
11607
|
})
|
|
11608
11608
|
], AXTabPageModule);
|
|
11609
11609
|
return AXTabPageModule;
|
|
@@ -13706,7 +13706,10 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
|
|
|
13706
13706
|
//seletedKeyFields set id of nodes and parents
|
|
13707
13707
|
//selectedFieldName set name of fields that set selectes
|
|
13708
13708
|
_this.selectedFieldName = null;
|
|
13709
|
-
|
|
13709
|
+
// @Input()
|
|
13710
|
+
// selectNodesRecursive: 'all' | 'parents' | 'childs' | 'none' = 'all'; //leaf
|
|
13711
|
+
_this.checkParents = true;
|
|
13712
|
+
_this.checkChilds = true;
|
|
13710
13713
|
_this.seletedKeyFields = [];
|
|
13711
13714
|
_this.keyField = 'id';
|
|
13712
13715
|
_this.hasChildField = 'child';
|
|
@@ -13721,6 +13724,7 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
|
|
|
13721
13724
|
_this.onItemClosing = new EventEmitter();
|
|
13722
13725
|
_this.onItemDrag = new EventEmitter();
|
|
13723
13726
|
_this.onItemMoved = new EventEmitter();
|
|
13727
|
+
_this.selectableField = '';
|
|
13724
13728
|
_this.onContextMenuItemClick = new EventEmitter();
|
|
13725
13729
|
_this.showSelectBox = false;
|
|
13726
13730
|
_this.loading = false;
|
|
@@ -13840,7 +13844,8 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
|
|
|
13840
13844
|
};
|
|
13841
13845
|
AXTreeViewComponent.prototype.changeChildSelect = function (item, s) {
|
|
13842
13846
|
var _this = this;
|
|
13843
|
-
if (this.selectNodesRecursive == 'all' || this.selectNodesRecursive == 'childs') {
|
|
13847
|
+
// if (this.selectNodesRecursive == 'all' || this.selectNodesRecursive == 'childs') {
|
|
13848
|
+
if (this.checkChilds == true) {
|
|
13844
13849
|
item.select = s;
|
|
13845
13850
|
if (item[this.hasChildField] === true && item[this.childField] && item[this.childField].length > 0) {
|
|
13846
13851
|
item[this.childField].forEach(function (elm) {
|
|
@@ -13874,7 +13879,8 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
|
|
|
13874
13879
|
};
|
|
13875
13880
|
AXTreeViewComponent.prototype.changeParentSelect = function (item) {
|
|
13876
13881
|
var _this = this;
|
|
13877
|
-
if (this.selectNodesRecursive == 'all' || this.selectNodesRecursive == 'parents') {
|
|
13882
|
+
//if (this.selectNodesRecursive == 'all' || this.selectNodesRecursive == 'parents') {
|
|
13883
|
+
if (this.checkParents) {
|
|
13878
13884
|
var allselect = true;
|
|
13879
13885
|
var alldeselect = true;
|
|
13880
13886
|
var oneselect = false;
|
|
@@ -13982,7 +13988,7 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
|
|
|
13982
13988
|
_this.hideLoading(null);
|
|
13983
13989
|
_this.list = _data.data.result;
|
|
13984
13990
|
_this.list.forEach(function (el) {
|
|
13985
|
-
el.disabledCheckBox = false;
|
|
13991
|
+
el.disabledCheckBox = _this.selectableField != '' ? el[_this.selectableField] : false;
|
|
13986
13992
|
el.select = false;
|
|
13987
13993
|
if (_this.selectionLevel == 'nodes' && el[_this.hasChildField] == true) {
|
|
13988
13994
|
el.disabledCheckBox = true;
|
|
@@ -13994,9 +14000,11 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
|
|
|
13994
14000
|
_this.seletedKeyFields.forEach(function (n) {
|
|
13995
14001
|
if (n.includes(el[_this.keyField])) {
|
|
13996
14002
|
if (el[_this.hasChildField] == true) {
|
|
13997
|
-
|
|
14003
|
+
if (_this.checkParents == false && _this.checkChilds == false) {
|
|
14004
|
+
//select parent when check child and check parent is false TODO check this Action
|
|
14005
|
+
_this.selectItem(el);
|
|
14006
|
+
}
|
|
13998
14007
|
_this.open(el);
|
|
13999
|
-
// }
|
|
14000
14008
|
}
|
|
14001
14009
|
else {
|
|
14002
14010
|
_this.selectItem(el);
|
|
@@ -14007,9 +14015,11 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
|
|
|
14007
14015
|
}
|
|
14008
14016
|
else if (_this.selectedFieldName != null) {
|
|
14009
14017
|
if (el[_this.hasChildField] == true && el[_this.selectedFieldName] == true) {
|
|
14010
|
-
|
|
14018
|
+
if (_this.checkParents == false && _this.checkChilds == false) {
|
|
14019
|
+
//select parent when check child and check parent is false TODO check this Action
|
|
14020
|
+
_this.selectItem(el);
|
|
14021
|
+
}
|
|
14011
14022
|
_this.open(el);
|
|
14012
|
-
// }
|
|
14013
14023
|
}
|
|
14014
14024
|
else if (el[_this.selectedFieldName] == true) {
|
|
14015
14025
|
_this.selectItem(el);
|
|
@@ -14028,7 +14038,7 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
|
|
|
14028
14038
|
if (_this.list.length !== 0) {
|
|
14029
14039
|
if (_this.itemRow[_this.childField] && _this.itemRow[_this.childField].length > 0) {
|
|
14030
14040
|
result_1.forEach(function (el) {
|
|
14031
|
-
el.disabledCheckBox = false;
|
|
14041
|
+
el.disabledCheckBox = _this.selectableField != '' ? el[_this.selectableField] : false;
|
|
14032
14042
|
_this.itemRow[_this.childField][_this.itemRow[_this.childField].length] = el;
|
|
14033
14043
|
});
|
|
14034
14044
|
}
|
|
@@ -14042,7 +14052,8 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
|
|
|
14042
14052
|
if (_this.selectionLevel == 'parents' && result_1[i][_this.hasChildField] == false) {
|
|
14043
14053
|
result_1[i].disabledCheckBox = true;
|
|
14044
14054
|
}
|
|
14045
|
-
if (
|
|
14055
|
+
// if (this.selectionMode !== 'single' && (this.selectNodesRecursive == 'all' || this.selectNodesRecursive == 'childs')) {
|
|
14056
|
+
if (_this.selectionMode !== 'single' && _this.checkChilds == true) {
|
|
14046
14057
|
result_1[i].select = _this.itemRow.select === (undefined || null) ? false : _this.itemRow.select;
|
|
14047
14058
|
if (_this.itemRow.select === true && _this.selectionMode == 'multiple' && result_1[i][_this.hasChildField] === false) {
|
|
14048
14059
|
_this.selectedItems = _this.selectedItems.filter(function (c) { return c[_this.keyField] !== result_1[i][_this.keyField]; });
|
|
@@ -14057,9 +14068,11 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
|
|
|
14057
14068
|
_this.seletedKeyFields.forEach(function (n) {
|
|
14058
14069
|
if (n.includes(result_1[i][_this.keyField])) {
|
|
14059
14070
|
if (result_1[i][_this.hasChildField] == true) {
|
|
14060
|
-
|
|
14071
|
+
if (_this.checkParents == false && _this.checkChilds == false) {
|
|
14072
|
+
//select parent when check child and check parent is false TODO check this Action
|
|
14073
|
+
_this.selectItem(result_1[i]);
|
|
14074
|
+
}
|
|
14061
14075
|
_this.open(result_1[i]);
|
|
14062
|
-
// }
|
|
14063
14076
|
}
|
|
14064
14077
|
else {
|
|
14065
14078
|
_this.selectItem(result_1[i]);
|
|
@@ -14070,9 +14083,11 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
|
|
|
14070
14083
|
}
|
|
14071
14084
|
else if (_this.selectedFieldName != null) {
|
|
14072
14085
|
if (result_1[i][_this.hasChildField] == true && result_1[i][_this.selectedFieldName] == true) {
|
|
14073
|
-
|
|
14086
|
+
if (_this.checkParents == false && _this.checkChilds == false) {
|
|
14087
|
+
//select parent when check child and check parent is false TODO check this Action
|
|
14088
|
+
_this.selectItem(result_1[i]);
|
|
14089
|
+
}
|
|
14074
14090
|
_this.open(result_1[i]);
|
|
14075
|
-
// }
|
|
14076
14091
|
}
|
|
14077
14092
|
else if (result_1[i][_this.selectedFieldName] == true) {
|
|
14078
14093
|
_this.selectItem(result_1[i]);
|
|
@@ -14244,6 +14259,11 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
|
|
|
14244
14259
|
this.internalSelectItem(item, false);
|
|
14245
14260
|
}
|
|
14246
14261
|
};
|
|
14262
|
+
AXTreeViewComponent.prototype.unSelectItem = function (item) {
|
|
14263
|
+
if (item['select'] == true) {
|
|
14264
|
+
this.internalSelectItem(item, false);
|
|
14265
|
+
}
|
|
14266
|
+
};
|
|
14247
14267
|
AXTreeViewComponent.prototype.open = function (item) {
|
|
14248
14268
|
if (item['toggle'] !== true) {
|
|
14249
14269
|
this.toggleNode(item, true);
|
|
@@ -14327,8 +14347,12 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
|
|
|
14327
14347
|
], AXTreeViewComponent.prototype, "selectedFieldName", void 0);
|
|
14328
14348
|
__decorate([
|
|
14329
14349
|
Input(),
|
|
14330
|
-
__metadata("design:type",
|
|
14331
|
-
], AXTreeViewComponent.prototype, "
|
|
14350
|
+
__metadata("design:type", Boolean)
|
|
14351
|
+
], AXTreeViewComponent.prototype, "checkParents", void 0);
|
|
14352
|
+
__decorate([
|
|
14353
|
+
Input(),
|
|
14354
|
+
__metadata("design:type", Boolean)
|
|
14355
|
+
], AXTreeViewComponent.prototype, "checkChilds", void 0);
|
|
14332
14356
|
__decorate([
|
|
14333
14357
|
Input(),
|
|
14334
14358
|
__metadata("design:type", Array)
|
|
@@ -14385,6 +14409,10 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
|
|
|
14385
14409
|
Output(),
|
|
14386
14410
|
__metadata("design:type", EventEmitter)
|
|
14387
14411
|
], AXTreeViewComponent.prototype, "onItemMoved", void 0);
|
|
14412
|
+
__decorate([
|
|
14413
|
+
Input(),
|
|
14414
|
+
__metadata("design:type", String)
|
|
14415
|
+
], AXTreeViewComponent.prototype, "selectableField", void 0);
|
|
14388
14416
|
__decorate([
|
|
14389
14417
|
Output(),
|
|
14390
14418
|
__metadata("design:type", EventEmitter)
|