@rxap/material-table-window-system 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.
Files changed (43) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/compodoc/changelog.html +32 -0
  3. package/compodoc/classes/ExtractDatasourceMixin.html +22 -42
  4. package/compodoc/dependencies.html +8 -8
  5. package/compodoc/directives/OpenTableSelectDirective.html +66 -316
  6. package/compodoc/graph/dependencies.svg +4 -30
  7. package/compodoc/injectables/WindowTableSelectService.html +6 -78
  8. package/compodoc/interfaces/WindowTableSelectOptions.html +4 -16
  9. package/compodoc/js/menu-wc.js +13 -29
  10. package/compodoc/js/menu-wc_es5.js +1 -1
  11. package/compodoc/js/search/search_index.js +2 -2
  12. package/compodoc/modules.html +0 -17
  13. package/compodoc/overview.html +1 -73
  14. package/compodoc/properties.html +1 -1
  15. package/docs/documentation.json +280 -516
  16. package/docs/html/assets/navigation.js +1 -1
  17. package/docs/html/assets/search.js +1 -1
  18. package/docs/html/classes/ExtractDatasourceMixin.html +2 -2
  19. package/docs/html/classes/OpenTableSelectDirective.html +4 -5
  20. package/docs/html/classes/WindowTableSelectService.html +2 -2
  21. package/docs/html/hierarchy.html +1 -1
  22. package/docs/html/index.html +2 -2
  23. package/docs/html/interfaces/WindowTableSelectOptions.html +2 -2
  24. package/docs/html/modules.html +1 -1
  25. package/docs/markdown/README.md +1 -1
  26. package/docs/markdown/classes/ExtractDatasourceMixin.md +12 -12
  27. package/docs/markdown/classes/OpenTableSelectDirective.md +18 -46
  28. package/docs/markdown/classes/WindowTableSelectService.md +4 -16
  29. package/docs/markdown/globals.md +2 -3
  30. package/docs/markdown/interfaces/WindowTableSelectOptions.md +8 -8
  31. package/docs/wiki/Class.ExtractDatasourceMixin.md +11 -11
  32. package/docs/wiki/Class.OpenTableSelectDirective.md +17 -45
  33. package/docs/wiki/Class.WindowTableSelectService.md +3 -15
  34. package/docs/wiki/Interface.WindowTableSelectOptions.md +7 -7
  35. package/docs/wiki/_Sidebar.md +0 -1
  36. package/docs/wiki/globals.md +1 -2
  37. package/fesm2022/rxap-material-table-window-system.mjs +24 -68
  38. package/fesm2022/rxap-material-table-window-system.mjs.map +1 -1
  39. package/package.json +32 -32
  40. package/types/rxap-material-table-window-system.d.ts +6 -17
  41. package/docs/html/classes/WindowTableSelectModule.html +0 -2
  42. package/docs/markdown/classes/WindowTableSelectModule.md +0 -19
  43. package/docs/wiki/Class.WindowTableSelectModule.md +0 -15
@@ -1,19 +1,16 @@
1
- import { __decorate, __metadata } from 'tslib';
1
+ import { __decorate } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
- import { isDevMode, INJECTOR, ViewContainerRef, Injector, HostListener, Input, HostBinding, Inject, Directive, ComponentRef, Injectable, NgModule } from '@angular/core';
4
- import * as i1 from '@angular/material/form-field';
5
- import { MAT_FORM_FIELD, MatFormField } from '@angular/material/form-field';
3
+ import { inject, INJECTOR, ViewContainerRef, input, isDevMode, Directive, Injector, ComponentRef, Injectable } from '@angular/core';
4
+ import { MAT_FORM_FIELD } from '@angular/material/form-field';
6
5
  import { MatSelect } from '@angular/material/select';
7
- import * as i2 from '@rxap/data-source';
8
6
  import { PipeDataSource, DataSourceLoader } from '@rxap/data-source';
9
7
  import { ExtractFormDefinitionMixin, ExtractDataSourcesMixin } from '@rxap/form-system';
10
8
  import { RxapFormControl } from '@rxap/forms';
11
9
  import { Mixin } from '@rxap/mixin';
12
10
  import { coerceArray } from '@rxap/utilities';
13
11
  import { map, take, tap } from 'rxjs/operators';
12
+ import { WindowService, RXAP_WINDOW_SETTINGS } from '@rxap/window-system';
14
13
  import { RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS, TABLE_DATA_SOURCE, TABLE_REMOTE_METHOD, RXAP_TABLE_METHOD, TableSelectControlsComponent } from '@rxap/material-table-system';
15
- import * as i1$1 from '@rxap/window-system';
16
- import { RXAP_WINDOW_SETTINGS, WindowService } from '@rxap/window-system';
17
14
  import { TableDataSource } from '@rxap/data-source/table';
18
15
  import { ComponentPortal } from '@angular/cdk/portal';
19
16
 
@@ -52,12 +49,12 @@ ExtractDatasourceMixin = __decorate([
52
49
  Mixin(ExtractFormDefinitionMixin, ExtractDataSourcesMixin)
53
50
  ], ExtractDatasourceMixin);
54
51
  let OpenTableSelectDirective = class OpenTableSelectDirective {
55
- constructor(formField, dataSourceLoader, injector, viewContainerRef) {
56
- this.formField = formField;
57
- this.dataSourceLoader = dataSourceLoader;
58
- this.injector = injector;
59
- this.viewContainerRef = viewContainerRef;
60
- this.type = 'button';
52
+ constructor() {
53
+ this.formField = inject(MAT_FORM_FIELD);
54
+ this.dataSourceLoader = inject(DataSourceLoader);
55
+ this.injector = inject(INJECTOR);
56
+ this.viewContainerRef = inject(ViewContainerRef);
57
+ this.openMethod = input.required({ ...(ngDevMode ? { debugName: "openMethod" } : /* istanbul ignore next */ {}), alias: "rxapOpenTableSelect" });
61
58
  this._windowRef = null;
62
59
  }
63
60
  ngOnInit() {
@@ -77,7 +74,7 @@ let OpenTableSelectDirective = class OpenTableSelectDirective {
77
74
  }));
78
75
  }
