@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.
@@ -10448,14 +10448,15 @@ class TableLayoutDefinerComponent {
10448
10448
  this.orderedColumnsAsObject = {};
10449
10449
  this.disableSave = false;
10450
10450
  this.alwaysShowColumns = [];
10451
- this.addDisabled = false;
10452
10451
  this.showAddBtn = true;
10453
10452
  this.view = JSON.parse(JSON.stringify(data.customComponentInputs.config.view));
10454
10453
  this.mapOrderedColumnsToObject();
10455
10454
  this.constructForms();
10456
10455
  this.getAlwaysShowColumns();
10457
- this.addDisabled = !(this.forms.length < this.view.descriptor.columns.length);
10458
- this.showAddBtn = !(this.forms.length == this.view.descriptor.columns.length);
10456
+ this.showAddBtn = !(this.forms.length == this.getMaxColumnCount());
10457
+ }
10458
+ getMaxColumnCount() {
10459
+ return this.view.descriptor.columns.filter((col) => !col.alwaysHidden).length;
10459
10460
  }
10460
10461
  ngOnDestroy() {
10461
10462
  this._destroy$.next();
@@ -10507,13 +10508,13 @@ class TableLayoutDefinerComponent {
10507
10508
  }
10508
10509
  addColumn() {
10509
10510
  var _a;
10510
- if (this.forms.length < this.view.descriptor.columns.length) {
10511
+ if (this.forms.length < this.getMaxColumnCount()) {
10511
10512
  (_a = this.view) === null || _a === void 0 ? void 0 : _a.orderedColumnNames.push('');
10512
10513
  this.orderedColumnsAsObject[this.view.orderedColumnNames.length - 1] = '';
10513
10514
  this.constructForms();
10514
10515
  this.disableSave = true;
10515
10516
  }
10516
- this.showAddBtn = this.forms.length < this.view.descriptor.columns.length;
10517
+ this.showAddBtn = this.forms.length < this.getMaxColumnCount();
10517
10518
  }
10518
10519
  removeColumn(form) {
10519
10520
  var _a;
@@ -10524,7 +10525,7 @@ class TableLayoutDefinerComponent {
10524
10525
  }
10525
10526
  this.mapOrderedColumnsToObject();
10526
10527
  this.constructForms();
10527
- this.addDisabled = !(this.forms.length < this.view.descriptor.columns.length);
10528
+ this.showAddBtn = this.forms.length < this.getMaxColumnCount();
10528
10529
  }
10529
10530
  getLabelFromColumnMeta(prop) {
10530
10531
  var _a, _b, _c;
@@ -10605,10 +10606,10 @@ class TableLayoutDefinerComponent {
10605
10606
  }
10606
10607
  }
10607
10608
  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 });
10608
- 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"] }] });
10609
+ 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"] }] });
10609
10610
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: TableLayoutDefinerComponent, decorators: [{
10610
10611
  type: Component,
10611
- 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"] }]
10612
+ 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"] }]
10612
10613
  }], ctorParameters: function () {
10613
10614
  return [{ type: undefined, decorators: [{
10614
10615
  type: Inject,
@@ -12270,7 +12271,7 @@ class SmartComponentLayoutComponent {
12270
12271
  }
12271
12272
  }
12272
12273
  SmartComponentLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutComponent, deps: [{ token: SmartformLayoutDefinitionService }], target: i0.ɵɵFactoryTarget.Component });
12273
- 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"] }] });
12274
+ 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"] }] });
12274
12275
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutComponent, decorators: [{
12275
12276
  type: Component,
12276
12277
  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"] }]
@@ -12285,6 +12286,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
12285
12286
  }], smartFilterList: [{
12286
12287
  type: ViewChildren,
12287
12288
  args: ['filter']
12289
+ }], components: [{
12290
+ type: ViewChildren,
12291
+ args: [SmartComponentLayoutComponent]
12288
12292
  }] } });
12289
12293
 
