@rxap/ngx-material-table-select 21.0.1-dev.1 → 22.0.0-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.
Files changed (108) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/compodoc/changelog.html +46 -0
  3. package/compodoc/classes/MockWindowRef.html +10 -8
  4. package/compodoc/components/WindowTestWrapperComponent.html +13 -7
  5. package/compodoc/dependencies.html +20 -20
  6. package/compodoc/js/search/search_index.js +2 -2
  7. package/compodoc/properties.html +1 -1
  8. package/docs/documentation.json +374 -384
  9. package/docs/html/classes/ExtractTableSelectColumnMapMixin.html +2 -2
  10. package/docs/html/classes/ExtractTableSelectDataSourceMixin.html +2 -2
  11. package/docs/html/classes/ExtractTableSelectToDisplayMixin.html +2 -2
  12. package/docs/html/classes/ExtractTableSelectToValueMixin.html +2 -2
  13. package/docs/html/classes/MockWindowRef.html +5 -5
  14. package/docs/html/classes/OpenTableSelectWindowDirective.html +3 -3
  15. package/docs/html/classes/OpenTableSelectWindowMethod.html +2 -2
  16. package/docs/html/classes/TableSelectControlDirective.html +2 -2
  17. package/docs/html/classes/TableSelectInputComponent.html +20 -20
  18. package/docs/html/classes/TableSelectWindowComponent.html +2 -2
  19. package/docs/html/classes/WindowTestWrapperComponent.html +3 -3
  20. package/docs/html/functions/CreateFilterFormProvider.html +1 -1
  21. package/docs/html/functions/UseTableSelectColumns.html +1 -1
  22. package/docs/html/functions/UseTableSelectDataSource.html +1 -1
  23. package/docs/html/functions/UseTableSelectMethod.html +1 -1
  24. package/docs/html/functions/UseTableSelectToDisplay.html +1 -1
  25. package/docs/html/functions/UseTableSelectToValue.html +1 -1
  26. package/docs/html/hierarchy.html +1 -1
  27. package/docs/html/index.html +2 -2
  28. package/docs/html/interfaces/BooleanColumn.html +2 -2
  29. package/docs/html/interfaces/DateColumn.html +2 -2
  30. package/docs/html/interfaces/OpenTableSelectWindowMethodParameters.html +4 -4
  31. package/docs/html/interfaces/SelectColumn.html +2 -2
  32. package/docs/html/modules.html +1 -1
  33. package/docs/html/types/TableSelectColumn.html +1 -1
  34. package/docs/html/types/TableSelectColumnMap.html +1 -1
  35. package/docs/html/types/TableSelectToDisplayFunction.html +1 -1
  36. package/docs/html/types/TableSelectToValueFunction.html +1 -1
  37. package/docs/html/variables/TABLE_SELECT_COLUMN_MAP.html +1 -1
  38. package/docs/html/variables/TABLE_SELECT_DATA_SOURCE.html +1 -1
  39. package/docs/html/variables/TABLE_SELECT_METHOD.html +1 -1
  40. package/docs/html/variables/TABLE_SELECT_TO_DISPLAY.html +1 -1
  41. package/docs/html/variables/TABLE_SELECT_TO_VALUE.html +1 -1
  42. package/docs/markdown/README.md +1 -1
  43. package/docs/markdown/classes/ExtractTableSelectColumnMapMixin.md +8 -8
  44. package/docs/markdown/classes/ExtractTableSelectDataSourceMixin.md +13 -13
  45. package/docs/markdown/classes/ExtractTableSelectToDisplayMixin.md +8 -8
  46. package/docs/markdown/classes/ExtractTableSelectToValueMixin.md +8 -8
  47. package/docs/markdown/classes/MockWindowRef.md +7 -7
  48. package/docs/markdown/classes/OpenTableSelectWindowDirective.md +44 -44
  49. package/docs/markdown/classes/OpenTableSelectWindowMethod.md +3 -3
  50. package/docs/markdown/classes/TableSelectControlDirective.md +36 -36
  51. package/docs/markdown/classes/TableSelectInputComponent.md +39 -44
  52. package/docs/markdown/classes/TableSelectWindowComponent.md +12 -12
  53. package/docs/markdown/classes/WindowTestWrapperComponent.md +9 -9
  54. package/docs/markdown/functions/CreateFilterFormProvider.md +2 -2
  55. package/docs/markdown/functions/UseTableSelectColumns.md +2 -2
  56. package/docs/markdown/functions/UseTableSelectDataSource.md +2 -2
  57. package/docs/markdown/functions/UseTableSelectMethod.md +2 -2
  58. package/docs/markdown/functions/UseTableSelectToDisplay.md +2 -2
  59. package/docs/markdown/functions/UseTableSelectToValue.md +2 -2
  60. package/docs/markdown/globals.md +2 -2
  61. package/docs/markdown/interfaces/BooleanColumn.md +5 -5
  62. package/docs/markdown/interfaces/DateColumn.md +6 -6
  63. package/docs/markdown/interfaces/OpenTableSelectWindowMethodParameters.md +14 -14
  64. package/docs/markdown/interfaces/SelectColumn.md +5 -5
  65. package/docs/markdown/type-aliases/TableSelectColumn.md +2 -2
  66. package/docs/markdown/type-aliases/TableSelectColumnMap.md +2 -2
  67. package/docs/markdown/type-aliases/TableSelectToDisplayFunction.md +2 -2
  68. package/docs/markdown/type-aliases/TableSelectToValueFunction.md +2 -2
  69. package/docs/markdown/variables/TABLE_SELECT_COLUMN_MAP.md +2 -2
  70. package/docs/markdown/variables/TABLE_SELECT_DATA_SOURCE.md +2 -2
  71. package/docs/markdown/variables/TABLE_SELECT_METHOD.md +2 -2
  72. package/docs/markdown/variables/TABLE_SELECT_TO_DISPLAY.md +2 -2
  73. package/docs/markdown/variables/TABLE_SELECT_TO_VALUE.md +2 -2
  74. package/docs/wiki/Class.ExtractTableSelectColumnMapMixin.md +7 -7
  75. package/docs/wiki/Class.ExtractTableSelectDataSourceMixin.md +12 -12
  76. package/docs/wiki/Class.ExtractTableSelectToDisplayMixin.md +7 -7
  77. package/docs/wiki/Class.ExtractTableSelectToValueMixin.md +7 -7
  78. package/docs/wiki/Class.MockWindowRef.md +6 -6
  79. package/docs/wiki/Class.OpenTableSelectWindowDirective.md +43 -43
  80. package/docs/wiki/Class.OpenTableSelectWindowMethod.md +2 -2
  81. package/docs/wiki/Class.TableSelectControlDirective.md +35 -35
  82. package/docs/wiki/Class.TableSelectInputComponent.md +38 -43
  83. package/docs/wiki/Class.TableSelectWindowComponent.md +11 -11
  84. package/docs/wiki/Class.WindowTestWrapperComponent.md +8 -8
  85. package/docs/wiki/Function.CreateFilterFormProvider.md +1 -1
  86. package/docs/wiki/Function.UseTableSelectColumns.md +1 -1
  87. package/docs/wiki/Function.UseTableSelectDataSource.md +1 -1
  88. package/docs/wiki/Function.UseTableSelectMethod.md +1 -1
  89. package/docs/wiki/Function.UseTableSelectToDisplay.md +1 -1
  90. package/docs/wiki/Function.UseTableSelectToValue.md +1 -1
  91. package/docs/wiki/Interface.BooleanColumn.md +4 -4
  92. package/docs/wiki/Interface.DateColumn.md +5 -5
  93. package/docs/wiki/Interface.OpenTableSelectWindowMethodParameters.md +13 -13
  94. package/docs/wiki/Interface.SelectColumn.md +4 -4
  95. package/docs/wiki/TypeAlias.TableSelectColumn.md +1 -1
  96. package/docs/wiki/TypeAlias.TableSelectColumnMap.md +1 -1
  97. package/docs/wiki/TypeAlias.TableSelectToDisplayFunction.md +1 -1
  98. package/docs/wiki/TypeAlias.TableSelectToValueFunction.md +1 -1
  99. package/docs/wiki/Variable.TABLE_SELECT_COLUMN_MAP.md +1 -1
  100. package/docs/wiki/Variable.TABLE_SELECT_DATA_SOURCE.md +1 -1
  101. package/docs/wiki/Variable.TABLE_SELECT_METHOD.md +1 -1
  102. package/docs/wiki/Variable.TABLE_SELECT_TO_DISPLAY.md +1 -1
  103. package/docs/wiki/Variable.TABLE_SELECT_TO_VALUE.md +1 -1
  104. package/docs/wiki/globals.md +1 -1
  105. package/fesm2022/rxap-ngx-material-table-select.mjs +1520 -769
  106. package/fesm2022/rxap-ngx-material-table-select.mjs.map +1 -1
  107. package/package.json +55 -55
  108. package/types/rxap-ngx-material-table-select.d.ts +334 -252