79
76
  async onClick() {
80
- const selected$ = this.openMethod.call({
77
+ const selected$ = this.openMethod().call({
81
78
  data: this.tableSelectDataSource,
82
79
  selected: coerceArray(this.control?.value),
83
80
  multiple: this.isMultiple(),
@@ -112,49 +109,28 @@ let OpenTableSelectDirective = class OpenTableSelectDirective {
112
109
  }
113
110
  return false;
114
111
  }
115
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenTableSelectDirective, deps: [{ token: MAT_FORM_FIELD }, { token: DataSourceLoader }, { token: INJECTOR }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
116
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: OpenTableSelectDirective, isStandalone: true, selector: "[rxapOpenTableSelect]", inputs: { openMethod: ["rxapOpenTableSelect", "openMethod"] }, host: { listeners: { "click": "onClick()" }, properties: { "type": "this.type" } }, ngImport: i0 }); }
112
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenTableSelectDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
113
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: OpenTableSelectDirective, isStandalone: true, selector: "[rxapOpenTableSelect]", inputs: { openMethod: { classPropertyName: "openMethod", publicName: "rxapOpenTableSelect", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "onClick()" } }, ngImport: i0 }); }
117
114
  };
118
115
  OpenTableSelectDirective = __decorate([
119
- Mixin(ExtractDatasourceMixin),
120
- __metadata("design:paramtypes", [MatFormField,
121
- DataSourceLoader,
122
- Injector,
123
- ViewContainerRef])
116
+ Mixin(ExtractDatasourceMixin)
124
117
  ], OpenTableSelectDirective);
125
118
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenTableSelectDirective, decorators: [{
126
119
  type: Directive,
127
120
  args: [{
128
121
  selector: '[rxapOpenTableSelect]',
129
122
  standalone: true,
123
+ host: {
124
+ type: 'button',
125
+ '(click)': 'onClick()',
126
+ },
130
127
  }]
131
- }], ctorParameters: () => [{ type: i1.MatFormField, decorators: [{
132
- type: Inject,
133
- args: [MAT_FORM_FIELD]
134
- }] }, { type: i2.DataSourceLoader, decorators: [{
135
- type: Inject,
136
- args: [DataSourceLoader]
137
- }] }, { type: i0.Injector, decorators: [{
138
- type: Inject,
139
- args: [INJECTOR]
140
- }] }, { type: i0.ViewContainerRef, decorators: [{
141
- type: Inject,
142
- args: [ViewContainerRef]
143
- }] }], propDecorators: { type: [{
144
- type: HostBinding,
145
- args: ['type']
146
- }], openMethod: [{
147
- type: Input,
148
- args: ['rxapOpenTableSelect']
149
- }], onClick: [{
150
- type: HostListener,
151
- args: ['click']
152
- }] } });
128
+ }], propDecorators: { openMethod: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapOpenTableSelect", required: true }] }] } });
153
129
 
154
130
  class WindowTableSelectService {
155
- constructor(windowService, injector) {
156
- this.windowService = windowService;
157
- this.injector = injector;
131
+ constructor() {
132
+ this.windowService = inject(WindowService);
133
+ this.injector = inject(INJECTOR);
158
134
  }
159
135
  open(component, options, windowConfig = {}) {
160
136
  const providers = [
@@ -222,32 +198,12 @@ class WindowTableSelectService {
222
198
  promise.windowRef = windowRef;
223
199
  return promise;
224
200
  }
225
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: WindowTableSelectService, deps: [{ token: WindowService }, { token: INJECTOR }], target: i0.ɵɵFactoryTarget.Injectable }); }
201
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: WindowTableSelectService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
226
202
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: WindowTableSelectService, providedIn: 'root' }); }
227
203
  }
228
204
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: WindowTableSelectService, decorators: [{
229
205
  type: Injectable,
230
206
  args: [{ providedIn: 'root' }]
231
- }], ctorParameters: () => [{ type: i1$1.WindowService, decorators: [{
232
- type: Inject,
233
- args: [WindowService]
234
- }] }, { type: i0.Injector, decorators: [{
235
- type: Inject,
236
- args: [INJECTOR]
237
- }] }] });
238
-
239
- class WindowTableSelectModule {
240
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: WindowTableSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
241
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: WindowTableSelectModule, imports: [TableSelectControlsComponent], exports: [TableSelectControlsComponent] }); }
242
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: WindowTableSelectModule, providers: [WindowTableSelectService], imports: [TableSelectControlsComponent] }); }
243
- }
244
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: WindowTableSelectModule, decorators: [{
245
- type: NgModule,
246
- args: [{
247
- imports: [TableSelectControlsComponent],
248
- exports: [TableSelectControlsComponent],
249
- providers: [WindowTableSelectService],
250
- }]
251
207
  }] });
252
208
 
253
209
  // region
@@ -257,5 +213,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
257
213
  * Generated bundle index. Do not edit.
258
214
  */
259
215
 
