@acorex/components 6.5.12 → 6.5.13
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/esm2020/lib/tree-view/tree-view.component.mjs +33 -3
- package/fesm2015/acorex-components.mjs +32 -2
- package/fesm2015/acorex-components.mjs.map +1 -1
- package/fesm2020/acorex-components.mjs +32 -2
- package/fesm2020/acorex-components.mjs.map +1 -1
- package/lib/tree-view/tree-view.component.d.ts +2 -1
- package/package.json +1 -1
|
@@ -14963,6 +14963,7 @@ class AXTreeViewComponent extends AXBaseComponent {
|
|
|
14963
14963
|
this.lazyLoading = true;
|
|
14964
14964
|
this.allowDrag = false;
|
|
14965
14965
|
this.size = 'md';
|
|
14966
|
+
this.disabled = false;
|
|
14966
14967
|
this.selectionChanged = new EventEmitter();
|
|
14967
14968
|
this.seletedKeyFieldsChanged = new EventEmitter();
|
|
14968
14969
|
this.onItemOpening = new EventEmitter();
|
|
@@ -14988,6 +14989,9 @@ class AXTreeViewComponent extends AXBaseComponent {
|
|
|
14988
14989
|
this.levelCount = 0;
|
|
14989
14990
|
}
|
|
14990
14991
|
handleOnContextMenuItem(e) {
|
|
14992
|
+
if (this.disabled) {
|
|
14993
|
+
return;
|
|
14994
|
+
}
|
|
14991
14995
|
this.onContextMenuItemClick.emit(e);
|
|
14992
14996
|
}
|
|
14993
14997
|
refresh() {
|
|
@@ -14995,6 +14999,9 @@ class AXTreeViewComponent extends AXBaseComponent {
|
|
|
14995
14999
|
this._contentDataSource.fetch(null);
|
|
14996
15000
|
}
|
|
14997
15001
|
internalSelectItem(item, userChange = true) {
|
|
15002
|
+
if (this.disabled) {
|
|
15003
|
+
return;
|
|
15004
|
+
}
|
|
14998
15005
|
if (item[this.hasChildField] === false || this.selectionMode === 'single') {
|
|
14999
15006
|
item.select = !item.select;
|
|
15000
15007
|
if (item.parentNode && this.selectionMode !== 'single' && this.checkParents == true) {
|
|
@@ -15051,6 +15058,9 @@ class AXTreeViewComponent extends AXBaseComponent {
|
|
|
15051
15058
|
}
|
|
15052
15059
|
makeNode(item, addChildren = true) {
|
|
15053
15060
|
var _a;
|
|
15061
|
+
if (this.disabled) {
|
|
15062
|
+
return;
|
|
15063
|
+
}
|
|
15054
15064
|
const node = new AXTreeViewNode();
|
|
15055
15065
|
if (addChildren) {
|
|
15056
15066
|
node.children = item[this.childField] === undefined ? [] : (_a = item[this.childField]) === null || _a === void 0 ? void 0 : _a.map((m) => this.makeNode(m));
|
|
@@ -15113,6 +15123,9 @@ class AXTreeViewComponent extends AXBaseComponent {
|
|
|
15113
15123
|
return node;
|
|
15114
15124
|
}
|
|
15115
15125
|
changeChildSelect(item, s) {
|
|
15126
|
+
if (this.disabled) {
|
|
15127
|
+
return;
|
|
15128
|
+
}
|
|
15116
15129
|
// if (this.selectNodesRecursive == 'all' || this.selectNodesRecursive == 'childs') {
|
|
15117
15130
|
if (this.checkChilds == true) {
|
|
15118
15131
|
item.select = s;
|
|
@@ -15147,6 +15160,9 @@ class AXTreeViewComponent extends AXBaseComponent {
|
|
|
15147
15160
|
}
|
|
15148
15161
|
}
|
|
15149
15162
|
changeParentSelect(item) {
|
|
15163
|
+
if (this.disabled) {
|
|
15164
|
+
return;
|
|
15165
|
+
}
|
|
15150
15166
|
//if (this.selectNodesRecursive == 'all' || this.selectNodesRecursive == 'parents') {
|
|
15151
15167
|
if (this.checkParents) {
|
|
15152
15168
|
let allselect = true;
|
|
@@ -15197,11 +15213,17 @@ class AXTreeViewComponent extends AXBaseComponent {
|
|
|
15197
15213
|
});
|
|
15198
15214
|
}
|
|
15199
15215
|
itemdbClick(e, item) {
|
|
15216
|
+
if (this.disabled) {
|
|
15217
|
+
return;
|
|
15218
|
+
}
|
|
15200
15219
|
if (this.selectionMode == 'single') {
|
|
15201
15220
|
this.handleOnNodeClick(e, item, true);
|
|
15202
15221
|
}
|
|
15203
15222
|
}
|
|
15204
15223
|
handleOnNodeClick(e, item, flag = false) {
|
|
15224
|
+
if (this.disabled) {
|
|
15225
|
+
return;
|
|
15226
|
+
}
|
|
15205
15227
|
// this.internalSelectItem(item);
|
|
15206
15228
|
this.onItemClick.emit({
|
|
15207
15229
|
component: this,
|
|
@@ -15211,6 +15233,9 @@ class AXTreeViewComponent extends AXBaseComponent {
|
|
|
15211
15233
|
});
|
|
15212
15234
|
}
|
|
15213
15235
|
nodeClick(item) {
|
|
15236
|
+
if (this.disabled) {
|
|
15237
|
+
return;
|
|
15238
|
+
}
|
|
15214
15239
|
if (item[this.hasChildField] == true) {
|
|
15215
15240
|
this.toggleNode(item, true);
|
|
15216
15241
|
}
|
|
@@ -15219,6 +15244,9 @@ class AXTreeViewComponent extends AXBaseComponent {
|
|
|
15219
15244
|
}
|
|
15220
15245
|
}
|
|
15221
15246
|
toggleNode(item, flag = false) {
|
|
15247
|
+
if (this.disabled) {
|
|
15248
|
+
return;
|
|
15249
|
+
}
|
|
15222
15250
|
//item[this.hasChildField] === false &&
|
|
15223
15251
|
if (this.selectionMode === 'single' && !flag) {
|
|
15224
15252
|
if (this.selectionLevel == 'nodes' && item.hasChild == true) {
|
|
@@ -15627,10 +15655,10 @@ class AXTreeViewComponent extends AXBaseComponent {
|
|
|
15627
15655
|
}
|
|
15628
15656
|
}
|
|
15629
15657
|
AXTreeViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXTreeViewComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
15630
|
-
AXTreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXTreeViewComponent, selector: "ax-tree-view", inputs: { selectionMode: "selectionMode", selectionLevel: "selectionLevel", selectedFieldName: "selectedFieldName", checkParents: "checkParents", checkChilds: "checkChilds", seletedKeyFields: "seletedKeyFields", keyField: "keyField", hasChildField: "hasChildField", bordered: "bordered", lazyLoading: "lazyLoading", allowDrag: "allowDrag", size: "size", selectableField: "selectableField", contextMenuItems: "contextMenuItems" }, outputs: { selectionChanged: "selectionChanged", seletedKeyFieldsChanged: "seletedKeyFieldsChanged", onItemOpening: "onItemOpening", onItemClick: "onItemClick", onItemClosing: "onItemClosing", onItemDrag: "onItemDrag", onItemMoved: "onItemMoved", onContextMenuItemClick: "onContextMenuItemClick" }, queries: [{ propertyName: "nodeTemplate", first: true, predicate: TemplateRef, descendants: true, static: true }, { propertyName: "_contentDataSource", first: true, predicate: AXDataSourceComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ul class=\"ax treeview {{size}}\">\r\n <ng-template #recursiveList let-list>\r\n <ng-container *ngFor=\"let item of list\">\r\n <li class=\"active {{item[hasChildField] ? '':'node'}}\" [class.bordered]=\"bordered\"\r\n [class.selected]=\"item.select\" [draggable]=\"allowDrag\" (dragstart)=\"onDragStart($event, item)\"\r\n [attr.data-id]=\"item[keyField]\" (dragleave)=\"onDragEnd($event,item)\" (dragend)=drop($event)>\r\n <div axContextMenu [contextDataItem]=\"item\"
|
|
15658
|
+
AXTreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXTreeViewComponent, selector: "ax-tree-view", inputs: { selectionMode: "selectionMode", selectionLevel: "selectionLevel", selectedFieldName: "selectedFieldName", checkParents: "checkParents", checkChilds: "checkChilds", seletedKeyFields: "seletedKeyFields", keyField: "keyField", hasChildField: "hasChildField", bordered: "bordered", lazyLoading: "lazyLoading", allowDrag: "allowDrag", size: "size", disabled: "disabled", selectableField: "selectableField", contextMenuItems: "contextMenuItems" }, outputs: { selectionChanged: "selectionChanged", seletedKeyFieldsChanged: "seletedKeyFieldsChanged", onItemOpening: "onItemOpening", onItemClick: "onItemClick", onItemClosing: "onItemClosing", onItemDrag: "onItemDrag", onItemMoved: "onItemMoved", onContextMenuItemClick: "onContextMenuItemClick" }, queries: [{ propertyName: "nodeTemplate", first: true, predicate: TemplateRef, descendants: true, static: true }, { propertyName: "_contentDataSource", first: true, predicate: AXDataSourceComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ul class=\"ax treeview {{size}}\">\r\n <ng-template #recursiveList let-list>\r\n <ng-container *ngFor=\"let item of list\">\r\n <li class=\"active {{item[hasChildField] ? '':'node'}}\" [class.bordered]=\"bordered\"\r\n [class.selected]=\"item.select\" [draggable]=\"allowDrag\" (dragstart)=\"onDragStart($event, item)\"\r\n [attr.data-id]=\"item[keyField]\" (dragleave)=\"onDragEnd($event,item)\" (dragend)=drop($event)>\r\n <div [class.disabled]=\"disabled\" axContextMenu [contextDataItem]=\"item\"\r\n [contextMenuItems]=\"contextMenuItems\" [contextMenu]=\"menu\"\r\n (onContextMenuItemClick)=\"handleOnContextMenuItem($event)\"\r\n style=\"display: flex; cursor: pointer;align-items: center;\">\r\n <div class=\"start-side\">\r\n <div *ngIf=\"item[hasChildField]\" class=\"collapse-icon\"\r\n (click)=\"handleOnNodeClick($event,item,true)\">\r\n <i class=\"fal\"\r\n [ngClass]=\"{'fa-minus': !!item.toggle , 'fa-plus': !item.toggle , 'fa-spinner fa-spin':item.loading }\"></i>\r\n </div>\r\n\r\n <ax-check-box *ngIf=\"showSelectBox\" [disabled]=\"item.disabledCheckBox || disabled\" [size]=\"size\"\r\n [indeterminate]=\"true\" [value]=\"item.select\" (onClick)=\"internalSelectItem(item)\">\r\n </ax-check-box>\r\n\r\n\r\n </div>\r\n <div class=\"text-list\" (click)=\"nodeClick(item)\" (dblclick)=\"itemdbClick($event,item)\">\r\n <ng-container *ngIf=\"nodeTemplate; else elseTemplate\">\r\n <ng-container *ngTemplateOutlet=\"nodeTemplate; context:{ $implicit: item }\"></ng-container>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n {{item.title}}\r\n </ng-template>\r\n </div>\r\n </div>\r\n <ul *ngIf=\"item.loading\">\r\n <i class=\"far \"></i>\r\n </ul>\r\n <ul class=\"child\" *ngIf=\"item.toggle\" style=\"background-color: white !important;\">\r\n <ng-container *ngTemplateOutlet=\"recursiveList; context:{ $implicit: item.childeren }\">\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-template>\r\n <ng-container *ngTemplateOutlet=\"recursiveList; context:{ $implicit: list }\"></ng-container>\r\n</ul>\r\n\r\n<ax-context-menu #menu></ax-context-menu>", components: [{ type: AXCheckBoxComponent, selector: "ax-check-box", inputs: ["readonly", "disabled", "size", "label", "tabIndex", "indeterminate", "value"], outputs: ["onValueChanged", "valueChange", "onClick"] }, { type: AXContextMenuComponent, selector: "ax-context-menu", inputs: ["size", "width", "items"], outputs: ["onItemClick", "onClosed"] }], directives: [{ type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: AXContextMenuDirective, selector: "[axContextMenu]", inputs: ["contextMenu", "contextDataItem", "contextMenuItems", "rtl"], outputs: ["onContextMenuItemClick"] }, { type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
15631
15659
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXTreeViewComponent, decorators: [{
|
|
15632
15660
|
type: Component,
|
|
15633
|
-
args: [{ selector: 'ax-tree-view', encapsulation: ViewEncapsulation.None, template: "<ul class=\"ax treeview {{size}}\">\r\n <ng-template #recursiveList let-list>\r\n <ng-container *ngFor=\"let item of list\">\r\n <li class=\"active {{item[hasChildField] ? '':'node'}}\" [class.bordered]=\"bordered\"\r\n [class.selected]=\"item.select\" [draggable]=\"allowDrag\" (dragstart)=\"onDragStart($event, item)\"\r\n [attr.data-id]=\"item[keyField]\" (dragleave)=\"onDragEnd($event,item)\" (dragend)=drop($event)>\r\n <div axContextMenu [contextDataItem]=\"item\"
|
|
15661
|
+
args: [{ selector: 'ax-tree-view', encapsulation: ViewEncapsulation.None, template: "<ul class=\"ax treeview {{size}}\">\r\n <ng-template #recursiveList let-list>\r\n <ng-container *ngFor=\"let item of list\">\r\n <li class=\"active {{item[hasChildField] ? '':'node'}}\" [class.bordered]=\"bordered\"\r\n [class.selected]=\"item.select\" [draggable]=\"allowDrag\" (dragstart)=\"onDragStart($event, item)\"\r\n [attr.data-id]=\"item[keyField]\" (dragleave)=\"onDragEnd($event,item)\" (dragend)=drop($event)>\r\n <div [class.disabled]=\"disabled\" axContextMenu [contextDataItem]=\"item\"\r\n [contextMenuItems]=\"contextMenuItems\" [contextMenu]=\"menu\"\r\n (onContextMenuItemClick)=\"handleOnContextMenuItem($event)\"\r\n style=\"display: flex; cursor: pointer;align-items: center;\">\r\n <div class=\"start-side\">\r\n <div *ngIf=\"item[hasChildField]\" class=\"collapse-icon\"\r\n (click)=\"handleOnNodeClick($event,item,true)\">\r\n <i class=\"fal\"\r\n [ngClass]=\"{'fa-minus': !!item.toggle , 'fa-plus': !item.toggle , 'fa-spinner fa-spin':item.loading }\"></i>\r\n </div>\r\n\r\n <ax-check-box *ngIf=\"showSelectBox\" [disabled]=\"item.disabledCheckBox || disabled\" [size]=\"size\"\r\n [indeterminate]=\"true\" [value]=\"item.select\" (onClick)=\"internalSelectItem(item)\">\r\n </ax-check-box>\r\n\r\n\r\n </div>\r\n <div class=\"text-list\" (click)=\"nodeClick(item)\" (dblclick)=\"itemdbClick($event,item)\">\r\n <ng-container *ngIf=\"nodeTemplate; else elseTemplate\">\r\n <ng-container *ngTemplateOutlet=\"nodeTemplate; context:{ $implicit: item }\"></ng-container>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n {{item.title}}\r\n </ng-template>\r\n </div>\r\n </div>\r\n <ul *ngIf=\"item.loading\">\r\n <i class=\"far \"></i>\r\n </ul>\r\n <ul class=\"child\" *ngIf=\"item.toggle\" style=\"background-color: white !important;\">\r\n <ng-container *ngTemplateOutlet=\"recursiveList; context:{ $implicit: item.childeren }\">\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-template>\r\n <ng-container *ngTemplateOutlet=\"recursiveList; context:{ $implicit: list }\"></ng-container>\r\n</ul>\r\n\r\n<ax-context-menu #menu></ax-context-menu>" }]
|
|
15634
15662
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { nodeTemplate: [{
|
|
15635
15663
|
type: ContentChild,
|
|
15636
15664
|
args: [TemplateRef, { static: true }]
|
|
@@ -15661,6 +15689,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
15661
15689
|
type: Input
|
|
15662
15690
|
}], size: [{
|
|
15663
15691
|
type: Input
|
|
15692
|
+
}], disabled: [{
|
|
15693
|
+
type: Input
|
|
15664
15694
|
}], selectionChanged: [{
|
|
15665
15695
|
type: Output
|
|
15666
15696
|
}], seletedKeyFieldsChanged: [{
|