@tetacom/ng-components 1.0.54 → 1.0.57
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/component/table/table/table.component.d.ts +4 -0
- package/directive/drag-drop/drag-drop.service.d.ts +1 -1
- package/directive/drag-drop/drag.directive.d.ts +3 -1
- package/esm2020/component/table/table/table.component.mjs +7 -3
- package/esm2020/component/table/util/table-util.mjs +4 -4
- package/esm2020/directive/drag-drop/drag-drop.service.mjs +4 -2
- package/esm2020/directive/drag-drop/drag.directive.mjs +8 -4
- package/fesm2015/tetacom-ng-components.mjs +17 -9
- package/fesm2015/tetacom-ng-components.mjs.map +1 -1
- package/fesm2020/tetacom-ng-components.mjs +17 -9
- package/fesm2020/tetacom-ng-components.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -7917,13 +7917,13 @@ class TableUtil {
|
|
|
7917
7917
|
return null;
|
|
7918
7918
|
}
|
|
7919
7919
|
static getData(data, state) {
|
|
7920
|
-
let result = data;
|
|
7920
|
+
let result = [...data];
|
|
7921
7921
|
result = TableUtil.filterData(result, state);
|
|
7922
7922
|
result = TableUtil.sortData(result, state);
|
|
7923
7923
|
return result;
|
|
7924
7924
|
}
|
|
7925
7925
|
static sortData(data, state) {
|
|
7926
|
-
let result = data;
|
|
7926
|
+
let result = [...data];
|
|
7927
7927
|
const func = (sortParam) => {
|
|
7928
7928
|
result = TableUtil.sort(result, sortParam);
|
|
7929
7929
|
};
|
|
@@ -7933,7 +7933,7 @@ class TableUtil {
|
|
|
7933
7933
|
return result;
|
|
7934
7934
|
}
|
|
7935
7935
|
static filterData(data, state) {
|
|
7936
|
-
let result = data;
|
|
7936
|
+
let result = [...data];
|
|
7937
7937
|
if (state?.stringFilters?.length) {
|
|
7938
7938
|
const stringFilter = (filter) => {
|
|
7939
7939
|
result = TableUtil.filterString(result, filter);
|
|
@@ -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\"
|
|
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;\"\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\"
|
|
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;\"\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:
|
|
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.
|
|
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: [{
|