@@ -1,187 +1,542 @@
1
- import { AsyncPipe, KeyValuePipe, NgClass } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { inject, ChangeDetectionStrategy, Component, input, INJECTOR, ViewContainerRef, viewChildren, ComponentRef, ViewRef, Injector, booleanAttribute, linkedSignal, signal, effect, afterNextRender, forwardRef, Injectable, output, computed, untracked, isDevMode, Directive, contentChildren, contentChild, DestroyRef } from '@angular/core';
4
- import * as i6 from '@angular/forms';
5
- import { FormsModule, ReactiveFormsModule, NgControl } from '@angular/forms';
6
- import * as i7 from '@angular/material/button';
7
- import { MatButtonModule, MatButton } from '@angular/material/button';
8
- import * as i4 from '@angular/material/form-field';
9
- import { MatFormFieldModule, MatFormFieldControl, MatFormField } from '@angular/material/form-field';
10
- import * as i8 from '@angular/material/icon';
11
- import { MatIconModule } from '@angular/material/icon';
12
- import * as i5 from '@angular/material/input';
13
- import { MatInputModule } from '@angular/material/input';
14
- import * as i9 from '@angular/material/paginator';
15
- import { MatPaginatorModule } from '@angular/material/paginator';
16
- import * as i1 from '@angular/material/progress-bar';
17
- import { MatProgressBarModule } from '@angular/material/progress-bar';
18
- import * as i3 from '@angular/material/sort';
19
- import { MatSortModule } from '@angular/material/sort';
20
- import * as i2 from '@angular/material/table';
21
- import { MatTableModule } from '@angular/material/table';
22
- import { ParentControlContainerDirective, ControlValueAccessor, RxapFormControl, RxapFormGroup } from '@rxap/forms';
23
- import { FormFieldNoPaddingDirective } from '@rxap/material-directives/form-field';
24
- import { InputClearButtonDirective } from '@rxap/material-form-system';
25
- import { SelectRowService, RowAnimation, TableDataSourceDirective, FilterHeaderRowDirective, CheckboxHeaderCellComponent, CheckboxCellComponent, DateCellComponent, BooleanCellComponent, TableFilterService, RXAP_TABLE_FILTER_FORM_DEFINITION, RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS, TABLE_DATA_SOURCE, RXAP_TABLE_METHOD, TABLE_REMOTE_METHOD_ADAPTER_FACTORY, RXAP_TABLE_FILTER } from '@rxap/material-table-system';
26
- import { GetFromObjectPipe } from '@rxap/pipes';
27
- import { RXAP_WINDOW_DATA, RXAP_WINDOW_REF, WindowFooterDirective, WindowService, RXAP_WINDOW_SETTINGS } from '@rxap/window-system';
28
- import { map, tap as tap$1 } from 'rxjs/operators';
29
- import * as i1$1 from '@angular/cdk/portal';
30
- import { CdkPortalOutlet, ComponentPortal, PortalModule } from '@angular/cdk/portal';
31
- import { Subject, ReplaySubject, tap, Subscription, startWith, delay } from 'rxjs';
32
- import { UseDataSource, RxapFormSystemError, ExtractFormDefinitionMixin, ExtractControlMixin } from '@rxap/form-system';
33
- import { setMetadataMap, getMetadata } from '@rxap/reflect-metadata';
34
- import { __decorate, __metadata } from 'tslib';
35
- import { Mixin } from '@rxap/mixin';
36
- import { ExtractDatasourceMixin } from '@rxap/material-table-window-system';
37
- import { staticDataSource, DataSourceLoader, BaseDataSource } from '@rxap/data-source';
38
- import { GenerateRandomString, coerceArray } from '@rxap/utilities';
39
- import '@rxap/rxjs';
40
- import { TableDataSource, AbstractTableDataSource } from '@rxap/data-source/table';
41
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
42
-
43
- class TableSelectWindowComponent {
44
- constructor() {
45
- this.data = inject(RXAP_WINDOW_DATA);
46
- this.selectRows = inject(SelectRowService);
47
- this.windowRef = inject(RXAP_WINDOW_REF);
48
- this.id = this.data.id;
49
- this.displayColumns = [...this.data.columns.keys()];
50
- if (this.data.multiple) {
51
- this.displayColumns.unshift('select');
52
- }
53
- this.filterDisplayColumns = this.displayColumns.map(column => ['filter', column].join('__'));
54
- this.hasSomeFilterColumn = Array.from(this.data.columns.values()).some(column => column.filter);
55
- this.hasNotSelected$ = this.selectRows.selectedRows$.pipe(map((selected) => selected.length === 0));
56
- if (this.data.selected?.length) {
57
- this.selectRows.selectionModel.select(...this.data.selected);
58
- }
59
- }
60
- selectRow(element) {
61
- this.selectRows.selectionModel.select(element);
62
- // if not multi select send the selection and close
63
- if (!this.data.multiple) {
64
- this.select();
65
- }
66
- }
67
- close() {
68
- this.windowRef.complete();
69
- }
70
- select() {
71
- this.windowRef.next(this.selectRows.selectedRows);
72
- this.close();
73
- }
74
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableSelectWindowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
75
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: TableSelectWindowComponent, isStandalone: true, selector: "rxap-table-select-window", providers: [
76
- SelectRowService,
77
- TableFilterService,
78
- ], ngImport: i0, template: "@if (tableDataSourceDirective.loading$ | async) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n}\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 @if (data.multiple) {\n <ng-container 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\n @if (hasSomeFilterColumn) {\n @if (data.multiple) {\n <ng-container [matColumnDef]=\"'filter__select'\">\n <th *matHeaderCellDef mat-header-cell></th>\n </ng-container>\n }\n @for (item of data.columns | keyvalue; track item) {\n @if (item.value.filter) {\n @switch (item.value.type) {\n @case ('date') {\n <ng-container [matColumnDef]=\"'filter__' + item.key\">\n <th *matHeaderCellDef mat-header-cell>\n </th>\n </ng-container>\n }\n @case ('boolean') {\n <ng-container [matColumnDef]=\"'filter__' + item.key\">\n <th *matHeaderCellDef mat-header-cell>\n </th>\n </ng-container>\n }\n @default {\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 }\n }\n @if (!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 }\n }\n }\n\n @for (item of data.columns | keyvalue; track item) {\n @switch (item.value.type) {\n @case ('date') {\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 @case ('boolean') {\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 @default {\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 }\n }\n\n @if (hasSomeFilterColumn) {\n <tr\n *matHeaderRowDef=\"filterDisplayColumns\"\n class=\"filter-header\"\n mat-header-row\n ></tr>\n }\n\n @if (data.showHeader) {\n <tr\n *matHeaderRowDef=\"displayColumns\"\n mat-header-row\n ></tr>\n }\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 @if (data.multiple) {\n <button (click)=\"select()\" [disabled]=\"hasNotSelected$ | async\" class=\"grow-0\" mat-raised-button\n type=\"button\">\n <ng-container i18n>Select</ng-container>\n </button>\n }\n @if (!data.multiple) {\n <span class=\"hint\" i18n>Click on a row to select an entry.</span>\n }\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: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i2.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i2.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i2.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: TableDataSourceDirective, selector: "table[mat-table][rxapTableDataSource],mat-table[rxapTableDataSource]", inputs: ["rxapTableDataSource", "dataSource", "paginator", "id", "parameters"], exportAs: ["rxapTableDataSource"] }, { kind: "directive", type: FilterHeaderRowDirective, selector: "table[rxap-filter-header-row]", inputs: ["rxap-filter-header-row"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i3.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i3.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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i6.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: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i6.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: i7.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: InputClearButtonDirective, selector: "[rxapInputClearButton]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i8.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: i9.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: "directive", type: FormFieldNoPaddingDirective, selector: "mat-form-field[rxapNoPadding]" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: GetFromObjectPipe, name: "getFromObject" }], animations: [RowAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
79
- }
80
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableSelectWindowComponent, decorators: [{
81
- type: Component,
82
- args: [{ selector: 'rxap-table-select-window', changeDetection: ChangeDetectionStrategy.OnPush, animations: [RowAnimation], providers: [
83
- SelectRowService,
84
- TableFilterService,
85
- ], imports: [
86
- MatProgressBarModule,
87
- MatTableModule,
88
- TableDataSourceDirective,
89
- FilterHeaderRowDirective,
90
- MatSortModule,
91
- CheckboxHeaderCellComponent,
92
- CheckboxCellComponent,
93
- MatFormFieldModule,
94
- MatInputModule,
95
- FormsModule,
96
- ReactiveFormsModule,
97
- ParentControlContainerDirective,
98
- MatButtonModule,
99
- InputClearButtonDirective,
100
- MatIconModule,
101
- DateCellComponent,
102
- BooleanCellComponent,
103
- MatPaginatorModule,
104
- WindowFooterDirective,
105
- AsyncPipe,
106
- KeyValuePipe,
107
- GetFromObjectPipe,
108
- FormFieldNoPaddingDirective
109
- ], template: "@if (tableDataSourceDirective.loading$ | async) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n}\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 @if (data.multiple) {\n <ng-container 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\n @if (hasSomeFilterColumn) {\n @if (data.multiple) {\n <ng-container [matColumnDef]=\"'filter__select'\">\n <th *matHeaderCellDef mat-header-cell></th>\n </ng-container>\n }\n @for (item of data.columns | keyvalue; track item) {\n @if (item.value.filter) {\n @switch (item.value.type) {\n @case ('date') {\n <ng-container [matColumnDef]=\"'filter__' + item.key\">\n <th *matHeaderCellDef mat-header-cell>\n </th>\n </ng-container>\n }\n @case ('boolean') {\n <ng-container [matColumnDef]=\"'filter__' + item.key\">\n <th *matHeaderCellDef mat-header-cell>\n </th>\n </ng-container>\n }\n @default {\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 }\n }\n @if (!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 }\n }\n }\n\n @for (item of data.columns | keyvalue; track item) {\n @switch (item.value.type) {\n @case ('date') {\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 @case ('boolean') {\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 @default {\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 }\n }\n\n @if (hasSomeFilterColumn) {\n <tr\n *matHeaderRowDef=\"filterDisplayColumns\"\n class=\"filter-header\"\n mat-header-row\n ></tr>\n }\n\n @if (data.showHeader) {\n <tr\n *matHeaderRowDef=\"displayColumns\"\n mat-header-row\n ></tr>\n }\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 @if (data.multiple) {\n <button (click)=\"select()\" [disabled]=\"hasNotSelected$ | async\" class=\"grow-0\" mat-raised-button\n type=\"button\">\n <ng-container i18n>Select</ng-container>\n </button>\n }\n @if (!data.multiple) {\n <span class=\"hint\" i18n>Click on a row to select an entry.</span>\n }\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"] }]
110
- }], ctorParameters: () => [] });
111
-
112
- // TODO : refactor move to package @rxap/ngx-testing
113
- class MockWindowRef extends Subject {
114
- constructor() {
115
- super(...arguments);
116
- /**
117
- * @deprecated removed. use the subscribe method and wait for the resolve event
118
- */
119
- this.closed$ = new Subject();
120
- /**
121
- * @internal
122
- */
123
- this.footerPortal$ = new ReplaySubject(1);
124
- }
125
- /**
126
- * @deprecated removed. use the complete method
127
- * @param result
128
- */
129
- close(result) {
130
- this.closed$.next(result);
131
- if (result !== undefined) {
132
- this.next(result);
133
- }
134
- this.complete();
135
- }
136
- complete() {
137
- super.complete();
138
- }
139
- /**
140
- * @param portal
141
- */
142
- setFooterPortal(portal) {
143
- setTimeout(() => {
144
- this.footerPortal$.next(portal);
145
- });
146
- }
147
- }
148
- class WindowTestWrapperComponent {
149
- constructor() {
150
- this.component = input.required(...(ngDevMode ? [{ debugName: "component" }] : /* istanbul ignore next */ []));
151
- this.content = null;
152
- this.footer = null;
153
- this.injector = inject(INJECTOR);
154
- this.viewContainerRef = this.injector.get(ViewContainerRef);
155
- this.portalOutlet = viewChildren(CdkPortalOutlet, ...(ngDevMode ? [{ debugName: "portalOutlet" }] : /* istanbul ignore next */ []));
156
- }
157
- ngAfterViewInit() {
158
- this.portalOutlet().forEach((outlet) => {
159
- outlet.attached.pipe(tap(attachedRef => {
160
- if (attachedRef instanceof ComponentRef) {
161
- console.log('ComponentRef', attachedRef);
162
- // attachedRef.changeDetectorRef.detach();
163
- }
164
- else if (attachedRef instanceof ViewRef) {
165
- console.log('viewRef', attachedRef);
166
- }
167
- else {
168
- console.log('attachedRef', attachedRef);
169
- }
170
- })).subscribe();
171
- });
172
- const windowRef = new MockWindowRef();
173
- const injector = Injector.create({
174
- parent: this.injector,
175
- providers: [{
176
- provide: RXAP_WINDOW_REF,
177
- useValue: windowRef,
178
- }],
179
- });
180
- windowRef.footerPortal$.pipe(tap((portal) => this.footer = portal)).subscribe();
181
- this.content = new ComponentPortal(this.component(), this.viewContainerRef, injector);
182
- }
183
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: WindowTestWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
184
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: WindowTestWrapperComponent, isStandalone: true, selector: "ng-component", inputs: { component: { classPropertyName: "component", publicName: "component", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "portalOutlet", predicate: CdkPortalOutlet, descendants: true, isSignal: true }], ngImport: i0, template: `
1
+ import { AsyncPipe, KeyValuePipe, NgClass } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, ComponentRef, DestroyRef, Directive, INJECTOR, Injectable, Injector, ViewContainerRef, ViewRef, afterNextRender, booleanAttribute, computed, contentChild, contentChildren, effect, forwardRef, inject, input, isDevMode, linkedSignal, output, signal, untracked, viewChildren } from "@angular/core";
4
+ import * as i6 from "@angular/forms";
5
+ import { FormsModule, NgControl, ReactiveFormsModule } from "@angular/forms";
6
+ import * as i7 from "@angular/material/button";
7
+ import { MatButton, MatButtonModule } from "@angular/material/button";
8
+ import * as i4 from "@angular/material/form-field";
9
+ import { MatFormField, MatFormFieldControl, MatFormFieldModule } from "@angular/material/form-field";
10
+ import * as i8 from "@angular/material/icon";
11
+ import { MatIconModule } from "@angular/material/icon";
12
+ import * as i5 from "@angular/material/input";
13
+ import { MatInputModule } from "@angular/material/input";
14
+ import * as i9 from "@angular/material/paginator";
15
+ import { MatPaginatorModule } from "@angular/material/paginator";
16
+ import * as i1$1 from "@angular/material/progress-bar";
17
+ import { MatProgressBarModule } from "@angular/material/progress-bar";
18
+ import * as i3 from "@angular/material/sort";
19
+ import { MatSortModule } from "@angular/material/sort";
20
+ import * as i2 from "@angular/material/table";
21
+ import { MatTableModule } from "@angular/material/table";
22
+ import { ControlValueAccessor, ParentControlContainerDirective, RxapFormControl, RxapFormGroup } from "@rxap/forms";
23
+ import { FormFieldNoPaddingDirective } from "@rxap/material-directives/form-field";
24
+ import { InputClearButtonDirective } from "@rxap/material-form-system";
25
+ import { BooleanCellComponent, CheckboxCellComponent, CheckboxHeaderCellComponent, DateCellComponent, FilterHeaderRowDirective, RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS, RXAP_TABLE_FILTER, RXAP_TABLE_FILTER_FORM_DEFINITION, RXAP_TABLE_METHOD, RowAnimation, SelectRowService, TABLE_DATA_SOURCE, TABLE_REMOTE_METHOD_ADAPTER_FACTORY, TableDataSourceDirective, TableFilterService } from "@rxap/material-table-system";
26
+ import { GetFromObjectPipe } from "@rxap/pipes";
27
+ import { RXAP_WINDOW_DATA, RXAP_WINDOW_REF, RXAP_WINDOW_SETTINGS, WindowFooterDirective, WindowService } from "@rxap/window-system";
28
+ import { map, tap } from "rxjs/operators";
29
+ import * as i1 from "@angular/cdk/portal";
30
+ import { CdkPortalOutlet, ComponentPortal, PortalModule } from "@angular/cdk/portal";
31
+ import { ReplaySubject, Subject, Subscription, delay, startWith, tap as tap$1 } from "rxjs";
32
+ import { ExtractControlMixin, ExtractFormDefinitionMixin, RxapFormSystemError, UseDataSource } from "@rxap/form-system";
33
+ import { getMetadata, setMetadataMap } from "@rxap/reflect-metadata";
34
+ import { __decorate, __metadata } from "tslib";
35
+ import { Mixin } from "@rxap/mixin";
36
+ import { ExtractDatasourceMixin } from "@rxap/material-table-window-system";
37
+ import { BaseDataSource, DataSourceLoader, staticDataSource } from "@rxap/data-source";
38
+ import { GenerateRandomString, coerceArray } from "@rxap/utilities";
39
+ import "@rxap/rxjs";
40
+ import { AbstractTableDataSource, TableDataSource } from "@rxap/data-source/table";
41
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
42
+ var TableSelectWindowComponent = class TableSelectWindowComponent {
43
+ constructor() {
44
+ this.data = inject(RXAP_WINDOW_DATA);
45
+ this.selectRows = inject(SelectRowService);
46
+ this.windowRef = inject(RXAP_WINDOW_REF);
47
+ this.id = this.data.id;
48
+ this.displayColumns = [...this.data.columns.keys()];
49
+ if (this.data.multiple) this.displayColumns.unshift("select");
50
+ this.filterDisplayColumns = this.displayColumns.map((column) => ["filter", column].join("__"));
51
+ this.hasSomeFilterColumn = Array.from(this.data.columns.values()).some((column) => column.filter);
52
+ this.hasNotSelected$ = this.selectRows.selectedRows$.pipe(map((selected) => selected.length === 0));
53
+ if (this.data.selected?.length) this.selectRows.selectionModel.select(...this.data.selected);
54
+ }
55
+ selectRow(element) {
56
+ this.selectRows.selectionModel.select(element);
57
+ if (!this.data.multiple) this.select();
58
+ }
59
+ close() {
60
+ this.windowRef.complete();
61
+ }
62
+ select() {
63
+ this.windowRef.next(this.selectRows.selectedRows);
64
+ this.close();
65
+ }
66
+ static {
67
+ this.ɵfac = i0.ɵɵngDeclareFactory({
68
+ minVersion: "12.0.0",
69
+ version: "22.3.0",
70
+ ngImport: i0,
71
+ type: TableSelectWindowComponent,
72
+ deps: [],
73
+ target: i0.ɵɵFactoryTarget.Component
74
+ });
75
+ }
76
+ static {
77
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
78
+ minVersion: "17.0.0",
79
+ version: "22.3.0",
80
+ type: TableSelectWindowComponent,
81
+ isStandalone: true,
82
+ selector: "rxap-table-select-window",
83
+ providers: [SelectRowService, TableFilterService],
84
+ ngImport: i0,
85
+ template: "@if (tableDataSourceDirective.loading$ | async) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n}\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 @if (data.multiple) {\n <ng-container 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\n @if (hasSomeFilterColumn) {\n @if (data.multiple) {\n <ng-container [matColumnDef]=\"'filter__select'\">\n <th *matHeaderCellDef mat-header-cell></th>\n </ng-container>\n }\n @for (item of data.columns | keyvalue; track item) {\n @if (item.value.filter) {\n @switch (item.value.type) {\n @case ('date') {\n <ng-container [matColumnDef]=\"'filter__' + item.key\">\n <th *matHeaderCellDef mat-header-cell>\n </th>\n </ng-container>\n }\n @case ('boolean') {\n <ng-container [matColumnDef]=\"'filter__' + item.key\">\n <th *matHeaderCellDef mat-header-cell>\n </th>\n </ng-container>\n }\n @default {\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 }\n }\n @if (!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 }\n }\n }\n\n @for (item of data.columns | keyvalue; track item) {\n @switch (item.value.type) {\n @case ('date') {\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 @case ('boolean') {\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 @default {\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 }\n }\n\n @if (hasSomeFilterColumn) {\n <tr\n *matHeaderRowDef=\"filterDisplayColumns\"\n class=\"filter-header\"\n mat-header-row\n ></tr>\n }\n\n @if (data.showHeader) {\n <tr\n *matHeaderRowDef=\"displayColumns\"\n mat-header-row\n ></tr>\n }\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 @if (data.multiple) {\n <button (click)=\"select()\" [disabled]=\"hasNotSelected$ | async\" class=\"grow-0\" mat-raised-button\n type=\"button\">\n <ng-container i18n>Select</ng-container>\n </button>\n }\n @if (!data.multiple) {\n <span class=\"hint\" i18n>Click on a row to select an entry.</span>\n }\n </div>\n</ng-template>\n",
86
+ 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"],
87
+ dependencies: [
88
+ {
89
+ kind: "ngmodule",
90
+ type: MatProgressBarModule
91
+ },
92
+ {
93
+ kind: "component",
94
+ type: i1$1.MatProgressBar,
95
+ selector: "mat-progress-bar",
96
+ inputs: [
97
+ "color",
98
+ "value",
99
+ "bufferValue",
100
+ "mode"
101
+ ],
102
+ outputs: ["animationEnd"],
103
+ exportAs: ["matProgressBar"]
104
+ },
105
+ {
106
+ kind: "ngmodule",
107
+ type: MatTableModule
108
+ },
109
+ {
110
+ kind: "component",
111
+ type: i2.MatTable,
112
+ selector: "mat-table, table[mat-table]",
113
+ exportAs: ["matTable"]
114
+ },
115
+ {
116
+ kind: "directive",
117
+ type: i2.MatHeaderCellDef,
118
+ selector: "[matHeaderCellDef]"
119
+ },
120
+ {
121
+ kind: "directive",
122
+ type: i2.MatHeaderRowDef,
123
+ selector: "[matHeaderRowDef]",
124
+ inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"]
125
+ },
126
+ {
127
+ kind: "directive",
128
+ type: i2.MatColumnDef,
129
+ selector: "[matColumnDef]",
130
+ inputs: ["matColumnDef"]
131
+ },
132
+ {
133
+ kind: "directive",
134
+ type: i2.MatCellDef,
135
+ selector: "[matCellDef]"
136
+ },
137
+ {
138
+ kind: "directive",
139
+ type: i2.MatRowDef,
140
+ selector: "[matRowDef]",
141
+ inputs: ["matRowDefColumns", "matRowDefWhen"]
142
+ },
143
+ {
144
+ kind: "directive",
145
+ type: i2.MatHeaderCell,
146
+ selector: "mat-header-cell, th[mat-header-cell]"
147
+ },
148
+ {
149
+ kind: "directive",
150
+ type: i2.MatCell,
151
+ selector: "mat-cell, td[mat-cell]"
152
+ },
153
+ {
154
+ kind: "component",
155
+ type: i2.MatHeaderRow,
156
+ selector: "mat-header-row, tr[mat-header-row]",
157
+ exportAs: ["matHeaderRow"]
158
+ },
159
+ {
160
+ kind: "component",
161
+ type: i2.MatRow,
162
+ selector: "mat-row, tr[mat-row]",
163
+ exportAs: ["matRow"]
164
+ },
165
+ {
166
+ kind: "directive",
167
+ type: TableDataSourceDirective,
168
+ selector: "table[mat-table][rxapTableDataSource],mat-table[rxapTableDataSource]",
169
+ inputs: [
170
+ "rxapTableDataSource",
171
+ "dataSource",
172
+ "paginator",
173
+ "id",
174
+ "parameters"
175
+ ],
176
+ exportAs: ["rxapTableDataSource"]
177
+ },
178
+ {
179
+ kind: "directive",
180
+ type: FilterHeaderRowDirective,
181
+ selector: "table[rxap-filter-header-row]",
182
+ inputs: ["rxap-filter-header-row"]
183
+ },
184
+ {
185
+ kind: "ngmodule",
186
+ type: MatSortModule
187
+ },
188
+ {
189
+ kind: "directive",
190
+ type: i3.MatSort,
191
+ selector: "[matSort]",
192
+ inputs: [
193
+ "matSortActive",
194
+ "matSortStart",
195
+ "matSortDirection",
196
+ "matSortDisableClear",
197
+ "matSortDisabled"
198
+ ],
199
+ outputs: ["matSortChange"],
200
+ exportAs: ["matSort"]
201
+ },
202
+ {
203
+ kind: "component",
204
+ type: i3.MatSortHeader,
205
+ selector: "[mat-sort-header]",
206
+ inputs: [
207
+ "mat-sort-header",
208
+ "arrowPosition",
209
+ "start",
210
+ "disabled",
211
+ "sortActionDescription",
212
+ "disableClear"
213
+ ],
214
+ exportAs: ["matSortHeader"]
215
+ },
216
+ {
217
+ kind: "component",
218
+ type: CheckboxHeaderCellComponent,
219
+ selector: "th[rxap-checkbox-header-cell]"
220
+ },
221
+ {
222
+ kind: "component",
223
+ type: CheckboxCellComponent,
224
+ selector: "td[rxap-checkbox-cell]",
225
+ inputs: ["element"]
226
+ },
227
+ {
228
+ kind: "ngmodule",
229
+ type: MatFormFieldModule
230
+ },
231
+ {
232
+ kind: "component",
233
+ type: i4.MatFormField,
234
+ selector: "mat-form-field",
235
+ inputs: [
236
+ "hideRequiredMarker",
237
+ "color",
238
+ "floatLabel",
239
+ "appearance",
240
+ "subscriptSizing",
241
+ "hintLabel"
242
+ ],
243
+ exportAs: ["matFormField"]
244
+ },
245
+ {
246
+ kind: "directive",
247
+ type: i4.MatLabel,
248
+ selector: "mat-label"
249
+ },
250
+ {
251
+ kind: "directive",
252
+ type: i4.MatSuffix,
253
+ selector: "[matSuffix], [matIconSuffix], [matTextSuffix]",
254
+ inputs: ["matTextSuffix"]
255
+ },
256
+ {
257
+ kind: "ngmodule",
258
+ type: MatInputModule
259
+ },
260
+ {
261
+ kind: "directive",
262
+ type: i5.MatInput,
263
+ selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",
264
+ inputs: [
265
+ "disabled",
266
+ "id",
267
+ "placeholder",
268
+ "name",
269
+ "required",
270
+ "type",
271
+ "errorStateMatcher",
272
+ "aria-describedby",
273
+ "value",
274
+ "readonly",
275
+ "disabledInteractive"
276
+ ],
277
+ exportAs: ["matInput"]
278
+ },
279
+ {
280
+ kind: "ngmodule",
281
+ type: FormsModule
282
+ },
283
+ {
284
+ kind: "directive",
285
+ type: i6.DefaultValueAccessor,
286
+ selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
287
+ },
288
+ {
289
+ kind: "directive",
290
+ type: i6.NgControlStatus,
291
+ selector: "[formControlName],[ngModel],[formControl]"
292
+ },
293
+ {
294
+ kind: "ngmodule",
295
+ type: ReactiveFormsModule
296
+ },
297
+ {
298
+ kind: "directive",
299
+ type: i6.FormControlName,
300
+ selector: "[formControlName]",
301
+ inputs: [
302
+ "formControlName",
303
+ "disabled",
304
+ "ngModel"
305
+ ],
306
+ outputs: ["ngModelChange"]
307
+ },
308
+ {
309
+ kind: "directive",
310
+ type: ParentControlContainerDirective,
311
+ selector: "[formControlName][parentControlContainer],[formControlGroup][parentControlContainer]"
312
+ },
313
+ {
314
+ kind: "ngmodule",
315
+ type: MatButtonModule
316
+ },
317
+ {
318
+ kind: "component",
319
+ type: i7.MatButton,
320
+ selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
321
+ inputs: ["matButton"],
322
+ exportAs: ["matButton", "matAnchor"]
323
+ },
324
+ {
325
+ kind: "component",
326
+ type: i7.MatIconButton,
327
+ selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
328
+ exportAs: ["matButton", "matAnchor"]
329
+ },
330
+ {
331
+ kind: "directive",
332
+ type: InputClearButtonDirective,
333
+ selector: "[rxapInputClearButton]"
334
+ },
335
+ {
336
+ kind: "ngmodule",
337
+ type: MatIconModule
338
+ },
339
+ {
340
+ kind: "component",
341
+ type: i8.MatIcon,
342
+ selector: "mat-icon",
343
+ inputs: [
344
+ "color",
345
+ "inline",
346
+ "svgIcon",
347
+ "fontSet",
348
+ "fontIcon"
349
+ ],
350
+ exportAs: ["matIcon"]
351
+ },
352
+ {
353
+ kind: "component",
354
+ type: DateCellComponent,
355
+ selector: "td[rxap-date-cell]",
356
+ inputs: ["rxap-date-cell", "format"]
357
+ },
358
+ {
359
+ kind: "component",
360
+ type: BooleanCellComponent,
361
+ selector: "td[rxap-boolean-cell]",
362
+ inputs: ["rxap-boolean-cell"]
363
+ },
364
+ {
365
+ kind: "ngmodule",
366
+ type: MatPaginatorModule
367
+ },
368
+ {
369
+ kind: "component",
370
+ type: i9.MatPaginator,
371
+ selector: "mat-paginator",
372
+ inputs: [
373
+ "color",
374
+ "pageIndex",
375
+ "length",
376
+ "pageSize",
377
+ "pageSizeOptions",
378
+ "hidePageSize",
379
+ "showFirstLastButtons",
380
+ "selectConfig",
381
+ "disabled"
382
+ ],
383
+ outputs: ["page"],
384
+ exportAs: ["matPaginator"]
385
+ },
386
+ {
387
+ kind: "directive",
388
+ type: WindowFooterDirective,
389
+ selector: "[rxapWindowFooter]"
390
+ },
391
+ {
392
+ kind: "directive",
393
+ type: FormFieldNoPaddingDirective,
394
+ selector: "mat-form-field[rxapNoPadding]"
395
+ },
396
+ {
397
+ kind: "pipe",
398
+ type: AsyncPipe,
399
+ name: "async"
400
+ },
401
+ {
402
+ kind: "pipe",
403
+ type: KeyValuePipe,
404
+ name: "keyvalue"
405
+ },
406
+ {
407
+ kind: "pipe",
408
+ type: GetFromObjectPipe,
409
+ name: "getFromObject"
410
+ }
411
+ ],
412
+ animations: [RowAnimation],
413
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
414
+ });
415
+ }
416
+ };
417
+ i0.ɵɵngDeclareClassMetadata({
418
+ minVersion: "12.0.0",
419
+ version: "22.3.0",
420
+ ngImport: i0,
421
+ type: TableSelectWindowComponent,
422
+ decorators: [{
423
+ type: Component,
424
+ args: [{
425
+ selector: "rxap-table-select-window",
426
+ changeDetection: ChangeDetectionStrategy.OnPush,
427
+ animations: [RowAnimation],
428
+ providers: [SelectRowService, TableFilterService],
429
+ imports: [
430
+ MatProgressBarModule,
431
+ MatTableModule,
432
+ TableDataSourceDirective,
433
+ FilterHeaderRowDirective,
434
+ MatSortModule,
435
+ CheckboxHeaderCellComponent,
436
+ CheckboxCellComponent,
437
+ MatFormFieldModule,
438
+ MatInputModule,
439
+ FormsModule,
440
+ ReactiveFormsModule,
441
+ ParentControlContainerDirective,
442
+ MatButtonModule,
443
+ InputClearButtonDirective,
444
+ MatIconModule,
445
+ DateCellComponent,
446
+ BooleanCellComponent,
447
+ MatPaginatorModule,
448
+ WindowFooterDirective,
449
+ AsyncPipe,
450
+ KeyValuePipe,
451
+ GetFromObjectPipe,
452
+ FormFieldNoPaddingDirective
453
+ ],
454
+ template: "@if (tableDataSourceDirective.loading$ | async) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n}\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 @if (data.multiple) {\n <ng-container 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\n @if (hasSomeFilterColumn) {\n @if (data.multiple) {\n <ng-container [matColumnDef]=\"'filter__select'\">\n <th *matHeaderCellDef mat-header-cell></th>\n </ng-container>\n }\n @for (item of data.columns | keyvalue; track item) {\n @if (item.value.filter) {\n @switch (item.value.type) {\n @case ('date') {\n <ng-container [matColumnDef]=\"'filter__' + item.key\">\n <th *matHeaderCellDef mat-header-cell>\n </th>\n </ng-container>\n }\n @case ('boolean') {\n <ng-container [matColumnDef]=\"'filter__' + item.key\">\n <th *matHeaderCellDef mat-header-cell>\n </th>\n </ng-container>\n }\n @default {\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 }\n }\n @if (!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 }\n }\n }\n\n @for (item of data.columns | keyvalue; track item) {\n @switch (item.value.type) {\n @case ('date') {\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 @case ('boolean') {\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 @default {\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 }\n }\n\n @if (hasSomeFilterColumn) {\n <tr\n *matHeaderRowDef=\"filterDisplayColumns\"\n class=\"filter-header\"\n mat-header-row\n ></tr>\n }\n\n @if (data.showHeader) {\n <tr\n *matHeaderRowDef=\"displayColumns\"\n mat-header-row\n ></tr>\n }\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 @if (data.multiple) {\n <button (click)=\"select()\" [disabled]=\"hasNotSelected$ | async\" class=\"grow-0\" mat-raised-button\n type=\"button\">\n <ng-container i18n>Select</ng-container>\n </button>\n }\n @if (!data.multiple) {\n <span class=\"hint\" i18n>Click on a row to select an entry.</span>\n }\n </div>\n</ng-template>\n",
455
+ 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"]
456
+ }]
457
+ }],
458
+ ctorParameters: () => []
459
+ });
460
+ var MockWindowRef = class extends Subject {
461
+ constructor() {
462
+ super(...arguments);
463
+ this.closed$ = new Subject();
464
+ this.footerPortal$ = new ReplaySubject(1);
465
+ }
466
+ close(result) {
467
+ this.closed$.next(result);
468
+ if (result !== void 0) this.next(result);
469
+ this.complete();
470
+ }
471
+ complete() {
472
+ super.complete();
473
+ }
474
+ setFooterPortal(portal) {
475
+ setTimeout(() => {
476
+ this.footerPortal$.next(portal);
477
+ });
478
+ }
479
+ };
480
+ var WindowTestWrapperComponent = class WindowTestWrapperComponent {
481
+ constructor() {
482
+ this.component = input.required(...ngDevMode ? [{ debugName: "component" }] : /* istanbul ignore next */ []);
483
+ this.content = null;
484
+ this.footer = null;
485
+ this.injector = inject(INJECTOR);
486
+ this.viewContainerRef = this.injector.get(ViewContainerRef);
487
+ this.portalOutlet = viewChildren(CdkPortalOutlet, ...ngDevMode ? [{ debugName: "portalOutlet" }] : /* istanbul ignore next */ []);
488
+ }
489
+ ngAfterViewInit() {
490
+ this.portalOutlet().forEach((outlet) => {
491
+ outlet.attached.pipe(tap$1((attachedRef) => {
492
+ if (attachedRef instanceof ComponentRef) console.log("ComponentRef", attachedRef);
493
+ else if (attachedRef instanceof ViewRef) console.log("viewRef", attachedRef);
494
+ else console.log("attachedRef", attachedRef);
495
+ })).subscribe();
496
+ });
497
+ const windowRef = new MockWindowRef();
498
+ const injector = Injector.create({
499
+ parent: this.injector,
500
+ providers: [{
501
+ provide: RXAP_WINDOW_REF,
502
+ useValue: windowRef
503
+ }]
504
+ });
505
+ windowRef.footerPortal$.pipe(tap$1((portal) => this.footer = portal)).subscribe();
506
+ this.content = new ComponentPortal(this.component(), this.viewContainerRef, injector);
507
+ }
508
+ static {
509
+ this.ɵfac = i0.ɵɵngDeclareFactory({
510
+ minVersion: "12.0.0",
511
+ version: "22.3.0",
512
+ ngImport: i0,
513
+ type: WindowTestWrapperComponent,
514
+ deps: [],
515
+ target: i0.ɵɵFactoryTarget.Component
516
+ });
517
+ }
518
+ static {
519
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
520
+ minVersion: "17.2.0",
521
+ version: "22.3.0",
522
+ type: WindowTestWrapperComponent,
523
+ isStandalone: true,
524
+ selector: "ng-component",
525
+ inputs: { component: {
526
+ classPropertyName: "component",
527
+ publicName: "component",
528
+ isSignal: true,
529
+ isRequired: true,
530
+ transformFunction: null
531
+ } },
532
+ viewQueries: [{
533
+ propertyName: "portalOutlet",
534
+ predicate: CdkPortalOutlet,
535
+ descendants: true,
536
+ isSignal: true
537
+ }],
538
+ ngImport: i0,
539
+ template: `
185
540
  <div class="flex flex-col gap-8">
186
541
  <div class="grow">
187
542
  <ng-template [cdkPortalOutlet]="content"></ng-template>
@@ -191,12 +546,32 @@ class WindowTestWrapperComponent {
191
546
  <ng-template [cdkPortalOutlet]="footer"></ng-template>
192
547
  </div>
193
548
  </div>
194
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }] }); }
195
- }
196
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: WindowTestWrapperComponent, decorators: [{
197
- type: Component,
198
- args: [{
199
- template: `
549
+ `,
550
+ isInline: true,
551
+ dependencies: [{
552
+ kind: "ngmodule",
553
+ type: PortalModule
554
+ }, {
555
+ kind: "directive",
556
+ type: i1.CdkPortalOutlet,
557
+ selector: "[cdkPortalOutlet]",
558
+ inputs: ["cdkPortalOutlet"],
559
+ outputs: ["attached"],
560
+ exportAs: ["cdkPortalOutlet"]
561
+ }],
562
+ changeDetection: i0.ChangeDetectionStrategy.Eager
563
+ });
564
+ }
565
+ };
566
+ i0.ɵɵngDeclareClassMetadata({
567
+ minVersion: "12.0.0",
568
+ version: "22.3.0",
569
+ ngImport: i0,
570
+ type: WindowTestWrapperComponent,
571
+ decorators: [{
572
+ type: Component,
573
+ args: [{
574
+ template: `
200
575
  <div class="flex flex-col gap-8">
201
576
  <div class="grow">
202
577
  <ng-template [cdkPortalOutlet]="content"></ng-template>
@@ -207,607 +582,983 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
207
582
  </div>
208
583
  </div>
209
584
  `,
210
- imports: [
211
- PortalModule
212
- ]
213
- }]
214
- }], propDecorators: { component: [{ type: i0.Input, args: [{ isSignal: true, alias: "component", required: true }] }], portalOutlet: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => CdkPortalOutlet), { isSignal: true }] }] } });
215
-
216
- class TableSelectInputComponent extends ControlValueAccessor {
217
- static { this.nextId = 0; }
218
- get empty() {
219
- return this._value() === null;
220
- }
221
- get shouldLabelFloat() {
222
- return this.focused || !this.empty;
223
- }
224
- get required() {
225
- return this.requiredInput();
226
- }
227
- get disabled() { return this._disabled(); }
228
- get errorState() {
229
- return this.ngControl?.invalid || false;
230
- }
231
- get placeholder() {
232
- return this.placeholderInput();
233
- }
234
- set value(value) {
235
- this._value.set(value);
236
- }
237
- get value() {
238
- return this._value();
239
- }
240
- constructor() {
241
- super();
242
- this.ngControl = inject(NgControl, { optional: true, self: true });
243
- this.id = `rxap-table-select-input-${TableSelectInputComponent.nextId++}`;
244
- this.stateChanges = new Subject();
245
- this.control = null;
246
- this.rxapControl = null;
247
- this.focused = false;
248
- this.requiredInput = input(false, { ...(ngDevMode ? { debugName: "requiredInput" } : /* istanbul ignore next */ {}), alias: 'required', transform: booleanAttribute });
249
- this.disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled', transform: booleanAttribute });
250
- this._disabled = linkedSignal(() => this.disabledInput(), ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
251
- this._subscription = new Subscription();
252
- this._value = signal(null, ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
253
- this.placeholderInput = input('', { ...(ngDevMode ? { debugName: "placeholderInput" } : /* istanbul ignore next */ {}), alias: 'placeholder' });
254
- this._display = signal(undefined, ...(ngDevMode ? [{ debugName: "_display" }] : /* istanbul ignore next */ []));
255
- // Replace the provider from above with this.
256
- if (this.ngControl != null) {
257
- // Setting the value accessor directly (instead of using
258
- // the providers) to avoid running into a circular import.
259
- this.ngControl.valueAccessor = this;
260
- }
261
- effect(() => {
262
- this.requiredInput();
263
- this._disabled();
264
- this.placeholderInput();
265
- this._value();
266
- this.stateChanges.next();
267
- });
268
- afterNextRender(() => this.initControl());
269
- }
270
- get display() {
271
- return this._display();
272
- }
273
- set display(value) {
274
- this._display.set(value);
275
- }
276
- writeValue(value) {
277
- this.value = value;
278
- }
279
- setValue(value) {
280
- this.value = value;
281
- if (this.onChange) {
282
- this.onChange(this.value);
283
- }
284
- }
285
- initControl() {
286
- if (this.ngControl) {
287
- this.control = this.ngControl.control;
288
- if (this.control instanceof RxapFormControl) {
289
- this.rxapControl = this.control;
290
- }
291
- }
292
- this._subscription.add(this.control?.valueChanges.pipe(startWith(this.control?.value ?? null), delay(100), // TODO : remove timing workaround
293
- // the toDisplay function of this component is replaced by the TableSelectControlDirective
294
- // after the form field was initialized. The delay ensures the the this.toDisplay function
295
- // is called after that replacement else for the first value the default implementation is used
296
- tap$1(async (value) => this.display = value === null ? '' : await this.toDisplay(value))).subscribe());
297
- this._subscription.add(this.rxapControl?.disabled$.pipe(tap$1(disabled => this._disabled.set(disabled))).subscribe());
298
- }
299
- toDisplay(value) {
300
- return value;
301
- }
302
- ngOnDestroy() {
303
- this.stateChanges.complete();
304
- this._subscription?.unsubscribe();
305
- }
306
- setDescribedByIds(ids) {
307
- // no op
308
- }
309
- onContainerClick(event) {
310
- // no op
311
- }
312
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableSelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
313
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: TableSelectInputComponent, isStandalone: true, selector: "rxap-table-select-input", inputs: { requiredInput: { classPropertyName: "requiredInput", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, placeholderInput: { classPropertyName: "placeholderInput", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "id": "id", "class.floating": "shouldLabelFloat" } }, providers: [
314
- {
315
- provide: MatFormFieldControl,
316
- useExisting: forwardRef(() => TableSelectInputComponent),
317
- },
318
- ], usesInheritance: true, ngImport: i0, template: "<div [ngClass]=\"{ disabled: disabled }\" class=\"mat-select-trigger\">\n @if (display || placeholder) {\n <span>{{display ?? placeholder}}</span>\n }\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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
319
- }
320
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableSelectInputComponent, decorators: [{
321
- type: Component,
322
- args: [{ selector: 'rxap-table-select-input', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
323
- {
324
- provide: MatFormFieldControl,
325
- useExisting: forwardRef(() => TableSelectInputComponent),
326
- },
327
- ], host: {
328
- '[id]': 'id',
329
- '[class.floating]': 'shouldLabelFloat',
330
- }, imports: [NgClass], template: "<div [ngClass]=\"{ disabled: disabled }\" class=\"mat-select-trigger\">\n @if (display || placeholder) {\n <span>{{display ?? placeholder}}</span>\n }\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"] }]
331
- }], ctorParameters: () => [], propDecorators: { requiredInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], placeholderInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }] } });
332
-
585
+ changeDetection: ChangeDetectionStrategy.Eager,
586
+ imports: [PortalModule]
587
+ }]
588
+ }],
589
+ propDecorators: {
590
+ component: [{
591
+ type: i0.Input,
592
+ args: [{
593
+ isSignal: true,
594
+ alias: "component",
595
+ required: true
596
+ }]
597
+ }],
598
+ portalOutlet: [{
599
+ type: i0.ViewChildren,
600
+ args: [i0.forwardRef(() => CdkPortalOutlet), { isSignal: true }]
601
+ }]
602
+ }
603
+ });
604
+ var TableSelectInputComponent = class TableSelectInputComponent extends ControlValueAccessor {
605
+ static {
606
+ this.nextId = 0;
607
+ }
608
+ get empty() {
609
+ return this._value() === null;
610
+ }
611
+ get shouldLabelFloat() {
612
+ return this.focused || !this.empty;
613
+ }
614
+ get required() {
615
+ return this.requiredInput();
616
+ }
617
+ get disabled() {
618
+ return this._disabled();
619
+ }
620
+ get errorState() {
621
+ return this.ngControl?.invalid || false;
622
+ }
623
+ get placeholder() {
624
+ return this.placeholderInput();
625
+ }
626
+ set value(value) {
627
+ this._value.set(value);
628
+ }
629
+ get value() {
630
+ return this._value();
631
+ }
632
+ constructor() {
633
+ super();
634
+ this.ngControl = inject(NgControl, {
635
+ optional: true,
636
+ self: true
637
+ });
638
+ this.id = `rxap-table-select-input-${TableSelectInputComponent.nextId++}`;
639
+ this.stateChanges = new Subject();
640
+ this.control = null;
641
+ this.rxapControl = null;
642
+ this.focused = false;
643
+ this.requiredInput = input(false, {
644
+ ...ngDevMode ? { debugName: "requiredInput" } : /* istanbul ignore next */ {},
645
+ alias: "required",
646
+ transform: booleanAttribute
647
+ });
648
+ this.disabledInput = input(false, {
649
+ ...ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {},
650
+ alias: "disabled",
651
+ transform: booleanAttribute
652
+ });
653
+ this._disabled = linkedSignal(() => this.disabledInput(), ...ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []);
654
+ this._subscription = new Subscription();
655
+ this._value = signal(null, ...ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []);
656
+ this.placeholderInput = input("", {
657
+ ...ngDevMode ? { debugName: "placeholderInput" } : /* istanbul ignore next */ {},
658
+ alias: "placeholder"
659
+ });
660
+ this._display = signal(void 0, ...ngDevMode ? [{ debugName: "_display" }] : /* istanbul ignore next */ []);
661
+ if (this.ngControl != null) this.ngControl.valueAccessor = this;
662
+ effect(() => {
663
+ this.requiredInput();
664
+ this._disabled();
665
+ this.placeholderInput();
666
+ this._value();
667
+ this.stateChanges.next();
668
+ });
669
+ afterNextRender(() => this.initControl());
670
+ }
671
+ get display() {
672
+ return this._display();
673
+ }
674
+ set display(value) {
675
+ this._display.set(value);
676
+ }
677
+ writeValue(value) {
678
+ this.value = value;
679
+ }
680
+ setValue(value) {
681
+ this.value = value;
682
+ if (this.onChange) this.onChange(this.value);
683
+ }
684
+ initControl() {
685
+ if (this.ngControl) {
686
+ this.control = this.ngControl.control;
687
+ if (this.control instanceof RxapFormControl) this.rxapControl = this.control;
688
+ }
689
+ this._subscription.add(this.control?.valueChanges.pipe(startWith(this.control?.value ?? null), delay(100), tap(async (value) => this.display = value === null ? "" : await this.toDisplay(value))).subscribe());
690
+ this._subscription.add(this.rxapControl?.disabled$.pipe(tap((disabled) => this._disabled.set(disabled))).subscribe());
691
+ }
692
+ toDisplay(value) {
693
+ return value;
694
+ }
695
+ ngOnDestroy() {
696
+ this.stateChanges.complete();
697
+ this._subscription?.unsubscribe();
698
+ }
699
+ setDescribedByIds(ids) {}
700
+ onContainerClick(event) {}
701
+ static {
702
+ this.ɵfac = i0.ɵɵngDeclareFactory({
703
+ minVersion: "12.0.0",
704
+ version: "22.3.0",
705
+ ngImport: i0,
706
+ type: TableSelectInputComponent,
707
+ deps: [],
708
+ target: i0.ɵɵFactoryTarget.Component
709
+ });
710
+ }
711
+ static {
712
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
713
+ minVersion: "17.0.0",
714
+ version: "22.3.0",
715
+ type: TableSelectInputComponent,
716
+ isStandalone: true,
717
+ selector: "rxap-table-select-input",
718
+ inputs: {
719
+ requiredInput: {
720
+ classPropertyName: "requiredInput",
721
+ publicName: "required",
722
+ isSignal: true,
723
+ isRequired: false,
724
+ transformFunction: null
725
+ },
726
+ disabledInput: {
727
+ classPropertyName: "disabledInput",
728
+ publicName: "disabled",
729
+ isSignal: true,
730
+ isRequired: false,
731
+ transformFunction: null
732
+ },
733
+ placeholderInput: {
734
+ classPropertyName: "placeholderInput",
735
+ publicName: "placeholder",
736
+ isSignal: true,
737
+ isRequired: false,
738
+ transformFunction: null
739
+ }
740
+ },
741
+ host: { properties: {
742
+ "id": "id",
743
+ "class.floating": "shouldLabelFloat"
744
+ } },
745
+ providers: [{
746
+ provide: MatFormFieldControl,
747
+ useExisting: forwardRef(() => TableSelectInputComponent)
748
+ }],
749
+ usesInheritance: true,
750
+ ngImport: i0,
751
+ template: "<div [ngClass]=\"{ disabled: disabled }\" class=\"mat-select-trigger\">\n @if (display || placeholder) {\n <span>{{display ?? placeholder}}</span>\n }\n</div>\n",
752
+ 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"],
753
+ dependencies: [{
754
+ kind: "directive",
755
+ type: NgClass,
756
+ selector: "[ngClass]",
757
+ inputs: ["class", "ngClass"]
758
+ }],
759
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
760
+ });
761
+ }
762
+ };
763
+ i0.ɵɵngDeclareClassMetadata({
764
+ minVersion: "12.0.0",
765
+ version: "22.3.0",
766
+ ngImport: i0,
767
+ type: TableSelectInputComponent,
768
+ decorators: [{
769
+ type: Component,
770
+ args: [{
771
+ selector: "rxap-table-select-input",
772
+ changeDetection: ChangeDetectionStrategy.OnPush,
773
+ providers: [{
774
+ provide: MatFormFieldControl,
775
+ useExisting: forwardRef(() => TableSelectInputComponent)
776
+ }],
777
+ host: {
778
+ "[id]": "id",
779
+ "[class.floating]": "shouldLabelFloat"
780
+ },
781
+ imports: [NgClass],
782
+ template: "<div [ngClass]=\"{ disabled: disabled }\" class=\"mat-select-trigger\">\n @if (display || placeholder) {\n <span>{{display ?? placeholder}}</span>\n }\n</div>\n",
783
+ 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"]
784
+ }]
785
+ }],
786
+ ctorParameters: () => [],
787
+ propDecorators: {
788
+ requiredInput: [{
789
+ type: i0.Input,
790
+ args: [{
791
+ isSignal: true,
792
+ alias: "required",
793
+ required: false
794
+ }]
795
+ }],
796
+ disabledInput: [{
797
+ type: i0.Input,
798
+ args: [{
799
+ isSignal: true,
800
+ alias: "disabled",
801
+ required: false
802
+ }]
803
+ }],
804
+ placeholderInput: [{
805
+ type: i0.Input,
806
+ args: [{
807
+ isSignal: true,
808
+ alias: "placeholder",
809
+ required: false
810
+ }]
811
+ }]
812
+ }
813
+ });
333
814
  function CreateFilterFormProvider(columns) {
334
- const columnNameList = Array.from(columns.entries())
335
- .filter(([key, column]) => column.filter)
336
- .map(([key, column]) => key);
337
- const controls = {};
338
- for (const column of columnNameList) {
339
- controls[column] = new RxapFormControl(null, { controlId: column });
340
- }
341
- const form = {
342
- ...controls,
343
- rxapFormGroup: new RxapFormGroup(controls, { controlId: 'filter' }),
344
- rxapMetadata: { controlId: 'filter' },
345
- };
346
- Reflect.set(form.rxapFormGroup, '_rxapFormDefinition', form);
347
- return {
348
- provide: RXAP_TABLE_FILTER_FORM_DEFINITION,
349
- useValue: form,
350
- };
815
+ const columnNameList = Array.from(columns.entries()).filter(([key, column]) => column.filter).map(([key, column]) => key);
816
+ const controls = {};
817
+ for (const column of columnNameList) controls[column] = new RxapFormControl(null, { controlId: column });
818
+ const form = {
819
+ ...controls,
820
+ rxapFormGroup: new RxapFormGroup(controls, { controlId: "filter" }),
821
+ rxapMetadata: { controlId: "filter" }
822
+ };
823
+ Reflect.set(form.rxapFormGroup, "_rxapFormDefinition", form);
824
+ return {
825
+ provide: RXAP_TABLE_FILTER_FORM_DEFINITION,
826
+ useValue: form
827
+ };
351
828
  }
