@rxap/ngx-material-table-select 16.1.2 → 17.0.1-dev.0

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.
@@ -1,6 +1,6 @@
1
1
  import { NgIf, NgFor, NgSwitch, NgSwitchCase, NgSwitchDefault, AsyncPipe, KeyValuePipe, NgClass } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { Component, ChangeDetectionStrategy, Inject, forwardRef, Optional, Self, HostBinding, Input, Injector, INJECTOR, Injectable, EventEmitter, inject, isDevMode, Directive, Output, HostListener, ContentChildren, ContentChild, NgModule } from '@angular/core';
3
+ import { Component, ChangeDetectionStrategy, Inject, inject, INJECTOR, ViewContainerRef, ComponentRef, ViewRef, Injector, Input, ViewChildren, forwardRef, Optional, Self, HostBinding, Injectable, EventEmitter, isDevMode, Directive, Output, HostListener, ContentChildren, ContentChild, NgModule } from '@angular/core';
4
4
  import * as i7 from '@angular/forms';
5
5
  import { FormsModule, ReactiveFormsModule, NgControl } from '@angular/forms';
6
6
  import * as i8 from '@angular/material/button';
@@ -27,16 +27,18 @@ import { SelectRowService, TableFilterService, TableDataSourceDirective, FilterH
27
27
  import { GetFromObjectPipe } from '@rxap/pipes';
28
28
  import * as i1$1 from '@rxap/window-system';
29
29
  import { RXAP_WINDOW_DATA, RXAP_WINDOW_REF, WindowFooterDirective, RXAP_WINDOW_SETTINGS, WindowService } from '@rxap/window-system';
30
- import { map, tap } from 'rxjs/operators';
30
+ import { map, tap as tap$1 } from 'rxjs/operators';
31
+ import * as i1$2 from '@angular/cdk/portal';
32
+ import { ComponentPortal, CdkPortalOutlet, PortalModule } from '@angular/cdk/portal';
33
+ import { Subject, ReplaySubject, tap, Subscription, startWith, delay } from 'rxjs';
31
34
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
32
- import { Subject, Subscription, startWith, delay } from 'rxjs';
33
35
  import { UseDataSource, RxapFormSystemError, ExtractFormDefinitionMixin, ExtractControlMixin } from '@rxap/form-system';
34
36
  import { setMetadataMap, getMetadata } from '@rxap/reflect-metadata';
35
37
  import { __decorate } from 'tslib';
36
- import { staticDataSource, DataSourceLoader, BaseDataSource } from '@rxap/data-source';
37
38
  import { Mixin } from '@rxap/mixin';
38
- import { GenerateRandomString, coerceArray } from '@rxap/utilities';
39
39
  import { ExtractDatasourceMixin } from '@rxap/material-table-window-system';
40
+ import { staticDataSource, DataSourceLoader, BaseDataSource } from '@rxap/data-source';
41
+ import { GenerateRandomString, coerceArray } from '@rxap/utilities';
40
42
  import '@rxap/rxjs';
41
43
  import { TableDataSource, AbstractTableDataSource } from '@rxap/data-source/table';
42
44
 
@@ -68,10 +70,10 @@ class TableSelectWindowComponent {
68
70
  this.windowRef.next(this.selectRows.selectedRows);
69
71
  this.close();
70
72
  }
71
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TableSelectWindowComponent, deps: [{ token: RXAP_WINDOW_DATA }, { token: i1.SelectRowService }, { token: RXAP_WINDOW_REF }], target: i0.ɵɵFactoryTarget.Component }); }
72
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TableSelectWindowComponent, isStandalone: true, selector: "rxap-table-select-window", providers: [SelectRowService, TableFilterService], ngImport: i0, template: "<mat-progress-bar *ngIf=\"tableDataSourceDirective.loading$ | async\" mode=\"indeterminate\"></mat-progress-bar>\n<div class=\"table-scroll-container mt-4 overflow-x-auto overscroll-auto\">\n <table #tableDataSourceDirective=\"rxapTableDataSource\"\n [id]=\"id ?? 'table-select'\"\n [paginator]=\"paginator\"\n [parameters]=\"data.parameters\"\n mat-table\n matSort\n rxap-filter-header-row\n rxapTableDataSource>\n\n <ng-container *ngIf=\"data.multiple\" matColumnDef=\"select\" [sticky]=\"true\">\n <th *matHeaderCellDef class=\"drop-shadow-2xl\" mat-header-cell rxap-checkbox-header-cell></th>\n <td\n *matCellDef=\"let element\"\n [element]=\"element\"\n class=\"drop-shadow-2xl\"\n mat-cell\n rxap-checkbox-cell\n ></td>\n </ng-container>\n\n <ng-container *ngIf=\"hasSomeFilterColumn\">\n\n <ng-container *ngIf=\"data.multiple\" [matColumnDef]=\"'filter__select'\">\n <th *matHeaderCellDef mat-header-cell></th>\n </ng-container>\n\n <ng-container *ngFor=\"let item of data.columns | keyvalue\">\n\n <ng-container *ngIf=\"item.value.filter\">\n\n <ng-container [ngSwitch]=\"item.value.type\">\n\n <ng-container *ngSwitchCase=\"'date'\">\n\n <ng-container [matColumnDef]=\"'filter__' + item.key\">\n <th *matHeaderCellDef mat-header-cell>\n\n </th>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'boolean'\">\n\n <ng-container [matColumnDef]=\"'filter__' + item.key\">\n <th *matHeaderCellDef mat-header-cell>\n\n </th>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n\n <ng-container [matColumnDef]=\"'filter__' + item.key\">\n <th *matHeaderCellDef mat-header-cell>\n <mat-form-field rxapNoPadding>\n <mat-label i18n>{{ item.value.label }}</mat-label>\n <input\n [formControlName]=\"item.key\"\n [placeholder]=\"'Enter the ' + item.value.label + ' filter'\"\n matInput\n parentControlContainer\n />\n <button mat-icon-button matSuffix rxapInputClearButton>\n <mat-icon>clear</mat-icon>\n </button>\n </mat-form-field>\n </th>\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf=\"!item.value.filter\">\n <ng-container [matColumnDef]=\"'filter__' + item.key\">\n <th *matHeaderCellDef mat-header-cell>{{ data.showHeader ? '' : item.value.label }}</th>\n </ng-container>\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngFor=\"let item of data.columns | keyvalue\">\n\n <ng-container [ngSwitch]=\"item.value.type\">\n\n <ng-container *ngSwitchCase=\"'date'\">\n\n <ng-container [matColumnDef]=\"item.key\">\n <th *matHeaderCellDef mat-header-cell mat-sort-header>{{ item.value.label }}</th>\n <td\n *matCellDef=\"let element\"\n [format]=\"item.value['format']\"\n [rxap-date-cell]=\"element | getFromObject:item.key\"\n mat-cell\n ></td>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'boolean'\">\n\n <ng-container [matColumnDef]=\"item.key\">\n <th *matHeaderCellDef mat-header-cell mat-sort-header>{{ item.value.label }}</th>\n <td\n *matCellDef=\"let element\"\n [rxap-boolean-cell]=\"element | getFromObject:item.key\"\n mat-cell\n ></td>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n\n <ng-container [matColumnDef]=\"item.key\">\n <th *matHeaderCellDef mat-header-cell mat-sort-header>\n {{ item.value.label }}\n </th>\n <td *matCellDef=\"let element\" mat-cell>\n {{ element | getFromObject:item.key }}\n </td>\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf=\"hasSomeFilterColumn\">\n <tr\n *matHeaderRowDef=\"filterDisplayColumns\"\n class=\"filter-header\"\n mat-header-row\n ></tr>\n </ng-container>\n\n <ng-template [ngIf]=\"data.showHeader\">\n <tr\n *matHeaderRowDef=\"displayColumns\"\n mat-header-row\n ></tr>\n </ng-template>\n\n <tr\n (click)=\"selectRow(element)\"\n *matRowDef=\"let element; columns: displayColumns\"\n [@rowsAnimation]\n class=\"cursor-pointer\"\n mat-row\n ></tr>\n\n </table>\n</div>\n<mat-paginator\n #paginator=\"matPaginator\"\n [pageSizeOptions]=\"[5, 10, 25, 50, 75, 100, 150, 200]\"\n [pageSize]=\"10\"\n></mat-paginator>\n\n<ng-template rxapWindowFooter>\n <div class=\"flex flex-row items-center gap-4\">\n <button (click)=\"close()\" class=\"grow-0\" mat-stroked-button type=\"button\">\n <ng-container i18n>Cancel</ng-container>\n </button>\n <button (click)=\"select()\" *ngIf=\"data.multiple\" [disabled]=\"hasNotSelected$ | async\" class=\"grow-0\" mat-raised-button\n type=\"button\">\n <ng-container i18n>Select</ng-container>\n </button>\n <span *ngIf=\"!data.multiple\" class=\"hint\" i18n>Click on a row to select an entry.</span>\n </div>\n</ng-template>\n", styles: [".filter-header ::ng-deep .mat-form-field .mat-form-field-wrapper{padding-bottom:initial}.filter-header ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-underline{bottom:0}.hint{font-size:14px;opacity:.5}tr.mat-row{cursor:pointer}tr.mat-row:hover{opacity:.7}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: TableDataSourceDirective, selector: "table[mat-table][rxapTableDataSource],mat-table[rxapTableDataSource]", inputs: ["rxapTableDataSource", "paginator", "id", "parameters", "dataSource"], exportAs: ["rxapTableDataSource"] }, { kind: "directive", type: FilterHeaderRowDirective, selector: "table[rxap-filter-header-row]", inputs: ["rxap-filter-header-row"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i4.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i4.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: CheckboxHeaderCellComponent, selector: "th[rxap-checkbox-header-cell]" }, { kind: "component", type: CheckboxCellComponent, selector: "td[rxap-checkbox-cell]", inputs: ["element"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: ParentControlContainerDirective, selector: "[formControlName][parentControlContainer],[formControlGroup][parentControlContainer]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: InputClearButtonDirective, selector: "[rxapInputClearButton]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: DateCellComponent, selector: "td[rxap-date-cell]", inputs: ["rxap-date-cell", "format"] }, { kind: "component", type: BooleanCellComponent, selector: "td[rxap-boolean-cell]", inputs: ["rxap-boolean-cell"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i10.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "directive", type: WindowFooterDirective, selector: "[rxapWindowFooter]" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: GetFromObjectPipe, name: "getFromObject" }, { kind: "directive", type: FormFieldNoPaddingDirective, selector: "mat-form-field[rxapNoPadding]" }], animations: [RowAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
73
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: TableSelectWindowComponent, deps: [{ token: RXAP_WINDOW_DATA }, { token: i1.SelectRowService }, { token: RXAP_WINDOW_REF }], target: i0.ɵɵFactoryTarget.Component }); }
74
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: TableSelectWindowComponent, isStandalone: true, selector: "rxap-table-select-window", providers: [SelectRowService, TableFilterService], ngImport: i0, template: "<mat-progress-bar *ngIf=\"tableDataSourceDirective.loading$ | async\" mode=\"indeterminate\"></mat-progress-bar>\n<div class=\"table-scroll-container mt-4 overflow-x-auto overscroll-auto\">\n <table #tableDataSourceDirective=\"rxapTableDataSource\"\n [id]=\"id ?? 'table-select'\"\n [paginator]=\"paginator\"\n [parameters]=\"data.parameters\"\n mat-table\n matSort\n rxap-filter-header-row\n rxapTableDataSource>\n\n <ng-container *ngIf=\"data.multiple\" matColumnDef=\"select\" [sticky]=\"true\">\n <th *matHeaderCellDef class=\"drop-shadow-2xl\" mat-header-cell rxap-checkbox-header-cell></th>\n <td\n *matCellDef=\"let element\"\n [element]=\"element\"\n class=\"drop-shadow-2xl\"\n mat-cell\n rxap-checkbox-cell\n ></td>\n </ng-container>\n\n <ng-container *ngIf=\"hasSomeFilterColumn\">\n\n <ng-container *ngIf=\"data.multiple\" [matColumnDef]=\"'filter__select'\">\n <th *matHeaderCellDef mat-header-cell></th>\n </ng-container>\n\n <ng-container *ngFor=\"let item of data.columns | keyvalue\">\n\n <ng-container *ngIf=\"item.value.filter\">\n\n <ng-container [ngSwitch]=\"item.value.type\">\n\n <ng-container *ngSwitchCase=\"'date'\">\n\n <ng-container [matColumnDef]=\"'filter__' + item.key\">\n <th *matHeaderCellDef mat-header-cell>\n\n </th>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'boolean'\">\n\n <ng-container [matColumnDef]=\"'filter__' + item.key\">\n <th *matHeaderCellDef mat-header-cell>\n\n </th>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n\n <ng-container [matColumnDef]=\"'filter__' + item.key\">\n <th *matHeaderCellDef mat-header-cell>\n <mat-form-field rxapNoPadding>\n <mat-label i18n>{{ item.value.label }}</mat-label>\n <input\n [formControlName]=\"item.key\"\n [placeholder]=\"'Enter the ' + item.value.label + ' filter'\"\n matInput\n parentControlContainer\n />\n <button mat-icon-button matSuffix rxapInputClearButton>\n <mat-icon>clear</mat-icon>\n </button>\n </mat-form-field>\n </th>\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf=\"!item.value.filter\">\n <ng-container [matColumnDef]=\"'filter__' + item.key\">\n <th *matHeaderCellDef mat-header-cell>{{ data.showHeader ? '' : item.value.label }}</th>\n </ng-container>\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngFor=\"let item of data.columns | keyvalue\">\n\n <ng-container [ngSwitch]=\"item.value.type\">\n\n <ng-container *ngSwitchCase=\"'date'\">\n\n <ng-container [matColumnDef]=\"item.key\">\n <th *matHeaderCellDef mat-header-cell mat-sort-header>{{ item.value.label }}</th>\n <td\n *matCellDef=\"let element\"\n [format]=\"item.value['format']\"\n [rxap-date-cell]=\"element | getFromObject:item.key\"\n mat-cell\n ></td>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'boolean'\">\n\n <ng-container [matColumnDef]=\"item.key\">\n <th *matHeaderCellDef mat-header-cell mat-sort-header>{{ item.value.label }}</th>\n <td\n *matCellDef=\"let element\"\n [rxap-boolean-cell]=\"element | getFromObject:item.key\"\n mat-cell\n ></td>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n\n <ng-container [matColumnDef]=\"item.key\">\n <th *matHeaderCellDef mat-header-cell mat-sort-header>\n {{ item.value.label }}\n </th>\n <td *matCellDef=\"let element\" mat-cell>\n {{ element | getFromObject:item.key }}\n </td>\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf=\"hasSomeFilterColumn\">\n <tr\n *matHeaderRowDef=\"filterDisplayColumns\"\n class=\"filter-header\"\n mat-header-row\n ></tr>\n </ng-container>\n\n <ng-template [ngIf]=\"data.showHeader\">\n <tr\n *matHeaderRowDef=\"displayColumns\"\n mat-header-row\n ></tr>\n </ng-template>\n\n <tr\n (click)=\"selectRow(element)\"\n *matRowDef=\"let element; columns: displayColumns\"\n [@rowsAnimation]\n class=\"cursor-pointer\"\n mat-row\n ></tr>\n\n </table>\n</div>\n<mat-paginator\n #paginator=\"matPaginator\"\n [pageSizeOptions]=\"[5, 10, 25, 50, 75, 100, 150, 200]\"\n [pageSize]=\"10\"\n></mat-paginator>\n\n<ng-template rxapWindowFooter>\n <div class=\"flex flex-row items-center gap-4\">\n <button (click)=\"close()\" class=\"grow-0\" mat-stroked-button type=\"button\">\n <ng-container i18n>Cancel</ng-container>\n </button>\n <button (click)=\"select()\" *ngIf=\"data.multiple\" [disabled]=\"hasNotSelected$ | async\" class=\"grow-0\" mat-raised-button\n type=\"button\">\n <ng-container i18n>Select</ng-container>\n </button>\n <span *ngIf=\"!data.multiple\" class=\"hint\" i18n>Click on a row to select an entry.</span>\n </div>\n</ng-template>\n", styles: [".filter-header ::ng-deep .mat-form-field .mat-form-field-wrapper{padding-bottom:initial}.filter-header ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-underline{bottom:0}.hint{font-size:14px;opacity:.5}tr.mat-row{cursor:pointer}tr.mat-row:hover{opacity:.7}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: TableDataSourceDirective, selector: "table[mat-table][rxapTableDataSource],mat-table[rxapTableDataSource]", inputs: ["rxapTableDataSource", "paginator", "id", "parameters", "dataSource"], exportAs: ["rxapTableDataSource"] }, { kind: "directive", type: FilterHeaderRowDirective, selector: "table[rxap-filter-header-row]", inputs: ["rxap-filter-header-row"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i4.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i4.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: CheckboxHeaderCellComponent, selector: "th[rxap-checkbox-header-cell]" }, { kind: "component", type: CheckboxCellComponent, selector: "td[rxap-checkbox-cell]", inputs: ["element"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: ParentControlContainerDirective, selector: "[formControlName][parentControlContainer],[formControlGroup][parentControlContainer]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: InputClearButtonDirective, selector: "[rxapInputClearButton]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: DateCellComponent, selector: "td[rxap-date-cell]", inputs: ["rxap-date-cell", "format"] }, { kind: "component", type: BooleanCellComponent, selector: "td[rxap-boolean-cell]", inputs: ["rxap-boolean-cell"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i10.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "directive", type: WindowFooterDirective, selector: "[rxapWindowFooter]" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: GetFromObjectPipe, name: "getFromObject" }, { kind: "directive", type: FormFieldNoPaddingDirective, selector: "mat-form-field[rxapNoPadding]" }], animations: [RowAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
73
75
  }
