@rxap/material-table-window-system 12.0.9-next.0 → 13.0.0-next.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.
@@ -0,0 +1,262 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injector, ComponentRef, INJECTOR, Injectable, Inject, NgModule, isDevMode, ViewContainerRef, Directive, HostBinding, Input, HostListener } from '@angular/core';
3
+ import { RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS, TABLE_DATA_SOURCE, TABLE_REMOTE_METHOD, RXAP_TABLE_METHOD, TableSelectControlsComponent, TableSelectControlsComponentModule } from '@rxap/material-table-system';
4
+ import * as i1 from '@rxap/window-system';
5
+ import { RXAP_WINDOW_SETTINGS, WindowService } from '@rxap/window-system';
6
+ import { take, tap, map } from 'rxjs/operators';
7
+ import { TableDataSource } from '@rxap/data-source/table';
8
+ import { ComponentPortal } from '@angular/cdk/portal';
9
+ import { __decorate, __metadata } from 'tslib';
10
+ import { coerceArray } from '@rxap/utilities';
11
+ import * as i1$1 from '@angular/material/form-field';
12
+ import { MAT_FORM_FIELD, MatFormField } from '@angular/material/form-field';
13
+ import { ExtractFormDefinitionMixin, ExtractDataSourcesMixin } from '@rxap/form-system';
14
+ import { Mixin } from '@rxap/mixin';
15
+ import { RxapFormControl } from '@rxap/forms';
16
+ import * as i2 from '@rxap/data-source';
17
+ import { PipeDataSource, DataSourceLoader } from '@rxap/data-source';
18
+ import { MatSelect } from '@angular/material/select';
19
+
20
+ class WindowTableSelectService {
21
+ constructor(windowService, injector) {
22
+ this.windowService = windowService;
23
+ this.injector = injector;
24
+ }
25
+ open(component, options, windowConfig = {}) {
26
+ const providers = [
27
+ {
28
+ provide: RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS,
29
+ useValue: {
30
+ multiple: options.multiple ?? false,
31
+ selected: options.selected ?? []
32
+ }
33
+ },
34
+ {
35
+ provide: RXAP_WINDOW_SETTINGS,
36
+ useValue: {
37
+ title: options.title ??
38
+ $localize `:@@rxap.window-table-system.select-table.title:Select Options`,
39
+ },
40
+ },
41
+ ];
42
+ if (options.data) {
43
+ providers.push({
44
+ provide: TABLE_DATA_SOURCE,
45
+ useValue: new TableDataSource(options.data),
46
+ });
47
+ }
48
+ else {
49
+ providers.push({
50
+ provide: TABLE_DATA_SOURCE,
51
+ useValue: null
52
+ });
53
+ }
54
+ providers.push({
55
+ provide: TABLE_REMOTE_METHOD,
56
+ useValue: null
57
+ });
58
+ providers.push({
59
+ provide: RXAP_TABLE_METHOD,
60
+ useValue: null
61
+ });
62
+ const windowRef = this.windowService.open({
63
+ ...windowConfig,
64
+ viewContainerRef: options.viewContainerRef,
65
+ injector: Injector.create({
66
+ parent: options.injector ?? windowConfig.injector ?? this.injector,
67
+ providers
68
+ }),
69
+ component
70
+ });
71
+ windowRef.attachedRef$
72
+ .pipe(take(1), tap((attachedRef) => {
73
+ if (attachedRef instanceof ComponentRef) {
74
+ windowRef.setFooterPortal(new ComponentPortal(TableSelectControlsComponent, options.viewContainerRef, attachedRef.injector));
75
+ }
76
+ else {
77
+ throw new Error('FATAL: the attached ref was not an instance of Component ref');
78
+ }
79
+ }))
80
+ .subscribe();
81
+ const promise = windowRef.closed$
82
+ .pipe(take(1), map((selected) => selected ?? []))
83
+ .toPromise();
84
+ // add the windowRef to the promise instance
85
+ // The windowRef instance can be used to cancel the window
86
+ // If the calling component / directive is destroyed the created window should
87
+ // be also destroyed
88
+ promise.windowRef = windowRef;
89
+ return promise;
90
+ }
91
+ }
92
+ WindowTableSelectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: WindowTableSelectService, deps: [{ token: WindowService }, { token: INJECTOR }], target: i0.ɵɵFactoryTarget.Injectable });
93
+ WindowTableSelectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: WindowTableSelectService, providedIn: 'root' });
94
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: WindowTableSelectService, decorators: [{
95
+ type: Injectable,
96
+ args: [{ providedIn: 'root' }]
97
+ }], ctorParameters: function () { return [{ type: i1.WindowService, decorators: [{
98
+ type: Inject,
99
+ args: [WindowService]
100
+ }] }, { type: i0.Injector, decorators: [{
101
+ type: Inject,
102
+ args: [INJECTOR]
103
+ }] }]; } });
104
+
105
+ class WindowTableSelectModule {
106
+ }
107
+ WindowTableSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: WindowTableSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
108
+ WindowTableSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: WindowTableSelectModule, exports: [TableSelectControlsComponentModule] });
109
+ WindowTableSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: WindowTableSelectModule, providers: [WindowTableSelectService], imports: [TableSelectControlsComponentModule] });
110
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: WindowTableSelectModule, decorators: [{
111
+ type: NgModule,
112
+ args: [{
113
+ exports: [TableSelectControlsComponentModule],
114
+ providers: [WindowTableSelectService]
115
+ }]
116
+ }] });
117
+
118
+ let ExtractDatasourceMixin = class ExtractDatasourceMixin {
119
+ // TODO : mv to rxap and replace in InputSelectOptionsDirective
120
+ extractDatasource(dataSourceName, control = this.control) {
121
+ const useDataSourceValue = this.extractDataSourceValue(dataSourceName, control);
122
+ let dataSource = this.dataSourceLoader.load(useDataSourceValue.dataSource, this.metadata, this.injector);
123
+ const settings = useDataSourceValue.settings;
124
+ if (settings?.transformer) {
125
+ dataSource = new PipeDataSource(dataSource, map(settings.transformer));
126
+ }
127
+ return this.dataSource = dataSource;
128
+ }
129
+ extractDataSourceValue(dataSourceName, control = this.control) {
130
+ const formDefinition = this.extractFormDefinition(control);
131
+ const useDataSourceValueMap = this.extractDataSources(formDefinition, control.controlId);
132
+ if (!useDataSourceValueMap.has(dataSourceName)) {
133
+ throw new Error(`The data source with the name 'options' is not defined`);
134
+ }
135
+ return useDataSourceValueMap.get(dataSourceName);
136
+ }
137
+ extractDataSourceTransformer(dataSourceName, control = this.control) {
138
+ const useDataSourceValue = this.extractDataSourceValue(dataSourceName, control);
139
+ const settings = useDataSourceValue.settings;
140
+ return settings?.transformer ?? (v => v);
141
+ }
142
+ };
143
+ ExtractDatasourceMixin = __decorate([
144
+ Mixin(ExtractFormDefinitionMixin, ExtractDataSourcesMixin)
145
+ ], ExtractDatasourceMixin);
146
+ let OpenTableSelectDirective = class OpenTableSelectDirective {
147
+ constructor(formField, dataSourceLoader, injector, viewContainerRef) {
148
+ this.formField = formField;
149
+ this.dataSourceLoader = dataSourceLoader;
150
+ this.injector = injector;
151
+ this.viewContainerRef = viewContainerRef;
152
+ this.type = 'button';
153
+ this._windowRef = null;
154
+ }
155
+ ngOnInit() {
156
+ const control = this.formField._control.ngControl?.control;
157
+ if (!control) {
158
+ throw new Error('Could not extract the control from the form field');
159
+ }
160
+ if (!(control instanceof RxapFormControl)) {
161
+ throw new Error('The control is not an instance of RxapFormControl');
162
+ }
163
+ this.extractDatasource('options', this.control = control);
164
+ this.tableSelectDataSource = new PipeDataSource(this.dataSource, map(source => {
165
+ if (!Array.isArray(source)) {
166
+ throw new Error('Only control options data source are supported as source data source for a select table');
167
+ }
168
+ return source.map(item => item.value);
169
+ }));
170
+ }
171
+ async onClick() {
172
+ const selected$ = this.openMethod.call({
173
+ data: this.tableSelectDataSource,
174
+ selected: coerceArray(this.control.value),
175
+ multiple: this.isMultiple(),
176
+ injector: this.injector,
177
+ viewContainerRef: this.viewContainerRef
178
+ });
179
+ // set the component windowRef. If the component is destroyed
180
+ // before the promise is resolved. The window is closed in
181
+ // the ngOnDestroy hook
182
+ this._windowRef = selected$.windowRef ?? null;
183
+ const selected = await selected$;
184
+ this._windowRef = null;
185
+ if (isDevMode()) {
186
+ console.log('table select returns', selected);
187
+ }
188
+ if (selected && Array.isArray(selected)) {
189
+ if (this.isMultiple()) {
190
+ this.control.setValue(selected);
191
+ }
192
+ else {
193
+ this.control.setValue(selected[0] ?? null);
194
+ }
195
+ }
196
+ }
197
+ ngOnDestroy() {
198
+ this._windowRef?.complete();
199
+ }
200
+ isMultiple() {
201
+ const formFieldControl = this.formField._control;
202
+ if (formFieldControl instanceof MatSelect) {
203
+ return formFieldControl.multiple;
204
+ }
205
+ return false;
206
+ }
207
+ };
208
+ OpenTableSelectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OpenTableSelectDirective, deps: [{ token: MAT_FORM_FIELD }, { token: DataSourceLoader }, { token: INJECTOR }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
209
+ OpenTableSelectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: OpenTableSelectDirective, selector: "[rxapOpenTableSelect]", inputs: { openMethod: ["rxapOpenTableSelect", "openMethod"] }, host: { listeners: { "click": "onClick()" }, properties: { "type": "this.type" } }, ngImport: i0 });
210
+ OpenTableSelectDirective = __decorate([
211
+ Mixin(ExtractDatasourceMixin),
212
+ __metadata("design:paramtypes", [MatFormField,
213
+ DataSourceLoader,
214
+ Injector,
215
+ ViewContainerRef])
216
+ ], OpenTableSelectDirective);
217
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OpenTableSelectDirective, decorators: [{
218
+ type: Directive,
219
+ args: [{
220
+ selector: '[rxapOpenTableSelect]'
221
+ }]
222
+ }], ctorParameters: function () { return [{ type: i1$1.MatFormField, decorators: [{
223
+ type: Inject,
224
+ args: [MAT_FORM_FIELD]
225
+ }] }, { type: i2.DataSourceLoader, decorators: [{
226
+ type: Inject,
227
+ args: [DataSourceLoader]
228
+ }] }, { type: i0.Injector, decorators: [{
229
+ type: Inject,
230
+ args: [INJECTOR]
231
+ }] }, { type: i0.ViewContainerRef, decorators: [{
232
+ type: Inject,
233
+ args: [ViewContainerRef]
234
+ }] }]; }, propDecorators: { type: [{
235
+ type: HostBinding,
236
+ args: ['type']
237
+ }], openMethod: [{
238
+ type: Input,
239
+ args: ['rxapOpenTableSelect']
240
+ }], onClick: [{
241
+ type: HostListener,
242
+ args: ['click']
243
+ }] } });
244
+ class OpenTableSelectDirectiveModule {
245
+ }
246
+ OpenTableSelectDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OpenTableSelectDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
247
+ OpenTableSelectDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OpenTableSelectDirectiveModule, declarations: [OpenTableSelectDirective], exports: [OpenTableSelectDirective] });
248
+ OpenTableSelectDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OpenTableSelectDirectiveModule });
249
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OpenTableSelectDirectiveModule, decorators: [{
250
+ type: NgModule,
251
+ args: [{
252
+ declarations: [OpenTableSelectDirective],
253
+ exports: [OpenTableSelectDirective]
254
+ }]
255
+ }] });
256
+
257
+ /**
258
+ * Generated bundle index. Do not edit.
259
+ */
260
+
261
+ export { ExtractDatasourceMixin, OpenTableSelectDirective, OpenTableSelectDirectiveModule, WindowTableSelectModule, WindowTableSelectService };
262
+ //# sourceMappingURL=rxap-material-table-window-system.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rxap-material-table-window-system.mjs","sources":["../../../../../libs/material/table-window-system/src/lib/window-table-select.service.ts","../../../../../libs/material/table-window-system/src/lib/window-table-select.module.ts","../../../../../libs/material/table-window-system/src/lib/open-table-select.directive.ts","../../../../../libs/material/table-window-system/src/rxap-material-table-window-system.ts"],"sourcesContent":["import {\n ComponentRef,\n Injectable,\n Injector,\n StaticProvider,\n ViewContainerRef,\n INJECTOR,\n Inject\n} from '@angular/core';\nimport {\n RXAP_WINDOW_SETTINGS,\n WindowConfig,\n WindowService,\n WindowRef\n} from '@rxap/window-system';\nimport { ComponentType } from '@angular/cdk/overlay';\nimport {\n RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS,\n TABLE_REMOTE_METHOD,\n TABLE_DATA_SOURCE,\n TableSelectControlsComponent,\n RXAP_TABLE_METHOD\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';\nimport { LocalizeFn } from '@angular/localize/init';\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: LocalizeFn;\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 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 { TableSelectControlsComponentModule } from '@rxap/material-table-system';\nimport { WindowTableSelectService } from './window-table-select.service';\n\n@NgModule({\n exports: [TableSelectControlsComponentModule],\n providers: [WindowTableSelectService]\n})\nexport class WindowTableSelectModule {}\n","import {\n Directive,\n HostBinding,\n HostListener,\n Inject,\n INJECTOR,\n Injector,\n Input,\n isDevMode,\n NgModule,\n OnInit,\n ViewContainerRef,\n OnDestroy\n} from '@angular/core';\nimport {\n coerceArray,\n ControlOptions\n} from '@rxap/utilities';\nimport {\n MAT_FORM_FIELD,\n MatFormField\n} from '@angular/material/form-field';\nimport {\n ExtractDataSourcesMixin,\n ExtractFormDefinitionMixin\n} from '@rxap/form-system';\nimport { Mixin } from '@rxap/mixin';\nimport { RxapFormControl } from '@rxap/forms';\nimport {\n BaseDataSource,\n BaseDataSourceMetadata,\n DataSourceLoader,\n PipeDataSource\n} from '@rxap/data-source';\nimport { map } from 'rxjs/operators';\nimport { MatSelect } from '@angular/material/select';\nimport { WindowTableSelectOptions } from './window-table-select.service';\nimport { Method } from '@rxap/utilities/rxjs';\nimport { WindowRef } from '@rxap/window-system';\n\nexport interface ExtractDatasourceMixin extends ExtractFormDefinitionMixin, ExtractDataSourcesMixin {\n}\n\n@Mixin(ExtractFormDefinitionMixin, ExtractDataSourcesMixin)\nexport class ExtractDatasourceMixin {\n\n protected control!: RxapFormControl;\n protected injector!: Injector;\n protected dataSourceLoader!: DataSourceLoader;\n protected dataSource!: BaseDataSource<ControlOptions | Record<string, any>>;\n public metadata?: BaseDataSourceMetadata;\n\n // TODO : mv to rxap and replace in InputSelectOptionsDirective\n protected extractDatasource(\n dataSourceName: string,\n control: RxapFormControl = 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 = this.control\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 = this.control\n ) {\n const useDataSourceValue = this.extractDataSourceValue(dataSourceName, control);\n const settings = useDataSourceValue.settings;\n return settings?.transformer ?? (v => v);\n }\n\n}\n\n\nexport interface OpenTableSelectDirective<Data extends Record<string, any>> extends ExtractDatasourceMixin {\n}\n\n@Mixin(ExtractDatasourceMixin)\n@Directive({\n selector: '[rxapOpenTableSelect]'\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@NgModule({\n declarations: [ OpenTableSelectDirective ],\n exports: [ OpenTableSelectDirective ]\n})\nexport class OpenTableSelectDirectiveModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MA6Ca,wBAAwB;IACnC,YAEmB,aAA4B,EAE5B,QAAkB;QAFlB,kBAAa,GAAb,aAAa,CAAe;QAE5B,aAAQ,GAAR,QAAQ,CAAU;KACjC;IAEG,IAAI,CACT,SAA6B,EAC7B,OAA0C,EAC1C,eAAgD,EAAE;QAElD,MAAM,SAAS,GAAqB;YAClC;gBACE,OAAO,EAAG,6CAA6C;gBACvD,QAAQ,EAAE;oBACR,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,KAAK;oBACnC,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,EAAE;iBACjC;aACF;YACD;gBACE,OAAO,EAAG,oBAAoB;gBAC9B,QAAQ,EAAE;oBACR,KAAK,EACH,OAAO,CAAC,KAAK;wBACb,SAAS,CAAA,+DAA+D;iBAC3E;aACF;SACF,CAAC;QAEF,IAAI,OAAO,CAAC,IAAI,EAAE;YAChB,SAAS,CAAC,IAAI,CAAC;gBACb,OAAO,EAAE,iBAAiB;gBAC1B,QAAQ,EAAE,IAAI,eAAe,CAAU,OAAO,CAAC,IAAI,CAAC;aACrD,CAAC,CAAC;SACJ;aAAM;YACL,SAAS,CAAC,IAAI,CAAC;gBACb,OAAO,EAAG,iBAAiB;gBAC3B,QAAQ,EAAE,IAAI;aACf,CAAC,CAAC;SACJ;QAED,SAAS,CAAC,IAAI,CAAC;YACb,OAAO,EAAG,mBAAmB;YAC7B,QAAQ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AO,gBAAgB,CAAC,QAAQ,CAAC;SAClC;QAED,OAAO,KAAK,CAAC;KACd;EAEF;qHA1FY,wBAAwB,kBAazB,cAAc,aAEd,gBAAgB,aAEhB,QAAQ,aAER,gBAAgB;yGAnBf,wBAAwB;AAAxB,wBAAwB;IAJpC,KAAK,CAAC,sBAAsB,CAAC;qCAkBE,YAAY;QAEH,gBAAgB;QAExB,QAAQ;QAEF,gBAAgB;GApB1C,wBAAwB,CA0FpC;2FA1FY,wBAAwB;kBAHpC,SAAS;mBAAC;oBACT,QAAQ,EAAE,uBAAuB;iBAClC;;0BAcI,MAAM;2BAAC,cAAc;;0BAErB,MAAM;2BAAC,gBAAgB;;0BAEvB,MAAM;2BAAC,QAAQ;;0BAEf,MAAM;2BAAC,gBAAgB;4CAhBnB,IAAI;sBADV,WAAW;uBAAC,MAAM;gBAIZ,UAAU;sBADhB,KAAK;uBAAC,qBAAqB;gBA4Cf,OAAO;sBADnB,YAAY;uBAAC,OAAO;;MAgDV,8BAA8B;;2HAA9B,8BAA8B;4HAA9B,8BAA8B,iBAhG9B,wBAAwB,aAAxB,wBAAwB;4HAgGxB,8BAA8B;2FAA9B,8BAA8B;kBAJ1C,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAE,wBAAwB,CAAE;oBAC1C,OAAO,EAAO,CAAE,wBAAwB,CAAE;iBAC3C;;;AC5MD;;;;;;"}
package/package.json CHANGED
@@ -1,45 +1,50 @@
1
1
  {
2
2
  "name": "@rxap/material-table-window-system",
3
- "version": "12.0.9-next.0",
3
+ "version": "13.0.0-next.1",
4
4
  "peerDependencies": {
5
- "@angular/animations": "^12.0.1",
6
- "@angular/cdk": "^12.0.1",
7
- "@angular/common": "^12.0.1",
8
- "@angular/core": "^12.0.1",
9
- "@angular/flex-layout": "^12.0.0-beta.34",
10
- "@angular/forms": "^12.0.1",
11
- "@angular/localize": "^12.0.1",
12
- "@angular/material": "^12.0.1",
13
- "@angular/platform-browser": "^12.0.1",
14
- "@angular/router": "^12.0.1",
15
- "@rxap/components": "^12.0.10",
16
- "@rxap/data-source": "^12.1.1",
17
- "@rxap/definition": "^12.0.8",
18
- "@rxap/directives": "^12.1.2",
19
- "@rxap/form-system": "^12.0.11",
20
- "@rxap/forms": "^12.5.0",
21
- "@rxap/material-directives": "^12.0.6",
22
- "@rxap/material-table-system": "^12.3.1",
23
- "@rxap/mixin": "^12.0.7",
24
- "@rxap/open-api": "^12.1.0",
25
- "@rxap/remote-method": "^12.0.9",
26
- "@rxap/services": "^12.0.7",
27
- "@rxap/utilities": "^12.2.1",
28
- "@rxap/window-system": "^12.0.9",
5
+ "@angular-devkit/schematics": "^13.2.4",
6
+ "@angular/animations": "^13.2.3",
7
+ "@angular/cdk": "^13.2.3",
8
+ "@angular/common": "^13.2.3",
9
+ "@angular/core": "^13.2.3",
10
+ "@angular/flex-layout": "^13.0.0-beta.38",
11
+ "@angular/forms": "^13.2.3",
12
+ "@angular/localize": "^13.2.3",
13
+ "@angular/material": "^13.2.3",
14
+ "@angular/platform-browser": "^13.2.3",
15
+ "@angular/platform-browser-dynamic": "^13.2.3",
16
+ "@angular/router": "^13.2.3",
17
+ "@rxap/components": "^13.0.0-next.1",
18
+ "@rxap/config": "^13.0.0-next.1",
19
+ "@rxap/data-source": "^13.0.0-next.1",
20
+ "@rxap/definition": "^13.0.0-next.1",
21
+ "@rxap/directives": "^13.0.0-next.2",
22
+ "@rxap/form-system": "^13.0.0-next.2",
23
+ "@rxap/forms": "^13.0.0-next.1",
24
+ "@rxap/material-directives": "^13.0.0-next.1",
25
+ "@rxap/material-table-system": "^13.0.0-next.2",
26
+ "@rxap/mixin": "^13.0.0-next.1",
27
+ "@rxap/open-api": "^13.0.0-next.1",
28
+ "@rxap/remote-method": "^13.0.0-next.1",
29
+ "@rxap/services": "^13.0.0-next.1",
30
+ "@rxap/utilities": "^13.0.0-next.1",
31
+ "@rxap/window-system": "^13.0.0-next.1",
32
+ "@schematics/angular": "^13.2.4",
29
33
  "reflect-metadata": "^0.1.13",
30
34
  "rxjs": "^6.5.5",
35
+ "@rxap/schematics-ts-morph": "^13.0.0-next.0",
31
36
  "uuid": "8.3.2",
32
- "@rxap/validator": "0.0.2",
33
- "openapi-types": "9.0.0",
37
+ "@rxap/validator": "1.0.0-next.0",
38
+ "@rxap/schematics-open-api": "^13.0.0-next.0",
34
39
  "ajv-oai": "^1.2.1",
35
- "@rxap/schematics-open-api": "^12.0.8",
36
- "@rxap/schematics-ts-morph": "^12.3.0"
40
+ "openapi-types": "10.0.0"
37
41
  },
38
42
  "schematics": "./collection.json",
39
43
  "ng-update": {
40
44
  "migrations": "./migration.json",
41
45
  "packageGroup": [
42
46
  "@rxap/components",
47
+ "@rxap/config",
43
48
  "@rxap/data-source",
44
49
  "@rxap/definition",
45
50
  "@rxap/directives",
@@ -78,14 +83,27 @@
78
83
  "save": "dependencies"
79
84
  },
80
85
  "dependencies": {
81
- "@rxap/schematics-utilities": "^12.6.0",
82
- "tslib": "^2.2.0"
86
+ "@rxap/schematics-utilities": "^13.0.0-next.0",
87
+ "tslib": "^2.3.1"
83
88
  },
84
- "main": "bundles/rxap-material-table-window-system.umd.js",
85
- "module": "fesm2015/rxap-material-table-window-system.js",
86
- "es2015": "fesm2015/rxap-material-table-window-system.js",
87
- "esm2015": "esm2015/rxap-material-table-window-system.js",
88
- "fesm2015": "fesm2015/rxap-material-table-window-system.js",
89
+ "module": "fesm2015/rxap-material-table-window-system.mjs",
90
+ "es2020": "fesm2020/rxap-material-table-window-system.mjs",
91
+ "esm2020": "esm2020/rxap-material-table-window-system.mjs",
92
+ "fesm2020": "fesm2020/rxap-material-table-window-system.mjs",
93
+ "fesm2015": "fesm2015/rxap-material-table-window-system.mjs",
89
94
  "typings": "rxap-material-table-window-system.d.ts",
95
+ "exports": {
96
+ "./package.json": {
97
+ "default": "./package.json"
98
+ },
99
+ ".": {
100
+ "types": "./rxap-material-table-window-system.d.ts",
101
+ "esm2020": "./esm2020/rxap-material-table-window-system.mjs",
102
+ "es2020": "./fesm2020/rxap-material-table-window-system.mjs",
103
+ "es2015": "./fesm2015/rxap-material-table-window-system.mjs",
104
+ "node": "./fesm2015/rxap-material-table-window-system.mjs",
105
+ "default": "./fesm2020/rxap-material-table-window-system.mjs"
106
+ }
107
+ },
90
108
  "sideEffects": false
91
109
  }
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const schematics_utilities_1 = require("@rxap/schematics-utilities");
4
4
  function default_1() {
5
- return schematics_utilities_1.InstallPeerDependencies();
5
+ return (0, schematics_utilities_1.InstallPeerDependencies)();
6
6
  }
7
7
  exports.default = default_1;
8
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/material/table-window-system/src/schematics/ng-add/index.ts"],"names":[],"mappings":";;AACA,qEAAqE;AAErE;IACE,OAAO,8CAAuB,EAAE,CAAC;AACnC,CAAC;AAFD,4BAEC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/material/table-window-system/src/schematics/ng-add/index.ts"],"names":[],"mappings":";;AACA,qEAAqE;AAErE;IACE,OAAO,IAAA,8CAAuB,GAAE,CAAC;AACnC,CAAC;AAFD,4BAEC"}