352
-
353
- const TABLE_SELECT_COLUMN_MAP = 'TABLE_SELECT_COLUMN_MAP';
354
- const TABLE_SELECT_TO_DISPLAY = 'TABLE_SELECT_TO_DISPLAY';
355
- const TABLE_SELECT_TO_VALUE = 'TABLE_SELECT_TO_VALUE';
356
- const TABLE_SELECT_METHOD = 'TABLE_SELECT_METHOD';
357
- const TABLE_SELECT_DATA_SOURCE = 'TABLE_SELECT_DATA_SOURCE';
829
+ const TABLE_SELECT_COLUMN_MAP = "TABLE_SELECT_COLUMN_MAP";
830
+ const TABLE_SELECT_TO_DISPLAY = "TABLE_SELECT_TO_DISPLAY";
831
+ const TABLE_SELECT_TO_VALUE = "TABLE_SELECT_TO_VALUE";
832
+ const TABLE_SELECT_METHOD = "TABLE_SELECT_METHOD";
833
+ const TABLE_SELECT_DATA_SOURCE = "TABLE_SELECT_DATA_SOURCE";
358
834
  function UseTableSelectColumns(columnMap) {
359
- return function (target, propertyKey) {
360
- setMetadataMap(propertyKey, columnMap, TABLE_SELECT_COLUMN_MAP, target);
361
- };
835
+ return function(target, propertyKey) {
836
+ setMetadataMap(propertyKey, columnMap, TABLE_SELECT_COLUMN_MAP, target);
837
+ };
362
838
  }
