@smartbit4all/ng-client 3.1.84 → 3.1.86
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/smart-grid/components/table-layout-definer/table-layout-definer.component.mjs +10 -9
- package/fesm2015/smartbit4all-ng-client.mjs +9 -8
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +9 -8
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-grid/components/table-layout-definer/table-layout-definer.component.d.ts +1 -1
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.1.86.tgz +0 -0
- package/smartbit4all-ng-client-3.1.84.tgz +0 -0
|
@@ -10364,14 +10364,15 @@ class TableLayoutDefinerComponent {
|
|
|
10364
10364
|
this.orderedColumnsAsObject = {};
|
|
10365
10365
|
this.disableSave = false;
|
|
10366
10366
|
this.alwaysShowColumns = [];
|
|
10367
|
-
this.addDisabled = false;
|
|
10368
10367
|
this.showAddBtn = true;
|
|
10369
10368
|
this.view = JSON.parse(JSON.stringify(data.customComponentInputs.config.view));
|
|
10370
10369
|
this.mapOrderedColumnsToObject();
|
|
10371
10370
|
this.constructForms();
|
|
10372
10371
|
this.getAlwaysShowColumns();
|
|
10373
|
-
this.
|
|
10374
|
-
|
|
10372
|
+
this.showAddBtn = !(this.forms.length == this.getMaxColumnCount());
|
|
10373
|
+
}
|
|
10374
|
+
getMaxColumnCount() {
|
|
10375
|
+
return this.view.descriptor.columns.filter((col) => !col.alwaysHidden).length;
|
|
10375
10376
|
}
|
|
10376
10377
|
ngOnDestroy() {
|
|
10377
10378
|
this._destroy$.next();
|
|
@@ -10420,13 +10421,13 @@ class TableLayoutDefinerComponent {
|
|
|
10420
10421
|
}, 1000);
|
|
10421
10422
|
}
|
|
10422
10423
|
addColumn() {
|
|
10423
|
-
if (this.forms.length < this.
|
|
10424
|
+
if (this.forms.length < this.getMaxColumnCount()) {
|
|
10424
10425
|
this.view?.orderedColumnNames.push('');
|
|
10425
10426
|
this.orderedColumnsAsObject[this.view.orderedColumnNames.length - 1] = '';
|
|
10426
10427
|
this.constructForms();
|
|
10427
10428
|
this.disableSave = true;
|
|
10428
10429
|
}
|
|
10429
|
-
this.showAddBtn = this.forms.length < this.
|
|
10430
|
+
this.showAddBtn = this.forms.length < this.getMaxColumnCount();
|
|
10430
10431
|
}
|
|
10431
10432
|
removeColumn(form) {
|
|
10432
10433
|
let propertyName = this.orderedColumnsAsObject[form.widgets[0].key];
|
|
@@ -10436,7 +10437,7 @@ class TableLayoutDefinerComponent {
|
|
|
10436
10437
|
}
|
|
10437
10438
|
this.mapOrderedColumnsToObject();
|
|
10438
10439
|
this.constructForms();
|
|
10439
|
-
this.
|
|
10440
|
+
this.showAddBtn = this.forms.length < this.getMaxColumnCount();
|
|
10440
10441
|
}
|
|
10441
10442
|
getLabelFromColumnMeta(prop) {
|
|
10442
10443
|
let label = this.view?.descriptor?.columns.find((value) => value.propertyName === prop)?.label;
|
|
@@ -10511,10 +10512,10 @@ class TableLayoutDefinerComponent {
|
|
|
10511
10512
|
}
|
|
10512
10513
|
}
|
|
10513
10514
|
TableLayoutDefinerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: TableLayoutDefinerComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1$2.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10514
|
-
TableLayoutDefinerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: TableLayoutDefinerComponent, selector: "app-table-layout-definer", viewQueries: [{ propertyName: "formChildren", predicate: ["forms"], descendants: true }], ngImport: i0, template: "<div class=\"edit-columns-container\">\r\n <div class=\"example-list\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\r\n <div class=\"column-meta-row\" *ngFor=\"let col of forms\" cdkDrag cdkDragLockAxis=\"y\">\r\n <smart-icon color=\"primary\" icon=\"drag_handle\"></smart-icon>\r\n <smartform class=\"form\" #forms [smartForm]=\"col\"></smartform>\r\n <button\r\n *ngIf=\"isAlwaysShow(col) && (view?.orderedColumnNames)!.length > 1\"\r\n (click)=\"removeColumn(col)\"\r\n mat-icon-button\r\n color=\"primary\"\r\n >\r\n <mat-icon>delete_outline</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"add-btn\" *ngIf=\"showAddBtn\">\r\n <button mat-icon-button color=\"primary\"
|
|
10515
|
+
TableLayoutDefinerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: TableLayoutDefinerComponent, selector: "app-table-layout-definer", viewQueries: [{ propertyName: "formChildren", predicate: ["forms"], descendants: true }], ngImport: i0, template: "<div class=\"edit-columns-container\">\r\n <div class=\"example-list\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\r\n <div class=\"column-meta-row\" *ngFor=\"let col of forms\" cdkDrag cdkDragLockAxis=\"y\">\r\n <smart-icon color=\"primary\" icon=\"drag_handle\"></smart-icon>\r\n <smartform class=\"form\" #forms [smartForm]=\"col\"></smartform>\r\n <button\r\n *ngIf=\"isAlwaysShow(col) && (view?.orderedColumnNames)!.length > 1\"\r\n (click)=\"removeColumn(col)\"\r\n mat-icon-button\r\n color=\"primary\"\r\n >\r\n <mat-icon>delete_outline</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"add-btn\" *ngIf=\"showAddBtn\">\r\n <button mat-icon-button color=\"primary\" (click)=\"addColumn()\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"button-toolbar\">\r\n <button mat-button color=\"primary\" (click)=\"cancel()\"> M\u00E9gsem </button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"disableSave\" (click)=\"submit()\">\r\n Ment\u00E9s\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".edit-columns-container{padding:1rem;display:flex;flex-direction:column;gap:1rem}.row{display:flex;flex-direction:row;gap:.5rem}.form{flex:1}.fields{padding:1rem 0;display:flex;flex-direction:column;gap:.5rem}.example-list{display:flex;flex-direction:column;gap:1rem;width:500px;max-width:100%;max-height:80vh;overflow:auto}.column-meta-row{display:flex;flex-direction:row;gap:1rem;justify-content:space-between;border:solid 1px #ccc;padding:1rem}.buttonsContainer{display:flex;flex-direction:row;justify-content:space-between}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box:last-child{border:none}.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}h2{margin:0}.button-toolbar{display:flex;flex-direction:row;justify-content:space-between;padding:.5rem}.add-btn{display:flex;flex-direction:column;align-items:center}\n"], components: [{ type: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { type: SmartformComponent, selector: "smartform", inputs: ["smartForm"] }, { type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
10515
10516
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: TableLayoutDefinerComponent, decorators: [{
|
|
10516
10517
|
type: Component,
|
|
10517
|
-
args: [{ selector: 'app-table-layout-definer', template: "<div class=\"edit-columns-container\">\r\n <div class=\"example-list\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\r\n <div class=\"column-meta-row\" *ngFor=\"let col of forms\" cdkDrag cdkDragLockAxis=\"y\">\r\n <smart-icon color=\"primary\" icon=\"drag_handle\"></smart-icon>\r\n <smartform class=\"form\" #forms [smartForm]=\"col\"></smartform>\r\n <button\r\n *ngIf=\"isAlwaysShow(col) && (view?.orderedColumnNames)!.length > 1\"\r\n (click)=\"removeColumn(col)\"\r\n mat-icon-button\r\n color=\"primary\"\r\n >\r\n <mat-icon>delete_outline</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"add-btn\" *ngIf=\"showAddBtn\">\r\n <button mat-icon-button color=\"primary\"
|
|
10518
|
+
args: [{ selector: 'app-table-layout-definer', template: "<div class=\"edit-columns-container\">\r\n <div class=\"example-list\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\r\n <div class=\"column-meta-row\" *ngFor=\"let col of forms\" cdkDrag cdkDragLockAxis=\"y\">\r\n <smart-icon color=\"primary\" icon=\"drag_handle\"></smart-icon>\r\n <smartform class=\"form\" #forms [smartForm]=\"col\"></smartform>\r\n <button\r\n *ngIf=\"isAlwaysShow(col) && (view?.orderedColumnNames)!.length > 1\"\r\n (click)=\"removeColumn(col)\"\r\n mat-icon-button\r\n color=\"primary\"\r\n >\r\n <mat-icon>delete_outline</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"add-btn\" *ngIf=\"showAddBtn\">\r\n <button mat-icon-button color=\"primary\" (click)=\"addColumn()\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"button-toolbar\">\r\n <button mat-button color=\"primary\" (click)=\"cancel()\"> M\u00E9gsem </button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"disableSave\" (click)=\"submit()\">\r\n Ment\u00E9s\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".edit-columns-container{padding:1rem;display:flex;flex-direction:column;gap:1rem}.row{display:flex;flex-direction:row;gap:.5rem}.form{flex:1}.fields{padding:1rem 0;display:flex;flex-direction:column;gap:.5rem}.example-list{display:flex;flex-direction:column;gap:1rem;width:500px;max-width:100%;max-height:80vh;overflow:auto}.column-meta-row{display:flex;flex-direction:row;gap:1rem;justify-content:space-between;border:solid 1px #ccc;padding:1rem}.buttonsContainer{display:flex;flex-direction:row;justify-content:space-between}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box:last-child{border:none}.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}h2{margin:0}.button-toolbar{display:flex;flex-direction:row;justify-content:space-between;padding:.5rem}.add-btn{display:flex;flex-direction:column;align-items:center}\n"] }]
|
|
10518
10519
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
10519
10520
|
type: Inject,
|
|
10520
10521
|
args: [MAT_DIALOG_DATA]
|