260
- export { ExtractDatasourceMixin, OpenTableSelectDirective, WindowTableSelectModule, WindowTableSelectService };
216
+ export { ExtractDatasourceMixin, OpenTableSelectDirective, WindowTableSelectService };
261
217
  //# sourceMappingURL=rxap-material-table-window-system.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"rxap-material-table-window-system.mjs","sources":["../../../../../../packages/angular/material/table-window-system/src/lib/open-table-select.directive.ts","../../../../../../packages/angular/material/table-window-system/src/lib/window-table-select.service.ts","../../../../../../packages/angular/material/table-window-system/src/lib/window-table-select.module.ts","../../../../../../packages/angular/material/table-window-system/src/index.ts","../../../../../../packages/angular/material/table-window-system/src/rxap-material-table-window-system.ts"],"sourcesContent":["import {\n Directive,\n HostBinding,\n HostListener,\n Inject,\n INJECTOR,\n Injector,\n Input,\n isDevMode,\n OnDestroy,\n OnInit,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n MAT_FORM_FIELD,\n MatFormField,\n} from '@angular/material/form-field';\nimport { MatSelect } from '@angular/material/select';\nimport {\n BaseDataSource,\n BaseDataSourceMetadata,\n DataSourceLoader,\n PipeDataSource,\n} from '@rxap/data-source';\nimport {\n ExtractDataSourcesMixin,\n ExtractFormDefinitionMixin,\n} from '@rxap/form-system';\nimport { RxapFormControl } from '@rxap/forms';\nimport { Mixin } from '@rxap/mixin';\nimport { Method } from '@rxap/pattern';\nimport {\n coerceArray,\n ControlOptions,\n} from '@rxap/utilities';\nimport { WindowRef } from '@rxap/window-system';\nimport { map } from 'rxjs/operators';\nimport { WindowTableSelectOptions } from './window-table-select.service';\n\nexport interface ExtractDatasourceMixin extends ExtractFormDefinitionMixin, ExtractDataSourcesMixin {\n}\n\n@Mixin(ExtractFormDefinitionMixin, ExtractDataSourcesMixin)\nexport class ExtractDatasourceMixin {\n\n public metadata?: BaseDataSourceMetadata;\n protected control?: RxapFormControl;\n protected injector!: Injector;\n protected dataSourceLoader!: DataSourceLoader;\n protected dataSource!: BaseDataSource<ControlOptions | Record<string, any>>;\n\n // TODO : mv to rxap and replace in InputSelectOptionsDirective\n protected extractDatasource(\n dataSourceName: string,\n control: RxapFormControl | undefined = this.control,\n ): BaseDataSource<ControlOptions | Record<string, any>> {\n\n const useDataSourceValue = this.extractDataSourceValue(dataSourceName, control);\n\n let dataSource = this.dataSourceLoader.load(\n useDataSourceValue.dataSource,\n this.metadata,\n this.injector,\n );\n\n const settings = useDataSourceValue.settings;\n\n if (settings?.transformer) {\n dataSource = new PipeDataSource(dataSource, map(settings.transformer));\n }\n\n return this.dataSource = dataSource;\n }\n\n protected extractDataSourceValue(\n dataSourceName: string,\n control: RxapFormControl | undefined = this.control,\n ) {\n\n if (!control) {\n throw new Error('The control is not defined');\n }\n\n const formDefinition = this.extractFormDefinition(control);\n\n const useDataSourceValueMap = this.extractDataSources(formDefinition, control.controlId);\n\n if (!useDataSourceValueMap.has(dataSourceName)) {\n throw new Error(`The data source with the name 'options' is not defined`);\n }\n\n return useDataSourceValueMap.get(dataSourceName)!;\n }\n\n protected extractDataSourceTransformer(\n dataSourceName: string,\n control: RxapFormControl | undefined = this.control,\n ) {\n\n if (!control) {\n throw new Error('The control is not defined');\n }\n\n const useDataSourceValue = this.extractDataSourceValue(dataSourceName, control);\n const settings = useDataSourceValue.settings;\n return settings?.transformer ?? (v => v);\n }\n\n}\n\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface OpenTableSelectDirective<Data extends Record<string, any>> extends ExtractDatasourceMixin {\n}\n\n@Mixin(ExtractDatasourceMixin)\n@Directive({\n selector: '[rxapOpenTableSelect]',\n standalone: true,\n})\nexport class OpenTableSelectDirective<Data extends Record<string, any>> implements OnInit, OnDestroy {\n\n @HostBinding('type')\n public type = 'button';\n\n @Input('rxapOpenTableSelect')\n public openMethod!: Method<Data[], WindowTableSelectOptions<Data>>;\n\n private tableSelectDataSource!: BaseDataSource<Data[]>;\n\n private _windowRef: WindowRef | null = null;\n\n constructor(\n @Inject(MAT_FORM_FIELD)\n private readonly formField: MatFormField,\n @Inject(DataSourceLoader)\n protected readonly dataSourceLoader: DataSourceLoader,\n @Inject(INJECTOR)\n protected readonly injector: Injector,\n @Inject(ViewContainerRef)\n private readonly viewContainerRef: ViewContainerRef,\n ) {\n }\n\n public ngOnInit() {\n const control = this.formField._control.ngControl?.control;\n\n if (!control) {\n throw new Error('Could not extract the control from the form field');\n }\n\n if (!(control instanceof RxapFormControl)) {\n throw new Error('The control is not an instance of RxapFormControl');\n }\n\n this.extractDatasource('options', this.control = control);\n\n this.tableSelectDataSource = new PipeDataSource(this.dataSource, map(source => {\n\n if (!Array.isArray(source)) {\n throw new Error('Only control options data source are supported as source data source for a select table');\n }\n\n return source.map(item => item.value);\n }));\n\n }\n\n @HostListener('click')\n public async onClick() {\n const selected$ = this.openMethod.call({\n data: this.tableSelectDataSource,\n selected: coerceArray(this.control?.value),\n multiple: this.isMultiple(),\n injector: this.injector,\n viewContainerRef: this.viewContainerRef,\n });\n // set the component windowRef. If the component is destroyed\n // before the promise is resolved. The window is closed in\n // the ngOnDestroy hook\n this._windowRef = (selected$ as any).windowRef ?? null;\n const selected = await selected$;\n this._windowRef = null;\n if (isDevMode()) {\n console.log('table select returns', selected);\n }\n if (selected && Array.isArray(selected)) {\n if (this.isMultiple()) {\n this.control?.setValue(selected);\n } else {\n this.control?.setValue(selected[0] ?? null);\n }\n }\n }\n\n public ngOnDestroy() {\n this._windowRef?.complete();\n }\n\n private isMultiple(): boolean {\n\n const formFieldControl = this.formField._control;\n\n if (formFieldControl instanceof MatSelect) {\n return formFieldControl.multiple;\n }\n\n return false;\n }\n\n}\n\n\n","import {\n ComponentRef,\n Inject,\n Injectable,\n INJECTOR,\n Injector,\n StaticProvider,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n RXAP_WINDOW_SETTINGS,\n WindowConfig,\n WindowRef,\n WindowService,\n} from '@rxap/window-system';\nimport { ComponentType } from '@angular/cdk/overlay';\nimport {\n RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS,\n RXAP_TABLE_METHOD,\n TABLE_DATA_SOURCE,\n TABLE_REMOTE_METHOD,\n TableSelectControlsComponent,\n} from '@rxap/material-table-system';\nimport {\n map,\n take,\n tap,\n} from 'rxjs/operators';\nimport { BaseDataSource } from '@rxap/data-source';\nimport { TableDataSource } from '@rxap/data-source/table';\nimport { ComponentPortal } from '@angular/cdk/portal';\n\nexport interface WindowTableSelectOptions<RowData> {\n title?: string;\n multiple?: boolean;\n selected?: RowData[];\n data?: BaseDataSource<RowData[]>;\n viewContainerRef?: ViewContainerRef;\n injector: Injector;\n}\n\ndeclare const $localize: any;\n\n@Injectable({ providedIn: 'root' })\nexport class WindowTableSelectService {\n constructor(\n @Inject(WindowService)\n private readonly windowService: WindowService,\n @Inject(INJECTOR)\n private readonly injector: Injector,\n ) {\n }\n\n public open<RowData extends Record<string, any>>(\n component: ComponentType<any>,\n options: WindowTableSelectOptions<RowData>,\n windowConfig: Omit<WindowConfig, 'component'> = {},\n ): Promise<RowData[]> & { windowRef: WindowRef } {\n const providers: StaticProvider[] = [\n {\n provide: RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS,\n useValue: {\n multiple: options.multiple ?? false,\n selected: options.selected ?? [],\n },\n },\n {\n provide: RXAP_WINDOW_SETTINGS,\n useValue: {\n title:\n options.title ??\n $localize`:@@rxap.window-table-system.select-table.title:Select Options`,\n },\n },\n ];\n\n if (options.data) {\n providers.push({\n provide: TABLE_DATA_SOURCE,\n useValue: new TableDataSource<RowData>(options.data),\n });\n } else {\n providers.push({\n provide: TABLE_DATA_SOURCE,\n useValue: null,\n });\n }\n\n providers.push({\n provide: TABLE_REMOTE_METHOD,\n useValue: null,\n });\n\n providers.push({\n provide: RXAP_TABLE_METHOD,\n useValue: null,\n });\n\n const windowRef = this.windowService.open({\n ...windowConfig,\n viewContainerRef: options.viewContainerRef,\n injector: Injector.create({\n parent: options.injector ?? windowConfig.injector ?? this.injector,\n providers,\n }),\n component,\n });\n\n windowRef.attachedRef$\n .pipe(\n take(1),\n tap((attachedRef) => {\n if (attachedRef instanceof ComponentRef) {\n windowRef.setFooterPortal(\n new ComponentPortal(\n TableSelectControlsComponent,\n options.viewContainerRef,\n attachedRef.injector,\n ),\n );\n } else {\n throw new Error(\n 'FATAL: the attached ref was not an instance of Component ref',\n );\n }\n }),\n )\n .subscribe();\n\n const promise: Promise<RowData[]> & { windowRef?: WindowRef } = windowRef.closed$\n .pipe(\n take(1),\n map((selected) => selected ?? []),\n )\n .toPromise();\n\n // add the windowRef to the promise instance\n // The windowRef instance can be used to cancel the window\n // If the calling component / directive is destroyed the created window should\n // be also destroyed\n promise.windowRef = windowRef;\n\n return promise as Promise<RowData[]> & { windowRef: WindowRef };\n }\n}\n","import { NgModule } from '@angular/core';\nimport { TableSelectControlsComponent } from '@rxap/material-table-system';\nimport { WindowTableSelectService } from './window-table-select.service';\n\n@NgModule({\n imports: [ TableSelectControlsComponent ],\n exports: [ TableSelectControlsComponent ],\n providers: [ WindowTableSelectService ],\n})\nexport class WindowTableSelectModule {\n}\n","// region \nexport * from './lib/open-table-select.directive';\nexport * from './lib/window-table-select.module';\nexport * from './lib/window-table-select.service';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AA2CO,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB,CAAA;;AASvB,IAAA,iBAAiB,CACzB,cAAsB,EACtB,OAAA,GAAuC,IAAI,CAAC,OAAO,EAAA;QAGnD,MAAM,kBAAkB,GAAG,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,OAAO,CAAC;QAE/E,IAAI,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CACzC,kBAAkB,CAAC,UAAU,EAC7B,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,QAAQ,CACd;AAED,QAAA,MAAM,QAAQ,GAAG,kBAAkB,CAAC,QAAQ;AAE5C,QAAA,IAAI,QAAQ,EAAE,WAAW,EAAE;AACzB,YAAA,UAAU,GAAG,IAAI,cAAc,CAAC,UAAU,EAAE,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QACxE;AAEA,QAAA,OAAO,IAAI,CAAC,UAAU,GAAG,UAAU;IACrC;AAEU,IAAA,sBAAsB,CAC9B,cAAsB,EACtB,OAAA,GAAuC,IAAI,CAAC,OAAO,EAAA;QAGnD,IAAI,CAAC,OAAO,EAAE;AACZ,YAAA,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC;QAC/C;QAEA,MAAM,cAAc,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC;AAE1D,QAAA,MAAM,qBAAqB,GAAG,IAAI,CAAC,kBAAkB,CAAC,cAAc,EAAE,OAAO,CAAC,SAAS,CAAC;QAExF,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE;AAC9C,YAAA,MAAM,IAAI,KAAK,CAAC,CAAA,sDAAA,CAAwD,CAAC;QAC3E;AAEA,QAAA,OAAO,qBAAqB,CAAC,GAA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"version":3,"file":"rxap-material-table-window-system.mjs","sources":["../../../../../../packages/angular/material/table-window-system/src/lib/open-table-select.directive.ts","../../../../../../packages/angular/material/table-window-system/src/lib/window-table-select.service.ts","../../../../../../packages/angular/material/table-window-system/src/index.ts","../../../../../../packages/angular/material/table-window-system/src/rxap-material-table-window-system.ts"],"sourcesContent":["import { Directive, INJECTOR, Injector, isDevMode, OnDestroy, OnInit, ViewContainerRef, input, inject } from '@angular/core';\nimport {\n MAT_FORM_FIELD,\n MatFormField,\n} from '@angular/material/form-field';\nimport { MatSelect } from '@angular/material/select';\nimport {\n BaseDataSource,\n BaseDataSourceMetadata,\n DataSourceLoader,\n PipeDataSource,\n} from '@rxap/data-source';\nimport {\n ExtractDataSourcesMixin,\n ExtractFormDefinitionMixin,\n} from '@rxap/form-system';\nimport { RxapFormControl } from '@rxap/forms';\nimport { Mixin } from '@rxap/mixin';\nimport { Method } from '@rxap/pattern';\nimport {\n coerceArray,\n ControlOptions,\n} from '@rxap/utilities';\nimport { WindowRef } from '@rxap/window-system';\nimport { map } from 'rxjs/operators';\nimport { WindowTableSelectOptions } from './window-table-select.service';\n\nexport interface ExtractDatasourceMixin extends ExtractFormDefinitionMixin, ExtractDataSourcesMixin {\n}\n\n@Mixin(ExtractFormDefinitionMixin, ExtractDataSourcesMixin)\nexport class ExtractDatasourceMixin {\n\n public metadata?: BaseDataSourceMetadata;\n protected control?: RxapFormControl;\n protected injector!: Injector;\n protected dataSourceLoader!: DataSourceLoader;\n protected dataSource!: BaseDataSource<ControlOptions | Record<string, any>>;\n\n // TODO : mv to rxap and replace in InputSelectOptionsDirective\n protected extractDatasource(\n dataSourceName: string,\n control: RxapFormControl | undefined = this.control,\n ): BaseDataSource<ControlOptions | Record<string, any>> {\n\n const useDataSourceValue = this.extractDataSourceValue(dataSourceName, control);\n\n let dataSource = this.dataSourceLoader.load(\n useDataSourceValue.dataSource,\n this.metadata,\n this.injector,\n );\n\n const settings = useDataSourceValue.settings;\n\n if (settings?.transformer) {\n dataSource = new PipeDataSource(dataSource, map(settings.transformer));\n }\n\n return this.dataSource = dataSource;\n }\n\n protected extractDataSourceValue(\n dataSourceName: string,\n control: RxapFormControl | undefined = this.control,\n ) {\n\n if (!control) {\n throw new Error('The control is not defined');\n }\n\n const formDefinition = this.extractFormDefinition(control);\n\n const useDataSourceValueMap = this.extractDataSources(formDefinition, control.controlId);\n\n if (!useDataSourceValueMap.has(dataSourceName)) {\n throw new Error(`The data source with the name 'options' is not defined`);\n }\n\n return useDataSourceValueMap.get(dataSourceName)!;\n }\n\n protected extractDataSourceTransformer(\n dataSourceName: string,\n control: RxapFormControl | undefined = this.control,\n ) {\n\n if (!control) {\n throw new Error('The control is not defined');\n }\n\n const useDataSourceValue = this.extractDataSourceValue(dataSourceName, control);\n const settings = useDataSourceValue.settings;\n return settings?.transformer ?? (v => v);\n }\n\n}\n\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface OpenTableSelectDirective<Data extends Record<string, any>> extends ExtractDatasourceMixin {\n}\n\n@Mixin(ExtractDatasourceMixin)\n@Directive({\n selector: '[rxapOpenTableSelect]',\n standalone: true,\n host: {\n type: 'button',\n '(click)': 'onClick()',\n },\n})\nexport class OpenTableSelectDirective<Data extends Record<string, any>> implements OnInit, OnDestroy {\n private readonly formField = inject<MatFormField>(MAT_FORM_FIELD);\n protected readonly dataSourceLoader = inject<DataSourceLoader>(DataSourceLoader);\n protected readonly injector = inject<Injector>(INJECTOR);\n private readonly viewContainerRef = inject<ViewContainerRef>(ViewContainerRef);\n\n\n public readonly openMethod = input.required<Method<Data[], WindowTableSelectOptions<Data>>>({ alias: \"rxapOpenTableSelect\" });\n\n private tableSelectDataSource!: BaseDataSource<Data[]>;\n\n private _windowRef: WindowRef | null = null;\n\n public ngOnInit() {\n const control = this.formField._control.ngControl?.control;\n\n if (!control) {\n throw new Error('Could not extract the control from the form field');\n }\n\n if (!(control instanceof RxapFormControl)) {\n throw new Error('The control is not an instance of RxapFormControl');\n }\n\n this.extractDatasource('options', this.control = control);\n\n this.tableSelectDataSource = new PipeDataSource(this.dataSource, map(source => {\n\n if (!Array.isArray(source)) {\n throw new Error('Only control options data source are supported as source data source for a select table');\n }\n\n return source.map(item => item.value);\n }));\n\n }\n\n public async onClick() {\n const selected$ = this.openMethod().call({\n data: this.tableSelectDataSource,\n selected: coerceArray(this.control?.value),\n multiple: this.isMultiple(),\n injector: this.injector,\n viewContainerRef: this.viewContainerRef,\n });\n // set the component windowRef. If the component is destroyed\n // before the promise is resolved. The window is closed in\n // the ngOnDestroy hook\n this._windowRef = (selected$ as any).windowRef ?? null;\n const selected = await selected$;\n this._windowRef = null;\n if (isDevMode()) {\n console.log('table select returns', selected);\n }\n if (selected && Array.isArray(selected)) {\n if (this.isMultiple()) {\n this.control?.setValue(selected);\n } else {\n this.control?.setValue(selected[0] ?? null);\n }\n }\n }\n\n public ngOnDestroy() {\n this._windowRef?.complete();\n }\n\n private isMultiple(): boolean {\n\n const formFieldControl = this.formField._control;\n\n if (formFieldControl instanceof MatSelect) {\n return formFieldControl.multiple;\n }\n\n return false;\n }\n\n}\n\n\n","import { ComponentRef, Injectable, INJECTOR, Injector, StaticProvider, ViewContainerRef, inject } from '@angular/core';\nimport {\n RXAP_WINDOW_SETTINGS,\n WindowConfig,\n WindowRef,\n WindowService,\n} from '@rxap/window-system';\nimport { ComponentType } from '@angular/cdk/overlay';\nimport {\n RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS,\n RXAP_TABLE_METHOD,\n TABLE_DATA_SOURCE,\n TABLE_REMOTE_METHOD,\n TableSelectControlsComponent,\n} from '@rxap/material-table-system';\nimport {\n map,\n take,\n tap,\n} from 'rxjs/operators';\nimport { BaseDataSource } from '@rxap/data-source';\nimport { TableDataSource } from '@rxap/data-source/table';\nimport { ComponentPortal } from '@angular/cdk/portal';\n\nexport interface WindowTableSelectOptions<RowData> {\n title?: string;\n multiple?: boolean;\n selected?: RowData[];\n data?: BaseDataSource<RowData[]>;\n viewContainerRef?: ViewContainerRef;\n injector: Injector;\n}\n\ndeclare const $localize: any;\n\n@Injectable({ providedIn: 'root' })\nexport class WindowTableSelectService {\n private readonly windowService = inject<WindowService>(WindowService);\n private readonly injector = inject<Injector>(INJECTOR);\n\n\n public open<RowData extends Record<string, any>>(\n component: ComponentType<any>,\n options: WindowTableSelectOptions<RowData>,\n windowConfig: Omit<WindowConfig, 'component'> = {},\n ): Promise<RowData[]> & { windowRef: WindowRef } {\n const providers: StaticProvider[] = [\n {\n provide: RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS,\n useValue: {\n multiple: options.multiple ?? false,\n selected: options.selected ?? [],\n },\n },\n {\n provide: RXAP_WINDOW_SETTINGS,\n useValue: {\n title:\n options.title ??\n $localize`:@@rxap.window-table-system.select-table.title:Select Options`,\n },\n },\n ];\n\n if (options.data) {\n providers.push({\n provide: TABLE_DATA_SOURCE,\n useValue: new TableDataSource<RowData>(options.data),\n });\n } else {\n providers.push({\n provide: TABLE_DATA_SOURCE,\n useValue: null,\n });\n }\n\n providers.push({\n provide: TABLE_REMOTE_METHOD,\n useValue: null,\n });\n\n providers.push({\n provide: RXAP_TABLE_METHOD,\n useValue: null,\n });\n\n const windowRef = this.windowService.open({\n ...windowConfig,\n viewContainerRef: options.viewContainerRef,\n injector: Injector.create({\n parent: options.injector ?? windowConfig.injector ?? this.injector,\n providers,\n }),\n component,\n });\n\n windowRef.attachedRef$\n .pipe(\n take(1),\n tap((attachedRef) => {\n if (attachedRef instanceof ComponentRef) {\n windowRef.setFooterPortal(\n new ComponentPortal(\n TableSelectControlsComponent,\n options.viewContainerRef,\n attachedRef.injector,\n ),\n );\n } else {\n throw new Error(\n 'FATAL: the attached ref was not an instance of Component ref',\n );\n }\n }),\n )\n .subscribe();\n\n const promise: Promise<RowData[]> & { windowRef?: WindowRef } = windowRef.closed$\n .pipe(\n take(1),\n map((selected) => selected ?? []),\n )\n .toPromise();\n\n // add the windowRef to the promise instance\n // The windowRef instance can be used to cancel the window\n // If the calling component / directive is destroyed the created window should\n // be also destroyed\n promise.windowRef = windowRef;\n\n return promise as Promise<RowData[]> & { windowRef: WindowRef };\n }\n}\n","// region \nexport * from './lib/open-table-select.directive';\nexport * from './lib/window-table-select.service';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA+BO,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB,CAAA;;AASvB,IAAA,iBAAiB,CACzB,cAAsB,EACtB,OAAA,GAAuC,IAAI,CAAC,OAAO,EAAA;QAGnD,MAAM,kBAAkB,GAAG,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,OAAO,CAAC;QAE/E,IAAI,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CACzC,kBAAkB,CAAC,UAAU,EAC7B,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,QAAQ,CACd;AAED,QAAA,MAAM,QAAQ,GAAG,kBAAkB,CAAC,QAAQ;AAE5C,QAAA,IAAI,QAAQ,EAAE,WAAW,EAAE;AACzB,YAAA,UAAU,GAAG,IAAI,cAAc,CAAC,UAAU,EAAE,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QACxE;AAEA,QAAA,OAAO,IAAI,CAAC,UAAU,GAAG,UAAU;IACrC;AAEU,IAAA,sBAAsB,CAC9B,cAAsB,EACtB,OAAA,GAAuC,IAAI,CAAC,OAAO,EAAA;QAGnD,IAAI,CAAC,OAAO,EAAE;AACZ,YAAA,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC;QAC/C;QAEA,MAAM,cAAc,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC;AAE1D,QAAA,MAAM,qBAAqB,GAAG,IAAI,CAAC,kBAAkB,CAAC,cAAc,EAAE,OAAO,CAAC,SAAS,CAAC;QAExF,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,cAAc,CAAC,E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SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,cADX,MAAM,EAAA,CAAA,CAAA;;2FACnB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBADpC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACnClC;AAGA;;ACHA;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "21.0.1-dev.0",