12290
12294
  class SmartComponentLayoutModule {
@@ -13508,6 +13512,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
13508
13512
  * Public API Surface of smarttree
13509
13513
  */
13510
13514
 
13515
+ class SmartComponentLayoutUtility {
13516
+ static setParent(layout, parent) {
13517
+ var _a;
13518
+ layout.parentComponent = parent;
13519
+ (_a = layout.components) === null || _a === void 0 ? void 0 : _a.forEach((l) => this.setParent(l, parent));
13520
+ }
13521
+ static getForms(comp) {
13522
+ let result = [];
13523
+ if (comp.components) {
13524
+ result = comp.components
13525
+ .map((c) => this.getForms(c))
13526
+ .reduce((acc, value) => acc.concat(value), []);
13527
+ }
13528
+ if (comp.smartFormComponent) {
13529
+ result.push(comp.smartFormComponent);
13530
+ }
13531
+ return result;
13532
+ }
13533
+ static getGrids(comp) {
13534
+ let result = [];
13535
+ if (comp.components) {
13536
+ result = comp.components
13537
+ .map((c) => this.getGrids(c))
13538
+ .reduce((acc, value) => acc.concat(value), []);
13539
+ }
13540
+ if (comp.smartGridComponent) {
13541
+ result.push(comp.smartGridComponent);
13542
+ }
13543
+ return result;
13544
+ }
13545
+ static getTrees(comp) {
13546
+ var _a;
13547
+ let result = [];
13548
+ if (comp.components) {
13549
+ result = (_a = comp.components) === null || _a === void 0 ? void 0 : _a.map((c) => this.getTrees(c)).reduce((acc, value) => acc.concat(value), []);
13550
+ }
13551
+ if (comp.treeService) {
13552
+ result.push(comp.treeService);
13553
+ }
13554
+ return result;
13555
+ }
13556
+ }
13557
+
13558
+ /*
13559
+ * Public API Surface of smart-component-layout
13560
+ */
13561
+
13511
13562
  let SmartComponentApiClient = class SmartComponentApiClient {
13512
13563
  constructor(inject, auth, pageName) {
13513
13564
  this.inject = inject;
@@ -13597,16 +13648,12 @@ let SmartComponentApiClient = class SmartComponentApiClient {
13597
13648
  getWidgets() {
13598
13649
  if (this.useQueryLists) {
13599
13650
  let widgets = new WidgetMap();
13600
- if (this.getAllGridComponents()) {
13601
- this.getAllGridComponents()
13602
- .filter((grid) => { var _a; return (((_a = grid === null || grid === void 0 ? void 0 : grid.smartGrid) === null || _a === void 0 ? void 0 : _a.gridIdentifier) ? true : false); })
13603
- .forEach((grid) => widgets.addWidget(grid.smartGrid.gridIdentifier, grid));
13604
- }
13605
- if (this.getAllTreeComponents()) {
13606
- this.getAllTreeComponents()
13607
- .filter((tree) => { var _a; return (((_a = tree === null || tree === void 0 ? void 0 : tree.smartTreeModel) === null || _a === void 0 ? void 0 : _a.identifier) ? true : false); })
13608
- .forEach((tree) => widgets.addWidget(tree.smartTreeModel.identifier, tree));
13609
- }
13651
+ this.getAllSmartGridComponents()
13652
+ .filter((grid) => { var _a; return (((_a = grid === null || grid === void 0 ? void 0 : grid.smartGrid) === null || _a === void 0 ? void 0 : _a.gridIdentifier) ? true : false); })
13653
+ .forEach((grid) => widgets.addWidget(grid.smartGrid.gridIdentifier, grid));
13654
+ this.getAllSmartTreeComponents()
13655
+ .filter((tree) => { var _a; return (((_a = tree === null || tree === void 0 ? void 0 : tree.smartTreeModel) === null || _a === void 0 ? void 0 : _a.identifier) ? true : false); })
13656
+ .forEach((tree) => widgets.addWidget(tree.smartTreeModel.identifier, tree));
13610
13657
  return widgets;
13611
13658
  }
13612
13659
  return this.widgets;
@@ -13616,14 +13663,39 @@ let SmartComponentApiClient = class SmartComponentApiClient {
13616
13663
  this.initData();
13617
13664
  this.initActions();
13618
13665
  if (this.useQueryLists) {
13619
- (_a = this.getAllFormComponents()) === null || _a === void 0 ? void 0 : _a.forEach((form) => {
13666
+ (_a = this.getAllSmartFormComponents()) === null || _a === void 0 ? void 0 : _a.forEach((form) => {
13620
13667
  if (form.smartForm) {
13621
13668
  form.smartForm.componentModel = this.model;
13669
+ // uses data, valueSets, constraints
13622
13670
  form.constructForm();
13623
13671
  }
13624
13672
  });
13625
13673
  }
13626
- // TODO: layout, valueSet, widgets
13674
+ // TODO: layout, widgets
13675
+ }
13676
+ getAllSmartFormComponents() {
13677
+ var _a, _b, _c;
13678
+ let forms = (_b = (_a = this.getSmartFormsQL()) === null || _a === void 0 ? void 0 : _a.toArray()) !== null && _b !== void 0 ? _b : [];
13679
+ (_c = this.getSmartComponentLayoutsQL()) === null || _c === void 0 ? void 0 : _c.forEach((comp) => {
13680
+ forms.push(...SmartComponentLayoutUtility.getForms(comp));
13681
+ });
13682
+ return forms;
13683
+ }
13684
+ getAllSmartGridComponents() {
13685
+ var _a, _b, _c;
13686
+ let grids = (_b = (_a = this.getSmartGridsQL()) === null || _a === void 0 ? void 0 : _a.toArray()) !== null && _b !== void 0 ? _b : [];
13687
+ (_c = this.getSmartComponentLayoutsQL()) === null || _c === void 0 ? void 0 : _c.forEach((comp) => {
13688
+ grids.push(...SmartComponentLayoutUtility.getGrids(comp));
13689
+ });
13690
+ return grids;
13691
+ }
13692
+ getAllSmartTreeComponents() {
13693
+ var _a, _b, _c;
13694
+ let trees = (_b = (_a = this.getSmartTreesQL()) === null || _a === void 0 ? void 0 : _a.toArray()) !== null && _b !== void 0 ? _b : [];
13695
+ (_c = this.getSmartComponentLayoutsQL()) === null || _c === void 0 ? void 0 : _c.forEach((comp) => {
13696
+ trees.push(...SmartComponentLayoutUtility.getTrees(comp));
13697
+ });
13698
+ return trees;
13627
13699
  }
13628
13700
  initData() {
13629
13701
  var _a, _b;
@@ -13675,7 +13747,7 @@ let SmartComponentApiClient = class SmartComponentApiClient {
13675
13747
  invalidFieldNames: [],
13676
13748
  };
13677
13749
  if (this.useQueryLists) {
13678
- (_a = this.getAllFormComponents()) === null || _a === void 0 ? void 0 : _a.forEach((form) => this.validateForm(form, aggregatedInvalidFields));
13750
+ (_a = this.getAllSmartFormComponents()) === null || _a === void 0 ? void 0 : _a.forEach((form) => this.validateForm(form, aggregatedInvalidFields));
13679
13751
  }
13680
13752
  else {
13681
13753
  (_c = (_b = this.formWidgets) === null || _b === void 0 ? void 0 : _b.widgets) === null || _c === void 0 ? void 0 : _c.forEach((form) => this.validateForm(form, aggregatedInvalidFields));
@@ -13751,7 +13823,7 @@ let SmartComponentApiClient = class SmartComponentApiClient {
13751
13823
  submitForms(validate) {
13752
13824
  var _a, _b, _c;
13753
13825
  if (this.useQueryLists) {
13754
- (_a = this.getAllFormComponents()) === null || _a === void 0 ? void 0 : _a.forEach((form) => {
13826
+ (_a = this.getAllSmartFormComponents()) === null || _a === void 0 ? void 0 : _a.forEach((form) => {
13755
13827
  form === null || form === void 0 ? void 0 : form.submitForm(validate);
13756
13828
  });
13757
13829
  }
@@ -13926,7 +13998,7 @@ let SmartComponentApiClient = class SmartComponentApiClient {
13926
13998
  var _a;
13927
13999
  this.setValueDeeply(this.model, changeKey, changes[changeKey]);
13928
14000
  if (this.useQueryLists) {
13929
- (_a = this.getAllFormComponents()) === null || _a === void 0 ? void 0 : _a.forEach((form) => form.refresh());
14001
+ (_a = this.getAllSmartFormComponents()) === null || _a === void 0 ? void 0 : _a.forEach((form) => form.refresh());
13930
14002
  }
13931
14003
  else {
13932
14004
  this.formWidgets.widgets.forEach((formComponent, key) => {
@@ -13997,18 +14069,21 @@ class SmartComponent extends SmartComponentApiClient {
13997
14069
  ngOnDestroy() {
13998
14070
  this._ngOnDestroy();
13999
14071
  }
14000
- getAllFormComponents() {
14001
- return this.formComponents;
14072
+ getSmartFormsQL() {
14073
+ return this.smartFormsQL;
14002
14074
  }
14003
- getAllGridComponents() {
14004
- return this.gridComponents;
14075
+ getSmartGridsQL() {
14076
+ return this.smartGridsQL;
14005
14077
  }
14006
- getAllTreeComponents() {
14007
- return this.treeComponents;
14078
+ getSmartTreesQL() {
14079
+ return this.smartTreesQL;
14080
+ }
14081
+ getSmartComponentLayoutsQL() {
14082
+ return this.smartComponentLayoutsQL;
14008
14083
  }
14009
14084
  }
14010
14085
  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 });
14011
- 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 });
14086
+ 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 });
14012
14087
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponent, decorators: [{
14013
14088
  type: Component,
14014
14089
  args: [{
@@ -14022,15 +14097,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
14022
14097
  type: Inject,
14023
14098
  args: ['pageName']
14024
14099
  }] }];
14025
- }, propDecorators: { formComponents: [{
14100
+ }, propDecorators: { smartFormsQL: [{
14026
14101
  type: ViewChildren,
14027
14102
  args: [SmartformComponent]
14028
- }], gridComponents: [{
14103
+ }], smartGridsQL: [{
14029
14104
  type: ViewChildren,
14030
14105
  args: [SmartGridComponent]
14031
- }], treeComponents: [{
14106
+ }], smartTreesQL: [{
14032
14107
  type: ViewChildren,
14033
14108
  args: [SmarttreeGenericService]
14109
+ }], smartComponentLayoutsQL: [{
14110
+ type: ViewChildren,
14111
+ args: [SmartComponentLayoutComponent]
14034
14112
  }] } });
14035
14113
 
14036
14114
  class SmartService extends SmartComponentApiClient {
@@ -14043,13 +14121,13 @@ class SmartService extends SmartComponentApiClient {
14043
14121
  ngOnDestroy() {
14044
14122
  this._ngOnDestroy();
14045
14123
  }
14046
- getAllFormComponents() {
14124
+ getSmartFormsQL() {
14047
14125
  return this.formComponents;
14048
14126
  }
14049
- getAllGridComponents() {
14127
+ getSmartGridsQL() {
14050
14128
  return this.gridComponents;
14051
14129
  }
14052
- getAllTreeComponents() {
14130
+ getSmartTreesQL() {
14053
14131
  return this.treeComponents;
14054
14132
  }
14055
14133
  }
@@ -14079,18 +14157,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
14079
14157
  args: [SmarttreeGenericService]
14080
14158
  }] } });
14081
14159
 
14082
- class SmartComponentLayoutUtility {
14083
- static setParent(layout, parent) {
14084
- var _a;
14085
- layout.parentComponent = parent;
14086
- (_a = layout.components) === null || _a === void 0 ? void 0 : _a.forEach((l) => this.setParent(l, parent));
14087
- }
14088
- }
14089
-
14090
- /*
14091
- * Public API Surface of smart-component-layout
14092
- */
14093
-
14094
14160
  class SmartNavbarService {
14095
14161
  constructor() { }
14096
14162
  }