74
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TableSelectWindowComponent, decorators: [{
76
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: TableSelectWindowComponent, decorators: [{
75
77
  type: Component,
76
78
  args: [{ selector: 'rxap-table-select-window', changeDetection: ChangeDetectionStrategy.OnPush, animations: [RowAnimation], providers: [SelectRowService, TableFilterService], standalone: true, imports: [
77
79
  NgIf,
@@ -103,13 +105,123 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
103
105
  GetFromObjectPipe,
104
106
  FormFieldNoPaddingDirective,
105
107
  ], template: "<mat-progress-bar *ngIf=\"tableDataSourceDirective.loading$ | async\" mode=\"indeterminate\"></mat-progress-bar>\n<div class=\"table-scroll-container mt-4 overflow-x-auto overscroll-auto\">\n <table #tableDataSourceDirective=\"rxapTableDataSource\"\n [id]=\"id ?? 'table-select'\"\n [paginator]=\"paginator\"\n [parameters]=\"data.parameters\"\n mat-table\n matSort\n rxap-filter-header-row\n rxapTableDataSource>\n\n <ng-container *ngIf=\"data.multiple\" matColumnDef=\"select\" [sticky]=\"true\">\n <th *matHeaderCellDef class=\"drop-shadow-2xl\" mat-header-cell rxap-checkbox-header-cell></th>\n <td\n *matCellDef=\"let element\"\n [element]=\"element\"\n class=\"drop-shadow-2xl\"\n mat-cell\n rxap-checkbox-cell\n ></td>\n </ng-container>\n\n <ng-container *ngIf=\"hasSomeFilterColumn\">\n\n <ng-container *ngIf=\"data.multiple\" [matColumnDef]=\"'filter__select'\">\n <th *matHeaderCellDef mat-header-cell></th>\n </ng-container>\n\n <ng-container *ngFor=\"let item of data.columns | keyvalue\">\n\n <ng-container *ngIf=\"item.value.filter\">\n\n <ng-container [ngSwitch]=\"item.value.type\">\n\n <ng-container *ngSwitchCase=\"'date'\">\n\n <ng-container [matColumnDef]=\"'filter__' + item.key\">\n <th *matHeaderCellDef mat-header-cell>\n\n </th>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'boolean'\">\n\n <ng-container [matColumnDef]=\"'filter__' + item.key\">\n <th *matHeaderCellDef mat-header-cell>\n\n </th>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n\n <ng-container [matColumnDef]=\"'filter__' + item.key\">\n <th *matHeaderCellDef mat-header-cell>\n <mat-form-field rxapNoPadding>\n <mat-label i18n>{{ item.value.label }}</mat-label>\n <input\n [formControlName]=\"item.key\"\n [placeholder]=\"'Enter the ' + item.value.label + ' filter'\"\n matInput\n parentControlContainer\n />\n <button mat-icon-button matSuffix rxapInputClearButton>\n <mat-icon>clear</mat-icon>\n </button>\n </mat-form-field>\n </th>\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf=\"!item.value.filter\">\n <ng-container [matColumnDef]=\"'filter__' + item.key\">\n <th *matHeaderCellDef mat-header-cell>{{ data.showHeader ? '' : item.value.label }}</th>\n </ng-container>\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngFor=\"let item of data.columns | keyvalue\">\n\n <ng-container [ngSwitch]=\"item.value.type\">\n\n <ng-container *ngSwitchCase=\"'date'\">\n\n <ng-container [matColumnDef]=\"item.key\">\n <th *matHeaderCellDef mat-header-cell mat-sort-header>{{ item.value.label }}</th>\n <td\n *matCellDef=\"let element\"\n [format]=\"item.value['format']\"\n [rxap-date-cell]=\"element | getFromObject:item.key\"\n mat-cell\n ></td>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'boolean'\">\n\n <ng-container [matColumnDef]=\"item.key\">\n <th *matHeaderCellDef mat-header-cell mat-sort-header>{{ item.value.label }}</th>\n <td\n *matCellDef=\"let element\"\n [rxap-boolean-cell]=\"element | getFromObject:item.key\"\n mat-cell\n ></td>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n\n <ng-container [matColumnDef]=\"item.key\">\n <th *matHeaderCellDef mat-header-cell mat-sort-header>\n {{ item.value.label }}\n </th>\n <td *matCellDef=\"let element\" mat-cell>\n {{ element | getFromObject:item.key }}\n </td>\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf=\"hasSomeFilterColumn\">\n <tr\n *matHeaderRowDef=\"filterDisplayColumns\"\n class=\"filter-header\"\n mat-header-row\n ></tr>\n </ng-container>\n\n <ng-template [ngIf]=\"data.showHeader\">\n <tr\n *matHeaderRowDef=\"displayColumns\"\n mat-header-row\n ></tr>\n </ng-template>\n\n <tr\n (click)=\"selectRow(element)\"\n *matRowDef=\"let element; columns: displayColumns\"\n [@rowsAnimation]\n class=\"cursor-pointer\"\n mat-row\n ></tr>\n\n </table>\n</div>\n<mat-paginator\n #paginator=\"matPaginator\"\n [pageSizeOptions]=\"[5, 10, 25, 50, 75, 100, 150, 200]\"\n [pageSize]=\"10\"\n></mat-paginator>\n\n<ng-template rxapWindowFooter>\n <div class=\"flex flex-row items-center gap-4\">\n <button (click)=\"close()\" class=\"grow-0\" mat-stroked-button type=\"button\">\n <ng-container i18n>Cancel</ng-container>\n </button>\n <button (click)=\"select()\" *ngIf=\"data.multiple\" [disabled]=\"hasNotSelected$ | async\" class=\"grow-0\" mat-raised-button\n type=\"button\">\n <ng-container i18n>Select</ng-container>\n </button>\n <span *ngIf=\"!data.multiple\" class=\"hint\" i18n>Click on a row to select an entry.</span>\n </div>\n</ng-template>\n", styles: [".filter-header ::ng-deep .mat-form-field .mat-form-field-wrapper{padding-bottom:initial}.filter-header ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-underline{bottom:0}.hint{font-size:14px;opacity:.5}tr.mat-row{cursor:pointer}tr.mat-row:hover{opacity:.7}\n"] }]
106
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
108
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
107
109
  type: Inject,
108
110
  args: [RXAP_WINDOW_DATA]
109
111
  }] }, { type: i1.SelectRowService }, { type: i1$1.WindowRef, decorators: [{
110
112
  type: Inject,
111
113
  args: [RXAP_WINDOW_REF]
112
- }] }]; } });
114
+ }] }] });
115
+
116
+ // TODO : refactor move to package @rxap/ngx-testing
117
+ class MockWindowRef extends Subject {
118
+ constructor() {
119
+ super(...arguments);
120
+ /**
121
+ * @deprecated removed. use the subscribe method and wait for the resolve event
122
+ */
123
+ this.closed$ = new Subject();
124
+ /**
125
+ * @internal
126
+ */
127
+ this.footerPortal$ = new ReplaySubject(1);
128
+ }
129
+ /**
130
+ * @deprecated removed. use the complete method
131
+ * @param result
132
+ */
133
+ close(result) {
134
+ this.closed$.next(result);
135
+ if (result !== undefined) {
136
+ this.next(result);
137
+ }
138
+ this.complete();
139
+ }
140
+ complete() {
141
+ super.complete();
142
+ }
143
+ /**
144
+ * @param portal
145
+ */
146
+ setFooterPortal(portal) {
147
+ setTimeout(() => {
148
+ this.footerPortal$.next(portal);
149
+ });
150
+ }
151
+ }
152
+ class WindowTestWrapperComponent {
153
+ constructor() {
154
+ this.content = null;
155
+ this.footer = null;
156
+ this.injector = inject(INJECTOR);
157
+ this.viewContainerRef = this.injector.get(ViewContainerRef);
158
+ }
159
+ ngAfterViewInit() {
160
+ this.portalOutlet.forEach((outlet) => {
161
+ outlet.attached.pipe(tap(attachedRef => {
162
+ if (attachedRef instanceof ComponentRef) {
163
+ console.log('ComponentRef', attachedRef);
164
+ // attachedRef.changeDetectorRef.detach();
165
+ }
166
+ else if (attachedRef instanceof ViewRef) {
167
+ console.log('viewRef', attachedRef);
168
+ }
169
+ else {
170
+ console.log('attachedRef', attachedRef);
171
+ }
172
+ })).subscribe();
173
+ });
174
+ const windowRef = new MockWindowRef();
175
+ const injector = Injector.create({
176
+ parent: this.injector,
177
+ providers: [{
178
+ provide: RXAP_WINDOW_REF,
179
+ useValue: windowRef,
180
+ }],
181
+ });
182
+ windowRef.footerPortal$.pipe(tap((portal) => this.footer = portal)).subscribe();
183
+ this.content = new ComponentPortal(this.component, this.viewContainerRef, injector);
184
+ }
185
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: WindowTestWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
186
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: WindowTestWrapperComponent, isStandalone: true, selector: "ng-component", inputs: { component: "component" }, viewQueries: [{ propertyName: "portalOutlet", predicate: CdkPortalOutlet, descendants: true }], ngImport: i0, template: `
187
+ <div class="flex flex-col gap-8">
188
+ <div class="grow">
189
+ <ng-template [cdkPortalOutlet]="content"></ng-template>
190
+ </div>
191
+ <hr class="m-4">
192
+ <div class="grow-0">
193
+ <ng-template [cdkPortalOutlet]="footer"></ng-template>
194
+ </div>
195
+ </div>
196
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1$2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }] }); }
197
+ }
198
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: WindowTestWrapperComponent, decorators: [{
199
+ type: Component,
200
+ args: [{
201
+ template: `
202
+ <div class="flex flex-col gap-8">
203
+ <div class="grow">
204
+ <ng-template [cdkPortalOutlet]="content"></ng-template>
205
+ </div>
206
+ <hr class="m-4">
207
+ <div class="grow-0">
208
+ <ng-template [cdkPortalOutlet]="footer"></ng-template>
209
+ </div>
210
+ </div>
211
+ `,
212
+ standalone: true,
213
+ imports: [
214
+ PortalModule,
215
+ NgIf,
216
+ ],
217
+ }]
218
+ }], propDecorators: { component: [{
219
+ type: Input,
220
+ args: [{ required: true }]
221
+ }], portalOutlet: [{
222
+ type: ViewChildren,
223
+ args: [CdkPortalOutlet]
224
+ }] } });
113
225
 
114
226
  class TableSelectInputComponent extends ControlValueAccessor {
115
227
  static { this.nextId = 0; }
@@ -197,8 +309,8 @@ class TableSelectInputComponent extends ControlValueAccessor {
197
309
  // and will be executed AFTER the first value is used to create the display
198
310
  // solution: it must be ensured the the this.toDisplay function is called after the updateTableSelectInput
199
311
  // execution else for the first this.toDisplay function the default implementation is used
200
- tap(async (value) => this.display = value === null ? '' : await this.toDisplay(value))).subscribe());
201
- this._subscription.add(this.rxapControl?.disabled$.pipe(tap(disabled => this.disabled = disabled)).subscribe());
312
+ tap$1(async (value) => this.display = value === null ? '' : await this.toDisplay(value))).subscribe());
313
+ this._subscription.add(this.rxapControl?.disabled$.pipe(tap$1(disabled => this.disabled = disabled)).subscribe());
202
314
  }
203
315
  toDisplay(value) {
204
316
  return value;
@@ -213,15 +325,15 @@ class TableSelectInputComponent extends ControlValueAccessor {
213
325
  onContainerClick(event) {
214
326
  // no op
215
327
  }
216
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TableSelectInputComponent, deps: [{ token: i7.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
217
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TableSelectInputComponent, isStandalone: true, selector: "rxap-table-select-input", inputs: { required: "required", disabled: "disabled", placeholder: "placeholder" }, host: { properties: { "id": "this.id", "class.floating": "this.shouldLabelFloat" } }, providers: [
328
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: TableSelectInputComponent, deps: [{ token: i7.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
329
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: TableSelectInputComponent, isStandalone: true, selector: "rxap-table-select-input", inputs: { required: "required", disabled: "disabled", placeholder: "placeholder" }, host: { properties: { "id": "this.id", "class.floating": "this.shouldLabelFloat" } }, providers: [
218
330
  {
219
331
  provide: MatFormFieldControl,
220
332
  useExisting: forwardRef(() => TableSelectInputComponent),
221
333
  },
222
334
  ], usesInheritance: true, ngImport: i0, template: "<div [ngClass]=\"{ disabled: disabled }\" class=\"mat-select-trigger\">\n <span *ngIf=\"display || placeholder\">{{display ?? placeholder}}</span>\n</div>\n", styles: [":host{display:inline-block;width:100%;outline:none}.rxap-container{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%;height:24px}.disabled{color:#ffffff80;cursor:initial}.mat-select-trigger{overflow:hidden}.mat-select-trigger span{white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
223
335
  }
224
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TableSelectInputComponent, decorators: [{
336
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: TableSelectInputComponent, decorators: [{
225
337
  type: Component,
226
338
  args: [{ selector: 'rxap-table-select-input', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
227
339
  {
@@ -229,11 +341,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
229
341
  useExisting: forwardRef(() => TableSelectInputComponent),
230
342
  },
231
343
  ], standalone: true, imports: [NgClass, NgIf], template: "<div [ngClass]=\"{ disabled: disabled }\" class=\"mat-select-trigger\">\n <span *ngIf=\"display || placeholder\">{{display ?? placeholder}}</span>\n</div>\n", styles: [":host{display:inline-block;width:100%;outline:none}.rxap-container{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%;height:24px}.disabled{color:#ffffff80;cursor:initial}.mat-select-trigger{overflow:hidden}.mat-select-trigger span{white-space:nowrap}\n"] }]
232
- }], ctorParameters: function () { return [{ type: i7.NgControl, decorators: [{
344
+ }], ctorParameters: () => [{ type: i7.NgControl, decorators: [{
233
345
  type: Optional
234
346
  }, {
235
347
  type: Self
236
- }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { id: [{
348
+ }] }, { type: i0.ChangeDetectorRef }], propDecorators: { id: [{
237
349
  type: HostBinding
238
350
  }], shouldLabelFloat: [{
239
351
  type: HostBinding,
@@ -246,32 +358,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
246
358
  type: Input
247
359
  }] } });
248
360
 
249
- const TABLE_SELECT_COLUMN_MAP$1 = 'TABLE_SELECT_COLUMN_MAP';
250
- const TABLE_SELECT_TO_DISPLAY$1 = 'TABLE_SELECT_TO_DISPLAY';
251
- const TABLE_SELECT_TO_VALUE$1 = 'TABLE_SELECT_TO_VALUE';
252
- const TABLE_SELECT_METHOD$1 = 'TABLE_SELECT_TO_VALUE';
253
- const TABLE_SELECT_DATA_SOURCE$1 = 'TABLE_SELECT_DATA_SOURCE';
254
- function UseTableSelectColumns$1(columnMap) {
255
- return function (target, propertyKey) {
256
- setMetadataMap(propertyKey, columnMap, TABLE_SELECT_COLUMN_MAP$1, target);
257
- };
258
- }
259
- function UseTableSelectDataSource$1(dataSource, settings) {
260
- return UseDataSource(dataSource, TABLE_SELECT_DATA_SOURCE$1, settings);
261
- }
262
- function UseTableSelectToDisplay$1(toDisplay) {
263
- return function (target, propertyKey) {
264
- setMetadataMap(propertyKey, toDisplay, TABLE_SELECT_TO_DISPLAY$1, target);
265
- };
266
- }
267
- function UseTableSelectToValue$1(toValue) {
268
- return function (target, propertyKey) {
269
- setMetadataMap(propertyKey, toValue, TABLE_SELECT_TO_VALUE$1, target);
361
+ function CreateFilterFormProvider(columns) {
362
+ const columnNameList = Array.from(columns.entries())
363
+ .filter(([key, column]) => column.filter)
364
+ .map(([key, column]) => key);
365
+ const controls = {};
366
+ for (const column of columnNameList) {
367
+ controls[column] = new RxapFormControl(null, { controlId: column });
368
+ }
369
+ const form = {
370
+ ...controls,
371
+ rxapFormGroup: new RxapFormGroup(controls, { controlId: 'filter' }),
372
+ rxapMetadata: { controlId: 'filter' },
270
373
  };
271
- }
272
- function UseTableSelectMethod$1(method) {
273
- return function (target, propertyKey) {
274
- setMetadataMap(propertyKey, method, TABLE_SELECT_METHOD$1, target);
374
+ Reflect.set(form.rxapFormGroup, '_rxapFormDefinition', form);
375
+ return {
376
+ provide: RXAP_TABLE_FILTER_FORM_DEFINITION,
377
+ useValue: form,
275
378
  };
276
379
  }
277
380
 
@@ -329,6 +432,22 @@ ExtractTableSelectDataSourceMixin = __decorate([
329
432
  Mixin(ExtractDatasourceMixin)
330
433
  ], ExtractTableSelectDataSourceMixin);
331
434
 
435
+ let ExtractTableSelectToDisplayMixin = class ExtractTableSelectToDisplayMixin {
436
+ extractTableSelectToDisplay(control = this.extractControl(), formDefinition = this.extractFormDefinition(control)) {
437
+ const map = getMetadata(TABLE_SELECT_TO_DISPLAY, Object.getPrototypeOf(formDefinition));
438
+ if (!map) {
439
+ throw new RxapFormSystemError('Could not extract the use data source map from the form definition instance', '');
440
+ }
441
+ if (!map.has(control.controlId)) {
442
+ throw new RxapFormSystemError('A use data source definition does not exists in the form definition metadata', '');
443
+ }
444
+ return map.get(control.controlId);
445
+ }
446
+ };
447
+ ExtractTableSelectToDisplayMixin = __decorate([
448
+ Mixin(ExtractFormDefinitionMixin, ExtractControlMixin)
449
+ ], ExtractTableSelectToDisplayMixin);
450
+
332
451
  let ExtractTableSelectToValueMixin = class ExtractTableSelectToValueMixin {
333
452
  extractTableSelectToValue(control = this.extractControl(), formDefinition = this.extractFormDefinition(control)) {
334
453
  const map = getMetadata(TABLE_SELECT_TO_VALUE, Object.getPrototypeOf(formDefinition));
@@ -345,26 +464,6 @@ ExtractTableSelectToValueMixin = __decorate([
345
464
  Mixin(ExtractFormDefinitionMixin, ExtractControlMixin)
346
465
  ], ExtractTableSelectToValueMixin);
347
466
 
348
- function CreateFilterFormProvider(columns) {
349
- const columnNameList = Array.from(columns.entries())
350
- .filter(([key, column]) => column.filter)
351
- .map(([key, column]) => key);
352
- const controls = {};
353
- for (const column of columnNameList) {
354
- controls[column] = new RxapFormControl(null, { controlId: column });
355
- }
356
- const form = {
357
- ...controls,
358
- rxapFormGroup: new RxapFormGroup(controls, { controlId: 'filter' }),
359
- rxapMetadata: { controlId: 'filter' },
360
- };
361
- Reflect.set(form.rxapFormGroup, '_rxapFormDefinition', form);
362
- return {
363
- provide: RXAP_TABLE_FILTER_FORM_DEFINITION,
364
- useValue: form,
365
- };
366
- }
367
-
368
467
  class OpenTableSelectWindowMethod {
369
468
  constructor(windowService, injector) {
370
469
  this.windowService = windowService;
@@ -438,15 +537,15 @@ class OpenTableSelectWindowMethod {
438
537
  createFilterForm(columns) {
439
538
  return CreateFilterFormProvider(columns);
440
539
  }
441
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OpenTableSelectWindowMethod, deps: [{ token: i1$1.WindowService }, { token: INJECTOR }], target: i0.ɵɵFactoryTarget.Injectable }); }
442
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OpenTableSelectWindowMethod }); }
540
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: OpenTableSelectWindowMethod, deps: [{ token: i1$1.WindowService }, { token: INJECTOR }], target: i0.ɵɵFactoryTarget.Injectable }); }
541
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: OpenTableSelectWindowMethod }); }
443
542
  }
444
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OpenTableSelectWindowMethod, decorators: [{
543
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: OpenTableSelectWindowMethod, decorators: [{
445
544
  type: Injectable
446
- }], ctorParameters: function () { return [{ type: i1$1.WindowService }, { type: i0.Injector, decorators: [{
545
+ }], ctorParameters: () => [{ type: i1$1.WindowService }, { type: i0.Injector, decorators: [{
447
546
  type: Inject,
448
547
  args: [INJECTOR]
449
- }] }]; } });
548
+ }] }] });
450
549
 
451
550
  let OpenTableSelectWindowDirective = class OpenTableSelectWindowDirective {
452
551
  constructor() {
@@ -568,13 +667,13 @@ let OpenTableSelectWindowDirective = class OpenTableSelectWindowDirective {
568
667
  }
569
668
  }
570
669
  }
571
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OpenTableSelectWindowDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
572
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: OpenTableSelectWindowDirective, isStandalone: true, selector: "[rxapOpenTableSelectWindow]", inputs: { data: "data", columns: "columns", selected: "selected", parameters: "parameters", label: "label", id: "id", compareWith: "compareWith", toValue: "toValue" }, outputs: { selectedChange: "selectedChange" }, host: { listeners: { "click": "onClick($event)" }, properties: { "type": "this.type", "disabled": "this.disabled" } }, providers: [OpenTableSelectWindowMethod], usesOnChanges: true, ngImport: i0 }); }
670
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: OpenTableSelectWindowDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
671
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.3", type: OpenTableSelectWindowDirective, isStandalone: true, selector: "[rxapOpenTableSelectWindow]", inputs: { data: "data", columns: "columns", selected: "selected", parameters: "parameters", label: "label", id: "id", compareWith: "compareWith", toValue: "toValue" }, outputs: { selectedChange: "selectedChange" }, host: { listeners: { "click": "onClick($event)" }, properties: { "type": "this.type", "disabled": "this.disabled" } }, providers: [OpenTableSelectWindowMethod], usesOnChanges: true, ngImport: i0 }); }
573
672
  };
574
673
  OpenTableSelectWindowDirective = __decorate([
575
674
  Mixin(ExtractTableSelectDataSourceMixin, ExtractTableSelectColumnMapMixin, ExtractTableSelectToValueMixin)
576
675
  ], OpenTableSelectWindowDirective);
577
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OpenTableSelectWindowDirective, decorators: [{
676
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: OpenTableSelectWindowDirective, decorators: [{
578
677
  type: Directive,
579
678
  args: [{
580
679
  selector: '[rxapOpenTableSelectWindow]',
@@ -610,22 +709,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
610
709
  args: ['click', ['$event']]
611
710
  }] } });
612
711
 
613
- let ExtractTableSelectToDisplayMixin = class ExtractTableSelectToDisplayMixin {
614
- extractTableSelectToDisplay(control = this.extractControl(), formDefinition = this.extractFormDefinition(control)) {
615
- const map = getMetadata(TABLE_SELECT_TO_DISPLAY, Object.getPrototypeOf(formDefinition));
616
- if (!map) {
617
- throw new RxapFormSystemError('Could not extract the use data source map from the form definition instance', '');
618
- }
619
- if (!map.has(control.controlId)) {
620
- throw new RxapFormSystemError('A use data source definition does not exists in the form definition metadata', '');
621
- }
622
- return map.get(control.controlId);
623
- }
624
- };
625
- ExtractTableSelectToDisplayMixin = __decorate([
626
- Mixin(ExtractFormDefinitionMixin, ExtractControlMixin)
627
- ], ExtractTableSelectToDisplayMixin);
628
-
629
712
  let TableSelectControlDirective = class TableSelectControlDirective {
630
713
  constructor() {
631
714
  this.ngControl = null;
@@ -665,7 +748,7 @@ let TableSelectControlDirective = class TableSelectControlDirective {
665
748
  }
666
749
  this.updateOpenTableSelectWindow();
667
750
  if (this.ngControl.control instanceof RxapFormControl) {
668
- this._subscription?.add(this.control.disabled$.pipe(tap(disabled => this.disabled = disabled), tap(() => this.updateOpenTableSelectWindowDisabledState())).subscribe());
751
+ this._subscription?.add(this.control.disabled$.pipe(tap$1(disabled => this.disabled = disabled), tap$1(() => this.updateOpenTableSelectWindowDisabledState())).subscribe());
669
752
  }
670
753
  }
671
754
  else {
@@ -678,7 +761,7 @@ let TableSelectControlDirective = class TableSelectControlDirective {
678
761
  ngAfterContentInit() {
679
762
  this.updateOpenTableSelectWindow();
680
763
  for (const openTableSelectWindow of this.openTableSelectWindow) {
681
- this._subscription.add(openTableSelectWindow.selectedChange.pipe(tap($event => this.onSelected($event))).subscribe());
764
+ this._subscription.add(openTableSelectWindow.selectedChange.pipe(tap$1($event => this.onSelected($event))).subscribe());
682
765
  }
683
766
  }
684
767
  ngOnDestroy() {
@@ -734,13 +817,13 @@ let TableSelectControlDirective = class TableSelectControlDirective {
734
817
  this.value = null;
735
818
  }
736
819
  }
737
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TableSelectControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
738
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TableSelectControlDirective, isStandalone: true, selector: "mat-form-field[rxapTableSelectControl]", inputs: { multiple: "multiple", openMethod: "openMethod", data: "data", columns: "columns", toValue: "toValue", toDisplay: "toDisplay" }, queries: [{ propertyName: "tableSelectInput", first: true, predicate: TableSelectInputComponent, descendants: true }, { propertyName: "matLabel", first: true, predicate: ["mat-label"], descendants: true }, { propertyName: "openTableSelectWindow", predicate: OpenTableSelectWindowDirective }], usesOnChanges: true, ngImport: i0 }); }
820
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: TableSelectControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
821
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.3", type: TableSelectControlDirective, isStandalone: true, selector: "mat-form-field[rxapTableSelectControl]", inputs: { multiple: "multiple", openMethod: "openMethod", data: "data", columns: "columns", toValue: "toValue", toDisplay: "toDisplay" }, queries: [{ propertyName: "tableSelectInput", first: true, predicate: TableSelectInputComponent, descendants: true }, { propertyName: "matLabel", first: true, predicate: ["mat-label"], descendants: true }, { propertyName: "openTableSelectWindow", predicate: OpenTableSelectWindowDirective }], usesOnChanges: true, ngImport: i0 }); }
739
822
  };
740
823
  TableSelectControlDirective = __decorate([
741
824
  Mixin(ExtractTableSelectDataSourceMixin, ExtractTableSelectToValueMixin, ExtractTableSelectToDisplayMixin, ExtractTableSelectColumnMapMixin)
742
825
  ], TableSelectControlDirective);
743
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TableSelectControlDirective, decorators: [{
826
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: TableSelectControlDirective, decorators: [{
744
827
  type: Directive,
745
828
  args: [{
746
829
  selector: 'mat-form-field[rxapTableSelectControl]',
@@ -770,19 +853,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
770
853
  }] } });
771
854
 
772
855
  class TableSelectControlModule {
773
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TableSelectControlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
774
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TableSelectControlModule, imports: [OpenTableSelectWindowDirective,
856
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: TableSelectControlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
857
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: TableSelectControlModule, imports: [OpenTableSelectWindowDirective,
775
858
  TableSelectControlDirective,
776
859
  TableSelectInputComponent,
777
860
  TableSelectWindowComponent], exports: [OpenTableSelectWindowDirective,
778
861
  TableSelectControlDirective,
779
862
  TableSelectInputComponent,
780
863
  TableSelectWindowComponent] }); }
781
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TableSelectControlModule, providers: [
864
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: TableSelectControlModule, providers: [
782
865
  OpenTableSelectWindowMethod,
783
866
  ], imports: [TableSelectWindowComponent] }); }
784
867
  }
785
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TableSelectControlModule, decorators: [{
868
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: TableSelectControlModule, decorators: [{
786
869
  type: NgModule,
787
870
  args: [{
788
871
  imports: [
@@ -810,5 +893,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
810
893
  * Generated bundle index. Do not edit.
811
894
  */
812
895
 
813
- export { OpenTableSelectWindowDirective, OpenTableSelectWindowMethod, TABLE_SELECT_COLUMN_MAP$1 as TABLE_SELECT_COLUMN_MAP, TABLE_SELECT_DATA_SOURCE$1 as TABLE_SELECT_DATA_SOURCE, TABLE_SELECT_METHOD$1 as TABLE_SELECT_METHOD, TABLE_SELECT_TO_DISPLAY$1 as TABLE_SELECT_TO_DISPLAY, TABLE_SELECT_TO_VALUE$1 as TABLE_SELECT_TO_VALUE, TableSelectControlDirective, TableSelectControlModule, TableSelectInputComponent, TableSelectWindowComponent, UseTableSelectColumns$1 as UseTableSelectColumns, UseTableSelectDataSource$1 as UseTableSelectDataSource, UseTableSelectMethod$1 as UseTableSelectMethod, UseTableSelectToDisplay$1 as UseTableSelectToDisplay, UseTableSelectToValue$1 as UseTableSelectToValue };
896
+ export { CreateFilterFormProvider, ExtractTableSelectColumnMapMixin, ExtractTableSelectDataSourceMixin, ExtractTableSelectToDisplayMixin, ExtractTableSelectToValueMixin, MockWindowRef, OpenTableSelectWindowDirective, OpenTableSelectWindowMethod, TABLE_SELECT_COLUMN_MAP, TABLE_SELECT_DATA_SOURCE, TABLE_SELECT_METHOD, TABLE_SELECT_TO_DISPLAY, TABLE_SELECT_TO_VALUE, TableSelectControlDirective, TableSelectControlModule, TableSelectInputComponent, TableSelectWindowComponent, UseTableSelectColumns, UseTableSelectDataSource, UseTableSelectMethod, UseTableSelectToDisplay, UseTableSelectToValue, WindowTestWrapperComponent };
814
897
  //# sourceMappingURL=rxap-ngx-material-table-select.mjs.map