2
+ "version": "21.0.1",
3
3
  "name": "@rxap/material-table-window-system",
4
4
  "description": "Provides a directive and service to open a table select component in a window. This package allows users to select rows from a table within a window and return the selected data. It integrates with `@rxap/material-table-system` and `@rxap/window-system` for displaying and managing the table selection in a window.\n",
5
5
  "license": "GPL-3.0-or-later",
@@ -11,14 +11,14 @@
11
11
  "@angular/cdk": "^21.2.9",
12
12
  "@angular/core": "^21.2.9",
13
13
  "@angular/material": "^21.2.9",
14
- "@rxap/data-source": "^21.0.1-dev.0",
15
- "@rxap/form-system": "^21.0.1-dev.0",
16
- "@rxap/forms": "^21.0.1-dev.0",
17
- "@rxap/material-table-system": "^21.0.1-dev.0",
18
- "@rxap/mixin": "^16.0.17-dev.0",
19
- "@rxap/pattern": "^1.1.16-dev.0",
20
- "@rxap/utilities": "^16.5.2-dev.0",
21
- "@rxap/window-system": "^21.0.1-dev.0",
14
+ "@rxap/data-source": "^21.0.1",
15
+ "@rxap/form-system": "^21.0.1",
16
+ "@rxap/forms": "^21.0.1",
17
+ "@rxap/material-table-system": "^21.0.1",
18
+ "@rxap/mixin": "^16.0.17",
19
+ "@rxap/pattern": "^1.1.16",
20
+ "@rxap/utilities": "^16.5.2",
21
+ "@rxap/window-system": "^21.0.1",
22
22
  "rxjs": "^7.8.2"
