@rxap/ngx-material-table-select 21.0.1-dev.0 → 21.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +67 -0
- package/compodoc/changelog.html +65 -0
- package/compodoc/classes/MockWindowRef.html +13 -16
- package/compodoc/components/TableSelectInputComponent.html +163 -454
- package/compodoc/components/TableSelectWindowComponent.html +15 -89
- package/compodoc/components/WindowTestWrapperComponent.html +44 -69
- package/compodoc/dependencies.html +14 -14
- package/compodoc/directives/OpenTableSelectWindowDirective.html +671 -591
- package/compodoc/directives/TableSelectControlDirective.html +433 -280
- package/compodoc/graph/dependencies.svg +15 -145
- package/compodoc/injectables/OpenTableSelectWindowMethod.html +5 -76
- package/compodoc/interfaces/BooleanColumn.html +3 -14
- package/compodoc/interfaces/DateColumn.html +3 -14
- package/compodoc/interfaces/OpenTableSelectWindowMethodParameters.html +3 -14
- package/compodoc/interfaces/SelectColumn.html +4 -15
- package/compodoc/js/menu-wc.js +13 -63
- package/compodoc/js/menu-wc_es5.js +1 -1
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/miscellaneous/variables.html +1 -1
- package/compodoc/modules.html +0 -17
- package/compodoc/overview.html +1 -177
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +4575 -4089
- package/docs/html/assets/hierarchy.js +1 -1
- package/docs/html/assets/navigation.js +1 -1
- package/docs/html/assets/search.js +1 -1
- package/docs/html/classes/ExtractTableSelectColumnMapMixin.html +2 -2
- package/docs/html/classes/ExtractTableSelectDataSourceMixin.html +2 -2
- package/docs/html/classes/ExtractTableSelectToDisplayMixin.html +2 -2
- package/docs/html/classes/ExtractTableSelectToValueMixin.html +2 -2
- package/docs/html/classes/MockWindowRef.html +5 -5
- package/docs/html/classes/OpenTableSelectWindowDirective.html +19 -29
- package/docs/html/classes/OpenTableSelectWindowMethod.html +2 -2
- package/docs/html/classes/TableSelectControlDirective.html +11 -25
- package/docs/html/classes/TableSelectInputComponent.html +23 -26
- package/docs/html/classes/TableSelectWindowComponent.html +2 -2
- package/docs/html/classes/WindowTestWrapperComponent.html +3 -3
- package/docs/html/functions/CreateFilterFormProvider.html +1 -1
- package/docs/html/functions/UseTableSelectColumns.html +1 -1
- package/docs/html/functions/UseTableSelectDataSource.html +1 -1
- package/docs/html/functions/UseTableSelectMethod.html +1 -1
- package/docs/html/functions/UseTableSelectToDisplay.html +1 -1
- package/docs/html/functions/UseTableSelectToValue.html +1 -1
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/BooleanColumn.html +2 -2
- package/docs/html/interfaces/DateColumn.html +2 -2
- package/docs/html/interfaces/OpenTableSelectWindowMethodParameters.html +4 -4
- package/docs/html/interfaces/SelectColumn.html +2 -2
- package/docs/html/modules.html +1 -1
- package/docs/html/types/TableSelectColumn.html +1 -1
- package/docs/html/types/TableSelectColumnMap.html +1 -1
- package/docs/html/types/TableSelectToDisplayFunction.html +1 -1
- package/docs/html/types/TableSelectToValueFunction.html +1 -1
- package/docs/html/variables/TABLE_SELECT_COLUMN_MAP.html +1 -1
- package/docs/html/variables/TABLE_SELECT_DATA_SOURCE.html +1 -1
- package/docs/html/variables/TABLE_SELECT_METHOD.html +1 -1
- package/docs/html/variables/TABLE_SELECT_TO_DISPLAY.html +1 -1
- package/docs/html/variables/TABLE_SELECT_TO_VALUE.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/ExtractTableSelectColumnMapMixin.md +8 -8
- package/docs/markdown/classes/ExtractTableSelectDataSourceMixin.md +13 -13
- package/docs/markdown/classes/ExtractTableSelectToDisplayMixin.md +8 -8
- package/docs/markdown/classes/ExtractTableSelectToValueMixin.md +8 -8
- package/docs/markdown/classes/MockWindowRef.md +7 -7
- package/docs/markdown/classes/OpenTableSelectWindowDirective.md +107 -159
- package/docs/markdown/classes/OpenTableSelectWindowMethod.md +4 -16
- package/docs/markdown/classes/TableSelectControlDirective.md +73 -137
- package/docs/markdown/classes/TableSelectInputComponent.md +58 -117
- package/docs/markdown/classes/TableSelectWindowComponent.md +14 -28
- package/docs/markdown/classes/WindowTestWrapperComponent.md +11 -11
- package/docs/markdown/functions/CreateFilterFormProvider.md +2 -2
- package/docs/markdown/functions/UseTableSelectColumns.md +2 -2
- package/docs/markdown/functions/UseTableSelectDataSource.md +2 -2
- package/docs/markdown/functions/UseTableSelectMethod.md +2 -2
- package/docs/markdown/functions/UseTableSelectToDisplay.md +2 -2
- package/docs/markdown/functions/UseTableSelectToValue.md +2 -2
- package/docs/markdown/globals.md +2 -3
- package/docs/markdown/interfaces/BooleanColumn.md +5 -5
- package/docs/markdown/interfaces/DateColumn.md +6 -6
- package/docs/markdown/interfaces/OpenTableSelectWindowMethodParameters.md +14 -14
- package/docs/markdown/interfaces/SelectColumn.md +5 -5
- package/docs/markdown/type-aliases/TableSelectColumn.md +2 -2
- package/docs/markdown/type-aliases/TableSelectColumnMap.md +2 -2
- package/docs/markdown/type-aliases/TableSelectToDisplayFunction.md +2 -2
- package/docs/markdown/type-aliases/TableSelectToValueFunction.md +2 -2
- package/docs/markdown/variables/TABLE_SELECT_COLUMN_MAP.md +2 -2
- package/docs/markdown/variables/TABLE_SELECT_DATA_SOURCE.md +2 -2
- package/docs/markdown/variables/TABLE_SELECT_METHOD.md +3 -3
- package/docs/markdown/variables/TABLE_SELECT_TO_DISPLAY.md +2 -2
- package/docs/markdown/variables/TABLE_SELECT_TO_VALUE.md +2 -2
- package/docs/wiki/Class.ExtractTableSelectColumnMapMixin.md +7 -7
- package/docs/wiki/Class.ExtractTableSelectDataSourceMixin.md +12 -12
- package/docs/wiki/Class.ExtractTableSelectToDisplayMixin.md +7 -7
- package/docs/wiki/Class.ExtractTableSelectToValueMixin.md +7 -7
- package/docs/wiki/Class.MockWindowRef.md +6 -6
- package/docs/wiki/Class.OpenTableSelectWindowDirective.md +106 -158
- package/docs/wiki/Class.OpenTableSelectWindowMethod.md +3 -15
- package/docs/wiki/Class.TableSelectControlDirective.md +72 -136
- package/docs/wiki/Class.TableSelectInputComponent.md +57 -116
- package/docs/wiki/Class.TableSelectWindowComponent.md +13 -27
- package/docs/wiki/Class.WindowTestWrapperComponent.md +10 -10
- package/docs/wiki/Function.CreateFilterFormProvider.md +1 -1
- package/docs/wiki/Function.UseTableSelectColumns.md +1 -1
- package/docs/wiki/Function.UseTableSelectDataSource.md +1 -1
- package/docs/wiki/Function.UseTableSelectMethod.md +1 -1
- package/docs/wiki/Function.UseTableSelectToDisplay.md +1 -1
- package/docs/wiki/Function.UseTableSelectToValue.md +1 -1
- package/docs/wiki/Interface.BooleanColumn.md +4 -4
- package/docs/wiki/Interface.DateColumn.md +5 -5
- package/docs/wiki/Interface.OpenTableSelectWindowMethodParameters.md +13 -13
- package/docs/wiki/Interface.SelectColumn.md +4 -4
- package/docs/wiki/TypeAlias.TableSelectColumn.md +1 -1
- package/docs/wiki/TypeAlias.TableSelectColumnMap.md +1 -1
- package/docs/wiki/TypeAlias.TableSelectToDisplayFunction.md +1 -1
- package/docs/wiki/TypeAlias.TableSelectToValueFunction.md +1 -1
- package/docs/wiki/Variable.TABLE_SELECT_COLUMN_MAP.md +1 -1
- package/docs/wiki/Variable.TABLE_SELECT_DATA_SOURCE.md +1 -1
- package/docs/wiki/Variable.TABLE_SELECT_METHOD.md +2 -2
- package/docs/wiki/Variable.TABLE_SELECT_TO_DISPLAY.md +1 -1
- package/docs/wiki/Variable.TABLE_SELECT_TO_VALUE.md +1 -1
- package/docs/wiki/_Sidebar.md +0 -1
- package/docs/wiki/globals.md +1 -2
- package/fesm2022/rxap-ngx-material-table-select.mjs +237 -322
- package/fesm2022/rxap-ngx-material-table-select.mjs.map +1 -1
- package/package.json +41 -41
- package/types/rxap-ngx-material-table-select.d.ts +73 -79
- package/docs/html/classes/TableSelectControlModule.html +0 -2
- package/docs/markdown/classes/TableSelectControlModule.md +0 -19
- package/docs/wiki/Class.TableSelectControlModule.md +0 -15
|
@@ -1,52 +1,50 @@
|
|
|
1
1
|
import { AsyncPipe, KeyValuePipe, NgClass } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import * as
|
|
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
5
|
import { FormsModule, ReactiveFormsModule, NgControl } from '@angular/forms';
|
|
6
|
-
import * as
|
|
6
|
+
import * as i7 from '@angular/material/button';
|
|
7
7
|
import { MatButtonModule, MatButton } from '@angular/material/button';
|
|
8
|
-
import * as
|
|
8
|
+
import * as i4 from '@angular/material/form-field';
|
|
9
9
|
import { MatFormFieldModule, MatFormFieldControl, MatFormField } from '@angular/material/form-field';
|
|
10
|
-
import * as
|
|
10
|
+
import * as i8 from '@angular/material/icon';
|
|
11
11
|
import { MatIconModule } from '@angular/material/icon';
|
|
12
|
-
import * as
|
|
12
|
+
import * as i5 from '@angular/material/input';
|
|
13
13
|
import { MatInputModule } from '@angular/material/input';
|
|
14
|
-
import * as
|
|
14
|
+
import * as i9 from '@angular/material/paginator';
|
|
15
15
|
import { MatPaginatorModule } from '@angular/material/paginator';
|
|
16
|
-
import * as
|
|
16
|
+
import * as i1 from '@angular/material/progress-bar';
|
|
17
17
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
18
|
-
import * as
|
|
18
|
+
import * as i3 from '@angular/material/sort';
|
|
19
19
|
import { MatSortModule } from '@angular/material/sort';
|
|
20
|
-
import * as
|
|
20
|
+
import * as i2 from '@angular/material/table';
|
|
21
21
|
import { MatTableModule } from '@angular/material/table';
|
|
22
22
|
import { ParentControlContainerDirective, ControlValueAccessor, RxapFormControl, RxapFormGroup } from '@rxap/forms';
|
|
23
23
|
import { FormFieldNoPaddingDirective } from '@rxap/material-directives/form-field';
|
|
24
24
|
import { InputClearButtonDirective } from '@rxap/material-form-system';
|
|
25
|
-
import
|
|
26
|
-
import { RowAnimation, TableDataSourceDirective, FilterHeaderRowDirective, CheckboxHeaderCellComponent, CheckboxCellComponent, DateCellComponent, BooleanCellComponent, SelectRowService, 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';
|
|
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';
|
|
27
26
|
import { GetFromObjectPipe } from '@rxap/pipes';
|
|
28
|
-
import
|
|
29
|
-
import { RXAP_WINDOW_DATA, RXAP_WINDOW_REF, WindowFooterDirective, RXAP_WINDOW_SETTINGS, WindowService } from '@rxap/window-system';
|
|
27
|
+
import { RXAP_WINDOW_DATA, RXAP_WINDOW_REF, WindowFooterDirective, WindowService, RXAP_WINDOW_SETTINGS } from '@rxap/window-system';
|
|
30
28
|
import { map, tap as tap$1 } from 'rxjs/operators';
|
|
31
|
-
import * as i1$
|
|
32
|
-
import { ComponentPortal, PortalModule
|
|
29
|
+
import * as i1$1 from '@angular/cdk/portal';
|
|
30
|
+
import { CdkPortalOutlet, ComponentPortal, PortalModule } from '@angular/cdk/portal';
|
|
33
31
|
import { Subject, ReplaySubject, tap, Subscription, startWith, delay } from 'rxjs';
|
|
34
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
35
32
|
import { UseDataSource, RxapFormSystemError, ExtractFormDefinitionMixin, ExtractControlMixin } from '@rxap/form-system';
|
|
36
33
|
import { setMetadataMap, getMetadata } from '@rxap/reflect-metadata';
|
|
37
|
-
import { __decorate } from 'tslib';
|
|
34
|
+
import { __decorate, __metadata } from 'tslib';
|
|
38
35
|
import { Mixin } from '@rxap/mixin';
|
|
39
36
|
import { ExtractDatasourceMixin } from '@rxap/material-table-window-system';
|
|
40
37
|
import { staticDataSource, DataSourceLoader, BaseDataSource } from '@rxap/data-source';
|
|
41
38
|
import { GenerateRandomString, coerceArray } from '@rxap/utilities';
|
|
42
39
|
import '@rxap/rxjs';
|
|
43
40
|
import { TableDataSource, AbstractTableDataSource } from '@rxap/data-source/table';
|
|
41
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
44
42
|
|
|
45
43
|
class TableSelectWindowComponent {
|
|
46
|
-
constructor(
|
|
47
|
-
this.data =
|
|
48
|
-
this.selectRows =
|
|
49
|
-
this.windowRef =
|
|
44
|
+
constructor() {
|
|
45
|
+
this.data = inject(RXAP_WINDOW_DATA);
|
|
46
|
+
this.selectRows = inject(SelectRowService);
|
|
47
|
+
this.windowRef = inject(RXAP_WINDOW_REF);
|
|
50
48
|
this.id = this.data.id;
|
|
51
49
|
this.displayColumns = [...this.data.columns.keys()];
|
|
52
50
|
if (this.data.multiple) {
|
|
@@ -73,11 +71,11 @@ class TableSelectWindowComponent {
|
|
|
73
71
|
this.windowRef.next(this.selectRows.selectedRows);
|
|
74
72
|
this.close();
|
|
75
73
|
}
|
|
76
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableSelectWindowComponent, deps: [
|
|
74
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableSelectWindowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
77
75
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: TableSelectWindowComponent, isStandalone: true, selector: "rxap-table-select-window", providers: [
|
|
78
76
|
SelectRowService,
|
|
79
77
|
TableFilterService,
|
|
80
|
-
], 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: i2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: TableDataSourceDirective, selector: "table[mat-table][rxapTableDataSource],mat-table[rxapTableDataSource]", inputs: ["rxapTableDataSource", "paginator", "id", "parameters", "dataSource"], exportAs: ["rxapTableDataSource"] }, { kind: "directive", type: FilterHeaderRowDirective, selector: "table[rxap-filter-header-row]", inputs: ["rxap-filter-header-row"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i4.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i4.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: CheckboxHeaderCellComponent, selector: "th[rxap-checkbox-header-cell]" }, { kind: "component", type: CheckboxCellComponent, selector: "td[rxap-checkbox-cell]", inputs: ["element"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: ParentControlContainerDirective, selector: "[formControlName][parentControlContainer],[formControlGroup][parentControlContainer]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatButton, selector: " button[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: i8.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: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: DateCellComponent, selector: "td[rxap-date-cell]", inputs: ["rxap-date-cell", "format"] }, { kind: "component", type: BooleanCellComponent, selector: "td[rxap-boolean-cell]", inputs: ["rxap-boolean-cell"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i10.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "directive", type: WindowFooterDirective, selector: "[rxapWindowFooter]" }, { kind: "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 }); }
|
|
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 }); }
|
|
81
79
|
}
|
|
82
80
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableSelectWindowComponent, decorators: [{
|
|
83
81
|
type: Component,
|
|
@@ -109,13 +107,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
109
107
|
GetFromObjectPipe,
|
|
110
108
|
FormFieldNoPaddingDirective
|
|
111
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"] }]
|
|
112
|
-
}], ctorParameters: () => [
|
|
113
|
-
type: Inject,
|
|
114
|
-
args: [RXAP_WINDOW_DATA]
|
|
115
|
-
}] }, { type: i1.SelectRowService }, { type: i1$1.WindowRef, decorators: [{
|
|
116
|
-
type: Inject,
|
|
117
|
-
args: [RXAP_WINDOW_REF]
|
|
118
|
-
}] }] });
|
|
110
|
+
}], ctorParameters: () => [] });
|
|
119
111
|
|
|
120
112
|
// TODO : refactor move to package @rxap/ngx-testing
|
|
121
113
|
class MockWindowRef extends Subject {
|
|
@@ -155,13 +147,15 @@ class MockWindowRef extends Subject {
|
|
|
155
147
|
}
|
|
156
148
|
class WindowTestWrapperComponent {
|
|
157
149
|
constructor() {
|
|
150
|
+
this.component = input.required(...(ngDevMode ? [{ debugName: "component" }] : /* istanbul ignore next */ []));
|
|
158
151
|
this.content = null;
|
|
159
152
|
this.footer = null;
|
|
160
153
|
this.injector = inject(INJECTOR);
|
|
161
154
|
this.viewContainerRef = this.injector.get(ViewContainerRef);
|
|
155
|
+
this.portalOutlet = viewChildren(CdkPortalOutlet, ...(ngDevMode ? [{ debugName: "portalOutlet" }] : /* istanbul ignore next */ []));
|
|
162
156
|
}
|
|
163
157
|
ngAfterViewInit() {
|
|
164
|
-
this.portalOutlet.forEach((outlet) => {
|
|
158
|
+
this.portalOutlet().forEach((outlet) => {
|
|
165
159
|
outlet.attached.pipe(tap(attachedRef => {
|
|
166
160
|
if (attachedRef instanceof ComponentRef) {
|
|
167
161
|
console.log('ComponentRef', attachedRef);
|
|
@@ -184,10 +178,10 @@ class WindowTestWrapperComponent {
|
|
|
184
178
|
}],
|
|
185
179
|
});
|
|
186
180
|
windowRef.footerPortal$.pipe(tap((portal) => this.footer = portal)).subscribe();
|
|
187
|
-
this.content = new ComponentPortal(this.component, this.viewContainerRef, injector);
|
|
181
|
+
this.content = new ComponentPortal(this.component(), this.viewContainerRef, injector);
|
|
188
182
|
}
|
|
189
183
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: WindowTestWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
190
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
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: `
|
|
191
185
|
<div class="flex flex-col gap-8">
|
|
192
186
|
<div class="grow">
|
|
193
187
|
<ng-template [cdkPortalOutlet]="content"></ng-template>
|
|
@@ -197,7 +191,7 @@ class WindowTestWrapperComponent {
|
|
|
197
191
|
<ng-template [cdkPortalOutlet]="footer"></ng-template>
|
|
198
192
|
</div>
|
|
199
193
|
</div>
|
|
200
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1$
|
|
194
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }] }); }
|
|
201
195
|
}
|
|
202
196
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: WindowTestWrapperComponent, decorators: [{
|
|
203
197
|
type: Component,
|
|
@@ -217,78 +211,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
217
211
|
PortalModule
|
|
218
212
|
]
|
|
219
213
|
}]
|
|
220
|
-
}], propDecorators: { component: [{
|
|
221
|
-
type: Input,
|
|
222
|
-
args: [{ required: true }]
|
|
223
|
-
}], portalOutlet: [{
|
|
224
|
-
type: ViewChildren,
|
|
225
|
-
args: [CdkPortalOutlet]
|
|
226
|
-
}] } });
|
|
214
|
+
}], propDecorators: { component: [{ type: i0.Input, args: [{ isSignal: true, alias: "component", required: true }] }], portalOutlet: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => CdkPortalOutlet), { isSignal: true }] }] } });
|
|
227
215
|
|
|
228
216
|
class TableSelectInputComponent extends ControlValueAccessor {
|
|
229
217
|
static { this.nextId = 0; }
|
|
230
218
|
get empty() {
|
|
231
|
-
return this._value === null;
|
|
219
|
+
return this._value() === null;
|
|
232
220
|
}
|
|
233
221
|
get shouldLabelFloat() {
|
|
234
222
|
return this.focused || !this.empty;
|
|
235
223
|
}
|
|
236
224
|
get required() {
|
|
237
|
-
return this.
|
|
238
|
-
}
|
|
239
|
-
set required(req) {
|
|
240
|
-
this._required = coerceBooleanProperty(req);
|
|
241
|
-
this.stateChanges.next();
|
|
242
|
-
}
|
|
243
|
-
get disabled() { return this._disabled; }
|
|
244
|
-
set disabled(value) {
|
|
245
|
-
this._disabled = coerceBooleanProperty(value);
|
|
246
|
-
this.stateChanges.next();
|
|
225
|
+
return this.requiredInput();
|
|
247
226
|
}
|
|
227
|
+
get disabled() { return this._disabled(); }
|
|
248
228
|
get errorState() {
|
|
249
229
|
return this.ngControl?.invalid || false;
|
|
250
230
|
}
|
|
251
231
|
get placeholder() {
|
|
252
|
-
return this.
|
|
253
|
-
}
|
|
254
|
-
set placeholder(placeholder) {
|
|
255
|
-
this._placeholder = placeholder;
|
|
256
|
-
this.stateChanges.next();
|
|
232
|
+
return this.placeholderInput();
|
|
257
233
|
}
|
|
258
234
|
set value(value) {
|
|
259
|
-
this._value
|
|
260
|
-
this.stateChanges.next();
|
|
235
|
+
this._value.set(value);
|
|
261
236
|
}
|
|
262
237
|
get value() {
|
|
263
|
-
return this._value;
|
|
238
|
+
return this._value();
|
|
264
239
|
}
|
|
265
|
-
constructor(
|
|
240
|
+
constructor() {
|
|
266
241
|
super();
|
|
267
|
-
this.ngControl =
|
|
268
|
-
this.cdr = cdr;
|
|
242
|
+
this.ngControl = inject(NgControl, { optional: true, self: true });
|
|
269
243
|
this.id = `rxap-table-select-input-${TableSelectInputComponent.nextId++}`;
|
|
270
244
|
this.stateChanges = new Subject();
|
|
271
245
|
this.control = null;
|
|
272
246
|
this.rxapControl = null;
|
|
273
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 */ []));
|
|
274
251
|
this._subscription = new Subscription();
|
|
275
|
-
this.
|
|
276
|
-
this.
|
|
277
|
-
this.
|
|
278
|
-
this._placeholder = '';
|
|
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 */ []));
|
|
279
255
|
// Replace the provider from above with this.
|
|
280
256
|
if (this.ngControl != null) {
|
|
281
257
|
// Setting the value accessor directly (instead of using
|
|
282
258
|
// the providers) to avoid running into a circular import.
|
|
283
259
|
this.ngControl.valueAccessor = this;
|
|
284
260
|
}
|
|
261
|
+
effect(() => {
|
|
262
|
+
this.requiredInput();
|
|
263
|
+
this._disabled();
|
|
264
|
+
this.placeholderInput();
|
|
265
|
+
this._value();
|
|
266
|
+
this.stateChanges.next();
|
|
267
|
+
});
|
|
268
|
+
afterNextRender(() => this.initControl());
|
|
285
269
|
}
|
|
286
270
|
get display() {
|
|
287
|
-
return this._display;
|
|
271
|
+
return this._display();
|
|
288
272
|
}
|
|
289
273
|
set display(value) {
|
|
290
|
-
this._display
|
|
291
|
-
this.cdr.detectChanges();
|
|
274
|
+
this._display.set(value);
|
|
292
275
|
}
|
|
293
276
|
writeValue(value) {
|
|
294
277
|
this.value = value;
|
|
@@ -299,7 +282,7 @@ class TableSelectInputComponent extends ControlValueAccessor {
|
|
|
299
282
|
this.onChange(this.value);
|
|
300
283
|
}
|
|
301
284
|
}
|
|
302
|
-
|
|
285
|
+
initControl() {
|
|
303
286
|
if (this.ngControl) {
|
|
304
287
|
this.control = this.ngControl.control;
|
|
305
288
|
if (this.control instanceof RxapFormControl) {
|
|
@@ -307,12 +290,11 @@ class TableSelectInputComponent extends ControlValueAccessor {
|
|
|
307
290
|
}
|
|
308
291
|
}
|
|
309
292
|
this._subscription.add(this.control?.valueChanges.pipe(startWith(this.control?.value ?? null), delay(100), // TODO : remove timing workaround
|
|
310
|
-
// the
|
|
311
|
-
//
|
|
312
|
-
//
|
|
313
|
-
// execution else for the first this.toDisplay function the default implementation is used
|
|
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
|
|
314
296
|
tap$1(async (value) => this.display = value === null ? '' : await this.toDisplay(value))).subscribe());
|
|
315
|
-
this._subscription.add(this.rxapControl?.disabled$.pipe(tap$1(disabled => this.disabled
|
|
297
|
+
this._subscription.add(this.rxapControl?.disabled$.pipe(tap$1(disabled => this._disabled.set(disabled))).subscribe());
|
|
316
298
|
}
|
|
317
299
|
toDisplay(value) {
|
|
318
300
|
return value;
|
|
@@ -327,8 +309,8 @@ class TableSelectInputComponent extends ControlValueAccessor {
|
|
|
327
309
|
onContainerClick(event) {
|
|
328
310
|
// no op
|
|
329
311
|
}
|
|
330
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableSelectInputComponent, deps: [
|
|
331
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: TableSelectInputComponent, isStandalone: true, selector: "rxap-table-select-input", inputs: {
|
|
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: [
|
|
332
314
|
{
|
|
333
315
|
provide: MatFormFieldControl,
|
|
334
316
|
useExisting: forwardRef(() => TableSelectInputComponent),
|
|
@@ -342,23 +324,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
342
324
|
provide: MatFormFieldControl,
|
|
343
325
|
useExisting: forwardRef(() => TableSelectInputComponent),
|
|
344
326
|
},
|
|
345
|
-
],
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
}] }, { type: i0.ChangeDetectorRef }], propDecorators: { id: [{
|
|
351
|
-
type: HostBinding
|
|
352
|
-
}], shouldLabelFloat: [{
|
|
353
|
-
type: HostBinding,
|
|
354
|
-
args: ['class.floating']
|
|
355
|
-
}], required: [{
|
|
356
|
-
type: Input
|
|
357
|
-
}], disabled: [{
|
|
358
|
-
type: Input
|
|
359
|
-
}], placeholder: [{
|
|
360
|
-
type: Input
|
|
361
|
-
}] } });
|
|
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 }] }] } });
|
|
362
332
|
|
|
363
333
|
function CreateFilterFormProvider(columns) {
|
|
364
334
|
const columnNameList = Array.from(columns.entries())
|
|
@@ -383,7 +353,7 @@ function CreateFilterFormProvider(columns) {
|
|
|
383
353
|
const TABLE_SELECT_COLUMN_MAP = 'TABLE_SELECT_COLUMN_MAP';
|
|
384
354
|
const TABLE_SELECT_TO_DISPLAY = 'TABLE_SELECT_TO_DISPLAY';
|
|
385
355
|
const TABLE_SELECT_TO_VALUE = 'TABLE_SELECT_TO_VALUE';
|
|
386
|
-
const TABLE_SELECT_METHOD = '
|
|
356
|
+
const TABLE_SELECT_METHOD = 'TABLE_SELECT_METHOD';
|
|
387
357
|
const TABLE_SELECT_DATA_SOURCE = 'TABLE_SELECT_DATA_SOURCE';
|
|
388
358
|
function UseTableSelectColumns(columnMap) {
|
|
389
359
|
return function (target, propertyKey) {
|
|
@@ -467,9 +437,9 @@ ExtractTableSelectToValueMixin = __decorate([
|
|
|
467
437
|
], ExtractTableSelectToValueMixin);
|
|
468
438
|
|
|
469
439
|
class OpenTableSelectWindowMethod {
|
|
470
|
-
constructor(
|
|
471
|
-
this.windowService =
|
|
472
|
-
this.injector =
|
|
440
|
+
constructor() {
|
|
441
|
+
this.windowService = inject(WindowService);
|
|
442
|
+
this.injector = inject(INJECTOR);
|
|
473
443
|
}
|
|
474
444
|
async call(parameters) {
|
|
475
445
|
const providers = [
|
|
@@ -539,23 +509,30 @@ class OpenTableSelectWindowMethod {
|
|
|
539
509
|
createFilterForm(columns) {
|
|
540
510
|
return CreateFilterFormProvider(columns);
|
|
541
511
|
}
|
|
542
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenTableSelectWindowMethod, deps: [
|
|
512
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenTableSelectWindowMethod, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
543
513
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenTableSelectWindowMethod }); }
|
|
544
514
|
}
|
|
545
515
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenTableSelectWindowMethod, decorators: [{
|
|
546
516
|
type: Injectable
|
|
547
|
-
}]
|
|
548
|
-
type: Inject,
|
|
549
|
-
args: [INJECTOR]
|
|
550
|
-
}] }] });
|
|
517
|
+
}] });
|
|
551
518
|
|
|
552
519
|
let OpenTableSelectWindowDirective = class OpenTableSelectWindowDirective {
|
|
553
520
|
constructor() {
|
|
554
|
-
this.
|
|
555
|
-
this.
|
|
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 */ []));
|
|
556
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 */ []));
|
|
557
535
|
this.multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
|
|
558
|
-
this.type = 'button';
|
|
559
536
|
// required for the use mixin ExtractDatasourceMixin
|
|
560
537
|
this.dataSourceLoader = inject(DataSourceLoader);
|
|
561
538
|
this._hasOpenWindow = false;
|
|
@@ -563,20 +540,21 @@ let OpenTableSelectWindowDirective = class OpenTableSelectWindowDirective {
|
|
|
563
540
|
this.windowService = inject(WindowService);
|
|
564
541
|
this.injector = inject(INJECTOR);
|
|
565
542
|
this.matButton = inject(MatButton, { optional: true });
|
|
566
|
-
this.
|
|
567
|
-
this.
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
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());
|
|
577
555
|
}
|
|
578
|
-
|
|
579
|
-
this.
|
|
556
|
+
setDisabled(value) {
|
|
557
|
+
this._disabled.set(value);
|
|
580
558
|
}
|
|
581
559
|
ngOnDestroy() {
|
|
582
560
|
if (this.windowService.has(this._internalId)) {
|
|
@@ -585,40 +563,48 @@ let OpenTableSelectWindowDirective = class OpenTableSelectWindowDirective {
|
|
|
585
563
|
}
|
|
586
564
|
async onClick($event) {
|
|
587
565
|
$event.stopPropagation();
|
|
588
|
-
if (this.disabled || this._hasOpenWindow) {
|
|
589
|
-
console.debug('disabled or has open window', { disabled: this.disabled, hasOpenWindow: this._hasOpenWindow });
|
|
566
|
+
if (this.disabled() || this._hasOpenWindow) {
|
|
567
|
+
console.debug('disabled or has open window', { disabled: this.disabled(), hasOpenWindow: this._hasOpenWindow });
|
|
590
568
|
return;
|
|
591
569
|
}
|
|
592
|
-
|
|
570
|
+
const data = this.data();
|
|
571
|
+
const columns = this.columns();
|
|
572
|
+
if (!data || !columns) {
|
|
593
573
|
throw new Error('FATAL: The data or columns input is not set');
|
|
594
574
|
}
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
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
|
+
}
|
|
613
598
|
if (isDevMode()) {
|
|
614
599
|
console.debug('selected', selected);
|
|
615
600
|
}
|
|
616
|
-
this.selected
|
|
617
|
-
|
|
618
|
-
this.selectedChange.emit(
|
|
619
|
-
if (
|
|
620
|
-
|
|
621
|
-
|
|
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]));
|
|
622
608
|
}
|
|
623
609
|
else {
|
|
624
610
|
throw new Error('The toValue method is not defined');
|
|
@@ -628,51 +614,52 @@ let OpenTableSelectWindowDirective = class OpenTableSelectWindowDirective {
|
|
|
628
614
|
this.control?.reset();
|
|
629
615
|
}
|
|
630
616
|
}
|
|
631
|
-
|
|
617
|
+
initFromFormField() {
|
|
632
618
|
const hasNgControl = !!this.injector.get(NgControl, null);
|
|
633
619
|
const hasMatFormField = !!this.injector.get(MatFormField, null);
|
|
634
620
|
if (hasMatFormField || hasNgControl) {
|
|
635
621
|
this.matFormField = this.injector.get(MatFormField);
|
|
636
622
|
this.ngControl = this.matFormField._control.ngControl;
|
|
637
623
|
this.control ??= this.ngControl?.control ?? null;
|
|
638
|
-
this.data
|
|
639
|
-
|
|
640
|
-
|
|
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
|
+
}
|
|
641
633
|
if (this.control) {
|
|
642
|
-
this.
|
|
634
|
+
this.setDisabled(this.control.disabled);
|
|
643
635
|
this.control.registerOnDisabledChange(isDisabled => {
|
|
644
|
-
this.
|
|
636
|
+
this.setDisabled(isDisabled);
|
|
645
637
|
});
|
|
646
638
|
}
|
|
647
639
|
}
|
|
648
|
-
this.checkInputs();
|
|
649
640
|
}
|
|
650
|
-
checkInputs() {
|
|
651
|
-
if (!
|
|
641
|
+
checkInputs(data, columns, disabled) {
|
|
642
|
+
if (!columns || !data) {
|
|
652
643
|
console.warn('columns or data is not defined');
|
|
653
|
-
this.invalidInputs = true;
|
|
654
|
-
if (this.matButton) {
|
|
655
|
-
this.matButton.disabled = this.disabled;
|
|
656
|
-
}
|
|
657
644
|
}
|
|
658
645
|
else {
|
|
659
|
-
if (typeof
|
|
646
|
+
if (typeof columns !== 'object') {
|
|
660
647
|
throw new Error('Ensure that the input columns has a valid value');
|
|
661
648
|
}
|
|
662
|
-
if (!Array.isArray(
|
|
649
|
+
if (!Array.isArray(data) && !(data instanceof BaseDataSource)) {
|
|
663
650
|
throw new Error('Ensure that the input data has a valid value');
|
|
664
651
|
}
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
}
|
|
652
|
+
}
|
|
653
|
+
if (this.matButton) {
|
|
654
|
+
this.matButton.disabled = disabled;
|
|
669
655
|
}
|
|
670
656
|
}
|
|
671
657
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenTableSelectWindowDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
672
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: OpenTableSelectWindowDirective, isStandalone: true, selector: "[rxapOpenTableSelectWindow]", inputs: {
|
|
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 }); }
|
|
673
659
|
};
|
|
674
660
|
OpenTableSelectWindowDirective = __decorate([
|
|
675
|
-
Mixin(ExtractTableSelectDataSourceMixin, ExtractTableSelectColumnMapMixin, ExtractTableSelectToValueMixin)
|
|
661
|
+
Mixin(ExtractTableSelectDataSourceMixin, ExtractTableSelectColumnMapMixin, ExtractTableSelectToValueMixin),
|
|
662
|
+
__metadata("design:paramtypes", [])
|
|
676
663
|
], OpenTableSelectWindowDirective);
|
|
677
664
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenTableSelectWindowDirective, decorators: [{
|
|
678
665
|
type: Directive,
|
|
@@ -680,76 +667,85 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
680
667
|
selector: '[rxapOpenTableSelectWindow]',
|
|
681
668
|
standalone: true,
|
|
682
669
|
providers: [OpenTableSelectWindowMethod],
|
|
670
|
+
host: {
|
|
671
|
+
type: 'button',
|
|
672
|
+
'[disabled]': 'disabled()',
|
|
673
|
+
'(click)': 'onClick($event)',
|
|
674
|
+
},
|
|
683
675
|
}]
|
|
684
|
-
}], propDecorators: { data: [{
|
|
685
|
-
type: Input
|
|
686
|
-
}], columns: [{
|
|
687
|
-
type: Input
|
|
688
|
-
}], selected: [{
|
|
689
|
-
type: Input
|
|
690
|
-
}], parameters: [{
|
|
691
|
-
type: Input
|
|
692
|
-
}], selectedChange: [{
|
|
693
|
-
type: Output
|
|
694
|
-
}], label: [{
|
|
695
|
-
type: Input
|
|
696
|
-
}], id: [{
|
|
697
|
-
type: Input
|
|
698
|
-
}], compareWith: [{
|
|
699
|
-
type: Input
|
|
700
|
-
}], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], type: [{
|
|
701
|
-
type: HostBinding,
|
|
702
|
-
args: ['type']
|
|
703
|
-
}], disabled: [{
|
|
704
|
-
type: HostBinding,
|
|
705
|
-
args: ['disabled']
|
|
706
|
-
}], toValue: [{
|
|
707
|
-
type: Input
|
|
708
|
-
}], onClick: [{
|
|
709
|
-
type: HostListener,
|
|
710
|
-
args: ['click', ['$event']]
|
|
711
|
-
}] } });
|
|
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 }] }] } });
|
|
712
677
|
|
|
713
678
|
let TableSelectControlDirective = class TableSelectControlDirective {
|
|
679
|
+
get selected() {
|
|
680
|
+
return this.value !== null ? [this.value] : [];
|
|
681
|
+
}
|
|
714
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 */ []));
|
|
715
689
|
this.ngControl = null;
|
|
716
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 */ []));
|
|
717
696
|
this.injector = inject(INJECTOR);
|
|
718
697
|
// required for the use mixin ExtractDatasourceMixin
|
|
719
698
|
this.dataSourceLoader = inject(DataSourceLoader);
|
|
720
|
-
this.disabled = false;
|
|
699
|
+
this.disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
721
700
|
this.matFormField = null;
|
|
722
|
-
this.
|
|
723
|
-
this.toDisplay =
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
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());
|
|
736
733
|
}
|
|
737
|
-
|
|
734
|
+
initFromFormField() {
|
|
738
735
|
this.matFormField = this.injector.get(MatFormField, null);
|
|
739
736
|
if (!this.matFormField) {
|
|
740
737
|
throw new Error('The mat form field could not be injected');
|
|
741
738
|
}
|
|
742
739
|
this.ngControl = this.matFormField._control.ngControl;
|
|
743
740
|
if (this.ngControl) {
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
this.
|
|
747
|
-
this.
|
|
748
|
-
this.
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
this._subscription?.add(this.control.disabled$.pipe(tap$1(disabled => this.disabled = disabled), tap$1(() => this.updateOpenTableSelectWindowDisabledState())).subscribe());
|
|
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();
|
|
753
749
|
}
|
|
754
750
|
}
|
|
755
751
|
else {
|
|
@@ -757,72 +753,46 @@ let TableSelectControlDirective = class TableSelectControlDirective {
|
|
|
757
753
|
console.log('standalone mode');
|
|
758
754
|
}
|
|
759
755
|
}
|
|
760
|
-
this.updateTableSelectInput();
|
|
761
756
|
}
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
ngOnDestroy() {
|
|
769
|
-
this._subscription?.unsubscribe();
|
|
770
|
-
}
|
|
771
|
-
updateTableSelectInput() {
|
|
772
|
-
if (this.toDisplay) {
|
|
773
|
-
this.tableSelectInput.toDisplay = this.toDisplay.bind(this);
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
updateOpenTableSelectWindowDisabledState() {
|
|
777
|
-
for (const openTableSelectWindow of this.openTableSelectWindow) {
|
|
778
|
-
openTableSelectWindow.disabled = this.disabled;
|
|
779
|
-
openTableSelectWindow.checkInputs();
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
updateOpenTableSelectWindow() {
|
|
783
|
-
for (const openTableSelectWindow of this.openTableSelectWindow) {
|
|
784
|
-
openTableSelectWindow.disabled = this.disabled;
|
|
785
|
-
if (this.columns) {
|
|
786
|
-
openTableSelectWindow.columns = this.columns;
|
|
757
|
+
updateOpenTableSelectWindow(windows, columns, data, toValue, matLabel) {
|
|
758
|
+
for (const openTableSelectWindow of windows) {
|
|
759
|
+
if (columns) {
|
|
760
|
+
openTableSelectWindow.columns.set(columns);
|
|
787
761
|
}
|
|
788
|
-
if (
|
|
789
|
-
openTableSelectWindow.data
|
|
762
|
+
if (data) {
|
|
763
|
+
openTableSelectWindow.data.set(data);
|
|
790
764
|
}
|
|
791
|
-
if (
|
|
792
|
-
openTableSelectWindow.compareWith
|
|
793
|
-
if (this.toValue) {
|
|
794
|
-
return this.toValue(o1) === this.toValue(o2);
|
|
795
|
-
}
|
|
796
|
-
return o1 === o2;
|
|
797
|
-
});
|
|
765
|
+
if (toValue) {
|
|
766
|
+
openTableSelectWindow.compareWith.set((o1, o2) => toValue(o1) === toValue(o2));
|
|
798
767
|
}
|
|
799
|
-
if (
|
|
800
|
-
openTableSelectWindow.label
|
|
768
|
+
if (matLabel) {
|
|
769
|
+
openTableSelectWindow.label.set(matLabel.nativeElement.innerText);
|
|
801
770
|
}
|
|
802
771
|
if (this.ngControl) {
|
|
803
772
|
const control = this.ngControl.control;
|
|
804
773
|
if (control?.value) {
|
|
805
|
-
openTableSelectWindow.selected
|
|
774
|
+
openTableSelectWindow.selected.set(coerceArray(control.value));
|
|
806
775
|
}
|
|
807
776
|
}
|
|
808
|
-
openTableSelectWindow.checkInputs();
|
|
809
777
|
}
|
|
810
778
|
}
|
|
811
779
|
async onSelected($event) {
|
|
780
|
+
const tableSelectInput = this.tableSelectInput();
|
|
812
781
|
if ($event?.length) {
|
|
813
|
-
|
|
782
|
+
tableSelectInput.display = await this.toDisplay()($event[0]);
|
|
814
783
|
this.value = $event[0];
|
|
815
|
-
|
|
784
|
+
tableSelectInput.setValue(this.value);
|
|
816
785
|
}
|
|
817
786
|
else {
|
|
818
787
|
this.value = null;
|
|
819
788
|
}
|
|
820
789
|
}
|
|
821
790
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableSelectControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
822
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
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 }); }
|
|
823
792
|
};
|
|
824
793
|
TableSelectControlDirective = __decorate([
|
|
825
|
-
Mixin(ExtractTableSelectDataSourceMixin, ExtractTableSelectToValueMixin, ExtractTableSelectToDisplayMixin, ExtractTableSelectColumnMapMixin)
|
|
794
|
+
Mixin(ExtractTableSelectDataSourceMixin, ExtractTableSelectToValueMixin, ExtractTableSelectToDisplayMixin, ExtractTableSelectColumnMapMixin),
|
|
795
|
+
__metadata("design:paramtypes", [])
|
|
826
796
|
], TableSelectControlDirective);
|
|
827
797
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableSelectControlDirective, decorators: [{
|
|
828
798
|
type: Directive,
|
|
@@ -830,62 +800,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
830
800
|
selector: 'mat-form-field[rxapTableSelectControl]',
|
|
831
801
|
standalone: true,
|
|
832
802
|
}]
|
|
833
|
-
}], propDecorators: { multiple: [{
|
|
834
|
-
type: Input
|
|
835
|
-
}], openMethod: [{
|
|
836
|
-
type: Input
|
|
837
|
-
}], data: [{
|
|
838
|
-
type: Input
|
|
839
|
-
}], columns: [{
|
|
840
|
-
type: Input
|
|
841
|
-
}], openTableSelectWindow: [{
|
|
842
|
-
type: ContentChildren,
|
|
843
|
-
args: [OpenTableSelectWindowDirective]
|
|
844
|
-
}], tableSelectInput: [{
|
|
845
|
-
type: ContentChild,
|
|
846
|
-
args: [TableSelectInputComponent]
|
|
847
|
-
}], matLabel: [{
|
|
848
|
-
type: ContentChild,
|
|
849
|
-
args: ['mat-label']
|
|
850
|
-
}], toValue: [{
|
|
851
|
-
type: Input
|
|
852
|
-
}], toDisplay: [{
|
|
853
|
-
type: Input
|
|
854
|
-
}] } });
|
|
855
|
-
|
|
856
|
-
class TableSelectControlModule {
|
|
857
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableSelectControlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
858
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: TableSelectControlModule, imports: [OpenTableSelectWindowDirective,
|
|
859
|
-
TableSelectControlDirective,
|
|
860
|
-
TableSelectInputComponent,
|
|
861
|
-
TableSelectWindowComponent], exports: [OpenTableSelectWindowDirective,
|
|
862
|
-
TableSelectControlDirective,
|
|
863
|
-
TableSelectInputComponent,
|
|
864
|
-
TableSelectWindowComponent] }); }
|
|
865
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableSelectControlModule, providers: [
|
|
866
|
-
OpenTableSelectWindowMethod,
|
|
867
|
-
], imports: [TableSelectWindowComponent] }); }
|
|
868
|
-
}
|
|
869
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableSelectControlModule, decorators: [{
|
|
870
|
-
type: NgModule,
|
|
871
|
-
args: [{
|
|
872
|
-
imports: [
|
|
873
|
-
OpenTableSelectWindowDirective,
|
|
874
|
-
TableSelectControlDirective,
|
|
875
|
-
TableSelectInputComponent,
|
|
876
|
-
TableSelectWindowComponent,
|
|
877
|
-
],
|
|
878
|
-
exports: [
|
|
879
|
-
OpenTableSelectWindowDirective,
|
|
880
|
-
TableSelectControlDirective,
|
|
881
|
-
TableSelectInputComponent,
|
|
882
|
-
TableSelectWindowComponent,
|
|
883
|
-
],
|
|
884
|
-
providers: [
|
|
885
|
-
OpenTableSelectWindowMethod,
|
|
886
|
-
],
|
|
887
|
-
}]
|
|
888
|
-
}] });
|
|
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 }] }] } });
|
|
889
804
|
|
|
890
805
|
// region table-select-window
|
|
891
806
|
// endregion
|
|
@@ -894,5 +809,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
894
809
|
* Generated bundle index. Do not edit.
|
|
895
810
|
*/
|
|
896
811
|
|
|
897
|
-
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,
|
|
812
|
+
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 };
|
|
898
813
|
//# sourceMappingURL=rxap-ngx-material-table-select.mjs.map
|