@tetacom/ng-components 1.0.55 → 1.0.58

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.
@@ -9852,6 +9852,8 @@ class TableComponent {
9852
9852
  this.valueChange = new EventEmitter();
9853
9853
  this.tableService = new EventEmitter();
9854
9854
  this.tableClass = true;
9855
+ this.verticalAlign = VerticalAlign;
9856
+ this.align = Align;
9855
9857
  this._alive = true;
9856
9858
  this.onScroll = () => {
9857
9859
  this._headElement.scrollLeft = this._bodyElement.scrollLeft;
@@ -10163,10 +10165,10 @@ class TableComponent {
10163
10165
  }
10164
10166
  }
10165
10167
  TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TableComponent, deps: [{ token: TableService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
10166
- TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: TableComponent, selector: "teta-table", inputs: { data: "data", columns: "columns", dict: "dict", filterOptions: "filterOptions", state: "state", cookieName: "cookieName", virtual: "virtual", detailComponent: "detailComponent", activeRow: "activeRow", selectedRows: "selectedRows", selectType: "selectType", aggregate: "aggregate", trackRow: "trackRow", editType: "editType", editEvent: "editEvent", rowEditable: "rowEditable", rowClass: "rowClass", scrollToIndex: "scrollToIndex", showHeadCellMenu: "showHeadCellMenu", contextMenu: "contextMenu", contextMenuOpen: "contextMenuOpen" }, outputs: { contextMenuOpenChange: "contextMenuOpenChange", stateChange: "stateChange", bodyLeft: "bodyLeft", activeRowChange: "activeRowChange", selectedRowsChange: "selectedRowsChange", cellClick: "cellClick", cellDoubleClick: "cellDoubleClick", cellFocus: "cellFocus", cellKeyDown: "cellKeyDown", rowLeft: "rowLeft", rowEditStart: "rowEditStart", rowEditEnd: "rowEditEnd", cellEditStart: "cellEditStart", cellEditEnd: "cellEditEnd", valueChange: "valueChange", tableService: "tableService" }, host: { listeners: { "document:click": "handleClickOutsideAnyRow($event)", "focusin": "focusIn($event)", "dblclick": "dblclick($event)", "keydown": "keydown($event)", "mousedown": "mousedown($event)" }, properties: { "class.table": "this.tableClass" } }, providers: [TableService], viewQueries: [{ propertyName: "menu", first: true, predicate: ["contextMenu"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"column column_auto\">\n <teta-table-head\n [selectType]=\"selectType\"\n [showHeadCellMenu]=\"showHeadCellMenu\"></teta-table-head>\n <div class=\"column column_auto position-relative\">\n <teta-table-body\n (contextmenu)=\"setContextMenuRow($event)\"\n [tetaContextMenu]=\"contextMenu\"\n [appendToBody]=\"true\"\n [data]=\"contextMenuRow\"\n [open]=\"contextMenuOpen\"\n (openChange)=\"setContextMenuOpen($event)\"\n [aggregate]=\"aggregate\"\n [virtual]=\"virtual\"\n [activeRow]=\"activeRow\"\n [selectedRows]=\"selectedRowsList\"\n [additionalComponent]=\"detailComponent\"\n [selectType]=\"selectType\"\n [rowClass]=\"rowClass\"></teta-table-body>\n <div class=\"column column_auto\"\n style=\"position: absolute; top:0; bottom:0;left:0;right:0;\"\n *ngIf=\"!data?.length\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: ContextMenuDirective, selector: "[tetaContextMenu]", inputs: ["tetaContextMenu", "autoCloseIgnore"] }, { kind: "component", type: TableHeadComponent, selector: "teta-table-head", inputs: ["selectType", "showHeadCellMenu"] }, { kind: "component", type: TableBodyComponent, selector: "teta-table-body", inputs: ["virtual", "activeRow", "selectedRows", "additionalComponent", "aggregate", "selectType", "rowClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
10168
+ TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: TableComponent, selector: "teta-table", inputs: { data: "data", columns: "columns", dict: "dict", filterOptions: "filterOptions", state: "state", cookieName: "cookieName", virtual: "virtual", detailComponent: "detailComponent", activeRow: "activeRow", selectedRows: "selectedRows", selectType: "selectType", aggregate: "aggregate", trackRow: "trackRow", editType: "editType", editEvent: "editEvent", rowEditable: "rowEditable", rowClass: "rowClass", scrollToIndex: "scrollToIndex", showHeadCellMenu: "showHeadCellMenu", contextMenu: "contextMenu", contextMenuOpen: "contextMenuOpen" }, outputs: { contextMenuOpenChange: "contextMenuOpenChange", stateChange: "stateChange", bodyLeft: "bodyLeft", activeRowChange: "activeRowChange", selectedRowsChange: "selectedRowsChange", cellClick: "cellClick", cellDoubleClick: "cellDoubleClick", cellFocus: "cellFocus", cellKeyDown: "cellKeyDown", rowLeft: "rowLeft", rowEditStart: "rowEditStart", rowEditEnd: "rowEditEnd", cellEditStart: "cellEditStart", cellEditEnd: "cellEditEnd", valueChange: "valueChange", tableService: "tableService" }, host: { listeners: { "document:click": "handleClickOutsideAnyRow($event)", "focusin": "focusIn($event)", "dblclick": "dblclick($event)", "keydown": "keydown($event)", "mousedown": "mousedown($event)" }, properties: { "class.table": "this.tableClass" } }, providers: [TableService], viewQueries: [{ propertyName: "menu", first: true, predicate: ["contextMenu"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"column column_auto\">\n <teta-table-head\n [selectType]=\"selectType\"\n [showHeadCellMenu]=\"showHeadCellMenu\"></teta-table-head>\n <div class=\"column column_auto position-relative\"\n [tetaContextMenu]=\"contextMenu\"\n [verticalAlign]=\"verticalAlign.auto\"\n [align]=\"align.auto\"\n [appendToBody]=\"true\"\n [data]=\"contextMenuRow\"\n [open]=\"contextMenuOpen\"\n (openChange)=\"setContextMenuOpen($event)\">\n <teta-table-body\n (contextmenu)=\"setContextMenuRow($event)\"\n [aggregate]=\"aggregate\"\n [virtual]=\"virtual\"\n [activeRow]=\"activeRow\"\n [selectedRows]=\"selectedRowsList\"\n [additionalComponent]=\"detailComponent\"\n [selectType]=\"selectType\"\n [rowClass]=\"rowClass\"></teta-table-body>\n <div class=\"column column_auto\"\n style=\"position: absolute; top:0; bottom:0;left:0;right:0; pointer-events: none\"\n *ngIf=\"!data?.length\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: ContextMenuDirective, selector: "[tetaContextMenu]", inputs: ["tetaContextMenu", "autoCloseIgnore"] }, { kind: "component", type: TableHeadComponent, selector: "teta-table-head", inputs: ["selectType", "showHeadCellMenu"] }, { kind: "component", type: TableBodyComponent, selector: "teta-table-body", inputs: ["virtual", "activeRow", "selectedRows", "additionalComponent", "aggregate", "selectType", "rowClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
10167
10169
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TableComponent, decorators: [{
10168
10170
  type: Component,
10169
- args: [{ selector: 'teta-table', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TableService], template: "<div class=\"column column_auto\">\n <teta-table-head\n [selectType]=\"selectType\"\n [showHeadCellMenu]=\"showHeadCellMenu\"></teta-table-head>\n <div class=\"column column_auto position-relative\">\n <teta-table-body\n (contextmenu)=\"setContextMenuRow($event)\"\n [tetaContextMenu]=\"contextMenu\"\n [appendToBody]=\"true\"\n [data]=\"contextMenuRow\"\n [open]=\"contextMenuOpen\"\n (openChange)=\"setContextMenuOpen($event)\"\n [aggregate]=\"aggregate\"\n [virtual]=\"virtual\"\n [activeRow]=\"activeRow\"\n [selectedRows]=\"selectedRowsList\"\n [additionalComponent]=\"detailComponent\"\n [selectType]=\"selectType\"\n [rowClass]=\"rowClass\"></teta-table-body>\n <div class=\"column column_auto\"\n style=\"position: absolute; top:0; bottom:0;left:0;right:0;\"\n *ngIf=\"!data?.length\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n" }]
10171
+ args: [{ selector: 'teta-table', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TableService], template: "<div class=\"column column_auto\">\n <teta-table-head\n [selectType]=\"selectType\"\n [showHeadCellMenu]=\"showHeadCellMenu\"></teta-table-head>\n <div class=\"column column_auto position-relative\"\n [tetaContextMenu]=\"contextMenu\"\n [verticalAlign]=\"verticalAlign.auto\"\n [align]=\"align.auto\"\n [appendToBody]=\"true\"\n [data]=\"contextMenuRow\"\n [open]=\"contextMenuOpen\"\n (openChange)=\"setContextMenuOpen($event)\">\n <teta-table-body\n (contextmenu)=\"setContextMenuRow($event)\"\n [aggregate]=\"aggregate\"\n [virtual]=\"virtual\"\n [activeRow]=\"activeRow\"\n [selectedRows]=\"selectedRowsList\"\n [additionalComponent]=\"detailComponent\"\n [selectType]=\"selectType\"\n [rowClass]=\"rowClass\"></teta-table-body>\n <div class=\"column column_auto\"\n style=\"position: absolute; top:0; bottom:0;left:0;right:0; pointer-events: none\"\n *ngIf=\"!data?.length\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n" }]
10170
10172
  }], ctorParameters: function () { return [{ type: TableService }, { type: i0.ElementRef }]; }, propDecorators: { data: [{
10171
10173
  type: Input
10172
10174
  }], columns: [{
@@ -11277,10 +11279,12 @@ class DragDropService {
11277
11279
  this.dragProcess = {
11278
11280
  selection: this.selection
11279
11281
  };
11282
+ this._document.body.style.cursor = 'copy';
11280
11283
  this._preview = this.createPreview();
11281
11284
  }
11282
11285
  stopProcess() {
11283
11286
  this.destroyPreview();
11287
+ this._document.body.style.cursor = 'default';
11284
11288
  this.dragProcess = null;
11285
11289
  this.startPosition = null;
11286
11290
  }
@@ -11325,7 +11329,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
11325
11329
  args: [{
11326
11330
  providedIn: 'root'
11327
11331
  }]
11328
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
11332
+ }], ctorParameters: function () { return [{ type: Document, decorators: [{
11329
11333
  type: Inject,
11330
11334
  args: [DOCUMENT]
11331
11335
  }] }, { type: i0.RendererFactory2 }]; } });
@@ -11432,7 +11436,7 @@ class DragDirective {
11432
11436
  return this._dragService?.selection?.items?.indexOf(this.instance) >= 0;
11433
11437
  }
11434
11438
  get isDropTarget() {
11435
- return this.dropTarget === this.instance;
11439
+ return this.dropTarget === this.instance && this.allowDrop;
11436
11440
  }
11437
11441
  mousedown(event) {
11438
11442
  if (!this.allowDrag) {
@@ -11452,7 +11456,9 @@ class DragDirective {
11452
11456
  mouseenter(event) {
11453
11457
  if (this.allowDrop) {
11454
11458
  event.stopPropagation();
11455
- this._dragService.setDropTarget(this.instance);
11459
+ if (this.allowDropPredicate === undefined || this.allowDropPredicate(this._dragService.selection, this.data)) {
11460
+ this._dragService.setDropTarget(this.instance);
11461
+ }
11456
11462
  }
11457
11463
  }
11458
11464
  mouseleave(event) {
@@ -11485,7 +11491,7 @@ class DragDirective {
11485
11491
  }
11486
11492
  }
11487
11493
  DragDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: DragDirective, deps: [{ token: DragContainerDirective, optional: true, skipSelf: true }, { token: DragDropService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
11488
- DragDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.2", type: DragDirective, selector: "[tetaDrag]", inputs: { data: ["tetaDrag", "data"], allowDrag: "allowDrag", allowDrop: "allowDrop" }, outputs: { tetaDragEnter: "tetaDragEnter", tetaDrop: "tetaDrop" }, host: { listeners: { "mousedown": "mousedown($event)", "touchstart": "mousedown($event)", "mouseenter": "mouseenter($event)", "mouseleave": "mouseleave($event)" }, properties: { "style.userSelect": "\"none\"", "class.teta-drag-item": "\"true\"", "class.teta_draggable_item": "this.allowDrag", "class.teta_droppable_item": "this.allowDrop", "class.teta-drag-selection": "this.selection", "class.teta-drop-target": "this.isDropTarget" } }, exportAs: ["drag"], ngImport: i0 });
11494
+ DragDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.2", type: DragDirective, selector: "[tetaDrag]", inputs: { data: ["tetaDrag", "data"], allowDrag: "allowDrag", allowDrop: "allowDrop", allowDropPredicate: "allowDropPredicate" }, outputs: { tetaDragEnter: "tetaDragEnter", tetaDrop: "tetaDrop" }, host: { listeners: { "mousedown": "mousedown($event)", "touchstart": "mousedown($event)", "mouseenter": "mouseenter($event)", "mouseleave": "mouseleave($event)" }, properties: { "style.userSelect": "\"none\"", "class.teta-drag-item": "\"true\"", "class.teta_draggable_item": "this.allowDrag", "class.teta_droppable_item": "this.allowDrop", "class.teta-drag-selection": "this.selection", "class.teta-drop-target": "this.isDropTarget" } }, exportAs: ["drag"], ngImport: i0 });
11489
11495
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: DragDirective, decorators: [{
11490
11496
  type: Directive,
11491
11497
  args: [{
@@ -11516,6 +11522,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
11516
11522
  args: ['class.teta_droppable_item']
11517
11523
  }, {
11518
11524
  type: Input
11525
+ }], allowDropPredicate: [{
11526
+ type: Input
11519
11527
  }], tetaDragEnter: [{
11520
11528
  type: Output
11521
11529
  }], tetaDrop: [{