363
839
  function UseTableSelectDataSource(dataSource, settings) {
364
- return UseDataSource(dataSource, TABLE_SELECT_DATA_SOURCE, settings);
840
+ return UseDataSource(dataSource, TABLE_SELECT_DATA_SOURCE, settings);
365
841
  }
366
842
  function UseTableSelectToDisplay(toDisplay) {
367
- return function (target, propertyKey) {
368
- setMetadataMap(propertyKey, toDisplay, TABLE_SELECT_TO_DISPLAY, target);
369
- };
843
+ return function(target, propertyKey) {
844
+ setMetadataMap(propertyKey, toDisplay, TABLE_SELECT_TO_DISPLAY, target);
845
+ };
370
846
  }
371
847
  function UseTableSelectToValue(toValue) {
372
- return function (target, propertyKey) {
373
- setMetadataMap(propertyKey, toValue, TABLE_SELECT_TO_VALUE, target);
374
- };
848
+ return function(target, propertyKey) {
849
+ setMetadataMap(propertyKey, toValue, TABLE_SELECT_TO_VALUE, target);
850
+ };
375
851
  }
376
852
  function UseTableSelectMethod(method) {
377
- return function (target, propertyKey) {
378
- setMetadataMap(propertyKey, method, TABLE_SELECT_METHOD, target);
379
- };
853
+ return function(target, propertyKey) {
854
+ setMetadataMap(propertyKey, method, TABLE_SELECT_METHOD, target);
855
+ };
380
856
  }