23
23
  },
24
24
  "author": {
@@ -77,95 +77,95 @@
77
77
  },
78
78
  {
79
79
  "package": "@rxap/browser-utilities",
80
- "version": "1.1.15-dev.0"
80
+ "version": "1.1.15"
81
81
  },
82
82
  {
83
83
  "package": "@rxap/components",
84
- "version": "21.0.1-dev.0"
84
+ "version": "21.0.1"
85
85
  },
86
86
  {
87
87
  "package": "@rxap/config",
88
- "version": "21.0.1-dev.0"
88
+ "version": "21.0.1"
89
89
  },
90
90
  {
91
91
  "package": "@rxap/data-source",
92
- "version": "21.0.1-dev.0"
92
+ "version": "21.0.1"
93
93
  },
94
94
  {
95
95
  "package": "@rxap/data-structure-tree",
96
- "version": "1.1.19-dev.0"
96
+ "version": "1.1.19"
97
97
  },
98
98
  {
99
99
  "package": "@rxap/definition",
100
- "version": "21.0.1-dev.0"
100
+ "version": "21.0.1"
101
101
  },
102
102
  {
103
103
  "package": "@rxap/directives",
104
- "version": "21.0.1-dev.0"
104
+ "version": "21.0.1"
105
105
  },
106
106
  {
107
107
  "package": "@rxap/environment",
108
- "version": "21.0.1-dev.0"
108
+ "version": "21.0.1"
109
109
  },
