@smartbit4all/ng-client 3.1.10 → 3.1.11
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-dialog/smartdialog.service.mjs +7 -1
- package/esm2020/lib/smart-grid/components/table-layout-definer/table-layout-definer.component.mjs +25 -8
- package/fesm2015/smartbit4all-ng-client.mjs +31 -9
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +30 -7
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-dialog/smartdialog.service.d.ts +6 -0
- package/lib/smart-grid/components/table-layout-definer/table-layout-definer.component.d.ts +2 -0
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.1.11.tgz +0 -0
- package/smartbit4all-ng-client-3.1.10.tgz +0 -0
|
@@ -3158,6 +3158,12 @@ class SmartdialogService {
|
|
|
3158
3158
|
constructor(dialog, router) {
|
|
3159
3159
|
this.dialog = dialog;
|
|
3160
3160
|
this.router = router;
|
|
3161
|
+
this.defaultDialogSizes = {
|
|
3162
|
+
maxHeight: 100,
|
|
3163
|
+
minHeight: 100,
|
|
3164
|
+
maxWidth: 100,
|
|
3165
|
+
minWidth: 100
|
|
3166
|
+
};
|
|
3161
3167
|
}
|
|
3162
3168
|
createDialog(smartDialog, component) {
|
|
3163
3169
|
this.dialogData = smartDialog;
|
|
@@ -10476,10 +10482,17 @@ class TableLayoutDefinerComponent {
|
|
|
10476
10482
|
this.orderedColumnsAsObject = {};
|
|
10477
10483
|
this.disableSave = false;
|
|
10478
10484
|
this.alwaysShowColumns = [];
|
|
10479
|
-
this.
|
|
10485
|
+
this.addDisabled = false;
|
|
10486
|
+
// this.view = Object.assign(data.customComponentInputs.config.view);
|
|
10487
|
+
this.view = JSON.parse(JSON.stringify(data.customComponentInputs.config.view));
|
|
10480
10488
|
this.mapOrderedColumnsToObject();
|
|
10481
10489
|
this.constructForms();
|
|
10482
10490
|
this.getAlwaysShowColumns();
|
|
10491
|
+
this.addDisabled = !(this.forms.length < this.view.descriptor.columns.length);
|
|
10492
|
+
dialogRef
|
|
10493
|
+
.beforeClosed()
|
|
10494
|
+
.pipe(takeUntil(this._destroy$))
|
|
10495
|
+
.subscribe(() => { });
|
|
10483
10496
|
}
|
|
10484
10497
|
ngOnDestroy() {
|
|
10485
10498
|
this._destroy$.next();
|
|
@@ -10492,10 +10505,13 @@ class TableLayoutDefinerComponent {
|
|
|
10492
10505
|
comp.onValueChangeSubject?.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
10493
10506
|
let updatedOrderedColumns = this.getUpdatedOrderedColumns();
|
|
10494
10507
|
let findDuplicates = updatedOrderedColumns.filter((item, index) => updatedOrderedColumns.indexOf(item) !== index);
|
|
10495
|
-
this.disableSave = findDuplicates.length > 0
|
|
10508
|
+
this.disableSave = findDuplicates.length > 0 || this.hasEmptyValue(updatedOrderedColumns);
|
|
10496
10509
|
});
|
|
10497
10510
|
});
|
|
10498
10511
|
}
|
|
10512
|
+
hasEmptyValue(updatedOrderedColumns) {
|
|
10513
|
+
return updatedOrderedColumns.some((value) => value.length === 0);
|
|
10514
|
+
}
|
|
10499
10515
|
constructForms() {
|
|
10500
10516
|
this.forms = this.view.orderedColumnNames.map((col, index) => {
|
|
10501
10517
|
let form = {
|
|
@@ -10525,9 +10541,15 @@ class TableLayoutDefinerComponent {
|
|
|
10525
10541
|
}, 1000);
|
|
10526
10542
|
}
|
|
10527
10543
|
addColumn() {
|
|
10528
|
-
|
|
10529
|
-
|
|
10530
|
-
this.
|
|
10544
|
+
console.log('Mezők száma', this.forms?.length);
|
|
10545
|
+
console.log('Oszolop meták száma', this.view?.descriptor?.columns.length);
|
|
10546
|
+
if (this.forms.length < this.view.descriptor.columns.length) {
|
|
10547
|
+
this.view?.orderedColumnNames.push('');
|
|
10548
|
+
this.orderedColumnsAsObject[this.view.orderedColumnNames.length - 1] = '';
|
|
10549
|
+
this.constructForms();
|
|
10550
|
+
this.disableSave = true;
|
|
10551
|
+
}
|
|
10552
|
+
this.addDisabled = !(this.forms.length < this.view.descriptor.columns.length);
|
|
10531
10553
|
}
|
|
10532
10554
|
removeColumn(form) {
|
|
10533
10555
|
let propertyName = this.orderedColumnsAsObject[form.widgets[0].key];
|
|
@@ -10537,6 +10559,7 @@ class TableLayoutDefinerComponent {
|
|
|
10537
10559
|
}
|
|
10538
10560
|
this.mapOrderedColumnsToObject();
|
|
10539
10561
|
this.constructForms();
|
|
10562
|
+
this.addDisabled = !(this.forms.length < this.view.descriptor.columns.length);
|
|
10540
10563
|
}
|
|
10541
10564
|
getLabelFromColumnMeta(prop) {
|
|
10542
10565
|
let label = this.view?.descriptor?.columns.find((value) => value.propertyName === prop)?.label;
|
|
@@ -10608,10 +10631,10 @@ class TableLayoutDefinerComponent {
|
|
|
10608
10631
|
}
|
|
10609
10632
|
}
|
|
10610
10633
|
TableLayoutDefinerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: TableLayoutDefinerComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: SmartGridService }, { token: i1$2.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10611
|
-
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\r\n <div appStickyMenu class=\"button-toolbar\">\r\n <button mat-icon-button color=\"primary\" (click)=\"addColumn()\">\r\n <mat-icon>add</mat-icon>\r\n </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}\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"] }] });
|
|
10634
|
+
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\r\n <div appStickyMenu class=\"button-toolbar\">\r\n <button mat-icon-button color=\"primary\" [disabled]=\"addDisabled\" (click)=\"addColumn()\">\r\n <mat-icon>add</mat-icon>\r\n </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}\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"] }] });
|
|
10612
10635
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: TableLayoutDefinerComponent, decorators: [{
|
|
10613
10636
|
type: Component,
|
|
10614
|
-
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\r\n <div appStickyMenu class=\"button-toolbar\">\r\n <button mat-icon-button color=\"primary\" (click)=\"addColumn()\">\r\n <mat-icon>add</mat-icon>\r\n </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}\n"] }]
|
|
10637
|
+
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\r\n <div appStickyMenu class=\"button-toolbar\">\r\n <button mat-icon-button color=\"primary\" [disabled]=\"addDisabled\" (click)=\"addColumn()\">\r\n <mat-icon>add</mat-icon>\r\n </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}\n"] }]
|
|
10615
10638
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
10616
10639
|
type: Inject,
|
|
10617
10640
|
args: [MAT_DIALOG_DATA]
|