381
-
382
857
  let ExtractTableSelectColumnMapMixin = class ExtractTableSelectColumnMapMixin {
383
- extractTableSelectColumnMap(control = this.extractControl(), formDefinition = this.extractFormDefinition(control)) {
384
- const map = getMetadata(TABLE_SELECT_COLUMN_MAP, Object.getPrototypeOf(formDefinition));
385
- if (!map) {
386
- throw new RxapFormSystemError('Could not extract the use data source map from the form definition instance', '');
387
- }
388
- if (!map.has(control.controlId)) {
389
- throw new RxapFormSystemError('A use data source definition does not exists in the form definition metadata', '');
390
- }
391
- return map.get(control.controlId);
392
- }
858
+ extractTableSelectColumnMap(control = this.extractControl(), formDefinition = this.extractFormDefinition(control)) {
859
+ const map = getMetadata(TABLE_SELECT_COLUMN_MAP, Object.getPrototypeOf(formDefinition));
860
+ if (!map) throw new RxapFormSystemError("Could not extract the use data source map from the form definition instance", "");
861
+ if (!map.has(control.controlId)) throw new RxapFormSystemError("A use data source definition does not exists in the form definition metadata", "");
862
+ return map.get(control.controlId);
863
+ }
393
864
  };
394
- ExtractTableSelectColumnMapMixin = __decorate([
395
- Mixin(ExtractFormDefinitionMixin, ExtractControlMixin)
396
- ], ExtractTableSelectColumnMapMixin);
397
-
865
+ ExtractTableSelectColumnMapMixin = __decorate([Mixin(ExtractFormDefinitionMixin, ExtractControlMixin)], ExtractTableSelectColumnMapMixin);
398
866
  let ExtractTableSelectDataSourceMixin = class ExtractTableSelectDataSourceMixin {
399
- extractTableSelectDataSource() {
400
- return this.extractDatasource(TABLE_SELECT_DATA_SOURCE);
401
- }
867
+ extractTableSelectDataSource() {
868
+ return this.extractDatasource(TABLE_SELECT_DATA_SOURCE);
869
+ }
402
870
  };
403
- ExtractTableSelectDataSourceMixin = __decorate([
404
- Mixin(ExtractDatasourceMixin)
405
- ], ExtractTableSelectDataSourceMixin);
406
-
871
+ ExtractTableSelectDataSourceMixin = __decorate([Mixin(ExtractDatasourceMixin)], ExtractTableSelectDataSourceMixin);
407
872
  let ExtractTableSelectToDisplayMixin = class ExtractTableSelectToDisplayMixin {
408
- extractTableSelectToDisplay(control = this.extractControl(), formDefinition = this.extractFormDefinition(control)) {
409
- const map = getMetadata(TABLE_SELECT_TO_DISPLAY, Object.getPrototypeOf(formDefinition));
410
- if (!map) {
411
- throw new RxapFormSystemError('Could not extract the use data source map from the form definition instance', '');
412
- }
413
- if (!map.has(control.controlId)) {
414
- throw new RxapFormSystemError('A use data source definition does not exists in the form definition metadata', '');
415
- }
416
- return map.get(control.controlId);
417
- }
873
+ extractTableSelectToDisplay(control = this.extractControl(), formDefinition = this.extractFormDefinition(control)) {
874
+ const map = getMetadata(TABLE_SELECT_TO_DISPLAY, Object.getPrototypeOf(formDefinition));
875
+ if (!map) throw new RxapFormSystemError("Could not extract the use data source map from the form definition instance", "");
876
+ if (!map.has(control.controlId)) throw new RxapFormSystemError("A use data source definition does not exists in the form definition metadata", "");
877
+ return map.get(control.controlId);
878
+ }
418
879
  };
419
- ExtractTableSelectToDisplayMixin = __decorate([
420
- Mixin(ExtractFormDefinitionMixin, ExtractControlMixin)
421
- ], ExtractTableSelectToDisplayMixin);
422
-
880
+ ExtractTableSelectToDisplayMixin = __decorate([Mixin(ExtractFormDefinitionMixin, ExtractControlMixin)], ExtractTableSelectToDisplayMixin);
423
881
  let ExtractTableSelectToValueMixin = class ExtractTableSelectToValueMixin {
424
- extractTableSelectToValue(control = this.extractControl(), formDefinition = this.extractFormDefinition(control)) {
425
- const map = getMetadata(TABLE_SELECT_TO_VALUE, Object.getPrototypeOf(formDefinition));
426
- if (!map) {
427
- throw new RxapFormSystemError('Could not extract the use data source map from the form definition instance', '');
428
- }
429
- if (!map.has(control.controlId)) {
430
- throw new RxapFormSystemError('A use data source definition does not exists in the form definition metadata', '');
431
- }
432
- return map.get(control.controlId);
433
- }
882
+ extractTableSelectToValue(control = this.extractControl(), formDefinition = this.extractFormDefinition(control)) {
883
+ const map = getMetadata(TABLE_SELECT_TO_VALUE, Object.getPrototypeOf(formDefinition));
884
+ if (!map) throw new RxapFormSystemError("Could not extract the use data source map from the form definition instance", "");
885
+ if (!map.has(control.controlId)) throw new RxapFormSystemError("A use data source definition does not exists in the form definition metadata", "");
886
+ return map.get(control.controlId);
887
+ }
434
888
  };