110
110
  {
111
111
  "package": "@rxap/form-system",
112
- "version": "21.0.1-dev.0"
112
+ "version": "21.0.1"
113
113
  },
114
114
  {
115
115
  "package": "@rxap/forms",
116
- "version": "21.0.1-dev.0"
116
+ "version": "21.0.1"
117
117
  },
118
118
  {
119
119
  "package": "@rxap/material-directives",
120
- "version": "21.0.1-dev.0"
120
+ "version": "21.0.1"
121
121
  },
122
122
  {
123
123
  "package": "@rxap/material-table-system",
124
- "version": "21.0.1-dev.0"
124
+ "version": "21.0.1"
125
125
  },
126
126
  {
127
127
  "package": "@rxap/mixin",
128
- "version": "16.0.17-dev.0"
128
+ "version": "16.0.17"
129
129
  },
130
130
  {
131
131
  "package": "@rxap/ngx-memory",
132
- "version": "21.0.1-dev.0"
132
+ "version": "21.0.1"
133
133
  },
134
134
  {
135
135
  "package": "@rxap/open-api",
136
- "version": "21.0.1-dev.0"
136
+ "version": "21.0.1"
137
137
  },
138
138
  {
139
139
  "package": "@rxap/pattern",
140
- "version": "1.1.16-dev.0"
140
+ "version": "1.1.16"
141
141
  },
