@smartbit4all/ng-client 3.1.85 → 3.1.87

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.
@@ -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.addDisabled = !(this.forms.length < this.view.descriptor.columns.length);
10374
- this.showAddBtn = !(this.forms.length == this.view.descriptor.columns.length);
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.view.descriptor.columns.length) {
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.view.descriptor.columns.length;
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.addDisabled = !(this.forms.length < this.view.descriptor.columns.length);
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\" [disabled]=\"addDisabled\" (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
+ 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\" [disabled]=\"addDisabled\" (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
+ 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]
@@ -12153,7 +12154,7 @@ class SmartComponentLayoutComponent {
12153
12154
  }
12154
12155
  }
12155
12156
  SmartComponentLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutComponent, deps: [{ token: SmartformLayoutDefinitionService }], target: i0.ɵɵFactoryTarget.Component });
12156
- SmartComponentLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartComponentLayoutComponent, selector: "smart-component-layout", inputs: { smartComponentLayout: "smartComponentLayout" }, viewQueries: [{ propertyName: "smartFormList", predicate: ["form"], descendants: true }, { propertyName: "smartGridList", predicate: ["grid"], descendants: true }, { propertyName: "smartFilterList", predicate: ["filter"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"smartComponentLayout?.expandable; then expandable; else normal\"> </div>\r\n\r\n<ng-template #expandable>\r\n <smart-expandable-section\r\n *ngIf=\"expandableSection\"\r\n [data]=\"expandableSection\"\r\n ></smart-expandable-section>\r\n</ng-template>\r\n\r\n<ng-template #normal>\r\n <div\r\n *ngIf=\"smartComponentLayout?.type === type().Container\"\r\n [ngClass]=\"smartComponentLayout?.direction ?? 'vertical'\"\r\n >\r\n <smart-component-layout\r\n [smartComponentLayout]=\"layout\"\r\n *ngFor=\"let layout of smartComponentLayout?.components\"\r\n ></smart-component-layout>\r\n </div>\r\n <smartform #form [smartForm]=\"smartForm\"></smartform>\r\n <smart-grid #grid [smartGrid]=\"smartGrid\" [uuid]=\"uuid!\"></smart-grid>\r\n <!-- <smart-filter #filter [filter]=\"smartFilter\"></smart-filter> -->\r\n <smart-tree *ngIf=\"treeService\" [treeService]=\"treeService!\"></smart-tree>\r\n</ng-template>\r\n", styles: [".horizontal{display:flex;flex-direction:row}.vertical{display:flex;flex-direction:column}\n"], components: [{ type: ExpandableSectionComponent, selector: "smart-expandable-section", inputs: ["data", "index"] }, { type: SmartComponentLayoutComponent, selector: "smart-component-layout", inputs: ["smartComponentLayout"] }, { type: SmartformComponent, selector: "smartform", inputs: ["smartForm"] }, { type: SmartGridComponent, selector: "smart-grid", inputs: ["smartGrid", "uuid", "dev"] }, { type: SmartTreeComponent, selector: "smart-tree", inputs: ["treeStyle", "treeService"] }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
12157
+ SmartComponentLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartComponentLayoutComponent, selector: "smart-component-layout", inputs: { smartComponentLayout: "smartComponentLayout" }, viewQueries: [{ propertyName: "smartFormList", predicate: ["form"], descendants: true }, { propertyName: "smartGridList", predicate: ["grid"], descendants: true }, { propertyName: "smartFilterList", predicate: ["filter"], descendants: true }, { propertyName: "components", predicate: SmartComponentLayoutComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"smartComponentLayout?.expandable; then expandable; else normal\"> </div>\r\n\r\n<ng-template #expandable>\r\n <smart-expandable-section\r\n *ngIf=\"expandableSection\"\r\n [data]=\"expandableSection\"\r\n ></smart-expandable-section>\r\n</ng-template>\r\n\r\n<ng-template #normal>\r\n <div\r\n *ngIf=\"smartComponentLayout?.type === type().Container\"\r\n [ngClass]=\"smartComponentLayout?.direction ?? 'vertical'\"\r\n >\r\n <smart-component-layout\r\n [smartComponentLayout]=\"layout\"\r\n *ngFor=\"let layout of smartComponentLayout?.components\"\r\n ></smart-component-layout>\r\n </div>\r\n <smartform #form [smartForm]=\"smartForm\"></smartform>\r\n <smart-grid #grid [smartGrid]=\"smartGrid\" [uuid]=\"uuid!\"></smart-grid>\r\n <!-- <smart-filter #filter [filter]=\"smartFilter\"></smart-filter> -->\r\n <smart-tree *ngIf=\"treeService\" [treeService]=\"treeService!\"></smart-tree>\r\n</ng-template>\r\n", styles: [".horizontal{display:flex;flex-direction:row}.vertical{display:flex;flex-direction:column}\n"], components: [{ type: ExpandableSectionComponent, selector: "smart-expandable-section", inputs: ["data", "index"] }, { type: SmartComponentLayoutComponent, selector: "smart-component-layout", inputs: ["smartComponentLayout"] }, { type: SmartformComponent, selector: "smartform", inputs: ["smartForm"] }, { type: SmartGridComponent, selector: "smart-grid", inputs: ["smartGrid", "uuid", "dev"] }, { type: SmartTreeComponent, selector: "smart-tree", inputs: ["treeStyle", "treeService"] }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
12157
12158
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutComponent, decorators: [{
12158
12159
  type: Component,
12159
12160
  args: [{ selector: 'smart-component-layout', template: "<div *ngIf=\"smartComponentLayout?.expandable; then expandable; else normal\"> </div>\r\n\r\n<ng-template #expandable>\r\n <smart-expandable-section\r\n *ngIf=\"expandableSection\"\r\n [data]=\"expandableSection\"\r\n ></smart-expandable-section>\r\n</ng-template>\r\n\r\n<ng-template #normal>\r\n <div\r\n *ngIf=\"smartComponentLayout?.type === type().Container\"\r\n [ngClass]=\"smartComponentLayout?.direction ?? 'vertical'\"\r\n >\r\n <smart-component-layout\r\n [smartComponentLayout]=\"layout\"\r\n *ngFor=\"let layout of smartComponentLayout?.components\"\r\n ></smart-component-layout>\r\n </div>\r\n <smartform #form [smartForm]=\"smartForm\"></smartform>\r\n <smart-grid #grid [smartGrid]=\"smartGrid\" [uuid]=\"uuid!\"></smart-grid>\r\n <!-- <smart-filter #filter [filter]=\"smartFilter\"></smart-filter> -->\r\n <smart-tree *ngIf=\"treeService\" [treeService]=\"treeService!\"></smart-tree>\r\n</ng-template>\r\n", styles: [".horizontal{display:flex;flex-direction:row}.vertical{display:flex;flex-direction:column}\n"] }]
@@ -12168,6 +12169,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
12168
12169
  }], smartFilterList: [{
12169
12170
  type: ViewChildren,
12170
12171
  args: ['filter']
12172
+ }], components: [{
12173
+ type: ViewChildren,
12174
+ args: [SmartComponentLayoutComponent]
12171
12175
  }] } });
12172
12176
 
12173
12177
  class SmartComponentLayoutModule {
@@ -13363,6 +13367,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
13363
13367
  * Public API Surface of smarttree
13364
13368
  */
13365
13369
 
13370
+ class SmartComponentLayoutUtility {
13371
+ static setParent(layout, parent) {
13372
+ layout.parentComponent = parent;
13373
+ layout.components?.forEach((l) => this.setParent(l, parent));
13374
+ }
13375
+ static getForms(comp) {
13376
+ let result = [];
13377
+ if (comp.components) {
13378
+ result = comp.components
13379
+ .map((c) => this.getForms(c))
13380
+ .reduce((acc, value) => acc.concat(value), []);
13381
+ }
13382
+ if (comp.smartFormComponent) {
13383
+ result.push(comp.smartFormComponent);
13384
+ }
13385
+ return result;
13386
+ }
13387
+ static getGrids(comp) {
13388
+ let result = [];
13389
+ if (comp.components) {
13390
+ result = comp.components
13391
+ .map((c) => this.getGrids(c))
13392
+ .reduce((acc, value) => acc.concat(value), []);
13393
+ }
13394
+ if (comp.smartGridComponent) {
13395
+ result.push(comp.smartGridComponent);
13396
+ }
13397
+ return result;
13398
+ }
13399
+ static getTrees(comp) {
13400
+ let result = [];
13401
+ if (comp.components) {
13402
+ result = comp.components
13403
+ ?.map((c) => this.getTrees(c))
13404
+ .reduce((acc, value) => acc.concat(value), []);
13405
+ }
13406
+ if (comp.treeService) {
13407
+ result.push(comp.treeService);
13408
+ }
13409
+ return result;
13410
+ }
13411
+ }
13412
+
13413
+ /*
13414
+ * Public API Surface of smart-component-layout
13415
+ */
13416
+
13366
13417
  let SmartComponentApiClient = class SmartComponentApiClient {
13367
13418
  constructor(inject, auth, pageName) {
13368
13419
  this.inject = inject;
@@ -13452,16 +13503,12 @@ let SmartComponentApiClient = class SmartComponentApiClient {
13452
13503
  getWidgets() {
13453
13504
  if (this.useQueryLists) {
13454
13505
  let widgets = new WidgetMap();
13455
- if (this.getAllGridComponents()) {
13456
- this.getAllGridComponents()
13457
- .filter((grid) => (grid?.smartGrid?.gridIdentifier ? true : false))
13458
- .forEach((grid) => widgets.addWidget(grid.smartGrid.gridIdentifier, grid));
13459
- }
13460
- if (this.getAllTreeComponents()) {
13461
- this.getAllTreeComponents()
13462
- .filter((tree) => (tree?.smartTreeModel?.identifier ? true : false))
13463
- .forEach((tree) => widgets.addWidget(tree.smartTreeModel.identifier, tree));
13464
- }
13506
+ this.getAllSmartGridComponents()
13507
+ .filter((grid) => (grid?.smartGrid?.gridIdentifier ? true : false))
13508
+ .forEach((grid) => widgets.addWidget(grid.smartGrid.gridIdentifier, grid));
13509
+ this.getAllSmartTreeComponents()
13510
+ .filter((tree) => (tree?.smartTreeModel?.identifier ? true : false))
13511
+ .forEach((tree) => widgets.addWidget(tree.smartTreeModel.identifier, tree));
13465
13512
  return widgets;
13466
13513
  }
13467
13514
  return this.widgets;
@@ -13470,14 +13517,36 @@ let SmartComponentApiClient = class SmartComponentApiClient {
13470
13517
  this.initData();
13471
13518
  this.initActions();
13472
13519
  if (this.useQueryLists) {
13473
- this.getAllFormComponents()?.forEach((form) => {
13520
+ this.getAllSmartFormComponents()?.forEach((form) => {
13474
13521
  if (form.smartForm) {
13475
13522
  form.smartForm.componentModel = this.model;
13523
+ // uses data, valueSets, constraints
13476
13524
  form.constructForm();
13477
13525
  }
13478
13526
  });
13479
13527
  }
13480
- // TODO: layout, valueSet, widgets
13528
+ // TODO: layout, widgets
13529
+ }
13530
+ getAllSmartFormComponents() {
13531
+ let forms = this.getSmartFormsQL()?.toArray() ?? [];
13532
+ this.getSmartComponentLayoutsQL()?.forEach((comp) => {
13533
+ forms.push(...SmartComponentLayoutUtility.getForms(comp));
13534
+ });
13535
+ return forms;
13536
+ }
13537
+ getAllSmartGridComponents() {
13538
+ let grids = this.getSmartGridsQL()?.toArray() ?? [];
13539
+ this.getSmartComponentLayoutsQL()?.forEach((comp) => {
13540
+ grids.push(...SmartComponentLayoutUtility.getGrids(comp));
13541
+ });
13542
+ return grids;
13543
+ }
13544
+ getAllSmartTreeComponents() {
13545
+ let trees = this.getSmartTreesQL()?.toArray() ?? [];
13546
+ this.getSmartComponentLayoutsQL()?.forEach((comp) => {
13547
+ trees.push(...SmartComponentLayoutUtility.getTrees(comp));
13548
+ });
13549
+ return trees;
13481
13550
  }
13482
13551
  initData() {
13483
13552
  if (this.model?.data) {
@@ -13522,7 +13591,7 @@ let SmartComponentApiClient = class SmartComponentApiClient {
13522
13591
  invalidFieldNames: [],
13523
13592
  };
13524
13593
  if (this.useQueryLists) {
13525
- this.getAllFormComponents()?.forEach((form) => this.validateForm(form, aggregatedInvalidFields));
13594
+ this.getAllSmartFormComponents()?.forEach((form) => this.validateForm(form, aggregatedInvalidFields));
13526
13595
  }
13527
13596
  else {
13528
13597
  this.formWidgets?.widgets?.forEach((form) => this.validateForm(form, aggregatedInvalidFields));
@@ -13595,7 +13664,7 @@ let SmartComponentApiClient = class SmartComponentApiClient {
13595
13664
  */
13596
13665
  submitForms(validate) {
13597
13666
  if (this.useQueryLists) {
13598
- this.getAllFormComponents()?.forEach((form) => {
13667
+ this.getAllSmartFormComponents()?.forEach((form) => {
13599
13668
  form?.submitForm(validate);
13600
13669
  });
13601
13670
  }
@@ -13768,7 +13837,7 @@ let SmartComponentApiClient = class SmartComponentApiClient {
13768
13837
  handleDataChange(changes, changeKey) {
13769
13838
  this.setValueDeeply(this.model, changeKey, changes[changeKey]);
13770
13839
  if (this.useQueryLists) {
13771
- this.getAllFormComponents()?.forEach((form) => form.refresh());
13840
+ this.getAllSmartFormComponents()?.forEach((form) => form.refresh());
13772
13841
  }
13773
13842
  else {
13774
13843
  this.formWidgets.widgets.forEach((formComponent, key) => {
@@ -13839,18 +13908,21 @@ class SmartComponent extends SmartComponentApiClient {
13839
13908
  ngOnDestroy() {
13840
13909
  this._ngOnDestroy();
13841
13910
  }
13842
- getAllFormComponents() {
13843
- return this.formComponents;
13911
+ getSmartFormsQL() {
13912
+ return this.smartFormsQL;
13844
13913
  }
13845
- getAllGridComponents() {
13846
- return this.gridComponents;
13914
+ getSmartGridsQL() {
13915
+ return this.smartGridsQL;
13847
13916
  }
13848
- getAllTreeComponents() {
13849
- return this.treeComponents;
13917
+ getSmartTreesQL() {
13918
+ return this.smartTreesQL;
13919
+ }
13920
+ getSmartComponentLayoutsQL() {
13921
+ return this.smartComponentLayoutsQL;
13850
13922
  }
13851
13923
  }
13852
13924
  SmartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponent, deps: [{ token: i0.Injector }, { token: SmartAuthService }, { token: 'pageName' }], target: i0.ɵɵFactoryTarget.Component });
13853
- SmartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartComponent, selector: "ng-component", viewQueries: [{ propertyName: "formComponents", predicate: SmartformComponent, descendants: true }, { propertyName: "gridComponents", predicate: SmartGridComponent, descendants: true }, { propertyName: "treeComponents", predicate: SmarttreeGenericService, descendants: true }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
13925
+ SmartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartComponent, selector: "ng-component", viewQueries: [{ propertyName: "smartFormsQL", predicate: SmartformComponent, descendants: true }, { propertyName: "smartGridsQL", predicate: SmartGridComponent, descendants: true }, { propertyName: "smartTreesQL", predicate: SmarttreeGenericService, descendants: true }, { propertyName: "smartComponentLayoutsQL", predicate: SmartComponentLayoutComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
13854
13926
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponent, decorators: [{
13855
13927
  type: Component,
13856
13928
  args: [{
@@ -13862,15 +13934,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
13862
13934
  }] }, { type: undefined, decorators: [{
13863
13935
  type: Inject,
13864
13936
  args: ['pageName']
13865
- }] }]; }, propDecorators: { formComponents: [{
13937
+ }] }]; }, propDecorators: { smartFormsQL: [{
13866
13938
  type: ViewChildren,
13867
13939
  args: [SmartformComponent]
13868
- }], gridComponents: [{
13940
+ }], smartGridsQL: [{
13869
13941
  type: ViewChildren,
13870
13942
  args: [SmartGridComponent]
13871
- }], treeComponents: [{
13943
+ }], smartTreesQL: [{
13872
13944
  type: ViewChildren,
13873
13945
  args: [SmarttreeGenericService]
13946
+ }], smartComponentLayoutsQL: [{
13947
+ type: ViewChildren,
13948
+ args: [SmartComponentLayoutComponent]
13874
13949
  }] } });
13875
13950
 
13876
13951
  class SmartService extends SmartComponentApiClient {
@@ -13883,13 +13958,13 @@ class SmartService extends SmartComponentApiClient {
13883
13958
  ngOnDestroy() {
13884
13959
  this._ngOnDestroy();
13885
13960
  }
13886
- getAllFormComponents() {
13961
+ getSmartFormsQL() {
13887
13962
  return this.formComponents;
13888
13963
  }
13889
- getAllGridComponents() {
13964
+ getSmartGridsQL() {
13890
13965
  return this.gridComponents;
13891
13966
  }
13892
- getAllTreeComponents() {
13967
+ getSmartTreesQL() {
13893
13968
  return this.treeComponents;
13894
13969
  }
13895
13970
  }
@@ -13917,17 +13992,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
13917
13992
  args: [SmarttreeGenericService]
13918
13993
  }] } });
13919
13994
 
13920
- class SmartComponentLayoutUtility {
13921
- static setParent(layout, parent) {
13922
- layout.parentComponent = parent;
13923
- layout.components?.forEach((l) => this.setParent(l, parent));
13924
- }
13925
- }
13926
-
13927
- /*
13928
- * Public API Surface of smart-component-layout
13929
- */
13930
-
13931
13995
  class SmartNavbarService {
13932
13996
  constructor() { }
13933
13997
  }