435
- ExtractTableSelectToValueMixin = __decorate([
436
- Mixin(ExtractFormDefinitionMixin, ExtractControlMixin)
437
- ], ExtractTableSelectToValueMixin);
438
-
439
- class OpenTableSelectWindowMethod {
440
- constructor() {
441
- this.windowService = inject(WindowService);
442
- this.injector = inject(INJECTOR);
443
- }
444
- async call(parameters) {
445
- const providers = [
446
- {
447
- provide: RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS,
448
- useValue: {
449
- multiple: parameters.multiple ?? false,
450
- selected: parameters.selected ?? [],
451
- compareWith: parameters.compareWith,
452
- },
453
- },
454
- ];
455
- if (Array.isArray(parameters.data)) {
456
- providers.push({
457
- provide: TABLE_DATA_SOURCE,
458
- useValue: new TableDataSource(staticDataSource(parameters.data)),
459
- });
460
- }
461
- else if (parameters.data instanceof AbstractTableDataSource) {
462
- providers.push({
463
- provide: TABLE_DATA_SOURCE,
464
- useValue: parameters.data,
465
- });
466
- }
467
- else {
468
- providers.push({
469
- provide: TABLE_DATA_SOURCE,
470
- useValue: new TableDataSource(parameters.data),
471
- });
472
- }
473
- providers.push({
474
- provide: RXAP_TABLE_METHOD,
475
- useValue: null,
476
- });
477
- providers.push({
478
- provide: TABLE_REMOTE_METHOD_ADAPTER_FACTORY,
479
- useValue: null,
480
- });
481
- providers.push({
482
- provide: RXAP_TABLE_FILTER,
483
- useValue: null,
484
- });
485
- providers.push({
486
- provide: RXAP_WINDOW_SETTINGS,
487
- useValue: null,
488
- });
489
- providers.push(this.createFilterForm(parameters.columns));
490
- const windowRef = this.windowService.open({
491
- ...parameters.windowConfig,
492
- viewContainerRef: parameters.viewContainerRef,
493
- injector: Injector.create({
494
- parent: parameters.injector ?? this.injector,
495
- providers,
496
- }),
497
- title: parameters.title ?? $localize `Select`,
498
- data: parameters,
499
- component: TableSelectWindowComponent,
500
- });
501
- return new Promise((resolve, reject) => {
502
- windowRef.subscribe({
503
- next: data => resolve(data ?? []),
504
- error: error => reject(error),
505
- complete: () => resolve([]),
506
- });
507
- });
508
- }
509
- createFilterForm(columns) {
510
- return CreateFilterFormProvider(columns);
511
- }
512
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenTableSelectWindowMethod, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
513
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenTableSelectWindowMethod }); }
514
- }
515
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenTableSelectWindowMethod, decorators: [{
516
- type: Injectable
517
- }] });
518
-
889
+ ExtractTableSelectToValueMixin = __decorate([Mixin(ExtractFormDefinitionMixin, ExtractControlMixin)], ExtractTableSelectToValueMixin);
890
+ var OpenTableSelectWindowMethod = class OpenTableSelectWindowMethod {
891
+ constructor() {
892
+ this.windowService = inject(WindowService);
893
+ this.injector = inject(INJECTOR);
894
+ }
895
+ async call(parameters) {
896
+ const providers = [{
897
+ provide: RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS,
898
+ useValue: {
899
+ multiple: parameters.multiple ?? false,
900
+ selected: parameters.selected ?? [],
901
+ compareWith: parameters.compareWith
902
+ }
903
+ }];
904
+ if (Array.isArray(parameters.data)) providers.push({
905
+ provide: TABLE_DATA_SOURCE,
906
+ useValue: new TableDataSource(staticDataSource(parameters.data))
907
+ });
908
+ else if (parameters.data instanceof AbstractTableDataSource) providers.push({
909
+ provide: TABLE_DATA_SOURCE,
910
+ useValue: parameters.data
911
+ });
912
+ else providers.push({
913
+ provide: TABLE_DATA_SOURCE,
914
+ useValue: new TableDataSource(parameters.data)
915
+ });
916
+ providers.push({
917
+ provide: RXAP_TABLE_METHOD,
918
+ useValue: null
919
+ });
920
+ providers.push({
921
+ provide: TABLE_REMOTE_METHOD_ADAPTER_FACTORY,
922
+ useValue: null
923
+ });
924
+ providers.push({
925
+ provide: RXAP_TABLE_FILTER,
926
+ useValue: null
927
+ });
928
+ providers.push({
929
+ provide: RXAP_WINDOW_SETTINGS,
930
+ useValue: null
931
+ });
932
+ providers.push(this.createFilterForm(parameters.columns));
933
+ const windowRef = this.windowService.open({
934
+ ...parameters.windowConfig,
935
+ viewContainerRef: parameters.viewContainerRef,
936
+ injector: Injector.create({
937
+ parent: parameters.injector ?? this.injector,
938
+ providers
939
+ }),
940
+ title: parameters.title ?? $localize`Select`,
941
+ data: parameters,
942
+ component: TableSelectWindowComponent
943
+ });
944
+ return new Promise((resolve, reject) => {
945
+ windowRef.subscribe({
946
+ next: (data) => resolve(data ?? []),
947
+ error: (error) => reject(error),
948
+ complete: () => resolve([])
949
+ });
950
+ });
951
+ }
952
+ createFilterForm(columns) {
953
+ return CreateFilterFormProvider(columns);
954
+ }
955
+ static {
956
+ this.ɵfac = i0.ɵɵngDeclareFactory({
957
+ minVersion: "12.0.0",
958
+ version: "22.3.0",
959
+ ngImport: i0,
960
+ type: OpenTableSelectWindowMethod,
961
+ deps: [],
962
+ target: i0.ɵɵFactoryTarget.Injectable
963
+ });
964
+ }
965
+ static {
966
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
967
+ minVersion: "12.0.0",
968
+ version: "22.3.0",
969
+ ngImport: i0,
970
+ type: OpenTableSelectWindowMethod
971
+ });
972
+ }
973
+ };
974
+ i0.ɵɵngDeclareClassMetadata({
975
+ minVersion: "12.0.0",
976
+ version: "22.3.0",
977
+ ngImport: i0,
978
+ type: OpenTableSelectWindowMethod,
979
+ decorators: [{ type: Injectable }]
980
+ });
519
981
  let OpenTableSelectWindowDirective = class OpenTableSelectWindowDirective {
520
- constructor() {
521
- this.dataInput = input(undefined, { ...(ngDevMode ? { debugName: "dataInput" } : /* istanbul ignore next */ {}), alias: 'data' });
522
- this.data = linkedSignal(() => this.dataInput(), ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
523
- this.columnsInput = input(undefined, { ...(ngDevMode ? { debugName: "columnsInput" } : /* istanbul ignore next */ {}), alias: 'columns' });
524
- this.columns = linkedSignal(() => this.columnsInput(), ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
525
- this.selectedInput = input([], { ...(ngDevMode ? { debugName: "selectedInput" } : /* istanbul ignore next */ {}), alias: 'selected' });
526
- this.selected = linkedSignal(() => this.selectedInput(), ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
527
- this.parameters = input(...(ngDevMode ? [undefined, { debugName: "parameters" }] : /* istanbul ignore next */ []));
528
- this.selectedChange = output();
529
- this.labelInput = input(undefined, { ...(ngDevMode ? { debugName: "labelInput" } : /* istanbul ignore next */ {}), alias: 'label' });
530
- this.label = linkedSignal(() => this.labelInput(), ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
531
- this.id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
532
- this._internalId = GenerateRandomString();
533
- this.compareWithInput = input(undefined, { ...(ngDevMode ? { debugName: "compareWithInput" } : /* istanbul ignore next */ {}), alias: 'compareWith' });
534
- this.compareWith = linkedSignal(() => this.compareWithInput(), ...(ngDevMode ? [{ debugName: "compareWith" }] : /* istanbul ignore next */ []));
535
- this.multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
536
- // required for the use mixin ExtractDatasourceMixin
537
- this.dataSourceLoader = inject(DataSourceLoader);
538
- this._hasOpenWindow = false;
539
- this.openMethod = inject(OpenTableSelectWindowMethod);
540
- this.windowService = inject(WindowService);
541
- this.injector = inject(INJECTOR);
542
- this.matButton = inject(MatButton, { optional: true });
543
- this._disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
544
- this.invalidInputs = computed(() => !this.columns() || !this.data(), ...(ngDevMode ? [{ debugName: "invalidInputs" }] : /* istanbul ignore next */ []));
545
- this.disabled = computed(() => this._disabled() || this.invalidInputs(), ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
546
- this.toValueInput = input(undefined, { ...(ngDevMode ? { debugName: "toValueInput" } : /* istanbul ignore next */ {}), alias: 'toValue' });
547
- this.toValue = linkedSignal(() => this.toValueInput(), ...(ngDevMode ? [{ debugName: "toValue" }] : /* istanbul ignore next */ []));
548
- effect(() => {
549
- const data = this.data();
550
- const columns = this.columns();
551
- const disabled = this.disabled();
552
- untracked(() => this.checkInputs(data, columns, disabled));
553
- });
554
- afterNextRender(() => this.initFromFormField());
555
- }
556
- setDisabled(value) {
557
- this._disabled.set(value);
558
- }
559
- ngOnDestroy() {
560
- if (this.windowService.has(this._internalId)) {
561
- this.windowService.close(this._internalId);
562
- }
563
- }
564
- async onClick($event) {
565
- $event.stopPropagation();
566
- if (this.disabled() || this._hasOpenWindow) {
567
- console.debug('disabled or has open window', { disabled: this.disabled(), hasOpenWindow: this._hasOpenWindow });
568
- return;
569
- }
570
- const data = this.data();
571
- const columns = this.columns();
572
- if (!data || !columns) {
573
- throw new Error('FATAL: The data or columns input is not set');
574
- }
575
- this._hasOpenWindow = true;
576
- this.control?.disable();
577
- let selected;
578
- try {
579
- selected = await this.openMethod.call({
580
- windowConfig: {
581
- id: this._internalId,
582
- },
583
- injector: this.injector,
584
- data: data,
585
- columns: columns instanceof Map ? columns : new Map(Object.entries(columns)),
586
- selected: this.selected()?.slice() ?? [],
587
- title: this.label() ?? 'Select value',
588
- compareWith: this.compareWith(),
589
- id: this.id() ?? GenerateRandomString(10),
590
- parameters: this.parameters(),
591
- multiple: this.multiple(),
592
- });
593
- }
594
- finally {
595
- this._hasOpenWindow = false;
596
- this.control?.enable();
597
- }
598
- if (isDevMode()) {
599
- console.debug('selected', selected);
600
- }
601
- this.selected.set(selected ?? []);
602
- const selectedValue = this.selected();
603
- this.selectedChange.emit(selectedValue);
604
- if (selectedValue.length) {
605
- const toValue = this.toValue();
606
- if (toValue) {
607
- this.control?.setValue(toValue(selectedValue[0]));
608
- }
609
- else {
610
- throw new Error('The toValue method is not defined');
611
- }
612
- }
613
- else {
614
- this.control?.reset();
615
- }
616
- }
617
- initFromFormField() {
618
- const hasNgControl = !!this.injector.get(NgControl, null);
619
- const hasMatFormField = !!this.injector.get(MatFormField, null);
620
- if (hasMatFormField || hasNgControl) {
621
- this.matFormField = this.injector.get(MatFormField);
622
- this.ngControl = this.matFormField._control.ngControl;
623
- this.control ??= this.ngControl?.control ?? null;
624
- if (!this.data()) {
625
- this.data.set(this.extractTableSelectDataSource());
626
- }
627
- if (!this.columns()) {
628
- this.columns.set(this.extractTableSelectColumnMap());
629
- }
630
- if (!this.toValue()) {
631
- this.toValue.set(this.extractTableSelectToValue() ?? (value => value));
632
- }
633
- if (this.control) {
634
- this.setDisabled(this.control.disabled);
635
- this.control.registerOnDisabledChange(isDisabled => {
636
- this.setDisabled(isDisabled);
637
- });
638
- }
639
- }
640
- }
641
- checkInputs(data, columns, disabled) {
642
- if (!columns || !data) {
643
- console.warn('columns or data is not defined');
644
- }
645
- else {
646
- if (typeof columns !== 'object') {
647
- throw new Error('Ensure that the input columns has a valid value');
648
- }
649
- if (!Array.isArray(data) && !(data instanceof BaseDataSource)) {
650
- throw new Error('Ensure that the input data has a valid value');
651
- }
652
- }
653
- if (this.matButton) {
654
- this.matButton.disabled = disabled;
655
- }
656
- }
657
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenTableSelectWindowDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
658
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: OpenTableSelectWindowDirective, isStandalone: true, selector: "[rxapOpenTableSelectWindow]", inputs: { dataInput: { classPropertyName: "dataInput", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, columnsInput: { classPropertyName: "columnsInput", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, selectedInput: { classPropertyName: "selectedInput", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, parameters: { classPropertyName: "parameters", publicName: "parameters", isSignal: true, isRequired: false, transformFunction: null }, labelInput: { classPropertyName: "labelInput", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, compareWithInput: { classPropertyName: "compareWithInput", publicName: "compareWith", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, toValueInput: { classPropertyName: "toValueInput", publicName: "toValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedChange: "selectedChange" }, host: { attributes: { "type": "button" }, listeners: { "click": "onClick($event)" }, properties: { "disabled": "disabled()" } }, providers: [OpenTableSelectWindowMethod], ngImport: i0 }); }
982
+ constructor() {
983
+ this.dataInput = input(void 0, {
984
+ ...ngDevMode ? { debugName: "dataInput" } : /* istanbul ignore next */ {},
985
+ alias: "data"
986
+ });
987
+ this.data = linkedSignal(() => this.dataInput(), ...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
988
+ this.columnsInput = input(void 0, {
989
+ ...ngDevMode ? { debugName: "columnsInput" } : /* istanbul ignore next */ {},
990
+ alias: "columns"
991
+ });
992
+ this.columns = linkedSignal(() => this.columnsInput(), ...ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []);
993
+ this.selectedInput = input([], {
994
+ ...ngDevMode ? { debugName: "selectedInput" } : /* istanbul ignore next */ {},
995
+ alias: "selected"
996
+ });
997
+ this.selected = linkedSignal(() => this.selectedInput(), ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
998
+ this.parameters = input(...ngDevMode ? [void 0, { debugName: "parameters" }] : /* istanbul ignore next */ []);
999
+ this.selectedChange = output();
1000
+ this.labelInput = input(void 0, {
1001
+ ...ngDevMode ? { debugName: "labelInput" } : /* istanbul ignore next */ {},
1002
+ alias: "label"
1003
+ });
1004
+ this.label = linkedSignal(() => this.labelInput(), ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
1005
+ this.id = input(...ngDevMode ? [void 0, { debugName: "id" }] : /* istanbul ignore next */ []);
1006
+ this._internalId = GenerateRandomString();
1007
+ this.compareWithInput = input(void 0, {
1008
+ ...ngDevMode ? { debugName: "compareWithInput" } : /* istanbul ignore next */ {},
1009
+ alias: "compareWith"
1010
+ });
1011
+ this.compareWith = linkedSignal(() => this.compareWithInput(), ...ngDevMode ? [{ debugName: "compareWith" }] : /* istanbul ignore next */ []);
1012
+ this.multiple = input(false, ...ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []);
1013
+ this.dataSourceLoader = inject(DataSourceLoader);
1014
+ this._hasOpenWindow = false;
1015
+ this.openMethod = inject(OpenTableSelectWindowMethod);
1016
+ this.windowService = inject(WindowService);
1017
+ this.injector = inject(INJECTOR);
1018
+ this.matButton = inject(MatButton, { optional: true });
1019
+ this._disabled = signal(false, ...ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []);
1020
+ this.invalidInputs = computed(() => !this.columns() || !this.data(), ...ngDevMode ? [{ debugName: "invalidInputs" }] : /* istanbul ignore next */ []);
1021
+ this.disabled = computed(() => this._disabled() || this.invalidInputs(), ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
1022
+ this.toValueInput = input(void 0, {
1023
+ ...ngDevMode ? { debugName: "toValueInput" } : /* istanbul ignore next */ {},
1024
+ alias: "toValue"
1025
+ });
1026
+ this.toValue = linkedSignal(() => this.toValueInput(), ...ngDevMode ? [{ debugName: "toValue" }] : /* istanbul ignore next */ []);
1027
+ effect(() => {
1028
+ const data = this.data();
1029
+ const columns = this.columns();
1030
+ const disabled = this.disabled();
1031
+ untracked(() => this.checkInputs(data, columns, disabled));
1032
+ });
1033
+ afterNextRender(() => this.initFromFormField());
1034
+ }
1035
+ setDisabled(value) {
1036
+ this._disabled.set(value);
1037
+ }
1038
+ ngOnDestroy() {
1039
+ if (this.windowService.has(this._internalId)) this.windowService.close(this._internalId);
1040
+ }
1041
+ async onClick($event) {
1042
+ $event.stopPropagation();
1043
+ if (this.disabled() || this._hasOpenWindow) {
1044
+ console.debug("disabled or has open window", {
1045
+ disabled: this.disabled(),
1046
+ hasOpenWindow: this._hasOpenWindow
1047
+ });
1048
+ return;
1049
+ }
1050
+ const data = this.data();
1051
+ const columns = this.columns();
1052
+ if (!data || !columns) throw new Error("FATAL: The data or columns input is not set");
1053
+ this._hasOpenWindow = true;
1054
+ this.control?.disable();
1055
+ let selected;
1056
+ try {
1057
+ selected = await this.openMethod.call({
1058
+ windowConfig: { id: this._internalId },
1059
+ injector: this.injector,
1060
+ data,
1061
+ columns: columns instanceof Map ? columns : new Map(Object.entries(columns)),
1062
+ selected: this.selected()?.slice() ?? [],
1063
+ title: this.label() ?? "Select value",
1064
+ compareWith: this.compareWith(),
1065
+ id: this.id() ?? GenerateRandomString(10),
1066
+ parameters: this.parameters(),
1067
+ multiple: this.multiple()
1068
+ });
1069
+ } finally {
1070
+ this._hasOpenWindow = false;
1071
+ this.control?.enable();
1072
+ }
1073
+ if (isDevMode()) console.debug("selected", selected);
1074
+ this.selected.set(selected ?? []);
1075
+ const selectedValue = this.selected();
1076
+ this.selectedChange.emit(selectedValue);
1077
+ if (selectedValue.length) {
1078
+ const toValue = this.toValue();
1079
+ if (toValue) this.control?.setValue(toValue(selectedValue[0]));
1080
+ else throw new Error("The toValue method is not defined");
1081
+ } else this.control?.reset();
1082
+ }
1083
+ initFromFormField() {
1084
+ const hasNgControl = !!this.injector.get(NgControl, null);
1085
+ if (!!this.injector.get(MatFormField, null) || hasNgControl) {
1086
+ this.matFormField = this.injector.get(MatFormField);
1087
+ this.ngControl = this.matFormField._control.ngControl;
1088
+ this.control ??= this.ngControl?.control ?? null;
1089
+ if (!this.data()) this.data.set(this.extractTableSelectDataSource());
1090
+ if (!this.columns()) this.columns.set(this.extractTableSelectColumnMap());
1091
+ if (!this.toValue()) this.toValue.set(this.extractTableSelectToValue() ?? ((value) => value));
1092
+ if (this.control) {
1093
+ this.setDisabled(this.control.disabled);
1094
+ this.control.registerOnDisabledChange((isDisabled) => {
1095
+ this.setDisabled(isDisabled);
1096
+ });
1097
+ }
1098
+ }
1099
+ }
1100
+ checkInputs(data, columns, disabled) {
1101
+ if (!columns || !data) console.warn("columns or data is not defined");
1102
+ else {
1103
+ if (typeof columns !== "object") throw new Error("Ensure that the input columns has a valid value");
1104
+ if (!Array.isArray(data) && !(data instanceof BaseDataSource)) throw new Error("Ensure that the input data has a valid value");
1105
+ }
1106
+ if (this.matButton) this.matButton.disabled = disabled;
1107
+ }
1108
+ static {
1109
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1110
+ minVersion: "12.0.0",
1111
+ version: "22.3.0",
1112
+ ngImport: i0,
1113
+ type: OpenTableSelectWindowDirective,
1114
+ deps: [],
1115
+ target: i0.ɵɵFactoryTarget.Directive
1116
+ });
1117
+ }
1118
+ static {
1119
+ this.ɵdir = i0.ɵɵngDeclareDirective({
1120
+ minVersion: "17.1.0",
1121
+ version: "22.3.0",
1122
+ type: OpenTableSelectWindowDirective,
1123
+ isStandalone: true,
1124
+ selector: "[rxapOpenTableSelectWindow]",
1125
+ inputs: {
1126
+ dataInput: {
1127
+ classPropertyName: "dataInput",
1128
+ publicName: "data",
1129
+ isSignal: true,
1130
+ isRequired: false,
1131
+ transformFunction: null
1132
+ },
1133
+ columnsInput: {
1134
+ classPropertyName: "columnsInput",
1135
+ publicName: "columns",
1136
+ isSignal: true,
1137
+ isRequired: false,
1138
+ transformFunction: null
1139
+ },
1140
+ selectedInput: {
1141
+ classPropertyName: "selectedInput",
1142
+ publicName: "selected",
1143
+ isSignal: true,
1144
+ isRequired: false,
1145
+ transformFunction: null
1146
+ },
1147
+ parameters: {
1148
+ classPropertyName: "parameters",
1149
+ publicName: "parameters",
1150
+ isSignal: true,
1151
+ isRequired: false,
1152
+ transformFunction: null
1153
+ },
1154
+ labelInput: {
1155
+ classPropertyName: "labelInput",
1156
+ publicName: "label",
1157
+ isSignal: true,
1158
+ isRequired: false,
1159
+ transformFunction: null
1160
+ },
1161
+ id: {
1162
+ classPropertyName: "id",
1163
+ publicName: "id",
1164
+ isSignal: true,
1165
+ isRequired: false,
1166
+ transformFunction: null
1167
+ },
1168
+ compareWithInput: {
1169
+ classPropertyName: "compareWithInput",
1170
+ publicName: "compareWith",
1171
+ isSignal: true,
1172
+ isRequired: false,
1173
+ transformFunction: null
1174
+ },
1175
+ multiple: {
1176
+ classPropertyName: "multiple",
1177
+ publicName: "multiple",
1178
+ isSignal: true,
1179
+ isRequired: false,
1180
+ transformFunction: null
1181
+ },
1182
+ toValueInput: {
1183
+ classPropertyName: "toValueInput",
1184
+ publicName: "toValue",
1185
+ isSignal: true,
1186
+ isRequired: false,
1187
+ transformFunction: null
1188
+ }
1189
+ },
1190
+ outputs: { selectedChange: "selectedChange" },
1191
+ host: {
1192
+ attributes: { "type": "button" },
1193
+ listeners: { "click": "onClick($event)" },
1194
+ properties: { "disabled": "disabled()" }
1195
+ },
1196
+ providers: [OpenTableSelectWindowMethod],
1197
+ ngImport: i0
1198
+ });
1199
+ }
659
1200
  };
660
- OpenTableSelectWindowDirective = __decorate([
661
- Mixin(ExtractTableSelectDataSourceMixin, ExtractTableSelectColumnMapMixin, ExtractTableSelectToValueMixin),
662
- __metadata("design:paramtypes", [])
663
- ], OpenTableSelectWindowDirective);
664
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenTableSelectWindowDirective, decorators: [{
665
- type: Directive,
666
- args: [{
667
- selector: '[rxapOpenTableSelectWindow]',
668
- standalone: true,
669
- providers: [OpenTableSelectWindowMethod],
670
- host: {
671
- type: 'button',
672
- '[disabled]': 'disabled()',
673
- '(click)': 'onClick($event)',
674
- },
675
- }]
676
- }], ctorParameters: () => [], propDecorators: { dataInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], columnsInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], selectedInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], parameters: [{ type: i0.Input, args: [{ isSignal: true, alias: "parameters", required: false }] }], selectedChange: [{ type: i0.Output, args: ["selectedChange"] }], labelInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], compareWithInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "compareWith", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], toValueInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "toValue", required: false }] }] } });
677
-
1201
+ OpenTableSelectWindowDirective = __decorate([Mixin(ExtractTableSelectDataSourceMixin, ExtractTableSelectColumnMapMixin, ExtractTableSelectToValueMixin), __metadata("design:paramtypes", [])], OpenTableSelectWindowDirective);
1202
+ i0.ɵɵngDeclareClassMetadata({
1203
+ minVersion: "12.0.0",
1204
+ version: "22.3.0",
1205
+ ngImport: i0,
1206
+ type: OpenTableSelectWindowDirective,
1207
+ decorators: [{
1208
+ type: Directive,
1209
+ args: [{
1210
+ selector: "[rxapOpenTableSelectWindow]",
1211
+ standalone: true,
1212
+ providers: [OpenTableSelectWindowMethod],
1213
+ host: {
1214
+ type: "button",
1215
+ "[disabled]": "disabled()",
1216
+ "(click)": "onClick($event)"
1217
+ }
1218
+ }]
1219
+ }],
1220
+ ctorParameters: () => [],
1221
+ propDecorators: {
1222
+ dataInput: [{
1223
+ type: i0.Input,
1224
+ args: [{
1225
+ isSignal: true,
1226
+ alias: "data",
1227
+ required: false
1228
+ }]
1229
+ }],
1230
+ columnsInput: [{
1231
+ type: i0.Input,
1232
+ args: [{
1233
+ isSignal: true,
1234
+ alias: "columns",
1235
+ required: false
1236
+ }]
1237
+ }],
1238
+ selectedInput: [{
1239
+ type: i0.Input,
1240
+ args: [{
1241
+ isSignal: true,
1242
+ alias: "selected",
1243
+ required: false
1244
+ }]
1245
+ }],
1246
+ parameters: [{
1247
+ type: i0.Input,
1248
+ args: [{
1249
+ isSignal: true,
1250
+ alias: "parameters",
1251
+ required: false
1252
+ }]
1253
+ }],
1254
+ selectedChange: [{
1255
+ type: i0.Output,
1256
+ args: ["selectedChange"]
1257
+ }],
1258
+ labelInput: [{
1259
+ type: i0.Input,
1260
+ args: [{
1261
+ isSignal: true,
1262
+ alias: "label",
1263
+ required: false
1264
+ }]
1265
+ }],
1266
+ id: [{
1267
+ type: i0.Input,
1268
+ args: [{
1269
+ isSignal: true,
1270
+ alias: "id",
1271
+ required: false
1272
+ }]
1273
+ }],
1274
+ compareWithInput: [{
1275
+ type: i0.Input,
1276
+ args: [{
1277
+ isSignal: true,
1278
+ alias: "compareWith",
1279
+ required: false
1280
+ }]
1281
+ }],
1282
+ multiple: [{
1283
+ type: i0.Input,
1284
+ args: [{
1285
+ isSignal: true,
1286
+ alias: "multiple",
1287
+ required: false
1288
+ }]
1289
+ }],
1290
+ toValueInput: [{
1291
+ type: i0.Input,
1292
+ args: [{
1293
+ isSignal: true,
1294
+ alias: "toValue",
1295
+ required: false
1296
+ }]
1297
+ }]
1298
+ }
1299
+ });
678
1300
  let TableSelectControlDirective = class TableSelectControlDirective {
679
- get selected() {
680
- return this.value !== null ? [this.value] : [];
681
- }
682
- constructor() {
683
- this.multiple = input(...(ngDevMode ? [undefined, { debugName: "multiple" }] : /* istanbul ignore next */ []));
684
- this.openMethod = input.required(...(ngDevMode ? [{ debugName: "openMethod" }] : /* istanbul ignore next */ []));
685
- this.dataInput = input(undefined, { ...(ngDevMode ? { debugName: "dataInput" } : /* istanbul ignore next */ {}), alias: 'data' });
686
- this.data = linkedSignal(() => this.dataInput(), ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
687
- this.columnsInput = input(undefined, { ...(ngDevMode ? { debugName: "columnsInput" } : /* istanbul ignore next */ {}), alias: 'columns' });
688
- this.columns = linkedSignal(() => this.columnsInput(), ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
689
- this.ngControl = null;
690
- this.value = null;
691
- this.openTableSelectWindow = contentChildren(OpenTableSelectWindowDirective, ...(ngDevMode ? [{ debugName: "openTableSelectWindow" }] : /* istanbul ignore next */ []));
692
- this.tableSelectInput = contentChild.required(TableSelectInputComponent);
693
- this.matLabel = contentChild('mat-label', ...(ngDevMode ? [{ debugName: "matLabel" }] : /* istanbul ignore next */ []));
694
- this.toValueInput = input(undefined, { ...(ngDevMode ? { debugName: "toValueInput" } : /* istanbul ignore next */ {}), alias: 'toValue' });
695
- this.toValue = linkedSignal(() => this.toValueInput(), ...(ngDevMode ? [{ debugName: "toValue" }] : /* istanbul ignore next */ []));
696
- this.injector = inject(INJECTOR);
697
- // required for the use mixin ExtractDatasourceMixin
698
- this.dataSourceLoader = inject(DataSourceLoader);
699
- this.disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
700
- this.matFormField = null;
701
- this.toDisplayInput = input(value => value, { ...(ngDevMode ? { debugName: "toDisplayInput" } : /* istanbul ignore next */ {}), alias: 'toDisplay' });
702
- this.toDisplay = linkedSignal(() => this.toDisplayInput(), ...(ngDevMode ? [{ debugName: "toDisplay" }] : /* istanbul ignore next */ []));
703
- this.destroyRef = inject(DestroyRef);
704
- // push the resolved inputs into the projected open table select window directives
705
- effect(() => {
706
- const windows = this.openTableSelectWindow();
707
- const columns = this.columns();
708
- const data = this.data();
709
- const toValue = this.toValue();
710
- const matLabel = this.matLabel();
711
- untracked(() => this.updateOpenTableSelectWindow(windows, columns, data, toValue, matLabel));
712
- });
713
- effect(() => {
714
- const windows = this.openTableSelectWindow();
715
- const disabled = this.disabled();
716
- untracked(() => windows.forEach(openTableSelectWindow => openTableSelectWindow.setDisabled(disabled)));
717
- });
718
- // react to the selection of the projected open table select window directives
719
- effect((onCleanup) => {
720
- const subscriptions = this.openTableSelectWindow().map(openTableSelectWindow => openTableSelectWindow.selectedChange.subscribe($event => this.onSelected($event)));
721
- onCleanup(() => subscriptions.forEach(subscription => subscription.unsubscribe()));
722
- });
723
- effect(() => {
724
- const toDisplay = this.toDisplay();
725
- const tableSelectInput = this.tableSelectInput();
726
- untracked(() => {
727
- if (toDisplay) {
728
- tableSelectInput.toDisplay = toDisplay.bind(this);
729
- }
730
- });
731
- });
732
- afterNextRender(() => this.initFromFormField());
733
- }
734
- initFromFormField() {
735
- this.matFormField = this.injector.get(MatFormField, null);
736
- if (!this.matFormField) {
737
- throw new Error('The mat form field could not be injected');
738
- }
739
- this.ngControl = this.matFormField._control.ngControl;
740
- if (this.ngControl) {
741
- const control = this.ngControl.control;
742
- if (control instanceof RxapFormControl) {
743
- this.control = control;
744
- this.data.set(this.extractTableSelectDataSource());
745
- this.toDisplay.set(this.extractTableSelectToDisplay() ?? this.toDisplay());
746
- this.toValue.set(this.extractTableSelectToValue() ?? this.toValue());
747
- this.columns.set(this.extractTableSelectColumnMap());
748
- control.disabled$.pipe(tap$1(disabled => this.disabled.set(disabled)), takeUntilDestroyed(this.destroyRef)).subscribe();
749
- }
750
- }
751
- else {
752
- if (isDevMode()) {
753
- console.log('standalone mode');
754
- }
755
- }
756
- }
757
- updateOpenTableSelectWindow(windows, columns, data, toValue, matLabel) {
758
- for (const openTableSelectWindow of windows) {
759
- if (columns) {
760
- openTableSelectWindow.columns.set(columns);
761
- }
762
- if (data) {
763
- openTableSelectWindow.data.set(data);
764
- }
765
- if (toValue) {
766
- openTableSelectWindow.compareWith.set((o1, o2) => toValue(o1) === toValue(o2));
767
- }
768
- if (matLabel) {
769
- openTableSelectWindow.label.set(matLabel.nativeElement.innerText);
770
- }
771
- if (this.ngControl) {
772
- const control = this.ngControl.control;
773
- if (control?.value) {
774
- openTableSelectWindow.selected.set(coerceArray(control.value));
775
- }
776
- }
777
- }
778
- }
779
- async onSelected($event) {
780
- const tableSelectInput = this.tableSelectInput();
781
- if ($event?.length) {
782
- tableSelectInput.display = await this.toDisplay()($event[0]);
783
- this.value = $event[0];
784
- tableSelectInput.setValue(this.value);
785
- }
786
- else {
787
- this.value = null;
788
- }
789
- }
790
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableSelectControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
791
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.9", type: TableSelectControlDirective, isStandalone: true, selector: "mat-form-field[rxapTableSelectControl]", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, openMethod: { classPropertyName: "openMethod", publicName: "openMethod", isSignal: true, isRequired: true, transformFunction: null }, dataInput: { classPropertyName: "dataInput", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, columnsInput: { classPropertyName: "columnsInput", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, toValueInput: { classPropertyName: "toValueInput", publicName: "toValue", isSignal: true, isRequired: false, transformFunction: null }, toDisplayInput: { classPropertyName: "toDisplayInput", publicName: "toDisplay", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "openTableSelectWindow", predicate: OpenTableSelectWindowDirective, isSignal: true }, { propertyName: "tableSelectInput", first: true, predicate: TableSelectInputComponent, descendants: true, isSignal: true }, { propertyName: "matLabel", first: true, predicate: ["mat-label"], descendants: true, isSignal: true }], ngImport: i0 }); }
1301
+ get selected() {
1302
+ return this.value !== null ? [this.value] : [];
1303
+ }
1304
+ constructor() {
1305
+ this.multiple = input(...ngDevMode ? [void 0, { debugName: "multiple" }] : /* istanbul ignore next */ []);
1306
+ this.openMethod = input.required(...ngDevMode ? [{ debugName: "openMethod" }] : /* istanbul ignore next */ []);
1307
+ this.dataInput = input(void 0, {
1308
+ ...ngDevMode ? { debugName: "dataInput" } : /* istanbul ignore next */ {},
1309
+ alias: "data"
1310
+ });
1311
+ this.data = linkedSignal(() => this.dataInput(), ...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
1312
+ this.columnsInput = input(void 0, {
1313
+ ...ngDevMode ? { debugName: "columnsInput" } : /* istanbul ignore next */ {},
1314
+ alias: "columns"
1315
+ });
1316
+ this.columns = linkedSignal(() => this.columnsInput(), ...ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []);
1317
+ this.ngControl = null;
1318
+ this.value = null;
1319
+ this.openTableSelectWindow = contentChildren(OpenTableSelectWindowDirective, ...ngDevMode ? [{ debugName: "openTableSelectWindow" }] : /* istanbul ignore next */ []);
1320
+ this.tableSelectInput = contentChild.required(TableSelectInputComponent, ...ngDevMode ? [{ debugName: "tableSelectInput" }] : /* istanbul ignore next */ []);
1321
+ this.matLabel = contentChild("mat-label", ...ngDevMode ? [{ debugName: "matLabel" }] : /* istanbul ignore next */ []);
1322
+ this.toValueInput = input(void 0, {
1323
+ ...ngDevMode ? { debugName: "toValueInput" } : /* istanbul ignore next */ {},
1324
+ alias: "toValue"
1325
+ });
1326
+ this.toValue = linkedSignal(() => this.toValueInput(), ...ngDevMode ? [{ debugName: "toValue" }] : /* istanbul ignore next */ []);
1327
+ this.injector = inject(INJECTOR);
1328
+ this.dataSourceLoader = inject(DataSourceLoader);
1329
+ this.disabled = signal(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
1330
+ this.matFormField = null;
1331
+ this.toDisplayInput = input((value) => value, {
1332
+ ...ngDevMode ? { debugName: "toDisplayInput" } : /* istanbul ignore next */ {},
1333
+ alias: "toDisplay"
1334
+ });
1335
+ this.toDisplay = linkedSignal(() => this.toDisplayInput(), ...ngDevMode ? [{ debugName: "toDisplay" }] : /* istanbul ignore next */ []);
1336
+ this.destroyRef = inject(DestroyRef);
1337
+ effect(() => {
1338
+ const windows = this.openTableSelectWindow();
1339
+ const columns = this.columns();
1340
+ const data = this.data();
1341
+ const toValue = this.toValue();
1342
+ const matLabel = this.matLabel();
1343
+ untracked(() => this.updateOpenTableSelectWindow(windows, columns, data, toValue, matLabel));
1344
+ });
1345
+ effect(() => {
1346
+ const windows = this.openTableSelectWindow();
1347
+ const disabled = this.disabled();
1348
+ untracked(() => windows.forEach((openTableSelectWindow) => openTableSelectWindow.setDisabled(disabled)));
1349
+ });
1350
+ effect((onCleanup) => {
1351
+ const subscriptions = this.openTableSelectWindow().map((openTableSelectWindow) => openTableSelectWindow.selectedChange.subscribe(($event) => this.onSelected($event)));
1352
+ onCleanup(() => subscriptions.forEach((subscription) => subscription.unsubscribe()));
1353
+ });
1354
+ effect(() => {
1355
+ const toDisplay = this.toDisplay();
1356
+ const tableSelectInput = this.tableSelectInput();
1357
+ untracked(() => {
1358
+ if (toDisplay) tableSelectInput.toDisplay = toDisplay.bind(this);
1359
+ });
1360
+ });
1361
+ afterNextRender(() => this.initFromFormField());
1362
+ }
1363
+ initFromFormField() {
1364
+ this.matFormField = this.injector.get(MatFormField, null);
1365
+ if (!this.matFormField) throw new Error("The mat form field could not be injected");
1366
+ this.ngControl = this.matFormField._control.ngControl;
1367
+ if (this.ngControl) {
1368
+ const control = this.ngControl.control;
1369
+ if (control instanceof RxapFormControl) {
1370
+ this.control = control;
1371
+ this.data.set(this.extractTableSelectDataSource());
1372
+ this.toDisplay.set(this.extractTableSelectToDisplay() ?? this.toDisplay());
1373
+ this.toValue.set(this.extractTableSelectToValue() ?? this.toValue());
1374
+ this.columns.set(this.extractTableSelectColumnMap());
1375
+ control.disabled$.pipe(tap((disabled) => this.disabled.set(disabled)), takeUntilDestroyed(this.destroyRef)).subscribe();
1376
+ }
1377
+ } else if (isDevMode()) console.log("standalone mode");
1378
+ }
1379
+ updateOpenTableSelectWindow(windows, columns, data, toValue, matLabel) {
1380
+ for (const openTableSelectWindow of windows) {
1381
+ if (columns) openTableSelectWindow.columns.set(columns);
1382
+ if (data) openTableSelectWindow.data.set(data);
1383
+ if (toValue) openTableSelectWindow.compareWith.set((o1, o2) => toValue(o1) === toValue(o2));
1384
+ if (matLabel) openTableSelectWindow.label.set(matLabel.nativeElement.innerText);
1385
+ if (this.ngControl) {
1386
+ const control = this.ngControl.control;
1387
+ if (control?.value) openTableSelectWindow.selected.set(coerceArray(control.value));
1388
+ }
1389
+ }
1390
+ }
1391
+ async onSelected($event) {
1392
+ const tableSelectInput = this.tableSelectInput();
1393
+ if ($event?.length) {
1394
+ tableSelectInput.display = await this.toDisplay()($event[0]);
1395
+ this.value = $event[0];
1396
+ tableSelectInput.setValue(this.value);
1397
+ } else this.value = null;
1398
+ }
1399
+ static {
1400
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1401
+ minVersion: "12.0.0",
1402
+ version: "22.3.0",
1403
+ ngImport: i0,
1404
+ type: TableSelectControlDirective,
1405
+ deps: [],
1406
+ target: i0.ɵɵFactoryTarget.Directive
1407
+ });
1408
+ }
1409
+ static {
1410
+ this.ɵdir = i0.ɵɵngDeclareDirective({
1411
+ minVersion: "17.2.0",
1412
+ version: "22.3.0",
1413
+ type: TableSelectControlDirective,
1414
+ isStandalone: true,
1415
+ selector: "mat-form-field[rxapTableSelectControl]",
1416
+ inputs: {
1417
+ multiple: {
1418
+ classPropertyName: "multiple",
1419
+ publicName: "multiple",
1420
+ isSignal: true,
1421
+ isRequired: false,
1422
+ transformFunction: null
1423
+ },
1424
+ openMethod: {
1425
+ classPropertyName: "openMethod",
1426
+ publicName: "openMethod",
1427
+ isSignal: true,
1428
+ isRequired: true,
1429
+ transformFunction: null
1430
+ },
1431
+ dataInput: {
1432
+ classPropertyName: "dataInput",
1433
+ publicName: "data",
1434
+ isSignal: true,
1435
+ isRequired: false,
1436
+ transformFunction: null
1437
+ },
1438
+ columnsInput: {
1439
+ classPropertyName: "columnsInput",
1440
+ publicName: "columns",
1441
+ isSignal: true,
1442
+ isRequired: false,
1443
+ transformFunction: null
1444
+ },
1445
+ toValueInput: {
1446
+ classPropertyName: "toValueInput",
1447
+ publicName: "toValue",
1448
+ isSignal: true,
1449
+ isRequired: false,
1450
+ transformFunction: null
1451
+ },
1452
+ toDisplayInput: {
1453
+ classPropertyName: "toDisplayInput",
1454
+ publicName: "toDisplay",
1455
+ isSignal: true,
1456
+ isRequired: false,
1457
+ transformFunction: null
1458
+ }
1459
+ },
1460
+ queries: [
1461
+ {
1462
+ propertyName: "openTableSelectWindow",
1463
+ predicate: OpenTableSelectWindowDirective,
1464
+ isSignal: true
1465
+ },
1466
+ {
1467
+ propertyName: "tableSelectInput",
1468
+ first: true,
1469
+ predicate: TableSelectInputComponent,
1470
+ descendants: true,
1471
+ isSignal: true
1472
+ },
1473
+ {
1474
+ propertyName: "matLabel",
1475
+ first: true,
1476
+ predicate: ["mat-label"],
1477
+ descendants: true,
1478
+ isSignal: true
1479
+ }
1480
+ ],
1481
+ ngImport: i0
1482
+ });
1483
+ }
792
1484
  };
793
- TableSelectControlDirective = __decorate([
794
- Mixin(ExtractTableSelectDataSourceMixin, ExtractTableSelectToValueMixin, ExtractTableSelectToDisplayMixin, ExtractTableSelectColumnMapMixin),
795
- __metadata("design:paramtypes", [])
796
- ], TableSelectControlDirective);
797
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableSelectControlDirective, decorators: [{
798
- type: Directive,
799
- args: [{
800
- selector: 'mat-form-field[rxapTableSelectControl]',
801
- standalone: true,
802
- }]
803
- }], ctorParameters: () => [], propDecorators: { multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], openMethod: [{ type: i0.Input, args: [{ isSignal: true, alias: "openMethod", required: true }] }], dataInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], columnsInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], openTableSelectWindow: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => OpenTableSelectWindowDirective), { isSignal: true }] }], tableSelectInput: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TableSelectInputComponent), { isSignal: true }] }], matLabel: [{ type: i0.ContentChild, args: ['mat-label', { isSignal: true }] }], toValueInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "toValue", required: false }] }], toDisplayInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "toDisplay", required: false }] }] } });
804
-
805
- // region table-select-window
806
- // endregion
807
-
808
- /**
809
- * Generated bundle index. Do not edit.
810
- */
811
-
1485
+ TableSelectControlDirective = __decorate([Mixin(ExtractTableSelectDataSourceMixin, ExtractTableSelectToValueMixin, ExtractTableSelectToDisplayMixin, ExtractTableSelectColumnMapMixin), __metadata("design:paramtypes", [])], TableSelectControlDirective);
1486
+ i0.ɵɵngDeclareClassMetadata({
1487
+ minVersion: "12.0.0",
1488
+ version: "22.3.0",
1489
+ ngImport: i0,
1490
+ type: TableSelectControlDirective,
1491
+ decorators: [{
1492
+ type: Directive,
1493
+ args: [{
1494
+ selector: "mat-form-field[rxapTableSelectControl]",
1495
+ standalone: true
1496
+ }]
1497
+ }],
1498
+ ctorParameters: () => [],
1499
+ propDecorators: {
1500
+ multiple: [{
1501
+ type: i0.Input,
1502
+ args: [{
1503
+ isSignal: true,
1504
+ alias: "multiple",
1505
+ required: false
1506
+ }]
1507
+ }],
1508
+ openMethod: [{
1509
+ type: i0.Input,
1510
+ args: [{
1511
+ isSignal: true,
1512
+ alias: "openMethod",
1513
+ required: true
1514
+ }]
1515
+ }],
1516
+ dataInput: [{
1517
+ type: i0.Input,
1518
+ args: [{
1519
+ isSignal: true,
1520
+ alias: "data",
1521
+ required: false
1522
+ }]
1523
+ }],
1524
+ columnsInput: [{
1525
+ type: i0.Input,
1526
+ args: [{
1527
+ isSignal: true,
1528
+ alias: "columns",
1529
+ required: false
1530
+ }]
1531
+ }],
1532
+ openTableSelectWindow: [{
1533
+ type: i0.ContentChildren,
1534
+ args: [i0.forwardRef(() => OpenTableSelectWindowDirective), { isSignal: true }]
1535
+ }],
1536
+ tableSelectInput: [{
1537
+ type: i0.ContentChild,
1538
+ args: [i0.forwardRef(() => TableSelectInputComponent), { isSignal: true }]
1539
+ }],
1540
+ matLabel: [{
1541
+ type: i0.ContentChild,
1542
+ args: ["mat-label", { isSignal: true }]
1543
+ }],
1544
+ toValueInput: [{
1545
+ type: i0.Input,
1546
+ args: [{
1547
+ isSignal: true,
1548
+ alias: "toValue",
1549
+ required: false
1550
+ }]
1551
+ }],
1552
+ toDisplayInput: [{
1553
+ type: i0.Input,
1554
+ args: [{
1555
+ isSignal: true,
1556
+ alias: "toDisplay",
1557
+ required: false
1558
+ }]
1559
+ }]
1560
+ }
1561
+ });
812
1562
  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, TableSelectInputComponent, TableSelectWindowComponent, UseTableSelectColumns, UseTableSelectDataSource, UseTableSelectMethod, UseTableSelectToDisplay, UseTableSelectToValue, WindowTestWrapperComponent };
813
- //# sourceMappingURL=rxap-ngx-material-table-select.mjs.map
1563
+
1564
+ //# sourceMappingURL=rxap-ngx-material-table-select.mjs.map