142
142
  {
143
143
  "package": "@rxap/reflect-metadata",
144
- "version": "1.0.18-dev.0"
144
+ "version": "1.0.18"
145
145
  },
146
146
  {
147
147
  "package": "@rxap/remote-method",
148
- "version": "21.0.1-dev.0"
148
+ "version": "21.0.1"
149
149
  },
150
150
  {
151
151
  "package": "@rxap/rxjs",
152
- "version": "1.1.18-dev.0"
152
+ "version": "1.1.18"
153
153
  },
154
154
  {
155
155
  "package": "@rxap/services",
156
- "version": "21.0.1-dev.0"
156
+ "version": "21.0.1"
157
157
  },
158
158
  {
159
159
  "package": "@rxap/utilities",
160
- "version": "16.5.2-dev.0"
160
+ "version": "16.5.2"
161
161
  },
162
162
  {
163
163
  "package": "@rxap/validator",
164
- "version": "3.0.15-dev.0"
164
+ "version": "3.0.15"
165
165
  },
166
166
  {
167
167
  "package": "@rxap/window-system",
168
- "version": "21.0.1-dev.0"
168
+ "version": "21.0.1"
169
169
  }
170
170
  ]
171
171
  },
@@ -1,15 +1,13 @@
1
- import * as _rxap_form_system from '@rxap/form-system';
2
- import { ExtractFormDefinitionMixin, ExtractDataSourcesMixin } from '@rxap/form-system';
3
1
  import * as i0 from '@angular/core';
4
2
  import { ViewContainerRef, Injector, OnInit, OnDestroy } from '@angular/core';
5
- import { MatFormField } from '@angular/material/form-field';
3
+ import * as _rxap_form_system from '@rxap/form-system';
4
+ import { ExtractFormDefinitionMixin, ExtractDataSourcesMixin } from '@rxap/form-system';
6
5
  import { BaseDataSource, BaseDataSourceMetadata, DataSourceLoader } from '@rxap/data-source';
7
6
  import { RxapFormControl } from '@rxap/forms';
8
7
  import { Method } from '@rxap/pattern';
9
8
  import { ControlOptions } from '@rxap/utilities';
10
- import { WindowService, WindowConfig, WindowRef } from '@rxap/window-system';
9
+ import { WindowConfig, WindowRef } from '@rxap/window-system';
11
10
  import { ComponentType } from '@angular/cdk/overlay';
12
- import * as i1 from '@rxap/material-table-system';
13
11
 
14
12
  interface WindowTableSelectOptions<RowData> {
15
13
  title?: string;
@@ -22,7 +20,6 @@ interface WindowTableSelectOptions<RowData> {
22
20
  declare class WindowTableSelectService {
23
21
  private readonly windowService;
24
22
  private readonly injector;
25
- constructor(windowService: WindowService, injector: Injector);
26
23
  open<RowData extends Record<string, any>>(component: ComponentType<any>, options: WindowTableSelectOptions<RowData>, windowConfig?: Omit<WindowConfig, 'component'>): Promise<RowData[]> & {
27
24
  windowRef: WindowRef;
28
25
  };
@@ -49,24 +46,16 @@ declare class OpenTableSelectDirective<Data extends Record<string, any>> impleme
49
46
  protected readonly dataSourceLoader: DataSourceLoader;
50
47
  protected readonly injector: Injector;
51
48
  private readonly viewContainerRef;
52
- type: string;
53
- openMethod: Method<Data[], WindowTableSelectOptions<Data>>;
49
+ readonly openMethod: i0.InputSignal<Method<Data[], WindowTableSelectOptions<Data>>>;
54
50
  private tableSelectDataSource;
55
51
  private _windowRef;
56
- constructor(formField: MatFormField, dataSourceLoader: DataSourceLoader, injector: Injector, viewContainerRef: ViewContainerRef);
57
52
  ngOnInit(): void;
58
53
  onClick(): Promise<void>;
59
54
  ngOnDestroy(): void;
60
55
  private isMultiple;
61
56
  static ɵfac: i0.ɵɵFactoryDeclaration<OpenTableSelectDirective<any>, never>;
62
- static ɵdir: i0.ɵɵDirectiveDeclaration<OpenTableSelectDirective<any>, "[rxapOpenTableSelect]", never, { "openMethod": { "alias": "rxapOpenTableSelect"; "required": false; }; }, {}, never, never, true, never>;
63
- }
64
-
65
- declare class WindowTableSelectModule {
66
- static ɵfac: i0.ɵɵFactoryDeclaration<WindowTableSelectModule, never>;
67
- static ɵmod: i0.ɵɵNgModuleDeclaration<WindowTableSelectModule, never, [typeof i1.TableSelectControlsComponent], [typeof i1.TableSelectControlsComponent]>;
68
- static ɵinj: i0.ɵɵInjectorDeclaration<WindowTableSelectModule>;
57
+ static ɵdir: i0.ɵɵDirectiveDeclaration<OpenTableSelectDirective<any>, "[rxapOpenTableSelect]", never, { "openMethod": { "alias": "rxapOpenTableSelect"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
69
58
  }
70
59
 
71
- export { ExtractDatasourceMixin, OpenTableSelectDirective, WindowTableSelectModule, WindowTableSelectService };
60
+ export { ExtractDatasourceMixin, OpenTableSelectDirective, WindowTableSelectService };
72
61
  export type { WindowTableSelectOptions };
@@ -1,2 +0,0 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>WindowTableSelectModule | @rxap/material-table-window-system - v21.0.1-dev.0</title><meta name="description" content="Documentation for @rxap/material-table-window-system"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@rxap/material-table-window-system - v21.0.1-dev.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@rxap/material-table-window-system</a></li><li><a href="WindowTableSelectModule.html">WindowTableSelectModule</a></li></ul><h1>Class WindowTableSelectModule</h1></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://gitlab.com/rxap/packages/-/blob/b20edab0a4af1993e07e7860064bb449d7fa067b/packages/angular/material/table-window-system/src/lib/window-table-select.module.ts#L10">material/table-window-system/src/lib/window-table-select.module.ts:10</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="WindowTableSelectModule.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
2
- </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorwindowtableselectmodule" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">WindowTableSelectModule</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="WindowTableSelectModule.html" class="tsd-signature-type tsd-kind-class">WindowTableSelectModule</a><a href="#constructorwindowtableselectmodule" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="WindowTableSelectModule.html" class="tsd-signature-type tsd-kind-class">WindowTableSelectModule</a></h4></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@rxap/material-table-window-system - v21.0.1-dev.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -1,19 +0,0 @@
1
- [**@rxap/material-table-window-system v21.0.1-dev.0**](../README.md)
2
-
3
- ***
4
-
5
- [@rxap/material-table-window-system](../globals.md) / WindowTableSelectModule
6
-
7
- # Class: WindowTableSelectModule
8
-
9
- Defined in: [material/table-window-system/src/lib/window-table-select.module.ts:10](https://gitlab.com/rxap/packages/-/blob/b20edab0a4af1993e07e7860064bb449d7fa067b/packages/angular/material/table-window-system/src/lib/window-table-select.module.ts#L10)
10
-
11
- ## Constructors
12
-
13
- ### new WindowTableSelectModule()
14
-
15
- > **new WindowTableSelectModule**(): [`WindowTableSelectModule`](WindowTableSelectModule.md)
16
-
17
- #### Returns
18
-
19
- [`WindowTableSelectModule`](WindowTableSelectModule.md)
@@ -1,15 +0,0 @@
1
- [@rxap/material-table-window-system](../wiki/globals) / WindowTableSelectModule
2
-
3
- # Class: WindowTableSelectModule
4
-
5
- Defined in: [material/table-window-system/src/lib/window-table-select.module.ts:10](https://gitlab.com/rxap/packages/-/blob/b20edab0a4af1993e07e7860064bb449d7fa067b/packages/angular/material/table-window-system/src/lib/window-table-select.module.ts#L10)
6
-
7
- ## Constructors
8
-
9
- ### new WindowTableSelectModule()
10
-
11
- > **new WindowTableSelectModule**(): [`WindowTableSelectModule`](../wiki/Class.WindowTableSelectModule)
12
-
13
- #### Returns
14
-
15
- [`WindowTableSelectModule`](../wiki/Class.WindowTableSelectModule)